@opendesign-plus-test/components 0.0.1-rc.49 → 0.0.1-rc.51

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.
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),A=require("@opensig/opendesign"),It=require("@opendesign-plus/composables"),$e=require("./chunk-OElCookieNotice.cjs.js"),fi=require("@vueuse/core"),rt=require("element-plus"),Ym=t.defineComponent({__name:"ContentWrapper",props:{verticalPadding:{type:[Boolean,String,Array],default:void 0}},setup(r){const e=Symbol("default"),i=r,n=t.computed(()=>i.verticalPadding?A.isBoolean(i.verticalPadding)?e:A.isString(i.verticalPadding)?i.verticalPadding:i.verticalPadding[0]:0),s=t.computed(()=>i.verticalPadding?A.isBoolean(i.verticalPadding)?e:A.isString(i.verticalPadding)?i.verticalPadding:A.isUndefined(i.verticalPadding[1])?i.verticalPadding[0]:i.verticalPadding[1]:0);return(a,o)=>(t.openBlock(),t.createElementBlock("div",{class:"content-wrapper",style:t.normalizeStyle({"--content-wrapper-vertical-paddingTop":n.value===t.unref(e)?void 0:n.value,"--content-wrapper-vertical-paddingBottom":s.value===t.unref(e)?void 0:s.value})},[t.renderSlot(a.$slots,"default",{},void 0,!0)],4))}}),gn=$e._export_sfc(Ym,[["__scopeId","data-v-0b8705aa"]]),Xm={key:0},Km={class:"banner-content"},Qm=["src"],Zm={key:1,class:"banner-title"},Jm={key:2,class:"banner-subtitle"},eg={key:4,class:"banner-opts"},tg=t.defineComponent({__name:"OBanner",props:{options:{default:void 0},size:{default:"large"},contentJustifyCenter:{type:Boolean,default:!1}},setup(r){const e=r,{isLight:i}=It.useTheme("opendesignplus",document.domain||"localhost"),{isPhone:n}=It.useScreen(),s=t.computed(()=>e.options),a=t.ref(""),o=c=>{setTimeout(()=>{a.value=s.value[c].bg_theme??"light"},100)},l=(c,d)=>{c&&!d&&window.open(c)};return(c,d)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["home-banner",r.size])},[r.size==="tiny"?(t.openBlock(),t.createElementBlock("div",Xm,t.toDisplayString(s.value[1].title),1)):t.unref(n)?t.unref(n)?(t.openBlock(),t.createBlock(t.unref(A.OCarousel),{key:2,class:"banner-carousel",effect:"gallery","indicator-click":"","data-o-theme":a.value,arrow:"never","auto-play":!0,onBeforeChange:o},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(m,g)=>(t.openBlock(),t.createBlock(t.unref(A.OCarouselItem),{class:t.normalizeClass(["banner-item",`banner-item${g}`]),key:g},{default:t.withCtx(()=>[t.createVNode(gn,{class:"banner-wrapper"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OFigure),{class:"banner-bg",src:m.bg,onClick:S=>l(m.href)},null,8,["src","onClick"])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:1},8,["data-o-theme"])):t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(A.OCarousel),{key:1,class:"banner-carousel",effect:"toggle","active-class":"current-slide","indicator-click":"","auto-play":!0,"data-o-theme":a.value,onBeforeChange:o},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(m,g)=>(t.openBlock(),t.createBlock(t.unref(A.OCarouselItem),{key:g,class:t.normalizeClass(["banner-item",`banner-item${g}`])},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OFigure),{class:t.normalizeClass(["banner-bg",{"with-sticky-bg":m.withStickyBg,"in-dark":!t.unref(i),"cursor-pointer":m.href&&!m.btn}]),src:m.bg,style:t.normalizeStyle({"--pad-offset":m.pad_offset}),onClick:S=>l(m.href,m.btn)},{default:t.withCtx(()=>[t.createVNode(gn,{class:t.normalizeClass(["banner-wrapper",["banner-wrapper",r.contentJustifyCenter?"content-center":""]])},{default:t.withCtx(()=>[t.createElementVNode("div",Km,[!t.unref(n)&&m.attach?(t.openBlock(),t.createElementBlock("img",{key:0,src:m.attach,class:"banner-attach"},null,8,Qm)):t.createCommentVNode("",!0),m.title?(t.openBlock(),t.createElementBlock("div",Zm,t.toDisplayString(m.title),1)):t.createCommentVNode("",!0),m.subtitle?(t.openBlock(),t.createElementBlock("div",Jm,t.toDisplayString(m.subtitle),1)):t.createCommentVNode("",!0),m.bg_text?(t.openBlock(),t.createElementBlock("div",{key:3,class:"banner-text",style:t.normalizeStyle({backgroundImage:`url(${m.bg_text})`,"--pc-width":m.pc_text_width,"--pc-height":m.pc_text_height,"--pad-width":m.pad_text_width,"--pad-height":m.pad_text_height})},null,4)):t.createCommentVNode("",!0),m.btn?(t.openBlock(),t.createElementBlock("div",eg,[t.createVNode(t.unref(A.OButton),{href:m.href,target:"_blank",variant:"solid",color:"primary",size:r.size},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.btn),1)]),_:2},1032,["href","size"])])):t.createCommentVNode("",!0)])]),_:2},1032,["class"])]),_:2},1032,["src","class","style","onClick"])]),_:2},1032,["class"]))),128))]),_:1},8,["data-o-theme"]))],2))}}),lh=$e._export_sfc(tg,[["__scopeId","data-v-e2541e9a"]]),ig={class:"cookie-notice-content"},ng=["type"],rg={class:"cookie-title"},sg={style:{transform:"rotate(180deg)"},xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24"},ag={class:"cookie-zh-title",style:{"margin-top":"0"}},og=["href"],lg={key:1,class:"cookie-en-title"},ug={key:0,class:"cookie-en-content"},cg={class:"cookie-en-desc"},dg=["href"],hg={class:"cookie-notice-right"},fg={class:"cookie-dlg-title"},pg={class:"cookie-dlg-content"},mg={class:"content-item"},gg={class:"item-header"},vg={class:"item-title"},yg={class:"item-extra"},_g={class:"item-detail"},Tg={class:"content-item"},bg={class:"item-header"},Cg={class:"item-title"},xg={class:"item-extra"},Sg={class:"item-detail"},Eg="0",ic="1",kg="2",Ls="3",wg="agreed-cookiepolicy-zh",Dg="agreed-cookiepolicy-en",Ag=t.defineComponent({__name:"OCookieNotice",props:{visible:{type:Boolean},community:{},detailUrl:{},wrapper:{},cookieDomain:{}},emits:["update:visible"],setup(r,{expose:e,emit:i}){const n=r,s=i,{lePadV:a,leLaptop:o,isPhone:l}=It.useScreen(),{locale:c,t:d}=$e.useI18n(),m=t.computed(()=>c.value==="zh"),g=t.ref(),S=t.computed(()=>g.value?!!getComputedStyle(g.value).getPropertyValue("--grid-content-width"):!1),T=t.computed(()=>m.value?wg:Dg),b=t.ref(!1),y=fi.useVModel(n,"visible",s,{defaultValue:!1}),x=j=>{const L=document.cookie.split(";").find(V=>V.split("=")[0].trim()===encodeURIComponent(j));return L?decodeURIComponent(L.split("=")[1]):null},N=(j,L,V,M)=>{const q=`; max-age=${V*24*60*60}`;document.cookie=`${encodeURIComponent(j)}=${encodeURIComponent(L)}${q}; path=/; domain=${M}`},I=(j,L)=>{document.cookie=`${encodeURIComponent(j)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${L}`},D=j=>{typeof j=="boolean"?y.value=j:y.value=!y.value,t.nextTick(()=>{!y.value&&m.value&&x(T.value)!==Ls&&N(T.value,Ls,180,n.cookieDomain??location.hostname)})},z=t.ref(!1),H=j=>{typeof j=="boolean"?z.value=j:z.value=!z.value},U=()=>m.value?x(T.value)!==Ls:(x(T.value)??"0")===Eg,B=()=>m.value?x(T.value)===Ls:x(T.value)===ic;t.onMounted(()=>{U()&&D(!0)}),t.watch(c,()=>{D(U())});const G=()=>{b.value=!0,I(T.value,n.cookieDomain??location.hostname),N(T.value,ic,180,n.cookieDomain??location.hostname),D(!1)},C=()=>{b.value=!1,I(T.value,n.cookieDomain??location.hostname),N(T.value,kg,180,n.cookieDomain??location.hostname),D(!1)},k=t.computed(()=>l.value?[{id:"save",label:d("cookie.saveSetting"),variant:"text",onClick:()=>{b.value?G():C(),H(!1)}},{id:"allowAll",label:d("cookie.acceptAll"),variant:"text",onClick:()=>{b.value=!0,G(),H(!1)}}]:[{id:"save",color:"primary",label:d("cookie.saveSetting"),variant:"outline",size:"medium",round:"pill",onClick:()=>{b.value?G():C(),H(!1)}},{id:"allowAll",color:"primary",label:d("cookie.acceptAll"),variant:"outline",size:"medium",round:"pill",onClick:()=>{b.value=!0,G(),H(!1)}}]),O=j=>{j&&(b.value=B())};return e({check(){B()===y.value&&D()}}),(j,L)=>(t.openBlock(),t.createBlock(t.unref($e.ClientOnly),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.Teleport,{to:r.wrapper||"#app"},[t.unref(y)?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"cookieNoticeRef",ref:g,class:"cookie-notice"},[t.createElementVNode("div",ig,[t.createElementVNode("div",{type:t.unref(c),class:t.normalizeClass({"cookie-notice-wrap-grid":S.value,"cookie-notice-wrap":!S.value})},[t.createElementVNode("div",rg,[m.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(t.unref(A.OIcon),{style:{display:"inline-block","font-size":"24px","margin-right":"4px"}},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",sg,[...L[4]||(L[4]=[t.createElementVNode("path",{fill:"#002fa7",d:"M21 12c0 4.971-4.029 9-9 9s-9-4.029-9-9c0-4.971 4.029-9 9-9s9 4.029 9 9z"},null,-1),t.createElementVNode("path",{fill:"#fff",d:"M12 9.4c0.552 0 1-0.448 1-1s-0.448-1-1-1c-0.552 0-1 0.448-1 1s0.448 1 1 1zM12.492 10.943c-0.042-0.233-0.246-0.41-0.492-0.41-0.276 0-0.5 0.224-0.5 0.5v5.5l0.008 0.090c0.042 0.233 0.246 0.41 0.492 0.41 0.276 0 0.5-0.224 0.5-0.5v-5.5l-0.008-0.090z"},null,-1)])]))]),_:1}),t.createElementVNode("p",ag,[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.desc"))+" ",1),t.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(t.unref(d)("cookie.about")),9,og)])],64)):(t.openBlock(),t.createElementBlock("p",lg,t.toDisplayString(t.unref(d)("cookie.title",[r.community])),1)),t.createVNode(t.unref(A.OIcon),{class:"cookie-notice-close",onClick:L[0]||(L[0]=V=>D(!1))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconClose))]),_:1})]),m.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ug,[t.createElementVNode("p",cg,[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.desc"))+" ",1),t.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(t.unref(d)("cookie.about")),9,dg),L[5]||(L[5]=t.createTextVNode(". ",-1))]),t.createElementVNode("div",hg,[t.createVNode(t.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:G},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.acceptAll")),1)]),_:1}),t.createVNode(t.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:C},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.rejectAll")),1)]),_:1}),t.createVNode(t.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:L[1]||(L[1]=V=>H(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.manage")),1)]),_:1})])]))],10,ng)]),t.createVNode(t.unref(A.ODialog),{visible:z.value,"onUpdate:visible":L[3]||(L[3]=V=>z.value=V),size:t.unref(o)?"medium":"large","phone-half-full":t.unref(a),"main-class":S.value?"o-cookie-notice-dlg-main":"",class:"cookie-dlg",actions:k.value,onChange:O,style:{"--dlg-radius":"4px"}},{header:t.withCtx(()=>[t.createElementVNode("span",fg,t.toDisplayString(t.unref(d)("cookie.manage")),1)]),default:t.withCtx(()=>[t.createElementVNode("div",pg,[t.createElementVNode("div",mg,[t.createElementVNode("div",gg,[t.createElementVNode("span",vg,t.toDisplayString(t.unref(d)("cookie.necessaryCookie")),1),t.createElementVNode("span",yg,t.toDisplayString(t.unref(d)("cookie.alwaysOn")),1)]),t.createElementVNode("div",_g,t.toDisplayString(t.unref(d)("cookie.necessaryCookieDetail")),1)]),t.createElementVNode("div",Tg,[t.createElementVNode("div",bg,[t.createElementVNode("span",Cg,t.toDisplayString(t.unref(d)("cookie.analyticalCookie")),1),t.createElementVNode("span",xg,[t.createVNode(t.unref(A.OSwitch),{modelValue:b.value,"onUpdate:modelValue":L[2]||(L[2]=V=>b.value=V)},null,8,["modelValue"])])]),t.createElementVNode("div",Sg,t.toDisplayString(t.unref(d)("cookie.analyticalCookieDetail")),1)])])]),_:1},8,["visible","size","phone-half-full","main-class","actions"])],512)):t.createCommentVNode("",!0)],8,["to"]))]),_:1}))}}),uh=$e._export_sfc(Ag,[["__scopeId","data-v-18f3a4fa"]]),Ig={key:0,class:"atom"},Ng={class:"atom-text"},Og=["href"],Bg=["src"],Lg={key:0,class:"quick-nav"},Pg={class:"category-title"},Mg={class:"navs"},Rg=["href"],Vg={key:0,class:"friendship-link"},Fg={class:"friendship-link-title"},$g={class:"friendship-link-box"},Ug=["href"],zg={key:0,class:"footer-logo"},Hg=["src"],qg=["src"],jg=["href"],Gg={key:1,class:"footer-option"},Wg={class:"footer-option-item"},Yg=["href"],Xg={class:"license"},Kg={class:"copyright"},Qg={class:"filing"},Zg=["href"],Jg=["src"],e1={key:2,class:"footer-right"},t1={key:0,class:"code-box"},i1=["src"],n1={class:"code-layer"},r1=["src"],s1={class:"txt"},a1={class:"app-footer-pc"},o1={key:0,class:"footer-left"},l1=["href"],u1=["src"],c1={key:0,class:"footer-right"},d1=["href"],h1={class:"app-footer-mb"},f1={key:0,class:"links"},p1=["href"],m1={class:"copyright"},g1={key:0,class:"approval"},v1=["href"],y1=["src"],_1=t.defineComponent({__name:"OFooter",props:{simple:{default:!1},atom:{default:void 0},lang:{default:void 0},quickNav:{default:void 0},friendshipLink:{default:void 0},footerLogo:{default:void 0},footerOption:{default:void 0},qrcode:{default:void 0},footerBg:{default:void 0}},setup(r){const e=r;return(i,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([e.simple?"app-footer-simple":"app-footer"])},[e.simple?(t.openBlock(),t.createBlock(gn,{key:1},{default:t.withCtx(()=>[t.createElementVNode("div",a1,[i.$slots.left||e.footerOption?t.renderSlot(i.$slots,"left",{key:0},()=>[e.footerOption?(t.openBlock(),t.createElementBlock("div",o1,[t.createElementVNode("span",null,t.toDisplayString(e.footerOption[e.lang].copyright),1),t.createElementVNode("a",{class:"approval",href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(e.footerOption[e.lang].beianInfo1),9,l1),t.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,u1),t.createElementVNode("span",null,t.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0),i.$slots.right||e.footerOption?t.renderSlot(i.$slots,"right",{key:1},()=>[e.footerOption?(t.openBlock(),t.createElementBlock("div",c1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.footerOption[e.lang].link,(s,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:s.url},[t.createElementVNode("a",{target:"_blank",href:s.url,class:"link"},t.toDisplayString(s.name),9,d1),a!==e.footerOption[e.lang].link.length-1?(t.openBlock(),t.createBlock(t.unref(A.ODivider),{key:0,direction:"v"})):t.createCommentVNode("",!0)],64))),128))])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0)]),t.createElementVNode("div",h1,[i.$slots.right||e.footerOption?t.renderSlot(i.$slots,"right",{key:0},()=>[e.footerOption?(t.openBlock(),t.createElementBlock("div",f1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.footerOption[e.lang].link,(s,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:s.url},[t.createElementVNode("a",{target:"_blank",href:s.url,class:"link"},t.toDisplayString(s.name),9,p1),a!==e.footerOption[e.lang].link.length-1?(t.openBlock(),t.createBlock(t.unref(A.ODivider),{key:0,direction:"v"})):t.createCommentVNode("",!0)],64))),128))])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0),t.renderSlot(i.$slots,"copyright",{},()=>[t.createElementVNode("div",m1,t.toDisplayString(e.footerOption[e.lang].copyright),1)],!0),i.$slots.left||e.footerOption?t.renderSlot(i.$slots,"left",{key:1},()=>[e.footerOption?(t.openBlock(),t.createElementBlock("div",g1,[t.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(e.footerOption[e.lang].beianInfo1),9,v1),t.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,y1),t.createElementVNode("span",null,t.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0)])]),_:3})):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i.$slots.atom||e.atom?(t.openBlock(),t.createBlock(gn,{key:0},{default:t.withCtx(()=>[t.renderSlot(i.$slots,"atom",{},()=>[e.atom?(t.openBlock(),t.createElementBlock("div",Ig,[t.createElementVNode("p",Ng,t.toDisplayString(e.atom[e.lang].title),1),t.createElementVNode("a",{href:e.atom[e.lang].href,target:"_blank"},[t.createElementVNode("img",{src:e.atom[e.lang].img,class:"atom-logo",alt:""},null,8,Bg)],8,Og)])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.ODivider),{class:"atom-divider"})],!0)]),_:3})):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"footer-content",style:t.normalizeStyle({backgroundImage:`url(${e.footerBg})`})},[t.createVNode(gn,null,{default:t.withCtx(()=>[i.$slots.quickNav||e.quickNav?t.renderSlot(i.$slots,"quickNav",{key:0},()=>[e.quickNav?(t.openBlock(),t.createElementBlock("div",Lg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.quickNav[e.lang],s=>(t.openBlock(),t.createElementBlock("div",{key:s.title,class:"category"},[t.createElementVNode("div",Pg,t.toDisplayString(s.title),1),t.createElementVNode("ul",Mg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.list,a=>(t.openBlock(),t.createElementBlock("li",{key:a.title,class:"nav"},[t.createElementVNode("a",{href:a.link,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(a.title),9,Rg)]))),128))])]))),128))])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0),i.$slots.friendshipLink||e.friendshipLink?t.renderSlot(i.$slots,"friendshipLink",{key:1},()=>[e.friendshipLink?(t.openBlock(),t.createElementBlock("div",Vg,[t.createElementVNode("div",Fg,t.toDisplayString(e.friendshipLink.title[e.lang]),1),t.createElementVNode("div",$g,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.friendshipLink.link[e.lang],s=>(t.openBlock(),t.createElementBlock("a",{href:s.link,key:s.link,target:"_blank"},t.toDisplayString(s.title),9,Ug))),128))])])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0),t.renderSlot(i.$slots,"footer",{},()=>[t.createElementVNode("div",{class:t.normalizeClass(["inner",{"inner-en":e.lang==="en"}])},[e.footerLogo?(t.openBlock(),t.createElementBlock("div",zg,[t.createElementVNode("img",{class:"show-pc",src:e.footerLogo.logo,alt:""},null,8,Hg),t.createElementVNode("img",{class:"show-mo",src:e.footerLogo.logoMb,alt:""},null,8,qg),t.createElementVNode("p",null,[t.createElementVNode("a",{class:"email",href:`mailto:${e.footerLogo.email}`,target:"_blank"},t.toDisplayString(e.footerLogo.email),9,jg)])])):t.createCommentVNode("",!0),e.footerOption?(t.openBlock(),t.createElementBlock("div",Gg,[t.createElementVNode("div",Wg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.footerOption[e.lang].link,(s,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:s.url},[t.createElementVNode("a",{target:"_blank",href:s.url},t.toDisplayString(s.name),9,Yg),a!==e.footerOption[e.lang].link.length-1?(t.openBlock(),t.createBlock(t.unref(A.ODivider),{key:0,style:{"--o-divider-bd-color":"var(--o-color-info3-inverse)","--o-divider-label-gap":"0 8px"},direction:"v"})):t.createCommentVNode("",!0)],64))),128))]),t.createElementVNode("p",Xg,[t.createElementVNode("span",null,t.toDisplayString(e.footerOption[e.lang].licenseText),1),t.createTextVNode(" "+t.toDisplayString(e.footerOption[e.lang].licenseInfo),1)]),t.createElementVNode("div",Kg,[t.createElementVNode("p",null,t.toDisplayString(e.footerOption[e.lang].copyright),1),t.createElementVNode("div",Qg,[t.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank"},t.toDisplayString(e.footerOption[e.lang].beianInfo1),9,Zg),t.createElementVNode("img",{src:e.footerOption[e.lang].policeIcon,class:"filing-img"},null,8,Jg),t.createElementVNode("p",null,t.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])])])):t.createCommentVNode("",!0),e.qrcode?(t.openBlock(),t.createElementBlock("div",e1,[e.lang==="zh"?(t.openBlock(),t.createElementBlock("div",t1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.qrcode,(s,a)=>(t.openBlock(),t.createElementBlock("div",{key:a,class:"code-pop"},[t.createElementVNode("img",{src:s.img,class:"code-img",alt:""},null,8,i1),t.createElementVNode("div",n1,[t.createElementVNode("img",{src:s.code,alt:""},null,8,r1),t.createElementVNode("p",s1,t.toDisplayString(s.label),1)])]))),128))])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],2)],!0)]),_:3})],4)],64))],2))}}),ch=$e._export_sfc(_1,[["__scopeId","data-v-2ce6e57a"]]);function T1(r){const e=t.ref(""),i=t.ref(null),n=t.ref(""),s=t.ref(!1);let a=null;const o=x=>{var D,z,H,U;const N=(D=r.allowedImageTypes)==null?void 0:D.value,I=N&&N.length>0?N.includes(x.type):(z=x.type)==null?void 0:z.startsWith("image/");return!x.type||!I?((H=r.onValidationError)==null||H.call(r,"type",x),!1):r.maxImageSize.value>0&&x.size>r.maxImageSize.value?((U=r.onValidationError)==null||U.call(r,"size",x),!1):!0},l=()=>{if(e.value)try{URL.revokeObjectURL(e.value)}catch{}e.value="",i.value=null,n.value="",s.value=!1,a=null},c=x=>{if(!x){i.value||l();return}if(n.value!==x){if(e.value&&e.value.startsWith("blob:"))try{URL.revokeObjectURL(e.value)}catch{}n.value=x,e.value=x,i.value=null}},d=x=>{var I,D;if(!o(x))return;l(),i.value=x,e.value=URL.createObjectURL(x),(I=r.onUploadStart)==null||I.call(r,x);const N=(D=r.uploadImage)==null?void 0:D.value;N&&(s.value=!0,a=Promise.resolve().then(()=>N(x)).then(z=>{var H;z&&i.value===x&&(n.value=z,(H=r.onUploadSuccess)==null||H.call(r,z,x))}).catch(z=>{var H;(H=r.onUploadError)==null||H.call(r,z,x)}).finally(()=>{s.value=!1}))},m=x=>{var I;const N=(I=x.clipboardData)==null?void 0:I.items;if(N)for(let D=0;D<N.length;D++){const z=N[D];if(z.type.indexOf("image")!==-1){const H=z.getAsFile();H&&d(H);break}}},g=x=>{x.preventDefault(),x.stopPropagation()},S=x=>{var I,D;x.preventDefault(),x.stopPropagation();const N=(D=(I=x.dataTransfer)==null?void 0:I.files)==null?void 0:D[0];N&&N.type.indexOf("image")!==-1&&d(N)},T=x=>{var D;const N=x.target,I=(D=N.files)==null?void 0:D[0];I&&d(I),N&&(N.value="")},b=x=>{x&&(x.value="",x.click())},y=()=>a??Promise.resolve();return t.onBeforeUnmount(l),{previewUrl:e,file:i,uploadedUrl:n,isUploading:s,onPaste:m,onDrop:S,onDragOver:g,onFileChange:T,pickFile:b,handleImageFile:d,reset:l,setExternalUrl:c,awaitUpload:y}}const b1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function C1(r,e){return t.openBlock(),t.createElementBlock("svg",b1,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M13.215 0.524c-7.048 0-12.762 5.714-12.762 12.762s5.714 12.762 12.762 12.762c7.048 0 12.762-5.714 12.762-12.762s-5.714-12.762-12.762-12.762zM13.215 2.809c5.786 0 10.476 4.69 10.476 10.476s-4.69 10.476-10.476 10.476c-5.786 0-10.476-4.69-10.476-10.476s4.69-10.476 10.476-10.476z"},null,-1),t.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M23.33 23.22c0.446-0.447 1.169-0.448 1.616-0.002l4.771 4.759c0.447 0.446 0.448 1.169 0.002 1.616s-1.169 0.448-1.616 0.002l-4.771-4.759c-0.447-0.446-0.448-1.169-0.002-1.616z"},null,-1)])])}const dh={name:"components-icon-header-search",render:C1},x1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function S1(r,e){return t.openBlock(),t.createElementBlock("svg",x1,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M18.528 5.472c0.246 0.246 0.271 0.63 0.074 0.903l-0.074 0.087-5.54 5.538 0.006 0.006-0.989 0.989-0.006-0.006-5.538 5.54c-0.273 0.273-0.717 0.273-0.99 0-0.246-0.246-0.271-0.63-0.074-0.903l0.074-0.087 5.538-5.539-5.538-5.538-0.074-0.087c-0.197-0.274-0.172-0.657 0.074-0.903s0.63-0.271 0.903-0.074l0.087 0.074 5.538 5.539 5.539-5.539c0.273-0.273 0.717-0.273 0.99 0zM14.551 13.561l3.978 3.978 0.074 0.087c0.197 0.274 0.172 0.657-0.074 0.903s-0.63 0.271-0.903 0.074l-0.087-0.074-3.978-3.978c-0.273-0.273-0.273-0.717 0-0.99v0c0.273-0.273 0.717-0.273 0.99 0z"},null,-1)])])}const wl={name:"components-icon-close",render:S1},E1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function k1(r,e){return t.openBlock(),t.createElementBlock("svg",E1,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",d:"M19.724 4.238c1.105 0 2 0.895 2 2v6.772c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-0.816l-3.544 3.84c-0.248 0.268-0.661 0.301-0.948 0.075l-4.13-3.256-3.925 3.843c-0.249 0.243-0.632 0.264-0.904 0.064l-0.086-0.075c-0.27-0.276-0.266-0.72 0.011-0.99l4.365-4.273c0.251-0.246 0.647-0.267 0.923-0.050l4.104 3.235 4.134-4.478v-3.892c0-0.331-0.269-0.6-0.6-0.6h-15.45c-0.331 0-0.6 0.269-0.6 0.6v11.501c0 0.331 0.269 0.6 0.6 0.6h9.781c0.387 0 0.7 0.313 0.7 0.7s-0.313 0.7-0.7 0.7h-9.781c-1.105 0-2-0.895-2-2v-11.501c0-1.105 0.895-2 2-2h15.45zM9.532 8.878c0-0.695-0.579-1.259-1.294-1.259s-1.294 0.564-1.294 1.259c0 0.695 0.579 1.259 1.294 1.259s1.294-0.564 1.294-1.259zM16.561 18.645c-0.195-0.195-0.195-0.512 0-0.707l2.090-2.090c0.010-0.011 0.020-0.021 0.030-0.030l0.001-0.001c0.195-0.195 0.512-0.195 0.707 0l2.121 2.121c0.195 0.195 0.195 0.512 0 0.707s-0.512 0.195-0.707 0l-1.284-1.284v3.57c0 0.276-0.224 0.5-0.5 0.5s-0.5-0.224-0.5-0.5v-3.538l-1.251 1.251c-0.174 0.174-0.443 0.193-0.638 0.058l-0.069-0.058z"},null,-1)])])}const w1={name:"components-icon-image-upload",render:k1},D1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function A1(r,e){return t.openBlock(),t.createElementBlock("svg",D1,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"#6f6f75",d:"M22.5 12c0 5.799-4.701 10.5-10.5 10.5s-10.5-4.701-10.5-10.5c0-5.799 4.701-10.5 10.5-10.5s10.5 4.701 10.5 10.5z"},null,-1),t.createElementVNode("path",{fill:"#ffffff",d:"M15.3 7.631c0.274-0.197 0.657-0.172 0.903 0.074 0.273 0.273 0.273 0.717 0 0.99l-3.259 3.259 3.259 3.259c0.273 0.273 0.273 0.717 0 0.99-0.246 0.246-0.63 0.271-0.903 0.074l-0.087-0.074-3.259-3.259-3.259 3.259-0.087 0.074c-0.274 0.197-0.657 0.172-0.903-0.074-0.273-0.273-0.273-0.717 0-0.99l3.259-3.259-3.259-3.259c-0.273-0.273-0.273-0.717 0-0.99 0.246-0.246 0.63-0.271 0.903-0.074l0.087 0.074 3.259 3.259 3.259-3.259 0.087-0.074z"},null,-1)])])}const Xo={name:"components-icon-delete-hover",render:A1},I1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function N1(r,e){return t.openBlock(),t.createElementBlock("svg",I1,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M3.398 10.877c0-4.099 3.323-7.423 7.423-7.423s7.423 3.323 7.423 7.423c0 4.099-3.323 7.423-7.423 7.423s-7.423-3.323-7.423-7.423zM16.774 10.877c0-3.326-2.657-6.023-5.935-6.023s-5.935 2.696-5.935 6.023c0 3.326 2.657 6.023 5.935 6.023s5.935-2.696 5.935-6.023zM11.499 13.369c0 0.365-0.296 0.661-0.661 0.661s-0.661-0.296-0.661-0.661v-1.821h-1.775c-0.371 0-0.671-0.3-0.671-0.671s0.3-0.671 0.671-0.671h1.775v-1.821c0-0.365 0.296-0.661 0.661-0.661s0.661 0.296 0.661 0.661v1.821h1.775c0.371 0 0.671 0.3 0.671 0.671s-0.3 0.671-0.671 0.671h-1.775v1.821zM16.579 16.598c0.242-0.246 0.62-0.271 0.89-0.075l0.086 0.074 2.72 2.754c0.27 0.273 0.27 0.716 0.001 0.99-0.242 0.246-0.62 0.271-0.89 0.075l-0.086-0.074-2.72-2.754c-0.27-0.273-0.27-0.716-0.001-0.99z"},null,-1)])])}const nc={name:"components-icon-image-zoomin",render:N1},O1={class:"o-search-image-input-row"},B1={key:0,class:"o-search-image-input-thumb"},L1={key:0,class:"o-search-image-input-preview"},P1={class:"o-search-image-input-preview-wrapper"},M1={class:"o-search-image-input-preview-zoom"},R1=["accept"],V1=t.defineComponent({__name:"SearchImageInput",props:{modelValue:{default:""},imageUrl:{default:""},placeholder:{},imagePlaceholder:{},size:{default:"medium"},enableImageSearch:{type:Boolean,default:!1},uploadImage:{},maxImageSize:{default:10*1024*1024},imageUploadTooltip:{},expanded:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},showSuffix:{type:Boolean,default:!0},inlineThumbnail:{type:Boolean,default:!1},preview:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},allowedImageTypes:{default:()=>["image/jpeg","image/png","image/gif","image/webp"]}},emits:["update:modelValue","update:imageUrl","focus","blur","enter","clear","image-clear","image-upload-start","image-upload-success","image-upload-error","image-validate-error","preview-change"],setup(r,{expose:e,emit:i}){const n=r,s=i,{t:a}=$e.useI18n(),o=t.computed(()=>n.uploadImage),l=t.computed(()=>n.maxImageSize),c=t.computed(()=>n.allowedImageTypes),d=t.computed(()=>(n.allowedImageTypes??[]).join(",")),m=T1({uploadImage:o,maxImageSize:l,allowedImageTypes:c,onUploadStart:O=>s("image-upload-start",O),onUploadSuccess:(O,j)=>{s("update:imageUrl",O),s("image-upload-success",O,j)},onUploadError:(O,j)=>s("image-upload-error",O,j),onValidationError:(O,j)=>s("image-validate-error",O,j)}),g=t.ref(),S=t.ref(),T=t.ref(null),b=t.computed({get:()=>n.modelValue,set:O=>s("update:modelValue",O)});t.watch(()=>n.imageUrl,O=>{m.setExternalUrl(O)},{immediate:!0});const y=t.computed(()=>!!m.previewUrl.value),x=t.computed(()=>y.value?n.imagePlaceholder??a("search.extendedPlaceholder"):n.placeholder??a("search.placeholder")),N=()=>{b.value="",y.value&&I(),s("clear")},I=()=>{m.reset(),s("update:imageUrl",""),s("image-clear")},D=()=>{m.pickFile(g.value),t.nextTick(()=>{var O,j;return(j=(O=S.value)==null?void 0:O.focus)==null?void 0:j.call(O)})},z=O=>{m.onFileChange(O),t.nextTick(()=>{var j,L;return(L=(j=S.value)==null?void 0:j.focus)==null?void 0:L.call(j)})},H=O=>{n.enableImageSearch&&m.onPaste(O)},U=O=>{n.enableImageSearch&&m.onDragOver(O)},B=O=>{n.enableImageSearch&&m.onDrop(O)},G=O=>{s("preview-change",O)},C=t.computed(()=>!!b.value||y.value);return e({focus:()=>{var O,j;return(j=(O=S.value)==null?void 0:O.focus)==null?void 0:j.call(O)},blur:()=>{var O,j;return(j=(O=S.value)==null?void 0:O.blur)==null?void 0:j.call(O)},awaitUpload:()=>m.awaitUpload(),getUploadedUrl:()=>m.uploadedUrl.value,getIsUploading:()=>m.isUploading.value,resetImage:()=>{m.reset(),s("update:imageUrl","")}}),(O,j)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["o-search-image-input",{"has-image":y.value,"is-expanded":r.expanded&&y.value}]),onDragover:U,onDrop:B},[t.createElementVNode("div",O1,[t.createVNode(t.unref(A.OInput),{ref_key:"inputRef",ref:S,modelValue:b.value,"onUpdate:modelValue":j[3]||(j[3]=L=>b.value=L),placeholder:x.value,size:r.size,disabled:r.disabled,class:"o-search-image-input-input",onPressEnter:j[4]||(j[4]=L=>s("enter")),onFocus:j[5]||(j[5]=L=>s("focus",L)),onBlur:j[6]||(j[6]=L=>s("blur",L)),onPaste:H},t.createSlots({prefix:t.withCtx(()=>[t.renderSlot(O.$slots,"prefix",{},()=>[t.createVNode(t.unref(A.OIcon),{class:"o-search-image-input-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(dh))]),_:1})],!0),r.inlineThumbnail&&y.value?(t.openBlock(),t.createElementBlock("div",B1,[t.createVNode(t.unref(A.OFigure),{src:t.unref(m).previewUrl.value,alt:"",class:"o-search-image-input-thumb-figure"},null,8,["src"]),t.createElementVNode("div",{class:"o-search-image-input-thumb-zoom",onMousedown:j[0]||(j[0]=t.withModifiers(()=>{},["prevent"]))},[t.createVNode(t.unref(A.OIcon),{class:"o-search-image-input-thumb-zoom-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(nc))]),_:1})],32),t.createVNode(t.unref(A.OIcon),{class:"o-search-image-input-thumb-remove",onMousedown:j[1]||(j[1]=t.withModifiers(()=>{},["prevent"])),onClick:t.withModifiers(I,["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(Xo))]),_:1})])):t.createCommentVNode("",!0)]),_:2},[r.showSuffix?{name:"suffix",fn:t.withCtx(()=>[t.renderSlot(O.$slots,"suffix",{hasValue:C.value},()=>[r.enableImageSearch?(t.openBlock(),t.createElementBlock("span",{key:0,ref_key:"uploadBtnRef",ref:T,class:"o-search-image-input-upload-btn"},[t.createVNode(t.unref(A.OIcon),{class:"o-search-image-input-icon upload",onClick:t.withModifiers(D,["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(w1))]),_:1})],512)):t.createCommentVNode("",!0),r.enableImageSearch&&T.value?(t.openBlock(),t.createBlock(t.unref(A.OPopover),{key:1,trigger:"hover",position:"bottom",target:T.value,"body-class":"o-search-image-input-tooltip"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.imageUploadTooltip??t.unref(a)("search.imageUploadTooltip")),1)]),_:1},8,["target"])):t.createCommentVNode("",!0),r.clearable&&C.value?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:2,class:"o-search-image-input-icon close",onMousedown:j[2]||(j[2]=t.withModifiers(()=>{},["prevent"])),onClick:t.withModifiers(N,["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(wl))]),_:1})):t.createCommentVNode("",!0)],!0)]),key:"0"}:void 0]),1032,["modelValue","placeholder","size","disabled"])]),r.expanded&&y.value?(t.openBlock(),t.createElementBlock("div",L1,[t.renderSlot(O.$slots,"preview",{previewUrl:t.unref(m).previewUrl.value,remove:I},()=>[t.createElementVNode("div",P1,[t.createVNode(t.unref(A.OFigure),{src:t.unref(m).previewUrl.value,preview:r.preview,alt:"",class:"o-search-image-input-preview-figure",onPreview:G},null,8,["src","preview"]),t.createElementVNode("div",M1,[t.createVNode(t.unref(A.OIcon),{class:"o-search-image-input-preview-zoom-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(nc))]),_:1})]),t.createVNode(t.unref(A.OIcon),{class:"o-search-image-input-preview-remove",onClick:t.withModifiers(I,["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(Xo))]),_:1})])],!0)])):t.createCommentVNode("",!0),r.enableImageSearch?(t.openBlock(),t.createElementBlock("input",{key:1,ref_key:"fileInputRef",ref:g,type:"file",accept:d.value,class:"o-search-image-input-file",onChange:z},null,40,R1)):t.createCommentVNode("",!0)],34))}}),hh=$e._export_sfc(V1,[["__scopeId","data-v-39326311"]]),F1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function $1(r,e){return t.openBlock(),t.createElementBlock("svg",F1,[...e[0]||(e[0]=[t.createStaticVNode('<path opacity="0.8" fill="currentColor" d="M5.616 4.34c0.368 0 0.674 0.265 0.738 0.615l0.012 0.135v14.968c0 0.213 0.148 0.391 0.347 0.438l0.103 0.012h10.719c0.213 0 0.391-0.148 0.438-0.347l0.012-0.103v-11.712c0-0.414 0.336-0.75 0.75-0.75 0.368 0 0.674 0.265 0.738 0.615l0.012 0.135v11.712c0 1.010-0.767 1.84-1.751 1.94l-0.199 0.010h-10.719c-1.010 0-1.84-0.767-1.94-1.751l-0.010-0.199v-14.968c0-0.414 0.336-0.75 0.75-0.75z"></path><path opacity="0.8" fill="currentColor" d="M20.19 4.34c0.414 0 0.75 0.336 0.75 0.75 0 0.368-0.265 0.674-0.615 0.738l-0.135 0.012h-16.333c-0.414 0-0.75-0.336-0.75-0.75 0-0.368 0.265-0.674 0.615-0.738l0.135-0.012h16.333z"></path><path opacity="0.8" fill="currentColor" d="M14.256 1.936c0.414 0 0.75 0.336 0.75 0.75 0 0.368-0.265 0.674-0.615 0.738l-0.135 0.012h-4.535c-0.414 0-0.75-0.336-0.75-0.75 0-0.368 0.265-0.674 0.615-0.738l0.135-0.012h4.535z"></path><path opacity="0.8" fill="currentColor" d="M10.096 9.419c0.368 0 0.674 0.265 0.738 0.615l0.012 0.135v6.484c0 0.414-0.336 0.75-0.75 0.75-0.368 0-0.674-0.265-0.738-0.615l-0.012-0.135v-6.484c0-0.414 0.336-0.75 0.75-0.75z"></path><path opacity="0.8" fill="currentColor" d="M14.596 9.419c0.368 0 0.674 0.265 0.738 0.615l0.012 0.135v6.484c0 0.414-0.336 0.75-0.75 0.75-0.368 0-0.674-0.265-0.738-0.615l-0.012-0.135v-6.484c0-0.414 0.336-0.75 0.75-0.75z"></path>',5)])])}const U1={name:"components-icon-delete",render:$1},z1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function H1(r,e){return t.openBlock(),t.createElementBlock("svg",z1,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M17.947 4.273c-1.676-1.292-3.752-2.023-5.948-2.023-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75c4.032 0 7.604-2.47 9.066-6.156 0.153-0.385-0.035-0.821-0.42-0.974s-0.821 0.036-0.974 0.42c-1.237 3.119-4.26 5.209-7.672 5.209-4.556 0-8.25-3.694-8.25-8.25s3.694-8.25 8.25-8.25c1.837 0 3.574 0.604 4.983 1.673l-1.305 1.556c-0.077 0.092-0.021 0.232 0.098 0.246l4.873 0.539c0.106 0.012 0.191-0.088 0.16-0.191l-1.377-4.706c-0.034-0.115-0.182-0.146-0.259-0.054l-1.226 1.461z"},null,-1)])])}const q1={name:"components-icon-refresh",render:H1},j1=/[.*+?^${}()|[\]\\]/g;function G1(r,e){const i=(e||"").trim();if(!i)return[{text:r,match:!1}];const n=i.replace(j1,"\\$&"),s=new RegExp(n,"gi"),a=[];let o=0,l;for(;(l=s.exec(r))!==null;){if(l.index===s.lastIndex){s.lastIndex++;continue}l.index>o&&a.push({text:r.slice(o,l.index),match:!1}),a.push({text:l[0],match:!0}),o=l.index+l[0].length}return o<r.length&&a.push({text:r.slice(o),match:!1}),a}const W1={class:"o-search-highlight-text"},Y1=t.defineComponent({__name:"HighlightText",props:{text:{},keyword:{},enabled:{type:Boolean,default:!0}},setup(r){const e=r,i=t.computed(()=>!e.enabled||!e.keyword?[{text:e.text,match:!1}]:G1(e.text,e.keyword));return(n,s)=>(t.openBlock(),t.createElementBlock("span",W1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,(a,o)=>(t.openBlock(),t.createElementBlock("span",{key:o,class:t.normalizeClass({"is-match":a.match})},t.toDisplayString(a.text),3))),128))]))}}),rc=$e._export_sfc(Y1,[["__scopeId","data-v-2a99e23c"]]),X1={class:"o-search-panel"},K1={key:0,class:"o-search-panel-section o-search-panel-onestep"},Q1={class:"o-search-panel-section-title onestep"},Z1=["onClick"],J1={key:0,class:"o-search-panel-onestep-tag"},e2={key:1,class:"o-search-panel-divider"},t2={key:2,class:"o-search-panel-section o-search-panel-suggest"},i2={class:"o-search-panel-section-title suggest"},n2=["onClick"],r2={key:1,class:"o-search-panel-no-data"},s2={key:3,class:"o-search-panel-section o-search-panel-recommend"},a2=["onClick"],o2={key:4,class:"o-search-panel-section o-search-panel-history"},l2={class:"o-search-panel-common-header"},u2={class:"o-search-panel-section-title"},c2=["onClick"],d2={class:"o-search-panel-history-row-text"},h2={key:1,class:"o-search-panel-history-list"},f2=["onClick"],p2={class:"o-search-panel-history-text"},m2={key:5,class:"o-search-panel-divider"},g2={key:6,class:"o-search-panel-section o-search-panel-hot"},v2={class:"o-search-panel-common-header"},y2={class:"o-search-panel-section-title"},_2={class:"o-search-panel-hot-list"},T2=["onClick"],b2=t.defineComponent({__name:"SearchPanel",props:{keyword:{default:""},onestepItems:{default:()=>[]},onestepTitle:{},suggestItems:{default:()=>[]},suggestTitle:{},recommendItems:{default:()=>[]},historyItems:{default:()=>[]},historyTitle:{},hotItems:{default:()=>[]},hotTitle:{},noDataText:{},highlightKeyword:{type:Boolean,default:!0},hideOnKeyword:{type:Boolean,default:!1},showSuggestEmpty:{type:Boolean,default:!1},isDark:{type:Boolean,default:!1},historyLayout:{default:"chips"}},emits:["onestep-click","suggest-click","recommend-click","history-click","hot-click","history-remove","history-clear","hot-refresh"],setup(r,{emit:e}){const i=r,n=e,{t:s}=$e.useI18n(),a=t.computed(()=>{var T;return!!((T=i.keyword)!=null&&T.trim())}),o=t.computed(()=>a.value&&i.onestepItems.length>0),l=t.computed(()=>a.value&&(i.suggestItems.length>0||i.showSuggestEmpty)),c=t.computed(()=>!a.value&&i.recommendItems.length>0),d=t.computed(()=>(!i.hideOnKeyword||!a.value)&&i.historyItems.length>0),m=t.computed(()=>(!i.hideOnKeyword||!a.value)&&i.hotItems.length>0),g=t.computed(()=>o.value&&l.value),S=t.computed(()=>d.value&&m.value);return(T,b)=>(t.openBlock(),t.createElementBlock("div",X1,[o.value?(t.openBlock(),t.createElementBlock("div",K1,[t.renderSlot(T.$slots,"onestep-header",{items:r.onestepItems},()=>[t.createElementVNode("div",Q1,t.toDisplayString(r.onestepTitle??t.unref(s)("search.onestep")),1)],!0),t.renderSlot(T.$slots,"onestep-content",{items:r.onestepItems,keyword:r.keyword},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.onestepItems,y=>(t.openBlock(),t.createElementBlock("div",{key:y.key+(y.path??""),class:"o-search-panel-item o-search-panel-onestep-item",onClick:x=>n("onestep-click",y)},[t.createVNode(rc,{text:y.key,keyword:r.keyword,enabled:r.highlightKeyword},null,8,["text","keyword","enabled"]),y.type?(t.openBlock(),t.createElementBlock("span",J1,t.toDisplayString(y.type),1)):t.createCommentVNode("",!0)],8,Z1))),128))],!0)])):t.createCommentVNode("",!0),g.value?(t.openBlock(),t.createElementBlock("div",e2)):t.createCommentVNode("",!0),l.value?(t.openBlock(),t.createElementBlock("div",t2,[t.renderSlot(T.$slots,"suggest-header",{items:r.suggestItems},()=>[t.createElementVNode("div",i2,t.toDisplayString(r.suggestTitle??t.unref(s)("search.suggest")),1)],!0),t.renderSlot(T.$slots,"suggest-content",{items:r.suggestItems,keyword:r.keyword},()=>[r.suggestItems.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.suggestItems,y=>(t.openBlock(),t.createElementBlock("div",{key:y.key,class:"o-search-panel-item",onClick:x=>n("suggest-click",y)},[t.createVNode(rc,{text:y.key,keyword:r.keyword,enabled:r.highlightKeyword},null,8,["text","keyword","enabled"])],8,n2))),128)):(t.openBlock(),t.createElementBlock("div",r2,t.toDisplayString(r.noDataText??t.unref(s)("search.noData")),1))],!0)])):t.createCommentVNode("",!0),c.value?(t.openBlock(),t.createElementBlock("div",s2,[t.renderSlot(T.$slots,"recommend-header",{items:r.recommendItems},void 0,!0),t.renderSlot(T.$slots,"recommend-content",{items:r.recommendItems},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.recommendItems,y=>(t.openBlock(),t.createElementBlock("div",{key:y,class:"o-search-panel-recommend-item",onClick:x=>n("recommend-click",y)},t.toDisplayString(y),9,a2))),128))],!0)])):t.createCommentVNode("",!0),d.value?(t.openBlock(),t.createElementBlock("div",o2,[t.renderSlot(T.$slots,"history-header",{items:r.historyItems},()=>[t.createElementVNode("div",l2,[t.createElementVNode("span",u2,t.toDisplayString(r.historyTitle??t.unref(s)("search.history")),1),r.historyLayout!=="list"?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0,class:"o-search-panel-icon",onClick:b[0]||(b[0]=t.withModifiers(y=>n("history-clear"),["stop"]))},{default:t.withCtx(()=>[t.createVNode(t.unref(U1))]),_:1})):t.createCommentVNode("",!0)])],!0),t.renderSlot(T.$slots,"history-content",{items:r.historyItems},()=>[r.historyLayout==="list"?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.historyItems,y=>(t.openBlock(),t.createElementBlock("div",{key:y,class:"o-search-panel-history-row",onClick:x=>n("history-click",y)},[t.createElementVNode("span",d2,t.toDisplayString(y),1)],8,c2))),128)):(t.openBlock(),t.createElementBlock("div",h2,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.historyItems,y=>(t.openBlock(),t.createElementBlock("div",{key:y,class:t.normalizeClass(["o-search-panel-history-item",{"is-dark":r.isDark}]),onClick:x=>n("history-click",y)},[t.createElementVNode("span",p2,t.toDisplayString(y),1),t.createVNode(t.unref(A.OIcon),{class:"o-search-panel-history-remove",onClick:t.withModifiers(x=>n("history-remove",y),["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(Xo))]),_:1},8,["onClick"])],10,f2))),128))]))],!0)])):t.createCommentVNode("",!0),S.value?(t.openBlock(),t.createElementBlock("div",m2)):t.createCommentVNode("",!0),m.value?(t.openBlock(),t.createElementBlock("div",g2,[t.renderSlot(T.$slots,"hot-header",{items:r.hotItems},()=>[t.createElementVNode("div",v2,[t.createElementVNode("div",y2,t.toDisplayString(r.hotTitle??t.unref(s)("search.hot")),1),t.createVNode(t.unref(A.OIcon),{class:"o-search-panel-icon",onClick:b[1]||(b[1]=t.withModifiers(y=>n("hot-refresh"),["stop"]))},{default:t.withCtx(()=>[t.createVNode(t.unref(q1))]),_:1})])],!0),t.renderSlot(T.$slots,"hot-content",{items:r.hotItems},()=>[t.createElementVNode("div",_2,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.hotItems,y=>(t.openBlock(),t.createElementBlock("div",{key:y,class:"o-search-panel-hot-item",onClick:x=>n("hot-click",y)},t.toDisplayString(y),9,T2))),128))])],!0)])):t.createCommentVNode("",!0)]))}}),fh=$e._export_sfc(b2,[["__scopeId","data-v-8f91e5e0"]]);function ph(r){const{initial:e,storageKey:i,storeHistory:n,maxHistoryCount:s,onChange:a}=r,o=t.ref([...e.value]),l=()=>{if(!(!n.value||typeof localStorage>"u"))try{o.value.length?localStorage.setItem(i.value,JSON.stringify(o.value)):localStorage.removeItem(i.value)}catch{}},c=T=>{o.value=T,l(),a==null||a(o.value)},d=()=>{if(!(!n.value||typeof localStorage>"u"))try{const T=localStorage.getItem(i.value);if(!T)return;const b=JSON.parse(T);if(Array.isArray(b)&&b.length){const y=Array.from(new Set([...b,...o.value]));o.value=y.slice(0,s.value),a==null||a(o.value)}}catch{}},m=T=>{const b=T==null?void 0:T.trim();if(!b)return;const y=[b,...o.value.filter(x=>x!==b)];y.length>s.value&&(y.length=s.value),c(y)},g=T=>{c(o.value.filter(b=>b!==T))},S=()=>{c([])};return t.watch(e,T=>{T!==o.value&&(o.value=[...T])}),t.onMounted(d),{items:o,push:m,remove:g,clearAll:S}}const C2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"32",viewBox:"0 0 36 32"};function x2(r,e){return t.openBlock(),t.createElementBlock("svg",C2,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M5.886 19.111l10.672 10.677c0.46 0.524 0.44 1.322-0.060 1.822s-1.298 0.52-1.822 0.060l-0.064-0.060-12.498-12.498h3.772zM14.613 0.391c0.521-0.521 1.365-0.521 1.886 0 0.5 0.5 0.52 1.298 0.060 1.822l-0.060 0.064-12.391 12.391h29.67c0.71 0 1.291 0.555 1.331 1.255l0.002 0.078c0 0.71-0.555 1.291-1.255 1.331l-0.078 0.002h-31.816c-0.472 0-0.924-0.187-1.257-0.521-0.671-0.671-0.694-1.745-0.067-2.443l0.067-0.071 13.908-13.908z"},null,-1)])])}const S2={name:"components-icon-header-back",render:x2},E2={key:0,class:"o-header-search-drawer"},k2=t.defineComponent({__name:"OHeaderSearch",props:{modelValue:{default:""},placeholder:{},expandedPlaceholder:{},expandDirection:{default:"left"},clearable:{type:Boolean,default:!0},historyItems:{default:()=>[]},maxHistoryCount:{default:6},storeHistory:{type:Boolean,default:!1},historyTitle:{},storageKey:{default:"search-history"},hotItems:{default:()=>[]},hotTitle:{},recommendItems:{default:()=>[]},searchUrl:{},searchUrlOpenBlank:{type:Boolean,default:!0},searchTextMobile:{},imagePlaceholder:{},enableImageSearch:{type:Boolean,default:!1},imageUrl:{default:""},uploadImage:{},maxImageSize:{default:10*1024*1024},imageUploadTooltip:{},suggestItems:{default:()=>[]},onestepItems:{default:()=>[]},suggestTitle:{},onestepTitle:{},noDataText:{},highlightKeyword:{type:Boolean,default:!0},debounce:{default:300},autoSaveHistory:{type:Boolean,default:!0},showSuggestEmpty:{type:Boolean,default:!0},allowedImageTypes:{},mobile:{type:Boolean}},emits:["update:modelValue","update:historyItems","update:imageUrl","focus","blur","input","clear","search","recommend-click","onestep-click","history-click","hot-click","hot-refresh","delete-history","delete-history-item","image-upload-start","image-upload-success","image-upload-error","image-validate-error"],setup(r,{expose:e,emit:i}){const n=r,s=i,{lePadV:a}=It.useScreen(),{t:o}=$e.useI18n(),l=t.computed(()=>n.mobile===!0||a.value),c=t.ref(null),d=t.ref(),m=t.ref(!1),g=t.ref(!1),S=t.ref(""),T=t.computed(()=>!!n.imageUrl||g.value),b=t.computed({get:()=>n.modelValue,set:Z=>s("update:modelValue",Z)}),y=t.toRef(n,"historyItems"),x=t.toRef(n,"storageKey"),N=t.toRef(n,"storeHistory"),I=t.toRef(n,"maxHistoryCount"),D=ph({initial:y,storageKey:x,storeHistory:N,maxHistoryCount:I,onChange:Z=>s("update:historyItems",Z)}),z=t.computed(()=>n.imageUrl?n.imagePlaceholder??o("search.extendedPlaceholder"):m.value&&n.enableImageSearch?n.imagePlaceholder??o("search.imagePlaceholder"):m.value?n.expandedPlaceholder??o("search.expandedPlaceholder"):n.placeholder??o("search.placeholder")),H=fi.useDebounceFn(Z=>s("input",Z),()=>n.debounce);t.watch(b,Z=>H(Z)),fi.onClickOutside(c,()=>{l.value||B()});const U=()=>{m.value=!0},B=()=>{l.value||(m.value=!1)},G=()=>{U(),s("focus")},C=()=>{s("blur")},k=async()=>{var _e,ke,De,Ne,Re,et;(ke=(_e=d.value)==null?void 0:_e.getIsUploading)!=null&&ke.call(_e)&&await((Ne=(De=d.value).awaitUpload)==null?void 0:Ne.call(De));const Z=b.value.trim(),se=S.value||((et=(Re=d.value)==null?void 0:Re.getUploadedUrl)==null?void 0:et.call(Re))||n.imageUrl;if(!(!Z&&!se)&&(n.autoSaveHistory&&Z&&D.push(Z),m.value=!1,s("search",{keyword:Z,imageUrl:se||void 0}),n.searchUrl)){const Ve=new URLSearchParams;Z&&Ve.set("q",Z),se&&Ve.set("imageUrl",se);const Ke=n.searchUrl.includes("?")?"&":"?",Ge=`${n.searchUrl}${Ke}${Ve.toString()}`;typeof window<"u"&&window.open(Ge,n.searchUrlOpenBlank?"_blank":"_self","noopener,noreferrer")}},O=()=>{var Z,se;b.value="",s("clear"),(se=(Z=d.value)==null?void 0:Z.focus)==null||se.call(Z)},j=Z=>{s("recommend-click",Z),b.value=Z.key,k()},L=Z=>{s("recommend-click",Z),b.value=Z,k()},V=Z=>{s("onestep-click",Z),Z.path&&typeof window<"u"&&window.open(Z.path,"_blank","noopener,noreferrer")},M=Z=>{s("history-click",Z)},q=Z=>{s("hot-click",Z)},$=Z=>{D.remove(Z),s("delete-history-item",Z)},X=()=>{const Z=[...D.items.value];D.clearAll(),s("delete-history",Z)},R=()=>{b.value="",g.value=!1,s("update:imageUrl",""),m.value=!1},ee=Z=>{g.value=!0,S.value="",s("image-upload-start",Z)},ue=(Z,se)=>{S.value=Z,s("update:imageUrl",Z),s("image-upload-success",Z,se)},J=()=>{g.value=!1,S.value="",s("update:imageUrl","")},oe=t.computed(()=>!(!m.value||T.value));return e({focus:()=>{var Z,se;return(se=(Z=d.value)==null?void 0:Z.focus)==null?void 0:se.call(Z)},blur:()=>{var Z,se;return(se=(Z=d.value)==null?void 0:Z.blur)==null?void 0:se.call(Z)},open:U,close:B,search:k}),(Z,se)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["o-header-search",{"is-mobile-mode":l.value}])},[t.createElementVNode("div",{ref_key:"wrapperRef",ref:c,class:t.normalizeClass(["o-header-search-pos",{"is-pc":!l.value,"is-mobile":l.value,"is-left":r.expandDirection==="left","is-right":r.expandDirection==="right","is-focus":m.value}])},[t.createElementVNode("div",{class:t.normalizeClass(["o-header-search-row",{"is-focus":m.value}])},[l.value&&m.value?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0,class:"o-header-search-back-icon",onClick:R},{default:t.withCtx(()=>[t.createVNode(t.unref(S2))]),_:1})):t.createCommentVNode("",!0),t.createVNode(hh,{ref_key:"inputRef",ref:d,modelValue:b.value,"onUpdate:modelValue":se[0]||(se[0]=_e=>b.value=_e),"image-url":r.imageUrl,placeholder:z.value,"enable-image-search":r.enableImageSearch,"upload-image":r.uploadImage,"max-image-size":r.maxImageSize,"image-upload-tooltip":r.imageUploadTooltip,clearable:r.clearable&&m.value,expanded:m.value&&T.value,"allowed-image-types":r.allowedImageTypes,size:"medium",class:t.normalizeClass(["o-header-search-input",{"is-collapsed":!m.value}]),"onUpdate:imageUrl":se[1]||(se[1]=_e=>s("update:imageUrl",_e)),onFocus:G,onBlur:C,onEnter:k,onClear:O,onImageClear:J,onImageUploadStart:ee,onImageUploadSuccess:ue,onImageUploadError:se[2]||(se[2]=(_e,ke)=>s("image-upload-error",_e,ke)),onImageValidateError:se[3]||(se[3]=(_e,ke)=>s("image-validate-error",_e,ke))},t.createSlots({prefix:t.withCtx(()=>[t.renderSlot(Z.$slots,"input-prefix",{},void 0,!0)]),suffix:t.withCtx(_e=>[t.renderSlot(Z.$slots,"input-suffix",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),_:2},[Z.$slots["image-preview"]?{name:"preview",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"image-preview",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","image-url","placeholder","enable-image-search","upload-image","max-image-size","image-upload-tooltip","clearable","expanded","allowed-image-types","class"]),l.value&&m.value?(t.openBlock(),t.createElementBlock("span",{key:1,class:"o-header-search-text",onClick:k},t.toDisplayString(r.searchTextMobile??t.unref(o)("search")),1)):t.createCommentVNode("",!0)],2),t.createVNode(t.Transition,{name:"o-header-search-drawer"},{default:t.withCtx(()=>[oe.value?(t.openBlock(),t.createElementBlock("div",E2,[t.renderSlot(Z.$slots,"drawer",{recommendItems:r.recommendItems,historyItems:t.unref(D).items.value,hotItems:r.hotItems,suggestItems:r.suggestItems,onestepItems:r.onestepItems,keyword:r.modelValue},()=>[t.createVNode(fh,{keyword:r.modelValue,"onestep-items":r.onestepItems,"onestep-title":r.onestepTitle,"suggest-items":r.suggestItems,"suggest-title":r.suggestTitle,"recommend-items":r.recommendItems,"history-items":t.unref(D).items.value,"history-title":r.historyTitle,"hot-items":r.hotItems,"hot-title":r.hotTitle,"no-data-text":r.noDataText,"highlight-keyword":r.highlightKeyword,"hide-on-keyword":!0,"show-suggest-empty":r.showSuggestEmpty,onOnestepClick:V,onSuggestClick:j,onRecommendClick:L,onHistoryClick:M,onHistoryRemove:$,onHistoryClear:X,onHotClick:q,onHotRefresh:se[4]||(se[4]=_e=>s("hot-refresh"))},t.createSlots({_:2},[Z.$slots["recommend-header"]?{name:"recommend-header",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"recommend-header",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"0"}:void 0,Z.$slots["recommend-content"]?{name:"recommend-content",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"recommend-content",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"1"}:void 0,Z.$slots["onestep-header"]?{name:"onestep-header",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"onestep-header",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"2"}:void 0,Z.$slots["onestep-content"]?{name:"onestep-content",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"onestep-content",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"3"}:void 0,Z.$slots["suggest-header"]?{name:"suggest-header",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"suggest-header",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"4"}:void 0,Z.$slots["suggest-content"]?{name:"suggest-content",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"suggest-content",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"5"}:void 0,Z.$slots["history-header"]?{name:"history-header",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"history-header",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"6"}:void 0,Z.$slots["history-content"]?{name:"history-content",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"history-content",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"7"}:void 0,Z.$slots["hot-header"]?{name:"hot-header",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"hot-header",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"8"}:void 0,Z.$slots["hot-content"]?{name:"hot-content",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"hot-content",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"9"}:void 0]),1032,["keyword","onestep-items","onestep-title","suggest-items","suggest-title","recommend-items","history-items","history-title","hot-items","hot-title","no-data-text","highlight-keyword","show-suggest-empty"])],!0)])):t.createCommentVNode("",!0)]),_:3})],2),l.value?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0,class:"o-header-search-mobile-icon",onClick:U},{default:t.withCtx(()=>[t.createVNode(t.unref(dh))]),_:1})):t.createCommentVNode("",!0)],2))}}),mh=$e._export_sfc(k2,[["__scopeId","data-v-76ef2a1f"]]),w2=["src"],D2=t.defineComponent({__name:"AppAvatar",props:{avatar:{type:String,default:""},name:{type:String,default:"",required:!0},size:{type:String,default:"medium"},customSize:{type:Number,default:0},variant:{type:String,default:"round"}},setup(r){const e=r,i=["#058EF0","#FA7305","#03B5A5"],n=t.computed(()=>{var a;return(a=e.name)==null?void 0:a.charAt(0).toUpperCase()}),s=t.computed(()=>{var l;const a={"background-color":"",width:"32px",height:"32px","font-size":"20px"};a["background-color"]=e.name?i[((l=e.name)==null?void 0:l.length)%i.length]:"transparent";let o=0;return e.customSize?o=Number(e.customSize):o={mini:16,small:24,medium:40,large:64}[e.size],a.height=`${o}px`,a.width=`${o}px`,a["font-size"]=`${o/2}px`,a});return(a,o)=>r.avatar&&!r.avatar.includes("gitcode")?(t.openBlock(),t.createElementBlock("img",{key:0,src:r.avatar,class:t.normalizeClass(["img-avatar",r.variant]),style:t.normalizeStyle(s.value),alt:""},null,14,w2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["word-avatar",r.variant]),style:t.normalizeStyle(s.value)},t.toDisplayString(n.value),7))}}),A2=$e._export_sfc(D2,[["__scopeId","data-v-340348ce"]]),I2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function N2(r,e){return t.openBlock(),t.createElementBlock("svg",I2,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M9.412 10.332c0 2.188 1.066 4.127 2.708 5.326-4.858 1.582-8.364 6.052-8.364 11.328 0 0.515 0.418 0.933 0.933 0.933s0.933-0.418 0.933-0.933c0-5.465 4.487-9.922 10.092-10.070 0.095 0.004 0.191 0.006 0.288 0.006 3.639 0 6.59-2.95 6.59-6.59s-2.951-6.59-6.59-6.59-6.59 2.95-6.59 6.59zM16.088 15.049c-0.028-0.003-0.057-0.004-0.087-0.004-0.061 0-0.122 0-0.183 0.001-2.524-0.096-4.541-2.172-4.541-4.72 0-2.608 2.115-4.723 4.723-4.723s4.723 2.115 4.723 4.723c0 2.579-2.067 4.676-4.635 4.722zM21.784 16.465c3.945 2.064 6.463 6.077 6.463 10.528 0 0.515-0.418 0.933-0.933 0.933s-0.933-0.418-0.933-0.933c0-3.744-2.123-7.127-5.462-8.874-0.457-0.239-0.633-0.803-0.394-1.26s0.803-0.633 1.26-0.394z"},null,-1)])])}const O2={name:"components-icon-avatar-line",render:N2},B2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function L2(r,e){return t.openBlock(),t.createElementBlock("svg",B2,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M5.759 8.873c0.251-0.251 0.644-0.271 0.918-0.063l0.072 0.063 5.016 5.016c0.1 0.1 0.254 0.115 0.37 0.043l0.054-0.043 5.062-5.062c0.273-0.273 0.717-0.273 0.99 0 0.251 0.251 0.271 0.644 0.063 0.918l-0.063 0.072-5.062 5.062c-0.629 0.629-1.628 0.662-2.296 0.099l-0.108-0.099-5.016-5.016c-0.273-0.273-0.273-0.717 0-0.99z"},null,-1)])])}const Dl={name:"components-icon-chevron-down",render:L2},P2={class:"header-user"},M2={key:0,class:"user-info"},R2={class:"info-wrap hover-icon-rotate"},V2={class:"user-account"},F2={key:1},$2=t.defineComponent({__name:"OHeaderUser",props:{token:{default:void 0},lang:{default:void 0},noticeTotal:{default:void 0},userInfo:{default:void 0},options:{default:void 0},customSize:{default:void 0}},emits:["login","logout"],setup(r,{emit:e}){const{lePadV:i}=It.useScreen(),n=e,s=()=>{n("login")},a=o=>{o!=null&&o.logout?n("logout"):window.open(o.url,o.target)};return(o,l)=>(t.openBlock(),t.createElementBlock("div",P2,[r.token?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0,onClick:s,class:"avatar-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(O2))]),_:1})),t.createVNode(t.Transition,{name:"header-user-zoom-in"},{default:t.withCtx(()=>[r.token?(t.openBlock(),t.createElementBlock("div",M2,[t.createVNode(t.unref(A.ODropdown),{trigger:t.unref(i)?"click":"hover",optionPosition:t.unref(i)?"br":"bottom","option-wrap-class":`user-dropdown ${r.lang==="en"?"is-en":""}`},{dropdown:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.options,c=>(t.openBlock(),t.createBlock(t.unref(A.ODropdownItem),{key:c.label,style:{"--dropdown-item-justify":"center"},onClick:d=>a(c)},{default:t.withCtx(()=>[c!=null&&c.total?(t.openBlock(),t.createBlock(t.unref(A.OBadge),{key:0,value:c.total,color:"danger",class:t.normalizeClass(["header-message message",{"notice-not":!c.total}])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.label),1)]),_:2},1032,["value","class"])):(t.openBlock(),t.createElementBlock("span",F2,t.toDisplayString(c.label),1))]),_:2},1032,["onClick"]))),128))]),default:t.withCtx(()=>[t.createElementVNode("div",R2,[t.createVNode(t.unref(A.OBadge),{value:r.noticeTotal,dot:!0,color:"danger",class:t.normalizeClass(["header-message user-avatar",{"notice-not":!r.noticeTotal}])},{default:t.withCtx(()=>[t.createVNode(A2,{avatar:r.userInfo.photo,name:r.userInfo.username,"custom-size":r.customSize},null,8,["avatar","name","custom-size"])]),_:1},8,["value","class"]),t.createElementVNode("p",V2,t.toDisplayString(r.userInfo.username),1),t.createVNode(t.unref(A.OIcon),{class:"icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Dl))]),_:1})])]),_:1},8,["trigger","optionPosition","option-wrap-class"])])):t.createCommentVNode("",!0)]),_:1})]))}}),gh=$e._export_sfc($2,[["__scopeId","data-v-517067a4"]]),U2={locale:"zh-CN","common.more":"更多","common.empty":"暂无数据","common.loading":"加载中...","common.checkAll":"全选","common.filter":"筛选","common.confirm":"确认","common.reset":"重置","common.search":"搜索","pagination.goto":"前往","pagination.page":"页","pagination.countPerPage":"条/页","pagination.total":"共 {0} 条","upload.buttonLabel":"点击上传","upload.drag":"点击或拖拽文件到此处上传","upload.dragHover":"释放文件并开始上传","upload.retry":"点击重试","upload.delete":"删除","upload.preview":"预览","upload.edit":"编辑","upload.loading":"上传中","upload.failed":"上传失败","upload.download":"下载文件","select.cancel":"取消","select.confirm":"确定","input.limit":"<b>{0}</b>/{1}","table.filterEmptyOption":"空","table.filterPlaceholder":"请输入搜索内容"},z2={locale:"en-US","common.more":"more","common.empty":"No Data","common.loading":"Loading...","common.checkAll":"Check All","common.filter":"Filter","common.confirm":"Confirm","common.reset":"Reset","common.search":"Search","pagination.goto":"Go to","pagination.page":"Page","pagination.countPerPage":"/page","pagination.total":"Total: {0}","upload.buttonLabel":"Upload","upload.drag":"Click or drag file to this area to upload","upload.dragHover":"Release to upload","upload.retry":"Click to retry","upload.delete":"Delete","upload.preview":"Preview","upload.edit":"Edit","upload.loading":"Uploading","upload.failed":"Upload failed","upload.download":"Download the file","select.cancel":"Cancel","select.confirm":"Ok","input.limit":"<b>{0}</b>/{1}","table.filterEmptyOption":"empty","table.filterPlaceholder":"Enter keywords"},vh=t.defineComponent({__name:"OPlusConfigProvider",props:{locale:{},theme:{default:"light"}},setup(r){const e=r,i=t.reactive({locale:t.computed(()=>e.locale),theme:t.computed(()=>e.theme)});return t.provide($e.configProviderInjectKey,i),(n,s)=>(t.openBlock(),t.createBlock(t.unref(A.OConfigProvider),{locale:r.locale==="zh"?t.unref(U2):t.unref(z2)},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},8,["locale"]))}}),H2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function q2(r,e){return t.openBlock(),t.createElementBlock("svg",H2,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M9.246 5.764c-0.251 0.251-0.271 0.644-0.063 0.918l0.063 0.072 5.016 5.016c0.1 0.1 0.115 0.254 0.043 0.37l-0.043 0.054-5.062 5.062c-0.273 0.273-0.273 0.717 0 0.99 0.251 0.251 0.644 0.271 0.918 0.063l0.072-0.063 5.062-5.062c0.629-0.629 0.662-1.628 0.099-2.296l-0.099-0.108-5.016-5.016c-0.273-0.273-0.717-0.273-0.99 0z"},null,-1)])])}const jr={name:"components-icon-chevron-right",render:q2},j2={class:"section-wrapper"},G2={key:1,class:"section-title"},W2={key:2,class:"section-subtitle"},Y2={key:1,class:"section-body"},X2={key:2,class:"section-footer"},K2=t.defineComponent({__name:"OSection",props:{title:{default:void 0},subtitle:{default:void 0},full:{type:Boolean,default:!1},headerJustifyCenter:{type:Boolean,default:!0},footer:{default:void 0},footerHref:{default:void 0}},setup(r){const e=r;return(i,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["app-section",{"is-full":e.full}])},[t.createElementVNode("div",j2,[t.renderSlot(i.$slots,"main",{},()=>[i.$slots.header||e.title||e.subtitle?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["section-header",{"is-left":!e.headerJustifyCenter}])},[t.renderSlot(i.$slots,"header",{},()=>[t.unref(A.isArray)(e.title)?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.title,s=>(t.openBlock(),t.createElementBlock("h2",{key:s,class:"section-title"},t.toDisplayString(s),1))),128)):i.$slots.title||e.title?(t.openBlock(),t.createElementBlock("h2",G2,[t.renderSlot(i.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(e.title),1)],!0)])):t.createCommentVNode("",!0),i.$slots.subtitle||e.subtitle?(t.openBlock(),t.createElementBlock("p",W2,[t.renderSlot(i.$slots,"subtitle",{},()=>[t.createTextVNode(t.toDisplayString(e.subtitle),1)],!0)])):t.createCommentVNode("",!0)],!0)],2)):t.createCommentVNode("",!0),i.$slots.default?(t.openBlock(),t.createElementBlock("div",Y2,[t.renderSlot(i.$slots,"default",{},void 0,!0)])):t.createCommentVNode("",!0),i.$slots.footer||e.footer?(t.openBlock(),t.createElementBlock("div",X2,[t.renderSlot(i.$slots,"footer",{},()=>[t.createVNode(t.unref(A.OLink),{href:e.footerHref,target:"_blank"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),{class:"footer-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.footer)+" ",1)]),_:1},8,["href"])],!0)])):t.createCommentVNode("",!0)],!0)])],2))}}),yh=$e._export_sfc(K2,[["__scopeId","data-v-0c0e1f78"]]),Q2={class:"source-code"},Z2={class:"title"},J2={class:"info-wrap hover-icon-rotate"},ev={class:"title"},tv=t.defineComponent({__name:"OSourceCode",props:{title:{},options:{},href:{},target:{},icon:{},justify:{default:"center"}},setup(r){const e=s=>{window.open(s.href,s.target?s.target:"_blank")},i=t.ref(!1),n=s=>{i.value=s};return(s,a)=>(t.openBlock(),t.createElementBlock("div",Q2,[r.href?(t.openBlock(),t.createElementBlock("div",{key:0,class:"info-wrap",onClick:a[0]||(a[0]=o=>e({href:r.href,target:r.target}))},[t.createElementVNode("span",Z2,t.toDisplayString(r.title),1),r.icon?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.icon),{class:"icon"}))]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createBlock(t.unref(A.ODropdown),{key:1,trigger:"hover",optionPosition:"bottom","option-wrap-class":"dropdown",class:t.normalizeClass({"dropdown-active":i.value}),onVisibleChange:n},{dropdown:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.options,o=>(t.openBlock(),t.createBlock(t.unref(A.ODropdownItem),{onClick:l=>e(o),key:o.href,class:"list",style:t.normalizeStyle({"--dropdown-item-justify":r.justify})},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.label)+" ",1),o.icon?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.icon),{class:"icon"}))]),_:2},1024)):t.createCommentVNode("",!0)]),_:2},1032,["onClick","style"]))),128))]),default:t.withCtx(()=>[t.createElementVNode("div",J2,[t.createElementVNode("span",ev,t.toDisplayString(r.title),1),t.createVNode(t.unref(A.OIcon),{class:"icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Dl))]),_:1})])]),_:1},8,["class"]))]))}}),_h=$e._export_sfc(tv,[["__scopeId","data-v-865d32e7"]]),iv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function nv(r,e){return t.openBlock(),t.createElementBlock("svg",iv,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M12 1.992c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7zM6.769 6.747c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.136 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM18.192 6.747c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM5.3 12c0-3.7 3-6.7 6.7-6.7s6.7 3 6.7 6.7-3 6.7-6.7 6.7c-3.7 0-6.7-3-6.7-6.7zM17.3 12c0-2.927-2.373-5.3-5.3-5.3s-5.3 2.373-5.3 5.3c0 2.927 2.373 5.3 5.3 5.3s5.3-2.373 5.3-5.3zM4.594 11.969c0 0.387-0.313 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.386 0 0.7 0.313 0.7 0.7zM21.977 11.999c0 0.387-0.314 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.387 0 0.7 0.313 0.7 0.7zM5.921 19.060c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM19.041 19.060c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM11.971 19.376c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7z"},null,-1)])])}const ro={name:"components-icon-sun",render:nv},rv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function sv(r,e){return t.openBlock(),t.createElementBlock("svg",rv,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M12 2.3c5.357 0 9.7 4.343 9.7 9.7s-4.343 9.7-9.7 9.7c-4.651 0-8.622-3.298-9.515-7.806-0.101-0.509 0.369-0.948 0.87-0.812 0.531 0.144 1.082 0.218 1.645 0.218 3.479 0 6.3-2.82 6.3-6.3 0-1.276-0.379-2.494-1.079-3.527-0.291-0.43-0.029-1.016 0.486-1.086 0.425-0.057 0.857-0.086 1.293-0.086zM12 3.7l-0.042 0.001 0.058 0.121c0.402 0.887 0.634 1.85 0.677 2.845l0.007 0.333c0 4.253-3.447 7.7-7.7 7.7-0.229 0-0.457-0.010-0.682-0.030l-0.186-0.021 0.076 0.218c1.147 3.123 4.102 5.321 7.528 5.429l0.264 0.004c4.584 0 8.3-3.716 8.3-8.3s-3.716-8.3-8.3-8.3z"},null,-1)])])}const so={name:"components-icon-moon",render:sv},av={class:"o-theme-switcher"},ov={key:1,class:"o-theme-switcher-mobile"},lv=t.defineComponent({__name:"OThemeSwitcher",props:{theme:{default:"light"},type:{default:"auto"},lightValue:{default:"light"},darkValue:{default:"dark"},lightIcon:{default:ro},darkIcon:{default:so}},emits:["update:theme","change"],setup(r,{emit:e}){const i=r,n=e,{gtPhone:s}=It.useScreen(),a=t.computed({get(){return i.theme},set(c){n("update:theme",c),n("change",c)}}),o=t.computed(()=>i.type==="common"||i.type==="auto"&&s.value),l=()=>{a.value=a.value===i.lightValue?i.darkValue:i.lightValue};return(c,d)=>(t.openBlock(),t.createElementBlock("div",av,[o.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"o-theme-switcher-common",onClick:l},[t.createVNode(t.unref(A.OIcon),{class:"o-theme-icon"},{default:t.withCtx(()=>[a.value===r.lightValue?(t.openBlock(),t.createBlock(t.unref(so),{key:0})):(t.openBlock(),t.createBlock(t.unref(ro),{key:1}))]),_:1})])):(t.openBlock(),t.createElementBlock("div",ov,[t.createVNode(t.unref(A.OSwitch),{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=m=>a.value=m),class:"o-theme-switch","checked-value":r.darkValue,"unchecked-value":r.lightValue},{on:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),{class:"o-theme-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(ro))]),_:1})]),off:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),{class:"o-theme-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(so))]),_:1})]),_:1},8,["modelValue","checked-value","unchecked-value"])]))]))}}),Th=$e._export_sfc(lv,[["__scopeId","data-v-9aaa2610"]]),sc=/^https?:\/\/\S+/;var Be=(r=>(r.ALL="all",r.MEETING="meeting",r.EVENTS="events",r.SUMMIT="summit",r.APPROVAL="approval",r))(Be||{}),vi=(r=>(r.SIG="sig",r.GROUP="group",r))(vi||{});const uv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function cv(r,e){return t.openBlock(),t.createElementBlock("svg",uv,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M10 14.267c-0.413 0-0.817-0.043-1.211-0.131h-0.001c-0.329-0.073-0.652-0.176-0.968-0.31-0.318-0.135-0.618-0.295-0.902-0.482-0.314-0.207-0.607-0.446-0.878-0.718s-0.511-0.564-0.718-0.878c-0.187-0.283-0.348-0.584-0.482-0.902-0.134-0.316-0.237-0.639-0.31-0.968v0c-0.087-0.394-0.131-0.798-0.131-1.211s0.044-0.817 0.131-1.212v0c0.073-0.33 0.176-0.652 0.31-0.968 0.134-0.318 0.295-0.618 0.482-0.902v0c0.207-0.314 0.446-0.607 0.718-0.878s0.564-0.511 0.878-0.718c0.283-0.187 0.584-0.347 0.902-0.482 0.316-0.134 0.639-0.237 0.968-0.31v0c0.394-0.087 0.798-0.131 1.211-0.131s0.817 0.044 1.212 0.131v0c0.33 0.073 0.652 0.176 0.968 0.31 0.318 0.134 0.618 0.295 0.902 0.482 0.314 0.207 0.607 0.446 0.878 0.718s0.511 0.564 0.718 0.878v0c0.187 0.283 0.347 0.584 0.482 0.902 0.134 0.316 0.237 0.639 0.31 0.968v0.001c0.087 0.394 0.131 0.798 0.131 1.211v4.667c0 0.129-0.023 0.248-0.068 0.358v0c-0.046 0.11-0.114 0.21-0.205 0.302s-0.192 0.159-0.302 0.205v0c-0.11 0.046-0.229 0.068-0.358 0.068h-4.667zM16.4 13.333c0 0.129 0.023 0.248 0.068 0.358s0.114 0.211 0.205 0.302c0.091 0.091 0.192 0.159 0.302 0.205v0c0.11 0.046 0.229 0.068 0.358 0.068h4.667c0.413 0 0.817-0.044 1.212-0.131v0c0.329-0.073 0.652-0.176 0.968-0.31 0.318-0.134 0.618-0.295 0.902-0.482 0.314-0.207 0.607-0.446 0.878-0.718s0.511-0.564 0.718-0.878v0c0.187-0.283 0.347-0.584 0.482-0.902 0.134-0.316 0.237-0.639 0.31-0.968v0c0.087-0.394 0.131-0.798 0.131-1.211s-0.044-0.817-0.131-1.212c-0.073-0.33-0.176-0.652-0.31-0.968-0.134-0.318-0.295-0.618-0.482-0.902v0c-0.207-0.314-0.447-0.607-0.718-0.878s-0.564-0.511-0.878-0.718c-0.283-0.187-0.584-0.347-0.902-0.482-0.316-0.134-0.639-0.237-0.968-0.31-0.394-0.087-0.798-0.131-1.212-0.131s-0.817 0.044-1.212 0.131c-0.33 0.073-0.652 0.176-0.968 0.31-0.318 0.134-0.618 0.295-0.902 0.482-0.314 0.207-0.607 0.446-0.878 0.718s-0.511 0.564-0.718 0.878c-0.187 0.283-0.348 0.584-0.482 0.902-0.134 0.316-0.237 0.639-0.31 0.968-0.087 0.394-0.131 0.798-0.131 1.212v4.667zM22 12.4h-3.733v-3.733c0-0.287 0.031-0.568 0.094-0.84 0.048-0.208 0.114-0.413 0.199-0.612 0.087-0.206 0.191-0.401 0.311-0.586 0.14-0.215 0.303-0.416 0.489-0.601s0.386-0.349 0.601-0.489l0.001-0.001c0.184-0.12 0.379-0.224 0.585-0.311 0.2-0.085 0.404-0.151 0.612-0.199 0.273-0.063 0.553-0.094 0.84-0.094s0.567 0.031 0.84 0.094c0.208 0.048 0.413 0.114 0.613 0.199 0.206 0.087 0.401 0.191 0.586 0.311 0.215 0.14 0.416 0.304 0.601 0.489s0.349 0.386 0.489 0.601c0.12 0.184 0.224 0.38 0.311 0.586 0.085 0.2 0.151 0.404 0.199 0.612 0.063 0.273 0.094 0.553 0.094 0.84s-0.031 0.568-0.094 0.84c-0.048 0.208-0.114 0.413-0.199 0.612-0.087 0.206-0.191 0.401-0.311 0.586v0c-0.14 0.215-0.303 0.416-0.489 0.601s-0.386 0.349-0.601 0.489c-0.184 0.12-0.38 0.224-0.586 0.311-0.2 0.085-0.404 0.151-0.613 0.199h-0.001c-0.273 0.063-0.552 0.094-0.84 0.094zM13.733 12.4v-3.733c0-0.287-0.031-0.568-0.094-0.84-0.048-0.208-0.114-0.413-0.199-0.612-0.087-0.206-0.191-0.401-0.311-0.586-0.14-0.215-0.303-0.416-0.489-0.601s-0.386-0.349-0.601-0.489c-0.184-0.12-0.38-0.224-0.586-0.311-0.2-0.085-0.404-0.151-0.612-0.199-0.273-0.063-0.553-0.094-0.841-0.094s-0.567 0.031-0.84 0.094c-0.208 0.048-0.413 0.114-0.612 0.199-0.206 0.087-0.401 0.191-0.586 0.311v0c-0.215 0.14-0.416 0.303-0.601 0.489s-0.349 0.386-0.489 0.601v0c-0.12 0.184-0.224 0.38-0.311 0.586-0.085 0.2-0.151 0.404-0.199 0.612-0.063 0.273-0.094 0.553-0.094 0.84s0.031 0.568 0.094 0.84c0.048 0.208 0.114 0.413 0.199 0.612 0.087 0.206 0.191 0.401 0.311 0.586 0.14 0.215 0.304 0.416 0.489 0.601s0.386 0.349 0.601 0.489c0.184 0.12 0.38 0.224 0.586 0.311 0.2 0.085 0.404 0.151 0.612 0.199v0c0.273 0.063 0.553 0.094 0.84 0.094h3.733zM16.4 16c0-0.258 0.091-0.478 0.273-0.66 0.091-0.091 0.192-0.159 0.302-0.205s0.229-0.068 0.358-0.068h4.667c0.414 0 0.817 0.044 1.212 0.131 0.329 0.073 0.652 0.176 0.968 0.31 0.318 0.134 0.618 0.295 0.902 0.482 0.314 0.207 0.607 0.446 0.878 0.718s0.511 0.564 0.718 0.878c0.187 0.283 0.347 0.584 0.482 0.902 0.134 0.316 0.237 0.639 0.31 0.968 0.087 0.394 0.131 0.798 0.131 1.212s-0.044 0.817-0.131 1.212c-0.073 0.33-0.176 0.652-0.31 0.968-0.134 0.318-0.295 0.618-0.482 0.902-0.207 0.314-0.447 0.607-0.718 0.878s-0.564 0.511-0.878 0.718c-0.283 0.187-0.584 0.347-0.902 0.482-0.316 0.134-0.639 0.237-0.968 0.31-0.394 0.087-0.798 0.131-1.212 0.131s-0.817-0.044-1.212-0.131c-0.33-0.073-0.652-0.176-0.968-0.31-0.318-0.134-0.618-0.295-0.902-0.482-0.314-0.207-0.607-0.446-0.878-0.718s-0.511-0.564-0.718-0.878c-0.187-0.283-0.348-0.584-0.482-0.902-0.134-0.316-0.237-0.639-0.31-0.968v0c-0.087-0.394-0.131-0.798-0.131-1.212v-4.667zM10 15.067c-0.413 0-0.817 0.044-1.212 0.131v0c-0.329 0.073-0.652 0.176-0.968 0.31-0.318 0.134-0.618 0.295-0.902 0.482-0.314 0.207-0.607 0.446-0.878 0.718s-0.511 0.564-0.718 0.878c-0.187 0.283-0.348 0.584-0.482 0.901-0.134 0.316-0.237 0.639-0.31 0.968-0.087 0.394-0.131 0.798-0.131 1.212s0.044 0.817 0.131 1.212c0.073 0.329 0.176 0.652 0.31 0.968 0.134 0.318 0.295 0.618 0.482 0.902v0c0.207 0.314 0.446 0.607 0.718 0.878s0.564 0.511 0.878 0.718c0.283 0.187 0.584 0.347 0.902 0.482 0.316 0.134 0.639 0.237 0.968 0.31 0.394 0.087 0.798 0.131 1.212 0.131s0.817-0.044 1.212-0.131v0c0.33-0.073 0.652-0.176 0.968-0.31 0.318-0.134 0.618-0.295 0.902-0.482 0.314-0.207 0.607-0.446 0.878-0.718s0.511-0.564 0.718-0.878v0c0.187-0.283 0.347-0.584 0.482-0.902 0.134-0.316 0.237-0.639 0.31-0.968 0.087-0.394 0.131-0.798 0.131-1.212v-4.667c0-0.258-0.091-0.478-0.273-0.66-0.091-0.091-0.192-0.159-0.302-0.205s-0.229-0.068-0.358-0.068h-4.667zM13.733 16.933v3.733c0 0.287-0.031 0.567-0.094 0.84-0.048 0.208-0.114 0.413-0.199 0.612-0.087 0.206-0.191 0.401-0.311 0.585v0c-0.14 0.215-0.303 0.416-0.489 0.601s-0.386 0.349-0.601 0.489c-0.184 0.12-0.38 0.224-0.586 0.311-0.2 0.085-0.404 0.151-0.612 0.199-0.273 0.063-0.553 0.094-0.841 0.094s-0.567-0.031-0.84-0.094h-0.001c-0.208-0.048-0.412-0.114-0.612-0.199-0.206-0.087-0.401-0.191-0.586-0.311v0c-0.215-0.14-0.416-0.303-0.601-0.489s-0.349-0.386-0.489-0.601c-0.12-0.184-0.224-0.38-0.311-0.586-0.085-0.2-0.151-0.404-0.199-0.612-0.063-0.273-0.094-0.553-0.094-0.84s0.031-0.568 0.094-0.841c0.048-0.208 0.114-0.412 0.199-0.612 0.087-0.206 0.191-0.401 0.311-0.586 0.14-0.215 0.304-0.416 0.489-0.601s0.386-0.349 0.601-0.489c0.184-0.12 0.38-0.224 0.586-0.311 0.2-0.085 0.404-0.151 0.612-0.199h0.001c0.273-0.063 0.553-0.094 0.84-0.094h3.733zM22 16.933h-3.733v3.733c0 0.287 0.031 0.567 0.094 0.84 0.048 0.208 0.114 0.413 0.199 0.612 0.087 0.206 0.191 0.401 0.311 0.586 0.14 0.215 0.303 0.416 0.489 0.601s0.386 0.349 0.601 0.489c0.184 0.12 0.379 0.224 0.586 0.311 0.2 0.085 0.404 0.151 0.612 0.199 0.273 0.063 0.553 0.094 0.84 0.094s0.567-0.031 0.84-0.094c0.208-0.048 0.413-0.114 0.613-0.199 0.206-0.087 0.401-0.191 0.586-0.311 0.215-0.141 0.416-0.304 0.601-0.489s0.349-0.386 0.489-0.601c0.12-0.184 0.224-0.38 0.311-0.586 0.085-0.2 0.151-0.404 0.199-0.612 0.063-0.273 0.094-0.553 0.094-0.84s-0.031-0.568-0.094-0.841c-0.048-0.208-0.114-0.412-0.199-0.612-0.087-0.206-0.191-0.401-0.311-0.586-0.141-0.215-0.304-0.416-0.489-0.601s-0.386-0.349-0.601-0.489c-0.184-0.12-0.38-0.224-0.586-0.311-0.2-0.085-0.404-0.151-0.613-0.199-0.273-0.063-0.553-0.094-0.84-0.094z"},null,-1)])])}const dv={name:"meeting-icon-all",render:cv},hv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function fv(r,e){return t.openBlock(),t.createElementBlock("svg",hv,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M25.088 14.216l-0.852 0.781c-0.385 0.353-0.411 0.933-0.058 1.319s0.933 0.411 1.319 0.058l2.116-1.938c0.193-0.177 0.349-0.374 0.467-0.591 0.092-0.17 0.162-0.351 0.208-0.546 0.045-0.189 0.067-0.378 0.063-0.566-0.004-0.222-0.041-0.444-0.112-0.665s-0.17-0.423-0.297-0.605c-0.107-0.155-0.235-0.295-0.382-0.422-0.151-0.13-0.314-0.237-0.488-0.321-0.223-0.107-0.464-0.176-0.724-0.207l-5.601-0.661c-0.031-0.012-0.159-0.053-0.187-0.073-0.021-0.026-0.113-0.124-0.128-0.155l-2.377-5.087c-0.11-0.235-0.25-0.441-0.42-0.618v0c-0.133-0.138-0.285-0.259-0.454-0.362-0.165-0.1-0.338-0.177-0.517-0.232v0c-0.211-0.064-0.432-0.096-0.662-0.096s-0.451 0.032-0.662 0.096v0c-0.179 0.054-0.352 0.131-0.517 0.232-0.17 0.103-0.321 0.224-0.454 0.362-0.17 0.177-0.31 0.383-0.42 0.618l-2.377 5.087c-0.021 0.026-0.1 0.135-0.128 0.155-0.031 0.012-0.153 0.069-0.187 0.073l-5.601 0.661c-0.26 0.031-0.501 0.1-0.724 0.207v0c-0.174 0.084-0.336 0.191-0.488 0.321-0.147 0.127-0.275 0.267-0.382 0.422-0.127 0.182-0.226 0.384-0.297 0.605s-0.109 0.443-0.112 0.665c-0.003 0.188 0.018 0.377 0.063 0.566 0.047 0.194 0.116 0.376 0.208 0.546 0.118 0.217 0.274 0.414 0.467 0.591l4.119 3.773c0.018 0.029 0.099 0.137 0.11 0.171 0.001 0.009 0.002 0.025 0.004 0.044 0.005 0.054 0.013 0.133 0.008 0.159l-1.093 5.462c-0.051 0.255-0.060 0.505-0.028 0.749 0.025 0.191 0.076 0.378 0.152 0.562 0.074 0.179 0.168 0.343 0.28 0.493 0.133 0.177 0.293 0.333 0.479 0.47s0.384 0.241 0.593 0.315c0.177 0.062 0.362 0.101 0.555 0.118 0.198 0.017 0.392 0.009 0.581-0.025h0.001c0.242-0.043 0.478-0.127 0.705-0.253l4.953-2.737c0.032-0.008 0.159-0.050 0.193-0.050 0.032 0.008 0.163 0.033 0.193 0.050l4.831 2.669c0.233 0.129 0.473 0.214 0.72 0.256h0.001c0.192 0.033 0.388 0.039 0.588 0.020 0.195-0.019 0.382-0.061 0.56-0.126v0c0.211-0.077 0.411-0.187 0.598-0.329s0.347-0.305 0.478-0.488c0.111-0.154 0.201-0.323 0.271-0.506 0.072-0.188 0.119-0.379 0.139-0.573 0.026-0.25 0.008-0.504-0.053-0.762l-2.084-8.779c-0.121-0.509-0.615-0.813-1.124-0.693s-0.813 0.615-0.693 1.124l2.084 8.779c0.020 0.084 0.018 0.161-0.007 0.229s-0.071 0.129-0.141 0.181c-0.069 0.053-0.14 0.081-0.213 0.087s-0.147-0.013-0.223-0.055l-4.831-2.669c-0.171-0.094-0.347-0.165-0.53-0.212v0c-0.183-0.047-0.372-0.071-0.566-0.071s-0.384 0.024-0.566 0.071c-0.183 0.047-0.359 0.118-0.53 0.212l-4.953 2.737c-0.075 0.041-0.148 0.059-0.219 0.055s-0.142-0.032-0.21-0.082c-0.069-0.050-0.116-0.109-0.142-0.176s-0.031-0.142-0.014-0.226l1.093-5.462c0.039-0.195 0.053-0.387 0.041-0.579s-0.048-0.381-0.109-0.57c-0.062-0.189-0.144-0.363-0.248-0.525s-0.229-0.309-0.375-0.443l-4.119-3.773c-0.063-0.058-0.104-0.122-0.122-0.191s-0.014-0.145 0.012-0.227c0.026-0.081 0.067-0.145 0.123-0.191s0.126-0.074 0.211-0.084l5.601-0.661c0.195-0.023 0.381-0.069 0.558-0.138s0.345-0.161 0.504-0.276c0.159-0.115 0.299-0.245 0.42-0.392s0.223-0.308 0.306-0.486l2.377-5.087c0.036-0.077 0.084-0.135 0.145-0.173s0.133-0.058 0.218-0.058c0.085 0 0.157 0.019 0.218 0.058s0.109 0.096 0.144 0.173l2.377 5.087c0.083 0.178 0.185 0.34 0.306 0.486s0.261 0.277 0.42 0.392c0.159 0.115 0.327 0.207 0.504 0.276s0.363 0.115 0.558 0.138l5.601 0.661c0.085 0.010 0.155 0.038 0.211 0.084s0.097 0.109 0.123 0.191c0.026 0.081 0.030 0.157 0.012 0.227s-0.059 0.133-0.122 0.191l-1.263 1.157zM10.007 15.327l2 2c0.369 0.37 0.95 0.37 1.32 0s0.37-0.95 0-1.32l-2-2c-0.369-0.37-0.95-0.37-1.32 0s-0.37 0.95 0 1.32z"},null,-1)])])}const Al={name:"meeting-icon-event",render:fv},pv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function mv(r,e){return t.openBlock(),t.createElementBlock("svg",pv,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M16.933 4v1.733h8.4c0.163 0 0.323 0.017 0.479 0.050 0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.122 0.37 0.199 0.125 0.083 0.242 0.179 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.098 0.266 0.128 0.404 0.034 0.156 0.050 0.315 0.050 0.479v7.222c0 0.523-0.411 0.933-0.933 0.933s-0.933-0.411-0.933-0.933v-7.222c0-0.055-0.010-0.106-0.029-0.154s-0.178-0.178-0.217-0.217c-0.047-0.020-0.098-0.029-0.154-0.029h-18.667c-0.055 0-0.106 0.010-0.153 0.029v0 0 0c-0.047 0.020-0.178 0.178-0.217 0.217-0.020 0.047-0.029 0.098-0.029 0.154v13.333c0 0.055 0.010 0.106 0.029 0.153v0c0.020 0.047 0.178 0.178 0.217 0.217 0.047 0.020 0.098 0.029 0.153 0.029h18.667c0.055 0 0.107-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.153v-2.953c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933v2.953c0 0.163-0.017 0.323-0.050 0.479-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.266 0.098-0.404 0.128-0.156 0.034-0.316 0.051-0.479 0.051h-0.44l2.42 2.42c0.37 0.37 0.37 0.95 0 1.32s-0.95 0.37-1.32 0l-3.74-3.74h-12.507l-3.74 3.74c-0.37 0.37-0.95 0.37-1.32 0s-0.369-0.95 0-1.32l2.42-2.42h-0.44c-0.163 0-0.323-0.017-0.479-0.050v0c-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.122-0.37-0.199v0c-0.125-0.083-0.242-0.178-0.35-0.287s-0.204-0.225-0.287-0.35v0c-0.077-0.116-0.143-0.24-0.199-0.37-0.056-0.132-0.098-0.266-0.128-0.404v0c-0.034-0.156-0.050-0.315-0.050-0.479v-13.333c0-0.163 0.017-0.323 0.050-0.479 0.030-0.137 0.072-0.272 0.128-0.404 0.055-0.131 0.121-0.254 0.199-0.37 0.083-0.125 0.179-0.242 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.098 0.404-0.128v0c0.156-0.034 0.315-0.050 0.479-0.050h8.4v-1.733c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933zM18.72 17.392l4.615-4.741c0.365-0.374 0.357-0.955-0.018-1.32s-0.955-0.357-1.32 0.018l-3.906 4.012-3.532-4.067c-0.195-0.169-0.421-0.244-0.678-0.225s-0.47 0.125-0.639 0.32l-4.615 5.333c-0.342 0.395-0.3 0.975 0.095 1.317s0.974 0.3 1.316-0.095l3.91-4.518 3.397 3.925c0.169 0.195 0.381 0.302 0.639 0.32s0.541-0.111 0.736-0.28z"},null,-1)])])}const Il={name:"meeting-icon-meet",render:mv},gv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function vv(r,e){return t.openBlock(),t.createElementBlock("svg",gv,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M10.633 5.457c-1.119 0.457-2.181 1.053-3.185 1.79-0.422 0.309-0.51 0.883-0.201 1.305s0.883 0.51 1.305 0.201c0.927-0.68 1.908-1.223 2.943-1.629 0.185-0.073 0.373-0.141 0.562-0.205 0.658-0.223 1.325-0.389 2.001-0.497 0.64-0.103 1.287-0.154 1.943-0.154s1.304 0.051 1.943 0.154v0c0.676 0.108 1.343 0.274 2.001 0.497 0.189 0.064 0.376 0.133 0.562 0.205v0c1.035 0.407 2.015 0.95 2.943 1.629 0.421 0.309 0.996 0.221 1.305-0.201s0.221-0.996-0.201-1.305c-1.005-0.736-2.067-1.333-3.185-1.79-0.271-0.111-0.545-0.213-0.823-0.307-0.755-0.256-1.52-0.447-2.297-0.572-0.739-0.119-1.488-0.179-2.247-0.179s-1.508 0.060-2.247 0.179v0c-0.776 0.125-1.541 0.316-2.296 0.572-0.277 0.094-0.552 0.197-0.823 0.307v0zM28.933 18.667v1.333c0 0.163-0.017 0.323-0.051 0.479-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.267 0.099-0.404 0.128-0.156 0.034-0.315 0.050-0.479 0.050h-21.333c-0.163 0-0.323-0.017-0.479-0.050-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.121-0.37-0.199-0.125-0.083-0.242-0.178-0.35-0.287s-0.204-0.225-0.287-0.35c-0.077-0.116-0.143-0.24-0.199-0.37s-0.098-0.266-0.128-0.404c-0.034-0.156-0.050-0.315-0.050-0.479v-8c0-0.163 0.017-0.323 0.050-0.479 0.030-0.137 0.072-0.272 0.128-0.404s0.121-0.254 0.199-0.37c0.083-0.125 0.179-0.242 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.098 0.404-0.128v0c0.156-0.034 0.315-0.050 0.479-0.050h21.333c0.163 0 0.323 0.017 0.479 0.050 0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.122 0.37 0.199 0.125 0.083 0.241 0.178 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.099 0.266 0.128 0.404v0c0.034 0.156 0.050 0.315 0.050 0.478v4c0 0.523-0.411 0.933-0.933 0.933s-0.933-0.411-0.933-0.933v-4c0-0.055-0.010-0.106-0.029-0.154s-0.178-0.178-0.217-0.217c-0.047-0.020-0.098-0.029-0.154-0.029h-21.333c-0.055 0-0.106 0.010-0.153 0.029v0 0c-0.047 0.020-0.178 0.178-0.217 0.217-0.020 0.047-0.029 0.098-0.029 0.154v8c0 0.055 0.010 0.106 0.029 0.154s0.178 0.178 0.217 0.217c0.047 0.020 0.098 0.029 0.153 0.029h21.333c0.055 0 0.106-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.154v-1.333c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933zM20.479 23.117v0c0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.121 0.37 0.199 0.125 0.083 0.241 0.179 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.099 0.266 0.128 0.404v0c0.034 0.156 0.051 0.316 0.051 0.479s-0.017 0.323-0.051 0.479c-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.267 0.098-0.404 0.128-0.156 0.034-0.316 0.051-0.479 0.051h-8c-0.163 0-0.323-0.017-0.479-0.051-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.121-0.37-0.199-0.125-0.083-0.242-0.179-0.35-0.287s-0.204-0.225-0.287-0.35c-0.077-0.116-0.143-0.24-0.199-0.37-0.056-0.132-0.098-0.266-0.128-0.404-0.034-0.156-0.050-0.315-0.050-0.479s0.017-0.323 0.050-0.479c0.030-0.137 0.072-0.272 0.128-0.404 0.055-0.131 0.121-0.254 0.199-0.37 0.083-0.125 0.179-0.241 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.099 0.404-0.128 0.156-0.034 0.316-0.050 0.479-0.050h8c0.163 0 0.323 0.017 0.479 0.050zM20 24.933h-8c-0.055 0-0.106 0.010-0.153 0.029s-0.178 0.178-0.217 0.217c-0.020 0.047-0.029 0.098-0.029 0.154s0.010 0.106 0.029 0.153c0.020 0.047 0.178 0.178 0.217 0.217 0.047 0.020 0.098 0.029 0.153 0.029h8c0.055 0 0.106-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.153s-0.010-0.106-0.029-0.154v0c-0.020-0.047-0.178-0.178-0.217-0.217-0.047-0.019-0.098-0.029-0.154-0.029z"},null,-1)])])}const bh={name:"meeting-icon-summit",render:vv},ao={summit:"rgba(var(--o-orange-6))",events:"rgba(var(--o-cyan-6))",meeting:"rgba(var(--o-deep-blue-6))"},mn=0,vn=1,tn=2,Ch=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,yv=["var(--o-color-primary1)","var(--o-color-warning1)","var(--o-color-success1)"],ba=()=>{const{t:r}=$e.useI18n(),e=t.computed(()=>new Map([[1,{label:r("meeting.offline"),value:1}],[2,{label:r("meeting.online"),value:2}],[3,{label:r("meeting.onlineOffline"),value:3}]])),i=t.computed(()=>new Map([[1,{id:"draft",label:r("meeting.statusDraft"),text:r("meeting.statusDraft"),value:1}],[2,{id:"under-review",label:r("meeting.statusUnderReview"),text:r("meeting.statusPending"),value:2}],[3,{id:"registration",label:r("meeting.statusRegistering"),text:r("meeting.statusApproved"),value:3}],[4,{id:"in-progress",label:r("meeting.statusInProgress"),text:r("meeting.statusApproved"),value:4}],[5,{id:"ended",label:r("meeting.statusEnded"),text:r("meeting.statusEnded"),value:5}],[6,{id:"modified",label:r("meeting.statusModified"),text:r("meeting.statusModified"),value:6}],[7,{id:"reject",label:r("meeting.statusRejected"),text:r("meeting.statusRejected"),value:7}]])),n=t.computed(()=>new Map([["all",{label:r("common.all"),value:"all"}],["rejected",{label:r("meeting.statusRejected"),value:"rejected"}],["approved",{label:r("meeting.statusApproved"),value:"approved"}],["publish",{label:r("meeting.statusPending"),value:"publish"}],["cancel",{label:r("meeting.statusCanceled"),value:"cancel"}]]));return{t:r,activityTypeMap:e,statusMap:i,approvalStatusMap:n}},_v={class:"o-activity-form"},Tv={class:"time-config"},bv={class:"form-btns"},ac=t.defineComponent({__name:"OActivityForm",props:{data:{},creatActivity:{},editActivity:{},admins:{},organizers:{}},emits:["confirm","close"],setup(r,{expose:e,emit:i}){const n=i,s=A.useMessage(null),{lePadV:a}=It.useScreen(),{t:o}=$e.useI18n(),l=o,{activityTypeMap:c}=ba(),d=r,m=t.computed(()=>!!d.data),g=t.ref({title:"",organizer:"",start_date:"",end_date:"",register_end_date:"",activity_type:"",synopsis:"",register_url:"",content_url:"",address:"",start:"",end:"",is_publish:"true",email_list:"",approver:""}),S=t.ref(),T=t.ref(!1),b=t.ref({title:[{required:!0,message:o("meeting.enterActivityName")},{validator:U=>{if(U.length>50)return{type:"danger",message:o("meeting.activityNameMaxLength")}}}],activity_type:[{required:!0,message:o("meeting.selectActivityType")}],organizer:[{required:!0,message:o("meeting.selectActivityOrganizer")}],start_date:[{required:!0,message:o("meeting.selectActivityTime")},{validator:()=>{const{start_date:U,end_date:B}=g.value,G=U.split(" "),C=B.split(" ");if(!U||!B)return{type:"danger",message:o("meeting.selectActivityDate")};const k=G[1].split(":").map(Number),O=C[1].split(":").map(Number);if(k[0]<8||k[0]>21||O[0]<8||O[0]>21)return{type:"danger",message:o("meeting.activityTimeRange")};if(rt.dayjs(U).valueOf()>rt.dayjs(B).valueOf())return{type:"danger",message:o("meeting.endDateAfterStartDate")};g.value.start_date=G[0],g.value.end_date=C[0],g.value.start=G[1],g.value.end=C[1]},triggers:["blur","change"]}],register_end_date:[{validator:()=>{const{register_end_date:U,end_date:B,end:G}=g.value;if(U&&rt.dayjs(`${B} ${G}`).valueOf()<rt.dayjs(U).valueOf())return{type:"danger",message:o("meeting.registerDeadlineBeforeEnd")}},triggers:["blur","change"]}],address:[{required:!0,message:o("meeting.enterActivityAddress")},{validator:U=>{if(U.length>255)return{type:"danger",message:o("meeting.activityAddressMaxLength")}}}],register_url:[{validator:U=>{const B=U.replaceAll(" ","")||"";if(B.length&&(B.split(";")||[]).some(C=>!sc.test(C)))return{type:"danger",message:o("meeting.invalidRegistrationUrl")}},triggers:["blur","change"]}],content_url:[{validator:U=>{const B=U.replaceAll(" ","")||"";if(B.length&&(B.split(";")||[]).some(C=>!sc.test(C)))return{type:"danger",message:o("meeting.invalidActivityDetailUrl")}},triggers:["blur","change"]}],synopsis:[{validator:U=>{if(U.length>1e3)return{type:"danger",message:o("meeting.activityContentMaxLength")}}}],email_list:[{validator:U=>{const B=U.replaceAll(" ","").replaceAll(",",";")||"";if(B.length){if(B.length>1020)return{type:"danger",message:o("meeting.emailTooLong")};const G=B.split(";")||[];if(G.some(C=>!Ch.test(C)))return{type:"danger",message:o("meeting.emailInvalid")};if(G.some(C=>C.length>50))return{type:"danger",message:o("meeting.singleEmailTooLong")};if(G.length>20)return{type:"danger",message:o("meeting.emailCountTooLong")}}},triggers:["blur","change"]}],approver:[{required:!0,message:o("meeting.selectActivityApprover")}]}),y=t.computed(()=>d.admins||[]),x=t.ref(""),N=t.ref([]);c.value.forEach(U=>{N.value.push(U)});const I=U=>{const B=N.value.find(G=>G.label===U);g.value.activity_type=B==null?void 0:B.value},D=U=>U.getTime()<Date.now()-1440*60*1e3;t.watch(()=>d.data,U=>{var B;if(U){const{title:G,start_date:C,end_date:k,register_end_date:O,activity_type:j,register_url:L,content_url:V,address:M,start:q,end:$,is_publish:X,approver:R,update_activity_id:ee,synopsis:ue,email_list:J,organizer:oe}=U;let Z={title:G,start_date:C,end_date:k,register_end_date:O,activity_type:j,register_url:L,content_url:V,address:M,start:q,end:$,is_publish:X,approver:R,update_activity_id:ee,synopsis:ue,email_list:J,organizer:oe};g.value={...Z},x.value=(B=c.value.get(Number(U.activity_type)))==null?void 0:B.label,g.value.start_date=`${g.value.start_date} ${g.value.start}`,g.value.end_date=`${g.value.end_date} ${g.value.end}`}},{immediate:!0,deep:!0});const z=async U=>{var G,C,k,O,j,L,V;let B=m.value?o("meeting.modifyActivity"):o(U?"meeting.create":"meeting.saveDraft");try{if((await((G=S.value)==null?void 0:G.validate())).some(q=>!!q))return;T.value=!0,g.value.is_publish=`${U}`,m.value&&((C=d.data)==null?void 0:C.status)===3?(g.value.update_activity_id=(k=d.data)==null?void 0:k.id,await((O=d.creatActivity)==null?void 0:O.call(d,g.value))):m.value?await((L=d.editActivity)==null?void 0:L.call(d,(j=d.data)==null?void 0:j.id,g.value)):await((V=d.creatActivity)==null?void 0:V.call(d,g.value)),s.success({content:o("meeting.activityActionSuccess",[g.value.title,B.toLowerCase()])}),H(),n("confirm")}finally{T.value=!1}},H=()=>{g.value={},n("close")};return e({confirm:z}),(U,B)=>(t.openBlock(),t.createElementBlock("div",_v,[t.createVNode(t.unref(A.OForm),{model:g.value,ref_key:"formRef",ref:S,"has-required":"","label-width":"108px",layout:t.unref(a)?"v":"h",class:"form-wrapper"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OFormItem),{rules:b.value.title,label:t.unref(o)("meeting.activityName"),field:"title"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OInput),{size:"large",placeholder:t.unref(o)("meeting.enterActivityName"),modelValue:g.value.title,"onUpdate:modelValue":B[0]||(B[0]=G=>g.value.title=G)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:b.value.organizer,label:t.unref(o)("meeting.activityOrganizer"),field:"organizer"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OSelect),{placeholder:t.unref(o)("meeting.selectActivityOrganizer"),size:"large",modelValue:g.value.organizer,"onUpdate:modelValue":B[1]||(B[1]=G=>g.value.organizer=G)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.organizers,G=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{key:G.name,value:G.name},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(G.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:b.value.activity_type,label:t.unref(o)("meeting.activityType"),field:"activity_type"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OSelect),{placeholder:t.unref(o)("meeting.selectActivityType"),size:"large",modelValue:x.value,"onUpdate:modelValue":B[2]||(B[2]=G=>x.value=G),onChange:I},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(N.value,G=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{key:G.value,value:G.label},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(G.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),g.value.activity_type===1||g.value.activity_type===3?(t.openBlock(),t.createBlock(t.unref(A.OFormItem),{key:0,rules:b.value.address,label:t.unref(o)("meeting.activityAddress"),field:"address"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OInput),{size:"large",placeholder:t.unref(o)("meeting.enterActivityAddress"),modelValue:g.value.address,"onUpdate:modelValue":B[3]||(B[3]=G=>g.value.address=G)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OFormItem),{rules:b.value.start_date,label:t.unref(o)("meeting.activityTime"),field:"start_date",required:""},{default:t.withCtx(()=>[t.createElementVNode("div",Tv,[t.createVNode(t.unref(A.OFormItem),{label:t.unref(o)("meeting.startDate"),field:"start_date"},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElDatePicker),{size:"large",modelValue:g.value.start_date,"onUpdate:modelValue":B[4]||(B[4]=G=>g.value.start_date=G),type:"datetime",placeholder:t.unref(o)("meeting.selectDate"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":D,clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t.createVNode(t.unref(A.OFormItem),{label:t.unref(o)("meeting.endDate"),field:"end_date"},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElDatePicker),{size:"large",modelValue:g.value.end_date,"onUpdate:modelValue":B[5]||(B[5]=G=>g.value.end_date=G),type:"datetime",placeholder:t.unref(o)("meeting.selectDate"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":D,clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:b.value.register_end_date,label:t.unref(o)("meeting.registrationDeadline"),field:"register_end_date"},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElDatePicker),{size:"large",modelValue:g.value.register_end_date,"onUpdate:modelValue":B[6]||(B[6]=G=>g.value.register_end_date=G),type:"datetime",placeholder:t.unref(o)("meeting.selectActivityDeadline"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm",clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:b.value.register_url,label:t.unref(o)("meeting.registrationUrl"),field:"register_url"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OInput),{size:"large",placeholder:t.unref(o)("meeting.enterActivityRegistrationUrl"),modelValue:g.value.register_url,"onUpdate:modelValue":B[7]||(B[7]=G=>g.value.register_url=G)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:b.value.content_url,label:t.unref(o)("meeting.activityDetailUrl"),field:"content_url"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OInput),{size:"large",placeholder:t.unref(o)("meeting.enterActivityDetailUrl"),modelValue:g.value.content_url,"onUpdate:modelValue":B[8]||(B[8]=G=>g.value.content_url=G)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:b.value.synopsis,label:t.unref(o)("meeting.activityContent"),field:"synopsis"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OTextarea),{size:"large",placeholder:t.unref(o)("meeting.enterActivityContent"),modelValue:g.value.synopsis,"onUpdate:modelValue":B[9]||(B[9]=G=>g.value.synopsis=G)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{field:"email_list",rules:b.value.email_list,label:t.unref(o)("meeting.email")},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OTextarea),{disabled:m.value,size:"large",placeholder:t.unref(l)("meeting.enterEmail"),rows:4,modelValue:g.value.email_list,"onUpdate:modelValue":B[10]||(B[10]=G=>g.value.email_list=G)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:b.value.approver,label:t.unref(o)("meeting.activityApprover"),field:"approver"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OSelect),{placeholder:t.unref(o)("meeting.selectActivityApprover"),size:"large",modelValue:g.value.approver,"onUpdate:modelValue":B[11]||(B[11]=G=>g.value.approver=G)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value,G=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{key:G,value:G},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(G),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"])]),_:1},8,["model","layout"]),t.createElementVNode("div",bv,[t.createVNode(t.unref(A.OButton),{color:"primary",variant:"solid",size:"large",round:"pill",onClick:B[12]||(B[12]=G=>z(!0)),loading:T.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.value?t.unref(o)("common.save"):t.unref(o)("meeting.create")),1)]),_:1},8,["loading"]),m.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(A.OButton),{key:0,color:"primary",variant:"outline",round:"pill",size:"large",onClick:B[13]||(B[13]=G=>z(!1)),loading:T.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("meeting.saveDraft")),1)]),_:1},8,["loading"])),t.createVNode(t.unref(A.OButton),{color:"primary",variant:"outline",size:"large",round:"pill",onClick:H},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("meeting.cancelBtn")),1)]),_:1})])]))}}),Cv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function xv(r,e){return t.openBlock(),t.createElementBlock("svg",Cv,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M17.286 5c0.676 0 1.213 0.546 1.213 1.21 0 0.227-0.064 0.449-0.184 0.641l-0.065 0.093-1.24 1.62c-0.149 0.194-0.433 0.236-0.634 0.092-0.181-0.129-0.234-0.364-0.134-0.551l0.039-0.060 1.24-1.62c0.046-0.060 0.071-0.136 0.071-0.214 0-0.169-0.113-0.302-0.253-0.329l-0.054-0.005h-10.573c-0.064 0-0.126 0.022-0.179 0.064-0.126 0.099-0.162 0.281-0.092 0.426l0.036 0.059 4.207 5.495c0.138 0.18 0.221 0.394 0.243 0.617l0.006 0.112 0.015 3.985c0 0.088 0.033 0.171 0.087 0.232l0.045 0.042 1.525 1.158c0.052 0.040 0.114 0.060 0.176 0.060 0.146-0.001 0.274-0.116 0.301-0.275l0.005-0.062-0.020-5.134c-0.001-0.228 0.063-0.452 0.184-0.645l0.065-0.094 1.804-2.357c0.149-0.194 0.433-0.236 0.634-0.092 0.181 0.129 0.234 0.364 0.134 0.551l-0.039 0.060-1.805 2.357c-0.035 0.045-0.058 0.099-0.067 0.157l-0.005 0.059 0.020 5.134c0.003 0.663-0.533 1.212-1.209 1.214-0.23 0.001-0.454-0.063-0.647-0.183l-0.094-0.064-1.525-1.158c-0.267-0.203-0.436-0.506-0.471-0.834l-0.007-0.124-0.015-3.985c-0-0.059-0.015-0.115-0.041-0.165l-0.030-0.047-4.207-5.495c-0.401-0.523-0.308-1.272 0.211-1.682 0.183-0.145 0.405-0.234 0.637-0.256l0.117-0.006h10.573z"},null,-1)])])}const oc={name:"components-icon-filter",render:xv};/*! @license DOMPurify 2.5.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.9/LICENSE */function pn(r){"@babel/helpers - typeof";return pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pn(r)}function Ko(r,e){return Ko=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},Ko(r,e)}function Sv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ws(r,e,i){return Sv()?Ws=Reflect.construct:Ws=function(s,a,o){var l=[null];l.push.apply(l,a);var c=Function.bind.apply(s,l),d=new c;return o&&Ko(d,o.prototype),d},Ws.apply(null,arguments)}function Ii(r){return Ev(r)||kv(r)||wv(r)||Dv()}function Ev(r){if(Array.isArray(r))return Qo(r)}function kv(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function wv(r,e){if(r){if(typeof r=="string")return Qo(r,e);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Qo(r,e)}}function Qo(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=r[i];return n}function Dv(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Av=Object.hasOwnProperty,lc=Object.setPrototypeOf,Iv=Object.isFrozen,Nv=Object.getPrototypeOf,Ov=Object.getOwnPropertyDescriptor,ti=Object.freeze,_i=Object.seal,Bv=Object.create,xh=typeof Reflect<"u"&&Reflect,Js=xh.apply,Zo=xh.construct;Js||(Js=function(e,i,n){return e.apply(i,n)});ti||(ti=function(e){return e});_i||(_i=function(e){return e});Zo||(Zo=function(e,i){return Ws(e,Ii(i))});var Lv=Ti(Array.prototype.forEach),uc=Ti(Array.prototype.pop),Fr=Ti(Array.prototype.push),Ys=Ti(String.prototype.toLowerCase),oo=Ti(String.prototype.toString),cc=Ti(String.prototype.match),Ai=Ti(String.prototype.replace),Pv=Ti(String.prototype.indexOf),Mv=Ti(String.prototype.trim),Vt=Ti(RegExp.prototype.test),lo=Rv(TypeError);function Ti(r){return function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];return Js(r,e,n)}}function Rv(r){return function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return Zo(r,i)}}function je(r,e,i){var n;i=(n=i)!==null&&n!==void 0?n:Ys,lc&&lc(r,null);for(var s=e.length;s--;){var a=e[s];if(typeof a=="string"){var o=i(a);o!==a&&(Iv(e)||(e[s]=o),a=o)}r[a]=!0}return r}function Sn(r){var e=Bv(null),i;for(i in r)Js(Av,r,[i])===!0&&(e[i]=r[i]);return e}function Ps(r,e){for(;r!==null;){var i=Ov(r,e);if(i){if(i.get)return Ti(i.get);if(typeof i.value=="function")return Ti(i.value)}r=Nv(r)}function n(s){return console.warn("fallback value for",s),null}return n}var dc=ti(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),uo=ti(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),co=ti(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Vv=ti(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ho=ti(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Fv=ti(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),hc=ti(["#text"]),fc=ti(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),fo=ti(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),pc=ti(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ms=ti(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$v=_i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Uv=_i(/<%[\w\W]*|[\w\W]*%>/gm),zv=_i(/\${[\w\W]*}/gm),Hv=_i(/^data-[\-\w.\u00B7-\uFFFF]+$/),qv=_i(/^aria-[\-\w]+$/),jv=_i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gv=_i(/^(?:\w+script|data):/i),Wv=_i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Yv=_i(/^html$/i),Xv=_i(/^[a-z][.\w]*(-[.\w]+)+$/i),Kv=function(){return typeof window>"u"?null:window},Qv=function(e,i){if(pn(e)!=="object"||typeof e.createPolicy!="function")return null;var n=null,s="data-tt-policy-suffix";i.currentScript&&i.currentScript.hasAttribute(s)&&(n=i.currentScript.getAttribute(s));var a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:function(l){return l},createScriptURL:function(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function Sh(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Kv(),e=function(te){return Sh(te)};if(e.version="2.5.9",e.removed=[],!r||!r.document||r.document.nodeType!==9)return e.isSupported=!1,e;var i=r.document,n=r.document,s=r.DocumentFragment,a=r.HTMLTemplateElement,o=r.Node,l=r.Element,c=r.NodeFilter,d=r.NamedNodeMap,m=d===void 0?r.NamedNodeMap||r.MozNamedAttrMap:d,g=r.HTMLFormElement,S=r.DOMParser,T=r.trustedTypes,b=l.prototype,y=Ps(b,"cloneNode"),x=Ps(b,"nextSibling"),N=Ps(b,"childNodes"),I=Ps(b,"parentNode");if(typeof a=="function"){var D=n.createElement("template");D.content&&D.content.ownerDocument&&(n=D.content.ownerDocument)}var z=Qv(T,i),H=z?z.createHTML(""):"",U=n,B=U.implementation,G=U.createNodeIterator,C=U.createDocumentFragment,k=U.getElementsByTagName,O=i.importNode,j={};try{j=Sn(n).documentMode?n.documentMode:{}}catch{}var L={};e.isSupported=typeof I=="function"&&B&&B.createHTMLDocument!==void 0&&j!==9;var V=$v,M=Uv,q=zv,$=Hv,X=qv,R=Gv,ee=Wv,ue=Xv,J=jv,oe=null,Z=je({},[].concat(Ii(dc),Ii(uo),Ii(co),Ii(ho),Ii(hc))),se=null,_e=je({},[].concat(Ii(fc),Ii(fo),Ii(pc),Ii(Ms))),ke=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),De=null,Ne=null,Re=!0,et=!0,Ve=!1,Ke=!0,Ge=!1,Ue=!0,Xe=!1,kt=!1,it=!1,Ae=!1,be=!1,me=!1,Pe=!0,Ye=!1,vt="user-content-",ne=!0,re=!1,le={},Ee=null,pe=je({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ze=null,Je=je({},["audio","video","img","source","image","track"]),Fe=null,Nt=je({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xt="http://www.w3.org/1998/Math/MathML",ui="http://www.w3.org/2000/svg",Ot="http://www.w3.org/1999/xhtml",St=Ot,ii=!1,$t=null,Gi=je({},[xt,ui,Ot],oo),Ut,Wi=["application/xhtml+xml","text/html"],E="text/html",w,Q=null,ce=n.createElement("form"),ge=function(te){return te instanceof RegExp||te instanceof Function},Ie=function(te){Q&&Q===te||((!te||pn(te)!=="object")&&(te={}),te=Sn(te),Ut=Wi.indexOf(te.PARSER_MEDIA_TYPE)===-1?Ut=E:Ut=te.PARSER_MEDIA_TYPE,w=Ut==="application/xhtml+xml"?oo:Ys,oe="ALLOWED_TAGS"in te?je({},te.ALLOWED_TAGS,w):Z,se="ALLOWED_ATTR"in te?je({},te.ALLOWED_ATTR,w):_e,$t="ALLOWED_NAMESPACES"in te?je({},te.ALLOWED_NAMESPACES,oo):Gi,Fe="ADD_URI_SAFE_ATTR"in te?je(Sn(Nt),te.ADD_URI_SAFE_ATTR,w):Nt,Ze="ADD_DATA_URI_TAGS"in te?je(Sn(Je),te.ADD_DATA_URI_TAGS,w):Je,Ee="FORBID_CONTENTS"in te?je({},te.FORBID_CONTENTS,w):pe,De="FORBID_TAGS"in te?je({},te.FORBID_TAGS,w):{},Ne="FORBID_ATTR"in te?je({},te.FORBID_ATTR,w):{},le="USE_PROFILES"in te?te.USE_PROFILES:!1,Re=te.ALLOW_ARIA_ATTR!==!1,et=te.ALLOW_DATA_ATTR!==!1,Ve=te.ALLOW_UNKNOWN_PROTOCOLS||!1,Ke=te.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ge=te.SAFE_FOR_TEMPLATES||!1,Ue=te.SAFE_FOR_XML!==!1,Xe=te.WHOLE_DOCUMENT||!1,Ae=te.RETURN_DOM||!1,be=te.RETURN_DOM_FRAGMENT||!1,me=te.RETURN_TRUSTED_TYPE||!1,it=te.FORCE_BODY||!1,Pe=te.SANITIZE_DOM!==!1,Ye=te.SANITIZE_NAMED_PROPS||!1,ne=te.KEEP_CONTENT!==!1,re=te.IN_PLACE||!1,J=te.ALLOWED_URI_REGEXP||J,St=te.NAMESPACE||Ot,ke=te.CUSTOM_ELEMENT_HANDLING||{},te.CUSTOM_ELEMENT_HANDLING&&ge(te.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ke.tagNameCheck=te.CUSTOM_ELEMENT_HANDLING.tagNameCheck),te.CUSTOM_ELEMENT_HANDLING&&ge(te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ke.attributeNameCheck=te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),te.CUSTOM_ELEMENT_HANDLING&&typeof te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ke.allowCustomizedBuiltInElements=te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ge&&(et=!1),be&&(Ae=!0),le&&(oe=je({},Ii(hc)),se=[],le.html===!0&&(je(oe,dc),je(se,fc)),le.svg===!0&&(je(oe,uo),je(se,fo),je(se,Ms)),le.svgFilters===!0&&(je(oe,co),je(se,fo),je(se,Ms)),le.mathMl===!0&&(je(oe,ho),je(se,pc),je(se,Ms))),te.ADD_TAGS&&(oe===Z&&(oe=Sn(oe)),je(oe,te.ADD_TAGS,w)),te.ADD_ATTR&&(se===_e&&(se=Sn(se)),je(se,te.ADD_ATTR,w)),te.ADD_URI_SAFE_ATTR&&je(Fe,te.ADD_URI_SAFE_ATTR,w),te.FORBID_CONTENTS&&(Ee===pe&&(Ee=Sn(Ee)),je(Ee,te.FORBID_CONTENTS,w)),ne&&(oe["#text"]=!0),Xe&&je(oe,["html","head","body"]),oe.table&&(je(oe,["tbody"]),delete De.tbody),ti&&ti(te),Q=te)},nt=je({},["mi","mo","mn","ms","mtext"]),wt=je({},["annotation-xml"]),Wt=je({},["title","style","font","a","script"]),zt=je({},uo);je(zt,co),je(zt,Vv);var Rt=je({},ho);je(Rt,Fv);var ni=function(te){var ve=I(te);(!ve||!ve.tagName)&&(ve={namespaceURI:St,tagName:"template"});var Se=Ys(te.tagName),tt=Ys(ve.tagName);return $t[te.namespaceURI]?te.namespaceURI===ui?ve.namespaceURI===Ot?Se==="svg":ve.namespaceURI===xt?Se==="svg"&&(tt==="annotation-xml"||nt[tt]):!!zt[Se]:te.namespaceURI===xt?ve.namespaceURI===Ot?Se==="math":ve.namespaceURI===ui?Se==="math"&&wt[tt]:!!Rt[Se]:te.namespaceURI===Ot?ve.namespaceURI===ui&&!wt[tt]||ve.namespaceURI===xt&&!nt[tt]?!1:!Rt[Se]&&(Wt[Se]||!zt[Se]):!!(Ut==="application/xhtml+xml"&&$t[te.namespaceURI]):!1},Qe=function(te){Fr(e.removed,{element:te});try{te.parentNode.removeChild(te)}catch{try{te.outerHTML=H}catch{te.remove()}}},ri=function(te,ve){try{Fr(e.removed,{attribute:ve.getAttributeNode(te),from:ve})}catch{Fr(e.removed,{attribute:null,from:ve})}if(ve.removeAttribute(te),te==="is"&&!se[te])if(Ae||be)try{Qe(ve)}catch{}else try{ve.setAttribute(te,"")}catch{}},Yt=function(te){var ve,Se;if(it)te="<remove></remove>"+te;else{var tt=cc(te,/^[\r\n\t ]+/);Se=tt&&tt[0]}Ut==="application/xhtml+xml"&&St===Ot&&(te='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+te+"</body></html>");var Ht=z?z.createHTML(te):te;if(St===Ot)try{ve=new S().parseFromString(Ht,Ut)}catch{}if(!ve||!ve.documentElement){ve=B.createDocument(St,"template",null);try{ve.documentElement.innerHTML=ii?H:Ht}catch{}}var At=ve.body||ve.documentElement;return te&&Se&&At.insertBefore(n.createTextNode(Se),At.childNodes[0]||null),St===Ot?k.call(ve,Xe?"html":"body")[0]:Xe?ve.documentElement:At},Xt=function(te){return G.call(te.ownerDocument||te,te,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null,!1)},Dt=function(te){return te instanceof g&&(typeof te.nodeName!="string"||typeof te.textContent!="string"||typeof te.removeChild!="function"||!(te.attributes instanceof m)||typeof te.removeAttribute!="function"||typeof te.setAttribute!="function"||typeof te.namespaceURI!="string"||typeof te.insertBefore!="function"||typeof te.hasChildNodes!="function")},ut=function(te){return pn(o)==="object"?te instanceof o:te&&pn(te)==="object"&&typeof te.nodeType=="number"&&typeof te.nodeName=="string"},qe=function(te,ve,Se){L[te]&&Lv(L[te],function(tt){tt.call(e,ve,Se,Q)})},Si=function(te){var ve;if(qe("beforeSanitizeElements",te,null),Dt(te)||Vt(/[\u0080-\uFFFF]/,te.nodeName))return Qe(te),!0;var Se=w(te.nodeName);if(qe("uponSanitizeElement",te,{tagName:Se,allowedTags:oe}),te.hasChildNodes()&&!ut(te.firstElementChild)&&(!ut(te.content)||!ut(te.content.firstElementChild))&&Vt(/<[/\w]/g,te.innerHTML)&&Vt(/<[/\w]/g,te.textContent)||Se==="select"&&Vt(/<template/i,te.innerHTML)||te.nodeType===7||Ue&&te.nodeType===8&&Vt(/<[/\w]/g,te.data))return Qe(te),!0;if(!oe[Se]||De[Se]){if(!De[Se]&&bn(Se)&&(ke.tagNameCheck instanceof RegExp&&Vt(ke.tagNameCheck,Se)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(Se)))return!1;if(ne&&!Ee[Se]){var tt=I(te)||te.parentNode,Ht=N(te)||te.childNodes;if(Ht&&tt)for(var At=Ht.length,Tt=At-1;Tt>=0;--Tt){var Ei=y(Ht[Tt],!0);Ei.__removalCount=(te.__removalCount||0)+1,tt.insertBefore(Ei,x(te))}}return Qe(te),!0}return te instanceof l&&!ni(te)||(Se==="noscript"||Se==="noembed"||Se==="noframes")&&Vt(/<\/no(script|embed|frames)/i,te.innerHTML)?(Qe(te),!0):(Ge&&te.nodeType===3&&(ve=te.textContent,ve=Ai(ve,V," "),ve=Ai(ve,M," "),ve=Ai(ve,q," "),te.textContent!==ve&&(Fr(e.removed,{element:te.cloneNode()}),te.textContent=ve)),qe("afterSanitizeElements",te,null),!1)},Li=function(te,ve,Se){if(Pe&&(ve==="id"||ve==="name")&&(Se in n||Se in ce))return!1;if(!(et&&!Ne[ve]&&Vt($,ve))){if(!(Re&&Vt(X,ve))){if(!se[ve]||Ne[ve]){if(!(bn(te)&&(ke.tagNameCheck instanceof RegExp&&Vt(ke.tagNameCheck,te)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(te))&&(ke.attributeNameCheck instanceof RegExp&&Vt(ke.attributeNameCheck,ve)||ke.attributeNameCheck instanceof Function&&ke.attributeNameCheck(ve))||ve==="is"&&ke.allowCustomizedBuiltInElements&&(ke.tagNameCheck instanceof RegExp&&Vt(ke.tagNameCheck,Se)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(Se))))return!1}else if(!Fe[ve]){if(!Vt(J,Ai(Se,ee,""))){if(!((ve==="src"||ve==="xlink:href"||ve==="href")&&te!=="script"&&Pv(Se,"data:")===0&&Ze[te])){if(!(Ve&&!Vt(R,Ai(Se,ee,"")))){if(Se)return!1}}}}}}return!0},bn=function(te){return te!=="annotation-xml"&&cc(te,ue)},fs=function(te){var ve,Se,tt,Ht;qe("beforeSanitizeAttributes",te,null);var At=te.attributes;if(!(!At||Dt(te))){var Tt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:se};for(Ht=At.length;Ht--;){ve=At[Ht];var Ei=ve,yt=Ei.name,br=Ei.namespaceURI;if(Se=yt==="value"?ve.value:Mv(ve.value),tt=w(yt),Tt.attrName=tt,Tt.attrValue=Se,Tt.keepAttr=!0,Tt.forceKeepAttr=void 0,qe("uponSanitizeAttribute",te,Tt),Se=Tt.attrValue,!Tt.forceKeepAttr&&(ri(yt,te),!!Tt.keepAttr)){if(!Ke&&Vt(/\/>/i,Se)){ri(yt,te);continue}Ge&&(Se=Ai(Se,V," "),Se=Ai(Se,M," "),Se=Ai(Se,q," "));var ps=w(te.nodeName);if(Li(ps,tt,Se)){if(Ye&&(tt==="id"||tt==="name")&&(ri(yt,te),Se=vt+Se),Ue&&Vt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Se)){ri(yt,te);continue}if(z&&pn(T)==="object"&&typeof T.getAttributeType=="function"&&!br)switch(T.getAttributeType(ps,tt)){case"TrustedHTML":{Se=z.createHTML(Se);break}case"TrustedScriptURL":{Se=z.createScriptURL(Se);break}}try{br?te.setAttributeNS(br,yt,Se):te.setAttribute(yt,Se),Dt(te)?Qe(te):uc(e.removed)}catch{}}}}qe("afterSanitizeAttributes",te,null)}},Yi=function Ce(te){var ve,Se=Xt(te);for(qe("beforeSanitizeShadowDOM",te,null);ve=Se.nextNode();)qe("uponSanitizeShadowNode",ve,null),Si(ve),fs(ve),ve.content instanceof s&&Ce(ve.content);qe("afterSanitizeShadowDOM",te,null)};return e.sanitize=function(Ce){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve,Se,tt,Ht,At;if(ii=!Ce,ii&&(Ce="<!-->"),typeof Ce!="string"&&!ut(Ce))if(typeof Ce.toString=="function"){if(Ce=Ce.toString(),typeof Ce!="string")throw lo("dirty is not a string, aborting")}else throw lo("toString is not a function");if(!e.isSupported){if(pn(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof Ce=="string")return r.toStaticHTML(Ce);if(ut(Ce))return r.toStaticHTML(Ce.outerHTML)}return Ce}if(kt||Ie(te),e.removed=[],typeof Ce=="string"&&(re=!1),re){if(Ce.nodeName){var Tt=w(Ce.nodeName);if(!oe[Tt]||De[Tt])throw lo("root node is forbidden and cannot be sanitized in-place")}}else if(Ce instanceof o)ve=Yt("<!---->"),Se=ve.ownerDocument.importNode(Ce,!0),Se.nodeType===1&&Se.nodeName==="BODY"||Se.nodeName==="HTML"?ve=Se:ve.appendChild(Se);else{if(!Ae&&!Ge&&!Xe&&Ce.indexOf("<")===-1)return z&&me?z.createHTML(Ce):Ce;if(ve=Yt(Ce),!ve)return Ae?null:me?H:""}ve&&it&&Qe(ve.firstChild);for(var Ei=Xt(re?Ce:ve);tt=Ei.nextNode();)tt.nodeType===3&&tt===Ht||(Si(tt),fs(tt),tt.content instanceof s&&Yi(tt.content),Ht=tt);if(Ht=null,re)return Ce;if(Ae){if(be)for(At=C.call(ve.ownerDocument);ve.firstChild;)At.appendChild(ve.firstChild);else At=ve;return(se.shadowroot||se.shadowrootmod)&&(At=O.call(i,At,!0)),At}var yt=Xe?ve.outerHTML:ve.innerHTML;return Xe&&oe["!doctype"]&&ve.ownerDocument&&ve.ownerDocument.doctype&&ve.ownerDocument.doctype.name&&Vt(Yv,ve.ownerDocument.doctype.name)&&(yt="<!DOCTYPE "+ve.ownerDocument.doctype.name+`>
3
- `+yt),Ge&&(yt=Ai(yt,V," "),yt=Ai(yt,M," "),yt=Ai(yt,q," ")),z&&me?z.createHTML(yt):yt},e.setConfig=function(Ce){Ie(Ce),kt=!0},e.clearConfig=function(){Q=null,kt=!1},e.isValidAttribute=function(Ce,te,ve){Q||Ie({});var Se=w(Ce),tt=w(te);return Li(Se,tt,ve)},e.addHook=function(Ce,te){typeof te=="function"&&(L[Ce]=L[Ce]||[],Fr(L[Ce],te))},e.removeHook=function(Ce){if(L[Ce])return uc(L[Ce])},e.removeHooks=function(Ce){L[Ce]&&(L[Ce]=[])},e.removeAllHooks=function(){L={}},e}var Zv=Sh();function Jv(r,e){const i=r.hooks??{};let n;for(n in i){const s=i[n];s!==void 0&&e.addHook(n,s)}}function ey(){return Zv()}function Ca(r={},e=ey){const i=e();Jv(r,i);const n=function(s,a){const o=a.value;if(a.oldValue===o)return;const l=`${o}`,c=a.arg,d=r.namedConfigurations,m=r.default??{};if(d&&c!==void 0){s.innerHTML=i.sanitize(l,d[c]??m);return}s.innerHTML=i.sanitize(l,m)};return{mounted:n,updated:n}}const ty={class:"th-filter-wrapper",ref:"filterRef"},iy={key:1,class:"list-content-wrapper"},ny={class:"btn-wrapper"},mc=t.defineComponent({__name:"ThFilter",props:{modelValue:{},list:{default:()=>[]},multiple:{type:Boolean,default:!1},tableWidth:{}},emits:["update:model-value","confirm"],setup(r,{emit:e}){const i=Ca(),{t:n}=$e.useI18n(),s=r,a=e,o=t.computed(()=>s.list.some(z=>{var H;return(H=z.children)==null?void 0:H.length})),l=t.computed(()=>s.list.map(z=>{const H=(z.children||[]).map(U=>({label:U.label,value:U.value}));return{label:z.label,value:z.value,children:o.value?H:void 0}})),c=t.ref(!1);t.watch(()=>s.modelValue,z=>{s.multiple?d.value=z:S.value=z});const d=t.ref([]),m=z=>{d.value=z},g=t.ref([]),S=t.ref(null),T=z=>{S.value===z?S.value=null:S.value=z,y()},b=()=>{d.value=[],g.value=[],S.value=null,y()},y=()=>{let z=null;s.multiple?o.value?z=g.value:z=d.value:z=S.value,a("update:model-value",z),c.value=!0,t.nextTick(()=>{a("confirm"),c.value=!1})},x=t.computed(()=>d.value.length||g.value.length||S.value||s.modelValue),N=t.ref(null),I=async z=>{var B,G;const H=z.target.parentElement.parentElement;await t.nextTick();const U=H.querySelector("input");U.click(),await t.nextTick(),(B=U.change)==null||B.call(U,U),await t.nextTick(),(G=N.value)==null||G.$forceUpdate(),g.value=JSON.parse(JSON.stringify(g.value))},D=({data:z})=>t.h("span",{onclick:I},z.label);return(z,H)=>{const U=t.resolveComponent("ElCascaderPanel");return t.openBlock(),t.createElementBlock("div",ty,[t.createElementVNode("span",null,[t.renderSlot(z.$slots,"default")]),r.multiple?(t.openBlock(),t.createBlock(t.unref(A.OPopover),{key:0,visible:c.value,position:"bottom",wrapClass:"th-filter-popover",trigger:"click",anchor:!1},{target:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["filter-wrapper",x.value&&"has-checked"])},[t.createVNode(t.unref(A.OIcon),{class:"filter-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(oc))]),_:1})],2)]),default:t.withCtx(()=>[o.value?(t.openBlock(),t.createElementBlock("div",iy,[t.createVNode(U,{ref_key:"aref",ref:N,expandTrigger:"hover",renderLabel:D,modelValue:g.value,"onUpdate:modelValue":H[1]||(H[1]=B=>g.value=B),style:{width:"fit-content"},options:l.value,props:{multiple:!0,expandTrigger:"hover"}},null,8,["modelValue","options"])])):(t.openBlock(),t.createBlock(t.unref(A.OScroller),{key:0,class:"content-wrapper","show-type":"hover","disabled-x":""},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OCheckboxGroup),{direction:"v",onChange:m,modelValue:d.value,"onUpdate:modelValue":H[0]||(H[0]=B=>d.value=B)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,B=>(t.openBlock(),t.createBlock(t.unref(A.OCheckbox),{key:B.value,value:B.value},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("span",null,null,512),[[t.unref(i),B.label]])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1})),t.createVNode(t.unref(A.ODivider)),t.createElementVNode("div",ny,[t.createVNode(t.unref(A.OLink),{onClick:b},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("common.reset")),1)]),_:1}),t.createVNode(t.unref(A.OLink),{onClick:y},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("common.confirm")),1)]),_:1})])]),_:1},8,["visible"])):(t.openBlock(),t.createBlock(t.unref(A.ODropdown),{key:1,optionPosition:"bottom",optionWrapClass:"th-filter-dropdown",modelValue:S.value,"onUpdate:modelValue":H[3]||(H[3]=B=>S.value=B)},{dropdown:t.withCtx(()=>[l.value.length?(t.openBlock(),t.createBlock(t.unref(A.OScroller),{key:0,"disabled-x":"",style:{"max-height":"300px"},"show-type":"always"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.ODropdownItem),{style:t.normalizeStyle({"--table-width":r.tableWidth}),class:t.normalizeClass([{"is-active":r.modelValue===""}]),value:"''",label:t.unref(n)("common.all"),onClick:H[2]||(H[2]=B=>T(""))},null,8,["style","class","label"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,B=>(t.openBlock(),t.createBlock(t.unref(A.ODropdownItem),{style:t.normalizeStyle({"--table-width":r.tableWidth}),class:t.normalizeClass([{"is-active":B.value===r.modelValue}]),key:B.value,value:B.value,onClick:G=>T(B.value)},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("span",null,null,512),[[t.unref(i),B.label]])]),_:2},1032,["style","class","value","onClick"]))),128))]),_:1})):t.createCommentVNode("",!0),l.value.length?t.createCommentVNode("",!0):t.renderSlot(z.$slots,"empty",{key:1})]),default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["filter-wrapper",x.value&&"has-checked"])},[t.createVNode(t.unref(A.OIcon),{class:"filter-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(oc))]),_:1})],2)]),_:3},8,["modelValue"]))],512)}}}),ry={class:"more-text-wrapper"},sy={key:0},ay={key:1},oy=t.defineComponent({__name:"MoreText",props:{text:{default:""},link:{type:Boolean,default:!1},lines:{default:3},show:{type:Boolean,default:!1}},setup(r){const e=r,{t:i}=$e.useI18n(),n=t.ref(!1),s=t.ref(!1),a=t.ref(0),o=t.ref(null);t.onMounted(()=>{l()}),t.watch([()=>e.text,()=>e.show],()=>{l()});const l=()=>{t.nextTick(()=>{const d=o.value;if(d){const m=document.createRange();m.setStart(d,0),m.setEnd(d,d.childNodes.length),s.value=m.getBoundingClientRect().height>d.offsetHeight+10||d.scrollHeight>d.offsetHeight+10,a.value=m.getBoundingClientRect().height||d.scrollHeight}else s.value=!1})},c=()=>{e.link&&window.open(e.text)};return(d,m)=>(t.openBlock(),t.createElementBlock("div",ry,[t.createElementVNode("div",{class:t.normalizeClass(["more-text-content",r.link&&"is-link"]),ref_key:"contentRef",ref:o,style:t.normalizeStyle({"max-height":n.value?a.value+"px":"66px","-webkit-line-clamp":n.value?"initial":r.lines}),onClick:c},t.toDisplayString(r.text),7),s.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"more-text-btn",onClick:m[0]||(m[0]=g=>n.value=!n.value)},[n.value?(t.openBlock(),t.createElementBlock("div",ay,[t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("common.collapse")),1),t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronUp))]),_:1})])):(t.openBlock(),t.createElementBlock("div",sy,[t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("common.expand")),1),t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronDown))]),_:1})]))])):t.createCommentVNode("",!0)]))}}),ly=$e._export_sfc(oy,[["__scopeId","data-v-4776f8a2"]]);var ea=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function uy(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var i=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(i,n,s.get?s:{enumerable:!0,get:function(){return r[n]}})}),i}var Xs={exports:{}},cy=Xs.exports,gc;function dy(){return gc||(gc=1,(function(r,e){(function(i,n){r.exports=n()})(cy,(function(){var i=1e3,n=6e4,s=36e5,a="millisecond",o="second",l="minute",c="hour",d="day",m="week",g="month",S="quarter",T="year",b="date",y="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,N=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var M=["th","st","nd","rd"],q=V%100;return"["+V+(M[(q-20)%10]||M[q]||M[0])+"]"}},D=function(V,M,q){var $=String(V);return!$||$.length>=M?V:""+Array(M+1-$.length).join(q)+V},z={s:D,z:function(V){var M=-V.utcOffset(),q=Math.abs(M),$=Math.floor(q/60),X=q%60;return(M<=0?"+":"-")+D($,2,"0")+":"+D(X,2,"0")},m:function V(M,q){if(M.date()<q.date())return-V(q,M);var $=12*(q.year()-M.year())+(q.month()-M.month()),X=M.clone().add($,g),R=q-X<0,ee=M.clone().add($+(R?-1:1),g);return+(-($+(q-X)/(R?X-ee:ee-X))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:g,y:T,w:m,d,D:b,h:c,m:l,s:o,ms:a,Q:S}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},H="en",U={};U[H]=I;var B="$isDayjsObject",G=function(V){return V instanceof j||!(!V||!V[B])},C=function V(M,q,$){var X;if(!M)return H;if(typeof M=="string"){var R=M.toLowerCase();U[R]&&(X=R),q&&(U[R]=q,X=R);var ee=M.split("-");if(!X&&ee.length>1)return V(ee[0])}else{var ue=M.name;U[ue]=M,X=ue}return!$&&X&&(H=X),X||!$&&H},k=function(V,M){if(G(V))return V.clone();var q=typeof M=="object"?M:{};return q.date=V,q.args=arguments,new j(q)},O=z;O.l=C,O.i=G,O.w=function(V,M){return k(V,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var j=(function(){function V(q){this.$L=C(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[B]=!0}var M=V.prototype;return M.parse=function(q){this.$d=(function($){var X=$.date,R=$.utc;if(X===null)return new Date(NaN);if(O.u(X))return new Date;if(X instanceof Date)return new Date(X);if(typeof X=="string"&&!/Z$/i.test(X)){var ee=X.match(x);if(ee){var ue=ee[2]-1||0,J=(ee[7]||"0").substring(0,3);return R?new Date(Date.UTC(ee[1],ue,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,J)):new Date(ee[1],ue,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,J)}}return new Date(X)})(q),this.init()},M.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},M.$utils=function(){return O},M.isValid=function(){return this.$d.toString()!==y},M.isSame=function(q,$){var X=k(q);return this.startOf($)<=X&&X<=this.endOf($)},M.isAfter=function(q,$){return k(q)<this.startOf($)},M.isBefore=function(q,$){return this.endOf($)<k(q)},M.$g=function(q,$,X){return O.u(q)?this[$]:this.set(X,q)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(q,$){var X=this,R=!!O.u($)||$,ee=O.p(q),ue=function(Ne,Re){var et=O.w(X.$u?Date.UTC(X.$y,Re,Ne):new Date(X.$y,Re,Ne),X);return R?et:et.endOf(d)},J=function(Ne,Re){return O.w(X.toDate()[Ne].apply(X.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(Re)),X)},oe=this.$W,Z=this.$M,se=this.$D,_e="set"+(this.$u?"UTC":"");switch(ee){case T:return R?ue(1,0):ue(31,11);case g:return R?ue(1,Z):ue(0,Z+1);case m:var ke=this.$locale().weekStart||0,De=(oe<ke?oe+7:oe)-ke;return ue(R?se-De:se+(6-De),Z);case d:case b:return J(_e+"Hours",0);case c:return J(_e+"Minutes",1);case l:return J(_e+"Seconds",2);case o:return J(_e+"Milliseconds",3);default:return this.clone()}},M.endOf=function(q){return this.startOf(q,!1)},M.$set=function(q,$){var X,R=O.p(q),ee="set"+(this.$u?"UTC":""),ue=(X={},X[d]=ee+"Date",X[b]=ee+"Date",X[g]=ee+"Month",X[T]=ee+"FullYear",X[c]=ee+"Hours",X[l]=ee+"Minutes",X[o]=ee+"Seconds",X[a]=ee+"Milliseconds",X)[R],J=R===d?this.$D+($-this.$W):$;if(R===g||R===T){var oe=this.clone().set(b,1);oe.$d[ue](J),oe.init(),this.$d=oe.set(b,Math.min(this.$D,oe.daysInMonth())).$d}else ue&&this.$d[ue](J);return this.init(),this},M.set=function(q,$){return this.clone().$set(q,$)},M.get=function(q){return this[O.p(q)]()},M.add=function(q,$){var X,R=this;q=Number(q);var ee=O.p($),ue=function(Z){var se=k(R);return O.w(se.date(se.date()+Math.round(Z*q)),R)};if(ee===g)return this.set(g,this.$M+q);if(ee===T)return this.set(T,this.$y+q);if(ee===d)return ue(1);if(ee===m)return ue(7);var J=(X={},X[l]=n,X[c]=s,X[o]=i,X)[ee]||1,oe=this.$d.getTime()+q*J;return O.w(oe,this)},M.subtract=function(q,$){return this.add(-1*q,$)},M.format=function(q){var $=this,X=this.$locale();if(!this.isValid())return X.invalidDate||y;var R=q||"YYYY-MM-DDTHH:mm:ssZ",ee=O.z(this),ue=this.$H,J=this.$m,oe=this.$M,Z=X.weekdays,se=X.months,_e=X.meridiem,ke=function(Re,et,Ve,Ke){return Re&&(Re[et]||Re($,R))||Ve[et].slice(0,Ke)},De=function(Re){return O.s(ue%12||12,Re,"0")},Ne=_e||function(Re,et,Ve){var Ke=Re<12?"AM":"PM";return Ve?Ke.toLowerCase():Ke};return R.replace(N,(function(Re,et){return et||(function(Ve){switch(Ve){case"YY":return String($.$y).slice(-2);case"YYYY":return O.s($.$y,4,"0");case"M":return oe+1;case"MM":return O.s(oe+1,2,"0");case"MMM":return ke(X.monthsShort,oe,se,3);case"MMMM":return ke(se,oe);case"D":return $.$D;case"DD":return O.s($.$D,2,"0");case"d":return String($.$W);case"dd":return ke(X.weekdaysMin,$.$W,Z,2);case"ddd":return ke(X.weekdaysShort,$.$W,Z,3);case"dddd":return Z[$.$W];case"H":return String(ue);case"HH":return O.s(ue,2,"0");case"h":return De(1);case"hh":return De(2);case"a":return Ne(ue,J,!0);case"A":return Ne(ue,J,!1);case"m":return String(J);case"mm":return O.s(J,2,"0");case"s":return String($.$s);case"ss":return O.s($.$s,2,"0");case"SSS":return O.s($.$ms,3,"0");case"Z":return ee}return null})(Re)||ee.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(q,$,X){var R,ee=this,ue=O.p($),J=k(q),oe=(J.utcOffset()-this.utcOffset())*n,Z=this-J,se=function(){return O.m(ee,J)};switch(ue){case T:R=se()/12;break;case g:R=se();break;case S:R=se()/3;break;case m:R=(Z-oe)/6048e5;break;case d:R=(Z-oe)/864e5;break;case c:R=Z/s;break;case l:R=Z/n;break;case o:R=Z/i;break;default:R=Z}return X?R:O.a(R)},M.daysInMonth=function(){return this.endOf(g).$D},M.$locale=function(){return U[this.$L]},M.locale=function(q,$){if(!q)return this.$L;var X=this.clone(),R=C(q,$,!0);return R&&(X.$L=R),X},M.clone=function(){return O.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},V})(),L=j.prototype;return k.prototype=L,[["$ms",a],["$s",o],["$m",l],["$H",c],["$W",d],["$M",g],["$y",T],["$D",b]].forEach((function(V){L[V[1]]=function(M){return this.$g(M,V[0],V[1])}})),k.extend=function(V,M){return V.$i||(V(M,j,k),V.$i=!0),k},k.locale=C,k.isDayjs=G,k.unix=function(V){return k(1e3*V)},k.en=U[H],k.Ls=U,k.p={},k}))})(Xs)),Xs.exports}var hy=dy();const ye=fr(hy),ht=(r=new Date,e="YYYY-MM-DD")=>{let i=r;return i||(i=new Date),ye(new Date(i)).isValid()?ye(new Date(i)).format(e):i},fy=(r,e,i="label",n="value")=>{const s=e.find(a=>a[n]===r);return(s==null?void 0:s[i])||r},py=r=>{const e=/\d+/g,i=r.match(e)||"";return parseInt(i[0])},Nn=r=>{const e=r.split(":");if(e.length>3||!e.length)return 0;let i=0,n=1;for(;e.length>0;){const s=e.pop();i+=parseInt(s)*n,n*=60}return i},po=r=>r<0?"Invalid number":r>=10?`${r}`:`0${r}`,vc=r=>{if(r>1440*60)return"Invalid date";const e=Math.floor(r/60/60),i=Math.floor((r-e*60*60)/60),n=r%60;return`${po(e)}:${po(i)}:${po(n)}`},Jo=r=>{const e=r.split(":"),i=e[e.length-3]?parseInt(e[e.length-3]):0,n=parseInt(e[e.length-2]),s=parseFloat(e[e.length-1]);return i*60*60+n*60+s},my=r=>{const e=Math.floor(r/3600),i=Math.floor((r-e*3600)/60),n=Math.floor(r-e*3600-i*60);return`${e?`${e.toString().padStart(2,"0")}:`:""}${i.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`},Fn=()=>{const{t:r,locale:e}=$e.useI18n(),i=t.computed(()=>[{label:r("meeting.meetingTypeAll"),value:Be.ALL,icon:dv},{label:r("meeting.meetingTypeMeet"),value:Be.MEETING,icon:Il,color:ao.meeting,zIndex:3},{label:r("meeting.meetingTypeEvents"),value:Be.EVENTS,icon:Al,color:ao.events,zIndex:2},{label:r("meeting.meetingTypeSummit"),value:Be.SUMMIT,icon:bh,color:ao.summit,zIndex:1}]),n=t.computed(()=>[{label:r("meeting.day0"),value:mn,max:7},{label:r("meeting.week0"),value:vn,max:2},{label:r("meeting.month0"),value:tn,max:1}]),s=t.computed(()=>[{label:r("meeting.day"),value:mn,max:7},{label:r("meeting.week"),value:vn,max:2},{label:r("meeting.month"),value:tn,max:1}]),a=t.computed(()=>[r("meeting.sunday"),r("meeting.monday"),r("meeting.tuesday"),r("meeting.wednesday"),r("meeting.thursday"),r("meeting.friday"),r("meeting.saturday")]),o=t.computed(()=>{const g=[];for(let S=1;S<=7;S++){const T=S%7;g.push({value:T,label:a.value[T]})}return g});return{t:r,locale:e,meetingTabs:i,cycleTypeOptions0:n,cycleTypeOptions:s,weekDay:a,intervalWeekOptions:o,getPointStr:(g,S)=>g===vn?S.sort((T,b)=>{const y=o.value.findIndex(N=>N.value===T),x=o.value.findIndex(N=>N.value===b);return y-x}).map(T=>{const b=o.value.find(y=>y.value===T);return(b==null?void 0:b.label)||String(T)}).join(r("meeting.cycleSplit")):g===tn?S.join(r("meeting.cycleSplit")):"",getConfig:(g,S)=>{let T=g;const b=i.value.find(y=>y.value===T);return(b==null?void 0:b[S])||""},getPlatformLabel:g=>{switch(g){case"WELINK":return"WeLink";case"ZOOM":return"Zoom";case"TENCENT":return e.value==="zh"?"腾讯会议":"Tencent";default:return g}},getWeekFromDate:g=>a.value[ye(g).day()]}},gy={class:"o-meeting-detail"},vy={class:"label"},yy={key:2},_y={key:3,class:"value"},Ty={key:0,class:"extra"},by={class:"label"},Cy=t.defineComponent({__name:"OMeetingDetail",props:{data:{},from:{},show:{type:Boolean},page:{}},setup(r,{expose:e}){const i=r,{t:n,getPlatformLabel:s}=Fn(),a=t.computed(()=>[{label:n("meeting.meetingDetail"),key:"agenda",ellipsis:!0},{label:n("meeting.meetingCreator"),key:"sponsor"},{label:n("meeting.meetingDate2"),key:"timeRange",extra:"date"},{label:n("meeting.meetingId"),key:"mid"},{label:n("meeting.meetingPlatform"),key:"platform"},{label:n("meeting.meetingLink"),key:"join_url",isLink:!0},{label:n("meeting.meetingEtherpad"),key:"etherpad",isLink:!0},{label:n("meeting.meetingReplay"),key:"replay_url",isLink:!0}].slice(0,i.from==="my"?7:8)),o=t.computed(()=>{var T;const S=!!((T=i.data.live_url)!=null&&T.length);return[{label:n("meeting.activityDetail2"),key:"agenda",ellipsis:!0},{label:n("meeting.startDate"),key:"start_date_time"},{label:n("meeting.endDate"),key:"end_date_time"},{label:n("meeting.registrationDeadline"),key:"register_end_date"},{label:n(S?"meeting.livePlatform":"meeting.activityAddress"),key:S?"live_url":"address"},{label:n("meeting.activityDetailUrl"),key:"content_url",isLink:!0},{label:n("meeting.activityApprover"),key:"approver"},{label:n("meeting.reviewNotesLabel"),key:"approve_record",isRecord:!0}].slice(0,i.from==="home"?5:8)}),l=t.computed(()=>{var T;const S=!!((T=i.data.live_url)!=null&&T.length);return[{label:n("meeting.activityType"),key:"activity_type",isType:!0},{label:n(S?"meeting.livePlatform":"meeting.activityAddress"),key:S?"live_url":"address"},{label:n("meeting.startDate"),key:"start_date_time"},{label:n("meeting.endDate"),key:"end_date_time"},{label:n("meeting.registrationDeadline"),key:"register_end_date"},{label:n("meeting.registrationUrl"),key:"register_url",isLink:!0},{label:n("meeting.activityDetailUrl"),key:"content_url",isLink:!0},{label:n("meeting.activityApprover"),key:"approver"},{label:n("meeting.reviewNotesLabel"),key:"approve_record",isRecord:!0}]}),c=S=>i.data[S],d=t.computed(()=>i.data.type===Be.EVENTS?i.page===Be.APPROVAL?l.value:o.value:i.data.type===Be.SUMMIT?o.value:a.value),m=t.ref([]);return e({copyInfo:()=>{try{let S=`${n("meeting.meetingTopic")+i.data.topic}
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),A=require("@opensig/opendesign"),It=require("@opendesign-plus/composables"),Ue=require("./chunk-OElCookieNotice.cjs.js"),fi=require("@vueuse/core"),rt=require("element-plus"),Ym=t.defineComponent({__name:"ContentWrapper",props:{verticalPadding:{type:[Boolean,String,Array],default:void 0}},setup(r){const e=Symbol("default"),i=r,n=t.computed(()=>i.verticalPadding?A.isBoolean(i.verticalPadding)?e:A.isString(i.verticalPadding)?i.verticalPadding:i.verticalPadding[0]:0),s=t.computed(()=>i.verticalPadding?A.isBoolean(i.verticalPadding)?e:A.isString(i.verticalPadding)?i.verticalPadding:A.isUndefined(i.verticalPadding[1])?i.verticalPadding[0]:i.verticalPadding[1]:0);return(a,o)=>(t.openBlock(),t.createElementBlock("div",{class:"content-wrapper",style:t.normalizeStyle({"--content-wrapper-vertical-paddingTop":n.value===t.unref(e)?void 0:n.value,"--content-wrapper-vertical-paddingBottom":s.value===t.unref(e)?void 0:s.value})},[t.renderSlot(a.$slots,"default",{},void 0,!0)],4))}}),gn=Ue._export_sfc(Ym,[["__scopeId","data-v-0b8705aa"]]),Xm={key:0},Km={class:"banner-content"},Qm=["src"],Zm={key:1,class:"banner-title"},Jm={key:2,class:"banner-subtitle"},eg={key:4,class:"banner-opts"},tg=t.defineComponent({__name:"OBanner",props:{options:{default:void 0},size:{default:"large"},contentJustifyCenter:{type:Boolean,default:!1}},setup(r){const e=r,{isLight:i}=It.useTheme("opendesignplus",document.domain||"localhost"),{isPhone:n}=It.useScreen(),s=t.computed(()=>e.options),a=t.ref(""),o=c=>{setTimeout(()=>{a.value=s.value[c].bg_theme??"light"},100)},l=(c,d)=>{c&&!d&&window.open(c)};return(c,d)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["home-banner",r.size])},[r.size==="tiny"?(t.openBlock(),t.createElementBlock("div",Xm,t.toDisplayString(s.value[1].title),1)):t.unref(n)?t.unref(n)?(t.openBlock(),t.createBlock(t.unref(A.OCarousel),{key:2,class:"banner-carousel",effect:"gallery","indicator-click":"","data-o-theme":a.value,arrow:"never","auto-play":!0,onBeforeChange:o},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(m,g)=>(t.openBlock(),t.createBlock(t.unref(A.OCarouselItem),{class:t.normalizeClass(["banner-item",`banner-item${g}`]),key:g},{default:t.withCtx(()=>[t.createVNode(gn,{class:"banner-wrapper"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OFigure),{class:"banner-bg",src:m.bg,onClick:S=>l(m.href)},null,8,["src","onClick"])]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:1},8,["data-o-theme"])):t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(A.OCarousel),{key:1,class:"banner-carousel",effect:"toggle","active-class":"current-slide","indicator-click":"","auto-play":!0,"data-o-theme":a.value,onBeforeChange:o},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(m,g)=>(t.openBlock(),t.createBlock(t.unref(A.OCarouselItem),{key:g,class:t.normalizeClass(["banner-item",`banner-item${g}`])},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OFigure),{class:t.normalizeClass(["banner-bg",{"with-sticky-bg":m.withStickyBg,"in-dark":!t.unref(i),"cursor-pointer":m.href&&!m.btn}]),src:m.bg,style:t.normalizeStyle({"--pad-offset":m.pad_offset}),onClick:S=>l(m.href,m.btn)},{default:t.withCtx(()=>[t.createVNode(gn,{class:t.normalizeClass(["banner-wrapper",["banner-wrapper",r.contentJustifyCenter?"content-center":""]])},{default:t.withCtx(()=>[t.createElementVNode("div",Km,[!t.unref(n)&&m.attach?(t.openBlock(),t.createElementBlock("img",{key:0,src:m.attach,class:"banner-attach"},null,8,Qm)):t.createCommentVNode("",!0),m.title?(t.openBlock(),t.createElementBlock("div",Zm,t.toDisplayString(m.title),1)):t.createCommentVNode("",!0),m.subtitle?(t.openBlock(),t.createElementBlock("div",Jm,t.toDisplayString(m.subtitle),1)):t.createCommentVNode("",!0),m.bg_text?(t.openBlock(),t.createElementBlock("div",{key:3,class:"banner-text",style:t.normalizeStyle({backgroundImage:`url(${m.bg_text})`,"--pc-width":m.pc_text_width,"--pc-height":m.pc_text_height,"--pad-width":m.pad_text_width,"--pad-height":m.pad_text_height})},null,4)):t.createCommentVNode("",!0),m.btn?(t.openBlock(),t.createElementBlock("div",eg,[t.createVNode(t.unref(A.OButton),{href:m.href,target:"_blank",variant:"solid",color:"primary",size:r.size},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.btn),1)]),_:2},1032,["href","size"])])):t.createCommentVNode("",!0)])]),_:2},1032,["class"])]),_:2},1032,["src","class","style","onClick"])]),_:2},1032,["class"]))),128))]),_:1},8,["data-o-theme"]))],2))}}),lh=Ue._export_sfc(tg,[["__scopeId","data-v-e2541e9a"]]),ig={class:"cookie-notice-content"},ng=["type"],rg={class:"cookie-title"},sg={style:{transform:"rotate(180deg)"},xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"24",height:"24",viewBox:"0 0 24 24"},ag={class:"cookie-zh-title",style:{"margin-top":"0"}},og=["href"],lg={key:1,class:"cookie-en-title"},ug={key:0,class:"cookie-en-content"},cg={class:"cookie-en-desc"},dg=["href"],hg={class:"cookie-notice-right"},fg={class:"cookie-dlg-title"},pg={class:"cookie-dlg-content"},mg={class:"content-item"},gg={class:"item-header"},vg={class:"item-title"},yg={class:"item-extra"},_g={class:"item-detail"},Tg={class:"content-item"},bg={class:"item-header"},Cg={class:"item-title"},xg={class:"item-extra"},Sg={class:"item-detail"},Eg="0",ic="1",kg="2",Ls="3",wg="agreed-cookiepolicy-zh",Dg="agreed-cookiepolicy-en",Ag=t.defineComponent({__name:"OCookieNotice",props:{visible:{type:Boolean},community:{},detailUrl:{},wrapper:{},cookieDomain:{}},emits:["update:visible"],setup(r,{expose:e,emit:i}){const n=r,s=i,{lePadV:a,leLaptop:o,isPhone:l}=It.useScreen(),{locale:c,t:d}=Ue.useI18n(),m=t.computed(()=>c.value==="zh"),g=t.ref(),S=t.computed(()=>g.value?!!getComputedStyle(g.value).getPropertyValue("--grid-content-width"):!1),T=t.computed(()=>m.value?wg:Dg),b=t.ref(!1),y=fi.useVModel(n,"visible",s,{defaultValue:!1}),x=j=>{const L=document.cookie.split(";").find(V=>V.split("=")[0].trim()===encodeURIComponent(j));return L?decodeURIComponent(L.split("=")[1]):null},N=(j,L,V,M)=>{const q=`; max-age=${V*24*60*60}`;document.cookie=`${encodeURIComponent(j)}=${encodeURIComponent(L)}${q}; path=/; domain=${M}`},I=(j,L)=>{document.cookie=`${encodeURIComponent(j)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${L}`},D=j=>{typeof j=="boolean"?y.value=j:y.value=!y.value,t.nextTick(()=>{!y.value&&m.value&&x(T.value)!==Ls&&N(T.value,Ls,180,n.cookieDomain??location.hostname)})},z=t.ref(!1),H=j=>{typeof j=="boolean"?z.value=j:z.value=!z.value},U=()=>m.value?x(T.value)!==Ls:(x(T.value)??"0")===Eg,B=()=>m.value?x(T.value)===Ls:x(T.value)===ic;t.onMounted(()=>{U()&&D(!0)}),t.watch(c,()=>{D(U())});const G=()=>{b.value=!0,I(T.value,n.cookieDomain??location.hostname),N(T.value,ic,180,n.cookieDomain??location.hostname),D(!1)},C=()=>{b.value=!1,I(T.value,n.cookieDomain??location.hostname),N(T.value,kg,180,n.cookieDomain??location.hostname),D(!1)},k=t.computed(()=>l.value?[{id:"save",label:d("cookie.saveSetting"),variant:"text",onClick:()=>{b.value?G():C(),H(!1)}},{id:"allowAll",label:d("cookie.acceptAll"),variant:"text",onClick:()=>{b.value=!0,G(),H(!1)}}]:[{id:"save",color:"primary",label:d("cookie.saveSetting"),variant:"outline",size:"medium",round:"pill",onClick:()=>{b.value?G():C(),H(!1)}},{id:"allowAll",color:"primary",label:d("cookie.acceptAll"),variant:"outline",size:"medium",round:"pill",onClick:()=>{b.value=!0,G(),H(!1)}}]),O=j=>{j&&(b.value=B())};return e({check(){B()===y.value&&D()}}),(j,L)=>(t.openBlock(),t.createBlock(t.unref(Ue.ClientOnly),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.Teleport,{to:r.wrapper||"#app"},[t.unref(y)?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"cookieNoticeRef",ref:g,class:"cookie-notice"},[t.createElementVNode("div",ig,[t.createElementVNode("div",{type:t.unref(c),class:t.normalizeClass({"cookie-notice-wrap-grid":S.value,"cookie-notice-wrap":!S.value})},[t.createElementVNode("div",rg,[m.value?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(t.unref(A.OIcon),{style:{display:"inline-block","font-size":"24px","margin-right":"4px"}},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("svg",sg,[...L[4]||(L[4]=[t.createElementVNode("path",{fill:"#002fa7",d:"M21 12c0 4.971-4.029 9-9 9s-9-4.029-9-9c0-4.971 4.029-9 9-9s9 4.029 9 9z"},null,-1),t.createElementVNode("path",{fill:"#fff",d:"M12 9.4c0.552 0 1-0.448 1-1s-0.448-1-1-1c-0.552 0-1 0.448-1 1s0.448 1 1 1zM12.492 10.943c-0.042-0.233-0.246-0.41-0.492-0.41-0.276 0-0.5 0.224-0.5 0.5v5.5l0.008 0.090c0.042 0.233 0.246 0.41 0.492 0.41 0.276 0 0.5-0.224 0.5-0.5v-5.5l-0.008-0.090z"},null,-1)])]))]),_:1}),t.createElementVNode("p",ag,[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.desc"))+" ",1),t.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(t.unref(d)("cookie.about")),9,og)])],64)):(t.openBlock(),t.createElementBlock("p",lg,t.toDisplayString(t.unref(d)("cookie.title",[r.community])),1)),t.createVNode(t.unref(A.OIcon),{class:"cookie-notice-close",onClick:L[0]||(L[0]=V=>D(!1))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconClose))]),_:1})]),m.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ug,[t.createElementVNode("p",cg,[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.desc"))+" ",1),t.createElementVNode("a",{href:r.detailUrl,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(t.unref(d)("cookie.about")),9,dg),L[5]||(L[5]=t.createTextVNode(". ",-1))]),t.createElementVNode("div",hg,[t.createVNode(t.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:G},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.acceptAll")),1)]),_:1}),t.createVNode(t.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:C},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.rejectAll")),1)]),_:1}),t.createVNode(t.unref(A.OButton),{round:"pill",variant:"outline",color:"primary",onClick:L[1]||(L[1]=V=>H(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(d)("cookie.manage")),1)]),_:1})])]))],10,ng)]),t.createVNode(t.unref(A.ODialog),{visible:z.value,"onUpdate:visible":L[3]||(L[3]=V=>z.value=V),size:t.unref(o)?"medium":"large","phone-half-full":t.unref(a),"main-class":S.value?"o-cookie-notice-dlg-main":"",class:"cookie-dlg",actions:k.value,onChange:O,style:{"--dlg-radius":"4px"}},{header:t.withCtx(()=>[t.createElementVNode("span",fg,t.toDisplayString(t.unref(d)("cookie.manage")),1)]),default:t.withCtx(()=>[t.createElementVNode("div",pg,[t.createElementVNode("div",mg,[t.createElementVNode("div",gg,[t.createElementVNode("span",vg,t.toDisplayString(t.unref(d)("cookie.necessaryCookie")),1),t.createElementVNode("span",yg,t.toDisplayString(t.unref(d)("cookie.alwaysOn")),1)]),t.createElementVNode("div",_g,t.toDisplayString(t.unref(d)("cookie.necessaryCookieDetail")),1)]),t.createElementVNode("div",Tg,[t.createElementVNode("div",bg,[t.createElementVNode("span",Cg,t.toDisplayString(t.unref(d)("cookie.analyticalCookie")),1),t.createElementVNode("span",xg,[t.createVNode(t.unref(A.OSwitch),{modelValue:b.value,"onUpdate:modelValue":L[2]||(L[2]=V=>b.value=V)},null,8,["modelValue"])])]),t.createElementVNode("div",Sg,t.toDisplayString(t.unref(d)("cookie.analyticalCookieDetail")),1)])])]),_:1},8,["visible","size","phone-half-full","main-class","actions"])],512)):t.createCommentVNode("",!0)],8,["to"]))]),_:1}))}}),uh=Ue._export_sfc(Ag,[["__scopeId","data-v-18f3a4fa"]]),Ig={key:0,class:"atom"},Ng={class:"atom-text"},Og=["href"],Bg=["src"],Lg={key:0,class:"quick-nav"},Pg={class:"category-title"},Mg={class:"navs"},Rg=["href"],Vg={key:0,class:"friendship-link"},Fg={class:"friendship-link-title"},$g={class:"friendship-link-box"},Ug=["href"],zg={key:0,class:"footer-logo"},Hg=["src"],qg=["src"],jg=["href"],Gg={key:1,class:"footer-option"},Wg={class:"footer-option-item"},Yg=["href"],Xg={class:"license"},Kg={class:"copyright"},Qg={class:"filing"},Zg=["href"],Jg=["src"],e1={key:2,class:"footer-right"},t1={key:0,class:"code-box"},i1=["src"],n1={class:"code-layer"},r1=["src"],s1={class:"txt"},a1={class:"app-footer-pc"},o1={key:0,class:"footer-left"},l1=["href"],u1=["src"],c1={key:0,class:"footer-right"},d1=["href"],h1={class:"app-footer-mb"},f1={key:0,class:"links"},p1=["href"],m1={class:"copyright"},g1={key:0,class:"approval"},v1=["href"],y1=["src"],_1=t.defineComponent({__name:"OFooter",props:{simple:{default:!1},atom:{default:void 0},lang:{default:void 0},quickNav:{default:void 0},friendshipLink:{default:void 0},footerLogo:{default:void 0},footerOption:{default:void 0},qrcode:{default:void 0},footerBg:{default:void 0}},setup(r){const e=r;return(i,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([e.simple?"app-footer-simple":"app-footer"])},[e.simple?(t.openBlock(),t.createBlock(gn,{key:1},{default:t.withCtx(()=>[t.createElementVNode("div",a1,[i.$slots.left||e.footerOption?t.renderSlot(i.$slots,"left",{key:0},()=>[e.footerOption?(t.openBlock(),t.createElementBlock("div",o1,[t.createElementVNode("span",null,t.toDisplayString(e.footerOption[e.lang].copyright),1),t.createElementVNode("a",{class:"approval",href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(e.footerOption[e.lang].beianInfo1),9,l1),t.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,u1),t.createElementVNode("span",null,t.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0),i.$slots.right||e.footerOption?t.renderSlot(i.$slots,"right",{key:1},()=>[e.footerOption?(t.openBlock(),t.createElementBlock("div",c1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.footerOption[e.lang].link,(s,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:s.url},[t.createElementVNode("a",{target:"_blank",href:s.url,class:"link"},t.toDisplayString(s.name),9,d1),a!==e.footerOption[e.lang].link.length-1?(t.openBlock(),t.createBlock(t.unref(A.ODivider),{key:0,direction:"v"})):t.createCommentVNode("",!0)],64))),128))])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0)]),t.createElementVNode("div",h1,[i.$slots.right||e.footerOption?t.renderSlot(i.$slots,"right",{key:0},()=>[e.footerOption?(t.openBlock(),t.createElementBlock("div",f1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.footerOption[e.lang].link,(s,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:s.url},[t.createElementVNode("a",{target:"_blank",href:s.url,class:"link"},t.toDisplayString(s.name),9,p1),a!==e.footerOption[e.lang].link.length-1?(t.openBlock(),t.createBlock(t.unref(A.ODivider),{key:0,direction:"v"})):t.createCommentVNode("",!0)],64))),128))])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0),t.renderSlot(i.$slots,"copyright",{},()=>[t.createElementVNode("div",m1,t.toDisplayString(e.footerOption[e.lang].copyright),1)],!0),i.$slots.left||e.footerOption?t.renderSlot(i.$slots,"left",{key:1},()=>[e.footerOption?(t.openBlock(),t.createElementBlock("div",g1,[t.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(e.footerOption[e.lang].beianInfo1),9,v1),t.createElementVNode("img",{class:"police-img",src:e.footerOption[e.lang].policeIcon},null,8,y1),t.createElementVNode("span",null,t.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0)])]),_:3})):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[i.$slots.atom||e.atom?(t.openBlock(),t.createBlock(gn,{key:0},{default:t.withCtx(()=>[t.renderSlot(i.$slots,"atom",{},()=>[e.atom?(t.openBlock(),t.createElementBlock("div",Ig,[t.createElementVNode("p",Ng,t.toDisplayString(e.atom[e.lang].title),1),t.createElementVNode("a",{href:e.atom[e.lang].href,target:"_blank"},[t.createElementVNode("img",{src:e.atom[e.lang].img,class:"atom-logo",alt:""},null,8,Bg)],8,Og)])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.ODivider),{class:"atom-divider"})],!0)]),_:3})):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"footer-content",style:t.normalizeStyle({backgroundImage:`url(${e.footerBg})`})},[t.createVNode(gn,null,{default:t.withCtx(()=>[i.$slots.quickNav||e.quickNav?t.renderSlot(i.$slots,"quickNav",{key:0},()=>[e.quickNav?(t.openBlock(),t.createElementBlock("div",Lg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.quickNav[e.lang],s=>(t.openBlock(),t.createElementBlock("div",{key:s.title,class:"category"},[t.createElementVNode("div",Pg,t.toDisplayString(s.title),1),t.createElementVNode("ul",Mg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.list,a=>(t.openBlock(),t.createElementBlock("li",{key:a.title,class:"nav"},[t.createElementVNode("a",{href:a.link,target:"_blank",rel:"noopener noreferrer"},t.toDisplayString(a.title),9,Rg)]))),128))])]))),128))])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0),i.$slots.friendshipLink||e.friendshipLink?t.renderSlot(i.$slots,"friendshipLink",{key:1},()=>[e.friendshipLink?(t.openBlock(),t.createElementBlock("div",Vg,[t.createElementVNode("div",Fg,t.toDisplayString(e.friendshipLink.title[e.lang]),1),t.createElementVNode("div",$g,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.friendshipLink.link[e.lang],s=>(t.openBlock(),t.createElementBlock("a",{href:s.link,key:s.link,target:"_blank"},t.toDisplayString(s.title),9,Ug))),128))])])):t.createCommentVNode("",!0)],!0):t.createCommentVNode("",!0),t.renderSlot(i.$slots,"footer",{},()=>[t.createElementVNode("div",{class:t.normalizeClass(["inner",{"inner-en":e.lang==="en"}])},[e.footerLogo?(t.openBlock(),t.createElementBlock("div",zg,[t.createElementVNode("img",{class:"show-pc",src:e.footerLogo.logo,alt:""},null,8,Hg),t.createElementVNode("img",{class:"show-mo",src:e.footerLogo.logoMb,alt:""},null,8,qg),t.createElementVNode("p",null,[t.createElementVNode("a",{class:"email",href:`mailto:${e.footerLogo.email}`,target:"_blank"},t.toDisplayString(e.footerLogo.email),9,jg)])])):t.createCommentVNode("",!0),e.footerOption?(t.openBlock(),t.createElementBlock("div",Gg,[t.createElementVNode("div",Wg,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.footerOption[e.lang].link,(s,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:s.url},[t.createElementVNode("a",{target:"_blank",href:s.url},t.toDisplayString(s.name),9,Yg),a!==e.footerOption[e.lang].link.length-1?(t.openBlock(),t.createBlock(t.unref(A.ODivider),{key:0,style:{"--o-divider-bd-color":"var(--o-color-info3-inverse)","--o-divider-label-gap":"0 8px"},direction:"v"})):t.createCommentVNode("",!0)],64))),128))]),t.createElementVNode("p",Xg,[t.createElementVNode("span",null,t.toDisplayString(e.footerOption[e.lang].licenseText),1),t.createTextVNode(" "+t.toDisplayString(e.footerOption[e.lang].licenseInfo),1)]),t.createElementVNode("div",Kg,[t.createElementVNode("p",null,t.toDisplayString(e.footerOption[e.lang].copyright),1),t.createElementVNode("div",Qg,[t.createElementVNode("a",{href:e.footerOption[e.lang].beianLink,target:"_blank"},t.toDisplayString(e.footerOption[e.lang].beianInfo1),9,Zg),t.createElementVNode("img",{src:e.footerOption[e.lang].policeIcon,class:"filing-img"},null,8,Jg),t.createElementVNode("p",null,t.toDisplayString(e.footerOption[e.lang].beianInfo2),1)])])])):t.createCommentVNode("",!0),e.qrcode?(t.openBlock(),t.createElementBlock("div",e1,[e.lang==="zh"?(t.openBlock(),t.createElementBlock("div",t1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.qrcode,(s,a)=>(t.openBlock(),t.createElementBlock("div",{key:a,class:"code-pop"},[t.createElementVNode("img",{src:s.img,class:"code-img",alt:""},null,8,i1),t.createElementVNode("div",n1,[t.createElementVNode("img",{src:s.code,alt:""},null,8,r1),t.createElementVNode("p",s1,t.toDisplayString(s.label),1)])]))),128))])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],2)],!0)]),_:3})],4)],64))],2))}}),ch=Ue._export_sfc(_1,[["__scopeId","data-v-2ce6e57a"]]);function T1(r){const e=t.ref(""),i=t.ref(null),n=t.ref(""),s=t.ref(!1);let a=null;const o=x=>{var D,z,H,U;const N=(D=r.allowedImageTypes)==null?void 0:D.value,I=N&&N.length>0?N.includes(x.type):(z=x.type)==null?void 0:z.startsWith("image/");return!x.type||!I?((H=r.onValidationError)==null||H.call(r,"type",x),!1):r.maxImageSize.value>0&&x.size>r.maxImageSize.value?((U=r.onValidationError)==null||U.call(r,"size",x),!1):!0},l=()=>{if(e.value)try{URL.revokeObjectURL(e.value)}catch{}e.value="",i.value=null,n.value="",s.value=!1,a=null},c=x=>{if(!x){i.value||l();return}if(n.value!==x){if(e.value&&e.value.startsWith("blob:"))try{URL.revokeObjectURL(e.value)}catch{}n.value=x,e.value=x,i.value=null}},d=x=>{var I,D;if(!o(x))return;l(),i.value=x,e.value=URL.createObjectURL(x),(I=r.onUploadStart)==null||I.call(r,x);const N=(D=r.uploadImage)==null?void 0:D.value;N&&(s.value=!0,a=Promise.resolve().then(()=>N(x)).then(z=>{var H;z&&i.value===x&&(n.value=z,(H=r.onUploadSuccess)==null||H.call(r,z,x))}).catch(z=>{var H;(H=r.onUploadError)==null||H.call(r,z,x)}).finally(()=>{s.value=!1}))},m=x=>{var I;const N=(I=x.clipboardData)==null?void 0:I.items;if(N)for(let D=0;D<N.length;D++){const z=N[D];if(z.type.indexOf("image")!==-1){const H=z.getAsFile();H&&d(H);break}}},g=x=>{x.preventDefault(),x.stopPropagation()},S=x=>{var I,D;x.preventDefault(),x.stopPropagation();const N=(D=(I=x.dataTransfer)==null?void 0:I.files)==null?void 0:D[0];N&&N.type.indexOf("image")!==-1&&d(N)},T=x=>{var D;const N=x.target,I=(D=N.files)==null?void 0:D[0];I&&d(I),N&&(N.value="")},b=x=>{x&&(x.value="",x.click())},y=()=>a??Promise.resolve();return t.onBeforeUnmount(l),{previewUrl:e,file:i,uploadedUrl:n,isUploading:s,onPaste:m,onDrop:S,onDragOver:g,onFileChange:T,pickFile:b,handleImageFile:d,reset:l,setExternalUrl:c,awaitUpload:y}}const b1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function C1(r,e){return t.openBlock(),t.createElementBlock("svg",b1,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M13.215 0.524c-7.048 0-12.762 5.714-12.762 12.762s5.714 12.762 12.762 12.762c7.048 0 12.762-5.714 12.762-12.762s-5.714-12.762-12.762-12.762zM13.215 2.809c5.786 0 10.476 4.69 10.476 10.476s-4.69 10.476-10.476 10.476c-5.786 0-10.476-4.69-10.476-10.476s4.69-10.476 10.476-10.476z"},null,-1),t.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M23.33 23.22c0.446-0.447 1.169-0.448 1.616-0.002l4.771 4.759c0.447 0.446 0.448 1.169 0.002 1.616s-1.169 0.448-1.616 0.002l-4.771-4.759c-0.447-0.446-0.448-1.169-0.002-1.616z"},null,-1)])])}const dh={name:"components-icon-header-search",render:C1},x1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function S1(r,e){return t.openBlock(),t.createElementBlock("svg",x1,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M18.528 5.472c0.246 0.246 0.271 0.63 0.074 0.903l-0.074 0.087-5.54 5.538 0.006 0.006-0.989 0.989-0.006-0.006-5.538 5.54c-0.273 0.273-0.717 0.273-0.99 0-0.246-0.246-0.271-0.63-0.074-0.903l0.074-0.087 5.538-5.539-5.538-5.538-0.074-0.087c-0.197-0.274-0.172-0.657 0.074-0.903s0.63-0.271 0.903-0.074l0.087 0.074 5.538 5.539 5.539-5.539c0.273-0.273 0.717-0.273 0.99 0zM14.551 13.561l3.978 3.978 0.074 0.087c0.197 0.274 0.172 0.657-0.074 0.903s-0.63 0.271-0.903 0.074l-0.087-0.074-3.978-3.978c-0.273-0.273-0.273-0.717 0-0.99v0c0.273-0.273 0.717-0.273 0.99 0z"},null,-1)])])}const wl={name:"components-icon-close",render:S1},E1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function k1(r,e){return t.openBlock(),t.createElementBlock("svg",E1,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",d:"M19.724 4.238c1.105 0 2 0.895 2 2v6.772c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-0.816l-3.544 3.84c-0.248 0.268-0.661 0.301-0.948 0.075l-4.13-3.256-3.925 3.843c-0.249 0.243-0.632 0.264-0.904 0.064l-0.086-0.075c-0.27-0.276-0.266-0.72 0.011-0.99l4.365-4.273c0.251-0.246 0.647-0.267 0.923-0.050l4.104 3.235 4.134-4.478v-3.892c0-0.331-0.269-0.6-0.6-0.6h-15.45c-0.331 0-0.6 0.269-0.6 0.6v11.501c0 0.331 0.269 0.6 0.6 0.6h9.781c0.387 0 0.7 0.313 0.7 0.7s-0.313 0.7-0.7 0.7h-9.781c-1.105 0-2-0.895-2-2v-11.501c0-1.105 0.895-2 2-2h15.45zM9.532 8.878c0-0.695-0.579-1.259-1.294-1.259s-1.294 0.564-1.294 1.259c0 0.695 0.579 1.259 1.294 1.259s1.294-0.564 1.294-1.259zM16.561 18.645c-0.195-0.195-0.195-0.512 0-0.707l2.090-2.090c0.010-0.011 0.020-0.021 0.030-0.030l0.001-0.001c0.195-0.195 0.512-0.195 0.707 0l2.121 2.121c0.195 0.195 0.195 0.512 0 0.707s-0.512 0.195-0.707 0l-1.284-1.284v3.57c0 0.276-0.224 0.5-0.5 0.5s-0.5-0.224-0.5-0.5v-3.538l-1.251 1.251c-0.174 0.174-0.443 0.193-0.638 0.058l-0.069-0.058z"},null,-1)])])}const w1={name:"components-icon-image-upload",render:k1},D1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function A1(r,e){return t.openBlock(),t.createElementBlock("svg",D1,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"#6f6f75",d:"M22.5 12c0 5.799-4.701 10.5-10.5 10.5s-10.5-4.701-10.5-10.5c0-5.799 4.701-10.5 10.5-10.5s10.5 4.701 10.5 10.5z"},null,-1),t.createElementVNode("path",{fill:"#ffffff",d:"M15.3 7.631c0.274-0.197 0.657-0.172 0.903 0.074 0.273 0.273 0.273 0.717 0 0.99l-3.259 3.259 3.259 3.259c0.273 0.273 0.273 0.717 0 0.99-0.246 0.246-0.63 0.271-0.903 0.074l-0.087-0.074-3.259-3.259-3.259 3.259-0.087 0.074c-0.274 0.197-0.657 0.172-0.903-0.074-0.273-0.273-0.273-0.717 0-0.99l3.259-3.259-3.259-3.259c-0.273-0.273-0.273-0.717 0-0.99 0.246-0.246 0.63-0.271 0.903-0.074l0.087 0.074 3.259 3.259 3.259-3.259 0.087-0.074z"},null,-1)])])}const Xo={name:"components-icon-delete-hover",render:A1},I1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function N1(r,e){return t.openBlock(),t.createElementBlock("svg",I1,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M3.398 10.877c0-4.099 3.323-7.423 7.423-7.423s7.423 3.323 7.423 7.423c0 4.099-3.323 7.423-7.423 7.423s-7.423-3.323-7.423-7.423zM16.774 10.877c0-3.326-2.657-6.023-5.935-6.023s-5.935 2.696-5.935 6.023c0 3.326 2.657 6.023 5.935 6.023s5.935-2.696 5.935-6.023zM11.499 13.369c0 0.365-0.296 0.661-0.661 0.661s-0.661-0.296-0.661-0.661v-1.821h-1.775c-0.371 0-0.671-0.3-0.671-0.671s0.3-0.671 0.671-0.671h1.775v-1.821c0-0.365 0.296-0.661 0.661-0.661s0.661 0.296 0.661 0.661v1.821h1.775c0.371 0 0.671 0.3 0.671 0.671s-0.3 0.671-0.671 0.671h-1.775v1.821zM16.579 16.598c0.242-0.246 0.62-0.271 0.89-0.075l0.086 0.074 2.72 2.754c0.27 0.273 0.27 0.716 0.001 0.99-0.242 0.246-0.62 0.271-0.89 0.075l-0.086-0.074-2.72-2.754c-0.27-0.273-0.27-0.716-0.001-0.99z"},null,-1)])])}const nc={name:"components-icon-image-zoomin",render:N1},O1={class:"o-search-image-input-row"},B1={key:0,class:"o-search-image-input-thumb"},L1={key:0,class:"o-search-image-input-preview"},P1={class:"o-search-image-input-preview-wrapper"},M1={class:"o-search-image-input-preview-zoom"},R1=["accept"],V1=t.defineComponent({__name:"SearchImageInput",props:{modelValue:{default:""},imageUrl:{default:""},placeholder:{},imagePlaceholder:{},size:{default:"medium"},enableImageSearch:{type:Boolean,default:!1},uploadImage:{},maxImageSize:{default:10*1024*1024},imageUploadTooltip:{},expanded:{type:Boolean,default:!0},clearable:{type:Boolean,default:!0},showSuffix:{type:Boolean,default:!0},inlineThumbnail:{type:Boolean,default:!1},preview:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},allowedImageTypes:{default:()=>["image/jpeg","image/png","image/gif","image/webp"]}},emits:["update:modelValue","update:imageUrl","focus","blur","enter","clear","image-clear","image-upload-start","image-upload-success","image-upload-error","image-validate-error","preview-change"],setup(r,{expose:e,emit:i}){const n=r,s=i,{t:a}=Ue.useI18n(),o=t.computed(()=>n.uploadImage),l=t.computed(()=>n.maxImageSize),c=t.computed(()=>n.allowedImageTypes),d=t.computed(()=>(n.allowedImageTypes??[]).join(",")),m=T1({uploadImage:o,maxImageSize:l,allowedImageTypes:c,onUploadStart:O=>s("image-upload-start",O),onUploadSuccess:(O,j)=>{s("update:imageUrl",O),s("image-upload-success",O,j)},onUploadError:(O,j)=>s("image-upload-error",O,j),onValidationError:(O,j)=>s("image-validate-error",O,j)}),g=t.ref(),S=t.ref(),T=t.ref(null),b=t.computed({get:()=>n.modelValue,set:O=>s("update:modelValue",O)});t.watch(()=>n.imageUrl,O=>{m.setExternalUrl(O)},{immediate:!0});const y=t.computed(()=>!!m.previewUrl.value),x=t.computed(()=>y.value?n.imagePlaceholder??a("search.extendedPlaceholder"):n.placeholder??a("search.placeholder")),N=()=>{b.value="",y.value&&I(),s("clear")},I=()=>{m.reset(),s("update:imageUrl",""),s("image-clear")},D=()=>{m.pickFile(g.value),t.nextTick(()=>{var O,j;return(j=(O=S.value)==null?void 0:O.focus)==null?void 0:j.call(O)})},z=O=>{m.onFileChange(O),t.nextTick(()=>{var j,L;return(L=(j=S.value)==null?void 0:j.focus)==null?void 0:L.call(j)})},H=O=>{n.enableImageSearch&&m.onPaste(O)},U=O=>{n.enableImageSearch&&m.onDragOver(O)},B=O=>{n.enableImageSearch&&m.onDrop(O)},G=O=>{s("preview-change",O)},C=t.computed(()=>!!b.value||y.value);return e({focus:()=>{var O,j;return(j=(O=S.value)==null?void 0:O.focus)==null?void 0:j.call(O)},blur:()=>{var O,j;return(j=(O=S.value)==null?void 0:O.blur)==null?void 0:j.call(O)},awaitUpload:()=>m.awaitUpload(),getUploadedUrl:()=>m.uploadedUrl.value,getIsUploading:()=>m.isUploading.value,resetImage:()=>{m.reset(),s("update:imageUrl","")}}),(O,j)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["o-search-image-input",{"has-image":y.value,"is-expanded":r.expanded&&y.value}]),onDragover:U,onDrop:B},[t.createElementVNode("div",O1,[t.createVNode(t.unref(A.OInput),{ref_key:"inputRef",ref:S,modelValue:b.value,"onUpdate:modelValue":j[3]||(j[3]=L=>b.value=L),placeholder:x.value,size:r.size,disabled:r.disabled,class:"o-search-image-input-input",onPressEnter:j[4]||(j[4]=L=>s("enter")),onFocus:j[5]||(j[5]=L=>s("focus",L)),onBlur:j[6]||(j[6]=L=>s("blur",L)),onPaste:H},t.createSlots({prefix:t.withCtx(()=>[t.renderSlot(O.$slots,"prefix",{},()=>[t.createVNode(t.unref(A.OIcon),{class:"o-search-image-input-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(dh))]),_:1})],!0),r.inlineThumbnail&&y.value?(t.openBlock(),t.createElementBlock("div",B1,[t.createVNode(t.unref(A.OFigure),{src:t.unref(m).previewUrl.value,alt:"",class:"o-search-image-input-thumb-figure"},null,8,["src"]),t.createElementVNode("div",{class:"o-search-image-input-thumb-zoom",onMousedown:j[0]||(j[0]=t.withModifiers(()=>{},["prevent"]))},[t.createVNode(t.unref(A.OIcon),{class:"o-search-image-input-thumb-zoom-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(nc))]),_:1})],32),t.createVNode(t.unref(A.OIcon),{class:"o-search-image-input-thumb-remove",onMousedown:j[1]||(j[1]=t.withModifiers(()=>{},["prevent"])),onClick:t.withModifiers(I,["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(Xo))]),_:1})])):t.createCommentVNode("",!0)]),_:2},[r.showSuffix?{name:"suffix",fn:t.withCtx(()=>[t.renderSlot(O.$slots,"suffix",{hasValue:C.value},()=>[r.enableImageSearch?(t.openBlock(),t.createElementBlock("span",{key:0,ref_key:"uploadBtnRef",ref:T,class:"o-search-image-input-upload-btn"},[t.createVNode(t.unref(A.OIcon),{class:"o-search-image-input-icon upload",onClick:t.withModifiers(D,["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(w1))]),_:1})],512)):t.createCommentVNode("",!0),r.enableImageSearch&&T.value?(t.openBlock(),t.createBlock(t.unref(A.OPopover),{key:1,trigger:"hover",position:"bottom",target:T.value,"body-class":"o-search-image-input-tooltip"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.imageUploadTooltip??t.unref(a)("search.imageUploadTooltip")),1)]),_:1},8,["target"])):t.createCommentVNode("",!0),r.clearable&&C.value?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:2,class:"o-search-image-input-icon close",onMousedown:j[2]||(j[2]=t.withModifiers(()=>{},["prevent"])),onClick:t.withModifiers(N,["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(wl))]),_:1})):t.createCommentVNode("",!0)],!0)]),key:"0"}:void 0]),1032,["modelValue","placeholder","size","disabled"])]),r.expanded&&y.value?(t.openBlock(),t.createElementBlock("div",L1,[t.renderSlot(O.$slots,"preview",{previewUrl:t.unref(m).previewUrl.value,remove:I},()=>[t.createElementVNode("div",P1,[t.createVNode(t.unref(A.OFigure),{src:t.unref(m).previewUrl.value,preview:r.preview,alt:"",class:"o-search-image-input-preview-figure",onPreview:G},null,8,["src","preview"]),t.createElementVNode("div",M1,[t.createVNode(t.unref(A.OIcon),{class:"o-search-image-input-preview-zoom-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(nc))]),_:1})]),t.createVNode(t.unref(A.OIcon),{class:"o-search-image-input-preview-remove",onClick:t.withModifiers(I,["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(Xo))]),_:1})])],!0)])):t.createCommentVNode("",!0),r.enableImageSearch?(t.openBlock(),t.createElementBlock("input",{key:1,ref_key:"fileInputRef",ref:g,type:"file",accept:d.value,class:"o-search-image-input-file",onChange:z},null,40,R1)):t.createCommentVNode("",!0)],34))}}),hh=Ue._export_sfc(V1,[["__scopeId","data-v-39326311"]]),F1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function $1(r,e){return t.openBlock(),t.createElementBlock("svg",F1,[...e[0]||(e[0]=[t.createStaticVNode('<path opacity="0.8" fill="currentColor" d="M5.616 4.34c0.368 0 0.674 0.265 0.738 0.615l0.012 0.135v14.968c0 0.213 0.148 0.391 0.347 0.438l0.103 0.012h10.719c0.213 0 0.391-0.148 0.438-0.347l0.012-0.103v-11.712c0-0.414 0.336-0.75 0.75-0.75 0.368 0 0.674 0.265 0.738 0.615l0.012 0.135v11.712c0 1.010-0.767 1.84-1.751 1.94l-0.199 0.010h-10.719c-1.010 0-1.84-0.767-1.94-1.751l-0.010-0.199v-14.968c0-0.414 0.336-0.75 0.75-0.75z"></path><path opacity="0.8" fill="currentColor" d="M20.19 4.34c0.414 0 0.75 0.336 0.75 0.75 0 0.368-0.265 0.674-0.615 0.738l-0.135 0.012h-16.333c-0.414 0-0.75-0.336-0.75-0.75 0-0.368 0.265-0.674 0.615-0.738l0.135-0.012h16.333z"></path><path opacity="0.8" fill="currentColor" d="M14.256 1.936c0.414 0 0.75 0.336 0.75 0.75 0 0.368-0.265 0.674-0.615 0.738l-0.135 0.012h-4.535c-0.414 0-0.75-0.336-0.75-0.75 0-0.368 0.265-0.674 0.615-0.738l0.135-0.012h4.535z"></path><path opacity="0.8" fill="currentColor" d="M10.096 9.419c0.368 0 0.674 0.265 0.738 0.615l0.012 0.135v6.484c0 0.414-0.336 0.75-0.75 0.75-0.368 0-0.674-0.265-0.738-0.615l-0.012-0.135v-6.484c0-0.414 0.336-0.75 0.75-0.75z"></path><path opacity="0.8" fill="currentColor" d="M14.596 9.419c0.368 0 0.674 0.265 0.738 0.615l0.012 0.135v6.484c0 0.414-0.336 0.75-0.75 0.75-0.368 0-0.674-0.265-0.738-0.615l-0.012-0.135v-6.484c0-0.414 0.336-0.75 0.75-0.75z"></path>',5)])])}const U1={name:"components-icon-delete",render:$1},z1={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function H1(r,e){return t.openBlock(),t.createElementBlock("svg",z1,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M17.947 4.273c-1.676-1.292-3.752-2.023-5.948-2.023-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75c4.032 0 7.604-2.47 9.066-6.156 0.153-0.385-0.035-0.821-0.42-0.974s-0.821 0.036-0.974 0.42c-1.237 3.119-4.26 5.209-7.672 5.209-4.556 0-8.25-3.694-8.25-8.25s3.694-8.25 8.25-8.25c1.837 0 3.574 0.604 4.983 1.673l-1.305 1.556c-0.077 0.092-0.021 0.232 0.098 0.246l4.873 0.539c0.106 0.012 0.191-0.088 0.16-0.191l-1.377-4.706c-0.034-0.115-0.182-0.146-0.259-0.054l-1.226 1.461z"},null,-1)])])}const q1={name:"components-icon-refresh",render:H1},j1=/[.*+?^${}()|[\]\\]/g;function G1(r,e){const i=(e||"").trim();if(!i)return[{text:r,match:!1}];const n=i.replace(j1,"\\$&"),s=new RegExp(n,"gi"),a=[];let o=0,l;for(;(l=s.exec(r))!==null;){if(l.index===s.lastIndex){s.lastIndex++;continue}l.index>o&&a.push({text:r.slice(o,l.index),match:!1}),a.push({text:l[0],match:!0}),o=l.index+l[0].length}return o<r.length&&a.push({text:r.slice(o),match:!1}),a}const W1={class:"o-search-highlight-text"},Y1=t.defineComponent({__name:"HighlightText",props:{text:{},keyword:{},enabled:{type:Boolean,default:!0}},setup(r){const e=r,i=t.computed(()=>!e.enabled||!e.keyword?[{text:e.text,match:!1}]:G1(e.text,e.keyword));return(n,s)=>(t.openBlock(),t.createElementBlock("span",W1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,(a,o)=>(t.openBlock(),t.createElementBlock("span",{key:o,class:t.normalizeClass({"is-match":a.match})},t.toDisplayString(a.text),3))),128))]))}}),rc=Ue._export_sfc(Y1,[["__scopeId","data-v-2a99e23c"]]),X1={class:"o-search-panel"},K1={key:0,class:"o-search-panel-section o-search-panel-onestep"},Q1={class:"o-search-panel-section-title onestep"},Z1=["onClick"],J1={key:0,class:"o-search-panel-onestep-tag"},e2={key:1,class:"o-search-panel-divider"},t2={key:2,class:"o-search-panel-section o-search-panel-suggest"},i2={class:"o-search-panel-section-title suggest"},n2=["onClick"],r2={key:1,class:"o-search-panel-no-data"},s2={key:3,class:"o-search-panel-section o-search-panel-recommend"},a2=["onClick"],o2={key:4,class:"o-search-panel-section o-search-panel-history"},l2={class:"o-search-panel-common-header"},u2={class:"o-search-panel-section-title"},c2=["onClick"],d2={class:"o-search-panel-history-row-text"},h2={key:1,class:"o-search-panel-history-list"},f2=["onClick"],p2={class:"o-search-panel-history-text"},m2={key:5,class:"o-search-panel-divider"},g2={key:6,class:"o-search-panel-section o-search-panel-hot"},v2={class:"o-search-panel-common-header"},y2={class:"o-search-panel-section-title"},_2={class:"o-search-panel-hot-list"},T2=["onClick"],b2=t.defineComponent({__name:"SearchPanel",props:{keyword:{default:""},onestepItems:{default:()=>[]},onestepTitle:{},suggestItems:{default:()=>[]},suggestTitle:{},recommendItems:{default:()=>[]},historyItems:{default:()=>[]},historyTitle:{},hotItems:{default:()=>[]},hotTitle:{},noDataText:{},highlightKeyword:{type:Boolean,default:!0},hideOnKeyword:{type:Boolean,default:!1},showSuggestEmpty:{type:Boolean,default:!1},isDark:{type:Boolean,default:!1},historyLayout:{default:"chips"}},emits:["onestep-click","suggest-click","recommend-click","history-click","hot-click","history-remove","history-clear","hot-refresh"],setup(r,{emit:e}){const i=r,n=e,{t:s}=Ue.useI18n(),a=t.computed(()=>{var T;return!!((T=i.keyword)!=null&&T.trim())}),o=t.computed(()=>a.value&&i.onestepItems.length>0),l=t.computed(()=>a.value&&(i.suggestItems.length>0||i.showSuggestEmpty)),c=t.computed(()=>!a.value&&i.recommendItems.length>0),d=t.computed(()=>(!i.hideOnKeyword||!a.value)&&i.historyItems.length>0),m=t.computed(()=>(!i.hideOnKeyword||!a.value)&&i.hotItems.length>0),g=t.computed(()=>o.value&&l.value),S=t.computed(()=>d.value&&m.value);return(T,b)=>(t.openBlock(),t.createElementBlock("div",X1,[o.value?(t.openBlock(),t.createElementBlock("div",K1,[t.renderSlot(T.$slots,"onestep-header",{items:r.onestepItems},()=>[t.createElementVNode("div",Q1,t.toDisplayString(r.onestepTitle??t.unref(s)("search.onestep")),1)],!0),t.renderSlot(T.$slots,"onestep-content",{items:r.onestepItems,keyword:r.keyword},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.onestepItems,y=>(t.openBlock(),t.createElementBlock("div",{key:y.key+(y.path??""),class:"o-search-panel-item o-search-panel-onestep-item",onClick:x=>n("onestep-click",y)},[t.createVNode(rc,{text:y.key,keyword:r.keyword,enabled:r.highlightKeyword},null,8,["text","keyword","enabled"]),y.type?(t.openBlock(),t.createElementBlock("span",J1,t.toDisplayString(y.type),1)):t.createCommentVNode("",!0)],8,Z1))),128))],!0)])):t.createCommentVNode("",!0),g.value?(t.openBlock(),t.createElementBlock("div",e2)):t.createCommentVNode("",!0),l.value?(t.openBlock(),t.createElementBlock("div",t2,[t.renderSlot(T.$slots,"suggest-header",{items:r.suggestItems},()=>[t.createElementVNode("div",i2,t.toDisplayString(r.suggestTitle??t.unref(s)("search.suggest")),1)],!0),t.renderSlot(T.$slots,"suggest-content",{items:r.suggestItems,keyword:r.keyword},()=>[r.suggestItems.length?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.suggestItems,y=>(t.openBlock(),t.createElementBlock("div",{key:y.key,class:"o-search-panel-item",onClick:x=>n("suggest-click",y)},[t.createVNode(rc,{text:y.key,keyword:r.keyword,enabled:r.highlightKeyword},null,8,["text","keyword","enabled"])],8,n2))),128)):(t.openBlock(),t.createElementBlock("div",r2,t.toDisplayString(r.noDataText??t.unref(s)("search.noData")),1))],!0)])):t.createCommentVNode("",!0),c.value?(t.openBlock(),t.createElementBlock("div",s2,[t.renderSlot(T.$slots,"recommend-header",{items:r.recommendItems},void 0,!0),t.renderSlot(T.$slots,"recommend-content",{items:r.recommendItems},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.recommendItems,y=>(t.openBlock(),t.createElementBlock("div",{key:y,class:"o-search-panel-recommend-item",onClick:x=>n("recommend-click",y)},t.toDisplayString(y),9,a2))),128))],!0)])):t.createCommentVNode("",!0),d.value?(t.openBlock(),t.createElementBlock("div",o2,[t.renderSlot(T.$slots,"history-header",{items:r.historyItems},()=>[t.createElementVNode("div",l2,[t.createElementVNode("span",u2,t.toDisplayString(r.historyTitle??t.unref(s)("search.history")),1),r.historyLayout!=="list"?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0,class:"o-search-panel-icon",onClick:b[0]||(b[0]=t.withModifiers(y=>n("history-clear"),["stop"]))},{default:t.withCtx(()=>[t.createVNode(t.unref(U1))]),_:1})):t.createCommentVNode("",!0)])],!0),t.renderSlot(T.$slots,"history-content",{items:r.historyItems},()=>[r.historyLayout==="list"?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(r.historyItems,y=>(t.openBlock(),t.createElementBlock("div",{key:y,class:"o-search-panel-history-row",onClick:x=>n("history-click",y)},[t.createElementVNode("span",d2,t.toDisplayString(y),1)],8,c2))),128)):(t.openBlock(),t.createElementBlock("div",h2,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.historyItems,y=>(t.openBlock(),t.createElementBlock("div",{key:y,class:t.normalizeClass(["o-search-panel-history-item",{"is-dark":r.isDark}]),onClick:x=>n("history-click",y)},[t.createElementVNode("span",p2,t.toDisplayString(y),1),t.createVNode(t.unref(A.OIcon),{class:"o-search-panel-history-remove",onClick:t.withModifiers(x=>n("history-remove",y),["stop"])},{default:t.withCtx(()=>[t.createVNode(t.unref(Xo))]),_:1},8,["onClick"])],10,f2))),128))]))],!0)])):t.createCommentVNode("",!0),S.value?(t.openBlock(),t.createElementBlock("div",m2)):t.createCommentVNode("",!0),m.value?(t.openBlock(),t.createElementBlock("div",g2,[t.renderSlot(T.$slots,"hot-header",{items:r.hotItems},()=>[t.createElementVNode("div",v2,[t.createElementVNode("div",y2,t.toDisplayString(r.hotTitle??t.unref(s)("search.hot")),1),t.createVNode(t.unref(A.OIcon),{class:"o-search-panel-icon",onClick:b[1]||(b[1]=t.withModifiers(y=>n("hot-refresh"),["stop"]))},{default:t.withCtx(()=>[t.createVNode(t.unref(q1))]),_:1})])],!0),t.renderSlot(T.$slots,"hot-content",{items:r.hotItems},()=>[t.createElementVNode("div",_2,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.hotItems,y=>(t.openBlock(),t.createElementBlock("div",{key:y,class:"o-search-panel-hot-item",onClick:x=>n("hot-click",y)},t.toDisplayString(y),9,T2))),128))])],!0)])):t.createCommentVNode("",!0)]))}}),fh=Ue._export_sfc(b2,[["__scopeId","data-v-8f91e5e0"]]);function ph(r){const{initial:e,storageKey:i,storeHistory:n,maxHistoryCount:s,onChange:a}=r,o=t.ref([...e.value]),l=()=>{if(!(!n.value||typeof localStorage>"u"))try{o.value.length?localStorage.setItem(i.value,JSON.stringify(o.value)):localStorage.removeItem(i.value)}catch{}},c=T=>{o.value=T,l(),a==null||a(o.value)},d=()=>{if(!(!n.value||typeof localStorage>"u"))try{const T=localStorage.getItem(i.value);if(!T)return;const b=JSON.parse(T);if(Array.isArray(b)&&b.length){const y=Array.from(new Set([...b,...o.value]));o.value=y.slice(0,s.value),a==null||a(o.value)}}catch{}},m=T=>{const b=T==null?void 0:T.trim();if(!b)return;const y=[b,...o.value.filter(x=>x!==b)];y.length>s.value&&(y.length=s.value),c(y)},g=T=>{c(o.value.filter(b=>b!==T))},S=()=>{c([])};return t.watch(e,T=>{T!==o.value&&(o.value=[...T])}),t.onMounted(d),{items:o,push:m,remove:g,clearAll:S}}const C2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"36",height:"32",viewBox:"0 0 36 32"};function x2(r,e){return t.openBlock(),t.createElementBlock("svg",C2,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M5.886 19.111l10.672 10.677c0.46 0.524 0.44 1.322-0.060 1.822s-1.298 0.52-1.822 0.060l-0.064-0.060-12.498-12.498h3.772zM14.613 0.391c0.521-0.521 1.365-0.521 1.886 0 0.5 0.5 0.52 1.298 0.060 1.822l-0.060 0.064-12.391 12.391h29.67c0.71 0 1.291 0.555 1.331 1.255l0.002 0.078c0 0.71-0.555 1.291-1.255 1.331l-0.078 0.002h-31.816c-0.472 0-0.924-0.187-1.257-0.521-0.671-0.671-0.694-1.745-0.067-2.443l0.067-0.071 13.908-13.908z"},null,-1)])])}const S2={name:"components-icon-header-back",render:x2},E2={key:0,class:"o-header-search-drawer"},k2=t.defineComponent({__name:"OHeaderSearch",props:{modelValue:{default:""},placeholder:{},expandedPlaceholder:{},expandDirection:{default:"left"},clearable:{type:Boolean,default:!0},historyItems:{default:()=>[]},maxHistoryCount:{default:6},storeHistory:{type:Boolean,default:!1},historyTitle:{},storageKey:{default:"search-history"},hotItems:{default:()=>[]},hotTitle:{},recommendItems:{default:()=>[]},searchUrl:{},searchUrlOpenBlank:{type:Boolean,default:!0},searchTextMobile:{},imagePlaceholder:{},enableImageSearch:{type:Boolean,default:!1},imageUrl:{default:""},uploadImage:{},maxImageSize:{default:10*1024*1024},imageUploadTooltip:{},suggestItems:{default:()=>[]},onestepItems:{default:()=>[]},suggestTitle:{},onestepTitle:{},noDataText:{},highlightKeyword:{type:Boolean,default:!0},debounce:{default:300},autoSaveHistory:{type:Boolean,default:!0},showSuggestEmpty:{type:Boolean,default:!0},allowedImageTypes:{},mobile:{type:Boolean}},emits:["update:modelValue","update:historyItems","update:imageUrl","focus","blur","input","clear","search","recommend-click","onestep-click","history-click","hot-click","hot-refresh","delete-history","delete-history-item","image-upload-start","image-upload-success","image-upload-error","image-validate-error"],setup(r,{expose:e,emit:i}){const n=r,s=i,{lePadV:a}=It.useScreen(),{t:o}=Ue.useI18n(),l=t.computed(()=>n.mobile===!0||a.value),c=t.ref(null),d=t.ref(),m=t.ref(!1),g=t.ref(!1),S=t.ref(""),T=t.computed(()=>!!n.imageUrl||g.value),b=t.computed({get:()=>n.modelValue,set:Z=>s("update:modelValue",Z)}),y=t.toRef(n,"historyItems"),x=t.toRef(n,"storageKey"),N=t.toRef(n,"storeHistory"),I=t.toRef(n,"maxHistoryCount"),D=ph({initial:y,storageKey:x,storeHistory:N,maxHistoryCount:I,onChange:Z=>s("update:historyItems",Z)}),z=t.computed(()=>n.imageUrl?n.imagePlaceholder??o("search.extendedPlaceholder"):m.value&&n.enableImageSearch?n.imagePlaceholder??o("search.imagePlaceholder"):m.value?n.expandedPlaceholder??o("search.expandedPlaceholder"):n.placeholder??o("search.placeholder")),H=fi.useDebounceFn(Z=>s("input",Z),()=>n.debounce);t.watch(b,Z=>H(Z)),fi.onClickOutside(c,()=>{l.value||B()});const U=()=>{m.value=!0},B=()=>{l.value||(m.value=!1)},G=()=>{U(),s("focus")},C=()=>{s("blur")},k=async()=>{var _e,ke,De,Ne,Ve,et,Re,Ke;(ke=(_e=d.value)==null?void 0:_e.getIsUploading)!=null&&ke.call(_e)&&await((Ne=(De=d.value).awaitUpload)==null?void 0:Ne.call(De));const Z=b.value.trim(),se=S.value||((et=(Ve=d.value)==null?void 0:Ve.getUploadedUrl)==null?void 0:et.call(Ve))||n.imageUrl;if(!(!Z&&!se)&&(n.autoSaveHistory&&Z&&D.push(Z),s("search",{keyword:Z,imageUrl:se||void 0}),(Ke=(Re=d.value)==null?void 0:Re.blur)==null||Ke.call(Re),m.value=!1,n.searchUrl)){const He=new URLSearchParams;Z&&He.set("q",Z),se&&He.set("imageUrl",se);const Fe=n.searchUrl.includes("?")?"&":"?",We=`${n.searchUrl}${Fe}${He.toString()}`;typeof window<"u"&&window.open(We,n.searchUrlOpenBlank?"_blank":"_self","noopener,noreferrer")}},O=()=>{var Z,se;b.value="",s("clear"),(se=(Z=d.value)==null?void 0:Z.focus)==null||se.call(Z)},j=Z=>{s("recommend-click",Z),b.value=Z.key,k()},L=Z=>{s("recommend-click",Z),b.value=Z,k()},V=Z=>{s("onestep-click",Z),Z.path&&typeof window<"u"&&window.open(Z.path,"_blank","noopener,noreferrer")},M=Z=>{s("history-click",Z)},q=Z=>{s("hot-click",Z)},$=Z=>{D.remove(Z),s("delete-history-item",Z)},X=()=>{const Z=[...D.items.value];D.clearAll(),s("delete-history",Z)},R=()=>{b.value="",g.value=!1,s("update:imageUrl",""),m.value=!1},ee=Z=>{g.value=!0,S.value="",s("image-upload-start",Z)},ue=(Z,se)=>{S.value=Z,s("update:imageUrl",Z),s("image-upload-success",Z,se)},J=()=>{g.value=!1,S.value="",s("update:imageUrl","")},oe=t.computed(()=>!(!m.value||T.value));return e({focus:()=>{var Z,se;return(se=(Z=d.value)==null?void 0:Z.focus)==null?void 0:se.call(Z)},blur:()=>{var Z,se;return(se=(Z=d.value)==null?void 0:Z.blur)==null?void 0:se.call(Z)},open:U,close:B,search:k}),(Z,se)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["o-header-search",{"is-mobile-mode":l.value}])},[t.createElementVNode("div",{ref_key:"wrapperRef",ref:c,class:t.normalizeClass(["o-header-search-pos",{"is-pc":!l.value,"is-mobile":l.value,"is-left":r.expandDirection==="left","is-right":r.expandDirection==="right","is-focus":m.value}])},[t.createElementVNode("div",{class:t.normalizeClass(["o-header-search-row",{"is-focus":m.value}])},[l.value&&m.value?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0,class:"o-header-search-back-icon",onClick:R},{default:t.withCtx(()=>[t.createVNode(t.unref(S2))]),_:1})):t.createCommentVNode("",!0),t.createVNode(hh,{ref_key:"inputRef",ref:d,modelValue:b.value,"onUpdate:modelValue":se[0]||(se[0]=_e=>b.value=_e),"image-url":r.imageUrl,placeholder:z.value,"enable-image-search":r.enableImageSearch,"upload-image":r.uploadImage,"max-image-size":r.maxImageSize,"image-upload-tooltip":r.imageUploadTooltip,clearable:r.clearable&&m.value,expanded:m.value&&T.value,"allowed-image-types":r.allowedImageTypes,size:"medium",class:t.normalizeClass(["o-header-search-input",{"is-collapsed":!m.value}]),"onUpdate:imageUrl":se[1]||(se[1]=_e=>s("update:imageUrl",_e)),onFocus:G,onBlur:C,onEnter:k,onClear:O,onImageClear:J,onImageUploadStart:ee,onImageUploadSuccess:ue,onImageUploadError:se[2]||(se[2]=(_e,ke)=>s("image-upload-error",_e,ke)),onImageValidateError:se[3]||(se[3]=(_e,ke)=>s("image-validate-error",_e,ke))},t.createSlots({prefix:t.withCtx(()=>[t.renderSlot(Z.$slots,"input-prefix",{},void 0,!0)]),suffix:t.withCtx(_e=>[t.renderSlot(Z.$slots,"input-suffix",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),_:2},[Z.$slots["image-preview"]?{name:"preview",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"image-preview",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","image-url","placeholder","enable-image-search","upload-image","max-image-size","image-upload-tooltip","clearable","expanded","allowed-image-types","class"]),l.value&&m.value?(t.openBlock(),t.createElementBlock("span",{key:1,class:"o-header-search-text",onClick:k},t.toDisplayString(r.searchTextMobile??t.unref(o)("search")),1)):t.createCommentVNode("",!0)],2),t.createVNode(t.Transition,{name:"o-header-search-drawer"},{default:t.withCtx(()=>[oe.value?(t.openBlock(),t.createElementBlock("div",E2,[t.renderSlot(Z.$slots,"drawer",{recommendItems:r.recommendItems,historyItems:t.unref(D).items.value,hotItems:r.hotItems,suggestItems:r.suggestItems,onestepItems:r.onestepItems,keyword:r.modelValue},()=>[t.createVNode(fh,{keyword:r.modelValue,"onestep-items":r.onestepItems,"onestep-title":r.onestepTitle,"suggest-items":r.suggestItems,"suggest-title":r.suggestTitle,"recommend-items":r.recommendItems,"history-items":t.unref(D).items.value,"history-title":r.historyTitle,"hot-items":r.hotItems,"hot-title":r.hotTitle,"no-data-text":r.noDataText,"highlight-keyword":r.highlightKeyword,"hide-on-keyword":!0,"show-suggest-empty":r.showSuggestEmpty,onOnestepClick:V,onSuggestClick:j,onRecommendClick:L,onHistoryClick:M,onHistoryRemove:$,onHistoryClear:X,onHotClick:q,onHotRefresh:se[4]||(se[4]=_e=>s("hot-refresh"))},t.createSlots({_:2},[Z.$slots["recommend-header"]?{name:"recommend-header",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"recommend-header",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"0"}:void 0,Z.$slots["recommend-content"]?{name:"recommend-content",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"recommend-content",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"1"}:void 0,Z.$slots["onestep-header"]?{name:"onestep-header",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"onestep-header",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"2"}:void 0,Z.$slots["onestep-content"]?{name:"onestep-content",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"onestep-content",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"3"}:void 0,Z.$slots["suggest-header"]?{name:"suggest-header",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"suggest-header",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"4"}:void 0,Z.$slots["suggest-content"]?{name:"suggest-content",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"suggest-content",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"5"}:void 0,Z.$slots["history-header"]?{name:"history-header",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"history-header",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"6"}:void 0,Z.$slots["history-content"]?{name:"history-content",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"history-content",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"7"}:void 0,Z.$slots["hot-header"]?{name:"hot-header",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"hot-header",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"8"}:void 0,Z.$slots["hot-content"]?{name:"hot-content",fn:t.withCtx(_e=>[t.renderSlot(Z.$slots,"hot-content",t.normalizeProps(t.guardReactiveProps(_e)),void 0,!0)]),key:"9"}:void 0]),1032,["keyword","onestep-items","onestep-title","suggest-items","suggest-title","recommend-items","history-items","history-title","hot-items","hot-title","no-data-text","highlight-keyword","show-suggest-empty"])],!0)])):t.createCommentVNode("",!0)]),_:3})],2),l.value?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0,class:"o-header-search-mobile-icon",onClick:U},{default:t.withCtx(()=>[t.createVNode(t.unref(dh))]),_:1})):t.createCommentVNode("",!0)],2))}}),mh=Ue._export_sfc(k2,[["__scopeId","data-v-e8d71b2f"]]),w2=["src"],D2=t.defineComponent({__name:"AppAvatar",props:{avatar:{type:String,default:""},name:{type:String,default:"",required:!0},size:{type:String,default:"medium"},customSize:{type:Number,default:0},variant:{type:String,default:"round"}},setup(r){const e=r,i=["#058EF0","#FA7305","#03B5A5"],n=t.computed(()=>{var a;return(a=e.name)==null?void 0:a.charAt(0).toUpperCase()}),s=t.computed(()=>{var l;const a={"background-color":"",width:"32px",height:"32px","font-size":"20px"};a["background-color"]=e.name?i[((l=e.name)==null?void 0:l.length)%i.length]:"transparent";let o=0;return e.customSize?o=Number(e.customSize):o={mini:16,small:24,medium:40,large:64}[e.size],a.height=`${o}px`,a.width=`${o}px`,a["font-size"]=`${o/2}px`,a});return(a,o)=>r.avatar&&!r.avatar.includes("gitcode")?(t.openBlock(),t.createElementBlock("img",{key:0,src:r.avatar,class:t.normalizeClass(["img-avatar",r.variant]),style:t.normalizeStyle(s.value),alt:""},null,14,w2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["word-avatar",r.variant]),style:t.normalizeStyle(s.value)},t.toDisplayString(n.value),7))}}),A2=Ue._export_sfc(D2,[["__scopeId","data-v-340348ce"]]),I2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function N2(r,e){return t.openBlock(),t.createElementBlock("svg",I2,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M9.412 10.332c0 2.188 1.066 4.127 2.708 5.326-4.858 1.582-8.364 6.052-8.364 11.328 0 0.515 0.418 0.933 0.933 0.933s0.933-0.418 0.933-0.933c0-5.465 4.487-9.922 10.092-10.070 0.095 0.004 0.191 0.006 0.288 0.006 3.639 0 6.59-2.95 6.59-6.59s-2.951-6.59-6.59-6.59-6.59 2.95-6.59 6.59zM16.088 15.049c-0.028-0.003-0.057-0.004-0.087-0.004-0.061 0-0.122 0-0.183 0.001-2.524-0.096-4.541-2.172-4.541-4.72 0-2.608 2.115-4.723 4.723-4.723s4.723 2.115 4.723 4.723c0 2.579-2.067 4.676-4.635 4.722zM21.784 16.465c3.945 2.064 6.463 6.077 6.463 10.528 0 0.515-0.418 0.933-0.933 0.933s-0.933-0.418-0.933-0.933c0-3.744-2.123-7.127-5.462-8.874-0.457-0.239-0.633-0.803-0.394-1.26s0.803-0.633 1.26-0.394z"},null,-1)])])}const O2={name:"components-icon-avatar-line",render:N2},B2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function L2(r,e){return t.openBlock(),t.createElementBlock("svg",B2,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M5.759 8.873c0.251-0.251 0.644-0.271 0.918-0.063l0.072 0.063 5.016 5.016c0.1 0.1 0.254 0.115 0.37 0.043l0.054-0.043 5.062-5.062c0.273-0.273 0.717-0.273 0.99 0 0.251 0.251 0.271 0.644 0.063 0.918l-0.063 0.072-5.062 5.062c-0.629 0.629-1.628 0.662-2.296 0.099l-0.108-0.099-5.016-5.016c-0.273-0.273-0.273-0.717 0-0.99z"},null,-1)])])}const Dl={name:"components-icon-chevron-down",render:L2},P2={class:"header-user"},M2={key:0,class:"user-info"},R2={class:"info-wrap hover-icon-rotate"},V2={class:"user-account"},F2={key:1},$2=t.defineComponent({__name:"OHeaderUser",props:{token:{default:void 0},lang:{default:void 0},noticeTotal:{default:void 0},userInfo:{default:void 0},options:{default:void 0},customSize:{default:void 0}},emits:["login","logout"],setup(r,{emit:e}){const{lePadV:i}=It.useScreen(),n=e,s=()=>{n("login")},a=o=>{o!=null&&o.logout?n("logout"):window.open(o.url,o.target)};return(o,l)=>(t.openBlock(),t.createElementBlock("div",P2,[r.token?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0,onClick:s,class:"avatar-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(O2))]),_:1})),t.createVNode(t.Transition,{name:"header-user-zoom-in"},{default:t.withCtx(()=>[r.token?(t.openBlock(),t.createElementBlock("div",M2,[t.createVNode(t.unref(A.ODropdown),{trigger:t.unref(i)?"click":"hover",optionPosition:t.unref(i)?"br":"bottom","option-wrap-class":`user-dropdown ${r.lang==="en"?"is-en":""}`},{dropdown:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.options,c=>(t.openBlock(),t.createBlock(t.unref(A.ODropdownItem),{key:c.label,style:{"--dropdown-item-justify":"center"},onClick:d=>a(c)},{default:t.withCtx(()=>[c!=null&&c.total?(t.openBlock(),t.createBlock(t.unref(A.OBadge),{key:0,value:c.total,color:"danger",class:t.normalizeClass(["header-message message",{"notice-not":!c.total}])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.label),1)]),_:2},1032,["value","class"])):(t.openBlock(),t.createElementBlock("span",F2,t.toDisplayString(c.label),1))]),_:2},1032,["onClick"]))),128))]),default:t.withCtx(()=>[t.createElementVNode("div",R2,[t.createVNode(t.unref(A.OBadge),{value:r.noticeTotal,dot:!0,color:"danger",class:t.normalizeClass(["header-message user-avatar",{"notice-not":!r.noticeTotal}])},{default:t.withCtx(()=>[t.createVNode(A2,{avatar:r.userInfo.photo,name:r.userInfo.username,"custom-size":r.customSize},null,8,["avatar","name","custom-size"])]),_:1},8,["value","class"]),t.createElementVNode("p",V2,t.toDisplayString(r.userInfo.username),1),t.createVNode(t.unref(A.OIcon),{class:"icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Dl))]),_:1})])]),_:1},8,["trigger","optionPosition","option-wrap-class"])])):t.createCommentVNode("",!0)]),_:1})]))}}),gh=Ue._export_sfc($2,[["__scopeId","data-v-517067a4"]]),U2={locale:"zh-CN","common.more":"更多","common.empty":"暂无数据","common.loading":"加载中...","common.checkAll":"全选","common.filter":"筛选","common.confirm":"确认","common.reset":"重置","common.search":"搜索","pagination.goto":"前往","pagination.page":"页","pagination.countPerPage":"条/页","pagination.total":"共 {0} 条","upload.buttonLabel":"点击上传","upload.drag":"点击或拖拽文件到此处上传","upload.dragHover":"释放文件并开始上传","upload.retry":"点击重试","upload.delete":"删除","upload.preview":"预览","upload.edit":"编辑","upload.loading":"上传中","upload.failed":"上传失败","upload.download":"下载文件","select.cancel":"取消","select.confirm":"确定","input.limit":"<b>{0}</b>/{1}","table.filterEmptyOption":"空","table.filterPlaceholder":"请输入搜索内容"},z2={locale:"en-US","common.more":"more","common.empty":"No Data","common.loading":"Loading...","common.checkAll":"Check All","common.filter":"Filter","common.confirm":"Confirm","common.reset":"Reset","common.search":"Search","pagination.goto":"Go to","pagination.page":"Page","pagination.countPerPage":"/page","pagination.total":"Total: {0}","upload.buttonLabel":"Upload","upload.drag":"Click or drag file to this area to upload","upload.dragHover":"Release to upload","upload.retry":"Click to retry","upload.delete":"Delete","upload.preview":"Preview","upload.edit":"Edit","upload.loading":"Uploading","upload.failed":"Upload failed","upload.download":"Download the file","select.cancel":"Cancel","select.confirm":"Ok","input.limit":"<b>{0}</b>/{1}","table.filterEmptyOption":"empty","table.filterPlaceholder":"Enter keywords"},vh=t.defineComponent({__name:"OPlusConfigProvider",props:{locale:{},theme:{default:"light"}},setup(r){const e=r,i=t.reactive({locale:t.computed(()=>e.locale),theme:t.computed(()=>e.theme)});return t.provide(Ue.configProviderInjectKey,i),(n,s)=>(t.openBlock(),t.createBlock(t.unref(A.OConfigProvider),{locale:r.locale==="zh"?t.unref(U2):t.unref(z2)},{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},8,["locale"]))}}),H2={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function q2(r,e){return t.openBlock(),t.createElementBlock("svg",H2,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M9.246 5.764c-0.251 0.251-0.271 0.644-0.063 0.918l0.063 0.072 5.016 5.016c0.1 0.1 0.115 0.254 0.043 0.37l-0.043 0.054-5.062 5.062c-0.273 0.273-0.273 0.717 0 0.99 0.251 0.251 0.644 0.271 0.918 0.063l0.072-0.063 5.062-5.062c0.629-0.629 0.662-1.628 0.099-2.296l-0.099-0.108-5.016-5.016c-0.273-0.273-0.717-0.273-0.99 0z"},null,-1)])])}const jr={name:"components-icon-chevron-right",render:q2},j2={class:"section-wrapper"},G2={key:1,class:"section-title"},W2={key:2,class:"section-subtitle"},Y2={key:1,class:"section-body"},X2={key:2,class:"section-footer"},K2=t.defineComponent({__name:"OSection",props:{title:{default:void 0},subtitle:{default:void 0},full:{type:Boolean,default:!1},headerJustifyCenter:{type:Boolean,default:!0},footer:{default:void 0},footerHref:{default:void 0}},setup(r){const e=r;return(i,n)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["app-section",{"is-full":e.full}])},[t.createElementVNode("div",j2,[t.renderSlot(i.$slots,"main",{},()=>[i.$slots.header||e.title||e.subtitle?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["section-header",{"is-left":!e.headerJustifyCenter}])},[t.renderSlot(i.$slots,"header",{},()=>[t.unref(A.isArray)(e.title)?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.title,s=>(t.openBlock(),t.createElementBlock("h2",{key:s,class:"section-title"},t.toDisplayString(s),1))),128)):i.$slots.title||e.title?(t.openBlock(),t.createElementBlock("h2",G2,[t.renderSlot(i.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(e.title),1)],!0)])):t.createCommentVNode("",!0),i.$slots.subtitle||e.subtitle?(t.openBlock(),t.createElementBlock("p",W2,[t.renderSlot(i.$slots,"subtitle",{},()=>[t.createTextVNode(t.toDisplayString(e.subtitle),1)],!0)])):t.createCommentVNode("",!0)],!0)],2)):t.createCommentVNode("",!0),i.$slots.default?(t.openBlock(),t.createElementBlock("div",Y2,[t.renderSlot(i.$slots,"default",{},void 0,!0)])):t.createCommentVNode("",!0),i.$slots.footer||e.footer?(t.openBlock(),t.createElementBlock("div",X2,[t.renderSlot(i.$slots,"footer",{},()=>[t.createVNode(t.unref(A.OLink),{href:e.footerHref,target:"_blank"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),{class:"footer-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.footer)+" ",1)]),_:1},8,["href"])],!0)])):t.createCommentVNode("",!0)],!0)])],2))}}),yh=Ue._export_sfc(K2,[["__scopeId","data-v-0c0e1f78"]]),Q2={class:"source-code"},Z2={class:"title"},J2={class:"info-wrap hover-icon-rotate"},ev={class:"title"},tv=t.defineComponent({__name:"OSourceCode",props:{title:{},options:{},href:{},target:{},icon:{},justify:{default:"center"}},setup(r){const e=s=>{window.open(s.href,s.target?s.target:"_blank")},i=t.ref(!1),n=s=>{i.value=s};return(s,a)=>(t.openBlock(),t.createElementBlock("div",Q2,[r.href?(t.openBlock(),t.createElementBlock("div",{key:0,class:"info-wrap",onClick:a[0]||(a[0]=o=>e({href:r.href,target:r.target}))},[t.createElementVNode("span",Z2,t.toDisplayString(r.title),1),r.icon?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.icon),{class:"icon"}))]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createBlock(t.unref(A.ODropdown),{key:1,trigger:"hover",optionPosition:"bottom","option-wrap-class":"dropdown",class:t.normalizeClass({"dropdown-active":i.value}),onVisibleChange:n},{dropdown:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.options,o=>(t.openBlock(),t.createBlock(t.unref(A.ODropdownItem),{onClick:l=>e(o),key:o.href,class:"list",style:t.normalizeStyle({"--dropdown-item-justify":r.justify})},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.label)+" ",1),o.icon?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.icon),{class:"icon"}))]),_:2},1024)):t.createCommentVNode("",!0)]),_:2},1032,["onClick","style"]))),128))]),default:t.withCtx(()=>[t.createElementVNode("div",J2,[t.createElementVNode("span",ev,t.toDisplayString(r.title),1),t.createVNode(t.unref(A.OIcon),{class:"icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Dl))]),_:1})])]),_:1},8,["class"]))]))}}),_h=Ue._export_sfc(tv,[["__scopeId","data-v-865d32e7"]]),iv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function nv(r,e){return t.openBlock(),t.createElementBlock("svg",iv,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M12 1.992c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7zM6.769 6.747c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.136 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM18.192 6.747c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM5.3 12c0-3.7 3-6.7 6.7-6.7s6.7 3 6.7 6.7-3 6.7-6.7 6.7c-3.7 0-6.7-3-6.7-6.7zM17.3 12c0-2.927-2.373-5.3-5.3-5.3s-5.3 2.373-5.3 5.3c0 2.927 2.373 5.3 5.3 5.3s5.3-2.373 5.3-5.3zM4.594 11.969c0 0.387-0.313 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.386 0 0.7 0.313 0.7 0.7zM21.977 11.999c0 0.387-0.314 0.7-0.7 0.7h-1.2c-0.387 0-0.7-0.313-0.7-0.7s0.313-0.7 0.7-0.7h1.2c0.387 0 0.7 0.313 0.7 0.7zM5.921 19.060c-0.273 0.273-0.717 0.273-0.99 0-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495l0.849-0.849c0.273-0.273 0.717-0.273 0.99 0 0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495l-0.849 0.849zM19.041 19.060c-0.273 0.273-0.717 0.273-0.99 0l-0.849-0.849c-0.137-0.137-0.205-0.316-0.205-0.495s0.068-0.358 0.205-0.495c0.273-0.273 0.717-0.273 0.99 0l0.849 0.849c0.137 0.137 0.205 0.316 0.205 0.495s-0.068 0.358-0.205 0.495zM11.971 19.376c0.387 0 0.7 0.313 0.7 0.7v1.2c0 0.387-0.313 0.7-0.7 0.7s-0.7-0.313-0.7-0.7v-1.2c0-0.387 0.313-0.7 0.7-0.7z"},null,-1)])])}const ro={name:"components-icon-sun",render:nv},rv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function sv(r,e){return t.openBlock(),t.createElementBlock("svg",rv,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"currentColor",d:"M12 2.3c5.357 0 9.7 4.343 9.7 9.7s-4.343 9.7-9.7 9.7c-4.651 0-8.622-3.298-9.515-7.806-0.101-0.509 0.369-0.948 0.87-0.812 0.531 0.144 1.082 0.218 1.645 0.218 3.479 0 6.3-2.82 6.3-6.3 0-1.276-0.379-2.494-1.079-3.527-0.291-0.43-0.029-1.016 0.486-1.086 0.425-0.057 0.857-0.086 1.293-0.086zM12 3.7l-0.042 0.001 0.058 0.121c0.402 0.887 0.634 1.85 0.677 2.845l0.007 0.333c0 4.253-3.447 7.7-7.7 7.7-0.229 0-0.457-0.010-0.682-0.030l-0.186-0.021 0.076 0.218c1.147 3.123 4.102 5.321 7.528 5.429l0.264 0.004c4.584 0 8.3-3.716 8.3-8.3s-3.716-8.3-8.3-8.3z"},null,-1)])])}const so={name:"components-icon-moon",render:sv},av={class:"o-theme-switcher"},ov={key:1,class:"o-theme-switcher-mobile"},lv=t.defineComponent({__name:"OThemeSwitcher",props:{theme:{default:"light"},type:{default:"auto"},lightValue:{default:"light"},darkValue:{default:"dark"},lightIcon:{default:ro},darkIcon:{default:so}},emits:["update:theme","change"],setup(r,{emit:e}){const i=r,n=e,{gtPhone:s}=It.useScreen(),a=t.computed({get(){return i.theme},set(c){n("update:theme",c),n("change",c)}}),o=t.computed(()=>i.type==="common"||i.type==="auto"&&s.value),l=()=>{a.value=a.value===i.lightValue?i.darkValue:i.lightValue};return(c,d)=>(t.openBlock(),t.createElementBlock("div",av,[o.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"o-theme-switcher-common",onClick:l},[t.createVNode(t.unref(A.OIcon),{class:"o-theme-icon"},{default:t.withCtx(()=>[a.value===r.lightValue?(t.openBlock(),t.createBlock(t.unref(so),{key:0})):(t.openBlock(),t.createBlock(t.unref(ro),{key:1}))]),_:1})])):(t.openBlock(),t.createElementBlock("div",ov,[t.createVNode(t.unref(A.OSwitch),{modelValue:a.value,"onUpdate:modelValue":d[0]||(d[0]=m=>a.value=m),class:"o-theme-switch","checked-value":r.darkValue,"unchecked-value":r.lightValue},{on:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),{class:"o-theme-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(ro))]),_:1})]),off:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),{class:"o-theme-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(so))]),_:1})]),_:1},8,["modelValue","checked-value","unchecked-value"])]))]))}}),Th=Ue._export_sfc(lv,[["__scopeId","data-v-9aaa2610"]]),sc=/^https?:\/\/\S+/;var Be=(r=>(r.ALL="all",r.MEETING="meeting",r.EVENTS="events",r.SUMMIT="summit",r.APPROVAL="approval",r))(Be||{}),vi=(r=>(r.SIG="sig",r.GROUP="group",r))(vi||{});const uv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function cv(r,e){return t.openBlock(),t.createElementBlock("svg",uv,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M10 14.267c-0.413 0-0.817-0.043-1.211-0.131h-0.001c-0.329-0.073-0.652-0.176-0.968-0.31-0.318-0.135-0.618-0.295-0.902-0.482-0.314-0.207-0.607-0.446-0.878-0.718s-0.511-0.564-0.718-0.878c-0.187-0.283-0.348-0.584-0.482-0.902-0.134-0.316-0.237-0.639-0.31-0.968v0c-0.087-0.394-0.131-0.798-0.131-1.211s0.044-0.817 0.131-1.212v0c0.073-0.33 0.176-0.652 0.31-0.968 0.134-0.318 0.295-0.618 0.482-0.902v0c0.207-0.314 0.446-0.607 0.718-0.878s0.564-0.511 0.878-0.718c0.283-0.187 0.584-0.347 0.902-0.482 0.316-0.134 0.639-0.237 0.968-0.31v0c0.394-0.087 0.798-0.131 1.211-0.131s0.817 0.044 1.212 0.131v0c0.33 0.073 0.652 0.176 0.968 0.31 0.318 0.134 0.618 0.295 0.902 0.482 0.314 0.207 0.607 0.446 0.878 0.718s0.511 0.564 0.718 0.878v0c0.187 0.283 0.347 0.584 0.482 0.902 0.134 0.316 0.237 0.639 0.31 0.968v0.001c0.087 0.394 0.131 0.798 0.131 1.211v4.667c0 0.129-0.023 0.248-0.068 0.358v0c-0.046 0.11-0.114 0.21-0.205 0.302s-0.192 0.159-0.302 0.205v0c-0.11 0.046-0.229 0.068-0.358 0.068h-4.667zM16.4 13.333c0 0.129 0.023 0.248 0.068 0.358s0.114 0.211 0.205 0.302c0.091 0.091 0.192 0.159 0.302 0.205v0c0.11 0.046 0.229 0.068 0.358 0.068h4.667c0.413 0 0.817-0.044 1.212-0.131v0c0.329-0.073 0.652-0.176 0.968-0.31 0.318-0.134 0.618-0.295 0.902-0.482 0.314-0.207 0.607-0.446 0.878-0.718s0.511-0.564 0.718-0.878v0c0.187-0.283 0.347-0.584 0.482-0.902 0.134-0.316 0.237-0.639 0.31-0.968v0c0.087-0.394 0.131-0.798 0.131-1.211s-0.044-0.817-0.131-1.212c-0.073-0.33-0.176-0.652-0.31-0.968-0.134-0.318-0.295-0.618-0.482-0.902v0c-0.207-0.314-0.447-0.607-0.718-0.878s-0.564-0.511-0.878-0.718c-0.283-0.187-0.584-0.347-0.902-0.482-0.316-0.134-0.639-0.237-0.968-0.31-0.394-0.087-0.798-0.131-1.212-0.131s-0.817 0.044-1.212 0.131c-0.33 0.073-0.652 0.176-0.968 0.31-0.318 0.134-0.618 0.295-0.902 0.482-0.314 0.207-0.607 0.446-0.878 0.718s-0.511 0.564-0.718 0.878c-0.187 0.283-0.348 0.584-0.482 0.902-0.134 0.316-0.237 0.639-0.31 0.968-0.087 0.394-0.131 0.798-0.131 1.212v4.667zM22 12.4h-3.733v-3.733c0-0.287 0.031-0.568 0.094-0.84 0.048-0.208 0.114-0.413 0.199-0.612 0.087-0.206 0.191-0.401 0.311-0.586 0.14-0.215 0.303-0.416 0.489-0.601s0.386-0.349 0.601-0.489l0.001-0.001c0.184-0.12 0.379-0.224 0.585-0.311 0.2-0.085 0.404-0.151 0.612-0.199 0.273-0.063 0.553-0.094 0.84-0.094s0.567 0.031 0.84 0.094c0.208 0.048 0.413 0.114 0.613 0.199 0.206 0.087 0.401 0.191 0.586 0.311 0.215 0.14 0.416 0.304 0.601 0.489s0.349 0.386 0.489 0.601c0.12 0.184 0.224 0.38 0.311 0.586 0.085 0.2 0.151 0.404 0.199 0.612 0.063 0.273 0.094 0.553 0.094 0.84s-0.031 0.568-0.094 0.84c-0.048 0.208-0.114 0.413-0.199 0.612-0.087 0.206-0.191 0.401-0.311 0.586v0c-0.14 0.215-0.303 0.416-0.489 0.601s-0.386 0.349-0.601 0.489c-0.184 0.12-0.38 0.224-0.586 0.311-0.2 0.085-0.404 0.151-0.613 0.199h-0.001c-0.273 0.063-0.552 0.094-0.84 0.094zM13.733 12.4v-3.733c0-0.287-0.031-0.568-0.094-0.84-0.048-0.208-0.114-0.413-0.199-0.612-0.087-0.206-0.191-0.401-0.311-0.586-0.14-0.215-0.303-0.416-0.489-0.601s-0.386-0.349-0.601-0.489c-0.184-0.12-0.38-0.224-0.586-0.311-0.2-0.085-0.404-0.151-0.612-0.199-0.273-0.063-0.553-0.094-0.841-0.094s-0.567 0.031-0.84 0.094c-0.208 0.048-0.413 0.114-0.612 0.199-0.206 0.087-0.401 0.191-0.586 0.311v0c-0.215 0.14-0.416 0.303-0.601 0.489s-0.349 0.386-0.489 0.601v0c-0.12 0.184-0.224 0.38-0.311 0.586-0.085 0.2-0.151 0.404-0.199 0.612-0.063 0.273-0.094 0.553-0.094 0.84s0.031 0.568 0.094 0.84c0.048 0.208 0.114 0.413 0.199 0.612 0.087 0.206 0.191 0.401 0.311 0.586 0.14 0.215 0.304 0.416 0.489 0.601s0.386 0.349 0.601 0.489c0.184 0.12 0.38 0.224 0.586 0.311 0.2 0.085 0.404 0.151 0.612 0.199v0c0.273 0.063 0.553 0.094 0.84 0.094h3.733zM16.4 16c0-0.258 0.091-0.478 0.273-0.66 0.091-0.091 0.192-0.159 0.302-0.205s0.229-0.068 0.358-0.068h4.667c0.414 0 0.817 0.044 1.212 0.131 0.329 0.073 0.652 0.176 0.968 0.31 0.318 0.134 0.618 0.295 0.902 0.482 0.314 0.207 0.607 0.446 0.878 0.718s0.511 0.564 0.718 0.878c0.187 0.283 0.347 0.584 0.482 0.902 0.134 0.316 0.237 0.639 0.31 0.968 0.087 0.394 0.131 0.798 0.131 1.212s-0.044 0.817-0.131 1.212c-0.073 0.33-0.176 0.652-0.31 0.968-0.134 0.318-0.295 0.618-0.482 0.902-0.207 0.314-0.447 0.607-0.718 0.878s-0.564 0.511-0.878 0.718c-0.283 0.187-0.584 0.347-0.902 0.482-0.316 0.134-0.639 0.237-0.968 0.31-0.394 0.087-0.798 0.131-1.212 0.131s-0.817-0.044-1.212-0.131c-0.33-0.073-0.652-0.176-0.968-0.31-0.318-0.134-0.618-0.295-0.902-0.482-0.314-0.207-0.607-0.446-0.878-0.718s-0.511-0.564-0.718-0.878c-0.187-0.283-0.348-0.584-0.482-0.902-0.134-0.316-0.237-0.639-0.31-0.968v0c-0.087-0.394-0.131-0.798-0.131-1.212v-4.667zM10 15.067c-0.413 0-0.817 0.044-1.212 0.131v0c-0.329 0.073-0.652 0.176-0.968 0.31-0.318 0.134-0.618 0.295-0.902 0.482-0.314 0.207-0.607 0.446-0.878 0.718s-0.511 0.564-0.718 0.878c-0.187 0.283-0.348 0.584-0.482 0.901-0.134 0.316-0.237 0.639-0.31 0.968-0.087 0.394-0.131 0.798-0.131 1.212s0.044 0.817 0.131 1.212c0.073 0.329 0.176 0.652 0.31 0.968 0.134 0.318 0.295 0.618 0.482 0.902v0c0.207 0.314 0.446 0.607 0.718 0.878s0.564 0.511 0.878 0.718c0.283 0.187 0.584 0.347 0.902 0.482 0.316 0.134 0.639 0.237 0.968 0.31 0.394 0.087 0.798 0.131 1.212 0.131s0.817-0.044 1.212-0.131v0c0.33-0.073 0.652-0.176 0.968-0.31 0.318-0.134 0.618-0.295 0.902-0.482 0.314-0.207 0.607-0.446 0.878-0.718s0.511-0.564 0.718-0.878v0c0.187-0.283 0.347-0.584 0.482-0.902 0.134-0.316 0.237-0.639 0.31-0.968 0.087-0.394 0.131-0.798 0.131-1.212v-4.667c0-0.258-0.091-0.478-0.273-0.66-0.091-0.091-0.192-0.159-0.302-0.205s-0.229-0.068-0.358-0.068h-4.667zM13.733 16.933v3.733c0 0.287-0.031 0.567-0.094 0.84-0.048 0.208-0.114 0.413-0.199 0.612-0.087 0.206-0.191 0.401-0.311 0.585v0c-0.14 0.215-0.303 0.416-0.489 0.601s-0.386 0.349-0.601 0.489c-0.184 0.12-0.38 0.224-0.586 0.311-0.2 0.085-0.404 0.151-0.612 0.199-0.273 0.063-0.553 0.094-0.841 0.094s-0.567-0.031-0.84-0.094h-0.001c-0.208-0.048-0.412-0.114-0.612-0.199-0.206-0.087-0.401-0.191-0.586-0.311v0c-0.215-0.14-0.416-0.303-0.601-0.489s-0.349-0.386-0.489-0.601c-0.12-0.184-0.224-0.38-0.311-0.586-0.085-0.2-0.151-0.404-0.199-0.612-0.063-0.273-0.094-0.553-0.094-0.84s0.031-0.568 0.094-0.841c0.048-0.208 0.114-0.412 0.199-0.612 0.087-0.206 0.191-0.401 0.311-0.586 0.14-0.215 0.304-0.416 0.489-0.601s0.386-0.349 0.601-0.489c0.184-0.12 0.38-0.224 0.586-0.311 0.2-0.085 0.404-0.151 0.612-0.199h0.001c0.273-0.063 0.553-0.094 0.84-0.094h3.733zM22 16.933h-3.733v3.733c0 0.287 0.031 0.567 0.094 0.84 0.048 0.208 0.114 0.413 0.199 0.612 0.087 0.206 0.191 0.401 0.311 0.586 0.14 0.215 0.303 0.416 0.489 0.601s0.386 0.349 0.601 0.489c0.184 0.12 0.379 0.224 0.586 0.311 0.2 0.085 0.404 0.151 0.612 0.199 0.273 0.063 0.553 0.094 0.84 0.094s0.567-0.031 0.84-0.094c0.208-0.048 0.413-0.114 0.613-0.199 0.206-0.087 0.401-0.191 0.586-0.311 0.215-0.141 0.416-0.304 0.601-0.489s0.349-0.386 0.489-0.601c0.12-0.184 0.224-0.38 0.311-0.586 0.085-0.2 0.151-0.404 0.199-0.612 0.063-0.273 0.094-0.553 0.094-0.84s-0.031-0.568-0.094-0.841c-0.048-0.208-0.114-0.412-0.199-0.612-0.087-0.206-0.191-0.401-0.311-0.586-0.141-0.215-0.304-0.416-0.489-0.601s-0.386-0.349-0.601-0.489c-0.184-0.12-0.38-0.224-0.586-0.311-0.2-0.085-0.404-0.151-0.613-0.199-0.273-0.063-0.553-0.094-0.84-0.094z"},null,-1)])])}const dv={name:"meeting-icon-all",render:cv},hv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function fv(r,e){return t.openBlock(),t.createElementBlock("svg",hv,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M25.088 14.216l-0.852 0.781c-0.385 0.353-0.411 0.933-0.058 1.319s0.933 0.411 1.319 0.058l2.116-1.938c0.193-0.177 0.349-0.374 0.467-0.591 0.092-0.17 0.162-0.351 0.208-0.546 0.045-0.189 0.067-0.378 0.063-0.566-0.004-0.222-0.041-0.444-0.112-0.665s-0.17-0.423-0.297-0.605c-0.107-0.155-0.235-0.295-0.382-0.422-0.151-0.13-0.314-0.237-0.488-0.321-0.223-0.107-0.464-0.176-0.724-0.207l-5.601-0.661c-0.031-0.012-0.159-0.053-0.187-0.073-0.021-0.026-0.113-0.124-0.128-0.155l-2.377-5.087c-0.11-0.235-0.25-0.441-0.42-0.618v0c-0.133-0.138-0.285-0.259-0.454-0.362-0.165-0.1-0.338-0.177-0.517-0.232v0c-0.211-0.064-0.432-0.096-0.662-0.096s-0.451 0.032-0.662 0.096v0c-0.179 0.054-0.352 0.131-0.517 0.232-0.17 0.103-0.321 0.224-0.454 0.362-0.17 0.177-0.31 0.383-0.42 0.618l-2.377 5.087c-0.021 0.026-0.1 0.135-0.128 0.155-0.031 0.012-0.153 0.069-0.187 0.073l-5.601 0.661c-0.26 0.031-0.501 0.1-0.724 0.207v0c-0.174 0.084-0.336 0.191-0.488 0.321-0.147 0.127-0.275 0.267-0.382 0.422-0.127 0.182-0.226 0.384-0.297 0.605s-0.109 0.443-0.112 0.665c-0.003 0.188 0.018 0.377 0.063 0.566 0.047 0.194 0.116 0.376 0.208 0.546 0.118 0.217 0.274 0.414 0.467 0.591l4.119 3.773c0.018 0.029 0.099 0.137 0.11 0.171 0.001 0.009 0.002 0.025 0.004 0.044 0.005 0.054 0.013 0.133 0.008 0.159l-1.093 5.462c-0.051 0.255-0.060 0.505-0.028 0.749 0.025 0.191 0.076 0.378 0.152 0.562 0.074 0.179 0.168 0.343 0.28 0.493 0.133 0.177 0.293 0.333 0.479 0.47s0.384 0.241 0.593 0.315c0.177 0.062 0.362 0.101 0.555 0.118 0.198 0.017 0.392 0.009 0.581-0.025h0.001c0.242-0.043 0.478-0.127 0.705-0.253l4.953-2.737c0.032-0.008 0.159-0.050 0.193-0.050 0.032 0.008 0.163 0.033 0.193 0.050l4.831 2.669c0.233 0.129 0.473 0.214 0.72 0.256h0.001c0.192 0.033 0.388 0.039 0.588 0.020 0.195-0.019 0.382-0.061 0.56-0.126v0c0.211-0.077 0.411-0.187 0.598-0.329s0.347-0.305 0.478-0.488c0.111-0.154 0.201-0.323 0.271-0.506 0.072-0.188 0.119-0.379 0.139-0.573 0.026-0.25 0.008-0.504-0.053-0.762l-2.084-8.779c-0.121-0.509-0.615-0.813-1.124-0.693s-0.813 0.615-0.693 1.124l2.084 8.779c0.020 0.084 0.018 0.161-0.007 0.229s-0.071 0.129-0.141 0.181c-0.069 0.053-0.14 0.081-0.213 0.087s-0.147-0.013-0.223-0.055l-4.831-2.669c-0.171-0.094-0.347-0.165-0.53-0.212v0c-0.183-0.047-0.372-0.071-0.566-0.071s-0.384 0.024-0.566 0.071c-0.183 0.047-0.359 0.118-0.53 0.212l-4.953 2.737c-0.075 0.041-0.148 0.059-0.219 0.055s-0.142-0.032-0.21-0.082c-0.069-0.050-0.116-0.109-0.142-0.176s-0.031-0.142-0.014-0.226l1.093-5.462c0.039-0.195 0.053-0.387 0.041-0.579s-0.048-0.381-0.109-0.57c-0.062-0.189-0.144-0.363-0.248-0.525s-0.229-0.309-0.375-0.443l-4.119-3.773c-0.063-0.058-0.104-0.122-0.122-0.191s-0.014-0.145 0.012-0.227c0.026-0.081 0.067-0.145 0.123-0.191s0.126-0.074 0.211-0.084l5.601-0.661c0.195-0.023 0.381-0.069 0.558-0.138s0.345-0.161 0.504-0.276c0.159-0.115 0.299-0.245 0.42-0.392s0.223-0.308 0.306-0.486l2.377-5.087c0.036-0.077 0.084-0.135 0.145-0.173s0.133-0.058 0.218-0.058c0.085 0 0.157 0.019 0.218 0.058s0.109 0.096 0.144 0.173l2.377 5.087c0.083 0.178 0.185 0.34 0.306 0.486s0.261 0.277 0.42 0.392c0.159 0.115 0.327 0.207 0.504 0.276s0.363 0.115 0.558 0.138l5.601 0.661c0.085 0.010 0.155 0.038 0.211 0.084s0.097 0.109 0.123 0.191c0.026 0.081 0.030 0.157 0.012 0.227s-0.059 0.133-0.122 0.191l-1.263 1.157zM10.007 15.327l2 2c0.369 0.37 0.95 0.37 1.32 0s0.37-0.95 0-1.32l-2-2c-0.369-0.37-0.95-0.37-1.32 0s-0.37 0.95 0 1.32z"},null,-1)])])}const Al={name:"meeting-icon-event",render:fv},pv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function mv(r,e){return t.openBlock(),t.createElementBlock("svg",pv,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M16.933 4v1.733h8.4c0.163 0 0.323 0.017 0.479 0.050 0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.122 0.37 0.199 0.125 0.083 0.242 0.179 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.098 0.266 0.128 0.404 0.034 0.156 0.050 0.315 0.050 0.479v7.222c0 0.523-0.411 0.933-0.933 0.933s-0.933-0.411-0.933-0.933v-7.222c0-0.055-0.010-0.106-0.029-0.154s-0.178-0.178-0.217-0.217c-0.047-0.020-0.098-0.029-0.154-0.029h-18.667c-0.055 0-0.106 0.010-0.153 0.029v0 0 0c-0.047 0.020-0.178 0.178-0.217 0.217-0.020 0.047-0.029 0.098-0.029 0.154v13.333c0 0.055 0.010 0.106 0.029 0.153v0c0.020 0.047 0.178 0.178 0.217 0.217 0.047 0.020 0.098 0.029 0.153 0.029h18.667c0.055 0 0.107-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.153v-2.953c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933v2.953c0 0.163-0.017 0.323-0.050 0.479-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.266 0.098-0.404 0.128-0.156 0.034-0.316 0.051-0.479 0.051h-0.44l2.42 2.42c0.37 0.37 0.37 0.95 0 1.32s-0.95 0.37-1.32 0l-3.74-3.74h-12.507l-3.74 3.74c-0.37 0.37-0.95 0.37-1.32 0s-0.369-0.95 0-1.32l2.42-2.42h-0.44c-0.163 0-0.323-0.017-0.479-0.050v0c-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.122-0.37-0.199v0c-0.125-0.083-0.242-0.178-0.35-0.287s-0.204-0.225-0.287-0.35v0c-0.077-0.116-0.143-0.24-0.199-0.37-0.056-0.132-0.098-0.266-0.128-0.404v0c-0.034-0.156-0.050-0.315-0.050-0.479v-13.333c0-0.163 0.017-0.323 0.050-0.479 0.030-0.137 0.072-0.272 0.128-0.404 0.055-0.131 0.121-0.254 0.199-0.37 0.083-0.125 0.179-0.242 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.098 0.404-0.128v0c0.156-0.034 0.315-0.050 0.479-0.050h8.4v-1.733c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933zM18.72 17.392l4.615-4.741c0.365-0.374 0.357-0.955-0.018-1.32s-0.955-0.357-1.32 0.018l-3.906 4.012-3.532-4.067c-0.195-0.169-0.421-0.244-0.678-0.225s-0.47 0.125-0.639 0.32l-4.615 5.333c-0.342 0.395-0.3 0.975 0.095 1.317s0.974 0.3 1.316-0.095l3.91-4.518 3.397 3.925c0.169 0.195 0.381 0.302 0.639 0.32s0.541-0.111 0.736-0.28z"},null,-1)])])}const Il={name:"meeting-icon-meet",render:mv},gv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function vv(r,e){return t.openBlock(),t.createElementBlock("svg",gv,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M10.633 5.457c-1.119 0.457-2.181 1.053-3.185 1.79-0.422 0.309-0.51 0.883-0.201 1.305s0.883 0.51 1.305 0.201c0.927-0.68 1.908-1.223 2.943-1.629 0.185-0.073 0.373-0.141 0.562-0.205 0.658-0.223 1.325-0.389 2.001-0.497 0.64-0.103 1.287-0.154 1.943-0.154s1.304 0.051 1.943 0.154v0c0.676 0.108 1.343 0.274 2.001 0.497 0.189 0.064 0.376 0.133 0.562 0.205v0c1.035 0.407 2.015 0.95 2.943 1.629 0.421 0.309 0.996 0.221 1.305-0.201s0.221-0.996-0.201-1.305c-1.005-0.736-2.067-1.333-3.185-1.79-0.271-0.111-0.545-0.213-0.823-0.307-0.755-0.256-1.52-0.447-2.297-0.572-0.739-0.119-1.488-0.179-2.247-0.179s-1.508 0.060-2.247 0.179v0c-0.776 0.125-1.541 0.316-2.296 0.572-0.277 0.094-0.552 0.197-0.823 0.307v0zM28.933 18.667v1.333c0 0.163-0.017 0.323-0.051 0.479-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.267 0.099-0.404 0.128-0.156 0.034-0.315 0.050-0.479 0.050h-21.333c-0.163 0-0.323-0.017-0.479-0.050-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.121-0.37-0.199-0.125-0.083-0.242-0.178-0.35-0.287s-0.204-0.225-0.287-0.35c-0.077-0.116-0.143-0.24-0.199-0.37s-0.098-0.266-0.128-0.404c-0.034-0.156-0.050-0.315-0.050-0.479v-8c0-0.163 0.017-0.323 0.050-0.479 0.030-0.137 0.072-0.272 0.128-0.404s0.121-0.254 0.199-0.37c0.083-0.125 0.179-0.242 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.098 0.404-0.128v0c0.156-0.034 0.315-0.050 0.479-0.050h21.333c0.163 0 0.323 0.017 0.479 0.050 0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.122 0.37 0.199 0.125 0.083 0.241 0.178 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.099 0.266 0.128 0.404v0c0.034 0.156 0.050 0.315 0.050 0.478v4c0 0.523-0.411 0.933-0.933 0.933s-0.933-0.411-0.933-0.933v-4c0-0.055-0.010-0.106-0.029-0.154s-0.178-0.178-0.217-0.217c-0.047-0.020-0.098-0.029-0.154-0.029h-21.333c-0.055 0-0.106 0.010-0.153 0.029v0 0c-0.047 0.020-0.178 0.178-0.217 0.217-0.020 0.047-0.029 0.098-0.029 0.154v8c0 0.055 0.010 0.106 0.029 0.154s0.178 0.178 0.217 0.217c0.047 0.020 0.098 0.029 0.153 0.029h21.333c0.055 0 0.106-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.154v-1.333c0-0.523 0.411-0.933 0.933-0.933s0.933 0.411 0.933 0.933zM20.479 23.117v0c0.137 0.030 0.272 0.072 0.404 0.128 0.131 0.055 0.254 0.121 0.37 0.199 0.125 0.083 0.241 0.179 0.35 0.287s0.204 0.225 0.287 0.35c0.077 0.116 0.143 0.24 0.199 0.37 0.056 0.132 0.099 0.266 0.128 0.404v0c0.034 0.156 0.051 0.316 0.051 0.479s-0.017 0.323-0.051 0.479c-0.030 0.137-0.072 0.272-0.128 0.404-0.055 0.131-0.121 0.254-0.199 0.37-0.083 0.125-0.179 0.242-0.287 0.35s-0.225 0.204-0.35 0.287c-0.116 0.077-0.24 0.143-0.37 0.199-0.132 0.056-0.267 0.098-0.404 0.128-0.156 0.034-0.316 0.051-0.479 0.051h-8c-0.163 0-0.323-0.017-0.479-0.051-0.137-0.030-0.272-0.072-0.404-0.128-0.131-0.055-0.254-0.121-0.37-0.199-0.125-0.083-0.242-0.179-0.35-0.287s-0.204-0.225-0.287-0.35c-0.077-0.116-0.143-0.24-0.199-0.37-0.056-0.132-0.098-0.266-0.128-0.404-0.034-0.156-0.050-0.315-0.050-0.479s0.017-0.323 0.050-0.479c0.030-0.137 0.072-0.272 0.128-0.404 0.055-0.131 0.121-0.254 0.199-0.37 0.083-0.125 0.179-0.241 0.287-0.35s0.225-0.204 0.35-0.287c0.116-0.077 0.24-0.143 0.37-0.199 0.132-0.056 0.266-0.099 0.404-0.128 0.156-0.034 0.316-0.050 0.479-0.050h8c0.163 0 0.323 0.017 0.479 0.050zM20 24.933h-8c-0.055 0-0.106 0.010-0.153 0.029s-0.178 0.178-0.217 0.217c-0.020 0.047-0.029 0.098-0.029 0.154s0.010 0.106 0.029 0.153c0.020 0.047 0.178 0.178 0.217 0.217 0.047 0.020 0.098 0.029 0.153 0.029h8c0.055 0 0.106-0.010 0.154-0.029s0.178-0.178 0.217-0.217c0.019-0.047 0.029-0.098 0.029-0.153s-0.010-0.106-0.029-0.154v0c-0.020-0.047-0.178-0.178-0.217-0.217-0.047-0.019-0.098-0.029-0.154-0.029z"},null,-1)])])}const bh={name:"meeting-icon-summit",render:vv},ao={summit:"rgba(var(--o-orange-6))",events:"rgba(var(--o-cyan-6))",meeting:"rgba(var(--o-deep-blue-6))"},mn=0,vn=1,tn=2,Ch=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,yv=["var(--o-color-primary1)","var(--o-color-warning1)","var(--o-color-success1)"],ba=()=>{const{t:r}=Ue.useI18n(),e=t.computed(()=>new Map([[1,{label:r("meeting.offline"),value:1}],[2,{label:r("meeting.online"),value:2}],[3,{label:r("meeting.onlineOffline"),value:3}]])),i=t.computed(()=>new Map([[1,{id:"draft",label:r("meeting.statusDraft"),text:r("meeting.statusDraft"),value:1}],[2,{id:"under-review",label:r("meeting.statusUnderReview"),text:r("meeting.statusPending"),value:2}],[3,{id:"registration",label:r("meeting.statusRegistering"),text:r("meeting.statusApproved"),value:3}],[4,{id:"in-progress",label:r("meeting.statusInProgress"),text:r("meeting.statusApproved"),value:4}],[5,{id:"ended",label:r("meeting.statusEnded"),text:r("meeting.statusEnded"),value:5}],[6,{id:"modified",label:r("meeting.statusModified"),text:r("meeting.statusModified"),value:6}],[7,{id:"reject",label:r("meeting.statusRejected"),text:r("meeting.statusRejected"),value:7}]])),n=t.computed(()=>new Map([["all",{label:r("common.all"),value:"all"}],["rejected",{label:r("meeting.statusRejected"),value:"rejected"}],["approved",{label:r("meeting.statusApproved"),value:"approved"}],["publish",{label:r("meeting.statusPending"),value:"publish"}],["cancel",{label:r("meeting.statusCanceled"),value:"cancel"}]]));return{t:r,activityTypeMap:e,statusMap:i,approvalStatusMap:n}},_v={class:"o-activity-form"},Tv={class:"time-config"},bv={class:"form-btns"},ac=t.defineComponent({__name:"OActivityForm",props:{data:{},creatActivity:{},editActivity:{},admins:{},organizers:{}},emits:["confirm","close"],setup(r,{expose:e,emit:i}){const n=i,s=A.useMessage(null),{lePadV:a}=It.useScreen(),{t:o}=Ue.useI18n(),l=o,{activityTypeMap:c}=ba(),d=r,m=t.computed(()=>!!d.data),g=t.ref({title:"",organizer:"",start_date:"",end_date:"",register_end_date:"",activity_type:"",synopsis:"",register_url:"",content_url:"",address:"",start:"",end:"",is_publish:"true",email_list:"",approver:""}),S=t.ref(),T=t.ref(!1),b=t.ref({title:[{required:!0,message:o("meeting.enterActivityName")},{validator:U=>{if(U.length>50)return{type:"danger",message:o("meeting.activityNameMaxLength")}}}],activity_type:[{required:!0,message:o("meeting.selectActivityType")}],organizer:[{required:!0,message:o("meeting.selectActivityOrganizer")}],start_date:[{required:!0,message:o("meeting.selectActivityTime")},{validator:()=>{const{start_date:U,end_date:B}=g.value,G=U.split(" "),C=B.split(" ");if(!U||!B)return{type:"danger",message:o("meeting.selectActivityDate")};const k=G[1].split(":").map(Number),O=C[1].split(":").map(Number);if(k[0]<8||k[0]>21||O[0]<8||O[0]>21)return{type:"danger",message:o("meeting.activityTimeRange")};if(rt.dayjs(U).valueOf()>rt.dayjs(B).valueOf())return{type:"danger",message:o("meeting.endDateAfterStartDate")};g.value.start_date=G[0],g.value.end_date=C[0],g.value.start=G[1],g.value.end=C[1]},triggers:["blur","change"]}],register_end_date:[{validator:()=>{const{register_end_date:U,end_date:B,end:G}=g.value;if(U&&rt.dayjs(`${B} ${G}`).valueOf()<rt.dayjs(U).valueOf())return{type:"danger",message:o("meeting.registerDeadlineBeforeEnd")}},triggers:["blur","change"]}],address:[{required:!0,message:o("meeting.enterActivityAddress")},{validator:U=>{if(U.length>255)return{type:"danger",message:o("meeting.activityAddressMaxLength")}}}],register_url:[{validator:U=>{const B=U.replaceAll(" ","")||"";if(B.length&&(B.split(";")||[]).some(C=>!sc.test(C)))return{type:"danger",message:o("meeting.invalidRegistrationUrl")}},triggers:["blur","change"]}],content_url:[{validator:U=>{const B=U.replaceAll(" ","")||"";if(B.length&&(B.split(";")||[]).some(C=>!sc.test(C)))return{type:"danger",message:o("meeting.invalidActivityDetailUrl")}},triggers:["blur","change"]}],synopsis:[{validator:U=>{if(U.length>1e3)return{type:"danger",message:o("meeting.activityContentMaxLength")}}}],email_list:[{validator:U=>{const B=U.replaceAll(" ","").replaceAll(",",";")||"";if(B.length){if(B.length>1020)return{type:"danger",message:o("meeting.emailTooLong")};const G=B.split(";")||[];if(G.some(C=>!Ch.test(C)))return{type:"danger",message:o("meeting.emailInvalid")};if(G.some(C=>C.length>50))return{type:"danger",message:o("meeting.singleEmailTooLong")};if(G.length>20)return{type:"danger",message:o("meeting.emailCountTooLong")}}},triggers:["blur","change"]}],approver:[{required:!0,message:o("meeting.selectActivityApprover")}]}),y=t.computed(()=>d.admins||[]),x=t.ref(""),N=t.ref([]);c.value.forEach(U=>{N.value.push(U)});const I=U=>{const B=N.value.find(G=>G.label===U);g.value.activity_type=B==null?void 0:B.value},D=U=>U.getTime()<Date.now()-1440*60*1e3;t.watch(()=>d.data,U=>{var B;if(U){const{title:G,start_date:C,end_date:k,register_end_date:O,activity_type:j,register_url:L,content_url:V,address:M,start:q,end:$,is_publish:X,approver:R,update_activity_id:ee,synopsis:ue,email_list:J,organizer:oe}=U;let Z={title:G,start_date:C,end_date:k,register_end_date:O,activity_type:j,register_url:L,content_url:V,address:M,start:q,end:$,is_publish:X,approver:R,update_activity_id:ee,synopsis:ue,email_list:J,organizer:oe};g.value={...Z},x.value=(B=c.value.get(Number(U.activity_type)))==null?void 0:B.label,g.value.start_date=`${g.value.start_date} ${g.value.start}`,g.value.end_date=`${g.value.end_date} ${g.value.end}`}},{immediate:!0,deep:!0});const z=async U=>{var G,C,k,O,j,L,V;let B=m.value?o("meeting.modifyActivity"):o(U?"meeting.create":"meeting.saveDraft");try{if((await((G=S.value)==null?void 0:G.validate())).some(q=>!!q))return;T.value=!0,g.value.is_publish=`${U}`,m.value&&((C=d.data)==null?void 0:C.status)===3?(g.value.update_activity_id=(k=d.data)==null?void 0:k.id,await((O=d.creatActivity)==null?void 0:O.call(d,g.value))):m.value?await((L=d.editActivity)==null?void 0:L.call(d,(j=d.data)==null?void 0:j.id,g.value)):await((V=d.creatActivity)==null?void 0:V.call(d,g.value)),s.success({content:o("meeting.activityActionSuccess",[g.value.title,B.toLowerCase()])}),H(),n("confirm")}finally{T.value=!1}},H=()=>{g.value={},n("close")};return e({confirm:z}),(U,B)=>(t.openBlock(),t.createElementBlock("div",_v,[t.createVNode(t.unref(A.OForm),{model:g.value,ref_key:"formRef",ref:S,"has-required":"","label-width":"108px",layout:t.unref(a)?"v":"h",class:"form-wrapper"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OFormItem),{rules:b.value.title,label:t.unref(o)("meeting.activityName"),field:"title"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OInput),{size:"large",placeholder:t.unref(o)("meeting.enterActivityName"),modelValue:g.value.title,"onUpdate:modelValue":B[0]||(B[0]=G=>g.value.title=G)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:b.value.organizer,label:t.unref(o)("meeting.activityOrganizer"),field:"organizer"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OSelect),{placeholder:t.unref(o)("meeting.selectActivityOrganizer"),size:"large",modelValue:g.value.organizer,"onUpdate:modelValue":B[1]||(B[1]=G=>g.value.organizer=G)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.organizers,G=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{key:G.name,value:G.name},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(G.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:b.value.activity_type,label:t.unref(o)("meeting.activityType"),field:"activity_type"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OSelect),{placeholder:t.unref(o)("meeting.selectActivityType"),size:"large",modelValue:x.value,"onUpdate:modelValue":B[2]||(B[2]=G=>x.value=G),onChange:I},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(N.value,G=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{key:G.value,value:G.label},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(G.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),g.value.activity_type===1||g.value.activity_type===3?(t.openBlock(),t.createBlock(t.unref(A.OFormItem),{key:0,rules:b.value.address,label:t.unref(o)("meeting.activityAddress"),field:"address"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OInput),{size:"large",placeholder:t.unref(o)("meeting.enterActivityAddress"),modelValue:g.value.address,"onUpdate:modelValue":B[3]||(B[3]=G=>g.value.address=G)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OFormItem),{rules:b.value.start_date,label:t.unref(o)("meeting.activityTime"),field:"start_date",required:""},{default:t.withCtx(()=>[t.createElementVNode("div",Tv,[t.createVNode(t.unref(A.OFormItem),{label:t.unref(o)("meeting.startDate"),field:"start_date"},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElDatePicker),{size:"large",modelValue:g.value.start_date,"onUpdate:modelValue":B[4]||(B[4]=G=>g.value.start_date=G),type:"datetime",placeholder:t.unref(o)("meeting.selectDate"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":D,clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),t.createVNode(t.unref(A.OFormItem),{label:t.unref(o)("meeting.endDate"),field:"end_date"},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElDatePicker),{size:"large",modelValue:g.value.end_date,"onUpdate:modelValue":B[5]||(B[5]=G=>g.value.end_date=G),type:"datetime",placeholder:t.unref(o)("meeting.selectDate"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm","disabled-date":D,clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["label"])])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:b.value.register_end_date,label:t.unref(o)("meeting.registrationDeadline"),field:"register_end_date"},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElDatePicker),{size:"large",modelValue:g.value.register_end_date,"onUpdate:modelValue":B[6]||(B[6]=G=>g.value.register_end_date=G),type:"datetime",placeholder:t.unref(o)("meeting.selectActivityDeadline"),format:"YYYY/MM/DD HH:mm","value-format":"YYYY-MM-DD HH:mm",clearable:!1,class:"date-activity"},null,8,["modelValue","placeholder"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:b.value.register_url,label:t.unref(o)("meeting.registrationUrl"),field:"register_url"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OInput),{size:"large",placeholder:t.unref(o)("meeting.enterActivityRegistrationUrl"),modelValue:g.value.register_url,"onUpdate:modelValue":B[7]||(B[7]=G=>g.value.register_url=G)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:b.value.content_url,label:t.unref(o)("meeting.activityDetailUrl"),field:"content_url"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OInput),{size:"large",placeholder:t.unref(o)("meeting.enterActivityDetailUrl"),modelValue:g.value.content_url,"onUpdate:modelValue":B[8]||(B[8]=G=>g.value.content_url=G)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:b.value.synopsis,label:t.unref(o)("meeting.activityContent"),field:"synopsis"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OTextarea),{size:"large",placeholder:t.unref(o)("meeting.enterActivityContent"),modelValue:g.value.synopsis,"onUpdate:modelValue":B[9]||(B[9]=G=>g.value.synopsis=G)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{field:"email_list",rules:b.value.email_list,label:t.unref(o)("meeting.email")},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OTextarea),{disabled:m.value,size:"large",placeholder:t.unref(l)("meeting.enterEmail"),rows:4,modelValue:g.value.email_list,"onUpdate:modelValue":B[10]||(B[10]=G=>g.value.email_list=G)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:b.value.approver,label:t.unref(o)("meeting.activityApprover"),field:"approver"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OSelect),{placeholder:t.unref(o)("meeting.selectActivityApprover"),size:"large",modelValue:g.value.approver,"onUpdate:modelValue":B[11]||(B[11]=G=>g.value.approver=G)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.value,G=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{key:G,value:G},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(G),1)]),_:2},1032,["value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["rules","label"])]),_:1},8,["model","layout"]),t.createElementVNode("div",bv,[t.createVNode(t.unref(A.OButton),{color:"primary",variant:"solid",size:"large",round:"pill",onClick:B[12]||(B[12]=G=>z(!0)),loading:T.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.value?t.unref(o)("common.save"):t.unref(o)("meeting.create")),1)]),_:1},8,["loading"]),m.value?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(A.OButton),{key:0,color:"primary",variant:"outline",round:"pill",size:"large",onClick:B[13]||(B[13]=G=>z(!1)),loading:T.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("meeting.saveDraft")),1)]),_:1},8,["loading"])),t.createVNode(t.unref(A.OButton),{color:"primary",variant:"outline",size:"large",round:"pill",onClick:H},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("meeting.cancelBtn")),1)]),_:1})])]))}}),Cv={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function xv(r,e){return t.openBlock(),t.createElementBlock("svg",Cv,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M17.286 5c0.676 0 1.213 0.546 1.213 1.21 0 0.227-0.064 0.449-0.184 0.641l-0.065 0.093-1.24 1.62c-0.149 0.194-0.433 0.236-0.634 0.092-0.181-0.129-0.234-0.364-0.134-0.551l0.039-0.060 1.24-1.62c0.046-0.060 0.071-0.136 0.071-0.214 0-0.169-0.113-0.302-0.253-0.329l-0.054-0.005h-10.573c-0.064 0-0.126 0.022-0.179 0.064-0.126 0.099-0.162 0.281-0.092 0.426l0.036 0.059 4.207 5.495c0.138 0.18 0.221 0.394 0.243 0.617l0.006 0.112 0.015 3.985c0 0.088 0.033 0.171 0.087 0.232l0.045 0.042 1.525 1.158c0.052 0.040 0.114 0.060 0.176 0.060 0.146-0.001 0.274-0.116 0.301-0.275l0.005-0.062-0.020-5.134c-0.001-0.228 0.063-0.452 0.184-0.645l0.065-0.094 1.804-2.357c0.149-0.194 0.433-0.236 0.634-0.092 0.181 0.129 0.234 0.364 0.134 0.551l-0.039 0.060-1.805 2.357c-0.035 0.045-0.058 0.099-0.067 0.157l-0.005 0.059 0.020 5.134c0.003 0.663-0.533 1.212-1.209 1.214-0.23 0.001-0.454-0.063-0.647-0.183l-0.094-0.064-1.525-1.158c-0.267-0.203-0.436-0.506-0.471-0.834l-0.007-0.124-0.015-3.985c-0-0.059-0.015-0.115-0.041-0.165l-0.030-0.047-4.207-5.495c-0.401-0.523-0.308-1.272 0.211-1.682 0.183-0.145 0.405-0.234 0.637-0.256l0.117-0.006h10.573z"},null,-1)])])}const oc={name:"components-icon-filter",render:xv};/*! @license DOMPurify 2.5.9 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.9/LICENSE */function pn(r){"@babel/helpers - typeof";return pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pn(r)}function Ko(r,e){return Ko=Object.setPrototypeOf||function(n,s){return n.__proto__=s,n},Ko(r,e)}function Sv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ws(r,e,i){return Sv()?Ws=Reflect.construct:Ws=function(s,a,o){var l=[null];l.push.apply(l,a);var c=Function.bind.apply(s,l),d=new c;return o&&Ko(d,o.prototype),d},Ws.apply(null,arguments)}function Ii(r){return Ev(r)||kv(r)||wv(r)||Dv()}function Ev(r){if(Array.isArray(r))return Qo(r)}function kv(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function wv(r,e){if(r){if(typeof r=="string")return Qo(r,e);var i=Object.prototype.toString.call(r).slice(8,-1);if(i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set")return Array.from(r);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Qo(r,e)}}function Qo(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=r[i];return n}function Dv(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Av=Object.hasOwnProperty,lc=Object.setPrototypeOf,Iv=Object.isFrozen,Nv=Object.getPrototypeOf,Ov=Object.getOwnPropertyDescriptor,ti=Object.freeze,_i=Object.seal,Bv=Object.create,xh=typeof Reflect<"u"&&Reflect,Js=xh.apply,Zo=xh.construct;Js||(Js=function(e,i,n){return e.apply(i,n)});ti||(ti=function(e){return e});_i||(_i=function(e){return e});Zo||(Zo=function(e,i){return Ws(e,Ii(i))});var Lv=Ti(Array.prototype.forEach),uc=Ti(Array.prototype.pop),Fr=Ti(Array.prototype.push),Ys=Ti(String.prototype.toLowerCase),oo=Ti(String.prototype.toString),cc=Ti(String.prototype.match),Ai=Ti(String.prototype.replace),Pv=Ti(String.prototype.indexOf),Mv=Ti(String.prototype.trim),Vt=Ti(RegExp.prototype.test),lo=Rv(TypeError);function Ti(r){return function(e){for(var i=arguments.length,n=new Array(i>1?i-1:0),s=1;s<i;s++)n[s-1]=arguments[s];return Js(r,e,n)}}function Rv(r){return function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];return Zo(r,i)}}function Ge(r,e,i){var n;i=(n=i)!==null&&n!==void 0?n:Ys,lc&&lc(r,null);for(var s=e.length;s--;){var a=e[s];if(typeof a=="string"){var o=i(a);o!==a&&(Iv(e)||(e[s]=o),a=o)}r[a]=!0}return r}function Sn(r){var e=Bv(null),i;for(i in r)Js(Av,r,[i])===!0&&(e[i]=r[i]);return e}function Ps(r,e){for(;r!==null;){var i=Ov(r,e);if(i){if(i.get)return Ti(i.get);if(typeof i.value=="function")return Ti(i.value)}r=Nv(r)}function n(s){return console.warn("fallback value for",s),null}return n}var dc=ti(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),uo=ti(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),co=ti(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Vv=ti(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ho=ti(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Fv=ti(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),hc=ti(["#text"]),fc=ti(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),fo=ti(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),pc=ti(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ms=ti(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$v=_i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Uv=_i(/<%[\w\W]*|[\w\W]*%>/gm),zv=_i(/\${[\w\W]*}/gm),Hv=_i(/^data-[\-\w.\u00B7-\uFFFF]+$/),qv=_i(/^aria-[\-\w]+$/),jv=_i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gv=_i(/^(?:\w+script|data):/i),Wv=_i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Yv=_i(/^html$/i),Xv=_i(/^[a-z][.\w]*(-[.\w]+)+$/i),Kv=function(){return typeof window>"u"?null:window},Qv=function(e,i){if(pn(e)!=="object"||typeof e.createPolicy!="function")return null;var n=null,s="data-tt-policy-suffix";i.currentScript&&i.currentScript.hasAttribute(s)&&(n=i.currentScript.getAttribute(s));var a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:function(l){return l},createScriptURL:function(l){return l}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function Sh(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Kv(),e=function(te){return Sh(te)};if(e.version="2.5.9",e.removed=[],!r||!r.document||r.document.nodeType!==9)return e.isSupported=!1,e;var i=r.document,n=r.document,s=r.DocumentFragment,a=r.HTMLTemplateElement,o=r.Node,l=r.Element,c=r.NodeFilter,d=r.NamedNodeMap,m=d===void 0?r.NamedNodeMap||r.MozNamedAttrMap:d,g=r.HTMLFormElement,S=r.DOMParser,T=r.trustedTypes,b=l.prototype,y=Ps(b,"cloneNode"),x=Ps(b,"nextSibling"),N=Ps(b,"childNodes"),I=Ps(b,"parentNode");if(typeof a=="function"){var D=n.createElement("template");D.content&&D.content.ownerDocument&&(n=D.content.ownerDocument)}var z=Qv(T,i),H=z?z.createHTML(""):"",U=n,B=U.implementation,G=U.createNodeIterator,C=U.createDocumentFragment,k=U.getElementsByTagName,O=i.importNode,j={};try{j=Sn(n).documentMode?n.documentMode:{}}catch{}var L={};e.isSupported=typeof I=="function"&&B&&B.createHTMLDocument!==void 0&&j!==9;var V=$v,M=Uv,q=zv,$=Hv,X=qv,R=Gv,ee=Wv,ue=Xv,J=jv,oe=null,Z=Ge({},[].concat(Ii(dc),Ii(uo),Ii(co),Ii(ho),Ii(hc))),se=null,_e=Ge({},[].concat(Ii(fc),Ii(fo),Ii(pc),Ii(Ms))),ke=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),De=null,Ne=null,Ve=!0,et=!0,Re=!1,Ke=!0,He=!1,Fe=!0,We=!1,kt=!1,it=!1,Ae=!1,be=!1,me=!1,Pe=!0,Xe=!1,vt="user-content-",ne=!0,re=!1,le={},Ee=null,pe=Ge({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ze=null,Je=Ge({},["audio","video","img","source","image","track"]),$e=null,Nt=Ge({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),xt="http://www.w3.org/1998/Math/MathML",ui="http://www.w3.org/2000/svg",Ot="http://www.w3.org/1999/xhtml",St=Ot,ii=!1,$t=null,Gi=Ge({},[xt,ui,Ot],oo),Ut,Wi=["application/xhtml+xml","text/html"],E="text/html",w,Q=null,ce=n.createElement("form"),ge=function(te){return te instanceof RegExp||te instanceof Function},Ie=function(te){Q&&Q===te||((!te||pn(te)!=="object")&&(te={}),te=Sn(te),Ut=Wi.indexOf(te.PARSER_MEDIA_TYPE)===-1?Ut=E:Ut=te.PARSER_MEDIA_TYPE,w=Ut==="application/xhtml+xml"?oo:Ys,oe="ALLOWED_TAGS"in te?Ge({},te.ALLOWED_TAGS,w):Z,se="ALLOWED_ATTR"in te?Ge({},te.ALLOWED_ATTR,w):_e,$t="ALLOWED_NAMESPACES"in te?Ge({},te.ALLOWED_NAMESPACES,oo):Gi,$e="ADD_URI_SAFE_ATTR"in te?Ge(Sn(Nt),te.ADD_URI_SAFE_ATTR,w):Nt,Ze="ADD_DATA_URI_TAGS"in te?Ge(Sn(Je),te.ADD_DATA_URI_TAGS,w):Je,Ee="FORBID_CONTENTS"in te?Ge({},te.FORBID_CONTENTS,w):pe,De="FORBID_TAGS"in te?Ge({},te.FORBID_TAGS,w):{},Ne="FORBID_ATTR"in te?Ge({},te.FORBID_ATTR,w):{},le="USE_PROFILES"in te?te.USE_PROFILES:!1,Ve=te.ALLOW_ARIA_ATTR!==!1,et=te.ALLOW_DATA_ATTR!==!1,Re=te.ALLOW_UNKNOWN_PROTOCOLS||!1,Ke=te.ALLOW_SELF_CLOSE_IN_ATTR!==!1,He=te.SAFE_FOR_TEMPLATES||!1,Fe=te.SAFE_FOR_XML!==!1,We=te.WHOLE_DOCUMENT||!1,Ae=te.RETURN_DOM||!1,be=te.RETURN_DOM_FRAGMENT||!1,me=te.RETURN_TRUSTED_TYPE||!1,it=te.FORCE_BODY||!1,Pe=te.SANITIZE_DOM!==!1,Xe=te.SANITIZE_NAMED_PROPS||!1,ne=te.KEEP_CONTENT!==!1,re=te.IN_PLACE||!1,J=te.ALLOWED_URI_REGEXP||J,St=te.NAMESPACE||Ot,ke=te.CUSTOM_ELEMENT_HANDLING||{},te.CUSTOM_ELEMENT_HANDLING&&ge(te.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(ke.tagNameCheck=te.CUSTOM_ELEMENT_HANDLING.tagNameCheck),te.CUSTOM_ELEMENT_HANDLING&&ge(te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(ke.attributeNameCheck=te.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),te.CUSTOM_ELEMENT_HANDLING&&typeof te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(ke.allowCustomizedBuiltInElements=te.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),He&&(et=!1),be&&(Ae=!0),le&&(oe=Ge({},Ii(hc)),se=[],le.html===!0&&(Ge(oe,dc),Ge(se,fc)),le.svg===!0&&(Ge(oe,uo),Ge(se,fo),Ge(se,Ms)),le.svgFilters===!0&&(Ge(oe,co),Ge(se,fo),Ge(se,Ms)),le.mathMl===!0&&(Ge(oe,ho),Ge(se,pc),Ge(se,Ms))),te.ADD_TAGS&&(oe===Z&&(oe=Sn(oe)),Ge(oe,te.ADD_TAGS,w)),te.ADD_ATTR&&(se===_e&&(se=Sn(se)),Ge(se,te.ADD_ATTR,w)),te.ADD_URI_SAFE_ATTR&&Ge($e,te.ADD_URI_SAFE_ATTR,w),te.FORBID_CONTENTS&&(Ee===pe&&(Ee=Sn(Ee)),Ge(Ee,te.FORBID_CONTENTS,w)),ne&&(oe["#text"]=!0),We&&Ge(oe,["html","head","body"]),oe.table&&(Ge(oe,["tbody"]),delete De.tbody),ti&&ti(te),Q=te)},nt=Ge({},["mi","mo","mn","ms","mtext"]),wt=Ge({},["annotation-xml"]),Wt=Ge({},["title","style","font","a","script"]),zt=Ge({},uo);Ge(zt,co),Ge(zt,Vv);var Rt=Ge({},ho);Ge(Rt,Fv);var ni=function(te){var ve=I(te);(!ve||!ve.tagName)&&(ve={namespaceURI:St,tagName:"template"});var Se=Ys(te.tagName),tt=Ys(ve.tagName);return $t[te.namespaceURI]?te.namespaceURI===ui?ve.namespaceURI===Ot?Se==="svg":ve.namespaceURI===xt?Se==="svg"&&(tt==="annotation-xml"||nt[tt]):!!zt[Se]:te.namespaceURI===xt?ve.namespaceURI===Ot?Se==="math":ve.namespaceURI===ui?Se==="math"&&wt[tt]:!!Rt[Se]:te.namespaceURI===Ot?ve.namespaceURI===ui&&!wt[tt]||ve.namespaceURI===xt&&!nt[tt]?!1:!Rt[Se]&&(Wt[Se]||!zt[Se]):!!(Ut==="application/xhtml+xml"&&$t[te.namespaceURI]):!1},Qe=function(te){Fr(e.removed,{element:te});try{te.parentNode.removeChild(te)}catch{try{te.outerHTML=H}catch{te.remove()}}},ri=function(te,ve){try{Fr(e.removed,{attribute:ve.getAttributeNode(te),from:ve})}catch{Fr(e.removed,{attribute:null,from:ve})}if(ve.removeAttribute(te),te==="is"&&!se[te])if(Ae||be)try{Qe(ve)}catch{}else try{ve.setAttribute(te,"")}catch{}},Yt=function(te){var ve,Se;if(it)te="<remove></remove>"+te;else{var tt=cc(te,/^[\r\n\t ]+/);Se=tt&&tt[0]}Ut==="application/xhtml+xml"&&St===Ot&&(te='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+te+"</body></html>");var Ht=z?z.createHTML(te):te;if(St===Ot)try{ve=new S().parseFromString(Ht,Ut)}catch{}if(!ve||!ve.documentElement){ve=B.createDocument(St,"template",null);try{ve.documentElement.innerHTML=ii?H:Ht}catch{}}var At=ve.body||ve.documentElement;return te&&Se&&At.insertBefore(n.createTextNode(Se),At.childNodes[0]||null),St===Ot?k.call(ve,We?"html":"body")[0]:We?ve.documentElement:At},Xt=function(te){return G.call(te.ownerDocument||te,te,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null,!1)},Dt=function(te){return te instanceof g&&(typeof te.nodeName!="string"||typeof te.textContent!="string"||typeof te.removeChild!="function"||!(te.attributes instanceof m)||typeof te.removeAttribute!="function"||typeof te.setAttribute!="function"||typeof te.namespaceURI!="string"||typeof te.insertBefore!="function"||typeof te.hasChildNodes!="function")},ut=function(te){return pn(o)==="object"?te instanceof o:te&&pn(te)==="object"&&typeof te.nodeType=="number"&&typeof te.nodeName=="string"},je=function(te,ve,Se){L[te]&&Lv(L[te],function(tt){tt.call(e,ve,Se,Q)})},Si=function(te){var ve;if(je("beforeSanitizeElements",te,null),Dt(te)||Vt(/[\u0080-\uFFFF]/,te.nodeName))return Qe(te),!0;var Se=w(te.nodeName);if(je("uponSanitizeElement",te,{tagName:Se,allowedTags:oe}),te.hasChildNodes()&&!ut(te.firstElementChild)&&(!ut(te.content)||!ut(te.content.firstElementChild))&&Vt(/<[/\w]/g,te.innerHTML)&&Vt(/<[/\w]/g,te.textContent)||Se==="select"&&Vt(/<template/i,te.innerHTML)||te.nodeType===7||Fe&&te.nodeType===8&&Vt(/<[/\w]/g,te.data))return Qe(te),!0;if(!oe[Se]||De[Se]){if(!De[Se]&&bn(Se)&&(ke.tagNameCheck instanceof RegExp&&Vt(ke.tagNameCheck,Se)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(Se)))return!1;if(ne&&!Ee[Se]){var tt=I(te)||te.parentNode,Ht=N(te)||te.childNodes;if(Ht&&tt)for(var At=Ht.length,Tt=At-1;Tt>=0;--Tt){var Ei=y(Ht[Tt],!0);Ei.__removalCount=(te.__removalCount||0)+1,tt.insertBefore(Ei,x(te))}}return Qe(te),!0}return te instanceof l&&!ni(te)||(Se==="noscript"||Se==="noembed"||Se==="noframes")&&Vt(/<\/no(script|embed|frames)/i,te.innerHTML)?(Qe(te),!0):(He&&te.nodeType===3&&(ve=te.textContent,ve=Ai(ve,V," "),ve=Ai(ve,M," "),ve=Ai(ve,q," "),te.textContent!==ve&&(Fr(e.removed,{element:te.cloneNode()}),te.textContent=ve)),je("afterSanitizeElements",te,null),!1)},Li=function(te,ve,Se){if(Pe&&(ve==="id"||ve==="name")&&(Se in n||Se in ce))return!1;if(!(et&&!Ne[ve]&&Vt($,ve))){if(!(Ve&&Vt(X,ve))){if(!se[ve]||Ne[ve]){if(!(bn(te)&&(ke.tagNameCheck instanceof RegExp&&Vt(ke.tagNameCheck,te)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(te))&&(ke.attributeNameCheck instanceof RegExp&&Vt(ke.attributeNameCheck,ve)||ke.attributeNameCheck instanceof Function&&ke.attributeNameCheck(ve))||ve==="is"&&ke.allowCustomizedBuiltInElements&&(ke.tagNameCheck instanceof RegExp&&Vt(ke.tagNameCheck,Se)||ke.tagNameCheck instanceof Function&&ke.tagNameCheck(Se))))return!1}else if(!$e[ve]){if(!Vt(J,Ai(Se,ee,""))){if(!((ve==="src"||ve==="xlink:href"||ve==="href")&&te!=="script"&&Pv(Se,"data:")===0&&Ze[te])){if(!(Re&&!Vt(R,Ai(Se,ee,"")))){if(Se)return!1}}}}}}return!0},bn=function(te){return te!=="annotation-xml"&&cc(te,ue)},fs=function(te){var ve,Se,tt,Ht;je("beforeSanitizeAttributes",te,null);var At=te.attributes;if(!(!At||Dt(te))){var Tt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:se};for(Ht=At.length;Ht--;){ve=At[Ht];var Ei=ve,yt=Ei.name,br=Ei.namespaceURI;if(Se=yt==="value"?ve.value:Mv(ve.value),tt=w(yt),Tt.attrName=tt,Tt.attrValue=Se,Tt.keepAttr=!0,Tt.forceKeepAttr=void 0,je("uponSanitizeAttribute",te,Tt),Se=Tt.attrValue,!Tt.forceKeepAttr&&(ri(yt,te),!!Tt.keepAttr)){if(!Ke&&Vt(/\/>/i,Se)){ri(yt,te);continue}He&&(Se=Ai(Se,V," "),Se=Ai(Se,M," "),Se=Ai(Se,q," "));var ps=w(te.nodeName);if(Li(ps,tt,Se)){if(Xe&&(tt==="id"||tt==="name")&&(ri(yt,te),Se=vt+Se),Fe&&Vt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Se)){ri(yt,te);continue}if(z&&pn(T)==="object"&&typeof T.getAttributeType=="function"&&!br)switch(T.getAttributeType(ps,tt)){case"TrustedHTML":{Se=z.createHTML(Se);break}case"TrustedScriptURL":{Se=z.createScriptURL(Se);break}}try{br?te.setAttributeNS(br,yt,Se):te.setAttribute(yt,Se),Dt(te)?Qe(te):uc(e.removed)}catch{}}}}je("afterSanitizeAttributes",te,null)}},Yi=function Ce(te){var ve,Se=Xt(te);for(je("beforeSanitizeShadowDOM",te,null);ve=Se.nextNode();)je("uponSanitizeShadowNode",ve,null),Si(ve),fs(ve),ve.content instanceof s&&Ce(ve.content);je("afterSanitizeShadowDOM",te,null)};return e.sanitize=function(Ce){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ve,Se,tt,Ht,At;if(ii=!Ce,ii&&(Ce="<!-->"),typeof Ce!="string"&&!ut(Ce))if(typeof Ce.toString=="function"){if(Ce=Ce.toString(),typeof Ce!="string")throw lo("dirty is not a string, aborting")}else throw lo("toString is not a function");if(!e.isSupported){if(pn(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof Ce=="string")return r.toStaticHTML(Ce);if(ut(Ce))return r.toStaticHTML(Ce.outerHTML)}return Ce}if(kt||Ie(te),e.removed=[],typeof Ce=="string"&&(re=!1),re){if(Ce.nodeName){var Tt=w(Ce.nodeName);if(!oe[Tt]||De[Tt])throw lo("root node is forbidden and cannot be sanitized in-place")}}else if(Ce instanceof o)ve=Yt("<!---->"),Se=ve.ownerDocument.importNode(Ce,!0),Se.nodeType===1&&Se.nodeName==="BODY"||Se.nodeName==="HTML"?ve=Se:ve.appendChild(Se);else{if(!Ae&&!He&&!We&&Ce.indexOf("<")===-1)return z&&me?z.createHTML(Ce):Ce;if(ve=Yt(Ce),!ve)return Ae?null:me?H:""}ve&&it&&Qe(ve.firstChild);for(var Ei=Xt(re?Ce:ve);tt=Ei.nextNode();)tt.nodeType===3&&tt===Ht||(Si(tt),fs(tt),tt.content instanceof s&&Yi(tt.content),Ht=tt);if(Ht=null,re)return Ce;if(Ae){if(be)for(At=C.call(ve.ownerDocument);ve.firstChild;)At.appendChild(ve.firstChild);else At=ve;return(se.shadowroot||se.shadowrootmod)&&(At=O.call(i,At,!0)),At}var yt=We?ve.outerHTML:ve.innerHTML;return We&&oe["!doctype"]&&ve.ownerDocument&&ve.ownerDocument.doctype&&ve.ownerDocument.doctype.name&&Vt(Yv,ve.ownerDocument.doctype.name)&&(yt="<!DOCTYPE "+ve.ownerDocument.doctype.name+`>
3
+ `+yt),He&&(yt=Ai(yt,V," "),yt=Ai(yt,M," "),yt=Ai(yt,q," ")),z&&me?z.createHTML(yt):yt},e.setConfig=function(Ce){Ie(Ce),kt=!0},e.clearConfig=function(){Q=null,kt=!1},e.isValidAttribute=function(Ce,te,ve){Q||Ie({});var Se=w(Ce),tt=w(te);return Li(Se,tt,ve)},e.addHook=function(Ce,te){typeof te=="function"&&(L[Ce]=L[Ce]||[],Fr(L[Ce],te))},e.removeHook=function(Ce){if(L[Ce])return uc(L[Ce])},e.removeHooks=function(Ce){L[Ce]&&(L[Ce]=[])},e.removeAllHooks=function(){L={}},e}var Zv=Sh();function Jv(r,e){const i=r.hooks??{};let n;for(n in i){const s=i[n];s!==void 0&&e.addHook(n,s)}}function ey(){return Zv()}function Ca(r={},e=ey){const i=e();Jv(r,i);const n=function(s,a){const o=a.value;if(a.oldValue===o)return;const l=`${o}`,c=a.arg,d=r.namedConfigurations,m=r.default??{};if(d&&c!==void 0){s.innerHTML=i.sanitize(l,d[c]??m);return}s.innerHTML=i.sanitize(l,m)};return{mounted:n,updated:n}}const ty={class:"th-filter-wrapper",ref:"filterRef"},iy={key:1,class:"list-content-wrapper"},ny={class:"btn-wrapper"},mc=t.defineComponent({__name:"ThFilter",props:{modelValue:{},list:{default:()=>[]},multiple:{type:Boolean,default:!1},tableWidth:{}},emits:["update:model-value","confirm"],setup(r,{emit:e}){const i=Ca(),{t:n}=Ue.useI18n(),s=r,a=e,o=t.computed(()=>s.list.some(z=>{var H;return(H=z.children)==null?void 0:H.length})),l=t.computed(()=>s.list.map(z=>{const H=(z.children||[]).map(U=>({label:U.label,value:U.value}));return{label:z.label,value:z.value,children:o.value?H:void 0}})),c=t.ref(!1);t.watch(()=>s.modelValue,z=>{s.multiple?d.value=z:S.value=z});const d=t.ref([]),m=z=>{d.value=z},g=t.ref([]),S=t.ref(null),T=z=>{S.value===z?S.value=null:S.value=z,y()},b=()=>{d.value=[],g.value=[],S.value=null,y()},y=()=>{let z=null;s.multiple?o.value?z=g.value:z=d.value:z=S.value,a("update:model-value",z),c.value=!0,t.nextTick(()=>{a("confirm"),c.value=!1})},x=t.computed(()=>d.value.length||g.value.length||S.value||s.modelValue),N=t.ref(null),I=async z=>{var B,G;const H=z.target.parentElement.parentElement;await t.nextTick();const U=H.querySelector("input");U.click(),await t.nextTick(),(B=U.change)==null||B.call(U,U),await t.nextTick(),(G=N.value)==null||G.$forceUpdate(),g.value=JSON.parse(JSON.stringify(g.value))},D=({data:z})=>t.h("span",{onclick:I},z.label);return(z,H)=>{const U=t.resolveComponent("ElCascaderPanel");return t.openBlock(),t.createElementBlock("div",ty,[t.createElementVNode("span",null,[t.renderSlot(z.$slots,"default")]),r.multiple?(t.openBlock(),t.createBlock(t.unref(A.OPopover),{key:0,visible:c.value,position:"bottom",wrapClass:"th-filter-popover",trigger:"click",anchor:!1},{target:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["filter-wrapper",x.value&&"has-checked"])},[t.createVNode(t.unref(A.OIcon),{class:"filter-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(oc))]),_:1})],2)]),default:t.withCtx(()=>[o.value?(t.openBlock(),t.createElementBlock("div",iy,[t.createVNode(U,{ref_key:"aref",ref:N,expandTrigger:"hover",renderLabel:D,modelValue:g.value,"onUpdate:modelValue":H[1]||(H[1]=B=>g.value=B),style:{width:"fit-content"},options:l.value,props:{multiple:!0,expandTrigger:"hover"}},null,8,["modelValue","options"])])):(t.openBlock(),t.createBlock(t.unref(A.OScroller),{key:0,class:"content-wrapper","show-type":"hover","disabled-x":""},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OCheckboxGroup),{direction:"v",onChange:m,modelValue:d.value,"onUpdate:modelValue":H[0]||(H[0]=B=>d.value=B)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,B=>(t.openBlock(),t.createBlock(t.unref(A.OCheckbox),{key:B.value,value:B.value},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("span",null,null,512),[[t.unref(i),B.label]])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]),_:1})),t.createVNode(t.unref(A.ODivider)),t.createElementVNode("div",ny,[t.createVNode(t.unref(A.OLink),{onClick:b},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("common.reset")),1)]),_:1}),t.createVNode(t.unref(A.OLink),{onClick:y},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("common.confirm")),1)]),_:1})])]),_:1},8,["visible"])):(t.openBlock(),t.createBlock(t.unref(A.ODropdown),{key:1,optionPosition:"bottom",optionWrapClass:"th-filter-dropdown",modelValue:S.value,"onUpdate:modelValue":H[3]||(H[3]=B=>S.value=B)},{dropdown:t.withCtx(()=>[l.value.length?(t.openBlock(),t.createBlock(t.unref(A.OScroller),{key:0,"disabled-x":"",style:{"max-height":"300px"},"show-type":"always"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.ODropdownItem),{style:t.normalizeStyle({"--table-width":r.tableWidth}),class:t.normalizeClass([{"is-active":r.modelValue===""}]),value:"''",label:t.unref(n)("common.all"),onClick:H[2]||(H[2]=B=>T(""))},null,8,["style","class","label"]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,B=>(t.openBlock(),t.createBlock(t.unref(A.ODropdownItem),{style:t.normalizeStyle({"--table-width":r.tableWidth}),class:t.normalizeClass([{"is-active":B.value===r.modelValue}]),key:B.value,value:B.value,onClick:G=>T(B.value)},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("span",null,null,512),[[t.unref(i),B.label]])]),_:2},1032,["style","class","value","onClick"]))),128))]),_:1})):t.createCommentVNode("",!0),l.value.length?t.createCommentVNode("",!0):t.renderSlot(z.$slots,"empty",{key:1})]),default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["filter-wrapper",x.value&&"has-checked"])},[t.createVNode(t.unref(A.OIcon),{class:"filter-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(oc))]),_:1})],2)]),_:3},8,["modelValue"]))],512)}}}),ry={class:"more-text-wrapper"},sy={key:0},ay={key:1},oy=t.defineComponent({__name:"MoreText",props:{text:{default:""},link:{type:Boolean,default:!1},lines:{default:3},show:{type:Boolean,default:!1}},setup(r){const e=r,{t:i}=Ue.useI18n(),n=t.ref(!1),s=t.ref(!1),a=t.ref(0),o=t.ref(null);t.onMounted(()=>{l()}),t.watch([()=>e.text,()=>e.show],()=>{l()});const l=()=>{t.nextTick(()=>{const d=o.value;if(d){const m=document.createRange();m.setStart(d,0),m.setEnd(d,d.childNodes.length),s.value=m.getBoundingClientRect().height>d.offsetHeight+10||d.scrollHeight>d.offsetHeight+10,a.value=m.getBoundingClientRect().height||d.scrollHeight}else s.value=!1})},c=()=>{e.link&&window.open(e.text)};return(d,m)=>(t.openBlock(),t.createElementBlock("div",ry,[t.createElementVNode("div",{class:t.normalizeClass(["more-text-content",r.link&&"is-link"]),ref_key:"contentRef",ref:o,style:t.normalizeStyle({"max-height":n.value?a.value+"px":"66px","-webkit-line-clamp":n.value?"initial":r.lines}),onClick:c},t.toDisplayString(r.text),7),s.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"more-text-btn",onClick:m[0]||(m[0]=g=>n.value=!n.value)},[n.value?(t.openBlock(),t.createElementBlock("div",ay,[t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("common.collapse")),1),t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronUp))]),_:1})])):(t.openBlock(),t.createElementBlock("div",sy,[t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("common.expand")),1),t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronDown))]),_:1})]))])):t.createCommentVNode("",!0)]))}}),ly=Ue._export_sfc(oy,[["__scopeId","data-v-4776f8a2"]]);var ea=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function fr(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function uy(r){if(Object.prototype.hasOwnProperty.call(r,"__esModule"))return r;var e=r.default;if(typeof e=="function"){var i=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};i.prototype=e.prototype}else i={};return Object.defineProperty(i,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var s=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(i,n,s.get?s:{enumerable:!0,get:function(){return r[n]}})}),i}var Xs={exports:{}},cy=Xs.exports,gc;function dy(){return gc||(gc=1,(function(r,e){(function(i,n){r.exports=n()})(cy,(function(){var i=1e3,n=6e4,s=36e5,a="millisecond",o="second",l="minute",c="hour",d="day",m="week",g="month",S="quarter",T="year",b="date",y="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,N=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var M=["th","st","nd","rd"],q=V%100;return"["+V+(M[(q-20)%10]||M[q]||M[0])+"]"}},D=function(V,M,q){var $=String(V);return!$||$.length>=M?V:""+Array(M+1-$.length).join(q)+V},z={s:D,z:function(V){var M=-V.utcOffset(),q=Math.abs(M),$=Math.floor(q/60),X=q%60;return(M<=0?"+":"-")+D($,2,"0")+":"+D(X,2,"0")},m:function V(M,q){if(M.date()<q.date())return-V(q,M);var $=12*(q.year()-M.year())+(q.month()-M.month()),X=M.clone().add($,g),R=q-X<0,ee=M.clone().add($+(R?-1:1),g);return+(-($+(q-X)/(R?X-ee:ee-X))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:g,y:T,w:m,d,D:b,h:c,m:l,s:o,ms:a,Q:S}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},H="en",U={};U[H]=I;var B="$isDayjsObject",G=function(V){return V instanceof j||!(!V||!V[B])},C=function V(M,q,$){var X;if(!M)return H;if(typeof M=="string"){var R=M.toLowerCase();U[R]&&(X=R),q&&(U[R]=q,X=R);var ee=M.split("-");if(!X&&ee.length>1)return V(ee[0])}else{var ue=M.name;U[ue]=M,X=ue}return!$&&X&&(H=X),X||!$&&H},k=function(V,M){if(G(V))return V.clone();var q=typeof M=="object"?M:{};return q.date=V,q.args=arguments,new j(q)},O=z;O.l=C,O.i=G,O.w=function(V,M){return k(V,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var j=(function(){function V(q){this.$L=C(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[B]=!0}var M=V.prototype;return M.parse=function(q){this.$d=(function($){var X=$.date,R=$.utc;if(X===null)return new Date(NaN);if(O.u(X))return new Date;if(X instanceof Date)return new Date(X);if(typeof X=="string"&&!/Z$/i.test(X)){var ee=X.match(x);if(ee){var ue=ee[2]-1||0,J=(ee[7]||"0").substring(0,3);return R?new Date(Date.UTC(ee[1],ue,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,J)):new Date(ee[1],ue,ee[3]||1,ee[4]||0,ee[5]||0,ee[6]||0,J)}}return new Date(X)})(q),this.init()},M.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},M.$utils=function(){return O},M.isValid=function(){return this.$d.toString()!==y},M.isSame=function(q,$){var X=k(q);return this.startOf($)<=X&&X<=this.endOf($)},M.isAfter=function(q,$){return k(q)<this.startOf($)},M.isBefore=function(q,$){return this.endOf($)<k(q)},M.$g=function(q,$,X){return O.u(q)?this[$]:this.set(X,q)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(q,$){var X=this,R=!!O.u($)||$,ee=O.p(q),ue=function(Ne,Ve){var et=O.w(X.$u?Date.UTC(X.$y,Ve,Ne):new Date(X.$y,Ve,Ne),X);return R?et:et.endOf(d)},J=function(Ne,Ve){return O.w(X.toDate()[Ne].apply(X.toDate("s"),(R?[0,0,0,0]:[23,59,59,999]).slice(Ve)),X)},oe=this.$W,Z=this.$M,se=this.$D,_e="set"+(this.$u?"UTC":"");switch(ee){case T:return R?ue(1,0):ue(31,11);case g:return R?ue(1,Z):ue(0,Z+1);case m:var ke=this.$locale().weekStart||0,De=(oe<ke?oe+7:oe)-ke;return ue(R?se-De:se+(6-De),Z);case d:case b:return J(_e+"Hours",0);case c:return J(_e+"Minutes",1);case l:return J(_e+"Seconds",2);case o:return J(_e+"Milliseconds",3);default:return this.clone()}},M.endOf=function(q){return this.startOf(q,!1)},M.$set=function(q,$){var X,R=O.p(q),ee="set"+(this.$u?"UTC":""),ue=(X={},X[d]=ee+"Date",X[b]=ee+"Date",X[g]=ee+"Month",X[T]=ee+"FullYear",X[c]=ee+"Hours",X[l]=ee+"Minutes",X[o]=ee+"Seconds",X[a]=ee+"Milliseconds",X)[R],J=R===d?this.$D+($-this.$W):$;if(R===g||R===T){var oe=this.clone().set(b,1);oe.$d[ue](J),oe.init(),this.$d=oe.set(b,Math.min(this.$D,oe.daysInMonth())).$d}else ue&&this.$d[ue](J);return this.init(),this},M.set=function(q,$){return this.clone().$set(q,$)},M.get=function(q){return this[O.p(q)]()},M.add=function(q,$){var X,R=this;q=Number(q);var ee=O.p($),ue=function(Z){var se=k(R);return O.w(se.date(se.date()+Math.round(Z*q)),R)};if(ee===g)return this.set(g,this.$M+q);if(ee===T)return this.set(T,this.$y+q);if(ee===d)return ue(1);if(ee===m)return ue(7);var J=(X={},X[l]=n,X[c]=s,X[o]=i,X)[ee]||1,oe=this.$d.getTime()+q*J;return O.w(oe,this)},M.subtract=function(q,$){return this.add(-1*q,$)},M.format=function(q){var $=this,X=this.$locale();if(!this.isValid())return X.invalidDate||y;var R=q||"YYYY-MM-DDTHH:mm:ssZ",ee=O.z(this),ue=this.$H,J=this.$m,oe=this.$M,Z=X.weekdays,se=X.months,_e=X.meridiem,ke=function(Ve,et,Re,Ke){return Ve&&(Ve[et]||Ve($,R))||Re[et].slice(0,Ke)},De=function(Ve){return O.s(ue%12||12,Ve,"0")},Ne=_e||function(Ve,et,Re){var Ke=Ve<12?"AM":"PM";return Re?Ke.toLowerCase():Ke};return R.replace(N,(function(Ve,et){return et||(function(Re){switch(Re){case"YY":return String($.$y).slice(-2);case"YYYY":return O.s($.$y,4,"0");case"M":return oe+1;case"MM":return O.s(oe+1,2,"0");case"MMM":return ke(X.monthsShort,oe,se,3);case"MMMM":return ke(se,oe);case"D":return $.$D;case"DD":return O.s($.$D,2,"0");case"d":return String($.$W);case"dd":return ke(X.weekdaysMin,$.$W,Z,2);case"ddd":return ke(X.weekdaysShort,$.$W,Z,3);case"dddd":return Z[$.$W];case"H":return String(ue);case"HH":return O.s(ue,2,"0");case"h":return De(1);case"hh":return De(2);case"a":return Ne(ue,J,!0);case"A":return Ne(ue,J,!1);case"m":return String(J);case"mm":return O.s(J,2,"0");case"s":return String($.$s);case"ss":return O.s($.$s,2,"0");case"SSS":return O.s($.$ms,3,"0");case"Z":return ee}return null})(Ve)||ee.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(q,$,X){var R,ee=this,ue=O.p($),J=k(q),oe=(J.utcOffset()-this.utcOffset())*n,Z=this-J,se=function(){return O.m(ee,J)};switch(ue){case T:R=se()/12;break;case g:R=se();break;case S:R=se()/3;break;case m:R=(Z-oe)/6048e5;break;case d:R=(Z-oe)/864e5;break;case c:R=Z/s;break;case l:R=Z/n;break;case o:R=Z/i;break;default:R=Z}return X?R:O.a(R)},M.daysInMonth=function(){return this.endOf(g).$D},M.$locale=function(){return U[this.$L]},M.locale=function(q,$){if(!q)return this.$L;var X=this.clone(),R=C(q,$,!0);return R&&(X.$L=R),X},M.clone=function(){return O.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},V})(),L=j.prototype;return k.prototype=L,[["$ms",a],["$s",o],["$m",l],["$H",c],["$W",d],["$M",g],["$y",T],["$D",b]].forEach((function(V){L[V[1]]=function(M){return this.$g(M,V[0],V[1])}})),k.extend=function(V,M){return V.$i||(V(M,j,k),V.$i=!0),k},k.locale=C,k.isDayjs=G,k.unix=function(V){return k(1e3*V)},k.en=U[H],k.Ls=U,k.p={},k}))})(Xs)),Xs.exports}var hy=dy();const ye=fr(hy),ht=(r=new Date,e="YYYY-MM-DD")=>{let i=r;return i||(i=new Date),ye(new Date(i)).isValid()?ye(new Date(i)).format(e):i},fy=(r,e,i="label",n="value")=>{const s=e.find(a=>a[n]===r);return(s==null?void 0:s[i])||r},py=r=>{const e=/\d+/g,i=r.match(e)||"";return parseInt(i[0])},Nn=r=>{const e=r.split(":");if(e.length>3||!e.length)return 0;let i=0,n=1;for(;e.length>0;){const s=e.pop();i+=parseInt(s)*n,n*=60}return i},po=r=>r<0?"Invalid number":r>=10?`${r}`:`0${r}`,vc=r=>{if(r>1440*60)return"Invalid date";const e=Math.floor(r/60/60),i=Math.floor((r-e*60*60)/60),n=r%60;return`${po(e)}:${po(i)}:${po(n)}`},Jo=r=>{const e=r.split(":"),i=e[e.length-3]?parseInt(e[e.length-3]):0,n=parseInt(e[e.length-2]),s=parseFloat(e[e.length-1]);return i*60*60+n*60+s},my=r=>{const e=Math.floor(r/3600),i=Math.floor((r-e*3600)/60),n=Math.floor(r-e*3600-i*60);return`${e?`${e.toString().padStart(2,"0")}:`:""}${i.toString().padStart(2,"0")}:${n.toString().padStart(2,"0")}`},Fn=()=>{const{t:r,locale:e}=Ue.useI18n(),i=t.computed(()=>[{label:r("meeting.meetingTypeAll"),value:Be.ALL,icon:dv},{label:r("meeting.meetingTypeMeet"),value:Be.MEETING,icon:Il,color:ao.meeting,zIndex:3},{label:r("meeting.meetingTypeEvents"),value:Be.EVENTS,icon:Al,color:ao.events,zIndex:2},{label:r("meeting.meetingTypeSummit"),value:Be.SUMMIT,icon:bh,color:ao.summit,zIndex:1}]),n=t.computed(()=>[{label:r("meeting.day0"),value:mn,max:7},{label:r("meeting.week0"),value:vn,max:2},{label:r("meeting.month0"),value:tn,max:1}]),s=t.computed(()=>[{label:r("meeting.day"),value:mn,max:7},{label:r("meeting.week"),value:vn,max:2},{label:r("meeting.month"),value:tn,max:1}]),a=t.computed(()=>[r("meeting.sunday"),r("meeting.monday"),r("meeting.tuesday"),r("meeting.wednesday"),r("meeting.thursday"),r("meeting.friday"),r("meeting.saturday")]),o=t.computed(()=>{const g=[];for(let S=1;S<=7;S++){const T=S%7;g.push({value:T,label:a.value[T]})}return g});return{t:r,locale:e,meetingTabs:i,cycleTypeOptions0:n,cycleTypeOptions:s,weekDay:a,intervalWeekOptions:o,getPointStr:(g,S)=>g===vn?S.sort((T,b)=>{const y=o.value.findIndex(N=>N.value===T),x=o.value.findIndex(N=>N.value===b);return y-x}).map(T=>{const b=o.value.find(y=>y.value===T);return(b==null?void 0:b.label)||String(T)}).join(r("meeting.cycleSplit")):g===tn?S.join(r("meeting.cycleSplit")):"",getConfig:(g,S)=>{let T=g;const b=i.value.find(y=>y.value===T);return(b==null?void 0:b[S])||""},getPlatformLabel:g=>{switch(g){case"WELINK":return"WeLink";case"ZOOM":return"Zoom";case"TENCENT":return e.value==="zh"?"腾讯会议":"Tencent";default:return g}},getWeekFromDate:g=>a.value[ye(g).day()]}},gy={class:"o-meeting-detail"},vy={class:"label"},yy={key:2},_y={key:3,class:"value"},Ty={key:0,class:"extra"},by={class:"label"},Cy=t.defineComponent({__name:"OMeetingDetail",props:{data:{},from:{},show:{type:Boolean},page:{}},setup(r,{expose:e}){const i=r,{t:n,getPlatformLabel:s}=Fn(),a=t.computed(()=>[{label:n("meeting.meetingDetail"),key:"agenda",ellipsis:!0},{label:n("meeting.meetingCreator"),key:"sponsor"},{label:n("meeting.meetingDate2"),key:"timeRange",extra:"date"},{label:n("meeting.meetingId"),key:"mid"},{label:n("meeting.meetingPlatform"),key:"platform"},{label:n("meeting.meetingLink"),key:"join_url",isLink:!0},{label:n("meeting.meetingEtherpad"),key:"etherpad",isLink:!0},{label:n("meeting.meetingReplay"),key:"replay_url",isLink:!0}].slice(0,i.from==="my"?7:8)),o=t.computed(()=>{var T;const S=!!((T=i.data.live_url)!=null&&T.length);return[{label:n("meeting.activityDetail2"),key:"agenda",ellipsis:!0},{label:n("meeting.startDate"),key:"start_date_time"},{label:n("meeting.endDate"),key:"end_date_time"},{label:n("meeting.registrationDeadline"),key:"register_end_date"},{label:n(S?"meeting.livePlatform":"meeting.activityAddress"),key:S?"live_url":"address"},{label:n("meeting.activityDetailUrl"),key:"content_url",isLink:!0},{label:n("meeting.activityApprover"),key:"approver"},{label:n("meeting.reviewNotesLabel"),key:"approve_record",isRecord:!0}].slice(0,i.from==="home"?5:8)}),l=t.computed(()=>{var T;const S=!!((T=i.data.live_url)!=null&&T.length);return[{label:n("meeting.activityType"),key:"activity_type",isType:!0},{label:n(S?"meeting.livePlatform":"meeting.activityAddress"),key:S?"live_url":"address"},{label:n("meeting.startDate"),key:"start_date_time"},{label:n("meeting.endDate"),key:"end_date_time"},{label:n("meeting.registrationDeadline"),key:"register_end_date"},{label:n("meeting.registrationUrl"),key:"register_url",isLink:!0},{label:n("meeting.activityDetailUrl"),key:"content_url",isLink:!0},{label:n("meeting.activityApprover"),key:"approver"},{label:n("meeting.reviewNotesLabel"),key:"approve_record",isRecord:!0}]}),c=S=>i.data[S],d=t.computed(()=>i.data.type===Be.EVENTS?i.page===Be.APPROVAL?l.value:o.value:i.data.type===Be.SUMMIT?o.value:a.value),m=t.ref([]);return e({copyInfo:()=>{try{let S=`${n("meeting.meetingTopic")+i.data.topic}
4
4
  `;return S+=[...m.value].reduce((T,b)=>`${T}${b.textContent}
5
- `,""),navigator.clipboard.writeText(S),Promise.resolve()}catch(S){return Promise.reject(S)}}}),(S,T)=>(t.openBlock(),t.createElementBlock("div",gy,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.value,(b,y)=>{var x,N,I;return t.openBlock(),t.createElementBlock("div",{ref_for:!0,ref_key:"domRef",ref:m,class:t.normalizeClass(["label-item",{"record-item":b.isRecord&&((x=c(b.key))==null?void 0:x.length),"link-item":b.isLink,"is-empty":!((N=c(b.key))!=null&&N.length),[`label-item_${r.data.id}`]:!0,[`type_${r.data.type}`]:!0}]),key:y},[c(b.key)&&!b.isRecord?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("span",vy,t.toDisplayString(b.label),1),b.ellipsis?(t.openBlock(),t.createBlock(ly,{key:0,show:r.show,text:c(b.key)||"-"},null,8,["show","text"])):b.isLink?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:1,target:"_blank",class:"value",color:"primary","hover-underline":"",href:c(b.key)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c(b.key)),1)]),_:2},1032,["href"])):b.key==="platform"?(t.openBlock(),t.createElementBlock("span",yy,t.toDisplayString(t.unref(s)(c(b.key))),1)):(t.openBlock(),t.createElementBlock("span",_y,[b.extra?(t.openBlock(),t.createElementBlock("i",Ty,t.toDisplayString(c(b.extra)),1)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(c(b.key)||"-"),1)]))],64)):t.createCommentVNode("",!0),b.isRecord&&((I=c(b.key))!=null&&I.length)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("span",by,t.toDisplayString(b.label),1),t.createElementVNode("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c(b.key),D=>(t.openBlock(),t.createElementBlock("p",{key:D.create_time,class:"value"},t.toDisplayString(D.reason)+"   "+t.toDisplayString(t.unref(ht)(D.create_time,"YYYY/MM/DD HH:mm:ss"))+" "+t.toDisplayString(D.action===1?t.unref(n)("meeting.approveReview"):t.unref(n)("meeting.rejectReview")),1))),128))])],64)):t.createCommentVNode("",!0)],2)}),128))]))}}),ts=$e._export_sfc(Cy,[["__scopeId","data-v-33bc21b3"]]),xy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"32",viewBox:"0 0 30 32"};function Sy(r,e){return t.openBlock(),t.createElementBlock("svg",xy,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M12.983 5.523c0.341 0 0.667 0.14 0.902 0.388l6.569 6.917c0.142 0.15 0.243 0.331 0.297 0.526 0.054 0.141 0.085 0.295 0.085 0.457 0 0.108-0.014 0.213-0.040 0.314l-0 13.942c0 1.964-1.592 3.556-3.556 3.556h-13.296c-1.964 0-3.556-1.592-3.556-3.556v-18.987c0-1.964 1.592-3.556 3.556-3.556zM11.528 8.011l-7.582 0.001c-0.589 0-1.067 0.478-1.067 1.067v18.987c0 0.589 0.478 1.067 1.067 1.067h13.296c0.589 0 1.067-0.478 1.067-1.067l-0.002-13.012-3.149 0.002c-1.935 0-3.515-1.547-3.555-3.482l-0.075-3.561zM9.777 24.987c0.491 0 0.889 0.398 0.889 0.889s-0.398 0.889-0.889 0.889h-4.432c-0.491 0-0.889-0.398-0.889-0.889s0.398-0.889 0.889-0.889h4.432zM26.256 0.269c1.964 0 3.556 1.592 3.556 3.556v18.012c0 1.964-1.592 3.556-3.556 3.556h-2.586c-0.687 0-1.244-0.557-1.244-1.244s0.557-1.244 1.244-1.244h2.586c0.589 0 1.067-0.478 1.067-1.067v-18.012c0-0.589-0.478-1.067-1.067-1.067h-13.27c-0.496 0-0.912 0.338-1.032 0.796l-2.514 0.002c0.137-1.838 1.672-3.287 3.546-3.287h13.27zM12.112 21.432c0.491 0 0.889 0.398 0.889 0.889s-0.398 0.889-0.889 0.889h-6.743c-0.491 0-0.889-0.398-0.889-0.889s0.398-0.889 0.889-0.889h6.743zM14.234 17.876c0.491 0 0.889 0.398 0.889 0.889s-0.398 0.889-0.889 0.889h-8.853c-0.491 0-0.889-0.398-0.889-0.889s0.398-0.889 0.889-0.889h8.853zM14.052 9.7l0.039 1.821c0.012 0.58 0.486 1.045 1.066 1.045l1.617-0.002-2.722-2.864z"},null,-1)])])}const Nl={name:"meeting-icon-copy",render:Sy},Ey={class:"meet-title-left"},ky=["title"],wy={class:"text"},Dy={key:0,class:"tag-wrapper"},Ay={class:"start-time"},Iy={class:"calendar-info"},Eh=t.defineComponent({__name:"OMeetingCalendarList",props:{list:{default:()=>[]},groupType:{}},setup(r){const{activityTypeMap:e}=ba(),i=r,{t:n,locale:s,getConfig:a,getPointStr:o}=Fn(),l=t.ref([]),c=A.useMessage(null),d=async y=>{await l.value[y].copyInfo(),c.success({content:n("common.copySuccess")})},m=t.ref([]),g=t.computed(()=>({SIG_GROUP:`${i.groupType===vi.GROUP?n("meeting.groups"):n("meeting.sigs")}: `,NEW_DATE:n("meeting.latestMeeting"),EMPTY_TEXT:n("meeting.meetingEmptyText"),LEARN_MORE:n("common.seeMore"),JOIN_MEETING:n("meeting.joinMeeting"),SIGN:n("meeting.sign"),DETAILS:n("meeting.detail")})),S=t.ref(),T=new ResizeObserver(y=>{for(let x of y){const{height:N}=x.contentRect;x.target.classList.remove("hidden-divider"),N>=30&&x.target.classList.add("hidden-divider")}});t.watch(()=>i.list,()=>{i.list.length===1?m.value=[i.list[0].id]:m.value=[],t.nextTick(()=>{var y;(y=S.value)==null||y.forEach(x=>{T.observe(x)})})});const b=t.computed(()=>i.list.map(y=>{var $,X;const x=y.type;let N="";if(x!==Be.MEETING){let R=($=e.value.get(y.activity_type))==null?void 0:$.label;return y.start&&y.end?y.end_date===y.start_date?N=`${ht(y.start_date)} ${y.start}-${y.end}`:N=`${ht(y.start_date)} ${y.start}-${ht(y.end_date)} ${y.end}`:N=`${ht(y.start_date,"YYYY/MM/DD HH:mm")} ${ht(y.end_date,"YYYY/MM/DD HH:mm")}`,{...y,activity_type:R,dateRange:N}}const{is_cycle:I,date:D,start:z,end:H,cycle_start_date:U,cycle_end_date:B,cycle_start:G,cycle_end:C,cycle_type:k,cycle_interval:O,cycle_point:j}=y;N=`${ht(D)} ${z} - ${H}`,I&&(N=`${ht(U)} - ${ht(B)}`);let L=`${z} - ${H}`,V=null,M=!1;const q=((X=y.obs_data)==null?void 0:X.filter(R=>R.text_video_url))||[];if(I){let R="";k===mn&&(R=n("meeting.cycleDay")),k===vn&&(O>1?R=n("meeting.cycleWeek.other",[o(k,j),O]):R=n("meeting.cycleWeek.one",[o(k,j)])),k===tn&&(R=n("meeting.cycleMonth",[o(k,j)])),L=n("meeting.cycleMeetingText2",{startDate:U,endDate:B,startTime:G,endTime:C,cycleType:R}),M=q.some(ee=>{var ue;return ee.sub_id===((ue=y.cycle_sub.find(J=>J.date===D))==null?void 0:ue.sub_id)})}else M=q.length>0;return M&&(V=`${location.origin}/${s.value}/video/${y.group_name}/${y.mid}/${D}`),{...y,dateRange:N,timeRange:L,replay_url:V}}));return(y,x)=>{var N,I;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["o-meeting-calendar-list",(N=b.value)!=null&&N.length?"":"is-empty"])},[(I=b.value)!=null&&I.length?(t.openBlock(),t.createBlock(t.unref(A.OCollapse),{key:1,modelValue:m.value,"onUpdate:modelValue":x[0]||(x[0]=D=>m.value=D),style:{"--collapse-padding":"0"}},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,(D,z)=>(t.openBlock(),t.createBlock(t.unref(A.OCollapseItem),{key:D.id,value:D.id},{title:t.withCtx(()=>[t.createElementVNode("div",Ey,[t.createElementVNode("div",{class:"meet-title",title:D.topic||D.name},[t.createVNode(t.unref(A.OIcon),{style:t.normalizeStyle({backgroundColor:`${t.unref(a)(D.type,"color")}`})},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(a)(D.type,"icon"))))]),_:2},1032,["style"]),t.createElementVNode("div",wy,t.toDisplayString(D.topic||D.name||D.title),1),D.is_cycle?(t.openBlock(),t.createElementBlock("div",Dy,[t.createVNode(t.unref(A.OTag),{color:"primary",variant:"outline"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("meeting.cycle")),1)]),_:1})])):t.createCommentVNode("",!0)],8,ky),t.createElementVNode("div",{class:"meet-info",ref_for:!0,ref_key:"meetInfoRef",ref:S},[t.createElementVNode("span",Ay,[t.createElementVNode("span",null,t.toDisplayString(D.dateRange),1)]),t.createVNode(t.unref(A.ODivider),{direction:"v"}),t.createElementVNode("div",null,[D.group_name?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(g.value.SIG_GROUP)+" "+t.toDisplayString(D.group_name),1)],64)):t.createCommentVNode("",!0),D.activity_type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(D.activity_type),1)],64)):t.createCommentVNode("",!0)])],512),D.url?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,href:D.url,target:"_blank",class:"jump-detail-link"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(g.value.LEARN_MORE),1)]),_:1},8,["href"])):t.createCommentVNode("",!0),D.join_url?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:1,href:D.join_url,target:"_blank",class:"jump-detail-link"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(g.value.JOIN_MEETING),1)]),_:1},8,["href"])):t.createCommentVNode("",!0),D.content_url?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:2,href:D.content_url,target:"_blank",class:"jump-detail-link"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(g.value.DETAILS),1)]),_:1},8,["href"])):t.createCommentVNode("",!0),D.register_url?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:3,href:D.register_url,target:"_blank",class:"jump-detail-link"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(g.value.SIGN),1)]),_:1},8,["href"])):t.createCommentVNode("",!0)]),t.createVNode(t.unref(A.OIcon),{onClick:t.withModifiers(()=>d(z),["stop"]),class:"copy-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Nl))]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createElementVNode("div",Iy,[t.createVNode(ts,{show:m.value.includes(D.id),data:D,ref_for:!0,ref:H=>l.value[z]=H,from:"home"},null,8,["show","data"])])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])):t.renderSlot(y.$slots,"empty",{key:0})],2)}}}),Ny={class:"o-meeting-calendar"},Oy={class:"calendar-body"},By={class:"calender-header-left"},Ly={class:"left-title"},Py={class:"month-date"},My={class:"right-title"},Ry=["onClick"],Vy={class:"day-box"},Fy={class:"icon-box"},$y={class:"detail-list"},Uy={class:"current-day"},zy={class:"right-title"},Hy={class:"title-list"},qy="2021-01-01",yc=t.defineComponent({__name:"OMeetingCalendar",props:{getDateListRequest:{},getMeetingListRequest:{},getSummitListRequest:{default:async()=>[]},getSummitDatesRequest:{},getEventsListRequest:{default:async()=>[]},getEventsDatesRequest:{},hiddenEvents:{type:Boolean,default:!1},hiddenSummit:{type:Boolean,default:!1},groupType:{default:vi.SIG},groups:{default:()=>[]}},setup(r){const e=r,{t:i,locale:n,meetingTabs:s,getConfig:a}=Fn(),o=t.computed(()=>n.value===$e.Locales.EN),l=t.ref(""),c=t.ref([]),d=t.ref([]),m=t.ref([]),g=t.ref([]),S=t.ref([]),T=t.ref([]),b=t.ref([]),y=t.ref(Be.ALL),x=t.computed(()=>{let J=s.value;return e.hiddenEvents&&(J=J.filter(oe=>oe.value!==Be.EVENTS)),e.hiddenSummit&&(J=J.filter(oe=>oe.value!==Be.SUMMIT)),J.filter(oe=>oe.value!==Be.ALL).length===1?[]:J});t.watch(()=>x.value,()=>{var J;y.value=((J=x.value[0])==null?void 0:J.value)??Be.MEETING});const N=t.ref(),I=t.ref("407px"),D=t.ref(!1),z=t.ref(""),H=t.ref(!1),U=t.ref(""),B=async J=>{if(e.getSummitListRequest){const oe=await e.getSummitListRequest(J);d.value=(oe||[]).map(Z=>({...Z,type:Be.SUMMIT,start_date_time:`${ht(Z.start_date)} ${Z.start}`,end_date_time:`${ht(Z.end_date)} ${Z.end}`}))}else d.value=[]},G=async J=>{if(e.getEventsListRequest){const oe=await e.getEventsListRequest(J);g.value=(oe||[]).map(Z=>({...Z,type:Be.EVENTS,start_date_time:`${ht(Z.start_date)} ${Z.start}`,end_date_time:`${ht(Z.end_date)} ${Z.end}`}))}else g.value=[]},C=async J=>{e.getDateListRequest&&e.getDateListRequest(J,U.value||"").then(oe=>{c.value=oe}),e.getEventsDatesRequest&&e.getEventsDatesRequest(J).then(oe=>{S.value=oe}),e.getSummitDatesRequest&&e.getSummitDatesRequest(J).then(oe=>{m.value=oe})},k=async J=>{if(e.getMeetingListRequest&&J.date)try{const oe=await e.getMeetingListRequest(J.date,U.value,"");b.value=oe.map(Z=>({...Z,time:`${Z.start}-${Z.end}`,type:Be.MEETING,date:Z.date||J.date})).sort((Z,se)=>{var _e,ke;return parseInt((_e=Z.start||Z.cycle_start)==null?void 0:_e.replace(":",""))-parseInt(se.end||((ke=se.cycle_end)==null?void 0:ke.replace(":","")))})}catch{b.value=[]}},O=t.computed(()=>[...b.value,...g.value.filter(J=>{var oe;return!ye(J.start_date).isAfter(ye(z.value))&&!ye(z.value).isAfter(ye(J.end_date))||((oe=J.dates)==null?void 0:oe.includes(z.value))}),...d.value.filter(J=>{var oe;return(oe=J.dates)==null?void 0:oe.includes(z.value)})].filter(J=>y.value===Be.ALL?!0:J.type===y.value)),j=async J=>{const oe=ye(J).format("YYYY-MM-DD");if(z.value=oe,B(oe),G(oe),C(oe),T.value=[...new Set([...c.value,...m.value,...S.value])].flat().sort((Z,se)=>ye(Z).isAfter(ye(se))?1:-1),!J)if(!T.value.length)l.value=ht(new Date);else{let Z=[...T.value].reverse().find(se=>ye().isAfter(ye(se)));Z||(Z=T.value.find(se=>ye(se).isAfter(ye()))),l.value=ht(Z)}k({date:oe,type:y.value})},L=fi.useDebounceFn((J,oe)=>{if(H.value){H.value=!1;return}if(new Date(J).getTime()/1e3<1610380800){oe==null||oe.stopPropagation();return}j(J)},300),V=(J,oe)=>{if(ht(oe)===ht(qy)&&J==="prev-month"){D.value=!0;return}D.value=!1,N.value.selectDate(J),L(ht(N.value.selectedDay))},M=()=>{t.nextTick(()=>{k({date:z.value,type:y.value}),C(z.value)})},q=J=>J.replace(/^0+(?=\d)/,""),$=J=>{new MutationObserver(function(){I.value=`${J.offsetHeight-2}px`}).observe(J,{childList:!0,subtree:!0,characterData:!0})},X=async()=>{const J=document.querySelector(".calendar-body .el-calendar__body");J&&($(J),I.value=`${J.offsetHeight-2}px`)};t.onMounted(()=>{X(),j()});const R=t.watch(()=>T.value.length,()=>{A.isClient&&!z.value&&t.nextTick(()=>{const J=document.querySelector(".is-today .out-box");J&&(H.value=!0,J.click(),R())})}),ee=J=>o.value?J.split(" ").reverse().join(" "):J,ue=(J,oe)=>J===Be.MEETING?[Be.ALL,Be.MEETING].includes(y.value)&&c.value.includes(oe):J===Be.SUMMIT?[Be.ALL,Be.SUMMIT].includes(y.value)&&m.value.includes(oe):J===Be.EVENTS?[Be.ALL,Be.EVENTS].includes(y.value)&&S.value.includes(oe):!1;return(J,oe)=>(t.openBlock(),t.createElementBlock("div",Ny,[t.createElementVNode("div",Oy,[t.createVNode(t.unref(rt.ElCalendar),{ref_key:"calendar",ref:N,class:"calender"},{header:t.withCtx(({date:Z})=>[t.createElementVNode("div",By,[t.createElementVNode("div",Ly,[t.createVNode(t.unref(A.OIcon),{onClick:se=>V("prev-month",Z)},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronLeft),{class:t.normalizeClass({disable:D.value})},null,8,["class"])]),_:1},8,["onClick"]),t.createElementVNode("span",Py,t.toDisplayString(ee(Z)),1),t.createVNode(t.unref(A.OIcon),{onClick:se=>V("next-month",Z)},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1},8,["onClick"])]),t.createVNode(t.unref(A.OSelect),{modelValue:U.value,"onUpdate:modelValue":oe[0]||(oe[0]=se=>U.value=se),placeholder:t.unref(i)(r.groupType===t.unref(vi).GROUP?"meeting.allGroups":"meeting.allSigs"),clearable:"",onChange:M},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.groups,se=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{value:se,key:se},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(se),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"])]),t.createElementVNode("div",My,[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.latestMeeting"))+"  ",1),t.createElementVNode("span",null,t.toDisplayString(t.unref(ye)(l.value).format("YYYY/MM/DD")),1)])]),"date-cell":t.withCtx(({data:Z})=>[t.createElementVNode("div",{class:t.normalizeClass(["out-box",{"has-calender":T.value.includes(Z.day)}]),onClick:se=>t.unref(L)(Z.day,se)},[t.createElementVNode("div",Vy,[t.createElementVNode("p",{class:t.normalizeClass([Z.isSelected?"is-selected":"","date-calender"])},t.toDisplayString(q(Z.day.split("-").at(-1)||"")),3),t.createElementVNode("div",Fy,[ue(t.unref(Be).MEETING,Z.day)?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0,class:"meeting",style:t.normalizeStyle({zIndex:t.unref(a)(t.unref(Be).MEETING,"zIndex"),backgroundColor:t.unref(a)(t.unref(Be).MEETING,"color")})},{default:t.withCtx(()=>[t.createVNode(t.unref(Il))]),_:1},8,["style"])):t.createCommentVNode("",!0),ue(t.unref(Be).EVENTS,Z.day)?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:1,class:"events",style:t.normalizeStyle({zIndex:t.unref(a)(t.unref(Be).EVENTS,"zIndex"),backgroundColor:t.unref(a)(t.unref(Be).EVENTS,"color")})},{default:t.withCtx(()=>[t.createVNode(t.unref(Al))]),_:1},8,["style"])):t.createCommentVNode("",!0),ue(t.unref(Be).SUMMIT,Z.day)?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:2,class:"summit",style:t.normalizeStyle({zIndex:t.unref(a)(t.unref(Be).SUMMIT,"zIndex"),backgroundColor:t.unref(a)(t.unref(Be).SUMMIT,"color")})},{default:t.withCtx(()=>[t.createVNode(t.unref(bh))]),_:1},8,["style"])):t.createCommentVNode("",!0)])])],10,Ry)]),_:1},512),t.createElementVNode("div",$y,[t.createElementVNode("div",Uy,[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.latestMeeting"))+"  ",1),t.createElementVNode("span",null,t.toDisplayString(t.unref(ye)(z.value).format("YYYY/MM/DD")),1)]),t.createElementVNode("div",zy,[t.createElementVNode("div",Hy,[t.createVNode(t.unref(A.OSelect),{modelValue:U.value,"onUpdate:modelValue":oe[1]||(oe[1]=Z=>U.value=Z),placeholder:t.unref(i)(r.groupType===t.unref(vi).GROUP?"meeting.allGroups":"meeting.allSigs"),clearable:"",onChange:M},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.groups,Z=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{value:Z,key:Z},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(Z),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"]),t.createVNode(t.unref(A.OTab),{modelValue:y.value,"onUpdate:modelValue":oe[2]||(oe[2]=Z=>y.value=Z),line:!1},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(x.value,Z=>(t.openBlock(),t.createBlock(t.unref(A.OTabPane),{key:Z.value,value:Z.value},{nav:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(Z.icon)))]),_:2},1024),t.createTextVNode(" "+t.toDisplayString(Z.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])]),t.createElementVNode("div",null,[t.createVNode(t.unref(A.OScroller),{class:"meeting-list","show-type":"hover",size:"small",style:t.normalizeStyle({"--height":I.value})},{default:t.withCtx(()=>[t.createVNode(Eh,{list:O.value,groupType:r.groupType},{empty:t.withCtx(()=>[t.renderSlot(J.$slots,"empty")]),_:3},8,["list","groupType"])]),_:3},8,["style"])])])])]))}}),jy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function Gy(r,e){return t.openBlock(),t.createElementBlock("svg",jy,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M16 0.371c1.623 0 3.214 0.248 4.731 0.729 0.59 0.187 0.916 0.817 0.729 1.406s-0.817 0.916-1.406 0.729c-1.299-0.412-2.662-0.624-4.054-0.624-7.394 0-13.389 5.994-13.389 13.389s5.994 13.389 13.389 13.389c7.394 0 13.389-5.994 13.389-13.389 0-4.287-2.027-8.235-5.402-10.747-0.496-0.369-0.599-1.071-0.23-1.567s1.071-0.599 1.567-0.23c3.937 2.931 6.305 7.541 6.305 12.544 0 8.632-6.997 15.629-15.629 15.629s-15.629-6.997-15.629-15.629c0-8.632 6.997-15.629 15.629-15.629zM16 22.816c1.002 0 1.814 0.812 1.814 1.814s-0.812 1.814-1.814 1.814c-1.002 0-1.814-0.812-1.814-1.814s0.812-1.814 1.814-1.814zM16.349 6.831c3.423 0 6.198 2.775 6.198 6.198 0 3.086-2.268 5.689-5.196 6.114-0.085 0.020-0.255 0.278-0.302 0.479 0 0-0.004 0.031-0.012 0.094v1.317c0 0.619-0.501 1.12-1.12 1.12-0.567 0-1.036-0.421-1.11-0.968 0 0-0.003-0.051-0.010-0.152v-1.317c0-1.154 0.814-2.461 2.133-2.77 1.929-0.283 3.378-1.946 3.378-3.916 0-2.186-1.772-3.958-3.958-3.958s-3.958 1.772-3.958 3.958c0 0.619-0.501 1.12-1.12 1.12s-1.12-0.501-1.12-1.12c0-3.423 2.775-6.198 6.198-6.198z"},null,-1)])])}const _c={name:"meeting-icon-help",render:Gy},Wy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function Yy(r,e){return t.openBlock(),t.createElementBlock("svg",Wy,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.6",fill:"#000",d:"M16.050 0.559c2.61 0 5.13 0.646 7.377 1.862 0.544 0.294 0.746 0.974 0.452 1.518s-0.974 0.746-1.518 0.452c-1.922-1.040-4.075-1.592-6.31-1.592-7.334 0-13.28 5.946-13.28 13.28s5.946 13.28 13.28 13.28c7.334 0 13.28-5.946 13.28-13.28 0-3.3-1.207-6.409-3.355-8.824-0.411-0.462-0.37-1.17 0.092-1.581s1.17-0.37 1.581 0.092c2.51 2.821 3.922 6.459 3.922 10.313 0 8.571-6.949 15.52-15.52 15.52s-15.52-6.949-15.52-15.52c0-8.571 6.949-15.52 15.52-15.52zM16.024 11.822c0.567 0.002 1.034 0.425 1.106 0.972l0.010 0.152-0.040 10.822c-0.002 0.619-0.506 1.118-1.124 1.116-0.567-0.002-1.034-0.425-1.106-0.972l-0.010-0.152 0.040-10.822c0.002-0.619 0.506-1.118 1.124-1.116zM16 7.232c1.001 0 1.813 0.812 1.813 1.813s-0.812 1.813-1.813 1.813c-1.001 0-1.813-0.812-1.813-1.813s0.812-1.813 1.813-1.813z"},null,-1)])])}const Tc={name:"meeting-icon-tip",render:Yy},Xy=t.defineComponent({__name:"OMeetingCalendarSelector",props:{modelValue:{default:()=>[]},multiple:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const{t:i}=$e.useI18n(),n=r,s=e,a=()=>{let y=[];for(let x=1;x<=31;x++)y.push(x);return y},o=t.computed(()=>a()),l=t.ref([]),c=t.ref([]),d=t.ref(null),m=()=>{l.value=[...n.modelValue],c.value=[...n.modelValue]};t.watchEffect(()=>{m()});const g=()=>{s("update:modelValue",c.value),d.value&&(d.value.expanded=!1)},S=()=>{m(),d.value&&(d.value.expanded=!1)},T=y=>{if(n.multiple){const x=c.value.indexOf(y);x===-1?c.value.push(y):c.value.splice(x,1),c.value.sort()}else c.value=[y],g()},b=y=>{n.multiple?T(y):c.value=[],g()};return(y,x)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["calendar-selector",!r.multiple&&"is-single"])},[t.createVNode(t.unref(rt.ElSelect),{ref_key:"selectorRef",ref:d,"popper-class":"calendar-selector-popper",placeholder:t.unref(i)("meeting.selectRepeatDate"),size:"large",multiple:"",collapseTags:"",maxCollapseTags:3,modelValue:l.value,onRemoveTag:b},t.createSlots({default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,N=>(t.openBlock(),t.createBlock(t.unref(rt.ElOption),{key:N,label:N,value:N,onClick:I=>T(N),class:t.normalizeClass(c.value.includes(N)&&"is-checked")},null,8,["label","value","onClick","class"]))),128))]),_:2},[r.multiple?{name:"footer",fn:t.withCtx(()=>[t.createVNode(t.unref(A.OButton),{round:"pill",color:"primary",variant:"outline",onClick:g},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("common.confirm")),1)]),_:1}),t.createVNode(t.unref(A.OButton),{variant:"text",onClick:S},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("common.cancel")),1)]),_:1})]),key:"0"}:void 0]),1032,["placeholder","modelValue"])],2))}}),Ky=$e._export_sfc(Xy,[["__scopeId","data-v-deee28bb"]]),Qy={class:"o-meeting-form"},Zy={class:"label-wrapper"},Jy={class:"o-meeting-form-popover-content etherpad"},e_={class:"repeat-config-wrapper"},t_={class:"repeat-config"},i_={class:"repeat-config-item"},n_={class:"time-select-wrapper"},r_={key:1},s_={key:1,class:"switch-wrapper"},a_={class:"switch-text"},o_={key:1,class:"switch-wrapper"},l_={class:"switch-text"},u_={class:"label-wrapper"},c_={class:"o-meeting-form-popover-content"},d_=["href"],h_={key:0,class:"form-btns"},bc=t.defineComponent({__name:"OMeetingForm",props:{data:{},isSub:{type:Boolean,default:!1},isEdit:{type:Boolean,default:!1},subId:{},createMeetingRequest:{},editMeetingRequest:{},editSubMeetingRequest:{},getPlatformsRequest:{},getGroupsRequest:{},showBtns:{type:Boolean,default:!0},groupType:{default:vi.SIG},bookText:{}},emits:["confirm","cancel"],setup(r,{expose:e,emit:i}){const{t:n,locale:s,cycleTypeOptions0:a,intervalWeekOptions:o,getPlatformLabel:l}=Fn(),c=r,d=A.useMessage(null),m=a,g=o,S=t.computed(()=>fy(b.value.cycle_type,m.value,"max")),T={is_record:!1,agenda:"",email_list:"",platform:"WELINK",topic:"",group_name:"",etherpad:"",date:"",date_range:[],start:"",end:"",time:"",is_cycle:!1,cycle_interval:1,cycle_type:mn,cycle_point:[]},b=t.ref(Object.assign({},T)),y=t.ref(null),x=t.ref(!1),N=t.computed(()=>({topic:[{required:!0,message:n("meeting.enterMeetingName")},{validator:M=>{if(M.length>128)return{type:"danger",message:n("meeting.meetingNameTooLong")}}}],agenda:[{validator:M=>{if(M.length>4096)return{type:"danger",message:n("meeting.meetingAgendaTooLong")}}}],group_name:[{required:!0,message:c.groupType===vi.GROUP?n("meeting.selectGroup"):n("meeting.selectSig")}],etherpad:[{required:!0,message:n("meeting.enterEtherpad")}],date:[{required:!0,message:n("meeting.selectDate")}],platform:[{required:!0,message:n("meeting.selectPlatform")}],time:[{validator:M=>{var oe;const{is_cycle:q,cycle_type:$,cycle_interval:X,cycle_point:R,date:ee,date_range:ue}=b.value;if(q){const Z=n("meeting.finishMeetingConfig");if($===mn&&!X)return{type:"danger",message:Z};if($===vn&&(!X||!(R!=null&&R.length)))return{type:"danger",message:Z};if($===tn&&(!X||!(R!=null&&R.length)))return{type:"danger",message:Z};if(!(ue!=null&&ue.length))return{type:"danger",message:n("meeting.selectMeetingDate")};const se=n("meeting.invalidMeetingDuration");let _e=ue[0];const ke=ue[1];if($===vn){const De=new Set;for(;!ye(_e).isAfter(ye(ke));)De.add(ye(_e).day()),_e=ye(_e).add(1,"day").format("YYYY-MM-DD");if(R.every(Ne=>!De.has(Ne)))return{type:"danger",message:se}}if($===tn){const De=new Set;for(;!ye(_e).isAfter(ye(ke));)De.add(ye(_e).date()),_e=ye(_e).add(1,"day").format("YYYY-MM-DD");if(R.every(Ne=>!De.has(Ne)))return{type:"danger",message:se}}}else if(!ee)return{type:"danger",message:n("meeting.selectMeetingDate")};if(!((oe=M==null?void 0:M.trim())!=null&&oe.length))return{type:"danger",message:n("meeting.selectMeetingTime")};const J=M.split("-").map(Z=>Z.split(":").map(Number));if(J[0][0]>J[1][0]||J[0][0]===J[1][0]&&J[0][1]>=J[1][1])return{type:"danger",message:n("meeting.endTimeAfterStartTime")};if(!b.value.is_cycle&&b.value.date&&b.value.start){const Z=`${b.value.date} ${b.value.start}`;if(ye(Z).isBefore(ye()))return{type:"danger",message:n("meeting.startTimeBeforeEndTime")}}},triggers:["blur","change"]}],email_list:[{validator:M=>{if(c.isEdit)return{};const q=M.replaceAll(" ","").replaceAll(",",";")||"";if(q.length){if(q.length>1020)return{type:"danger",message:n("meeting.emailTooLong")};const $=q.split(";")||[];if($.some(X=>!Ch.test(X)))return{type:"danger",message:n("meeting.emailInvalid")};if($.some(X=>X.length>50))return{type:"danger",message:n("meeting.singleEmailTooLong")};if($.length>20)return{type:"danger",message:n("meeting.emailCountTooLong")}}},triggers:["blur","change"]}]})),I=t.ref([]),D=async()=>{if(!c.getGroupsRequest)return;const M=await c.getGroupsRequest();I.value=M.map(q=>({...q,label:q.group_name,value:q.group_name})),c.data&&j(b.value.group_name)},z=t.ref([]),H=async()=>{if(!c.getPlatformsRequest)return;const M=await c.getPlatformsRequest();z.value=M.map(q=>({label:l(q),value:q})),c.data||(b.value.platform=z.value[0].value)},U=i;t.watch(()=>c.data,M=>{var q;if(M){const $=((q=M==null?void 0:M.cycle_sub)==null?void 0:q.find(oe=>oe.sub_id===c.subId))||{},{mid:X,date:R,start:ee,end:ue,sub_id:J}=$;Object.assign(b.value,M,c.isSub?{is_cycle:!1,mid:X,date:R,start:ee,end:ue,sub_id:J}:{})}else{const $=ye().format("YYYY-MM-DD"),X=ye().format("HH:mm");let R="",ee="";const ue=Nn(X);if(ue<=Nn("08:00"))R="08:00",ee="09:00";else if(Nn("22:15")<=ue)R="08:00",ee="09:00";else{let[oe,Z]=X.split(":").map(Number);Z>=45?(oe++,Z=0):Z=(Math.floor(Z/15)+1)*15,R=vc(oe*60+Z).slice(3),ee=vc(oe*60+Z+60).slice(3)}const J=[ye().format("YYYY-MM-DD"),ye().add(1,"month").format("YYYY-MM-DD")];Object.assign(b.value,{date:$,start:R,end:ee,time:`${R}-${ee}`,date_range:J})}},{immediate:!0,deep:!0});const B=()=>{var M,q,$,X;b.value=Object.assign({},T),(q=(M=y.value)==null?void 0:M.clearValidate)==null||q.call(M),(X=($=y.value)==null?void 0:$.resetFields)==null||X.call($),U("cancel")},G=()=>{b.value.cycle_point=[],b.value.cycle_interval=1},C=()=>{b.value.platform="WELINK"},{lePadV:k}=It.useScreen(),O=async()=>{var q;let M=c.isEdit?n("meeting.editSuccess"):n("meeting.booSuccess");try{x.value=!0;const $=await y.value.validate();if(!$||$.some(Ge=>!!Ge))return;const{topic:X,etherpad:R,group_name:ee,platform:ue,date:J,start:oe,end:Z,agenda:se,is_record:_e,is_cycle:ke,date_range:De,cycle_type:Ne,cycle_interval:Re,cycle_point:et}=b.value;let Ve={topic:X,etherpad:R,agenda:se,is_record:_e,group_name:ee,platform:ue,is_cycle:ke};if(ke?(Ve={...Ve,cycle_interval:Re,cycle_type:Ne,cycle_start_date:(De==null?void 0:De[0])||"",cycle_end_date:(De==null?void 0:De[1])||"",cycle_start:oe,cycle_end:Z},Ne!==mn&&(Ve={...Ve,cycle_point:et.join(",")})):Ve={...Ve,date:(J==null?void 0:J.split(" ")[0])||"",start:oe,end:Z},c.isEdit)if(c.isSub){const{mid:Ge,sub_id:Ue}=b.value,{date:Xe,start:kt,end:it}=Ve;await(c==null?void 0:c.editSubMeetingRequest(Ue,{mid:Ge,date:Xe,start:kt,end:it,is_notify:!0}))}else{const{email_list:Ge,platform:Ue,group_name:Xe,etherpad:kt,...it}=Ve;await(c==null?void 0:c.editMeetingRequest((q=c.data)==null?void 0:q.id,{...it,is_notify:!0}))}else await(c==null?void 0:c.createMeetingRequest({...Ve,email_list:b.value.email_list.replaceAll(" ","")}));const Ke=n("meeting.meetingHandleSuccess",[b.value.topic,M]);d.success({content:Ke}),U("confirm")}finally{x.value=!1}};t.onMounted(()=>{D(),H()});const j=M=>{const q=I.value.find($=>$.value===M);c.isEdit||(b.value.etherpad=(q==null?void 0:q.etherpad)||"",b.value.email_list=(q==null?void 0:q.email_list)||"")},L=M=>M.getTime()<Date.now()-1440*60*1e3,V=()=>{b.value.start&&b.value.end?b.value.time=`${b.value.start}-${b.value.end}`:b.value.time=""};return e({confirm:O}),(M,q)=>(t.openBlock(),t.createElementBlock("div",Qy,[t.createVNode(t.unref(A.OForm),{model:b.value,ref_key:"formRef",ref:y,"has-required":"",layout:t.unref(k)?"v":"h",class:"form-wrapper"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OFormItem),{rules:N.value.topic,label:t.unref(n)("meeting.meetingName"),field:"topic"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OInput),{disabled:r.isSub,size:"large",placeholder:t.unref(n)("meeting.enterMeetingName"),style:{width:"100%"},modelValue:b.value.topic,"onUpdate:modelValue":q[0]||(q[0]=$=>b.value.topic=$)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:N.value.group_name,label:r.groupType===t.unref(vi).GROUP?t.unref(n)("meeting.meetingGroup"):t.unref(n)("meeting.meetingSig"),field:"group_name"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OSelect),{disabled:r.isEdit,placeholder:r.groupType===t.unref(vi).GROUP?t.unref(n)("meeting.selectGroup"):t.unref(n)("meeting.selectSig"),size:"large",style:{width:"100%"},modelValue:b.value.group_name,"onUpdate:modelValue":q[1]||(q[1]=$=>b.value.group_name=$),onChange:j},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(I.value,$=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{key:$.value,value:$.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString($.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),b.value.group_name?(t.openBlock(),t.createBlock(t.unref(A.OFormItem),{key:0,rules:N.value.etherpad,label:"Etherpad",field:"etherpad"},{label:t.withCtx(()=>[t.createElementVNode("div",Zy,[t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.etherpad"))+" ",1),t.createVNode(t.unref(A.OPopover),null,{target:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(_c))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",Jy,t.toDisplayString(t.unref(n)("meeting.etherpadDesc")),1)]),_:1})])]),default:t.withCtx(()=>[t.createVNode(t.unref(A.OInput),{disabled:r.isEdit,size:"large",placeholder:t.unref(n)("meeting.enterEtherpad"),style:{width:"100%"},modelValue:b.value.etherpad,"onUpdate:modelValue":q[2]||(q[2]=$=>b.value.etherpad=$)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OFormItem),{label:t.unref(n)("meeting.meetingTime"),field:"time",rules:N.value.time,class:"repeat-row",required:""},{default:t.withCtx(()=>[t.createElementVNode("div",e_,[r.isSub?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(A.OFormItem),{key:0,field:"repeat",class:"repeat-item"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.ORadioGroup),{modelValue:b.value.is_cycle,"onUpdate:modelValue":q[3]||(q[3]=$=>b.value.is_cycle=$),onChange:C,disabled:r.isEdit},{default:t.withCtx(()=>[t.createVNode(t.unref(A.ORadio),{value:!1},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("meeting.nonRepeat")),1)]),_:1}),t.createVNode(t.unref(A.ORadio),{value:!0},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("meeting.isRepeat")),1)]),_:1})]),_:1},8,["modelValue","disabled"])]),_:1})),t.createElementVNode("div",t_,[b.value.is_cycle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(t.unref(A.OFormItem),{label:t.unref(n)("meeting.every"),class:"full-width-item"},{default:t.withCtx(()=>[t.createElementVNode("div",i_,[b.value.cycle_type!==t.unref(tn)?(t.openBlock(),t.createBlock(t.unref(A.OFormItem),{key:0},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElInputNumber),{size:"large",modelValue:b.value.cycle_interval,"onUpdate:modelValue":q[4]||(q[4]=$=>b.value.cycle_interval=$),min:1,max:S.value},null,8,["modelValue","max"])]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OFormItem),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OSelect),{size:"large",modelValue:b.value.cycle_type,"onUpdate:modelValue":q[5]||(q[5]=$=>b.value.cycle_type=$),class:"interval-select",optionWrapClass:"o-meeting-form-interval-select-options",onChange:G},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(m),$=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{key:$.value,value:$.value,label:$.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1})])]),_:1},8,["label"]),b.value.cycle_type!==t.unref(mn)?(t.openBlock(),t.createBlock(t.unref(A.OFormItem),{key:0,label:t.unref(n)("meeting.in"),field:"cycle_point",class:"point-item"},{default:t.withCtx(()=>[b.value.cycle_type===t.unref(vn)?(t.openBlock(),t.createBlock(t.unref(A.OSelect),{key:0,size:"large",multiple:"",modelValue:b.value.cycle_point,"onUpdate:modelValue":q[6]||(q[6]=$=>b.value.cycle_point=$),placeholder:t.unref(n)("meeting.selectRepeatDate"),"max-tag-count":1},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(g),$=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{key:$.value,value:$.value,label:$.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])):t.createCommentVNode("",!0),b.value.cycle_type===t.unref(tn)?(t.openBlock(),t.createBlock(Ky,{key:1,modelValue:b.value.cycle_point,"onUpdate:modelValue":q[7]||(q[7]=$=>b.value.cycle_point=$)},null,8,["modelValue"])):t.createCommentVNode("",!0)]),_:1},8,["label"])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OFormItem),{label:t.unref(n)("meeting.meetingDuration"),field:"date_range"},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElDatePicker),{size:"large",modelValue:b.value.date_range,"onUpdate:modelValue":q[8]||(q[8]=$=>b.value.date_range=$),"start-placeholder":t.unref(n)("meeting.startDate"),"end-placeholder":t.unref(n)("meeting.endDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":L,clearable:!1,type:"daterange","popper-class":"o-meeting-form-date-picker-popper"},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"])],64)):(t.openBlock(),t.createBlock(t.unref(A.OFormItem),{key:1,label:t.unref(n)("meeting.meetingDate"),field:"date"},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElDatePicker),{"popper-class":"o-meeting-form-date-picker-popper",size:"large",modelValue:b.value.date,"onUpdate:modelValue":q[9]||(q[9]=$=>b.value.date=$),placeholder:t.unref(n)("meeting.selectDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":L,clearable:!1},null,8,["modelValue","placeholder"])]),_:1},8,["label"])),t.createVNode(t.unref(A.OFormItem),{label:t.unref(n)("meeting.meetingTime")},{default:t.withCtx(()=>[t.createElementVNode("div",n_,[t.createVNode(t.unref(A.OFormItem),{field:"start"},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElTimeSelect),{"popper-class":"meeting-form-time-popover",step:"00:15",start:"08:00",end:"22:45",placeholder:t.unref(n)("meeting.startTime"),modelValue:b.value.start,"onUpdate:modelValue":q[10]||(q[10]=$=>b.value.start=$),size:"large",clearable:!1,onChange:V},null,8,["placeholder","modelValue"])]),_:1}),q[17]||(q[17]=t.createElementVNode("span",null,"-",-1)),t.createVNode(t.unref(A.OFormItem),{field:"end"},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElTimeSelect),{"popper-class":"meeting-form-time-popover",step:"00:15",start:"08:00",end:"22:45",placeholder:t.unref(n)("meeting.endTime"),modelValue:b.value.end,"onUpdate:modelValue":q[11]||(q[11]=$=>b.value.end=$),size:"large",clearable:!1,onChange:V},null,8,["placeholder","modelValue"])]),_:1}),t.createVNode(t.unref(A.OIconTime))])]),_:1},8,["label"])])])]),_:1},8,["label","rules"]),t.createVNode(t.unref(A.OFormItem),{label:t.unref(n)("meeting.meetingPlatform"),field:"platform",rules:N.value.platform,class:"platform-item"},{default:t.withCtx(()=>[r.data?(t.openBlock(),t.createElementBlock("span",r_,t.toDisplayString(t.unref(l)(b.value.platform)),1)):(t.openBlock(),t.createBlock(t.unref(A.ORadioGroup),{key:0,modelValue:b.value.platform,"onUpdate:modelValue":q[12]||(q[12]=$=>b.value.platform=$),disabled:b.value.is_cycle},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value,$=>(t.openBlock(),t.createBlock(t.unref(A.ORadio),{key:$.value,value:$.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(l)($.label)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","disabled"]))]),_:1},8,["label","rules"]),t.createVNode(t.unref(A.OFormItem),{field:"agenda",label:t.unref(n)("meeting.meetingAgenda"),rules:N.value.genda},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OTextarea),{disabled:r.isSub,size:"large",placeholder:t.unref(n)("meeting.enterMeetingAgenda"),style:{width:"100%"},rows:4,modelValue:b.value.agenda,"onUpdate:modelValue":q[13]||(q[13]=$=>b.value.agenda=$)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label","rules"]),t.createVNode(t.unref(A.OFormItem),{label:t.unref(n)("meeting.meetingRecord"),field:"is_record",class:"record-item full-width-item"},{default:t.withCtx(()=>[t.unref(k)?(t.openBlock(),t.createBlock(t.unref(A.OSwitch),{key:0,modelValue:b.value.is_record,"onUpdate:modelValue":q[14]||(q[14]=$=>b.value.is_record=$),disabled:r.isSub},null,8,["modelValue","disabled"])):(t.openBlock(),t.createElementBlock("div",s_,[t.createVNode(t.unref(A.OSwitch),{modelValue:b.value.is_record,"onUpdate:modelValue":q[15]||(q[15]=$=>b.value.is_record=$),disabled:r.isSub},null,8,["modelValue","disabled"]),t.createElementVNode("div",a_,[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(Tc))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.meetingRecordDesc",[t.unref(l)(b.value.platform)])),1)])]))]),_:1},8,["label"]),t.unref(k)?(t.openBlock(),t.createElementBlock("div",o_,[t.createElementVNode("div",l_,[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(Tc))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.meetingRecordDesc",[t.unref(l)(b.value.platform)])),1)])])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OFormItem),{field:"email_list",rules:N.value.email_list},{label:t.withCtx(()=>[t.createElementVNode("div",u_,[t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.meetingEmail"))+" ",1),t.createVNode(t.unref(A.OPopover),null,{target:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(_c))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",c_,[t.createTextVNode(t.toDisplayString(t.unref(n)("meeting.meetingEmailDesc"))+" ",1),t.createElementVNode("a",{class:"link-text",href:`/${t.unref(s)}/sig`},t.toDisplayString(t.unref(n)("meeting.sigGroupEmail")),9,d_)])]),_:1})])]),default:t.withCtx(()=>[t.createVNode(t.unref(A.OTextarea),{disabled:r.isEdit,size:"large",placeholder:t.unref(n)("meeting.enterEmail"),style:{width:"100%"},rows:4,modelValue:b.value.email_list,"onUpdate:modelValue":q[16]||(q[16]=$=>b.value.email_list=$)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])]),_:1},8,["model","layout"]),r.showBtns?(t.openBlock(),t.createElementBlock("div",h_,[t.createVNode(t.unref(A.OButton),{color:"primary",variant:"solid",size:"large",onClick:O,loading:x.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.isEdit?t.unref(n)("common.save"):r.bookText||t.unref(n)("meeting.book")),1)]),_:1},8,["loading"]),t.createVNode(t.unref(A.OButton),{color:"primary",variant:"outline",size:"large",onClick:B},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("common.cancel")),1)]),_:1})])):t.createCommentVNode("",!0)]))}}),f_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function p_(r,e){return t.openBlock(),t.createElementBlock("svg",f_,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"#0071f3",d:"M9.669 4.029l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM12.669 7.526l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM6.669 8.52l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM15.669 9.531l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM3.669 11.023l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM18.669 11.777l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM20.349 13.234l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM5.349 13.989l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM17.349 15.497l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM8.349 16.474l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM14.349 17.486l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM11.349 20.486l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857z"},null,-1),t.createElementVNode("path",{fill:"none",stroke:"#0071f3","stroke-linejoin":"round","stroke-linecap":"round","stroke-miterlimit":"4","stroke-width":"1.71",d:"M4.491 10.989v3M7.491 8.486v7.989M10.491 3.994v16.491M13.491 7.491v9.994M16.491 9.497v6M19.491 11.743v1.491"},null,-1),t.createElementVNode("path",{fill:"#0071f3",d:"M22.491 12.994c0.274 0 0.497-0.223 0.497-0.497s-0.223-0.497-0.497-0.497c-0.274 0-0.497 0.223-0.497 0.497s0.223 0.497 0.497 0.497zM1.491 12.994c0.274 0 0.497-0.223 0.497-0.497s-0.223-0.497-0.497-0.497c-0.274 0-0.497 0.223-0.497 0.497s0.223 0.497 0.497 0.497z"},null,-1)])])}const m_={name:"meeting-icon-playing",render:p_},g_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function v_(r,e){return t.openBlock(),t.createElementBlock("svg",g_,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M23.399 22.031l0.116 0.099 3.68 3.672c0.365 0.364 0.365 0.955 0.001 1.32-0.328 0.328-0.839 0.361-1.204 0.1l-0.116-0.099-3.68-3.672c-0.365-0.364-0.365-0.955-0.001-1.32 0.328-0.328 0.839-0.361 1.204-0.1zM14.428 4.605c5.465 0 9.897 4.431 9.897 9.897s-4.431 9.897-9.897 9.897c-5.465 0-9.897-4.431-9.897-9.897s4.431-9.897 9.897-9.897zM14.428 6.472c-4.435 0-8.031 3.595-8.031 8.031s3.595 8.031 8.031 8.031c4.435 0 8.031-3.595 8.031-8.031s-3.595-8.031-8.031-8.031z"},null,-1)])])}const y_={name:"components-icon-search",render:v_},__={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function T_(r,e){return t.openBlock(),t.createElementBlock("svg",__,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M5.759 15.127c0.251 0.251 0.644 0.271 0.918 0.063l0.072-0.063 5.016-5.016c0.1-0.1 0.254-0.115 0.37-0.043l0.054 0.043 5.062 5.062c0.273 0.273 0.717 0.273 0.99 0 0.251-0.251 0.271-0.644 0.063-0.918l-0.063-0.072-5.062-5.062c-0.629-0.629-1.628-0.662-2.296-0.099l-0.108 0.099-5.016 5.016c-0.273 0.273-0.273 0.717 0 0.99z"},null,-1)])])}const b_={name:"components-icon-chevron-up",render:T_},C_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function x_(r,e){return t.openBlock(),t.createElementBlock("svg",C_,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M3.42 6.060c0-2.52 2.040-4.575 4.575-4.575 2.52 0 4.575 2.055 4.575 4.575s-2.055 4.575-4.575 4.575c-2.535 0-4.575-2.055-4.575-4.575zM15.015 10.47c0-1.8 1.455-3.27 3.255-3.27 1.815 0 3.27 1.47 3.27 3.27s-1.455 3.27-3.27 3.27c-1.8 0-3.255-1.47-3.255-3.27zM4.56 12.915h6.855c2.535 0 4.575 2.055 4.575 4.575 0 0.255-0.015 0.51-0.060 0.75-0.36 2.16-2.235 3.825-4.515 3.825h-6.855c-2.52 0-4.575-2.055-4.575-4.575s2.055-4.575 4.575-4.575zM17.595 17.49c0-0.75-0.135-1.455-0.375-2.115h3.51c1.8 0 3.255 1.455 3.255 3.255s-1.455 3.27-3.255 3.27h-4.995c1.155-1.125 1.86-2.685 1.86-4.41z"},null,-1)])])}const S_={name:"meeting-icon-speaker",render:x_},E_={class:"o-meeting-playback-subtitles"},k_={class:"search-captions"},w_={key:0,class:"suffix-box"},D_={class:"right-handle"},A_=["onClick"],I_={class:"info"},N_={class:"num"},O_={class:"speaker"},B_={class:"start-time"},L_={class:"text"},P_={key:1},M_=t.defineComponent({__name:"OMeetingPlaybackSubtitles",props:{captions:{default:()=>[]},instance:{},trackIdx:{}},setup(r){const e=Ca(),i=r,{t:n}=$e.useI18n(),s=t.computed(()=>i.trackIdx),a=t.ref(),o=t.ref(!1),l=()=>{o.value=!0},c=fi.useDebounceFn(()=>{o.value=!1},3e3);t.watch(()=>o.value,L=>{L&&c()});const d=t.ref([]);t.watch(()=>i.captions,()=>{d.value=i.captions||[],t.nextTick(()=>{var L;a.value&&((L=a.value)==null||L.scrollTo({top:0,behavior:"smooth"}))})},{immediate:!0,deep:!0});const m=L=>`00:${L.split(".")[0]}`.slice(-8),g=L=>{const V=L.split(":"),M=V[V.length-3]?parseInt(V[V.length-3]):0,q=parseInt(V[V.length-2]),$=parseFloat(V[V.length-1]);return M*60*60+q*60+$};t.onMounted(()=>{var L;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(L=a.value)==null||L.addEventListener("wheel",l)}),t.watch(()=>d.value,()=>{var L;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(L=a.value)==null||L.addEventListener("wheel",l)});const S=t.ref(0),T=()=>{},b=L=>{const V=i.instance;if(!V)return;const M=g(L);V.currentTime(M)},y=t.ref(""),x=t.ref(0),N=t.ref(0),I=t.ref([]),D=n("common.all"),z=t.computed(()=>[...new Set(i.captions.map(L=>L.speakerLabel).sort().reverse())]);t.watch(()=>s.value,()=>{var V,M;if(o.value&&y.value)return;const L=(V=a.value)==null?void 0:V.querySelectorAll(".captions-item")[s.value-1];(M=a.value)==null||M.scrollTo({top:(L==null?void 0:L.offsetTop)-16,behavior:"smooth"})}),t.onUnmounted(()=>{a.value&&a.value.removeEventListener("wheel",l)});const H=(L,V)=>{var R,ee,ue,J,oe,Z;const M=document.getElementsByClassName("light-keyword")[L-1],q=document.getElementsByClassName("light-keyword")[L-V];q==null||q.classList.remove("light-keyword-active"),M==null||M.classList.add("light-keyword-active");const $=M.offsetTop+M.offsetHeight<((R=a.value)==null?void 0:R.scrollTop),X=M.offsetTop>((ee=a.value)==null?void 0:ee.offsetHeight)+((ue=a.value)==null?void 0:ue.scrollTop);($||X)&&((Z=a.value)==null||Z.scrollTo({top:(oe=(J=M.parentElement)==null?void 0:J.parentElement)==null?void 0:oe.offsetTop,behavior:"smooth"}))},U=()=>{!x.value||N.value===1||(N.value--,H(N.value,0))},B=L=>{L!=null&&L.shiftKey||!x.value||N.value===x.value||(N.value++,H(N.value,2))},G=L=>{d.value=i.captions.filter(V=>I.value.includes(V.speakerLabel)).map(V=>({...V,contentHtml:L?V.contentHtml.replaceAll(L,`<span class="light-keyword">${L}</span>`):V.contentHtml})),t.nextTick(()=>{var M;const V=document.getElementsByClassName("light-keyword");x.value=V.length,x.value?B():(M=a.value)==null||M.scrollTo({top:0,behavior:"smooth"})})},C=fi.useDebounceFn(G,300);t.watch(()=>y.value,L=>{N.value=0,C(L)}),t.watch(()=>z.value,L=>{I.value=L},{immediate:!0});const k=t.ref(!1),O=t.ref(!1),j=L=>{O.value=!1,L?I.value=z.value:I.value=[]};return t.watch(()=>I.value,L=>{L.length===0?(k.value=!1,O.value=!1):L.length===z.value.length?(k.value=!0,O.value=!1):O.value=!0,C(y.value)},{deep:!0}),(L,V)=>(t.openBlock(),t.createElementBlock("div",E_,[t.createElementVNode("div",k_,[t.createVNode(t.unref(A.OInput),{modelValue:y.value,"onUpdate:modelValue":V[1]||(V[1]=M=>y.value=M),onKeydown:[t.withKeys(B,["enter"]),t.withKeys(t.withModifiers(U,["shift","stop"]),["enter"])],placeholder:t.unref(n)("meeting.searchSubtitlePlaceholder"),size:"large",class:"input-captions"},{prefix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(y_))]),_:1})]),suffix:t.withCtx(()=>[y.value?(t.openBlock(),t.createElementBlock("div",w_,[t.createElementVNode("span",null,t.toDisplayString(N.value)+"/"+t.toDisplayString(x.value),1),t.createVNode(t.unref(A.OIcon),{onClick:U},{default:t.withCtx(()=>[t.createVNode(t.unref(b_))]),_:1}),t.createVNode(t.unref(A.OIcon),{onClick:B},{default:t.withCtx(()=>[t.createVNode(t.unref(Dl))]),_:1}),t.createVNode(t.unref(A.ODivider),{direction:"v"}),t.createVNode(t.unref(A.OIcon),{class:"hover-close",onClick:V[0]||(V[0]=M=>y.value="")},{default:t.withCtx(()=>[t.createVNode(t.unref(wl))]),_:1})])):t.createCommentVNode("",!0)]),_:1},8,["modelValue","onKeydown","placeholder"]),t.createElementVNode("div",D_,[t.createVNode(t.unref(rt.ElSelect),{multiple:"",modelValue:I.value,"onUpdate:modelValue":V[3]||(V[3]=M=>I.value=M),"popper-class":"speakers-selector-popper",class:"speakers-selector",placement:"bottom"},{prefix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(S_))]),_:1})]),header:t.withCtx(()=>[t.createVNode(t.unref(rt.ElCheckbox),{modelValue:k.value,"onUpdate:modelValue":V[2]||(V[2]=M=>k.value=M),indeterminate:O.value,onChange:j},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(D)),1)]),_:1},8,["modelValue","indeterminate"])]),default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value,M=>(t.openBlock(),t.createBlock(t.unref(rt.ElOption),{key:M,label:M,value:M},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElCheckbox),{"model-value":I.value.includes(M)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(M),1)]),_:2},1032,["model-value"])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])]),t.createVNode(t.unref(A.OTab),{modelValue:S.value,"onUpdate:modelValue":V[4]||(V[4]=M=>S.value=M),variant:"text",class:"captions-tab",onChange:T},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OTabPane),{value:0,label:t.unref(n)("meeting.audioToText")},{default:t.withCtx(()=>[d.value.length?(t.openBlock(),t.createBlock(t.unref(A.OScroller),{key:0,id:"captionsScrollDom",class:"captions-scroller","show-type":"hover",size:"small","disabled-x":""},{default:t.withCtx(()=>[t.createVNode(t.unref(A.ORow),{gap:"0 12px",wrap:"wrap"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.value,(M,q)=>(t.openBlock(),t.createBlock(t.unref(A.OCol),{flex:"0 0 100%",key:q},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["captions-item",{"captions-item-active":s.value===q+1}]),onClick:$=>b(M.start_time)},[t.createElementVNode("div",I_,[t.createElementVNode("div",N_,t.toDisplayString(M.speakerIdx),1),t.createElementVNode("div",O_,t.toDisplayString(M.speakerLabel),1),t.createElementVNode("div",B_,t.toDisplayString(m(M.start_time)),1),s.value===q+1?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0,class:"playing initial-fill"},{default:t.withCtx(()=>[t.createVNode(t.unref(m_))]),_:1})):t.createCommentVNode("",!0)]),t.withDirectives(t.createElementVNode("div",L_,null,512),[[t.unref(e),M.contentHtml]])],10,A_)]),_:2},1024))),128))]),_:1})]),_:1})):(t.openBlock(),t.createElementBlock("div",P_,"111"))]),_:1},8,["label"])]),_:1},8,["modelValue"])]))}});var mo,Cc;function xa(){if(Cc)return mo;Cc=1;var r;return typeof window<"u"?r=window:typeof ea<"u"?r=ea:typeof self<"u"?r=self:r={},mo=r,mo}var R_=xa();const Y=fr(R_),V_={},F_=Object.freeze(Object.defineProperty({__proto__:null,default:V_},Symbol.toStringTag,{value:"Module"})),$_=uy(F_);var go,xc;function kh(){if(xc)return go;xc=1;var r=typeof ea<"u"?ea:typeof window<"u"?window:{},e=$_,i;return typeof document<"u"?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"],i||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=e)),go=i,go}var U_=kh();const Te=fr(U_);var Rs={exports:{}},vo={exports:{}},Sc;function z_(){return Sc||(Sc=1,(function(r){function e(){return r.exports=e=Object.assign?Object.assign.bind():function(i){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var a in s)({}).hasOwnProperty.call(s,a)&&(i[a]=s[a])}return i},r.exports.__esModule=!0,r.exports.default=r.exports,e.apply(null,arguments)}r.exports=e,r.exports.__esModule=!0,r.exports.default=r.exports})(vo)),vo.exports}var yo,Ec;function H_(){if(Ec)return yo;Ec=1,yo=e;var r=Object.prototype.toString;function e(i){if(!i)return!1;var n=r.call(i);return n==="[object Function]"||typeof i=="function"&&n!=="[object RegExp]"||typeof window<"u"&&(i===window.setTimeout||i===window.alert||i===window.confirm||i===window.prompt)}return yo}var _o,kc;function q_(){if(kc)return _o;kc=1;function r(s,a){var o=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(o)return(o=o.call(s)).next.bind(o);if(Array.isArray(s)||(o=e(s))||a){o&&(s=o);var l=0;return function(){return l>=s.length?{done:!0}:{done:!1,value:s[l++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
5
+ `,""),navigator.clipboard.writeText(S),Promise.resolve()}catch(S){return Promise.reject(S)}}}),(S,T)=>(t.openBlock(),t.createElementBlock("div",gy,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.value,(b,y)=>{var x,N,I;return t.openBlock(),t.createElementBlock("div",{ref_for:!0,ref_key:"domRef",ref:m,class:t.normalizeClass(["label-item",{"record-item":b.isRecord&&((x=c(b.key))==null?void 0:x.length),"link-item":b.isLink,"is-empty":!((N=c(b.key))!=null&&N.length),[`label-item_${r.data.id}`]:!0,[`type_${r.data.type}`]:!0}]),key:y},[c(b.key)&&!b.isRecord?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("span",vy,t.toDisplayString(b.label),1),b.ellipsis?(t.openBlock(),t.createBlock(ly,{key:0,show:r.show,text:c(b.key)||"-"},null,8,["show","text"])):b.isLink?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:1,target:"_blank",class:"value",color:"primary","hover-underline":"",href:c(b.key)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c(b.key)),1)]),_:2},1032,["href"])):b.key==="platform"?(t.openBlock(),t.createElementBlock("span",yy,t.toDisplayString(t.unref(s)(c(b.key))),1)):(t.openBlock(),t.createElementBlock("span",_y,[b.extra?(t.openBlock(),t.createElementBlock("i",Ty,t.toDisplayString(c(b.extra)),1)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(c(b.key)||"-"),1)]))],64)):t.createCommentVNode("",!0),b.isRecord&&((I=c(b.key))!=null&&I.length)?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("span",by,t.toDisplayString(b.label),1),t.createElementVNode("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c(b.key),D=>(t.openBlock(),t.createElementBlock("p",{key:D.create_time,class:"value"},t.toDisplayString(D.reason)+"   "+t.toDisplayString(t.unref(ht)(D.create_time,"YYYY/MM/DD HH:mm:ss"))+" "+t.toDisplayString(D.action===1?t.unref(n)("meeting.approveReview"):t.unref(n)("meeting.rejectReview")),1))),128))])],64)):t.createCommentVNode("",!0)],2)}),128))]))}}),ts=Ue._export_sfc(Cy,[["__scopeId","data-v-33bc21b3"]]),xy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"30",height:"32",viewBox:"0 0 30 32"};function Sy(r,e){return t.openBlock(),t.createElementBlock("svg",xy,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M12.983 5.523c0.341 0 0.667 0.14 0.902 0.388l6.569 6.917c0.142 0.15 0.243 0.331 0.297 0.526 0.054 0.141 0.085 0.295 0.085 0.457 0 0.108-0.014 0.213-0.040 0.314l-0 13.942c0 1.964-1.592 3.556-3.556 3.556h-13.296c-1.964 0-3.556-1.592-3.556-3.556v-18.987c0-1.964 1.592-3.556 3.556-3.556zM11.528 8.011l-7.582 0.001c-0.589 0-1.067 0.478-1.067 1.067v18.987c0 0.589 0.478 1.067 1.067 1.067h13.296c0.589 0 1.067-0.478 1.067-1.067l-0.002-13.012-3.149 0.002c-1.935 0-3.515-1.547-3.555-3.482l-0.075-3.561zM9.777 24.987c0.491 0 0.889 0.398 0.889 0.889s-0.398 0.889-0.889 0.889h-4.432c-0.491 0-0.889-0.398-0.889-0.889s0.398-0.889 0.889-0.889h4.432zM26.256 0.269c1.964 0 3.556 1.592 3.556 3.556v18.012c0 1.964-1.592 3.556-3.556 3.556h-2.586c-0.687 0-1.244-0.557-1.244-1.244s0.557-1.244 1.244-1.244h2.586c0.589 0 1.067-0.478 1.067-1.067v-18.012c0-0.589-0.478-1.067-1.067-1.067h-13.27c-0.496 0-0.912 0.338-1.032 0.796l-2.514 0.002c0.137-1.838 1.672-3.287 3.546-3.287h13.27zM12.112 21.432c0.491 0 0.889 0.398 0.889 0.889s-0.398 0.889-0.889 0.889h-6.743c-0.491 0-0.889-0.398-0.889-0.889s0.398-0.889 0.889-0.889h6.743zM14.234 17.876c0.491 0 0.889 0.398 0.889 0.889s-0.398 0.889-0.889 0.889h-8.853c-0.491 0-0.889-0.398-0.889-0.889s0.398-0.889 0.889-0.889h8.853zM14.052 9.7l0.039 1.821c0.012 0.58 0.486 1.045 1.066 1.045l1.617-0.002-2.722-2.864z"},null,-1)])])}const Nl={name:"meeting-icon-copy",render:Sy},Ey={class:"meet-title-left"},ky=["title"],wy={class:"text"},Dy={key:0,class:"tag-wrapper"},Ay={class:"start-time"},Iy={class:"calendar-info"},Eh=t.defineComponent({__name:"OMeetingCalendarList",props:{list:{default:()=>[]},groupType:{}},setup(r){const{activityTypeMap:e}=ba(),i=r,{t:n,locale:s,getConfig:a,getPointStr:o}=Fn(),l=t.ref([]),c=A.useMessage(null),d=async y=>{await l.value[y].copyInfo(),c.success({content:n("common.copySuccess")})},m=t.ref([]),g=t.computed(()=>({SIG_GROUP:`${i.groupType===vi.GROUP?n("meeting.groups"):n("meeting.sigs")}: `,NEW_DATE:n("meeting.latestMeeting"),EMPTY_TEXT:n("meeting.meetingEmptyText"),LEARN_MORE:n("common.seeMore"),JOIN_MEETING:n("meeting.joinMeeting"),SIGN:n("meeting.sign"),DETAILS:n("meeting.detail")})),S=t.ref(),T=new ResizeObserver(y=>{for(let x of y){const{height:N}=x.contentRect;x.target.classList.remove("hidden-divider"),N>=30&&x.target.classList.add("hidden-divider")}});t.watch(()=>i.list,()=>{i.list.length===1?m.value=[i.list[0].id]:m.value=[],t.nextTick(()=>{var y;(y=S.value)==null||y.forEach(x=>{T.observe(x)})})});const b=t.computed(()=>i.list.map(y=>{var $,X;const x=y.type;let N="";if(x!==Be.MEETING){let R=($=e.value.get(y.activity_type))==null?void 0:$.label;return y.start&&y.end?y.end_date===y.start_date?N=`${ht(y.start_date)} ${y.start}-${y.end}`:N=`${ht(y.start_date)} ${y.start}-${ht(y.end_date)} ${y.end}`:N=`${ht(y.start_date,"YYYY/MM/DD HH:mm")} ${ht(y.end_date,"YYYY/MM/DD HH:mm")}`,{...y,activity_type:R,dateRange:N}}const{is_cycle:I,date:D,start:z,end:H,cycle_start_date:U,cycle_end_date:B,cycle_start:G,cycle_end:C,cycle_type:k,cycle_interval:O,cycle_point:j}=y;N=`${ht(D)} ${z} - ${H}`,I&&(N=`${ht(U)} - ${ht(B)}`);let L=`${z} - ${H}`,V=null,M=!1;const q=((X=y.obs_data)==null?void 0:X.filter(R=>R.text_video_url))||[];if(I){let R="";k===mn&&(R=n("meeting.cycleDay")),k===vn&&(O>1?R=n("meeting.cycleWeek.other",[o(k,j),O]):R=n("meeting.cycleWeek.one",[o(k,j)])),k===tn&&(R=n("meeting.cycleMonth",[o(k,j)])),L=n("meeting.cycleMeetingText2",{startDate:U,endDate:B,startTime:G,endTime:C,cycleType:R}),M=q.some(ee=>{var ue;return ee.sub_id===((ue=y.cycle_sub.find(J=>J.date===D))==null?void 0:ue.sub_id)})}else M=q.length>0;return M&&(V=`${location.origin}/${s.value}/video/${y.group_name}/${y.mid}/${D}`),{...y,dateRange:N,timeRange:L,replay_url:V}}));return(y,x)=>{var N,I;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["o-meeting-calendar-list",(N=b.value)!=null&&N.length?"":"is-empty"])},[(I=b.value)!=null&&I.length?(t.openBlock(),t.createBlock(t.unref(A.OCollapse),{key:1,modelValue:m.value,"onUpdate:modelValue":x[0]||(x[0]=D=>m.value=D),style:{"--collapse-padding":"0"}},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(b.value,(D,z)=>(t.openBlock(),t.createBlock(t.unref(A.OCollapseItem),{key:D.id,value:D.id},{title:t.withCtx(()=>[t.createElementVNode("div",Ey,[t.createElementVNode("div",{class:"meet-title",title:D.topic||D.name},[t.createVNode(t.unref(A.OIcon),{style:t.normalizeStyle({backgroundColor:`${t.unref(a)(D.type,"color")}`})},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(a)(D.type,"icon"))))]),_:2},1032,["style"]),t.createElementVNode("div",wy,t.toDisplayString(D.topic||D.name||D.title),1),D.is_cycle?(t.openBlock(),t.createElementBlock("div",Dy,[t.createVNode(t.unref(A.OTag),{color:"primary",variant:"outline"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("meeting.cycle")),1)]),_:1})])):t.createCommentVNode("",!0)],8,ky),t.createElementVNode("div",{class:"meet-info",ref_for:!0,ref_key:"meetInfoRef",ref:S},[t.createElementVNode("span",Ay,[t.createElementVNode("span",null,t.toDisplayString(D.dateRange),1)]),t.createVNode(t.unref(A.ODivider),{direction:"v"}),t.createElementVNode("div",null,[D.group_name?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(g.value.SIG_GROUP)+" "+t.toDisplayString(D.group_name),1)],64)):t.createCommentVNode("",!0),D.activity_type?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(D.activity_type),1)],64)):t.createCommentVNode("",!0)])],512),D.url?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,href:D.url,target:"_blank",class:"jump-detail-link"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(g.value.LEARN_MORE),1)]),_:1},8,["href"])):t.createCommentVNode("",!0),D.join_url?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:1,href:D.join_url,target:"_blank",class:"jump-detail-link"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(g.value.JOIN_MEETING),1)]),_:1},8,["href"])):t.createCommentVNode("",!0),D.content_url?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:2,href:D.content_url,target:"_blank",class:"jump-detail-link"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(g.value.DETAILS),1)]),_:1},8,["href"])):t.createCommentVNode("",!0),D.register_url?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:3,href:D.register_url,target:"_blank",class:"jump-detail-link"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(jr))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(g.value.SIGN),1)]),_:1},8,["href"])):t.createCommentVNode("",!0)]),t.createVNode(t.unref(A.OIcon),{onClick:t.withModifiers(()=>d(z),["stop"]),class:"copy-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Nl))]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createElementVNode("div",Iy,[t.createVNode(ts,{show:m.value.includes(D.id),data:D,ref_for:!0,ref:H=>l.value[z]=H,from:"home"},null,8,["show","data"])])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])):t.renderSlot(y.$slots,"empty",{key:0})],2)}}}),Ny={class:"o-meeting-calendar"},Oy={class:"calendar-body"},By={class:"calender-header-left"},Ly={class:"left-title"},Py={class:"month-date"},My={class:"right-title"},Ry=["onClick"],Vy={class:"day-box"},Fy={class:"icon-box"},$y={class:"detail-list"},Uy={class:"current-day"},zy={class:"right-title"},Hy={class:"title-list"},qy="2021-01-01",yc=t.defineComponent({__name:"OMeetingCalendar",props:{getDateListRequest:{},getMeetingListRequest:{},getSummitListRequest:{default:async()=>[]},getSummitDatesRequest:{},getEventsListRequest:{default:async()=>[]},getEventsDatesRequest:{},hiddenEvents:{type:Boolean,default:!1},hiddenSummit:{type:Boolean,default:!1},groupType:{default:vi.SIG},groups:{default:()=>[]}},setup(r){const e=r,{t:i,locale:n,meetingTabs:s,getConfig:a}=Fn(),o=t.computed(()=>n.value===Ue.Locales.EN),l=t.ref(""),c=t.ref([]),d=t.ref([]),m=t.ref([]),g=t.ref([]),S=t.ref([]),T=t.ref([]),b=t.ref([]),y=t.ref(Be.ALL),x=t.computed(()=>{let J=s.value;return e.hiddenEvents&&(J=J.filter(oe=>oe.value!==Be.EVENTS)),e.hiddenSummit&&(J=J.filter(oe=>oe.value!==Be.SUMMIT)),J.filter(oe=>oe.value!==Be.ALL).length===1?[]:J});t.watch(()=>x.value,()=>{var J;y.value=((J=x.value[0])==null?void 0:J.value)??Be.MEETING});const N=t.ref(),I=t.ref("407px"),D=t.ref(!1),z=t.ref(""),H=t.ref(!1),U=t.ref(""),B=async J=>{if(e.getSummitListRequest){const oe=await e.getSummitListRequest(J);d.value=(oe||[]).map(Z=>({...Z,type:Be.SUMMIT,start_date_time:`${ht(Z.start_date)} ${Z.start}`,end_date_time:`${ht(Z.end_date)} ${Z.end}`}))}else d.value=[]},G=async J=>{if(e.getEventsListRequest){const oe=await e.getEventsListRequest(J);g.value=(oe||[]).map(Z=>({...Z,type:Be.EVENTS,start_date_time:`${ht(Z.start_date)} ${Z.start}`,end_date_time:`${ht(Z.end_date)} ${Z.end}`}))}else g.value=[]},C=async J=>{e.getDateListRequest&&e.getDateListRequest(J,U.value||"").then(oe=>{c.value=oe}),e.getEventsDatesRequest&&e.getEventsDatesRequest(J).then(oe=>{S.value=oe}),e.getSummitDatesRequest&&e.getSummitDatesRequest(J).then(oe=>{m.value=oe})},k=async J=>{if(e.getMeetingListRequest&&J.date)try{const oe=await e.getMeetingListRequest(J.date,U.value,"");b.value=oe.map(Z=>({...Z,time:`${Z.start}-${Z.end}`,type:Be.MEETING,date:Z.date||J.date})).sort((Z,se)=>{var _e,ke;return parseInt((_e=Z.start||Z.cycle_start)==null?void 0:_e.replace(":",""))-parseInt(se.end||((ke=se.cycle_end)==null?void 0:ke.replace(":","")))})}catch{b.value=[]}},O=t.computed(()=>[...b.value,...g.value.filter(J=>{var oe;return!ye(J.start_date).isAfter(ye(z.value))&&!ye(z.value).isAfter(ye(J.end_date))||((oe=J.dates)==null?void 0:oe.includes(z.value))}),...d.value.filter(J=>{var oe;return(oe=J.dates)==null?void 0:oe.includes(z.value)})].filter(J=>y.value===Be.ALL?!0:J.type===y.value)),j=async J=>{const oe=ye(J).format("YYYY-MM-DD");if(z.value=oe,B(oe),G(oe),C(oe),T.value=[...new Set([...c.value,...m.value,...S.value])].flat().sort((Z,se)=>ye(Z).isAfter(ye(se))?1:-1),!J)if(!T.value.length)l.value=ht(new Date);else{let Z=[...T.value].reverse().find(se=>ye().isAfter(ye(se)));Z||(Z=T.value.find(se=>ye(se).isAfter(ye()))),l.value=ht(Z)}k({date:oe,type:y.value})},L=fi.useDebounceFn((J,oe)=>{if(H.value){H.value=!1;return}if(new Date(J).getTime()/1e3<1610380800){oe==null||oe.stopPropagation();return}j(J)},300),V=(J,oe)=>{if(ht(oe)===ht(qy)&&J==="prev-month"){D.value=!0;return}D.value=!1,N.value.selectDate(J),L(ht(N.value.selectedDay))},M=()=>{t.nextTick(()=>{k({date:z.value,type:y.value}),C(z.value)})},q=J=>J.replace(/^0+(?=\d)/,""),$=J=>{new MutationObserver(function(){I.value=`${J.offsetHeight-2}px`}).observe(J,{childList:!0,subtree:!0,characterData:!0})},X=async()=>{const J=document.querySelector(".calendar-body .el-calendar__body");J&&($(J),I.value=`${J.offsetHeight-2}px`)};t.onMounted(()=>{X(),j()});const R=t.watch(()=>T.value.length,()=>{A.isClient&&!z.value&&t.nextTick(()=>{const J=document.querySelector(".is-today .out-box");J&&(H.value=!0,J.click(),R())})}),ee=J=>o.value?J.split(" ").reverse().join(" "):J,ue=(J,oe)=>J===Be.MEETING?[Be.ALL,Be.MEETING].includes(y.value)&&c.value.includes(oe):J===Be.SUMMIT?[Be.ALL,Be.SUMMIT].includes(y.value)&&m.value.includes(oe):J===Be.EVENTS?[Be.ALL,Be.EVENTS].includes(y.value)&&S.value.includes(oe):!1;return(J,oe)=>(t.openBlock(),t.createElementBlock("div",Ny,[t.createElementVNode("div",Oy,[t.createVNode(t.unref(rt.ElCalendar),{ref_key:"calendar",ref:N,class:"calender"},{header:t.withCtx(({date:Z})=>[t.createElementVNode("div",By,[t.createElementVNode("div",Ly,[t.createVNode(t.unref(A.OIcon),{onClick:se=>V("prev-month",Z)},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronLeft),{class:t.normalizeClass({disable:D.value})},null,8,["class"])]),_:1},8,["onClick"]),t.createElementVNode("span",Py,t.toDisplayString(ee(Z)),1),t.createVNode(t.unref(A.OIcon),{onClick:se=>V("next-month",Z)},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1},8,["onClick"])]),t.createVNode(t.unref(A.OSelect),{modelValue:U.value,"onUpdate:modelValue":oe[0]||(oe[0]=se=>U.value=se),placeholder:t.unref(i)(r.groupType===t.unref(vi).GROUP?"meeting.allGroups":"meeting.allSigs"),clearable:"",onChange:M},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.groups,se=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{value:se,key:se},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(se),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"])]),t.createElementVNode("div",My,[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.latestMeeting"))+"  ",1),t.createElementVNode("span",null,t.toDisplayString(t.unref(ye)(l.value).format("YYYY/MM/DD")),1)])]),"date-cell":t.withCtx(({data:Z})=>[t.createElementVNode("div",{class:t.normalizeClass(["out-box",{"has-calender":T.value.includes(Z.day)}]),onClick:se=>t.unref(L)(Z.day,se)},[t.createElementVNode("div",Vy,[t.createElementVNode("p",{class:t.normalizeClass([Z.isSelected?"is-selected":"","date-calender"])},t.toDisplayString(q(Z.day.split("-").at(-1)||"")),3),t.createElementVNode("div",Fy,[ue(t.unref(Be).MEETING,Z.day)?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0,class:"meeting",style:t.normalizeStyle({zIndex:t.unref(a)(t.unref(Be).MEETING,"zIndex"),backgroundColor:t.unref(a)(t.unref(Be).MEETING,"color")})},{default:t.withCtx(()=>[t.createVNode(t.unref(Il))]),_:1},8,["style"])):t.createCommentVNode("",!0),ue(t.unref(Be).EVENTS,Z.day)?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:1,class:"events",style:t.normalizeStyle({zIndex:t.unref(a)(t.unref(Be).EVENTS,"zIndex"),backgroundColor:t.unref(a)(t.unref(Be).EVENTS,"color")})},{default:t.withCtx(()=>[t.createVNode(t.unref(Al))]),_:1},8,["style"])):t.createCommentVNode("",!0),ue(t.unref(Be).SUMMIT,Z.day)?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:2,class:"summit",style:t.normalizeStyle({zIndex:t.unref(a)(t.unref(Be).SUMMIT,"zIndex"),backgroundColor:t.unref(a)(t.unref(Be).SUMMIT,"color")})},{default:t.withCtx(()=>[t.createVNode(t.unref(bh))]),_:1},8,["style"])):t.createCommentVNode("",!0)])])],10,Ry)]),_:1},512),t.createElementVNode("div",$y,[t.createElementVNode("div",Uy,[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.latestMeeting"))+"  ",1),t.createElementVNode("span",null,t.toDisplayString(t.unref(ye)(z.value).format("YYYY/MM/DD")),1)]),t.createElementVNode("div",zy,[t.createElementVNode("div",Hy,[t.createVNode(t.unref(A.OSelect),{modelValue:U.value,"onUpdate:modelValue":oe[1]||(oe[1]=Z=>U.value=Z),placeholder:t.unref(i)(r.groupType===t.unref(vi).GROUP?"meeting.allGroups":"meeting.allSigs"),clearable:"",onChange:M},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.groups,Z=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{value:Z,key:Z},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(Z),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","placeholder"]),t.createVNode(t.unref(A.OTab),{modelValue:y.value,"onUpdate:modelValue":oe[2]||(oe[2]=Z=>y.value=Z),line:!1},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(x.value,Z=>(t.openBlock(),t.createBlock(t.unref(A.OTabPane),{key:Z.value,value:Z.value},{nav:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(Z.icon)))]),_:2},1024),t.createTextVNode(" "+t.toDisplayString(Z.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])]),t.createElementVNode("div",null,[t.createVNode(t.unref(A.OScroller),{class:"meeting-list","show-type":"hover",size:"small",style:t.normalizeStyle({"--height":I.value})},{default:t.withCtx(()=>[t.createVNode(Eh,{list:O.value,groupType:r.groupType},{empty:t.withCtx(()=>[t.renderSlot(J.$slots,"empty")]),_:3},8,["list","groupType"])]),_:3},8,["style"])])])])]))}}),jy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function Gy(r,e){return t.openBlock(),t.createElementBlock("svg",jy,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.8",fill:"#000",d:"M16 0.371c1.623 0 3.214 0.248 4.731 0.729 0.59 0.187 0.916 0.817 0.729 1.406s-0.817 0.916-1.406 0.729c-1.299-0.412-2.662-0.624-4.054-0.624-7.394 0-13.389 5.994-13.389 13.389s5.994 13.389 13.389 13.389c7.394 0 13.389-5.994 13.389-13.389 0-4.287-2.027-8.235-5.402-10.747-0.496-0.369-0.599-1.071-0.23-1.567s1.071-0.599 1.567-0.23c3.937 2.931 6.305 7.541 6.305 12.544 0 8.632-6.997 15.629-15.629 15.629s-15.629-6.997-15.629-15.629c0-8.632 6.997-15.629 15.629-15.629zM16 22.816c1.002 0 1.814 0.812 1.814 1.814s-0.812 1.814-1.814 1.814c-1.002 0-1.814-0.812-1.814-1.814s0.812-1.814 1.814-1.814zM16.349 6.831c3.423 0 6.198 2.775 6.198 6.198 0 3.086-2.268 5.689-5.196 6.114-0.085 0.020-0.255 0.278-0.302 0.479 0 0-0.004 0.031-0.012 0.094v1.317c0 0.619-0.501 1.12-1.12 1.12-0.567 0-1.036-0.421-1.11-0.968 0 0-0.003-0.051-0.010-0.152v-1.317c0-1.154 0.814-2.461 2.133-2.77 1.929-0.283 3.378-1.946 3.378-3.916 0-2.186-1.772-3.958-3.958-3.958s-3.958 1.772-3.958 3.958c0 0.619-0.501 1.12-1.12 1.12s-1.12-0.501-1.12-1.12c0-3.423 2.775-6.198 6.198-6.198z"},null,-1)])])}const _c={name:"meeting-icon-help",render:Gy},Wy={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function Yy(r,e){return t.openBlock(),t.createElementBlock("svg",Wy,[...e[0]||(e[0]=[t.createElementVNode("path",{opacity:"0.6",fill:"#000",d:"M16.050 0.559c2.61 0 5.13 0.646 7.377 1.862 0.544 0.294 0.746 0.974 0.452 1.518s-0.974 0.746-1.518 0.452c-1.922-1.040-4.075-1.592-6.31-1.592-7.334 0-13.28 5.946-13.28 13.28s5.946 13.28 13.28 13.28c7.334 0 13.28-5.946 13.28-13.28 0-3.3-1.207-6.409-3.355-8.824-0.411-0.462-0.37-1.17 0.092-1.581s1.17-0.37 1.581 0.092c2.51 2.821 3.922 6.459 3.922 10.313 0 8.571-6.949 15.52-15.52 15.52s-15.52-6.949-15.52-15.52c0-8.571 6.949-15.52 15.52-15.52zM16.024 11.822c0.567 0.002 1.034 0.425 1.106 0.972l0.010 0.152-0.040 10.822c-0.002 0.619-0.506 1.118-1.124 1.116-0.567-0.002-1.034-0.425-1.106-0.972l-0.010-0.152 0.040-10.822c0.002-0.619 0.506-1.118 1.124-1.116zM16 7.232c1.001 0 1.813 0.812 1.813 1.813s-0.812 1.813-1.813 1.813c-1.001 0-1.813-0.812-1.813-1.813s0.812-1.813 1.813-1.813z"},null,-1)])])}const Tc={name:"meeting-icon-tip",render:Yy},Xy=t.defineComponent({__name:"OMeetingCalendarSelector",props:{modelValue:{default:()=>[]},multiple:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(r,{emit:e}){const{t:i}=Ue.useI18n(),n=r,s=e,a=()=>{let y=[];for(let x=1;x<=31;x++)y.push(x);return y},o=t.computed(()=>a()),l=t.ref([]),c=t.ref([]),d=t.ref(null),m=()=>{l.value=[...n.modelValue],c.value=[...n.modelValue]};t.watchEffect(()=>{m()});const g=()=>{s("update:modelValue",c.value),d.value&&(d.value.expanded=!1)},S=()=>{m(),d.value&&(d.value.expanded=!1)},T=y=>{if(n.multiple){const x=c.value.indexOf(y);x===-1?c.value.push(y):c.value.splice(x,1),c.value.sort()}else c.value=[y],g()},b=y=>{n.multiple?T(y):c.value=[],g()};return(y,x)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["calendar-selector",!r.multiple&&"is-single"])},[t.createVNode(t.unref(rt.ElSelect),{ref_key:"selectorRef",ref:d,"popper-class":"calendar-selector-popper",placeholder:t.unref(i)("meeting.selectRepeatDate"),size:"large",multiple:"",collapseTags:"",maxCollapseTags:3,modelValue:l.value,onRemoveTag:b},t.createSlots({default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,N=>(t.openBlock(),t.createBlock(t.unref(rt.ElOption),{key:N,label:N,value:N,onClick:I=>T(N),class:t.normalizeClass(c.value.includes(N)&&"is-checked")},null,8,["label","value","onClick","class"]))),128))]),_:2},[r.multiple?{name:"footer",fn:t.withCtx(()=>[t.createVNode(t.unref(A.OButton),{round:"pill",color:"primary",variant:"outline",onClick:g},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("common.confirm")),1)]),_:1}),t.createVNode(t.unref(A.OButton),{variant:"text",onClick:S},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("common.cancel")),1)]),_:1})]),key:"0"}:void 0]),1032,["placeholder","modelValue"])],2))}}),Ky=Ue._export_sfc(Xy,[["__scopeId","data-v-deee28bb"]]),Qy={class:"o-meeting-form"},Zy={class:"label-wrapper"},Jy={class:"o-meeting-form-popover-content etherpad"},e_={class:"repeat-config-wrapper"},t_={class:"repeat-config"},i_={class:"repeat-config-item"},n_={class:"time-select-wrapper"},r_={key:1},s_={key:1,class:"switch-wrapper"},a_={class:"switch-text"},o_={key:1,class:"switch-wrapper"},l_={class:"switch-text"},u_={class:"label-wrapper"},c_={class:"o-meeting-form-popover-content"},d_=["href"],h_={key:0,class:"form-btns"},bc=t.defineComponent({__name:"OMeetingForm",props:{data:{},isSub:{type:Boolean,default:!1},isEdit:{type:Boolean,default:!1},subId:{},createMeetingRequest:{},editMeetingRequest:{},editSubMeetingRequest:{},getPlatformsRequest:{},getGroupsRequest:{},showBtns:{type:Boolean,default:!0},groupType:{default:vi.SIG},bookText:{}},emits:["confirm","cancel"],setup(r,{expose:e,emit:i}){const{t:n,locale:s,cycleTypeOptions0:a,intervalWeekOptions:o,getPlatformLabel:l}=Fn(),c=r,d=A.useMessage(null),m=a,g=o,S=t.computed(()=>fy(b.value.cycle_type,m.value,"max")),T={is_record:!1,agenda:"",email_list:"",platform:"WELINK",topic:"",group_name:"",etherpad:"",date:"",date_range:[],start:"",end:"",time:"",is_cycle:!1,cycle_interval:1,cycle_type:mn,cycle_point:[]},b=t.ref(Object.assign({},T)),y=t.ref(null),x=t.ref(!1),N=t.computed(()=>({topic:[{required:!0,message:n("meeting.enterMeetingName")},{validator:M=>{if(M.length>128)return{type:"danger",message:n("meeting.meetingNameTooLong")}}}],agenda:[{validator:M=>{if(M.length>4096)return{type:"danger",message:n("meeting.meetingAgendaTooLong")}}}],group_name:[{required:!0,message:c.groupType===vi.GROUP?n("meeting.selectGroup"):n("meeting.selectSig")}],etherpad:[{required:!0,message:n("meeting.enterEtherpad")}],date:[{required:!0,message:n("meeting.selectDate")}],platform:[{required:!0,message:n("meeting.selectPlatform")}],time:[{validator:M=>{var oe;const{is_cycle:q,cycle_type:$,cycle_interval:X,cycle_point:R,date:ee,date_range:ue}=b.value;if(q){const Z=n("meeting.finishMeetingConfig");if($===mn&&!X)return{type:"danger",message:Z};if($===vn&&(!X||!(R!=null&&R.length)))return{type:"danger",message:Z};if($===tn&&(!X||!(R!=null&&R.length)))return{type:"danger",message:Z};if(!(ue!=null&&ue.length))return{type:"danger",message:n("meeting.selectMeetingDate")};const se=n("meeting.invalidMeetingDuration");let _e=ue[0];const ke=ue[1];if($===vn){const De=new Set;for(;!ye(_e).isAfter(ye(ke));)De.add(ye(_e).day()),_e=ye(_e).add(1,"day").format("YYYY-MM-DD");if(R.every(Ne=>!De.has(Ne)))return{type:"danger",message:se}}if($===tn){const De=new Set;for(;!ye(_e).isAfter(ye(ke));)De.add(ye(_e).date()),_e=ye(_e).add(1,"day").format("YYYY-MM-DD");if(R.every(Ne=>!De.has(Ne)))return{type:"danger",message:se}}}else if(!ee)return{type:"danger",message:n("meeting.selectMeetingDate")};if(!((oe=M==null?void 0:M.trim())!=null&&oe.length))return{type:"danger",message:n("meeting.selectMeetingTime")};const J=M.split("-").map(Z=>Z.split(":").map(Number));if(J[0][0]>J[1][0]||J[0][0]===J[1][0]&&J[0][1]>=J[1][1])return{type:"danger",message:n("meeting.endTimeAfterStartTime")};if(!b.value.is_cycle&&b.value.date&&b.value.start){const Z=`${b.value.date} ${b.value.start}`;if(ye(Z).isBefore(ye()))return{type:"danger",message:n("meeting.startTimeBeforeEndTime")}}},triggers:["blur","change"]}],email_list:[{validator:M=>{if(c.isEdit)return{};const q=M.replaceAll(" ","").replaceAll(",",";")||"";if(q.length){if(q.length>1020)return{type:"danger",message:n("meeting.emailTooLong")};const $=q.split(";")||[];if($.some(X=>!Ch.test(X)))return{type:"danger",message:n("meeting.emailInvalid")};if($.some(X=>X.length>50))return{type:"danger",message:n("meeting.singleEmailTooLong")};if($.length>20)return{type:"danger",message:n("meeting.emailCountTooLong")}}},triggers:["blur","change"]}]})),I=t.ref([]),D=async()=>{if(!c.getGroupsRequest)return;const M=await c.getGroupsRequest();I.value=M.map(q=>({...q,label:q.group_name,value:q.group_name})),c.data&&j(b.value.group_name)},z=t.ref([]),H=async()=>{if(!c.getPlatformsRequest)return;const M=await c.getPlatformsRequest();z.value=M.map(q=>({label:l(q),value:q})),c.data||(b.value.platform=z.value[0].value)},U=i;t.watch(()=>c.data,M=>{var q;if(M){const $=((q=M==null?void 0:M.cycle_sub)==null?void 0:q.find(oe=>oe.sub_id===c.subId))||{},{mid:X,date:R,start:ee,end:ue,sub_id:J}=$;Object.assign(b.value,M,c.isSub?{is_cycle:!1,mid:X,date:R,start:ee,end:ue,sub_id:J}:{})}else{const $=ye().format("YYYY-MM-DD"),X=ye().format("HH:mm");let R="",ee="";const ue=Nn(X);if(ue<=Nn("08:00"))R="08:00",ee="09:00";else if(Nn("22:15")<=ue)R="08:00",ee="09:00";else{let[oe,Z]=X.split(":").map(Number);Z>=45?(oe++,Z=0):Z=(Math.floor(Z/15)+1)*15,R=vc(oe*60+Z).slice(3),ee=vc(oe*60+Z+60).slice(3)}const J=[ye().format("YYYY-MM-DD"),ye().add(1,"month").format("YYYY-MM-DD")];Object.assign(b.value,{date:$,start:R,end:ee,time:`${R}-${ee}`,date_range:J})}},{immediate:!0,deep:!0});const B=()=>{var M,q,$,X;b.value=Object.assign({},T),(q=(M=y.value)==null?void 0:M.clearValidate)==null||q.call(M),(X=($=y.value)==null?void 0:$.resetFields)==null||X.call($),U("cancel")},G=()=>{b.value.cycle_point=[],b.value.cycle_interval=1},C=()=>{b.value.platform="WELINK"},{lePadV:k}=It.useScreen(),O=async()=>{var q;let M=c.isEdit?n("meeting.editSuccess"):n("meeting.booSuccess");try{x.value=!0;const $=await y.value.validate();if(!$||$.some(He=>!!He))return;const{topic:X,etherpad:R,group_name:ee,platform:ue,date:J,start:oe,end:Z,agenda:se,is_record:_e,is_cycle:ke,date_range:De,cycle_type:Ne,cycle_interval:Ve,cycle_point:et}=b.value;let Re={topic:X,etherpad:R,agenda:se,is_record:_e,group_name:ee,platform:ue,is_cycle:ke};if(ke?(Re={...Re,cycle_interval:Ve,cycle_type:Ne,cycle_start_date:(De==null?void 0:De[0])||"",cycle_end_date:(De==null?void 0:De[1])||"",cycle_start:oe,cycle_end:Z},Ne!==mn&&(Re={...Re,cycle_point:et.join(",")})):Re={...Re,date:(J==null?void 0:J.split(" ")[0])||"",start:oe,end:Z},c.isEdit)if(c.isSub){const{mid:He,sub_id:Fe}=b.value,{date:We,start:kt,end:it}=Re;await(c==null?void 0:c.editSubMeetingRequest(Fe,{mid:He,date:We,start:kt,end:it,is_notify:!0}))}else{const{email_list:He,platform:Fe,group_name:We,etherpad:kt,...it}=Re;await(c==null?void 0:c.editMeetingRequest((q=c.data)==null?void 0:q.id,{...it,is_notify:!0}))}else await(c==null?void 0:c.createMeetingRequest({...Re,email_list:b.value.email_list.replaceAll(" ","")}));const Ke=n("meeting.meetingHandleSuccess",[b.value.topic,M]);d.success({content:Ke}),U("confirm")}finally{x.value=!1}};t.onMounted(()=>{D(),H()});const j=M=>{const q=I.value.find($=>$.value===M);c.isEdit||(b.value.etherpad=(q==null?void 0:q.etherpad)||"",b.value.email_list=(q==null?void 0:q.email_list)||"")},L=M=>M.getTime()<Date.now()-1440*60*1e3,V=()=>{b.value.start&&b.value.end?b.value.time=`${b.value.start}-${b.value.end}`:b.value.time=""};return e({confirm:O}),(M,q)=>(t.openBlock(),t.createElementBlock("div",Qy,[t.createVNode(t.unref(A.OForm),{model:b.value,ref_key:"formRef",ref:y,"has-required":"",layout:t.unref(k)?"v":"h",class:"form-wrapper"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OFormItem),{rules:N.value.topic,label:t.unref(n)("meeting.meetingName"),field:"topic"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OInput),{disabled:r.isSub,size:"large",placeholder:t.unref(n)("meeting.enterMeetingName"),style:{width:"100%"},modelValue:b.value.topic,"onUpdate:modelValue":q[0]||(q[0]=$=>b.value.topic=$)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),t.createVNode(t.unref(A.OFormItem),{rules:N.value.group_name,label:r.groupType===t.unref(vi).GROUP?t.unref(n)("meeting.meetingGroup"):t.unref(n)("meeting.meetingSig"),field:"group_name"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OSelect),{disabled:r.isEdit,placeholder:r.groupType===t.unref(vi).GROUP?t.unref(n)("meeting.selectGroup"):t.unref(n)("meeting.selectSig"),size:"large",style:{width:"100%"},modelValue:b.value.group_name,"onUpdate:modelValue":q[1]||(q[1]=$=>b.value.group_name=$),onChange:j},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(I.value,$=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{key:$.value,value:$.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString($.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["disabled","placeholder","modelValue"])]),_:1},8,["rules","label"]),b.value.group_name?(t.openBlock(),t.createBlock(t.unref(A.OFormItem),{key:0,rules:N.value.etherpad,label:"Etherpad",field:"etherpad"},{label:t.withCtx(()=>[t.createElementVNode("div",Zy,[t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.etherpad"))+" ",1),t.createVNode(t.unref(A.OPopover),null,{target:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(_c))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",Jy,t.toDisplayString(t.unref(n)("meeting.etherpadDesc")),1)]),_:1})])]),default:t.withCtx(()=>[t.createVNode(t.unref(A.OInput),{disabled:r.isEdit,size:"large",placeholder:t.unref(n)("meeting.enterEtherpad"),style:{width:"100%"},modelValue:b.value.etherpad,"onUpdate:modelValue":q[2]||(q[2]=$=>b.value.etherpad=$)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OFormItem),{label:t.unref(n)("meeting.meetingTime"),field:"time",rules:N.value.time,class:"repeat-row",required:""},{default:t.withCtx(()=>[t.createElementVNode("div",e_,[r.isSub?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(t.unref(A.OFormItem),{key:0,field:"repeat",class:"repeat-item"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.ORadioGroup),{modelValue:b.value.is_cycle,"onUpdate:modelValue":q[3]||(q[3]=$=>b.value.is_cycle=$),onChange:C,disabled:r.isEdit},{default:t.withCtx(()=>[t.createVNode(t.unref(A.ORadio),{value:!1},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("meeting.nonRepeat")),1)]),_:1}),t.createVNode(t.unref(A.ORadio),{value:!0},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("meeting.isRepeat")),1)]),_:1})]),_:1},8,["modelValue","disabled"])]),_:1})),t.createElementVNode("div",t_,[b.value.is_cycle?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(t.unref(A.OFormItem),{label:t.unref(n)("meeting.every"),class:"full-width-item"},{default:t.withCtx(()=>[t.createElementVNode("div",i_,[b.value.cycle_type!==t.unref(tn)?(t.openBlock(),t.createBlock(t.unref(A.OFormItem),{key:0},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElInputNumber),{size:"large",modelValue:b.value.cycle_interval,"onUpdate:modelValue":q[4]||(q[4]=$=>b.value.cycle_interval=$),min:1,max:S.value},null,8,["modelValue","max"])]),_:1})):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OFormItem),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OSelect),{size:"large",modelValue:b.value.cycle_type,"onUpdate:modelValue":q[5]||(q[5]=$=>b.value.cycle_type=$),class:"interval-select",optionWrapClass:"o-meeting-form-interval-select-options",onChange:G},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(m),$=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{key:$.value,value:$.value,label:$.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])]),_:1})])]),_:1},8,["label"]),b.value.cycle_type!==t.unref(mn)?(t.openBlock(),t.createBlock(t.unref(A.OFormItem),{key:0,label:t.unref(n)("meeting.in"),field:"cycle_point",class:"point-item"},{default:t.withCtx(()=>[b.value.cycle_type===t.unref(vn)?(t.openBlock(),t.createBlock(t.unref(A.OSelect),{key:0,size:"large",multiple:"",modelValue:b.value.cycle_point,"onUpdate:modelValue":q[6]||(q[6]=$=>b.value.cycle_point=$),placeholder:t.unref(n)("meeting.selectRepeatDate"),"max-tag-count":1},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(g),$=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{key:$.value,value:$.value,label:$.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])):t.createCommentVNode("",!0),b.value.cycle_type===t.unref(tn)?(t.openBlock(),t.createBlock(Ky,{key:1,modelValue:b.value.cycle_point,"onUpdate:modelValue":q[7]||(q[7]=$=>b.value.cycle_point=$)},null,8,["modelValue"])):t.createCommentVNode("",!0)]),_:1},8,["label"])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OFormItem),{label:t.unref(n)("meeting.meetingDuration"),field:"date_range"},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElDatePicker),{size:"large",modelValue:b.value.date_range,"onUpdate:modelValue":q[8]||(q[8]=$=>b.value.date_range=$),"start-placeholder":t.unref(n)("meeting.startDate"),"end-placeholder":t.unref(n)("meeting.endDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":L,clearable:!1,type:"daterange","popper-class":"o-meeting-form-date-picker-popper"},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"])],64)):(t.openBlock(),t.createBlock(t.unref(A.OFormItem),{key:1,label:t.unref(n)("meeting.meetingDate"),field:"date"},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElDatePicker),{"popper-class":"o-meeting-form-date-picker-popper",size:"large",modelValue:b.value.date,"onUpdate:modelValue":q[9]||(q[9]=$=>b.value.date=$),placeholder:t.unref(n)("meeting.selectDate"),style:{width:"100%"},"value-format":"YYYY-MM-DD","disabled-date":L,clearable:!1},null,8,["modelValue","placeholder"])]),_:1},8,["label"])),t.createVNode(t.unref(A.OFormItem),{label:t.unref(n)("meeting.meetingTime")},{default:t.withCtx(()=>[t.createElementVNode("div",n_,[t.createVNode(t.unref(A.OFormItem),{field:"start"},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElTimeSelect),{"popper-class":"meeting-form-time-popover",step:"00:15",start:"08:00",end:"22:45",placeholder:t.unref(n)("meeting.startTime"),modelValue:b.value.start,"onUpdate:modelValue":q[10]||(q[10]=$=>b.value.start=$),size:"large",clearable:!1,onChange:V},null,8,["placeholder","modelValue"])]),_:1}),q[17]||(q[17]=t.createElementVNode("span",null,"-",-1)),t.createVNode(t.unref(A.OFormItem),{field:"end"},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElTimeSelect),{"popper-class":"meeting-form-time-popover",step:"00:15",start:"08:00",end:"22:45",placeholder:t.unref(n)("meeting.endTime"),modelValue:b.value.end,"onUpdate:modelValue":q[11]||(q[11]=$=>b.value.end=$),size:"large",clearable:!1,onChange:V},null,8,["placeholder","modelValue"])]),_:1}),t.createVNode(t.unref(A.OIconTime))])]),_:1},8,["label"])])])]),_:1},8,["label","rules"]),t.createVNode(t.unref(A.OFormItem),{label:t.unref(n)("meeting.meetingPlatform"),field:"platform",rules:N.value.platform,class:"platform-item"},{default:t.withCtx(()=>[r.data?(t.openBlock(),t.createElementBlock("span",r_,t.toDisplayString(t.unref(l)(b.value.platform)),1)):(t.openBlock(),t.createBlock(t.unref(A.ORadioGroup),{key:0,modelValue:b.value.platform,"onUpdate:modelValue":q[12]||(q[12]=$=>b.value.platform=$),disabled:b.value.is_cycle},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value,$=>(t.openBlock(),t.createBlock(t.unref(A.ORadio),{key:$.value,value:$.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(l)($.label)),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","disabled"]))]),_:1},8,["label","rules"]),t.createVNode(t.unref(A.OFormItem),{field:"agenda",label:t.unref(n)("meeting.meetingAgenda"),rules:N.value.genda},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OTextarea),{disabled:r.isSub,size:"large",placeholder:t.unref(n)("meeting.enterMeetingAgenda"),style:{width:"100%"},rows:4,modelValue:b.value.agenda,"onUpdate:modelValue":q[13]||(q[13]=$=>b.value.agenda=$)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label","rules"]),t.createVNode(t.unref(A.OFormItem),{label:t.unref(n)("meeting.meetingRecord"),field:"is_record",class:"record-item full-width-item"},{default:t.withCtx(()=>[t.unref(k)?(t.openBlock(),t.createBlock(t.unref(A.OSwitch),{key:0,modelValue:b.value.is_record,"onUpdate:modelValue":q[14]||(q[14]=$=>b.value.is_record=$),disabled:r.isSub},null,8,["modelValue","disabled"])):(t.openBlock(),t.createElementBlock("div",s_,[t.createVNode(t.unref(A.OSwitch),{modelValue:b.value.is_record,"onUpdate:modelValue":q[15]||(q[15]=$=>b.value.is_record=$),disabled:r.isSub},null,8,["modelValue","disabled"]),t.createElementVNode("div",a_,[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(Tc))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.meetingRecordDesc",[t.unref(l)(b.value.platform)])),1)])]))]),_:1},8,["label"]),t.unref(k)?(t.openBlock(),t.createElementBlock("div",o_,[t.createElementVNode("div",l_,[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(Tc))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.meetingRecordDesc",[t.unref(l)(b.value.platform)])),1)])])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OFormItem),{field:"email_list",rules:N.value.email_list},{label:t.withCtx(()=>[t.createElementVNode("div",u_,[t.createElementVNode("span",null,t.toDisplayString(t.unref(n)("meeting.meetingEmail"))+" ",1),t.createVNode(t.unref(A.OPopover),null,{target:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(_c))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",c_,[t.createTextVNode(t.toDisplayString(t.unref(n)("meeting.meetingEmailDesc"))+" ",1),t.createElementVNode("a",{class:"link-text",href:`/${t.unref(s)}/sig`},t.toDisplayString(t.unref(n)("meeting.sigGroupEmail")),9,d_)])]),_:1})])]),default:t.withCtx(()=>[t.createVNode(t.unref(A.OTextarea),{disabled:r.isEdit,size:"large",placeholder:t.unref(n)("meeting.enterEmail"),style:{width:"100%"},rows:4,modelValue:b.value.email_list,"onUpdate:modelValue":q[16]||(q[16]=$=>b.value.email_list=$)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["rules"])]),_:1},8,["model","layout"]),r.showBtns?(t.openBlock(),t.createElementBlock("div",h_,[t.createVNode(t.unref(A.OButton),{color:"primary",variant:"solid",size:"large",onClick:O,loading:x.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.isEdit?t.unref(n)("common.save"):r.bookText||t.unref(n)("meeting.book")),1)]),_:1},8,["loading"]),t.createVNode(t.unref(A.OButton),{color:"primary",variant:"outline",size:"large",onClick:B},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(n)("common.cancel")),1)]),_:1})])):t.createCommentVNode("",!0)]))}}),f_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function p_(r,e){return t.openBlock(),t.createElementBlock("svg",f_,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"#0071f3",d:"M9.669 4.029l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM12.669 7.526l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM6.669 8.52l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM15.669 9.531l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM3.669 11.023l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM18.669 11.777l-0.034-0.034c0-0.48 0.377-0.857 0.857-0.857s0.857 0.377 0.857 0.857l-0.034 0.034h-1.646zM20.349 13.234l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM5.349 13.989l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM17.349 15.497l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM8.349 16.474l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM14.349 17.486l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857zM11.349 20.486l-0.034-0.034h-1.646l-0.034 0.034c0 0.48 0.377 0.857 0.857 0.857s0.857-0.377 0.857-0.857z"},null,-1),t.createElementVNode("path",{fill:"none",stroke:"#0071f3","stroke-linejoin":"round","stroke-linecap":"round","stroke-miterlimit":"4","stroke-width":"1.71",d:"M4.491 10.989v3M7.491 8.486v7.989M10.491 3.994v16.491M13.491 7.491v9.994M16.491 9.497v6M19.491 11.743v1.491"},null,-1),t.createElementVNode("path",{fill:"#0071f3",d:"M22.491 12.994c0.274 0 0.497-0.223 0.497-0.497s-0.223-0.497-0.497-0.497c-0.274 0-0.497 0.223-0.497 0.497s0.223 0.497 0.497 0.497zM1.491 12.994c0.274 0 0.497-0.223 0.497-0.497s-0.223-0.497-0.497-0.497c-0.274 0-0.497 0.223-0.497 0.497s0.223 0.497 0.497 0.497z"},null,-1)])])}const m_={name:"meeting-icon-playing",render:p_},g_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32"};function v_(r,e){return t.openBlock(),t.createElementBlock("svg",g_,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M23.399 22.031l0.116 0.099 3.68 3.672c0.365 0.364 0.365 0.955 0.001 1.32-0.328 0.328-0.839 0.361-1.204 0.1l-0.116-0.099-3.68-3.672c-0.365-0.364-0.365-0.955-0.001-1.32 0.328-0.328 0.839-0.361 1.204-0.1zM14.428 4.605c5.465 0 9.897 4.431 9.897 9.897s-4.431 9.897-9.897 9.897c-5.465 0-9.897-4.431-9.897-9.897s4.431-9.897 9.897-9.897zM14.428 6.472c-4.435 0-8.031 3.595-8.031 8.031s3.595 8.031 8.031 8.031c4.435 0 8.031-3.595 8.031-8.031s-3.595-8.031-8.031-8.031z"},null,-1)])])}const y_={name:"components-icon-search",render:v_},__={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function T_(r,e){return t.openBlock(),t.createElementBlock("svg",__,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M5.759 15.127c0.251 0.251 0.644 0.271 0.918 0.063l0.072-0.063 5.016-5.016c0.1-0.1 0.254-0.115 0.37-0.043l0.054 0.043 5.062 5.062c0.273 0.273 0.717 0.273 0.99 0 0.251-0.251 0.271-0.644 0.063-0.918l-0.063-0.072-5.062-5.062c-0.629-0.629-1.628-0.662-2.296-0.099l-0.108 0.099-5.016 5.016c-0.273 0.273-0.273 0.717 0 0.99z"},null,-1)])])}const b_={name:"components-icon-chevron-up",render:T_},C_={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function x_(r,e){return t.openBlock(),t.createElementBlock("svg",C_,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M3.42 6.060c0-2.52 2.040-4.575 4.575-4.575 2.52 0 4.575 2.055 4.575 4.575s-2.055 4.575-4.575 4.575c-2.535 0-4.575-2.055-4.575-4.575zM15.015 10.47c0-1.8 1.455-3.27 3.255-3.27 1.815 0 3.27 1.47 3.27 3.27s-1.455 3.27-3.27 3.27c-1.8 0-3.255-1.47-3.255-3.27zM4.56 12.915h6.855c2.535 0 4.575 2.055 4.575 4.575 0 0.255-0.015 0.51-0.060 0.75-0.36 2.16-2.235 3.825-4.515 3.825h-6.855c-2.52 0-4.575-2.055-4.575-4.575s2.055-4.575 4.575-4.575zM17.595 17.49c0-0.75-0.135-1.455-0.375-2.115h3.51c1.8 0 3.255 1.455 3.255 3.255s-1.455 3.27-3.255 3.27h-4.995c1.155-1.125 1.86-2.685 1.86-4.41z"},null,-1)])])}const S_={name:"meeting-icon-speaker",render:x_},E_={class:"o-meeting-playback-subtitles"},k_={class:"search-captions"},w_={key:0,class:"suffix-box"},D_={class:"right-handle"},A_=["onClick"],I_={class:"info"},N_={class:"num"},O_={class:"speaker"},B_={class:"start-time"},L_={class:"text"},P_={key:1},M_=t.defineComponent({__name:"OMeetingPlaybackSubtitles",props:{captions:{default:()=>[]},instance:{},trackIdx:{}},setup(r){const e=Ca(),i=r,{t:n}=Ue.useI18n(),s=t.computed(()=>i.trackIdx),a=t.ref(),o=t.ref(!1),l=()=>{o.value=!0},c=fi.useDebounceFn(()=>{o.value=!1},3e3);t.watch(()=>o.value,L=>{L&&c()});const d=t.ref([]);t.watch(()=>i.captions,()=>{d.value=i.captions||[],t.nextTick(()=>{var L;a.value&&((L=a.value)==null||L.scrollTo({top:0,behavior:"smooth"}))})},{immediate:!0,deep:!0});const m=L=>`00:${L.split(".")[0]}`.slice(-8),g=L=>{const V=L.split(":"),M=V[V.length-3]?parseInt(V[V.length-3]):0,q=parseInt(V[V.length-2]),$=parseFloat(V[V.length-1]);return M*60*60+q*60+$};t.onMounted(()=>{var L;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(L=a.value)==null||L.addEventListener("wheel",l)}),t.watch(()=>d.value,()=>{var L;a.value=document.querySelector("#captionsScrollDom > .o-scroller-container"),(L=a.value)==null||L.addEventListener("wheel",l)});const S=t.ref(0),T=()=>{},b=L=>{const V=i.instance;if(!V)return;const M=g(L);V.currentTime(M)},y=t.ref(""),x=t.ref(0),N=t.ref(0),I=t.ref([]),D=n("common.all"),z=t.computed(()=>[...new Set(i.captions.map(L=>L.speakerLabel).sort().reverse())]);t.watch(()=>s.value,()=>{var V,M;if(o.value&&y.value)return;const L=(V=a.value)==null?void 0:V.querySelectorAll(".captions-item")[s.value-1];(M=a.value)==null||M.scrollTo({top:(L==null?void 0:L.offsetTop)-16,behavior:"smooth"})}),t.onUnmounted(()=>{a.value&&a.value.removeEventListener("wheel",l)});const H=(L,V)=>{var R,ee,ue,J,oe,Z;const M=document.getElementsByClassName("light-keyword")[L-1],q=document.getElementsByClassName("light-keyword")[L-V];q==null||q.classList.remove("light-keyword-active"),M==null||M.classList.add("light-keyword-active");const $=M.offsetTop+M.offsetHeight<((R=a.value)==null?void 0:R.scrollTop),X=M.offsetTop>((ee=a.value)==null?void 0:ee.offsetHeight)+((ue=a.value)==null?void 0:ue.scrollTop);($||X)&&((Z=a.value)==null||Z.scrollTo({top:(oe=(J=M.parentElement)==null?void 0:J.parentElement)==null?void 0:oe.offsetTop,behavior:"smooth"}))},U=()=>{!x.value||N.value===1||(N.value--,H(N.value,0))},B=L=>{L!=null&&L.shiftKey||!x.value||N.value===x.value||(N.value++,H(N.value,2))},G=L=>{d.value=i.captions.filter(V=>I.value.includes(V.speakerLabel)).map(V=>({...V,contentHtml:L?V.contentHtml.replaceAll(L,`<span class="light-keyword">${L}</span>`):V.contentHtml})),t.nextTick(()=>{var M;const V=document.getElementsByClassName("light-keyword");x.value=V.length,x.value?B():(M=a.value)==null||M.scrollTo({top:0,behavior:"smooth"})})},C=fi.useDebounceFn(G,300);t.watch(()=>y.value,L=>{N.value=0,C(L)}),t.watch(()=>z.value,L=>{I.value=L},{immediate:!0});const k=t.ref(!1),O=t.ref(!1),j=L=>{O.value=!1,L?I.value=z.value:I.value=[]};return t.watch(()=>I.value,L=>{L.length===0?(k.value=!1,O.value=!1):L.length===z.value.length?(k.value=!0,O.value=!1):O.value=!0,C(y.value)},{deep:!0}),(L,V)=>(t.openBlock(),t.createElementBlock("div",E_,[t.createElementVNode("div",k_,[t.createVNode(t.unref(A.OInput),{modelValue:y.value,"onUpdate:modelValue":V[1]||(V[1]=M=>y.value=M),onKeydown:[t.withKeys(B,["enter"]),t.withKeys(t.withModifiers(U,["shift","stop"]),["enter"])],placeholder:t.unref(n)("meeting.searchSubtitlePlaceholder"),size:"large",class:"input-captions"},{prefix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(y_))]),_:1})]),suffix:t.withCtx(()=>[y.value?(t.openBlock(),t.createElementBlock("div",w_,[t.createElementVNode("span",null,t.toDisplayString(N.value)+"/"+t.toDisplayString(x.value),1),t.createVNode(t.unref(A.OIcon),{onClick:U},{default:t.withCtx(()=>[t.createVNode(t.unref(b_))]),_:1}),t.createVNode(t.unref(A.OIcon),{onClick:B},{default:t.withCtx(()=>[t.createVNode(t.unref(Dl))]),_:1}),t.createVNode(t.unref(A.ODivider),{direction:"v"}),t.createVNode(t.unref(A.OIcon),{class:"hover-close",onClick:V[0]||(V[0]=M=>y.value="")},{default:t.withCtx(()=>[t.createVNode(t.unref(wl))]),_:1})])):t.createCommentVNode("",!0)]),_:1},8,["modelValue","onKeydown","placeholder"]),t.createElementVNode("div",D_,[t.createVNode(t.unref(rt.ElSelect),{multiple:"",modelValue:I.value,"onUpdate:modelValue":V[3]||(V[3]=M=>I.value=M),"popper-class":"speakers-selector-popper",class:"speakers-selector",placement:"bottom"},{prefix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(S_))]),_:1})]),header:t.withCtx(()=>[t.createVNode(t.unref(rt.ElCheckbox),{modelValue:k.value,"onUpdate:modelValue":V[2]||(V[2]=M=>k.value=M),indeterminate:O.value,onChange:j},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(D)),1)]),_:1},8,["modelValue","indeterminate"])]),default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value,M=>(t.openBlock(),t.createBlock(t.unref(rt.ElOption),{key:M,label:M,value:M},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElCheckbox),{"model-value":I.value.includes(M)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(M),1)]),_:2},1032,["model-value"])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue"])])]),t.createVNode(t.unref(A.OTab),{modelValue:S.value,"onUpdate:modelValue":V[4]||(V[4]=M=>S.value=M),variant:"text",class:"captions-tab",onChange:T},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OTabPane),{value:0,label:t.unref(n)("meeting.audioToText")},{default:t.withCtx(()=>[d.value.length?(t.openBlock(),t.createBlock(t.unref(A.OScroller),{key:0,id:"captionsScrollDom",class:"captions-scroller","show-type":"hover",size:"small","disabled-x":""},{default:t.withCtx(()=>[t.createVNode(t.unref(A.ORow),{gap:"0 12px",wrap:"wrap"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.value,(M,q)=>(t.openBlock(),t.createBlock(t.unref(A.OCol),{flex:"0 0 100%",key:q},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["captions-item",{"captions-item-active":s.value===q+1}]),onClick:$=>b(M.start_time)},[t.createElementVNode("div",I_,[t.createElementVNode("div",N_,t.toDisplayString(M.speakerIdx),1),t.createElementVNode("div",O_,t.toDisplayString(M.speakerLabel),1),t.createElementVNode("div",B_,t.toDisplayString(m(M.start_time)),1),s.value===q+1?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0,class:"playing initial-fill"},{default:t.withCtx(()=>[t.createVNode(t.unref(m_))]),_:1})):t.createCommentVNode("",!0)]),t.withDirectives(t.createElementVNode("div",L_,null,512),[[t.unref(e),M.contentHtml]])],10,A_)]),_:2},1024))),128))]),_:1})]),_:1})):(t.openBlock(),t.createElementBlock("div",P_,"111"))]),_:1},8,["label"])]),_:1},8,["modelValue"])]))}});var mo,Cc;function xa(){if(Cc)return mo;Cc=1;var r;return typeof window<"u"?r=window:typeof ea<"u"?r=ea:typeof self<"u"?r=self:r={},mo=r,mo}var R_=xa();const Y=fr(R_),V_={},F_=Object.freeze(Object.defineProperty({__proto__:null,default:V_},Symbol.toStringTag,{value:"Module"})),$_=uy(F_);var go,xc;function kh(){if(xc)return go;xc=1;var r=typeof ea<"u"?ea:typeof window<"u"?window:{},e=$_,i;return typeof document<"u"?i=document:(i=r["__GLOBAL_DOCUMENT_CACHE@4"],i||(i=r["__GLOBAL_DOCUMENT_CACHE@4"]=e)),go=i,go}var U_=kh();const Te=fr(U_);var Rs={exports:{}},vo={exports:{}},Sc;function z_(){return Sc||(Sc=1,(function(r){function e(){return r.exports=e=Object.assign?Object.assign.bind():function(i){for(var n=1;n<arguments.length;n++){var s=arguments[n];for(var a in s)({}).hasOwnProperty.call(s,a)&&(i[a]=s[a])}return i},r.exports.__esModule=!0,r.exports.default=r.exports,e.apply(null,arguments)}r.exports=e,r.exports.__esModule=!0,r.exports.default=r.exports})(vo)),vo.exports}var yo,Ec;function H_(){if(Ec)return yo;Ec=1,yo=e;var r=Object.prototype.toString;function e(i){if(!i)return!1;var n=r.call(i);return n==="[object Function]"||typeof i=="function"&&n!=="[object RegExp]"||typeof window<"u"&&(i===window.setTimeout||i===window.alert||i===window.confirm||i===window.prompt)}return yo}var _o,kc;function q_(){if(kc)return _o;kc=1;function r(s,a){var o=typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(o)return(o=o.call(s)).next.bind(o);if(Array.isArray(s)||(o=e(s))||a){o&&(s=o);var l=0;return function(){return l>=s.length?{done:!0}:{done:!1,value:s[l++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
6
6
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e(s,a){if(s){if(typeof s=="string")return i(s,a);var o=Object.prototype.toString.call(s).slice(8,-1);if(o==="Object"&&s.constructor&&(o=s.constructor.name),o==="Map"||o==="Set")return Array.from(s);if(o==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return i(s,a)}}function i(s,a){(a==null||a>s.length)&&(a=s.length);for(var o=0,l=new Array(a);o<a;o++)l[o]=s[o];return l}var n=(function(){function s(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var a=s.prototype;return a.getIsEnabled=function(){return this.enabled_},a.enable=function(){this.enabled_=!0},a.disable=function(){this.enabled_=!1},a.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},a.addInterceptor=function(l,c){this.typeToInterceptorsMap_.has(l)||this.typeToInterceptorsMap_.set(l,new Set);var d=this.typeToInterceptorsMap_.get(l);return d.has(c)?!1:(d.add(c),!0)},a.removeInterceptor=function(l,c){var d=this.typeToInterceptorsMap_.get(l);return d&&d.has(c)?(d.delete(c),!0):!1},a.clearInterceptorsByType=function(l){var c=this.typeToInterceptorsMap_.get(l);return c?(this.typeToInterceptorsMap_.delete(l),this.typeToInterceptorsMap_.set(l,new Set),!0):!1},a.clear=function(){return this.typeToInterceptorsMap_.size?(this.typeToInterceptorsMap_=new Map,!0):!1},a.getForType=function(l){return this.typeToInterceptorsMap_.get(l)||new Set},a.execute=function(l,c){for(var d=this.getForType(l),m=r(d),g;!(g=m()).done;){var S=g.value;try{c=S(c)}catch{}}return c},s})();return _o=n,_o}var To,wc;function j_(){if(wc)return To;wc=1;var r=(function(){function i(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1}var n=i.prototype;return n.getIsEnabled=function(){return this.enabled_},n.enable=function(){this.enabled_=!0},n.disable=function(){this.enabled_=!1},n.reset=function(){this.maxAttempts_=1,this.delayFactor_=.1,this.fuzzFactor_=.1,this.initialDelay_=1e3,this.enabled_=!1},n.getMaxAttempts=function(){return this.maxAttempts_},n.setMaxAttempts=function(a){this.maxAttempts_=a},n.getDelayFactor=function(){return this.delayFactor_},n.setDelayFactor=function(a){this.delayFactor_=a},n.getFuzzFactor=function(){return this.fuzzFactor_},n.setFuzzFactor=function(a){this.fuzzFactor_=a},n.getInitialDelay=function(){return this.initialDelay_},n.setInitialDelay=function(a){this.initialDelay_=a},n.createRetry=function(a){var o=a===void 0?{}:a,l=o.maxAttempts,c=o.delayFactor,d=o.fuzzFactor,m=o.initialDelay;return new e({maxAttempts:l||this.maxAttempts_,delayFactor:c||this.delayFactor_,fuzzFactor:d||this.fuzzFactor_,initialDelay:m||this.initialDelay_})},i})(),e=(function(){function i(s){this.maxAttempts_=s.maxAttempts,this.delayFactor_=s.delayFactor,this.fuzzFactor_=s.fuzzFactor,this.currentDelay_=s.initialDelay,this.currentAttempt_=1}var n=i.prototype;return n.moveToNextAttempt=function(){this.currentAttempt_++;var a=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+a},n.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},n.getCurrentDelay=function(){return this.currentDelay_},n.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},n.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},n.getCurrentFuzzedDelay=function(){var a=this.getCurrentMinPossibleDelay(),o=this.getCurrentMaxPossibleDelay();return a+Math.random()*(o-a)},i})();return To=r,To}var bo,Dc;function G_(){if(Dc)return bo;Dc=1;var r=xa(),e=function(s,a){return a===void 0&&(a=!1),function(o,l,c){if(o){s(o);return}if(l.statusCode>=400&&l.statusCode<=599){var d=c;if(a)if(r.TextDecoder){var m=i(l.headers&&l.headers["content-type"]);try{d=new TextDecoder(m).decode(c)}catch{}}else d=String.fromCharCode.apply(null,new Uint8Array(c));s({cause:d});return}s(null,c)}};function i(n){return n===void 0&&(n=""),n.toLowerCase().split(";").reduce(function(s,a){var o=a.split("="),l=o[0],c=o[1];return l.trim()==="charset"?c.trim():s},"utf-8")}return bo=e,bo}var Ac;function W_(){if(Ac)return Rs.exports;Ac=1;var r=xa(),e=z_(),i=H_(),n=q_(),s=j_();d.httpHandler=G_(),d.requestInterceptorsStorage=new n,d.responseInterceptorsStorage=new n,d.retryManager=new s;/**
7
7
  * @license
8
8
  * slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/>
@@ -10,7 +10,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
10
10
  * Available under the MIT license
11
11
  * <https://github.com/kesla/parse-headers/blob/master/LICENCE>
12
12
  */var a=function(b){var y={};return b&&b.trim().split(`
13
- `).forEach(function(x){var N=x.indexOf(":"),I=x.slice(0,N).trim().toLowerCase(),D=x.slice(N+1).trim();typeof y[I]>"u"?y[I]=D:Array.isArray(y[I])?y[I].push(D):y[I]=[y[I],D]}),y};Rs.exports=d,Rs.exports.default=d,d.XMLHttpRequest=r.XMLHttpRequest||S,d.XDomainRequest="withCredentials"in new d.XMLHttpRequest?d.XMLHttpRequest:r.XDomainRequest,o(["get","put","post","patch","head","delete"],function(T){d[T==="delete"?"del":T]=function(b,y,x){return y=c(b,y,x),y.method=T.toUpperCase(),m(y)}});function o(T,b){for(var y=0;y<T.length;y++)b(T[y])}function l(T){for(var b in T)if(T.hasOwnProperty(b))return!1;return!0}function c(T,b,y){var x=T;return i(b)?(y=b,typeof T=="string"&&(x={uri:T})):x=e({},b,{uri:T}),x.callback=y,x}function d(T,b,y){return b=c(T,b,y),m(b)}function m(T){if(typeof T.callback>"u")throw new Error("callback argument missing");if(T.requestType&&d.requestInterceptorsStorage.getIsEnabled()){var b={uri:T.uri||T.url,headers:T.headers||{},body:T.body,metadata:T.metadata||{},retry:T.retry,timeout:T.timeout},y=d.requestInterceptorsStorage.execute(T.requestType,b);T.uri=y.uri,T.headers=y.headers,T.body=y.body,T.metadata=y.metadata,T.retry=y.retry,T.timeout=y.timeout}var x=!1,N=function(X,R,ee){x||(x=!0,T.callback(X,R,ee))};function I(){U.readyState===4&&!d.responseInterceptorsStorage.getIsEnabled()&&setTimeout(H,0)}function D(){var $=void 0;if(U.response?$=U.response:$=U.responseText||g(U),V)try{$=JSON.parse($)}catch{}return $}function z($){if(clearTimeout(M),clearTimeout(T.retryTimeout),$ instanceof Error||($=new Error(""+($||"Unknown XMLHttpRequest Error"))),$.statusCode=0,!G&&d.retryManager.getIsEnabled()&&T.retry&&T.retry.shouldRetry()){T.retryTimeout=setTimeout(function(){T.retry.moveToNextAttempt(),T.xhr=U,m(T)},T.retry.getCurrentFuzzedDelay());return}if(T.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var X={headers:q.headers||{},body:q.body,responseUrl:U.responseURL,responseType:U.responseType},R=d.responseInterceptorsStorage.execute(T.requestType,X);q.body=R.body,q.headers=R.headers}return N($,q)}function H(){if(!G){var $;clearTimeout(M),clearTimeout(T.retryTimeout),T.useXDR&&U.status===void 0?$=200:$=U.status===1223?204:U.status;var X=q,R=null;if($!==0?(X={body:D(),statusCode:$,method:k,headers:{},url:C,rawRequest:U},U.getAllResponseHeaders&&(X.headers=a(U.getAllResponseHeaders()))):R=new Error("Internal XMLHttpRequest Error"),T.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var ee={headers:X.headers||{},body:X.body,responseUrl:U.responseURL,responseType:U.responseType},ue=d.responseInterceptorsStorage.execute(T.requestType,ee);X.body=ue.body,X.headers=ue.headers}return N(R,X,X.body)}}var U=T.xhr||null;U||(T.cors||T.useXDR?U=new d.XDomainRequest:U=new d.XMLHttpRequest);var B,G,C=U.url=T.uri||T.url,k=U.method=T.method||"GET",O=T.body||T.data,j=U.headers=T.headers||{},L=!!T.sync,V=!1,M,q={body:void 0,headers:{},statusCode:0,method:k,url:C,rawRequest:U};if("json"in T&&T.json!==!1&&(V=!0,j.accept||j.Accept||(j.Accept="application/json"),k!=="GET"&&k!=="HEAD"&&(j["content-type"]||j["Content-Type"]||(j["Content-Type"]="application/json"),O=JSON.stringify(T.json===!0?O:T.json))),U.onreadystatechange=I,U.onload=H,U.onerror=z,U.onprogress=function(){},U.onabort=function(){G=!0,clearTimeout(T.retryTimeout)},U.ontimeout=z,U.open(k,C,!L,T.username,T.password),L||(U.withCredentials=!!T.withCredentials),!L&&T.timeout>0&&(M=setTimeout(function(){if(!G){G=!0,U.abort("timeout");var $=new Error("XMLHttpRequest timeout");$.code="ETIMEDOUT",z($)}},T.timeout)),U.setRequestHeader)for(B in j)j.hasOwnProperty(B)&&U.setRequestHeader(B,j[B]);else if(T.headers&&!l(T.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in T&&(U.responseType=T.responseType),"beforeSend"in T&&typeof T.beforeSend=="function"&&T.beforeSend(U),U.send(O||null),U}function g(T){try{if(T.responseType==="document")return T.responseXML;var b=T.responseXML&&T.responseXML.documentElement.nodeName==="parsererror";if(T.responseType===""&&!b)return T.responseXML}catch{}return null}function S(){}return Rs.exports}var Y_=W_();const wh=fr(Y_);var Co={exports:{}},xo,Ic;function X_(){if(Ic)return xo;Ic=1;var r=kh(),e=Object.create||(function(){function C(){}return function(k){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return C.prototype=k,new C}})();function i(C,k){this.name="ParsingError",this.code=C.code,this.message=k||C.message}i.prototype=e(Error.prototype),i.prototype.constructor=i,i.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function n(C){function k(j,L,V,M){return(j|0)*3600+(L|0)*60+(V|0)+(M|0)/1e3}var O=C.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return O?O[3]?k(O[1],O[2],O[3].replace(":",""),O[4]):O[1]>59?k(O[1],O[2],0,O[4]):k(0,O[1],O[2],O[4]):null}function s(){this.values=e(null)}s.prototype={set:function(C,k){!this.get(C)&&k!==""&&(this.values[C]=k)},get:function(C,k,O){return O?this.has(C)?this.values[C]:k[O]:this.has(C)?this.values[C]:k},has:function(C){return C in this.values},alt:function(C,k,O){for(var j=0;j<O.length;++j)if(k===O[j]){this.set(C,k);break}},integer:function(C,k){/^-?\d+$/.test(k)&&this.set(C,parseInt(k,10))},percent:function(C,k){return k.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(k=parseFloat(k),k>=0&&k<=100)?(this.set(C,k),!0):!1}};function a(C,k,O,j){var L=j?C.split(j):[C];for(var V in L)if(typeof L[V]=="string"){var M=L[V].split(O);if(M.length===2){var q=M[0].trim(),$=M[1].trim();k(q,$)}}}function o(C,k,O){var j=C;function L(){var q=n(C);if(q===null)throw new i(i.Errors.BadTimeStamp,"Malformed timestamp: "+j);return C=C.replace(/^[^\sa-zA-Z-]+/,""),q}function V(q,$){var X=new s;a(q,function(R,ee){switch(R){case"region":for(var ue=O.length-1;ue>=0;ue--)if(O[ue].id===ee){X.set(R,O[ue].region);break}break;case"vertical":X.alt(R,ee,["rl","lr"]);break;case"line":var J=ee.split(","),oe=J[0];X.integer(R,oe),X.percent(R,oe)&&X.set("snapToLines",!1),X.alt(R,oe,["auto"]),J.length===2&&X.alt("lineAlign",J[1],["start","center","end"]);break;case"position":J=ee.split(","),X.percent(R,J[0]),J.length===2&&X.alt("positionAlign",J[1],["start","center","end"]);break;case"size":X.percent(R,ee);break;case"align":X.alt(R,ee,["start","center","end","left","right"]);break}},/:/,/\s/),$.region=X.get("region",null),$.vertical=X.get("vertical","");try{$.line=X.get("line","auto")}catch{}$.lineAlign=X.get("lineAlign","start"),$.snapToLines=X.get("snapToLines",!0),$.size=X.get("size",100);try{$.align=X.get("align","center")}catch{$.align=X.get("align","middle")}try{$.position=X.get("position","auto")}catch{$.position=X.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},$.align)}$.positionAlign=X.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},$.align)}function M(){C=C.replace(/^\s+/,"")}if(M(),k.startTime=L(),M(),C.substr(0,3)!=="-->")throw new i(i.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+j);C=C.substr(3),M(),k.endTime=L(),M(),V(C,k)}var l=r.createElement&&r.createElement("textarea"),c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},d={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},m={v:"title",lang:"lang"},g={rt:"ruby"};function S(C,k){function O(){if(!k)return null;function oe(se){return k=k.substr(se.length),se}var Z=k.match(/^([^<]*)(<[^>]*>?)?/);return oe(Z[1]?Z[1]:Z[2])}function j(oe){return l.innerHTML=oe,oe=l.textContent,l.textContent="",oe}function L(oe,Z){return!g[Z.localName]||g[Z.localName]===oe.localName}function V(oe,Z){var se=c[oe];if(!se)return null;var _e=C.document.createElement(se),ke=m[oe];return ke&&Z&&(_e[ke]=Z.trim()),_e}for(var M=C.document.createElement("div"),q=M,$,X=[];($=O())!==null;){if($[0]==="<"){if($[1]==="/"){X.length&&X[X.length-1]===$.substr(2).replace(">","")&&(X.pop(),q=q.parentNode);continue}var R=n($.substr(1,$.length-2)),ee;if(R){ee=C.document.createProcessingInstruction("timestamp",R),q.appendChild(ee);continue}var ue=$.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!ue||(ee=V(ue[1],ue[3]),!ee)||!L(q,ee))continue;if(ue[2]){var J=ue[2].split(".");J.forEach(function(oe){var Z=/^bg_/.test(oe),se=Z?oe.slice(3):oe;if(d.hasOwnProperty(se)){var _e=Z?"background-color":"color",ke=d[se];ee.style[_e]=ke}}),ee.className=J.join(" ")}X.push(ue[1]),q.appendChild(ee),q=ee;continue}q.appendChild(C.document.createTextNode(j($)))}return M}var T=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function b(C){for(var k=0;k<T.length;k++){var O=T[k];if(C>=O[0]&&C<=O[1])return!0}return!1}function y(C){var k=[],O="",j;if(!C||!C.childNodes)return"ltr";function L(q,$){for(var X=$.childNodes.length-1;X>=0;X--)q.push($.childNodes[X])}function V(q){if(!q||!q.length)return null;var $=q.pop(),X=$.textContent||$.innerText;if(X){var R=X.match(/^.*(\n|\r)/);return R?(q.length=0,R[0]):X}if($.tagName==="ruby")return V(q);if($.childNodes)return L(q,$),V(q)}for(L(k,C);O=V(k);)for(var M=0;M<O.length;M++)if(j=O.charCodeAt(M),b(j))return"rtl";return"ltr"}function x(C){if(typeof C.line=="number"&&(C.snapToLines||C.line>=0&&C.line<=100))return C.line;if(!C.track||!C.track.textTrackList||!C.track.textTrackList.mediaElement)return-1;for(var k=C.track,O=k.textTrackList,j=0,L=0;L<O.length&&O[L]!==k;L++)O[L].mode==="showing"&&j++;return++j*-1}function N(){}N.prototype.applyStyles=function(C,k){k=k||this.div;for(var O in C)C.hasOwnProperty(O)&&(k.style[O]=C[O])},N.prototype.formatStyle=function(C,k){return C===0?0:C+k};function I(C,k,O){N.call(this),this.cue=k,this.cueDiv=S(C,k.text);var j={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:k.vertical===""?"horizontal-tb":k.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(j,this.cueDiv),this.div=C.document.createElement("div"),j={direction:y(this.cueDiv),writingMode:k.vertical===""?"horizontal-tb":k.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:k.align==="middle"?"center":k.align,font:O.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(j),this.div.appendChild(this.cueDiv);var L=0;switch(k.positionAlign){case"start":case"line-left":L=k.position;break;case"center":L=k.position-k.size/2;break;case"end":case"line-right":L=k.position-k.size;break}k.vertical===""?this.applyStyles({left:this.formatStyle(L,"%"),width:this.formatStyle(k.size,"%")}):this.applyStyles({top:this.formatStyle(L,"%"),height:this.formatStyle(k.size,"%")}),this.move=function(V){this.applyStyles({top:this.formatStyle(V.top,"px"),bottom:this.formatStyle(V.bottom,"px"),left:this.formatStyle(V.left,"px"),right:this.formatStyle(V.right,"px"),height:this.formatStyle(V.height,"px"),width:this.formatStyle(V.width,"px")})}}I.prototype=e(N.prototype),I.prototype.constructor=I;function D(C){var k,O,j,L;if(C.div){O=C.div.offsetHeight,j=C.div.offsetWidth,L=C.div.offsetTop;var V=(V=C.div.childNodes)&&(V=V[0])&&V.getClientRects&&V.getClientRects();C=C.div.getBoundingClientRect(),k=V?Math.max(V[0]&&V[0].height||0,C.height/V.length):0}this.left=C.left,this.right=C.right,this.top=C.top||L,this.height=C.height||O,this.bottom=C.bottom||L+(C.height||O),this.width=C.width||j,this.lineHeight=k!==void 0?k:C.lineHeight}D.prototype.move=function(C,k){switch(k=k!==void 0?k:this.lineHeight,C){case"+x":this.left+=k,this.right+=k;break;case"-x":this.left-=k,this.right-=k;break;case"+y":this.top+=k,this.bottom+=k;break;case"-y":this.top-=k,this.bottom-=k;break}},D.prototype.overlaps=function(C){return this.left<C.right&&this.right>C.left&&this.top<C.bottom&&this.bottom>C.top},D.prototype.overlapsAny=function(C){for(var k=0;k<C.length;k++)if(this.overlaps(C[k]))return!0;return!1},D.prototype.within=function(C){return this.top>=C.top&&this.bottom<=C.bottom&&this.left>=C.left&&this.right<=C.right},D.prototype.overlapsOppositeAxis=function(C,k){switch(k){case"+x":return this.left<C.left;case"-x":return this.right>C.right;case"+y":return this.top<C.top;case"-y":return this.bottom>C.bottom}},D.prototype.intersectPercentage=function(C){var k=Math.max(0,Math.min(this.right,C.right)-Math.max(this.left,C.left)),O=Math.max(0,Math.min(this.bottom,C.bottom)-Math.max(this.top,C.top)),j=k*O;return j/(this.height*this.width)},D.prototype.toCSSCompatValues=function(C){return{top:this.top-C.top,bottom:C.bottom-this.bottom,left:this.left-C.left,right:C.right-this.right,height:this.height,width:this.width}},D.getSimpleBoxPosition=function(C){var k=C.div?C.div.offsetHeight:C.tagName?C.offsetHeight:0,O=C.div?C.div.offsetWidth:C.tagName?C.offsetWidth:0,j=C.div?C.div.offsetTop:C.tagName?C.offsetTop:0;C=C.div?C.div.getBoundingClientRect():C.tagName?C.getBoundingClientRect():C;var L={left:C.left,right:C.right,top:C.top||j,height:C.height||k,bottom:C.bottom||j+(C.height||k),width:C.width||O};return L};function z(C,k,O,j){function L(se,_e){for(var ke,De=new D(se),Ne=1,Re=0;Re<_e.length;Re++){for(;se.overlapsOppositeAxis(O,_e[Re])||se.within(O)&&se.overlapsAny(j);)se.move(_e[Re]);if(se.within(O))return se;var et=se.intersectPercentage(O);Ne>et&&(ke=new D(se),Ne=et),se=new D(De)}return ke||De}var V=new D(k),M=k.cue,q=x(M),$=[];if(M.snapToLines){var X;switch(M.vertical){case"":$=["+y","-y"],X="height";break;case"rl":$=["+x","-x"],X="width";break;case"lr":$=["-x","+x"],X="width";break}var R=V.lineHeight,ee=R*Math.round(q),ue=O[X]+R,J=$[0];Math.abs(ee)>ue&&(ee=ee<0?-1:1,ee*=Math.ceil(ue/R)*R),q<0&&(ee+=M.vertical===""?O.height:O.width,$=$.reverse()),V.move(J,ee)}else{var oe=V.lineHeight/O.height*100;switch(M.lineAlign){case"center":q-=oe/2;break;case"end":q-=oe;break}switch(M.vertical){case"":k.applyStyles({top:k.formatStyle(q,"%")});break;case"rl":k.applyStyles({left:k.formatStyle(q,"%")});break;case"lr":k.applyStyles({right:k.formatStyle(q,"%")});break}$=["+y","-x","+x","-y"],V=new D(k)}var Z=L(V,$);k.move(Z.toCSSCompatValues(O))}function H(){}H.StringDecoder=function(){return{decode:function(C){if(!C)return"";if(typeof C!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(C))}}},H.convertCueToDOMTree=function(C,k){return!C||!k?null:S(C,k)};var U=.05,B="sans-serif",G="1.5%";return H.processCues=function(C,k,O){if(!C||!k||!O)return null;for(;O.firstChild;)O.removeChild(O.firstChild);var j=C.document.createElement("div");j.style.position="absolute",j.style.left="0",j.style.right="0",j.style.top="0",j.style.bottom="0",j.style.margin=G,O.appendChild(j);function L(R){for(var ee=0;ee<R.length;ee++)if(R[ee].hasBeenReset||!R[ee].displayState)return!0;return!1}if(!L(k)){for(var V=0;V<k.length;V++)j.appendChild(k[V].displayState);return}var M=[],q=D.getSimpleBoxPosition(j),$=Math.round(q.height*U*100)/100,X={font:$+"px "+B};(function(){for(var R,ee,ue=0;ue<k.length;ue++)ee=k[ue],R=new I(C,ee,X),j.appendChild(R.div),z(C,R,q,M),ee.displayState=R.div,M.push(D.getSimpleBoxPosition(R))})()},H.Parser=function(C,k,O){O||(O=k,k={}),k||(k={}),this.window=C,this.vttjs=k,this.state="INITIAL",this.buffer="",this.decoder=O||new TextDecoder("utf8"),this.regionList=[]},H.Parser.prototype={reportOrThrowError:function(C){if(C instanceof i)this.onparsingerror&&this.onparsingerror(C);else throw C},parse:function(C){var k=this;C&&(k.buffer+=k.decoder.decode(C,{stream:!0}));function O(){for(var R=k.buffer,ee=0;ee<R.length&&R[ee]!=="\r"&&R[ee]!==`
13
+ `).forEach(function(x){var N=x.indexOf(":"),I=x.slice(0,N).trim().toLowerCase(),D=x.slice(N+1).trim();typeof y[I]>"u"?y[I]=D:Array.isArray(y[I])?y[I].push(D):y[I]=[y[I],D]}),y};Rs.exports=d,Rs.exports.default=d,d.XMLHttpRequest=r.XMLHttpRequest||S,d.XDomainRequest="withCredentials"in new d.XMLHttpRequest?d.XMLHttpRequest:r.XDomainRequest,o(["get","put","post","patch","head","delete"],function(T){d[T==="delete"?"del":T]=function(b,y,x){return y=c(b,y,x),y.method=T.toUpperCase(),m(y)}});function o(T,b){for(var y=0;y<T.length;y++)b(T[y])}function l(T){for(var b in T)if(T.hasOwnProperty(b))return!1;return!0}function c(T,b,y){var x=T;return i(b)?(y=b,typeof T=="string"&&(x={uri:T})):x=e({},b,{uri:T}),x.callback=y,x}function d(T,b,y){return b=c(T,b,y),m(b)}function m(T){if(typeof T.callback>"u")throw new Error("callback argument missing");if(T.requestType&&d.requestInterceptorsStorage.getIsEnabled()){var b={uri:T.uri||T.url,headers:T.headers||{},body:T.body,metadata:T.metadata||{},retry:T.retry,timeout:T.timeout},y=d.requestInterceptorsStorage.execute(T.requestType,b);T.uri=y.uri,T.headers=y.headers,T.body=y.body,T.metadata=y.metadata,T.retry=y.retry,T.timeout=y.timeout}var x=!1,N=function(X,R,ee){x||(x=!0,T.callback(X,R,ee))};function I(){U.readyState===4&&!d.responseInterceptorsStorage.getIsEnabled()&&setTimeout(H,0)}function D(){var $=void 0;if(U.response?$=U.response:$=U.responseText||g(U),V)try{$=JSON.parse($)}catch{}return $}function z($){if(clearTimeout(M),clearTimeout(T.retryTimeout),$ instanceof Error||($=new Error(""+($||"Unknown XMLHttpRequest Error"))),$.statusCode=0,!G&&d.retryManager.getIsEnabled()&&T.retry&&T.retry.shouldRetry()){T.retryTimeout=setTimeout(function(){T.retry.moveToNextAttempt(),T.xhr=U,m(T)},T.retry.getCurrentFuzzedDelay());return}if(T.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var X={headers:q.headers||{},body:q.body,responseUrl:U.responseURL,responseType:U.responseType},R=d.responseInterceptorsStorage.execute(T.requestType,X);q.body=R.body,q.headers=R.headers}return N($,q)}function H(){if(!G){var $;clearTimeout(M),clearTimeout(T.retryTimeout),T.useXDR&&U.status===void 0?$=200:$=U.status===1223?204:U.status;var X=q,R=null;if($!==0?(X={body:D(),statusCode:$,method:k,headers:{},url:C,rawRequest:U},U.getAllResponseHeaders&&(X.headers=a(U.getAllResponseHeaders()))):R=new Error("Internal XMLHttpRequest Error"),T.requestType&&d.responseInterceptorsStorage.getIsEnabled()){var ee={headers:X.headers||{},body:X.body,responseUrl:U.responseURL,responseType:U.responseType},ue=d.responseInterceptorsStorage.execute(T.requestType,ee);X.body=ue.body,X.headers=ue.headers}return N(R,X,X.body)}}var U=T.xhr||null;U||(T.cors||T.useXDR?U=new d.XDomainRequest:U=new d.XMLHttpRequest);var B,G,C=U.url=T.uri||T.url,k=U.method=T.method||"GET",O=T.body||T.data,j=U.headers=T.headers||{},L=!!T.sync,V=!1,M,q={body:void 0,headers:{},statusCode:0,method:k,url:C,rawRequest:U};if("json"in T&&T.json!==!1&&(V=!0,j.accept||j.Accept||(j.Accept="application/json"),k!=="GET"&&k!=="HEAD"&&(j["content-type"]||j["Content-Type"]||(j["Content-Type"]="application/json"),O=JSON.stringify(T.json===!0?O:T.json))),U.onreadystatechange=I,U.onload=H,U.onerror=z,U.onprogress=function(){},U.onabort=function(){G=!0,clearTimeout(T.retryTimeout)},U.ontimeout=z,U.open(k,C,!L,T.username,T.password),L||(U.withCredentials=!!T.withCredentials),!L&&T.timeout>0&&(M=setTimeout(function(){if(!G){G=!0,U.abort("timeout");var $=new Error("XMLHttpRequest timeout");$.code="ETIMEDOUT",z($)}},T.timeout)),U.setRequestHeader)for(B in j)j.hasOwnProperty(B)&&U.setRequestHeader(B,j[B]);else if(T.headers&&!l(T.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in T&&(U.responseType=T.responseType),"beforeSend"in T&&typeof T.beforeSend=="function"&&T.beforeSend(U),U.send(O||null),U}function g(T){try{if(T.responseType==="document")return T.responseXML;var b=T.responseXML&&T.responseXML.documentElement.nodeName==="parsererror";if(T.responseType===""&&!b)return T.responseXML}catch{}return null}function S(){}return Rs.exports}var Y_=W_();const wh=fr(Y_);var Co={exports:{}},xo,Ic;function X_(){if(Ic)return xo;Ic=1;var r=kh(),e=Object.create||(function(){function C(){}return function(k){if(arguments.length!==1)throw new Error("Object.create shim only accepts one parameter.");return C.prototype=k,new C}})();function i(C,k){this.name="ParsingError",this.code=C.code,this.message=k||C.message}i.prototype=e(Error.prototype),i.prototype.constructor=i,i.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function n(C){function k(j,L,V,M){return(j|0)*3600+(L|0)*60+(V|0)+(M|0)/1e3}var O=C.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return O?O[3]?k(O[1],O[2],O[3].replace(":",""),O[4]):O[1]>59?k(O[1],O[2],0,O[4]):k(0,O[1],O[2],O[4]):null}function s(){this.values=e(null)}s.prototype={set:function(C,k){!this.get(C)&&k!==""&&(this.values[C]=k)},get:function(C,k,O){return O?this.has(C)?this.values[C]:k[O]:this.has(C)?this.values[C]:k},has:function(C){return C in this.values},alt:function(C,k,O){for(var j=0;j<O.length;++j)if(k===O[j]){this.set(C,k);break}},integer:function(C,k){/^-?\d+$/.test(k)&&this.set(C,parseInt(k,10))},percent:function(C,k){return k.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(k=parseFloat(k),k>=0&&k<=100)?(this.set(C,k),!0):!1}};function a(C,k,O,j){var L=j?C.split(j):[C];for(var V in L)if(typeof L[V]=="string"){var M=L[V].split(O);if(M.length===2){var q=M[0].trim(),$=M[1].trim();k(q,$)}}}function o(C,k,O){var j=C;function L(){var q=n(C);if(q===null)throw new i(i.Errors.BadTimeStamp,"Malformed timestamp: "+j);return C=C.replace(/^[^\sa-zA-Z-]+/,""),q}function V(q,$){var X=new s;a(q,function(R,ee){switch(R){case"region":for(var ue=O.length-1;ue>=0;ue--)if(O[ue].id===ee){X.set(R,O[ue].region);break}break;case"vertical":X.alt(R,ee,["rl","lr"]);break;case"line":var J=ee.split(","),oe=J[0];X.integer(R,oe),X.percent(R,oe)&&X.set("snapToLines",!1),X.alt(R,oe,["auto"]),J.length===2&&X.alt("lineAlign",J[1],["start","center","end"]);break;case"position":J=ee.split(","),X.percent(R,J[0]),J.length===2&&X.alt("positionAlign",J[1],["start","center","end"]);break;case"size":X.percent(R,ee);break;case"align":X.alt(R,ee,["start","center","end","left","right"]);break}},/:/,/\s/),$.region=X.get("region",null),$.vertical=X.get("vertical","");try{$.line=X.get("line","auto")}catch{}$.lineAlign=X.get("lineAlign","start"),$.snapToLines=X.get("snapToLines",!0),$.size=X.get("size",100);try{$.align=X.get("align","center")}catch{$.align=X.get("align","middle")}try{$.position=X.get("position","auto")}catch{$.position=X.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},$.align)}$.positionAlign=X.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},$.align)}function M(){C=C.replace(/^\s+/,"")}if(M(),k.startTime=L(),M(),C.substr(0,3)!=="-->")throw new i(i.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+j);C=C.substr(3),M(),k.endTime=L(),M(),V(C,k)}var l=r.createElement&&r.createElement("textarea"),c={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},d={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},m={v:"title",lang:"lang"},g={rt:"ruby"};function S(C,k){function O(){if(!k)return null;function oe(se){return k=k.substr(se.length),se}var Z=k.match(/^([^<]*)(<[^>]*>?)?/);return oe(Z[1]?Z[1]:Z[2])}function j(oe){return l.innerHTML=oe,oe=l.textContent,l.textContent="",oe}function L(oe,Z){return!g[Z.localName]||g[Z.localName]===oe.localName}function V(oe,Z){var se=c[oe];if(!se)return null;var _e=C.document.createElement(se),ke=m[oe];return ke&&Z&&(_e[ke]=Z.trim()),_e}for(var M=C.document.createElement("div"),q=M,$,X=[];($=O())!==null;){if($[0]==="<"){if($[1]==="/"){X.length&&X[X.length-1]===$.substr(2).replace(">","")&&(X.pop(),q=q.parentNode);continue}var R=n($.substr(1,$.length-2)),ee;if(R){ee=C.document.createProcessingInstruction("timestamp",R),q.appendChild(ee);continue}var ue=$.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!ue||(ee=V(ue[1],ue[3]),!ee)||!L(q,ee))continue;if(ue[2]){var J=ue[2].split(".");J.forEach(function(oe){var Z=/^bg_/.test(oe),se=Z?oe.slice(3):oe;if(d.hasOwnProperty(se)){var _e=Z?"background-color":"color",ke=d[se];ee.style[_e]=ke}}),ee.className=J.join(" ")}X.push(ue[1]),q.appendChild(ee),q=ee;continue}q.appendChild(C.document.createTextNode(j($)))}return M}var T=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function b(C){for(var k=0;k<T.length;k++){var O=T[k];if(C>=O[0]&&C<=O[1])return!0}return!1}function y(C){var k=[],O="",j;if(!C||!C.childNodes)return"ltr";function L(q,$){for(var X=$.childNodes.length-1;X>=0;X--)q.push($.childNodes[X])}function V(q){if(!q||!q.length)return null;var $=q.pop(),X=$.textContent||$.innerText;if(X){var R=X.match(/^.*(\n|\r)/);return R?(q.length=0,R[0]):X}if($.tagName==="ruby")return V(q);if($.childNodes)return L(q,$),V(q)}for(L(k,C);O=V(k);)for(var M=0;M<O.length;M++)if(j=O.charCodeAt(M),b(j))return"rtl";return"ltr"}function x(C){if(typeof C.line=="number"&&(C.snapToLines||C.line>=0&&C.line<=100))return C.line;if(!C.track||!C.track.textTrackList||!C.track.textTrackList.mediaElement)return-1;for(var k=C.track,O=k.textTrackList,j=0,L=0;L<O.length&&O[L]!==k;L++)O[L].mode==="showing"&&j++;return++j*-1}function N(){}N.prototype.applyStyles=function(C,k){k=k||this.div;for(var O in C)C.hasOwnProperty(O)&&(k.style[O]=C[O])},N.prototype.formatStyle=function(C,k){return C===0?0:C+k};function I(C,k,O){N.call(this),this.cue=k,this.cueDiv=S(C,k.text);var j={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:k.vertical===""?"horizontal-tb":k.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(j,this.cueDiv),this.div=C.document.createElement("div"),j={direction:y(this.cueDiv),writingMode:k.vertical===""?"horizontal-tb":k.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:k.align==="middle"?"center":k.align,font:O.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(j),this.div.appendChild(this.cueDiv);var L=0;switch(k.positionAlign){case"start":case"line-left":L=k.position;break;case"center":L=k.position-k.size/2;break;case"end":case"line-right":L=k.position-k.size;break}k.vertical===""?this.applyStyles({left:this.formatStyle(L,"%"),width:this.formatStyle(k.size,"%")}):this.applyStyles({top:this.formatStyle(L,"%"),height:this.formatStyle(k.size,"%")}),this.move=function(V){this.applyStyles({top:this.formatStyle(V.top,"px"),bottom:this.formatStyle(V.bottom,"px"),left:this.formatStyle(V.left,"px"),right:this.formatStyle(V.right,"px"),height:this.formatStyle(V.height,"px"),width:this.formatStyle(V.width,"px")})}}I.prototype=e(N.prototype),I.prototype.constructor=I;function D(C){var k,O,j,L;if(C.div){O=C.div.offsetHeight,j=C.div.offsetWidth,L=C.div.offsetTop;var V=(V=C.div.childNodes)&&(V=V[0])&&V.getClientRects&&V.getClientRects();C=C.div.getBoundingClientRect(),k=V?Math.max(V[0]&&V[0].height||0,C.height/V.length):0}this.left=C.left,this.right=C.right,this.top=C.top||L,this.height=C.height||O,this.bottom=C.bottom||L+(C.height||O),this.width=C.width||j,this.lineHeight=k!==void 0?k:C.lineHeight}D.prototype.move=function(C,k){switch(k=k!==void 0?k:this.lineHeight,C){case"+x":this.left+=k,this.right+=k;break;case"-x":this.left-=k,this.right-=k;break;case"+y":this.top+=k,this.bottom+=k;break;case"-y":this.top-=k,this.bottom-=k;break}},D.prototype.overlaps=function(C){return this.left<C.right&&this.right>C.left&&this.top<C.bottom&&this.bottom>C.top},D.prototype.overlapsAny=function(C){for(var k=0;k<C.length;k++)if(this.overlaps(C[k]))return!0;return!1},D.prototype.within=function(C){return this.top>=C.top&&this.bottom<=C.bottom&&this.left>=C.left&&this.right<=C.right},D.prototype.overlapsOppositeAxis=function(C,k){switch(k){case"+x":return this.left<C.left;case"-x":return this.right>C.right;case"+y":return this.top<C.top;case"-y":return this.bottom>C.bottom}},D.prototype.intersectPercentage=function(C){var k=Math.max(0,Math.min(this.right,C.right)-Math.max(this.left,C.left)),O=Math.max(0,Math.min(this.bottom,C.bottom)-Math.max(this.top,C.top)),j=k*O;return j/(this.height*this.width)},D.prototype.toCSSCompatValues=function(C){return{top:this.top-C.top,bottom:C.bottom-this.bottom,left:this.left-C.left,right:C.right-this.right,height:this.height,width:this.width}},D.getSimpleBoxPosition=function(C){var k=C.div?C.div.offsetHeight:C.tagName?C.offsetHeight:0,O=C.div?C.div.offsetWidth:C.tagName?C.offsetWidth:0,j=C.div?C.div.offsetTop:C.tagName?C.offsetTop:0;C=C.div?C.div.getBoundingClientRect():C.tagName?C.getBoundingClientRect():C;var L={left:C.left,right:C.right,top:C.top||j,height:C.height||k,bottom:C.bottom||j+(C.height||k),width:C.width||O};return L};function z(C,k,O,j){function L(se,_e){for(var ke,De=new D(se),Ne=1,Ve=0;Ve<_e.length;Ve++){for(;se.overlapsOppositeAxis(O,_e[Ve])||se.within(O)&&se.overlapsAny(j);)se.move(_e[Ve]);if(se.within(O))return se;var et=se.intersectPercentage(O);Ne>et&&(ke=new D(se),Ne=et),se=new D(De)}return ke||De}var V=new D(k),M=k.cue,q=x(M),$=[];if(M.snapToLines){var X;switch(M.vertical){case"":$=["+y","-y"],X="height";break;case"rl":$=["+x","-x"],X="width";break;case"lr":$=["-x","+x"],X="width";break}var R=V.lineHeight,ee=R*Math.round(q),ue=O[X]+R,J=$[0];Math.abs(ee)>ue&&(ee=ee<0?-1:1,ee*=Math.ceil(ue/R)*R),q<0&&(ee+=M.vertical===""?O.height:O.width,$=$.reverse()),V.move(J,ee)}else{var oe=V.lineHeight/O.height*100;switch(M.lineAlign){case"center":q-=oe/2;break;case"end":q-=oe;break}switch(M.vertical){case"":k.applyStyles({top:k.formatStyle(q,"%")});break;case"rl":k.applyStyles({left:k.formatStyle(q,"%")});break;case"lr":k.applyStyles({right:k.formatStyle(q,"%")});break}$=["+y","-x","+x","-y"],V=new D(k)}var Z=L(V,$);k.move(Z.toCSSCompatValues(O))}function H(){}H.StringDecoder=function(){return{decode:function(C){if(!C)return"";if(typeof C!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(C))}}},H.convertCueToDOMTree=function(C,k){return!C||!k?null:S(C,k)};var U=.05,B="sans-serif",G="1.5%";return H.processCues=function(C,k,O){if(!C||!k||!O)return null;for(;O.firstChild;)O.removeChild(O.firstChild);var j=C.document.createElement("div");j.style.position="absolute",j.style.left="0",j.style.right="0",j.style.top="0",j.style.bottom="0",j.style.margin=G,O.appendChild(j);function L(R){for(var ee=0;ee<R.length;ee++)if(R[ee].hasBeenReset||!R[ee].displayState)return!0;return!1}if(!L(k)){for(var V=0;V<k.length;V++)j.appendChild(k[V].displayState);return}var M=[],q=D.getSimpleBoxPosition(j),$=Math.round(q.height*U*100)/100,X={font:$+"px "+B};(function(){for(var R,ee,ue=0;ue<k.length;ue++)ee=k[ue],R=new I(C,ee,X),j.appendChild(R.div),z(C,R,q,M),ee.displayState=R.div,M.push(D.getSimpleBoxPosition(R))})()},H.Parser=function(C,k,O){O||(O=k,k={}),k||(k={}),this.window=C,this.vttjs=k,this.state="INITIAL",this.buffer="",this.decoder=O||new TextDecoder("utf8"),this.regionList=[]},H.Parser.prototype={reportOrThrowError:function(C){if(C instanceof i)this.onparsingerror&&this.onparsingerror(C);else throw C},parse:function(C){var k=this;C&&(k.buffer+=k.decoder.decode(C,{stream:!0}));function O(){for(var R=k.buffer,ee=0;ee<R.length&&R[ee]!=="\r"&&R[ee]!==`
14
14
  `;)++ee;var ue=R.substr(0,ee);return R[ee]==="\r"&&++ee,R[ee]===`
15
15
  `&&++ee,k.buffer=R.substr(ee),ue}function j(R){var ee=new s;if(a(R,function(J,oe){switch(J){case"id":ee.set(J,oe);break;case"width":ee.percent(J,oe);break;case"lines":ee.integer(J,oe);break;case"regionanchor":case"viewportanchor":var Z=oe.split(",");if(Z.length!==2)break;var se=new s;if(se.percent("x",Z[0]),se.percent("y",Z[1]),!se.has("x")||!se.has("y"))break;ee.set(J+"X",se.get("x")),ee.set(J+"Y",se.get("y"));break;case"scroll":ee.alt(J,oe,["up"]);break}},/=/,/\s/),ee.has("id")){var ue=new(k.vttjs.VTTRegion||k.window.VTTRegion);ue.width=ee.get("width",100),ue.lines=ee.get("lines",3),ue.regionAnchorX=ee.get("regionanchorX",0),ue.regionAnchorY=ee.get("regionanchorY",100),ue.viewportAnchorX=ee.get("viewportanchorX",0),ue.viewportAnchorY=ee.get("viewportanchorY",100),ue.scroll=ee.get("scroll",""),k.onregion&&k.onregion(ue),k.regionList.push({id:ee.get("id"),region:ue})}}function L(R){var ee=new s;a(R,function(ue,J){switch(ue){case"MPEGT":ee.integer(ue+"S",J);break;case"LOCA":ee.set(ue+"L",n(J));break}},/[^\d]:/,/,/),k.ontimestampmap&&k.ontimestampmap({MPEGTS:ee.get("MPEGTS"),LOCAL:ee.get("LOCAL")})}function V(R){R.match(/X-TIMESTAMP-MAP/)?a(R,function(ee,ue){switch(ee){case"X-TIMESTAMP-MAP":L(ue);break}},/=/):a(R,function(ee,ue){switch(ee){case"Region":j(ue);break}},/:/)}try{var M;if(k.state==="INITIAL"){if(!/\r\n|\n/.test(k.buffer))return this;M=O();var q=M.match(/^WEBVTT([ \t].*)?$/);if(!q||!q[0])throw new i(i.Errors.BadSignature);k.state="HEADER"}for(var $=!1;k.buffer;){if(!/\r\n|\n/.test(k.buffer))return this;switch($?$=!1:M=O(),k.state){case"HEADER":/:/.test(M)?V(M):M||(k.state="ID");continue;case"NOTE":M||(k.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(M)){k.state="NOTE";break}if(!M)continue;k.cue=new(k.vttjs.VTTCue||k.window.VTTCue)(0,0,"");try{k.cue.align="center"}catch{k.cue.align="middle"}if(k.state="CUE",M.indexOf("-->")===-1){k.cue.id=M;continue}case"CUE":try{o(M,k.cue,k.regionList)}catch(R){k.reportOrThrowError(R),k.cue=null,k.state="BADCUE";continue}k.state="CUETEXT";continue;case"CUETEXT":var X=M.indexOf("-->")!==-1;if(!M||X&&($=!0)){k.oncue&&k.oncue(k.cue),k.cue=null,k.state="ID";continue}k.cue.text&&(k.cue.text+=`
16
16
  `),k.cue.text+=M.replace(/\u2028/g,`
@@ -20,8 +20,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
20
20
  `,C.parse()),C.state==="INITIAL")throw new i(i.Errors.BadSignature)}catch(k){C.reportOrThrowError(k)}return C.onflush&&C.onflush(),this}},xo=H,xo}var So,Nc;function K_(){if(Nc)return So;Nc=1;var r="auto",e={"":1,lr:1,rl:1},i={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function n(o){if(typeof o!="string")return!1;var l=e[o.toLowerCase()];return l?o.toLowerCase():!1}function s(o){if(typeof o!="string")return!1;var l=i[o.toLowerCase()];return l?o.toLowerCase():!1}function a(o,l,c){this.hasBeenReset=!1;var d="",m=!1,g=o,S=l,T=c,b=null,y="",x=!0,N="auto",I="start",D="auto",z="auto",H=100,U="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return d},set:function(B){d=""+B}},pauseOnExit:{enumerable:!0,get:function(){return m},set:function(B){m=!!B}},startTime:{enumerable:!0,get:function(){return g},set:function(B){if(typeof B!="number")throw new TypeError("Start time must be set to a number.");g=B,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return S},set:function(B){if(typeof B!="number")throw new TypeError("End time must be set to a number.");S=B,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return T},set:function(B){T=""+B,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return b},set:function(B){b=B,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return y},set:function(B){var G=n(B);if(G===!1)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");y=G,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return x},set:function(B){x=!!B,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return N},set:function(B){if(typeof B!="number"&&B!==r)throw new SyntaxError("Line: an invalid number or illegal string was specified.");N=B,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return I},set:function(B){var G=s(B);G?(I=G,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return D},set:function(B){if(B<0||B>100)throw new Error("Position must be between 0 and 100.");D=B,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return z},set:function(B){var G=s(B);G?(z=G,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return H},set:function(B){if(B<0||B>100)throw new Error("Size must be between 0 and 100.");H=B,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return U},set:function(B){var G=s(B);if(!G)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");U=G,this.hasBeenReset=!0}}}),this.displayState=void 0}return a.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},So=a,So}var Eo,Oc;function Q_(){if(Oc)return Eo;Oc=1;var r={"":!0,up:!0};function e(s){if(typeof s!="string")return!1;var a=r[s.toLowerCase()];return a?s.toLowerCase():!1}function i(s){return typeof s=="number"&&s>=0&&s<=100}function n(){var s=100,a=3,o=0,l=100,c=0,d=100,m="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return s},set:function(g){if(!i(g))throw new Error("Width must be between 0 and 100.");s=g}},lines:{enumerable:!0,get:function(){return a},set:function(g){if(typeof g!="number")throw new TypeError("Lines must be set to a number.");a=g}},regionAnchorY:{enumerable:!0,get:function(){return l},set:function(g){if(!i(g))throw new Error("RegionAnchorX must be between 0 and 100.");l=g}},regionAnchorX:{enumerable:!0,get:function(){return o},set:function(g){if(!i(g))throw new Error("RegionAnchorY must be between 0 and 100.");o=g}},viewportAnchorY:{enumerable:!0,get:function(){return d},set:function(g){if(!i(g))throw new Error("ViewportAnchorY must be between 0 and 100.");d=g}},viewportAnchorX:{enumerable:!0,get:function(){return c},set:function(g){if(!i(g))throw new Error("ViewportAnchorX must be between 0 and 100.");c=g}},scroll:{enumerable:!0,get:function(){return m},set:function(g){var S=e(g);S===!1?console.warn("Scroll: an invalid or illegal string was specified."):m=S}}})}return Eo=n,Eo}var Bc;function Z_(){if(Bc)return Co.exports;Bc=1;var r=xa(),e=Co.exports={WebVTT:X_(),VTTCue:K_(),VTTRegion:Q_()};r.vttjs=e,r.WebVTT=e.WebVTT;var i=e.VTTCue,n=e.VTTRegion,s=r.VTTCue,a=r.VTTRegion;return e.shim=function(){r.VTTCue=i,r.VTTRegion=n},e.restore=function(){r.VTTCue=s,r.VTTRegion=a},r.VTTCue||e.shim(),Co.exports}var J_=Z_();const Lc=fr(J_);function Ct(){return Ct=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)({}).hasOwnProperty.call(i,n)&&(r[n]=i[n])}return r},Ct.apply(null,arguments)}var Pc="https://example.com",Sa=function(e,i){if(/^[a-z]+:/i.test(i))return i;/^data:/.test(e)&&(e=Y.location&&Y.location.href||"");var n=/^\/\//.test(e),s=!Y.location&&!/\/\//i.test(e);e=new Y.URL(e,Y.location||Pc);var a=new URL(i,e);return s?a.href.slice(Pc.length):n?a.href.slice(a.protocol.length):a.href},Ol=(function(){function r(){this.listeners={}}var e=r.prototype;return e.on=function(n,s){this.listeners[n]||(this.listeners[n]=[]),this.listeners[n].push(s)},e.off=function(n,s){if(!this.listeners[n])return!1;var a=this.listeners[n].indexOf(s);return this.listeners[n]=this.listeners[n].slice(0),this.listeners[n].splice(a,1),a>-1},e.trigger=function(n){var s=this.listeners[n];if(s)if(arguments.length===2)for(var a=s.length,o=0;o<a;++o)s[o].call(this,arguments[1]);else for(var l=Array.prototype.slice.call(arguments,1),c=s.length,d=0;d<c;++d)s[d].apply(this,l)},e.dispose=function(){this.listeners={}},e.pipe=function(n){this.on("data",function(s){n.push(s)})},r})(),e3=function(e){return Y.atob?Y.atob(e):Buffer.from(e,"base64").toString("binary")};function Dh(r){for(var e=e3(r),i=new Uint8Array(e.length),n=0;n<e.length;n++)i[n]=e.charCodeAt(n);return i}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class t3 extends Ol{constructor(){super(),this.buffer=""}push(e){let i;for(this.buffer+=e,i=this.buffer.indexOf(`
21
21
  `);i>-1;i=this.buffer.indexOf(`
22
22
  `))this.trigger("data",this.buffer.substring(0,i)),this.buffer=this.buffer.substring(i+1)}}const i3=" ",ko=function(r){const e=/([0-9.]*)?@?([0-9.]*)?/.exec(r||""),i={};return e[1]&&(i.length=parseInt(e[1],10)),e[2]&&(i.offset=parseInt(e[2],10)),i},n3=function(){const i="(?:"+"[^=]*"+")=(?:"+'"[^"]*"|[^,]*'+")";return new RegExp("(?:^|,)("+i+")")},Qt=function(r){const e={};if(!r)return e;const i=r.split(n3());let n=i.length,s;for(;n--;)i[n]!==""&&(s=/([^=]*)=(.*)/.exec(i[n]).slice(1),s[0]=s[0].replace(/^\s+|\s+$/g,""),s[1]=s[1].replace(/^\s+|\s+$/g,""),s[1]=s[1].replace(/^['"](.*)['"]$/g,"$1"),e[s[0]]=s[1]);return e},Mc=r=>{const e=r.split("x"),i={};return e[0]&&(i.width=parseInt(e[0],10)),e[1]&&(i.height=parseInt(e[1],10)),i};class r3 extends Ol{constructor(){super(),this.customParsers=[],this.tagMappers=[]}push(e){let i,n;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}this.tagMappers.reduce((a,o)=>{const l=o(e);return l===e?a:a.concat([l])},[e]).forEach(a=>{for(let o=0;o<this.customParsers.length;o++)if(this.customParsers[o].call(this,a))return;if(a.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:a.slice(1)});return}if(a=a.replace("\r",""),i=/^#EXTM3U/.exec(a),i){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(i=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(a),i){n={type:"tag",tagType:"inf"},i[1]&&(n.duration=parseFloat(i[1])),i[2]&&(n.title=i[2]),this.trigger("data",n);return}if(i=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(a),i){n={type:"tag",tagType:"targetduration"},i[1]&&(n.duration=parseInt(i[1],10)),this.trigger("data",n);return}if(i=/^#EXT-X-VERSION:([0-9.]*)?/.exec(a),i){n={type:"tag",tagType:"version"},i[1]&&(n.version=parseInt(i[1],10)),this.trigger("data",n);return}if(i=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(a),i){n={type:"tag",tagType:"media-sequence"},i[1]&&(n.number=parseInt(i[1],10)),this.trigger("data",n);return}if(i=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(a),i){n={type:"tag",tagType:"discontinuity-sequence"},i[1]&&(n.number=parseInt(i[1],10)),this.trigger("data",n);return}if(i=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(a),i){n={type:"tag",tagType:"playlist-type"},i[1]&&(n.playlistType=i[1]),this.trigger("data",n);return}if(i=/^#EXT-X-BYTERANGE:(.*)?$/.exec(a),i){n=Ct(ko(i[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",n);return}if(i=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(a),i){n={type:"tag",tagType:"allow-cache"},i[1]&&(n.allowed=!/NO/.test(i[1])),this.trigger("data",n);return}if(i=/^#EXT-X-MAP:(.*)$/.exec(a),i){if(n={type:"tag",tagType:"map"},i[1]){const o=Qt(i[1]);o.URI&&(n.uri=o.URI),o.BYTERANGE&&(n.byterange=ko(o.BYTERANGE))}this.trigger("data",n);return}if(i=/^#EXT-X-STREAM-INF:(.*)$/.exec(a),i){n={type:"tag",tagType:"stream-inf"},i[1]&&(n.attributes=Qt(i[1]),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=Mc(n.attributes.RESOLUTION)),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),n.attributes["PROGRAM-ID"]&&(n.attributes["PROGRAM-ID"]=parseInt(n.attributes["PROGRAM-ID"],10))),this.trigger("data",n);return}if(i=/^#EXT-X-MEDIA:(.*)$/.exec(a),i){n={type:"tag",tagType:"media"},i[1]&&(n.attributes=Qt(i[1])),this.trigger("data",n);return}if(i=/^#EXT-X-ENDLIST/.exec(a),i){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(i=/^#EXT-X-DISCONTINUITY/.exec(a),i){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(i=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(a),i){n={type:"tag",tagType:"program-date-time"},i[1]&&(n.dateTimeString=i[1],n.dateTimeObject=new Date(i[1])),this.trigger("data",n);return}if(i=/^#EXT-X-KEY:(.*)$/.exec(a),i){n={type:"tag",tagType:"key"},i[1]&&(n.attributes=Qt(i[1]),n.attributes.IV&&(n.attributes.IV.substring(0,2).toLowerCase()==="0x"&&(n.attributes.IV=n.attributes.IV.substring(2)),n.attributes.IV=n.attributes.IV.match(/.{8}/g),n.attributes.IV[0]=parseInt(n.attributes.IV[0],16),n.attributes.IV[1]=parseInt(n.attributes.IV[1],16),n.attributes.IV[2]=parseInt(n.attributes.IV[2],16),n.attributes.IV[3]=parseInt(n.attributes.IV[3],16),n.attributes.IV=new Uint32Array(n.attributes.IV))),this.trigger("data",n);return}if(i=/^#EXT-X-START:(.*)$/.exec(a),i){n={type:"tag",tagType:"start"},i[1]&&(n.attributes=Qt(i[1]),n.attributes["TIME-OFFSET"]=parseFloat(n.attributes["TIME-OFFSET"]),n.attributes.PRECISE=/YES/.test(n.attributes.PRECISE)),this.trigger("data",n);return}if(i=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(a),i){n={type:"tag",tagType:"cue-out-cont"},i[1]?n.data=i[1]:n.data="",this.trigger("data",n);return}if(i=/^#EXT-X-CUE-OUT:(.*)?$/.exec(a),i){n={type:"tag",tagType:"cue-out"},i[1]?n.data=i[1]:n.data="",this.trigger("data",n);return}if(i=/^#EXT-X-CUE-IN:?(.*)?$/.exec(a),i){n={type:"tag",tagType:"cue-in"},i[1]?n.data=i[1]:n.data="",this.trigger("data",n);return}if(i=/^#EXT-X-SKIP:(.*)$/.exec(a),i&&i[1]){n={type:"tag",tagType:"skip"},n.attributes=Qt(i[1]),n.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(n.attributes["SKIPPED-SEGMENTS"]=parseInt(n.attributes["SKIPPED-SEGMENTS"],10)),n.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(n.attributes["RECENTLY-REMOVED-DATERANGES"]=n.attributes["RECENTLY-REMOVED-DATERANGES"].split(i3)),this.trigger("data",n);return}if(i=/^#EXT-X-PART:(.*)$/.exec(a),i&&i[1]){n={type:"tag",tagType:"part"},n.attributes=Qt(i[1]),["DURATION"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseFloat(n.attributes[o]))}),["INDEPENDENT","GAP"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=/YES/.test(n.attributes[o]))}),n.attributes.hasOwnProperty("BYTERANGE")&&(n.attributes.byterange=ko(n.attributes.BYTERANGE)),this.trigger("data",n);return}if(i=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(a),i&&i[1]){n={type:"tag",tagType:"server-control"},n.attributes=Qt(i[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseFloat(n.attributes[o]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=/YES/.test(n.attributes[o]))}),this.trigger("data",n);return}if(i=/^#EXT-X-PART-INF:(.*)$/.exec(a),i&&i[1]){n={type:"tag",tagType:"part-inf"},n.attributes=Qt(i[1]),["PART-TARGET"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseFloat(n.attributes[o]))}),this.trigger("data",n);return}if(i=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(a),i&&i[1]){n={type:"tag",tagType:"preload-hint"},n.attributes=Qt(i[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(o){if(n.attributes.hasOwnProperty(o)){n.attributes[o]=parseInt(n.attributes[o],10);const l=o==="BYTERANGE-LENGTH"?"length":"offset";n.attributes.byterange=n.attributes.byterange||{},n.attributes.byterange[l]=n.attributes[o],delete n.attributes[o]}}),this.trigger("data",n);return}if(i=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(a),i&&i[1]){n={type:"tag",tagType:"rendition-report"},n.attributes=Qt(i[1]),["LAST-MSN","LAST-PART"].forEach(function(o){n.attributes.hasOwnProperty(o)&&(n.attributes[o]=parseInt(n.attributes[o],10))}),this.trigger("data",n);return}if(i=/^#EXT-X-DATERANGE:(.*)$/.exec(a),i&&i[1]){n={type:"tag",tagType:"daterange"},n.attributes=Qt(i[1]),["ID","CLASS"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=String(n.attributes[l]))}),["START-DATE","END-DATE"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=new Date(n.attributes[l]))}),["DURATION","PLANNED-DURATION"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=parseFloat(n.attributes[l]))}),["END-ON-NEXT"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=/YES/i.test(n.attributes[l]))}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(l){n.attributes.hasOwnProperty(l)&&(n.attributes[l]=n.attributes[l].toString(16))});const o=/^X-([A-Z]+-)+[A-Z]+$/;for(const l in n.attributes){if(!o.test(l))continue;const c=/[0-9A-Fa-f]{6}/g.test(n.attributes[l]),d=/^\d+(\.\d+)?$/.test(n.attributes[l]);n.attributes[l]=c?n.attributes[l].toString(16):d?parseFloat(n.attributes[l]):String(n.attributes[l])}this.trigger("data",n);return}if(i=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(a),i){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(i=/^#EXT-X-I-FRAMES-ONLY/.exec(a),i){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(i=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(a),i){n={type:"tag",tagType:"content-steering"},n.attributes=Qt(i[1]),this.trigger("data",n);return}if(i=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(a),i){n={type:"tag",tagType:"i-frame-playlist"},n.attributes=Qt(i[1]),n.attributes.URI&&(n.uri=n.attributes.URI),n.attributes.BANDWIDTH&&(n.attributes.BANDWIDTH=parseInt(n.attributes.BANDWIDTH,10)),n.attributes.RESOLUTION&&(n.attributes.RESOLUTION=Mc(n.attributes.RESOLUTION)),n.attributes["AVERAGE-BANDWIDTH"]&&(n.attributes["AVERAGE-BANDWIDTH"]=parseInt(n.attributes["AVERAGE-BANDWIDTH"],10)),n.attributes["FRAME-RATE"]&&(n.attributes["FRAME-RATE"]=parseFloat(n.attributes["FRAME-RATE"])),this.trigger("data",n);return}if(i=/^#EXT-X-DEFINE:(.*)$/.exec(a),i){n={type:"tag",tagType:"define"},n.attributes=Qt(i[1]),this.trigger("data",n);return}this.trigger("data",{type:"tag",data:a.slice(4)})})}addParser({expression:e,customType:i,dataParser:n,segment:s}){typeof n!="function"&&(n=a=>a),this.customParsers.push(a=>{if(e.exec(a))return this.trigger("data",{type:"custom",data:n(a),customType:i,segment:s}),!0})}addTagMapper({expression:e,map:i}){const n=s=>e.test(s)?i(s):s;this.tagMappers.push(n)}}const s3=r=>r.toLowerCase().replace(/-(\w)/g,e=>e[1].toUpperCase()),ln=function(r){const e={};return Object.keys(r).forEach(function(i){e[s3(i)]=r[i]}),e},wo=function(r){const{serverControl:e,targetDuration:i,partTargetDuration:n}=r;if(!e)return;const s="#EXT-X-SERVER-CONTROL",a="holdBack",o="partHoldBack",l=i&&i*3,c=n&&n*2;i&&!e.hasOwnProperty(a)&&(e[a]=l,this.trigger("info",{message:`${s} defaulting HOLD-BACK to targetDuration * 3 (${l}).`})),l&&e[a]<l&&(this.trigger("warn",{message:`${s} clamping HOLD-BACK (${e[a]}) to targetDuration * 3 (${l})`}),e[a]=l),n&&!e.hasOwnProperty(o)&&(e[o]=n*3,this.trigger("info",{message:`${s} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${e[o]}).`})),n&&e[o]<c&&(this.trigger("warn",{message:`${s} clamping PART-HOLD-BACK (${e[o]}) to partTargetDuration * 2 (${c}).`}),e[o]=c)};class a3 extends Ol{constructor(e={}){super(),this.lineStream=new t3,this.parseStream=new r3,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;const i=this,n=[];let s={},a,o,l=!1;const c=function(){},d={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},m="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed";let g=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let S=0,T=0;const b={};this.on("end",()=>{s.uri||!s.parts&&!s.preloadHints||(!s.map&&a&&(s.map=a),!s.key&&o&&(s.key=o),!s.timeline&&typeof g=="number"&&(s.timeline=g),this.manifest.preloadSegment=s)}),this.parseStream.on("data",function(y){let x,N;if(i.manifest.definitions){for(const I in i.manifest.definitions)if(y.uri&&(y.uri=y.uri.replace(`{$${I}}`,i.manifest.definitions[I])),y.attributes)for(const D in y.attributes)typeof y.attributes[D]=="string"&&(y.attributes[D]=y.attributes[D].replace(`{$${I}}`,i.manifest.definitions[I]))}({tag(){({version(){y.version&&(this.manifest.version=y.version)},"allow-cache"(){this.manifest.allowCache=y.allowed,"allowed"in y||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange(){const I={};"length"in y&&(s.byterange=I,I.length=y.length,"offset"in y||(y.offset=S)),"offset"in y&&(s.byterange=I,I.offset=y.offset),S=I.offset+I.length},endlist(){this.manifest.endList=!0},inf(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),y.title&&(s.title=y.title),y.duration>0&&(s.duration=y.duration),y.duration===0&&(s.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=n},key(){if(!y.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(y.attributes.METHOD==="NONE"){o=null;return}if(!y.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(y.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:y.attributes};return}if(y.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:y.attributes.URI};return}if(y.attributes.KEYFORMAT===m){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(y.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(y.attributes.METHOD==="SAMPLE-AES-CENC"&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),y.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(y.attributes.KEYID&&y.attributes.KEYID.substring(0,2)==="0x")){this.trigger("warn",{message:"invalid key ID provided for Widevine"});return}this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:y.attributes.KEYFORMAT,keyId:y.attributes.KEYID.substring(2)},pssh:Dh(y.attributes.URI.split(",")[1])};return}y.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),o={method:y.attributes.METHOD||"AES-128",uri:y.attributes.URI},typeof y.attributes.IV<"u"&&(o.iv=y.attributes.IV)},"media-sequence"(){if(!isFinite(y.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+y.number});return}this.manifest.mediaSequence=y.number},"discontinuity-sequence"(){if(!isFinite(y.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+y.number});return}this.manifest.discontinuitySequence=y.number,g=y.number},"playlist-type"(){if(!/VOD|EVENT/.test(y.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+y.playlist});return}this.manifest.playlistType=y.playlistType},map(){a={},y.uri&&(a.uri=y.uri),y.byterange&&(a.byterange=y.byterange),o&&(a.key=o)},"stream-inf"(){if(this.manifest.playlists=n,this.manifest.mediaGroups=this.manifest.mediaGroups||d,!y.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}s.attributes||(s.attributes={}),Ct(s.attributes,y.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||d,!(y.attributes&&y.attributes.TYPE&&y.attributes["GROUP-ID"]&&y.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}const I=this.manifest.mediaGroups[y.attributes.TYPE];I[y.attributes["GROUP-ID"]]=I[y.attributes["GROUP-ID"]]||{},x=I[y.attributes["GROUP-ID"]],N={default:/yes/i.test(y.attributes.DEFAULT)},N.default?N.autoselect=!0:N.autoselect=/yes/i.test(y.attributes.AUTOSELECT),y.attributes.LANGUAGE&&(N.language=y.attributes.LANGUAGE),y.attributes.URI&&(N.uri=y.attributes.URI),y.attributes["INSTREAM-ID"]&&(N.instreamId=y.attributes["INSTREAM-ID"]),y.attributes.CHARACTERISTICS&&(N.characteristics=y.attributes.CHARACTERISTICS),y.attributes.FORCED&&(N.forced=/yes/i.test(y.attributes.FORCED)),x[y.attributes.NAME]=N},discontinuity(){g+=1,s.discontinuity=!0,this.manifest.discontinuityStarts.push(n.length)},"program-date-time"(){typeof this.manifest.dateTimeString>"u"&&(this.manifest.dateTimeString=y.dateTimeString,this.manifest.dateTimeObject=y.dateTimeObject),s.dateTimeString=y.dateTimeString,s.dateTimeObject=y.dateTimeObject;const{lastProgramDateTime:I}=this;this.lastProgramDateTime=new Date(y.dateTimeString).getTime(),I===null&&this.manifest.segments.reduceRight((D,z)=>(z.programDateTime=D-z.duration*1e3,z.programDateTime),this.lastProgramDateTime)},targetduration(){if(!isFinite(y.duration)||y.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+y.duration});return}this.manifest.targetDuration=y.duration,wo.call(this,this.manifest)},start(){if(!y.attributes||isNaN(y.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:y.attributes["TIME-OFFSET"],precise:y.attributes.PRECISE}},"cue-out"(){s.cueOut=y.data},"cue-out-cont"(){s.cueOutCont=y.data},"cue-in"(){s.cueIn=y.data},skip(){this.manifest.skip=ln(y.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",y.attributes,["SKIPPED-SEGMENTS"])},part(){l=!0;const I=this.manifest.segments.length,D=ln(y.attributes);s.parts=s.parts||[],s.parts.push(D),D.byterange&&(D.byterange.hasOwnProperty("offset")||(D.byterange.offset=T),T=D.byterange.offset+D.byterange.length);const z=s.parts.length-1;this.warnOnMissingAttributes_(`#EXT-X-PART #${z} for segment #${I}`,y.attributes,["URI","DURATION"]),this.manifest.renditionReports&&this.manifest.renditionReports.forEach((H,U)=>{H.hasOwnProperty("lastPart")||this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${U} lacks required attribute(s): LAST-PART`})})},"server-control"(){const I=this.manifest.serverControl=ln(y.attributes);I.hasOwnProperty("canBlockReload")||(I.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"})),wo.call(this,this.manifest),I.canSkipDateranges&&!I.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})},"preload-hint"(){const I=this.manifest.segments.length,D=ln(y.attributes),z=D.type&&D.type==="PART";s.preloadHints=s.preloadHints||[],s.preloadHints.push(D),D.byterange&&(D.byterange.hasOwnProperty("offset")||(D.byterange.offset=z?T:0,z&&(T=D.byterange.offset+D.byterange.length)));const H=s.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${H} for segment #${I}`,y.attributes,["TYPE","URI"]),!!D.type)for(let U=0;U<s.preloadHints.length-1;U++){const B=s.preloadHints[U];B.type&&B.type===D.type&&this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${H} for segment #${I} has the same TYPE ${D.type} as preload hint #${U}`})}},"rendition-report"(){const I=ln(y.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(I);const D=this.manifest.renditionReports.length-1,z=["LAST-MSN","URI"];l&&z.push("LAST-PART"),this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${D}`,y.attributes,z)},"part-inf"(){this.manifest.partInf=ln(y.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",y.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget),wo.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(ln(y.attributes));const I=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${I}`,y.attributes,["ID","START-DATE"]);const D=this.manifest.dateRanges[I];D.endDate&&D.startDate&&new Date(D.endDate)<new Date(D.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"}),D.duration&&D.duration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"}),D.plannedDuration&&D.plannedDuration<0&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});const z=!!D.endOnNext;if(z&&!D.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"}),z&&(D.duration||D.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"}),D.duration&&D.endDate){const U=D.startDate.getTime()+D.duration*1e3;this.manifest.dateRanges[I].endDate=new Date(U)}if(!b[D.id])b[D.id]=D;else{for(const U in b[D.id])if(D[U]&&JSON.stringify(b[D.id][U])!==JSON.stringify(D[U])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}const H=this.manifest.dateRanges.findIndex(U=>U.id===D.id);this.manifest.dateRanges[H]=Ct(this.manifest.dateRanges[H],D),b[D.id]=Ct(b[D.id],D),this.manifest.dateRanges.pop()}},"independent-segments"(){this.manifest.independentSegments=!0},"i-frames-only"(){this.manifest.iFramesOnly=!0,this.requiredCompatibilityversion(this.manifest.version,4)},"content-steering"(){this.manifest.contentSteering=ln(y.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",y.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};const I=(D,z)=>{if(D in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${D}`});return}this.manifest.definitions[D]=z};if("QUERYPARAM"in y.attributes){if("NAME"in y.attributes||"IMPORT"in y.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}const D=this.params.get(y.attributes.QUERYPARAM);if(!D){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${y.attributes.QUERYPARAM}`});return}I(y.attributes.QUERYPARAM,decodeURIComponent(D));return}if("NAME"in y.attributes){if("IMPORT"in y.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in y.attributes)||typeof y.attributes.VALUE!="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${y.attributes.NAME}`});return}I(y.attributes.NAME,y.attributes.VALUE);return}if("IMPORT"in y.attributes){if(!this.mainDefinitions[y.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${y.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}I(y.attributes.IMPORT,this.mainDefinitions[y.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:y.attributes,uri:y.uri,timeline:g}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",y.attributes,["BANDWIDTH","URI"])}}[y.tagType]||c).call(i)},uri(){s.uri=y.uri,n.push(s),this.manifest.targetDuration&&!("duration"in s)&&(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),s.duration=this.manifest.targetDuration),o&&(s.key=o),s.timeline=g,a&&(s.map=a),T=0,this.lastProgramDateTime!==null&&(s.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=s.duration*1e3),s={}},comment(){},custom(){y.segment?(s.custom=s.custom||{},s.custom[y.customType]=y.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[y.customType]=y.data)}})[y.type].call(i)})}requiredCompatibilityversion(e,i){(e<i||!e)&&this.trigger("warn",{message:`manifest must be at least version ${i}`})}warnOnMissingAttributes_(e,i,n){const s=[];n.forEach(function(a){i.hasOwnProperty(a)||s.push(a)}),s.length&&this.trigger("warn",{message:`${e} lacks required attribute(s): ${s.join(", ")}`})}push(e){this.lineStream.push(e)}end(){this.lineStream.push(`
23
- `),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var On={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},o3=["video","audio","text"],Rc=["Video","Audio","Text"],Ah=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(i,n,s){var a=("00"+Number(n).toString(16)).slice(-2),o=("00"+Number(s).toString(16)).slice(-2);return"avc1."+a+"00"+o})},Ri=function(e){e===void 0&&(e="");var i=e.split(","),n=[];return i.forEach(function(s){s=s.trim();var a;o3.forEach(function(o){var l=On[o].exec(s.toLowerCase());if(!(!l||l.length<=1)){a=o;var c=s.substring(0,l[1].length),d=s.replace(c,"");n.push({type:c,details:d,mediaType:o})}}),a||n.push({type:s,details:"",mediaType:"unknown"})}),n},l3=function(e,i){if(!e.mediaGroups.AUDIO||!i)return null;var n=e.mediaGroups.AUDIO[i];if(!n)return null;for(var s in n){var a=n[s];if(a.default&&a.playlists)return Ri(a.playlists[0].attributes.CODECS)}return null},Ih=function(e){return e===void 0&&(e=""),On.audio.test(e.trim().toLowerCase())},u3=function(e){return e===void 0&&(e=""),On.text.test(e.trim().toLowerCase())},rr=function(e){if(!(!e||typeof e!="string")){var i=e.toLowerCase().split(",").map(function(a){return Ah(a.trim())}),n="video";i.length===1&&Ih(i[0])?n="audio":i.length===1&&u3(i[0])&&(n="application");var s="mp4";return i.every(function(a){return On.mp4.test(a)})?s="mp4":i.every(function(a){return On.webm.test(a)})?s="webm":i.every(function(a){return On.ogg.test(a)})&&(s="ogg"),n+"/"+s+';codecs="'+e+'"'}},Xr=function(e,i){return e===void 0&&(e=""),i===void 0&&(i=!1),Y.MediaSource&&Y.MediaSource.isTypeSupported&&Y.MediaSource.isTypeSupported(rr(e))||i&&Y.ManagedMediaSource&&Y.ManagedMediaSource.isTypeSupported&&Y.ManagedMediaSource.isTypeSupported(rr(e))||!1},Do=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(i){i=i.trim();for(var n=0;n<Rc.length;n++){var s=Rc[n];if(On["muxer"+s].test(i))return!0}return!1})},Vc="mp4a.40.2",c3="avc1.4d400d",d3=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,h3=/^application\/dash\+xml/i,Nh=function(e){return d3.test(e)?"hls":h3.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},f3=function(e){return e.toString(2).length},p3=function(e){return Math.ceil(f3(e)/8)},Oh=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},m3=function(e){return Oh(e)},Le=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!m3(e)&&!(e instanceof ArrayBuffer)&&(typeof e!="number"||typeof e=="number"&&e!==e?e=0:e=[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Ft=Y.BigInt||Number,el=[Ft("0x1"),Ft("0x100"),Ft("0x10000"),Ft("0x1000000"),Ft("0x100000000"),Ft("0x10000000000"),Ft("0x1000000000000"),Ft("0x100000000000000"),Ft("0x10000000000000000")];(function(){var r=new Uint16Array([65484]),e=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);return e[0]===255?"big":e[0]===204?"little":"unknown"})();var g3=function(e,i){var n=i===void 0?{}:i,s=n.signed,a=s===void 0?!1:s,o=n.le,l=o===void 0?!1:o;e=Le(e);var c=l?"reduce":"reduceRight",d=e[c]?e[c]:Array.prototype[c],m=d.call(e,function(S,T,b){var y=l?b:Math.abs(b+1-e.length);return S+Ft(T)*el[y]},Ft(0));if(a){var g=el[e.length]/Ft(2)-Ft(1);m=Ft(m),m>g&&(m-=g,m-=g,m-=Ft(2))}return Number(m)},v3=function(e,i){var n={},s=n.le,a=s===void 0?!1:s;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=Ft(e);for(var o=p3(e),l=new Uint8Array(new ArrayBuffer(o)),c=0;c<o;c++){var d=a?c:Math.abs(c+1-l.length);l[d]=Number(e/el[c]&Ft(255)),e<0&&(l[d]=Math.abs(~l[d]),l[d]-=c===0?1:2)}return l},Bh=function(e,i){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array;i||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),s=0;s<e.length;s++)n[s]=e.charCodeAt(s);return n},y3=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];if(i=i.filter(function(l){return l&&(l.byteLength||l.length)&&typeof l!="string"}),i.length<=1)return Le(i[0]);var s=i.reduce(function(l,c,d){return l+(c.byteLength||c.length)},0),a=new Uint8Array(s),o=0;return i.forEach(function(l){l=Le(l),a.set(l,o),o+=l.byteLength}),a},ft=function(e,i,n){var s=n===void 0?{}:n,a=s.offset,o=a===void 0?0:a,l=s.mask,c=l===void 0?[]:l;e=Le(e),i=Le(i);var d=i.every?i.every:Array.prototype.every;return i.length&&e.length-o>=i.length&&d.call(i,function(m,g){var S=c[g]?c[g]&e[o+g]:e[o+g];return m===S})},_3=function(e,i,n){i.forEach(function(s){for(var a in e.mediaGroups[s])for(var o in e.mediaGroups[s][a]){var l=e.mediaGroups[s][a][o];n(l,s,a,o)}})},$r={},Ki={},En={},Fc;function Ea(){if(Fc)return En;Fc=1;function r(a,o,l){if(l===void 0&&(l=Array.prototype),a&&typeof l.find=="function")return l.find.call(a,o);for(var c=0;c<a.length;c++)if(Object.prototype.hasOwnProperty.call(a,c)){var d=a[c];if(o.call(void 0,d,c,a))return d}}function e(a,o){return o===void 0&&(o=Object),o&&typeof o.freeze=="function"?o.freeze(a):a}function i(a,o){if(a===null||typeof a!="object")throw new TypeError("target is not an object");for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(a[l]=o[l]);return a}var n=e({HTML:"text/html",isHTML:function(a){return a===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),s=e({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(a){return a===s.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return En.assign=i,En.find=r,En.freeze=e,En.MIME_TYPE=n,En.NAMESPACE=s,En}var $c;function Lh(){if($c)return Ki;$c=1;var r=Ea(),e=r.find,i=r.NAMESPACE;function n(E){return E!==""}function s(E){return E?E.split(/[\t\n\f\r ]+/).filter(n):[]}function a(E,w){return E.hasOwnProperty(w)||(E[w]=!0),E}function o(E){if(!E)return[];var w=s(E);return Object.keys(w.reduce(a,{}))}function l(E){return function(w){return E&&E.indexOf(w)!==-1}}function c(E,w){for(var Q in E)Object.prototype.hasOwnProperty.call(E,Q)&&(w[Q]=E[Q])}function d(E,w){var Q=E.prototype;if(!(Q instanceof w)){let ce=function(){};ce.prototype=w.prototype,ce=new ce,c(Q,ce),E.prototype=Q=ce}Q.constructor!=E&&(typeof E!="function"&&console.error("unknown Class:"+E),Q.constructor=E)}var m={},g=m.ELEMENT_NODE=1,S=m.ATTRIBUTE_NODE=2,T=m.TEXT_NODE=3,b=m.CDATA_SECTION_NODE=4,y=m.ENTITY_REFERENCE_NODE=5,x=m.ENTITY_NODE=6,N=m.PROCESSING_INSTRUCTION_NODE=7,I=m.COMMENT_NODE=8,D=m.DOCUMENT_NODE=9,z=m.DOCUMENT_TYPE_NODE=10,H=m.DOCUMENT_FRAGMENT_NODE=11,U=m.NOTATION_NODE=12,B={},G={};B.INDEX_SIZE_ERR=(G[1]="Index size error",1),B.DOMSTRING_SIZE_ERR=(G[2]="DOMString size error",2);var C=B.HIERARCHY_REQUEST_ERR=(G[3]="Hierarchy request error",3);B.WRONG_DOCUMENT_ERR=(G[4]="Wrong document",4);var k=B.INVALID_CHARACTER_ERR=(G[5]="Invalid character",5);B.NO_DATA_ALLOWED_ERR=(G[6]="No data allowed",6),B.NO_MODIFICATION_ALLOWED_ERR=(G[7]="No modification allowed",7);var O=B.NOT_FOUND_ERR=(G[8]="Not found",8);B.NOT_SUPPORTED_ERR=(G[9]="Not supported",9);var j=B.INUSE_ATTRIBUTE_ERR=(G[10]="Attribute in use",10);B.INVALID_STATE_ERR=(G[11]="Invalid state",11),B.SYNTAX_ERR=(G[12]="Syntax error",12),B.INVALID_MODIFICATION_ERR=(G[13]="Invalid modification",13),B.NAMESPACE_ERR=(G[14]="Invalid namespace",14),B.INVALID_ACCESS_ERR=(G[15]="Invalid access",15);function L(E,w){if(w instanceof Error)var Q=w;else Q=this,Error.call(this,G[E]),this.message=G[E],Error.captureStackTrace&&Error.captureStackTrace(this,L);return Q.code=E,w&&(this.message=this.message+": "+w),Q}L.prototype=Error.prototype,c(B,L);function V(){}V.prototype={length:0,item:function(E){return E>=0&&E<this.length?this[E]:null},toString:function(E,w){for(var Q=[],ce=0;ce<this.length;ce++)$t(this[ce],Q,E,w);return Q.join("")},filter:function(E){return Array.prototype.filter.call(this,E)},indexOf:function(E){return Array.prototype.indexOf.call(this,E)}};function M(E,w){this._node=E,this._refresh=w,q(this)}function q(E){var w=E._node._inc||E._node.ownerDocument._inc;if(E._inc!==w){var Q=E._refresh(E._node);if(Wi(E,"length",Q.length),!E.$$length||Q.length<E.$$length)for(var ce=Q.length;ce in E;ce++)Object.prototype.hasOwnProperty.call(E,ce)&&delete E[ce];c(Q,E),E._inc=w}}M.prototype.item=function(E){return q(this),this[E]||null},d(M,V);function $(){}function X(E,w){for(var Q=E.length;Q--;)if(E[Q]===w)return Q}function R(E,w,Q,ce){if(ce?w[X(w,ce)]=Q:w[w.length++]=Q,E){Q.ownerElement=E;var ge=E.ownerDocument;ge&&(ce&&ke(ge,E,ce),_e(ge,E,Q))}}function ee(E,w,Q){var ce=X(w,Q);if(ce>=0){for(var ge=w.length-1;ce<ge;)w[ce]=w[++ce];if(w.length=ge,E){var Ie=E.ownerDocument;Ie&&(ke(Ie,E,Q),Q.ownerElement=null)}}else throw new L(O,new Error(E.tagName+"@"+Q))}$.prototype={length:0,item:V.prototype.item,getNamedItem:function(E){for(var w=this.length;w--;){var Q=this[w];if(Q.nodeName==E)return Q}},setNamedItem:function(E){var w=E.ownerElement;if(w&&w!=this._ownerElement)throw new L(j);var Q=this.getNamedItem(E.nodeName);return R(this._ownerElement,this,E,Q),Q},setNamedItemNS:function(E){var w=E.ownerElement,Q;if(w&&w!=this._ownerElement)throw new L(j);return Q=this.getNamedItemNS(E.namespaceURI,E.localName),R(this._ownerElement,this,E,Q),Q},removeNamedItem:function(E){var w=this.getNamedItem(E);return ee(this._ownerElement,this,w),w},removeNamedItemNS:function(E,w){var Q=this.getNamedItemNS(E,w);return ee(this._ownerElement,this,Q),Q},getNamedItemNS:function(E,w){for(var Q=this.length;Q--;){var ce=this[Q];if(ce.localName==w&&ce.namespaceURI==E)return ce}return null}};function ue(){}ue.prototype={hasFeature:function(E,w){return!0},createDocument:function(E,w,Q){var ce=new se;if(ce.implementation=this,ce.childNodes=new V,ce.doctype=Q||null,Q&&ce.appendChild(Q),w){var ge=ce.createElementNS(E,w);ce.appendChild(ge)}return ce},createDocumentType:function(E,w,Q){var ce=new pe;return ce.name=E,ce.nodeName=E,ce.publicId=w||"",ce.systemId=Q||"",ce}};function J(){}J.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(E,w){return be(this,E,w)},replaceChild:function(E,w){be(this,E,w,Ae),w&&this.removeChild(w)},removeChild:function(E){return Ne(this,E)},appendChild:function(E){return this.insertBefore(E,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(E){return Ut(this.ownerDocument||this,this,E)},normalize:function(){for(var E=this.firstChild;E;){var w=E.nextSibling;w&&w.nodeType==T&&E.nodeType==T?(this.removeChild(w),E.appendData(w.data)):(E.normalize(),E=w)}},isSupported:function(E,w){return this.ownerDocument.implementation.hasFeature(E,w)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(E){for(var w=this;w;){var Q=w._nsMap;if(Q){for(var ce in Q)if(Object.prototype.hasOwnProperty.call(Q,ce)&&Q[ce]===E)return ce}w=w.nodeType==S?w.ownerDocument:w.parentNode}return null},lookupNamespaceURI:function(E){for(var w=this;w;){var Q=w._nsMap;if(Q&&Object.prototype.hasOwnProperty.call(Q,E))return Q[E];w=w.nodeType==S?w.ownerDocument:w.parentNode}return null},isDefaultNamespace:function(E){var w=this.lookupPrefix(E);return w==null}};function oe(E){return E=="<"&&"&lt;"||E==">"&&"&gt;"||E=="&"&&"&amp;"||E=='"'&&"&quot;"||"&#"+E.charCodeAt()+";"}c(m,J),c(m,J.prototype);function Z(E,w){if(w(E))return!0;if(E=E.firstChild)do if(Z(E,w))return!0;while(E=E.nextSibling)}function se(){this.ownerDocument=this}function _e(E,w,Q){E&&E._inc++;var ce=Q.namespaceURI;ce===i.XMLNS&&(w._nsMap[Q.prefix?Q.localName:""]=Q.value)}function ke(E,w,Q,ce){E&&E._inc++;var ge=Q.namespaceURI;ge===i.XMLNS&&delete w._nsMap[Q.prefix?Q.localName:""]}function De(E,w,Q){if(E&&E._inc){E._inc++;var ce=w.childNodes;if(Q)ce[ce.length++]=Q;else{for(var ge=w.firstChild,Ie=0;ge;)ce[Ie++]=ge,ge=ge.nextSibling;ce.length=Ie,delete ce[ce.length]}}}function Ne(E,w){var Q=w.previousSibling,ce=w.nextSibling;return Q?Q.nextSibling=ce:E.firstChild=ce,ce?ce.previousSibling=Q:E.lastChild=Q,w.parentNode=null,w.previousSibling=null,w.nextSibling=null,De(E.ownerDocument,E),w}function Re(E){return E&&(E.nodeType===J.DOCUMENT_NODE||E.nodeType===J.DOCUMENT_FRAGMENT_NODE||E.nodeType===J.ELEMENT_NODE)}function et(E){return E&&(Ke(E)||Ge(E)||Ve(E)||E.nodeType===J.DOCUMENT_FRAGMENT_NODE||E.nodeType===J.COMMENT_NODE||E.nodeType===J.PROCESSING_INSTRUCTION_NODE)}function Ve(E){return E&&E.nodeType===J.DOCUMENT_TYPE_NODE}function Ke(E){return E&&E.nodeType===J.ELEMENT_NODE}function Ge(E){return E&&E.nodeType===J.TEXT_NODE}function Ue(E,w){var Q=E.childNodes||[];if(e(Q,Ke)||Ve(w))return!1;var ce=e(Q,Ve);return!(w&&ce&&Q.indexOf(ce)>Q.indexOf(w))}function Xe(E,w){var Q=E.childNodes||[];function ce(Ie){return Ke(Ie)&&Ie!==w}if(e(Q,ce))return!1;var ge=e(Q,Ve);return!(w&&ge&&Q.indexOf(ge)>Q.indexOf(w))}function kt(E,w,Q){if(!Re(E))throw new L(C,"Unexpected parent node type "+E.nodeType);if(Q&&Q.parentNode!==E)throw new L(O,"child not in parent");if(!et(w)||Ve(w)&&E.nodeType!==J.DOCUMENT_NODE)throw new L(C,"Unexpected node type "+w.nodeType+" for parent node type "+E.nodeType)}function it(E,w,Q){var ce=E.childNodes||[],ge=w.childNodes||[];if(w.nodeType===J.DOCUMENT_FRAGMENT_NODE){var Ie=ge.filter(Ke);if(Ie.length>1||e(ge,Ge))throw new L(C,"More than one element or text in fragment");if(Ie.length===1&&!Ue(E,Q))throw new L(C,"Element in fragment can not be inserted before doctype")}if(Ke(w)&&!Ue(E,Q))throw new L(C,"Only one element can be added and only after doctype");if(Ve(w)){if(e(ce,Ve))throw new L(C,"Only one doctype is allowed");var nt=e(ce,Ke);if(Q&&ce.indexOf(nt)<ce.indexOf(Q))throw new L(C,"Doctype can only be inserted before an element");if(!Q&&nt)throw new L(C,"Doctype can not be appended since element is present")}}function Ae(E,w,Q){var ce=E.childNodes||[],ge=w.childNodes||[];if(w.nodeType===J.DOCUMENT_FRAGMENT_NODE){var Ie=ge.filter(Ke);if(Ie.length>1||e(ge,Ge))throw new L(C,"More than one element or text in fragment");if(Ie.length===1&&!Xe(E,Q))throw new L(C,"Element in fragment can not be inserted before doctype")}if(Ke(w)&&!Xe(E,Q))throw new L(C,"Only one element can be added and only after doctype");if(Ve(w)){if(e(ce,function(Wt){return Ve(Wt)&&Wt!==Q}))throw new L(C,"Only one doctype is allowed");var nt=e(ce,Ke);if(Q&&ce.indexOf(nt)<ce.indexOf(Q))throw new L(C,"Doctype can only be inserted before an element")}}function be(E,w,Q,ce){kt(E,w,Q),E.nodeType===J.DOCUMENT_NODE&&(ce||it)(E,w,Q);var ge=w.parentNode;if(ge&&ge.removeChild(w),w.nodeType===H){var Ie=w.firstChild;if(Ie==null)return w;var nt=w.lastChild}else Ie=nt=w;var wt=Q?Q.previousSibling:E.lastChild;Ie.previousSibling=wt,nt.nextSibling=Q,wt?wt.nextSibling=Ie:E.firstChild=Ie,Q==null?E.lastChild=nt:Q.previousSibling=nt;do{Ie.parentNode=E;var Wt=E.ownerDocument||E;me(Ie,Wt)}while(Ie!==nt&&(Ie=Ie.nextSibling));return De(E.ownerDocument||E,E),w.nodeType==H&&(w.firstChild=w.lastChild=null),w}function me(E,w){if(E.ownerDocument!==w){if(E.ownerDocument=w,E.nodeType===g&&E.attributes)for(var Q=0;Q<E.attributes.length;Q++){var ce=E.attributes.item(Q);ce&&(ce.ownerDocument=w)}for(var ge=E.firstChild;ge;)me(ge,w),ge=ge.nextSibling}}function Pe(E,w){w.parentNode&&w.parentNode.removeChild(w),w.parentNode=E,w.previousSibling=E.lastChild,w.nextSibling=null,w.previousSibling?w.previousSibling.nextSibling=w:E.firstChild=w,E.lastChild=w,De(E.ownerDocument,E,w);var Q=E.ownerDocument||E;return me(w,Q),w}se.prototype={nodeName:"#document",nodeType:D,doctype:null,documentElement:null,_inc:1,insertBefore:function(E,w){if(E.nodeType==H){for(var Q=E.firstChild;Q;){var ce=Q.nextSibling;this.insertBefore(Q,w),Q=ce}return E}return be(this,E,w),me(E,this),this.documentElement===null&&E.nodeType===g&&(this.documentElement=E),E},removeChild:function(E){return this.documentElement==E&&(this.documentElement=null),Ne(this,E)},replaceChild:function(E,w){be(this,E,w,Ae),me(E,this),w&&this.removeChild(w),Ke(E)&&(this.documentElement=E)},importNode:function(E,w){return Gi(this,E,w)},getElementById:function(E){var w=null;return Z(this.documentElement,function(Q){if(Q.nodeType==g&&Q.getAttribute("id")==E)return w=Q,!0}),w},getElementsByClassName:function(E){var w=o(E);return new M(this,function(Q){var ce=[];return w.length>0&&Z(Q.documentElement,function(ge){if(ge!==Q&&ge.nodeType===g){var Ie=ge.getAttribute("class");if(Ie){var nt=E===Ie;if(!nt){var wt=o(Ie);nt=w.every(l(wt))}nt&&ce.push(ge)}}}),ce})},createElement:function(E){var w=new Ye;w.ownerDocument=this,w.nodeName=E,w.tagName=E,w.localName=E,w.childNodes=new V;var Q=w.attributes=new $;return Q._ownerElement=w,w},createDocumentFragment:function(){var E=new Nt;return E.ownerDocument=this,E.childNodes=new V,E},createTextNode:function(E){var w=new re;return w.ownerDocument=this,w.appendData(E),w},createComment:function(E){var w=new le;return w.ownerDocument=this,w.appendData(E),w},createCDATASection:function(E){if(E.indexOf("]]>")!==-1)throw new L(k,'data contains "]]>"');var w=new Ee;return w.ownerDocument=this,w.appendData(E),w},createProcessingInstruction:function(E,w){var Q=new xt;return Q.ownerDocument=this,Q.tagName=Q.nodeName=Q.target=E,Q.nodeValue=Q.data=w,Q},createAttribute:function(E){var w=new vt;return w.ownerDocument=this,w.name=E,w.nodeName=E,w.localName=E,w.specified=!0,w},createEntityReference:function(E){var w=new Fe;return w.ownerDocument=this,w.nodeName=E,w},createElementNS:function(E,w){var Q=new Ye,ce=w.split(":"),ge=Q.attributes=new $;return Q.childNodes=new V,Q.ownerDocument=this,Q.nodeName=w,Q.tagName=w,Q.namespaceURI=E,ce.length==2?(Q.prefix=ce[0],Q.localName=ce[1]):Q.localName=w,ge._ownerElement=Q,Q},createAttributeNS:function(E,w){var Q=new vt,ce=w.split(":");return Q.ownerDocument=this,Q.nodeName=w,Q.name=w,Q.namespaceURI=E,Q.specified=!0,ce.length==2?(Q.prefix=ce[0],Q.localName=ce[1]):Q.localName=w,Q}},d(se,J);function Ye(){this._nsMap={}}Ye.prototype={nodeType:g,hasAttribute:function(E){return this.getAttributeNode(E)!=null},getAttribute:function(E){var w=this.getAttributeNode(E);return w&&w.value||""},getAttributeNode:function(E){return this.attributes.getNamedItem(E)},setAttribute:function(E,w){var Q=this.ownerDocument.createAttribute(E);Q.value=Q.nodeValue=""+w,this.setAttributeNode(Q)},removeAttribute:function(E){var w=this.getAttributeNode(E);w&&this.removeAttributeNode(w)},appendChild:function(E){return E.nodeType===H?this.insertBefore(E,null):Pe(this,E)},setAttributeNode:function(E){return this.attributes.setNamedItem(E)},setAttributeNodeNS:function(E){return this.attributes.setNamedItemNS(E)},removeAttributeNode:function(E){return this.attributes.removeNamedItem(E.nodeName)},removeAttributeNS:function(E,w){var Q=this.getAttributeNodeNS(E,w);Q&&this.removeAttributeNode(Q)},hasAttributeNS:function(E,w){return this.getAttributeNodeNS(E,w)!=null},getAttributeNS:function(E,w){var Q=this.getAttributeNodeNS(E,w);return Q&&Q.value||""},setAttributeNS:function(E,w,Q){var ce=this.ownerDocument.createAttributeNS(E,w);ce.value=ce.nodeValue=""+Q,this.setAttributeNode(ce)},getAttributeNodeNS:function(E,w){return this.attributes.getNamedItemNS(E,w)},getElementsByTagName:function(E){return new M(this,function(w){var Q=[];return Z(w,function(ce){ce!==w&&ce.nodeType==g&&(E==="*"||ce.tagName==E)&&Q.push(ce)}),Q})},getElementsByTagNameNS:function(E,w){return new M(this,function(Q){var ce=[];return Z(Q,function(ge){ge!==Q&&ge.nodeType===g&&(E==="*"||ge.namespaceURI===E)&&(w==="*"||ge.localName==w)&&ce.push(ge)}),ce})}},se.prototype.getElementsByTagName=Ye.prototype.getElementsByTagName,se.prototype.getElementsByTagNameNS=Ye.prototype.getElementsByTagNameNS,d(Ye,J);function vt(){}vt.prototype.nodeType=S,d(vt,J);function ne(){}ne.prototype={data:"",substringData:function(E,w){return this.data.substring(E,E+w)},appendData:function(E){E=this.data+E,this.nodeValue=this.data=E,this.length=E.length},insertData:function(E,w){this.replaceData(E,0,w)},appendChild:function(E){throw new Error(G[C])},deleteData:function(E,w){this.replaceData(E,w,"")},replaceData:function(E,w,Q){var ce=this.data.substring(0,E),ge=this.data.substring(E+w);Q=ce+Q+ge,this.nodeValue=this.data=Q,this.length=Q.length}},d(ne,J);function re(){}re.prototype={nodeName:"#text",nodeType:T,splitText:function(E){var w=this.data,Q=w.substring(E);w=w.substring(0,E),this.data=this.nodeValue=w,this.length=w.length;var ce=this.ownerDocument.createTextNode(Q);return this.parentNode&&this.parentNode.insertBefore(ce,this.nextSibling),ce}},d(re,ne);function le(){}le.prototype={nodeName:"#comment",nodeType:I},d(le,ne);function Ee(){}Ee.prototype={nodeName:"#cdata-section",nodeType:b},d(Ee,ne);function pe(){}pe.prototype.nodeType=z,d(pe,J);function Ze(){}Ze.prototype.nodeType=U,d(Ze,J);function Je(){}Je.prototype.nodeType=x,d(Je,J);function Fe(){}Fe.prototype.nodeType=y,d(Fe,J);function Nt(){}Nt.prototype.nodeName="#document-fragment",Nt.prototype.nodeType=H,d(Nt,J);function xt(){}xt.prototype.nodeType=N,d(xt,J);function ui(){}ui.prototype.serializeToString=function(E,w,Q){return Ot.call(E,w,Q)},J.prototype.toString=Ot;function Ot(E,w){var Q=[],ce=this.nodeType==9&&this.documentElement||this,ge=ce.prefix,Ie=ce.namespaceURI;if(Ie&&ge==null){var ge=ce.lookupPrefix(Ie);if(ge==null)var nt=[{namespace:Ie,prefix:null}]}return $t(this,Q,E,w,nt),Q.join("")}function St(E,w,Q){var ce=E.prefix||"",ge=E.namespaceURI;if(!ge||ce==="xml"&&ge===i.XML||ge===i.XMLNS)return!1;for(var Ie=Q.length;Ie--;){var nt=Q[Ie];if(nt.prefix===ce)return nt.namespace!==ge}return!0}function ii(E,w,Q){E.push(" ",w,'="',Q.replace(/[<>&"\t\n\r]/g,oe),'"')}function $t(E,w,Q,ce,ge){if(ge||(ge=[]),ce)if(E=ce(E),E){if(typeof E=="string"){w.push(E);return}}else return;switch(E.nodeType){case g:var Ie=E.attributes,nt=Ie.length,ut=E.firstChild,wt=E.tagName;Q=i.isHTML(E.namespaceURI)||Q;var Wt=wt;if(!Q&&!E.prefix&&E.namespaceURI){for(var zt,Rt=0;Rt<Ie.length;Rt++)if(Ie.item(Rt).name==="xmlns"){zt=Ie.item(Rt).value;break}if(!zt)for(var ni=ge.length-1;ni>=0;ni--){var Qe=ge[ni];if(Qe.prefix===""&&Qe.namespace===E.namespaceURI){zt=Qe.namespace;break}}if(zt!==E.namespaceURI)for(var ni=ge.length-1;ni>=0;ni--){var Qe=ge[ni];if(Qe.namespace===E.namespaceURI){Qe.prefix&&(Wt=Qe.prefix+":"+wt);break}}}w.push("<",Wt);for(var ri=0;ri<nt;ri++){var Yt=Ie.item(ri);Yt.prefix=="xmlns"?ge.push({prefix:Yt.localName,namespace:Yt.value}):Yt.nodeName=="xmlns"&&ge.push({prefix:"",namespace:Yt.value})}for(var ri=0;ri<nt;ri++){var Yt=Ie.item(ri);if(St(Yt,Q,ge)){var Xt=Yt.prefix||"",Dt=Yt.namespaceURI;ii(w,Xt?"xmlns:"+Xt:"xmlns",Dt),ge.push({prefix:Xt,namespace:Dt})}$t(Yt,w,Q,ce,ge)}if(wt===Wt&&St(E,Q,ge)){var Xt=E.prefix||"",Dt=E.namespaceURI;ii(w,Xt?"xmlns:"+Xt:"xmlns",Dt),ge.push({prefix:Xt,namespace:Dt})}if(ut||Q&&!/^(?:meta|link|img|br|hr|input)$/i.test(wt)){if(w.push(">"),Q&&/^script$/i.test(wt))for(;ut;)ut.data?w.push(ut.data):$t(ut,w,Q,ce,ge.slice()),ut=ut.nextSibling;else for(;ut;)$t(ut,w,Q,ce,ge.slice()),ut=ut.nextSibling;w.push("</",Wt,">")}else w.push("/>");return;case D:case H:for(var ut=E.firstChild;ut;)$t(ut,w,Q,ce,ge.slice()),ut=ut.nextSibling;return;case S:return ii(w,E.name,E.value);case T:return w.push(E.data.replace(/[<&>]/g,oe));case b:return w.push("<![CDATA[",E.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>");case I:return w.push("<!--",E.data,"-->");case z:var qe=E.publicId,Si=E.systemId;if(w.push("<!DOCTYPE ",E.name),qe)w.push(" PUBLIC ",qe),Si&&Si!="."&&w.push(" ",Si),w.push(">");else if(Si&&Si!=".")w.push(" SYSTEM ",Si,">");else{var Li=E.internalSubset;Li&&w.push(" [",Li,"]"),w.push(">")}return;case N:return w.push("<?",E.target," ",E.data,"?>");case y:return w.push("&",E.nodeName,";");default:w.push("??",E.nodeName)}}function Gi(E,w,Q){var ce;switch(w.nodeType){case g:ce=w.cloneNode(!1),ce.ownerDocument=E;case H:break;case S:Q=!0;break}if(ce||(ce=w.cloneNode(!1)),ce.ownerDocument=E,ce.parentNode=null,Q)for(var ge=w.firstChild;ge;)ce.appendChild(Gi(E,ge,Q)),ge=ge.nextSibling;return ce}function Ut(E,w,Q){var ce=new w.constructor;for(var ge in w)if(Object.prototype.hasOwnProperty.call(w,ge)){var Ie=w[ge];typeof Ie!="object"&&Ie!=ce[ge]&&(ce[ge]=Ie)}switch(w.childNodes&&(ce.childNodes=new V),ce.ownerDocument=E,ce.nodeType){case g:var nt=w.attributes,wt=ce.attributes=new $,Wt=nt.length;wt._ownerElement=ce;for(var zt=0;zt<Wt;zt++)ce.setAttributeNode(Ut(E,nt.item(zt),!0));break;case S:Q=!0}if(Q)for(var Rt=w.firstChild;Rt;)ce.appendChild(Ut(E,Rt,Q)),Rt=Rt.nextSibling;return ce}function Wi(E,w,Q){E[w]=Q}try{if(Object.defineProperty){let E=function(w){switch(w.nodeType){case g:case H:var Q=[];for(w=w.firstChild;w;)w.nodeType!==7&&w.nodeType!==8&&Q.push(E(w)),w=w.nextSibling;return Q.join("");default:return w.nodeValue}};Object.defineProperty(M.prototype,"length",{get:function(){return q(this),this.$$length}}),Object.defineProperty(J.prototype,"textContent",{get:function(){return E(this)},set:function(w){switch(this.nodeType){case g:case H:for(;this.firstChild;)this.removeChild(this.firstChild);(w||String(w))&&this.appendChild(this.ownerDocument.createTextNode(w));break;default:this.data=w,this.value=w,this.nodeValue=w}}}),Wi=function(w,Q,ce){w["$$"+Q]=ce}}}catch{}return Ki.DocumentType=pe,Ki.DOMException=L,Ki.DOMImplementation=ue,Ki.Element=Ye,Ki.Node=J,Ki.NodeList=V,Ki.XMLSerializer=ui,Ki}var Ur={},Ao={},Uc;function T3(){return Uc||(Uc=1,(function(r){var e=Ea().freeze;r.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
24
- `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),r.entityMap=r.HTML_ENTITIES})(Ao)),Ao}var Vs={},zc;function b3(){if(zc)return Vs;zc=1;var r=Ea().NAMESPACE,e=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=new RegExp("[\\-\\.0-9"+e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),n=new RegExp("^"+e.source+i.source+"*(?::"+e.source+i.source+"*)?$"),s=0,a=1,o=2,l=3,c=4,d=5,m=6,g=7;function S(C,k){this.message=C,this.locator=k,Error.captureStackTrace&&Error.captureStackTrace(this,S)}S.prototype=new Error,S.prototype.name=S.name;function T(){}T.prototype={parse:function(C,k,O){var j=this.domBuilder;j.startDocument(),z(k,k={}),b(C,k,O,j,this.errorHandler),j.endDocument()}};function b(C,k,O,j,L){function V(me){if(me>65535){me-=65536;var Pe=55296+(me>>10),Ye=56320+(me&1023);return String.fromCharCode(Pe,Ye)}else return String.fromCharCode(me)}function M(me){var Pe=me.slice(1,-1);return Object.hasOwnProperty.call(O,Pe)?O[Pe]:Pe.charAt(0)==="#"?V(parseInt(Pe.substr(1).replace("x","0x"))):(L.error("entity not found:"+me),me)}function q(me){if(me>Z){var Pe=C.substring(Z,me).replace(/&#?\w+;/g,M);ue&&$(Z),j.characters(Pe,0,me-Z),Z=me}}function $(me,Pe){for(;me>=R&&(Pe=ee.exec(C));)X=Pe.index,R=X+Pe[0].length,ue.lineNumber++;ue.columnNumber=me-X+1}for(var X=0,R=0,ee=/.*(?:\r\n?|\n)|.*$/g,ue=j.locator,J=[{currentNSMap:k}],oe={},Z=0;;){try{var se=C.indexOf("<",Z);if(se<0){if(!C.substr(Z).match(/^\s*$/)){var _e=j.doc,ke=_e.createTextNode(C.substr(Z));_e.appendChild(ke),j.currentElement=ke}return}switch(se>Z&&q(se),C.charAt(se+1)){case"/":var Xe=C.indexOf(">",se+3),De=C.substring(se+2,Xe).replace(/[ \t\n\r]+$/g,""),Ne=J.pop();Xe<0?(De=C.substring(se+2).replace(/[\s<].*/,""),L.error("end tag name: "+De+" is not complete:"+Ne.tagName),Xe=se+1+De.length):De.match(/\s</)&&(De=De.replace(/[\s<].*/,""),L.error("end tag name: "+De+" maybe not complete"),Xe=se+1+De.length);var Re=Ne.localNSMap,et=Ne.tagName==De,Ve=et||Ne.tagName&&Ne.tagName.toLowerCase()==De.toLowerCase();if(Ve){if(j.endElement(Ne.uri,Ne.localName,De),Re)for(var Ke in Re)Object.prototype.hasOwnProperty.call(Re,Ke)&&j.endPrefixMapping(Ke);et||L.fatalError("end tag name: "+De+" is not match the current start tagName:"+Ne.tagName)}else J.push(Ne);Xe++;break;case"?":ue&&$(se),Xe=U(C,se,j);break;case"!":ue&&$(se),Xe=H(C,se,j,L);break;default:ue&&$(se);var Ge=new B,Ue=J[J.length-1].currentNSMap,Xe=x(C,se,Ge,Ue,M,L),kt=Ge.length;if(!Ge.closed&&D(C,Xe,Ge.tagName,oe)&&(Ge.closed=!0,O.nbsp||L.warning("unclosed xml attribute")),ue&&kt){for(var it=y(ue,{}),Ae=0;Ae<kt;Ae++){var be=Ge[Ae];$(be.offset),be.locator=y(ue,{})}j.locator=it,N(Ge,j,Ue)&&J.push(Ge),j.locator=ue}else N(Ge,j,Ue)&&J.push(Ge);r.isHTML(Ge.uri)&&!Ge.closed?Xe=I(C,Xe,Ge.tagName,M,j):Xe++}}catch(me){if(me instanceof S)throw me;L.error("element parse error: "+me),Xe=-1}Xe>Z?Z=Xe:q(Math.max(se,Z)+1)}}function y(C,k){return k.lineNumber=C.lineNumber,k.columnNumber=C.columnNumber,k}function x(C,k,O,j,L,V){function M(ue,J,oe){O.attributeNames.hasOwnProperty(ue)&&V.fatalError("Attribute "+ue+" redefined"),O.addValue(ue,J.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,L),oe)}for(var q,$,X=++k,R=s;;){var ee=C.charAt(X);switch(ee){case"=":if(R===a)q=C.slice(k,X),R=l;else if(R===o)R=l;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(R===l||R===a)if(R===a&&(V.warning('attribute value must after "="'),q=C.slice(k,X)),k=X+1,X=C.indexOf(ee,k),X>0)$=C.slice(k,X),M(q,$,k-1),R=d;else throw new Error("attribute value no end '"+ee+"' match");else if(R==c)$=C.slice(k,X),M(q,$,k),V.warning('attribute "'+q+'" missed start quot('+ee+")!!"),k=X+1,R=d;else throw new Error('attribute value must after "="');break;case"/":switch(R){case s:O.setTagName(C.slice(k,X));case d:case m:case g:R=g,O.closed=!0;case c:case a:break;case o:O.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return V.error("unexpected end of input"),R==s&&O.setTagName(C.slice(k,X)),X;case">":switch(R){case s:O.setTagName(C.slice(k,X));case d:case m:case g:break;case c:case a:$=C.slice(k,X),$.slice(-1)==="/"&&(O.closed=!0,$=$.slice(0,-1));case o:R===o&&($=q),R==c?(V.warning('attribute "'+$+'" missed quot(")!'),M(q,$,k)):((!r.isHTML(j[""])||!$.match(/^(?:disabled|checked|selected)$/i))&&V.warning('attribute "'+$+'" missed value!! "'+$+'" instead!!'),M($,$,k));break;case l:throw new Error("attribute value missed!!")}return X;case"€":ee=" ";default:if(ee<=" ")switch(R){case s:O.setTagName(C.slice(k,X)),R=m;break;case a:q=C.slice(k,X),R=o;break;case c:var $=C.slice(k,X);V.warning('attribute "'+$+'" missed quot(")!!'),M(q,$,k);case d:R=m;break}else switch(R){case o:O.tagName,(!r.isHTML(j[""])||!q.match(/^(?:disabled|checked|selected)$/i))&&V.warning('attribute "'+q+'" missed value!! "'+q+'" instead2!!'),M(q,q,k),k=X,R=a;break;case d:V.warning('attribute space is required"'+q+'"!!');case m:R=a,k=X;break;case l:R=c,k=X;break;case g:throw new Error("elements closed character '/' and '>' must be connected to")}}X++}}function N(C,k,O){for(var j=C.tagName,L=null,ee=C.length;ee--;){var V=C[ee],M=V.qName,q=V.value,ue=M.indexOf(":");if(ue>0)var $=V.prefix=M.slice(0,ue),X=M.slice(ue+1),R=$==="xmlns"&&X;else X=M,$=null,R=M==="xmlns"&&"";V.localName=X,R!==!1&&(L==null&&(L={},z(O,O={})),O[R]=L[R]=q,V.uri=r.XMLNS,k.startPrefixMapping(R,q))}for(var ee=C.length;ee--;){V=C[ee];var $=V.prefix;$&&($==="xml"&&(V.uri=r.XML),$!=="xmlns"&&(V.uri=O[$||""]))}var ue=j.indexOf(":");ue>0?($=C.prefix=j.slice(0,ue),X=C.localName=j.slice(ue+1)):($=null,X=C.localName=j);var J=C.uri=O[$||""];if(k.startElement(J,X,j,C),C.closed){if(k.endElement(J,X,j),L)for($ in L)Object.prototype.hasOwnProperty.call(L,$)&&k.endPrefixMapping($)}else return C.currentNSMap=O,C.localNSMap=L,!0}function I(C,k,O,j,L){if(/^(?:script|textarea)$/i.test(O)){var V=C.indexOf("</"+O+">",k),M=C.substring(k+1,V);if(/[&<]/.test(M))return/^script$/i.test(O)?(L.characters(M,0,M.length),V):(M=M.replace(/&#?\w+;/g,j),L.characters(M,0,M.length),V)}return k+1}function D(C,k,O,j){var L=j[O];return L==null&&(L=C.lastIndexOf("</"+O+">"),L<k&&(L=C.lastIndexOf("</"+O)),j[O]=L),L<k}function z(C,k){for(var O in C)Object.prototype.hasOwnProperty.call(C,O)&&(k[O]=C[O])}function H(C,k,O,j){var L=C.charAt(k+2);switch(L){case"-":if(C.charAt(k+3)==="-"){var V=C.indexOf("-->",k+4);return V>k?(O.comment(C,k+4,V-k-4),V+3):(j.error("Unclosed comment"),-1)}else return-1;default:if(C.substr(k+3,6)=="CDATA["){var V=C.indexOf("]]>",k+9);return O.startCDATA(),O.characters(C,k+9,V-k-9),O.endCDATA(),V+3}var M=G(C,k),q=M.length;if(q>1&&/!doctype/i.test(M[0][0])){var $=M[1][0],X=!1,R=!1;q>3&&(/^public$/i.test(M[2][0])?(X=M[3][0],R=q>4&&M[4][0]):/^system$/i.test(M[2][0])&&(R=M[3][0]));var ee=M[q-1];return O.startDTD($,X,R),O.endDTD(),ee.index+ee[0].length}}return-1}function U(C,k,O){var j=C.indexOf("?>",k);if(j){var L=C.substring(k,j).match(/^<\?(\S*)\s*([\s\S]*?)$/);return L?(L[0].length,O.processingInstruction(L[1],L[2]),j+2):-1}return-1}function B(){this.attributeNames={}}B.prototype={setTagName:function(C){if(!n.test(C))throw new Error("invalid tagName:"+C);this.tagName=C},addValue:function(C,k,O){if(!n.test(C))throw new Error("invalid attribute:"+C);this.attributeNames[C]=this.length,this[this.length++]={qName:C,value:k,offset:O}},length:0,getLocalName:function(C){return this[C].localName},getLocator:function(C){return this[C].locator},getQName:function(C){return this[C].qName},getURI:function(C){return this[C].uri},getValue:function(C){return this[C].value}};function G(C,k){var O,j=[],L=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(L.lastIndex=k,L.exec(C);O=L.exec(C);)if(j.push(O),O[1])return j}return Vs.XMLReader=T,Vs.ParseError=S,Vs}var Hc;function C3(){if(Hc)return Ur;Hc=1;var r=Ea(),e=Lh(),i=T3(),n=b3(),s=e.DOMImplementation,a=r.NAMESPACE,o=n.ParseError,l=n.XMLReader;function c(x){return x.replace(/\r[\n\u0085]/g,`
23
+ `),this.manifest.dateRanges.length&&this.lastProgramDateTime===null&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"}),this.lastProgramDateTime=null,this.trigger("end")}addParser(e){this.parseStream.addParser(e)}addTagMapper(e){this.parseStream.addTagMapper(e)}}var On={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},o3=["video","audio","text"],Rc=["Video","Audio","Text"],Ah=function(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(i,n,s){var a=("00"+Number(n).toString(16)).slice(-2),o=("00"+Number(s).toString(16)).slice(-2);return"avc1."+a+"00"+o})},Ri=function(e){e===void 0&&(e="");var i=e.split(","),n=[];return i.forEach(function(s){s=s.trim();var a;o3.forEach(function(o){var l=On[o].exec(s.toLowerCase());if(!(!l||l.length<=1)){a=o;var c=s.substring(0,l[1].length),d=s.replace(c,"");n.push({type:c,details:d,mediaType:o})}}),a||n.push({type:s,details:"",mediaType:"unknown"})}),n},l3=function(e,i){if(!e.mediaGroups.AUDIO||!i)return null;var n=e.mediaGroups.AUDIO[i];if(!n)return null;for(var s in n){var a=n[s];if(a.default&&a.playlists)return Ri(a.playlists[0].attributes.CODECS)}return null},Ih=function(e){return e===void 0&&(e=""),On.audio.test(e.trim().toLowerCase())},u3=function(e){return e===void 0&&(e=""),On.text.test(e.trim().toLowerCase())},rr=function(e){if(!(!e||typeof e!="string")){var i=e.toLowerCase().split(",").map(function(a){return Ah(a.trim())}),n="video";i.length===1&&Ih(i[0])?n="audio":i.length===1&&u3(i[0])&&(n="application");var s="mp4";return i.every(function(a){return On.mp4.test(a)})?s="mp4":i.every(function(a){return On.webm.test(a)})?s="webm":i.every(function(a){return On.ogg.test(a)})&&(s="ogg"),n+"/"+s+';codecs="'+e+'"'}},Xr=function(e,i){return e===void 0&&(e=""),i===void 0&&(i=!1),Y.MediaSource&&Y.MediaSource.isTypeSupported&&Y.MediaSource.isTypeSupported(rr(e))||i&&Y.ManagedMediaSource&&Y.ManagedMediaSource.isTypeSupported&&Y.ManagedMediaSource.isTypeSupported(rr(e))||!1},Do=function(e){return e===void 0&&(e=""),e.toLowerCase().split(",").every(function(i){i=i.trim();for(var n=0;n<Rc.length;n++){var s=Rc[n];if(On["muxer"+s].test(i))return!0}return!1})},Vc="mp4a.40.2",c3="avc1.4d400d",d3=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,h3=/^application\/dash\+xml/i,Nh=function(e){return d3.test(e)?"hls":h3.test(e)?"dash":e==="application/vnd.videojs.vhs+json"?"vhs-json":null},f3=function(e){return e.toString(2).length},p3=function(e){return Math.ceil(f3(e)/8)},Oh=function(e){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer},m3=function(e){return Oh(e)},Le=function(e){return e instanceof Uint8Array?e:(!Array.isArray(e)&&!m3(e)&&!(e instanceof ArrayBuffer)&&(typeof e!="number"||typeof e=="number"&&e!==e?e=0:e=[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))},Ft=Y.BigInt||Number,el=[Ft("0x1"),Ft("0x100"),Ft("0x10000"),Ft("0x1000000"),Ft("0x100000000"),Ft("0x10000000000"),Ft("0x1000000000000"),Ft("0x100000000000000"),Ft("0x10000000000000000")];(function(){var r=new Uint16Array([65484]),e=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);return e[0]===255?"big":e[0]===204?"little":"unknown"})();var g3=function(e,i){var n=i===void 0?{}:i,s=n.signed,a=s===void 0?!1:s,o=n.le,l=o===void 0?!1:o;e=Le(e);var c=l?"reduce":"reduceRight",d=e[c]?e[c]:Array.prototype[c],m=d.call(e,function(S,T,b){var y=l?b:Math.abs(b+1-e.length);return S+Ft(T)*el[y]},Ft(0));if(a){var g=el[e.length]/Ft(2)-Ft(1);m=Ft(m),m>g&&(m-=g,m-=g,m-=Ft(2))}return Number(m)},v3=function(e,i){var n={},s=n.le,a=s===void 0?!1:s;(typeof e!="bigint"&&typeof e!="number"||typeof e=="number"&&e!==e)&&(e=0),e=Ft(e);for(var o=p3(e),l=new Uint8Array(new ArrayBuffer(o)),c=0;c<o;c++){var d=a?c:Math.abs(c+1-l.length);l[d]=Number(e/el[c]&Ft(255)),e<0&&(l[d]=Math.abs(~l[d]),l[d]-=c===0?1:2)}return l},Bh=function(e,i){if(typeof e!="string"&&e&&typeof e.toString=="function"&&(e=e.toString()),typeof e!="string")return new Uint8Array;i||(e=unescape(encodeURIComponent(e)));for(var n=new Uint8Array(e.length),s=0;s<e.length;s++)n[s]=e.charCodeAt(s);return n},y3=function(){for(var e=arguments.length,i=new Array(e),n=0;n<e;n++)i[n]=arguments[n];if(i=i.filter(function(l){return l&&(l.byteLength||l.length)&&typeof l!="string"}),i.length<=1)return Le(i[0]);var s=i.reduce(function(l,c,d){return l+(c.byteLength||c.length)},0),a=new Uint8Array(s),o=0;return i.forEach(function(l){l=Le(l),a.set(l,o),o+=l.byteLength}),a},ft=function(e,i,n){var s=n===void 0?{}:n,a=s.offset,o=a===void 0?0:a,l=s.mask,c=l===void 0?[]:l;e=Le(e),i=Le(i);var d=i.every?i.every:Array.prototype.every;return i.length&&e.length-o>=i.length&&d.call(i,function(m,g){var S=c[g]?c[g]&e[o+g]:e[o+g];return m===S})},_3=function(e,i,n){i.forEach(function(s){for(var a in e.mediaGroups[s])for(var o in e.mediaGroups[s][a]){var l=e.mediaGroups[s][a][o];n(l,s,a,o)}})},$r={},Ki={},En={},Fc;function Ea(){if(Fc)return En;Fc=1;function r(a,o,l){if(l===void 0&&(l=Array.prototype),a&&typeof l.find=="function")return l.find.call(a,o);for(var c=0;c<a.length;c++)if(Object.prototype.hasOwnProperty.call(a,c)){var d=a[c];if(o.call(void 0,d,c,a))return d}}function e(a,o){return o===void 0&&(o=Object),o&&typeof o.freeze=="function"?o.freeze(a):a}function i(a,o){if(a===null||typeof a!="object")throw new TypeError("target is not an object");for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(a[l]=o[l]);return a}var n=e({HTML:"text/html",isHTML:function(a){return a===n.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),s=e({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(a){return a===s.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return En.assign=i,En.find=r,En.freeze=e,En.MIME_TYPE=n,En.NAMESPACE=s,En}var $c;function Lh(){if($c)return Ki;$c=1;var r=Ea(),e=r.find,i=r.NAMESPACE;function n(E){return E!==""}function s(E){return E?E.split(/[\t\n\f\r ]+/).filter(n):[]}function a(E,w){return E.hasOwnProperty(w)||(E[w]=!0),E}function o(E){if(!E)return[];var w=s(E);return Object.keys(w.reduce(a,{}))}function l(E){return function(w){return E&&E.indexOf(w)!==-1}}function c(E,w){for(var Q in E)Object.prototype.hasOwnProperty.call(E,Q)&&(w[Q]=E[Q])}function d(E,w){var Q=E.prototype;if(!(Q instanceof w)){let ce=function(){};ce.prototype=w.prototype,ce=new ce,c(Q,ce),E.prototype=Q=ce}Q.constructor!=E&&(typeof E!="function"&&console.error("unknown Class:"+E),Q.constructor=E)}var m={},g=m.ELEMENT_NODE=1,S=m.ATTRIBUTE_NODE=2,T=m.TEXT_NODE=3,b=m.CDATA_SECTION_NODE=4,y=m.ENTITY_REFERENCE_NODE=5,x=m.ENTITY_NODE=6,N=m.PROCESSING_INSTRUCTION_NODE=7,I=m.COMMENT_NODE=8,D=m.DOCUMENT_NODE=9,z=m.DOCUMENT_TYPE_NODE=10,H=m.DOCUMENT_FRAGMENT_NODE=11,U=m.NOTATION_NODE=12,B={},G={};B.INDEX_SIZE_ERR=(G[1]="Index size error",1),B.DOMSTRING_SIZE_ERR=(G[2]="DOMString size error",2);var C=B.HIERARCHY_REQUEST_ERR=(G[3]="Hierarchy request error",3);B.WRONG_DOCUMENT_ERR=(G[4]="Wrong document",4);var k=B.INVALID_CHARACTER_ERR=(G[5]="Invalid character",5);B.NO_DATA_ALLOWED_ERR=(G[6]="No data allowed",6),B.NO_MODIFICATION_ALLOWED_ERR=(G[7]="No modification allowed",7);var O=B.NOT_FOUND_ERR=(G[8]="Not found",8);B.NOT_SUPPORTED_ERR=(G[9]="Not supported",9);var j=B.INUSE_ATTRIBUTE_ERR=(G[10]="Attribute in use",10);B.INVALID_STATE_ERR=(G[11]="Invalid state",11),B.SYNTAX_ERR=(G[12]="Syntax error",12),B.INVALID_MODIFICATION_ERR=(G[13]="Invalid modification",13),B.NAMESPACE_ERR=(G[14]="Invalid namespace",14),B.INVALID_ACCESS_ERR=(G[15]="Invalid access",15);function L(E,w){if(w instanceof Error)var Q=w;else Q=this,Error.call(this,G[E]),this.message=G[E],Error.captureStackTrace&&Error.captureStackTrace(this,L);return Q.code=E,w&&(this.message=this.message+": "+w),Q}L.prototype=Error.prototype,c(B,L);function V(){}V.prototype={length:0,item:function(E){return E>=0&&E<this.length?this[E]:null},toString:function(E,w){for(var Q=[],ce=0;ce<this.length;ce++)$t(this[ce],Q,E,w);return Q.join("")},filter:function(E){return Array.prototype.filter.call(this,E)},indexOf:function(E){return Array.prototype.indexOf.call(this,E)}};function M(E,w){this._node=E,this._refresh=w,q(this)}function q(E){var w=E._node._inc||E._node.ownerDocument._inc;if(E._inc!==w){var Q=E._refresh(E._node);if(Wi(E,"length",Q.length),!E.$$length||Q.length<E.$$length)for(var ce=Q.length;ce in E;ce++)Object.prototype.hasOwnProperty.call(E,ce)&&delete E[ce];c(Q,E),E._inc=w}}M.prototype.item=function(E){return q(this),this[E]||null},d(M,V);function $(){}function X(E,w){for(var Q=E.length;Q--;)if(E[Q]===w)return Q}function R(E,w,Q,ce){if(ce?w[X(w,ce)]=Q:w[w.length++]=Q,E){Q.ownerElement=E;var ge=E.ownerDocument;ge&&(ce&&ke(ge,E,ce),_e(ge,E,Q))}}function ee(E,w,Q){var ce=X(w,Q);if(ce>=0){for(var ge=w.length-1;ce<ge;)w[ce]=w[++ce];if(w.length=ge,E){var Ie=E.ownerDocument;Ie&&(ke(Ie,E,Q),Q.ownerElement=null)}}else throw new L(O,new Error(E.tagName+"@"+Q))}$.prototype={length:0,item:V.prototype.item,getNamedItem:function(E){for(var w=this.length;w--;){var Q=this[w];if(Q.nodeName==E)return Q}},setNamedItem:function(E){var w=E.ownerElement;if(w&&w!=this._ownerElement)throw new L(j);var Q=this.getNamedItem(E.nodeName);return R(this._ownerElement,this,E,Q),Q},setNamedItemNS:function(E){var w=E.ownerElement,Q;if(w&&w!=this._ownerElement)throw new L(j);return Q=this.getNamedItemNS(E.namespaceURI,E.localName),R(this._ownerElement,this,E,Q),Q},removeNamedItem:function(E){var w=this.getNamedItem(E);return ee(this._ownerElement,this,w),w},removeNamedItemNS:function(E,w){var Q=this.getNamedItemNS(E,w);return ee(this._ownerElement,this,Q),Q},getNamedItemNS:function(E,w){for(var Q=this.length;Q--;){var ce=this[Q];if(ce.localName==w&&ce.namespaceURI==E)return ce}return null}};function ue(){}ue.prototype={hasFeature:function(E,w){return!0},createDocument:function(E,w,Q){var ce=new se;if(ce.implementation=this,ce.childNodes=new V,ce.doctype=Q||null,Q&&ce.appendChild(Q),w){var ge=ce.createElementNS(E,w);ce.appendChild(ge)}return ce},createDocumentType:function(E,w,Q){var ce=new pe;return ce.name=E,ce.nodeName=E,ce.publicId=w||"",ce.systemId=Q||"",ce}};function J(){}J.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(E,w){return be(this,E,w)},replaceChild:function(E,w){be(this,E,w,Ae),w&&this.removeChild(w)},removeChild:function(E){return Ne(this,E)},appendChild:function(E){return this.insertBefore(E,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(E){return Ut(this.ownerDocument||this,this,E)},normalize:function(){for(var E=this.firstChild;E;){var w=E.nextSibling;w&&w.nodeType==T&&E.nodeType==T?(this.removeChild(w),E.appendData(w.data)):(E.normalize(),E=w)}},isSupported:function(E,w){return this.ownerDocument.implementation.hasFeature(E,w)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(E){for(var w=this;w;){var Q=w._nsMap;if(Q){for(var ce in Q)if(Object.prototype.hasOwnProperty.call(Q,ce)&&Q[ce]===E)return ce}w=w.nodeType==S?w.ownerDocument:w.parentNode}return null},lookupNamespaceURI:function(E){for(var w=this;w;){var Q=w._nsMap;if(Q&&Object.prototype.hasOwnProperty.call(Q,E))return Q[E];w=w.nodeType==S?w.ownerDocument:w.parentNode}return null},isDefaultNamespace:function(E){var w=this.lookupPrefix(E);return w==null}};function oe(E){return E=="<"&&"&lt;"||E==">"&&"&gt;"||E=="&"&&"&amp;"||E=='"'&&"&quot;"||"&#"+E.charCodeAt()+";"}c(m,J),c(m,J.prototype);function Z(E,w){if(w(E))return!0;if(E=E.firstChild)do if(Z(E,w))return!0;while(E=E.nextSibling)}function se(){this.ownerDocument=this}function _e(E,w,Q){E&&E._inc++;var ce=Q.namespaceURI;ce===i.XMLNS&&(w._nsMap[Q.prefix?Q.localName:""]=Q.value)}function ke(E,w,Q,ce){E&&E._inc++;var ge=Q.namespaceURI;ge===i.XMLNS&&delete w._nsMap[Q.prefix?Q.localName:""]}function De(E,w,Q){if(E&&E._inc){E._inc++;var ce=w.childNodes;if(Q)ce[ce.length++]=Q;else{for(var ge=w.firstChild,Ie=0;ge;)ce[Ie++]=ge,ge=ge.nextSibling;ce.length=Ie,delete ce[ce.length]}}}function Ne(E,w){var Q=w.previousSibling,ce=w.nextSibling;return Q?Q.nextSibling=ce:E.firstChild=ce,ce?ce.previousSibling=Q:E.lastChild=Q,w.parentNode=null,w.previousSibling=null,w.nextSibling=null,De(E.ownerDocument,E),w}function Ve(E){return E&&(E.nodeType===J.DOCUMENT_NODE||E.nodeType===J.DOCUMENT_FRAGMENT_NODE||E.nodeType===J.ELEMENT_NODE)}function et(E){return E&&(Ke(E)||He(E)||Re(E)||E.nodeType===J.DOCUMENT_FRAGMENT_NODE||E.nodeType===J.COMMENT_NODE||E.nodeType===J.PROCESSING_INSTRUCTION_NODE)}function Re(E){return E&&E.nodeType===J.DOCUMENT_TYPE_NODE}function Ke(E){return E&&E.nodeType===J.ELEMENT_NODE}function He(E){return E&&E.nodeType===J.TEXT_NODE}function Fe(E,w){var Q=E.childNodes||[];if(e(Q,Ke)||Re(w))return!1;var ce=e(Q,Re);return!(w&&ce&&Q.indexOf(ce)>Q.indexOf(w))}function We(E,w){var Q=E.childNodes||[];function ce(Ie){return Ke(Ie)&&Ie!==w}if(e(Q,ce))return!1;var ge=e(Q,Re);return!(w&&ge&&Q.indexOf(ge)>Q.indexOf(w))}function kt(E,w,Q){if(!Ve(E))throw new L(C,"Unexpected parent node type "+E.nodeType);if(Q&&Q.parentNode!==E)throw new L(O,"child not in parent");if(!et(w)||Re(w)&&E.nodeType!==J.DOCUMENT_NODE)throw new L(C,"Unexpected node type "+w.nodeType+" for parent node type "+E.nodeType)}function it(E,w,Q){var ce=E.childNodes||[],ge=w.childNodes||[];if(w.nodeType===J.DOCUMENT_FRAGMENT_NODE){var Ie=ge.filter(Ke);if(Ie.length>1||e(ge,He))throw new L(C,"More than one element or text in fragment");if(Ie.length===1&&!Fe(E,Q))throw new L(C,"Element in fragment can not be inserted before doctype")}if(Ke(w)&&!Fe(E,Q))throw new L(C,"Only one element can be added and only after doctype");if(Re(w)){if(e(ce,Re))throw new L(C,"Only one doctype is allowed");var nt=e(ce,Ke);if(Q&&ce.indexOf(nt)<ce.indexOf(Q))throw new L(C,"Doctype can only be inserted before an element");if(!Q&&nt)throw new L(C,"Doctype can not be appended since element is present")}}function Ae(E,w,Q){var ce=E.childNodes||[],ge=w.childNodes||[];if(w.nodeType===J.DOCUMENT_FRAGMENT_NODE){var Ie=ge.filter(Ke);if(Ie.length>1||e(ge,He))throw new L(C,"More than one element or text in fragment");if(Ie.length===1&&!We(E,Q))throw new L(C,"Element in fragment can not be inserted before doctype")}if(Ke(w)&&!We(E,Q))throw new L(C,"Only one element can be added and only after doctype");if(Re(w)){if(e(ce,function(Wt){return Re(Wt)&&Wt!==Q}))throw new L(C,"Only one doctype is allowed");var nt=e(ce,Ke);if(Q&&ce.indexOf(nt)<ce.indexOf(Q))throw new L(C,"Doctype can only be inserted before an element")}}function be(E,w,Q,ce){kt(E,w,Q),E.nodeType===J.DOCUMENT_NODE&&(ce||it)(E,w,Q);var ge=w.parentNode;if(ge&&ge.removeChild(w),w.nodeType===H){var Ie=w.firstChild;if(Ie==null)return w;var nt=w.lastChild}else Ie=nt=w;var wt=Q?Q.previousSibling:E.lastChild;Ie.previousSibling=wt,nt.nextSibling=Q,wt?wt.nextSibling=Ie:E.firstChild=Ie,Q==null?E.lastChild=nt:Q.previousSibling=nt;do{Ie.parentNode=E;var Wt=E.ownerDocument||E;me(Ie,Wt)}while(Ie!==nt&&(Ie=Ie.nextSibling));return De(E.ownerDocument||E,E),w.nodeType==H&&(w.firstChild=w.lastChild=null),w}function me(E,w){if(E.ownerDocument!==w){if(E.ownerDocument=w,E.nodeType===g&&E.attributes)for(var Q=0;Q<E.attributes.length;Q++){var ce=E.attributes.item(Q);ce&&(ce.ownerDocument=w)}for(var ge=E.firstChild;ge;)me(ge,w),ge=ge.nextSibling}}function Pe(E,w){w.parentNode&&w.parentNode.removeChild(w),w.parentNode=E,w.previousSibling=E.lastChild,w.nextSibling=null,w.previousSibling?w.previousSibling.nextSibling=w:E.firstChild=w,E.lastChild=w,De(E.ownerDocument,E,w);var Q=E.ownerDocument||E;return me(w,Q),w}se.prototype={nodeName:"#document",nodeType:D,doctype:null,documentElement:null,_inc:1,insertBefore:function(E,w){if(E.nodeType==H){for(var Q=E.firstChild;Q;){var ce=Q.nextSibling;this.insertBefore(Q,w),Q=ce}return E}return be(this,E,w),me(E,this),this.documentElement===null&&E.nodeType===g&&(this.documentElement=E),E},removeChild:function(E){return this.documentElement==E&&(this.documentElement=null),Ne(this,E)},replaceChild:function(E,w){be(this,E,w,Ae),me(E,this),w&&this.removeChild(w),Ke(E)&&(this.documentElement=E)},importNode:function(E,w){return Gi(this,E,w)},getElementById:function(E){var w=null;return Z(this.documentElement,function(Q){if(Q.nodeType==g&&Q.getAttribute("id")==E)return w=Q,!0}),w},getElementsByClassName:function(E){var w=o(E);return new M(this,function(Q){var ce=[];return w.length>0&&Z(Q.documentElement,function(ge){if(ge!==Q&&ge.nodeType===g){var Ie=ge.getAttribute("class");if(Ie){var nt=E===Ie;if(!nt){var wt=o(Ie);nt=w.every(l(wt))}nt&&ce.push(ge)}}}),ce})},createElement:function(E){var w=new Xe;w.ownerDocument=this,w.nodeName=E,w.tagName=E,w.localName=E,w.childNodes=new V;var Q=w.attributes=new $;return Q._ownerElement=w,w},createDocumentFragment:function(){var E=new Nt;return E.ownerDocument=this,E.childNodes=new V,E},createTextNode:function(E){var w=new re;return w.ownerDocument=this,w.appendData(E),w},createComment:function(E){var w=new le;return w.ownerDocument=this,w.appendData(E),w},createCDATASection:function(E){if(E.indexOf("]]>")!==-1)throw new L(k,'data contains "]]>"');var w=new Ee;return w.ownerDocument=this,w.appendData(E),w},createProcessingInstruction:function(E,w){var Q=new xt;return Q.ownerDocument=this,Q.tagName=Q.nodeName=Q.target=E,Q.nodeValue=Q.data=w,Q},createAttribute:function(E){var w=new vt;return w.ownerDocument=this,w.name=E,w.nodeName=E,w.localName=E,w.specified=!0,w},createEntityReference:function(E){var w=new $e;return w.ownerDocument=this,w.nodeName=E,w},createElementNS:function(E,w){var Q=new Xe,ce=w.split(":"),ge=Q.attributes=new $;return Q.childNodes=new V,Q.ownerDocument=this,Q.nodeName=w,Q.tagName=w,Q.namespaceURI=E,ce.length==2?(Q.prefix=ce[0],Q.localName=ce[1]):Q.localName=w,ge._ownerElement=Q,Q},createAttributeNS:function(E,w){var Q=new vt,ce=w.split(":");return Q.ownerDocument=this,Q.nodeName=w,Q.name=w,Q.namespaceURI=E,Q.specified=!0,ce.length==2?(Q.prefix=ce[0],Q.localName=ce[1]):Q.localName=w,Q}},d(se,J);function Xe(){this._nsMap={}}Xe.prototype={nodeType:g,hasAttribute:function(E){return this.getAttributeNode(E)!=null},getAttribute:function(E){var w=this.getAttributeNode(E);return w&&w.value||""},getAttributeNode:function(E){return this.attributes.getNamedItem(E)},setAttribute:function(E,w){var Q=this.ownerDocument.createAttribute(E);Q.value=Q.nodeValue=""+w,this.setAttributeNode(Q)},removeAttribute:function(E){var w=this.getAttributeNode(E);w&&this.removeAttributeNode(w)},appendChild:function(E){return E.nodeType===H?this.insertBefore(E,null):Pe(this,E)},setAttributeNode:function(E){return this.attributes.setNamedItem(E)},setAttributeNodeNS:function(E){return this.attributes.setNamedItemNS(E)},removeAttributeNode:function(E){return this.attributes.removeNamedItem(E.nodeName)},removeAttributeNS:function(E,w){var Q=this.getAttributeNodeNS(E,w);Q&&this.removeAttributeNode(Q)},hasAttributeNS:function(E,w){return this.getAttributeNodeNS(E,w)!=null},getAttributeNS:function(E,w){var Q=this.getAttributeNodeNS(E,w);return Q&&Q.value||""},setAttributeNS:function(E,w,Q){var ce=this.ownerDocument.createAttributeNS(E,w);ce.value=ce.nodeValue=""+Q,this.setAttributeNode(ce)},getAttributeNodeNS:function(E,w){return this.attributes.getNamedItemNS(E,w)},getElementsByTagName:function(E){return new M(this,function(w){var Q=[];return Z(w,function(ce){ce!==w&&ce.nodeType==g&&(E==="*"||ce.tagName==E)&&Q.push(ce)}),Q})},getElementsByTagNameNS:function(E,w){return new M(this,function(Q){var ce=[];return Z(Q,function(ge){ge!==Q&&ge.nodeType===g&&(E==="*"||ge.namespaceURI===E)&&(w==="*"||ge.localName==w)&&ce.push(ge)}),ce})}},se.prototype.getElementsByTagName=Xe.prototype.getElementsByTagName,se.prototype.getElementsByTagNameNS=Xe.prototype.getElementsByTagNameNS,d(Xe,J);function vt(){}vt.prototype.nodeType=S,d(vt,J);function ne(){}ne.prototype={data:"",substringData:function(E,w){return this.data.substring(E,E+w)},appendData:function(E){E=this.data+E,this.nodeValue=this.data=E,this.length=E.length},insertData:function(E,w){this.replaceData(E,0,w)},appendChild:function(E){throw new Error(G[C])},deleteData:function(E,w){this.replaceData(E,w,"")},replaceData:function(E,w,Q){var ce=this.data.substring(0,E),ge=this.data.substring(E+w);Q=ce+Q+ge,this.nodeValue=this.data=Q,this.length=Q.length}},d(ne,J);function re(){}re.prototype={nodeName:"#text",nodeType:T,splitText:function(E){var w=this.data,Q=w.substring(E);w=w.substring(0,E),this.data=this.nodeValue=w,this.length=w.length;var ce=this.ownerDocument.createTextNode(Q);return this.parentNode&&this.parentNode.insertBefore(ce,this.nextSibling),ce}},d(re,ne);function le(){}le.prototype={nodeName:"#comment",nodeType:I},d(le,ne);function Ee(){}Ee.prototype={nodeName:"#cdata-section",nodeType:b},d(Ee,ne);function pe(){}pe.prototype.nodeType=z,d(pe,J);function Ze(){}Ze.prototype.nodeType=U,d(Ze,J);function Je(){}Je.prototype.nodeType=x,d(Je,J);function $e(){}$e.prototype.nodeType=y,d($e,J);function Nt(){}Nt.prototype.nodeName="#document-fragment",Nt.prototype.nodeType=H,d(Nt,J);function xt(){}xt.prototype.nodeType=N,d(xt,J);function ui(){}ui.prototype.serializeToString=function(E,w,Q){return Ot.call(E,w,Q)},J.prototype.toString=Ot;function Ot(E,w){var Q=[],ce=this.nodeType==9&&this.documentElement||this,ge=ce.prefix,Ie=ce.namespaceURI;if(Ie&&ge==null){var ge=ce.lookupPrefix(Ie);if(ge==null)var nt=[{namespace:Ie,prefix:null}]}return $t(this,Q,E,w,nt),Q.join("")}function St(E,w,Q){var ce=E.prefix||"",ge=E.namespaceURI;if(!ge||ce==="xml"&&ge===i.XML||ge===i.XMLNS)return!1;for(var Ie=Q.length;Ie--;){var nt=Q[Ie];if(nt.prefix===ce)return nt.namespace!==ge}return!0}function ii(E,w,Q){E.push(" ",w,'="',Q.replace(/[<>&"\t\n\r]/g,oe),'"')}function $t(E,w,Q,ce,ge){if(ge||(ge=[]),ce)if(E=ce(E),E){if(typeof E=="string"){w.push(E);return}}else return;switch(E.nodeType){case g:var Ie=E.attributes,nt=Ie.length,ut=E.firstChild,wt=E.tagName;Q=i.isHTML(E.namespaceURI)||Q;var Wt=wt;if(!Q&&!E.prefix&&E.namespaceURI){for(var zt,Rt=0;Rt<Ie.length;Rt++)if(Ie.item(Rt).name==="xmlns"){zt=Ie.item(Rt).value;break}if(!zt)for(var ni=ge.length-1;ni>=0;ni--){var Qe=ge[ni];if(Qe.prefix===""&&Qe.namespace===E.namespaceURI){zt=Qe.namespace;break}}if(zt!==E.namespaceURI)for(var ni=ge.length-1;ni>=0;ni--){var Qe=ge[ni];if(Qe.namespace===E.namespaceURI){Qe.prefix&&(Wt=Qe.prefix+":"+wt);break}}}w.push("<",Wt);for(var ri=0;ri<nt;ri++){var Yt=Ie.item(ri);Yt.prefix=="xmlns"?ge.push({prefix:Yt.localName,namespace:Yt.value}):Yt.nodeName=="xmlns"&&ge.push({prefix:"",namespace:Yt.value})}for(var ri=0;ri<nt;ri++){var Yt=Ie.item(ri);if(St(Yt,Q,ge)){var Xt=Yt.prefix||"",Dt=Yt.namespaceURI;ii(w,Xt?"xmlns:"+Xt:"xmlns",Dt),ge.push({prefix:Xt,namespace:Dt})}$t(Yt,w,Q,ce,ge)}if(wt===Wt&&St(E,Q,ge)){var Xt=E.prefix||"",Dt=E.namespaceURI;ii(w,Xt?"xmlns:"+Xt:"xmlns",Dt),ge.push({prefix:Xt,namespace:Dt})}if(ut||Q&&!/^(?:meta|link|img|br|hr|input)$/i.test(wt)){if(w.push(">"),Q&&/^script$/i.test(wt))for(;ut;)ut.data?w.push(ut.data):$t(ut,w,Q,ce,ge.slice()),ut=ut.nextSibling;else for(;ut;)$t(ut,w,Q,ce,ge.slice()),ut=ut.nextSibling;w.push("</",Wt,">")}else w.push("/>");return;case D:case H:for(var ut=E.firstChild;ut;)$t(ut,w,Q,ce,ge.slice()),ut=ut.nextSibling;return;case S:return ii(w,E.name,E.value);case T:return w.push(E.data.replace(/[<&>]/g,oe));case b:return w.push("<![CDATA[",E.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>");case I:return w.push("<!--",E.data,"-->");case z:var je=E.publicId,Si=E.systemId;if(w.push("<!DOCTYPE ",E.name),je)w.push(" PUBLIC ",je),Si&&Si!="."&&w.push(" ",Si),w.push(">");else if(Si&&Si!=".")w.push(" SYSTEM ",Si,">");else{var Li=E.internalSubset;Li&&w.push(" [",Li,"]"),w.push(">")}return;case N:return w.push("<?",E.target," ",E.data,"?>");case y:return w.push("&",E.nodeName,";");default:w.push("??",E.nodeName)}}function Gi(E,w,Q){var ce;switch(w.nodeType){case g:ce=w.cloneNode(!1),ce.ownerDocument=E;case H:break;case S:Q=!0;break}if(ce||(ce=w.cloneNode(!1)),ce.ownerDocument=E,ce.parentNode=null,Q)for(var ge=w.firstChild;ge;)ce.appendChild(Gi(E,ge,Q)),ge=ge.nextSibling;return ce}function Ut(E,w,Q){var ce=new w.constructor;for(var ge in w)if(Object.prototype.hasOwnProperty.call(w,ge)){var Ie=w[ge];typeof Ie!="object"&&Ie!=ce[ge]&&(ce[ge]=Ie)}switch(w.childNodes&&(ce.childNodes=new V),ce.ownerDocument=E,ce.nodeType){case g:var nt=w.attributes,wt=ce.attributes=new $,Wt=nt.length;wt._ownerElement=ce;for(var zt=0;zt<Wt;zt++)ce.setAttributeNode(Ut(E,nt.item(zt),!0));break;case S:Q=!0}if(Q)for(var Rt=w.firstChild;Rt;)ce.appendChild(Ut(E,Rt,Q)),Rt=Rt.nextSibling;return ce}function Wi(E,w,Q){E[w]=Q}try{if(Object.defineProperty){let E=function(w){switch(w.nodeType){case g:case H:var Q=[];for(w=w.firstChild;w;)w.nodeType!==7&&w.nodeType!==8&&Q.push(E(w)),w=w.nextSibling;return Q.join("");default:return w.nodeValue}};Object.defineProperty(M.prototype,"length",{get:function(){return q(this),this.$$length}}),Object.defineProperty(J.prototype,"textContent",{get:function(){return E(this)},set:function(w){switch(this.nodeType){case g:case H:for(;this.firstChild;)this.removeChild(this.firstChild);(w||String(w))&&this.appendChild(this.ownerDocument.createTextNode(w));break;default:this.data=w,this.value=w,this.nodeValue=w}}}),Wi=function(w,Q,ce){w["$$"+Q]=ce}}}catch{}return Ki.DocumentType=pe,Ki.DOMException=L,Ki.DOMImplementation=ue,Ki.Element=Xe,Ki.Node=J,Ki.NodeList=V,Ki.XMLSerializer=ui,Ki}var Ur={},Ao={},Uc;function T3(){return Uc||(Uc=1,(function(r){var e=Ea().freeze;r.XML_ENTITIES=e({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),r.HTML_ENTITIES=e({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
24
+ `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),r.entityMap=r.HTML_ENTITIES})(Ao)),Ao}var Vs={},zc;function b3(){if(zc)return Vs;zc=1;var r=Ea().NAMESPACE,e=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=new RegExp("[\\-\\.0-9"+e.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),n=new RegExp("^"+e.source+i.source+"*(?::"+e.source+i.source+"*)?$"),s=0,a=1,o=2,l=3,c=4,d=5,m=6,g=7;function S(C,k){this.message=C,this.locator=k,Error.captureStackTrace&&Error.captureStackTrace(this,S)}S.prototype=new Error,S.prototype.name=S.name;function T(){}T.prototype={parse:function(C,k,O){var j=this.domBuilder;j.startDocument(),z(k,k={}),b(C,k,O,j,this.errorHandler),j.endDocument()}};function b(C,k,O,j,L){function V(me){if(me>65535){me-=65536;var Pe=55296+(me>>10),Xe=56320+(me&1023);return String.fromCharCode(Pe,Xe)}else return String.fromCharCode(me)}function M(me){var Pe=me.slice(1,-1);return Object.hasOwnProperty.call(O,Pe)?O[Pe]:Pe.charAt(0)==="#"?V(parseInt(Pe.substr(1).replace("x","0x"))):(L.error("entity not found:"+me),me)}function q(me){if(me>Z){var Pe=C.substring(Z,me).replace(/&#?\w+;/g,M);ue&&$(Z),j.characters(Pe,0,me-Z),Z=me}}function $(me,Pe){for(;me>=R&&(Pe=ee.exec(C));)X=Pe.index,R=X+Pe[0].length,ue.lineNumber++;ue.columnNumber=me-X+1}for(var X=0,R=0,ee=/.*(?:\r\n?|\n)|.*$/g,ue=j.locator,J=[{currentNSMap:k}],oe={},Z=0;;){try{var se=C.indexOf("<",Z);if(se<0){if(!C.substr(Z).match(/^\s*$/)){var _e=j.doc,ke=_e.createTextNode(C.substr(Z));_e.appendChild(ke),j.currentElement=ke}return}switch(se>Z&&q(se),C.charAt(se+1)){case"/":var We=C.indexOf(">",se+3),De=C.substring(se+2,We).replace(/[ \t\n\r]+$/g,""),Ne=J.pop();We<0?(De=C.substring(se+2).replace(/[\s<].*/,""),L.error("end tag name: "+De+" is not complete:"+Ne.tagName),We=se+1+De.length):De.match(/\s</)&&(De=De.replace(/[\s<].*/,""),L.error("end tag name: "+De+" maybe not complete"),We=se+1+De.length);var Ve=Ne.localNSMap,et=Ne.tagName==De,Re=et||Ne.tagName&&Ne.tagName.toLowerCase()==De.toLowerCase();if(Re){if(j.endElement(Ne.uri,Ne.localName,De),Ve)for(var Ke in Ve)Object.prototype.hasOwnProperty.call(Ve,Ke)&&j.endPrefixMapping(Ke);et||L.fatalError("end tag name: "+De+" is not match the current start tagName:"+Ne.tagName)}else J.push(Ne);We++;break;case"?":ue&&$(se),We=U(C,se,j);break;case"!":ue&&$(se),We=H(C,se,j,L);break;default:ue&&$(se);var He=new B,Fe=J[J.length-1].currentNSMap,We=x(C,se,He,Fe,M,L),kt=He.length;if(!He.closed&&D(C,We,He.tagName,oe)&&(He.closed=!0,O.nbsp||L.warning("unclosed xml attribute")),ue&&kt){for(var it=y(ue,{}),Ae=0;Ae<kt;Ae++){var be=He[Ae];$(be.offset),be.locator=y(ue,{})}j.locator=it,N(He,j,Fe)&&J.push(He),j.locator=ue}else N(He,j,Fe)&&J.push(He);r.isHTML(He.uri)&&!He.closed?We=I(C,We,He.tagName,M,j):We++}}catch(me){if(me instanceof S)throw me;L.error("element parse error: "+me),We=-1}We>Z?Z=We:q(Math.max(se,Z)+1)}}function y(C,k){return k.lineNumber=C.lineNumber,k.columnNumber=C.columnNumber,k}function x(C,k,O,j,L,V){function M(ue,J,oe){O.attributeNames.hasOwnProperty(ue)&&V.fatalError("Attribute "+ue+" redefined"),O.addValue(ue,J.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,L),oe)}for(var q,$,X=++k,R=s;;){var ee=C.charAt(X);switch(ee){case"=":if(R===a)q=C.slice(k,X),R=l;else if(R===o)R=l;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(R===l||R===a)if(R===a&&(V.warning('attribute value must after "="'),q=C.slice(k,X)),k=X+1,X=C.indexOf(ee,k),X>0)$=C.slice(k,X),M(q,$,k-1),R=d;else throw new Error("attribute value no end '"+ee+"' match");else if(R==c)$=C.slice(k,X),M(q,$,k),V.warning('attribute "'+q+'" missed start quot('+ee+")!!"),k=X+1,R=d;else throw new Error('attribute value must after "="');break;case"/":switch(R){case s:O.setTagName(C.slice(k,X));case d:case m:case g:R=g,O.closed=!0;case c:case a:break;case o:O.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return V.error("unexpected end of input"),R==s&&O.setTagName(C.slice(k,X)),X;case">":switch(R){case s:O.setTagName(C.slice(k,X));case d:case m:case g:break;case c:case a:$=C.slice(k,X),$.slice(-1)==="/"&&(O.closed=!0,$=$.slice(0,-1));case o:R===o&&($=q),R==c?(V.warning('attribute "'+$+'" missed quot(")!'),M(q,$,k)):((!r.isHTML(j[""])||!$.match(/^(?:disabled|checked|selected)$/i))&&V.warning('attribute "'+$+'" missed value!! "'+$+'" instead!!'),M($,$,k));break;case l:throw new Error("attribute value missed!!")}return X;case"€":ee=" ";default:if(ee<=" ")switch(R){case s:O.setTagName(C.slice(k,X)),R=m;break;case a:q=C.slice(k,X),R=o;break;case c:var $=C.slice(k,X);V.warning('attribute "'+$+'" missed quot(")!!'),M(q,$,k);case d:R=m;break}else switch(R){case o:O.tagName,(!r.isHTML(j[""])||!q.match(/^(?:disabled|checked|selected)$/i))&&V.warning('attribute "'+q+'" missed value!! "'+q+'" instead2!!'),M(q,q,k),k=X,R=a;break;case d:V.warning('attribute space is required"'+q+'"!!');case m:R=a,k=X;break;case l:R=c,k=X;break;case g:throw new Error("elements closed character '/' and '>' must be connected to")}}X++}}function N(C,k,O){for(var j=C.tagName,L=null,ee=C.length;ee--;){var V=C[ee],M=V.qName,q=V.value,ue=M.indexOf(":");if(ue>0)var $=V.prefix=M.slice(0,ue),X=M.slice(ue+1),R=$==="xmlns"&&X;else X=M,$=null,R=M==="xmlns"&&"";V.localName=X,R!==!1&&(L==null&&(L={},z(O,O={})),O[R]=L[R]=q,V.uri=r.XMLNS,k.startPrefixMapping(R,q))}for(var ee=C.length;ee--;){V=C[ee];var $=V.prefix;$&&($==="xml"&&(V.uri=r.XML),$!=="xmlns"&&(V.uri=O[$||""]))}var ue=j.indexOf(":");ue>0?($=C.prefix=j.slice(0,ue),X=C.localName=j.slice(ue+1)):($=null,X=C.localName=j);var J=C.uri=O[$||""];if(k.startElement(J,X,j,C),C.closed){if(k.endElement(J,X,j),L)for($ in L)Object.prototype.hasOwnProperty.call(L,$)&&k.endPrefixMapping($)}else return C.currentNSMap=O,C.localNSMap=L,!0}function I(C,k,O,j,L){if(/^(?:script|textarea)$/i.test(O)){var V=C.indexOf("</"+O+">",k),M=C.substring(k+1,V);if(/[&<]/.test(M))return/^script$/i.test(O)?(L.characters(M,0,M.length),V):(M=M.replace(/&#?\w+;/g,j),L.characters(M,0,M.length),V)}return k+1}function D(C,k,O,j){var L=j[O];return L==null&&(L=C.lastIndexOf("</"+O+">"),L<k&&(L=C.lastIndexOf("</"+O)),j[O]=L),L<k}function z(C,k){for(var O in C)Object.prototype.hasOwnProperty.call(C,O)&&(k[O]=C[O])}function H(C,k,O,j){var L=C.charAt(k+2);switch(L){case"-":if(C.charAt(k+3)==="-"){var V=C.indexOf("-->",k+4);return V>k?(O.comment(C,k+4,V-k-4),V+3):(j.error("Unclosed comment"),-1)}else return-1;default:if(C.substr(k+3,6)=="CDATA["){var V=C.indexOf("]]>",k+9);return O.startCDATA(),O.characters(C,k+9,V-k-9),O.endCDATA(),V+3}var M=G(C,k),q=M.length;if(q>1&&/!doctype/i.test(M[0][0])){var $=M[1][0],X=!1,R=!1;q>3&&(/^public$/i.test(M[2][0])?(X=M[3][0],R=q>4&&M[4][0]):/^system$/i.test(M[2][0])&&(R=M[3][0]));var ee=M[q-1];return O.startDTD($,X,R),O.endDTD(),ee.index+ee[0].length}}return-1}function U(C,k,O){var j=C.indexOf("?>",k);if(j){var L=C.substring(k,j).match(/^<\?(\S*)\s*([\s\S]*?)$/);return L?(L[0].length,O.processingInstruction(L[1],L[2]),j+2):-1}return-1}function B(){this.attributeNames={}}B.prototype={setTagName:function(C){if(!n.test(C))throw new Error("invalid tagName:"+C);this.tagName=C},addValue:function(C,k,O){if(!n.test(C))throw new Error("invalid attribute:"+C);this.attributeNames[C]=this.length,this[this.length++]={qName:C,value:k,offset:O}},length:0,getLocalName:function(C){return this[C].localName},getLocator:function(C){return this[C].locator},getQName:function(C){return this[C].qName},getURI:function(C){return this[C].uri},getValue:function(C){return this[C].value}};function G(C,k){var O,j=[],L=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(L.lastIndex=k,L.exec(C);O=L.exec(C);)if(j.push(O),O[1])return j}return Vs.XMLReader=T,Vs.ParseError=S,Vs}var Hc;function C3(){if(Hc)return Ur;Hc=1;var r=Ea(),e=Lh(),i=T3(),n=b3(),s=e.DOMImplementation,a=r.NAMESPACE,o=n.ParseError,l=n.XMLReader;function c(x){return x.replace(/\r[\n\u0085]/g,`
25
25
  `).replace(/[\r\u0085\u2028]/g,`
26
26
  `)}function d(x){this.options=x||{locator:{}}}d.prototype.parseFromString=function(x,N){var I=this.options,D=new l,z=I.domBuilder||new g,H=I.errorHandler,U=I.locator,B=I.xmlns||{},G=/\/x?html?$/.test(N),C=G?i.HTML_ENTITIES:i.XML_ENTITIES;U&&z.setDocumentLocator(U),D.errorHandler=m(H,z,U),D.domBuilder=I.domBuilder||z,G&&(B[""]=a.HTML),B.xml=B.xml||a.XML;var k=I.normalizeLineEndings||c;return x&&typeof x=="string"?D.parse(k(x),B,C):D.errorHandler.error("invalid doc source"),z.doc};function m(x,N,I){if(!x){if(N instanceof g)return N;x=N}var D={},z=x instanceof Function;I=I||{};function H(U){var B=x[U];!B&&z&&(B=x.length==2?function(G){x(U,G)}:x),D[U]=B&&function(G){B("[xmldom "+U+"] "+G+T(I))}||function(){}}return H("warning"),H("error"),H("fatalError"),D}function g(){this.cdata=!1}function S(x,N){N.lineNumber=x.lineNumber,N.columnNumber=x.columnNumber}g.prototype={startDocument:function(){this.doc=new s().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(x,N,I,D){var z=this.doc,H=z.createElementNS(x,I||N),U=D.length;y(this,H),this.currentElement=H,this.locator&&S(this.locator,H);for(var B=0;B<U;B++){var x=D.getURI(B),G=D.getValue(B),I=D.getQName(B),C=z.createAttributeNS(x,I);this.locator&&S(D.getLocator(B),C),C.value=C.nodeValue=G,H.setAttributeNode(C)}},endElement:function(x,N,I){var D=this.currentElement;D.tagName,this.currentElement=D.parentNode},startPrefixMapping:function(x,N){},endPrefixMapping:function(x){},processingInstruction:function(x,N){var I=this.doc.createProcessingInstruction(x,N);this.locator&&S(this.locator,I),y(this,I)},ignorableWhitespace:function(x,N,I){},characters:function(x,N,I){if(x=b.apply(this,arguments),x){if(this.cdata)var D=this.doc.createCDATASection(x);else var D=this.doc.createTextNode(x);this.currentElement?this.currentElement.appendChild(D):/^\s*$/.test(x)&&this.doc.appendChild(D),this.locator&&S(this.locator,D)}},skippedEntity:function(x){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(x){(this.locator=x)&&(x.lineNumber=0)},comment:function(x,N,I){x=b.apply(this,arguments);var D=this.doc.createComment(x);this.locator&&S(this.locator,D),y(this,D)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(x,N,I){var D=this.doc.implementation;if(D&&D.createDocumentType){var z=D.createDocumentType(x,N,I);this.locator&&S(this.locator,z),y(this,z),this.doc.doctype=z}},warning:function(x){console.warn("[xmldom warning] "+x,T(this.locator))},error:function(x){console.error("[xmldom error] "+x,T(this.locator))},fatalError:function(x){throw new o(x,this.locator)}};function T(x){if(x)return`
27
27
  @`+(x.systemId||"")+"#[line:"+x.lineNumber+",col:"+x.columnNumber+"]"}function b(x,N,I){return typeof x=="string"?x.substr(N,I):x.length>=N+I||N?new java.lang.String(x,N,I)+"":x}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(x){g.prototype[x]=function(){return null}});function y(x,N){x.currentElement?x.currentElement.appendChild(N):x.doc.appendChild(N)}return Ur.__DOMHandler=g,Ur.normalizeLineEndings=c,Ur.DOMParser=d,Ur}var qc;function x3(){if(qc)return $r;qc=1;var r=Lh();return $r.DOMImplementation=r.DOMImplementation,$r.XMLSerializer=r.XMLSerializer,$r.DOMParser=C3().DOMParser,$r}var S3=x3();/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */const jc=r=>!!r&&typeof r=="object",Pt=(...r)=>r.reduce((e,i)=>(typeof i!="object"||Object.keys(i).forEach(n=>{Array.isArray(e[n])&&Array.isArray(i[n])?e[n]=e[n].concat(i[n]):jc(e[n])&&jc(i[n])?e[n]=Pt(e[n],i[n]):e[n]=i[n]}),e),{}),Ph=r=>Object.keys(r).map(e=>r[e]),E3=(r,e)=>{const i=[];for(let n=r;n<e;n++)i.push(n);return i},sr=r=>r.reduce((e,i)=>e.concat(i),[]),Mh=r=>{if(!r.length)return[];const e=[];for(let i=0;i<r.length;i++)e.push(r[i]);return e},k3=(r,e)=>r.reduce((i,n,s)=>(n[e]&&i.push(s),i),[]),w3=(r,e)=>Ph(r.reduce((i,n)=>(n.forEach(s=>{i[e(s)]=s}),i),{}));var ar={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"};const is=({baseUrl:r="",source:e="",range:i="",indexRange:n=""})=>{const s={uri:e,resolvedUri:Sa(r||"",e)};if(i||n){const o=(i||n).split("-");let l=Y.BigInt?Y.BigInt(o[0]):parseInt(o[0],10),c=Y.BigInt?Y.BigInt(o[1]):parseInt(o[1],10);l<Number.MAX_SAFE_INTEGER&&typeof l=="bigint"&&(l=Number(l)),c<Number.MAX_SAFE_INTEGER&&typeof c=="bigint"&&(c=Number(c));let d;typeof c=="bigint"||typeof l=="bigint"?d=Y.BigInt(c)-Y.BigInt(l)+Y.BigInt(1):d=c-l+1,typeof d=="bigint"&&d<Number.MAX_SAFE_INTEGER&&(d=Number(d)),s.byterange={length:d,offset:l}}return s},D3=r=>{let e;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=Y.BigInt(r.offset)+Y.BigInt(r.length)-Y.BigInt(1):e=r.offset+r.length-1,`${r.offset}-${e}`},Gc=r=>(r&&typeof r!="number"&&(r=parseInt(r,10)),isNaN(r)?null:r),A3={static(r){const{duration:e,timescale:i=1,sourceDuration:n,periodDuration:s}=r,a=Gc(r.endNumber),o=e/i;return typeof a=="number"?{start:0,end:a}:typeof s=="number"?{start:0,end:s/o}:{start:0,end:n/o}},dynamic(r){const{NOW:e,clientOffset:i,availabilityStartTime:n,timescale:s=1,duration:a,periodStart:o=0,minimumUpdatePeriod:l=0,timeShiftBufferDepth:c=1/0}=r,d=Gc(r.endNumber),m=(e+i)/1e3,g=n+o,T=m+l-g,b=Math.ceil(T*s/a),y=Math.floor((m-g-c)*s/a),x=Math.floor((m-g)*s/a);return{start:Math.max(0,y),end:typeof d=="number"?d:Math.min(b,x)}}},I3=r=>e=>{const{duration:i,timescale:n=1,periodStart:s,startNumber:a=1}=r;return{number:a+e,duration:i/n,timeline:s,time:e*i}},Bl=r=>{const{type:e,duration:i,timescale:n=1,periodDuration:s,sourceDuration:a}=r,{start:o,end:l}=A3[e](r),c=E3(o,l).map(I3(r));if(e==="static"){const d=c.length-1,m=typeof s=="number"?s:a;c[d].duration=m-i/n*d}return c},Rh=r=>{const{baseUrl:e,initialization:i={},sourceDuration:n,indexRange:s="",periodStart:a,presentationTime:o,number:l=0,duration:c}=r;if(!e)throw new Error(ar.NO_BASE_URL);const d=is({baseUrl:e,source:i.sourceURL,range:i.range}),m=is({baseUrl:e,source:e,indexRange:s});if(m.map=d,c){const g=Bl(r);g.length&&(m.duration=g[0].duration,m.timeline=g[0].timeline)}else n&&(m.duration=n,m.timeline=a);return m.presentationTime=o||a,m.number=l,[m]},Ll=(r,e,i)=>{const n=r.sidx.map?r.sidx.map:null,s=r.sidx.duration,a=r.timeline||0,o=r.sidx.byterange,l=o.offset+o.length,c=e.timescale,d=e.references.filter(x=>x.referenceType!==1),m=[],g=r.endList?"static":"dynamic",S=r.sidx.timeline;let T=S,b=r.mediaSequence||0,y;typeof e.firstOffset=="bigint"?y=Y.BigInt(l)+e.firstOffset:y=l+e.firstOffset;for(let x=0;x<d.length;x++){const N=e.references[x],I=N.referencedSize,D=N.subsegmentDuration;let z;typeof y=="bigint"?z=y+Y.BigInt(I)-Y.BigInt(1):z=y+I-1;const H=`${y}-${z}`,B=Rh({baseUrl:i,timescale:c,timeline:a,periodStart:S,presentationTime:T,number:b,duration:D,sourceDuration:s,indexRange:H,type:g})[0];n&&(B.map=n),m.push(B),typeof y=="bigint"?y+=Y.BigInt(I):y+=I,T+=D/c,b++}return r.segments=m,r},N3=["AUDIO","SUBTITLES"],O3=1/60,Vh=r=>w3(r,({timeline:e})=>e).sort((e,i)=>e.timeline>i.timeline?1:-1),B3=(r,e)=>{for(let i=0;i<r.length;i++)if(r[i].attributes.NAME===e)return r[i];return null},Wc=r=>{let e=[];return _3(r,N3,(i,n,s,a)=>{e=e.concat(i.playlists||[])}),e},Yc=({playlist:r,mediaSequence:e})=>{r.mediaSequence=e,r.segments.forEach((i,n)=>{i.number=r.mediaSequence+n})},L3=({oldPlaylists:r,newPlaylists:e,timelineStarts:i})=>{e.forEach(n=>{n.discontinuitySequence=i.findIndex(function({timeline:c}){return c===n.timeline});const s=B3(r,n.attributes.NAME);if(!s||n.sidx)return;const a=n.segments[0],o=s.segments.findIndex(function(c){return Math.abs(c.presentationTime-a.presentationTime)<O3});if(o===-1){Yc({playlist:n,mediaSequence:s.mediaSequence+s.segments.length}),n.segments[0].discontinuity=!0,n.discontinuityStarts.unshift(0),(!s.segments.length&&n.timeline>s.timeline||s.segments.length&&n.timeline>s.segments[s.segments.length-1].timeline)&&n.discontinuitySequence--;return}s.segments[o].discontinuity&&!a.discontinuity&&(a.discontinuity=!0,n.discontinuityStarts.unshift(0),n.discontinuitySequence--),Yc({playlist:n,mediaSequence:s.segments[o].number})})},P3=({oldManifest:r,newManifest:e})=>{const i=r.playlists.concat(Wc(r)),n=e.playlists.concat(Wc(e));return e.timelineStarts=Vh([r.timelineStarts,e.timelineStarts]),L3({oldPlaylists:i,newPlaylists:n,timelineStarts:e.timelineStarts}),e},ka=r=>r&&r.uri+"-"+D3(r.byterange),Io=r=>{const e=r.reduce(function(n,s){return n[s.attributes.baseUrl]||(n[s.attributes.baseUrl]=[]),n[s.attributes.baseUrl].push(s),n},{});let i=[];return Object.values(e).forEach(n=>{const s=Ph(n.reduce((a,o)=>{const l=o.attributes.id+(o.attributes.lang||"");return a[l]?(o.segments&&(o.segments[0]&&(o.segments[0].discontinuity=!0),a[l].segments.push(...o.segments)),o.attributes.contentProtection&&(a[l].attributes.contentProtection=o.attributes.contentProtection)):(a[l]=o,a[l].attributes.timelineStarts=[]),a[l].attributes.timelineStarts.push({start:o.attributes.periodStart,timeline:o.attributes.periodStart}),a},{}));i=i.concat(s)}),i.map(n=>(n.discontinuityStarts=k3(n.segments||[],"discontinuity"),n))},Pl=(r,e)=>{const i=ka(r.sidx),n=i&&e[i]&&e[i].sidx;return n&&Ll(r,n,r.sidx.resolvedUri),r},M3=(r,e={})=>{if(!Object.keys(e).length)return r;for(const i in r)r[i]=Pl(r[i],e);return r},R3=({attributes:r,segments:e,sidx:i,mediaSequence:n,discontinuitySequence:s,discontinuityStarts:a},o)=>{const l={attributes:{NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs,"PROGRAM-ID":1},uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,discontinuitySequence:s,discontinuityStarts:a,timelineStarts:r.timelineStarts,mediaSequence:n,segments:e};return r.contentProtection&&(l.contentProtection=r.contentProtection),r.serviceLocation&&(l.attributes.serviceLocation=r.serviceLocation),i&&(l.sidx=i),o&&(l.attributes.AUDIO="audio",l.attributes.SUBTITLES="subs"),l},V3=({attributes:r,segments:e,mediaSequence:i,discontinuityStarts:n,discontinuitySequence:s})=>{typeof e>"u"&&(e=[{uri:r.baseUrl,timeline:r.periodStart,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}],r.duration=r.sourceDuration);const a={NAME:r.id,BANDWIDTH:r.bandwidth,"PROGRAM-ID":1};r.codecs&&(a.CODECS=r.codecs);const o={attributes:a,uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,timelineStarts:r.timelineStarts,discontinuityStarts:n,discontinuitySequence:s,mediaSequence:i,segments:e};return r.serviceLocation&&(o.attributes.serviceLocation=r.serviceLocation),o},F3=(r,e={},i=!1)=>{let n;const s=r.reduce((a,o)=>{const l=o.attributes.role&&o.attributes.role.value||"",c=o.attributes.lang||"";let d=o.attributes.label||"main";if(c&&!o.attributes.label){const g=l?` (${l})`:"";d=`${o.attributes.lang}${g}`}a[d]||(a[d]={language:c,autoselect:!0,default:l==="main",playlists:[],uri:""});const m=Pl(R3(o,i),e);return a[d].playlists.push(m),typeof n>"u"&&l==="main"&&(n=o,n.default=!0),a},{});if(!n){const a=Object.keys(s)[0];s[a].default=!0}return s},$3=(r,e={})=>r.reduce((i,n)=>{const s=n.attributes.label||n.attributes.lang||"text",a=n.attributes.lang||"und";return i[s]||(i[s]={language:a,default:!1,autoselect:!1,playlists:[],uri:""}),i[s].playlists.push(Pl(V3(n),e)),i},{}),U3=r=>r.reduce((e,i)=>(i&&i.forEach(n=>{const{channel:s,language:a}=n;e[a]={autoselect:!1,default:!1,instreamId:s,language:a},n.hasOwnProperty("aspectRatio")&&(e[a].aspectRatio=n.aspectRatio),n.hasOwnProperty("easyReader")&&(e[a].easyReader=n.easyReader),n.hasOwnProperty("3D")&&(e[a]["3D"]=n["3D"])}),e),{}),z3=({attributes:r,segments:e,sidx:i,discontinuityStarts:n})=>{const s={attributes:{NAME:r.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:r.width,height:r.height},CODECS:r.codecs,BANDWIDTH:r.bandwidth,"PROGRAM-ID":1},uri:"",endList:r.type==="static",timeline:r.periodStart,resolvedUri:r.baseUrl||"",targetDuration:r.duration,discontinuityStarts:n,timelineStarts:r.timelineStarts,segments:e};return r.frameRate&&(s.attributes["FRAME-RATE"]=r.frameRate),r.contentProtection&&(s.contentProtection=r.contentProtection),r.serviceLocation&&(s.attributes.serviceLocation=r.serviceLocation),i&&(s.sidx=i),s},H3=({attributes:r})=>r.mimeType==="video/mp4"||r.mimeType==="video/webm"||r.contentType==="video",q3=({attributes:r})=>r.mimeType==="audio/mp4"||r.mimeType==="audio/webm"||r.contentType==="audio",j3=({attributes:r})=>r.mimeType==="text/vtt"||r.contentType==="text",G3=(r,e)=>{r.forEach(i=>{i.mediaSequence=0,i.discontinuitySequence=e.findIndex(function({timeline:n}){return n===i.timeline}),i.segments&&i.segments.forEach((n,s)=>{n.number=s})})},Xc=r=>r?Object.keys(r).reduce((e,i)=>{const n=r[i];return e.concat(n.playlists)},[]):[],W3=({dashPlaylists:r,locations:e,contentSteering:i,sidxMapping:n={},previousManifest:s,eventStream:a})=>{if(!r.length)return{};const{sourceDuration:o,type:l,suggestedPresentationDelay:c,minimumUpdatePeriod:d}=r[0].attributes,m=Io(r.filter(H3)).map(z3),g=Io(r.filter(q3)),S=Io(r.filter(j3)),T=r.map(z=>z.attributes.captionServices).filter(Boolean),b={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:"",duration:o,playlists:M3(m,n)};d>=0&&(b.minimumUpdatePeriod=d*1e3),e&&(b.locations=e),i&&(b.contentSteering=i),l==="dynamic"&&(b.suggestedPresentationDelay=c),a&&a.length>0&&(b.eventStream=a);const y=b.playlists.length===0,x=g.length?F3(g,n,y):null,N=S.length?$3(S,n):null,I=m.concat(Xc(x),Xc(N)),D=I.map(({timelineStarts:z})=>z);return b.timelineStarts=Vh(D),G3(I,b.timelineStarts),x&&(b.mediaGroups.AUDIO.audio=x),N&&(b.mediaGroups.SUBTITLES.subs=N),T.length&&(b.mediaGroups["CLOSED-CAPTIONS"].cc=U3(T)),s?P3({oldManifest:s,newManifest:b}):b},Y3=(r,e,i)=>{const{NOW:n,clientOffset:s,availabilityStartTime:a,timescale:o=1,periodStart:l=0,minimumUpdatePeriod:c=0}=r,d=(n+s)/1e3,m=a+l,S=d+c-m;return Math.ceil((S*o-e)/i)},Fh=(r,e)=>{const{type:i,minimumUpdatePeriod:n=0,media:s="",sourceDuration:a,timescale:o=1,startNumber:l=1,periodStart:c}=r,d=[];let m=-1;for(let g=0;g<e.length;g++){const S=e[g],T=S.d,b=S.r||0,y=S.t||0;m<0&&(m=y),y&&y>m&&(m=y);let x;if(b<0){const D=g+1;D===e.length?i==="dynamic"&&n>0&&s.indexOf("$Number$")>0?x=Y3(r,m,T):x=(a*o-m)/T:x=(e[D].t-m)/T}else x=b+1;const N=l+d.length+x;let I=l+d.length;for(;I<N;)d.push({number:I,duration:T/o,time:m,timeline:c}),m+=T,I++}return d},X3=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,K3=r=>(e,i,n,s)=>{if(e==="$$")return"$";if(typeof r[i]>"u")return e;const a=""+r[i];return i==="RepresentationID"||(n?s=parseInt(s,10):s=1,a.length>=s)?a:`${new Array(s-a.length+1).join("0")}${a}`},Kc=(r,e)=>r.replace(X3,K3(e)),Q3=(r,e)=>!r.duration&&!e?[{number:r.startNumber||1,duration:r.sourceDuration,time:0,timeline:r.periodStart}]:r.duration?Bl(r):Fh(r,e),Z3=(r,e)=>{const i={RepresentationID:r.id,Bandwidth:r.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=r,s=is({baseUrl:r.baseUrl,source:Kc(n.sourceURL,i),range:n.range});return Q3(r,e).map(o=>{i.Number=o.number,i.Time=o.time;const l=Kc(r.media||"",i),c=r.timescale||1,d=r.presentationTimeOffset||0,m=r.periodStart+(o.time-d)/c;return{uri:l,timeline:o.timeline,duration:o.duration,resolvedUri:Sa(r.baseUrl||"",l),map:s,number:o.number,presentationTime:m}})},J3=(r,e)=>{const{baseUrl:i,initialization:n={}}=r,s=is({baseUrl:i,source:n.sourceURL,range:n.range}),a=is({baseUrl:i,source:e.media,range:e.mediaRange});return a.map=s,a},eT=(r,e)=>{const{duration:i,segmentUrls:n=[],periodStart:s}=r;if(!i&&!e||i&&e)throw new Error(ar.SEGMENT_TIME_UNSPECIFIED);const a=n.map(c=>J3(r,c));let o;return i&&(o=Bl(r)),e&&(o=Fh(r,e)),o.map((c,d)=>{if(a[d]){const m=a[d],g=r.timescale||1,S=r.presentationTimeOffset||0;return m.timeline=c.timeline,m.duration=c.duration,m.number=c.number,m.presentationTime=s+(c.time-S)/g,m}}).filter(c=>c)},tT=({attributes:r,segmentInfo:e})=>{let i,n;e.template?(n=Z3,i=Pt(r,e.template)):e.base?(n=Rh,i=Pt(r,e.base)):e.list&&(n=eT,i=Pt(r,e.list));const s={attributes:r};if(!n)return s;const a=n(i,e.segmentTimeline);if(i.duration){const{duration:o,timescale:l=1}=i;i.duration=o/l}else a.length?i.duration=a.reduce((o,l)=>Math.max(o,Math.ceil(l.duration)),0):i.duration=0;return s.attributes=i,s.segments=a,e.base&&i.indexRange&&(s.sidx=a[0],s.segments=[]),s},iT=r=>r.map(tT),pt=(r,e)=>Mh(r.childNodes).filter(({tagName:i})=>i===e),os=r=>r.textContent.trim(),nT=r=>parseFloat(r.split("/").reduce((e,i)=>e/i)),Hn=r=>{const l=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(r);if(!l)return 0;const[c,d,m,g,S,T]=l.slice(1);return parseFloat(c||0)*31536e3+parseFloat(d||0)*2592e3+parseFloat(m||0)*86400+parseFloat(g||0)*3600+parseFloat(S||0)*60+parseFloat(T||0)},rT=r=>(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(r)&&(r+="Z"),Date.parse(r)),Qc={mediaPresentationDuration(r){return Hn(r)},availabilityStartTime(r){return rT(r)/1e3},minimumUpdatePeriod(r){return Hn(r)},suggestedPresentationDelay(r){return Hn(r)},type(r){return r},timeShiftBufferDepth(r){return Hn(r)},start(r){return Hn(r)},width(r){return parseInt(r,10)},height(r){return parseInt(r,10)},bandwidth(r){return parseInt(r,10)},frameRate(r){return nT(r)},startNumber(r){return parseInt(r,10)},timescale(r){return parseInt(r,10)},presentationTimeOffset(r){return parseInt(r,10)},duration(r){const e=parseInt(r,10);return isNaN(e)?Hn(r):e},d(r){return parseInt(r,10)},t(r){return parseInt(r,10)},r(r){return parseInt(r,10)},presentationTime(r){return parseInt(r,10)},DEFAULT(r){return r}},Et=r=>r&&r.attributes?Mh(r.attributes).reduce((e,i)=>{const n=Qc[i.name]||Qc.DEFAULT;return e[i.name]=n(i.value),e},{}):{},sT={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},wa=(r,e)=>e.length?sr(r.map(function(i){return e.map(function(n){const s=os(n),a=Sa(i.baseUrl,s),o=Pt(Et(n),{baseUrl:a});return a!==s&&!o.serviceLocation&&i.serviceLocation&&(o.serviceLocation=i.serviceLocation),o})})):r,Ml=r=>{const e=pt(r,"SegmentTemplate")[0],i=pt(r,"SegmentList")[0],n=i&&pt(i,"SegmentURL").map(g=>Pt({tag:"SegmentURL"},Et(g))),s=pt(r,"SegmentBase")[0],a=i||e,o=a&&pt(a,"SegmentTimeline")[0],l=i||s||e,c=l&&pt(l,"Initialization")[0],d=e&&Et(e);d&&c?d.initialization=c&&Et(c):d&&d.initialization&&(d.initialization={sourceURL:d.initialization});const m={template:d,segmentTimeline:o&&pt(o,"S").map(g=>Et(g)),list:i&&Pt(Et(i),{segmentUrls:n,initialization:Et(c)}),base:s&&Pt(Et(s),{initialization:Et(c)})};return Object.keys(m).forEach(g=>{m[g]||delete m[g]}),m},aT=(r,e,i)=>n=>{const s=pt(n,"BaseURL"),a=wa(e,s),o=Pt(r,Et(n)),l=Ml(n);return a.map(c=>({segmentInfo:Pt(i,l),attributes:Pt(o,c)}))},oT=r=>r.reduce((e,i)=>{const n=Et(i);n.schemeIdUri&&(n.schemeIdUri=n.schemeIdUri.toLowerCase());const s=sT[n.schemeIdUri];if(s){e[s]={attributes:n};const a=pt(i,"cenc:pssh")[0];if(a){const o=os(a);e[s].pssh=o&&Dh(o)}}return e},{}),lT=r=>{if(r.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(i=>{let n,s;return s=i,/^CC\d=/.test(i)?[n,s]=i.split("="):/^CC\d$/.test(i)&&(n=i),{channel:n,language:s}});if(r.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof r.value!="string"?[]:r.value.split(";")).map(i=>{const n={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(i)){const[s,a=""]=i.split("=");n.channel=s,n.language=i,a.split(",").forEach(o=>{const[l,c]=o.split(":");l==="lang"?n.language=c:l==="er"?n.easyReader=Number(c):l==="war"?n.aspectRatio=Number(c):l==="3D"&&(n["3D"]=Number(c))})}else n.language=i;return n.channel&&(n.channel="SERVICE"+n.channel),n})},uT=r=>sr(pt(r.node,"EventStream").map(e=>{const i=Et(e),n=i.schemeIdUri;return pt(e,"Event").map(s=>{const a=Et(s),o=a.presentationTime||0,l=i.timescale||1,c=a.duration||0,d=o/l+r.attributes.start;return{schemeIdUri:n,value:i.value,id:a.id,start:d,end:d+c/l,messageData:os(s)||a.messageData,contentEncoding:i.contentEncoding,presentationTimeOffset:i.presentationTimeOffset||0}})})),cT=(r,e,i)=>n=>{const s=Et(n),a=wa(e,pt(n,"BaseURL")),o=pt(n,"Role")[0],l={role:Et(o)};let c=Pt(r,s,l);const d=pt(n,"Accessibility")[0],m=lT(Et(d));m&&(c=Pt(c,{captionServices:m}));const g=pt(n,"Label")[0];if(g&&g.childNodes.length){const x=g.childNodes[0].nodeValue.trim();c=Pt(c,{label:x})}const S=oT(pt(n,"ContentProtection"));Object.keys(S).length&&(c=Pt(c,{contentProtection:S}));const T=Ml(n),b=pt(n,"Representation"),y=Pt(i,T);return sr(b.map(aT(c,a,y)))},dT=(r,e)=>(i,n)=>{const s=wa(e,pt(i.node,"BaseURL")),a=Pt(r,{periodStart:i.attributes.start});typeof i.attributes.duration=="number"&&(a.periodDuration=i.attributes.duration);const o=pt(i.node,"AdaptationSet"),l=Ml(i.node);return sr(o.map(cT(a,s,l)))},hT=(r,e)=>{if(r.length>1&&e({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"}),!r.length)return null;const i=Pt({serverURL:os(r[0])},Et(r[0]));return i.queryBeforeStart=i.queryBeforeStart==="true",i},fT=({attributes:r,priorPeriodAttributes:e,mpdType:i})=>typeof r.start=="number"?r.start:e&&typeof e.start=="number"&&typeof e.duration=="number"?e.start+e.duration:!e&&i==="static"?0:null,pT=(r,e={})=>{const{manifestUri:i="",NOW:n=Date.now(),clientOffset:s=0,eventHandler:a=function(){}}=e,o=pt(r,"Period");if(!o.length)throw new Error(ar.INVALID_NUMBER_OF_PERIOD);const l=pt(r,"Location"),c=Et(r),d=wa([{baseUrl:i}],pt(r,"BaseURL")),m=pt(r,"ContentSteering");c.type=c.type||"static",c.sourceDuration=c.mediaPresentationDuration||0,c.NOW=n,c.clientOffset=s,l.length&&(c.locations=l.map(os));const g=[];return o.forEach((S,T)=>{const b=Et(S),y=g[T-1];b.start=fT({attributes:b,priorPeriodAttributes:y?y.attributes:null,mpdType:c.type}),g.push({node:S,attributes:b})}),{locations:c.locations,contentSteeringInfo:hT(m,a),representationInfo:sr(g.map(dT(c,d))),eventStream:sr(g.map(uT))}},$h=r=>{if(r==="")throw new Error(ar.DASH_EMPTY_MANIFEST);const e=new S3.DOMParser;let i,n;try{i=e.parseFromString(r,"application/xml"),n=i&&i.documentElement.tagName==="MPD"?i.documentElement:null}catch{}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(ar.DASH_INVALID_XML);return n},mT=r=>{const e=pt(r,"UTCTiming")[0];if(!e)return null;const i=Et(e);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(ar.UNSUPPORTED_UTC_TIMING_SCHEME)}return i},gT=(r,e={})=>{const i=pT($h(r),e),n=iT(i.representationInfo);return W3({dashPlaylists:n,locations:i.locations,contentSteering:i.contentSteeringInfo,sidxMapping:e.sidxMapping,previousManifest:e.previousManifest,eventStream:i.eventStream})},vT=r=>mT($h(r));var No,Zc;function yT(){if(Zc)return No;Zc=1;var r=Math.pow(2,32),e=function(i){var n=new DataView(i.buffer,i.byteOffset,i.byteLength),s;return n.getBigUint64?(s=n.getBigUint64(0),s<Number.MAX_SAFE_INTEGER?Number(s):s):n.getUint32(0)*r+n.getUint32(4)};return No={getUint64:e,MAX_UINT32:r},No}var Oo,Jc;function _T(){if(Jc)return Oo;Jc=1;var r=yT().getUint64,e=function(i){var n=new DataView(i.buffer,i.byteOffset,i.byteLength),s={version:i[0],flags:new Uint8Array(i.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8)},a=12;s.version===0?(s.earliestPresentationTime=n.getUint32(a),s.firstOffset=n.getUint32(a+4),a+=8):(s.earliestPresentationTime=r(i.subarray(a)),s.firstOffset=r(i.subarray(a+8)),a+=16),a+=2;var o=n.getUint16(a);for(a+=2;o>0;a+=12,o--)s.references.push({referenceType:(i[a]&128)>>>7,referencedSize:n.getUint32(a)&2147483647,subsegmentDuration:n.getUint32(a+4),startsWithSap:!!(i[a+8]&128),sapType:(i[a+8]&112)>>>4,sapDeltaTime:n.getUint32(a+8)&268435455});return s};return Oo=e,Oo}var TT=_T();const bT=fr(TT);var CT=Le([73,68,51]),xT=function(e,i){i===void 0&&(i=0),e=Le(e);var n=e[i+5],s=e[i+6]<<21|e[i+7]<<14|e[i+8]<<7|e[i+9],a=(n&16)>>4;return a?s+20:s+10},Gr=function r(e,i){return i===void 0&&(i=0),e=Le(e),e.length-i<10||!ft(e,CT,{offset:i})?i:(i+=xT(e,i),r(e,i))},ed=function(e){return typeof e=="string"?Bh(e):e},ST=function(e){return Array.isArray(e)?e.map(function(i){return ed(i)}):[ed(e)]},ET=function r(e,i,n){n===void 0&&(n=!1),i=ST(i),e=Le(e);var s=[];if(!i.length)return s;for(var a=0;a<e.length;){var o=(e[a]<<24|e[a+1]<<16|e[a+2]<<8|e[a+3])>>>0,l=e.subarray(a+4,a+8);if(o===0)break;var c=a+o;if(c>e.length){if(n)break;c=e.length}var d=e.subarray(a+8,c);ft(l,i[0])&&(i.length===1?s.push(d):s.push.apply(s,r(d,i.slice(1),n))),a=c}return s},Fs={EBML:Le([26,69,223,163]),DocType:Le([66,130]),Segment:Le([24,83,128,103]),SegmentInfo:Le([21,73,169,102]),Tracks:Le([22,84,174,107]),Track:Le([174]),TrackNumber:Le([215]),DefaultDuration:Le([35,227,131]),TrackEntry:Le([174]),TrackType:Le([131]),FlagDefault:Le([136]),CodecID:Le([134]),CodecPrivate:Le([99,162]),VideoTrack:Le([224]),AudioTrack:Le([225]),Cluster:Le([31,67,182,117]),Timestamp:Le([231]),TimestampScale:Le([42,215,177]),BlockGroup:Le([160]),BlockDuration:Le([155]),Block:Le([161]),SimpleBlock:Le([163])},tl=[128,64,32,16,8,4,2,1],kT=function(e){for(var i=1,n=0;n<tl.length&&!(e&tl[n]);n++)i++;return i},ta=function(e,i,n,s){n===void 0&&(n=!0),s===void 0&&(s=!1);var a=kT(e[i]),o=e.subarray(i,i+a);return n&&(o=Array.prototype.slice.call(e,i,i+a),o[0]^=tl[a-1]),{length:a,value:g3(o,{signed:s}),bytes:o}},td=function r(e){return typeof e=="string"?e.match(/.{1,2}/g).map(function(i){return r(i)}):typeof e=="number"?v3(e):e},wT=function(e){return Array.isArray(e)?e.map(function(i){return td(i)}):[td(e)]},DT=function r(e,i,n){if(n>=i.length)return i.length;var s=ta(i,n,!1);if(ft(e.bytes,s.bytes))return n;var a=ta(i,n+s.length);return r(e,i,n+a.length+a.value+s.length)},id=function r(e,i){i=wT(i),e=Le(e);var n=[];if(!i.length)return n;for(var s=0;s<e.length;){var a=ta(e,s,!1),o=ta(e,s+a.length),l=s+a.length+o.length;o.value===127&&(o.value=DT(a,e,l),o.value!==e.length&&(o.value-=l));var c=l+o.value>e.length?e.length:l+o.value,d=e.subarray(l,c);ft(i[0],a.bytes)&&(i.length===1?n.push(d):n=n.concat(r(d,i.slice(1))));var m=a.length+o.length+d.length;s+=m}return n},AT=Le([0,0,0,1]),IT=Le([0,0,1]),NT=Le([0,0,3]),OT=function(e){for(var i=[],n=1;n<e.length-2;)ft(e.subarray(n,n+3),NT)&&(i.push(n+2),n++),n++;if(i.length===0)return e;var s=e.length-i.length,a=new Uint8Array(s),o=0;for(n=0;n<s;o++,n++)o===i[0]&&(o++,i.shift()),a[n]=e[o];return a},Uh=function(e,i,n,s){e=Le(e),n=[].concat(n);for(var a=0,o,l=0;a<e.length&&(l<s||o);){var c=void 0;if(ft(e.subarray(a),AT)?c=4:ft(e.subarray(a),IT)&&(c=3),!c){a++;continue}if(l++,o)return OT(e.subarray(o,a));var d=void 0;i==="h264"?d=e[a+c]&31:i==="h265"&&(d=e[a+c]>>1&63),n.indexOf(d)!==-1&&(o=a+c),a+=c+(i==="h264"?1:2)}return e.subarray(0,0)},BT=function(e,i,n){return Uh(e,"h264",i,n)},LT=function(e,i,n){return Uh(e,"h265",i,n)},Zt={webm:Le([119,101,98,109]),matroska:Le([109,97,116,114,111,115,107,97]),flac:Le([102,76,97,67]),ogg:Le([79,103,103,83]),ac3:Le([11,119]),riff:Le([82,73,70,70]),avi:Le([65,86,73]),wav:Le([87,65,86,69]),"3gp":Le([102,116,121,112,51,103]),mp4:Le([102,116,121,112]),fmp4:Le([115,116,121,112]),mov:Le([102,116,121,112,113,116]),moov:Le([109,111,111,118]),moof:Le([109,111,111,102])},or={aac:function(e){var i=Gr(e);return ft(e,[255,16],{offset:i,mask:[255,22]})},mp3:function(e){var i=Gr(e);return ft(e,[255,2],{offset:i,mask:[255,6]})},webm:function(e){var i=id(e,[Fs.EBML,Fs.DocType])[0];return ft(i,Zt.webm)},mkv:function(e){var i=id(e,[Fs.EBML,Fs.DocType])[0];return ft(i,Zt.matroska)},mp4:function(e){if(or["3gp"](e)||or.mov(e))return!1;if(ft(e,Zt.mp4,{offset:4})||ft(e,Zt.fmp4,{offset:4})||ft(e,Zt.moof,{offset:4})||ft(e,Zt.moov,{offset:4}))return!0},mov:function(e){return ft(e,Zt.mov,{offset:4})},"3gp":function(e){return ft(e,Zt["3gp"],{offset:4})},ac3:function(e){var i=Gr(e);return ft(e,Zt.ac3,{offset:i})},ts:function(e){if(e.length<189&&e.length>=1)return e[0]===71;for(var i=0;i+188<e.length&&i<188;){if(e[i]===71&&e[i+188]===71)return!0;i+=1}return!1},flac:function(e){var i=Gr(e);return ft(e,Zt.flac,{offset:i})},ogg:function(e){return ft(e,Zt.ogg)},avi:function(e){return ft(e,Zt.riff)&&ft(e,Zt.avi,{offset:8})},wav:function(e){return ft(e,Zt.riff)&&ft(e,Zt.wav,{offset:8})},h264:function(e){return BT(e,7,3).length},h265:function(e){return LT(e,[32,33],3).length}},il=Object.keys(or).filter(function(r){return r!=="ts"&&r!=="h264"&&r!=="h265"}).concat(["ts","h264","h265"]);il.forEach(function(r){var e=or[r];or[r]=function(i){return e(Le(i))}});var PT=or,Rl=function(e){e=Le(e);for(var i=0;i<il.length;i++){var n=il[i];if(PT[n](e))return n}return""},MT=function(e){return ET(e,["moof"]).length>0},Bo,nd;function RT(){if(nd)return Bo;nd=1;var r=9e4,e,i,n,s,a,o,l;return e=function(c){return c*r},i=function(c,d){return c*d},n=function(c){return c/r},s=function(c,d){return c/d},a=function(c,d){return e(s(c,d))},o=function(c,d){return i(n(c),d)},l=function(c,d,m){return n(m?c:c-d)},Bo={ONE_SECOND_IN_TS:r,secondsToVideoTs:e,secondsToAudioTs:i,videoTsToSeconds:n,audioTsToSeconds:s,audioTsToVideoTs:a,videoTsToAudioTs:o,metadataTsToSeconds:l},Bo}var An=RT();/**
@@ -34,7 +34,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
34
34
  * Includes vtt.js <https://github.com/mozilla/vtt.js>
35
35
  * Available under Apache License Version 2.0
36
36
  * <https://github.com/mozilla/vtt.js/blob/main/LICENSE>
37
- */var nl="8.23.7";const Ji={},yn=function(r,e){return Ji[r]=Ji[r]||[],e&&(Ji[r]=Ji[r].concat(e)),Ji[r]},VT=function(r,e){yn(r,e)},zh=function(r,e){const i=yn(r).indexOf(e);return i<=-1?!1:(Ji[r]=Ji[r].slice(),Ji[r].splice(i,1),!0)},FT=function(r,e){yn(r,[].concat(e).map(i=>{const n=(...s)=>(zh(r,n),i(...s));return n}))},ia={prefixed:!0},Ks=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],rd=Ks[0];let Wr;for(let r=0;r<Ks.length;r++)if(Ks[r][1]in Te){Wr=Ks[r];break}if(Wr){for(let r=0;r<Wr.length;r++)ia[rd[r]]=Wr[r];ia.prefixed=Wr[0]!==rd[0]}let si=[];const $T=(r,e,i)=>(n,s,a)=>{const o=e.levels[s],l=new RegExp(`^(${o})$`);let c=r;if(n!=="log"&&a.unshift(n.toUpperCase()+":"),i&&(c=`%c${r}`,a.unshift(i)),a.unshift(c+":"),si){si.push([].concat(a));const m=si.length-1e3;si.splice(0,m>0?m:0)}if(!Y.console)return;let d=Y.console[n];!d&&n==="debug"&&(d=Y.console.info||Y.console.log),!(!d||!o||!l.test(n))&&d[Array.isArray(a)?"apply":"call"](Y.console,a)};function rl(r,e=":",i=""){let n="info",s;function a(...o){s("log",n,o)}return s=$T(r,a,i),a.createLogger=(o,l,c)=>{const d=l!==void 0?l:e,m=c!==void 0?c:i,g=`${r} ${d} ${o}`;return rl(g,d,m)},a.createNewLogger=(o,l,c)=>rl(o,l,c),a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},a.level=o=>{if(typeof o=="string"){if(!a.levels.hasOwnProperty(o))throw new Error(`"${o}" in not a valid log level`);n=o}return n},a.history=()=>si?[].concat(si):[],a.history.filter=o=>(si||[]).filter(l=>new RegExp(`.*${o}.*`).test(l[0])),a.history.clear=()=>{si&&(si.length=0)},a.history.disable=()=>{si!==null&&(si.length=0,si=null)},a.history.enable=()=>{si===null&&(si=[])},a.error=(...o)=>s("error",n,o),a.warn=(...o)=>s("warn",n,o),a.debug=(...o)=>s("debug",n,o),a}const We=rl("VIDEOJS"),Hh=We.createLogger,UT=Object.prototype.toString,qh=function(r){return Hi(r)?Object.keys(r):[]};function Xn(r,e){qh(r).forEach(i=>e(r[i],i))}function jh(r,e,i=0){return qh(r).reduce((n,s)=>e(n,r[s],s),i)}function Hi(r){return!!r&&typeof r=="object"}function lr(r){return Hi(r)&&UT.call(r)==="[object Object]"&&r.constructor===Object}function lt(...r){const e={};return r.forEach(i=>{i&&Xn(i,(n,s)=>{if(!lr(n)){e[s]=n;return}lr(e[s])||(e[s]={}),e[s]=lt(e[s],n)})}),e}function Gh(r={}){const e=[];for(const i in r)if(r.hasOwnProperty(i)){const n=r[i];e.push(n)}return e}function Da(r,e,i,n=!0){const s=o=>Object.defineProperty(r,e,{value:o,enumerable:!0,writable:!0}),a={configurable:!0,enumerable:!0,get(){const o=i();return s(o),o}};return n&&(a.set=s),Object.defineProperty(r,e,a)}var zT=Object.freeze({__proto__:null,each:Xn,reduce:jh,isObject:Hi,isPlain:lr,merge:lt,values:Gh,defineLazyProperty:Da});let Vl=!1,Wh=null,Oi=!1,Yh,Xh=!1,Kn=!1,Qn=!1,qi=!1,Fl=null,Aa=null;const HT=!!(Y.cast&&Y.cast.framework&&Y.cast.framework.CastReceiverContext);let Kh=null,na=!1,Ia=!1,ra=!1,Na=!1,sa=!1,aa=!1,oa=!1;const ns=!!(pr()&&("ontouchstart"in Y||Y.navigator.maxTouchPoints||Y.DocumentTouch&&Y.document instanceof Y.DocumentTouch)),un=Y.navigator&&Y.navigator.userAgentData;un&&un.platform&&un.brands&&(Oi=un.platform==="Android",Kn=!!un.brands.find(r=>r.brand==="Microsoft Edge"),Qn=!!un.brands.find(r=>r.brand==="Chromium"),qi=!Kn&&Qn,Fl=Aa=(un.brands.find(r=>r.brand==="Chromium")||{}).version||null,Ia=un.platform==="Windows");if(!Qn){const r=Y.navigator&&Y.navigator.userAgent||"";Vl=/iPod/i.test(r),Wh=(function(){const e=r.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null})(),Oi=/Android/i.test(r),Yh=(function(){const e=r.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const i=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return i&&n?parseFloat(e[1]+"."+e[2]):i||null})(),Xh=/Firefox/i.test(r),Kn=/Edg/i.test(r),Qn=/Chrome/i.test(r)||/CriOS/i.test(r),qi=!Kn&&Qn,Fl=Aa=(function(){const e=r.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null})(),Kh=(function(){const e=/MSIE\s(\d+)\.\d/.exec(r);let i=e&&parseFloat(e[1]);return!i&&/Trident\/7.0/i.test(r)&&/rv:11.0/.test(r)&&(i=11),i})(),sa=/Tizen/i.test(r),aa=/Web0S/i.test(r),oa=sa||aa,na=/Safari/i.test(r)&&!qi&&!Oi&&!Kn&&!oa,Ia=/Windows/i.test(r),ra=/iPad/i.test(r)||na&&ns&&!/iPhone/i.test(r),Na=/iPhone/i.test(r)&&!ra}const qt=Na||ra||Vl,Oa=(na||qt)&&!qi;var Qh=Object.freeze({__proto__:null,get IS_IPOD(){return Vl},get IOS_VERSION(){return Wh},get IS_ANDROID(){return Oi},get ANDROID_VERSION(){return Yh},get IS_FIREFOX(){return Xh},get IS_EDGE(){return Kn},get IS_CHROMIUM(){return Qn},get IS_CHROME(){return qi},get CHROMIUM_VERSION(){return Fl},get CHROME_VERSION(){return Aa},IS_CHROMECAST_RECEIVER:HT,get IE_VERSION(){return Kh},get IS_SAFARI(){return na},get IS_WINDOWS(){return Ia},get IS_IPAD(){return ra},get IS_IPHONE(){return Na},get IS_TIZEN(){return sa},get IS_WEBOS(){return aa},get IS_SMART_TV(){return oa},TOUCH_ENABLED:ns,IS_IOS:qt,IS_ANY_SAFARI:Oa});function sd(r){return typeof r=="string"&&!!r.trim()}function qT(r){if(r.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function pr(){return Te===Y.document}function mr(r){return Hi(r)&&r.nodeType===1}function Zh(){try{return Y.parent!==Y.self}catch{return!0}}function Jh(r){return function(e,i){if(!sd(e))return Te[r](null);sd(i)&&(i=Te.querySelector(i));const n=mr(i)?i:Te;return n[r]&&n[r](e)}}function Me(r="div",e={},i={},n){const s=Te.createElement(r);return Object.getOwnPropertyNames(e).forEach(function(a){const o=e[a];a==="textContent"?Tn(s,o):(s[a]!==o||a==="tabIndex")&&(s[a]=o)}),Object.getOwnPropertyNames(i).forEach(function(a){s.setAttribute(a,i[a])}),n&&$l(s,n),s}function Tn(r,e){return typeof r.textContent>"u"?r.innerText=e:r.textContent=e,r}function sl(r,e){e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}function Kr(r,e){return qT(e),r.classList.contains(e)}function Bn(r,...e){return r.classList.add(...e.reduce((i,n)=>i.concat(n.split(/\s+/)),[])),r}function Ba(r,...e){return r?(r.classList.remove(...e.reduce((i,n)=>i.concat(n.split(/\s+/)),[])),r):(We.warn("removeClass was called with an element that doesn't exist"),null)}function e0(r,e,i){return typeof i=="function"&&(i=i(r,e)),typeof i!="boolean"&&(i=void 0),e.split(/\s+/).forEach(n=>r.classList.toggle(n,i)),r}function t0(r,e){Object.getOwnPropertyNames(e).forEach(function(i){const n=e[i];n===null||typeof n>"u"||n===!1?r.removeAttribute(i):r.setAttribute(i,n===!0?"":n)})}function hn(r){const e={},i=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(r&&r.attributes&&r.attributes.length>0){const n=r.attributes;for(let s=n.length-1;s>=0;s--){const a=n[s].name;let o=n[s].value;i.includes(a)&&(o=o!==null),e[a]=o}}return e}function i0(r,e){return r.getAttribute(e)}function ur(r,e,i){r.setAttribute(e,i)}function La(r,e){r.removeAttribute(e)}function n0(){Te.body.focus(),Te.onselectstart=function(){return!1}}function r0(){Te.onselectstart=function(){return!0}}function cr(r){if(r&&r.getBoundingClientRect&&r.parentNode){const e=r.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(n=>{e[n]!==void 0&&(i[n]=e[n])}),i.height||(i.height=parseFloat(dr(r,"height"))),i.width||(i.width=parseFloat(dr(r,"width"))),i}}function rs(r){if(!r||r&&!r.offsetParent)return{left:0,top:0,width:0,height:0};const e=r.offsetWidth,i=r.offsetHeight;let n=0,s=0;for(;r.offsetParent&&r!==Te[ia.fullscreenElement];)n+=r.offsetLeft,s+=r.offsetTop,r=r.offsetParent;return{left:n,top:s,width:e,height:i}}function Pa(r,e){const i={x:0,y:0};if(qt){let m=r;for(;m&&m.nodeName.toLowerCase()!=="html";){const g=dr(m,"transform");if(/^matrix/.test(g)){const S=g.slice(7,-1).split(/,\s/).map(Number);i.x+=S[4],i.y+=S[5]}else if(/^matrix3d/.test(g)){const S=g.slice(9,-1).split(/,\s/).map(Number);i.x+=S[12],i.y+=S[13]}if(m.assignedSlot&&m.assignedSlot.parentElement&&Y.WebKitCSSMatrix){const S=Y.getComputedStyle(m.assignedSlot.parentElement).transform,T=new Y.WebKitCSSMatrix(S);i.x+=T.m41,i.y+=T.m42}m=m.parentNode||m.host}}const n={},s=rs(e.target),a=rs(r),o=a.width,l=a.height;let c=e.offsetY-(a.top-s.top),d=e.offsetX-(a.left-s.left);return e.changedTouches&&(d=e.changedTouches[0].pageX-a.left,c=e.changedTouches[0].pageY+a.top,qt&&(d-=i.x,c-=i.y)),n.y=1-Math.max(0,Math.min(1,c/l)),n.x=Math.max(0,Math.min(1,d/o)),n}function s0(r){return Hi(r)&&r.nodeType===3}function Ma(r){for(;r.firstChild;)r.removeChild(r.firstChild);return r}function a0(r){return typeof r=="function"&&(r=r()),(Array.isArray(r)?r:[r]).map(e=>{if(typeof e=="function"&&(e=e()),mr(e)||s0(e))return e;if(typeof e=="string"&&/\S/.test(e))return Te.createTextNode(e)}).filter(e=>e)}function $l(r,e){return a0(e).forEach(i=>r.appendChild(i)),r}function o0(r,e){return $l(Ma(r),e)}function ss(r){return r.button===void 0&&r.buttons===void 0||r.button===0&&r.buttons===void 0||r.type==="mouseup"&&r.button===0&&r.buttons===0||r.type==="mousedown"&&r.button===0&&r.buttons===0?!0:!(r.button!==0||r.buttons!==1)}const _n=Jh("querySelector"),l0=Jh("querySelectorAll");function dr(r,e){if(!r||!e)return"";if(typeof Y.getComputedStyle=="function"){let i;try{i=Y.getComputedStyle(r)}catch{return""}return i?i.getPropertyValue(e)||i[e]:""}return""}function u0(r){[...Te.styleSheets].forEach(e=>{try{const i=[...e.cssRules].map(s=>s.cssText).join(""),n=Te.createElement("style");n.textContent=i,r.document.head.appendChild(n)}catch{const n=Te.createElement("link");n.rel="stylesheet",n.type=e.type,n.media=e.media.mediaText,n.href=e.href,r.document.head.appendChild(n)}})}var c0=Object.freeze({__proto__:null,isReal:pr,isEl:mr,isInFrame:Zh,createEl:Me,textContent:Tn,prependTo:sl,hasClass:Kr,addClass:Bn,removeClass:Ba,toggleClass:e0,setAttributes:t0,getAttributes:hn,getAttribute:i0,setAttribute:ur,removeAttribute:La,blockTextSelection:n0,unblockTextSelection:r0,getBoundingClientRect:cr,findPosition:rs,getPointerPosition:Pa,isTextNode:s0,emptyEl:Ma,normalizeContent:a0,appendContent:$l,insertContent:o0,isSingleLeftClick:ss,$:_n,$$:l0,computedStyle:dr,copyStyleSheetsToWindow:u0});let d0=!1,al;const jT=function(){if(al.options.autoSetup===!1)return;const r=Array.prototype.slice.call(Te.getElementsByTagName("video")),e=Array.prototype.slice.call(Te.getElementsByTagName("audio")),i=Array.prototype.slice.call(Te.getElementsByTagName("video-js")),n=r.concat(e,i);if(n&&n.length>0)for(let s=0,a=n.length;s<a;s++){const o=n[s];if(o&&o.getAttribute)o.player===void 0&&o.getAttribute("data-setup")!==null&&al(o);else{ol(1);break}}else d0||ol(1)};function ol(r,e){pr()&&(e&&(al=e),Y.setTimeout(jT,r))}function ll(){d0=!0,Y.removeEventListener("load",ll)}pr()&&(Te.readyState==="complete"?ll():Y.addEventListener("load",ll));const h0=function(r){const e=Te.createElement("style");return e.className=r,e},f0=function(r,e){r.styleSheet?r.styleSheet.cssText=e:r.textContent=e};var ei=new WeakMap;const GT=3;let WT=GT;function bi(){return WT++}function ad(r,e){if(!ei.has(r))return;const i=ei.get(r);i.handlers[e].length===0&&(delete i.handlers[e],r.removeEventListener?r.removeEventListener(e,i.dispatcher,!1):r.detachEvent&&r.detachEvent("on"+e,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),Object.getOwnPropertyNames(i).length===0&&ei.delete(r)}function Ul(r,e,i,n){i.forEach(function(s){r(e,s,n)})}function Ra(r){if(r.fixed_)return r;function e(){return!0}function i(){return!1}if(!r||!r.isPropagationStopped||!r.isImmediatePropagationStopped){const n=r||Y.event;r={};const s=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const a in n)s.includes(a)||a==="returnValue"&&n.preventDefault||(r[a]=n[a]);if(r.target||(r.target=r.srcElement||Te),r.relatedTarget||(r.relatedTarget=r.fromElement===r.target?r.toElement:r.fromElement),r.preventDefault=function(){n.preventDefault&&n.preventDefault(),r.returnValue=!1,n.returnValue=!1,r.defaultPrevented=!0},r.defaultPrevented=!1,r.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),r.cancelBubble=!0,n.cancelBubble=!0,r.isPropagationStopped=e},r.isPropagationStopped=i,r.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),r.isImmediatePropagationStopped=e,r.stopPropagation()},r.isImmediatePropagationStopped=i,r.clientX!==null&&r.clientX!==void 0){const a=Te.documentElement,o=Te.body;r.pageX=r.clientX+(a&&a.scrollLeft||o&&o.scrollLeft||0)-(a&&a.clientLeft||o&&o.clientLeft||0),r.pageY=r.clientY+(a&&a.scrollTop||o&&o.scrollTop||0)-(a&&a.clientTop||o&&o.clientTop||0)}r.which=r.charCode||r.keyCode,r.button!==null&&r.button!==void 0&&(r.button=r.button&1?0:r.button&4?1:r.button&2?2:0)}return r.fixed_=!0,r}let $s;const YT=function(){if(typeof $s!="boolean"){$s=!1;try{const r=Object.defineProperty({},"passive",{get(){$s=!0}});Y.addEventListener("test",null,r),Y.removeEventListener("test",null,r)}catch{}}return $s},XT=["touchstart","touchmove"];function pi(r,e,i){if(Array.isArray(e))return Ul(pi,r,e,i);ei.has(r)||ei.set(r,{});const n=ei.get(r);if(n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),i.guid||(i.guid=bi()),n.handlers[e].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(s,a){if(n.disabled)return;s=Ra(s);const o=n.handlers[s.type];if(o){const l=o.slice(0);for(let c=0,d=l.length;c<d&&!s.isImmediatePropagationStopped();c++)try{l[c].call(r,s,a)}catch(m){We.error(m)}}}),n.handlers[e].length===1)if(r.addEventListener){let s=!1;YT()&&XT.indexOf(e)>-1&&(s={passive:!0}),r.addEventListener(e,n.dispatcher,s)}else r.attachEvent&&r.attachEvent("on"+e,n.dispatcher)}function jt(r,e,i){if(!ei.has(r))return;const n=ei.get(r);if(!n.handlers)return;if(Array.isArray(e))return Ul(jt,r,e,i);const s=function(o,l){n.handlers[l]=[],ad(o,l)};if(e===void 0){for(const o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&s(r,o);return}const a=n.handlers[e];if(a){if(!i){s(r,e);return}if(i.guid)for(let o=0;o<a.length;o++)a[o].guid===i.guid&&a.splice(o--,1);ad(r,e)}}function gr(r,e,i){const n=ei.has(r)?ei.get(r):{},s=r.parentNode||r.ownerDocument;if(typeof e=="string"?e={type:e,target:r}:e.target||(e.target=r),e=Ra(e),n.dispatcher&&n.dispatcher.call(r,e,i),s&&!e.isPropagationStopped()&&e.bubbles===!0)gr.call(null,s,e,i);else if(!s&&!e.defaultPrevented&&e.target&&e.target[e.type]){ei.has(e.target)||ei.set(e.target,{});const a=ei.get(e.target);e.target[e.type]&&(a.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),a.disabled=!1)}return!e.defaultPrevented}function Va(r,e,i){if(Array.isArray(e))return Ul(Va,r,e,i);const n=function(){jt(r,e,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||bi(),pi(r,e,n)}function zl(r,e,i){const n=function(){jt(r,e,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||bi(),pi(r,e,n)}var KT=Object.freeze({__proto__:null,fixEvent:Ra,on:pi,off:jt,trigger:gr,one:Va,any:zl});const Ci=30,ct=function(r,e,i){e.guid||(e.guid=bi());const n=e.bind(r);return n.guid=i?i+"_"+e.guid:e.guid,n},ji=function(r,e){let i=Y.performance.now();return function(...s){const a=Y.performance.now();a-i>=e&&(r(...s),i=a)}},p0=function(r,e,i,n=Y){let s;const a=()=>{n.clearTimeout(s),s=null},o=function(){const l=this,c=arguments;let d=function(){s=null,d=null,i||r.apply(l,c)};!s&&i&&r.apply(l,c),n.clearTimeout(s),s=n.setTimeout(d,e)};return o.cancel=a,o};var QT=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Ci,bind_:ct,throttle:ji,debounce:p0});let zr;class mi{on(e,i){const n=this.addEventListener;this.addEventListener=()=>{},pi(this,e,i),this.addEventListener=n}off(e,i){jt(this,e,i)}one(e,i){const n=this.addEventListener;this.addEventListener=()=>{},Va(this,e,i),this.addEventListener=n}any(e,i){const n=this.addEventListener;this.addEventListener=()=>{},zl(this,e,i),this.addEventListener=n}trigger(e){const i=e.type||e;typeof e=="string"&&(e={type:i}),e=Ra(e),this.allowedEvents_[i]&&this["on"+i]&&this["on"+i](e),gr(this,e)}queueTrigger(e){zr||(zr=new Map);const i=e.type||e;let n=zr.get(this);n||(n=new Map,zr.set(this,n));const s=n.get(i);n.delete(i),Y.clearTimeout(s);const a=Y.setTimeout(()=>{n.delete(i),n.size===0&&(n=null,zr.delete(this)),this.trigger(e)},0);n.set(i,a)}}mi.prototype.allowedEvents_={};mi.prototype.addEventListener=mi.prototype.on;mi.prototype.removeEventListener=mi.prototype.off;mi.prototype.dispatchEvent=mi.prototype.trigger;const Fa=r=>typeof r.name=="function"?r.name():typeof r.name=="string"?r.name:r.name_?r.name_:r.constructor&&r.constructor.name?r.constructor.name:typeof r,nn=r=>r instanceof mi||!!r.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof r[e]=="function"),ZT=(r,e)=>{nn(r)?e():(r.eventedCallbacks||(r.eventedCallbacks=[]),r.eventedCallbacks.push(e))},ul=r=>typeof r=="string"&&/\S/.test(r)||Array.isArray(r)&&!!r.length,la=(r,e,i)=>{if(!r||!r.nodeName&&!nn(r))throw new Error(`Invalid target for ${Fa(e)}#${i}; must be a DOM node or evented object.`)},m0=(r,e,i)=>{if(!ul(r))throw new Error(`Invalid event type for ${Fa(e)}#${i}; must be a non-empty string or array.`)},g0=(r,e,i)=>{if(typeof r!="function")throw new Error(`Invalid listener for ${Fa(e)}#${i}; must be a function.`)},Lo=(r,e,i)=>{const n=e.length<3||e[0]===r||e[0]===r.eventBusEl_;let s,a,o;return n?(s=r.eventBusEl_,e.length>=3&&e.shift(),[a,o]=e):(s=e[0],a=e[1],o=e[2]),la(s,r,i),m0(a,r,i),g0(o,r,i),o=ct(r,o),{isTargetingSelf:n,target:s,type:a,listener:o}},kn=(r,e,i,n)=>{la(r,r,e),r.nodeName?KT[e](r,i,n):r[e](i,n)},JT={on(...r){const{isTargetingSelf:e,target:i,type:n,listener:s}=Lo(this,r,"on");if(kn(i,"on",n,s),!e){const a=()=>this.off(i,n,s);a.guid=s.guid;const o=()=>this.off("dispose",a);o.guid=s.guid,kn(this,"on","dispose",a),kn(i,"on","dispose",o)}},one(...r){const{isTargetingSelf:e,target:i,type:n,listener:s}=Lo(this,r,"one");if(e)kn(i,"one",n,s);else{const a=(...o)=>{this.off(i,n,a),s.apply(null,o)};a.guid=s.guid,kn(i,"one",n,a)}},any(...r){const{isTargetingSelf:e,target:i,type:n,listener:s}=Lo(this,r,"any");if(e)kn(i,"any",n,s);else{const a=(...o)=>{this.off(i,n,a),s.apply(null,o)};a.guid=s.guid,kn(i,"any",n,a)}},off(r,e,i){if(!r||ul(r))jt(this.eventBusEl_,r,e);else{const n=r,s=e;la(n,this,"off"),m0(s,this,"off"),g0(i,this,"off"),i=ct(this,i),this.off("dispose",i),n.nodeName?(jt(n,s,i),jt(n,"dispose",i)):nn(n)&&(n.off(s,i),n.off("dispose",i))}},trigger(r,e){la(this.eventBusEl_,this,"trigger");const i=r&&typeof r!="string"?r.type:r;if(!ul(i))throw new Error(`Invalid event type for ${Fa(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return gr(this.eventBusEl_,r,e)}};function Hl(r,e={}){const{eventBusKey:i}=e;if(i){if(!r[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);r.eventBusEl_=r[i]}else r.eventBusEl_=Me("span",{className:"vjs-event-bus"});return Object.assign(r,JT),r.eventedCallbacks&&r.eventedCallbacks.forEach(n=>{n()}),r.on("dispose",()=>{r.off(),[r,r.el_,r.eventBusEl_].forEach(function(n){n&&ei.has(n)&&ei.delete(n)}),Y.setTimeout(()=>{r.eventBusEl_=null},0)}),r}const eb={state:{},setState(r){typeof r=="function"&&(r=r());let e;return Xn(r,(i,n)=>{this.state[n]!==i&&(e=e||{},e[n]={from:this.state[n],to:i}),this.state[n]=i}),e&&nn(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function v0(r,e){return Object.assign(r,eb),r.state=Object.assign({},r.state,e),typeof r.handleStateChanged=="function"&&nn(r)&&r.on("statechanged",r.handleStateChanged),r}const Qr=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toLowerCase())},_t=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},y0=function(r,e){return _t(r)===_t(e)};var tb=Object.freeze({__proto__:null,toLowerCase:Qr,toTitleCase:_t,titleCaseEquals:y0});class he{constructor(e,i,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=lt({},this.options_),i=this.options_=lt(this.options_,i),this.id_=i.id||i.el&&i.el.id,!this.id_){const s=e&&e.id&&e.id()||"no_player";this.id_=`${s}_component_${bi()}`}this.name_=i.name||null,i.el?this.el_=i.el:i.createEl!==!1&&(this.el_=this.createEl()),i.className&&this.el_&&i.className.split(" ").forEach(s=>this.addClass(s)),["on","off","one","any","trigger"].forEach(s=>{this[s]=void 0}),i.evented!==!1&&(Hl(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),v0(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,i.initChildren!==!1&&this.initChildren(),this.ready(n),i.reportTouchActivity!==!1&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let i=this.children_.length-1;i>=0;i--)this.children_[i].dispose&&this.children_[i].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(e){return e?(this.options_=lt(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,i,n){return Me(e,i,n)}localize(e,i,n=e){const s=this.player_.language&&this.player_.language(),a=this.player_.languages&&this.player_.languages(),o=a&&a[s],l=s&&s.split("-")[0],c=a&&a[l];let d=n;return o&&o[e]?d=o[e]:c&&c[e]&&(d=c[e]),i&&(d=d.replace(/\{(\d+)\}/g,function(m,g){const S=i[g-1];let T=S;return typeof S>"u"&&(T=m),T})),d}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((n,s)=>n.concat(s),[]);let i=this;for(let n=0;n<e.length;n++)if(i=i.getChild(e[n]),!i||!i.getChild)return;return i}setIcon(e,i=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const n="http://www.w3.org/2000/svg",s=Me("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),a=Te.createElementNS(n,"svg");a.setAttributeNS(null,"viewBox","0 0 512 512");const o=Te.createElementNS(n,"use");return a.appendChild(o),o.setAttributeNS(null,"href",`#vjs-icon-${e}`),s.appendChild(a),this.iconIsSet_?i.replaceChild(s,i.querySelector(".vjs-icon-placeholder")):i.appendChild(s),this.iconIsSet_=!0,s}addChild(e,i={},n=this.children_.length){let s,a;if(typeof e=="string"){a=_t(e);const o=i.componentClass||a;i.name=a;const l=he.getComponent(o);if(!l)throw new Error(`Component ${o} does not exist`);if(typeof l!="function")return null;s=new l(this.player_||this,i)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(n,0,s),s.parentComponent_=this,typeof s.id=="function"&&(this.childIndex_[s.id()]=s),a=a||s.name&&_t(s.name()),a&&(this.childNameIndex_[a]=s,this.childNameIndex_[Qr(a)]=s),typeof s.el=="function"&&s.el()){let o=null;this.children_[n+1]&&(this.children_[n+1].el_?o=this.children_[n+1].el_:mr(this.children_[n+1])&&(o=this.children_[n+1])),this.contentEl().insertBefore(s.el(),o)}return s}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let i=!1;for(let s=this.children_.length-1;s>=0;s--)if(this.children_[s]===e){i=!0,this.children_.splice(s,1);break}if(!i)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[_t(e.name())]=null,this.childNameIndex_[Qr(e.name())]=null;const n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const i=this.options_,n=o=>{const l=o.name;let c=o.opts;if(i[l]!==void 0&&(c=i[l]),c===!1)return;c===!0&&(c={}),c.playerOptions=this.options_.playerOptions;const d=this.addChild(l,c);d&&(this[l]=d)};let s;const a=he.getComponent("Tech");Array.isArray(e)?s=e:s=Object.keys(e),s.concat(Object.keys(this.options_).filter(function(o){return!s.some(function(l){return typeof l=="string"?o===l:o===l.name})})).map(o=>{let l,c;return typeof o=="string"?(l=o,c=e[l]||this.options_[l]||{}):(l=o.name,c=o),{name:l,opts:c}}).filter(o=>{const l=he.getComponent(o.opts.componentClass||_t(o.name));return l&&!a.isTech(l)}).forEach(n)}}buildCSSClass(){return""}ready(e,i=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}i?e.call(this):this.setTimeout(e,1)}}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(i){i.call(this)},this),this.trigger("ready")},1)}$(e,i){return _n(e,i||this.contentEl())}$$(e,i){return l0(e,i||this.contentEl())}hasClass(e){return Kr(this.el_,e)}addClass(...e){Bn(this.el_,...e)}removeClass(...e){Ba(this.el_,...e)}toggleClass(e,i){e0(this.el_,e,i)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return i0(this.el_,e)}setAttribute(e,i){ur(this.el_,e,i)}removeAttribute(e){La(this.el_,e)}width(e,i){return this.dimension("width",e,i)}height(e,i){return this.dimension("height",e,i)}dimensions(e,i){this.width(e,!0),this.height(i)}dimension(e,i,n){if(i!==void 0){(i===null||i!==i)&&(i=0),(""+i).indexOf("%")!==-1||(""+i).indexOf("px")!==-1?this.el_.style[e]=i:i==="auto"?this.el_.style[e]="":this.el_.style[e]=i+"px",n||this.trigger("componentresize");return}if(!this.el_)return 0;const s=this.el_.style[e],a=s.indexOf("px");return parseInt(a!==-1?s.slice(0,a):this.el_["offset"+_t(e)],10)}currentDimension(e){let i=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(i=dr(this.el_,e),i=parseFloat(i),i===0||isNaN(i)){const n=`offset${_t(e)}`;i=this.el_[n]}return i}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const e=this.el_.getBoundingClientRect(),i={x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},n={x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2};return{boundingClientRect:i,center:n}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(e.key!=="Tab"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)&&e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,i=null;const n=10,s=200;let a;this.on("touchstart",function(l){l.touches.length===1&&(i={pageX:l.touches[0].pageX,pageY:l.touches[0].pageY},e=Y.performance.now(),a=!0)}),this.on("touchmove",function(l){if(l.touches.length>1)a=!1;else if(i){const c=l.touches[0].pageX-i.pageX,d=l.touches[0].pageY-i.pageY;Math.sqrt(c*c+d*d)>n&&(a=!1)}});const o=function(){a=!1};this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",function(l){i=null,a===!0&&Y.performance.now()-e<s&&(l.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=ct(this.player(),this.player().reportUserActivity);let i;this.on("touchstart",function(){e(),this.clearInterval(i),i=this.setInterval(e,250)});const n=function(s){e(),this.clearInterval(i)};this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)}setTimeout(e,i){var n;return e=ct(this,e),this.clearTimersOnDispose_(),n=Y.setTimeout(()=>{this.setTimeoutIds_.has(n)&&this.setTimeoutIds_.delete(n),e()},i),this.setTimeoutIds_.add(n),n}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Y.clearTimeout(e)),e}setInterval(e,i){e=ct(this,e),this.clearTimersOnDispose_();const n=Y.setInterval(e,i);return this.setIntervalIds_.add(n),n}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Y.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var i;return e=ct(this,e),i=Y.requestAnimationFrame(()=>{this.rafIds_.has(i)&&this.rafIds_.delete(i),e()}),this.rafIds_.add(i),i}requestNamedAnimationFrame(e,i){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),i=ct(this,i);const n=this.requestAnimationFrame(()=>{i(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,n),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Y.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,i])=>{this[e].forEach((n,s)=>this[i](s))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return!!this.el_.disabled}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function i(a){const o=Y.getComputedStyle(a,null),l=o.getPropertyValue("visibility");return o.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(l)}function n(a){return!(!i(a.parentElement)||!i(a)||a.style.opacity==="0"||Y.getComputedStyle(a).height==="0px"||Y.getComputedStyle(a).width==="0px")}function s(a){if(a.offsetWidth+a.offsetHeight+a.getBoundingClientRect().height+a.getBoundingClientRect().width===0)return!1;const o={x:a.getBoundingClientRect().left+a.offsetWidth/2,y:a.getBoundingClientRect().top+a.offsetHeight/2};if(o.x<0||o.x>(Te.documentElement.clientWidth||Y.innerWidth)||o.y<0||o.y>(Te.documentElement.clientHeight||Y.innerHeight))return!1;let l=Te.elementFromPoint(o.x,o.y);for(;l;){if(l===a)return!0;if(l.parentNode)l=l.parentNode;else return!1}}return e||(e=this.el()),!!(s(e)&&n(e)&&(!e.parentElement||e.tabIndex>=0))}static registerComponent(e,i){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const n=he.getComponent("Tech"),s=n&&n.isTech(i),a=he===i||he.prototype.isPrototypeOf(i.prototype);if(s||!a){let l;throw s?l="techs must be registered using Tech.registerTech()":l="must be a Component subclass",new Error(`Illegal component, "${e}"; ${l}.`)}e=_t(e),he.components_||(he.components_={});const o=he.getComponent("Player");if(e==="Player"&&o&&o.players){const l=o.players,c=Object.keys(l);if(l&&c.length>0){for(let d=0;d<c.length;d++)if(l[c[d]]!==null)throw new Error("Can not register Player component after player has been created.")}}return he.components_[e]=i,he.components_[Qr(e)]=i,i}static getComponent(e){if(!(!e||!he.components_))return he.components_[e]}}he.registerComponent("Component",he);function ib(r,e,i){if(typeof e!="number"||e<0||e>i)throw new Error(`Failed to execute '${r}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${i}).`)}function od(r,e,i,n){return ib(r,n,i.length-1),i[n][e]}function Po(r){let e;return r===void 0||r.length===0?e={length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:e={length:r.length,start:od.bind(null,"start",0,r),end:od.bind(null,"end",1,r)},Y.Symbol&&Y.Symbol.iterator&&(e[Y.Symbol.iterator]=()=>(r||[]).values()),e}function Ni(r,e){return Array.isArray(r)?Po(r):r===void 0||e===void 0?Po():Po([[r,e]])}const _0=function(r,e){r=r<0?0:r;let i=Math.floor(r%60),n=Math.floor(r/60%60),s=Math.floor(r/3600);const a=Math.floor(e/60%60),o=Math.floor(e/3600);return(isNaN(r)||r===1/0)&&(s=n=i="-"),s=s>0||o>0?s+":":"",n=((s||a>=10)&&n<10?"0"+n:n)+":",i=i<10?"0"+i:i,s+n+i};let ql=_0;function T0(r){ql=r}function b0(){ql=_0}function Rn(r,e=r){return ql(r,e)}var nb=Object.freeze({__proto__:null,createTimeRanges:Ni,createTimeRange:Ni,setFormatTime:T0,resetFormatTime:b0,formatTime:Rn});function C0(r,e){let i=0,n,s;if(!e)return 0;(!r||!r.length)&&(r=Ni(0,0));for(let a=0;a<r.length;a++)n=r.start(a),s=r.end(a),s>e&&(s=e),i+=s-n;return i/e}function gt(r){if(r instanceof gt)return r;typeof r=="number"?this.code=r:typeof r=="string"?this.message=r:Hi(r)&&(typeof r.code=="number"&&(this.code=r.code),Object.assign(this,r)),this.message||(this.message=gt.defaultMessages[this.code]||"")}gt.prototype.code=0;gt.prototype.message="";gt.prototype.status=null;gt.prototype.metadata=null;gt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];gt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};gt.MEDIA_ERR_CUSTOM=0;gt.prototype.MEDIA_ERR_CUSTOM=0;gt.MEDIA_ERR_ABORTED=1;gt.prototype.MEDIA_ERR_ABORTED=1;gt.MEDIA_ERR_NETWORK=2;gt.prototype.MEDIA_ERR_NETWORK=2;gt.MEDIA_ERR_DECODE=3;gt.prototype.MEDIA_ERR_DECODE=3;gt.MEDIA_ERR_SRC_NOT_SUPPORTED=4;gt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;gt.MEDIA_ERR_ENCRYPTED=5;gt.prototype.MEDIA_ERR_ENCRYPTED=5;function Zr(r){return r!=null&&typeof r.then=="function"}function Fi(r){Zr(r)&&r.then(null,e=>{})}const cl=function(r){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((i,n,s)=>(r[n]&&(i[n]=r[n]),i),{cues:r.cues&&Array.prototype.map.call(r.cues,function(i){return{startTime:i.startTime,endTime:i.endTime,text:i.text,id:i.id}})})},rb=function(r){const e=r.$$("track"),i=Array.prototype.map.call(e,s=>s.track);return Array.prototype.map.call(e,function(s){const a=cl(s.track);return s.src&&(a.src=s.src),a}).concat(Array.prototype.filter.call(r.textTracks(),function(s){return i.indexOf(s)===-1}).map(cl))},sb=function(r,e){return r.forEach(function(i){const n=e.addRemoteTextTrack(i).track;!i.src&&i.cues&&i.cues.forEach(s=>n.addCue(s))}),e.textTracks()};var dl={textTracksToJson:rb,jsonToTextTracks:sb,trackToJson:cl};const Mo="vjs-modal-dialog";class vr extends he{constructor(e,i){super(e,i),this.handleKeyDown_=n=>this.handleKeyDown(n),this.close_=n=>this.close(n),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Me("div",{className:`${Mo}-content`},{role:"document"}),this.descEl_=Me("p",{className:`${Mo}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),Tn(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Mo} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(this.opened_){this.options_.fillAlways&&this.fill();return}const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(e){return typeof e=="boolean"&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(typeof e=="boolean"){const i=this.closeable_=!!e;let n=this.getChild("closeButton");if(i&&!n){const s=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=s,this.on(n,"close",this.close_)}!i&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const i=this.contentEl(),n=i.parentNode,s=i.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(i),this.empty(),o0(i,e),this.trigger("modalfill"),s?n.insertBefore(i,s):n.appendChild(i);const a=this.getChild("closeButton");a&&n.appendChild(a.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),Ma(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=Te.activeElement,i=this.player_.el_;this.previouslyActiveEl_=null,(i.contains(e)||i===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),e.key==="Escape"&&this.closeable()){e.preventDefault(),this.close();return}if(e.key!=="Tab")return;const i=this.focusableEls_(),n=this.el_.querySelector(":focus");let s;for(let a=0;a<i.length;a++)if(n===i[a]){s=a;break}Te.activeElement===this.el_&&(s=0),e.shiftKey&&s===0?(i[i.length-1].focus(),e.preventDefault()):!e.shiftKey&&s===i.length-1&&(i[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,i=>(i instanceof Y.HTMLAnchorElement||i instanceof Y.HTMLAreaElement)&&i.hasAttribute("href")||(i instanceof Y.HTMLInputElement||i instanceof Y.HTMLSelectElement||i instanceof Y.HTMLTextAreaElement||i instanceof Y.HTMLButtonElement)&&!i.hasAttribute("disabled")||i instanceof Y.HTMLIFrameElement||i instanceof Y.HTMLObjectElement||i instanceof Y.HTMLEmbedElement||i.hasAttribute("tabindex")&&i.getAttribute("tabindex")!==-1||i.hasAttribute("contenteditable"))}}vr.prototype.options_={pauseOnOpen:!0,temporary:!0};he.registerComponent("ModalDialog",vr);class Vn extends mi{constructor(e=[]){super(),this.tracks_=[];for(let i=0;i<e.length;i++)this.addTrack(e[i])}get length(){return this.tracks_.length}addTrack(e){const i=this.tracks_.length;""+i in this||Object.defineProperty(this,i,{get(){return this.tracks_[i]}}),this.tracks_.indexOf(e)===-1&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},nn(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let i;for(let n=0,s=this.length;n<s;n++)if(this[n]===e){i=this[n],i.off&&i.off(),this.tracks_.splice(n,1);break}i&&this.trigger({track:i,type:"removetrack",target:this})}getTrackById(e){let i=null;for(let n=0,s=this.length;n<s;n++){const a=this[n];if(a.id===e){i=a;break}}return i}}Vn.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const r in Vn.prototype.allowedEvents_)Vn.prototype["on"+r]=null;const Ro=function(r,e){for(let i=0;i<r.length;i++)!Object.keys(r[i]).length||e.id===r[i].id||(r[i].enabled=!1)};class x0 extends Vn{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].enabled){Ro(e,e[i]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Ro(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Ro(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const Vo=function(r,e){for(let i=0;i<r.length;i++)!Object.keys(r[i]).length||e.id===r[i].id||(r[i].selected=!1)};class S0 extends Vn{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].selected){Vo(e,e[i]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let i=0;i<this.length;i++)if(this[i].selected)return i;return-1},set(){}})}addTrack(e){e.selected&&Vo(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Vo(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class jl extends Vn{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(e.kind)===-1&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class ab{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let i=0,n=e.length;i<n;i++)this.addTrackElement_(e[i])}addTrackElement_(e){const i=this.trackElements_.length;""+i in this||Object.defineProperty(this,i,{get(){return this.trackElements_[i]}}),this.trackElements_.indexOf(e)===-1&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let i;for(let n=0,s=this.trackElements_.length;n<s;n++)if(e===this.trackElements_[n].track){i=this.trackElements_[n];break}return i}removeTrackElement_(e){for(let i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i]){this.trackElements_[i].track&&typeof this.trackElements_[i].track.off=="function"&&this.trackElements_[i].track.off(),typeof this.trackElements_[i].off=="function"&&this.trackElements_[i].off(),this.trackElements_.splice(i,1);break}}}class ua{constructor(e){ua.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const i=this.length||0;let n=0;const s=e.length;this.cues_=e,this.length_=e.length;const a=function(o){""+o in this||Object.defineProperty(this,""+o,{get(){return this.cues_[o]}})};if(i<s)for(n=i;n<s;n++)a.call(this,n)}getCueById(e){let i=null;for(let n=0,s=this.length;n<s;n++){const a=this[n];if(a.id===e){i=a;break}}return i}}const ob={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},lb={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},ub={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},ld={disabled:"disabled",hidden:"hidden",showing:"showing"};class Gl extends mi{constructor(e={}){super();const i={id:e.id||"vjs_track_"+bi(),kind:e.kind||"",language:e.language||""};let n=e.label||"";for(const s in i)Object.defineProperty(this,s,{get(){return i[s]},set(){}});Object.defineProperty(this,"label",{get(){return n},set(s){s!==n&&(n=s,this.trigger("labelchange"))}})}}const Wl=function(r){return new URL(r,Te.baseURI)},E0=function(r){return new URL(r,Te.baseURI).href},Yl=function(r){if(typeof r=="string"){const i=r.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return i?i[1].toLowerCase():""}return""},$a=function(r,e=Y.location){return Wl(r).origin!==e.origin};var cb=Object.freeze({__proto__:null,parseUrl:Wl,getAbsoluteURL:E0,getFileExtension:Yl,isCrossOrigin:$a});const ud=function(r,e){const i=new Y.WebVTT.Parser(Y,Y.vttjs,Y.WebVTT.StringDecoder()),n=[];i.oncue=function(s){e.addCue(s)},i.onparsingerror=function(s){n.push(s)},i.onflush=function(){e.trigger({type:"loadeddata",target:e})},i.parse(r),n.length>0&&(Y.console&&Y.console.groupCollapsed&&Y.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),n.forEach(s=>We.error(s)),Y.console&&Y.console.groupEnd&&Y.console.groupEnd()),i.flush()},cd=function(r,e){const i={uri:r},n=$a(r);n&&(i.cors=n);const s=e.tech_.crossOrigin()==="use-credentials";s&&(i.withCredentials=s),wh(i,ct(this,function(a,o,l){if(a)return We.error(a,o);e.loaded_=!0,typeof Y.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],c=>{if(c.type==="vttjserror"){We.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return ud(l,e)}):ud(l,e)}))};class ls extends Gl{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const i=lt(e,{kind:ub[e.kind]||"subtitles",language:e.language||e.srclang||""});let n=ld[i.mode]||"disabled";const s=i.default;(i.kind==="metadata"||i.kind==="chapters")&&(n="hidden"),super(i),this.tech_=i.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const a=new ua(this.cues_),o=new ua(this.activeCues_);let l=!1;this.timeupdateHandler=ct(this,function(d={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){d.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1),d.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const c=()=>{this.stopTracking()};this.tech_.one("dispose",c),n!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return s},set(){}},mode:{get(){return n},set(d){ld[d]&&n!==d&&(n=d,!this.preload_&&n!=="disabled"&&this.cues.length===0&&cd(this.src,this),this.stopTracking(),n!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?a:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return o;const d=this.tech_.currentTime(),m=[];for(let g=0,S=this.cues.length;g<S;g++){const T=this.cues[g];T.startTime<=d&&T.endTime>=d&&m.push(T)}if(l=!1,m.length!==this.activeCues_.length)l=!0;else for(let g=0;g<m.length;g++)this.activeCues_.indexOf(m[g])===-1&&(l=!0);return this.activeCues_=m,o.setCues_(this.activeCues_),o},set(){}}}),i.src?(this.src=i.src,this.preload_||(this.loaded_=!0),(this.preload_||i.kind!=="subtitles"&&i.kind!=="captions")&&cd(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let i=e;if(!("getCueAsHTML"in i)){i=new Y.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const s in e)s in i||(i[s]=e[s]);i.id=e.id,i.originalCue_=e}const n=this.tech_.textTracks();for(let s=0;s<n.length;s++)n[s]!==this&&n[s].removeCue(i);this.cues_.push(i),this.cues.setCues_(this.cues_)}toJSON(){return dl.trackToJson(this)}removeCue(e){let i=this.cues_.length;for(;i--;){const n=this.cues_[i];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(i,1),this.cues.setCues_(this.cues_);break}}}}ls.prototype.allowedEvents_={cuechange:"cuechange"};class k0 extends Gl{constructor(e={}){const i=lt(e,{kind:lb[e.kind]||""});super(i);let n=!1;Object.defineProperty(this,"enabled",{get(){return n},set(s){typeof s!="boolean"||s===n||(n=s,this.trigger("enabledchange"))}}),i.enabled&&(this.enabled=i.enabled),this.loaded_=!0}}class w0 extends Gl{constructor(e={}){const i=lt(e,{kind:ob[e.kind]||""});super(i);let n=!1;Object.defineProperty(this,"selected",{get(){return n},set(s){typeof s!="boolean"||s===n||(n=s,this.trigger("selectedchange"))}}),i.selected&&(this.selected=i.selected)}}class rn extends mi{constructor(e={}){super();let i;const n=new ls(e);this.kind=n.kind,this.src=n.src,this.srclang=n.language,this.label=n.label,this.default=n.default,Object.defineProperties(this,{readyState:{get(){return i}},track:{get(){return n}}}),i=rn.NONE,n.addEventListener("loadeddata",()=>{i=rn.LOADED,this.trigger({type:"load",target:this})})}}rn.prototype.allowedEvents_={load:"load"};rn.NONE=0;rn.LOADING=1;rn.LOADED=2;rn.ERROR=3;const yi={audio:{ListClass:x0,TrackClass:k0,capitalName:"Audio"},video:{ListClass:S0,TrackClass:w0,capitalName:"Video"},text:{ListClass:jl,TrackClass:ls,capitalName:"Text"}};Object.keys(yi).forEach(function(r){yi[r].getterName=`${r}Tracks`,yi[r].privateName=`${r}Tracks_`});const hr={remoteText:{ListClass:jl,TrackClass:ls,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:ab,TrackClass:rn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Jt=Object.assign({},yi,hr);hr.names=Object.keys(hr);yi.names=Object.keys(yi);Jt.names=[].concat(hr.names).concat(yi.names);function db(r,e,i,n,s={}){const a=r.textTracks();s.kind=e,i&&(s.label=i),n&&(s.language=n),s.tech=r;const o=new Jt.text.TrackClass(s);return a.addTrack(o),o}class ze extends he{constructor(e={},i=function(){}){e.reportTouchActivity=!1,super(null,e,i),this.onDurationChange_=n=>this.onDurationChange(n),this.trackProgress_=n=>this.trackProgress(n),this.trackCurrentTime_=n=>this.trackCurrentTime(n),this.stopTrackingCurrentTime_=n=>this.stopTrackingCurrentTime(n),this.disposeSourceHandler_=n=>this.disposeSourceHandler(n),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),Jt.names.forEach(n=>{const s=Jt[n];e&&e[s.getterName]&&(this[s.privateName]=e[s.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(n=>{e[`native${n}Tracks`]===!1&&(this[`featuresNative${n}Tracks`]=!1)}),e.nativeCaptions===!1||e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new Jt.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ct(this,function(){const i=this.bufferedPercent();this.bufferedPercent_!==i&&this.trigger("progress"),this.bufferedPercent_=i,i===1&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return Ni(0,0)}bufferedPercent(){return C0(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(yi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(i=>{const n=this[`${i}Tracks`]()||[];let s=n.length;for(;s--;){const a=n[s];i==="text"&&this.removeRemoteTextTrack(a),n.removeTrack(a)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let i=e.length;for(;i--;){const n=e[i];this.removeRemoteTextTrack(n)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new gt(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?Ni(0,0):Ni()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){yi.names.forEach(e=>{const i=yi[e],n=()=>{this.trigger(`${e}trackchange`)},s=this[i.getterName]();s.addEventListener("removetrack",n),s.addEventListener("addtrack",n),this.on("dispose",()=>{s.removeEventListener("removetrack",n),s.removeEventListener("addtrack",n)})})}addWebVttScript_(){if(!Y.WebVTT)if(Te.body.contains(this.el())){if(!this.options_["vtt.js"]&&lr(Lc)&&Object.keys(Lc).length>0){this.trigger("vttjsloaded");return}const e=Te.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),Y.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),i=this.remoteTextTracks(),n=l=>e.addTrack(l.track),s=l=>e.removeTrack(l.track);i.on("addtrack",n),i.on("removetrack",s),this.addWebVttScript_();const a=()=>this.trigger("texttrackchange"),o=()=>{a();for(let l=0;l<e.length;l++){const c=e[l];c.removeEventListener("cuechange",a),c.mode==="showing"&&c.addEventListener("cuechange",a)}};o(),e.addEventListener("change",o),e.addEventListener("addtrack",o),e.addEventListener("removetrack",o),this.on("dispose",function(){i.off("addtrack",n),i.off("removetrack",s),e.removeEventListener("change",o),e.removeEventListener("addtrack",o),e.removeEventListener("removetrack",o);for(let l=0;l<e.length;l++)e[l].removeEventListener("cuechange",a)})}addTextTrack(e,i,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return db(this,e,i,n)}createRemoteTextTrack(e){const i=lt(e,{tech:this});return new hr.remoteTextEl.TrackClass(i)}addRemoteTextTrack(e={},i){const n=this.createRemoteTextTrack(e);return typeof i!="boolean"&&(i=!1),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),i===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(n.track)),n}removeRemoteTextTrack(e){const i=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(i),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const i=bi();return!this.isReady_||this.paused()?(this.queuedHanders_.add(i),this.one("playing",()=>{this.queuedHanders_.has(i)&&(this.queuedHanders_.delete(i),e())})):this.requestNamedAnimationFrame(i,e),i}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,i){return ze.canPlayType(e.type)}static isTech(e){return e.prototype instanceof ze||e instanceof ze||e===ze}static registerTech(e,i){if(ze.techs_||(ze.techs_={}),!ze.isTech(i))throw new Error(`Tech ${e} must be a Tech`);if(!ze.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!ze.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=_t(e),ze.techs_[e]=i,ze.techs_[Qr(e)]=i,e!=="Tech"&&ze.defaultTechOrder_.push(e),i}static getTech(e){if(e){if(ze.techs_&&ze.techs_[e])return ze.techs_[e];if(e=_t(e),Y&&Y.videojs&&Y.videojs[e])return We.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Y.videojs[e]}}}Jt.names.forEach(function(r){const e=Jt[r];ze.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}});ze.prototype.featuresVolumeControl=!0;ze.prototype.featuresMuteControl=!0;ze.prototype.featuresFullscreenResize=!1;ze.prototype.featuresPlaybackRate=!1;ze.prototype.featuresProgressEvents=!1;ze.prototype.featuresSourceset=!1;ze.prototype.featuresTimeupdateEvents=!1;ze.prototype.featuresNativeTextTracks=!1;ze.prototype.featuresVideoFrameCallback=!1;ze.withSourceHandlers=function(r){r.registerSourceHandler=function(i,n){let s=r.sourceHandlers;s||(s=r.sourceHandlers=[]),n===void 0&&(n=s.length),s.splice(n,0,i)},r.canPlayType=function(i){const n=r.sourceHandlers||[];let s;for(let a=0;a<n.length;a++)if(s=n[a].canPlayType(i),s)return s;return""},r.selectSourceHandler=function(i,n){const s=r.sourceHandlers||[];let a;for(let o=0;o<s.length;o++)if(a=s[o].canHandleSource(i,n),a)return s[o];return null},r.canPlaySource=function(i,n){const s=r.selectSourceHandler(i,n);return s?s.canHandleSource(i,n):""},["seekable","seeking","duration"].forEach(function(i){const n=this[i];typeof n=="function"&&(this[i]=function(){return this.sourceHandler_&&this.sourceHandler_[i]?this.sourceHandler_[i].apply(this.sourceHandler_,arguments):n.apply(this,arguments)})},r.prototype),r.prototype.setSource=function(i){let n=r.selectSourceHandler(i,this.options_);n||(r.nativeSourceHandler?n=r.nativeSourceHandler:We.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==r.nativeSourceHandler&&(this.currentSource_=i),this.sourceHandler_=n.handleSource(i,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},r.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}};he.registerComponent("Tech",ze);ze.registerTech("Tech",ze);ze.defaultTechOrder_=[];const Ln={},ca={},da={};function hb(r,e){Ln[r]=Ln[r]||[],Ln[r].push(e)}function fb(r,e,i){r.setTimeout(()=>wn(e,Ln[e.type],i,r),1)}function pb(r,e){r.forEach(i=>i.setTech&&i.setTech(e))}function mb(r,e,i){return r.reduceRight(Xl(i),e[i]())}function gb(r,e,i,n){return e[i](r.reduce(Xl(i),n))}function dd(r,e,i,n=null){const s="call"+_t(i),a=r.reduce(Xl(s),n),o=a===da,l=o?null:e[i](a);return _b(r,i,l,o),l}const vb={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},yb={setCurrentTime:1,setMuted:1,setVolume:1},hd={play:1,pause:1};function Xl(r){return(e,i)=>e===da?da:i[r]?i[r](e):e}function _b(r,e,i,n){for(let s=r.length-1;s>=0;s--){const a=r[s];a[e]&&a[e](n,i)}}function Tb(r){ca.hasOwnProperty(r.id())&&delete ca[r.id()]}function bb(r,e){const i=ca[r.id()];let n=null;if(i==null)return n=e(r),ca[r.id()]=[[e,n]],n;for(let s=0;s<i.length;s++){const[a,o]=i[s];a===e&&(n=o)}return n===null&&(n=e(r),i.push([e,n])),n}function wn(r={},e=[],i,n,s=[],a=!1){const[o,...l]=e;if(typeof o=="string")wn(r,Ln[o],i,n,s,a);else if(o){const c=bb(n,o);if(!c.setSource)return s.push(c),wn(r,l,i,n,s,a);c.setSource(Object.assign({},r),function(d,m){if(d)return wn(r,l,i,n,s,a);s.push(c),wn(m,r.type===m.type?l:Ln[m.type],i,n,s,a)})}else l.length?wn(r,l,i,n,s,a):a?i(r,s):wn(r,Ln["*"],i,n,s,!0)}const Cb={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},ha=function(r=""){const e=Yl(r);return Cb[e.toLowerCase()]||""},xb=(r,e)=>{if(!e)return"";if(r.cache_.source.src===e&&r.cache_.source.type)return r.cache_.source.type;const i=r.cache_.sources.filter(s=>s.src===e);if(i.length)return i[0].type;const n=r.$$("source");for(let s=0;s<n.length;s++){const a=n[s];if(a.type&&a.src&&a.src===e)return a.type}return ha(e)},D0=function(r){if(Array.isArray(r)){let e=[];r.forEach(function(i){i=D0(i),Array.isArray(i)?e=e.concat(i):Hi(i)&&e.push(i)}),r=e}else typeof r=="string"&&r.trim()?r=[fd({src:r})]:Hi(r)&&typeof r.src=="string"&&r.src&&r.src.trim()?r=[fd(r)]:r=[];return r};function fd(r){if(!r.type){const e=ha(r.src);e&&(r.type=e)}return r}var Sb=`<svg xmlns="http://www.w3.org/2000/svg">
37
+ */var nl="8.23.7";const Ji={},yn=function(r,e){return Ji[r]=Ji[r]||[],e&&(Ji[r]=Ji[r].concat(e)),Ji[r]},VT=function(r,e){yn(r,e)},zh=function(r,e){const i=yn(r).indexOf(e);return i<=-1?!1:(Ji[r]=Ji[r].slice(),Ji[r].splice(i,1),!0)},FT=function(r,e){yn(r,[].concat(e).map(i=>{const n=(...s)=>(zh(r,n),i(...s));return n}))},ia={prefixed:!0},Ks=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],rd=Ks[0];let Wr;for(let r=0;r<Ks.length;r++)if(Ks[r][1]in Te){Wr=Ks[r];break}if(Wr){for(let r=0;r<Wr.length;r++)ia[rd[r]]=Wr[r];ia.prefixed=Wr[0]!==rd[0]}let si=[];const $T=(r,e,i)=>(n,s,a)=>{const o=e.levels[s],l=new RegExp(`^(${o})$`);let c=r;if(n!=="log"&&a.unshift(n.toUpperCase()+":"),i&&(c=`%c${r}`,a.unshift(i)),a.unshift(c+":"),si){si.push([].concat(a));const m=si.length-1e3;si.splice(0,m>0?m:0)}if(!Y.console)return;let d=Y.console[n];!d&&n==="debug"&&(d=Y.console.info||Y.console.log),!(!d||!o||!l.test(n))&&d[Array.isArray(a)?"apply":"call"](Y.console,a)};function rl(r,e=":",i=""){let n="info",s;function a(...o){s("log",n,o)}return s=$T(r,a,i),a.createLogger=(o,l,c)=>{const d=l!==void 0?l:e,m=c!==void 0?c:i,g=`${r} ${d} ${o}`;return rl(g,d,m)},a.createNewLogger=(o,l,c)=>rl(o,l,c),a.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},a.level=o=>{if(typeof o=="string"){if(!a.levels.hasOwnProperty(o))throw new Error(`"${o}" in not a valid log level`);n=o}return n},a.history=()=>si?[].concat(si):[],a.history.filter=o=>(si||[]).filter(l=>new RegExp(`.*${o}.*`).test(l[0])),a.history.clear=()=>{si&&(si.length=0)},a.history.disable=()=>{si!==null&&(si.length=0,si=null)},a.history.enable=()=>{si===null&&(si=[])},a.error=(...o)=>s("error",n,o),a.warn=(...o)=>s("warn",n,o),a.debug=(...o)=>s("debug",n,o),a}const Ye=rl("VIDEOJS"),Hh=Ye.createLogger,UT=Object.prototype.toString,qh=function(r){return Hi(r)?Object.keys(r):[]};function Xn(r,e){qh(r).forEach(i=>e(r[i],i))}function jh(r,e,i=0){return qh(r).reduce((n,s)=>e(n,r[s],s),i)}function Hi(r){return!!r&&typeof r=="object"}function lr(r){return Hi(r)&&UT.call(r)==="[object Object]"&&r.constructor===Object}function lt(...r){const e={};return r.forEach(i=>{i&&Xn(i,(n,s)=>{if(!lr(n)){e[s]=n;return}lr(e[s])||(e[s]={}),e[s]=lt(e[s],n)})}),e}function Gh(r={}){const e=[];for(const i in r)if(r.hasOwnProperty(i)){const n=r[i];e.push(n)}return e}function Da(r,e,i,n=!0){const s=o=>Object.defineProperty(r,e,{value:o,enumerable:!0,writable:!0}),a={configurable:!0,enumerable:!0,get(){const o=i();return s(o),o}};return n&&(a.set=s),Object.defineProperty(r,e,a)}var zT=Object.freeze({__proto__:null,each:Xn,reduce:jh,isObject:Hi,isPlain:lr,merge:lt,values:Gh,defineLazyProperty:Da});let Vl=!1,Wh=null,Oi=!1,Yh,Xh=!1,Kn=!1,Qn=!1,qi=!1,Fl=null,Aa=null;const HT=!!(Y.cast&&Y.cast.framework&&Y.cast.framework.CastReceiverContext);let Kh=null,na=!1,Ia=!1,ra=!1,Na=!1,sa=!1,aa=!1,oa=!1;const ns=!!(pr()&&("ontouchstart"in Y||Y.navigator.maxTouchPoints||Y.DocumentTouch&&Y.document instanceof Y.DocumentTouch)),un=Y.navigator&&Y.navigator.userAgentData;un&&un.platform&&un.brands&&(Oi=un.platform==="Android",Kn=!!un.brands.find(r=>r.brand==="Microsoft Edge"),Qn=!!un.brands.find(r=>r.brand==="Chromium"),qi=!Kn&&Qn,Fl=Aa=(un.brands.find(r=>r.brand==="Chromium")||{}).version||null,Ia=un.platform==="Windows");if(!Qn){const r=Y.navigator&&Y.navigator.userAgent||"";Vl=/iPod/i.test(r),Wh=(function(){const e=r.match(/OS (\d+)_/i);return e&&e[1]?e[1]:null})(),Oi=/Android/i.test(r),Yh=(function(){const e=r.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;const i=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return i&&n?parseFloat(e[1]+"."+e[2]):i||null})(),Xh=/Firefox/i.test(r),Kn=/Edg/i.test(r),Qn=/Chrome/i.test(r)||/CriOS/i.test(r),qi=!Kn&&Qn,Fl=Aa=(function(){const e=r.match(/(Chrome|CriOS)\/(\d+)/);return e&&e[2]?parseFloat(e[2]):null})(),Kh=(function(){const e=/MSIE\s(\d+)\.\d/.exec(r);let i=e&&parseFloat(e[1]);return!i&&/Trident\/7.0/i.test(r)&&/rv:11.0/.test(r)&&(i=11),i})(),sa=/Tizen/i.test(r),aa=/Web0S/i.test(r),oa=sa||aa,na=/Safari/i.test(r)&&!qi&&!Oi&&!Kn&&!oa,Ia=/Windows/i.test(r),ra=/iPad/i.test(r)||na&&ns&&!/iPhone/i.test(r),Na=/iPhone/i.test(r)&&!ra}const qt=Na||ra||Vl,Oa=(na||qt)&&!qi;var Qh=Object.freeze({__proto__:null,get IS_IPOD(){return Vl},get IOS_VERSION(){return Wh},get IS_ANDROID(){return Oi},get ANDROID_VERSION(){return Yh},get IS_FIREFOX(){return Xh},get IS_EDGE(){return Kn},get IS_CHROMIUM(){return Qn},get IS_CHROME(){return qi},get CHROMIUM_VERSION(){return Fl},get CHROME_VERSION(){return Aa},IS_CHROMECAST_RECEIVER:HT,get IE_VERSION(){return Kh},get IS_SAFARI(){return na},get IS_WINDOWS(){return Ia},get IS_IPAD(){return ra},get IS_IPHONE(){return Na},get IS_TIZEN(){return sa},get IS_WEBOS(){return aa},get IS_SMART_TV(){return oa},TOUCH_ENABLED:ns,IS_IOS:qt,IS_ANY_SAFARI:Oa});function sd(r){return typeof r=="string"&&!!r.trim()}function qT(r){if(r.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}function pr(){return Te===Y.document}function mr(r){return Hi(r)&&r.nodeType===1}function Zh(){try{return Y.parent!==Y.self}catch{return!0}}function Jh(r){return function(e,i){if(!sd(e))return Te[r](null);sd(i)&&(i=Te.querySelector(i));const n=mr(i)?i:Te;return n[r]&&n[r](e)}}function Me(r="div",e={},i={},n){const s=Te.createElement(r);return Object.getOwnPropertyNames(e).forEach(function(a){const o=e[a];a==="textContent"?Tn(s,o):(s[a]!==o||a==="tabIndex")&&(s[a]=o)}),Object.getOwnPropertyNames(i).forEach(function(a){s.setAttribute(a,i[a])}),n&&$l(s,n),s}function Tn(r,e){return typeof r.textContent>"u"?r.innerText=e:r.textContent=e,r}function sl(r,e){e.firstChild?e.insertBefore(r,e.firstChild):e.appendChild(r)}function Kr(r,e){return qT(e),r.classList.contains(e)}function Bn(r,...e){return r.classList.add(...e.reduce((i,n)=>i.concat(n.split(/\s+/)),[])),r}function Ba(r,...e){return r?(r.classList.remove(...e.reduce((i,n)=>i.concat(n.split(/\s+/)),[])),r):(Ye.warn("removeClass was called with an element that doesn't exist"),null)}function e0(r,e,i){return typeof i=="function"&&(i=i(r,e)),typeof i!="boolean"&&(i=void 0),e.split(/\s+/).forEach(n=>r.classList.toggle(n,i)),r}function t0(r,e){Object.getOwnPropertyNames(e).forEach(function(i){const n=e[i];n===null||typeof n>"u"||n===!1?r.removeAttribute(i):r.setAttribute(i,n===!0?"":n)})}function hn(r){const e={},i=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(r&&r.attributes&&r.attributes.length>0){const n=r.attributes;for(let s=n.length-1;s>=0;s--){const a=n[s].name;let o=n[s].value;i.includes(a)&&(o=o!==null),e[a]=o}}return e}function i0(r,e){return r.getAttribute(e)}function ur(r,e,i){r.setAttribute(e,i)}function La(r,e){r.removeAttribute(e)}function n0(){Te.body.focus(),Te.onselectstart=function(){return!1}}function r0(){Te.onselectstart=function(){return!0}}function cr(r){if(r&&r.getBoundingClientRect&&r.parentNode){const e=r.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach(n=>{e[n]!==void 0&&(i[n]=e[n])}),i.height||(i.height=parseFloat(dr(r,"height"))),i.width||(i.width=parseFloat(dr(r,"width"))),i}}function rs(r){if(!r||r&&!r.offsetParent)return{left:0,top:0,width:0,height:0};const e=r.offsetWidth,i=r.offsetHeight;let n=0,s=0;for(;r.offsetParent&&r!==Te[ia.fullscreenElement];)n+=r.offsetLeft,s+=r.offsetTop,r=r.offsetParent;return{left:n,top:s,width:e,height:i}}function Pa(r,e){const i={x:0,y:0};if(qt){let m=r;for(;m&&m.nodeName.toLowerCase()!=="html";){const g=dr(m,"transform");if(/^matrix/.test(g)){const S=g.slice(7,-1).split(/,\s/).map(Number);i.x+=S[4],i.y+=S[5]}else if(/^matrix3d/.test(g)){const S=g.slice(9,-1).split(/,\s/).map(Number);i.x+=S[12],i.y+=S[13]}if(m.assignedSlot&&m.assignedSlot.parentElement&&Y.WebKitCSSMatrix){const S=Y.getComputedStyle(m.assignedSlot.parentElement).transform,T=new Y.WebKitCSSMatrix(S);i.x+=T.m41,i.y+=T.m42}m=m.parentNode||m.host}}const n={},s=rs(e.target),a=rs(r),o=a.width,l=a.height;let c=e.offsetY-(a.top-s.top),d=e.offsetX-(a.left-s.left);return e.changedTouches&&(d=e.changedTouches[0].pageX-a.left,c=e.changedTouches[0].pageY+a.top,qt&&(d-=i.x,c-=i.y)),n.y=1-Math.max(0,Math.min(1,c/l)),n.x=Math.max(0,Math.min(1,d/o)),n}function s0(r){return Hi(r)&&r.nodeType===3}function Ma(r){for(;r.firstChild;)r.removeChild(r.firstChild);return r}function a0(r){return typeof r=="function"&&(r=r()),(Array.isArray(r)?r:[r]).map(e=>{if(typeof e=="function"&&(e=e()),mr(e)||s0(e))return e;if(typeof e=="string"&&/\S/.test(e))return Te.createTextNode(e)}).filter(e=>e)}function $l(r,e){return a0(e).forEach(i=>r.appendChild(i)),r}function o0(r,e){return $l(Ma(r),e)}function ss(r){return r.button===void 0&&r.buttons===void 0||r.button===0&&r.buttons===void 0||r.type==="mouseup"&&r.button===0&&r.buttons===0||r.type==="mousedown"&&r.button===0&&r.buttons===0?!0:!(r.button!==0||r.buttons!==1)}const _n=Jh("querySelector"),l0=Jh("querySelectorAll");function dr(r,e){if(!r||!e)return"";if(typeof Y.getComputedStyle=="function"){let i;try{i=Y.getComputedStyle(r)}catch{return""}return i?i.getPropertyValue(e)||i[e]:""}return""}function u0(r){[...Te.styleSheets].forEach(e=>{try{const i=[...e.cssRules].map(s=>s.cssText).join(""),n=Te.createElement("style");n.textContent=i,r.document.head.appendChild(n)}catch{const n=Te.createElement("link");n.rel="stylesheet",n.type=e.type,n.media=e.media.mediaText,n.href=e.href,r.document.head.appendChild(n)}})}var c0=Object.freeze({__proto__:null,isReal:pr,isEl:mr,isInFrame:Zh,createEl:Me,textContent:Tn,prependTo:sl,hasClass:Kr,addClass:Bn,removeClass:Ba,toggleClass:e0,setAttributes:t0,getAttributes:hn,getAttribute:i0,setAttribute:ur,removeAttribute:La,blockTextSelection:n0,unblockTextSelection:r0,getBoundingClientRect:cr,findPosition:rs,getPointerPosition:Pa,isTextNode:s0,emptyEl:Ma,normalizeContent:a0,appendContent:$l,insertContent:o0,isSingleLeftClick:ss,$:_n,$$:l0,computedStyle:dr,copyStyleSheetsToWindow:u0});let d0=!1,al;const jT=function(){if(al.options.autoSetup===!1)return;const r=Array.prototype.slice.call(Te.getElementsByTagName("video")),e=Array.prototype.slice.call(Te.getElementsByTagName("audio")),i=Array.prototype.slice.call(Te.getElementsByTagName("video-js")),n=r.concat(e,i);if(n&&n.length>0)for(let s=0,a=n.length;s<a;s++){const o=n[s];if(o&&o.getAttribute)o.player===void 0&&o.getAttribute("data-setup")!==null&&al(o);else{ol(1);break}}else d0||ol(1)};function ol(r,e){pr()&&(e&&(al=e),Y.setTimeout(jT,r))}function ll(){d0=!0,Y.removeEventListener("load",ll)}pr()&&(Te.readyState==="complete"?ll():Y.addEventListener("load",ll));const h0=function(r){const e=Te.createElement("style");return e.className=r,e},f0=function(r,e){r.styleSheet?r.styleSheet.cssText=e:r.textContent=e};var ei=new WeakMap;const GT=3;let WT=GT;function bi(){return WT++}function ad(r,e){if(!ei.has(r))return;const i=ei.get(r);i.handlers[e].length===0&&(delete i.handlers[e],r.removeEventListener?r.removeEventListener(e,i.dispatcher,!1):r.detachEvent&&r.detachEvent("on"+e,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),Object.getOwnPropertyNames(i).length===0&&ei.delete(r)}function Ul(r,e,i,n){i.forEach(function(s){r(e,s,n)})}function Ra(r){if(r.fixed_)return r;function e(){return!0}function i(){return!1}if(!r||!r.isPropagationStopped||!r.isImmediatePropagationStopped){const n=r||Y.event;r={};const s=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const a in n)s.includes(a)||a==="returnValue"&&n.preventDefault||(r[a]=n[a]);if(r.target||(r.target=r.srcElement||Te),r.relatedTarget||(r.relatedTarget=r.fromElement===r.target?r.toElement:r.fromElement),r.preventDefault=function(){n.preventDefault&&n.preventDefault(),r.returnValue=!1,n.returnValue=!1,r.defaultPrevented=!0},r.defaultPrevented=!1,r.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),r.cancelBubble=!0,n.cancelBubble=!0,r.isPropagationStopped=e},r.isPropagationStopped=i,r.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),r.isImmediatePropagationStopped=e,r.stopPropagation()},r.isImmediatePropagationStopped=i,r.clientX!==null&&r.clientX!==void 0){const a=Te.documentElement,o=Te.body;r.pageX=r.clientX+(a&&a.scrollLeft||o&&o.scrollLeft||0)-(a&&a.clientLeft||o&&o.clientLeft||0),r.pageY=r.clientY+(a&&a.scrollTop||o&&o.scrollTop||0)-(a&&a.clientTop||o&&o.clientTop||0)}r.which=r.charCode||r.keyCode,r.button!==null&&r.button!==void 0&&(r.button=r.button&1?0:r.button&4?1:r.button&2?2:0)}return r.fixed_=!0,r}let $s;const YT=function(){if(typeof $s!="boolean"){$s=!1;try{const r=Object.defineProperty({},"passive",{get(){$s=!0}});Y.addEventListener("test",null,r),Y.removeEventListener("test",null,r)}catch{}}return $s},XT=["touchstart","touchmove"];function pi(r,e,i){if(Array.isArray(e))return Ul(pi,r,e,i);ei.has(r)||ei.set(r,{});const n=ei.get(r);if(n.handlers||(n.handlers={}),n.handlers[e]||(n.handlers[e]=[]),i.guid||(i.guid=bi()),n.handlers[e].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(s,a){if(n.disabled)return;s=Ra(s);const o=n.handlers[s.type];if(o){const l=o.slice(0);for(let c=0,d=l.length;c<d&&!s.isImmediatePropagationStopped();c++)try{l[c].call(r,s,a)}catch(m){Ye.error(m)}}}),n.handlers[e].length===1)if(r.addEventListener){let s=!1;YT()&&XT.indexOf(e)>-1&&(s={passive:!0}),r.addEventListener(e,n.dispatcher,s)}else r.attachEvent&&r.attachEvent("on"+e,n.dispatcher)}function jt(r,e,i){if(!ei.has(r))return;const n=ei.get(r);if(!n.handlers)return;if(Array.isArray(e))return Ul(jt,r,e,i);const s=function(o,l){n.handlers[l]=[],ad(o,l)};if(e===void 0){for(const o in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},o)&&s(r,o);return}const a=n.handlers[e];if(a){if(!i){s(r,e);return}if(i.guid)for(let o=0;o<a.length;o++)a[o].guid===i.guid&&a.splice(o--,1);ad(r,e)}}function gr(r,e,i){const n=ei.has(r)?ei.get(r):{},s=r.parentNode||r.ownerDocument;if(typeof e=="string"?e={type:e,target:r}:e.target||(e.target=r),e=Ra(e),n.dispatcher&&n.dispatcher.call(r,e,i),s&&!e.isPropagationStopped()&&e.bubbles===!0)gr.call(null,s,e,i);else if(!s&&!e.defaultPrevented&&e.target&&e.target[e.type]){ei.has(e.target)||ei.set(e.target,{});const a=ei.get(e.target);e.target[e.type]&&(a.disabled=!0,typeof e.target[e.type]=="function"&&e.target[e.type](),a.disabled=!1)}return!e.defaultPrevented}function Va(r,e,i){if(Array.isArray(e))return Ul(Va,r,e,i);const n=function(){jt(r,e,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||bi(),pi(r,e,n)}function zl(r,e,i){const n=function(){jt(r,e,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||bi(),pi(r,e,n)}var KT=Object.freeze({__proto__:null,fixEvent:Ra,on:pi,off:jt,trigger:gr,one:Va,any:zl});const Ci=30,ct=function(r,e,i){e.guid||(e.guid=bi());const n=e.bind(r);return n.guid=i?i+"_"+e.guid:e.guid,n},ji=function(r,e){let i=Y.performance.now();return function(...s){const a=Y.performance.now();a-i>=e&&(r(...s),i=a)}},p0=function(r,e,i,n=Y){let s;const a=()=>{n.clearTimeout(s),s=null},o=function(){const l=this,c=arguments;let d=function(){s=null,d=null,i||r.apply(l,c)};!s&&i&&r.apply(l,c),n.clearTimeout(s),s=n.setTimeout(d,e)};return o.cancel=a,o};var QT=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:Ci,bind_:ct,throttle:ji,debounce:p0});let zr;class mi{on(e,i){const n=this.addEventListener;this.addEventListener=()=>{},pi(this,e,i),this.addEventListener=n}off(e,i){jt(this,e,i)}one(e,i){const n=this.addEventListener;this.addEventListener=()=>{},Va(this,e,i),this.addEventListener=n}any(e,i){const n=this.addEventListener;this.addEventListener=()=>{},zl(this,e,i),this.addEventListener=n}trigger(e){const i=e.type||e;typeof e=="string"&&(e={type:i}),e=Ra(e),this.allowedEvents_[i]&&this["on"+i]&&this["on"+i](e),gr(this,e)}queueTrigger(e){zr||(zr=new Map);const i=e.type||e;let n=zr.get(this);n||(n=new Map,zr.set(this,n));const s=n.get(i);n.delete(i),Y.clearTimeout(s);const a=Y.setTimeout(()=>{n.delete(i),n.size===0&&(n=null,zr.delete(this)),this.trigger(e)},0);n.set(i,a)}}mi.prototype.allowedEvents_={};mi.prototype.addEventListener=mi.prototype.on;mi.prototype.removeEventListener=mi.prototype.off;mi.prototype.dispatchEvent=mi.prototype.trigger;const Fa=r=>typeof r.name=="function"?r.name():typeof r.name=="string"?r.name:r.name_?r.name_:r.constructor&&r.constructor.name?r.constructor.name:typeof r,nn=r=>r instanceof mi||!!r.eventBusEl_&&["on","one","off","trigger"].every(e=>typeof r[e]=="function"),ZT=(r,e)=>{nn(r)?e():(r.eventedCallbacks||(r.eventedCallbacks=[]),r.eventedCallbacks.push(e))},ul=r=>typeof r=="string"&&/\S/.test(r)||Array.isArray(r)&&!!r.length,la=(r,e,i)=>{if(!r||!r.nodeName&&!nn(r))throw new Error(`Invalid target for ${Fa(e)}#${i}; must be a DOM node or evented object.`)},m0=(r,e,i)=>{if(!ul(r))throw new Error(`Invalid event type for ${Fa(e)}#${i}; must be a non-empty string or array.`)},g0=(r,e,i)=>{if(typeof r!="function")throw new Error(`Invalid listener for ${Fa(e)}#${i}; must be a function.`)},Lo=(r,e,i)=>{const n=e.length<3||e[0]===r||e[0]===r.eventBusEl_;let s,a,o;return n?(s=r.eventBusEl_,e.length>=3&&e.shift(),[a,o]=e):(s=e[0],a=e[1],o=e[2]),la(s,r,i),m0(a,r,i),g0(o,r,i),o=ct(r,o),{isTargetingSelf:n,target:s,type:a,listener:o}},kn=(r,e,i,n)=>{la(r,r,e),r.nodeName?KT[e](r,i,n):r[e](i,n)},JT={on(...r){const{isTargetingSelf:e,target:i,type:n,listener:s}=Lo(this,r,"on");if(kn(i,"on",n,s),!e){const a=()=>this.off(i,n,s);a.guid=s.guid;const o=()=>this.off("dispose",a);o.guid=s.guid,kn(this,"on","dispose",a),kn(i,"on","dispose",o)}},one(...r){const{isTargetingSelf:e,target:i,type:n,listener:s}=Lo(this,r,"one");if(e)kn(i,"one",n,s);else{const a=(...o)=>{this.off(i,n,a),s.apply(null,o)};a.guid=s.guid,kn(i,"one",n,a)}},any(...r){const{isTargetingSelf:e,target:i,type:n,listener:s}=Lo(this,r,"any");if(e)kn(i,"any",n,s);else{const a=(...o)=>{this.off(i,n,a),s.apply(null,o)};a.guid=s.guid,kn(i,"any",n,a)}},off(r,e,i){if(!r||ul(r))jt(this.eventBusEl_,r,e);else{const n=r,s=e;la(n,this,"off"),m0(s,this,"off"),g0(i,this,"off"),i=ct(this,i),this.off("dispose",i),n.nodeName?(jt(n,s,i),jt(n,"dispose",i)):nn(n)&&(n.off(s,i),n.off("dispose",i))}},trigger(r,e){la(this.eventBusEl_,this,"trigger");const i=r&&typeof r!="string"?r.type:r;if(!ul(i))throw new Error(`Invalid event type for ${Fa(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return gr(this.eventBusEl_,r,e)}};function Hl(r,e={}){const{eventBusKey:i}=e;if(i){if(!r[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);r.eventBusEl_=r[i]}else r.eventBusEl_=Me("span",{className:"vjs-event-bus"});return Object.assign(r,JT),r.eventedCallbacks&&r.eventedCallbacks.forEach(n=>{n()}),r.on("dispose",()=>{r.off(),[r,r.el_,r.eventBusEl_].forEach(function(n){n&&ei.has(n)&&ei.delete(n)}),Y.setTimeout(()=>{r.eventBusEl_=null},0)}),r}const eb={state:{},setState(r){typeof r=="function"&&(r=r());let e;return Xn(r,(i,n)=>{this.state[n]!==i&&(e=e||{},e[n]={from:this.state[n],to:i}),this.state[n]=i}),e&&nn(this)&&this.trigger({changes:e,type:"statechanged"}),e}};function v0(r,e){return Object.assign(r,eb),r.state=Object.assign({},r.state,e),typeof r.handleStateChanged=="function"&&nn(r)&&r.on("statechanged",r.handleStateChanged),r}const Qr=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toLowerCase())},_t=function(r){return typeof r!="string"?r:r.replace(/./,e=>e.toUpperCase())},y0=function(r,e){return _t(r)===_t(e)};var tb=Object.freeze({__proto__:null,toLowerCase:Qr,toTitleCase:_t,titleCaseEquals:y0});class he{constructor(e,i,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=lt({},this.options_),i=this.options_=lt(this.options_,i),this.id_=i.id||i.el&&i.el.id,!this.id_){const s=e&&e.id&&e.id()||"no_player";this.id_=`${s}_component_${bi()}`}this.name_=i.name||null,i.el?this.el_=i.el:i.createEl!==!1&&(this.el_=this.createEl()),i.className&&this.el_&&i.className.split(" ").forEach(s=>this.addClass(s)),["on","off","one","any","trigger"].forEach(s=>{this[s]=void 0}),i.evented!==!1&&(Hl(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),v0(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,i.initChildren!==!1&&this.initChildren(),this.ready(n),i.reportTouchActivity!==!1&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let i=this.children_.length-1;i>=0;i--)this.children_[i].dispose&&this.children_[i].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return!!this.isDisposed_}player(){return this.player_}options(e){return e?(this.options_=lt(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,i,n){return Me(e,i,n)}localize(e,i,n=e){const s=this.player_.language&&this.player_.language(),a=this.player_.languages&&this.player_.languages(),o=a&&a[s],l=s&&s.split("-")[0],c=a&&a[l];let d=n;return o&&o[e]?d=o[e]:c&&c[e]&&(d=c[e]),i&&(d=d.replace(/\{(\d+)\}/g,function(m,g){const S=i[g-1];let T=S;return typeof S>"u"&&(T=m),T})),d}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((n,s)=>n.concat(s),[]);let i=this;for(let n=0;n<e.length;n++)if(i=i.getChild(e[n]),!i||!i.getChild)return;return i}setIcon(e,i=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const n="http://www.w3.org/2000/svg",s=Me("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),a=Te.createElementNS(n,"svg");a.setAttributeNS(null,"viewBox","0 0 512 512");const o=Te.createElementNS(n,"use");return a.appendChild(o),o.setAttributeNS(null,"href",`#vjs-icon-${e}`),s.appendChild(a),this.iconIsSet_?i.replaceChild(s,i.querySelector(".vjs-icon-placeholder")):i.appendChild(s),this.iconIsSet_=!0,s}addChild(e,i={},n=this.children_.length){let s,a;if(typeof e=="string"){a=_t(e);const o=i.componentClass||a;i.name=a;const l=he.getComponent(o);if(!l)throw new Error(`Component ${o} does not exist`);if(typeof l!="function")return null;s=new l(this.player_||this,i)}else s=e;if(s.parentComponent_&&s.parentComponent_.removeChild(s),this.children_.splice(n,0,s),s.parentComponent_=this,typeof s.id=="function"&&(this.childIndex_[s.id()]=s),a=a||s.name&&_t(s.name()),a&&(this.childNameIndex_[a]=s,this.childNameIndex_[Qr(a)]=s),typeof s.el=="function"&&s.el()){let o=null;this.children_[n+1]&&(this.children_[n+1].el_?o=this.children_[n+1].el_:mr(this.children_[n+1])&&(o=this.children_[n+1])),this.contentEl().insertBefore(s.el(),o)}return s}removeChild(e){if(typeof e=="string"&&(e=this.getChild(e)),!e||!this.children_)return;let i=!1;for(let s=this.children_.length-1;s>=0;s--)if(this.children_[s]===e){i=!0,this.children_.splice(s,1);break}if(!i)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[_t(e.name())]=null,this.childNameIndex_[Qr(e.name())]=null;const n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const i=this.options_,n=o=>{const l=o.name;let c=o.opts;if(i[l]!==void 0&&(c=i[l]),c===!1)return;c===!0&&(c={}),c.playerOptions=this.options_.playerOptions;const d=this.addChild(l,c);d&&(this[l]=d)};let s;const a=he.getComponent("Tech");Array.isArray(e)?s=e:s=Object.keys(e),s.concat(Object.keys(this.options_).filter(function(o){return!s.some(function(l){return typeof l=="string"?o===l:o===l.name})})).map(o=>{let l,c;return typeof o=="string"?(l=o,c=e[l]||this.options_[l]||{}):(l=o.name,c=o),{name:l,opts:c}}).filter(o=>{const l=he.getComponent(o.opts.componentClass||_t(o.name));return l&&!a.isTech(l)}).forEach(n)}}buildCSSClass(){return""}ready(e,i=!1){if(e){if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}i?e.call(this):this.setTimeout(e,1)}}triggerReady(){this.isReady_=!0,this.setTimeout(function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach(function(i){i.call(this)},this),this.trigger("ready")},1)}$(e,i){return _n(e,i||this.contentEl())}$$(e,i){return l0(e,i||this.contentEl())}hasClass(e){return Kr(this.el_,e)}addClass(...e){Bn(this.el_,...e)}removeClass(...e){Ba(this.el_,...e)}toggleClass(e,i){e0(this.el_,e,i)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return i0(this.el_,e)}setAttribute(e,i){ur(this.el_,e,i)}removeAttribute(e){La(this.el_,e)}width(e,i){return this.dimension("width",e,i)}height(e,i){return this.dimension("height",e,i)}dimensions(e,i){this.width(e,!0),this.height(i)}dimension(e,i,n){if(i!==void 0){(i===null||i!==i)&&(i=0),(""+i).indexOf("%")!==-1||(""+i).indexOf("px")!==-1?this.el_.style[e]=i:i==="auto"?this.el_.style[e]="":this.el_.style[e]=i+"px",n||this.trigger("componentresize");return}if(!this.el_)return 0;const s=this.el_.style[e],a=s.indexOf("px");return parseInt(a!==-1?s.slice(0,a):this.el_["offset"+_t(e)],10)}currentDimension(e){let i=0;if(e!=="width"&&e!=="height")throw new Error("currentDimension only accepts width or height value");if(i=dr(this.el_,e),i=parseFloat(i),i===0||isNaN(i)){const n=`offset${_t(e)}`;i=this.el_[n]}return i}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const e=this.el_.getBoundingClientRect(),i={x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},n={x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2};return{boundingClientRect:i,center:n}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&(e.key!=="Tab"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)&&e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e=0,i=null;const n=10,s=200;let a;this.on("touchstart",function(l){l.touches.length===1&&(i={pageX:l.touches[0].pageX,pageY:l.touches[0].pageY},e=Y.performance.now(),a=!0)}),this.on("touchmove",function(l){if(l.touches.length>1)a=!1;else if(i){const c=l.touches[0].pageX-i.pageX,d=l.touches[0].pageY-i.pageY;Math.sqrt(c*c+d*d)>n&&(a=!1)}});const o=function(){a=!1};this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",function(l){i=null,a===!0&&Y.performance.now()-e<s&&(l.preventDefault(),this.trigger("tap"))})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=ct(this.player(),this.player().reportUserActivity);let i;this.on("touchstart",function(){e(),this.clearInterval(i),i=this.setInterval(e,250)});const n=function(s){e(),this.clearInterval(i)};this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)}setTimeout(e,i){var n;return e=ct(this,e),this.clearTimersOnDispose_(),n=Y.setTimeout(()=>{this.setTimeoutIds_.has(n)&&this.setTimeoutIds_.delete(n),e()},i),this.setTimeoutIds_.add(n),n}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),Y.clearTimeout(e)),e}setInterval(e,i){e=ct(this,e),this.clearTimersOnDispose_();const n=Y.setInterval(e,i);return this.setIntervalIds_.add(n),n}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),Y.clearInterval(e)),e}requestAnimationFrame(e){this.clearTimersOnDispose_();var i;return e=ct(this,e),i=Y.requestAnimationFrame(()=>{this.rafIds_.has(i)&&this.rafIds_.delete(i),e()}),this.rafIds_.add(i),i}requestNamedAnimationFrame(e,i){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),i=ct(this,i);const n=this.requestAnimationFrame(()=>{i(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)});return this.namedRafs_.set(e,n),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),Y.cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,i])=>{this[e].forEach((n,s)=>this[i](s))}),this.clearingTimersOnDispose_=!1}))}getIsDisabled(){return!!this.el_.disabled}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function i(a){const o=Y.getComputedStyle(a,null),l=o.getPropertyValue("visibility");return o.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(l)}function n(a){return!(!i(a.parentElement)||!i(a)||a.style.opacity==="0"||Y.getComputedStyle(a).height==="0px"||Y.getComputedStyle(a).width==="0px")}function s(a){if(a.offsetWidth+a.offsetHeight+a.getBoundingClientRect().height+a.getBoundingClientRect().width===0)return!1;const o={x:a.getBoundingClientRect().left+a.offsetWidth/2,y:a.getBoundingClientRect().top+a.offsetHeight/2};if(o.x<0||o.x>(Te.documentElement.clientWidth||Y.innerWidth)||o.y<0||o.y>(Te.documentElement.clientHeight||Y.innerHeight))return!1;let l=Te.elementFromPoint(o.x,o.y);for(;l;){if(l===a)return!0;if(l.parentNode)l=l.parentNode;else return!1}}return e||(e=this.el()),!!(s(e)&&n(e)&&(!e.parentElement||e.tabIndex>=0))}static registerComponent(e,i){if(typeof e!="string"||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const n=he.getComponent("Tech"),s=n&&n.isTech(i),a=he===i||he.prototype.isPrototypeOf(i.prototype);if(s||!a){let l;throw s?l="techs must be registered using Tech.registerTech()":l="must be a Component subclass",new Error(`Illegal component, "${e}"; ${l}.`)}e=_t(e),he.components_||(he.components_={});const o=he.getComponent("Player");if(e==="Player"&&o&&o.players){const l=o.players,c=Object.keys(l);if(l&&c.length>0){for(let d=0;d<c.length;d++)if(l[c[d]]!==null)throw new Error("Can not register Player component after player has been created.")}}return he.components_[e]=i,he.components_[Qr(e)]=i,i}static getComponent(e){if(!(!e||!he.components_))return he.components_[e]}}he.registerComponent("Component",he);function ib(r,e,i){if(typeof e!="number"||e<0||e>i)throw new Error(`Failed to execute '${r}' on 'TimeRanges': The index provided (${e}) is non-numeric or out of bounds (0-${i}).`)}function od(r,e,i,n){return ib(r,n,i.length-1),i[n][e]}function Po(r){let e;return r===void 0||r.length===0?e={length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:e={length:r.length,start:od.bind(null,"start",0,r),end:od.bind(null,"end",1,r)},Y.Symbol&&Y.Symbol.iterator&&(e[Y.Symbol.iterator]=()=>(r||[]).values()),e}function Ni(r,e){return Array.isArray(r)?Po(r):r===void 0||e===void 0?Po():Po([[r,e]])}const _0=function(r,e){r=r<0?0:r;let i=Math.floor(r%60),n=Math.floor(r/60%60),s=Math.floor(r/3600);const a=Math.floor(e/60%60),o=Math.floor(e/3600);return(isNaN(r)||r===1/0)&&(s=n=i="-"),s=s>0||o>0?s+":":"",n=((s||a>=10)&&n<10?"0"+n:n)+":",i=i<10?"0"+i:i,s+n+i};let ql=_0;function T0(r){ql=r}function b0(){ql=_0}function Rn(r,e=r){return ql(r,e)}var nb=Object.freeze({__proto__:null,createTimeRanges:Ni,createTimeRange:Ni,setFormatTime:T0,resetFormatTime:b0,formatTime:Rn});function C0(r,e){let i=0,n,s;if(!e)return 0;(!r||!r.length)&&(r=Ni(0,0));for(let a=0;a<r.length;a++)n=r.start(a),s=r.end(a),s>e&&(s=e),i+=s-n;return i/e}function gt(r){if(r instanceof gt)return r;typeof r=="number"?this.code=r:typeof r=="string"?this.message=r:Hi(r)&&(typeof r.code=="number"&&(this.code=r.code),Object.assign(this,r)),this.message||(this.message=gt.defaultMessages[this.code]||"")}gt.prototype.code=0;gt.prototype.message="";gt.prototype.status=null;gt.prototype.metadata=null;gt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];gt.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};gt.MEDIA_ERR_CUSTOM=0;gt.prototype.MEDIA_ERR_CUSTOM=0;gt.MEDIA_ERR_ABORTED=1;gt.prototype.MEDIA_ERR_ABORTED=1;gt.MEDIA_ERR_NETWORK=2;gt.prototype.MEDIA_ERR_NETWORK=2;gt.MEDIA_ERR_DECODE=3;gt.prototype.MEDIA_ERR_DECODE=3;gt.MEDIA_ERR_SRC_NOT_SUPPORTED=4;gt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;gt.MEDIA_ERR_ENCRYPTED=5;gt.prototype.MEDIA_ERR_ENCRYPTED=5;function Zr(r){return r!=null&&typeof r.then=="function"}function Fi(r){Zr(r)&&r.then(null,e=>{})}const cl=function(r){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((i,n,s)=>(r[n]&&(i[n]=r[n]),i),{cues:r.cues&&Array.prototype.map.call(r.cues,function(i){return{startTime:i.startTime,endTime:i.endTime,text:i.text,id:i.id}})})},rb=function(r){const e=r.$$("track"),i=Array.prototype.map.call(e,s=>s.track);return Array.prototype.map.call(e,function(s){const a=cl(s.track);return s.src&&(a.src=s.src),a}).concat(Array.prototype.filter.call(r.textTracks(),function(s){return i.indexOf(s)===-1}).map(cl))},sb=function(r,e){return r.forEach(function(i){const n=e.addRemoteTextTrack(i).track;!i.src&&i.cues&&i.cues.forEach(s=>n.addCue(s))}),e.textTracks()};var dl={textTracksToJson:rb,jsonToTextTracks:sb,trackToJson:cl};const Mo="vjs-modal-dialog";class vr extends he{constructor(e,i){super(e,i),this.handleKeyDown_=n=>this.handleKeyDown(n),this.close_=n=>this.close(n),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=Me("div",{className:`${Mo}-content`},{role:"document"}),this.descEl_=Me("p",{className:`${Mo}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),Tn(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${Mo} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e}open(){if(this.opened_){this.options_.fillAlways&&this.fill();return}const e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown_),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}opened(e){return typeof e=="boolean"&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown_),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if(typeof e=="boolean"){const i=this.closeable_=!!e;let n=this.getChild("closeButton");if(i&&!n){const s=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=s,this.on(n,"close",this.close_)}!i&&n&&(this.off(n,"close",this.close_),this.removeChild(n),n.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const i=this.contentEl(),n=i.parentNode,s=i.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(i),this.empty(),o0(i,e),this.trigger("modalfill"),s?n.insertBefore(i,s):n.appendChild(i);const a=this.getChild("closeButton");a&&n.appendChild(a.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),Ma(this.contentEl()),this.trigger("modalempty")}content(e){return typeof e<"u"&&(this.content_=e),this.content_}conditionalFocus_(){const e=Te.activeElement,i=this.player_.el_;this.previouslyActiveEl_=null,(i.contains(e)||i===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),e.key==="Escape"&&this.closeable()){e.preventDefault(),this.close();return}if(e.key!=="Tab")return;const i=this.focusableEls_(),n=this.el_.querySelector(":focus");let s;for(let a=0;a<i.length;a++)if(n===i[a]){s=a;break}Te.activeElement===this.el_&&(s=0),e.shiftKey&&s===0?(i[i.length-1].focus(),e.preventDefault()):!e.shiftKey&&s===i.length-1&&(i[0].focus(),e.preventDefault())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,i=>(i instanceof Y.HTMLAnchorElement||i instanceof Y.HTMLAreaElement)&&i.hasAttribute("href")||(i instanceof Y.HTMLInputElement||i instanceof Y.HTMLSelectElement||i instanceof Y.HTMLTextAreaElement||i instanceof Y.HTMLButtonElement)&&!i.hasAttribute("disabled")||i instanceof Y.HTMLIFrameElement||i instanceof Y.HTMLObjectElement||i instanceof Y.HTMLEmbedElement||i.hasAttribute("tabindex")&&i.getAttribute("tabindex")!==-1||i.hasAttribute("contenteditable"))}}vr.prototype.options_={pauseOnOpen:!0,temporary:!0};he.registerComponent("ModalDialog",vr);class Vn extends mi{constructor(e=[]){super(),this.tracks_=[];for(let i=0;i<e.length;i++)this.addTrack(e[i])}get length(){return this.tracks_.length}addTrack(e){const i=this.tracks_.length;""+i in this||Object.defineProperty(this,i,{get(){return this.tracks_[i]}}),this.tracks_.indexOf(e)===-1&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},nn(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let i;for(let n=0,s=this.length;n<s;n++)if(this[n]===e){i=this[n],i.off&&i.off(),this.tracks_.splice(n,1);break}i&&this.trigger({track:i,type:"removetrack",target:this})}getTrackById(e){let i=null;for(let n=0,s=this.length;n<s;n++){const a=this[n];if(a.id===e){i=a;break}}return i}}Vn.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const r in Vn.prototype.allowedEvents_)Vn.prototype["on"+r]=null;const Ro=function(r,e){for(let i=0;i<r.length;i++)!Object.keys(r[i]).length||e.id===r[i].id||(r[i].enabled=!1)};class x0 extends Vn{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].enabled){Ro(e,e[i]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&Ro(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,Ro(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const Vo=function(r,e){for(let i=0;i<r.length;i++)!Object.keys(r[i]).length||e.id===r[i].id||(r[i].selected=!1)};class S0 extends Vn{constructor(e=[]){for(let i=e.length-1;i>=0;i--)if(e[i].selected){Vo(e,e[i]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let i=0;i<this.length;i++)if(this[i].selected)return i;return-1},set(){}})}addTrack(e){e.selected&&Vo(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,Vo(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class jl extends Vn{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(e.kind)===-1&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map(e=>e.toJSON())}}class ab{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let i=0,n=e.length;i<n;i++)this.addTrackElement_(e[i])}addTrackElement_(e){const i=this.trackElements_.length;""+i in this||Object.defineProperty(this,i,{get(){return this.trackElements_[i]}}),this.trackElements_.indexOf(e)===-1&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let i;for(let n=0,s=this.trackElements_.length;n<s;n++)if(e===this.trackElements_[n].track){i=this.trackElements_[n];break}return i}removeTrackElement_(e){for(let i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i]){this.trackElements_[i].track&&typeof this.trackElements_[i].track.off=="function"&&this.trackElements_[i].track.off(),typeof this.trackElements_[i].off=="function"&&this.trackElements_[i].off(),this.trackElements_.splice(i,1);break}}}class ua{constructor(e){ua.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const i=this.length||0;let n=0;const s=e.length;this.cues_=e,this.length_=e.length;const a=function(o){""+o in this||Object.defineProperty(this,""+o,{get(){return this.cues_[o]}})};if(i<s)for(n=i;n<s;n++)a.call(this,n)}getCueById(e){let i=null;for(let n=0,s=this.length;n<s;n++){const a=this[n];if(a.id===e){i=a;break}}return i}}const ob={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},lb={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},ub={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},ld={disabled:"disabled",hidden:"hidden",showing:"showing"};class Gl extends mi{constructor(e={}){super();const i={id:e.id||"vjs_track_"+bi(),kind:e.kind||"",language:e.language||""};let n=e.label||"";for(const s in i)Object.defineProperty(this,s,{get(){return i[s]},set(){}});Object.defineProperty(this,"label",{get(){return n},set(s){s!==n&&(n=s,this.trigger("labelchange"))}})}}const Wl=function(r){return new URL(r,Te.baseURI)},E0=function(r){return new URL(r,Te.baseURI).href},Yl=function(r){if(typeof r=="string"){const i=r.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return i?i[1].toLowerCase():""}return""},$a=function(r,e=Y.location){return Wl(r).origin!==e.origin};var cb=Object.freeze({__proto__:null,parseUrl:Wl,getAbsoluteURL:E0,getFileExtension:Yl,isCrossOrigin:$a});const ud=function(r,e){const i=new Y.WebVTT.Parser(Y,Y.vttjs,Y.WebVTT.StringDecoder()),n=[];i.oncue=function(s){e.addCue(s)},i.onparsingerror=function(s){n.push(s)},i.onflush=function(){e.trigger({type:"loadeddata",target:e})},i.parse(r),n.length>0&&(Y.console&&Y.console.groupCollapsed&&Y.console.groupCollapsed(`Text Track parsing errors for ${e.src}`),n.forEach(s=>Ye.error(s)),Y.console&&Y.console.groupEnd&&Y.console.groupEnd()),i.flush()},cd=function(r,e){const i={uri:r},n=$a(r);n&&(i.cors=n);const s=e.tech_.crossOrigin()==="use-credentials";s&&(i.withCredentials=s),wh(i,ct(this,function(a,o,l){if(a)return Ye.error(a,o);e.loaded_=!0,typeof Y.WebVTT!="function"?e.tech_&&e.tech_.any(["vttjsloaded","vttjserror"],c=>{if(c.type==="vttjserror"){Ye.error(`vttjs failed to load, stopping trying to process ${e.src}`);return}return ud(l,e)}):ud(l,e)}))};class ls extends Gl{constructor(e={}){if(!e.tech)throw new Error("A tech was not provided.");const i=lt(e,{kind:ub[e.kind]||"subtitles",language:e.language||e.srclang||""});let n=ld[i.mode]||"disabled";const s=i.default;(i.kind==="metadata"||i.kind==="chapters")&&(n="hidden"),super(i),this.tech_=i.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;const a=new ua(this.cues_),o=new ua(this.activeCues_);let l=!1;this.timeupdateHandler=ct(this,function(d={}){if(!this.tech_.isDisposed()){if(!this.tech_.isReady_){d.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler));return}this.activeCues=this.activeCues,l&&(this.trigger("cuechange"),l=!1),d.type!=="timeupdate"&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))}});const c=()=>{this.stopTracking()};this.tech_.one("dispose",c),n!=="disabled"&&this.startTracking(),Object.defineProperties(this,{default:{get(){return s},set(){}},mode:{get(){return n},set(d){ld[d]&&n!==d&&(n=d,!this.preload_&&n!=="disabled"&&this.cues.length===0&&cd(this.src,this),this.stopTracking(),n!=="disabled"&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?a:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return o;const d=this.tech_.currentTime(),m=[];for(let g=0,S=this.cues.length;g<S;g++){const T=this.cues[g];T.startTime<=d&&T.endTime>=d&&m.push(T)}if(l=!1,m.length!==this.activeCues_.length)l=!0;else for(let g=0;g<m.length;g++)this.activeCues_.indexOf(m[g])===-1&&(l=!0);return this.activeCues_=m,o.setCues_(this.activeCues_),o},set(){}}}),i.src?(this.src=i.src,this.preload_||(this.loaded_=!0),(this.preload_||i.kind!=="subtitles"&&i.kind!=="captions")&&cd(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let i=e;if(!("getCueAsHTML"in i)){i=new Y.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(const s in e)s in i||(i[s]=e[s]);i.id=e.id,i.originalCue_=e}const n=this.tech_.textTracks();for(let s=0;s<n.length;s++)n[s]!==this&&n[s].removeCue(i);this.cues_.push(i),this.cues.setCues_(this.cues_)}toJSON(){return dl.trackToJson(this)}removeCue(e){let i=this.cues_.length;for(;i--;){const n=this.cues_[i];if(n===e||n.originalCue_&&n.originalCue_===e){this.cues_.splice(i,1),this.cues.setCues_(this.cues_);break}}}}ls.prototype.allowedEvents_={cuechange:"cuechange"};class k0 extends Gl{constructor(e={}){const i=lt(e,{kind:lb[e.kind]||""});super(i);let n=!1;Object.defineProperty(this,"enabled",{get(){return n},set(s){typeof s!="boolean"||s===n||(n=s,this.trigger("enabledchange"))}}),i.enabled&&(this.enabled=i.enabled),this.loaded_=!0}}class w0 extends Gl{constructor(e={}){const i=lt(e,{kind:ob[e.kind]||""});super(i);let n=!1;Object.defineProperty(this,"selected",{get(){return n},set(s){typeof s!="boolean"||s===n||(n=s,this.trigger("selectedchange"))}}),i.selected&&(this.selected=i.selected)}}class rn extends mi{constructor(e={}){super();let i;const n=new ls(e);this.kind=n.kind,this.src=n.src,this.srclang=n.language,this.label=n.label,this.default=n.default,Object.defineProperties(this,{readyState:{get(){return i}},track:{get(){return n}}}),i=rn.NONE,n.addEventListener("loadeddata",()=>{i=rn.LOADED,this.trigger({type:"load",target:this})})}}rn.prototype.allowedEvents_={load:"load"};rn.NONE=0;rn.LOADING=1;rn.LOADED=2;rn.ERROR=3;const yi={audio:{ListClass:x0,TrackClass:k0,capitalName:"Audio"},video:{ListClass:S0,TrackClass:w0,capitalName:"Video"},text:{ListClass:jl,TrackClass:ls,capitalName:"Text"}};Object.keys(yi).forEach(function(r){yi[r].getterName=`${r}Tracks`,yi[r].privateName=`${r}Tracks_`});const hr={remoteText:{ListClass:jl,TrackClass:ls,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:ab,TrackClass:rn,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Jt=Object.assign({},yi,hr);hr.names=Object.keys(hr);yi.names=Object.keys(yi);Jt.names=[].concat(hr.names).concat(yi.names);function db(r,e,i,n,s={}){const a=r.textTracks();s.kind=e,i&&(s.label=i),n&&(s.language=n),s.tech=r;const o=new Jt.text.TrackClass(s);return a.addTrack(o),o}class ze extends he{constructor(e={},i=function(){}){e.reportTouchActivity=!1,super(null,e,i),this.onDurationChange_=n=>this.onDurationChange(n),this.trackProgress_=n=>this.trackProgress(n),this.trackCurrentTime_=n=>this.trackCurrentTime(n),this.stopTrackingCurrentTime_=n=>this.stopTrackingCurrentTime(n),this.disposeSourceHandler_=n=>this.disposeSourceHandler(n),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),Jt.names.forEach(n=>{const s=Jt[n];e&&e[s.getterName]&&(this[s.privateName]=e[s.getterName])}),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(n=>{e[`native${n}Tracks`]===!1&&(this[`featuresNative${n}Tracks`]=!1)}),e.nativeCaptions===!1||e.nativeTextTracks===!1?this.featuresNativeTextTracks=!1:(e.nativeCaptions===!0||e.nativeTextTracks===!0)&&(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new Jt.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",()=>this.setTimeout(()=>this.triggerSourceset(e),1)),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(ct(this,function(){const i=this.bufferedPercent();this.bufferedPercent_!==i&&this.trigger("progress"),this.bufferedPercent_=i,i===1&&this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return Ni(0,0)}bufferedPercent(){return C0(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(yi.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}clearTracks(e){e=[].concat(e),e.forEach(i=>{const n=this[`${i}Tracks`]()||[];let s=n.length;for(;s--;){const a=n[s];i==="text"&&this.removeRemoteTextTrack(a),n.removeTrack(a)}})}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let i=e.length;for(;i--;){const n=e[i];this.removeRemoteTextTrack(n)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return e!==void 0&&(this.error_=new gt(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?Ni(0,0):Ni()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){yi.names.forEach(e=>{const i=yi[e],n=()=>{this.trigger(`${e}trackchange`)},s=this[i.getterName]();s.addEventListener("removetrack",n),s.addEventListener("addtrack",n),this.on("dispose",()=>{s.removeEventListener("removetrack",n),s.removeEventListener("addtrack",n)})})}addWebVttScript_(){if(!Y.WebVTT)if(Te.body.contains(this.el())){if(!this.options_["vtt.js"]&&lr(Lc)&&Object.keys(Lc).length>0){this.trigger("vttjsloaded");return}const e=Te.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",()=>{e.onload=null,e.onerror=null}),Y.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),i=this.remoteTextTracks(),n=l=>e.addTrack(l.track),s=l=>e.removeTrack(l.track);i.on("addtrack",n),i.on("removetrack",s),this.addWebVttScript_();const a=()=>this.trigger("texttrackchange"),o=()=>{a();for(let l=0;l<e.length;l++){const c=e[l];c.removeEventListener("cuechange",a),c.mode==="showing"&&c.addEventListener("cuechange",a)}};o(),e.addEventListener("change",o),e.addEventListener("addtrack",o),e.addEventListener("removetrack",o),this.on("dispose",function(){i.off("addtrack",n),i.off("removetrack",s),e.removeEventListener("change",o),e.removeEventListener("addtrack",o),e.removeEventListener("removetrack",o);for(let l=0;l<e.length;l++)e[l].removeEventListener("cuechange",a)})}addTextTrack(e,i,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return db(this,e,i,n)}createRemoteTextTrack(e){const i=lt(e,{tech:this});return new hr.remoteTextEl.TrackClass(i)}addRemoteTextTrack(e={},i){const n=this.createRemoteTextTrack(e);return typeof i!="boolean"&&(i=!1),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),i===!1&&this.ready(()=>this.autoRemoteTextTracks_.addTrack(n.track)),n}removeRemoteTextTrack(e){const i=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(i),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const i=bi();return!this.isReady_||this.paused()?(this.queuedHanders_.add(i),this.one("playing",()=>{this.queuedHanders_.has(i)&&(this.queuedHanders_.delete(i),e())})):this.requestNamedAnimationFrame(i,e),i}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,i){return ze.canPlayType(e.type)}static isTech(e){return e.prototype instanceof ze||e instanceof ze||e===ze}static registerTech(e,i){if(ze.techs_||(ze.techs_={}),!ze.isTech(i))throw new Error(`Tech ${e} must be a Tech`);if(!ze.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!ze.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=_t(e),ze.techs_[e]=i,ze.techs_[Qr(e)]=i,e!=="Tech"&&ze.defaultTechOrder_.push(e),i}static getTech(e){if(e){if(ze.techs_&&ze.techs_[e])return ze.techs_[e];if(e=_t(e),Y&&Y.videojs&&Y.videojs[e])return Ye.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),Y.videojs[e]}}}Jt.names.forEach(function(r){const e=Jt[r];ze.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}});ze.prototype.featuresVolumeControl=!0;ze.prototype.featuresMuteControl=!0;ze.prototype.featuresFullscreenResize=!1;ze.prototype.featuresPlaybackRate=!1;ze.prototype.featuresProgressEvents=!1;ze.prototype.featuresSourceset=!1;ze.prototype.featuresTimeupdateEvents=!1;ze.prototype.featuresNativeTextTracks=!1;ze.prototype.featuresVideoFrameCallback=!1;ze.withSourceHandlers=function(r){r.registerSourceHandler=function(i,n){let s=r.sourceHandlers;s||(s=r.sourceHandlers=[]),n===void 0&&(n=s.length),s.splice(n,0,i)},r.canPlayType=function(i){const n=r.sourceHandlers||[];let s;for(let a=0;a<n.length;a++)if(s=n[a].canPlayType(i),s)return s;return""},r.selectSourceHandler=function(i,n){const s=r.sourceHandlers||[];let a;for(let o=0;o<s.length;o++)if(a=s[o].canHandleSource(i,n),a)return s[o];return null},r.canPlaySource=function(i,n){const s=r.selectSourceHandler(i,n);return s?s.canHandleSource(i,n):""},["seekable","seeking","duration"].forEach(function(i){const n=this[i];typeof n=="function"&&(this[i]=function(){return this.sourceHandler_&&this.sourceHandler_[i]?this.sourceHandler_[i].apply(this.sourceHandler_,arguments):n.apply(this,arguments)})},r.prototype),r.prototype.setSource=function(i){let n=r.selectSourceHandler(i,this.options_);n||(r.nativeSourceHandler?n=r.nativeSourceHandler:Ye.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==r.nativeSourceHandler&&(this.currentSource_=i),this.sourceHandler_=n.handleSource(i,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},r.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}};he.registerComponent("Tech",ze);ze.registerTech("Tech",ze);ze.defaultTechOrder_=[];const Ln={},ca={},da={};function hb(r,e){Ln[r]=Ln[r]||[],Ln[r].push(e)}function fb(r,e,i){r.setTimeout(()=>wn(e,Ln[e.type],i,r),1)}function pb(r,e){r.forEach(i=>i.setTech&&i.setTech(e))}function mb(r,e,i){return r.reduceRight(Xl(i),e[i]())}function gb(r,e,i,n){return e[i](r.reduce(Xl(i),n))}function dd(r,e,i,n=null){const s="call"+_t(i),a=r.reduce(Xl(s),n),o=a===da,l=o?null:e[i](a);return _b(r,i,l,o),l}const vb={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},yb={setCurrentTime:1,setMuted:1,setVolume:1},hd={play:1,pause:1};function Xl(r){return(e,i)=>e===da?da:i[r]?i[r](e):e}function _b(r,e,i,n){for(let s=r.length-1;s>=0;s--){const a=r[s];a[e]&&a[e](n,i)}}function Tb(r){ca.hasOwnProperty(r.id())&&delete ca[r.id()]}function bb(r,e){const i=ca[r.id()];let n=null;if(i==null)return n=e(r),ca[r.id()]=[[e,n]],n;for(let s=0;s<i.length;s++){const[a,o]=i[s];a===e&&(n=o)}return n===null&&(n=e(r),i.push([e,n])),n}function wn(r={},e=[],i,n,s=[],a=!1){const[o,...l]=e;if(typeof o=="string")wn(r,Ln[o],i,n,s,a);else if(o){const c=bb(n,o);if(!c.setSource)return s.push(c),wn(r,l,i,n,s,a);c.setSource(Object.assign({},r),function(d,m){if(d)return wn(r,l,i,n,s,a);s.push(c),wn(m,r.type===m.type?l:Ln[m.type],i,n,s,a)})}else l.length?wn(r,l,i,n,s,a):a?i(r,s):wn(r,Ln["*"],i,n,s,!0)}const Cb={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},ha=function(r=""){const e=Yl(r);return Cb[e.toLowerCase()]||""},xb=(r,e)=>{if(!e)return"";if(r.cache_.source.src===e&&r.cache_.source.type)return r.cache_.source.type;const i=r.cache_.sources.filter(s=>s.src===e);if(i.length)return i[0].type;const n=r.$$("source");for(let s=0;s<n.length;s++){const a=n[s];if(a.type&&a.src&&a.src===e)return a.type}return ha(e)},D0=function(r){if(Array.isArray(r)){let e=[];r.forEach(function(i){i=D0(i),Array.isArray(i)?e=e.concat(i):Hi(i)&&e.push(i)}),r=e}else typeof r=="string"&&r.trim()?r=[fd({src:r})]:Hi(r)&&typeof r.src=="string"&&r.src&&r.src.trim()?r=[fd(r)]:r=[];return r};function fd(r){if(!r.type){const e=ha(r.src);e&&(r.type=e)}return r}var Sb=`<svg xmlns="http://www.w3.org/2000/svg">
38
38
  <defs>
39
39
  <symbol viewBox="0 0 48 48" id="vjs-icon-play">
40
40
  <path d="M16 10v28l22-14z"></path>
@@ -176,8 +176,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
176
176
  <path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>
177
177
  </symbol>
178
178
  </defs>
179
- </svg>`;const pd=sa?10009:aa?461:8,qn={codes:{play:415,pause:19,ff:417,rw:412,back:pd},names:{415:"play",19:"pause",417:"ff",412:"rw",[pd]:"back"},isEventKey(r,e){return e=e.toLowerCase(),!!(this.names[r.keyCode]&&this.names[r.keyCode]===e)},getEventName(r){if(this.names[r.keyCode])return this.names[r.keyCode];if(this.codes[r.code]){const e=this.codes[r.code];return this.names[e]}return null}},md=5;class Eb extends mi{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on("modalclose",()=>{this.refocusComponent()}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const i=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(i.key)){if(this.isPaused_)return;i.preventDefault();const n=i.key.substring(5).toLowerCase();this.move(n)}else if(qn.isEventKey(i,"play")||qn.isEventKey(i,"pause")||qn.isEventKey(i,"ff")||qn.isEventKey(i,"rw")){i.preventDefault();const n=qn.getEventName(i);this.performMediaAction_(n)}else qn.isEventKey(i,"Back")&&e.target&&typeof e.target.closeable=="function"&&e.target.closeable()&&(i.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+md);break;case"rw":this.userSeek_(this.player_.currentTime()-md);break}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const i=e.relatedTarget;let n=null;const s=this.getCurrentComponent(e.target);i&&(n=!!i.closest(".video-js"),i.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!e.currentTarget.contains(e.relatedTarget)&&!n||!i)&&(s&&s.name()==="CloseButton"?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,i=[];function n(s){for(const a of s)a.hasOwnProperty("el_")&&a.getIsFocusable()&&a.getIsAvailableToBeFocused(a.el())&&i.push(a),a.hasOwnProperty("children_")&&a.children_.length>0&&n(a.children_)}return e.children_.forEach(s=>{if(s.hasOwnProperty("el_"))if(s.getIsFocusable&&s.getIsAvailableToBeFocused&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())){i.push(s);return}else s.hasOwnProperty("children_")&&s.children_.length>0?n(s.children_):s.hasOwnProperty("items")&&s.items.length>0?n(s.items):this.findSuitableDOMChild(s)&&i.push(s);if(s.name_==="ErrorDisplay"&&s.opened_){const a=s.el_.querySelector(".vjs-errors-ok-button-container");a&&a.querySelectorAll("button").forEach((l,c)=>{i.push({name:()=>"ModalButton"+(c+1),el:()=>l,getPositions:()=>{const d=l.getBoundingClientRect(),m={x:d.x,y:d.y,width:d.width,height:d.height,top:d.top,right:d.right,bottom:d.bottom,left:d.left},g={x:d.left+d.width/2,y:d.top+d.height/2,width:0,height:0,top:d.top+d.height/2,right:d.left+d.width/2,bottom:d.top+d.height/2,left:d.left+d.width/2};return{boundingClientRect:m,center:g}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:d=>!0,focus:()=>l.focus()})})}}),this.focusableComponents=i,this.focusableComponents}findSuitableDOMChild(e){function i(n){if(e.getIsFocusable(n)&&e.getIsAvailableToBeFocused(n))return n;for(let s=0;s<n.children.length;s++){const a=n.children[s],o=i(a);if(o)return o}return null}return e.el()?i(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const i=e||document.activeElement;if(this.focusableComponents.length){for(const n of this.focusableComponents)if(n.el()===i)return n}}add(e){const i=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&i.push(e),this.focusableComponents=i,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let i=0;i<this.focusableComponents.length;i++)if(this.focusableComponents[i].name()===e.name()){this.focusableComponents.splice(i,1),this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});return}}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(e){const i=this.getCurrentComponent();if(!i)return;const n=i.getPositions(),s=this.focusableComponents.filter(o=>o!==i&&this.isInDirection_(n.boundingClientRect,o.getPositions().boundingClientRect,e)),a=this.findBestCandidate_(n.center,s,e);a?this.focus(a):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:i})}findBestCandidate_(e,i,n){let s=1/0,a=null;for(const o of i){const l=o.getPositions().center,c=this.calculateDistance_(e,l,n);c<s&&(s=c,a=o)}return a}isInDirection_(e,i,n){switch(n){case"right":return i.left>=e.right;case"left":return i.right<=e.left;case"down":return i.top>=e.bottom;case"up":return i.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name()){this.focus(this.focusableComponents[e]);return}}else this.focus(this.updateFocusableComponents()[0])}focus(e){typeof e=="object"&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,i,n){const s=Math.abs(e.x-i.x),a=Math.abs(e.y-i.y);let o;switch(n){case"right":case"left":o=s+a*100;break;case"up":o=a*2+s*.5;break;case"down":o=a*5+s;break;default:o=s+a}return o}searchForTrackSelect_(){const e=this;for(const i of e.updateFocusableComponents())if(i.constructor.name==="TextTrackSelect"){e.focus(i);break}}}class kb extends he{constructor(e,i,n){const s=lt({createEl:!1},i);if(super(e,s,n),!i.playerOptions.sources||i.playerOptions.sources.length===0)for(let a=0,o=i.playerOptions.techOrder;a<o.length;a++){const l=_t(o[a]);let c=ze.getTech(l);if(l||(c=he.getComponent(l)),c&&c.isSupported()){e.loadTech_(l);break}}else e.src(i.playerOptions.sources)}}he.registerComponent("MediaLoader",kb);class Ua extends he{constructor(e,i){super(e,i),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=n=>this.handleMouseOver(n),this.handleMouseOut_=n=>this.handleMouseOut(n),this.handleClick_=n=>this.handleClick(n),this.handleKeyDown_=n=>this.handleKeyDown(n),this.emitTapEvents(),this.enable()}createEl(e="div",i={},n={}){i=Object.assign({className:this.buildCSSClass(),tabIndex:0},i),e==="button"&&We.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),n=Object.assign({role:"button"},n),this.tabIndex_=i.tabIndex;const s=Me(e,i,n);return this.player_.options_.experimentalSvgIcons||s.appendChild(Me("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Me("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,i=this.el()){if(e===void 0)return this.controlText_||"Need Text";const n=this.localize(e);this.controlText_=e,Tn(this.controlTextEl_,n),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&i.setAttribute("title",n)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){e.key===" "||e.key==="Enter"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}he.registerComponent("ClickableComponent",Ua);class hl extends Ua{constructor(e,i){super(e,i),this.update(),this.update_=n=>this.update(n),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return Me("div",{className:"vjs-poster"})}crossOrigin(e){if(typeof e>"u")return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.$("img")&&(this.$("img").crossOrigin=e)}update(e){const i=this.player().poster();this.setSrc(i),i?this.show():this.hide()}setSrc(e){if(!e){this.el_.textContent="";return}this.$("img")||this.el_.appendChild(Me("picture",{className:"vjs-poster",tabIndex:-1},{},Me("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Fi(this.player_.play()):this.player_.pause())}}hl.prototype.crossorigin=hl.prototype.crossOrigin;he.registerComponent("PosterImage",hl);const gi="#222",gd="#ccc",wb={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Fo(r,e){let i;if(r.length===4)i=r[1]+r[1]+r[2]+r[2]+r[3]+r[3];else if(r.length===7)i=r.slice(1);else throw new Error("Invalid color code provided, "+r+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+e+")"}function Mi(r,e,i){try{r.style[e]=i}catch{return}}function vd(r){return r?`${r}px`:""}class Db extends he{constructor(e,i,n){super(e,i,n);const s=o=>this.updateDisplay(o),a=o=>{this.updateDisplayOverlay(),this.updateDisplay(o)};e.on("loadstart",o=>this.toggleDisplay(o)),e.on("useractive",s),e.on("userinactive",s),e.on("texttrackchange",s),e.on("loadedmetadata",o=>{this.updateDisplayOverlay(),this.preselectTrack(o)}),e.ready(ct(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",a),e.on("playerresize",a);const o=Y.screen.orientation||Y,l=Y.screen.orientation?"change":"orientationchange";o.addEventListener(l,a),e.on("dispose",()=>o.removeEventListener(l,a));const c=this.options_.playerOptions.tracks||[];for(let d=0;d<c.length;d++)this.player_.addRemoteTextTrack(c[d],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},i=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage;let s,a,o;for(let l=0;l<i.length;l++){const c=i[l];n&&n.enabled&&n.language&&n.language===c.language&&c.kind in e?c.kind===n.kind?o=c:o||(o=c):n&&!n.enabled?(o=null,s=null,a=null):c.default&&(c.kind==="descriptions"&&!s?s=c:c.kind in e&&!a&&(a=c))}o?o.mode="showing":a?a.mode="showing":s&&(s.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){typeof Y.WebVTT=="function"&&Y.WebVTT.processCues(Y,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),i=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),i){const o=[];for(let l=0;l<e.length;++l){const c=e[l];c.mode==="showing"&&o.push(c)}this.updateForTrack(o);return}let n=null,s=null,a=e.length;for(;a--;){const o=e[a];o.mode==="showing"&&(o.kind==="descriptions"?n=o:s=o)}if(s?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):n&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(n)),!(Y.CSS!==void 0&&Y.CSS.supports("inset","10px"))){const o=this.el_,l=o.querySelectorAll(".vjs-text-track-cue"),c=this.player_.controlBar.el_.getBoundingClientRect().height,d=this.player_.el_.getBoundingClientRect().height;o.style="",Mi(o,"position","relative"),Mi(o,"height",d-c+"px"),Mi(o,"top","unset"),oa?Mi(o,"bottom",d+"px"):Mi(o,"bottom","0px"),l.length>0&&l.forEach(m=>{if(m.style.inset){const g=m.style.inset.split(" ");g.length===3&&Object.assign(m.style,{top:g[0],right:g[1],bottom:g[2],left:"unset"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!(Y.CSS!==void 0&&Y.CSS.supports("inset-inline: 10px")))return;const e=this.player_.currentWidth(),i=this.player_.currentHeight(),n=e/i,s=this.player_.videoWidth()/this.player_.videoHeight();let a=0,o=0;Math.abs(n-s)>.1&&(n>s?a=Math.round((e-i*s)/2):o=Math.round((i-e/s)/2)),Mi(this.el_,"insetInline",vd(a)),Mi(this.el_,"insetBlock",vd(o))}updateDisplayState(e){const i=this.player_.textTrackSettings.getValues(),n=e.activeCues;let s=n.length;for(;s--;){const a=n[s];if(!a)continue;const o=a.displayState;if(i.color&&(o.firstChild.style.color=i.color),i.textOpacity&&Mi(o.firstChild,"color",Fo(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(o.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&Mi(o.firstChild,"backgroundColor",Fo(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?Mi(o,"backgroundColor",Fo(i.windowColor,i.windowOpacity)):o.style.backgroundColor=i.windowColor),i.edgeStyle&&(i.edgeStyle==="dropshadow"?o.firstChild.style.textShadow=`2px 2px 3px ${gi}, 2px 2px 4px ${gi}, 2px 2px 5px ${gi}`:i.edgeStyle==="raised"?o.firstChild.style.textShadow=`1px 1px ${gi}, 2px 2px ${gi}, 3px 3px ${gi}`:i.edgeStyle==="depressed"?o.firstChild.style.textShadow=`1px 1px ${gd}, 0 1px ${gd}, -1px -1px ${gi}, 0 -1px ${gi}`:i.edgeStyle==="uniform"&&(o.firstChild.style.textShadow=`0 0 4px ${gi}, 0 0 4px ${gi}, 0 0 4px ${gi}, 0 0 4px ${gi}`)),i.fontPercent&&i.fontPercent!==1){const l=Y.parseFloat(o.style.fontSize);o.style.fontSize=l*i.fontPercent+"px",o.style.height="auto",o.style.top="auto"}i.fontFamily&&i.fontFamily!=="default"&&(i.fontFamily==="small-caps"?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=wb[i.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof Y.WebVTT!="function"||e.every(n=>!n.activeCues))return;const i=[];for(let n=0;n<e.length;++n){const s=e[n];for(let a=0;a<s.activeCues.length;++a)i.push(s.activeCues[a])}Y.WebVTT.processCues(Y,i,this.el_);for(let n=0;n<e.length;++n){const s=e[n];for(let a=0;a<s.activeCues.length;++a){const o=s.activeCues[a].displayState;Bn(o,"vjs-text-track-cue","vjs-text-track-cue-"+(s.language?s.language:n)),s.language&&ur(o,"lang",s.language)}this.player_.textTrackSettings&&this.updateDisplayState(s)}}}he.registerComponent("TextTrackDisplay",Db);class Ab extends he{createEl(){const e=this.player_.isAudio(),i=this.localize(e?"Audio Player":"Video Player"),n=Me("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[i])}),s=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return s.appendChild(n),s}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}he.registerComponent("LoadingSpinner",Ab);class Gt extends Ua{createEl(e,i={},n={}){e="button",i=Object.assign({className:this.buildCSSClass()},i),n=Object.assign({type:"button"},n);const s=Me(e,i,n);return this.player_.options_.experimentalSvgIcons||s.appendChild(Me("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(s),s}addChild(e,i={}){const n=this.constructor.name;return We.warn(`Adding an actionable (user controllable) child to a Button (${n}) is not supported; use a ClickableComponent instead.`),he.prototype.addChild.call(this,e,i)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){if(e.key===" "||e.key==="Enter"){e.stopPropagation();return}super.handleKeyDown(e)}}he.registerComponent("Button",Gt);class A0 extends Gt{constructor(e,i){super(e,i),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",n=>this.handleMouseDown(n))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const i=this.player_.play();if(e.type==="tap"||this.mouseused_&&"clientX"in e&&"clientY"in e){Fi(i),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}const n=this.player_.getChild("controlBar"),s=n&&n.getChild("playToggle");if(!s){this.player_.tech(!0).focus();return}const a=()=>s.focus();Zr(i)?i.then(a,()=>{}):this.setTimeout(a,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}A0.prototype.controlText_="Play Video";he.registerComponent("BigPlayButton",A0);class Ib extends Gt{constructor(e,i){super(e,i),this.setIcon("cancel"),this.controlText(i&&i.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}he.registerComponent("CloseButton",Ib);class I0 extends Gt{constructor(e,i={}){super(e,i),i.replay=i.replay===void 0||i.replay,this.setIcon("play"),this.on(e,"play",n=>this.handlePlay(n)),this.on(e,"pause",n=>this.handlePause(n)),i.replay&&this.on(e,"ended",n=>this.handleEnded(n))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Fi(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",i=>this.handleSeeked(i))}}I0.prototype.controlText_="Play";he.registerComponent("PlayToggle",I0);class yr extends he{constructor(e,i){super(e,i),this.on(e,["timeupdate","ended","seeking"],n=>this.update(n)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),i=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),n=Me("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return i.appendChild(n),this.contentEl_=Me("span",{className:`${e}-display`},{role:"presentation"}),i.appendChild(this.contentEl_),i}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){!this.player_.options_.enableSmoothSeeking&&e.type==="seeking"||this.updateContent(e)}updateTextNode_(e=0){e=Rn(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let i=this.textNode_;i&&this.contentEl_.firstChild!==i&&(i=null,We.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=Te.createTextNode(this.formattedTime_),this.textNode_&&(i?this.contentEl_.replaceChild(this.textNode_,i):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}yr.prototype.labelText_="Time";yr.prototype.controlText_="Time";he.registerComponent("TimeDisplay",yr);class Kl extends yr{buildCSSClass(){return"vjs-current-time"}updateContent(e){let i;this.player_.ended()?i=this.player_.duration():e&&e.target&&typeof e.target.pendingSeekTime=="function"&&e.target.pendingSeekTime()!==null?i=e.target.pendingSeekTime():i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(i)}}Kl.prototype.labelText_="Current Time";Kl.prototype.controlText_="Current Time";he.registerComponent("CurrentTimeDisplay",Kl);class Ql extends yr{constructor(e,i){super(e,i);const n=s=>this.updateContent(s);this.on(e,"durationchange",n),this.on(e,"loadstart",n),this.on(e,"loadedmetadata",n)}buildCSSClass(){return"vjs-duration"}updateContent(e){const i=this.player_.duration();this.updateTextNode_(i)}}Ql.prototype.labelText_="Duration";Ql.prototype.controlText_="Duration";he.registerComponent("DurationDisplay",Ql);class Nb extends he{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),i=super.createEl("div"),n=super.createEl("span",{textContent:"/"});return i.appendChild(n),e.appendChild(i),e}}he.registerComponent("TimeDivider",Nb);class Zl extends yr{constructor(e,i){super(e,i),this.on(e,"durationchange",n=>this.updateContent(n))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return this.options_.displayNegative!==!1&&e.insertBefore(Me("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if(typeof this.player_.duration()!="number")return;let i;this.player_.ended()?i=0:this.player_.remainingTimeDisplay?i=this.player_.remainingTimeDisplay():i=this.player_.remainingTime(),this.updateTextNode_(i)}}Zl.prototype.labelText_="Remaining Time";Zl.prototype.controlText_="Remaining Time";he.registerComponent("RemainingTimeDisplay",Zl);class Ob extends he{constructor(e,i){super(e,i),this.updateShowing(),this.on(this.player(),"durationchange",n=>this.updateShowing(n))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Me("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Me("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(Te.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}he.registerComponent("LiveDisplay",Ob);class N0 extends Gt{constructor(e,i){super(e,i),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=n=>this.updateLiveEdgeStatus(n),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=Me("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}N0.prototype.controlText_="Seek to live, currently playing live";he.registerComponent("SeekToLive",N0);function us(r,e,i){return r=Number(r),Math.min(i,Math.max(e,isNaN(r)?e:r))}var Bb=Object.freeze({__proto__:null,clamp:us});class Jl extends he{constructor(e,i){super(e,i),this.handleMouseDown_=n=>this.handleMouseDown(n),this.handleMouseUp_=n=>this.handleMouseUp(n),this.handleKeyDown_=n=>this.handleKeyDown(n),this.handleClick_=n=>this.handleClick(n),this.handleMouseMove_=n=>this.handleMouseMove(n),this.update_=n=>this.update(n),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,i={},n={}){return i.className=i.className+" vjs-slider",i=Object.assign({tabIndex:0},i),n=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},n),super.createEl(e,i,n)}handleMouseDown(e){const i=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!qi&&e.preventDefault(),n0(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove_),this.on(i,"mouseup",this.handleMouseUp_),this.on(i,"touchmove",this.handleMouseMove_),this.on(i,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const i=this.bar.el_.ownerDocument;r0(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(i,"mousemove",this.handleMouseMove_),this.off(i,"mouseup",this.handleMouseUp_),this.off(i,"touchmove",this.handleMouseMove_),this.off(i,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{const i=this.vertical()?"height":"width";this.bar.el().style[i]=(e*100).toFixed(2)+"%"})),e}getProgress(){return Number(us(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const i=Pa(this.el_,e);return this.vertical()?i.y:i.x}handleKeyDown(e){const i=this.options_.playerOptions.spatialNavigation,n=i&&i.enabled,s=i&&i.horizontalSeek;n?s&&e.key==="ArrowLeft"||!s&&e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&e.key==="ArrowRight"||!s&&e.key==="ArrowUp"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):e.key==="ArrowUp"||e.key==="ArrowRight"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(e===void 0)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}he.registerComponent("Slider",Jl);const $o=(r,e)=>us(r/e*100,0,100).toFixed(2)+"%";class Lb extends he{constructor(e,i){super(e,i),this.partEls_=[],this.on(e,"progress",n=>this.update(n))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),i=Me("span",{className:"vjs-control-text"}),n=Me("span",{textContent:this.localize("Loaded")}),s=Te.createTextNode(": ");return this.percentageEl_=Me("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(i),i.appendChild(n),i.appendChild(s),i.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const i=this.player_.liveTracker,n=this.player_.buffered(),s=i&&i.isLive()?i.seekableEnd():this.player_.duration(),a=this.player_.bufferedEnd(),o=this.partEls_,l=$o(a,s);this.percent_!==l&&(this.el_.style.width=l,Tn(this.percentageEl_,l),this.percent_=l);for(let c=0;c<n.length;c++){const d=n.start(c),m=n.end(c);let g=o[c];g||(g=this.el_.appendChild(Me()),o[c]=g),!(g.dataset.start===d&&g.dataset.end===m)&&(g.dataset.start=d,g.dataset.end=m,g.style.left=$o(d,a),g.style.width=$o(m-d,a))}for(let c=o.length;c>n.length;c--)this.el_.removeChild(o[c-1]);o.length=n.length})}}he.registerComponent("LoadProgressBar",Lb);class Pb extends he{constructor(e,i){super(e,i),this.update=ji(ct(this,this.update),Ci)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,i,n){const s=rs(this.el_),a=cr(this.player_.el()),o=e.width*i;if(!a||!s)return;let l=e.left-a.left+o,c=e.width-o+(a.right-e.right);c||(c=e.width-o,l=o);let d=s.width/2;l<d?d+=d-l:c<d&&(d=c),d<0?d=0:d>s.width&&(d=s.width),d=Math.round(d),this.el_.style.right=`-${d}px`,this.write(n)}write(e){Tn(this.el_,e)}updateTime(e,i,n,s){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let a;const o=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const l=this.player_.liveTracker.liveWindow(),c=l-i*l;a=(c<1?"":"-")+Rn(c,l)}else a=Rn(n,o);this.update(e,i,a),s&&s()})}}he.registerComponent("TimeTooltip",Pb);class eu extends he{constructor(e,i){super(e,i),this.setIcon("circle"),this.update=ji(ct(this,this.update),Ci)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,i,n){const s=this.getChild("timeTooltip");if(!s)return;const a=n&&n.target&&typeof n.target.pendingSeekTime=="function"?n.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,i,a)}}eu.prototype.options_={children:[]};!qt&&!Oi&&eu.prototype.options_.children.push("timeTooltip");he.registerComponent("PlayProgressBar",eu);class O0 extends he{constructor(e,i){super(e,i),this.update=ji(ct(this,this.update),Ci)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i){const n=i*this.player_.duration();this.getChild("timeTooltip").updateTime(e,i,n,()=>{this.el_.style.left=`${e.width*i}px`})}}O0.prototype.options_={children:["timeTooltip"]};he.registerComponent("MouseTimeDisplay",O0);class za extends Jl{constructor(e,i){i=lt(za.prototype.options_,i),i.children=[...i.children];const n=e.options_.disableSeekWhileScrubbingOnMobile&&(qt||Oi)||e.options_.disableSeekWhileScrubbingOnSTV;(!qt&&!Oi||n)&&i.children.splice(1,0,"mouseTimeDisplay"),super(e,i),this.shouldDisableSeekWhileScrubbing_=n,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=ct(this,this.update),this.update=ji(this.update_,Ci),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in Te&&"visibilityState"in Te&&this.on(Te,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){Te.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Ci))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&e.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if(Te.visibilityState==="hidden")return;const i=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const n=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let a=this.player_.duration();s&&s.isLive()&&(a=this.player_.liveTracker.liveCurrentTime()),this.percent_!==i&&(this.el_.setAttribute("aria-valuenow",(i*100).toFixed(2)),this.percent_=i),(this.currentTime_!==n||this.duration_!==a)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Rn(n,a),Rn(a,a)],"{1} of {2}")),this.currentTime_=n,this.duration_=a),this.bar&&this.bar.update(cr(this.el()),this.getProgress(),e)}),i}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(e!==void 0)if(e!==null){const i=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,i))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(this.pendingSeekTime()!==null)return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let i;const n=this.player_.liveTracker;return n&&n.isLive()?(i=(e-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(i=1)):i=e/this.player_.duration(),i}handleMouseDown(e){ss(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,i=!1){if(!ss(e)||isNaN(this.player_.duration()))return;!i&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let n;const s=this.calculateDistance(e),a=this.player_.liveTracker;if(!a||!a.isLive())n=s*this.player_.duration(),n===this.player_.duration()&&(n=n-.1);else{if(s>=.99){a.seekToLiveEdge();return}const o=a.seekableStart(),l=a.liveCurrentTime();if(n=o+s*a.liveWindow(),n>=l&&(n=l),n<=o&&(n=o+.1),n===1/0)return}this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(n):this.userSeek_(n),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Fi(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const i=this.pendingSeekTime()!==null?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(i+e),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const i=this.player_.liveTracker;if(e.key===" "||e.key==="Enter")e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(e.key==="Home")e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(e.key==="End")e.preventDefault(),e.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const n=parseInt(e.key,10)*.1;i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*n):this.userSeek_(this.player_.duration()*n)}else e.key==="PageDown"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):e.key==="PageUp"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in Te&&"visibilityState"in Te&&this.off(Te,"visibilitychange",this.toggleVisibility_),super.dispose()}}za.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12};he.registerComponent("SeekBar",za);class B0 extends he{constructor(e,i){super(e,i),this.handleMouseMove=ji(ct(this,this.handleMouseMove),Ci),this.throttledHandleMouseSeek=ji(ct(this,this.handleMouseSeek),Ci),this.handleMouseUpHandler_=n=>this.handleMouseUp(n),this.handleMouseDownHandler_=n=>this.handleMouseDown(n),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const i=this.getChild("seekBar");if(!i)return;const n=i.getChild("playProgressBar"),s=i.getChild("mouseTimeDisplay");if(!n&&!s)return;const a=i.el(),o=rs(a);let l=Pa(a,e).x;l=us(l,0,1),s&&s.update(o,l),n&&n.update(o,i.getProgress())}handleMouseSeek(e){const i=this.getChild("seekBar");i&&i.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Fi(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const i=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(i,"mousemove",this.throttledHandleMouseSeek),this.on(i,"touchmove",this.throttledHandleMouseSeek),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}B0.prototype.options_={children:["seekBar"]};he.registerComponent("ProgressControl",B0);class L0 extends Gt{constructor(e,i){super(e,i),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],n=>this.handlePictureInPictureChange(n)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],n=>this.handlePictureInPictureEnabledChange(n)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){if(!(this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode())){this.show();return}this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()}handlePictureInPictureEnabledChange(){Te.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in Y?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){typeof Te.exitPictureInPicture=="function"&&super.show()}}L0.prototype.controlText_="Picture-in-Picture";he.registerComponent("PictureInPictureToggle",L0);class P0 extends Gt{constructor(e,i){super(e,i),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",n=>this.handleFullscreenChange(n)),Te[e.fsApi_.fullscreenEnabled]===!1&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}P0.prototype.controlText_="Fullscreen";he.registerComponent("FullscreenToggle",P0);const Mb=function(r,e){e.tech_&&!e.tech_.featuresVolumeControl&&r.addClass("vjs-hidden"),r.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})};class Rb extends he{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}he.registerComponent("VolumeLevel",Rb);class Vb extends he{constructor(e,i){super(e,i),this.update=ji(ct(this,this.update),Ci)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,i,n,s){if(!n){const a=cr(this.el_),o=cr(this.player_.el()),l=e.width*i;if(!o||!a)return;const c=e.left-o.left+l,d=e.width-l+(o.right-e.right);let m=a.width/2;c<m?m+=m-c:d<m&&(m=d),m<0?m=0:m>a.width&&(m=a.width),this.el_.style.right=`-${m}px`}this.write(`${s}%`)}write(e){Tn(this.el_,e)}updateVolume(e,i,n,s,a){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,i,n,s.toFixed(0)),a&&a()})}}he.registerComponent("VolumeLevelTooltip",Vb);class M0 extends he{constructor(e,i){super(e,i),this.update=ji(ct(this,this.update),Ci)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i,n){const s=100*i;this.getChild("volumeLevelTooltip").updateVolume(e,i,n,s,()=>{n?this.el_.style.bottom=`${e.height*i}px`:this.el_.style.left=`${e.width*i}px`})}}M0.prototype.options_={children:["volumeLevelTooltip"]};he.registerComponent("MouseVolumeLevelDisplay",M0);class Ha extends Jl{constructor(e,i){super(e,i),this.on("slideractive",n=>this.updateLastVolume_(n)),this.on(e,"volumechange",n=>this.updateARIAAttributes(n)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){ss(e)&&super.handleMouseDown(e)}handleMouseMove(e){const i=this.getChild("mouseVolumeLevelDisplay");if(i){const n=this.el(),s=cr(n),a=this.vertical();let o=Pa(n,e);o=a?o.y:o.x,o=us(o,0,1),i.update(s,o,a)}ss(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const i=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",i),this.el_.setAttribute("aria-valuetext",i+"%")}volumeAsPercentage_(){return Math.round(this.player_.volume()*100)}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(e)})}}Ha.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!qt&&!Oi&&Ha.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");Ha.prototype.playerEvent="volumechange";he.registerComponent("VolumeBar",Ha);class R0 extends he{constructor(e,i={}){i.vertical=i.vertical||!1,(typeof i.volumeBar>"u"||lr(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical),super(e,i),Mb(this,e),this.throttledHandleMouseMove=ji(ct(this,this.handleMouseMove),Ci),this.handleMouseUpHandler_=n=>this.handleMouseUp(n),this.on("mousedown",n=>this.handleMouseDown(n)),this.on("touchstart",n=>this.handleMouseDown(n)),this.on("mousemove",n=>this.handleMouseMove(n)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const i=this.el_.ownerDocument;this.on(i,"mousemove",this.throttledHandleMouseMove),this.on(i,"touchmove",this.throttledHandleMouseMove),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const i=this.el_.ownerDocument;this.off(i,"mousemove",this.throttledHandleMouseMove),this.off(i,"touchmove",this.throttledHandleMouseMove),this.off(i,"mouseup",this.handleMouseUpHandler_),this.off(i,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}R0.prototype.options_={children:["volumeBar"]};he.registerComponent("VolumeControl",R0);const Fb=function(r,e){e.tech_&&!e.tech_.featuresMuteControl&&r.addClass("vjs-hidden"),r.on(e,"loadstart",function(){e.tech_.featuresMuteControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})};class V0 extends Gt{constructor(e,i){super(e,i),Fb(this,e),this.on(e,["loadstart","volumechange"],n=>this.update(n))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const i=this.player_.volume(),n=this.player_.lastVolume_();if(i===0){const s=n<.1?.1:n;this.player_.volume(s),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let i=3;this.setIcon("volume-high"),qt&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?(this.setIcon("volume-mute"),i=0):e<.33?(this.setIcon("volume-low"),i=1):e<.67&&(this.setIcon("volume-medium"),i=2),Ba(this.el_,[0,1,2,3].reduce((n,s)=>n+`${s?" ":""}vjs-vol-${s}`,"")),Bn(this.el_,`vjs-vol-${i}`)}updateControlText_(){const i=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==i&&this.controlText(i)}}V0.prototype.controlText_="Mute";he.registerComponent("MuteToggle",V0);class F0 extends he{constructor(e,i={}){typeof i.inline<"u"?i.inline=i.inline:i.inline=!0,(typeof i.volumeControl>"u"||lr(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline),super(e,i),this.handleKeyPressHandler_=n=>this.handleKeyPress(n),this.on(e,["loadstart"],n=>this.volumePanelState_(n)),this.on(this.muteToggle,"keyup",n=>this.handleKeyPress(n)),this.on(this.volumeControl,"keyup",n=>this.handleVolumeControlKeyUp(n)),this.on("keydown",n=>this.handleKeyPress(n)),this.on("mouseover",n=>this.handleMouseOver(n)),this.on("mouseout",n=>this.handleMouseOut(n)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){e.key==="Escape"&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),pi(Te,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),jt(Te,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut()}}F0.prototype.options_={children:["muteToggle","volumeControl"]};he.registerComponent("VolumePanel",F0);class $0 extends Gt{constructor(e,i){super(e,i),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const i=this.player_.currentTime(),n=this.player_.liveTracker,s=n&&n.isLive()?n.seekableEnd():this.player_.duration();let a;i+this.skipTime<=s?a=i+this.skipTime:a=s,this.player_.currentTime(a)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}$0.prototype.controlText_="Skip Forward";he.registerComponent("SkipForward",$0);class U0 extends Gt{constructor(e,i){super(e,i),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const i=this.player_.currentTime(),n=this.player_.liveTracker,s=n&&n.isLive()&&n.seekableStart();let a;s&&i-this.skipTime<=s?a=s:i>=this.skipTime?a=i-this.skipTime:a=0,this.player_.currentTime(a)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}U0.prototype.controlText_="Skip Backward";he.registerComponent("SkipBackward",U0);class z0 extends he{constructor(e,i){super(e,i),i&&(this.menuButton_=i.menuButton),this.focusedChild_=-1,this.on("keydown",n=>this.handleKeyDown(n)),this.boundHandleBlur_=n=>this.handleBlur(n),this.boundHandleTapClick_=n=>this.handleTapClick(n)}addEventListenerForItem(e){e instanceof he&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof he&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){typeof e=="string"&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const i=this.addChild(e);i&&this.addEventListenerForItem(i)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=Me(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const i=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),pi(i,"click",function(n){n.preventDefault(),n.stopImmediatePropagation()}),i}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const i=e.relatedTarget||Te.activeElement;if(!this.children().some(n=>n.el()===i)){const n=this.menuButton_;n&&n.buttonPressed_&&i!==n.el().firstChild&&n.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const i=this.children();if(!Array.isArray(i))return;const n=i.filter(s=>s.el()===e.target)[0];if(!n)return;n.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}}handleKeyDown(e){e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(e.key==="ArrowRight"||e.key==="ArrowUp")&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const i=this.children().slice();i.length&&i[0].hasClass("vjs-menu-title")&&i.shift(),i.length>0&&(e<0?e=0:e>=i.length&&(e=i.length-1),this.focusedChild_=e,i[e].el_.focus())}}he.registerComponent("Menu",z0);class tu extends he{constructor(e,i={}){super(e,i),this.menuButton_=new Gt(e,i),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const n=Gt.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+n,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=a=>this.handleClick(a);this.handleMenuKeyUp_=a=>this.handleMenuKeyUp(a),this.on(this.menuButton_,"tap",s),this.on(this.menuButton_,"click",s),this.on(this.menuButton_,"keydown",a=>this.handleKeyDown(a)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),pi(Te,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",a=>this.handleMouseLeave(a)),this.on("keydown",a=>this.handleSubmenuKeyDown(a))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new z0(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const i=Me("li",{className:"vjs-menu-title",textContent:_t(this.options_.title),tabIndex:-1}),n=new he(this.player_,{el:i});e.addItem(n)}if(this.items=this.createItems(),this.items)for(let i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){return super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";this.options_.inline===!0?e+="-inline":e+="-popup";const i=Gt.prototype.buildCSSClass();return`vjs-menu-button ${e} ${i} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return this.options_.inline===!0?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,i=this.menuButton_.el()){return this.menuButton_.controlText(e,i)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),jt(Te,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){e.key==="Escape"||e.key==="Tab"?(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus())):(e.key==="Up"||e.key==="Down"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))}handleMenuKeyUp(e){(e.key==="Escape"||e.key==="Tab")&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){(e.key==="Escape"||e.key==="Tab")&&(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),qt&&Zh())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}he.registerComponent("MenuButton",tu);class iu extends tu{constructor(e,i){const n=i.tracks;if(super(e,i),this.items.length<=1&&this.hide(),!n)return;const s=ct(this,this.update);n.addEventListener("removetrack",s),n.addEventListener("addtrack",s),n.addEventListener("labelchange",s),this.player_.on("ready",s),this.player_.on("dispose",function(){n.removeEventListener("removetrack",s),n.removeEventListener("addtrack",s),n.removeEventListener("labelchange",s)})}}he.registerComponent("TrackButton",iu);class cs extends Ua{constructor(e,i){super(e,i),this.selectable=i.selectable,this.isSelected_=i.selected||!1,this.multiSelectable=i.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,i,n){this.nonIconControl=!0;const s=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},i),n),a=Me("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(a):s.replaceChild(a,s.querySelector(".vjs-icon-placeholder")),s}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}he.registerComponent("MenuItem",cs);class ds extends cs{constructor(e,i){const n=i.track,s=e.textTracks();i.label=n.label||n.language||"Unknown",i.selected=n.mode==="showing",super(e,i),this.track=n,this.kinds=(i.kinds||[i.kind||this.track.kind]).filter(Boolean);const a=(...l)=>{this.handleTracksChange.apply(this,l)},o=(...l)=>{this.handleSelectedLanguageChange.apply(this,l)};if(e.on(["loadstart","texttrackchange"],a),s.addEventListener("change",a),s.addEventListener("selectedlanguagechange",o),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],a),s.removeEventListener("change",a),s.removeEventListener("selectedlanguagechange",o)}),s.onchange===void 0){let l;this.on(["tap","click"],function(){if(typeof Y.Event!="object")try{l=new Y.Event("change")}catch{}l||(l=Te.createEvent("Event"),l.initEvent("change",!0,!0)),s.dispatchEvent(l)})}this.handleTracksChange()}handleClick(e){const i=this.track,n=this.player_.textTracks();if(super.handleClick(e),!!n)for(let s=0;s<n.length;s++){const a=n[s];this.kinds.indexOf(a.kind)!==-1&&(a===i?a.mode!=="showing"&&(a.mode="showing"):a.mode!=="disabled"&&(a.mode="disabled"))}}handleTracksChange(e){const i=this.track.mode==="showing";i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){if(this.track.mode==="showing"){const i=this.player_.cache_.selectedLanguage;if(i&&i.enabled&&i.language===this.track.language&&i.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}he.registerComponent("TextTrackMenuItem",ds);class H0 extends ds{constructor(e,i){i.track={player:e,kind:i.kind,kinds:i.kinds,default:!1,mode:"disabled"},i.kinds||(i.kinds=[i.kind]),i.label?i.track.label=i.label:i.track.label=i.kinds.join(" and ")+" off",i.selectable=!0,i.multiSelectable=!1,super(e,i)}handleTracksChange(e){const i=this.player().textTracks();let n=!0;for(let s=0,a=i.length;s<a;s++){const o=i[s];if(this.options_.kinds.indexOf(o.kind)>-1&&o.mode==="showing"){n=!1;break}}n!==this.isSelected_&&this.selected(n)}handleSelectedLanguageChange(e){const i=this.player().textTracks();let n=!0;for(let s=0,a=i.length;s<a;s++){const o=i[s];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&o.mode==="showing"){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}he.registerComponent("OffTextTrackMenuItem",H0);class _r extends iu{constructor(e,i={}){i.tracks=e.textTracks(),super(e,i)}createItems(e=[],i=ds){let n;this.label_&&(n=`${this.label_} off`),e.push(new H0(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let a=0;a<s.length;a++){const o=s[a];if(this.kinds_.indexOf(o.kind)>-1){const l=new i(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});l.addClass(`vjs-${o.kind}-menu-item`),e.push(l)}}return e}}he.registerComponent("TextTrackButton",_r);class q0 extends cs{constructor(e,i){const n=i.track,s=i.cue,a=e.currentTime();i.selectable=!0,i.multiSelectable=!1,i.label=s.text,i.selected=s.startTime<=a&&a<s.endTime,super(e,i),this.track=n,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}he.registerComponent("ChaptersTrackMenuItem",q0);class nu extends _r{constructor(e,i,n){super(e,i,n),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(s=>{s.selected(this.track_.activeCues[0]===s.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&e.track.kind!=="chapters")return;const i=this.findChaptersTrack();i!==this.track_?(this.setTrack(i),super.update()):(!this.items||i&&i.cues&&i.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.kind===this.kind_)return n}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(_t(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const i=this.track_.cues;if(!i)return e;for(let n=0,s=i.length;n<s;n++){const a=i[n],o=new q0(this.player_,{track:this.track_,cue:a});e.push(o)}return e}}nu.prototype.kind_="chapters";nu.prototype.controlText_="Chapters";he.registerComponent("ChaptersButton",nu);class ru extends _r{constructor(e,i,n){super(e,i,n),this.setIcon("audio-description");const s=e.textTracks(),a=ct(this,this.handleTracksChange);s.addEventListener("change",a),this.on("dispose",function(){s.removeEventListener("change",a)})}handleTracksChange(e){const i=this.player().textTracks();let n=!1;for(let s=0,a=i.length;s<a;s++){const o=i[s];if(o.kind!==this.kind_&&o.mode==="showing"){n=!0;break}}n?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}ru.prototype.kind_="descriptions";ru.prototype.controlText_="Descriptions";he.registerComponent("DescriptionsButton",ru);class su extends _r{constructor(e,i,n){super(e,i,n),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}su.prototype.kind_="subtitles";su.prototype.controlText_="Subtitles";he.registerComponent("SubtitlesButton",su);class au extends ds{constructor(e,i){i.track={player:e,kind:i.kind,label:i.kind+" settings",selectable:!1,default:!1,mode:"disabled"},i.selectable=!1,i.name="CaptionSettingsMenuItem",super(e,i),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+i.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}he.registerComponent("CaptionSettingsMenuItem",au);class ou extends _r{constructor(e,i,n){super(e,i,n),this.setIcon("captions")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new au(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}ou.prototype.kind_="captions";ou.prototype.controlText_="Captions";he.registerComponent("CaptionsButton",ou);class j0 extends ds{createEl(e,i,n){const s=super.createEl(e,i,n),a=s.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",s):a.appendChild(Me("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(Me("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),s}}he.registerComponent("SubsCapsMenuItem",j0);class lu extends _r{constructor(e,i={}){super(e,i),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(_t(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new au(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,j0),e}}lu.prototype.kinds_=["captions","subtitles"];lu.prototype.controlText_="Subtitles";he.registerComponent("SubsCapsButton",lu);class G0 extends cs{constructor(e,i){const n=i.track,s=e.audioTracks();i.label=n.label||n.language||"Unknown",i.selected=n.enabled,super(e,i),this.track=n,this.addClass(`vjs-${n.kind}-menu-item`);const a=(...o)=>{this.handleTracksChange.apply(this,o)};s.addEventListener("change",a),this.on("dispose",()=>{s.removeEventListener("change",a)})}createEl(e,i,n){const s=super.createEl(e,i,n),a=s.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(a.appendChild(Me("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(Me("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const i=this.player_.audioTracks();for(let n=0;n<i.length;n++){const s=i[n];s!==this.track&&(s.enabled=s===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}he.registerComponent("AudioTrackMenuItem",G0);class W0 extends iu{constructor(e,i={}){i.tracks=e.audioTracks(),super(e,i),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const i=this.player_.audioTracks();for(let n=0;n<i.length;n++){const s=i[n];e.push(new G0(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}W0.prototype.controlText_="Audio Track";he.registerComponent("AudioTrackButton",W0);class uu extends cs{constructor(e,i){const n=i.rate,s=parseFloat(n,10);i.label=n,i.selected=s===e.playbackRate(),i.selectable=!0,i.multiSelectable=!1,super(e,i),this.label=n,this.rate=s,this.on(e,"ratechange",a=>this.update(a))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}uu.prototype.contentElType="button";he.registerComponent("PlaybackRateMenuItem",uu);class Y0 extends tu{constructor(e,i){super(e,i),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",n=>this.updateVisibility(n)),this.on(e,"ratechange",n=>this.updateLabel(n)),this.on(e,"playbackrateschange",n=>this.handlePlaybackRateschange(n))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Me("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),i=[];for(let n=e.length-1;n>=0;n--)i.push(new uu(this.player(),{rate:e[n]+"x"}));return i}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}Y0.prototype.controlText_="Playback Rate";he.registerComponent("PlaybackRateMenuButton",Y0);class X0 extends he{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",i={},n={}){return i.className||(i.className=this.buildCSSClass()),super.createEl(e,i,n)}}he.registerComponent("Spacer",X0);class $b extends X0{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}he.registerComponent("CustomControlSpacer",$b);class K0 extends he{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}K0.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]};he.registerComponent("ControlBar",K0);class Q0 extends vr{constructor(e,i){super(e,i),this.on(e,"error",n=>{this.open(n)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}Q0.prototype.options_=Object.assign({},vr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});he.registerComponent("ErrorDisplay",Q0);class Z0 extends he{constructor(e,i={}){super(e,i),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),Me("select",{id:this.options_.id},{},this.options_.SelectOptions.map(i=>{const n=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${bi()}`)+"-"+i[1].replace(/\W+/g,""),s=Me("option",{id:n,value:this.localize(i[0]),textContent:this.localize(i[1])});return s.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${n}`),s}))}}he.registerComponent("TextTrackSelect",Z0);class Pn extends he{constructor(e,i={}){super(e,i);const n=Me("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(n);const s=this.options_.selects;for(const a of s){const o=this.options_.selectConfigs[a],l=o.className,c=o.id.replace("%s",this.options_.id_);let d=null;const m=`vjs_select_${bi()}`;if(this.options_.type==="colors"){d=Me("span",{className:l});const S=Me("label",{id:c,className:"vjs-label",textContent:this.localize(o.label)});S.setAttribute("for",m),d.appendChild(S)}const g=new Z0(e,{SelectOptions:o.options,legendId:this.options_.legendId,id:m,labelId:c});this.addChild(g),this.options_.type==="colors"&&(d.appendChild(g.el()),this.el().appendChild(d))}}createEl(){return Me("fieldset",{className:this.options_.className})}}he.registerComponent("TextTrackFieldset",Pn);class J0 extends he{constructor(e,i={}){super(e,i);const n=this.options_.textTrackComponentid,s=new Pn(e,{id_:n,legendId:`captions-text-legend-${n}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(s);const a=new Pn(e,{id_:n,legendId:`captions-background-${n}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(a);const o=new Pn(e,{id_:n,legendId:`captions-window-${n}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(o)}createEl(){return Me("div",{className:"vjs-track-settings-colors"})}}he.registerComponent("TextTrackSettingsColors",J0);class ef extends he{constructor(e,i={}){super(e,i);const n=this.options_.textTrackComponentid,s=new Pn(e,{id_:n,legendId:`captions-font-size-${n}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(s);const a=new Pn(e,{id_:n,legendId:`captions-edge-style-${n}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(a);const o=new Pn(e,{id_:n,legendId:`captions-font-family-${n}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(o)}createEl(){return Me("div",{className:"vjs-track-settings-font"})}}he.registerComponent("TextTrackSettingsFont",ef);class tf extends he{constructor(e,i={}){super(e,i);const n=new Gt(e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});n.el().classList.remove("vjs-control","vjs-button"),n.el().textContent=this.localize("Reset"),this.addChild(n);const s=this.localize("Done"),a=new Gt(e,{controlText:s,className:"vjs-done-button"});a.el().classList.remove("vjs-control","vjs-button"),a.el().textContent=s,this.addChild(a)}createEl(){return Me("div",{className:"vjs-track-settings-controls"})}}he.registerComponent("TrackSettingsControls",tf);const Uo="vjs-text-track-settings",yd=["#000","Black"],_d=["#00F","Blue"],Td=["#0FF","Cyan"],bd=["#0F0","Green"],Cd=["#F0F","Magenta"],xd=["#F00","Red"],Sd=["#FFF","White"],Ed=["#FF0","Yellow"],zo=["1","Opaque"],Ho=["0.5","Semi-Transparent"],kd=["0","Transparent"],fn={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[yd,Sd,xd,bd,_d,Ed,Cd,Td],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[zo,Ho,kd],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Sd,yd,xd,bd,_d,Ed,Cd,Td],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:r=>r==="1.00"?null:Number(r)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[zo,Ho],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[kd,Ho,zo],className:"vjs-window-opacity vjs-opacity"}};fn.windowColor.options=fn.backgroundColor.options;function nf(r,e){if(e&&(r=e(r)),r&&r!=="none")return r}function Ub(r,e){const i=r.options[r.options.selectedIndex].value;return nf(i,e)}function zb(r,e,i){if(e){for(let n=0;n<r.options.length;n++)if(nf(r.options[n].value,i)===e){r.selectedIndex=n;break}}}class Hb extends vr{constructor(e,i){i.temporary=!1,super(e,i),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Me("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),i.persistTextTrackSettings===void 0&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const i=new J0(e,{textTrackComponentid:this.id_,selectConfigs:fn,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(i);const n=new ef(e,{textTrackComponentid:this.id_,selectConfigs:fn,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(n);const s=new tf(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay()}),Xn(fn,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return jh(fn,(e,i,n)=>{const s=Ub(this.$(i.selector),i.parser);return s!==void 0&&(e[n]=s),e},{})}setValues(e){Xn(fn,(i,n)=>{zb(this.$(i.selector),e[n],i.parser)})}setDefaults(){Xn(fn,e=>{const i=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=i})}restoreSettings(){let e;try{e=JSON.parse(Y.localStorage.getItem(Uo))}catch(i){We.warn(i)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Y.localStorage.setItem(Uo,JSON.stringify(e)):Y.localStorage.removeItem(Uo)}catch(i){We.warn(i)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}he.registerComponent("TextTrackSettings",Hb);class qb extends he{constructor(e,i){let n=i.ResizeObserver||Y.ResizeObserver;i.ResizeObserver===null&&(n=!1);const s=lt({createEl:!n,reportTouchActivity:!1},i);super(e,s),this.ResizeObserver=i.ResizeObserver||Y.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=p0(()=>{this.resizeHandler()},100,!1,this),n?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const a=this.debouncedHandler_;let o=this.unloadListener_=function(){jt(this,"resize",a),jt(this,"unload",o),o=null};pi(this.el_.contentWindow,"unload",o),pi(this.el_.contentWindow,"resize",a)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}he.registerComponent("ResizeManager",qb);const jb={trackingThreshold:20,liveTolerance:15};class Gb extends he{constructor(e,i){const n=lt(jb,i,{createEl:!1});super(e,n),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=s=>this.handlePlay(s),this.handleFirstTimeupdate_=s=>this.handleFirstTimeupdate(s),this.handleSeeked_=s=>this.handleSeeked(s),this.seekToLiveEdge_=s=>this.seekToLiveEdge(s),this.reset_(),this.on(this.player_,"durationchange",s=>this.handleDurationchange(s)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const i=Number(Y.performance.now().toFixed(4)),n=this.lastTime_===-1?0:(i-this.lastTime_)/1e3;this.lastTime_=i,this.pastSeekEnd_=this.pastSeekEnd()+n;const s=this.liveCurrentTime(),a=this.player_.currentTime();let o=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-a)>this.options_.liveTolerance;(!this.timeupdateSeen_||s===1/0)&&(o=!1),o!==this.behindLiveEdge_&&(this.behindLiveEdge_=o,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Ci),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),i=[];let n=e?e.length:0;for(;n--;)i.push(e.end(n));return i.length?i.sort()[i.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),i=[];let n=e?e.length:0;for(;n--;)i.push(e.start(n));return i.length?i.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return this.lastSeekEnd_!==-1&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return typeof this.trackingInterval_=="number"}seekToLiveEdge(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}he.registerComponent("LiveTracker",Gb);class Wb extends he{constructor(e,i){super(e,i),this.on("statechanged",n=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Me("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${bi()}`}),description:Me("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${bi()}`})},Me("div",{className:"vjs-title-bar"},{},Gh(this.els))}updateDom_(){const e=this.player_.tech_,i=e&&e.el_,n={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(s=>{const a=this.state[s],o=this.els[s],l=n[s];Ma(o),a&&Tn(o,a),i&&(i.removeAttribute(l),a&&i.setAttribute(l,o.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,i=e&&e.el_;i&&(i.removeAttribute("aria-labelledby"),i.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}he.registerComponent("TitleBar",Wb);const Yb={initialDisplay:4e3,position:[],takeFocus:!1};class Xb extends Gt{constructor(e,i){i=lt(Yb,i),super(e,i),this.controlText(i.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],n=>{this.removeClass("force-display")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(" ")}`}createEl(){const e=Me("button",{},{type:"button",class:this.buildCSSClass()},Me("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display")},this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}}he.registerComponent("TransientButton",Xb);const fl=r=>{const e=r.el();if(e.hasAttribute("src"))return r.triggerSourceset(e.src),!0;const i=r.$$("source"),n=[];let s="";if(!i.length)return!1;for(let a=0;a<i.length;a++){const o=i[a].src;o&&n.indexOf(o)===-1&&n.push(o)}return n.length?(n.length===1&&(s=n[0]),r.triggerSourceset(s),!0):!1},Kb=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(r){const e=Te.createElement(this.nodeName.toLowerCase());e.innerHTML=r;const i=Te.createDocumentFragment();for(;e.childNodes.length;)i.appendChild(e.childNodes[0]);return this.innerText="",Y.Element.prototype.appendChild.call(this,i),this.innerHTML}}),rf=(r,e)=>{let i={};for(let n=0;n<r.length&&(i=Object.getOwnPropertyDescriptor(r[n],e),!(i&&i.set&&i.get));n++);return i.enumerable=!0,i.configurable=!0,i},Qb=r=>rf([r.el(),Y.HTMLMediaElement.prototype,Y.Element.prototype,Kb],"innerHTML"),wd=function(r){const e=r.el();if(e.resetSourceWatch_)return;const i={},n=Qb(r),s=a=>(...o)=>{const l=a.apply(e,o);return fl(r),l};["append","appendChild","insertAdjacentHTML"].forEach(a=>{e[a]&&(i[a]=e[a],e[a]=s(i[a]))}),Object.defineProperty(e,"innerHTML",lt(n,{set:s(n.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(i).forEach(a=>{e[a]=i[a]}),Object.defineProperty(e,"innerHTML",n)},r.one("sourceset",e.resetSourceWatch_)},Zb=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?E0(Y.Element.prototype.getAttribute.call(this,"src")):""},set(r){return Y.Element.prototype.setAttribute.call(this,"src",r),r}}),Jb=r=>rf([r.el(),Y.HTMLMediaElement.prototype,Zb],"src"),e4=function(r){if(!r.featuresSourceset)return;const e=r.el();if(e.resetSourceset_)return;const i=Jb(r),n=e.setAttribute,s=e.load;Object.defineProperty(e,"src",lt(i,{set:a=>{const o=i.set.call(e,a);return r.triggerSourceset(e.src),o}})),e.setAttribute=(a,o)=>{const l=n.call(e,a,o);return/src/i.test(a)&&r.triggerSourceset(e.src),l},e.load=()=>{const a=s.call(e);return fl(r)||(r.triggerSourceset(""),wd(r)),a},e.currentSrc?r.triggerSourceset(e.currentSrc):fl(r)||wd(r),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=s,e.setAttribute=n,Object.defineProperty(e,"src",i),e.resetSourceWatch_&&e.resetSourceWatch_()}};class we extends ze{constructor(e,i){super(e,i);const n=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",n&&(this.el_.currentSrc!==n.src||e.tag&&e.tag.initNetworkState_===3)?this.setSource(n):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const a=this.el_.childNodes;let o=a.length;const l=[];for(;o--;){const c=a[o];c.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(c),this.remoteTextTracks().addTrack(c.track),this.textTracks().addTrack(c.track),!s&&!this.el_.hasAttribute("crossorigin")&&$a(c.src)&&(s=!0)):l.push(c))}for(let c=0;c<l.length;c++)this.el_.removeChild(l[c])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&We.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
180
- This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNativePlayer_(),(ns||Na)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),we.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){e4(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let i;const n=()=>{i=[];for(let a=0;a<e.length;a++){const o=e[a];o.kind==="metadata"&&i.push({track:o,storedMode:o.mode})}};n(),e.addEventListener("change",n),this.on("dispose",()=>e.removeEventListener("change",n));const s=()=>{for(let a=0;a<i.length;a++){const o=i[a];o.track.mode==="disabled"&&o.track.mode!==o.storedMode&&(o.track.mode=o.storedMode)}e.removeEventListener("change",s)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",n),e.removeEventListener("change",s),e.addEventListener("change",s)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",n),e.addEventListener("change",n),e.removeEventListener("change",s)})}overrideNative_(e,i){if(i!==this[`featuresNative${e}Tracks`])return;const n=e.toLowerCase();this[`${n}TracksListeners_`]&&Object.keys(this[`${n}TracksListeners_`]).forEach(s=>{this.el()[`${n}Tracks`].removeEventListener(s,this[`${n}TracksListeners_`][s])}),this[`featuresNative${e}Tracks`]=!i,this[`${n}TracksListeners_`]=null,this.proxyNativeTracksForType_(n)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const i=yi[e],n=this.el()[i.getterName],s=this[i.getterName]();if(!this[`featuresNative${i.capitalName}Tracks`]||!n||!n.addEventListener)return;const a={change:l=>{const c={type:"change",target:s,currentTarget:s,srcElement:s};s.trigger(c),e==="text"&&this[hr.remoteText.getterName]().trigger(c)},addtrack(l){s.addTrack(l.track)},removetrack(l){s.removeTrack(l.track)}},o=function(){const l=[];for(let c=0;c<s.length;c++){let d=!1;for(let m=0;m<n.length;m++)if(n[m]===s[c]){d=!0;break}d||l.push(s[c])}for(;l.length;)s.removeTrack(l.shift())};this[i.getterName+"Listeners_"]=a,Object.keys(a).forEach(l=>{const c=a[l];n.addEventListener(l,c),this.on("dispose",d=>n.removeEventListener(l,c))}),this.on("loadstart",o),this.on("dispose",l=>this.off("loadstart",o))}proxyNativeTracks_(){yi.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){const n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),we.disposeMediaElement(e),e=n}else{e=Te.createElement("video");const n=this.options_.tag&&hn(this.options_.tag),s=lt({},n);(!ns||this.options_.nativeControlsForTouch!==!0)&&delete s.controls,t0(e,Object.assign(s,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&ur(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const i=["loop","muted","playsinline","autoplay"];for(let n=0;n<i.length;n++){const s=i[n],a=this.options_[s];typeof a<"u"&&(a?ur(e,s,s):La(e,s),e[s]=a)}return e}handleLateInit_(e){if(e.networkState===0||e.networkState===3)return;if(e.readyState===0){let n=!1;const s=function(){n=!0};this.on("loadstart",s);const a=function(){n||this.trigger("loadstart")};this.on("loadedmetadata",a),this.ready(function(){this.off("loadstart",s),this.off("loadedmetadata",a),n||this.trigger("loadstart")});return}const i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(n){this.trigger(n)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Oa?this.el_.fastSeek(e):this.el_.currentTime=e}catch(i){We(i,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&Oi&&qi&&this.el_.currentTime===0){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},i=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",()=>{this.off("webkitbeginfullscreen",i),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Fi(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}},0);else try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}}exitFullScreen(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(e===void 0)return this.el_.src;this.setSrc(e)}addSourceElement(e,i){if(!e)return We.error("Invalid source URL."),!1;const n={src:e};i&&(n.type=i);const s=Me("source",{},n);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return We.error("Source URL is required to remove the source element."),!1;const i=this.el_.querySelectorAll("source");for(const n of i)if(n.src===e)return this.el_.removeChild(n),!0;return We.warn(`No matching source element found with src: ${e}`),!1}reset(){we.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,i,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,i,n):super.addTextTrack(e,i,n)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const i=Te.createElement("track");return e.kind&&(i.kind=e.kind),e.label&&(i.label=e.label),(e.language||e.srclang)&&(i.srclang=e.language||e.srclang),e.default&&(i.default=e.default),e.id&&(i.id=e.id),e.src&&(i.src=e.src),i}addRemoteTextTrack(e,i){const n=super.addRemoteTextTrack(e,i);return this.featuresNativeTextTracks&&this.el().appendChild(n),n}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const i=this.$$("track");let n=i.length;for(;n--;)(e===i[n]||e===i[n].track)&&this.el().removeChild(i[n])}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();const e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Y.performance&&(e.creationTime=Y.performance.now()),e}}Da(we,"TEST_VID",function(){if(!pr())return;const r=Te.createElement("video"),e=Te.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",r.appendChild(e),r});we.isSupported=function(){try{we.TEST_VID.volume=.5}catch{return!1}return!!(we.TEST_VID&&we.TEST_VID.canPlayType)};we.canPlayType=function(r){return we.TEST_VID.canPlayType(r)};we.canPlaySource=function(r,e){return we.canPlayType(r.type)};we.canControlVolume=function(){try{const r=we.TEST_VID.volume;we.TEST_VID.volume=r/2+.1;const e=r!==we.TEST_VID.volume;return e&&qt?(Y.setTimeout(()=>{we&&we.prototype&&(we.prototype.featuresVolumeControl=r!==we.TEST_VID.volume)}),!1):e}catch{return!1}};we.canMuteVolume=function(){try{const r=we.TEST_VID.muted;return we.TEST_VID.muted=!r,we.TEST_VID.muted?ur(we.TEST_VID,"muted","muted"):La(we.TEST_VID,"muted","muted"),r!==we.TEST_VID.muted}catch{return!1}};we.canControlPlaybackRate=function(){if(Oi&&qi&&Aa<58)return!1;try{const r=we.TEST_VID.playbackRate;return we.TEST_VID.playbackRate=r/2+.1,r!==we.TEST_VID.playbackRate}catch{return!1}};we.canOverrideAttributes=function(){try{const r=()=>{};Object.defineProperty(Te.createElement("video"),"src",{get:r,set:r}),Object.defineProperty(Te.createElement("audio"),"src",{get:r,set:r}),Object.defineProperty(Te.createElement("video"),"innerHTML",{get:r,set:r}),Object.defineProperty(Te.createElement("audio"),"innerHTML",{get:r,set:r})}catch{return!1}return!0};we.supportsNativeTextTracks=function(){return Oa||qt&&qi};we.supportsNativeVideoTracks=function(){return!!(we.TEST_VID&&we.TEST_VID.videoTracks)};we.supportsNativeAudioTracks=function(){return!!(we.TEST_VID&&we.TEST_VID.audioTracks)};we.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([r,e]){Da(we.prototype,r,()=>we[e](),!0)});we.prototype.featuresVolumeControl=we.canControlVolume();we.prototype.movingMediaElementInDOM=!qt;we.prototype.featuresFullscreenResize=!0;we.prototype.featuresProgressEvents=!0;we.prototype.featuresTimeupdateEvents=!0;we.prototype.featuresVideoFrameCallback=!!(we.TEST_VID&&we.TEST_VID.requestVideoFrameCallback);we.disposeMediaElement=function(r){if(r){for(r.parentNode&&r.parentNode.removeChild(r);r.hasChildNodes();)r.removeChild(r.firstChild);r.removeAttribute("src"),typeof r.load=="function"&&(function(){try{r.load()}catch{}})()}};we.resetMediaElement=function(r){if(!r)return;const e=r.querySelectorAll("source");let i=e.length;for(;i--;)r.removeChild(e[i]);r.removeAttribute("src"),typeof r.load=="function"&&(function(){try{r.load()}catch{}})()};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(r){we.prototype[r]=function(){return this.el_[r]||this.el_.hasAttribute(r)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(r){we.prototype["set"+_t(r)]=function(e){this.el_[r]=e,e?this.el_.setAttribute(r,r):this.el_.removeAttribute(r)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(r){we.prototype[r]=function(){return this.el_[r]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(r){we.prototype["set"+_t(r)]=function(e){this.el_[r]=e}});["pause","load","play"].forEach(function(r){we.prototype[r]=function(){return this.el_[r]()}});ze.withSourceHandlers(we);we.nativeSourceHandler={};we.nativeSourceHandler.canPlayType=function(r){try{return we.TEST_VID.canPlayType(r)}catch{return""}};we.nativeSourceHandler.canHandleSource=function(r,e){if(r.type)return we.nativeSourceHandler.canPlayType(r.type);if(r.src){const i=Yl(r.src);return we.nativeSourceHandler.canPlayType(`video/${i}`)}return""};we.nativeSourceHandler.handleSource=function(r,e,i){e.setSrc(r.src)};we.nativeSourceHandler.dispose=function(){};we.registerSourceHandler(we.nativeSourceHandler);ze.registerTech("Html5",we);const sf=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],qo={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},pl=["tiny","xsmall","small","medium","large","xlarge","huge"],Qs={};pl.forEach(r=>{const e=r.charAt(0)==="x"?`x-${r.substring(1)}`:r;Qs[r]=`vjs-layout-${e}`});const t4={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class st extends he{constructor(e,i,n){if(e.id=e.id||i.id||`vjs_video_${bi()}`,i=Object.assign(st.getTagSettings(e),i),i.initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,!i.language){const o=e.closest("[lang]");o&&(i.language=o.getAttribute("lang"))}if(super(null,i,n),this.boundDocumentFullscreenChange_=o=>this.documentFullscreenChange_(o),this.boundFullWindowOnEscKey_=o=>this.fullWindowOnEscKey(o),this.boundUpdateStyleEl_=o=>this.updateStyleEl_(o),this.boundApplyInitTime_=o=>this.applyInitTime_(o),this.boundUpdateCurrentBreakpoint_=o=>this.updateCurrentBreakpoint_(o),this.boundHandleTechClick_=o=>this.handleTechClick_(o),this.boundHandleTechDoubleClick_=o=>this.handleTechDoubleClick_(o),this.boundHandleTechTouchStart_=o=>this.handleTechTouchStart_(o),this.boundHandleTechTouchMove_=o=>this.handleTechTouchMove_(o),this.boundHandleTechTouchEnd_=o=>this.handleTechTouchEnd_(o),this.boundHandleTechTap_=o=>this.handleTechTap_(o),this.boundUpdatePlayerHeightOnAudioOnlyMode_=o=>this.updatePlayerHeightOnAudioOnlyMode_(o),this.isFullscreen_=!1,this.log=Hh(this.id_),this.fsApi_=ia,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&hn(e),this.language(this.options_.language),i.languages){const o={};Object.getOwnPropertyNames(i.languages).forEach(function(l){o[l.toLowerCase()]=i.languages[l]}),this.languages_=o}else this.languages_=st.prototype.options_.languages;this.resetCache_(),this.poster_=i.poster||"",this.controls_=!!i.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),i.plugins&&Object.keys(i.plugins).forEach(o=>{if(typeof this[o]!="function")throw new Error(`plugin "${o}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),Hl(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(pi(Te,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const s=lt(this.options_);if(i.plugins&&Object.keys(i.plugins).forEach(o=>{this[o](i.plugins[o])}),i.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(i.playbackRates),i.experimentalSvgIcons){const l=new Y.DOMParser().parseFromString(Sb,"image/svg+xml");if(l.querySelector("parsererror"))We.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const d=l.documentElement;d.style.display="none",this.el_.appendChild(d),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio(e.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),i.spatialNavigation&&i.spatialNavigation.enabled&&(this.spatialNavigation=new Eb(this),this.addClass("vjs-spatial-navigation-enabled")),ns&&this.addClass("vjs-touch-enabled"),qt||this.addClass("vjs-workinghover"),st.players[this.id_]=this;const a=nl.split(".")[0];this.addClass(`vjs-v${a}`),this.userActive(!0),this.reportUserActivity(),this.one("play",o=>this.listenForUserActivity_(o)),this.on("keydown",o=>this.handleKeyDown(o)),this.on("languagechange",o=>this.handleLanguagechange(o)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),jt(Te,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),jt(Te,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),st.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Tb(this),Jt.names.forEach(e=>{const i=Jt[e],n=this[i.getterName]();n&&n.off&&n.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e=this.tag,i,n=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");const s=this.tag.tagName.toLowerCase()==="video-js";n?i=this.el_=e.parentNode:s||(i=this.el_=super.createEl("div"));const a=hn(e);if(s){for(i=this.el_=e,e=this.tag=Te.createElement("video");i.children.length;)e.appendChild(i.firstChild);Kr(i,"video-js")||Bn(i,"video-js"),i.appendChild(e),n=this.playerElIngest_=i,Object.keys(i).forEach(c=>{try{e[c]=i[c]}catch{}})}e.setAttribute("tabindex","-1"),a.tabindex="-1",qi&&Ia&&(e.setAttribute("role","application"),a.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in a&&delete a.width,"height"in a&&delete a.height,Object.getOwnPropertyNames(a).forEach(function(c){s&&c==="class"||i.setAttribute(c,a[c]),s&&e.setAttribute(c,a[c])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=i.player=this,this.addClass("vjs-paused");const o=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(c=>Qh[c]).map(c=>"vjs-device-"+c.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...o),Y.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=h0("vjs-styles-dimensions");const c=_n(".vjs-styles-defaults"),d=_n("head");d.insertBefore(this.styleEl_,c?c.nextSibling:d.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const l=e.getElementsByTagName("a");for(let c=0;c<l.length;c++){const d=l.item(c);Bn(d,"vjs-hidden"),d.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!n&&e.parentNode.insertBefore(i,e),sl(e,i),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=i,i}crossOrigin(e){if(typeof e>"u")return this.techGet_("crossOrigin");if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){We.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,i){const n=e+"_";if(i===void 0)return this[n]||0;if(i===""||i==="auto"){this[n]=void 0,this.updateStyleEl_();return}const s=parseFloat(i);if(isNaN(s)){We.error(`Improper value "${i}" supplied for for ${e}`);return}this[n]=s,this.updateStyleEl_()}fluid(e){if(e===void 0)return!!this.fluid_;this.fluid_=!!e,nn(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),ZT(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(e===void 0)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(Y.VIDEOJS_NO_DYNAMIC_STYLE===!0){const l=typeof this.width_=="number"?this.width_:this.options_.width,c=typeof this.height_=="number"?this.height_:this.options_.height,d=this.tech_&&this.tech_.el();d&&(l>=0&&(d.width=l),c>=0&&(d.height=c));return}let e,i,n,s;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?n=this.aspectRatio_:this.videoWidth()>0?n=this.videoWidth()+":"+this.videoHeight():n="16:9";const a=n.split(":"),o=a[1]/a[0];this.width_!==void 0?e=this.width_:this.height_!==void 0?e=this.height_/o:e=this.videoWidth()||300,this.height_!==void 0?i=this.height_:i=e*o,/^[^a-zA-Z]/.test(this.id())?s="dimensions-"+this.id():s=this.id()+"-dimensions",this.addClass(s),f0(this.styleEl_,`
179
+ </svg>`;const pd=sa?10009:aa?461:8,qn={codes:{play:415,pause:19,ff:417,rw:412,back:pd},names:{415:"play",19:"pause",417:"ff",412:"rw",[pd]:"back"},isEventKey(r,e){return e=e.toLowerCase(),!!(this.names[r.keyCode]&&this.names[r.keyCode]===e)},getEventName(r){if(this.names[r.keyCode])return this.names[r.keyCode];if(this.codes[r.code]){const e=this.codes[r.code];return this.names[e]}return null}},md=5;class Eb extends mi{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",()=>{this.focus(this.updateFocusableComponents()[0])}),this.player_.on("modalclose",()=>{this.refocusComponent()}),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())}))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const i=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(i.key)){if(this.isPaused_)return;i.preventDefault();const n=i.key.substring(5).toLowerCase();this.move(n)}else if(qn.isEventKey(i,"play")||qn.isEventKey(i,"pause")||qn.isEventKey(i,"ff")||qn.isEventKey(i,"rw")){i.preventDefault();const n=qn.getEventName(i);this.performMediaAction_(n)}else qn.isEventKey(i,"Back")&&e.target&&typeof e.target.closeable=="function"&&e.target.closeable()&&(i.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+md);break;case"rw":this.userSeek_(this.player_.currentTime()-md);break}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const i=e.relatedTarget;let n=null;const s=this.getCurrentComponent(e.target);i&&(n=!!i.closest(".video-js"),i.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(!e.currentTarget.contains(e.relatedTarget)&&!n||!i)&&(s&&s.name()==="CloseButton"?this.refocusComponent():(this.pause(),s&&s.el()&&(this.lastFocusedComponent_=s)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,i=[];function n(s){for(const a of s)a.hasOwnProperty("el_")&&a.getIsFocusable()&&a.getIsAvailableToBeFocused(a.el())&&i.push(a),a.hasOwnProperty("children_")&&a.children_.length>0&&n(a.children_)}return e.children_.forEach(s=>{if(s.hasOwnProperty("el_"))if(s.getIsFocusable&&s.getIsAvailableToBeFocused&&s.getIsFocusable()&&s.getIsAvailableToBeFocused(s.el())){i.push(s);return}else s.hasOwnProperty("children_")&&s.children_.length>0?n(s.children_):s.hasOwnProperty("items")&&s.items.length>0?n(s.items):this.findSuitableDOMChild(s)&&i.push(s);if(s.name_==="ErrorDisplay"&&s.opened_){const a=s.el_.querySelector(".vjs-errors-ok-button-container");a&&a.querySelectorAll("button").forEach((l,c)=>{i.push({name:()=>"ModalButton"+(c+1),el:()=>l,getPositions:()=>{const d=l.getBoundingClientRect(),m={x:d.x,y:d.y,width:d.width,height:d.height,top:d.top,right:d.right,bottom:d.bottom,left:d.left},g={x:d.left+d.width/2,y:d.top+d.height/2,width:0,height:0,top:d.top+d.height/2,right:d.left+d.width/2,bottom:d.top+d.height/2,left:d.left+d.width/2};return{boundingClientRect:m,center:g}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:d=>!0,focus:()=>l.focus()})})}}),this.focusableComponents=i,this.focusableComponents}findSuitableDOMChild(e){function i(n){if(e.getIsFocusable(n)&&e.getIsAvailableToBeFocused(n))return n;for(let s=0;s<n.children.length;s++){const a=n.children[s],o=i(a);if(o)return o}return null}return e.el()?i(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const i=e||document.activeElement;if(this.focusableComponents.length){for(const n of this.focusableComponents)if(n.el()===i)return n}}add(e){const i=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&i.push(e),this.focusableComponents=i,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let i=0;i<this.focusableComponents.length;i++)if(this.focusableComponents[i].name()===e.name()){this.focusableComponents.splice(i,1),this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});return}}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(e){const i=this.getCurrentComponent();if(!i)return;const n=i.getPositions(),s=this.focusableComponents.filter(o=>o!==i&&this.isInDirection_(n.boundingClientRect,o.getPositions().boundingClientRect,e)),a=this.findBestCandidate_(n.center,s,e);a?this.focus(a):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:i})}findBestCandidate_(e,i,n){let s=1/0,a=null;for(const o of i){const l=o.getPositions().center,c=this.calculateDistance_(e,l,n);c<s&&(s=c,a=o)}return a}isInDirection_(e,i,n){switch(n){case"right":return i.left>=e.right;case"left":return i.right<=e.left;case"down":return i.top>=e.bottom;case"up":return i.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name()){this.focus(this.focusableComponents[e]);return}}else this.focus(this.updateFocusableComponents()[0])}focus(e){typeof e=="object"&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,i,n){const s=Math.abs(e.x-i.x),a=Math.abs(e.y-i.y);let o;switch(n){case"right":case"left":o=s+a*100;break;case"up":o=a*2+s*.5;break;case"down":o=a*5+s;break;default:o=s+a}return o}searchForTrackSelect_(){const e=this;for(const i of e.updateFocusableComponents())if(i.constructor.name==="TextTrackSelect"){e.focus(i);break}}}class kb extends he{constructor(e,i,n){const s=lt({createEl:!1},i);if(super(e,s,n),!i.playerOptions.sources||i.playerOptions.sources.length===0)for(let a=0,o=i.playerOptions.techOrder;a<o.length;a++){const l=_t(o[a]);let c=ze.getTech(l);if(l||(c=he.getComponent(l)),c&&c.isSupported()){e.loadTech_(l);break}}else e.src(i.playerOptions.sources)}}he.registerComponent("MediaLoader",kb);class Ua extends he{constructor(e,i){super(e,i),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=n=>this.handleMouseOver(n),this.handleMouseOut_=n=>this.handleMouseOut(n),this.handleClick_=n=>this.handleClick(n),this.handleKeyDown_=n=>this.handleKeyDown(n),this.emitTapEvents(),this.enable()}createEl(e="div",i={},n={}){i=Object.assign({className:this.buildCSSClass(),tabIndex:0},i),e==="button"&&Ye.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),n=Object.assign({role:"button"},n),this.tabIndex_=i.tabIndex;const s=Me(e,i,n);return this.player_.options_.experimentalSvgIcons||s.appendChild(Me("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(s),s}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=Me("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,i=this.el()){if(e===void 0)return this.controlText_||"Need Text";const n=this.localize(e);this.controlText_=e,Tn(this.controlTextEl_,n),!this.nonIconControl&&!this.player_.options_.noUITitleAttributes&&i.setAttribute("title",n)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),typeof this.tabIndex_<"u"&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))}disable(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),typeof this.tabIndex_<"u"&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver_),this.off("mouseout",this.handleMouseOut_),this.off(["tap","click"],this.handleClick_),this.off("keydown",this.handleKeyDown_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){e.key===" "||e.key==="Enter"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}he.registerComponent("ClickableComponent",Ua);class hl extends Ua{constructor(e,i){super(e,i),this.update(),this.update_=n=>this.update(n),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return Me("div",{className:"vjs-poster"})}crossOrigin(e){if(typeof e>"u")return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){this.player_.log.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.$("img")&&(this.$("img").crossOrigin=e)}update(e){const i=this.player().poster();this.setSrc(i),i?this.show():this.hide()}setSrc(e){if(!e){this.el_.textContent="";return}this.$("img")||this.el_.appendChild(Me("picture",{className:"vjs-poster",tabIndex:-1},{},Me("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Fi(this.player_.play()):this.player_.pause())}}hl.prototype.crossorigin=hl.prototype.crossOrigin;he.registerComponent("PosterImage",hl);const gi="#222",gd="#ccc",wb={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Fo(r,e){let i;if(r.length===4)i=r[1]+r[1]+r[2]+r[2]+r[3]+r[3];else if(r.length===7)i=r.slice(1);else throw new Error("Invalid color code provided, "+r+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+e+")"}function Mi(r,e,i){try{r.style[e]=i}catch{return}}function vd(r){return r?`${r}px`:""}class Db extends he{constructor(e,i,n){super(e,i,n);const s=o=>this.updateDisplay(o),a=o=>{this.updateDisplayOverlay(),this.updateDisplay(o)};e.on("loadstart",o=>this.toggleDisplay(o)),e.on("useractive",s),e.on("userinactive",s),e.on("texttrackchange",s),e.on("loadedmetadata",o=>{this.updateDisplayOverlay(),this.preselectTrack(o)}),e.ready(ct(this,function(){if(e.tech_&&e.tech_.featuresNativeTextTracks){this.hide();return}e.on("fullscreenchange",a),e.on("playerresize",a);const o=Y.screen.orientation||Y,l=Y.screen.orientation?"change":"orientationchange";o.addEventListener(l,a),e.on("dispose",()=>o.removeEventListener(l,a));const c=this.options_.playerOptions.tracks||[];for(let d=0;d<c.length;d++)this.player_.addRemoteTextTrack(c[d],!0);this.preselectTrack()}))}preselectTrack(){const e={captions:1,subtitles:1},i=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage;let s,a,o;for(let l=0;l<i.length;l++){const c=i[l];n&&n.enabled&&n.language&&n.language===c.language&&c.kind in e?c.kind===n.kind?o=c:o||(o=c):n&&!n.enabled?(o=null,s=null,a=null):c.default&&(c.kind==="descriptions"&&!s?s=c:c.kind in e&&!a&&(a=c))}o?o.mode="showing":a?a.mode="showing":s&&(s.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){typeof Y.WebVTT=="function"&&Y.WebVTT.processCues(Y,[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),i=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),i){const o=[];for(let l=0;l<e.length;++l){const c=e[l];c.mode==="showing"&&o.push(c)}this.updateForTrack(o);return}let n=null,s=null,a=e.length;for(;a--;){const o=e[a];o.mode==="showing"&&(o.kind==="descriptions"?n=o:s=o)}if(s?(this.getAttribute("aria-live")!=="off"&&this.setAttribute("aria-live","off"),this.updateForTrack(s)):n&&(this.getAttribute("aria-live")!=="assertive"&&this.setAttribute("aria-live","assertive"),this.updateForTrack(n)),!(Y.CSS!==void 0&&Y.CSS.supports("inset","10px"))){const o=this.el_,l=o.querySelectorAll(".vjs-text-track-cue"),c=this.player_.controlBar.el_.getBoundingClientRect().height,d=this.player_.el_.getBoundingClientRect().height;o.style="",Mi(o,"position","relative"),Mi(o,"height",d-c+"px"),Mi(o,"top","unset"),oa?Mi(o,"bottom",d+"px"):Mi(o,"bottom","0px"),l.length>0&&l.forEach(m=>{if(m.style.inset){const g=m.style.inset.split(" ");g.length===3&&Object.assign(m.style,{top:g[0],right:g[1],bottom:g[2],left:"unset"})}})}}updateDisplayOverlay(){if(!this.player_.videoHeight()||!(Y.CSS!==void 0&&Y.CSS.supports("inset-inline: 10px")))return;const e=this.player_.currentWidth(),i=this.player_.currentHeight(),n=e/i,s=this.player_.videoWidth()/this.player_.videoHeight();let a=0,o=0;Math.abs(n-s)>.1&&(n>s?a=Math.round((e-i*s)/2):o=Math.round((i-e/s)/2)),Mi(this.el_,"insetInline",vd(a)),Mi(this.el_,"insetBlock",vd(o))}updateDisplayState(e){const i=this.player_.textTrackSettings.getValues(),n=e.activeCues;let s=n.length;for(;s--;){const a=n[s];if(!a)continue;const o=a.displayState;if(i.color&&(o.firstChild.style.color=i.color),i.textOpacity&&Mi(o.firstChild,"color",Fo(i.color||"#fff",i.textOpacity)),i.backgroundColor&&(o.firstChild.style.backgroundColor=i.backgroundColor),i.backgroundOpacity&&Mi(o.firstChild,"backgroundColor",Fo(i.backgroundColor||"#000",i.backgroundOpacity)),i.windowColor&&(i.windowOpacity?Mi(o,"backgroundColor",Fo(i.windowColor,i.windowOpacity)):o.style.backgroundColor=i.windowColor),i.edgeStyle&&(i.edgeStyle==="dropshadow"?o.firstChild.style.textShadow=`2px 2px 3px ${gi}, 2px 2px 4px ${gi}, 2px 2px 5px ${gi}`:i.edgeStyle==="raised"?o.firstChild.style.textShadow=`1px 1px ${gi}, 2px 2px ${gi}, 3px 3px ${gi}`:i.edgeStyle==="depressed"?o.firstChild.style.textShadow=`1px 1px ${gd}, 0 1px ${gd}, -1px -1px ${gi}, 0 -1px ${gi}`:i.edgeStyle==="uniform"&&(o.firstChild.style.textShadow=`0 0 4px ${gi}, 0 0 4px ${gi}, 0 0 4px ${gi}, 0 0 4px ${gi}`)),i.fontPercent&&i.fontPercent!==1){const l=Y.parseFloat(o.style.fontSize);o.style.fontSize=l*i.fontPercent+"px",o.style.height="auto",o.style.top="auto"}i.fontFamily&&i.fontFamily!=="default"&&(i.fontFamily==="small-caps"?o.firstChild.style.fontVariant="small-caps":o.firstChild.style.fontFamily=wb[i.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),typeof Y.WebVTT!="function"||e.every(n=>!n.activeCues))return;const i=[];for(let n=0;n<e.length;++n){const s=e[n];for(let a=0;a<s.activeCues.length;++a)i.push(s.activeCues[a])}Y.WebVTT.processCues(Y,i,this.el_);for(let n=0;n<e.length;++n){const s=e[n];for(let a=0;a<s.activeCues.length;++a){const o=s.activeCues[a].displayState;Bn(o,"vjs-text-track-cue","vjs-text-track-cue-"+(s.language?s.language:n)),s.language&&ur(o,"lang",s.language)}this.player_.textTrackSettings&&this.updateDisplayState(s)}}}he.registerComponent("TextTrackDisplay",Db);class Ab extends he{createEl(){const e=this.player_.isAudio(),i=this.localize(e?"Audio Player":"Video Player"),n=Me("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[i])}),s=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return s.appendChild(n),s}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}}he.registerComponent("LoadingSpinner",Ab);class Gt extends Ua{createEl(e,i={},n={}){e="button",i=Object.assign({className:this.buildCSSClass()},i),n=Object.assign({type:"button"},n);const s=Me(e,i,n);return this.player_.options_.experimentalSvgIcons||s.appendChild(Me("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(s),s}addChild(e,i={}){const n=this.constructor.name;return Ye.warn(`Adding an actionable (user controllable) child to a Button (${n}) is not supported; use a ClickableComponent instead.`),he.prototype.addChild.call(this,e,i)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){if(e.key===" "||e.key==="Enter"){e.stopPropagation();return}super.handleKeyDown(e)}}he.registerComponent("Button",Gt);class A0 extends Gt{constructor(e,i){super(e,i),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",n=>this.handleMouseDown(n))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const i=this.player_.play();if(e.type==="tap"||this.mouseused_&&"clientX"in e&&"clientY"in e){Fi(i),this.player_.tech(!0)&&this.player_.tech(!0).focus();return}const n=this.player_.getChild("controlBar"),s=n&&n.getChild("playToggle");if(!s){this.player_.tech(!0).focus();return}const a=()=>s.focus();Zr(i)?i.then(a,()=>{}):this.setTimeout(a,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}A0.prototype.controlText_="Play Video";he.registerComponent("BigPlayButton",A0);class Ib extends Gt{constructor(e,i){super(e,i),this.setIcon("cancel"),this.controlText(i&&i.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){e.key==="Escape"?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}he.registerComponent("CloseButton",Ib);class I0 extends Gt{constructor(e,i={}){super(e,i),i.replay=i.replay===void 0||i.replay,this.setIcon("play"),this.on(e,"play",n=>this.handlePlay(n)),this.on(e,"pause",n=>this.handlePause(n)),i.replay&&this.on(e,"ended",n=>this.handleEnded(n))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Fi(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",i=>this.handleSeeked(i))}}I0.prototype.controlText_="Play";he.registerComponent("PlayToggle",I0);class yr extends he{constructor(e,i){super(e,i),this.on(e,["timeupdate","ended","seeking"],n=>this.update(n)),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),i=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),n=Me("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return i.appendChild(n),this.contentEl_=Me("span",{className:`${e}-display`},{role:"presentation"}),i.appendChild(this.contentEl_),i}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){!this.player_.options_.enableSmoothSeeking&&e.type==="seeking"||this.updateContent(e)}updateTextNode_(e=0){e=Rn(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",()=>{if(!this.contentEl_)return;let i=this.textNode_;i&&this.contentEl_.firstChild!==i&&(i=null,Ye.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=Te.createTextNode(this.formattedTime_),this.textNode_&&(i?this.contentEl_.replaceChild(this.textNode_,i):this.contentEl_.appendChild(this.textNode_))}))}updateContent(e){}}yr.prototype.labelText_="Time";yr.prototype.controlText_="Time";he.registerComponent("TimeDisplay",yr);class Kl extends yr{buildCSSClass(){return"vjs-current-time"}updateContent(e){let i;this.player_.ended()?i=this.player_.duration():e&&e.target&&typeof e.target.pendingSeekTime=="function"&&e.target.pendingSeekTime()!==null?i=e.target.pendingSeekTime():i=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(i)}}Kl.prototype.labelText_="Current Time";Kl.prototype.controlText_="Current Time";he.registerComponent("CurrentTimeDisplay",Kl);class Ql extends yr{constructor(e,i){super(e,i);const n=s=>this.updateContent(s);this.on(e,"durationchange",n),this.on(e,"loadstart",n),this.on(e,"loadedmetadata",n)}buildCSSClass(){return"vjs-duration"}updateContent(e){const i=this.player_.duration();this.updateTextNode_(i)}}Ql.prototype.labelText_="Duration";Ql.prototype.controlText_="Duration";he.registerComponent("DurationDisplay",Ql);class Nb extends he{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),i=super.createEl("div"),n=super.createEl("span",{textContent:"/"});return i.appendChild(n),e.appendChild(i),e}}he.registerComponent("TimeDivider",Nb);class Zl extends yr{constructor(e,i){super(e,i),this.on(e,"durationchange",n=>this.updateContent(n))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return this.options_.displayNegative!==!1&&e.insertBefore(Me("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if(typeof this.player_.duration()!="number")return;let i;this.player_.ended()?i=0:this.player_.remainingTimeDisplay?i=this.player_.remainingTimeDisplay():i=this.player_.remainingTime(),this.updateTextNode_(i)}}Zl.prototype.labelText_="Remaining Time";Zl.prototype.controlText_="Remaining Time";he.registerComponent("RemainingTimeDisplay",Zl);class Ob extends he{constructor(e,i){super(e,i),this.updateShowing(),this.on(this.player(),"durationchange",n=>this.updateShowing(n))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=Me("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(Me("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(Te.createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}}he.registerComponent("LiveDisplay",Ob);class N0 extends Gt{constructor(e,i){super(e,i),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=n=>this.updateLiveEdgeStatus(n),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=Me("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}N0.prototype.controlText_="Seek to live, currently playing live";he.registerComponent("SeekToLive",N0);function us(r,e,i){return r=Number(r),Math.min(i,Math.max(e,isNaN(r)?e:r))}var Bb=Object.freeze({__proto__:null,clamp:us});class Jl extends he{constructor(e,i){super(e,i),this.handleMouseDown_=n=>this.handleMouseDown(n),this.handleMouseUp_=n=>this.handleMouseUp(n),this.handleKeyDown_=n=>this.handleKeyDown(n),this.handleClick_=n=>this.handleClick(n),this.handleMouseMove_=n=>this.handleMouseMove(n),this.update_=n=>this.update(n),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){this.enabled()||(this.on("mousedown",this.handleMouseDown_),this.on("touchstart",this.handleMouseDown_),this.on("keydown",this.handleKeyDown_),this.on("click",this.handleClick_),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)}disable(){if(!this.enabled())return;const e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown_),this.off("touchstart",this.handleMouseDown_),this.off("keydown",this.handleKeyDown_),this.off("click",this.handleClick_),this.off(this.player_,"controlsvisible",this.update_),this.off(e,"mousemove",this.handleMouseMove_),this.off(e,"mouseup",this.handleMouseUp_),this.off(e,"touchmove",this.handleMouseMove_),this.off(e,"touchend",this.handleMouseUp_),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}createEl(e,i={},n={}){return i.className=i.className+" vjs-slider",i=Object.assign({tabIndex:0},i),n=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},n),super.createEl(e,i,n)}handleMouseDown(e){const i=this.bar.el_.ownerDocument;e.type==="mousedown"&&e.preventDefault(),e.type==="touchstart"&&!qi&&e.preventDefault(),n0(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(i,"mousemove",this.handleMouseMove_),this.on(i,"mouseup",this.handleMouseUp_),this.on(i,"touchmove",this.handleMouseMove_),this.on(i,"touchend",this.handleMouseUp_),this.handleMouseMove(e,!0)}handleMouseMove(e){}handleMouseUp(e){const i=this.bar.el_.ownerDocument;r0(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(i,"mousemove",this.handleMouseMove_),this.off(i,"mouseup",this.handleMouseUp_),this.off(i,"touchmove",this.handleMouseMove_),this.off(i,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",()=>{const i=this.vertical()?"height":"width";this.bar.el().style[i]=(e*100).toFixed(2)+"%"})),e}getProgress(){return Number(us(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const i=Pa(this.el_,e);return this.vertical()?i.y:i.x}handleKeyDown(e){const i=this.options_.playerOptions.spatialNavigation,n=i&&i.enabled,s=i&&i.horizontalSeek;n?s&&e.key==="ArrowLeft"||!s&&e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):s&&e.key==="ArrowRight"||!s&&e.key==="ArrowUp"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepBack()):e.key==="ArrowUp"||e.key==="ArrowRight"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(e===void 0)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}he.registerComponent("Slider",Jl);const $o=(r,e)=>us(r/e*100,0,100).toFixed(2)+"%";class Lb extends he{constructor(e,i){super(e,i),this.partEls_=[],this.on(e,"progress",n=>this.update(n))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),i=Me("span",{className:"vjs-control-text"}),n=Me("span",{textContent:this.localize("Loaded")}),s=Te.createTextNode(": ");return this.percentageEl_=Me("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(i),i.appendChild(n),i.appendChild(s),i.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",()=>{const i=this.player_.liveTracker,n=this.player_.buffered(),s=i&&i.isLive()?i.seekableEnd():this.player_.duration(),a=this.player_.bufferedEnd(),o=this.partEls_,l=$o(a,s);this.percent_!==l&&(this.el_.style.width=l,Tn(this.percentageEl_,l),this.percent_=l);for(let c=0;c<n.length;c++){const d=n.start(c),m=n.end(c);let g=o[c];g||(g=this.el_.appendChild(Me()),o[c]=g),!(g.dataset.start===d&&g.dataset.end===m)&&(g.dataset.start=d,g.dataset.end=m,g.style.left=$o(d,a),g.style.width=$o(m-d,a))}for(let c=o.length;c>n.length;c--)this.el_.removeChild(o[c-1]);o.length=n.length})}}he.registerComponent("LoadProgressBar",Lb);class Pb extends he{constructor(e,i){super(e,i),this.update=ji(ct(this,this.update),Ci)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,i,n){const s=rs(this.el_),a=cr(this.player_.el()),o=e.width*i;if(!a||!s)return;let l=e.left-a.left+o,c=e.width-o+(a.right-e.right);c||(c=e.width-o,l=o);let d=s.width/2;l<d?d+=d-l:c<d&&(d=c),d<0?d=0:d>s.width&&(d=s.width),d=Math.round(d),this.el_.style.right=`-${d}px`,this.write(n)}write(e){Tn(this.el_,e)}updateTime(e,i,n,s){this.requestNamedAnimationFrame("TimeTooltip#updateTime",()=>{let a;const o=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const l=this.player_.liveTracker.liveWindow(),c=l-i*l;a=(c<1?"":"-")+Rn(c,l)}else a=Rn(n,o);this.update(e,i,a),s&&s()})}}he.registerComponent("TimeTooltip",Pb);class eu extends he{constructor(e,i){super(e,i),this.setIcon("circle"),this.update=ji(ct(this,this.update),Ci)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,i,n){const s=this.getChild("timeTooltip");if(!s)return;const a=n&&n.target&&typeof n.target.pendingSeekTime=="function"?n.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();s.updateTime(e,i,a)}}eu.prototype.options_={children:[]};!qt&&!Oi&&eu.prototype.options_.children.push("timeTooltip");he.registerComponent("PlayProgressBar",eu);class O0 extends he{constructor(e,i){super(e,i),this.update=ji(ct(this,this.update),Ci)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i){const n=i*this.player_.duration();this.getChild("timeTooltip").updateTime(e,i,n,()=>{this.el_.style.left=`${e.width*i}px`})}}O0.prototype.options_={children:["timeTooltip"]};he.registerComponent("MouseTimeDisplay",O0);class za extends Jl{constructor(e,i){i=lt(za.prototype.options_,i),i.children=[...i.children];const n=e.options_.disableSeekWhileScrubbingOnMobile&&(qt||Oi)||e.options_.disableSeekWhileScrubbingOnSTV;(!qt&&!Oi||n)&&i.children.splice(1,0,"mouseTimeDisplay"),super(e,i),this.shouldDisableSeekWhileScrubbing_=n,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=ct(this,this.update),this.update=ji(this.update_,Ci),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in Te&&"visibilityState"in Te&&this.on(Te,"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){Te.visibilityState==="hidden"?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(!this.player_.ended()&&!this.player_.paused()&&this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,Ci))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&e.type!=="ended"||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if(Te.visibilityState==="hidden")return;const i=super.update();return this.requestNamedAnimationFrame("SeekBar#update",()=>{const n=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),s=this.player_.liveTracker;let a=this.player_.duration();s&&s.isLive()&&(a=this.player_.liveTracker.liveCurrentTime()),this.percent_!==i&&(this.el_.setAttribute("aria-valuenow",(i*100).toFixed(2)),this.percent_=i),(this.currentTime_!==n||this.duration_!==a)&&(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Rn(n,a),Rn(a,a)],"{1} of {2}")),this.currentTime_=n,this.duration_=a),this.bar&&this.bar.update(cr(this.el()),this.getProgress(),e)}),i}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(e!==void 0)if(e!==null){const i=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,i))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(this.pendingSeekTime()!==null)return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let i;const n=this.player_.liveTracker;return n&&n.isLive()?(i=(e-n.seekableStart())/n.liveWindow(),n.atLiveEdge()&&(i=1)):i=e/this.player_.duration(),i}handleMouseDown(e){ss(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,i=!1){if(!ss(e)||isNaN(this.player_.duration()))return;!i&&!this.player_.scrubbing()&&this.player_.scrubbing(!0);let n;const s=this.calculateDistance(e),a=this.player_.liveTracker;if(!a||!a.isLive())n=s*this.player_.duration(),n===this.player_.duration()&&(n=n-.1);else{if(s>=.99){a.seekToLiveEdge();return}const o=a.seekableStart(),l=a.liveCurrentTime();if(n=o+s*a.liveWindow(),n>=l&&(n=l),n<=o&&(n=o+.1),n===1/0)return}this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(n):this.userSeek_(n),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Fi(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const i=this.pendingSeekTime()!==null?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(i+e),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){this.pendingSeekTime()!==null&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const i=this.player_.liveTracker;if(e.key===" "||e.key==="Enter")e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if(e.key==="Home")e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if(e.key==="End")e.preventDefault(),e.stopPropagation(),i&&i.isLive()?this.userSeek_(i.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const n=parseInt(e.key,10)*.1;i&&i.isLive()?this.userSeek_(i.seekableStart()+i.liveWindow()*n):this.userSeek_(this.player_.duration()*n)}else e.key==="PageDown"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):e.key==="PageUp"?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in Te&&"visibilityState"in Te&&this.off(Te,"visibilitychange",this.toggleVisibility_),super.dispose()}}za.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12};he.registerComponent("SeekBar",za);class B0 extends he{constructor(e,i){super(e,i),this.handleMouseMove=ji(ct(this,this.handleMouseMove),Ci),this.throttledHandleMouseSeek=ji(ct(this,this.handleMouseSeek),Ci),this.handleMouseUpHandler_=n=>this.handleMouseUp(n),this.handleMouseDownHandler_=n=>this.handleMouseDown(n),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const i=this.getChild("seekBar");if(!i)return;const n=i.getChild("playProgressBar"),s=i.getChild("mouseTimeDisplay");if(!n&&!s)return;const a=i.el(),o=rs(a);let l=Pa(a,e).x;l=us(l,0,1),s&&s.update(o,l),n&&n.update(o,i.getProgress())}handleMouseSeek(e){const i=this.getChild("seekBar");i&&i.handleMouseMove(e)}enabled(){return this.enabled_}disable(){if(this.children().forEach(e=>e.disable&&e.disable()),!!this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Fi(this.player_.play())}}enable(){this.children().forEach(e=>e.enable&&e.enable()),!this.enabled()&&(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const i=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(i,"mousemove",this.throttledHandleMouseSeek),this.on(i,"touchmove",this.throttledHandleMouseSeek),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const i=this.getChild("seekBar");i&&i.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}B0.prototype.options_={children:["seekBar"]};he.registerComponent("ProgressControl",B0);class L0 extends Gt{constructor(e,i){super(e,i),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],n=>this.handlePictureInPictureChange(n)),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],n=>this.handlePictureInPictureEnabledChange(n)),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],()=>this.handlePictureInPictureAudioModeChange()),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){if(!(this.player_.currentType().substring(0,5)==="audio"||this.player_.audioPosterMode()||this.player_.audioOnlyMode())){this.show();return}this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()}handlePictureInPictureEnabledChange(){Te.pictureInPictureEnabled&&this.player_.disablePictureInPicture()===!1||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in Y?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){typeof Te.exitPictureInPicture=="function"&&super.show()}}L0.prototype.controlText_="Picture-in-Picture";he.registerComponent("PictureInPictureToggle",L0);class P0 extends Gt{constructor(e,i){super(e,i),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",n=>this.handleFullscreenChange(n)),Te[e.fsApi_.fullscreenEnabled]===!1&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}P0.prototype.controlText_="Fullscreen";he.registerComponent("FullscreenToggle",P0);const Mb=function(r,e){e.tech_&&!e.tech_.featuresVolumeControl&&r.addClass("vjs-hidden"),r.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})};class Rb extends he{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}he.registerComponent("VolumeLevel",Rb);class Vb extends he{constructor(e,i){super(e,i),this.update=ji(ct(this,this.update),Ci)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,i,n,s){if(!n){const a=cr(this.el_),o=cr(this.player_.el()),l=e.width*i;if(!o||!a)return;const c=e.left-o.left+l,d=e.width-l+(o.right-e.right);let m=a.width/2;c<m?m+=m-c:d<m&&(m=d),m<0?m=0:m>a.width&&(m=a.width),this.el_.style.right=`-${m}px`}this.write(`${s}%`)}write(e){Tn(this.el_,e)}updateVolume(e,i,n,s,a){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",()=>{this.update(e,i,n,s.toFixed(0)),a&&a()})}}he.registerComponent("VolumeLevelTooltip",Vb);class M0 extends he{constructor(e,i){super(e,i),this.update=ji(ct(this,this.update),Ci)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,i,n){const s=100*i;this.getChild("volumeLevelTooltip").updateVolume(e,i,n,s,()=>{n?this.el_.style.bottom=`${e.height*i}px`:this.el_.style.left=`${e.width*i}px`})}}M0.prototype.options_={children:["volumeLevelTooltip"]};he.registerComponent("MouseVolumeLevelDisplay",M0);class Ha extends Jl{constructor(e,i){super(e,i),this.on("slideractive",n=>this.updateLastVolume_(n)),this.on(e,"volumechange",n=>this.updateARIAAttributes(n)),e.ready(()=>this.updateARIAAttributes())}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){ss(e)&&super.handleMouseDown(e)}handleMouseMove(e){const i=this.getChild("mouseVolumeLevelDisplay");if(i){const n=this.el(),s=cr(n),a=this.vertical();let o=Pa(n,e);o=a?o.y:o.x,o=us(o,0,1),i.update(s,o,a)}ss(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const i=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",i),this.el_.setAttribute("aria-valuetext",i+"%")}volumeAsPercentage_(){return Math.round(this.player_.volume()*100)}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",()=>{this.player_.volume()===0&&this.player_.lastVolume_(e)})}}Ha.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};!qt&&!Oi&&Ha.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay");Ha.prototype.playerEvent="volumechange";he.registerComponent("VolumeBar",Ha);class R0 extends he{constructor(e,i={}){i.vertical=i.vertical||!1,(typeof i.volumeBar>"u"||lr(i.volumeBar))&&(i.volumeBar=i.volumeBar||{},i.volumeBar.vertical=i.vertical),super(e,i),Mb(this,e),this.throttledHandleMouseMove=ji(ct(this,this.handleMouseMove),Ci),this.handleMouseUpHandler_=n=>this.handleMouseUp(n),this.on("mousedown",n=>this.handleMouseDown(n)),this.on("touchstart",n=>this.handleMouseDown(n)),this.on("mousemove",n=>this.handleMouseMove(n)),this.on(this.volumeBar,["focus","slideractive"],()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")}),this.on(this.volumeBar,["blur","sliderinactive"],()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")})}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const i=this.el_.ownerDocument;this.on(i,"mousemove",this.throttledHandleMouseMove),this.on(i,"touchmove",this.throttledHandleMouseMove),this.on(i,"mouseup",this.handleMouseUpHandler_),this.on(i,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const i=this.el_.ownerDocument;this.off(i,"mousemove",this.throttledHandleMouseMove),this.off(i,"touchmove",this.throttledHandleMouseMove),this.off(i,"mouseup",this.handleMouseUpHandler_),this.off(i,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}R0.prototype.options_={children:["volumeBar"]};he.registerComponent("VolumeControl",R0);const Fb=function(r,e){e.tech_&&!e.tech_.featuresMuteControl&&r.addClass("vjs-hidden"),r.on(e,"loadstart",function(){e.tech_.featuresMuteControl?r.removeClass("vjs-hidden"):r.addClass("vjs-hidden")})};class V0 extends Gt{constructor(e,i){super(e,i),Fb(this,e),this.on(e,["loadstart","volumechange"],n=>this.update(n))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const i=this.player_.volume(),n=this.player_.lastVolume_();if(i===0){const s=n<.1?.1:n;this.player_.volume(s),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let i=3;this.setIcon("volume-high"),qt&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),e===0||this.player_.muted()?(this.setIcon("volume-mute"),i=0):e<.33?(this.setIcon("volume-low"),i=1):e<.67&&(this.setIcon("volume-medium"),i=2),Ba(this.el_,[0,1,2,3].reduce((n,s)=>n+`${s?" ":""}vjs-vol-${s}`,"")),Bn(this.el_,`vjs-vol-${i}`)}updateControlText_(){const i=this.player_.muted()||this.player_.volume()===0?"Unmute":"Mute";this.controlText()!==i&&this.controlText(i)}}V0.prototype.controlText_="Mute";he.registerComponent("MuteToggle",V0);class F0 extends he{constructor(e,i={}){typeof i.inline<"u"?i.inline=i.inline:i.inline=!0,(typeof i.volumeControl>"u"||lr(i.volumeControl))&&(i.volumeControl=i.volumeControl||{},i.volumeControl.vertical=!i.inline),super(e,i),this.handleKeyPressHandler_=n=>this.handleKeyPress(n),this.on(e,["loadstart"],n=>this.volumePanelState_(n)),this.on(this.muteToggle,"keyup",n=>this.handleKeyPress(n)),this.on(this.volumeControl,"keyup",n=>this.handleVolumeControlKeyUp(n)),this.on("keydown",n=>this.handleKeyPress(n)),this.on("mouseover",n=>this.handleMouseOver(n)),this.on("mouseout",n=>this.handleMouseOut(n)),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){e.key==="Escape"&&this.muteToggle.focus()}handleMouseOver(e){this.addClass("vjs-hover"),pi(Te,"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),jt(Te,"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){e.key==="Escape"&&this.handleMouseOut()}}F0.prototype.options_={children:["muteToggle","volumeControl"]};he.registerComponent("VolumePanel",F0);class $0 extends Gt{constructor(e,i){super(e,i),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const i=this.player_.currentTime(),n=this.player_.liveTracker,s=n&&n.isLive()?n.seekableEnd():this.player_.duration();let a;i+this.skipTime<=s?a=i+this.skipTime:a=s,this.player_.currentTime(a)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}$0.prototype.controlText_="Skip Forward";he.registerComponent("SkipForward",$0);class U0 extends Gt{constructor(e,i){super(e,i),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const i=this.player_.currentTime(),n=this.player_.liveTracker,s=n&&n.isLive()&&n.seekableStart();let a;s&&i-this.skipTime<=s?a=s:i>=this.skipTime?a=i-this.skipTime:a=0,this.player_.currentTime(a)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}U0.prototype.controlText_="Skip Backward";he.registerComponent("SkipBackward",U0);class z0 extends he{constructor(e,i){super(e,i),i&&(this.menuButton_=i.menuButton),this.focusedChild_=-1,this.on("keydown",n=>this.handleKeyDown(n)),this.boundHandleBlur_=n=>this.handleBlur(n),this.boundHandleTapClick_=n=>this.handleTapClick(n)}addEventListenerForItem(e){e instanceof he&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof he&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){typeof e=="string"&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const i=this.addChild(e);i&&this.addEventListenerForItem(i)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=Me(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const i=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),pi(i,"click",function(n){n.preventDefault(),n.stopImmediatePropagation()}),i}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const i=e.relatedTarget||Te.activeElement;if(!this.children().some(n=>n.el()===i)){const n=this.menuButton_;n&&n.buttonPressed_&&i!==n.el().firstChild&&n.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const i=this.children();if(!Array.isArray(i))return;const n=i.filter(s=>s.el()===e.target)[0];if(!n)return;n.name()!=="CaptionSettingsMenuItem"&&this.menuButton_.focus()}}handleKeyDown(e){e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(e.key==="ArrowRight"||e.key==="ArrowUp")&&(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;this.focusedChild_!==void 0&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const i=this.children().slice();i.length&&i[0].hasClass("vjs-menu-title")&&i.shift(),i.length>0&&(e<0?e=0:e>=i.length&&(e=i.length-1),this.focusedChild_=e,i[e].el_.focus())}}he.registerComponent("Menu",z0);class tu extends he{constructor(e,i={}){super(e,i),this.menuButton_=new Gt(e,i),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const n=Gt.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+n,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const s=a=>this.handleClick(a);this.handleMenuKeyUp_=a=>this.handleMenuKeyUp(a),this.on(this.menuButton_,"tap",s),this.on(this.menuButton_,"click",s),this.on(this.menuButton_,"keydown",a=>this.handleKeyDown(a)),this.on(this.menuButton_,"mouseenter",()=>{this.addClass("vjs-hover"),this.menu.show(),pi(Te,"keyup",this.handleMenuKeyUp_)}),this.on("mouseleave",a=>this.handleMouseLeave(a)),this.on("keydown",a=>this.handleSubmenuKeyDown(a))}update(){const e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?(this.hide(),this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new z0(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const i=Me("li",{className:"vjs-menu-title",textContent:_t(this.options_.title),tabIndex:-1}),n=new he(this.player_,{el:i});e.addItem(n)}if(this.items=this.createItems(),this.items)for(let i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){return super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";this.options_.inline===!0?e+="-inline":e+="-popup";const i=Gt.prototype.buildCSSClass();return`vjs-menu-button ${e} ${i} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return this.options_.inline===!0?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,i=this.menuButton_.el()){return this.menuButton_.controlText(e,i)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),jt(Te,"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){e.key==="Escape"||e.key==="Tab"?(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus())):(e.key==="Up"||e.key==="Down"&&!(this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))}handleMenuKeyUp(e){(e.key==="Escape"||e.key==="Tab")&&this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){(e.key==="Escape"||e.key==="Tab")&&(this.buttonPressed_&&this.unpressButton(),!e.key==="Tab"&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),qt&&Zh())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}he.registerComponent("MenuButton",tu);class iu extends tu{constructor(e,i){const n=i.tracks;if(super(e,i),this.items.length<=1&&this.hide(),!n)return;const s=ct(this,this.update);n.addEventListener("removetrack",s),n.addEventListener("addtrack",s),n.addEventListener("labelchange",s),this.player_.on("ready",s),this.player_.on("dispose",function(){n.removeEventListener("removetrack",s),n.removeEventListener("addtrack",s),n.removeEventListener("labelchange",s)})}}he.registerComponent("TrackButton",iu);class cs extends Ua{constructor(e,i){super(e,i),this.selectable=i.selectable,this.isSelected_=i.selected||!1,this.multiSelectable=i.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,i,n){this.nonIconControl=!0;const s=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},i),n),a=Me("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?s.appendChild(a):s.replaceChild(a,s.querySelector(".vjs-icon-placeholder")),s}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))}}he.registerComponent("MenuItem",cs);class ds extends cs{constructor(e,i){const n=i.track,s=e.textTracks();i.label=n.label||n.language||"Unknown",i.selected=n.mode==="showing",super(e,i),this.track=n,this.kinds=(i.kinds||[i.kind||this.track.kind]).filter(Boolean);const a=(...l)=>{this.handleTracksChange.apply(this,l)},o=(...l)=>{this.handleSelectedLanguageChange.apply(this,l)};if(e.on(["loadstart","texttrackchange"],a),s.addEventListener("change",a),s.addEventListener("selectedlanguagechange",o),this.on("dispose",function(){e.off(["loadstart","texttrackchange"],a),s.removeEventListener("change",a),s.removeEventListener("selectedlanguagechange",o)}),s.onchange===void 0){let l;this.on(["tap","click"],function(){if(typeof Y.Event!="object")try{l=new Y.Event("change")}catch{}l||(l=Te.createEvent("Event"),l.initEvent("change",!0,!0)),s.dispatchEvent(l)})}this.handleTracksChange()}handleClick(e){const i=this.track,n=this.player_.textTracks();if(super.handleClick(e),!!n)for(let s=0;s<n.length;s++){const a=n[s];this.kinds.indexOf(a.kind)!==-1&&(a===i?a.mode!=="showing"&&(a.mode="showing"):a.mode!=="disabled"&&(a.mode="disabled"))}}handleTracksChange(e){const i=this.track.mode==="showing";i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){if(this.track.mode==="showing"){const i=this.player_.cache_.selectedLanguage;if(i&&i.enabled&&i.language===this.track.language&&i.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}he.registerComponent("TextTrackMenuItem",ds);class H0 extends ds{constructor(e,i){i.track={player:e,kind:i.kind,kinds:i.kinds,default:!1,mode:"disabled"},i.kinds||(i.kinds=[i.kind]),i.label?i.track.label=i.label:i.track.label=i.kinds.join(" and ")+" off",i.selectable=!0,i.multiSelectable=!1,super(e,i)}handleTracksChange(e){const i=this.player().textTracks();let n=!0;for(let s=0,a=i.length;s<a;s++){const o=i[s];if(this.options_.kinds.indexOf(o.kind)>-1&&o.mode==="showing"){n=!1;break}}n!==this.isSelected_&&this.selected(n)}handleSelectedLanguageChange(e){const i=this.player().textTracks();let n=!0;for(let s=0,a=i.length;s<a;s++){const o=i[s];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&o.mode==="showing"){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}he.registerComponent("OffTextTrackMenuItem",H0);class _r extends iu{constructor(e,i={}){i.tracks=e.textTracks(),super(e,i)}createItems(e=[],i=ds){let n;this.label_&&(n=`${this.label_} off`),e.push(new H0(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;const s=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let a=0;a<s.length;a++){const o=s[a];if(this.kinds_.indexOf(o.kind)>-1){const l=new i(this.player_,{track:o,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});l.addClass(`vjs-${o.kind}-menu-item`),e.push(l)}}return e}}he.registerComponent("TextTrackButton",_r);class q0 extends cs{constructor(e,i){const n=i.track,s=i.cue,a=e.currentTime();i.selectable=!0,i.multiSelectable=!1,i.label=s.text,i.selected=s.startTime<=a&&a<s.endTime,super(e,i),this.track=n,this.cue=s}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}he.registerComponent("ChaptersTrackMenuItem",q0);class nu extends _r{constructor(e,i,n){super(e,i,n),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach(s=>{s.selected(this.track_.activeCues[0]===s.cue)})}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&e.track.kind!=="chapters")return;const i=this.findChaptersTrack();i!==this.track_?(this.setTrack(i),super.update()):(!this.items||i&&i.cues&&i.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.kind===this.kind_)return n}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(_t(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const i=this.track_.cues;if(!i)return e;for(let n=0,s=i.length;n<s;n++){const a=i[n],o=new q0(this.player_,{track:this.track_,cue:a});e.push(o)}return e}}nu.prototype.kind_="chapters";nu.prototype.controlText_="Chapters";he.registerComponent("ChaptersButton",nu);class ru extends _r{constructor(e,i,n){super(e,i,n),this.setIcon("audio-description");const s=e.textTracks(),a=ct(this,this.handleTracksChange);s.addEventListener("change",a),this.on("dispose",function(){s.removeEventListener("change",a)})}handleTracksChange(e){const i=this.player().textTracks();let n=!1;for(let s=0,a=i.length;s<a;s++){const o=i[s];if(o.kind!==this.kind_&&o.mode==="showing"){n=!0;break}}n?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}ru.prototype.kind_="descriptions";ru.prototype.controlText_="Descriptions";he.registerComponent("DescriptionsButton",ru);class su extends _r{constructor(e,i,n){super(e,i,n),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}su.prototype.kind_="subtitles";su.prototype.controlText_="Subtitles";he.registerComponent("SubtitlesButton",su);class au extends ds{constructor(e,i){i.track={player:e,kind:i.kind,label:i.kind+" settings",selectable:!1,default:!1,mode:"disabled"},i.selectable=!1,i.name="CaptionSettingsMenuItem",super(e,i),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+i.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}he.registerComponent("CaptionSettingsMenuItem",au);class ou extends _r{constructor(e,i,n){super(e,i,n),this.setIcon("captions")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new au(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}ou.prototype.kind_="captions";ou.prototype.controlText_="Captions";he.registerComponent("CaptionsButton",ou);class j0 extends ds{createEl(e,i,n){const s=super.createEl(e,i,n),a=s.querySelector(".vjs-menu-item-text");return this.options_.track.kind==="captions"&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",s):a.appendChild(Me("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(Me("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),s}}he.registerComponent("SubsCapsMenuItem",j0);class lu extends _r{constructor(e,i={}){super(e,i),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(_t(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return!(this.player().tech_&&this.player().tech_.featuresNativeTextTracks)&&this.player().getChild("textTrackSettings")&&(e.push(new au(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,j0),e}}lu.prototype.kinds_=["captions","subtitles"];lu.prototype.controlText_="Subtitles";he.registerComponent("SubsCapsButton",lu);class G0 extends cs{constructor(e,i){const n=i.track,s=e.audioTracks();i.label=n.label||n.language||"Unknown",i.selected=n.enabled,super(e,i),this.track=n,this.addClass(`vjs-${n.kind}-menu-item`);const a=(...o)=>{this.handleTracksChange.apply(this,o)};s.addEventListener("change",a),this.on("dispose",()=>{s.removeEventListener("change",a)})}createEl(e,i,n){const s=super.createEl(e,i,n),a=s.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(a.appendChild(Me("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),a.appendChild(Me("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),s}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const i=this.player_.audioTracks();for(let n=0;n<i.length;n++){const s=i[n];s!==this.track&&(s.enabled=s===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}he.registerComponent("AudioTrackMenuItem",G0);class W0 extends iu{constructor(e,i={}){i.tracks=e.audioTracks(),super(e,i),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const i=this.player_.audioTracks();for(let n=0;n<i.length;n++){const s=i[n];e.push(new G0(this.player_,{track:s,selectable:!0,multiSelectable:!1}))}return e}}W0.prototype.controlText_="Audio Track";he.registerComponent("AudioTrackButton",W0);class uu extends cs{constructor(e,i){const n=i.rate,s=parseFloat(n,10);i.label=n,i.selected=s===e.playbackRate(),i.selectable=!0,i.multiSelectable=!1,super(e,i),this.label=n,this.rate=s,this.on(e,"ratechange",a=>this.update(a))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}uu.prototype.contentElType="button";he.registerComponent("PlaybackRateMenuItem",uu);class Y0 extends tu{constructor(e,i){super(e,i),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",n=>this.updateVisibility(n)),this.on(e,"ratechange",n=>this.updateLabel(n)),this.on(e,"playbackrateschange",n=>this.handlePlaybackRateschange(n))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=Me("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),i=[];for(let n=e.length-1;n>=0;n--)i.push(new uu(this.player(),{rate:e[n]+"x"}));return i}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}Y0.prototype.controlText_="Playback Rate";he.registerComponent("PlaybackRateMenuButton",Y0);class X0 extends he{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",i={},n={}){return i.className||(i.className=this.buildCSSClass()),super.createEl(e,i,n)}}he.registerComponent("Spacer",X0);class $b extends X0{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}}he.registerComponent("CustomControlSpacer",$b);class K0 extends he{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}K0.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]};he.registerComponent("ControlBar",K0);class Q0 extends vr{constructor(e,i){super(e,i),this.on(e,"error",n=>{this.open(n)})}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}Q0.prototype.options_=Object.assign({},vr.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});he.registerComponent("ErrorDisplay",Q0);class Z0 extends he{constructor(e,i={}){super(e,i),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),Me("select",{id:this.options_.id},{},this.options_.SelectOptions.map(i=>{const n=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${bi()}`)+"-"+i[1].replace(/\W+/g,""),s=Me("option",{id:n,value:this.localize(i[0]),textContent:this.localize(i[1])});return s.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${n}`),s}))}}he.registerComponent("TextTrackSelect",Z0);class Pn extends he{constructor(e,i={}){super(e,i);const n=Me("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(n);const s=this.options_.selects;for(const a of s){const o=this.options_.selectConfigs[a],l=o.className,c=o.id.replace("%s",this.options_.id_);let d=null;const m=`vjs_select_${bi()}`;if(this.options_.type==="colors"){d=Me("span",{className:l});const S=Me("label",{id:c,className:"vjs-label",textContent:this.localize(o.label)});S.setAttribute("for",m),d.appendChild(S)}const g=new Z0(e,{SelectOptions:o.options,legendId:this.options_.legendId,id:m,labelId:c});this.addChild(g),this.options_.type==="colors"&&(d.appendChild(g.el()),this.el().appendChild(d))}}createEl(){return Me("fieldset",{className:this.options_.className})}}he.registerComponent("TextTrackFieldset",Pn);class J0 extends he{constructor(e,i={}){super(e,i);const n=this.options_.textTrackComponentid,s=new Pn(e,{id_:n,legendId:`captions-text-legend-${n}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(s);const a=new Pn(e,{id_:n,legendId:`captions-background-${n}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(a);const o=new Pn(e,{id_:n,legendId:`captions-window-${n}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(o)}createEl(){return Me("div",{className:"vjs-track-settings-colors"})}}he.registerComponent("TextTrackSettingsColors",J0);class ef extends he{constructor(e,i={}){super(e,i);const n=this.options_.textTrackComponentid,s=new Pn(e,{id_:n,legendId:`captions-font-size-${n}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(s);const a=new Pn(e,{id_:n,legendId:`captions-edge-style-${n}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(a);const o=new Pn(e,{id_:n,legendId:`captions-font-family-${n}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(o)}createEl(){return Me("div",{className:"vjs-track-settings-font"})}}he.registerComponent("TextTrackSettingsFont",ef);class tf extends he{constructor(e,i={}){super(e,i);const n=new Gt(e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});n.el().classList.remove("vjs-control","vjs-button"),n.el().textContent=this.localize("Reset"),this.addChild(n);const s=this.localize("Done"),a=new Gt(e,{controlText:s,className:"vjs-done-button"});a.el().classList.remove("vjs-control","vjs-button"),a.el().textContent=s,this.addChild(a)}createEl(){return Me("div",{className:"vjs-track-settings-controls"})}}he.registerComponent("TrackSettingsControls",tf);const Uo="vjs-text-track-settings",yd=["#000","Black"],_d=["#00F","Blue"],Td=["#0FF","Cyan"],bd=["#0F0","Green"],Cd=["#F0F","Magenta"],xd=["#F00","Red"],Sd=["#FFF","White"],Ed=["#FF0","Yellow"],zo=["1","Opaque"],Ho=["0.5","Semi-Transparent"],kd=["0","Transparent"],fn={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[yd,Sd,xd,bd,_d,Ed,Cd,Td],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[zo,Ho,kd],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Sd,yd,xd,bd,_d,Ed,Cd,Td],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:r=>r==="1.00"?null:Number(r)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[zo,Ho],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[kd,Ho,zo],className:"vjs-window-opacity vjs-opacity"}};fn.windowColor.options=fn.backgroundColor.options;function nf(r,e){if(e&&(r=e(r)),r&&r!=="none")return r}function Ub(r,e){const i=r.options[r.options.selectedIndex].value;return nf(i,e)}function zb(r,e,i){if(e){for(let n=0;n<r.options.length;n++)if(nf(r.options[n].value,i)===e){r.selectedIndex=n;break}}}class Hb extends vr{constructor(e,i){i.temporary=!1,super(e,i),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=Me("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),i.persistTextTrackSettings===void 0&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const i=new J0(e,{textTrackComponentid:this.id_,selectConfigs:fn,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(i);const n=new ef(e,{textTrackComponentid:this.id_,selectConfigs:fn,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(n);const s=new tf(e);this.addChild(s)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],()=>{this.saveSettings(),this.close()}),this.on(this.$(".vjs-default-button"),["click","tap"],()=>{this.setDefaults(),this.updateDisplay()}),Xn(fn,e=>{this.on(this.$(e.selector),"change",this.updateDisplay)})}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return jh(fn,(e,i,n)=>{const s=Ub(this.$(i.selector),i.parser);return s!==void 0&&(e[n]=s),e},{})}setValues(e){Xn(fn,(i,n)=>{zb(this.$(i.selector),e[n],i.parser)})}setDefaults(){Xn(fn,e=>{const i=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=i})}restoreSettings(){let e;try{e=JSON.parse(Y.localStorage.getItem(Uo))}catch(i){Ye.warn(i)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?Y.localStorage.setItem(Uo,JSON.stringify(e)):Y.localStorage.removeItem(Uo)}catch(i){Ye.warn(i)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}he.registerComponent("TextTrackSettings",Hb);class qb extends he{constructor(e,i){let n=i.ResizeObserver||Y.ResizeObserver;i.ResizeObserver===null&&(n=!1);const s=lt({createEl:!n,reportTouchActivity:!1},i);super(e,s),this.ResizeObserver=i.ResizeObserver||Y.ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=p0(()=>{this.resizeHandler()},100,!1,this),n?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const a=this.debouncedHandler_;let o=this.unloadListener_=function(){jt(this,"resize",a),jt(this,"unload",o),o=null};pi(this.el_.contentWindow,"unload",o),pi(this.el_.contentWindow,"resize",a)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){!this.player_||!this.player_.trigger||this.player_.trigger("playerresize")}dispose(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,super.dispose()}}he.registerComponent("ResizeManager",qb);const jb={trackingThreshold:20,liveTolerance:15};class Gb extends he{constructor(e,i){const n=lt(jb,i,{createEl:!1});super(e,n),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=s=>this.handlePlay(s),this.handleFirstTimeupdate_=s=>this.handleFirstTimeupdate(s),this.handleSeeked_=s=>this.handleSeeked(s),this.seekToLiveEdge_=s=>this.seekToLiveEdge(s),this.reset_(),this.on(this.player_,"durationchange",s=>this.handleDurationchange(s)),this.on(this.player_,"canplay",()=>this.toggleTracking())}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const i=Number(Y.performance.now().toFixed(4)),n=this.lastTime_===-1?0:(i-this.lastTime_)/1e3;this.lastTime_=i,this.pastSeekEnd_=this.pastSeekEnd()+n;const s=this.liveCurrentTime(),a=this.player_.currentTime();let o=this.player_.paused()||this.seekedBehindLive_||Math.abs(s-a)>this.options_.liveTolerance;(!this.timeupdateSeen_||s===1/0)&&(o=!1),o!==this.behindLiveEdge_&&(this.behindLiveEdge_=o,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,Ci),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),this.off(this.player_,"seeked",this.handleSeeked_),this.off(this.player_,"play",this.handlePlay_),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_),this.off(this.player_,"timeupdate",this.seekToLiveEdge_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),i=[];let n=e?e.length:0;for(;n--;)i.push(e.end(n));return i.length?i.sort()[i.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),i=[];let n=e?e.length:0;for(;n--;)i.push(e.start(n));return i.length?i.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return this.lastSeekEnd_!==-1&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return typeof this.trackingInterval_=="number"}seekToLiveEdge(){this.seekedBehindLive_=!1,!this.atLiveEdge()&&(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}he.registerComponent("LiveTracker",Gb);class Wb extends he{constructor(e,i){super(e,i),this.on("statechanged",n=>this.updateDom_()),this.updateDom_()}createEl(){return this.els={title:Me("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${bi()}`}),description:Me("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${bi()}`})},Me("div",{className:"vjs-title-bar"},{},Gh(this.els))}updateDom_(){const e=this.player_.tech_,i=e&&e.el_,n={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(s=>{const a=this.state[s],o=this.els[s],l=n[s];Ma(o),a&&Tn(o,a),i&&(i.removeAttribute(l),a&&i.setAttribute(l,o.id))}),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,i=e&&e.el_;i&&(i.removeAttribute("aria-labelledby"),i.removeAttribute("aria-describedby")),super.dispose(),this.els=null}}he.registerComponent("TitleBar",Wb);const Yb={initialDisplay:4e3,position:[],takeFocus:!1};class Xb extends Gt{constructor(e,i){i=lt(Yb,i),super(e,i),this.controlText(i.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],n=>{this.removeClass("force-display")})}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map(e=>`vjs-${e}`).join(" ")}`}createEl(){const e=Me("button",{},{type:"button",class:this.buildCSSClass()},Me("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout(()=>{this.removeClass("force-display")},this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}}he.registerComponent("TransientButton",Xb);const fl=r=>{const e=r.el();if(e.hasAttribute("src"))return r.triggerSourceset(e.src),!0;const i=r.$$("source"),n=[];let s="";if(!i.length)return!1;for(let a=0;a<i.length;a++){const o=i[a].src;o&&n.indexOf(o)===-1&&n.push(o)}return n.length?(n.length===1&&(s=n[0]),r.triggerSourceset(s),!0):!1},Kb=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(r){const e=Te.createElement(this.nodeName.toLowerCase());e.innerHTML=r;const i=Te.createDocumentFragment();for(;e.childNodes.length;)i.appendChild(e.childNodes[0]);return this.innerText="",Y.Element.prototype.appendChild.call(this,i),this.innerHTML}}),rf=(r,e)=>{let i={};for(let n=0;n<r.length&&(i=Object.getOwnPropertyDescriptor(r[n],e),!(i&&i.set&&i.get));n++);return i.enumerable=!0,i.configurable=!0,i},Qb=r=>rf([r.el(),Y.HTMLMediaElement.prototype,Y.Element.prototype,Kb],"innerHTML"),wd=function(r){const e=r.el();if(e.resetSourceWatch_)return;const i={},n=Qb(r),s=a=>(...o)=>{const l=a.apply(e,o);return fl(r),l};["append","appendChild","insertAdjacentHTML"].forEach(a=>{e[a]&&(i[a]=e[a],e[a]=s(i[a]))}),Object.defineProperty(e,"innerHTML",lt(n,{set:s(n.set)})),e.resetSourceWatch_=()=>{e.resetSourceWatch_=null,Object.keys(i).forEach(a=>{e[a]=i[a]}),Object.defineProperty(e,"innerHTML",n)},r.one("sourceset",e.resetSourceWatch_)},Zb=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?E0(Y.Element.prototype.getAttribute.call(this,"src")):""},set(r){return Y.Element.prototype.setAttribute.call(this,"src",r),r}}),Jb=r=>rf([r.el(),Y.HTMLMediaElement.prototype,Zb],"src"),e4=function(r){if(!r.featuresSourceset)return;const e=r.el();if(e.resetSourceset_)return;const i=Jb(r),n=e.setAttribute,s=e.load;Object.defineProperty(e,"src",lt(i,{set:a=>{const o=i.set.call(e,a);return r.triggerSourceset(e.src),o}})),e.setAttribute=(a,o)=>{const l=n.call(e,a,o);return/src/i.test(a)&&r.triggerSourceset(e.src),l},e.load=()=>{const a=s.call(e);return fl(r)||(r.triggerSourceset(""),wd(r)),a},e.currentSrc?r.triggerSourceset(e.currentSrc):fl(r)||wd(r),e.resetSourceset_=()=>{e.resetSourceset_=null,e.load=s,e.setAttribute=n,Object.defineProperty(e,"src",i),e.resetSourceWatch_&&e.resetSourceWatch_()}};class we extends ze{constructor(e,i){super(e,i);const n=e.source;let s=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&this.el_.tagName==="VIDEO",n&&(this.el_.currentSrc!==n.src||e.tag&&e.tag.initNetworkState_===3)?this.setSource(n):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const a=this.el_.childNodes;let o=a.length;const l=[];for(;o--;){const c=a[o];c.nodeName.toLowerCase()==="track"&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(c),this.remoteTextTracks().addTrack(c.track),this.textTracks().addTrack(c.track),!s&&!this.el_.hasAttribute("crossorigin")&&$a(c.src)&&(s=!0)):l.push(c))}for(let c=0;c<l.length;c++)this.el_.removeChild(l[c])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&s&&Ye.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
180
+ This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNativePlayer_(),(ns||Na)&&e.nativeControlsForTouch===!0&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),we.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){e4(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let i;const n=()=>{i=[];for(let a=0;a<e.length;a++){const o=e[a];o.kind==="metadata"&&i.push({track:o,storedMode:o.mode})}};n(),e.addEventListener("change",n),this.on("dispose",()=>e.removeEventListener("change",n));const s=()=>{for(let a=0;a<i.length;a++){const o=i[a];o.track.mode==="disabled"&&o.track.mode!==o.storedMode&&(o.track.mode=o.storedMode)}e.removeEventListener("change",s)};this.on("webkitbeginfullscreen",()=>{e.removeEventListener("change",n),e.removeEventListener("change",s),e.addEventListener("change",s)}),this.on("webkitendfullscreen",()=>{e.removeEventListener("change",n),e.addEventListener("change",n),e.removeEventListener("change",s)})}overrideNative_(e,i){if(i!==this[`featuresNative${e}Tracks`])return;const n=e.toLowerCase();this[`${n}TracksListeners_`]&&Object.keys(this[`${n}TracksListeners_`]).forEach(s=>{this.el()[`${n}Tracks`].removeEventListener(s,this[`${n}TracksListeners_`][s])}),this[`featuresNative${e}Tracks`]=!i,this[`${n}TracksListeners_`]=null,this.proxyNativeTracksForType_(n)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const i=yi[e],n=this.el()[i.getterName],s=this[i.getterName]();if(!this[`featuresNative${i.capitalName}Tracks`]||!n||!n.addEventListener)return;const a={change:l=>{const c={type:"change",target:s,currentTarget:s,srcElement:s};s.trigger(c),e==="text"&&this[hr.remoteText.getterName]().trigger(c)},addtrack(l){s.addTrack(l.track)},removetrack(l){s.removeTrack(l.track)}},o=function(){const l=[];for(let c=0;c<s.length;c++){let d=!1;for(let m=0;m<n.length;m++)if(n[m]===s[c]){d=!0;break}d||l.push(s[c])}for(;l.length;)s.removeTrack(l.shift())};this[i.getterName+"Listeners_"]=a,Object.keys(a).forEach(l=>{const c=a[l];n.addEventListener(l,c),this.on("dispose",d=>n.removeEventListener(l,c))}),this.on("loadstart",o),this.on("dispose",l=>this.off("loadstart",o))}proxyNativeTracks_(){yi.names.forEach(e=>{this.proxyNativeTracksForType_(e)})}createEl(){let e=this.options_.tag;if(!e||!(this.options_.playerElIngest||this.movingMediaElementInDOM)){if(e){const n=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(n,e),we.disposeMediaElement(e),e=n}else{e=Te.createElement("video");const n=this.options_.tag&&hn(this.options_.tag),s=lt({},n);(!ns||this.options_.nativeControlsForTouch!==!0)&&delete s.controls,t0(e,Object.assign(s,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}typeof this.options_.preload<"u"&&ur(e,"preload",this.options_.preload),this.options_.disablePictureInPicture!==void 0&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const i=["loop","muted","playsinline","autoplay"];for(let n=0;n<i.length;n++){const s=i[n],a=this.options_[s];typeof a<"u"&&(a?ur(e,s,s):La(e,s),e[s]=a)}return e}handleLateInit_(e){if(e.networkState===0||e.networkState===3)return;if(e.readyState===0){let n=!1;const s=function(){n=!0};this.on("loadstart",s);const a=function(){n||this.trigger("loadstart")};this.on("loadedmetadata",a),this.ready(function(){this.off("loadstart",s),this.off("loadedmetadata",a),n||this.trigger("loadstart")});return}const i=["loadstart"];i.push("loadedmetadata"),e.readyState>=2&&i.push("loadeddata"),e.readyState>=3&&i.push("canplay"),e.readyState>=4&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(n){this.trigger(n)},this)})}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&Oa?this.el_.fastSeek(e):this.el_.currentTime=e}catch(i){Ye(i,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&Oi&&qi&&this.el_.currentTime===0){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},i=function(){"webkitPresentationMode"in this.el_&&this.el_.webkitPresentationMode!=="picture-in-picture"&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",()=>{this.off("webkitbeginfullscreen",i),this.off("webkitendfullscreen",e)})}supportsFullScreen(){return typeof this.el_.webkitEnterFullScreen=="function"}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Fi(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}},0);else try{e.webkitEnterFullScreen()}catch(i){this.trigger("fullscreenerror",i)}}exitFullScreen(){if(!this.el_.webkitDisplayingFullscreen){this.trigger("fullscreenerror",new Error("The video is not fullscreen"));return}this.el_.webkitExitFullScreen()}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(e===void 0)return this.el_.src;this.setSrc(e)}addSourceElement(e,i){if(!e)return Ye.error("Invalid source URL."),!1;const n={src:e};i&&(n.type=i);const s=Me("source",{},n);return this.el_.appendChild(s),!0}removeSourceElement(e){if(!e)return Ye.error("Source URL is required to remove the source element."),!1;const i=this.el_.querySelectorAll("source");for(const n of i)if(n.src===e)return this.el_.removeChild(n),!0;return Ye.warn(`No matching source element found with src: ${e}`),!1}reset(){we.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,i,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,i,n):super.addTextTrack(e,i,n)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const i=Te.createElement("track");return e.kind&&(i.kind=e.kind),e.label&&(i.label=e.label),(e.language||e.srclang)&&(i.srclang=e.language||e.srclang),e.default&&(i.default=e.default),e.id&&(i.id=e.id),e.src&&(i.src=e.src),i}addRemoteTextTrack(e,i){const n=super.addRemoteTextTrack(e,i);return this.featuresNativeTextTracks&&this.el().appendChild(n),n}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const i=this.$$("track");let n=i.length;for(;n--;)(e===i[n]||e===i[n].track)&&this.el().removeChild(i[n])}}getVideoPlaybackQuality(){if(typeof this.el().getVideoPlaybackQuality=="function")return this.el().getVideoPlaybackQuality();const e={};return typeof this.el().webkitDroppedFrameCount<"u"&&typeof this.el().webkitDecodedFrameCount<"u"&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),Y.performance&&(e.creationTime=Y.performance.now()),e}}Da(we,"TEST_VID",function(){if(!pr())return;const r=Te.createElement("video"),e=Te.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",r.appendChild(e),r});we.isSupported=function(){try{we.TEST_VID.volume=.5}catch{return!1}return!!(we.TEST_VID&&we.TEST_VID.canPlayType)};we.canPlayType=function(r){return we.TEST_VID.canPlayType(r)};we.canPlaySource=function(r,e){return we.canPlayType(r.type)};we.canControlVolume=function(){try{const r=we.TEST_VID.volume;we.TEST_VID.volume=r/2+.1;const e=r!==we.TEST_VID.volume;return e&&qt?(Y.setTimeout(()=>{we&&we.prototype&&(we.prototype.featuresVolumeControl=r!==we.TEST_VID.volume)}),!1):e}catch{return!1}};we.canMuteVolume=function(){try{const r=we.TEST_VID.muted;return we.TEST_VID.muted=!r,we.TEST_VID.muted?ur(we.TEST_VID,"muted","muted"):La(we.TEST_VID,"muted","muted"),r!==we.TEST_VID.muted}catch{return!1}};we.canControlPlaybackRate=function(){if(Oi&&qi&&Aa<58)return!1;try{const r=we.TEST_VID.playbackRate;return we.TEST_VID.playbackRate=r/2+.1,r!==we.TEST_VID.playbackRate}catch{return!1}};we.canOverrideAttributes=function(){try{const r=()=>{};Object.defineProperty(Te.createElement("video"),"src",{get:r,set:r}),Object.defineProperty(Te.createElement("audio"),"src",{get:r,set:r}),Object.defineProperty(Te.createElement("video"),"innerHTML",{get:r,set:r}),Object.defineProperty(Te.createElement("audio"),"innerHTML",{get:r,set:r})}catch{return!1}return!0};we.supportsNativeTextTracks=function(){return Oa||qt&&qi};we.supportsNativeVideoTracks=function(){return!!(we.TEST_VID&&we.TEST_VID.videoTracks)};we.supportsNativeAudioTracks=function(){return!!(we.TEST_VID&&we.TEST_VID.audioTracks)};we.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"];[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function([r,e]){Da(we.prototype,r,()=>we[e](),!0)});we.prototype.featuresVolumeControl=we.canControlVolume();we.prototype.movingMediaElementInDOM=!qt;we.prototype.featuresFullscreenResize=!0;we.prototype.featuresProgressEvents=!0;we.prototype.featuresTimeupdateEvents=!0;we.prototype.featuresVideoFrameCallback=!!(we.TEST_VID&&we.TEST_VID.requestVideoFrameCallback);we.disposeMediaElement=function(r){if(r){for(r.parentNode&&r.parentNode.removeChild(r);r.hasChildNodes();)r.removeChild(r.firstChild);r.removeAttribute("src"),typeof r.load=="function"&&(function(){try{r.load()}catch{}})()}};we.resetMediaElement=function(r){if(!r)return;const e=r.querySelectorAll("source");let i=e.length;for(;i--;)r.removeChild(e[i]);r.removeAttribute("src"),typeof r.load=="function"&&(function(){try{r.load()}catch{}})()};["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(r){we.prototype[r]=function(){return this.el_[r]||this.el_.hasAttribute(r)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(r){we.prototype["set"+_t(r)]=function(e){this.el_[r]=e,e?this.el_.setAttribute(r,r):this.el_.removeAttribute(r)}});["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(r){we.prototype[r]=function(){return this.el_[r]}});["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(r){we.prototype["set"+_t(r)]=function(e){this.el_[r]=e}});["pause","load","play"].forEach(function(r){we.prototype[r]=function(){return this.el_[r]()}});ze.withSourceHandlers(we);we.nativeSourceHandler={};we.nativeSourceHandler.canPlayType=function(r){try{return we.TEST_VID.canPlayType(r)}catch{return""}};we.nativeSourceHandler.canHandleSource=function(r,e){if(r.type)return we.nativeSourceHandler.canPlayType(r.type);if(r.src){const i=Yl(r.src);return we.nativeSourceHandler.canPlayType(`video/${i}`)}return""};we.nativeSourceHandler.handleSource=function(r,e,i){e.setSrc(r.src)};we.nativeSourceHandler.dispose=function(){};we.registerSourceHandler(we.nativeSourceHandler);ze.registerTech("Html5",we);const sf=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],qo={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},pl=["tiny","xsmall","small","medium","large","xlarge","huge"],Qs={};pl.forEach(r=>{const e=r.charAt(0)==="x"?`x-${r.substring(1)}`:r;Qs[r]=`vjs-layout-${e}`});const t4={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class st extends he{constructor(e,i,n){if(e.id=e.id||i.id||`vjs_video_${bi()}`,i=Object.assign(st.getTagSettings(e),i),i.initChildren=!1,i.createEl=!1,i.evented=!1,i.reportTouchActivity=!1,!i.language){const o=e.closest("[lang]");o&&(i.language=o.getAttribute("lang"))}if(super(null,i,n),this.boundDocumentFullscreenChange_=o=>this.documentFullscreenChange_(o),this.boundFullWindowOnEscKey_=o=>this.fullWindowOnEscKey(o),this.boundUpdateStyleEl_=o=>this.updateStyleEl_(o),this.boundApplyInitTime_=o=>this.applyInitTime_(o),this.boundUpdateCurrentBreakpoint_=o=>this.updateCurrentBreakpoint_(o),this.boundHandleTechClick_=o=>this.handleTechClick_(o),this.boundHandleTechDoubleClick_=o=>this.handleTechDoubleClick_(o),this.boundHandleTechTouchStart_=o=>this.handleTechTouchStart_(o),this.boundHandleTechTouchMove_=o=>this.handleTechTouchMove_(o),this.boundHandleTechTouchEnd_=o=>this.handleTechTouchEnd_(o),this.boundHandleTechTap_=o=>this.handleTechTap_(o),this.boundUpdatePlayerHeightOnAudioOnlyMode_=o=>this.updatePlayerHeightOnAudioOnlyMode_(o),this.isFullscreen_=!1,this.log=Hh(this.id_),this.fsApi_=ia,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&hn(e),this.language(this.options_.language),i.languages){const o={};Object.getOwnPropertyNames(i.languages).forEach(function(l){o[l.toLowerCase()]=i.languages[l]}),this.languages_=o}else this.languages_=st.prototype.options_.languages;this.resetCache_(),this.poster_=i.poster||"",this.controls_=!!i.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),i.plugins&&Object.keys(i.plugins).forEach(o=>{if(typeof this[o]!="function")throw new Error(`plugin "${o}" does not exist`)}),this.scrubbing_=!1,this.el_=this.createEl(),Hl(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(pi(Te,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const s=lt(this.options_);if(i.plugins&&Object.keys(i.plugins).forEach(o=>{this[o](i.plugins[o])}),i.debug&&this.debug(!0),this.options_.playerOptions=s,this.middleware_=[],this.playbackRates(i.playbackRates),i.experimentalSvgIcons){const l=new Y.DOMParser().parseFromString(Sb,"image/svg+xml");if(l.querySelector("parsererror"))Ye.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const d=l.documentElement;d.style.display="none",this.el_.appendChild(d),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio(e.nodeName.toLowerCase()==="audio"),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),i.spatialNavigation&&i.spatialNavigation.enabled&&(this.spatialNavigation=new Eb(this),this.addClass("vjs-spatial-navigation-enabled")),ns&&this.addClass("vjs-touch-enabled"),qt||this.addClass("vjs-workinghover"),st.players[this.id_]=this;const a=nl.split(".")[0];this.addClass(`vjs-v${a}`),this.userActive(!0),this.reportUserActivity(),this.one("play",o=>this.listenForUserActivity_(o)),this.on("keydown",o=>this.handleKeyDown(o)),this.on("languagechange",o=>this.handleLanguagechange(o)),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)})}dispose(){this.trigger("dispose"),this.off("dispose"),jt(Te,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),jt(Te,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),st.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),Tb(this),Jt.names.forEach(e=>{const i=Jt[e],n=this[i.getterName]();n&&n.off&&n.off()}),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e=this.tag,i,n=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");const s=this.tag.tagName.toLowerCase()==="video-js";n?i=this.el_=e.parentNode:s||(i=this.el_=super.createEl("div"));const a=hn(e);if(s){for(i=this.el_=e,e=this.tag=Te.createElement("video");i.children.length;)e.appendChild(i.firstChild);Kr(i,"video-js")||Bn(i,"video-js"),i.appendChild(e),n=this.playerElIngest_=i,Object.keys(i).forEach(c=>{try{e[c]=i[c]}catch{}})}e.setAttribute("tabindex","-1"),a.tabindex="-1",qi&&Ia&&(e.setAttribute("role","application"),a.role="application"),e.removeAttribute("width"),e.removeAttribute("height"),"width"in a&&delete a.width,"height"in a&&delete a.height,Object.getOwnPropertyNames(a).forEach(function(c){s&&c==="class"||i.setAttribute(c,a[c]),s&&e.setAttribute(c,a[c])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=i.player=this,this.addClass("vjs-paused");const o=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter(c=>Qh[c]).map(c=>"vjs-device-"+c.substring(3).toLowerCase().replace(/\_/g,"-"));if(this.addClass(...o),Y.VIDEOJS_NO_DYNAMIC_STYLE!==!0){this.styleEl_=h0("vjs-styles-dimensions");const c=_n(".vjs-styles-defaults"),d=_n("head");d.insertBefore(this.styleEl_,c?c.nextSibling:d.firstChild)}this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);const l=e.getElementsByTagName("a");for(let c=0;c<l.length;c++){const d=l.item(c);Bn(d,"vjs-hidden"),d.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!n&&e.parentNode.insertBefore(i,e),sl(e,i),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=i,i}crossOrigin(e){if(typeof e>"u")return this.techGet_("crossOrigin");if(e!==null&&e!=="anonymous"&&e!=="use-credentials"){Ye.warn(`crossOrigin must be null, "anonymous" or "use-credentials", given "${e}"`);return}this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,i){const n=e+"_";if(i===void 0)return this[n]||0;if(i===""||i==="auto"){this[n]=void 0,this.updateStyleEl_();return}const s=parseFloat(i);if(isNaN(s)){Ye.error(`Improper value "${i}" supplied for for ${e}`);return}this[n]=s,this.updateStyleEl_()}fluid(e){if(e===void 0)return!!this.fluid_;this.fluid_=!!e,nn(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),ZT(this,()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(e===void 0)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(e){if(e===void 0)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()}updateStyleEl_(){if(Y.VIDEOJS_NO_DYNAMIC_STYLE===!0){const l=typeof this.width_=="number"?this.width_:this.options_.width,c=typeof this.height_=="number"?this.height_:this.options_.height,d=this.tech_&&this.tech_.el();d&&(l>=0&&(d.width=l),c>=0&&(d.height=c));return}let e,i,n,s;this.aspectRatio_!==void 0&&this.aspectRatio_!=="auto"?n=this.aspectRatio_:this.videoWidth()>0?n=this.videoWidth()+":"+this.videoHeight():n="16:9";const a=n.split(":"),o=a[1]/a[0];this.width_!==void 0?e=this.width_:this.height_!==void 0?e=this.height_/o:e=this.videoWidth()||300,this.height_!==void 0?i=this.height_:i=e*o,/^[^a-zA-Z]/.test(this.id())?s="dimensions-"+this.id():s=this.id()+"-dimensions",this.addClass(s),f0(this.styleEl_,`
181
181
  .${s} {
182
182
  width: ${e}px;
183
183
  height: ${i}px;
@@ -186,9 +186,9 @@ This may prevent text tracks from loading.`),this.restoreMetadataTracksInIOSNati
186
186
  .${s}.vjs-fluid:not(.vjs-audio-only-mode) {
187
187
  padding-top: ${o*100}%;
188
188
  }
189
- `)}loadTech_(e,i){this.tech_&&this.unloadTech_();const n=_t(e),s=e.charAt(0).toLowerCase()+e.slice(1);n!=="Html5"&&this.tag&&(ze.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;let a=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(a=!1);const o={source:i,autoplay:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Jt.names.forEach(c=>{const d=Jt[c];o[d.getterName]=this[d.privateName]}),Object.assign(o,this.options_[n]),Object.assign(o,this.options_[s]),Object.assign(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),i&&i.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);const l=ze.getTech(e);if(!l)throw new Error(`No Tech named '${n}' exists! '${n}' should be registered using videojs.registerTech()'`);this.tech_=new l(o),this.tech_.ready(ct(this,this.handleTechReady_),!0),dl.jsonToTextTracks(this.textTracksJson_||[],this.tech_),sf.forEach(c=>{this.on(this.tech_,c,d=>this[`handleTech${_t(c)}_`](d))}),Object.keys(qo).forEach(c=>{this.on(this.tech_,c,d=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${qo[c]}_`].bind(this),event:d});return}this[`handleTech${qo[c]}_`](d)})}),this.on(this.tech_,"loadstart",c=>this.handleTechLoadStart_(c)),this.on(this.tech_,"sourceset",c=>this.handleTechSourceset_(c)),this.on(this.tech_,"waiting",c=>this.handleTechWaiting_(c)),this.on(this.tech_,"ended",c=>this.handleTechEnded_(c)),this.on(this.tech_,"seeking",c=>this.handleTechSeeking_(c)),this.on(this.tech_,"play",c=>this.handleTechPlay_(c)),this.on(this.tech_,"pause",c=>this.handleTechPause_(c)),this.on(this.tech_,"durationchange",c=>this.handleTechDurationChange_(c)),this.on(this.tech_,"fullscreenchange",(c,d)=>this.handleTechFullscreenChange_(c,d)),this.on(this.tech_,"fullscreenerror",(c,d)=>this.handleTechFullscreenError_(c,d)),this.on(this.tech_,"enterpictureinpicture",c=>this.handleTechEnterPictureInPicture_(c)),this.on(this.tech_,"leavepictureinpicture",c=>this.handleTechLeavePictureInPicture_(c)),this.on(this.tech_,"error",c=>this.handleTechError_(c)),this.on(this.tech_,"posterchange",c=>this.handleTechPosterChange_(c)),this.on(this.tech_,"textdata",c=>this.handleTechTextData_(c)),this.on(this.tech_,"ratechange",c=>this.handleTechRateChange_(c)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(n!=="Html5"||!this.tag)&&sl(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Jt.names.forEach(e=>{const i=Jt[e];this[i.privateName]=this[i.getterName]()}),this.textTracksJson_=dl.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return e===void 0&&We.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
189
+ `)}loadTech_(e,i){this.tech_&&this.unloadTech_();const n=_t(e),s=e.charAt(0).toLowerCase()+e.slice(1);n!=="Html5"&&this.tag&&(ze.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=n,this.isReady_=!1;let a=this.autoplay();(typeof this.autoplay()=="string"||this.autoplay()===!0&&this.options_.normalizeAutoplay)&&(a=!1);const o={source:i,autoplay:a,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${s}_api`,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset};Jt.names.forEach(c=>{const d=Jt[c];o[d.getterName]=this[d.privateName]}),Object.assign(o,this.options_[n]),Object.assign(o,this.options_[s]),Object.assign(o,this.options_[e.toLowerCase()]),this.tag&&(o.tag=this.tag),i&&i.src===this.cache_.src&&this.cache_.currentTime>0&&(o.startTime=this.cache_.currentTime);const l=ze.getTech(e);if(!l)throw new Error(`No Tech named '${n}' exists! '${n}' should be registered using videojs.registerTech()'`);this.tech_=new l(o),this.tech_.ready(ct(this,this.handleTechReady_),!0),dl.jsonToTextTracks(this.textTracksJson_||[],this.tech_),sf.forEach(c=>{this.on(this.tech_,c,d=>this[`handleTech${_t(c)}_`](d))}),Object.keys(qo).forEach(c=>{this.on(this.tech_,c,d=>{if(this.tech_.playbackRate()===0&&this.tech_.seeking()){this.queuedCallbacks_.push({callback:this[`handleTech${qo[c]}_`].bind(this),event:d});return}this[`handleTech${qo[c]}_`](d)})}),this.on(this.tech_,"loadstart",c=>this.handleTechLoadStart_(c)),this.on(this.tech_,"sourceset",c=>this.handleTechSourceset_(c)),this.on(this.tech_,"waiting",c=>this.handleTechWaiting_(c)),this.on(this.tech_,"ended",c=>this.handleTechEnded_(c)),this.on(this.tech_,"seeking",c=>this.handleTechSeeking_(c)),this.on(this.tech_,"play",c=>this.handleTechPlay_(c)),this.on(this.tech_,"pause",c=>this.handleTechPause_(c)),this.on(this.tech_,"durationchange",c=>this.handleTechDurationChange_(c)),this.on(this.tech_,"fullscreenchange",(c,d)=>this.handleTechFullscreenChange_(c,d)),this.on(this.tech_,"fullscreenerror",(c,d)=>this.handleTechFullscreenError_(c,d)),this.on(this.tech_,"enterpictureinpicture",c=>this.handleTechEnterPictureInPicture_(c)),this.on(this.tech_,"leavepictureinpicture",c=>this.handleTechLeavePictureInPicture_(c)),this.on(this.tech_,"error",c=>this.handleTechError_(c)),this.on(this.tech_,"posterchange",c=>this.handleTechPosterChange_(c)),this.on(this.tech_,"textdata",c=>this.handleTechTextData_(c)),this.on(this.tech_,"ratechange",c=>this.handleTechRateChange_(c)),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode!==this.el()&&(n!=="Html5"||!this.tag)&&sl(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){Jt.names.forEach(e=>{const i=Jt[e];this[i.privateName]=this[i.getterName]()}),this.textTracksJson_=dl.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return e===void 0&&Ye.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
190
190
  See https://github.com/videojs/video.js/issues/2617 for more info.
191
- `),this.tech_}version(){return{"video.js":nl}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||typeof e!="string")return;const i=()=>{const s=this.muted();this.muted(!0);const a=()=>{this.muted(s)};this.playTerminatedQueue_.push(a);const o=this.play();if(Zr(o))return o.catch(l=>{throw a(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${l||""}`)})};let n;if(e==="any"&&!this.muted()?(n=this.play(),Zr(n)&&(n=n.catch(i))):e==="muted"&&!this.muted()?n=i():n=this.play(),!!Zr(n))return n.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let i=e,n="";typeof i!="string"&&(i=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],i&&!n&&(n=xb(this,i)),this.cache_.source=lt({},e,{src:i,type:n});const s=this.cache_.sources.filter(c=>c.src&&c.src===i),a=[],o=this.$$("source"),l=[];for(let c=0;c<o.length;c++){const d=hn(o[c]);a.push(d),d.src&&d.src===i&&l.push(d.src)}l.length&&!s.length?this.cache_.sources=a:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=i}handleTechSourceset_(e){if(!this.changingSrc_){let i=a=>this.updateSourceCaches_(a);const n=this.currentSource().src,s=e.src;n&&!/^blob:/.test(n)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==n)&&(i=()=>{}),i(s),e.src||this.tech_.any(["sourceset","loadstart"],a=>{if(a.type==="sourceset")return;const o=this.techGet_("currentSrc");this.lastSource_.tech=o,this.updateSourceCaches_(o)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(e===void 0)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),i=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",i))};this.on("timeupdate",i)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,e):this.paused()?Fi(this.play()):this.pause())}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),n=>n.contains(e.target))||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Te.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const i=e.target.player;if(i&&i!==this)return;const n=this.el();let s=Te[this.fsApi_.fullscreenElement]===n;!s&&n.matches&&(s=n.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,i){i&&(i.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(i.isFullscreen))}handleTechFullscreenError_(e,i){this.trigger("fullscreenerror",i)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,i){this.ready(function(){if(e in yb)return gb(this.middleware_,this.tech_,e,i);if(e in hd)return dd(this.middleware_,this.tech_,e,i);try{this.tech_&&this.tech_[e](i)}catch(n){throw We(n),n}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in vb)return mb(this.middleware_,this.tech_,e);if(e in hd)return dd(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(i){throw this.tech_[e]===void 0?(We(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,i),i):i.name==="TypeError"?(We(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,i),this.tech_.isReady_=!1,i):(We(i),i)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Fi){this.playCallbacks_.push(e);const i=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),n=!!(Oa||qt);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!i){this.waitToPlay_=o=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!i&&n&&this.load();return}const s=this.techGet_("play");n&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),s===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(i){i()})}runPlayCallbacks_(e){const i=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],i.forEach(function(n){n(e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||Ni(0,0)}scrubbing(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){if(e===void 0)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;if(e<0&&(e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",e),this.cache_.initTime=0,isFinite(e)&&(this.cache_.currentTime=Number(e))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return(!e||!e.length)&&(e=Ni(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=Ni(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return C0(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),i=this.duration();let n=e.end(e.length-1);return n>i&&(n=i),n}volume(e){let i;if(e!==void 0){i=Math.max(0,Math.min(1,e)),this.cache_.volume=i,this.techCall_("setVolume",i),i>0&&this.lastVolume_(i);return}return i=parseFloat(this.techGet_("volume")),isNaN(i)?1:i}muted(e){if(e!==void 0){this.techCall_("setMuted",e);return}return this.techGet_("muted")||!1}defaultMuted(e){return e!==void 0&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(e!==void 0&&e!==0){this.cache_.lastVolume=e;return}return this.cache_.lastVolume}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(e!==void 0){const i=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==i&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const i=this;return new Promise((n,s)=>{function a(){i.off("fullscreenerror",l),i.off("fullscreenchange",o)}function o(){a(),n()}function l(d,m){a(),s(m)}i.one("fullscreenchange",o),i.one("fullscreenerror",l);const c=i.requestFullscreenHelper_(e);c&&(c.then(a,a),c.then(n,s))})}requestFullscreenHelper_(e){let i;if(this.fsApi_.prefixed||(i=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(i=e)),this.fsApi_.requestFullscreen){const n=this.el_[this.fsApi_.requestFullscreen](i);return n&&n.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),n}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((i,n)=>{function s(){e.off("fullscreenerror",o),e.off("fullscreenchange",a)}function a(){s(),i()}function o(c,d){s(),n(d)}e.one("fullscreenchange",a),e.one("fullscreenerror",o);const l=e.exitFullscreenHelper_();l&&(l.then(s,s),l.then(i,n))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Te[this.fsApi_.exitFullscreen]();return e&&Fi(e.then(()=>this.isFullscreen(!1))),e}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Te.documentElement.style.overflow,pi(Te,"keydown",this.boundFullWindowOnEscKey_),Te.documentElement.style.overflow="hidden",Bn(Te.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){e.key==="Escape"&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,jt(Te,"keydown",this.boundFullWindowOnEscKey_),Te.documentElement.style.overflow=this.docOrigOverflow,Ba(Te.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){if(e!==void 0){this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Y.documentPictureInPicture){const e=Te.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Me("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),Y.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(i=>(u0(i),this.el_.parentNode.insertBefore(e,this.el_),i.document.body.appendChild(this.el_),i.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:i}),i.addEventListener("pagehide",n=>{const s=n.target.querySelector(".video-js");e.parentNode.replaceChild(s,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),i))}return"pictureInPictureEnabled"in Te&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(Y.documentPictureInPicture&&Y.documentPictureInPicture.window)return Y.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in Te)return Te.exitPictureInPicture()}handleKeyDown(e){const{userActions:i}=this.options_;!i||!i.hotkeys||(s=>{const a=s.tagName.toLowerCase();if(s.isContentEditable)return!0;const o=["button","checkbox","hidden","radio","reset","submit"];return a==="input"?o.indexOf(s.type)===-1:["textarea"].indexOf(a)!==-1})(this.el_.ownerDocument.activeElement)||(typeof i.hotkeys=="function"?i.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const i=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:n=o=>e.key.toLowerCase()==="f",muteKey:s=o=>e.key.toLowerCase()==="m",playPauseKey:a=o=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=i;if(n.call(this,e)){e.preventDefault(),e.stopPropagation();const o=he.getComponent("FullscreenToggle");Te[this.fsApi_.fullscreenEnabled]!==!1&&o.prototype.handleClick.call(this,e)}else s.call(this,e)?(e.preventDefault(),e.stopPropagation(),he.getComponent("MuteToggle").prototype.handleClick.call(this,e)):a.call(this,e)&&(e.preventDefault(),e.stopPropagation(),he.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let i;for(let n=0,s=this.options_.techOrder;n<s.length;n++){const a=s[n];let o=ze.getTech(a);if(o||(o=he.getComponent(a)),!o){We.error(`The "${a}" tech is undefined. Skipped browser support check for that tech.`);continue}if(o.isSupported()&&(i=o.canPlayType(e),i))return i}return""}selectSource(e){const i=this.options_.techOrder.map(l=>[l,ze.getTech(l)]).filter(([l,c])=>c?c.isSupported():(We.error(`The "${l}" tech is undefined. Skipped browser support check for that tech.`),!1)),n=function(l,c,d){let m;return l.some(g=>c.some(S=>{if(m=d(g,S),m)return!0})),m};let s;const a=l=>(c,d)=>l(d,c),o=([l,c],d)=>{if(c.canPlaySource(d,this.options_[l.toLowerCase()]))return{source:d,tech:l}};return this.options_.sourceOrder?s=n(e,i,a(o)):s=n(i,e,o),s||!1}handleSrc_(e,i){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const n=D0(e);if(!n.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,i||(this.cache_.sources=n),this.updateSourceCaches_(n[0]),fb(this,n[0],(s,a)=>{if(this.middleware_=a,i||(this.cache_.sources=n),this.updateSourceCaches_(s),this.src_(s)){if(n.length>1)return this.handleSrc_(n.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}pb(a,this.tech_)}),n.length>1){const s=()=>{this.error(null),this.handleSrc_(n.slice(1),!0)},a=()=>{this.off("error",s)};this.one("error",s),this.one("playing",a),this.resetRetryOnError_=()=>{this.off("error",s),this.off("playing",a)}}}src(e){return this.handleSrc_(e,!1)}src_(e){const i=this.selectSource([e]);return i?y0(i.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}addSourceElement(e,i){return this.tech_?this.tech_.addSourceElement(e,i):!1}removeSourceElement(e){return this.tech_?this.tech_.removeSourceElement(e):!1}load(){if(this.tech_&&this.tech_.vhs){this.src(this.currentSource());return}this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const e=this.play();Fi(e.then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),nn(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:i,progressControl:n,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:a}=n||{};e&&e.updateContent(),i&&i.updateContent(),s&&s.updateContent(),a&&(a.update(),a.loadProgressBar&&a.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),i=[];return Object.keys(e).length!==0&&i.push(e),this.cache_.sources||i}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){if(e!==void 0){this.techCall_("setPreload",e),this.options_.preload=e;return}return this.techGet_("preload")}autoplay(e){if(e===void 0)return this.options_.autoplay||!1;let i;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),i=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,i=typeof i>"u"?this.options_.autoplay:i,this.tech_&&this.techCall_("setAutoplay",i)}playsinline(e){return e!==void 0&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){if(e!==void 0){this.techCall_("setLoop",e),this.options_.loop=e;return}return this.techGet_("loop")}poster(e){if(e===void 0)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(e===void 0)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(e===void 0)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(e===void 0)return this.error_||null;if(yn("beforeerror").forEach(i=>{const n=i(this,e);if(!(Hi(n)&&!Array.isArray(n)||typeof n=="string"||typeof n=="number"||n===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=n}),this.options_.suppressNotSupportedError&&e&&e.code===4){const i=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],i),this.one("loadstart",function(){this.off(["click","touchstart"],i)});return}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new gt(e),this.addClass("vjs-error"),We.error(`(CODE:${this.error_.code} ${gt.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),yn("error").forEach(i=>i(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(e===void 0)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(i){i.stopPropagation(),i.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,i,n;const s=ct(this,this.reportUserActivity),a=function(g){(g.screenX!==i||g.screenY!==n)&&(i=g.screenX,n=g.screenY,s())},o=function(){s(),this.clearInterval(e),e=this.setInterval(s,250)},l=function(g){s(),this.clearInterval(e)};this.on("mousedown",o),this.on("mousemove",a),this.on("mouseup",l),this.on("mouseleave",l);const c=this.getChild("controlBar");c&&!qt&&!Oi&&(c.on("mouseenter",function(g){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),c.on("mouseleave",function(g){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",s),this.on("keyup",s);let d;const m=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(d);const g=this.options_.inactivityTimeout;g<=0||(d=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},g))};this.setInterval(m,250)}playbackRate(e){if(e!==void 0){this.techCall_("setPlaybackRate",e);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1}defaultPlaybackRate(e){return e!==void 0?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(e!==void 0){this.isAudio_=!!e;return}return!!this.isAudio_}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild("ControlBar");!e||this.audioOnlyCache_.controlBarHeight===e.currentHeight()||(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),i=this.getChild("ControlBar"),n=i&&i.currentHeight();e.forEach(s=>{s!==i&&s.el_&&!s.hasClass("vjs-hidden")&&(s.hide(),this.audioOnlyCache_.hiddenChildren.push(s))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=n,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(n),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if(typeof e!="boolean"||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const i=[];return this.isInPictureInPicture()&&i.push(this.exitPictureInPicture()),this.isFullscreen()&&i.push(this.exitFullscreen()),this.audioPosterMode()&&i.push(this.audioPosterMode(!1)),Promise.all(i).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return typeof e!="boolean"||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()}))}addTextTrack(e,i,n){if(this.tech_)return this.tech_.addTextTrack(e,i,n)}addRemoteTextTrack(e,i){if(this.tech_)return this.tech_.addRemoteTextTrack(e,i)}removeRemoteTextTrack(e={}){let{track:i}=e;if(i||(i=e),this.tech_)return this.tech_.removeRemoteTextTrack(i)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(e===void 0)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),nn(this)&&this.trigger("languagechange"))}languages(){return lt(st.prototype.options_.languages,this.languages_)}toJSON(){const e=lt(this.options_),i=e.tracks;e.tracks=[];for(let n=0;n<i.length;n++){let s=i[n];s=lt(s),s.player=void 0,e.tracks[n]=s}return e}createModal(e,i){i=i||{},i.content=e||"";const n=new vr(this,i);return this.addChild(n),n.on("dispose",()=>{this.removeChild(n)}),n.open(),n}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),i=this.currentWidth();for(let n=0;n<pl.length;n++){const s=pl[n],a=this.breakpoints_[s];if(i<=a){if(e===s)return;e&&this.removeClass(Qs[e]),this.addClass(Qs[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return e===void 0?Object.assign(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Object.assign({},t4,e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(e){if(e===void 0)return this.responsive_;e=!!e;const i=this.responsive_;if(e!==i)return this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return Qs[this.breakpoint_]||""}loadMedia(e,i){if(!e||typeof e!="object")return;const n=this.crossOrigin();this.reset(),this.cache_.media=lt(e);const{artist:s,artwork:a,description:o,poster:l,src:c,textTracks:d,title:m}=this.cache_.media;!a&&l&&(this.cache_.media.artwork=[{src:l,type:ha(l)}]),n&&this.crossOrigin(n),c&&this.src(c),l&&this.poster(l),Array.isArray(d)&&d.forEach(g=>this.addRemoteTextTrack(g,!1)),this.titleBar&&this.titleBar.update({title:m,description:o||s||""}),this.ready(i)}getMedia(){if(!this.cache_.media){const e=this.poster(),i=this.currentSources(),n=Array.prototype.map.call(this.remoteTextTracks(),a=>({kind:a.kind,label:a.label,language:a.language,src:a.src})),s={src:i,textTracks:n};return e&&(s.poster=e,s.artwork=[{src:s.poster,type:ha(s.poster)}]),s}return lt(this.cache_.media)}static getTagSettings(e){const i={sources:[],tracks:[]},n=hn(e),s=n["data-setup"];if(Kr(e,"vjs-fill")&&(n.fill=!0),Kr(e,"vjs-fluid")&&(n.fluid=!0),s!==null)try{Object.assign(n,JSON.parse(s||"{}"))}catch(a){We.error("data-setup",a)}if(Object.assign(i,n),e.hasChildNodes()){const a=e.childNodes;for(let o=0,l=a.length;o<l;o++){const c=a[o],d=c.nodeName.toLowerCase();d==="source"?i.sources.push(hn(c)):d==="track"&&i.tracks.push(hn(c))}}return i}debug(e){if(e===void 0)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(e===void 0)return this.cache_.playbackRates;Array.isArray(e)&&e.every(i=>typeof i=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}st.prototype.videoTracks=()=>{};st.prototype.audioTracks=()=>{};st.prototype.textTracks=()=>{};st.prototype.remoteTextTracks=()=>{};st.prototype.remoteTextTrackEls=()=>{};Jt.names.forEach(function(r){const e=Jt[r];st.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}});st.prototype.crossorigin=st.prototype.crossOrigin;st.players={};const Hr=Y.navigator;st.prototype.options_={techOrder:ze.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Hr&&(Hr.languages&&Hr.languages[0]||Hr.userLanguage||Hr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1};sf.forEach(function(r){st.prototype[`handleTech${_t(r)}_`]=function(){return this.trigger(r)}});he.registerComponent("Player",st);const fa="plugin",Zn="activePlugins_",Gn={},pa=r=>Gn.hasOwnProperty(r),Zs=r=>pa(r)?Gn[r]:void 0,af=(r,e)=>{r[Zn]=r[Zn]||{},r[Zn][e]=!0},ma=(r,e,i)=>{const n=(i?"before":"")+"pluginsetup";r.trigger(n,e),r.trigger(n+":"+e.name,e)},i4=function(r,e){const i=function(){ma(this,{name:r,plugin:e,instance:null},!0);const n=e.apply(this,arguments);return af(this,r),ma(this,{name:r,plugin:e,instance:n}),n};return Object.keys(e).forEach(function(n){i[n]=e[n]}),i},Dd=(r,e)=>(e.prototype.name=r,function(...i){ma(this,{name:r,plugin:e,instance:null},!0);const n=new e(this,...i);return this[r]=()=>n,ma(this,n.getEventHash()),n});class li{constructor(e){if(this.constructor===li)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),Hl(this),delete this.trigger,v0(this,this.constructor.defaultState),af(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,i={}){return gr(this.eventBusEl_,e,this.getEventHash(i))}handleStateChanged(e){}dispose(){const{name:e,player:i}=this;this.trigger("dispose"),this.off(),i.off("dispose",this.dispose),i[Zn][e]=!1,this.player=this.state=null,i[e]=Dd(e,Gn[e])}static isBasic(e){const i=typeof e=="string"?Zs(e):e;return typeof i=="function"&&!li.prototype.isPrototypeOf(i.prototype)}static registerPlugin(e,i){if(typeof e!="string")throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(pa(e))We.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(st.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if(typeof i!="function")throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof i}.`);return Gn[e]=i,e!==fa&&(li.isBasic(i)?st.prototype[e]=i4(e,i):st.prototype[e]=Dd(e,i)),i}static deregisterPlugin(e){if(e===fa)throw new Error("Cannot de-register base plugin.");pa(e)&&(delete Gn[e],delete st.prototype[e])}static getPlugins(e=Object.keys(Gn)){let i;return e.forEach(n=>{const s=Zs(n);s&&(i=i||{},i[n]=s)}),i}static getPluginVersion(e){const i=Zs(e);return i&&i.VERSION||""}}li.getPlugin=Zs;li.BASE_PLUGIN_NAME=fa;li.registerPlugin(fa,li);st.prototype.usingPlugin=function(r){return!!this[Zn]&&this[Zn][r]===!0};st.prototype.hasPlugin=function(r){return!!pa(r)};function n4(r,e){let i=!1;return function(...n){return i||We.warn(r),i=!0,e.apply(this,n)}}function Bi(r,e,i,n){return n4(`${e} is deprecated and will be removed in ${r}.0; please use ${i} instead.`,n)}var r4={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};const of=r=>r.indexOf("#")===0?r.slice(1):r;function ae(r,e,i){let n=ae.getPlayer(r);if(n)return e&&We.warn(`Player "${r}" is already initialised. Options will not be applied.`),i&&n.ready(i),n;const s=typeof r=="string"?_n("#"+of(r)):r;if(!mr(s))throw new TypeError("The element or ID supplied is not valid. (videojs)");const o=("getRootNode"in s?s.getRootNode()instanceof Y.ShadowRoot:!1)?s.getRootNode():s.ownerDocument.body;(!s.ownerDocument.defaultView||!o.contains(s))&&We.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player")?s.parentNode:s).cloneNode(!0)),yn("beforesetup").forEach(c=>{const d=c(s,lt(e));if(!Hi(d)||Array.isArray(d)){We.error("please return an object in beforesetup hooks");return}e=lt(e,d)});const l=he.getComponent("Player");return n=new l(s,e,i),yn("setup").forEach(c=>c(n)),n}ae.hooks_=Ji;ae.hooks=yn;ae.hook=VT;ae.hookOnce=FT;ae.removeHook=zh;if(Y.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&pr()){let r=_n(".vjs-styles-defaults");if(!r){r=h0("vjs-styles-defaults");const e=_n("head");e&&e.insertBefore(r,e.firstChild),f0(r,`
191
+ `),this.tech_}version(){return{"video.js":nl}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(this.autoplay()===!0&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||typeof e!="string")return;const i=()=>{const s=this.muted();this.muted(!0);const a=()=>{this.muted(s)};this.playTerminatedQueue_.push(a);const o=this.play();if(Zr(o))return o.catch(l=>{throw a(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${l||""}`)})};let n;if(e==="any"&&!this.muted()?(n=this.play(),Zr(n)&&(n=n.catch(i))):e==="muted"&&!this.muted()?n=i():n=this.play(),!!Zr(n))return n.then(()=>{this.trigger({type:"autoplay-success",autoplay:e})}).catch(()=>{this.trigger({type:"autoplay-failure",autoplay:e})})}updateSourceCaches_(e=""){let i=e,n="";typeof i!="string"&&(i=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],i&&!n&&(n=xb(this,i)),this.cache_.source=lt({},e,{src:i,type:n});const s=this.cache_.sources.filter(c=>c.src&&c.src===i),a=[],o=this.$$("source"),l=[];for(let c=0;c<o.length;c++){const d=hn(o[c]);a.push(d),d.src&&d.src===i&&l.push(d.src)}l.length&&!s.length?this.cache_.sources=a:s.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=i}handleTechSourceset_(e){if(!this.changingSrc_){let i=a=>this.updateSourceCaches_(a);const n=this.currentSource().src,s=e.src;n&&!/^blob:/.test(n)&&/^blob:/.test(s)&&(!this.lastSource_||this.lastSource_.tech!==s&&this.lastSource_.player!==n)&&(i=()=>{}),i(s),e.src||this.tech_.any(["sourceset","loadstart"],a=>{if(a.type==="sourceset")return;const o=this.techGet_("currentSrc");this.lastSource_.tech=o,this.updateSourceCaches_(o)})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(e===void 0)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&this.cache_.lastPlaybackRate===0&&(this.queuedCallbacks_.forEach(e=>e.callback(e.event)),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),i=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",i))};this.on("timeupdate",i)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.click===void 0||this.options_.userActions.click!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.click=="function"?this.options_.userActions.click.call(this,e):this.paused()?Fi(this.play()):this.pause())}handleTechDoubleClick_(e){if(!this.controls_)return;Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),n=>n.contains(e.target))||(this.options_===void 0||this.options_.userActions===void 0||this.options_.userActions.doubleClick===void 0||this.options_.userActions.doubleClick!==!1)&&(this.options_!==void 0&&this.options_.userActions!==void 0&&typeof this.options_.userActions.doubleClick=="function"?this.options_.userActions.doubleClick.call(this,e):this.isInPictureInPicture()&&!Te.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen())}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const i=e.target.player;if(i&&i!==this)return;const n=this.el();let s=Te[this.fsApi_.fullscreenElement]===n;!s&&n.matches&&(s=n.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(s)}handleTechFullscreenChange_(e,i){i&&(i.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",()=>{this.removeClass("vjs-ios-native-fs")})),this.isFullscreen(i.isFullscreen))}handleTechFullscreenError_(e,i){this.trigger("fullscreenerror",i)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,i){this.ready(function(){if(e in yb)return gb(this.middleware_,this.tech_,e,i);if(e in hd)return dd(this.middleware_,this.tech_,e,i);try{this.tech_&&this.tech_[e](i)}catch(n){throw Ye(n),n}},!0)}techGet_(e){if(!(!this.tech_||!this.tech_.isReady_)){if(e in vb)return mb(this.middleware_,this.tech_,e);if(e in hd)return dd(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(i){throw this.tech_[e]===void 0?(Ye(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,i),i):i.name==="TypeError"?(Ye(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,i),this.tech_.isReady_=!1,i):(Ye(i),i)}}}play(){return new Promise(e=>{this.play_(e)})}play_(e=Fi){this.playCallbacks_.push(e);const i=!!(!this.changingSrc_&&(this.src()||this.currentSrc())),n=!!(Oa||qt);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!i){this.waitToPlay_=o=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!i&&n&&this.load();return}const s=this.techGet_("play");n&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),s===null?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(s)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(i){i()})}runPlayCallbacks_(e){const i=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],i.forEach(function(n){n(e)})}pause(){this.techCall_("pause")}paused(){return this.techGet_("paused")!==!1}played(){return this.techGet_("played")||Ni(0,0)}scrubbing(e){if(typeof e>"u")return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")}currentTime(e){if(e===void 0)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;if(e<0&&(e=0),!this.isReady_||this.changingSrc_||!this.tech_||!this.tech_.isReady_){this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_);return}this.techCall_("setCurrentTime",e),this.cache_.initTime=0,isFinite(e)&&(this.cache_.currentTime=Number(e))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(e){if(e===void 0)return this.cache_.duration!==void 0?this.cache_.duration:NaN;e=parseFloat(e),e<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return(!e||!e.length)&&(e=Ni(0,0)),e}seekable(){let e=this.techGet_("seekable");return(!e||!e.length)&&(e=Ni(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return C0(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),i=this.duration();let n=e.end(e.length-1);return n>i&&(n=i),n}volume(e){let i;if(e!==void 0){i=Math.max(0,Math.min(1,e)),this.cache_.volume=i,this.techCall_("setVolume",i),i>0&&this.lastVolume_(i);return}return i=parseFloat(this.techGet_("volume")),isNaN(i)?1:i}muted(e){if(e!==void 0){this.techCall_("setMuted",e);return}return this.techGet_("muted")||!1}defaultMuted(e){return e!==void 0&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(e!==void 0&&e!==0){this.cache_.lastVolume=e;return}return this.cache_.lastVolume}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(e!==void 0){const i=this.isFullscreen_;this.isFullscreen_=!!e,this.isFullscreen_!==i&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),this.toggleFullscreenClass_();return}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const i=this;return new Promise((n,s)=>{function a(){i.off("fullscreenerror",l),i.off("fullscreenchange",o)}function o(){a(),n()}function l(d,m){a(),s(m)}i.one("fullscreenchange",o),i.one("fullscreenerror",l);const c=i.requestFullscreenHelper_(e);c&&(c.then(a,a),c.then(n,s))})}requestFullscreenHelper_(e){let i;if(this.fsApi_.prefixed||(i=this.options_.fullscreen&&this.options_.fullscreen.options||{},e!==void 0&&(i=e)),this.fsApi_.requestFullscreen){const n=this.el_[this.fsApi_.requestFullscreen](i);return n&&n.then(()=>this.isFullscreen(!0),()=>this.isFullscreen(!1)),n}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise((i,n)=>{function s(){e.off("fullscreenerror",o),e.off("fullscreenchange",a)}function a(){s(),i()}function o(c,d){s(),n(d)}e.one("fullscreenchange",a),e.one("fullscreenerror",o);const l=e.exitFullscreenHelper_();l&&(l.then(s,s),l.then(i,n))})}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=Te[this.fsApi_.exitFullscreen]();return e&&Fi(e.then(()=>this.isFullscreen(!1))),e}else this.tech_.supportsFullScreen()&&!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=Te.documentElement.style.overflow,pi(Te,"keydown",this.boundFullWindowOnEscKey_),Te.documentElement.style.overflow="hidden",Bn(Te.body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){e.key==="Escape"&&this.isFullscreen()===!0&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,jt(Te,"keydown",this.boundFullWindowOnEscKey_),Te.documentElement.style.overflow=this.docOrigOverflow,Ba(Te.body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(e===void 0)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){if(e!==void 0){this.isInPictureInPicture_=!!e,this.togglePictureInPictureClass_();return}return!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&Y.documentPictureInPicture){const e=Te.createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(Me("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),Y.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(i=>(u0(i),this.el_.parentNode.insertBefore(e,this.el_),i.document.body.appendChild(this.el_),i.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:i}),i.addEventListener("pagehide",n=>{const s=n.target.querySelector(".video-js");e.parentNode.replaceChild(s,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")}),i))}return"pictureInPictureEnabled"in Te&&this.disablePictureInPicture()===!1?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){if(Y.documentPictureInPicture&&Y.documentPictureInPicture.window)return Y.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in Te)return Te.exitPictureInPicture()}handleKeyDown(e){const{userActions:i}=this.options_;!i||!i.hotkeys||(s=>{const a=s.tagName.toLowerCase();if(s.isContentEditable)return!0;const o=["button","checkbox","hidden","radio","reset","submit"];return a==="input"?o.indexOf(s.type)===-1:["textarea"].indexOf(a)!==-1})(this.el_.ownerDocument.activeElement)||(typeof i.hotkeys=="function"?i.hotkeys.call(this,e):this.handleHotkeys(e))}handleHotkeys(e){const i=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:n=o=>e.key.toLowerCase()==="f",muteKey:s=o=>e.key.toLowerCase()==="m",playPauseKey:a=o=>e.key.toLowerCase()==="k"||e.key.toLowerCase()===" "}=i;if(n.call(this,e)){e.preventDefault(),e.stopPropagation();const o=he.getComponent("FullscreenToggle");Te[this.fsApi_.fullscreenEnabled]!==!1&&o.prototype.handleClick.call(this,e)}else s.call(this,e)?(e.preventDefault(),e.stopPropagation(),he.getComponent("MuteToggle").prototype.handleClick.call(this,e)):a.call(this,e)&&(e.preventDefault(),e.stopPropagation(),he.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let i;for(let n=0,s=this.options_.techOrder;n<s.length;n++){const a=s[n];let o=ze.getTech(a);if(o||(o=he.getComponent(a)),!o){Ye.error(`The "${a}" tech is undefined. Skipped browser support check for that tech.`);continue}if(o.isSupported()&&(i=o.canPlayType(e),i))return i}return""}selectSource(e){const i=this.options_.techOrder.map(l=>[l,ze.getTech(l)]).filter(([l,c])=>c?c.isSupported():(Ye.error(`The "${l}" tech is undefined. Skipped browser support check for that tech.`),!1)),n=function(l,c,d){let m;return l.some(g=>c.some(S=>{if(m=d(g,S),m)return!0})),m};let s;const a=l=>(c,d)=>l(d,c),o=([l,c],d)=>{if(c.canPlaySource(d,this.options_[l.toLowerCase()]))return{source:d,tech:l}};return this.options_.sourceOrder?s=n(e,i,a(o)):s=n(i,e,o),s||!1}handleSrc_(e,i){if(typeof e>"u")return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const n=D0(e);if(!n.length){this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);return}if(this.changingSrc_=!0,i||(this.cache_.sources=n),this.updateSourceCaches_(n[0]),fb(this,n[0],(s,a)=>{if(this.middleware_=a,i||(this.cache_.sources=n),this.updateSourceCaches_(s),this.src_(s)){if(n.length>1)return this.handleSrc_(n.slice(1));this.changingSrc_=!1,this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0),this.triggerReady();return}pb(a,this.tech_)}),n.length>1){const s=()=>{this.error(null),this.handleSrc_(n.slice(1),!0)},a=()=>{this.off("error",s)};this.one("error",s),this.one("playing",a),this.resetRetryOnError_=()=>{this.off("error",s),this.off("playing",a)}}}src(e){return this.handleSrc_(e,!1)}src_(e){const i=this.selectSource([e]);return i?y0(i.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0),!1):(this.changingSrc_=!0,this.loadTech_(i.tech,i.source),this.tech_.ready(()=>{this.changingSrc_=!1}),!1):!0}addSourceElement(e,i){return this.tech_?this.tech_.addSourceElement(e,i):!1}removeSourceElement(e){return this.tech_?this.tech_.removeSourceElement(e):!1}load(){if(this.tech_&&this.tech_.vhs){this.src(this.currentSource());return}this.techCall_("load")}reset(){if(this.paused())this.doReset_();else{const e=this.play();Fi(e.then(()=>this.doReset_()))}}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),nn(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:i,progressControl:n,remainingTimeDisplay:s}=this.controlBar||{},{seekBar:a}=n||{};e&&e.updateContent(),i&&i.updateContent(),s&&s.updateContent(),a&&(a.update(),a.loadProgressBar&&a.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),i=[];return Object.keys(e).length!==0&&i.push(e),this.cache_.sources||i}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){if(e!==void 0){this.techCall_("setPreload",e),this.options_.preload=e;return}return this.techGet_("preload")}autoplay(e){if(e===void 0)return this.options_.autoplay||!1;let i;typeof e=="string"&&/(any|play|muted)/.test(e)||e===!0&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_(typeof e=="string"?e:"play"),i=!1):e?this.options_.autoplay=!0:this.options_.autoplay=!1,i=typeof i>"u"?this.options_.autoplay:i,this.tech_&&this.techCall_("setAutoplay",i)}playsinline(e){return e!==void 0&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){if(e!==void 0){this.techCall_("setLoop",e),this.options_.loop=e;return}return this.techGet_("loop")}poster(e){if(e===void 0)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(e){if(e===void 0)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))}usingNativeControls(e){if(e===void 0)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(e===void 0)return this.error_||null;if(yn("beforeerror").forEach(i=>{const n=i(this,e);if(!(Hi(n)&&!Array.isArray(n)||typeof n=="string"||typeof n=="number"||n===null)){this.log.error("please return a value that MediaError expects in beforeerror hooks");return}e=n}),this.options_.suppressNotSupportedError&&e&&e.code===4){const i=function(){this.error(e)};this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],i),this.one("loadstart",function(){this.off(["click","touchstart"],i)});return}if(e===null){this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close();return}this.error_=new gt(e),this.addClass("vjs-error"),Ye.error(`(CODE:${this.error_.code} ${gt.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),yn("error").forEach(i=>i(this,this.error_))}reportUserActivity(e){this.userActivity_=!0}userActive(e){if(e===void 0)return this.userActive_;if(e=!!e,e!==this.userActive_){if(this.userActive_=e,this.userActive_){this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");return}this.tech_&&this.tech_.one("mousemove",function(i){i.stopPropagation(),i.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}}listenForUserActivity_(){let e,i,n;const s=ct(this,this.reportUserActivity),a=function(g){(g.screenX!==i||g.screenY!==n)&&(i=g.screenX,n=g.screenY,s())},o=function(){s(),this.clearInterval(e),e=this.setInterval(s,250)},l=function(g){s(),this.clearInterval(e)};this.on("mousedown",o),this.on("mousemove",a),this.on("mouseup",l),this.on("mouseleave",l);const c=this.getChild("controlBar");c&&!qt&&!Oi&&(c.on("mouseenter",function(g){this.player().options_.inactivityTimeout!==0&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0}),c.on("mouseleave",function(g){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",s),this.on("keyup",s);let d;const m=function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(d);const g=this.options_.inactivityTimeout;g<=0||(d=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},g))};this.setInterval(m,250)}playbackRate(e){if(e!==void 0){this.techCall_("setPlaybackRate",e);return}return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1}defaultPlaybackRate(e){return e!==void 0?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(e!==void 0){this.isAudio_=!!e;return}return!!this.isAudio_}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild("ControlBar");!e||this.audioOnlyCache_.controlBarHeight===e.currentHeight()||(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),i=this.getChild("ControlBar"),n=i&&i.currentHeight();e.forEach(s=>{s!==i&&s.el_&&!s.hasClass("vjs-hidden")&&(s.hide(),this.audioOnlyCache_.hiddenChildren.push(s))}),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=n,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(n),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach(e=>e.show()),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if(typeof e!="boolean"||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const i=[];return this.isInPictureInPicture()&&i.push(this.exitPictureInPicture()),this.isFullscreen()&&i.push(this.exitFullscreen()),this.audioPosterMode()&&i.push(this.audioPosterMode(!1)),Promise.all(i).then(()=>this.enableAudioOnlyUI_())}return Promise.resolve().then(()=>this.disableAudioOnlyUI_())}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return typeof e!="boolean"||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.enablePosterModeUI_()}):Promise.resolve().then(()=>{this.disablePosterModeUI_()}))}addTextTrack(e,i,n){if(this.tech_)return this.tech_.addTextTrack(e,i,n)}addRemoteTextTrack(e,i){if(this.tech_)return this.tech_.addRemoteTextTrack(e,i)}removeRemoteTextTrack(e={}){let{track:i}=e;if(i||(i=e),this.tech_)return this.tech_.removeRemoteTextTrack(i)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(e===void 0)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),nn(this)&&this.trigger("languagechange"))}languages(){return lt(st.prototype.options_.languages,this.languages_)}toJSON(){const e=lt(this.options_),i=e.tracks;e.tracks=[];for(let n=0;n<i.length;n++){let s=i[n];s=lt(s),s.player=void 0,e.tracks[n]=s}return e}createModal(e,i){i=i||{},i.content=e||"";const n=new vr(this,i);return this.addChild(n),n.on("dispose",()=>{this.removeChild(n)}),n.open(),n}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),i=this.currentWidth();for(let n=0;n<pl.length;n++){const s=pl[n],a=this.breakpoints_[s];if(i<=a){if(e===s)return;e&&this.removeClass(Qs[e]),this.addClass(Qs[s]),this.breakpoint_=s;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return e===void 0?Object.assign(this.breakpoints_):(this.breakpoint_="",this.breakpoints_=Object.assign({},t4,e),this.updateCurrentBreakpoint_(),Object.assign(this.breakpoints_))}responsive(e){if(e===void 0)return this.responsive_;e=!!e;const i=this.responsive_;if(e!==i)return this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return Qs[this.breakpoint_]||""}loadMedia(e,i){if(!e||typeof e!="object")return;const n=this.crossOrigin();this.reset(),this.cache_.media=lt(e);const{artist:s,artwork:a,description:o,poster:l,src:c,textTracks:d,title:m}=this.cache_.media;!a&&l&&(this.cache_.media.artwork=[{src:l,type:ha(l)}]),n&&this.crossOrigin(n),c&&this.src(c),l&&this.poster(l),Array.isArray(d)&&d.forEach(g=>this.addRemoteTextTrack(g,!1)),this.titleBar&&this.titleBar.update({title:m,description:o||s||""}),this.ready(i)}getMedia(){if(!this.cache_.media){const e=this.poster(),i=this.currentSources(),n=Array.prototype.map.call(this.remoteTextTracks(),a=>({kind:a.kind,label:a.label,language:a.language,src:a.src})),s={src:i,textTracks:n};return e&&(s.poster=e,s.artwork=[{src:s.poster,type:ha(s.poster)}]),s}return lt(this.cache_.media)}static getTagSettings(e){const i={sources:[],tracks:[]},n=hn(e),s=n["data-setup"];if(Kr(e,"vjs-fill")&&(n.fill=!0),Kr(e,"vjs-fluid")&&(n.fluid=!0),s!==null)try{Object.assign(n,JSON.parse(s||"{}"))}catch(a){Ye.error("data-setup",a)}if(Object.assign(i,n),e.hasChildNodes()){const a=e.childNodes;for(let o=0,l=a.length;o<l;o++){const c=a[o],d=c.nodeName.toLowerCase();d==="source"?i.sources.push(hn(c)):d==="track"&&i.tracks.push(hn(c))}}return i}debug(e){if(e===void 0)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)}playbackRates(e){if(e===void 0)return this.cache_.playbackRates;Array.isArray(e)&&e.every(i=>typeof i=="number")&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}st.prototype.videoTracks=()=>{};st.prototype.audioTracks=()=>{};st.prototype.textTracks=()=>{};st.prototype.remoteTextTracks=()=>{};st.prototype.remoteTextTrackEls=()=>{};Jt.names.forEach(function(r){const e=Jt[r];st.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}});st.prototype.crossorigin=st.prototype.crossOrigin;st.players={};const Hr=Y.navigator;st.prototype.options_={techOrder:ze.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Hr&&(Hr.languages&&Hr.languages[0]||Hr.userLanguage||Hr.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1};sf.forEach(function(r){st.prototype[`handleTech${_t(r)}_`]=function(){return this.trigger(r)}});he.registerComponent("Player",st);const fa="plugin",Zn="activePlugins_",Gn={},pa=r=>Gn.hasOwnProperty(r),Zs=r=>pa(r)?Gn[r]:void 0,af=(r,e)=>{r[Zn]=r[Zn]||{},r[Zn][e]=!0},ma=(r,e,i)=>{const n=(i?"before":"")+"pluginsetup";r.trigger(n,e),r.trigger(n+":"+e.name,e)},i4=function(r,e){const i=function(){ma(this,{name:r,plugin:e,instance:null},!0);const n=e.apply(this,arguments);return af(this,r),ma(this,{name:r,plugin:e,instance:n}),n};return Object.keys(e).forEach(function(n){i[n]=e[n]}),i},Dd=(r,e)=>(e.prototype.name=r,function(...i){ma(this,{name:r,plugin:e,instance:null},!0);const n=new e(this,...i);return this[r]=()=>n,ma(this,n.getEventHash()),n});class li{constructor(e){if(this.constructor===li)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),Hl(this),delete this.trigger,v0(this,this.constructor.defaultState),af(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,i={}){return gr(this.eventBusEl_,e,this.getEventHash(i))}handleStateChanged(e){}dispose(){const{name:e,player:i}=this;this.trigger("dispose"),this.off(),i.off("dispose",this.dispose),i[Zn][e]=!1,this.player=this.state=null,i[e]=Dd(e,Gn[e])}static isBasic(e){const i=typeof e=="string"?Zs(e):e;return typeof i=="function"&&!li.prototype.isPrototypeOf(i.prototype)}static registerPlugin(e,i){if(typeof e!="string")throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(pa(e))Ye.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(st.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if(typeof i!="function")throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof i}.`);return Gn[e]=i,e!==fa&&(li.isBasic(i)?st.prototype[e]=i4(e,i):st.prototype[e]=Dd(e,i)),i}static deregisterPlugin(e){if(e===fa)throw new Error("Cannot de-register base plugin.");pa(e)&&(delete Gn[e],delete st.prototype[e])}static getPlugins(e=Object.keys(Gn)){let i;return e.forEach(n=>{const s=Zs(n);s&&(i=i||{},i[n]=s)}),i}static getPluginVersion(e){const i=Zs(e);return i&&i.VERSION||""}}li.getPlugin=Zs;li.BASE_PLUGIN_NAME=fa;li.registerPlugin(fa,li);st.prototype.usingPlugin=function(r){return!!this[Zn]&&this[Zn][r]===!0};st.prototype.hasPlugin=function(r){return!!pa(r)};function n4(r,e){let i=!1;return function(...n){return i||Ye.warn(r),i=!0,e.apply(this,n)}}function Bi(r,e,i,n){return n4(`${e} is deprecated and will be removed in ${r}.0; please use ${i} instead.`,n)}var r4={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};const of=r=>r.indexOf("#")===0?r.slice(1):r;function ae(r,e,i){let n=ae.getPlayer(r);if(n)return e&&Ye.warn(`Player "${r}" is already initialised. Options will not be applied.`),i&&n.ready(i),n;const s=typeof r=="string"?_n("#"+of(r)):r;if(!mr(s))throw new TypeError("The element or ID supplied is not valid. (videojs)");const o=("getRootNode"in s?s.getRootNode()instanceof Y.ShadowRoot:!1)?s.getRootNode():s.ownerDocument.body;(!s.ownerDocument.defaultView||!o.contains(s))&&Ye.warn("The element supplied is not included in the DOM"),e=e||{},e.restoreEl===!0&&(e.restoreEl=(s.parentNode&&s.parentNode.hasAttribute&&s.parentNode.hasAttribute("data-vjs-player")?s.parentNode:s).cloneNode(!0)),yn("beforesetup").forEach(c=>{const d=c(s,lt(e));if(!Hi(d)||Array.isArray(d)){Ye.error("please return an object in beforesetup hooks");return}e=lt(e,d)});const l=he.getComponent("Player");return n=new l(s,e,i),yn("setup").forEach(c=>c(n)),n}ae.hooks_=Ji;ae.hooks=yn;ae.hook=VT;ae.hookOnce=FT;ae.removeHook=zh;if(Y.VIDEOJS_NO_DYNAMIC_STYLE!==!0&&pr()){let r=_n(".vjs-styles-defaults");if(!r){r=h0("vjs-styles-defaults");const e=_n("head");e&&e.insertBefore(r,e.firstChild),f0(r,`
192
192
  .video-js {
193
193
  width: 300px;
194
194
  height: 150px;
@@ -197,15 +197,15 @@ See https://github.com/videojs/video.js/issues/2617 for more info.
197
197
  .vjs-fluid:not(.vjs-audio-only-mode) {
198
198
  padding-top: 56.25%
199
199
  }
200
- `)}}ol(1,ae);ae.VERSION=nl;ae.options=st.prototype.options_;ae.getPlayers=()=>st.players;ae.getPlayer=r=>{const e=st.players;let i;if(typeof r=="string"){const n=of(r),s=e[n];if(s)return s;i=_n("#"+n)}else i=r;if(mr(i)){const{player:n,playerId:s}=i;if(n||e[s])return n||e[s]}};ae.getAllPlayers=()=>Object.keys(st.players).map(r=>st.players[r]).filter(Boolean);ae.players=st.players;ae.getComponent=he.getComponent;ae.registerComponent=(r,e)=>(ze.isTech(e)&&We.warn(`The ${r} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),he.registerComponent.call(he,r,e));ae.getTech=ze.getTech;ae.registerTech=ze.registerTech;ae.use=hb;Object.defineProperty(ae,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(ae.middleware,"TERMINATOR",{value:da,writeable:!1,enumerable:!0});ae.browser=Qh;ae.obj=zT;ae.mergeOptions=Bi(9,"videojs.mergeOptions","videojs.obj.merge",lt);ae.defineLazyProperty=Bi(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Da);ae.bind=Bi(9,"videojs.bind","native Function.prototype.bind",ct);ae.registerPlugin=li.registerPlugin;ae.deregisterPlugin=li.deregisterPlugin;ae.plugin=(r,e)=>(We.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),li.registerPlugin(r,e));ae.getPlugins=li.getPlugins;ae.getPlugin=li.getPlugin;ae.getPluginVersion=li.getPluginVersion;ae.addLanguage=function(r,e){return r=(""+r).toLowerCase(),ae.options.languages=lt(ae.options.languages,{[r]:e}),ae.options.languages[r]};ae.log=We;ae.createLogger=Hh;ae.time=nb;ae.createTimeRange=Bi(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Ni);ae.createTimeRanges=Bi(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Ni);ae.formatTime=Bi(9,"videojs.formatTime","videojs.time.formatTime",Rn);ae.setFormatTime=Bi(9,"videojs.setFormatTime","videojs.time.setFormatTime",T0);ae.resetFormatTime=Bi(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",b0);ae.parseUrl=Bi(9,"videojs.parseUrl","videojs.url.parseUrl",Wl);ae.isCrossOrigin=Bi(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",$a);ae.EventTarget=mi;ae.any=zl;ae.on=pi;ae.one=Va;ae.off=jt;ae.trigger=gr;ae.xhr=wh;ae.TrackList=Vn;ae.TextTrack=ls;ae.TextTrackList=jl;ae.AudioTrack=k0;ae.AudioTrackList=x0;ae.VideoTrack=w0;ae.VideoTrackList=S0;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(r=>{ae[r]=function(){return We.warn(`videojs.${r}() is deprecated; use videojs.dom.${r}() instead`),c0[r].apply(null,arguments)}});ae.computedStyle=Bi(9,"videojs.computedStyle","videojs.dom.computedStyle",dr);ae.dom=c0;ae.fn=QT;ae.num=Bb;ae.str=tb;ae.url=cb;ae.Error=r4;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class s4{constructor(e){let i=this;return i.id=e.id,i.label=i.id,i.width=e.width,i.height=e.height,i.bitrate=e.bandwidth,i.frameRate=e.frameRate,i.enabled_=e.enabled,Object.defineProperty(i,"enabled",{get(){return i.enabled_()},set(n){i.enabled_(n)}}),i}}class ga extends ae.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let i=this.getQualityLevelById(e.id);if(i)return i;const n=this.levels_.length;return i=new s4(e),""+n in this||Object.defineProperty(this,n,{get(){return this.levels_[n]}}),this.levels_.push(i),this.trigger({qualityLevel:i,type:"addqualitylevel"}),i}removeQualityLevel(e){let i=null;for(let n=0,s=this.length;n<s;n++)if(this[n]===e){i=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return i&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),i}getQualityLevelById(e){for(let i=0,n=this.length;i<n;i++){const s=this[i];if(s.id===e)return s}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}ga.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const r in ga.prototype.allowedEvents_)ga.prototype["on"+r]=null;var lf="4.1.0";const a4=function(r,e){const i=r.qualityLevels,n=new ga,s=function(){n.dispose(),r.qualityLevels=i,r.off("dispose",s)};return r.on("dispose",s),r.qualityLevels=()=>n,r.qualityLevels.VERSION=lf,n},uf=function(r){return a4(this,ae.obj.merge({},r))};ae.registerPlugin("qualityLevels",uf);uf.VERSION=lf;/*! @name @videojs/http-streaming @version 3.17.3 @license Apache-2.0 */const ai=Sa,va=(r,e)=>e&&e.responseURL&&r!==e.responseURL?e.responseURL:r,xi=r=>ae.log.debug?ae.log.debug.bind(ae,"VHS:",`${r} >`):function(){};function at(...r){const e=ae.obj||ae;return(e.merge||e.mergeOptions).apply(e,r)}function Mt(...r){const e=ae.time||ae;return(e.createTimeRanges||e.createTimeRanges).apply(e,r)}function o4(r){if(r.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges:
200
+ `)}}ol(1,ae);ae.VERSION=nl;ae.options=st.prototype.options_;ae.getPlayers=()=>st.players;ae.getPlayer=r=>{const e=st.players;let i;if(typeof r=="string"){const n=of(r),s=e[n];if(s)return s;i=_n("#"+n)}else i=r;if(mr(i)){const{player:n,playerId:s}=i;if(n||e[s])return n||e[s]}};ae.getAllPlayers=()=>Object.keys(st.players).map(r=>st.players[r]).filter(Boolean);ae.players=st.players;ae.getComponent=he.getComponent;ae.registerComponent=(r,e)=>(ze.isTech(e)&&Ye.warn(`The ${r} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),he.registerComponent.call(he,r,e));ae.getTech=ze.getTech;ae.registerTech=ze.registerTech;ae.use=hb;Object.defineProperty(ae,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(ae.middleware,"TERMINATOR",{value:da,writeable:!1,enumerable:!0});ae.browser=Qh;ae.obj=zT;ae.mergeOptions=Bi(9,"videojs.mergeOptions","videojs.obj.merge",lt);ae.defineLazyProperty=Bi(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",Da);ae.bind=Bi(9,"videojs.bind","native Function.prototype.bind",ct);ae.registerPlugin=li.registerPlugin;ae.deregisterPlugin=li.deregisterPlugin;ae.plugin=(r,e)=>(Ye.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),li.registerPlugin(r,e));ae.getPlugins=li.getPlugins;ae.getPlugin=li.getPlugin;ae.getPluginVersion=li.getPluginVersion;ae.addLanguage=function(r,e){return r=(""+r).toLowerCase(),ae.options.languages=lt(ae.options.languages,{[r]:e}),ae.options.languages[r]};ae.log=Ye;ae.createLogger=Hh;ae.time=nb;ae.createTimeRange=Bi(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Ni);ae.createTimeRanges=Bi(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Ni);ae.formatTime=Bi(9,"videojs.formatTime","videojs.time.formatTime",Rn);ae.setFormatTime=Bi(9,"videojs.setFormatTime","videojs.time.setFormatTime",T0);ae.resetFormatTime=Bi(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",b0);ae.parseUrl=Bi(9,"videojs.parseUrl","videojs.url.parseUrl",Wl);ae.isCrossOrigin=Bi(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",$a);ae.EventTarget=mi;ae.any=zl;ae.on=pi;ae.one=Va;ae.off=jt;ae.trigger=gr;ae.xhr=wh;ae.TrackList=Vn;ae.TextTrack=ls;ae.TextTrackList=jl;ae.AudioTrack=k0;ae.AudioTrackList=x0;ae.VideoTrack=w0;ae.VideoTrackList=S0;["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(r=>{ae[r]=function(){return Ye.warn(`videojs.${r}() is deprecated; use videojs.dom.${r}() instead`),c0[r].apply(null,arguments)}});ae.computedStyle=Bi(9,"videojs.computedStyle","videojs.dom.computedStyle",dr);ae.dom=c0;ae.fn=QT;ae.num=Bb;ae.str=tb;ae.url=cb;ae.Error=r4;/*! @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 */class s4{constructor(e){let i=this;return i.id=e.id,i.label=i.id,i.width=e.width,i.height=e.height,i.bitrate=e.bandwidth,i.frameRate=e.frameRate,i.enabled_=e.enabled,Object.defineProperty(i,"enabled",{get(){return i.enabled_()},set(n){i.enabled_(n)}}),i}}class ga extends ae.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let i=this.getQualityLevelById(e.id);if(i)return i;const n=this.levels_.length;return i=new s4(e),""+n in this||Object.defineProperty(this,n,{get(){return this.levels_[n]}}),this.levels_.push(i),this.trigger({qualityLevel:i,type:"addqualitylevel"}),i}removeQualityLevel(e){let i=null;for(let n=0,s=this.length;n<s;n++)if(this[n]===e){i=this.levels_.splice(n,1)[0],this.selectedIndex_===n?this.selectedIndex_=-1:this.selectedIndex_>n&&this.selectedIndex_--;break}return i&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),i}getQualityLevelById(e){for(let i=0,n=this.length;i<n;i++){const s=this[i];if(s.id===e)return s}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}ga.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const r in ga.prototype.allowedEvents_)ga.prototype["on"+r]=null;var lf="4.1.0";const a4=function(r,e){const i=r.qualityLevels,n=new ga,s=function(){n.dispose(),r.qualityLevels=i,r.off("dispose",s)};return r.on("dispose",s),r.qualityLevels=()=>n,r.qualityLevels.VERSION=lf,n},uf=function(r){return a4(this,ae.obj.merge({},r))};ae.registerPlugin("qualityLevels",uf);uf.VERSION=lf;/*! @name @videojs/http-streaming @version 3.17.3 @license Apache-2.0 */const ai=Sa,va=(r,e)=>e&&e.responseURL&&r!==e.responseURL?e.responseURL:r,xi=r=>ae.log.debug?ae.log.debug.bind(ae,"VHS:",`${r} >`):function(){};function at(...r){const e=ae.obj||ae;return(e.merge||e.mergeOptions).apply(e,r)}function Mt(...r){const e=ae.time||ae;return(e.createTimeRanges||e.createTimeRanges).apply(e,r)}function o4(r){if(r.length===0)return"Buffered Ranges are empty";let e=`Buffered Ranges:
201
201
  `;for(let i=0;i<r.length;i++){const n=r.start(i),s=r.end(i);e+=`${n} --> ${s}. Duration (${s-n})
202
202
  `}return e}const $i=1/30,Ui=$i*3,cf=function(r,e){const i=[];let n;if(r&&r.length)for(n=0;n<r.length;n++)e(r.start(n),r.end(n))&&i.push([r.start(n),r.end(n)]);return Mt(i)},Wn=function(r,e){return cf(r,function(i,n){return i-Ui<=e&&n+Ui>=e})},Us=function(r,e){return cf(r,function(i){return i-$i>=e})},l4=function(r){if(r.length<2)return Mt();const e=[];for(let i=1;i<r.length;i++){const n=r.end(i-1),s=r.start(i);e.push([n,s])}return Mt(e)},u4=function(r,e){let i=null,n=null,s=0;const a=[],o=[];if(!r||!r.length||!e||!e.length)return Mt();let l=r.length;for(;l--;)a.push({time:r.start(l),type:"start"}),a.push({time:r.end(l),type:"end"});for(l=e.length;l--;)a.push({time:e.start(l),type:"start"}),a.push({time:e.end(l),type:"end"});for(a.sort(function(c,d){return c.time-d.time}),l=0;l<a.length;l++)a[l].type==="start"?(s++,s===2&&(i=a[l].time)):a[l].type==="end"&&(s--,s===1&&(n=a[l].time)),i!==null&&n!==null&&(o.push([i,n]),i=null,n=null);return Mt(o)},df=r=>{const e=[];if(!r||!r.length)return"";for(let i=0;i<r.length;i++)e.push(r.start(i)+" => "+r.end(i));return e.join(", ")},c4=function(r,e,i=1){return((r.length?r.end(r.length-1):0)-e)/i},In=r=>{const e=[];for(let i=0;i<r.length;i++)e.push({start:r.start(i),end:r.end(i)});return e},d4=function(r,e){if(r===e)return!1;if(!r&&e||!e&&r||r.length!==e.length)return!0;for(let i=0;i<r.length;i++)if(r.start(i)!==e.start(i)||r.end(i)!==e.end(i))return!0;return!1},jo=function(r){if(!(!r||!r.length||!r.end))return r.end(r.length-1)},cu=function(r,e){let i=0;if(!r||!r.length)return i;for(let n=0;n<r.length;n++){const s=r.start(n),a=r.end(n);if(!(e>a)){if(e>s&&e<=a){i+=a-e;continue}i+=a-s}}return i},du=(r,e)=>{if(!e.preload)return e.duration;let i=0;return(e.parts||[]).forEach(function(n){i+=n.duration}),(e.preloadHints||[]).forEach(function(n){n.type==="PART"&&(i+=r.partTargetDuration)}),i},ml=r=>(r.segments||[]).reduce((e,i,n)=>(i.parts?i.parts.forEach(function(s,a){e.push({duration:s.duration,segmentIndex:n,partIndex:a,part:s,segment:i})}):e.push({duration:i.duration,segmentIndex:n,partIndex:null,segment:i,part:null}),e),[]),hf=r=>{const e=r.segments&&r.segments.length&&r.segments[r.segments.length-1];return e&&e.parts||[]},ff=({preloadSegment:r})=>{if(!r)return;const{parts:e,preloadHints:i}=r;let n=(i||[]).reduce((s,a)=>s+(a.type==="PART"?1:0),0);return n+=e&&e.length?e.length:0,n},pf=(r,e)=>{if(e.endList)return 0;if(r&&r.suggestedPresentationDelay)return r.suggestedPresentationDelay;const i=hf(e).length>0;return i&&e.serverControl&&e.serverControl.partHoldBack?e.serverControl.partHoldBack:i&&e.partTargetDuration?e.partTargetDuration*3:e.serverControl&&e.serverControl.holdBack?e.serverControl.holdBack:e.targetDuration?e.targetDuration*3:0},h4=function(r,e){let i=0,n=e-r.mediaSequence,s=r.segments[n];if(s){if(typeof s.start<"u")return{result:s.start,precise:!0};if(typeof s.end<"u")return{result:s.end-s.duration,precise:!0}}for(;n--;){if(s=r.segments[n],typeof s.end<"u")return{result:i+s.end,precise:!0};if(i+=du(r,s),typeof s.start<"u")return{result:i+s.start,precise:!0}}return{result:i,precise:!1}},f4=function(r,e){let i=0,n,s=e-r.mediaSequence;for(;s<r.segments.length;s++){if(n=r.segments[s],typeof n.start<"u")return{result:n.start-i,precise:!0};if(i+=du(r,n),typeof n.end<"u")return{result:n.end-i,precise:!0}}return{result:-1,precise:!1}},mf=function(r,e,i){if(typeof e>"u"&&(e=r.mediaSequence+r.segments.length),e<r.mediaSequence)return 0;const n=h4(r,e);if(n.precise)return n.result;const s=f4(r,e);return s.precise?s.result:n.result+i},gf=function(r,e,i){if(!r)return 0;if(typeof i!="number"&&(i=0),typeof e>"u"){if(r.totalDuration)return r.totalDuration;if(!r.endList)return Y.Infinity}return mf(r,e,i)},Jr=function({defaultDuration:r,durationList:e,startIndex:i,endIndex:n}){let s=0;if(i>n&&([i,n]=[n,i]),i<0){for(let a=i;a<Math.min(0,n);a++)s+=r;i=0}for(let a=i;a<n;a++)s+=e[a].duration;return s},vf=function(r,e,i,n){if(!r||!r.segments)return null;if(r.endList)return gf(r);if(e===null)return null;e=e||0;let s=mf(r,r.mediaSequence+r.segments.length,e);return i&&(n=typeof n=="number"?n:pf(null,r),s-=n),Math.max(0,s)},p4=function(r,e,i){const s=e||0;let a=vf(r,e,!0,i);return a===null?Mt():(a<s&&(a=s),Mt(s,a))},m4=function({playlist:r,currentTime:e,startingSegmentIndex:i,startingPartIndex:n,startTime:s,exactManifestTimings:a}){let o=e-s;const l=ml(r);let c=0;for(let d=0;d<l.length;d++){const m=l[d];if(i===m.segmentIndex&&!(typeof n=="number"&&typeof m.partIndex=="number"&&n!==m.partIndex)){c=d;break}}if(o<0){if(c>0)for(let d=c-1;d>=0;d--){const m=l[d];if(o+=m.duration,a){if(o<0)continue}else if(o+$i<=0)continue;return{partIndex:m.partIndex,segmentIndex:m.segmentIndex,startTime:s-Jr({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:d})}}return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:e}}if(c<0){for(let d=c;d<0;d++)if(o-=r.targetDuration,o<0)return{partIndex:l[0]&&l[0].partIndex||null,segmentIndex:l[0]&&l[0].segmentIndex||0,startTime:e};c=0}for(let d=c;d<l.length;d++){const m=l[d];o-=m.duration;const g=m.duration>$i,S=o===0,T=g&&o+$i>=0;if(!((S||T)&&d!==l.length-1)){if(a){if(o>0)continue}else if(o-$i>=0)continue;return{partIndex:m.partIndex,segmentIndex:m.segmentIndex,startTime:s+Jr({defaultDuration:r.targetDuration,durationList:l,startIndex:c,endIndex:d})}}}return{segmentIndex:l[l.length-1].segmentIndex,partIndex:l[l.length-1].partIndex,startTime:e}},yf=function(r){return r.excludeUntil&&r.excludeUntil>Date.now()},hu=function(r){return r.excludeUntil&&r.excludeUntil===1/0},qa=function(r){const e=yf(r);return!r.disabled&&!e},g4=function(r){return r.disabled},v4=function(r){for(let e=0;e<r.segments.length;e++)if(r.segments[e].key)return!0;return!1},_f=function(r,e){return e.attributes&&e.attributes[r]},y4=function(r,e,i,n=0){return _f("BANDWIDTH",i)?(r*i.attributes.BANDWIDTH-n*8)/e:NaN},gl=(r,e)=>{if(r.playlists.length===1)return!0;const i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return r.playlists.filter(n=>qa(n)?(n.attributes.BANDWIDTH||0)<i:!1).length===0},fu=(r,e)=>!r&&!e||!r&&e||r&&!e?!1:!!(r===e||r.id&&e.id&&r.id===e.id||r.resolvedUri&&e.resolvedUri&&r.resolvedUri===e.resolvedUri||r.uri&&e.uri&&r.uri===e.uri),Ad=function(r,e){const i=r&&r.mediaGroups&&r.mediaGroups.AUDIO||{};let n=!1;for(const s in i){for(const a in i[s])if(n=e(i[s][a]),n)break;if(n)break}return!!n},hs=r=>{if(!r||!r.playlists||!r.playlists.length)return Ad(r,i=>i.playlists&&i.playlists.length||i.uri);for(let e=0;e<r.playlists.length;e++){const i=r.playlists[e],n=i.attributes&&i.attributes.CODECS;if(!(n&&n.split(",").every(a=>Ih(a))||Ad(r,a=>fu(i,a))))return!1}return!0};var oi={liveEdgeDelay:pf,duration:gf,seekable:p4,getMediaInfoForTime:m4,isEnabled:qa,isDisabled:g4,isExcluded:yf,isIncompatible:hu,playlistEnd:vf,isAes:v4,hasAttribute:_f,estimateSegmentRequestTime:y4,isLowestEnabledRendition:gl,isAudioOnly:hs,playlistMatch:fu,segmentDurationWithParts:du};const{log:Tf}=ae,Jn=(r,e)=>`${r}-${e}`,bf=(r,e,i)=>`placeholder-uri-${r}-${e}-${i}`,_4=({onwarn:r,oninfo:e,manifestString:i,customTagParsers:n=[],customTagMappers:s=[],llhls:a})=>{const o=new a3;r&&o.on("warn",r),e&&o.on("info",e),n.forEach(d=>o.addParser(d)),s.forEach(d=>o.addTagMapper(d)),o.push(i),o.end();const l=o.manifest;if(a||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach(function(d){l.hasOwnProperty(d)&&delete l[d]}),l.segments&&l.segments.forEach(function(d){["parts","preloadHints"].forEach(function(m){d.hasOwnProperty(m)&&delete d[m]})})),!l.targetDuration){let d=10;l.segments&&l.segments.length&&(d=l.segments.reduce((m,g)=>Math.max(m,g.duration),0)),r&&r({message:`manifest has no targetDuration defaulting to ${d}`}),l.targetDuration=d}const c=hf(l);if(c.length&&!l.partTargetDuration){const d=c.reduce((m,g)=>Math.max(m,g.duration),0);r&&(r({message:`manifest has no partTargetDuration defaulting to ${d}`}),Tf.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),l.partTargetDuration=d}return l},Tr=(r,e)=>{r.mediaGroups&&["AUDIO","SUBTITLES"].forEach(i=>{if(r.mediaGroups[i])for(const n in r.mediaGroups[i])for(const s in r.mediaGroups[i][n]){const a=r.mediaGroups[i][n][s];e(a,i,n,s)}})},Cf=({playlist:r,uri:e,id:i})=>{r.id=i,r.playlistErrors_=0,e&&(r.uri=e),r.attributes=r.attributes||{}},T4=r=>{let e=r.playlists.length;for(;e--;){const i=r.playlists[e];Cf({playlist:i,id:Jn(e,i.uri)}),i.resolvedUri=ai(r.uri,i.uri),r.playlists[i.id]=i,r.playlists[i.uri]=i,i.attributes.BANDWIDTH||Tf.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},b4=r=>{Tr(r,e=>{e.uri&&(e.resolvedUri=ai(r.uri,e.uri))})},C4=(r,e)=>{const i=Jn(0,e),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:Y.location.href,resolvedUri:Y.location.href,playlists:[{uri:e,id:i,resolvedUri:e,attributes:{}}]};return n.playlists[i]=n.playlists[0],n.playlists[e]=n.playlists[0],n},xf=(r,e,i=bf)=>{r.uri=e;for(let s=0;s<r.playlists.length;s++)if(!r.playlists[s].uri){const a=`placeholder-uri-${s}`;r.playlists[s].uri=a}const n=hs(r);Tr(r,(s,a,o,l)=>{if(!s.playlists||!s.playlists.length){if(n&&a==="AUDIO"&&!s.uri)for(let c=0;c<r.playlists.length;c++){const d=r.playlists[c];if(d.attributes&&d.attributes.AUDIO&&d.attributes.AUDIO===o)return}s.playlists=[Ct({},s)]}s.playlists.forEach(function(c,d){const m=i(a,o,l,c),g=Jn(d,m);c.uri?c.resolvedUri=c.resolvedUri||ai(r.uri,c.uri):(c.uri=d===0?m:g,c.resolvedUri=c.uri),c.id=c.id||g,c.attributes=c.attributes||{},r.playlists[c.id]=c,r.playlists[c.uri]=c})}),T4(r),b4(r)};class Id{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(this.offset_!==null||!e.length)return;const[i]=e;i.programDateTime!==void 0&&(this.offset_=i.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[i]=e,n=i.startDate.getTime();this.trimProcessedDateRanges_(n),this.pendingDateRanges_=e.reduce((s,a)=>(s.set(a.id,a),s),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(this.offset_===null)return[];const e={},i=[];this.pendingDateRanges_.forEach((n,s)=>{if(!this.processedDateRanges_.has(s)&&(n.startTime=n.startDate.getTime()/1e3-this.offset_,n.processDateRange=()=>this.processDateRange(n),i.push(n),!!n.class))if(e[n.class]){const a=e[n.class].push(n);n.classListIndex=a-1}else e[n.class]=[n],n.classListIndex=0});for(const n of i){const s=e[n.class]||[];n.endDate?n.endTime=n.endDate.getTime()/1e3-this.offset_:n.endOnNext&&s[n.classListIndex+1]?n.endTime=s[n.classListIndex+1].startTime:n.duration?n.endTime=n.startTime+n.duration:n.plannedDuration?n.endTime=n.startTime+n.plannedDuration:n.endTime=n.startTime}return i}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach((n,s)=>{n.startDate.getTime()<e&&this.processedDateRanges_.delete(s)})}}const Sf=22,Mn=({requestType:r,request:e,error:i,parseFailure:n})=>{const s=e.status<200||e.status>299,a=e.status>=400&&e.status<=499,o={uri:e.uri,requestType:r},l=s&&!a||n;if(i&&a)o.error=Ct({},i),o.errorType=ae.Error.NetworkRequestFailed;else if(e.aborted)o.errorType=ae.Error.NetworkRequestAborted;else if(e.timedout)o.errorType=ae.Error.NetworkRequestTimeout;else if(l){const c=n?ae.Error.NetworkBodyParserFailed:ae.Error.NetworkBadStatus;o.errorType=c,o.status=e.status,o.headers=e.headers}return o},x4=xi("CodecUtils"),Ef=function(r){const e=r.attributes||{};if(e.CODECS)return Ri(e.CODECS)},kf=(r,e)=>{const i=e.attributes||{};return r&&r.mediaGroups&&r.mediaGroups.AUDIO&&i.AUDIO&&r.mediaGroups.AUDIO[i.AUDIO]},S4=(r,e)=>{if(!kf(r,e))return!0;const i=e.attributes||{},n=r.mediaGroups.AUDIO[i.AUDIO];for(const s in n)if(!n[s].uri&&!n[s].playlists)return!0;return!1},as=function(r){const e={};return r.forEach(({mediaType:i,type:n,details:s})=>{e[i]=e[i]||[],e[i].push(Ah(`${n}${s}`))}),Object.keys(e).forEach(function(i){if(e[i].length>1){x4(`multiple ${i} codecs found as attributes: ${e[i].join(", ")}. Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs.`),e[i]=null;return}e[i]=e[i][0]}),e},Nd=function(r){let e=0;return r.audio&&e++,r.video&&e++,e},es=function(r,e){const i=e.attributes||{},n=as(Ef(e)||[]);if(kf(r,e)&&!n.audio&&!S4(r,e)){const s=as(l3(r,i.AUDIO)||[]);s.audio&&(n.audio=s.audio)}return n},{EventTarget:E4}=ae,k4=(r,e)=>{if(e.endList||!e.serverControl)return r;const i={};if(e.serverControl.canBlockReload){const{preloadSegment:n}=e;let s=e.mediaSequence+e.segments.length;if(n){const a=n.parts||[],o=ff(e)-1;o>-1&&o!==a.length-1&&(i._HLS_part=o),(o>-1||a.length)&&s--}i._HLS_msn=s}if(e.serverControl&&e.serverControl.canSkipUntil&&(i._HLS_skip=e.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){const n=new Y.URL(r);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(s){i.hasOwnProperty(s)&&n.searchParams.set(s,i[s])}),r=n.toString()}return r},w4=(r,e)=>{if(!r)return e;const i=at(r,e);if(r.preloadHints&&!e.preloadHints&&delete i.preloadHints,r.parts&&!e.parts)delete i.parts;else if(r.parts&&e.parts)for(let n=0;n<e.parts.length;n++)r.parts&&r.parts[n]&&(i.parts[n]=at(r.parts[n],e.parts[n]));return!r.skipped&&e.skipped&&(i.skipped=!1),r.preload&&!e.preload&&(i.preload=!1),i},D4=(r,e,i)=>{const n=r.slice(),s=e.slice();i=i||0;const a=[];let o;for(let l=0;l<s.length;l++){const c=n[l+i],d=s[l];c?(o=c.map||o,a.push(w4(c,d))):(o&&!d.map&&(d.map=o),a.push(d))}return a},wf=(r,e)=>{!r.resolvedUri&&r.uri&&(r.resolvedUri=ai(e,r.uri)),r.key&&!r.key.resolvedUri&&(r.key.resolvedUri=ai(e,r.key.uri)),r.map&&!r.map.resolvedUri&&(r.map.resolvedUri=ai(e,r.map.uri)),r.map&&r.map.key&&!r.map.key.resolvedUri&&(r.map.key.resolvedUri=ai(e,r.map.key.uri)),r.parts&&r.parts.length&&r.parts.forEach(i=>{i.resolvedUri||(i.resolvedUri=ai(e,i.uri))}),r.preloadHints&&r.preloadHints.length&&r.preloadHints.forEach(i=>{i.resolvedUri||(i.resolvedUri=ai(e,i.uri))})},Df=function(r){const e=r.segments||[],i=r.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints){for(let n=0;n<i.preloadHints.length;n++)if(i.preloadHints[n].type==="MAP")return e}i.duration=r.targetDuration,i.preload=!0,e.push(i)}return e},Af=(r,e)=>r===e||r.segments&&e.segments&&r.segments.length===e.segments.length&&r.endList===e.endList&&r.mediaSequence===e.mediaSequence&&r.preloadSegment===e.preloadSegment,vl=(r,e,i=Af)=>{const n=at(r,{}),s=n.playlists[e.id];if(!s||i(s,e))return null;e.segments=Df(e);const a=at(s,e);if(a.preloadSegment&&!e.preloadSegment&&delete a.preloadSegment,s.segments){if(e.skip){e.segments=e.segments||[];for(let o=0;o<e.skip.skippedSegments;o++)e.segments.unshift({skipped:!0})}a.segments=D4(s.segments,e.segments,e.mediaSequence-s.mediaSequence)}a.segments.forEach(o=>{wf(o,a.resolvedUri)});for(let o=0;o<n.playlists.length;o++)n.playlists[o].id===e.id&&(n.playlists[o]=a);return n.playlists[e.id]=a,n.playlists[e.uri]=a,Tr(r,(o,l,c,d)=>{if(o.playlists)for(let m=0;m<o.playlists.length;m++)e.id===o.playlists[m].id&&(o.playlists[m]=a)}),n},yl=(r,e)=>{const i=r.segments||[],n=i[i.length-1],s=n&&n.parts&&n.parts[n.parts.length-1],a=s&&s.duration||n&&n.duration;return e&&a?a*1e3:(r.partTargetDuration||r.targetDuration||10)*500},Od=(r,e,i)=>{if(!r)return;const n=[];return r.forEach(s=>{if(!s.attributes)return;const{BANDWIDTH:a,RESOLUTION:o,CODECS:l}=s.attributes;n.push({id:s.id,bandwidth:a,resolution:o,codecs:l})}),{type:e,isLive:i,renditions:n}};class Yn extends E4{constructor(e,i,n={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=xi("PlaylistLoader");const{withCredentials:s=!1}=n;this.src=e,this.vhs_=i,this.withCredentials=s,this.addDateRangesToTextTrack_=n.addDateRangesToTextTrack;const a=i.options_;this.customTagParsers=a&&a.customTagParsers||[],this.customTagMappers=a&&a.customTagMappers||[],this.llhls=a&&a.llhls,this.dateRangesStorage_=new Id,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const i=this.dateRangesStorage_.getDateRangesToProcess();!i.length||!this.addDateRangesToTextTrack_||this.addDateRangesToTextTrack_(i)}handleMediaupdatetimeout_(){if(this.state!=="HAVE_METADATA")return;const e=this.media();let i=ai(this.main.uri,e.uri);this.llhls&&(i=k4(i,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:i,withCredentials:this.withCredentials,requestType:"hls-playlist"},(n,s)=>{if(this.request){if(n)return this.playlistRequestError(this.request,this.media(),"HAVE_METADATA");this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}})}playlistRequestError(e,i,n){const{uri:s,id:a}=i;this.request=null,n&&(this.state=n),this.error={playlist:this.main.playlists[a],status:e.status,message:`HLS playlist request error at URL: ${s}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:Mn({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:i}){try{const n=_4({onwarn:({message:s})=>this.logger_(`m3u8-parser warn for ${e}: ${s}`),oninfo:({message:s})=>this.logger_(`m3u8-parser info for ${e}: ${s}`),manifestString:i,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return!n.playlists||!n.playlists.length||this.excludeAudioOnlyVariants(n.playlists),n}catch(n){this.error=n,this.error.metadata={errorType:ae.Error.StreamingHlsPlaylistParserError,error:n}}}excludeAudioOnlyVariants(e){const i=n=>{const s=n.attributes||{},{width:a,height:o}=s.RESOLUTION||{};if(a&&o)return!0;const l=Ef(n)||[];return!!as(l).video};e.some(i)&&e.forEach(n=>{i(n)||(n.excludeUntil=1/0)})}haveMetadata({playlistString:e,playlistObject:i,url:n,id:s}){this.request=null,this.state="HAVE_METADATA";const a={playlistInfo:{type:"media",uri:n}};this.trigger({type:"playlistparsestart",metadata:a});const o=i||this.parseManifest_({url:n,manifestString:e});o.lastRequest=Date.now(),Cf({playlist:o,uri:n,id:s});const l=vl(this.main,o);this.targetDuration=o.partTargetDuration||o.targetDuration,this.pendingMedia_=null,l?(this.main=l,this.media_=this.main.playlists[s]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(yl(this.media(),!!l)),a.parsedPlaylist=Od(this.main.playlists,a.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:a}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),Y.clearTimeout(this.mediaUpdateTimeout),Y.clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new Id,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,i){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);if(typeof e=="string"){if(!this.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(Y.clearTimeout(this.finalRenditionTimeout),i){const l=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;this.finalRenditionTimeout=Y.setTimeout(this.media.bind(this,e,!1),l);return}const n=this.state,s=!this.media_||e.id!==this.media_.id,a=this.main.playlists[e.id];if(a&&a.endList||e.endList&&e.segments.length){this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,s&&(this.trigger("mediachanging"),n==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange"));return}if(this.updateMediaUpdateTimeout_(yl(e,!0)),!s)return;if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.pendingMedia_=e;const o={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:o}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},(l,c)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=va(e.resolvedUri,c),l)return this.playlistRequestError(this.request,e,n);this.trigger({type:"playlistrequestcomplete",metadata:o}),this.haveMetadata({playlistString:c.responseText,url:e.uri,id:e.id}),n==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}})}pause(){this.mediaUpdateTimeout&&(Y.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),this.state==="HAVE_NOTHING"&&(this.started=!1),this.state==="SWITCHING_MEDIA"?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":this.state==="HAVE_CURRENT_METADATA"&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(Y.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const i=this.media();if(e){const n=i?(i.partTargetDuration||i.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=Y.setTimeout(()=>{this.mediaUpdateTimeout=null,this.load()},n);return}if(!this.started){this.start();return}i&&!i.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist")}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(Y.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),!(!this.media()||this.media().endList)&&(this.mediaUpdateTimeout=Y.setTimeout(()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)},e))}start(){if(this.started=!0,typeof this.src=="object"){this.src.uri||(this.src.uri=Y.location.href),this.src.resolvedUri=this.src.uri,setTimeout(()=>{this.setupInitialPlaylist(this.src)},0);return}const e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},(i,n)=>{if(!this.request)return;if(this.request=null,i)return this.error={status:n.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:n.responseText,code:2,metadata:Mn({requestType:n.requestType,request:n,error:i})},this.state==="HAVE_NOTHING"&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=va(this.src,n),this.trigger({type:"playlistparsestart",metadata:e});const s=this.parseManifest_({manifestString:n.responseText,url:this.src});e.parsedPlaylist=Od(s.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(s)})}srcUri(){return typeof this.src=="string"?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists){this.main=e,xf(this.main,this.srcUri()),e.playlists.forEach(n=>{n.segments=Df(n),n.segments.forEach(s=>{wf(s,n.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);return}const i=this.srcUri()||Y.location.href;this.main=C4(e,i),this.haveMetadata({playlistObject:e,url:i,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,i){const n=this.main,s=e.ID;let a=n.playlists.length;for(;a--;){const o=n.playlists[a];if(o.attributes["PATHWAY-ID"]===s){const l=o.resolvedUri,c=o.id;if(i){const d=this.createCloneURI_(o.resolvedUri,e),m=Jn(s,d),g=this.createCloneAttributes_(s,o.attributes),S=this.createClonePlaylist_(o,m,e,g);n.playlists[a]=S,n.playlists[m]=S,n.playlists[d]=S}else n.playlists.splice(a,1);delete n.playlists[c],delete n.playlists[l]}}this.updateOrDeleteCloneMedia(e,i)}updateOrDeleteCloneMedia(e,i){const n=this.main,s=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(a=>{if(!(!n.mediaGroups[a]||!n.mediaGroups[a][s])){for(const o in n.mediaGroups[a])if(o===s){for(const l in n.mediaGroups[a][o])n.mediaGroups[a][o][l].playlists.forEach((d,m)=>{const g=n.playlists[d.id],S=g.id,T=g.resolvedUri;delete n.playlists[S],delete n.playlists[T]});delete n.mediaGroups[a][o]}}}),i&&this.createClonedMediaGroups_(e)}addClonePathway(e,i={}){const n=this.main,s=n.playlists.length,a=this.createCloneURI_(i.resolvedUri,e),o=Jn(e.ID,a),l=this.createCloneAttributes_(e.ID,i.attributes),c=this.createClonePlaylist_(i,o,e,l);n.playlists[s]=c,n.playlists[o]=c,n.playlists[a]=c,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const i=e.ID,n=e["BASE-ID"],s=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(a=>{if(!(!s.mediaGroups[a]||s.mediaGroups[a][i]))for(const o in s.mediaGroups[a]){if(o===n)s.mediaGroups[a][i]={};else continue;for(const l in s.mediaGroups[a][o]){const c=s.mediaGroups[a][o][l];s.mediaGroups[a][i][l]=Ct({},c);const d=s.mediaGroups[a][i][l],m=this.createCloneURI_(c.resolvedUri,e);d.resolvedUri=m,d.uri=m,d.playlists=[],c.playlists.forEach((g,S)=>{const T=s.playlists[g.id],b=bf(a,i,l),y=Jn(i,b);if(T&&!s.playlists[y]){const x=this.createClonePlaylist_(T,y,e),N=x.resolvedUri;s.playlists[y]=x,s.playlists[N]=x}d.playlists[S]=this.createClonePlaylist_(g,y,e)})}}})}createClonePlaylist_(e,i,n,s){const a=this.createCloneURI_(e.resolvedUri,n),o={resolvedUri:a,uri:a,id:i};return e.segments&&(o.segments=[]),s&&(o.attributes=s),at(e,o)}createCloneURI_(e,i){const n=new URL(e);n.hostname=i["URI-REPLACEMENT"].HOST;const s=i["URI-REPLACEMENT"].PARAMS;for(const a of Object.keys(s))n.searchParams.set(a,s[a]);return n.href}createCloneAttributes_(e,i){const n={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(s=>{i[s]&&(n[s]=e)}),n}getKeyIdSet(e){const i=new Set;if(!e||!e.contentProtection)return i;for(const n in e.contentProtection)if(e.contentProtection[n]&&e.contentProtection[n].attributes&&e.contentProtection[n].attributes.keyId){const s=e.contentProtection[n].attributes.keyId;i.add(s.toLowerCase())}return i}}const _l=function(r,e,i,n){const s=r.responseType==="arraybuffer"?r.response:r.responseText;!e&&s&&(r.responseTime=Date.now(),r.roundTripTime=r.responseTime-r.requestTime,r.bytesReceived=s.byteLength||s.length,r.bandwidth||(r.bandwidth=Math.floor(r.bytesReceived/r.roundTripTime*8*1e3))),i.headers&&(r.responseHeaders=i.headers),e&&e.code==="ETIMEDOUT"&&(r.timedout=!0),!e&&!r.aborted&&i.statusCode!==200&&i.statusCode!==206&&i.statusCode!==0&&(e=new Error("XHR Failed with a response of: "+(r&&(s||r.responseText)))),n(e,r)},A4=(r,e)=>{if(!r||!r.size)return;let i=e;return r.forEach(n=>{i=n(i)}),i},I4=(r,e,i,n)=>{!r||!r.size||r.forEach(s=>{s(e,i,n)})},If=function(){const r=function e(i,n){i=at({timeout:45e3},i);const s=e.beforeRequest||ae.Vhs.xhr.beforeRequest,a=e._requestCallbackSet||ae.Vhs.xhr._requestCallbackSet||new Set,o=e._responseCallbackSet||ae.Vhs.xhr._responseCallbackSet;s&&typeof s=="function"&&(ae.log.warn("beforeRequest is deprecated, use onRequest instead."),a.add(s));const l=ae.Vhs.xhr.original===!0?ae.xhr:ae.Vhs.xhr,c=A4(a,i);a.delete(s);const d=l(c||i,function(g,S){return I4(o,d,g,S),_l(d,g,S,n)}),m=d.abort;return d.abort=function(){return d.aborted=!0,m.apply(d,arguments)},d.uri=i.uri,d.requestType=i.requestType,d.requestTime=Date.now(),d};return r.original=!0,r},N4=function(r){let e;const i=r.offset;return typeof r.offset=="bigint"||typeof r.length=="bigint"?e=Y.BigInt(r.offset)+Y.BigInt(r.length)-Y.BigInt(1):e=r.offset+r.length-1,"bytes="+i+"-"+e},Tl=function(r){const e={};return r.byterange&&(e.Range=N4(r.byterange)),e},O4=function(r,e){return r.start(e)+"-"+r.end(e)},B4=function(r,e){const i=r.toString(16);return"00".substring(0,2-i.length)+i+(e%2?" ":"")},L4=function(r){return r>=32&&r<126?String.fromCharCode(r):"."},Nf=function(r){const e={};return Object.keys(r).forEach(i=>{const n=r[i];Oh(n)?e[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:e[i]=n}),e},ya=function(r){const e=r.byterange||{length:1/0,offset:0};return[e.length,e.offset,r.resolvedUri].join(",")},Of=function(r){return r.resolvedUri},Bf=r=>{const e=Array.prototype.slice.call(r),i=16;let n="",s,a;for(let o=0;o<e.length/i;o++)s=e.slice(o*i,o*i+i).map(B4).join(""),a=e.slice(o*i,o*i+i).map(L4).join(""),n+=s+" "+a+`
203
203
  `;return n},P4=({bytes:r})=>Bf(r),M4=r=>{let e="",i;for(i=0;i<r.length;i++)e+=O4(r,i)+" ";return e};var R4=Object.freeze({__proto__:null,createTransferableMessage:Nf,initSegmentId:ya,segmentKeyId:Of,hexDump:Bf,tagDump:P4,textRanges:M4});const Lf=.25,V4=(r,e)=>{if(!e.dateTimeObject)return null;const i=e.videoTimingInfo.transmuxerPrependedSeconds,s=e.videoTimingInfo.transmuxedPresentationStart+i,a=r-s;return new Date(e.dateTimeObject.getTime()+a*1e3)},F4=r=>r.transmuxedPresentationEnd-r.transmuxedPresentationStart-r.transmuxerPrependedSeconds,$4=(r,e)=>{let i;try{i=new Date(r)}catch{return null}if(!e||!e.segments||e.segments.length===0)return null;let n=e.segments[0];if(i<new Date(n.dateTimeObject))return null;for(let c=0;c<e.segments.length-1;c++){n=e.segments[c];const d=new Date(e.segments[c+1].dateTimeObject);if(i<d)break}const s=e.segments[e.segments.length-1],a=s.dateTimeObject,o=s.videoTimingInfo?F4(s.videoTimingInfo):s.duration+s.duration*Lf,l=new Date(a.getTime()+o*1e3);return i>l?null:(i>new Date(a)&&(n=s),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:oi.duration(e,e.mediaSequence+e.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})},U4=(r,e)=>{if(!e||!e.segments||e.segments.length===0)return null;let i=0,n;for(let a=0;a<e.segments.length&&(n=e.segments[a],i=n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:i+n.duration,!(r<=i));a++);const s=e.segments[e.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<r)return null;if(r>i){if(r>i+s.duration*Lf)return null;n=s}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:i-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}},z4=(r,e)=>{let i,n;try{i=new Date(r),n=new Date(e)}catch{}const s=i.getTime();return(n.getTime()-s)/1e3},H4=r=>{if(!r.segments||r.segments.length===0)return!1;for(let e=0;e<r.segments.length;e++)if(!r.segments[e].dateTimeObject)return!1;return!0},q4=({playlist:r,time:e=void 0,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!r||e===void 0)return i({message:"getProgramTime: playlist and time must be provided"});const n=U4(e,r);if(!n)return i({message:"valid programTime was not found"});if(n.type==="estimate")return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:n.estimatedStart});const s={mediaSeconds:e},a=V4(e,n.segment);return a&&(s.programDateTime=a.toISOString()),i(null,s)},Pf=({programTime:r,playlist:e,retryCount:i=2,seekTo:n,pauseAfterSeek:s=!0,tech:a,callback:o})=>{if(!o)throw new Error("seekToProgramTime: callback must be provided");if(typeof r>"u"||!e||!n)return o({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!e.endList&&!a.hasStarted_)return o({message:"player must be playing a live stream to start buffering"});if(!H4(e))return o({message:"programDateTime tags must be provided in the manifest "+e.resolvedUri});const l=$4(r,e);if(!l)return o({message:`${r} was not found in the stream`});const c=l.segment,d=z4(c.dateTimeObject,r);if(l.type==="estimate"){if(i===0)return o({message:`${r} is not buffered yet. Try again`});n(l.estimatedStart+d),a.one("seeked",()=>{Pf({programTime:r,playlist:e,retryCount:i-1,seekTo:n,pauseAfterSeek:s,tech:a,callback:o})});return}const m=c.start+d,g=()=>o(null,a.currentTime());a.one("seeked",g),s&&a.pause(),n(m)},Go=(r,e)=>{if(r.readyState===4)return e()},j4=(r,e,i,n)=>{let s=[],a,o=!1;const l=function(g,S,T,b){return S.abort(),o=!0,i(g,S,T,b)},c=function(g,S){if(o)return;if(g)return g.metadata=Mn({requestType:n,request:S,error:g}),l(g,S,"",s);const T=S.responseText.substring(s&&s.byteLength||0,S.responseText.length);if(s=y3(s,Bh(T,!0)),a=a||Gr(s),s.length<10||a&&s.length<a+2)return Go(S,()=>l(g,S,"",s));const b=Rl(s);return b==="ts"&&s.length<188?Go(S,()=>l(g,S,"",s)):!b&&s.length<376?Go(S,()=>l(g,S,"",s)):l(null,S,b,s)},m=e({uri:r,beforeSend(g){g.overrideMimeType("text/plain; charset=x-user-defined"),g.addEventListener("progress",function({total:S,loaded:T}){return _l(g,null,{statusCode:g.status},c)})}},function(g,S){return _l(m,g,S,c)});return m},{EventTarget:G4}=ae,Bd=function(r,e){if(!Af(r,e)||r.sidx&&e.sidx&&(r.sidx.offset!==e.sidx.offset||r.sidx.length!==e.sidx.length))return!1;if(!r.sidx&&e.sidx||r.sidx&&!e.sidx||r.segments&&!e.segments||!r.segments&&e.segments)return!1;if(!r.segments&&!e.segments)return!0;for(let i=0;i<r.segments.length;i++){const n=r.segments[i],s=e.segments[i];if(n.uri!==s.uri)return!1;if(!n.byterange&&!s.byterange)continue;const a=n.byterange,o=s.byterange;if(a&&!o||!a&&o||a.offset!==o.offset||a.length!==o.length)return!1}return!0},W4=(r,e,i,n)=>{const s=n.attributes.NAME||i;return`placeholder-uri-${r}-${e}-${s}`},Y4=({mainXml:r,srcUrl:e,clientOffset:i,sidxMapping:n,previousManifest:s})=>{const a=gT(r,{manifestUri:e,clientOffset:i,sidxMapping:n,previousManifest:s});return xf(a,e,W4),a},X4=(r,e)=>{Tr(r,(i,n,s,a)=>{(!e.mediaGroups[n][s]||!(a in e.mediaGroups[n][s]))&&delete r.mediaGroups[n][s][a]})},K4=(r,e,i)=>{let n=!0,s=at(r,{duration:e.duration,minimumUpdatePeriod:e.minimumUpdatePeriod,timelineStarts:e.timelineStarts});for(let a=0;a<e.playlists.length;a++){const o=e.playlists[a];if(o.sidx){const c=ka(o.sidx);i&&i[c]&&i[c].sidx&&Ll(o,i[c].sidx,o.sidx.resolvedUri)}const l=vl(s,o,Bd);l&&(s=l,n=!1)}return Tr(e,(a,o,l,c)=>{if(a.playlists&&a.playlists.length){const d=a.playlists[0].id,m=vl(s,a.playlists[0],Bd);m&&(s=m,c in s.mediaGroups[o][l]||(s.mediaGroups[o][l][c]=a),s.mediaGroups[o][l][c].playlists[0]=s.playlists[d],n=!1)}}),X4(s,e),e.minimumUpdatePeriod!==r.minimumUpdatePeriod&&(n=!1),n?null:s},Q4=(r,e)=>(!r.map&&!e.map||!!(r.map&&e.map&&r.map.byterange.offset===e.map.byterange.offset&&r.map.byterange.length===e.map.byterange.length))&&r.uri===e.uri&&r.byterange.offset===e.byterange.offset&&r.byterange.length===e.byterange.length,Ld=(r,e)=>{const i={};for(const n in r){const a=r[n].sidx;if(a){const o=ka(a);if(!e[o])break;const l=e[o].sidxInfo;Q4(l,a)&&(i[o]=e[o])}}return i},Z4=(r,e)=>{let n=Ld(r.playlists,e);return Tr(r,(s,a,o,l)=>{if(s.playlists&&s.playlists.length){const c=s.playlists;n=at(n,Ld(c,e))}}),n};class bl extends G4{constructor(e,i,n={},s){super(),this.isPaused_=!0,this.mainPlaylistLoader_=s||this,s||(this.isMain_=!0);const{withCredentials:a=!1}=n;if(this.vhs_=i,this.withCredentials=a,this.addMetadataToTextTrack=n.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",()=>{this.refreshXml_()}),this.on("mediaupdatetimeout",()=>{this.refreshMedia_(this.media().id)}),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=xi("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,i,n){if(!this.request)return!0;if(this.request=null,e)return this.error=typeof e=="object"&&!(e instanceof Error)?e:{status:i.status,message:"DASH request error at URL: "+i.uri,response:i.response,code:2,metadata:e.metadata},n&&(this.state=n),this.trigger("error"),!0}addSidxSegments_(e,i,n){const s=e.sidx&&ka(e.sidx);if(!e.sidx||!s||this.mainPlaylistLoader_.sidxMapping_[s]){Y.clearTimeout(this.mediaRequest_),this.mediaRequest_=Y.setTimeout(()=>n(!1),0);return}const a=va(e.sidx.resolvedUri),o=(c,d)=>{if(this.requestErrored_(c,d,i))return;const m=this.mainPlaylistLoader_.sidxMapping_,{requestType:g}=d;let S;try{S=bT(Le(d.response).subarray(8))}catch(T){T.metadata=Mn({requestType:g,request:d,parseFailure:!0}),this.requestErrored_(T,d,i);return}return m[s]={sidxInfo:e.sidx,sidx:S},Ll(e,S,e.sidx.resolvedUri),n(!0)},l="dash-sidx";this.request=j4(a,this.vhs_.xhr,(c,d,m,g)=>{if(c)return o(c,d);if(!m||m!=="mp4"){const b=m||"unknown";return o({status:d.status,message:`Unsupported ${b} container type for sidx segment at URL: ${a}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},d)}const{offset:S,length:T}=e.sidx.byterange;if(g.length>=T+S)return o(c,{response:g.subarray(S,S+T),status:d.status,uri:d.uri});this.request=this.vhs_.xhr({uri:a,responseType:"arraybuffer",requestType:"dash-sidx",headers:Tl({byterange:e.sidx.byterange})},o)},l)}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},Y.clearTimeout(this.minimumUpdatePeriodTimeout_),Y.clearTimeout(this.mediaRequest_),Y.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if(this.state==="HAVE_NOTHING")throw new Error("Cannot switch media playlist from "+this.state);const i=this.state;if(typeof e=="string"){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const n=!this.media_||e.id!==this.media_.id;if(n&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList){this.state="HAVE_METADATA",this.media_=e,n&&(this.trigger("mediachanging"),this.trigger("mediachange"));return}n&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,i,s=>{this.haveMetadata({startingState:i,playlist:e})}))}haveMetadata({startingState:e,playlist:i}){this.state="HAVE_METADATA",this.loadedPlaylists_[i.id]=i,Y.clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(i.id),e==="HAVE_MAIN_MANIFEST"?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),Y.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(Y.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),this.state==="HAVE_NOTHING"&&(this.started=!1)}load(e){this.isPaused_=!1,Y.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const i=this.media();if(e){const n=i?i.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=Y.setTimeout(()=>this.load(),n);return}if(!this.started){this.start();return}i&&!i.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist")}start(){if(this.started=!0,!this.isMain_){Y.clearTimeout(this.mediaRequest_),this.mediaRequest_=Y.setTimeout(()=>this.haveMain_(),0);return}this.requestMain_((e,i)=>{this.haveMain_(),!this.hasPendingRequest()&&!this.media_&&this.media(this.mainPlaylistLoader_.main.playlists[0])})}requestMain_(e){const i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:i}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},(n,s)=>{if(n){const{requestType:o}=s;n.metadata=Mn({requestType:o,request:s,error:n})}if(this.requestErrored_(n,s)){this.state==="HAVE_NOTHING"&&(this.started=!1);return}this.trigger({type:"manifestrequestcomplete",metadata:i});const a=s.responseText!==this.mainPlaylistLoader_.mainXml_;if(this.mainPlaylistLoader_.mainXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?this.mainLoaded_=Date.parse(s.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=va(this.mainPlaylistLoader_.srcUrl,s),a){this.handleMain_(),this.syncClientServerClock_(()=>e(s,a));return}return e(s,a)})}syncClientServerClock_(e){const i=vT(this.mainPlaylistLoader_.mainXml_);if(i===null)return this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e();if(i.method==="DIRECT")return this.mainPlaylistLoader_.clientOffset_=i.value-Date.now(),e();this.request=this.vhs_.xhr({uri:ai(this.mainPlaylistLoader_.srcUrl,i.value),method:i.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},(n,s)=>{if(!this.request)return;if(n){const{requestType:o}=s;return this.error.metadata=Mn({requestType:o,request:s,error:n}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let a;i.method==="HEAD"?!s.responseHeaders||!s.responseHeaders.date?a=this.mainLoaded_:a=Date.parse(s.responseHeaders.date):a=Date.parse(s.responseText),this.mainPlaylistLoader_.clientOffset_=a-Date.now(),e()})}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){Y.clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,i={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:i});let n;try{n=Y4({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(a){this.error=a,this.error.metadata={errorType:ae.Error.StreamingDashManifestParserError,error:a},this.trigger("error")}e&&(n=K4(e,n,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=n||e;const s=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(s&&s!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=s),(!e||n&&n.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(n),n){const{duration:a,endList:o}=n,l=[];n.playlists.forEach(d=>{l.push({id:d.id,bandwidth:d.attributes.BANDWIDTH,resolution:d.attributes.RESOLUTION,codecs:d.attributes.CODECS})});const c={duration:a,isLive:!o,renditions:l};i.parsedManifest=c,this.trigger({type:"manifestparsecomplete",metadata:i})}return!!n}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(Y.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let i=e.main&&e.main.minimumUpdatePeriod;if(i===0&&(e.media()?i=e.media().targetDuration*1e3:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),typeof i!="number"||i<=0){i<0&&this.logger_(`found invalid minimumUpdatePeriod of ${i}, not setting a timeout`);return}this.createMUPTimeout_(i)}createMUPTimeout_(e){const i=this.mainPlaylistLoader_;i.minimumUpdatePeriodTimeout_=Y.setTimeout(()=>{i.minimumUpdatePeriodTimeout_=null,i.trigger("minimumUpdatePeriod"),i.createMUPTimeout_(e)},e)}refreshXml_(){this.requestMain_((e,i)=>{i&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=Z4(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,n=>{this.refreshMedia_(this.media().id)}))})}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const i=this.mainPlaylistLoader_.main.playlists,n=!this.media_||this.media_!==i[e];if(n?this.media_=i[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const s=()=>{this.media().endList||(this.mediaUpdateTimeout=Y.setTimeout(()=>{this.trigger("mediaupdatetimeout"),s()},yl(this.media(),!!n)))};s()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const i=this.mainPlaylistLoader_.main.eventStream.map(n=>({cueTime:n.start,frames:[{data:n.messageData}]}));this.addMetadataToTextTrack("EventStream",i,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const i=new Set;for(const n in e.contentProtection){const s=e.contentProtection[n].attributes["cenc:default_KID"];s&&i.add(s.replace(/-/g,"").toLowerCase())}return i}}}var Lt={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30};const J4=r=>{const e=new Uint8Array(new ArrayBuffer(r.length));for(let i=0;i<r.length;i++)e[i]=r.charCodeAt(i);return e.buffer},Mf=function(r){return r.on=r.addEventListener,r.off=r.removeEventListener,r},e8=function(r){try{return URL.createObjectURL(new Blob([r],{type:"application/javascript"}))}catch{const i=new BlobBuilder;return i.append(r),URL.createObjectURL(i.getBlob())}},Rf=function(r){return function(){const e=e8(r),i=Mf(new Worker(e));i.objURL=e;const n=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(e),n.call(this)},i}},Vf=function(r){return`var browserWorkerPolyFill = ${Mf.toString()};
204
204
  browserWorkerPolyFill(self);
205
- `+r},Ff=function(r){return r.toString().replace(/^function.+?{/,"").slice(0,-1)},t8=Vf(Ff(function(){var r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var u={};this.on=function(h,p){u[h]||(u[h]=[]),u[h]=u[h].concat(p)},this.off=function(h,p){var f;return u[h]?(f=u[h].indexOf(p),u[h]=u[h].slice(),u[h].splice(f,1),f>-1):!1},this.trigger=function(h){var p,f,v,_;if(p=u[h],!!p)if(arguments.length===2)for(v=p.length,f=0;f<v;++f)p[f].call(this,arguments[1]);else{for(_=[],f=arguments.length,f=1;f<arguments.length;++f)_.push(arguments[f]);for(v=p.length,f=0;f<v;++f)p[f].apply(this,_)}},this.dispose=function(){u={}}}};e.prototype.pipe=function(u){return this.on("data",function(h){u.push(h)}),this.on("done",function(h){u.flush(h)}),this.on("partialdone",function(h){u.partialFlush(h)}),this.on("endedtimeline",function(h){u.endTimeline(h)}),this.on("reset",function(h){u.reset(h)}),u},e.prototype.push=function(u){this.trigger("data",u)},e.prototype.flush=function(u){this.trigger("done",u)},e.prototype.partialFlush=function(u){this.trigger("partialdone",u)},e.prototype.endTimeline=function(u){this.trigger("endedtimeline",u)},e.prototype.reset=function(u){this.trigger("reset",u)};var i=e,n=Math.pow(2,32),s=function(u){var h=new DataView(u.buffer,u.byteOffset,u.byteLength),p;return h.getBigUint64?(p=h.getBigUint64(0),p<Number.MAX_SAFE_INTEGER?Number(p):p):h.getUint32(0)*n+h.getUint32(4)},a={getUint64:s,MAX_UINT32:n},o=a.MAX_UINT32,l,c,d,m,g,S,T,b,y,x,N,I,D,z,H,U,B,G,C,k,O,j,L,V,M,q,$,X,R,ee,ue,J,oe,Z,se,_e;(function(){var u;if(L={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(u in L)L.hasOwnProperty(u)&&(L[u]=[u.charCodeAt(0),u.charCodeAt(1),u.charCodeAt(2),u.charCodeAt(3)]);V=new Uint8Array([105,115,111,109]),q=new Uint8Array([97,118,99,49]),M=new Uint8Array([0,0,0,1]),$=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),X=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),R={video:$,audio:X},J=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),ue=new Uint8Array([0,0,0,0,0,0,0,0]),oe=new Uint8Array([0,0,0,0,0,0,0,0]),Z=oe,se=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),_e=oe,ee=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),l=function(u){var h=[],p=0,f,v,_;for(f=1;f<arguments.length;f++)h.push(arguments[f]);for(f=h.length;f--;)p+=h[f].byteLength;for(v=new Uint8Array(p+8),_=new DataView(v.buffer,v.byteOffset,v.byteLength),_.setUint32(0,v.byteLength),v.set(u,4),f=0,p=8;f<h.length;f++)v.set(h[f],p),p+=h[f].byteLength;return v},c=function(){return l(L.dinf,l(L.dref,J))},d=function(u){return l(L.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,u.audioobjecttype<<3|u.samplingfrequencyindex>>>1,u.samplingfrequencyindex<<7|u.channelcount<<3,6,1,2]))},m=function(){return l(L.ftyp,V,M,V,q)},U=function(u){return l(L.hdlr,R[u])},g=function(u){return l(L.mdat,u)},H=function(u){var h=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,u.duration>>>24&255,u.duration>>>16&255,u.duration>>>8&255,u.duration&255,85,196,0,0]);return u.samplerate&&(h[12]=u.samplerate>>>24&255,h[13]=u.samplerate>>>16&255,h[14]=u.samplerate>>>8&255,h[15]=u.samplerate&255),l(L.mdhd,h)},z=function(u){return l(L.mdia,H(u),U(u.type),T(u))},S=function(u){return l(L.mfhd,new Uint8Array([0,0,0,0,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255]))},T=function(u){return l(L.minf,u.type==="video"?l(L.vmhd,ee):l(L.smhd,ue),c(),G(u))},b=function(u,h){for(var p=[],f=h.length;f--;)p[f]=k(h[f]);return l.apply(null,[L.moof,S(u)].concat(p))},y=function(u){for(var h=u.length,p=[];h--;)p[h]=I(u[h]);return l.apply(null,[L.moov,N(4294967295)].concat(p).concat(x(u)))},x=function(u){for(var h=u.length,p=[];h--;)p[h]=O(u[h]);return l.apply(null,[L.mvex].concat(p))},N=function(u){var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return l(L.mvhd,h)},B=function(u){var h=u.samples||[],p=new Uint8Array(4+h.length),f,v;for(v=0;v<h.length;v++)f=h[v].flags,p[v+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return l(L.sdtp,p)},G=function(u){return l(L.stbl,C(u),l(L.stts,_e),l(L.stsc,Z),l(L.stsz,se),l(L.stco,oe))},(function(){var u,h;C=function(p){return l(L.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),p.type==="video"?u(p):h(p))},u=function(p){var f=p.sps||[],v=p.pps||[],_=[],P=[],F,W;for(F=0;F<f.length;F++)_.push((f[F].byteLength&65280)>>>8),_.push(f[F].byteLength&255),_=_.concat(Array.prototype.slice.call(f[F]));for(F=0;F<v.length;F++)P.push((v[F].byteLength&65280)>>>8),P.push(v[F].byteLength&255),P=P.concat(Array.prototype.slice.call(v[F]));if(W=[L.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(p.width&65280)>>8,p.width&255,(p.height&65280)>>8,p.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l(L.avcC,new Uint8Array([1,p.profileIdc,p.profileCompatibility,p.levelIdc,255].concat([f.length],_,[v.length],P))),l(L.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],p.sarRatio){var K=p.sarRatio[0],ie=p.sarRatio[1];W.push(l(L.pasp,new Uint8Array([(K&4278190080)>>24,(K&16711680)>>16,(K&65280)>>8,K&255,(ie&4278190080)>>24,(ie&16711680)>>16,(ie&65280)>>8,ie&255])))}return l.apply(null,W)},h=function(p){return l(L.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(p.channelcount&65280)>>8,p.channelcount&255,(p.samplesize&65280)>>8,p.samplesize&255,0,0,0,0,(p.samplerate&65280)>>8,p.samplerate&255,0,0]),d(p))}})(),D=function(u){var h=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,0,(u.duration&4278190080)>>24,(u.duration&16711680)>>16,(u.duration&65280)>>8,u.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(u.width&65280)>>8,u.width&255,0,0,(u.height&65280)>>8,u.height&255,0,0]);return l(L.tkhd,h)},k=function(u){var h,p,f,v,_,P,F;return h=l(L.tfhd,new Uint8Array([0,0,0,58,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),P=Math.floor(u.baseMediaDecodeTime/o),F=Math.floor(u.baseMediaDecodeTime%o),p=l(L.tfdt,new Uint8Array([1,0,0,0,P>>>24&255,P>>>16&255,P>>>8&255,P&255,F>>>24&255,F>>>16&255,F>>>8&255,F&255])),_=92,u.type==="audio"?(f=j(u,_),l(L.traf,h,p,f)):(v=B(u),f=j(u,v.length+_),l(L.traf,h,p,f,v))},I=function(u){return u.duration=u.duration||4294967295,l(L.trak,D(u),z(u))},O=function(u){var h=new Uint8Array([0,0,0,0,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return u.type!=="video"&&(h[h.length-1]=0),l(L.trex,h)},(function(){var u,h,p;p=function(f,v){var _=0,P=0,F=0,W=0;return f.length&&(f[0].duration!==void 0&&(_=1),f[0].size!==void 0&&(P=2),f[0].flags!==void 0&&(F=4),f[0].compositionTimeOffset!==void 0&&(W=8)),[0,0,_|P|F|W,1,(f.length&4278190080)>>>24,(f.length&16711680)>>>16,(f.length&65280)>>>8,f.length&255,(v&4278190080)>>>24,(v&16711680)>>>16,(v&65280)>>>8,v&255]},h=function(f,v){var _,P,F,W,K,ie;for(W=f.samples||[],v+=20+16*W.length,F=p(W,v),P=new Uint8Array(F.length+W.length*16),P.set(F),_=F.length,ie=0;ie<W.length;ie++)K=W[ie],P[_++]=(K.duration&4278190080)>>>24,P[_++]=(K.duration&16711680)>>>16,P[_++]=(K.duration&65280)>>>8,P[_++]=K.duration&255,P[_++]=(K.size&4278190080)>>>24,P[_++]=(K.size&16711680)>>>16,P[_++]=(K.size&65280)>>>8,P[_++]=K.size&255,P[_++]=K.flags.isLeading<<2|K.flags.dependsOn,P[_++]=K.flags.isDependedOn<<6|K.flags.hasRedundancy<<4|K.flags.paddingValue<<1|K.flags.isNonSyncSample,P[_++]=K.flags.degradationPriority&61440,P[_++]=K.flags.degradationPriority&15,P[_++]=(K.compositionTimeOffset&4278190080)>>>24,P[_++]=(K.compositionTimeOffset&16711680)>>>16,P[_++]=(K.compositionTimeOffset&65280)>>>8,P[_++]=K.compositionTimeOffset&255;return l(L.trun,P)},u=function(f,v){var _,P,F,W,K,ie;for(W=f.samples||[],v+=20+8*W.length,F=p(W,v),_=new Uint8Array(F.length+W.length*8),_.set(F),P=F.length,ie=0;ie<W.length;ie++)K=W[ie],_[P++]=(K.duration&4278190080)>>>24,_[P++]=(K.duration&16711680)>>>16,_[P++]=(K.duration&65280)>>>8,_[P++]=K.duration&255,_[P++]=(K.size&4278190080)>>>24,_[P++]=(K.size&16711680)>>>16,_[P++]=(K.size&65280)>>>8,_[P++]=K.size&255;return l(L.trun,_)},j=function(f,v){return f.type==="audio"?u(f,v):h(f,v)}})();var ke={ftyp:m,mdat:g,moof:b,moov:y,initSegment:function(u){var h=m(),p=y(u),f;return f=new Uint8Array(h.byteLength+p.byteLength),f.set(h),f.set(p,h.byteLength),f}},De=function(u){var h,p,f=[],v=[];for(v.byteLength=0,v.nalCount=0,v.duration=0,f.byteLength=0,h=0;h<u.length;h++)p=u[h],p.nalUnitType==="access_unit_delimiter_rbsp"?(f.length&&(f.duration=p.dts-f.dts,v.byteLength+=f.byteLength,v.nalCount+=f.length,v.duration+=f.duration,v.push(f)),f=[p],f.byteLength=p.data.byteLength,f.pts=p.pts,f.dts=p.dts):(p.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(f.keyFrame=!0),f.duration=p.dts-f.dts,f.byteLength+=p.data.byteLength,f.push(p));return v.length&&(!f.duration||f.duration<=0)&&(f.duration=v[v.length-1].duration),v.byteLength+=f.byteLength,v.nalCount+=f.length,v.duration+=f.duration,v.push(f),v},Ne=function(u){var h,p,f=[],v=[];for(f.byteLength=0,f.nalCount=0,f.duration=0,f.pts=u[0].pts,f.dts=u[0].dts,v.byteLength=0,v.nalCount=0,v.duration=0,v.pts=u[0].pts,v.dts=u[0].dts,h=0;h<u.length;h++)p=u[h],p.keyFrame?(f.length&&(v.push(f),v.byteLength+=f.byteLength,v.nalCount+=f.nalCount,v.duration+=f.duration),f=[p],f.nalCount=p.length,f.byteLength=p.byteLength,f.pts=p.pts,f.dts=p.dts,f.duration=p.duration):(f.duration+=p.duration,f.nalCount+=p.length,f.byteLength+=p.byteLength,f.push(p));return v.length&&f.duration<=0&&(f.duration=v[v.length-1].duration),v.byteLength+=f.byteLength,v.nalCount+=f.nalCount,v.duration+=f.duration,v.push(f),v},Re=function(u){var h;return!u[0][0].keyFrame&&u.length>1&&(h=u.shift(),u.byteLength-=h.byteLength,u.nalCount-=h.nalCount,u[0][0].dts=h.dts,u[0][0].pts=h.pts,u[0][0].duration+=h.duration),u},et=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Ve=function(u,h){var p=et();return p.dataOffset=h,p.compositionTimeOffset=u.pts-u.dts,p.duration=u.duration,p.size=4*u.length,p.size+=u.byteLength,u.keyFrame&&(p.flags.dependsOn=2,p.flags.isNonSyncSample=0),p},Ke=function(u,h){var p,f,v,_,P,F=h||0,W=[];for(p=0;p<u.length;p++)for(_=u[p],f=0;f<_.length;f++)P=_[f],v=Ve(P,F),F+=v.size,W.push(v);return W},Ge=function(u){var h,p,f,v,_,P,F=0,W=u.byteLength,K=u.nalCount,ie=W+4*K,de=new Uint8Array(ie),xe=new DataView(de.buffer);for(h=0;h<u.length;h++)for(v=u[h],p=0;p<v.length;p++)for(_=v[p],f=0;f<_.length;f++)P=_[f],xe.setUint32(F,P.data.byteLength),F+=4,de.set(P.data,F),F+=P.data.byteLength;return de},Ue=function(u,h){var p,f=h||0,v=[];return p=Ve(u,f),v.push(p),v},Xe=function(u){var h,p,f=0,v=u.byteLength,_=u.length,P=v+4*_,F=new Uint8Array(P),W=new DataView(F.buffer);for(h=0;h<u.length;h++)p=u[h],W.setUint32(f,p.data.byteLength),f+=4,F.set(p.data,f),f+=p.data.byteLength;return F},kt={groupNalsIntoFrames:De,groupFramesIntoGops:Ne,extendFirstKeyFrame:Re,generateSampleTable:Ke,concatenateNalData:Ge,generateSampleTableForFrame:Ue,concatenateNalDataForFrame:Xe},it=[33,16,5,32,164,27],Ae=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],be=function(u){for(var h=[];u--;)h.push(0);return h},me=function(u){return Object.keys(u).reduce(function(h,p){return h[p]=new Uint8Array(u[p].reduce(function(f,v){return f.concat(v)},[])),h},{})},Pe,Ye=function(){if(!Pe){var u={96e3:[it,[227,64],be(154),[56]],88200:[it,[231],be(170),[56]],64e3:[it,[248,192],be(240),[56]],48e3:[it,[255,192],be(268),[55,148,128],be(54),[112]],44100:[it,[255,192],be(268),[55,163,128],be(84),[112]],32e3:[it,[255,192],be(268),[55,234],be(226),[112]],24e3:[it,[255,192],be(268),[55,255,128],be(268),[111,112],be(126),[224]],16e3:[it,[255,192],be(268),[55,255,128],be(268),[111,255],be(269),[223,108],be(195),[1,192]],12e3:[Ae,be(268),[3,127,248],be(268),[6,255,240],be(268),[13,255,224],be(268),[27,253,128],be(259),[56]],11025:[Ae,be(268),[3,127,248],be(268),[6,255,240],be(268),[13,255,224],be(268),[27,255,192],be(268),[55,175,128],be(108),[112]],8e3:[Ae,be(268),[3,121,16],be(47),[7]]};Pe=me(u)}return Pe},vt=9e4,ne,re,le,Ee,pe,Ze,Je;ne=function(u){return u*vt},re=function(u,h){return u*h},le=function(u){return u/vt},Ee=function(u,h){return u/h},pe=function(u,h){return ne(Ee(u,h))},Ze=function(u,h){return re(le(u),h)},Je=function(u,h,p){return le(p?u:u-h)};var Fe={ONE_SECOND_IN_TS:vt,secondsToVideoTs:ne,secondsToAudioTs:re,videoTsToSeconds:le,audioTsToSeconds:Ee,audioTsToVideoTs:pe,videoTsToAudioTs:Ze,metadataTsToSeconds:Je},Nt=Ye,xt=Fe,ui=function(u){var h,p,f=0;for(h=0;h<u.length;h++)p=u[h],f+=p.data.byteLength;return f},Ot=function(u,h,p,f){var v,_=0,P=0,F=0,W=0,K,ie,de;if(h.length&&(v=xt.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),_=Math.ceil(xt.ONE_SECOND_IN_TS/(u.samplerate/1024)),p&&f&&(P=v-Math.max(p,f),F=Math.floor(P/_),W=F*_),!(F<1||W>xt.ONE_SECOND_IN_TS/2))){for(K=Nt()[u.samplerate],K||(K=h[0].data),ie=0;ie<F;ie++)de=h[0],h.splice(0,0,{data:K,dts:de.dts-_,pts:de.pts-_});return u.baseMediaDecodeTime-=Math.floor(xt.videoTsToAudioTs(W,u.samplerate)),W}},St=function(u,h,p){return h.minSegmentDts>=p?u:(h.minSegmentDts=1/0,u.filter(function(f){return f.dts>=p?(h.minSegmentDts=Math.min(h.minSegmentDts,f.dts),h.minSegmentPts=h.minSegmentDts,!0):!1}))},ii=function(u){var h,p,f=[];for(h=0;h<u.length;h++)p=u[h],f.push({size:p.data.byteLength,duration:1024});return f},$t=function(u){var h,p,f=0,v=new Uint8Array(ui(u));for(h=0;h<u.length;h++)p=u[h],v.set(p.data,f),f+=p.data.byteLength;return v},Gi={prefixWithSilence:Ot,trimAdtsFramesByEarliestDts:St,generateSampleTable:ii,concatenateFrameData:$t},Ut=Fe.ONE_SECOND_IN_TS,Wi=function(u,h){typeof h.pts=="number"&&(u.timelineStartInfo.pts===void 0&&(u.timelineStartInfo.pts=h.pts),u.minSegmentPts===void 0?u.minSegmentPts=h.pts:u.minSegmentPts=Math.min(u.minSegmentPts,h.pts),u.maxSegmentPts===void 0?u.maxSegmentPts=h.pts:u.maxSegmentPts=Math.max(u.maxSegmentPts,h.pts)),typeof h.dts=="number"&&(u.timelineStartInfo.dts===void 0&&(u.timelineStartInfo.dts=h.dts),u.minSegmentDts===void 0?u.minSegmentDts=h.dts:u.minSegmentDts=Math.min(u.minSegmentDts,h.dts),u.maxSegmentDts===void 0?u.maxSegmentDts=h.dts:u.maxSegmentDts=Math.max(u.maxSegmentDts,h.dts))},E=function(u){delete u.minSegmentDts,delete u.maxSegmentDts,delete u.minSegmentPts,delete u.maxSegmentPts},w=function(u,h){var p,f,v=u.minSegmentDts;return h||(v-=u.timelineStartInfo.dts),p=u.timelineStartInfo.baseMediaDecodeTime,p+=v,p=Math.max(0,p),u.type==="audio"&&(f=u.samplerate/Ut,p*=f,p=Math.floor(p)),p},Q={clearDtsInfo:E,calculateTrackBaseMediaDecodeTime:w,collectDtsInfo:Wi},ce=4,ge=128,Ie=function(u){for(var h=0,p={payloadType:-1,payloadSize:0},f=0,v=0;h<u.byteLength&&u[h]!==ge;){for(;u[h]===255;)f+=255,h++;for(f+=u[h++];u[h]===255;)v+=255,h++;if(v+=u[h++],!p.payload&&f===ce){var _=String.fromCharCode(u[h+3],u[h+4],u[h+5],u[h+6]);if(_==="GA94"){p.payloadType=f,p.payloadSize=v,p.payload=u.subarray(h,h+v);break}else p.payload=void 0}h+=v,f=0,v=0}return p},nt=function(u){return u.payload[0]!==181||(u.payload[1]<<8|u.payload[2])!==49||String.fromCharCode(u.payload[3],u.payload[4],u.payload[5],u.payload[6])!=="GA94"||u.payload[7]!==3?null:u.payload.subarray(8,u.payload.length-1)},wt=function(u,h){var p=[],f,v,_,P;if(!(h[0]&64))return p;for(v=h[0]&31,f=0;f<v;f++)_=f*3,P={type:h[_+2]&3,pts:u},h[_+2]&4&&(P.ccData=h[_+3]<<8|h[_+4],p.push(P));return p},Wt=function(u){for(var h=u.byteLength,p=[],f=1,v,_;f<h-2;)u[f]===0&&u[f+1]===0&&u[f+2]===3?(p.push(f+2),f+=2):f++;if(p.length===0)return u;v=h-p.length,_=new Uint8Array(v);var P=0;for(f=0;f<v;P++,f++)P===p[0]&&(P++,p.shift()),_[f]=u[P];return _},zt={parseSei:Ie,parseUserData:nt,parseCaptionPackets:wt,discardEmulationPreventionBytes:Wt,USER_DATA_REGISTERED_ITU_T_T35:ce},Rt=i,ni=zt,Qe=function(u){u=u||{},Qe.prototype.init.call(this),this.parse708captions_=typeof u.parse708captions=="boolean"?u.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new Ce(0,0),new Ce(0,1),new Ce(1,0),new Ce(1,1)],this.parse708captions_&&(this.cc708Stream_=new qe({captionServices:u.captionServices})),this.reset(),this.ccStreams_.forEach(function(h){h.on("data",this.trigger.bind(this,"data")),h.on("partialdone",this.trigger.bind(this,"partialdone")),h.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Qe.prototype=new Rt,Qe.prototype.push=function(u){var h,p,f;if(u.nalUnitType==="sei_rbsp"&&(h=ni.parseSei(u.escapedRBSP),!!h.payload&&h.payloadType===ni.USER_DATA_REGISTERED_ITU_T_T35&&(p=ni.parseUserData(h),!!p))){if(u.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(u.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}f=ni.parseCaptionPackets(u.pts,p),this.captionPackets_=this.captionPackets_.concat(f),this.latestDts_!==u.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=u.dts}},Qe.prototype.flushCCStreams=function(u){this.ccStreams_.forEach(function(h){return u==="flush"?h.flush():h.partialFlush()},this)},Qe.prototype.flushStream=function(u){if(!this.captionPackets_.length){this.flushCCStreams(u);return}this.captionPackets_.forEach(function(h,p){h.presortIndex=p}),this.captionPackets_.sort(function(h,p){return h.pts===p.pts?h.presortIndex-p.presortIndex:h.pts-p.pts}),this.captionPackets_.forEach(function(h){h.type<2?this.dispatchCea608Packet(h):this.dispatchCea708Packet(h)},this),this.captionPackets_.length=0,this.flushCCStreams(u)},Qe.prototype.flush=function(){return this.flushStream("flush")},Qe.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Qe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(u){u.reset()})},Qe.prototype.dispatchCea608Packet=function(u){this.setsTextOrXDSActive(u)?this.activeCea608Channel_[u.type]=null:this.setsChannel1Active(u)?this.activeCea608Channel_[u.type]=0:this.setsChannel2Active(u)&&(this.activeCea608Channel_[u.type]=1),this.activeCea608Channel_[u.type]!==null&&this.ccStreams_[(u.type<<1)+this.activeCea608Channel_[u.type]].push(u)},Qe.prototype.setsChannel1Active=function(u){return(u.ccData&30720)===4096},Qe.prototype.setsChannel2Active=function(u){return(u.ccData&30720)===6144},Qe.prototype.setsTextOrXDSActive=function(u){return(u.ccData&28928)===256||(u.ccData&30974)===4138||(u.ccData&30974)===6186},Qe.prototype.dispatchCea708Packet=function(u){this.parse708captions_&&this.cc708Stream_.push(u)};var ri={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Yt=function(u){var h=ri[u]||u;return u&4096&&u===h?"":String.fromCharCode(h)},Xt=function(u){return 32<=u&&u<=127||160<=u&&u<=255},Dt=function(u){this.windowNum=u,this.reset()};Dt.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Dt.prototype.getText=function(){return this.rows.join(`
206
- `)},Dt.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Dt.prototype.newLine=function(u){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(u),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Dt.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Dt.prototype.addText=function(u){this.rows[this.rowIdx]+=u},Dt.prototype.backspace=function(){if(!this.isEmpty()){var u=this.rows[this.rowIdx];this.rows[this.rowIdx]=u.substr(0,u.length-1)}};var ut=function(u,h,p){this.serviceNum=u,this.text="",this.currentWindow=new Dt(-1),this.windows=[],this.stream=p,typeof h=="string"&&this.createTextDecoder(h)};ut.prototype.init=function(u,h){this.startPts=u;for(var p=0;p<8;p++)this.windows[p]=new Dt(p),typeof h=="function"&&(this.windows[p].beforeRowOverflow=h)},ut.prototype.setCurrentWindow=function(u){this.currentWindow=this.windows[u]},ut.prototype.createTextDecoder=function(u){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(u)}catch(h){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+u+" encoding. "+h})}};var qe=function(u){u=u||{},qe.prototype.init.call(this);var h=this,p=u.captionServices||{},f={},v;Object.keys(p).forEach(_=>{v=p[_],/^SERVICE/.test(_)&&(f[_]=v.encoding)}),this.serviceEncodings=f,this.current708Packet=null,this.services={},this.push=function(_){_.type===3?(h.new708Packet(),h.add708Bytes(_)):(h.current708Packet===null&&h.new708Packet(),h.add708Bytes(_))}};qe.prototype=new Rt,qe.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},qe.prototype.add708Bytes=function(u){var h=u.ccData,p=h>>>8,f=h&255;this.current708Packet.ptsVals.push(u.pts),this.current708Packet.data.push(p),this.current708Packet.data.push(f)},qe.prototype.push708Packet=function(){var u=this.current708Packet,h=u.data,p=null,f=null,v=0,_=h[v++];for(u.seq=_>>6,u.sizeCode=_&63;v<h.length;v++)_=h[v++],p=_>>5,f=_&31,p===7&&f>0&&(_=h[v++],p=_),this.pushServiceBlock(p,v,f),f>0&&(v+=f-1)},qe.prototype.pushServiceBlock=function(u,h,p){var f,v=h,_=this.current708Packet.data,P=this.services[u];for(P||(P=this.initService(u,v));v<h+p&&v<_.length;v++)f=_[v],Xt(f)?v=this.handleText(v,P):f===24?v=this.multiByteCharacter(v,P):f===16?v=this.extendedCommands(v,P):128<=f&&f<=135?v=this.setCurrentWindow(v,P):152<=f&&f<=159?v=this.defineWindow(v,P):f===136?v=this.clearWindows(v,P):f===140?v=this.deleteWindows(v,P):f===137?v=this.displayWindows(v,P):f===138?v=this.hideWindows(v,P):f===139?v=this.toggleWindows(v,P):f===151?v=this.setWindowAttributes(v,P):f===144?v=this.setPenAttributes(v,P):f===145?v=this.setPenColor(v,P):f===146?v=this.setPenLocation(v,P):f===143?P=this.reset(v,P):f===8?P.currentWindow.backspace():f===12?P.currentWindow.clearText():f===13?P.currentWindow.pendingNewLine=!0:f===14?P.currentWindow.clearText():f===141&&v++},qe.prototype.extendedCommands=function(u,h){var p=this.current708Packet.data,f=p[++u];return Xt(f)&&(u=this.handleText(u,h,{isExtended:!0})),u},qe.prototype.getPts=function(u){return this.current708Packet.ptsVals[Math.floor(u/2)]},qe.prototype.initService=function(u,h){var f="SERVICE"+u,p=this,f,v;return f in this.serviceEncodings&&(v=this.serviceEncodings[f]),this.services[u]=new ut(u,v,p),this.services[u].init(this.getPts(h),function(_){p.flushDisplayed(_,p.services[u])}),this.services[u]},qe.prototype.handleText=function(u,h,p){var f=p&&p.isExtended,v=p&&p.isMultiByte,_=this.current708Packet.data,P=f?4096:0,F=_[u],W=_[u+1],K=h.currentWindow,ie,de;function xe(fe){return fe.map(Oe=>("0"+(Oe&255).toString(16)).slice(-2)).join("")}if(v?(de=[F,W],u++):de=[F],h.textDecoder_&&!f)ie=h.textDecoder_.decode(new Uint8Array(de));else if(v){const fe=xe(de);ie=String.fromCharCode(parseInt(fe,16))}else ie=Yt(P|F);return K.pendingNewLine&&!K.isEmpty()&&K.newLine(this.getPts(u)),K.pendingNewLine=!1,K.addText(ie),u},qe.prototype.multiByteCharacter=function(u,h){var p=this.current708Packet.data,f=p[u+1],v=p[u+2];return Xt(f)&&Xt(v)&&(u=this.handleText(++u,h,{isMultiByte:!0})),u},qe.prototype.setCurrentWindow=function(u,h){var p=this.current708Packet.data,f=p[u],v=f&7;return h.setCurrentWindow(v),u},qe.prototype.defineWindow=function(u,h){var p=this.current708Packet.data,f=p[u],v=f&7;h.setCurrentWindow(v);var _=h.currentWindow;return f=p[++u],_.visible=(f&32)>>5,_.rowLock=(f&16)>>4,_.columnLock=(f&8)>>3,_.priority=f&7,f=p[++u],_.relativePositioning=(f&128)>>7,_.anchorVertical=f&127,f=p[++u],_.anchorHorizontal=f,f=p[++u],_.anchorPoint=(f&240)>>4,_.rowCount=f&15,f=p[++u],_.columnCount=f&63,f=p[++u],_.windowStyle=(f&56)>>3,_.penStyle=f&7,_.virtualRowCount=_.rowCount+1,u},qe.prototype.setWindowAttributes=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.currentWindow.winAttr;return f=p[++u],v.fillOpacity=(f&192)>>6,v.fillRed=(f&48)>>4,v.fillGreen=(f&12)>>2,v.fillBlue=f&3,f=p[++u],v.borderType=(f&192)>>6,v.borderRed=(f&48)>>4,v.borderGreen=(f&12)>>2,v.borderBlue=f&3,f=p[++u],v.borderType+=(f&128)>>5,v.wordWrap=(f&64)>>6,v.printDirection=(f&48)>>4,v.scrollDirection=(f&12)>>2,v.justify=f&3,f=p[++u],v.effectSpeed=(f&240)>>4,v.effectDirection=(f&12)>>2,v.displayEffect=f&3,u},qe.prototype.flushDisplayed=function(u,h){for(var p=[],f=0;f<8;f++)h.windows[f].visible&&!h.windows[f].isEmpty()&&p.push(h.windows[f].getText());h.endPts=u,h.text=p.join(`
205
+ `+r},Ff=function(r){return r.toString().replace(/^function.+?{/,"").slice(0,-1)},t8=Vf(Ff(function(){var r=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},e=function(){this.init=function(){var u={};this.on=function(h,p){u[h]||(u[h]=[]),u[h]=u[h].concat(p)},this.off=function(h,p){var f;return u[h]?(f=u[h].indexOf(p),u[h]=u[h].slice(),u[h].splice(f,1),f>-1):!1},this.trigger=function(h){var p,f,v,_;if(p=u[h],!!p)if(arguments.length===2)for(v=p.length,f=0;f<v;++f)p[f].call(this,arguments[1]);else{for(_=[],f=arguments.length,f=1;f<arguments.length;++f)_.push(arguments[f]);for(v=p.length,f=0;f<v;++f)p[f].apply(this,_)}},this.dispose=function(){u={}}}};e.prototype.pipe=function(u){return this.on("data",function(h){u.push(h)}),this.on("done",function(h){u.flush(h)}),this.on("partialdone",function(h){u.partialFlush(h)}),this.on("endedtimeline",function(h){u.endTimeline(h)}),this.on("reset",function(h){u.reset(h)}),u},e.prototype.push=function(u){this.trigger("data",u)},e.prototype.flush=function(u){this.trigger("done",u)},e.prototype.partialFlush=function(u){this.trigger("partialdone",u)},e.prototype.endTimeline=function(u){this.trigger("endedtimeline",u)},e.prototype.reset=function(u){this.trigger("reset",u)};var i=e,n=Math.pow(2,32),s=function(u){var h=new DataView(u.buffer,u.byteOffset,u.byteLength),p;return h.getBigUint64?(p=h.getBigUint64(0),p<Number.MAX_SAFE_INTEGER?Number(p):p):h.getUint32(0)*n+h.getUint32(4)},a={getUint64:s,MAX_UINT32:n},o=a.MAX_UINT32,l,c,d,m,g,S,T,b,y,x,N,I,D,z,H,U,B,G,C,k,O,j,L,V,M,q,$,X,R,ee,ue,J,oe,Z,se,_e;(function(){var u;if(L={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},!(typeof Uint8Array>"u")){for(u in L)L.hasOwnProperty(u)&&(L[u]=[u.charCodeAt(0),u.charCodeAt(1),u.charCodeAt(2),u.charCodeAt(3)]);V=new Uint8Array([105,115,111,109]),q=new Uint8Array([97,118,99,49]),M=new Uint8Array([0,0,0,1]),$=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),X=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),R={video:$,audio:X},J=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),ue=new Uint8Array([0,0,0,0,0,0,0,0]),oe=new Uint8Array([0,0,0,0,0,0,0,0]),Z=oe,se=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),_e=oe,ee=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})(),l=function(u){var h=[],p=0,f,v,_;for(f=1;f<arguments.length;f++)h.push(arguments[f]);for(f=h.length;f--;)p+=h[f].byteLength;for(v=new Uint8Array(p+8),_=new DataView(v.buffer,v.byteOffset,v.byteLength),_.setUint32(0,v.byteLength),v.set(u,4),f=0,p=8;f<h.length;f++)v.set(h[f],p),p+=h[f].byteLength;return v},c=function(){return l(L.dinf,l(L.dref,J))},d=function(u){return l(L.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,u.audioobjecttype<<3|u.samplingfrequencyindex>>>1,u.samplingfrequencyindex<<7|u.channelcount<<3,6,1,2]))},m=function(){return l(L.ftyp,V,M,V,q)},U=function(u){return l(L.hdlr,R[u])},g=function(u){return l(L.mdat,u)},H=function(u){var h=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,u.duration>>>24&255,u.duration>>>16&255,u.duration>>>8&255,u.duration&255,85,196,0,0]);return u.samplerate&&(h[12]=u.samplerate>>>24&255,h[13]=u.samplerate>>>16&255,h[14]=u.samplerate>>>8&255,h[15]=u.samplerate&255),l(L.mdhd,h)},z=function(u){return l(L.mdia,H(u),U(u.type),T(u))},S=function(u){return l(L.mfhd,new Uint8Array([0,0,0,0,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255]))},T=function(u){return l(L.minf,u.type==="video"?l(L.vmhd,ee):l(L.smhd,ue),c(),G(u))},b=function(u,h){for(var p=[],f=h.length;f--;)p[f]=k(h[f]);return l.apply(null,[L.moof,S(u)].concat(p))},y=function(u){for(var h=u.length,p=[];h--;)p[h]=I(u[h]);return l.apply(null,[L.moov,N(4294967295)].concat(p).concat(x(u)))},x=function(u){for(var h=u.length,p=[];h--;)p[h]=O(u[h]);return l.apply(null,[L.mvex].concat(p))},N=function(u){var h=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(u&4278190080)>>24,(u&16711680)>>16,(u&65280)>>8,u&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return l(L.mvhd,h)},B=function(u){var h=u.samples||[],p=new Uint8Array(4+h.length),f,v;for(v=0;v<h.length;v++)f=h[v].flags,p[v+4]=f.dependsOn<<4|f.isDependedOn<<2|f.hasRedundancy;return l(L.sdtp,p)},G=function(u){return l(L.stbl,C(u),l(L.stts,_e),l(L.stsc,Z),l(L.stsz,se),l(L.stco,oe))},(function(){var u,h;C=function(p){return l(L.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),p.type==="video"?u(p):h(p))},u=function(p){var f=p.sps||[],v=p.pps||[],_=[],P=[],F,W;for(F=0;F<f.length;F++)_.push((f[F].byteLength&65280)>>>8),_.push(f[F].byteLength&255),_=_.concat(Array.prototype.slice.call(f[F]));for(F=0;F<v.length;F++)P.push((v[F].byteLength&65280)>>>8),P.push(v[F].byteLength&255),P=P.concat(Array.prototype.slice.call(v[F]));if(W=[L.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(p.width&65280)>>8,p.width&255,(p.height&65280)>>8,p.height&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l(L.avcC,new Uint8Array([1,p.profileIdc,p.profileCompatibility,p.levelIdc,255].concat([f.length],_,[v.length],P))),l(L.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],p.sarRatio){var K=p.sarRatio[0],ie=p.sarRatio[1];W.push(l(L.pasp,new Uint8Array([(K&4278190080)>>24,(K&16711680)>>16,(K&65280)>>8,K&255,(ie&4278190080)>>24,(ie&16711680)>>16,(ie&65280)>>8,ie&255])))}return l.apply(null,W)},h=function(p){return l(L.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(p.channelcount&65280)>>8,p.channelcount&255,(p.samplesize&65280)>>8,p.samplesize&255,0,0,0,0,(p.samplerate&65280)>>8,p.samplerate&255,0,0]),d(p))}})(),D=function(u){var h=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,0,(u.duration&4278190080)>>24,(u.duration&16711680)>>16,(u.duration&65280)>>8,u.duration&255,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(u.width&65280)>>8,u.width&255,0,0,(u.height&65280)>>8,u.height&255,0,0]);return l(L.tkhd,h)},k=function(u){var h,p,f,v,_,P,F;return h=l(L.tfhd,new Uint8Array([0,0,0,58,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),P=Math.floor(u.baseMediaDecodeTime/o),F=Math.floor(u.baseMediaDecodeTime%o),p=l(L.tfdt,new Uint8Array([1,0,0,0,P>>>24&255,P>>>16&255,P>>>8&255,P&255,F>>>24&255,F>>>16&255,F>>>8&255,F&255])),_=92,u.type==="audio"?(f=j(u,_),l(L.traf,h,p,f)):(v=B(u),f=j(u,v.length+_),l(L.traf,h,p,f,v))},I=function(u){return u.duration=u.duration||4294967295,l(L.trak,D(u),z(u))},O=function(u){var h=new Uint8Array([0,0,0,0,(u.id&4278190080)>>24,(u.id&16711680)>>16,(u.id&65280)>>8,u.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return u.type!=="video"&&(h[h.length-1]=0),l(L.trex,h)},(function(){var u,h,p;p=function(f,v){var _=0,P=0,F=0,W=0;return f.length&&(f[0].duration!==void 0&&(_=1),f[0].size!==void 0&&(P=2),f[0].flags!==void 0&&(F=4),f[0].compositionTimeOffset!==void 0&&(W=8)),[0,0,_|P|F|W,1,(f.length&4278190080)>>>24,(f.length&16711680)>>>16,(f.length&65280)>>>8,f.length&255,(v&4278190080)>>>24,(v&16711680)>>>16,(v&65280)>>>8,v&255]},h=function(f,v){var _,P,F,W,K,ie;for(W=f.samples||[],v+=20+16*W.length,F=p(W,v),P=new Uint8Array(F.length+W.length*16),P.set(F),_=F.length,ie=0;ie<W.length;ie++)K=W[ie],P[_++]=(K.duration&4278190080)>>>24,P[_++]=(K.duration&16711680)>>>16,P[_++]=(K.duration&65280)>>>8,P[_++]=K.duration&255,P[_++]=(K.size&4278190080)>>>24,P[_++]=(K.size&16711680)>>>16,P[_++]=(K.size&65280)>>>8,P[_++]=K.size&255,P[_++]=K.flags.isLeading<<2|K.flags.dependsOn,P[_++]=K.flags.isDependedOn<<6|K.flags.hasRedundancy<<4|K.flags.paddingValue<<1|K.flags.isNonSyncSample,P[_++]=K.flags.degradationPriority&61440,P[_++]=K.flags.degradationPriority&15,P[_++]=(K.compositionTimeOffset&4278190080)>>>24,P[_++]=(K.compositionTimeOffset&16711680)>>>16,P[_++]=(K.compositionTimeOffset&65280)>>>8,P[_++]=K.compositionTimeOffset&255;return l(L.trun,P)},u=function(f,v){var _,P,F,W,K,ie;for(W=f.samples||[],v+=20+8*W.length,F=p(W,v),_=new Uint8Array(F.length+W.length*8),_.set(F),P=F.length,ie=0;ie<W.length;ie++)K=W[ie],_[P++]=(K.duration&4278190080)>>>24,_[P++]=(K.duration&16711680)>>>16,_[P++]=(K.duration&65280)>>>8,_[P++]=K.duration&255,_[P++]=(K.size&4278190080)>>>24,_[P++]=(K.size&16711680)>>>16,_[P++]=(K.size&65280)>>>8,_[P++]=K.size&255;return l(L.trun,_)},j=function(f,v){return f.type==="audio"?u(f,v):h(f,v)}})();var ke={ftyp:m,mdat:g,moof:b,moov:y,initSegment:function(u){var h=m(),p=y(u),f;return f=new Uint8Array(h.byteLength+p.byteLength),f.set(h),f.set(p,h.byteLength),f}},De=function(u){var h,p,f=[],v=[];for(v.byteLength=0,v.nalCount=0,v.duration=0,f.byteLength=0,h=0;h<u.length;h++)p=u[h],p.nalUnitType==="access_unit_delimiter_rbsp"?(f.length&&(f.duration=p.dts-f.dts,v.byteLength+=f.byteLength,v.nalCount+=f.length,v.duration+=f.duration,v.push(f)),f=[p],f.byteLength=p.data.byteLength,f.pts=p.pts,f.dts=p.dts):(p.nalUnitType==="slice_layer_without_partitioning_rbsp_idr"&&(f.keyFrame=!0),f.duration=p.dts-f.dts,f.byteLength+=p.data.byteLength,f.push(p));return v.length&&(!f.duration||f.duration<=0)&&(f.duration=v[v.length-1].duration),v.byteLength+=f.byteLength,v.nalCount+=f.length,v.duration+=f.duration,v.push(f),v},Ne=function(u){var h,p,f=[],v=[];for(f.byteLength=0,f.nalCount=0,f.duration=0,f.pts=u[0].pts,f.dts=u[0].dts,v.byteLength=0,v.nalCount=0,v.duration=0,v.pts=u[0].pts,v.dts=u[0].dts,h=0;h<u.length;h++)p=u[h],p.keyFrame?(f.length&&(v.push(f),v.byteLength+=f.byteLength,v.nalCount+=f.nalCount,v.duration+=f.duration),f=[p],f.nalCount=p.length,f.byteLength=p.byteLength,f.pts=p.pts,f.dts=p.dts,f.duration=p.duration):(f.duration+=p.duration,f.nalCount+=p.length,f.byteLength+=p.byteLength,f.push(p));return v.length&&f.duration<=0&&(f.duration=v[v.length-1].duration),v.byteLength+=f.byteLength,v.nalCount+=f.nalCount,v.duration+=f.duration,v.push(f),v},Ve=function(u){var h;return!u[0][0].keyFrame&&u.length>1&&(h=u.shift(),u.byteLength-=h.byteLength,u.nalCount-=h.nalCount,u[0][0].dts=h.dts,u[0][0].pts=h.pts,u[0][0].duration+=h.duration),u},et=function(){return{size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}}},Re=function(u,h){var p=et();return p.dataOffset=h,p.compositionTimeOffset=u.pts-u.dts,p.duration=u.duration,p.size=4*u.length,p.size+=u.byteLength,u.keyFrame&&(p.flags.dependsOn=2,p.flags.isNonSyncSample=0),p},Ke=function(u,h){var p,f,v,_,P,F=h||0,W=[];for(p=0;p<u.length;p++)for(_=u[p],f=0;f<_.length;f++)P=_[f],v=Re(P,F),F+=v.size,W.push(v);return W},He=function(u){var h,p,f,v,_,P,F=0,W=u.byteLength,K=u.nalCount,ie=W+4*K,de=new Uint8Array(ie),xe=new DataView(de.buffer);for(h=0;h<u.length;h++)for(v=u[h],p=0;p<v.length;p++)for(_=v[p],f=0;f<_.length;f++)P=_[f],xe.setUint32(F,P.data.byteLength),F+=4,de.set(P.data,F),F+=P.data.byteLength;return de},Fe=function(u,h){var p,f=h||0,v=[];return p=Re(u,f),v.push(p),v},We=function(u){var h,p,f=0,v=u.byteLength,_=u.length,P=v+4*_,F=new Uint8Array(P),W=new DataView(F.buffer);for(h=0;h<u.length;h++)p=u[h],W.setUint32(f,p.data.byteLength),f+=4,F.set(p.data,f),f+=p.data.byteLength;return F},kt={groupNalsIntoFrames:De,groupFramesIntoGops:Ne,extendFirstKeyFrame:Ve,generateSampleTable:Ke,concatenateNalData:He,generateSampleTableForFrame:Fe,concatenateNalDataForFrame:We},it=[33,16,5,32,164,27],Ae=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],be=function(u){for(var h=[];u--;)h.push(0);return h},me=function(u){return Object.keys(u).reduce(function(h,p){return h[p]=new Uint8Array(u[p].reduce(function(f,v){return f.concat(v)},[])),h},{})},Pe,Xe=function(){if(!Pe){var u={96e3:[it,[227,64],be(154),[56]],88200:[it,[231],be(170),[56]],64e3:[it,[248,192],be(240),[56]],48e3:[it,[255,192],be(268),[55,148,128],be(54),[112]],44100:[it,[255,192],be(268),[55,163,128],be(84),[112]],32e3:[it,[255,192],be(268),[55,234],be(226),[112]],24e3:[it,[255,192],be(268),[55,255,128],be(268),[111,112],be(126),[224]],16e3:[it,[255,192],be(268),[55,255,128],be(268),[111,255],be(269),[223,108],be(195),[1,192]],12e3:[Ae,be(268),[3,127,248],be(268),[6,255,240],be(268),[13,255,224],be(268),[27,253,128],be(259),[56]],11025:[Ae,be(268),[3,127,248],be(268),[6,255,240],be(268),[13,255,224],be(268),[27,255,192],be(268),[55,175,128],be(108),[112]],8e3:[Ae,be(268),[3,121,16],be(47),[7]]};Pe=me(u)}return Pe},vt=9e4,ne,re,le,Ee,pe,Ze,Je;ne=function(u){return u*vt},re=function(u,h){return u*h},le=function(u){return u/vt},Ee=function(u,h){return u/h},pe=function(u,h){return ne(Ee(u,h))},Ze=function(u,h){return re(le(u),h)},Je=function(u,h,p){return le(p?u:u-h)};var $e={ONE_SECOND_IN_TS:vt,secondsToVideoTs:ne,secondsToAudioTs:re,videoTsToSeconds:le,audioTsToSeconds:Ee,audioTsToVideoTs:pe,videoTsToAudioTs:Ze,metadataTsToSeconds:Je},Nt=Xe,xt=$e,ui=function(u){var h,p,f=0;for(h=0;h<u.length;h++)p=u[h],f+=p.data.byteLength;return f},Ot=function(u,h,p,f){var v,_=0,P=0,F=0,W=0,K,ie,de;if(h.length&&(v=xt.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),_=Math.ceil(xt.ONE_SECOND_IN_TS/(u.samplerate/1024)),p&&f&&(P=v-Math.max(p,f),F=Math.floor(P/_),W=F*_),!(F<1||W>xt.ONE_SECOND_IN_TS/2))){for(K=Nt()[u.samplerate],K||(K=h[0].data),ie=0;ie<F;ie++)de=h[0],h.splice(0,0,{data:K,dts:de.dts-_,pts:de.pts-_});return u.baseMediaDecodeTime-=Math.floor(xt.videoTsToAudioTs(W,u.samplerate)),W}},St=function(u,h,p){return h.minSegmentDts>=p?u:(h.minSegmentDts=1/0,u.filter(function(f){return f.dts>=p?(h.minSegmentDts=Math.min(h.minSegmentDts,f.dts),h.minSegmentPts=h.minSegmentDts,!0):!1}))},ii=function(u){var h,p,f=[];for(h=0;h<u.length;h++)p=u[h],f.push({size:p.data.byteLength,duration:1024});return f},$t=function(u){var h,p,f=0,v=new Uint8Array(ui(u));for(h=0;h<u.length;h++)p=u[h],v.set(p.data,f),f+=p.data.byteLength;return v},Gi={prefixWithSilence:Ot,trimAdtsFramesByEarliestDts:St,generateSampleTable:ii,concatenateFrameData:$t},Ut=$e.ONE_SECOND_IN_TS,Wi=function(u,h){typeof h.pts=="number"&&(u.timelineStartInfo.pts===void 0&&(u.timelineStartInfo.pts=h.pts),u.minSegmentPts===void 0?u.minSegmentPts=h.pts:u.minSegmentPts=Math.min(u.minSegmentPts,h.pts),u.maxSegmentPts===void 0?u.maxSegmentPts=h.pts:u.maxSegmentPts=Math.max(u.maxSegmentPts,h.pts)),typeof h.dts=="number"&&(u.timelineStartInfo.dts===void 0&&(u.timelineStartInfo.dts=h.dts),u.minSegmentDts===void 0?u.minSegmentDts=h.dts:u.minSegmentDts=Math.min(u.minSegmentDts,h.dts),u.maxSegmentDts===void 0?u.maxSegmentDts=h.dts:u.maxSegmentDts=Math.max(u.maxSegmentDts,h.dts))},E=function(u){delete u.minSegmentDts,delete u.maxSegmentDts,delete u.minSegmentPts,delete u.maxSegmentPts},w=function(u,h){var p,f,v=u.minSegmentDts;return h||(v-=u.timelineStartInfo.dts),p=u.timelineStartInfo.baseMediaDecodeTime,p+=v,p=Math.max(0,p),u.type==="audio"&&(f=u.samplerate/Ut,p*=f,p=Math.floor(p)),p},Q={clearDtsInfo:E,calculateTrackBaseMediaDecodeTime:w,collectDtsInfo:Wi},ce=4,ge=128,Ie=function(u){for(var h=0,p={payloadType:-1,payloadSize:0},f=0,v=0;h<u.byteLength&&u[h]!==ge;){for(;u[h]===255;)f+=255,h++;for(f+=u[h++];u[h]===255;)v+=255,h++;if(v+=u[h++],!p.payload&&f===ce){var _=String.fromCharCode(u[h+3],u[h+4],u[h+5],u[h+6]);if(_==="GA94"){p.payloadType=f,p.payloadSize=v,p.payload=u.subarray(h,h+v);break}else p.payload=void 0}h+=v,f=0,v=0}return p},nt=function(u){return u.payload[0]!==181||(u.payload[1]<<8|u.payload[2])!==49||String.fromCharCode(u.payload[3],u.payload[4],u.payload[5],u.payload[6])!=="GA94"||u.payload[7]!==3?null:u.payload.subarray(8,u.payload.length-1)},wt=function(u,h){var p=[],f,v,_,P;if(!(h[0]&64))return p;for(v=h[0]&31,f=0;f<v;f++)_=f*3,P={type:h[_+2]&3,pts:u},h[_+2]&4&&(P.ccData=h[_+3]<<8|h[_+4],p.push(P));return p},Wt=function(u){for(var h=u.byteLength,p=[],f=1,v,_;f<h-2;)u[f]===0&&u[f+1]===0&&u[f+2]===3?(p.push(f+2),f+=2):f++;if(p.length===0)return u;v=h-p.length,_=new Uint8Array(v);var P=0;for(f=0;f<v;P++,f++)P===p[0]&&(P++,p.shift()),_[f]=u[P];return _},zt={parseSei:Ie,parseUserData:nt,parseCaptionPackets:wt,discardEmulationPreventionBytes:Wt,USER_DATA_REGISTERED_ITU_T_T35:ce},Rt=i,ni=zt,Qe=function(u){u=u||{},Qe.prototype.init.call(this),this.parse708captions_=typeof u.parse708captions=="boolean"?u.parse708captions:!0,this.captionPackets_=[],this.ccStreams_=[new Ce(0,0),new Ce(0,1),new Ce(1,0),new Ce(1,1)],this.parse708captions_&&(this.cc708Stream_=new je({captionServices:u.captionServices})),this.reset(),this.ccStreams_.forEach(function(h){h.on("data",this.trigger.bind(this,"data")),h.on("partialdone",this.trigger.bind(this,"partialdone")),h.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))};Qe.prototype=new Rt,Qe.prototype.push=function(u){var h,p,f;if(u.nalUnitType==="sei_rbsp"&&(h=ni.parseSei(u.escapedRBSP),!!h.payload&&h.payloadType===ni.USER_DATA_REGISTERED_ITU_T_T35&&(p=ni.parseUserData(h),!!p))){if(u.dts<this.latestDts_){this.ignoreNextEqualDts_=!0;return}else if(u.dts===this.latestDts_&&this.ignoreNextEqualDts_){this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1);return}f=ni.parseCaptionPackets(u.pts,p),this.captionPackets_=this.captionPackets_.concat(f),this.latestDts_!==u.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=u.dts}},Qe.prototype.flushCCStreams=function(u){this.ccStreams_.forEach(function(h){return u==="flush"?h.flush():h.partialFlush()},this)},Qe.prototype.flushStream=function(u){if(!this.captionPackets_.length){this.flushCCStreams(u);return}this.captionPackets_.forEach(function(h,p){h.presortIndex=p}),this.captionPackets_.sort(function(h,p){return h.pts===p.pts?h.presortIndex-p.presortIndex:h.pts-p.pts}),this.captionPackets_.forEach(function(h){h.type<2?this.dispatchCea608Packet(h):this.dispatchCea708Packet(h)},this),this.captionPackets_.length=0,this.flushCCStreams(u)},Qe.prototype.flush=function(){return this.flushStream("flush")},Qe.prototype.partialFlush=function(){return this.flushStream("partialFlush")},Qe.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(u){u.reset()})},Qe.prototype.dispatchCea608Packet=function(u){this.setsTextOrXDSActive(u)?this.activeCea608Channel_[u.type]=null:this.setsChannel1Active(u)?this.activeCea608Channel_[u.type]=0:this.setsChannel2Active(u)&&(this.activeCea608Channel_[u.type]=1),this.activeCea608Channel_[u.type]!==null&&this.ccStreams_[(u.type<<1)+this.activeCea608Channel_[u.type]].push(u)},Qe.prototype.setsChannel1Active=function(u){return(u.ccData&30720)===4096},Qe.prototype.setsChannel2Active=function(u){return(u.ccData&30720)===6144},Qe.prototype.setsTextOrXDSActive=function(u){return(u.ccData&28928)===256||(u.ccData&30974)===4138||(u.ccData&30974)===6186},Qe.prototype.dispatchCea708Packet=function(u){this.parse708captions_&&this.cc708Stream_.push(u)};var ri={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},Yt=function(u){var h=ri[u]||u;return u&4096&&u===h?"":String.fromCharCode(h)},Xt=function(u){return 32<=u&&u<=127||160<=u&&u<=255},Dt=function(u){this.windowNum=u,this.reset()};Dt.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},Dt.prototype.getText=function(){return this.rows.join(`
206
+ `)},Dt.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},Dt.prototype.newLine=function(u){for(this.rows.length>=this.virtualRowCount&&typeof this.beforeRowOverflow=="function"&&this.beforeRowOverflow(u),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},Dt.prototype.isEmpty=function(){return this.rows.length===0?!0:this.rows.length===1?this.rows[0]==="":!1},Dt.prototype.addText=function(u){this.rows[this.rowIdx]+=u},Dt.prototype.backspace=function(){if(!this.isEmpty()){var u=this.rows[this.rowIdx];this.rows[this.rowIdx]=u.substr(0,u.length-1)}};var ut=function(u,h,p){this.serviceNum=u,this.text="",this.currentWindow=new Dt(-1),this.windows=[],this.stream=p,typeof h=="string"&&this.createTextDecoder(h)};ut.prototype.init=function(u,h){this.startPts=u;for(var p=0;p<8;p++)this.windows[p]=new Dt(p),typeof h=="function"&&(this.windows[p].beforeRowOverflow=h)},ut.prototype.setCurrentWindow=function(u){this.currentWindow=this.windows[u]},ut.prototype.createTextDecoder=function(u){if(typeof TextDecoder>"u")this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(u)}catch(h){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+u+" encoding. "+h})}};var je=function(u){u=u||{},je.prototype.init.call(this);var h=this,p=u.captionServices||{},f={},v;Object.keys(p).forEach(_=>{v=p[_],/^SERVICE/.test(_)&&(f[_]=v.encoding)}),this.serviceEncodings=f,this.current708Packet=null,this.services={},this.push=function(_){_.type===3?(h.new708Packet(),h.add708Bytes(_)):(h.current708Packet===null&&h.new708Packet(),h.add708Bytes(_))}};je.prototype=new Rt,je.prototype.new708Packet=function(){this.current708Packet!==null&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},je.prototype.add708Bytes=function(u){var h=u.ccData,p=h>>>8,f=h&255;this.current708Packet.ptsVals.push(u.pts),this.current708Packet.data.push(p),this.current708Packet.data.push(f)},je.prototype.push708Packet=function(){var u=this.current708Packet,h=u.data,p=null,f=null,v=0,_=h[v++];for(u.seq=_>>6,u.sizeCode=_&63;v<h.length;v++)_=h[v++],p=_>>5,f=_&31,p===7&&f>0&&(_=h[v++],p=_),this.pushServiceBlock(p,v,f),f>0&&(v+=f-1)},je.prototype.pushServiceBlock=function(u,h,p){var f,v=h,_=this.current708Packet.data,P=this.services[u];for(P||(P=this.initService(u,v));v<h+p&&v<_.length;v++)f=_[v],Xt(f)?v=this.handleText(v,P):f===24?v=this.multiByteCharacter(v,P):f===16?v=this.extendedCommands(v,P):128<=f&&f<=135?v=this.setCurrentWindow(v,P):152<=f&&f<=159?v=this.defineWindow(v,P):f===136?v=this.clearWindows(v,P):f===140?v=this.deleteWindows(v,P):f===137?v=this.displayWindows(v,P):f===138?v=this.hideWindows(v,P):f===139?v=this.toggleWindows(v,P):f===151?v=this.setWindowAttributes(v,P):f===144?v=this.setPenAttributes(v,P):f===145?v=this.setPenColor(v,P):f===146?v=this.setPenLocation(v,P):f===143?P=this.reset(v,P):f===8?P.currentWindow.backspace():f===12?P.currentWindow.clearText():f===13?P.currentWindow.pendingNewLine=!0:f===14?P.currentWindow.clearText():f===141&&v++},je.prototype.extendedCommands=function(u,h){var p=this.current708Packet.data,f=p[++u];return Xt(f)&&(u=this.handleText(u,h,{isExtended:!0})),u},je.prototype.getPts=function(u){return this.current708Packet.ptsVals[Math.floor(u/2)]},je.prototype.initService=function(u,h){var f="SERVICE"+u,p=this,f,v;return f in this.serviceEncodings&&(v=this.serviceEncodings[f]),this.services[u]=new ut(u,v,p),this.services[u].init(this.getPts(h),function(_){p.flushDisplayed(_,p.services[u])}),this.services[u]},je.prototype.handleText=function(u,h,p){var f=p&&p.isExtended,v=p&&p.isMultiByte,_=this.current708Packet.data,P=f?4096:0,F=_[u],W=_[u+1],K=h.currentWindow,ie,de;function xe(fe){return fe.map(Oe=>("0"+(Oe&255).toString(16)).slice(-2)).join("")}if(v?(de=[F,W],u++):de=[F],h.textDecoder_&&!f)ie=h.textDecoder_.decode(new Uint8Array(de));else if(v){const fe=xe(de);ie=String.fromCharCode(parseInt(fe,16))}else ie=Yt(P|F);return K.pendingNewLine&&!K.isEmpty()&&K.newLine(this.getPts(u)),K.pendingNewLine=!1,K.addText(ie),u},je.prototype.multiByteCharacter=function(u,h){var p=this.current708Packet.data,f=p[u+1],v=p[u+2];return Xt(f)&&Xt(v)&&(u=this.handleText(++u,h,{isMultiByte:!0})),u},je.prototype.setCurrentWindow=function(u,h){var p=this.current708Packet.data,f=p[u],v=f&7;return h.setCurrentWindow(v),u},je.prototype.defineWindow=function(u,h){var p=this.current708Packet.data,f=p[u],v=f&7;h.setCurrentWindow(v);var _=h.currentWindow;return f=p[++u],_.visible=(f&32)>>5,_.rowLock=(f&16)>>4,_.columnLock=(f&8)>>3,_.priority=f&7,f=p[++u],_.relativePositioning=(f&128)>>7,_.anchorVertical=f&127,f=p[++u],_.anchorHorizontal=f,f=p[++u],_.anchorPoint=(f&240)>>4,_.rowCount=f&15,f=p[++u],_.columnCount=f&63,f=p[++u],_.windowStyle=(f&56)>>3,_.penStyle=f&7,_.virtualRowCount=_.rowCount+1,u},je.prototype.setWindowAttributes=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.currentWindow.winAttr;return f=p[++u],v.fillOpacity=(f&192)>>6,v.fillRed=(f&48)>>4,v.fillGreen=(f&12)>>2,v.fillBlue=f&3,f=p[++u],v.borderType=(f&192)>>6,v.borderRed=(f&48)>>4,v.borderGreen=(f&12)>>2,v.borderBlue=f&3,f=p[++u],v.borderType+=(f&128)>>5,v.wordWrap=(f&64)>>6,v.printDirection=(f&48)>>4,v.scrollDirection=(f&12)>>2,v.justify=f&3,f=p[++u],v.effectSpeed=(f&240)>>4,v.effectDirection=(f&12)>>2,v.displayEffect=f&3,u},je.prototype.flushDisplayed=function(u,h){for(var p=[],f=0;f<8;f++)h.windows[f].visible&&!h.windows[f].isEmpty()&&p.push(h.windows[f].getText());h.endPts=u,h.text=p.join(`
207
207
 
208
- `),this.pushCaption(h),h.startPts=u},qe.prototype.pushCaption=function(u){u.text!==""&&(this.trigger("data",{startPts:u.startPts,endPts:u.endPts,text:u.text,stream:"cc708_"+u.serviceNum}),u.text="",u.startPts=u.endPts)},qe.prototype.displayWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible=1);return u},qe.prototype.hideWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible=0);return u},qe.prototype.toggleWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible^=1);return u},qe.prototype.clearWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&h.windows[_].clearText();return u},qe.prototype.deleteWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&h.windows[_].reset();return u},qe.prototype.setPenAttributes=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.currentWindow.penAttr;return f=p[++u],v.textTag=(f&240)>>4,v.offset=(f&12)>>2,v.penSize=f&3,f=p[++u],v.italics=(f&128)>>7,v.underline=(f&64)>>6,v.edgeType=(f&56)>>3,v.fontStyle=f&7,u},qe.prototype.setPenColor=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.currentWindow.penColor;return f=p[++u],v.fgOpacity=(f&192)>>6,v.fgRed=(f&48)>>4,v.fgGreen=(f&12)>>2,v.fgBlue=f&3,f=p[++u],v.bgOpacity=(f&192)>>6,v.bgRed=(f&48)>>4,v.bgGreen=(f&12)>>2,v.bgBlue=f&3,f=p[++u],v.edgeRed=(f&48)>>4,v.edgeGreen=(f&12)>>2,v.edgeBlue=f&3,u},qe.prototype.setPenLocation=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.currentWindow.penLoc;return h.currentWindow.pendingNewLine=!0,f=p[++u],v.row=f&15,f=p[++u],v.column=f&63,u},qe.prototype.reset=function(u,h){var p=this.getPts(u);return this.flushDisplayed(p,h),this.initService(h.serviceNum,u)};var Si={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Li=function(u){return u===null?"":(u=Si[u]||u,String.fromCharCode(u))},bn=14,fs=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Yi=function(){for(var u=[],h=bn+1;h--;)u.push({text:"",indent:0,offset:0});return u},Ce=function(u,h){Ce.prototype.init.call(this),this.field_=u||0,this.dataChannel_=h||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(p){var f,v,_,P,F;if(f=p.ccData&32639,f===this.lastControlCode_){this.lastControlCode_=null;return}if((f&61440)===4096?this.lastControlCode_=f:f!==this.PADDING_&&(this.lastControlCode_=null),_=f>>>8,P=f&255,f!==this.PADDING_)if(f===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(f===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(p.pts),this.flushDisplayed(p.pts),v=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=v,this.startPts_=p.pts;else if(f===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(p.pts);else if(f===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(p.pts);else if(f===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(p.pts);else if(f===this.CARRIAGE_RETURN_)this.clearFormatting(p.pts),this.flushDisplayed(p.pts),this.shiftRowsUp_(),this.startPts_=p.pts;else if(f===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(f===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(p.pts),this.displayed_=Yi();else if(f===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Yi();else if(f===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(p.pts),this.displayed_=Yi()),this.mode_="paintOn",this.startPts_=p.pts;else if(this.isSpecialCharacter(_,P))_=(_&3)<<8,F=Li(_|P),this[this.mode_](p.pts,F),this.column_++;else if(this.isExtCharacter(_,P))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),_=(_&3)<<8,F=Li(_|P),this[this.mode_](p.pts,F),this.column_++;else if(this.isMidRowCode(_,P))this.clearFormatting(p.pts),this[this.mode_](p.pts," "),this.column_++,(P&14)===14&&this.addFormatting(p.pts,["i"]),(P&1)===1&&this.addFormatting(p.pts,["u"]);else if(this.isOffsetControlCode(_,P)){const K=P&3;this.nonDisplayed_[this.row_].offset=K,this.column_+=K}else if(this.isPAC(_,P)){var W=fs.indexOf(f&7968);if(this.mode_==="rollUp"&&(W-this.rollUpRows_+1<0&&(W=this.rollUpRows_-1),this.setRollUp(p.pts,W)),W!==this.row_&&W>=0&&W<=14&&(this.clearFormatting(p.pts),this.row_=W),P&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(p.pts,["u"]),(f&16)===16){const K=(f&14)>>1;this.column_=K*4,this.nonDisplayed_[this.row_].indent+=K}this.isColorPAC(P)&&(P&14)===14&&this.addFormatting(p.pts,["i"])}else this.isNormalChar(_)&&(P===0&&(P=null),F=Li(_),F+=Li(P),this[this.mode_](p.pts,F),this.column_+=F.length)}};Ce.prototype=new Rt,Ce.prototype.flushDisplayed=function(u){const h=f=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+f+"."})},p=[];this.displayed_.forEach((f,v)=>{if(f&&f.text&&f.text.length){try{f.text=f.text.trim()}catch{h(v)}f.text.length&&p.push({text:f.text,line:v+1,position:10+Math.min(70,f.indent*10)+f.offset*2.5})}else f==null&&h(v)}),p.length&&this.trigger("data",{startPts:this.startPts_,endPts:u,content:p,stream:this.name_})},Ce.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Yi(),this.nonDisplayed_=Yi(),this.lastControlCode_=null,this.column_=0,this.row_=bn,this.rollUpRows_=2,this.formatting_=[]},Ce.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},Ce.prototype.isSpecialCharacter=function(u,h){return u===this.EXT_&&h>=48&&h<=63},Ce.prototype.isExtCharacter=function(u,h){return(u===this.EXT_+1||u===this.EXT_+2)&&h>=32&&h<=63},Ce.prototype.isMidRowCode=function(u,h){return u===this.EXT_&&h>=32&&h<=47},Ce.prototype.isOffsetControlCode=function(u,h){return u===this.OFFSET_&&h>=33&&h<=35},Ce.prototype.isPAC=function(u,h){return u>=this.BASE_&&u<this.BASE_+8&&h>=64&&h<=127},Ce.prototype.isColorPAC=function(u){return u>=64&&u<=79||u>=96&&u<=127},Ce.prototype.isNormalChar=function(u){return u>=32&&u<=127},Ce.prototype.setRollUp=function(u,h){if(this.mode_!=="rollUp"&&(this.row_=bn,this.mode_="rollUp",this.flushDisplayed(u),this.nonDisplayed_=Yi(),this.displayed_=Yi()),h!==void 0&&h!==this.row_)for(var p=0;p<this.rollUpRows_;p++)this.displayed_[h-p]=this.displayed_[this.row_-p],this.displayed_[this.row_-p]={text:"",indent:0,offset:0};h===void 0&&(h=this.row_),this.topRow_=h-this.rollUpRows_+1},Ce.prototype.addFormatting=function(u,h){this.formatting_=this.formatting_.concat(h);var p=h.reduce(function(f,v){return f+"<"+v+">"},"");this[this.mode_](u,p)},Ce.prototype.clearFormatting=function(u){if(this.formatting_.length){var h=this.formatting_.reverse().reduce(function(p,f){return p+"</"+f+">"},"");this.formatting_=[],this[this.mode_](u,h)}},Ce.prototype.popOn=function(u,h){var p=this.nonDisplayed_[this.row_].text;p+=h,this.nonDisplayed_[this.row_].text=p},Ce.prototype.rollUp=function(u,h){var p=this.displayed_[this.row_].text;p+=h,this.displayed_[this.row_].text=p},Ce.prototype.shiftRowsUp_=function(){var u;for(u=0;u<this.topRow_;u++)this.displayed_[u]={text:"",indent:0,offset:0};for(u=this.row_+1;u<bn+1;u++)this.displayed_[u]={text:"",indent:0,offset:0};for(u=this.topRow_;u<this.row_;u++)this.displayed_[u]=this.displayed_[u+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Ce.prototype.paintOn=function(u,h){var p=this.displayed_[this.row_].text;p+=h,this.displayed_[this.row_].text=p};var te={CaptionStream:Qe,Cea608Stream:Ce,Cea708Stream:qe},ve={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Se=i,tt=8589934592,Ht=4294967296,At="shared",Tt=function(u,h){var p=1;for(u>h&&(p=-1);Math.abs(h-u)>Ht;)u+=p*tt;return u},Ei=function(u){var h,p;Ei.prototype.init.call(this),this.type_=u||At,this.push=function(f){if(f.type==="metadata"){this.trigger("data",f);return}this.type_!==At&&f.type!==this.type_||(p===void 0&&(p=f.dts),f.dts=Tt(f.dts,p),f.pts=Tt(f.pts,p),h=f.dts,this.trigger("data",f))},this.flush=function(){p=h,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){p=void 0,h=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ei.prototype=new Se;var yt={TimestampRolloverStream:Ei,handleRollover:Tt},br=(u,h,p)=>{if(!u)return-1;for(var f=p;f<u.length;f++)if(u[f]===h)return f;return-1},ps={typedArrayIndexOf:br},Cr=ps.typedArrayIndexOf,ms={Utf8:3},gu=function(u,h,p){var f,v="";for(f=h;f<p;f++)v+="%"+("00"+u[f].toString(16)).slice(-2);return v},xr=function(u,h,p){return decodeURIComponent(gu(u,h,p))},Sr=function(u,h,p){return unescape(gu(u,h,p))},Er=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},kr={APIC:function(u){var h=1,p,f,v="-->";u.data[0]===ms.Utf8&&(p=Cr(u.data,0,h),!(p<0)&&(u.mimeType=Sr(u.data,h,p),h=p+1,u.pictureType=u.data[h],h++,f=Cr(u.data,0,h),!(f<0)&&(u.description=xr(u.data,h,f),h=f+1,u.mimeType===v?u.url=Sr(u.data,h,u.data.length):u.pictureData=u.data.subarray(h,u.data.length))))},"T*":function(u){u.data[0]===ms.Utf8&&(u.value=xr(u.data,1,u.data.length).replace(/\0*$/,""),u.values=u.value.split("\0"))},TXXX:function(u){var h;u.data[0]===ms.Utf8&&(h=Cr(u.data,0,1),h!==-1&&(u.description=xr(u.data,1,h),u.value=xr(u.data,h+1,u.data.length).replace(/\0*$/,""),u.data=u.value))},"W*":function(u){u.url=Sr(u.data,0,u.data.length).replace(/\0.*$/,"")},WXXX:function(u){var h;u.data[0]===ms.Utf8&&(h=Cr(u.data,0,1),h!==-1&&(u.description=xr(u.data,1,h),u.url=Sr(u.data,h+1,u.data.length).replace(/\0.*$/,"")))},PRIV:function(u){var h;for(h=0;h<u.data.length;h++)if(u.data[h]===0){u.owner=Sr(u.data,0,h);break}u.privateData=u.data.subarray(h+1),u.data=u.privateData}},hp=function(u){var h,p,f=10,v=0,_=[];if(!(u.length<10||u[0]!==73||u[1]!==68||u[2]!==51)){v=Er(u.subarray(6,10)),v+=10;var P=u[5]&64;P&&(f+=4,f+=Er(u.subarray(10,14)),v-=Er(u.subarray(16,20)));do{if(h=Er(u.subarray(f+4,f+8)),h<1)break;p=String.fromCharCode(u[f],u[f+1],u[f+2],u[f+3]);var F={id:p,data:u.subarray(f+10,f+h+10)};F.key=F.id,kr[F.id]?kr[F.id](F):F.id[0]==="T"?kr["T*"](F):F.id[0]==="W"&&kr["W*"](F),_.push(F),f+=10,f+=h}while(f<v);return _}},vu={parseId3Frames:hp,parseSyncSafeInteger:Er,frameParsers:kr},fp=i,pp=ve,sn=vu,gs;gs=function(u){var h={descriptor:u&&u.descriptor},p=0,f=[],v=0,_;if(gs.prototype.init.call(this),this.dispatchType=pp.METADATA_STREAM_TYPE.toString(16),h.descriptor)for(_=0;_<h.descriptor.length;_++)this.dispatchType+=("00"+h.descriptor[_].toString(16)).slice(-2);this.push=function(P){var F,W,K,ie,de,xe;if(P.type==="timed-metadata"){if(P.dataAlignmentIndicator&&(v=0,f.length=0),f.length===0&&(P.data.length<10||P.data[0]!==73||P.data[1]!==68||P.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(f.push(P),v+=P.data.byteLength,f.length===1&&(p=sn.parseSyncSafeInteger(P.data.subarray(6,10)),p+=10),!(v<p)){for(F={data:new Uint8Array(p),frames:[],pts:f[0].pts,dts:f[0].dts},de=0;de<p;)F.data.set(f[0].data.subarray(0,p-de),de),de+=f[0].data.byteLength,v-=f[0].data.byteLength,f.shift();W=10,F.data[5]&64&&(W+=4,W+=sn.parseSyncSafeInteger(F.data.subarray(10,14)),p-=sn.parseSyncSafeInteger(F.data.subarray(16,20)));do{if(K=sn.parseSyncSafeInteger(F.data.subarray(W+4,W+8)),K<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(xe=String.fromCharCode(F.data[W],F.data[W+1],F.data[W+2],F.data[W+3]),ie={id:xe,data:F.data.subarray(W+10,W+K+10)},ie.key=ie.id,sn.frameParsers[ie.id]?sn.frameParsers[ie.id](ie):ie.id[0]==="T"?sn.frameParsers["T*"](ie):ie.id[0]==="W"&&sn.frameParsers["W*"](ie),ie.owner==="com.apple.streaming.transportStreamTimestamp"){var fe=ie.data,Oe=(fe[3]&1)<<30|fe[4]<<22|fe[5]<<14|fe[6]<<6|fe[7]>>>2;Oe*=4,Oe+=fe[7]&3,ie.timeStamp=Oe,F.pts===void 0&&F.dts===void 0&&(F.pts=ie.timeStamp,F.dts=ie.timeStamp),this.trigger("timestamp",ie)}F.frames.push(ie),W+=10,W+=K}while(W<p);this.trigger("data",F)}}}},gs.prototype=new fp;var mp=gs,ja=i,Ga=te,ki=ve,gp=yt.TimestampRolloverStream,vs,wr,ys,$n=188,Wa=71;vs=function(){var u=new Uint8Array($n),h=0;vs.prototype.init.call(this),this.push=function(p){var f=0,v=$n,_;for(h?(_=new Uint8Array(p.byteLength+h),_.set(u.subarray(0,h)),_.set(p,h),h=0):_=p;v<_.byteLength;){if(_[f]===Wa&&_[v]===Wa){this.trigger("data",_.subarray(f,v)),f+=$n,v+=$n;continue}f++,v++}f<_.byteLength&&(u.set(_.subarray(f),0),h=_.byteLength-f)},this.flush=function(){h===$n&&u[0]===Wa&&(this.trigger("data",u),h=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){h=0,this.trigger("reset")}},vs.prototype=new ja,wr=function(){var u,h,p,f;wr.prototype.init.call(this),f=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,u=function(v,_){var P=0;_.payloadUnitStartIndicator&&(P+=v[P]+1),_.type==="pat"?h(v.subarray(P),_):p(v.subarray(P),_)},h=function(v,_){_.section_number=v[7],_.last_section_number=v[8],f.pmtPid=(v[10]&31)<<8|v[11],_.pmtPid=f.pmtPid},p=function(v,_){var P,F,W,K;if(v[5]&1){for(f.programMapTable={video:null,audio:null,"timed-metadata":{}},P=(v[1]&15)<<8|v[2],F=3+P-4,W=(v[10]&15)<<8|v[11],K=12+W;K<F;){var ie=v[K],de=(v[K+1]&31)<<8|v[K+2];ie===ki.H264_STREAM_TYPE&&f.programMapTable.video===null?f.programMapTable.video=de:ie===ki.ADTS_STREAM_TYPE&&f.programMapTable.audio===null?f.programMapTable.audio=de:ie===ki.METADATA_STREAM_TYPE&&(f.programMapTable["timed-metadata"][de]=ie),K+=((v[K+3]&15)<<8|v[K+4])+5}_.programMapTable=f.programMapTable}},this.push=function(v){var _={},P=4;if(_.payloadUnitStartIndicator=!!(v[1]&64),_.pid=v[1]&31,_.pid<<=8,_.pid|=v[2],(v[3]&48)>>>4>1&&(P+=v[P]+1),_.pid===0)_.type="pat",u(v.subarray(P),_),this.trigger("data",_);else if(_.pid===this.pmtPid)for(_.type="pmt",u(v.subarray(P),_),this.trigger("data",_);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([v,P,_]):this.processPes_(v,P,_)},this.processPes_=function(v,_,P){P.pid===this.programMapTable.video?P.streamType=ki.H264_STREAM_TYPE:P.pid===this.programMapTable.audio?P.streamType=ki.ADTS_STREAM_TYPE:P.streamType=this.programMapTable["timed-metadata"][P.pid],P.type="pes",P.data=v.subarray(_),this.trigger("data",P)}},wr.prototype=new ja,wr.STREAM_TYPES={h264:27,adts:15},ys=function(){var u=this,h=!1,p={data:[],size:0},f={data:[],size:0},v={data:[],size:0},_,P=function(W,K){var ie;const de=W[0]<<16|W[1]<<8|W[2];K.data=new Uint8Array,de===1&&(K.packetLength=6+(W[4]<<8|W[5]),K.dataAlignmentIndicator=(W[6]&4)!==0,ie=W[7],ie&192&&(K.pts=(W[9]&14)<<27|(W[10]&255)<<20|(W[11]&254)<<12|(W[12]&255)<<5|(W[13]&254)>>>3,K.pts*=4,K.pts+=(W[13]&6)>>>1,K.dts=K.pts,ie&64&&(K.dts=(W[14]&14)<<27|(W[15]&255)<<20|(W[16]&254)<<12|(W[17]&255)<<5|(W[18]&254)>>>3,K.dts*=4,K.dts+=(W[18]&6)>>>1)),K.data=W.subarray(9+W[8]))},F=function(W,K,ie){var de=new Uint8Array(W.size),xe={type:K},fe=0,Oe=0,He=!1,Bt;if(!(!W.data.length||W.size<9)){for(xe.trackId=W.data[0].pid,fe=0;fe<W.data.length;fe++)Bt=W.data[fe],de.set(Bt.data,Oe),Oe+=Bt.data.byteLength;P(de,xe),He=K==="video"||xe.packetLength<=W.size,(ie||He)&&(W.size=0,W.data.length=0),He&&u.trigger("data",xe)}};ys.prototype.init.call(this),this.push=function(W){({pat:function(){},pes:function(){var K,ie;switch(W.streamType){case ki.H264_STREAM_TYPE:K=p,ie="video";break;case ki.ADTS_STREAM_TYPE:K=f,ie="audio";break;case ki.METADATA_STREAM_TYPE:K=v,ie="timed-metadata";break;default:return}W.payloadUnitStartIndicator&&F(K,ie,!0),K.data.push(W),K.size+=W.data.byteLength},pmt:function(){var K={type:"metadata",tracks:[]};_=W.programMapTable,_.video!==null&&K.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.video,codec:"avc",type:"video"}),_.audio!==null&&K.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.audio,codec:"adts",type:"audio"}),h=!0,u.trigger("data",K)}})[W.type]()},this.reset=function(){p.size=0,p.data.length=0,f.size=0,f.data.length=0,this.trigger("reset")},this.flushStreams_=function(){F(p,"video"),F(f,"audio"),F(v,"timed-metadata")},this.flush=function(){if(!h&&_){var W={type:"metadata",tracks:[]};_.video!==null&&W.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.video,codec:"avc",type:"video"}),_.audio!==null&&W.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.audio,codec:"adts",type:"audio"}),u.trigger("data",W)}h=!1,this.flushStreams_(),this.trigger("done")}},ys.prototype=new ja;var yu={PAT_PID:0,MP2T_PACKET_LENGTH:$n,TransportPacketStream:vs,TransportParseStream:wr,ElementaryStream:ys,TimestampRolloverStream:gp,CaptionStream:Ga.CaptionStream,Cea608Stream:Ga.Cea608Stream,Cea708Stream:Ga.Cea708Stream,MetadataStream:mp};for(var Ya in ki)ki.hasOwnProperty(Ya)&&(yu[Ya]=ki[Ya]);var vp=yu,yp=i,_p=Fe.ONE_SECOND_IN_TS,_s,_u=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];_s=function(u){var h,p=0;_s.prototype.init.call(this),this.skipWarn_=function(f,v){this.trigger("log",{level:"warn",message:`adts skiping bytes ${f} to ${v} in frame ${p} outside syncword`})},this.push=function(f){var v=0,_,P,F,W,K;if(u||(p=0),f.type==="audio"){h&&h.length?(F=h,h=new Uint8Array(F.byteLength+f.data.byteLength),h.set(F),h.set(f.data,F.byteLength)):h=f.data;for(var ie;v+7<h.length;){if(h[v]!==255||(h[v+1]&246)!==240){typeof ie!="number"&&(ie=v),v++;continue}if(typeof ie=="number"&&(this.skipWarn_(ie,v),ie=null),P=(~h[v+1]&1)*2,_=(h[v+3]&3)<<11|h[v+4]<<3|(h[v+5]&224)>>5,W=((h[v+6]&3)+1)*1024,K=W*_p/_u[(h[v+2]&60)>>>2],h.byteLength-v<_)break;this.trigger("data",{pts:f.pts+p*K,dts:f.dts+p*K,sampleCount:W,audioobjecttype:(h[v+2]>>>6&3)+1,channelcount:(h[v+2]&1)<<2|(h[v+3]&192)>>>6,samplerate:_u[(h[v+2]&60)>>>2],samplingfrequencyindex:(h[v+2]&60)>>>2,samplesize:16,data:h.subarray(v+7+P,v+_)}),p++,v+=_}typeof ie=="number"&&(this.skipWarn_(ie,v),ie=null),h=h.subarray(v)}},this.flush=function(){p=0,this.trigger("done")},this.reset=function(){h=void 0,this.trigger("reset")},this.endTimeline=function(){h=void 0,this.trigger("endedtimeline")}},_s.prototype=new yp;var Tp=_s,Tu;Tu=function(u){var h=u.byteLength,p=0,f=0;this.length=function(){return 8*h},this.bitsAvailable=function(){return 8*h+f},this.loadWord=function(){var v=u.byteLength-h,_=new Uint8Array(4),P=Math.min(4,h);if(P===0)throw new Error("no bytes available");_.set(u.subarray(v,v+P)),p=new DataView(_.buffer).getUint32(0),f=P*8,h-=P},this.skipBits=function(v){var _;f>v?(p<<=v,f-=v):(v-=f,_=Math.floor(v/8),v-=_*8,h-=_,this.loadWord(),p<<=v,f-=v)},this.readBits=function(v){var _=Math.min(f,v),P=p>>>32-_;return f-=_,f>0?p<<=_:h>0&&this.loadWord(),_=v-_,_>0?P<<_|this.readBits(_):P},this.skipLeadingZeros=function(){var v;for(v=0;v<f;++v)if((p&2147483648>>>v)!==0)return p<<=v,f-=v,v;return this.loadWord(),v+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var v=this.skipLeadingZeros();return this.readBits(v+1)-1},this.readExpGolomb=function(){var v=this.readUnsignedExpGolomb();return 1&v?1+v>>>1:-1*(v>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var bp=Tu,bu=i,Cp=bp,Ts,bs,Cu;bs=function(){var u=0,h,p;bs.prototype.init.call(this),this.push=function(f){var v;p?(v=new Uint8Array(p.byteLength+f.data.byteLength),v.set(p),v.set(f.data,p.byteLength),p=v):p=f.data;for(var _=p.byteLength;u<_-3;u++)if(p[u+2]===1){h=u+5;break}for(;h<_;)switch(p[h]){case 0:if(p[h-1]!==0){h+=2;break}else if(p[h-2]!==0){h++;break}u+3!==h-2&&this.trigger("data",p.subarray(u+3,h-2));do h++;while(p[h]!==1&&h<_);u=h-2,h+=3;break;case 1:if(p[h-1]!==0||p[h-2]!==0){h+=3;break}this.trigger("data",p.subarray(u+3,h-2)),u=h-2,h+=3;break;default:h+=3;break}p=p.subarray(u),h-=u,u=0},this.reset=function(){p=null,u=0,this.trigger("reset")},this.flush=function(){p&&p.byteLength>3&&this.trigger("data",p.subarray(u+3)),p=null,u=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},bs.prototype=new bu,Cu={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Ts=function(){var u=new bs,h,p,f,v,_,P,F;Ts.prototype.init.call(this),h=this,this.push=function(W){W.type==="video"&&(p=W.trackId,f=W.pts,v=W.dts,u.push(W))},u.on("data",function(W){var K={trackId:p,pts:f,dts:v,data:W,nalUnitTypeCode:W[0]&31};switch(K.nalUnitTypeCode){case 5:K.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:K.nalUnitType="sei_rbsp",K.escapedRBSP=_(W.subarray(1));break;case 7:K.nalUnitType="seq_parameter_set_rbsp",K.escapedRBSP=_(W.subarray(1)),K.config=P(K.escapedRBSP);break;case 8:K.nalUnitType="pic_parameter_set_rbsp";break;case 9:K.nalUnitType="access_unit_delimiter_rbsp";break}h.trigger("data",K)}),u.on("done",function(){h.trigger("done")}),u.on("partialdone",function(){h.trigger("partialdone")}),u.on("reset",function(){h.trigger("reset")}),u.on("endedtimeline",function(){h.trigger("endedtimeline")}),this.flush=function(){u.flush()},this.partialFlush=function(){u.partialFlush()},this.reset=function(){u.reset()},this.endTimeline=function(){u.endTimeline()},F=function(W,K){var ie=8,de=8,xe,fe;for(xe=0;xe<W;xe++)de!==0&&(fe=K.readExpGolomb(),de=(ie+fe+256)%256),ie=de===0?ie:de},_=function(W){for(var K=W.byteLength,ie=[],de=1,xe,fe;de<K-2;)W[de]===0&&W[de+1]===0&&W[de+2]===3?(ie.push(de+2),de+=2):de++;if(ie.length===0)return W;xe=K-ie.length,fe=new Uint8Array(xe);var Oe=0;for(de=0;de<xe;Oe++,de++)Oe===ie[0]&&(Oe++,ie.shift()),fe[de]=W[Oe];return fe},P=function(W){var K=0,ie=0,de=0,xe=0,fe,Oe,He,Bt,ci,on,Lr,Pr,Mr,Rr,Bs,dt=[1,1],Vr,Di;if(fe=new Cp(W),Oe=fe.readUnsignedByte(),Bt=fe.readUnsignedByte(),He=fe.readUnsignedByte(),fe.skipUnsignedExpGolomb(),Cu[Oe]&&(ci=fe.readUnsignedExpGolomb(),ci===3&&fe.skipBits(1),fe.skipUnsignedExpGolomb(),fe.skipUnsignedExpGolomb(),fe.skipBits(1),fe.readBoolean()))for(Bs=ci!==3?8:12,Di=0;Di<Bs;Di++)fe.readBoolean()&&(Di<6?F(16,fe):F(64,fe));if(fe.skipUnsignedExpGolomb(),on=fe.readUnsignedExpGolomb(),on===0)fe.readUnsignedExpGolomb();else if(on===1)for(fe.skipBits(1),fe.skipExpGolomb(),fe.skipExpGolomb(),Lr=fe.readUnsignedExpGolomb(),Di=0;Di<Lr;Di++)fe.skipExpGolomb();if(fe.skipUnsignedExpGolomb(),fe.skipBits(1),Pr=fe.readUnsignedExpGolomb(),Mr=fe.readUnsignedExpGolomb(),Rr=fe.readBits(1),Rr===0&&fe.skipBits(1),fe.skipBits(1),fe.readBoolean()&&(K=fe.readUnsignedExpGolomb(),ie=fe.readUnsignedExpGolomb(),de=fe.readUnsignedExpGolomb(),xe=fe.readUnsignedExpGolomb()),fe.readBoolean()&&fe.readBoolean()){switch(Vr=fe.readUnsignedByte(),Vr){case 1:dt=[1,1];break;case 2:dt=[12,11];break;case 3:dt=[10,11];break;case 4:dt=[16,11];break;case 5:dt=[40,33];break;case 6:dt=[24,11];break;case 7:dt=[20,11];break;case 8:dt=[32,11];break;case 9:dt=[80,33];break;case 10:dt=[18,11];break;case 11:dt=[15,11];break;case 12:dt=[64,33];break;case 13:dt=[160,99];break;case 14:dt=[4,3];break;case 15:dt=[3,2];break;case 16:dt=[2,1];break;case 255:{dt=[fe.readUnsignedByte()<<8|fe.readUnsignedByte(),fe.readUnsignedByte()<<8|fe.readUnsignedByte()];break}}dt&&dt[0]/dt[1]}return{profileIdc:Oe,levelIdc:He,profileCompatibility:Bt,width:(Pr+1)*16-K*2-ie*2,height:(2-Rr)*(Mr+1)*16-de*2-xe*2,sarRatio:dt}}},Ts.prototype=new bu;var xp={H264Stream:Ts},Sp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],xu=function(u,h){var p=u[h+6]<<21|u[h+7]<<14|u[h+8]<<7|u[h+9],f=u[h+5],v=(f&16)>>4;return p=p>=0?p:0,v?p+20:p+10},Su=function(u,h){return u.length-h<10||u[h]!==73||u[h+1]!==68||u[h+2]!==51?h:(h+=xu(u,h),Su(u,h))},Ep=function(u){var h=Su(u,0);return u.length>=h+2&&(u[h]&255)===255&&(u[h+1]&240)===240&&(u[h+1]&22)===16},Eu=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},kp=function(u,h,p){var f,v="";for(f=h;f<p;f++)v+="%"+("00"+u[f].toString(16)).slice(-2);return v},wp=function(u,h,p){return unescape(kp(u,h,p))},Dp=function(u,h){var p=(u[h+5]&224)>>5,f=u[h+4]<<3,v=u[h+3]&6144;return v|f|p},Ap=function(u,h){return u[h]===73&&u[h+1]===68&&u[h+2]===51?"timed-metadata":u[h]&!0&&(u[h+1]&240)===240?"audio":null},Ip=function(u){for(var h=0;h+5<u.length;){if(u[h]!==255||(u[h+1]&246)!==240){h++;continue}return Sp[(u[h+2]&60)>>>2]}return null},Np=function(u){var h,p,f,v;h=10,u[5]&64&&(h+=4,h+=Eu(u.subarray(10,14)));do{if(p=Eu(u.subarray(h+4,h+8)),p<1)return null;if(v=String.fromCharCode(u[h],u[h+1],u[h+2],u[h+3]),v==="PRIV"){f=u.subarray(h+10,h+p+10);for(var _=0;_<f.byteLength;_++)if(f[_]===0){var P=wp(f,0,_);if(P==="com.apple.streaming.transportStreamTimestamp"){var F=f.subarray(_+1),W=(F[3]&1)<<30|F[4]<<22|F[5]<<14|F[6]<<6|F[7]>>>2;return W*=4,W+=F[7]&3,W}break}}h+=10,h+=p}while(h<u.byteLength);return null},Xa={isLikelyAacData:Ep,parseId3TagSize:xu,parseAdtsSize:Dp,parseType:Ap,parseSampleRate:Ip,parseAacTimestamp:Np},Op=i,ku=Xa,Cs;Cs=function(){var u=new Uint8Array,h=0;Cs.prototype.init.call(this),this.setTimestamp=function(p){h=p},this.push=function(p){var f=0,v=0,_,P,F,W;for(u.length?(W=u.length,u=new Uint8Array(p.byteLength+W),u.set(u.subarray(0,W)),u.set(p,W)):u=p;u.length-v>=3;){if(u[v]===73&&u[v+1]===68&&u[v+2]===51){if(u.length-v<10||(f=ku.parseId3TagSize(u,v),v+f>u.length))break;P={type:"timed-metadata",data:u.subarray(v,v+f)},this.trigger("data",P),v+=f;continue}else if((u[v]&255)===255&&(u[v+1]&240)===240){if(u.length-v<7||(f=ku.parseAdtsSize(u,v),v+f>u.length))break;F={type:"audio",data:u.subarray(v,v+f),pts:h,dts:h},this.trigger("data",F),v+=f;continue}v++}_=u.length-v,_>0?u=u.subarray(v):u=new Uint8Array},this.reset=function(){u=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){u=new Uint8Array,this.trigger("endedtimeline")}},Cs.prototype=new Op;var Bp=Cs,Lp=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Pp=Lp,Mp=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Rp=Mp,xs=i,Dr=ke,Ar=kt,Ss=Gi,wi=Q,Xi=vp,Es=Fe,wu=Tp,Vp=xp.H264Stream,Fp=Bp,$p=Xa.isLikelyAacData,Up=Fe.ONE_SECOND_IN_TS,Du=Pp,Au=Rp,ks,Ir,ws,Cn,zp=function(u,h){h.stream=u,this.trigger("log",h)},Iu=function(u,h){for(var p=Object.keys(h),f=0;f<p.length;f++){var v=p[f];v==="headOfPipeline"||!h[v].on||h[v].on("log",zp.bind(u,v))}},Nu=function(u,h){var p;if(u.length!==h.length)return!1;for(p=0;p<u.length;p++)if(u[p]!==h[p])return!1;return!0},Ou=function(u,h,p,f,v,_){var P=p-h,F=f-h,W=v-p;return{start:{dts:u,pts:u+P},end:{dts:u+F,pts:u+W},prependedContentDuration:_,baseMediaDecodeTime:u}};Ir=function(u,h){var p=[],f,v=0,_=0,P=1/0;h=h||{},f=h.firstSequenceNumber||0,Ir.prototype.init.call(this),this.push=function(F){wi.collectDtsInfo(u,F),u&&Du.forEach(function(W){u[W]=F[W]}),p.push(F)},this.setEarliestDts=function(F){v=F},this.setVideoBaseMediaDecodeTime=function(F){P=F},this.setAudioAppendStart=function(F){_=F},this.flush=function(){var F,W,K,ie,de,xe,fe;if(p.length===0){this.trigger("done","AudioSegmentStream");return}F=Ss.trimAdtsFramesByEarliestDts(p,u,v),u.baseMediaDecodeTime=wi.calculateTrackBaseMediaDecodeTime(u,h.keepOriginalTimestamps),fe=Ss.prefixWithSilence(u,F,_,P),u.samples=Ss.generateSampleTable(F),K=Dr.mdat(Ss.concatenateFrameData(F)),p=[],W=Dr.moof(f,[u]),ie=new Uint8Array(W.byteLength+K.byteLength),f++,ie.set(W),ie.set(K,W.byteLength),wi.clearDtsInfo(u),de=Math.ceil(Up*1024/u.samplerate),F.length&&(xe=F.length*de,this.trigger("segmentTimingInfo",Ou(Es.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),F[0].dts,F[0].pts,F[0].dts+xe,F[0].pts+xe,fe||0)),this.trigger("timingInfo",{start:F[0].pts,end:F[0].pts+xe})),this.trigger("data",{track:u,boxes:ie}),this.trigger("done","AudioSegmentStream")},this.reset=function(){wi.clearDtsInfo(u),p=[],this.trigger("reset")}},Ir.prototype=new xs,ks=function(u,h){var p,f=[],v=[],_,P;h=h||{},p=h.firstSequenceNumber||0,ks.prototype.init.call(this),delete u.minPTS,this.gopCache_=[],this.push=function(F){wi.collectDtsInfo(u,F),F.nalUnitType==="seq_parameter_set_rbsp"&&!_&&(_=F.config,u.sps=[F.data],Au.forEach(function(W){u[W]=_[W]},this)),F.nalUnitType==="pic_parameter_set_rbsp"&&!P&&(P=F.data,u.pps=[F.data]),f.push(F)},this.flush=function(){for(var F,W,K,ie,de,xe,fe=0,Oe,He;f.length&&f[0].nalUnitType!=="access_unit_delimiter_rbsp";)f.shift();if(f.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(F=Ar.groupNalsIntoFrames(f),K=Ar.groupFramesIntoGops(F),K[0][0].keyFrame||(W=this.getGopForFusion_(f[0],u),W?(fe=W.duration,K.unshift(W),K.byteLength+=W.byteLength,K.nalCount+=W.nalCount,K.pts=W.pts,K.dts=W.dts,K.duration+=W.duration):K=Ar.extendFirstKeyFrame(K)),v.length){var Bt;if(h.alignGopsAtEnd?Bt=this.alignGopsAtEnd_(K):Bt=this.alignGopsAtStart_(K),!Bt){this.gopCache_.unshift({gop:K.pop(),pps:u.pps,sps:u.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),f=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}wi.clearDtsInfo(u),K=Bt}wi.collectDtsInfo(u,K),u.samples=Ar.generateSampleTable(K),de=Dr.mdat(Ar.concatenateNalData(K)),u.baseMediaDecodeTime=wi.calculateTrackBaseMediaDecodeTime(u,h.keepOriginalTimestamps),this.trigger("processedGopsInfo",K.map(function(ci){return{pts:ci.pts,dts:ci.dts,byteLength:ci.byteLength}})),Oe=K[0],He=K[K.length-1],this.trigger("segmentTimingInfo",Ou(u.baseMediaDecodeTime,Oe.dts,Oe.pts,He.dts+He.duration,He.pts+He.duration,fe)),this.trigger("timingInfo",{start:K[0].pts,end:K[K.length-1].pts+K[K.length-1].duration}),this.gopCache_.unshift({gop:K.pop(),pps:u.pps,sps:u.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),f=[],this.trigger("baseMediaDecodeTime",u.baseMediaDecodeTime),this.trigger("timelineStartInfo",u.timelineStartInfo),ie=Dr.moof(p,[u]),xe=new Uint8Array(ie.byteLength+de.byteLength),p++,xe.set(ie),xe.set(de,ie.byteLength),this.trigger("data",{track:u,boxes:xe}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),f=[],this.gopCache_.length=0,v.length=0,this.trigger("reset")},this.resetStream_=function(){wi.clearDtsInfo(u),_=void 0,P=void 0},this.getGopForFusion_=function(F){var W=45e3,K=1/0,ie,de,xe,fe,Oe;for(Oe=0;Oe<this.gopCache_.length;Oe++)fe=this.gopCache_[Oe],xe=fe.gop,!(!(u.pps&&Nu(u.pps[0],fe.pps[0]))||!(u.sps&&Nu(u.sps[0],fe.sps[0])))&&(xe.dts<u.timelineStartInfo.dts||(ie=F.dts-xe.dts-xe.duration,ie>=-1e4&&ie<=W&&(!de||K>ie)&&(de=fe,K=ie)));return de?de.gop:null},this.alignGopsAtStart_=function(F){var W,K,ie,de,xe,fe,Oe,He;for(xe=F.byteLength,fe=F.nalCount,Oe=F.duration,W=K=0;W<v.length&&K<F.length&&(ie=v[W],de=F[K],ie.pts!==de.pts);){if(de.pts>ie.pts){W++;continue}K++,xe-=de.byteLength,fe-=de.nalCount,Oe-=de.duration}return K===0?F:K===F.length?null:(He=F.slice(K),He.byteLength=xe,He.duration=Oe,He.nalCount=fe,He.pts=He[0].pts,He.dts=He[0].dts,He)},this.alignGopsAtEnd_=function(F){var W,K,ie,de,xe,fe;for(W=v.length-1,K=F.length-1,xe=null,fe=!1;W>=0&&K>=0;){if(ie=v[W],de=F[K],ie.pts===de.pts){fe=!0;break}if(ie.pts>de.pts){W--;continue}W===v.length-1&&(xe=K),K--}if(!fe&&xe===null)return null;var Oe;if(fe?Oe=K:Oe=xe,Oe===0)return F;var He=F.slice(Oe),Bt=He.reduce(function(ci,on){return ci.byteLength+=on.byteLength,ci.duration+=on.duration,ci.nalCount+=on.nalCount,ci},{byteLength:0,duration:0,nalCount:0});return He.byteLength=Bt.byteLength,He.duration=Bt.duration,He.nalCount=Bt.nalCount,He.pts=He[0].pts,He.dts=He[0].dts,He},this.alignGopsWith=function(F){v=F}},ks.prototype=new xs,Cn=function(u,h){this.numberOfTracks=0,this.metadataStream=h,u=u||{},typeof u.remux<"u"?this.remuxTracks=!!u.remux:this.remuxTracks=!0,typeof u.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=u.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Cn.prototype.init.call(this),this.push=function(p){if(p.content||p.text)return this.pendingCaptions.push(p);if(p.frames)return this.pendingMetadata.push(p);this.pendingTracks.push(p.track),this.pendingBytes+=p.boxes.byteLength,p.track.type==="video"&&(this.videoTrack=p.track,this.pendingBoxes.push(p.boxes)),p.track.type==="audio"&&(this.audioTrack=p.track,this.pendingBoxes.unshift(p.boxes))}},Cn.prototype=new xs,Cn.prototype.flush=function(u){var h=0,p={captions:[],captionStreams:{},metadata:[],info:{}},f,v,_,P=0,F;if(this.pendingTracks.length<this.numberOfTracks){if(u!=="VideoSegmentStream"&&u!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(P=this.videoTrack.timelineStartInfo.pts,Au.forEach(function(W){p.info[W]=this.videoTrack[W]},this)):this.audioTrack&&(P=this.audioTrack.timelineStartInfo.pts,Du.forEach(function(W){p.info[W]=this.audioTrack[W]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?p.type=this.pendingTracks[0].type:p.type="combined",this.emittedTracks+=this.pendingTracks.length,_=Dr.initSegment(this.pendingTracks),p.initSegment=new Uint8Array(_.byteLength),p.initSegment.set(_),p.data=new Uint8Array(this.pendingBytes),F=0;F<this.pendingBoxes.length;F++)p.data.set(this.pendingBoxes[F],h),h+=this.pendingBoxes[F].byteLength;for(F=0;F<this.pendingCaptions.length;F++)f=this.pendingCaptions[F],f.startTime=Es.metadataTsToSeconds(f.startPts,P,this.keepOriginalTimestamps),f.endTime=Es.metadataTsToSeconds(f.endPts,P,this.keepOriginalTimestamps),p.captionStreams[f.stream]=!0,p.captions.push(f);for(F=0;F<this.pendingMetadata.length;F++)v=this.pendingMetadata[F],v.cueTime=Es.metadataTsToSeconds(v.pts,P,this.keepOriginalTimestamps),p.metadata.push(v);for(p.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",p),F=0;F<p.captions.length;F++)f=p.captions[F],this.trigger("caption",f);for(F=0;F<p.metadata.length;F++)v=p.metadata[F],this.trigger("id3Frame",v)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Cn.prototype.setRemux=function(u){this.remuxTracks=u},ws=function(u){var h=this,p=!0,f,v;ws.prototype.init.call(this),u=u||{},this.baseMediaDecodeTime=u.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var _={};this.transmuxPipeline_=_,_.type="aac",_.metadataStream=new Xi.MetadataStream,_.aacStream=new Fp,_.audioTimestampRolloverStream=new Xi.TimestampRolloverStream("audio"),_.timedMetadataTimestampRolloverStream=new Xi.TimestampRolloverStream("timed-metadata"),_.adtsStream=new wu,_.coalesceStream=new Cn(u,_.metadataStream),_.headOfPipeline=_.aacStream,_.aacStream.pipe(_.audioTimestampRolloverStream).pipe(_.adtsStream),_.aacStream.pipe(_.timedMetadataTimestampRolloverStream).pipe(_.metadataStream).pipe(_.coalesceStream),_.metadataStream.on("timestamp",function(P){_.aacStream.setTimestamp(P.timeStamp)}),_.aacStream.on("data",function(P){P.type!=="timed-metadata"&&P.type!=="audio"||_.audioSegmentStream||(v=v||{timelineStartInfo:{baseMediaDecodeTime:h.baseMediaDecodeTime},codec:"adts",type:"audio"},_.coalesceStream.numberOfTracks++,_.audioSegmentStream=new Ir(v,u),_.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),_.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),_.adtsStream.pipe(_.audioSegmentStream).pipe(_.coalesceStream),h.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!f}))}),_.coalesceStream.on("data",this.trigger.bind(this,"data")),_.coalesceStream.on("done",this.trigger.bind(this,"done")),Iu(this,_)},this.setupTsPipeline=function(){var _={};this.transmuxPipeline_=_,_.type="ts",_.metadataStream=new Xi.MetadataStream,_.packetStream=new Xi.TransportPacketStream,_.parseStream=new Xi.TransportParseStream,_.elementaryStream=new Xi.ElementaryStream,_.timestampRolloverStream=new Xi.TimestampRolloverStream,_.adtsStream=new wu,_.h264Stream=new Vp,_.captionStream=new Xi.CaptionStream(u),_.coalesceStream=new Cn(u,_.metadataStream),_.headOfPipeline=_.packetStream,_.packetStream.pipe(_.parseStream).pipe(_.elementaryStream).pipe(_.timestampRolloverStream),_.timestampRolloverStream.pipe(_.h264Stream),_.timestampRolloverStream.pipe(_.adtsStream),_.timestampRolloverStream.pipe(_.metadataStream).pipe(_.coalesceStream),_.h264Stream.pipe(_.captionStream).pipe(_.coalesceStream),_.elementaryStream.on("data",function(P){var F;if(P.type==="metadata"){for(F=P.tracks.length;F--;)!f&&P.tracks[F].type==="video"?(f=P.tracks[F],f.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime):!v&&P.tracks[F].type==="audio"&&(v=P.tracks[F],v.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime);f&&!_.videoSegmentStream&&(_.coalesceStream.numberOfTracks++,_.videoSegmentStream=new ks(f,u),_.videoSegmentStream.on("log",h.getLogTrigger_("videoSegmentStream")),_.videoSegmentStream.on("timelineStartInfo",function(W){v&&!u.keepOriginalTimestamps&&(v.timelineStartInfo=W,_.audioSegmentStream.setEarliestDts(W.dts-h.baseMediaDecodeTime))}),_.videoSegmentStream.on("processedGopsInfo",h.trigger.bind(h,"gopInfo")),_.videoSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"videoSegmentTimingInfo")),_.videoSegmentStream.on("baseMediaDecodeTime",function(W){v&&_.audioSegmentStream.setVideoBaseMediaDecodeTime(W)}),_.videoSegmentStream.on("timingInfo",h.trigger.bind(h,"videoTimingInfo")),_.h264Stream.pipe(_.videoSegmentStream).pipe(_.coalesceStream)),v&&!_.audioSegmentStream&&(_.coalesceStream.numberOfTracks++,_.audioSegmentStream=new Ir(v,u),_.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),_.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),_.audioSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"audioSegmentTimingInfo")),_.adtsStream.pipe(_.audioSegmentStream).pipe(_.coalesceStream)),h.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!f})}}),_.coalesceStream.on("data",this.trigger.bind(this,"data")),_.coalesceStream.on("id3Frame",function(P){P.dispatchType=_.metadataStream.dispatchType,h.trigger("id3Frame",P)}),_.coalesceStream.on("caption",this.trigger.bind(this,"caption")),_.coalesceStream.on("done",this.trigger.bind(this,"done")),Iu(this,_)},this.setBaseMediaDecodeTime=function(_){var P=this.transmuxPipeline_;u.keepOriginalTimestamps||(this.baseMediaDecodeTime=_),v&&(v.timelineStartInfo.dts=void 0,v.timelineStartInfo.pts=void 0,wi.clearDtsInfo(v),P.audioTimestampRolloverStream&&P.audioTimestampRolloverStream.discontinuity()),f&&(P.videoSegmentStream&&(P.videoSegmentStream.gopCache_=[]),f.timelineStartInfo.dts=void 0,f.timelineStartInfo.pts=void 0,wi.clearDtsInfo(f),P.captionStream.reset()),P.timestampRolloverStream&&P.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(_){v&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(_)},this.setRemux=function(_){var P=this.transmuxPipeline_;u.remux=_,P&&P.coalesceStream&&P.coalesceStream.setRemux(_)},this.alignGopsWith=function(_){f&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(_)},this.getLogTrigger_=function(_){var P=this;return function(F){F.stream=_,P.trigger("log",F)}},this.push=function(_){if(p){var P=$p(_);P&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!P&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),p=!1}this.transmuxPipeline_.headOfPipeline.push(_)},this.flush=function(){p=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},ws.prototype=new xs;var Hp={Transmuxer:ws},qp=function(u){return u>>>0},jp=function(u){return("00"+u.toString(16)).slice(-2)},Ds={toUnsigned:qp,toHexString:jp},Gp=function(u){var h="";return h+=String.fromCharCode(u[0]),h+=String.fromCharCode(u[1]),h+=String.fromCharCode(u[2]),h+=String.fromCharCode(u[3]),h},Bu=Gp,Wp=Ds.toUnsigned,Yp=Bu,Lu=function(u,h){var p=[],f,v,_,P,F;if(!h.length)return null;for(f=0;f<u.byteLength;)v=Wp(u[f]<<24|u[f+1]<<16|u[f+2]<<8|u[f+3]),_=Yp(u.subarray(f+4,f+8)),P=v>1?f+v:u.byteLength,_===h[0]&&(h.length===1?p.push(u.subarray(f+8,P)):(F=Lu(u.subarray(f+8,P),h.slice(1)),F.length&&(p=p.concat(F)))),f=P;return p},Ka=Lu,Xp=Ds.toUnsigned,Kp=a.getUint64,Qp=function(u){var h={version:u[0],flags:new Uint8Array(u.subarray(1,4))};return h.version===1?h.baseMediaDecodeTime=Kp(u.subarray(4)):h.baseMediaDecodeTime=Xp(u[4]<<24|u[5]<<16|u[6]<<8|u[7]),h},Qa=Qp,Zp=function(u){var h=new DataView(u.buffer,u.byteOffset,u.byteLength),p={version:u[0],flags:new Uint8Array(u.subarray(1,4)),trackId:h.getUint32(4)},f=p.flags[2]&1,v=p.flags[2]&2,_=p.flags[2]&8,P=p.flags[2]&16,F=p.flags[2]&32,W=p.flags[0]&65536,K=p.flags[0]&131072,ie;return ie=8,f&&(ie+=4,p.baseDataOffset=h.getUint32(12),ie+=4),v&&(p.sampleDescriptionIndex=h.getUint32(ie),ie+=4),_&&(p.defaultSampleDuration=h.getUint32(ie),ie+=4),P&&(p.defaultSampleSize=h.getUint32(ie),ie+=4),F&&(p.defaultSampleFlags=h.getUint32(ie)),W&&(p.durationIsEmpty=!0),!f&&K&&(p.baseDataOffsetIsMoof=!0),p},Pu=Zp,Jp=function(u){return{isLeading:(u[0]&12)>>>2,dependsOn:u[0]&3,isDependedOn:(u[1]&192)>>>6,hasRedundancy:(u[1]&48)>>>4,paddingValue:(u[1]&14)>>>1,isNonSyncSample:u[1]&1,degradationPriority:u[2]<<8|u[3]}},em=Jp,Mu=em,tm=function(u){var h={version:u[0],flags:new Uint8Array(u.subarray(1,4)),samples:[]},p=new DataView(u.buffer,u.byteOffset,u.byteLength),f=h.flags[2]&1,v=h.flags[2]&4,_=h.flags[1]&1,P=h.flags[1]&2,F=h.flags[1]&4,W=h.flags[1]&8,K=p.getUint32(4),ie=8,de;for(f&&(h.dataOffset=p.getInt32(ie),ie+=4),v&&K&&(de={flags:Mu(u.subarray(ie,ie+4))},ie+=4,_&&(de.duration=p.getUint32(ie),ie+=4),P&&(de.size=p.getUint32(ie),ie+=4),W&&(h.version===1?de.compositionTimeOffset=p.getInt32(ie):de.compositionTimeOffset=p.getUint32(ie),ie+=4),h.samples.push(de),K--);K--;)de={},_&&(de.duration=p.getUint32(ie),ie+=4),P&&(de.size=p.getUint32(ie),ie+=4),F&&(de.flags=Mu(u.subarray(ie,ie+4)),ie+=4),W&&(h.version===1?de.compositionTimeOffset=p.getInt32(ie):de.compositionTimeOffset=p.getUint32(ie),ie+=4),h.samples.push(de);return h},Ru=tm,Vu={tfdt:Qa,trun:Ru},Fu={parseTfdt:Vu.tfdt,parseTrun:Vu.trun},im=function(u){for(var h=0,p=String.fromCharCode(u[h]),f="";p!=="\0";)f+=p,h++,p=String.fromCharCode(u[h]);return f+=p,f},nm={uint8ToCString:im},As=nm.uint8ToCString,rm=a.getUint64,sm=function(u){var h=4,p=u[0],f,v,_,P,F,W,K,ie;if(p===0){f=As(u.subarray(h)),h+=f.length,v=As(u.subarray(h)),h+=v.length;var de=new DataView(u.buffer);_=de.getUint32(h),h+=4,F=de.getUint32(h),h+=4,W=de.getUint32(h),h+=4,K=de.getUint32(h),h+=4}else if(p===1){var de=new DataView(u.buffer);_=de.getUint32(h),h+=4,P=rm(u.subarray(h)),h+=8,W=de.getUint32(h),h+=4,K=de.getUint32(h),h+=4,f=As(u.subarray(h)),h+=f.length,v=As(u.subarray(h)),h+=v.length}ie=new Uint8Array(u.subarray(h,u.byteLength));var xe={scheme_id_uri:f,value:v,timescale:_||1,presentation_time:P,presentation_time_delta:F,event_duration:W,id:K,message_data:ie};return om(p,xe)?xe:void 0},am=function(u,h,p,f){return u||u===0?u/h:f+p/h},om=function(u,h){var p=h.scheme_id_uri!=="\0",f=u===0&&$u(h.presentation_time_delta)&&p,v=u===1&&$u(h.presentation_time)&&p;return!(u>1)&&f||v},$u=function(u){return u!==void 0||u!==null},lm={parseEmsgBox:sm,scaleTime:am},Nr;typeof window<"u"?Nr=window:typeof r<"u"?Nr=r:typeof self<"u"?Nr=self:Nr={};var Uu=Nr,Is=Ds.toUnsigned,Or=Ds.toHexString,bt=Ka,Un=Bu,Za=lm,um=Pu,cm=Ru,dm=Qa,hm=a.getUint64,zu,Hu,qu,ju,Gu,Ja,Wu,eo=Uu,fm=vu.parseId3Frames;zu=function(u){var h={},p=bt(u,["moov","trak"]);return p.reduce(function(f,v){var _,P,F,W,K;return _=bt(v,["tkhd"])[0],!_||(P=_[0],F=P===0?12:20,W=Is(_[F]<<24|_[F+1]<<16|_[F+2]<<8|_[F+3]),K=bt(v,["mdia","mdhd"])[0],!K)?null:(P=K[0],F=P===0?12:20,f[W]=Is(K[F]<<24|K[F+1]<<16|K[F+2]<<8|K[F+3]),f)},h)},Hu=function(u,h){var p;p=bt(h,["moof","traf"]);var f=p.reduce(function(v,_){var P=bt(_,["tfhd"])[0],F=Is(P[4]<<24|P[5]<<16|P[6]<<8|P[7]),W=u[F]||9e4,K=bt(_,["tfdt"])[0],ie=new DataView(K.buffer,K.byteOffset,K.byteLength),de;K[0]===1?de=hm(K.subarray(4,12)):de=ie.getUint32(4);let xe;return typeof de=="bigint"?xe=de/eo.BigInt(W):typeof de=="number"&&!isNaN(de)&&(xe=de/W),xe<Number.MAX_SAFE_INTEGER&&(xe=Number(xe)),xe<v&&(v=xe),v},1/0);return typeof f=="bigint"||isFinite(f)?f:0},qu=function(u,h){var p=bt(h,["moof","traf"]),f=0,v=0,_;if(p&&p.length){var P=bt(p[0],["tfhd"])[0],F=bt(p[0],["trun"])[0],W=bt(p[0],["tfdt"])[0];if(P){var K=um(P);_=K.trackId}if(W){var ie=dm(W);f=ie.baseMediaDecodeTime}if(F){var de=cm(F);de.samples&&de.samples.length&&(v=de.samples[0].compositionTimeOffset||0)}}var xe=u[_]||9e4;typeof f=="bigint"&&(v=eo.BigInt(v),xe=eo.BigInt(xe));var fe=(f+v)/xe;return typeof fe=="bigint"&&fe<Number.MAX_SAFE_INTEGER&&(fe=Number(fe)),fe},ju=function(u){var h=bt(u,["moov","trak"]),p=[];return h.forEach(function(f){var v=bt(f,["mdia","hdlr"]),_=bt(f,["tkhd"]);v.forEach(function(P,F){var W=Un(P.subarray(8,12)),K=_[F],ie,de,xe;W==="vide"&&(ie=new DataView(K.buffer,K.byteOffset,K.byteLength),de=ie.getUint8(0),xe=de===0?ie.getUint32(12):ie.getUint32(20),p.push(xe))})}),p},Ja=function(u){var h=u[0],p=h===0?12:20;return Is(u[p]<<24|u[p+1]<<16|u[p+2]<<8|u[p+3])},Gu=function(u){var h=bt(u,["moov","trak"]),p=[];return h.forEach(function(f){var v={},_=bt(f,["tkhd"])[0],P,F;_&&(P=new DataView(_.buffer,_.byteOffset,_.byteLength),F=P.getUint8(0),v.id=F===0?P.getUint32(12):P.getUint32(20));var W=bt(f,["mdia","hdlr"])[0];if(W){var K=Un(W.subarray(8,12));K==="vide"?v.type="video":K==="soun"?v.type="audio":v.type=K}var ie=bt(f,["mdia","minf","stbl","stsd"])[0];if(ie){var de=ie.subarray(8);v.codec=Un(de.subarray(4,8));var xe=bt(de,[v.codec])[0],fe,Oe;xe&&(/^[asm]vc[1-9]$/i.test(v.codec)?(fe=xe.subarray(78),Oe=Un(fe.subarray(4,8)),Oe==="avcC"&&fe.length>11?(v.codec+=".",v.codec+=Or(fe[9]),v.codec+=Or(fe[10]),v.codec+=Or(fe[11])):v.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(v.codec)?(fe=xe.subarray(28),Oe=Un(fe.subarray(4,8)),Oe==="esds"&&fe.length>20&&fe[19]!==0?(v.codec+="."+Or(fe[19]),v.codec+="."+Or(fe[20]>>>2&63).replace(/^0/,"")):v.codec="mp4a.40.2"):v.codec=v.codec.toLowerCase())}var He=bt(f,["mdia","mdhd"])[0];He&&(v.timescale=Ja(He)),p.push(v)}),p},Wu=function(u,h=0){var p=bt(u,["emsg"]);return p.map(f=>{var v=Za.parseEmsgBox(new Uint8Array(f)),_=fm(v.message_data);return{cueTime:Za.scaleTime(v.presentation_time,v.timescale,v.presentation_time_delta,h),duration:Za.scaleTime(v.event_duration,v.timescale),frames:_}})};var Br={findBox:bt,parseType:Un,timescale:zu,startTime:Hu,compositionStartTime:qu,videoTrackIds:ju,tracks:Gu,getTimescaleFromMediaHeader:Ja,getEmsgID3:Wu};const{parseTrun:pm}=Fu,{findBox:Yu}=Br;var Xu=Uu,mm=function(u){var h=Yu(u,["moof","traf"]),p=Yu(u,["mdat"]),f=[];return p.forEach(function(v,_){var P=h[_];f.push({mdat:v,traf:P})}),f},gm=function(u,h,p){var f=h,v=p.defaultSampleDuration||0,_=p.defaultSampleSize||0,P=p.trackId,F=[];return u.forEach(function(W){var K=pm(W),ie=K.samples;ie.forEach(function(de){de.duration===void 0&&(de.duration=v),de.size===void 0&&(de.size=_),de.trackId=P,de.dts=f,de.compositionTimeOffset===void 0&&(de.compositionTimeOffset=0),typeof f=="bigint"?(de.pts=f+Xu.BigInt(de.compositionTimeOffset),f+=Xu.BigInt(de.duration)):(de.pts=f+de.compositionTimeOffset,f+=de.duration)}),F=F.concat(ie)}),F},Ku={getMdatTrafPairs:mm,parseSamples:gm},vm=zt.discardEmulationPreventionBytes,ym=te.CaptionStream,to=Ka,_m=Qa,Tm=Pu,{getMdatTrafPairs:bm,parseSamples:Cm}=Ku,xm=function(u,h){for(var p=u,f=0;f<h.length;f++){var v=h[f];if(p<v.size)return v;p-=v.size}return null},Sm=function(u,h,p){var f=new DataView(u.buffer,u.byteOffset,u.byteLength),v={logs:[],seiNals:[]},_,P,F,W;for(P=0;P+4<u.length;P+=F)if(F=f.getUint32(P),P+=4,!(F<=0))switch(u[P]&31){case 6:var K=u.subarray(P+1,P+1+F),ie=xm(P,h);if(_={nalUnitType:"sei_rbsp",size:F,data:K,escapedRBSP:vm(K),trackId:p},ie)_.pts=ie.pts,_.dts=ie.dts,W=ie;else if(W)_.pts=W.pts,_.dts=W.dts;else{v.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+P+" for trackId "+p+". See mux.js#223."});break}v.seiNals.push(_);break}return v},Em=function(u,h){var p={},f=bm(u);return f.forEach(function(v){var _=v.mdat,P=v.traf,F=to(P,["tfhd"]),W=Tm(F[0]),K=W.trackId,ie=to(P,["tfdt"]),de=ie.length>0?_m(ie[0]).baseMediaDecodeTime:0,xe=to(P,["trun"]),fe,Oe;h===K&&xe.length>0&&(fe=Cm(xe,de,W),Oe=Sm(_,fe,K),p[K]||(p[K]={seiNals:[],logs:[]}),p[K].seiNals=p[K].seiNals.concat(Oe.seiNals),p[K].logs=p[K].logs.concat(Oe.logs))}),p},km=function(u,h,p){var f;if(h===null)return null;f=Em(u,h);var v=f[h]||{};return{seiNals:v.seiNals,logs:v.logs,timescale:p}},wm=function(){var u=!1,h,p,f,v,_,P;this.isInitialized=function(){return u},this.init=function(F){h=new ym,u=!0,P=F?F.isPartial:!1,h.on("data",function(W){W.startTime=W.startPts/v,W.endTime=W.endPts/v,_.captions.push(W),_.captionStreams[W.stream]=!0}),h.on("log",function(W){_.logs.push(W)})},this.isNewInit=function(F,W){return F&&F.length===0||W&&typeof W=="object"&&Object.keys(W).length===0?!1:f!==F[0]||v!==W[f]},this.parse=function(F,W,K){var ie;if(this.isInitialized()){if(!W||!K)return null;if(this.isNewInit(W,K))f=W[0],v=K[f];else if(f===null||!v)return p.push(F),null}else return null;for(;p.length>0;){var de=p.shift();this.parse(de,W,K)}return ie=km(F,f,v),ie&&ie.logs&&(_.logs=_.logs.concat(ie.logs)),ie===null||!ie.seiNals?_.logs.length?{logs:_.logs,captions:[],captionStreams:[]}:null:(this.pushNals(ie.seiNals),this.flushStream(),_)},this.pushNals=function(F){if(!this.isInitialized()||!F||F.length===0)return null;F.forEach(function(W){h.push(W)})},this.flushStream=function(){if(!this.isInitialized())return null;P?h.partialFlush():h.flush()},this.clearParsedCaptions=function(){_.captions=[],_.captionStreams={},_.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;h.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){p=[],f=null,v=null,_?this.clearParsedCaptions():_={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},Dm=wm;const{parseTfdt:Am}=Fu,an=Ka,{getTimescaleFromMediaHeader:Im}=Br,{parseSamples:Nm,getMdatTrafPairs:Om}=Ku;var Qu=function(){let u=9e4;this.init=function(h){const p=an(h,["moov","trak","mdia","mdhd"])[0];p&&(u=Im(p))},this.parseSegment=function(h){const p=[],f=Om(h);let v=0;return f.forEach(function(_){const P=_.mdat,F=_.traf,W=an(F,["tfdt"])[0],K=an(F,["tfhd"])[0],ie=an(F,["trun"]);if(W&&(v=Am(W).baseMediaDecodeTime),ie.length&&K){const de=Nm(ie,v,K);let xe=0;de.forEach(function(fe){const Oe="utf-8",He=new TextDecoder(Oe),Bt=P.slice(xe,xe+fe.size);if(an(Bt,["vtte"])[0]){xe+=fe.size;return}an(Bt,["vttc"]).forEach(function(Lr){const Pr=an(Lr,["payl"])[0],Mr=an(Lr,["sttg"])[0],Rr=fe.pts/u,Bs=(fe.pts+fe.duration)/u;let dt,Vr;if(Pr)try{dt=He.decode(Pr)}catch(Di){console.error(Di)}if(Mr)try{Vr=He.decode(Mr)}catch(Di){console.error(Di)}fe.duration&&dt&&p.push({cueText:dt,start:Rr,end:Bs,settings:Vr})}),xe+=fe.size})}}),p}},io=ve,Zu=function(u){var h=u[1]&31;return h<<=8,h|=u[2],h},Ns=function(u){return!!(u[1]&64)},Os=function(u){var h=0;return(u[3]&48)>>>4>1&&(h+=u[4]+1),h},Bm=function(u,h){var p=Zu(u);return p===0?"pat":p===h?"pmt":h?"pes":null},Lm=function(u){var h=Ns(u),p=4+Os(u);return h&&(p+=u[p]+1),(u[p+10]&31)<<8|u[p+11]},Pm=function(u){var h={},p=Ns(u),f=4+Os(u);if(p&&(f+=u[f]+1),!!(u[f+5]&1)){var v,_,P;v=(u[f+1]&15)<<8|u[f+2],_=3+v-4,P=(u[f+10]&15)<<8|u[f+11];for(var F=12+P;F<_;){var W=f+F;h[(u[W+1]&31)<<8|u[W+2]]=u[W],F+=((u[W+3]&15)<<8|u[W+4])+5}return h}},Mm=function(u,h){var p=Zu(u),f=h[p];switch(f){case io.H264_STREAM_TYPE:return"video";case io.ADTS_STREAM_TYPE:return"audio";case io.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},Rm=function(u){var h=Ns(u);if(!h)return null;var p=4+Os(u);if(p>=u.byteLength)return null;var f=null,v;return v=u[p+7],v&192&&(f={},f.pts=(u[p+9]&14)<<27|(u[p+10]&255)<<20|(u[p+11]&254)<<12|(u[p+12]&255)<<5|(u[p+13]&254)>>>3,f.pts*=4,f.pts+=(u[p+13]&6)>>>1,f.dts=f.pts,v&64&&(f.dts=(u[p+14]&14)<<27|(u[p+15]&255)<<20|(u[p+16]&254)<<12|(u[p+17]&255)<<5|(u[p+18]&254)>>>3,f.dts*=4,f.dts+=(u[p+18]&6)>>>1)),f},no=function(u){switch(u){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Vm=function(u){for(var h=4+Os(u),p=u.subarray(h),f=0,v=0,_=!1,P;v<p.byteLength-3;v++)if(p[v+2]===1){f=v+5;break}for(;f<p.byteLength;)switch(p[f]){case 0:if(p[f-1]!==0){f+=2;break}else if(p[f-2]!==0){f++;break}v+3!==f-2&&(P=no(p[v+3]&31),P==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0));do f++;while(p[f]!==1&&f<p.length);v=f-2,f+=3;break;case 1:if(p[f-1]!==0||p[f-2]!==0){f+=3;break}P=no(p[v+3]&31),P==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0),v=f-2,f+=3;break;default:f+=3;break}return p=p.subarray(v),f-=v,v=0,p&&p.byteLength>3&&(P=no(p[v+3]&31),P==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0)),_},Fm={parseType:Bm,parsePat:Lm,parsePmt:Pm,parsePayloadUnitStartIndicator:Ns,parsePesType:Mm,parsePesTime:Rm,videoPacketContainsKeyFrame:Vm},Ju=ve,zn=yt.handleRollover,ot={};ot.ts=Fm,ot.aac=Xa;var xn=Fe.ONE_SECOND_IN_TS,Kt=188,Pi=71,$m=function(u,h){for(var p=0,f=Kt,v,_;f<u.byteLength;){if(u[p]===Pi&&u[f]===Pi){switch(v=u.subarray(p,f),_=ot.ts.parseType(v,h.pid),_){case"pat":h.pid=ot.ts.parsePat(v);break;case"pmt":var P=ot.ts.parsePmt(v);h.table=h.table||{},Object.keys(P).forEach(function(F){h.table[F]=P[F]});break}p+=Kt,f+=Kt;continue}p++,f++}},ec=function(u,h,p){for(var f=0,v=Kt,_,P,F,W,K,ie=!1;v<=u.byteLength;){if(u[f]===Pi&&(u[v]===Pi||v===u.byteLength)){switch(_=u.subarray(f,v),P=ot.ts.parseType(_,h.pid),P){case"pes":F=ot.ts.parsePesType(_,h.table),W=ot.ts.parsePayloadUnitStartIndicator(_),F==="audio"&&W&&(K=ot.ts.parsePesTime(_),K&&(K.type="audio",p.audio.push(K),ie=!0));break}if(ie)break;f+=Kt,v+=Kt;continue}f++,v++}for(v=u.byteLength,f=v-Kt,ie=!1;f>=0;){if(u[f]===Pi&&(u[v]===Pi||v===u.byteLength)){switch(_=u.subarray(f,v),P=ot.ts.parseType(_,h.pid),P){case"pes":F=ot.ts.parsePesType(_,h.table),W=ot.ts.parsePayloadUnitStartIndicator(_),F==="audio"&&W&&(K=ot.ts.parsePesTime(_),K&&(K.type="audio",p.audio.push(K),ie=!0));break}if(ie)break;f-=Kt,v-=Kt;continue}f--,v--}},Um=function(u,h,p){for(var f=0,v=Kt,_,P,F,W,K,ie,de,xe,fe=!1,Oe={data:[],size:0};v<u.byteLength;){if(u[f]===Pi&&u[v]===Pi){switch(_=u.subarray(f,v),P=ot.ts.parseType(_,h.pid),P){case"pes":if(F=ot.ts.parsePesType(_,h.table),W=ot.ts.parsePayloadUnitStartIndicator(_),F==="video"&&(W&&!fe&&(K=ot.ts.parsePesTime(_),K&&(K.type="video",p.video.push(K),fe=!0)),!p.firstKeyFrame)){if(W&&Oe.size!==0){for(ie=new Uint8Array(Oe.size),de=0;Oe.data.length;)xe=Oe.data.shift(),ie.set(xe,de),de+=xe.byteLength;if(ot.ts.videoPacketContainsKeyFrame(ie)){var He=ot.ts.parsePesTime(ie);He?(p.firstKeyFrame=He,p.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}Oe.size=0}Oe.data.push(_),Oe.size+=_.byteLength}break}if(fe&&p.firstKeyFrame)break;f+=Kt,v+=Kt;continue}f++,v++}for(v=u.byteLength,f=v-Kt,fe=!1;f>=0;){if(u[f]===Pi&&u[v]===Pi){switch(_=u.subarray(f,v),P=ot.ts.parseType(_,h.pid),P){case"pes":F=ot.ts.parsePesType(_,h.table),W=ot.ts.parsePayloadUnitStartIndicator(_),F==="video"&&W&&(K=ot.ts.parsePesTime(_),K&&(K.type="video",p.video.push(K),fe=!0));break}if(fe)break;f-=Kt,v-=Kt;continue}f--,v--}},zm=function(u,h){if(u.audio&&u.audio.length){var p=h;(typeof p>"u"||isNaN(p))&&(p=u.audio[0].dts),u.audio.forEach(function(_){_.dts=zn(_.dts,p),_.pts=zn(_.pts,p),_.dtsTime=_.dts/xn,_.ptsTime=_.pts/xn})}if(u.video&&u.video.length){var f=h;if((typeof f>"u"||isNaN(f))&&(f=u.video[0].dts),u.video.forEach(function(_){_.dts=zn(_.dts,f),_.pts=zn(_.pts,f),_.dtsTime=_.dts/xn,_.ptsTime=_.pts/xn}),u.firstKeyFrame){var v=u.firstKeyFrame;v.dts=zn(v.dts,f),v.pts=zn(v.pts,f),v.dtsTime=v.dts/xn,v.ptsTime=v.pts/xn}}},Hm=function(u){for(var h=!1,p=0,f=null,v=null,_=0,P=0,F;u.length-P>=3;){var W=ot.aac.parseType(u,P);switch(W){case"timed-metadata":if(u.length-P<10){h=!0;break}if(_=ot.aac.parseId3TagSize(u,P),_>u.length){h=!0;break}v===null&&(F=u.subarray(P,P+_),v=ot.aac.parseAacTimestamp(F)),P+=_;break;case"audio":if(u.length-P<7){h=!0;break}if(_=ot.aac.parseAdtsSize(u,P),_>u.length){h=!0;break}f===null&&(F=u.subarray(P,P+_),f=ot.aac.parseSampleRate(F)),p++,P+=_;break;default:P++;break}if(h)return null}if(f===null||v===null)return null;var K=xn/f,ie={audio:[{type:"audio",dts:v,pts:v},{type:"audio",dts:v+p*1024*K,pts:v+p*1024*K}]};return ie},qm=function(u){var h={pid:null,table:null},p={};$m(u,h);for(var f in h.table)if(h.table.hasOwnProperty(f)){var v=h.table[f];switch(v){case Ju.H264_STREAM_TYPE:p.video=[],Um(u,h,p),p.video.length===0&&delete p.video;break;case Ju.ADTS_STREAM_TYPE:p.audio=[],ec(u,h,p),p.audio.length===0&&delete p.audio;break}}return p},jm=function(u,h){var p=ot.aac.isLikelyAacData(u),f;return p?f=Hm(u):f=qm(u),!f||!f.audio&&!f.video?null:(zm(f,h),f)},Gm={inspect:jm,parseAudioPes_:ec};const Wm=function(u,h){h.on("data",function(p){const f=p.initSegment;p.initSegment={data:f.buffer,byteOffset:f.byteOffset,byteLength:f.byteLength};const v=p.data;p.data=v.buffer,u.postMessage({action:"data",segment:p,byteOffset:v.byteOffset,byteLength:v.byteLength},[p.data])}),h.on("done",function(p){u.postMessage({action:"done"})}),h.on("gopInfo",function(p){u.postMessage({action:"gopInfo",gopInfo:p})}),h.on("videoSegmentTimingInfo",function(p){const f={start:{decode:Fe.videoTsToSeconds(p.start.dts),presentation:Fe.videoTsToSeconds(p.start.pts)},end:{decode:Fe.videoTsToSeconds(p.end.dts),presentation:Fe.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:Fe.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=Fe.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:f})}),h.on("audioSegmentTimingInfo",function(p){const f={start:{decode:Fe.videoTsToSeconds(p.start.dts),presentation:Fe.videoTsToSeconds(p.start.pts)},end:{decode:Fe.videoTsToSeconds(p.end.dts),presentation:Fe.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:Fe.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=Fe.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:f})}),h.on("id3Frame",function(p){u.postMessage({action:"id3Frame",id3Frame:p})}),h.on("caption",function(p){u.postMessage({action:"caption",caption:p})}),h.on("trackinfo",function(p){u.postMessage({action:"trackinfo",trackInfo:p})}),h.on("audioTimingInfo",function(p){u.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:Fe.videoTsToSeconds(p.start),end:Fe.videoTsToSeconds(p.end)}})}),h.on("videoTimingInfo",function(p){u.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:Fe.videoTsToSeconds(p.start),end:Fe.videoTsToSeconds(p.end)}})}),h.on("log",function(p){u.postMessage({action:"log",log:p})})};class tc{constructor(h,p){this.options=p||{},this.self=h,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Hp.Transmuxer(this.options),Wm(this.self,this.transmuxer)}pushMp4Captions(h){this.captionParser||(this.captionParser=new Dm,this.captionParser.init());const p=new Uint8Array(h.data,h.byteOffset,h.byteLength),f=this.captionParser.parse(p,h.trackIds,h.timescales);this.self.postMessage({action:"mp4Captions",captions:f&&f.captions||[],logs:f&&f.logs||[],data:p.buffer},[p.buffer])}initMp4WebVttParser(h){this.webVttParser||(this.webVttParser=new Qu);const p=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.webVttParser.init(p)}getMp4WebVttText(h){this.webVttParser||(this.webVttParser=new Qu);const p=new Uint8Array(h.data,h.byteOffset,h.byteLength),f=this.webVttParser.parseSegment(p);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:f||[],data:p.buffer},[p.buffer])}probeMp4StartTime({timescales:h,data:p}){const f=Br.startTime(h,p);this.self.postMessage({action:"probeMp4StartTime",startTime:f,data:p},[p.buffer])}probeMp4Tracks({data:h}){const p=Br.tracks(h);this.self.postMessage({action:"probeMp4Tracks",tracks:p,data:h},[h.buffer])}probeEmsgID3({data:h,offset:p}){const f=Br.getEmsgID3(h,p);this.self.postMessage({action:"probeEmsgID3",id3Frames:f,emsgData:h},[h.buffer])}probeTs({data:h,baseStartTime:p}){const f=typeof p=="number"&&!isNaN(p)?p*Fe.ONE_SECOND_IN_TS:void 0,v=Gm.inspect(h,f);let _=null;v&&(_={hasVideo:v.video&&v.video.length===2||!1,hasAudio:v.audio&&v.audio.length===2||!1},_.hasVideo&&(_.videoStart=v.video[0].ptsTime),_.hasAudio&&(_.audioStart=v.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:_,data:h},[h.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(h){const p=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.transmuxer.push(p)}reset(){this.transmuxer.reset()}setTimestampOffset(h){const p=h.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(Fe.secondsToVideoTs(p)))}setAudioAppendStart(h){this.transmuxer.setAudioAppendStart(Math.ceil(Fe.secondsToVideoTs(h.appendStart)))}setRemux(h){this.transmuxer.setRemux(h.remux)}flush(h){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(h){this.transmuxer.alignGopsWith(h.gopsToAlignWith.slice())}}self.onmessage=function(u){if(u.data.action==="init"&&u.data.options){this.messageHandlers=new tc(self,u.data.options);return}this.messageHandlers||(this.messageHandlers=new tc(self)),u.data&&u.data.action&&u.data.action!=="init"&&this.messageHandlers[u.data.action]&&this.messageHandlers[u.data.action](u.data)}}));var i8=Rf(t8);const n8=(r,e,i)=>{const{type:n,initSegment:s,captions:a,captionStreams:o,metadata:l,videoFrameDtsTime:c,videoFramePtsTime:d}=r.data.segment;e.buffer.push({captions:a,captionStreams:o,metadata:l});const m=r.data.segment.boxes||{data:r.data.segment.data},g={type:n,data:new Uint8Array(m.data,m.data.byteOffset,m.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};typeof c<"u"&&(g.videoFrameDtsTime=c),typeof d<"u"&&(g.videoFramePtsTime=d),i(g)},r8=({transmuxedData:r,callback:e})=>{r.buffer=[],e(r)},s8=(r,e)=>{e.gopInfo=r.data.gopInfo},$f=r=>{const{transmuxer:e,bytes:i,audioAppendStart:n,gopsToAlignWith:s,remux:a,onData:o,onTrackInfo:l,onAudioTimingInfo:c,onVideoTimingInfo:d,onVideoSegmentTimingInfo:m,onAudioSegmentTimingInfo:g,onId3:S,onCaptions:T,onDone:b,onEndedTimeline:y,onTransmuxerLog:x,isEndOfTimeline:N,segment:I,triggerSegmentEventFn:D}=r,z={buffer:[]};let H=N;const U=G=>{e.currentTransmux===r&&(G.data.action==="data"&&n8(G,z,o),G.data.action==="trackinfo"&&l(G.data.trackInfo),G.data.action==="gopInfo"&&s8(G,z),G.data.action==="audioTimingInfo"&&c(G.data.audioTimingInfo),G.data.action==="videoTimingInfo"&&d(G.data.videoTimingInfo),G.data.action==="videoSegmentTimingInfo"&&m(G.data.videoSegmentTimingInfo),G.data.action==="audioSegmentTimingInfo"&&g(G.data.audioSegmentTimingInfo),G.data.action==="id3Frame"&&S([G.data.id3Frame],G.data.id3Frame.dispatchType),G.data.action==="caption"&&T(G.data.caption),G.data.action==="endedtimeline"&&(H=!1,y()),G.data.action==="log"&&x(G.data.log),G.data.type==="transmuxed"&&(H||(e.onmessage=null,r8({transmuxedData:z,callback:b}),Uf(e))))},B=()=>{const G={message:"Received an error message from the transmuxer worker",metadata:{errorType:ae.Error.StreamingFailedToTransmuxSegment,segmentInfo:Dn({segment:I})}};b(null,G)};if(e.onmessage=U,e.onerror=B,n&&e.postMessage({action:"setAudioAppendStart",appendStart:n}),Array.isArray(s)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:s}),typeof a<"u"&&e.postMessage({action:"setRemux",remux:a}),i.byteLength){const G=i instanceof ArrayBuffer?i:i.buffer,C=i instanceof ArrayBuffer?0:i.byteOffset;D({type:"segmenttransmuxingstart",segment:I}),e.postMessage({action:"push",data:G,byteOffset:C,byteLength:i.byteLength},[G])}N&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},Uf=r=>{r.currentTransmux=null,r.transmuxQueue.length&&(r.currentTransmux=r.transmuxQueue.shift(),typeof r.currentTransmux=="function"?r.currentTransmux():$f(r.currentTransmux))},Pd=(r,e)=>{r.postMessage({action:e}),Uf(r)},zf=(r,e)=>{if(!e.currentTransmux){e.currentTransmux=r,Pd(e,r);return}e.transmuxQueue.push(Pd.bind(null,e,r))},a8=r=>{zf("reset",r)},o8=r=>{zf("endTimeline",r)},Hf=r=>{if(!r.transmuxer.currentTransmux){r.transmuxer.currentTransmux=r,$f(r);return}r.transmuxer.transmuxQueue.push(r)},l8=r=>{const e=new i8;e.currentTransmux=null,e.transmuxQueue=[];const i=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,i.call(e)),e.postMessage({action:"init",options:r}),e};var Wo={reset:a8,endTimeline:o8,transmux:Hf,createTransmuxer:l8};const er=function(r){const e=r.transmuxer,i=r.endAction||r.action,n=r.callback,s=Ct({},r,{endAction:null,transmuxer:null,callback:null}),a=o=>{o.data.action===i&&(e.removeEventListener("message",a),o.data.data&&(o.data.data=new Uint8Array(o.data.data,r.byteOffset||0,r.byteLength||o.data.data.byteLength),r.data&&(r.data=o.data.data)),n(o.data))};if(e.addEventListener("message",a),r.data){const o=r.data instanceof ArrayBuffer;s.byteOffset=o?0:r.data.byteOffset,s.byteLength=r.data.byteLength;const l=[o?r.data:r.data.buffer];e.postMessage(s,l)}else e.postMessage(s)},zi={FAILURE:2,TIMEOUT:-101,ABORTED:-102},qf="wvtt",Cl=r=>{r.forEach(e=>{e.abort()})},u8=r=>({bandwidth:r.bandwidth,bytesReceived:r.bytesReceived||0,roundTripTime:r.roundTripTime||0}),c8=r=>{const e=r.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return n.bytesReceived=r.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n},pu=(r,e)=>{const{requestType:i}=e,n=Mn({requestType:i,request:e,error:r});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:zi.TIMEOUT,xhr:e,metadata:n}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:zi.ABORTED,xhr:e,metadata:n}:r?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:zi.FAILURE,xhr:e,metadata:n}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:zi.FAILURE,xhr:e,metadata:n}:null},Md=(r,e,i,n)=>(s,a)=>{const o=a.response,l=pu(s,a);if(l)return i(l,r);if(o.byteLength!==16)return i({status:a.status,message:"Invalid HLS key at URL: "+a.uri,code:zi.FAILURE,xhr:a},r);const c=new DataView(o),d=new Uint32Array([c.getUint32(0),c.getUint32(4),c.getUint32(8),c.getUint32(12)]);for(let g=0;g<e.length;g++)e[g].bytes=d;const m={uri:a.uri};return n({type:"segmentkeyloadcomplete",segment:r,keyInfo:m}),i(null,r)},d8=(r,e)=>{e===qf&&r.transmuxer.postMessage({action:"initMp4WebVttParser",data:r.map.bytes})},h8=(r,e,i)=>{e===qf&&er({action:"getMp4WebVttText",data:r.bytes,transmuxer:r.transmuxer,callback:({data:n,mp4VttCues:s})=>{r.bytes=n,i(null,r,{mp4VttCues:s})}})},jf=(r,e)=>{const i=Rl(r.map.bytes);if(i!=="mp4"){const n=r.map.resolvedUri||r.map.uri,s=i||"unknown";return e({internal:!0,message:`Found unsupported ${s} container for initialization segment at URL: ${n}`,code:zi.FAILURE,metadata:{mediaType:s}})}er({action:"probeMp4Tracks",data:r.map.bytes,transmuxer:r.transmuxer,callback:({tracks:n,data:s})=>(r.map.bytes=s,n.forEach(function(a){r.map.tracks=r.map.tracks||{},!r.map.tracks[a.type]&&(r.map.tracks[a.type]=a,typeof a.id=="number"&&a.timescale&&(r.map.timescales=r.map.timescales||{},r.map.timescales[a.id]=a.timescale),a.type==="text"&&d8(r,a.codec))}),e(null))})},f8=({segment:r,finishProcessingFn:e,triggerSegmentEventFn:i})=>(n,s)=>{const a=pu(n,s);if(a)return e(a,r);const o=new Uint8Array(s.response);if(i({type:"segmentloaded",segment:r}),r.map.key)return r.map.encryptedBytes=o,e(null,r);r.map.bytes=o,jf(r,function(l){if(l)return l.xhr=s,l.status=s.status,e(l,r);e(null,r)})},p8=({segment:r,finishProcessingFn:e,responseType:i,triggerSegmentEventFn:n})=>(s,a)=>{const o=pu(s,a);if(o)return e(o,r);n({type:"segmentloaded",segment:r});const l=i==="arraybuffer"||!a.responseText?a.response:J4(a.responseText.substring(r.lastReachedChar||0));return r.stats=u8(a),r.key?r.encryptedBytes=new Uint8Array(l):r.bytes=new Uint8Array(l),e(null,r)},m8=({segment:r,bytes:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{const b=r.map&&r.map.tracks||{},y=!!(b.audio&&b.video);let x=n.bind(null,r,"audio","start");const N=n.bind(null,r,"audio","end");let I=n.bind(null,r,"video","start");const D=n.bind(null,r,"video","end"),z=()=>Hf({bytes:e,transmuxer:r.transmuxer,audioAppendStart:r.audioAppendStart,gopsToAlignWith:r.gopsToAlignWith,remux:y,onData:H=>{H.type=H.type==="combined"?"video":H.type,m(r,H)},onTrackInfo:H=>{i&&(y&&(H.isMuxed=!0),i(r,H))},onAudioTimingInfo:H=>{x&&typeof H.start<"u"&&(x(H.start),x=null),N&&typeof H.end<"u"&&N(H.end)},onVideoTimingInfo:H=>{I&&typeof H.start<"u"&&(I(H.start),I=null),D&&typeof H.end<"u"&&D(H.end)},onVideoSegmentTimingInfo:H=>{const U={pts:{start:H.start.presentation,end:H.end.presentation},dts:{start:H.start.decode,end:H.end.decode}};T({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:U}),s(H)},onAudioSegmentTimingInfo:H=>{const U={pts:{start:H.start.pts,end:H.end.pts},dts:{start:H.start.dts,end:H.end.dts}};T({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:U}),a(H)},onId3:(H,U)=>{o(r,H,U)},onCaptions:H=>{l(r,[H])},isEndOfTimeline:c,onEndedTimeline:()=>{d()},onTransmuxerLog:S,onDone:(H,U)=>{g&&(H.type=H.type==="combined"?"video":H.type,T({type:"segmenttransmuxingcomplete",segment:r}),g(U,r,H))},segment:r,triggerSegmentEventFn:T});er({action:"probeTs",transmuxer:r.transmuxer,data:e,baseStartTime:r.baseStartTime,callback:H=>{r.bytes=e=H.data;const U=H.result;U&&(i(r,{hasAudio:U.hasAudio,hasVideo:U.hasVideo,isMuxed:y}),i=null),z()}})},Gf=({segment:r,bytes:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{let b=new Uint8Array(e);if(MT(b)){r.isFmp4=!0;const{tracks:y}=r.map;if(y.text&&(!y.audio||!y.video)){m(r,{data:b,type:"text"}),h8(r,y.text.codec,g);return}const N={isFmp4:!0,hasVideo:!!y.video,hasAudio:!!y.audio};y.audio&&y.audio.codec&&y.audio.codec!=="enca"&&(N.audioCodec=y.audio.codec),y.video&&y.video.codec&&y.video.codec!=="encv"&&(N.videoCodec=y.video.codec),y.video&&y.audio&&(N.isMuxed=!0),i(r,N);const I=(D,z)=>{m(r,{data:b,type:N.hasAudio&&!N.isMuxed?"audio":"video"}),z&&z.length&&o(r,z),D&&D.length&&l(r,D),g(null,r,{})};er({action:"probeMp4StartTime",timescales:r.map.timescales,data:b,transmuxer:r.transmuxer,callback:({data:D,startTime:z})=>{e=D.buffer,r.bytes=b=D,N.hasAudio&&!N.isMuxed&&n(r,"audio","start",z),N.hasVideo&&n(r,"video","start",z),er({action:"probeEmsgID3",data:b,transmuxer:r.transmuxer,offset:z,callback:({emsgData:H,id3Frames:U})=>{if(e=H.buffer,r.bytes=b=H,!y.video||!H.byteLength||!r.transmuxer){I(void 0,U);return}er({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:r.transmuxer,data:b,timescales:r.map.timescales,trackIds:[y.video.id],callback:B=>{e=B.data.buffer,r.bytes=b=B.data,B.logs.forEach(function(G){S(at(G,{stream:"mp4CaptionParser"}))}),I(B.captions,U)}})}})}});return}if(!r.transmuxer){g(null,r,{});return}if(typeof r.container>"u"&&(r.container=Rl(b)),r.container!=="ts"&&r.container!=="aac"){i(r,{hasAudio:!1,hasVideo:!1}),g(null,r,{});return}m8({segment:r,bytes:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T})},Wf=function({id:r,key:e,encryptedBytes:i,decryptionWorker:n,segment:s,doneFn:a},o){const l=d=>{if(d.data.source===r){n.removeEventListener("message",l);const m=d.data.decrypted;o(new Uint8Array(m.bytes,m.byteOffset,m.byteLength))}};n.onerror=()=>{const d="An error occurred in the decryption worker",m=Dn({segment:s}),g={message:d,metadata:{error:new Error(d),errorType:ae.Error.StreamingFailedToDecryptSegment,segmentInfo:m,keyInfo:{uri:s.key.resolvedUri||s.map.key.resolvedUri}}};a(g,s)},n.addEventListener("message",l);let c;e.bytes.slice?c=e.bytes.slice():c=new Uint32Array(Array.prototype.slice.call(e.bytes)),n.postMessage(Nf({source:r,encrypted:i,key:c,iv:e.iv}),[i.buffer,c.buffer])},g8=({decryptionWorker:r,segment:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{T({type:"segmentdecryptionstart"}),Wf({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:r,segment:e,doneFn:g},b=>{e.bytes=b,T({type:"segmentdecryptioncomplete",segment:e}),Gf({segment:e,bytes:e.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T})})},v8=({activeXhrs:r,decryptionWorker:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{let b=0,y=!1;return(x,N)=>{if(!y){if(x)return y=!0,Cl(r),g(x,N);if(b+=1,b===r.length){const I=function(){if(N.encryptedBytes)return g8({decryptionWorker:e,segment:N,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T});Gf({segment:N,bytes:N.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T})};if(N.endOfAllRequests=Date.now(),N.map&&N.map.encryptedBytes&&!N.map.bytes)return T({type:"segmentdecryptionstart",segment:N}),Wf({decryptionWorker:e,id:N.requestId+"-init",encryptedBytes:N.map.encryptedBytes,key:N.map.key,segment:N,doneFn:g},D=>{N.map.bytes=D,T({type:"segmentdecryptioncomplete",segment:N}),jf(N,z=>{if(z)return Cl(r),g(z,N);I()})});I()}}}},y8=({loadendState:r,abortFn:e})=>i=>{i.target.aborted&&e&&!r.calledAbortFn&&(e(),r.calledAbortFn=!0)},_8=({segment:r,progressFn:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m})=>g=>{if(!g.target.aborted)return r.stats=at(r.stats,c8(g)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),e(g,r)},T8=({xhr:r,xhrOptions:e,decryptionWorker:i,segment:n,abortFn:s,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:m,captionsFn:g,isEndOfTimeline:S,endedTimelineFn:T,dataFn:b,doneFn:y,onTransmuxerLog:x,triggerSegmentEventFn:N})=>{const I=[],D=v8({activeXhrs:I,decryptionWorker:i,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:m,captionsFn:g,isEndOfTimeline:S,endedTimelineFn:T,dataFn:b,doneFn:y,onTransmuxerLog:x,triggerSegmentEventFn:N});if(n.key&&!n.key.bytes){const G=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&G.push(n.map.key);const C=at(e,{uri:n.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),k=Md(n,G,D,N),O={uri:n.key.resolvedUri};N({type:"segmentkeyloadstart",segment:n,keyInfo:O});const j=r(C,k);I.push(j)}if(n.map&&!n.map.bytes){if(n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri)){const j=at(e,{uri:n.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),L=Md(n,[n.map.key],D,N),V={uri:n.map.key.resolvedUri};N({type:"segmentkeyloadstart",segment:n,keyInfo:V});const M=r(j,L);I.push(M)}const C=at(e,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:Tl(n.map),requestType:"segment-media-initialization"}),k=f8({segment:n,finishProcessingFn:D,triggerSegmentEventFn:N});N({type:"segmentloadstart",segment:n});const O=r(C,k);I.push(O)}const z=at(e,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:Tl(n),requestType:"segment"}),H=p8({segment:n,finishProcessingFn:D,responseType:z.responseType,triggerSegmentEventFn:N});N({type:"segmentloadstart",segment:n});const U=r(z,H);U.addEventListener("progress",_8({segment:n,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:m,captionsFn:g,isEndOfTimeline:S,endedTimelineFn:T,dataFn:b})),I.push(U);const B={};return I.forEach(G=>{G.addEventListener("loadend",y8({loadendState:B,abortFn:s}))}),()=>Cl(I)},zs=xi("PlaylistSelector"),Rd=function(r){if(!r||!r.playlist)return;const e=r.playlist;return JSON.stringify({id:e.id,bandwidth:r.bandwidth,width:r.width,height:r.height,codecs:e.attributes&&e.attributes.CODECS||""})},tr=function(r,e){if(!r)return"";const i=Y.getComputedStyle(r);return i?i[e]:""},ir=function(r,e){const i=r.slice();r.sort(function(n,s){const a=e(n,s);return a===0?i.indexOf(n)-i.indexOf(s):a})},mu=function(r,e){let i,n;return r.attributes.BANDWIDTH&&(i=r.attributes.BANDWIDTH),i=i||Y.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||Y.Number.MAX_VALUE,i-n},b8=function(r,e){let i,n;return r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width&&(i=r.attributes.RESOLUTION.width),i=i||Y.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||Y.Number.MAX_VALUE,i===n&&r.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?r.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-n};let Yf=function(r){const{main:e,bandwidth:i,playerWidth:n,playerHeight:s,playerObjectFit:a,limitRenditionByPlayerDimensions:o,playlistController:l}=r;if(!e)return;const c={bandwidth:i,width:n,height:s,limitRenditionByPlayerDimensions:o};let d=e.playlists;oi.isAudioOnly(e)&&(d=l.getAudioTrackPlaylists_(),c.audioOnly=!0);let m=d.map(B=>{let G;const C=B.attributes&&B.attributes.RESOLUTION&&B.attributes.RESOLUTION.width,k=B.attributes&&B.attributes.RESOLUTION&&B.attributes.RESOLUTION.height;return G=B.attributes&&B.attributes.BANDWIDTH,G=G||Y.Number.MAX_VALUE,{bandwidth:G,width:C,height:k,playlist:B}});ir(m,(B,G)=>B.bandwidth-G.bandwidth),m=m.filter(B=>!oi.isIncompatible(B.playlist));let g=m.filter(B=>oi.isEnabled(B.playlist));g.length||(g=m.filter(B=>!oi.isDisabled(B.playlist)));const S=g.filter(B=>B.bandwidth*Lt.BANDWIDTH_VARIANCE<i);let T=S[S.length-1];const b=S.filter(B=>B.bandwidth===T.bandwidth)[0];if(o===!1){const B=b||g[0]||m[0];if(B&&B.playlist){let G="sortedPlaylistReps";return b&&(G="bandwidthBestRep"),g[0]&&(G="enabledPlaylistReps"),zs(`choosing ${Rd(B)} using ${G} with options`,c),B.playlist}return zs("could not choose a playlist with options",c),null}const y=S.filter(B=>B.width&&B.height);ir(y,(B,G)=>B.width-G.width);const x=y.filter(B=>B.width===n&&B.height===s);T=x[x.length-1];const N=x.filter(B=>B.bandwidth===T.bandwidth)[0];let I,D,z;N||(I=y.filter(B=>a==="cover"?B.width>n&&B.height>s:B.width>n||B.height>s),D=I.filter(B=>B.width===I[0].width&&B.height===I[0].height),T=D[D.length-1],z=D.filter(B=>B.bandwidth===T.bandwidth)[0]);let H;if(l.leastPixelDiffSelector){const B=y.map(G=>(G.pixelDiff=Math.abs(G.width-n)+Math.abs(G.height-s),G));ir(B,(G,C)=>G.pixelDiff===C.pixelDiff?C.bandwidth-G.bandwidth:G.pixelDiff-C.pixelDiff),H=B[0]}const U=H||z||N||b||g[0]||m[0];if(U&&U.playlist){let B="sortedPlaylistReps";return H?B="leastPixelDiffRep":z?B="resolutionPlusOneRep":N?B="resolutionBestRep":b?B="bandwidthBestRep":g[0]&&(B="enabledPlaylistReps"),zs(`choosing ${Rd(U)} using ${B} with options`,c),U.playlist}return zs("could not choose a playlist with options",c),null};const Vd=function(){let r=this.useDevicePixelRatio&&Y.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),Yf({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(tr(this.tech_.el(),"width"),10)*r,playerHeight:parseInt(tr(this.tech_.el(),"height"),10)*r,playerObjectFit:this.usePlayerObjectFit?tr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},C8=function(r){let e=-1,i=-1;if(r<0||r>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let n=this.useDevicePixelRatio&&Y.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(n=this.customPixelRatio),e<0&&(e=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(e=r*this.systemBandwidth+(1-r)*e,i=this.systemBandwidth),Yf({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(tr(this.tech_.el(),"width"),10)*n,playerHeight:parseInt(tr(this.tech_.el(),"height"),10)*n,playerObjectFit:this.usePlayerObjectFit?tr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},x8=function(r){const{main:e,currentTime:i,bandwidth:n,duration:s,segmentDuration:a,timeUntilRebuffer:o,currentTimeline:l,syncController:c}=r,d=e.playlists.filter(b=>!oi.isIncompatible(b));let m=d.filter(oi.isEnabled);m.length||(m=d.filter(b=>!oi.isDisabled(b)));const S=m.filter(oi.hasAttribute.bind(null,"BANDWIDTH")).map(b=>{const x=c.getSyncPoint(b,s,l,i)?1:2,I=oi.estimateSegmentRequestTime(a,n,b)*x-o;return{playlist:b,rebufferingImpact:I}}),T=S.filter(b=>b.rebufferingImpact<=0);return ir(T,(b,y)=>mu(y.playlist,b.playlist)),T.length?T[0]:(ir(S,(b,y)=>b.rebufferingImpact-y.rebufferingImpact),S[0]||null)},S8=function(){const r=this.playlists.main.playlists.filter(oi.isEnabled);return ir(r,(i,n)=>mu(i,n)),r.filter(i=>!!es(this.playlists.main,i).video)[0]||null},E8=r=>{let e=0,i;return r.bytes&&(i=new Uint8Array(r.bytes),r.segments.forEach(n=>{i.set(n,e),e+=n.byteLength})),i};function Xf(r){try{return new URL(r).pathname.split("/").slice(-2).join("/")}catch{return""}}const k8=function(r,e,i){if(!r[i]){e.trigger({type:"usage",name:"vhs-608"});let n=i;/^cc708_/.test(i)&&(n="SERVICE"+i.split("_")[1]);const s=e.textTracks().getTrackById(n);if(s)r[i]=s;else{const a=e.options_.vhs&&e.options_.vhs.captionServices||{};let o=i,l=i,c=!1;const d=a[n];d&&(o=d.label,l=d.language,c=d.default),r[i]=e.addRemoteTextTrack({kind:"captions",id:n,default:c,label:o,language:l},!1).track}}},w8=function({inbandTextTracks:r,captionArray:e,timestampOffset:i}){if(!e)return;const n=Y.WebKitDataCue||Y.VTTCue;e.forEach(s=>{const a=s.stream;s.content?s.content.forEach(o=>{const l=new n(s.startTime+i,s.endTime+i,o.text);l.line=o.line,l.align="left",l.position=o.position,l.positionAlign="line-left",r[a].addCue(l)}):r[a].addCue(new n(s.startTime+i,s.endTime+i,s.text))})},D8=function(r){Object.defineProperties(r.frame,{id:{get(){return ae.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),r.value.key}},value:{get(){return ae.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),r.value.data}},privateData:{get(){return ae.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),r.value.data}}})},A8=({inbandTextTracks:r,metadataArray:e,timestampOffset:i,videoDuration:n})=>{if(!e)return;const s=Y.WebKitDataCue||Y.VTTCue,a=r.metadataTrack_;if(!a||(e.forEach(m=>{const g=m.cueTime+i;typeof g!="number"||Y.isNaN(g)||g<0||!(g<1/0)||!m.frames||!m.frames.length||m.frames.forEach(S=>{const T=new s(g,g,S.value||S.url||S.data||"");T.frame=S,T.value=S,D8(T),a.addCue(T)})}),!a.cues||!a.cues.length))return;const o=a.cues,l=[];for(let m=0;m<o.length;m++)o[m]&&l.push(o[m]);const c=l.reduce((m,g)=>{const S=m[g.startTime]||[];return S.push(g),m[g.startTime]=S,m},{}),d=Object.keys(c).sort((m,g)=>Number(m)-Number(g));d.forEach((m,g)=>{const S=c[m],T=isFinite(n)?n:m,b=Number(d[g+1])||T;S.forEach(y=>{y.endTime=b})})},I8={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},N8=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),O8=({inbandTextTracks:r,dateRanges:e})=>{const i=r.metadataTrack_;if(!i)return;const n=Y.WebKitDataCue||Y.VTTCue;e.forEach(s=>{for(const a of Object.keys(s)){if(N8.has(a))continue;const o=new n(s.startTime,s.endTime,"");o.id=s.id,o.type="com.apple.quicktime.HLS",o.value={key:I8[a],data:s[a]},(a==="scte35Out"||a==="scte35In")&&(o.value.data=new Uint8Array(o.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(o)}s.processDateRange()})},Fd=(r,e,i)=>{r.metadataTrack_||(r.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,ae.browser.IS_ANY_SAFARI||(r.metadataTrack_.inBandMetadataTrackDispatchType=e))},Yr=function(r,e,i){let n,s;if(i&&i.cues)for(n=i.cues.length;n--;)s=i.cues[n],s.startTime>=r&&s.endTime<=e&&i.removeCue(s)},B8=function(r){const e=r.cues;if(!e)return;const i={};for(let n=e.length-1;n>=0;n--){const s=e[n],a=`${s.startTime}-${s.endTime}-${s.text}`;i[a]?r.removeCue(s):i[a]=s}},L8=(r,e,i)=>{if(typeof e>"u"||e===null||!r.length)return[];const n=Math.ceil((e-i+3)*An.ONE_SECOND_IN_TS);let s;for(s=0;s<r.length&&!(r[s].pts>n);s++);return r.slice(s)},P8=(r,e,i)=>{if(!e.length)return r;if(i)return e.slice();const n=e[0].pts;let s=0;for(s;s<r.length&&!(r[s].pts>=n);s++);return r.slice(0,s).concat(e)},M8=(r,e,i,n)=>{const s=Math.ceil((e-n)*An.ONE_SECOND_IN_TS),a=Math.ceil((i-n)*An.ONE_SECOND_IN_TS),o=r.slice();let l=r.length;for(;l--&&!(r[l].pts<=a););if(l===-1)return o;let c=l+1;for(;c--&&!(r[c].pts<=s););return c=Math.max(c,0),o.splice(c,l-c+1),o},R8=function(r,e){if(!r&&!e||!r&&e||r&&!e)return!1;if(r===e)return!0;const i=Object.keys(r).sort(),n=Object.keys(e).sort();if(i.length!==n.length)return!1;for(let s=0;s<i.length;s++){const a=i[s];if(a!==n[s]||r[a]!==e[a])return!1}return!0},V8=function(r,e,i){e=e||[];const n=[];let s=0;for(let a=0;a<e.length;a++){const o=e[a];if(r===o.timeline&&(n.push(a),s+=o.duration,s>i))return a}return n.length===0?0:n[n.length-1]},qr=1,F8=500,$d=r=>typeof r=="number"&&isFinite(r),Hs=1/60,$8=(r,e,i)=>r!=="main"||!e||!i?null:!i.hasAudio&&!i.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,U8=(r,e,i)=>{let n=e-Lt.BACK_BUFFER_LENGTH;r.length&&(n=Math.max(n,r.start(0)));const s=e-i;return Math.min(s,n)},jn=r=>{const{startOfSegment:e,duration:i,segment:n,part:s,playlist:{mediaSequence:a,id:o,segments:l=[]},mediaIndex:c,partIndex:d,timeline:m}=r,g=l.length-1;let S="mediaIndex/partIndex increment";r.getMediaInfoForTime?S=`getMediaInfoForTime (${r.getMediaInfoForTime})`:r.isSyncRequest&&(S="getSyncSegmentCandidate (isSyncRequest)"),r.independent&&(S+=` with independent ${r.independent}`);const T=typeof d=="number",b=r.segment.uri?"segment":"pre-segment",y=T?ff({preloadSegment:n})-1:0;return`${b} [${a+c}/${a+g}]`+(T?` part [${d}/${y}]`:"")+` segment start/end [${n.start} => ${n.end}]`+(T?` part start/end [${s.start} => ${s.end}]`:"")+` startOfSegment [${e}] duration [${i}] timeline [${m}] selected by [${S}] playlist [${o}]`},Ud=r=>`${r}TimingInfo`,z8=({segmentTimeline:r,currentTimeline:e,startOfSegment:i,buffered:n,overrideCheck:s})=>!s&&r===e?null:r<e?i:n.length?n.end(n.length-1):i,xl=({timelineChangeController:r,currentTimeline:e,segmentTimeline:i,loaderType:n,audioDisabled:s})=>{if(e===i)return!1;if(n==="audio"){const a=r.lastTimelineChange({type:"main"});return!a||a.to!==i}if(n==="main"&&s){const a=r.pendingTimelineChange({type:"audio"});return!(a&&a.to===i)}return!1},H8=r=>{if(!r)return!1;const e=r.pendingTimelineChange({type:"audio"}),i=r.pendingTimelineChange({type:"main"}),n=e&&i,s=n&&e.to!==i.to;return!!(n&&e.from!==-1&&i.from!==-1&&s)},q8=r=>{const e=r.timelineChangeController_.pendingTimelineChange({type:"audio"}),i=r.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&i&&e.to<i.to},cn=r=>{const e=r.pendingSegment_;if(!e)return;if(xl({timelineChangeController:r.timelineChangeController_,currentTimeline:r.currentTimeline_,segmentTimeline:e.timeline,loaderType:r.loaderType_,audioDisabled:r.audioDisabled_})&&H8(r.timelineChangeController_)){if(q8(r)){r.timelineChangeController_.trigger("audioTimelineBehind");return}r.timelineChangeController_.trigger("fixBadTimelineChange")}},j8=r=>{let e=0;return["video","audio"].forEach(function(i){const n=r[`${i}TimingInfo`];if(!n)return;const{start:s,end:a}=n;let o;typeof s=="bigint"||typeof a=="bigint"?o=Y.BigInt(a)-Y.BigInt(s):typeof s=="number"&&typeof a=="number"&&(o=a-s),typeof o<"u"&&o>e&&(e=o)}),typeof e=="bigint"&&e<Number.MAX_SAFE_INTEGER&&(e=Number(e)),e},zd=({segmentDuration:r,maxDuration:e})=>r?Math.round(r)>e+$i:!1,G8=(r,e)=>{if(e!=="hls")return null;const i=j8({audioTimingInfo:r.audioTimingInfo,videoTimingInfo:r.videoTimingInfo});if(!i)return null;const n=r.playlist.targetDuration,s=zd({segmentDuration:i,maxDuration:n*2}),a=zd({segmentDuration:i,maxDuration:n}),o=`Segment with index ${r.mediaIndex} from playlist ${r.playlist.id} has a duration of ${i} when the reported duration is ${r.duration} and the target duration is ${n}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return s||a?{severity:s?"warn":"info",message:o}:null},Dn=({type:r,segment:e})=>{if(!e)return;const i=!!(e.key||e.map&&e.map.ke),n=!!(e.map&&!e.map.bytes),s=e.startOfSegment===void 0?e.start:e.startOfSegment;return{type:r||e.type,uri:e.resolvedUri||e.uri,start:s,duration:e.duration,isEncrypted:i,isMediaInitialization:n}};class Sl extends ae.EventTarget{constructor(e,i={}){if(super(),!e)throw new TypeError("Initialization settings are required");if(typeof e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=xi(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(n){n!==this.state_&&(this.logger_(`${this.state_} -> ${n}`),this.state_=n,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this)}),this.sourceUpdater_.on("codecschange",n=>{this.trigger(Ct({type:"codecschange"},n))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",n=>{this.trigger(Ct({type:"timelinechange"},n)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():cn(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Wo.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Y.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null),this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Y.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==e}error(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&Wo.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Mt();if(this.loaderType_==="main"){const{hasAudio:i,hasVideo:n,isMuxed:s}=e;if(n&&i&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,i=!1){if(!e)return null;const n=ya(e);let s=this.initSegments_[n];return i&&!s&&e.bytes&&(this.initSegments_[n]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,i=!1){if(!e)return null;const n=Of(e);let s=this.keyCache_[n];this.cacheEncryptionKeys_&&i&&!s&&e.bytes&&(this.keyCache_[n]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const a={resolvedUri:(s||e).resolvedUri};return s&&(a.bytes=s.bytes),a}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,i={}){if(!e||this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const n=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=i,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));let a=null;if(n&&(n.id?a=n.id:n.uri&&(a=n.uri)),this.logger_(`playlist update [${a} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:
208
+ `),this.pushCaption(h),h.startPts=u},je.prototype.pushCaption=function(u){u.text!==""&&(this.trigger("data",{startPts:u.startPts,endPts:u.endPts,text:u.text,stream:"cc708_"+u.serviceNum}),u.text="",u.startPts=u.endPts)},je.prototype.displayWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible=1);return u},je.prototype.hideWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible=0);return u},je.prototype.toggleWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&(h.windows[_].visible^=1);return u},je.prototype.clearWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&h.windows[_].clearText();return u},je.prototype.deleteWindows=function(u,h){var p=this.current708Packet.data,f=p[++u],v=this.getPts(u);this.flushDisplayed(v,h);for(var _=0;_<8;_++)f&1<<_&&h.windows[_].reset();return u},je.prototype.setPenAttributes=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.currentWindow.penAttr;return f=p[++u],v.textTag=(f&240)>>4,v.offset=(f&12)>>2,v.penSize=f&3,f=p[++u],v.italics=(f&128)>>7,v.underline=(f&64)>>6,v.edgeType=(f&56)>>3,v.fontStyle=f&7,u},je.prototype.setPenColor=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.currentWindow.penColor;return f=p[++u],v.fgOpacity=(f&192)>>6,v.fgRed=(f&48)>>4,v.fgGreen=(f&12)>>2,v.fgBlue=f&3,f=p[++u],v.bgOpacity=(f&192)>>6,v.bgRed=(f&48)>>4,v.bgGreen=(f&12)>>2,v.bgBlue=f&3,f=p[++u],v.edgeRed=(f&48)>>4,v.edgeGreen=(f&12)>>2,v.edgeBlue=f&3,u},je.prototype.setPenLocation=function(u,h){var p=this.current708Packet.data,f=p[u],v=h.currentWindow.penLoc;return h.currentWindow.pendingNewLine=!0,f=p[++u],v.row=f&15,f=p[++u],v.column=f&63,u},je.prototype.reset=function(u,h){var p=this.getPts(u);return this.flushDisplayed(p,h),this.initService(h.serviceNum,u)};var Si={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},Li=function(u){return u===null?"":(u=Si[u]||u,String.fromCharCode(u))},bn=14,fs=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Yi=function(){for(var u=[],h=bn+1;h--;)u.push({text:"",indent:0,offset:0});return u},Ce=function(u,h){Ce.prototype.init.call(this),this.field_=u||0,this.dataChannel_=h||0,this.name_="CC"+((this.field_<<1|this.dataChannel_)+1),this.setConstants(),this.reset(),this.push=function(p){var f,v,_,P,F;if(f=p.ccData&32639,f===this.lastControlCode_){this.lastControlCode_=null;return}if((f&61440)===4096?this.lastControlCode_=f:f!==this.PADDING_&&(this.lastControlCode_=null),_=f>>>8,P=f&255,f!==this.PADDING_)if(f===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(f===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(p.pts),this.flushDisplayed(p.pts),v=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=v,this.startPts_=p.pts;else if(f===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(p.pts);else if(f===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(p.pts);else if(f===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(p.pts);else if(f===this.CARRIAGE_RETURN_)this.clearFormatting(p.pts),this.flushDisplayed(p.pts),this.shiftRowsUp_(),this.startPts_=p.pts;else if(f===this.BACKSPACE_)this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(f===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(p.pts),this.displayed_=Yi();else if(f===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Yi();else if(f===this.RESUME_DIRECT_CAPTIONING_)this.mode_!=="paintOn"&&(this.flushDisplayed(p.pts),this.displayed_=Yi()),this.mode_="paintOn",this.startPts_=p.pts;else if(this.isSpecialCharacter(_,P))_=(_&3)<<8,F=Li(_|P),this[this.mode_](p.pts,F),this.column_++;else if(this.isExtCharacter(_,P))this.mode_==="popOn"?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),_=(_&3)<<8,F=Li(_|P),this[this.mode_](p.pts,F),this.column_++;else if(this.isMidRowCode(_,P))this.clearFormatting(p.pts),this[this.mode_](p.pts," "),this.column_++,(P&14)===14&&this.addFormatting(p.pts,["i"]),(P&1)===1&&this.addFormatting(p.pts,["u"]);else if(this.isOffsetControlCode(_,P)){const K=P&3;this.nonDisplayed_[this.row_].offset=K,this.column_+=K}else if(this.isPAC(_,P)){var W=fs.indexOf(f&7968);if(this.mode_==="rollUp"&&(W-this.rollUpRows_+1<0&&(W=this.rollUpRows_-1),this.setRollUp(p.pts,W)),W!==this.row_&&W>=0&&W<=14&&(this.clearFormatting(p.pts),this.row_=W),P&1&&this.formatting_.indexOf("u")===-1&&this.addFormatting(p.pts,["u"]),(f&16)===16){const K=(f&14)>>1;this.column_=K*4,this.nonDisplayed_[this.row_].indent+=K}this.isColorPAC(P)&&(P&14)===14&&this.addFormatting(p.pts,["i"])}else this.isNormalChar(_)&&(P===0&&(P=null),F=Li(_),F+=Li(P),this[this.mode_](p.pts,F),this.column_+=F.length)}};Ce.prototype=new Rt,Ce.prototype.flushDisplayed=function(u){const h=f=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+f+"."})},p=[];this.displayed_.forEach((f,v)=>{if(f&&f.text&&f.text.length){try{f.text=f.text.trim()}catch{h(v)}f.text.length&&p.push({text:f.text,line:v+1,position:10+Math.min(70,f.indent*10)+f.offset*2.5})}else f==null&&h(v)}),p.length&&this.trigger("data",{startPts:this.startPts_,endPts:u,content:p,stream:this.name_})},Ce.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Yi(),this.nonDisplayed_=Yi(),this.lastControlCode_=null,this.column_=0,this.row_=bn,this.rollUpRows_=2,this.formatting_=[]},Ce.prototype.setConstants=function(){this.dataChannel_===0?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):this.dataChannel_===1&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=this.CONTROL_|32,this.END_OF_CAPTION_=this.CONTROL_|47,this.ROLL_UP_2_ROWS_=this.CONTROL_|37,this.ROLL_UP_3_ROWS_=this.CONTROL_|38,this.ROLL_UP_4_ROWS_=this.CONTROL_|39,this.CARRIAGE_RETURN_=this.CONTROL_|45,this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41,this.BACKSPACE_=this.CONTROL_|33,this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44,this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46},Ce.prototype.isSpecialCharacter=function(u,h){return u===this.EXT_&&h>=48&&h<=63},Ce.prototype.isExtCharacter=function(u,h){return(u===this.EXT_+1||u===this.EXT_+2)&&h>=32&&h<=63},Ce.prototype.isMidRowCode=function(u,h){return u===this.EXT_&&h>=32&&h<=47},Ce.prototype.isOffsetControlCode=function(u,h){return u===this.OFFSET_&&h>=33&&h<=35},Ce.prototype.isPAC=function(u,h){return u>=this.BASE_&&u<this.BASE_+8&&h>=64&&h<=127},Ce.prototype.isColorPAC=function(u){return u>=64&&u<=79||u>=96&&u<=127},Ce.prototype.isNormalChar=function(u){return u>=32&&u<=127},Ce.prototype.setRollUp=function(u,h){if(this.mode_!=="rollUp"&&(this.row_=bn,this.mode_="rollUp",this.flushDisplayed(u),this.nonDisplayed_=Yi(),this.displayed_=Yi()),h!==void 0&&h!==this.row_)for(var p=0;p<this.rollUpRows_;p++)this.displayed_[h-p]=this.displayed_[this.row_-p],this.displayed_[this.row_-p]={text:"",indent:0,offset:0};h===void 0&&(h=this.row_),this.topRow_=h-this.rollUpRows_+1},Ce.prototype.addFormatting=function(u,h){this.formatting_=this.formatting_.concat(h);var p=h.reduce(function(f,v){return f+"<"+v+">"},"");this[this.mode_](u,p)},Ce.prototype.clearFormatting=function(u){if(this.formatting_.length){var h=this.formatting_.reverse().reduce(function(p,f){return p+"</"+f+">"},"");this.formatting_=[],this[this.mode_](u,h)}},Ce.prototype.popOn=function(u,h){var p=this.nonDisplayed_[this.row_].text;p+=h,this.nonDisplayed_[this.row_].text=p},Ce.prototype.rollUp=function(u,h){var p=this.displayed_[this.row_].text;p+=h,this.displayed_[this.row_].text=p},Ce.prototype.shiftRowsUp_=function(){var u;for(u=0;u<this.topRow_;u++)this.displayed_[u]={text:"",indent:0,offset:0};for(u=this.row_+1;u<bn+1;u++)this.displayed_[u]={text:"",indent:0,offset:0};for(u=this.topRow_;u<this.row_;u++)this.displayed_[u]=this.displayed_[u+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Ce.prototype.paintOn=function(u,h){var p=this.displayed_[this.row_].text;p+=h,this.displayed_[this.row_].text=p};var te={CaptionStream:Qe,Cea608Stream:Ce,Cea708Stream:je},ve={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Se=i,tt=8589934592,Ht=4294967296,At="shared",Tt=function(u,h){var p=1;for(u>h&&(p=-1);Math.abs(h-u)>Ht;)u+=p*tt;return u},Ei=function(u){var h,p;Ei.prototype.init.call(this),this.type_=u||At,this.push=function(f){if(f.type==="metadata"){this.trigger("data",f);return}this.type_!==At&&f.type!==this.type_||(p===void 0&&(p=f.dts),f.dts=Tt(f.dts,p),f.pts=Tt(f.pts,p),h=f.dts,this.trigger("data",f))},this.flush=function(){p=h,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){p=void 0,h=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Ei.prototype=new Se;var yt={TimestampRolloverStream:Ei,handleRollover:Tt},br=(u,h,p)=>{if(!u)return-1;for(var f=p;f<u.length;f++)if(u[f]===h)return f;return-1},ps={typedArrayIndexOf:br},Cr=ps.typedArrayIndexOf,ms={Utf8:3},gu=function(u,h,p){var f,v="";for(f=h;f<p;f++)v+="%"+("00"+u[f].toString(16)).slice(-2);return v},xr=function(u,h,p){return decodeURIComponent(gu(u,h,p))},Sr=function(u,h,p){return unescape(gu(u,h,p))},Er=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},kr={APIC:function(u){var h=1,p,f,v="-->";u.data[0]===ms.Utf8&&(p=Cr(u.data,0,h),!(p<0)&&(u.mimeType=Sr(u.data,h,p),h=p+1,u.pictureType=u.data[h],h++,f=Cr(u.data,0,h),!(f<0)&&(u.description=xr(u.data,h,f),h=f+1,u.mimeType===v?u.url=Sr(u.data,h,u.data.length):u.pictureData=u.data.subarray(h,u.data.length))))},"T*":function(u){u.data[0]===ms.Utf8&&(u.value=xr(u.data,1,u.data.length).replace(/\0*$/,""),u.values=u.value.split("\0"))},TXXX:function(u){var h;u.data[0]===ms.Utf8&&(h=Cr(u.data,0,1),h!==-1&&(u.description=xr(u.data,1,h),u.value=xr(u.data,h+1,u.data.length).replace(/\0*$/,""),u.data=u.value))},"W*":function(u){u.url=Sr(u.data,0,u.data.length).replace(/\0.*$/,"")},WXXX:function(u){var h;u.data[0]===ms.Utf8&&(h=Cr(u.data,0,1),h!==-1&&(u.description=xr(u.data,1,h),u.url=Sr(u.data,h+1,u.data.length).replace(/\0.*$/,"")))},PRIV:function(u){var h;for(h=0;h<u.data.length;h++)if(u.data[h]===0){u.owner=Sr(u.data,0,h);break}u.privateData=u.data.subarray(h+1),u.data=u.privateData}},hp=function(u){var h,p,f=10,v=0,_=[];if(!(u.length<10||u[0]!==73||u[1]!==68||u[2]!==51)){v=Er(u.subarray(6,10)),v+=10;var P=u[5]&64;P&&(f+=4,f+=Er(u.subarray(10,14)),v-=Er(u.subarray(16,20)));do{if(h=Er(u.subarray(f+4,f+8)),h<1)break;p=String.fromCharCode(u[f],u[f+1],u[f+2],u[f+3]);var F={id:p,data:u.subarray(f+10,f+h+10)};F.key=F.id,kr[F.id]?kr[F.id](F):F.id[0]==="T"?kr["T*"](F):F.id[0]==="W"&&kr["W*"](F),_.push(F),f+=10,f+=h}while(f<v);return _}},vu={parseId3Frames:hp,parseSyncSafeInteger:Er,frameParsers:kr},fp=i,pp=ve,sn=vu,gs;gs=function(u){var h={descriptor:u&&u.descriptor},p=0,f=[],v=0,_;if(gs.prototype.init.call(this),this.dispatchType=pp.METADATA_STREAM_TYPE.toString(16),h.descriptor)for(_=0;_<h.descriptor.length;_++)this.dispatchType+=("00"+h.descriptor[_].toString(16)).slice(-2);this.push=function(P){var F,W,K,ie,de,xe;if(P.type==="timed-metadata"){if(P.dataAlignmentIndicator&&(v=0,f.length=0),f.length===0&&(P.data.length<10||P.data[0]!==73||P.data[1]!==68||P.data[2]!==51)){this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});return}if(f.push(P),v+=P.data.byteLength,f.length===1&&(p=sn.parseSyncSafeInteger(P.data.subarray(6,10)),p+=10),!(v<p)){for(F={data:new Uint8Array(p),frames:[],pts:f[0].pts,dts:f[0].dts},de=0;de<p;)F.data.set(f[0].data.subarray(0,p-de),de),de+=f[0].data.byteLength,v-=f[0].data.byteLength,f.shift();W=10,F.data[5]&64&&(W+=4,W+=sn.parseSyncSafeInteger(F.data.subarray(10,14)),p-=sn.parseSyncSafeInteger(F.data.subarray(16,20)));do{if(K=sn.parseSyncSafeInteger(F.data.subarray(W+4,W+8)),K<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if(xe=String.fromCharCode(F.data[W],F.data[W+1],F.data[W+2],F.data[W+3]),ie={id:xe,data:F.data.subarray(W+10,W+K+10)},ie.key=ie.id,sn.frameParsers[ie.id]?sn.frameParsers[ie.id](ie):ie.id[0]==="T"?sn.frameParsers["T*"](ie):ie.id[0]==="W"&&sn.frameParsers["W*"](ie),ie.owner==="com.apple.streaming.transportStreamTimestamp"){var fe=ie.data,Oe=(fe[3]&1)<<30|fe[4]<<22|fe[5]<<14|fe[6]<<6|fe[7]>>>2;Oe*=4,Oe+=fe[7]&3,ie.timeStamp=Oe,F.pts===void 0&&F.dts===void 0&&(F.pts=ie.timeStamp,F.dts=ie.timeStamp),this.trigger("timestamp",ie)}F.frames.push(ie),W+=10,W+=K}while(W<p);this.trigger("data",F)}}}},gs.prototype=new fp;var mp=gs,ja=i,Ga=te,ki=ve,gp=yt.TimestampRolloverStream,vs,wr,ys,$n=188,Wa=71;vs=function(){var u=new Uint8Array($n),h=0;vs.prototype.init.call(this),this.push=function(p){var f=0,v=$n,_;for(h?(_=new Uint8Array(p.byteLength+h),_.set(u.subarray(0,h)),_.set(p,h),h=0):_=p;v<_.byteLength;){if(_[f]===Wa&&_[v]===Wa){this.trigger("data",_.subarray(f,v)),f+=$n,v+=$n;continue}f++,v++}f<_.byteLength&&(u.set(_.subarray(f),0),h=_.byteLength-f)},this.flush=function(){h===$n&&u[0]===Wa&&(this.trigger("data",u),h=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){h=0,this.trigger("reset")}},vs.prototype=new ja,wr=function(){var u,h,p,f;wr.prototype.init.call(this),f=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,u=function(v,_){var P=0;_.payloadUnitStartIndicator&&(P+=v[P]+1),_.type==="pat"?h(v.subarray(P),_):p(v.subarray(P),_)},h=function(v,_){_.section_number=v[7],_.last_section_number=v[8],f.pmtPid=(v[10]&31)<<8|v[11],_.pmtPid=f.pmtPid},p=function(v,_){var P,F,W,K;if(v[5]&1){for(f.programMapTable={video:null,audio:null,"timed-metadata":{}},P=(v[1]&15)<<8|v[2],F=3+P-4,W=(v[10]&15)<<8|v[11],K=12+W;K<F;){var ie=v[K],de=(v[K+1]&31)<<8|v[K+2];ie===ki.H264_STREAM_TYPE&&f.programMapTable.video===null?f.programMapTable.video=de:ie===ki.ADTS_STREAM_TYPE&&f.programMapTable.audio===null?f.programMapTable.audio=de:ie===ki.METADATA_STREAM_TYPE&&(f.programMapTable["timed-metadata"][de]=ie),K+=((v[K+3]&15)<<8|v[K+4])+5}_.programMapTable=f.programMapTable}},this.push=function(v){var _={},P=4;if(_.payloadUnitStartIndicator=!!(v[1]&64),_.pid=v[1]&31,_.pid<<=8,_.pid|=v[2],(v[3]&48)>>>4>1&&(P+=v[P]+1),_.pid===0)_.type="pat",u(v.subarray(P),_),this.trigger("data",_);else if(_.pid===this.pmtPid)for(_.type="pmt",u(v.subarray(P),_),this.trigger("data",_);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else this.programMapTable===void 0?this.packetsWaitingForPmt.push([v,P,_]):this.processPes_(v,P,_)},this.processPes_=function(v,_,P){P.pid===this.programMapTable.video?P.streamType=ki.H264_STREAM_TYPE:P.pid===this.programMapTable.audio?P.streamType=ki.ADTS_STREAM_TYPE:P.streamType=this.programMapTable["timed-metadata"][P.pid],P.type="pes",P.data=v.subarray(_),this.trigger("data",P)}},wr.prototype=new ja,wr.STREAM_TYPES={h264:27,adts:15},ys=function(){var u=this,h=!1,p={data:[],size:0},f={data:[],size:0},v={data:[],size:0},_,P=function(W,K){var ie;const de=W[0]<<16|W[1]<<8|W[2];K.data=new Uint8Array,de===1&&(K.packetLength=6+(W[4]<<8|W[5]),K.dataAlignmentIndicator=(W[6]&4)!==0,ie=W[7],ie&192&&(K.pts=(W[9]&14)<<27|(W[10]&255)<<20|(W[11]&254)<<12|(W[12]&255)<<5|(W[13]&254)>>>3,K.pts*=4,K.pts+=(W[13]&6)>>>1,K.dts=K.pts,ie&64&&(K.dts=(W[14]&14)<<27|(W[15]&255)<<20|(W[16]&254)<<12|(W[17]&255)<<5|(W[18]&254)>>>3,K.dts*=4,K.dts+=(W[18]&6)>>>1)),K.data=W.subarray(9+W[8]))},F=function(W,K,ie){var de=new Uint8Array(W.size),xe={type:K},fe=0,Oe=0,qe=!1,Bt;if(!(!W.data.length||W.size<9)){for(xe.trackId=W.data[0].pid,fe=0;fe<W.data.length;fe++)Bt=W.data[fe],de.set(Bt.data,Oe),Oe+=Bt.data.byteLength;P(de,xe),qe=K==="video"||xe.packetLength<=W.size,(ie||qe)&&(W.size=0,W.data.length=0),qe&&u.trigger("data",xe)}};ys.prototype.init.call(this),this.push=function(W){({pat:function(){},pes:function(){var K,ie;switch(W.streamType){case ki.H264_STREAM_TYPE:K=p,ie="video";break;case ki.ADTS_STREAM_TYPE:K=f,ie="audio";break;case ki.METADATA_STREAM_TYPE:K=v,ie="timed-metadata";break;default:return}W.payloadUnitStartIndicator&&F(K,ie,!0),K.data.push(W),K.size+=W.data.byteLength},pmt:function(){var K={type:"metadata",tracks:[]};_=W.programMapTable,_.video!==null&&K.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.video,codec:"avc",type:"video"}),_.audio!==null&&K.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.audio,codec:"adts",type:"audio"}),h=!0,u.trigger("data",K)}})[W.type]()},this.reset=function(){p.size=0,p.data.length=0,f.size=0,f.data.length=0,this.trigger("reset")},this.flushStreams_=function(){F(p,"video"),F(f,"audio"),F(v,"timed-metadata")},this.flush=function(){if(!h&&_){var W={type:"metadata",tracks:[]};_.video!==null&&W.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.video,codec:"avc",type:"video"}),_.audio!==null&&W.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+_.audio,codec:"adts",type:"audio"}),u.trigger("data",W)}h=!1,this.flushStreams_(),this.trigger("done")}},ys.prototype=new ja;var yu={PAT_PID:0,MP2T_PACKET_LENGTH:$n,TransportPacketStream:vs,TransportParseStream:wr,ElementaryStream:ys,TimestampRolloverStream:gp,CaptionStream:Ga.CaptionStream,Cea608Stream:Ga.Cea608Stream,Cea708Stream:Ga.Cea708Stream,MetadataStream:mp};for(var Ya in ki)ki.hasOwnProperty(Ya)&&(yu[Ya]=ki[Ya]);var vp=yu,yp=i,_p=$e.ONE_SECOND_IN_TS,_s,_u=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];_s=function(u){var h,p=0;_s.prototype.init.call(this),this.skipWarn_=function(f,v){this.trigger("log",{level:"warn",message:`adts skiping bytes ${f} to ${v} in frame ${p} outside syncword`})},this.push=function(f){var v=0,_,P,F,W,K;if(u||(p=0),f.type==="audio"){h&&h.length?(F=h,h=new Uint8Array(F.byteLength+f.data.byteLength),h.set(F),h.set(f.data,F.byteLength)):h=f.data;for(var ie;v+7<h.length;){if(h[v]!==255||(h[v+1]&246)!==240){typeof ie!="number"&&(ie=v),v++;continue}if(typeof ie=="number"&&(this.skipWarn_(ie,v),ie=null),P=(~h[v+1]&1)*2,_=(h[v+3]&3)<<11|h[v+4]<<3|(h[v+5]&224)>>5,W=((h[v+6]&3)+1)*1024,K=W*_p/_u[(h[v+2]&60)>>>2],h.byteLength-v<_)break;this.trigger("data",{pts:f.pts+p*K,dts:f.dts+p*K,sampleCount:W,audioobjecttype:(h[v+2]>>>6&3)+1,channelcount:(h[v+2]&1)<<2|(h[v+3]&192)>>>6,samplerate:_u[(h[v+2]&60)>>>2],samplingfrequencyindex:(h[v+2]&60)>>>2,samplesize:16,data:h.subarray(v+7+P,v+_)}),p++,v+=_}typeof ie=="number"&&(this.skipWarn_(ie,v),ie=null),h=h.subarray(v)}},this.flush=function(){p=0,this.trigger("done")},this.reset=function(){h=void 0,this.trigger("reset")},this.endTimeline=function(){h=void 0,this.trigger("endedtimeline")}},_s.prototype=new yp;var Tp=_s,Tu;Tu=function(u){var h=u.byteLength,p=0,f=0;this.length=function(){return 8*h},this.bitsAvailable=function(){return 8*h+f},this.loadWord=function(){var v=u.byteLength-h,_=new Uint8Array(4),P=Math.min(4,h);if(P===0)throw new Error("no bytes available");_.set(u.subarray(v,v+P)),p=new DataView(_.buffer).getUint32(0),f=P*8,h-=P},this.skipBits=function(v){var _;f>v?(p<<=v,f-=v):(v-=f,_=Math.floor(v/8),v-=_*8,h-=_,this.loadWord(),p<<=v,f-=v)},this.readBits=function(v){var _=Math.min(f,v),P=p>>>32-_;return f-=_,f>0?p<<=_:h>0&&this.loadWord(),_=v-_,_>0?P<<_|this.readBits(_):P},this.skipLeadingZeros=function(){var v;for(v=0;v<f;++v)if((p&2147483648>>>v)!==0)return p<<=v,f-=v,v;return this.loadWord(),v+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var v=this.skipLeadingZeros();return this.readBits(v+1)-1},this.readExpGolomb=function(){var v=this.readUnsignedExpGolomb();return 1&v?1+v>>>1:-1*(v>>>1)},this.readBoolean=function(){return this.readBits(1)===1},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};var bp=Tu,bu=i,Cp=bp,Ts,bs,Cu;bs=function(){var u=0,h,p;bs.prototype.init.call(this),this.push=function(f){var v;p?(v=new Uint8Array(p.byteLength+f.data.byteLength),v.set(p),v.set(f.data,p.byteLength),p=v):p=f.data;for(var _=p.byteLength;u<_-3;u++)if(p[u+2]===1){h=u+5;break}for(;h<_;)switch(p[h]){case 0:if(p[h-1]!==0){h+=2;break}else if(p[h-2]!==0){h++;break}u+3!==h-2&&this.trigger("data",p.subarray(u+3,h-2));do h++;while(p[h]!==1&&h<_);u=h-2,h+=3;break;case 1:if(p[h-1]!==0||p[h-2]!==0){h+=3;break}this.trigger("data",p.subarray(u+3,h-2)),u=h-2,h+=3;break;default:h+=3;break}p=p.subarray(u),h-=u,u=0},this.reset=function(){p=null,u=0,this.trigger("reset")},this.flush=function(){p&&p.byteLength>3&&this.trigger("data",p.subarray(u+3)),p=null,u=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}},bs.prototype=new bu,Cu={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},Ts=function(){var u=new bs,h,p,f,v,_,P,F;Ts.prototype.init.call(this),h=this,this.push=function(W){W.type==="video"&&(p=W.trackId,f=W.pts,v=W.dts,u.push(W))},u.on("data",function(W){var K={trackId:p,pts:f,dts:v,data:W,nalUnitTypeCode:W[0]&31};switch(K.nalUnitTypeCode){case 5:K.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:K.nalUnitType="sei_rbsp",K.escapedRBSP=_(W.subarray(1));break;case 7:K.nalUnitType="seq_parameter_set_rbsp",K.escapedRBSP=_(W.subarray(1)),K.config=P(K.escapedRBSP);break;case 8:K.nalUnitType="pic_parameter_set_rbsp";break;case 9:K.nalUnitType="access_unit_delimiter_rbsp";break}h.trigger("data",K)}),u.on("done",function(){h.trigger("done")}),u.on("partialdone",function(){h.trigger("partialdone")}),u.on("reset",function(){h.trigger("reset")}),u.on("endedtimeline",function(){h.trigger("endedtimeline")}),this.flush=function(){u.flush()},this.partialFlush=function(){u.partialFlush()},this.reset=function(){u.reset()},this.endTimeline=function(){u.endTimeline()},F=function(W,K){var ie=8,de=8,xe,fe;for(xe=0;xe<W;xe++)de!==0&&(fe=K.readExpGolomb(),de=(ie+fe+256)%256),ie=de===0?ie:de},_=function(W){for(var K=W.byteLength,ie=[],de=1,xe,fe;de<K-2;)W[de]===0&&W[de+1]===0&&W[de+2]===3?(ie.push(de+2),de+=2):de++;if(ie.length===0)return W;xe=K-ie.length,fe=new Uint8Array(xe);var Oe=0;for(de=0;de<xe;Oe++,de++)Oe===ie[0]&&(Oe++,ie.shift()),fe[de]=W[Oe];return fe},P=function(W){var K=0,ie=0,de=0,xe=0,fe,Oe,qe,Bt,ci,on,Lr,Pr,Mr,Rr,Bs,dt=[1,1],Vr,Di;if(fe=new Cp(W),Oe=fe.readUnsignedByte(),Bt=fe.readUnsignedByte(),qe=fe.readUnsignedByte(),fe.skipUnsignedExpGolomb(),Cu[Oe]&&(ci=fe.readUnsignedExpGolomb(),ci===3&&fe.skipBits(1),fe.skipUnsignedExpGolomb(),fe.skipUnsignedExpGolomb(),fe.skipBits(1),fe.readBoolean()))for(Bs=ci!==3?8:12,Di=0;Di<Bs;Di++)fe.readBoolean()&&(Di<6?F(16,fe):F(64,fe));if(fe.skipUnsignedExpGolomb(),on=fe.readUnsignedExpGolomb(),on===0)fe.readUnsignedExpGolomb();else if(on===1)for(fe.skipBits(1),fe.skipExpGolomb(),fe.skipExpGolomb(),Lr=fe.readUnsignedExpGolomb(),Di=0;Di<Lr;Di++)fe.skipExpGolomb();if(fe.skipUnsignedExpGolomb(),fe.skipBits(1),Pr=fe.readUnsignedExpGolomb(),Mr=fe.readUnsignedExpGolomb(),Rr=fe.readBits(1),Rr===0&&fe.skipBits(1),fe.skipBits(1),fe.readBoolean()&&(K=fe.readUnsignedExpGolomb(),ie=fe.readUnsignedExpGolomb(),de=fe.readUnsignedExpGolomb(),xe=fe.readUnsignedExpGolomb()),fe.readBoolean()&&fe.readBoolean()){switch(Vr=fe.readUnsignedByte(),Vr){case 1:dt=[1,1];break;case 2:dt=[12,11];break;case 3:dt=[10,11];break;case 4:dt=[16,11];break;case 5:dt=[40,33];break;case 6:dt=[24,11];break;case 7:dt=[20,11];break;case 8:dt=[32,11];break;case 9:dt=[80,33];break;case 10:dt=[18,11];break;case 11:dt=[15,11];break;case 12:dt=[64,33];break;case 13:dt=[160,99];break;case 14:dt=[4,3];break;case 15:dt=[3,2];break;case 16:dt=[2,1];break;case 255:{dt=[fe.readUnsignedByte()<<8|fe.readUnsignedByte(),fe.readUnsignedByte()<<8|fe.readUnsignedByte()];break}}dt&&dt[0]/dt[1]}return{profileIdc:Oe,levelIdc:qe,profileCompatibility:Bt,width:(Pr+1)*16-K*2-ie*2,height:(2-Rr)*(Mr+1)*16-de*2-xe*2,sarRatio:dt}}},Ts.prototype=new bu;var xp={H264Stream:Ts},Sp=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],xu=function(u,h){var p=u[h+6]<<21|u[h+7]<<14|u[h+8]<<7|u[h+9],f=u[h+5],v=(f&16)>>4;return p=p>=0?p:0,v?p+20:p+10},Su=function(u,h){return u.length-h<10||u[h]!==73||u[h+1]!==68||u[h+2]!==51?h:(h+=xu(u,h),Su(u,h))},Ep=function(u){var h=Su(u,0);return u.length>=h+2&&(u[h]&255)===255&&(u[h+1]&240)===240&&(u[h+1]&22)===16},Eu=function(u){return u[0]<<21|u[1]<<14|u[2]<<7|u[3]},kp=function(u,h,p){var f,v="";for(f=h;f<p;f++)v+="%"+("00"+u[f].toString(16)).slice(-2);return v},wp=function(u,h,p){return unescape(kp(u,h,p))},Dp=function(u,h){var p=(u[h+5]&224)>>5,f=u[h+4]<<3,v=u[h+3]&6144;return v|f|p},Ap=function(u,h){return u[h]===73&&u[h+1]===68&&u[h+2]===51?"timed-metadata":u[h]&!0&&(u[h+1]&240)===240?"audio":null},Ip=function(u){for(var h=0;h+5<u.length;){if(u[h]!==255||(u[h+1]&246)!==240){h++;continue}return Sp[(u[h+2]&60)>>>2]}return null},Np=function(u){var h,p,f,v;h=10,u[5]&64&&(h+=4,h+=Eu(u.subarray(10,14)));do{if(p=Eu(u.subarray(h+4,h+8)),p<1)return null;if(v=String.fromCharCode(u[h],u[h+1],u[h+2],u[h+3]),v==="PRIV"){f=u.subarray(h+10,h+p+10);for(var _=0;_<f.byteLength;_++)if(f[_]===0){var P=wp(f,0,_);if(P==="com.apple.streaming.transportStreamTimestamp"){var F=f.subarray(_+1),W=(F[3]&1)<<30|F[4]<<22|F[5]<<14|F[6]<<6|F[7]>>>2;return W*=4,W+=F[7]&3,W}break}}h+=10,h+=p}while(h<u.byteLength);return null},Xa={isLikelyAacData:Ep,parseId3TagSize:xu,parseAdtsSize:Dp,parseType:Ap,parseSampleRate:Ip,parseAacTimestamp:Np},Op=i,ku=Xa,Cs;Cs=function(){var u=new Uint8Array,h=0;Cs.prototype.init.call(this),this.setTimestamp=function(p){h=p},this.push=function(p){var f=0,v=0,_,P,F,W;for(u.length?(W=u.length,u=new Uint8Array(p.byteLength+W),u.set(u.subarray(0,W)),u.set(p,W)):u=p;u.length-v>=3;){if(u[v]===73&&u[v+1]===68&&u[v+2]===51){if(u.length-v<10||(f=ku.parseId3TagSize(u,v),v+f>u.length))break;P={type:"timed-metadata",data:u.subarray(v,v+f)},this.trigger("data",P),v+=f;continue}else if((u[v]&255)===255&&(u[v+1]&240)===240){if(u.length-v<7||(f=ku.parseAdtsSize(u,v),v+f>u.length))break;F={type:"audio",data:u.subarray(v,v+f),pts:h,dts:h},this.trigger("data",F),v+=f;continue}v++}_=u.length-v,_>0?u=u.subarray(v):u=new Uint8Array},this.reset=function(){u=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){u=new Uint8Array,this.trigger("endedtimeline")}},Cs.prototype=new Op;var Bp=Cs,Lp=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Pp=Lp,Mp=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Rp=Mp,xs=i,Dr=ke,Ar=kt,Ss=Gi,wi=Q,Xi=vp,Es=$e,wu=Tp,Vp=xp.H264Stream,Fp=Bp,$p=Xa.isLikelyAacData,Up=$e.ONE_SECOND_IN_TS,Du=Pp,Au=Rp,ks,Ir,ws,Cn,zp=function(u,h){h.stream=u,this.trigger("log",h)},Iu=function(u,h){for(var p=Object.keys(h),f=0;f<p.length;f++){var v=p[f];v==="headOfPipeline"||!h[v].on||h[v].on("log",zp.bind(u,v))}},Nu=function(u,h){var p;if(u.length!==h.length)return!1;for(p=0;p<u.length;p++)if(u[p]!==h[p])return!1;return!0},Ou=function(u,h,p,f,v,_){var P=p-h,F=f-h,W=v-p;return{start:{dts:u,pts:u+P},end:{dts:u+F,pts:u+W},prependedContentDuration:_,baseMediaDecodeTime:u}};Ir=function(u,h){var p=[],f,v=0,_=0,P=1/0;h=h||{},f=h.firstSequenceNumber||0,Ir.prototype.init.call(this),this.push=function(F){wi.collectDtsInfo(u,F),u&&Du.forEach(function(W){u[W]=F[W]}),p.push(F)},this.setEarliestDts=function(F){v=F},this.setVideoBaseMediaDecodeTime=function(F){P=F},this.setAudioAppendStart=function(F){_=F},this.flush=function(){var F,W,K,ie,de,xe,fe;if(p.length===0){this.trigger("done","AudioSegmentStream");return}F=Ss.trimAdtsFramesByEarliestDts(p,u,v),u.baseMediaDecodeTime=wi.calculateTrackBaseMediaDecodeTime(u,h.keepOriginalTimestamps),fe=Ss.prefixWithSilence(u,F,_,P),u.samples=Ss.generateSampleTable(F),K=Dr.mdat(Ss.concatenateFrameData(F)),p=[],W=Dr.moof(f,[u]),ie=new Uint8Array(W.byteLength+K.byteLength),f++,ie.set(W),ie.set(K,W.byteLength),wi.clearDtsInfo(u),de=Math.ceil(Up*1024/u.samplerate),F.length&&(xe=F.length*de,this.trigger("segmentTimingInfo",Ou(Es.audioTsToVideoTs(u.baseMediaDecodeTime,u.samplerate),F[0].dts,F[0].pts,F[0].dts+xe,F[0].pts+xe,fe||0)),this.trigger("timingInfo",{start:F[0].pts,end:F[0].pts+xe})),this.trigger("data",{track:u,boxes:ie}),this.trigger("done","AudioSegmentStream")},this.reset=function(){wi.clearDtsInfo(u),p=[],this.trigger("reset")}},Ir.prototype=new xs,ks=function(u,h){var p,f=[],v=[],_,P;h=h||{},p=h.firstSequenceNumber||0,ks.prototype.init.call(this),delete u.minPTS,this.gopCache_=[],this.push=function(F){wi.collectDtsInfo(u,F),F.nalUnitType==="seq_parameter_set_rbsp"&&!_&&(_=F.config,u.sps=[F.data],Au.forEach(function(W){u[W]=_[W]},this)),F.nalUnitType==="pic_parameter_set_rbsp"&&!P&&(P=F.data,u.pps=[F.data]),f.push(F)},this.flush=function(){for(var F,W,K,ie,de,xe,fe=0,Oe,qe;f.length&&f[0].nalUnitType!=="access_unit_delimiter_rbsp";)f.shift();if(f.length===0){this.resetStream_(),this.trigger("done","VideoSegmentStream");return}if(F=Ar.groupNalsIntoFrames(f),K=Ar.groupFramesIntoGops(F),K[0][0].keyFrame||(W=this.getGopForFusion_(f[0],u),W?(fe=W.duration,K.unshift(W),K.byteLength+=W.byteLength,K.nalCount+=W.nalCount,K.pts=W.pts,K.dts=W.dts,K.duration+=W.duration):K=Ar.extendFirstKeyFrame(K)),v.length){var Bt;if(h.alignGopsAtEnd?Bt=this.alignGopsAtEnd_(K):Bt=this.alignGopsAtStart_(K),!Bt){this.gopCache_.unshift({gop:K.pop(),pps:u.pps,sps:u.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),f=[],this.resetStream_(),this.trigger("done","VideoSegmentStream");return}wi.clearDtsInfo(u),K=Bt}wi.collectDtsInfo(u,K),u.samples=Ar.generateSampleTable(K),de=Dr.mdat(Ar.concatenateNalData(K)),u.baseMediaDecodeTime=wi.calculateTrackBaseMediaDecodeTime(u,h.keepOriginalTimestamps),this.trigger("processedGopsInfo",K.map(function(ci){return{pts:ci.pts,dts:ci.dts,byteLength:ci.byteLength}})),Oe=K[0],qe=K[K.length-1],this.trigger("segmentTimingInfo",Ou(u.baseMediaDecodeTime,Oe.dts,Oe.pts,qe.dts+qe.duration,qe.pts+qe.duration,fe)),this.trigger("timingInfo",{start:K[0].pts,end:K[K.length-1].pts+K[K.length-1].duration}),this.gopCache_.unshift({gop:K.pop(),pps:u.pps,sps:u.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),f=[],this.trigger("baseMediaDecodeTime",u.baseMediaDecodeTime),this.trigger("timelineStartInfo",u.timelineStartInfo),ie=Dr.moof(p,[u]),xe=new Uint8Array(ie.byteLength+de.byteLength),p++,xe.set(ie),xe.set(de,ie.byteLength),this.trigger("data",{track:u,boxes:xe}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),f=[],this.gopCache_.length=0,v.length=0,this.trigger("reset")},this.resetStream_=function(){wi.clearDtsInfo(u),_=void 0,P=void 0},this.getGopForFusion_=function(F){var W=45e3,K=1/0,ie,de,xe,fe,Oe;for(Oe=0;Oe<this.gopCache_.length;Oe++)fe=this.gopCache_[Oe],xe=fe.gop,!(!(u.pps&&Nu(u.pps[0],fe.pps[0]))||!(u.sps&&Nu(u.sps[0],fe.sps[0])))&&(xe.dts<u.timelineStartInfo.dts||(ie=F.dts-xe.dts-xe.duration,ie>=-1e4&&ie<=W&&(!de||K>ie)&&(de=fe,K=ie)));return de?de.gop:null},this.alignGopsAtStart_=function(F){var W,K,ie,de,xe,fe,Oe,qe;for(xe=F.byteLength,fe=F.nalCount,Oe=F.duration,W=K=0;W<v.length&&K<F.length&&(ie=v[W],de=F[K],ie.pts!==de.pts);){if(de.pts>ie.pts){W++;continue}K++,xe-=de.byteLength,fe-=de.nalCount,Oe-=de.duration}return K===0?F:K===F.length?null:(qe=F.slice(K),qe.byteLength=xe,qe.duration=Oe,qe.nalCount=fe,qe.pts=qe[0].pts,qe.dts=qe[0].dts,qe)},this.alignGopsAtEnd_=function(F){var W,K,ie,de,xe,fe;for(W=v.length-1,K=F.length-1,xe=null,fe=!1;W>=0&&K>=0;){if(ie=v[W],de=F[K],ie.pts===de.pts){fe=!0;break}if(ie.pts>de.pts){W--;continue}W===v.length-1&&(xe=K),K--}if(!fe&&xe===null)return null;var Oe;if(fe?Oe=K:Oe=xe,Oe===0)return F;var qe=F.slice(Oe),Bt=qe.reduce(function(ci,on){return ci.byteLength+=on.byteLength,ci.duration+=on.duration,ci.nalCount+=on.nalCount,ci},{byteLength:0,duration:0,nalCount:0});return qe.byteLength=Bt.byteLength,qe.duration=Bt.duration,qe.nalCount=Bt.nalCount,qe.pts=qe[0].pts,qe.dts=qe[0].dts,qe},this.alignGopsWith=function(F){v=F}},ks.prototype=new xs,Cn=function(u,h){this.numberOfTracks=0,this.metadataStream=h,u=u||{},typeof u.remux<"u"?this.remuxTracks=!!u.remux:this.remuxTracks=!0,typeof u.keepOriginalTimestamps=="boolean"?this.keepOriginalTimestamps=u.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,Cn.prototype.init.call(this),this.push=function(p){if(p.content||p.text)return this.pendingCaptions.push(p);if(p.frames)return this.pendingMetadata.push(p);this.pendingTracks.push(p.track),this.pendingBytes+=p.boxes.byteLength,p.track.type==="video"&&(this.videoTrack=p.track,this.pendingBoxes.push(p.boxes)),p.track.type==="audio"&&(this.audioTrack=p.track,this.pendingBoxes.unshift(p.boxes))}},Cn.prototype=new xs,Cn.prototype.flush=function(u){var h=0,p={captions:[],captionStreams:{},metadata:[],info:{}},f,v,_,P=0,F;if(this.pendingTracks.length<this.numberOfTracks){if(u!=="VideoSegmentStream"&&u!=="AudioSegmentStream")return;if(this.remuxTracks)return;if(this.pendingTracks.length===0){this.emittedTracks++,this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}if(this.videoTrack?(P=this.videoTrack.timelineStartInfo.pts,Au.forEach(function(W){p.info[W]=this.videoTrack[W]},this)):this.audioTrack&&(P=this.audioTrack.timelineStartInfo.pts,Du.forEach(function(W){p.info[W]=this.audioTrack[W]},this)),this.videoTrack||this.audioTrack){for(this.pendingTracks.length===1?p.type=this.pendingTracks[0].type:p.type="combined",this.emittedTracks+=this.pendingTracks.length,_=Dr.initSegment(this.pendingTracks),p.initSegment=new Uint8Array(_.byteLength),p.initSegment.set(_),p.data=new Uint8Array(this.pendingBytes),F=0;F<this.pendingBoxes.length;F++)p.data.set(this.pendingBoxes[F],h),h+=this.pendingBoxes[F].byteLength;for(F=0;F<this.pendingCaptions.length;F++)f=this.pendingCaptions[F],f.startTime=Es.metadataTsToSeconds(f.startPts,P,this.keepOriginalTimestamps),f.endTime=Es.metadataTsToSeconds(f.endPts,P,this.keepOriginalTimestamps),p.captionStreams[f.stream]=!0,p.captions.push(f);for(F=0;F<this.pendingMetadata.length;F++)v=this.pendingMetadata[F],v.cueTime=Es.metadataTsToSeconds(v.pts,P,this.keepOriginalTimestamps),p.metadata.push(v);for(p.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",p),F=0;F<p.captions.length;F++)f=p.captions[F],this.trigger("caption",f);for(F=0;F<p.metadata.length;F++)v=p.metadata[F],this.trigger("id3Frame",v)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},Cn.prototype.setRemux=function(u){this.remuxTracks=u},ws=function(u){var h=this,p=!0,f,v;ws.prototype.init.call(this),u=u||{},this.baseMediaDecodeTime=u.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var _={};this.transmuxPipeline_=_,_.type="aac",_.metadataStream=new Xi.MetadataStream,_.aacStream=new Fp,_.audioTimestampRolloverStream=new Xi.TimestampRolloverStream("audio"),_.timedMetadataTimestampRolloverStream=new Xi.TimestampRolloverStream("timed-metadata"),_.adtsStream=new wu,_.coalesceStream=new Cn(u,_.metadataStream),_.headOfPipeline=_.aacStream,_.aacStream.pipe(_.audioTimestampRolloverStream).pipe(_.adtsStream),_.aacStream.pipe(_.timedMetadataTimestampRolloverStream).pipe(_.metadataStream).pipe(_.coalesceStream),_.metadataStream.on("timestamp",function(P){_.aacStream.setTimestamp(P.timeStamp)}),_.aacStream.on("data",function(P){P.type!=="timed-metadata"&&P.type!=="audio"||_.audioSegmentStream||(v=v||{timelineStartInfo:{baseMediaDecodeTime:h.baseMediaDecodeTime},codec:"adts",type:"audio"},_.coalesceStream.numberOfTracks++,_.audioSegmentStream=new Ir(v,u),_.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),_.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),_.adtsStream.pipe(_.audioSegmentStream).pipe(_.coalesceStream),h.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!f}))}),_.coalesceStream.on("data",this.trigger.bind(this,"data")),_.coalesceStream.on("done",this.trigger.bind(this,"done")),Iu(this,_)},this.setupTsPipeline=function(){var _={};this.transmuxPipeline_=_,_.type="ts",_.metadataStream=new Xi.MetadataStream,_.packetStream=new Xi.TransportPacketStream,_.parseStream=new Xi.TransportParseStream,_.elementaryStream=new Xi.ElementaryStream,_.timestampRolloverStream=new Xi.TimestampRolloverStream,_.adtsStream=new wu,_.h264Stream=new Vp,_.captionStream=new Xi.CaptionStream(u),_.coalesceStream=new Cn(u,_.metadataStream),_.headOfPipeline=_.packetStream,_.packetStream.pipe(_.parseStream).pipe(_.elementaryStream).pipe(_.timestampRolloverStream),_.timestampRolloverStream.pipe(_.h264Stream),_.timestampRolloverStream.pipe(_.adtsStream),_.timestampRolloverStream.pipe(_.metadataStream).pipe(_.coalesceStream),_.h264Stream.pipe(_.captionStream).pipe(_.coalesceStream),_.elementaryStream.on("data",function(P){var F;if(P.type==="metadata"){for(F=P.tracks.length;F--;)!f&&P.tracks[F].type==="video"?(f=P.tracks[F],f.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime):!v&&P.tracks[F].type==="audio"&&(v=P.tracks[F],v.timelineStartInfo.baseMediaDecodeTime=h.baseMediaDecodeTime);f&&!_.videoSegmentStream&&(_.coalesceStream.numberOfTracks++,_.videoSegmentStream=new ks(f,u),_.videoSegmentStream.on("log",h.getLogTrigger_("videoSegmentStream")),_.videoSegmentStream.on("timelineStartInfo",function(W){v&&!u.keepOriginalTimestamps&&(v.timelineStartInfo=W,_.audioSegmentStream.setEarliestDts(W.dts-h.baseMediaDecodeTime))}),_.videoSegmentStream.on("processedGopsInfo",h.trigger.bind(h,"gopInfo")),_.videoSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"videoSegmentTimingInfo")),_.videoSegmentStream.on("baseMediaDecodeTime",function(W){v&&_.audioSegmentStream.setVideoBaseMediaDecodeTime(W)}),_.videoSegmentStream.on("timingInfo",h.trigger.bind(h,"videoTimingInfo")),_.h264Stream.pipe(_.videoSegmentStream).pipe(_.coalesceStream)),v&&!_.audioSegmentStream&&(_.coalesceStream.numberOfTracks++,_.audioSegmentStream=new Ir(v,u),_.audioSegmentStream.on("log",h.getLogTrigger_("audioSegmentStream")),_.audioSegmentStream.on("timingInfo",h.trigger.bind(h,"audioTimingInfo")),_.audioSegmentStream.on("segmentTimingInfo",h.trigger.bind(h,"audioSegmentTimingInfo")),_.adtsStream.pipe(_.audioSegmentStream).pipe(_.coalesceStream)),h.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!f})}}),_.coalesceStream.on("data",this.trigger.bind(this,"data")),_.coalesceStream.on("id3Frame",function(P){P.dispatchType=_.metadataStream.dispatchType,h.trigger("id3Frame",P)}),_.coalesceStream.on("caption",this.trigger.bind(this,"caption")),_.coalesceStream.on("done",this.trigger.bind(this,"done")),Iu(this,_)},this.setBaseMediaDecodeTime=function(_){var P=this.transmuxPipeline_;u.keepOriginalTimestamps||(this.baseMediaDecodeTime=_),v&&(v.timelineStartInfo.dts=void 0,v.timelineStartInfo.pts=void 0,wi.clearDtsInfo(v),P.audioTimestampRolloverStream&&P.audioTimestampRolloverStream.discontinuity()),f&&(P.videoSegmentStream&&(P.videoSegmentStream.gopCache_=[]),f.timelineStartInfo.dts=void 0,f.timelineStartInfo.pts=void 0,wi.clearDtsInfo(f),P.captionStream.reset()),P.timestampRolloverStream&&P.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(_){v&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(_)},this.setRemux=function(_){var P=this.transmuxPipeline_;u.remux=_,P&&P.coalesceStream&&P.coalesceStream.setRemux(_)},this.alignGopsWith=function(_){f&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(_)},this.getLogTrigger_=function(_){var P=this;return function(F){F.stream=_,P.trigger("log",F)}},this.push=function(_){if(p){var P=$p(_);P&&this.transmuxPipeline_.type!=="aac"?this.setupAacPipeline():!P&&this.transmuxPipeline_.type!=="ts"&&this.setupTsPipeline(),p=!1}this.transmuxPipeline_.headOfPipeline.push(_)},this.flush=function(){p=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}},ws.prototype=new xs;var Hp={Transmuxer:ws},qp=function(u){return u>>>0},jp=function(u){return("00"+u.toString(16)).slice(-2)},Ds={toUnsigned:qp,toHexString:jp},Gp=function(u){var h="";return h+=String.fromCharCode(u[0]),h+=String.fromCharCode(u[1]),h+=String.fromCharCode(u[2]),h+=String.fromCharCode(u[3]),h},Bu=Gp,Wp=Ds.toUnsigned,Yp=Bu,Lu=function(u,h){var p=[],f,v,_,P,F;if(!h.length)return null;for(f=0;f<u.byteLength;)v=Wp(u[f]<<24|u[f+1]<<16|u[f+2]<<8|u[f+3]),_=Yp(u.subarray(f+4,f+8)),P=v>1?f+v:u.byteLength,_===h[0]&&(h.length===1?p.push(u.subarray(f+8,P)):(F=Lu(u.subarray(f+8,P),h.slice(1)),F.length&&(p=p.concat(F)))),f=P;return p},Ka=Lu,Xp=Ds.toUnsigned,Kp=a.getUint64,Qp=function(u){var h={version:u[0],flags:new Uint8Array(u.subarray(1,4))};return h.version===1?h.baseMediaDecodeTime=Kp(u.subarray(4)):h.baseMediaDecodeTime=Xp(u[4]<<24|u[5]<<16|u[6]<<8|u[7]),h},Qa=Qp,Zp=function(u){var h=new DataView(u.buffer,u.byteOffset,u.byteLength),p={version:u[0],flags:new Uint8Array(u.subarray(1,4)),trackId:h.getUint32(4)},f=p.flags[2]&1,v=p.flags[2]&2,_=p.flags[2]&8,P=p.flags[2]&16,F=p.flags[2]&32,W=p.flags[0]&65536,K=p.flags[0]&131072,ie;return ie=8,f&&(ie+=4,p.baseDataOffset=h.getUint32(12),ie+=4),v&&(p.sampleDescriptionIndex=h.getUint32(ie),ie+=4),_&&(p.defaultSampleDuration=h.getUint32(ie),ie+=4),P&&(p.defaultSampleSize=h.getUint32(ie),ie+=4),F&&(p.defaultSampleFlags=h.getUint32(ie)),W&&(p.durationIsEmpty=!0),!f&&K&&(p.baseDataOffsetIsMoof=!0),p},Pu=Zp,Jp=function(u){return{isLeading:(u[0]&12)>>>2,dependsOn:u[0]&3,isDependedOn:(u[1]&192)>>>6,hasRedundancy:(u[1]&48)>>>4,paddingValue:(u[1]&14)>>>1,isNonSyncSample:u[1]&1,degradationPriority:u[2]<<8|u[3]}},em=Jp,Mu=em,tm=function(u){var h={version:u[0],flags:new Uint8Array(u.subarray(1,4)),samples:[]},p=new DataView(u.buffer,u.byteOffset,u.byteLength),f=h.flags[2]&1,v=h.flags[2]&4,_=h.flags[1]&1,P=h.flags[1]&2,F=h.flags[1]&4,W=h.flags[1]&8,K=p.getUint32(4),ie=8,de;for(f&&(h.dataOffset=p.getInt32(ie),ie+=4),v&&K&&(de={flags:Mu(u.subarray(ie,ie+4))},ie+=4,_&&(de.duration=p.getUint32(ie),ie+=4),P&&(de.size=p.getUint32(ie),ie+=4),W&&(h.version===1?de.compositionTimeOffset=p.getInt32(ie):de.compositionTimeOffset=p.getUint32(ie),ie+=4),h.samples.push(de),K--);K--;)de={},_&&(de.duration=p.getUint32(ie),ie+=4),P&&(de.size=p.getUint32(ie),ie+=4),F&&(de.flags=Mu(u.subarray(ie,ie+4)),ie+=4),W&&(h.version===1?de.compositionTimeOffset=p.getInt32(ie):de.compositionTimeOffset=p.getUint32(ie),ie+=4),h.samples.push(de);return h},Ru=tm,Vu={tfdt:Qa,trun:Ru},Fu={parseTfdt:Vu.tfdt,parseTrun:Vu.trun},im=function(u){for(var h=0,p=String.fromCharCode(u[h]),f="";p!=="\0";)f+=p,h++,p=String.fromCharCode(u[h]);return f+=p,f},nm={uint8ToCString:im},As=nm.uint8ToCString,rm=a.getUint64,sm=function(u){var h=4,p=u[0],f,v,_,P,F,W,K,ie;if(p===0){f=As(u.subarray(h)),h+=f.length,v=As(u.subarray(h)),h+=v.length;var de=new DataView(u.buffer);_=de.getUint32(h),h+=4,F=de.getUint32(h),h+=4,W=de.getUint32(h),h+=4,K=de.getUint32(h),h+=4}else if(p===1){var de=new DataView(u.buffer);_=de.getUint32(h),h+=4,P=rm(u.subarray(h)),h+=8,W=de.getUint32(h),h+=4,K=de.getUint32(h),h+=4,f=As(u.subarray(h)),h+=f.length,v=As(u.subarray(h)),h+=v.length}ie=new Uint8Array(u.subarray(h,u.byteLength));var xe={scheme_id_uri:f,value:v,timescale:_||1,presentation_time:P,presentation_time_delta:F,event_duration:W,id:K,message_data:ie};return om(p,xe)?xe:void 0},am=function(u,h,p,f){return u||u===0?u/h:f+p/h},om=function(u,h){var p=h.scheme_id_uri!=="\0",f=u===0&&$u(h.presentation_time_delta)&&p,v=u===1&&$u(h.presentation_time)&&p;return!(u>1)&&f||v},$u=function(u){return u!==void 0||u!==null},lm={parseEmsgBox:sm,scaleTime:am},Nr;typeof window<"u"?Nr=window:typeof r<"u"?Nr=r:typeof self<"u"?Nr=self:Nr={};var Uu=Nr,Is=Ds.toUnsigned,Or=Ds.toHexString,bt=Ka,Un=Bu,Za=lm,um=Pu,cm=Ru,dm=Qa,hm=a.getUint64,zu,Hu,qu,ju,Gu,Ja,Wu,eo=Uu,fm=vu.parseId3Frames;zu=function(u){var h={},p=bt(u,["moov","trak"]);return p.reduce(function(f,v){var _,P,F,W,K;return _=bt(v,["tkhd"])[0],!_||(P=_[0],F=P===0?12:20,W=Is(_[F]<<24|_[F+1]<<16|_[F+2]<<8|_[F+3]),K=bt(v,["mdia","mdhd"])[0],!K)?null:(P=K[0],F=P===0?12:20,f[W]=Is(K[F]<<24|K[F+1]<<16|K[F+2]<<8|K[F+3]),f)},h)},Hu=function(u,h){var p;p=bt(h,["moof","traf"]);var f=p.reduce(function(v,_){var P=bt(_,["tfhd"])[0],F=Is(P[4]<<24|P[5]<<16|P[6]<<8|P[7]),W=u[F]||9e4,K=bt(_,["tfdt"])[0],ie=new DataView(K.buffer,K.byteOffset,K.byteLength),de;K[0]===1?de=hm(K.subarray(4,12)):de=ie.getUint32(4);let xe;return typeof de=="bigint"?xe=de/eo.BigInt(W):typeof de=="number"&&!isNaN(de)&&(xe=de/W),xe<Number.MAX_SAFE_INTEGER&&(xe=Number(xe)),xe<v&&(v=xe),v},1/0);return typeof f=="bigint"||isFinite(f)?f:0},qu=function(u,h){var p=bt(h,["moof","traf"]),f=0,v=0,_;if(p&&p.length){var P=bt(p[0],["tfhd"])[0],F=bt(p[0],["trun"])[0],W=bt(p[0],["tfdt"])[0];if(P){var K=um(P);_=K.trackId}if(W){var ie=dm(W);f=ie.baseMediaDecodeTime}if(F){var de=cm(F);de.samples&&de.samples.length&&(v=de.samples[0].compositionTimeOffset||0)}}var xe=u[_]||9e4;typeof f=="bigint"&&(v=eo.BigInt(v),xe=eo.BigInt(xe));var fe=(f+v)/xe;return typeof fe=="bigint"&&fe<Number.MAX_SAFE_INTEGER&&(fe=Number(fe)),fe},ju=function(u){var h=bt(u,["moov","trak"]),p=[];return h.forEach(function(f){var v=bt(f,["mdia","hdlr"]),_=bt(f,["tkhd"]);v.forEach(function(P,F){var W=Un(P.subarray(8,12)),K=_[F],ie,de,xe;W==="vide"&&(ie=new DataView(K.buffer,K.byteOffset,K.byteLength),de=ie.getUint8(0),xe=de===0?ie.getUint32(12):ie.getUint32(20),p.push(xe))})}),p},Ja=function(u){var h=u[0],p=h===0?12:20;return Is(u[p]<<24|u[p+1]<<16|u[p+2]<<8|u[p+3])},Gu=function(u){var h=bt(u,["moov","trak"]),p=[];return h.forEach(function(f){var v={},_=bt(f,["tkhd"])[0],P,F;_&&(P=new DataView(_.buffer,_.byteOffset,_.byteLength),F=P.getUint8(0),v.id=F===0?P.getUint32(12):P.getUint32(20));var W=bt(f,["mdia","hdlr"])[0];if(W){var K=Un(W.subarray(8,12));K==="vide"?v.type="video":K==="soun"?v.type="audio":v.type=K}var ie=bt(f,["mdia","minf","stbl","stsd"])[0];if(ie){var de=ie.subarray(8);v.codec=Un(de.subarray(4,8));var xe=bt(de,[v.codec])[0],fe,Oe;xe&&(/^[asm]vc[1-9]$/i.test(v.codec)?(fe=xe.subarray(78),Oe=Un(fe.subarray(4,8)),Oe==="avcC"&&fe.length>11?(v.codec+=".",v.codec+=Or(fe[9]),v.codec+=Or(fe[10]),v.codec+=Or(fe[11])):v.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(v.codec)?(fe=xe.subarray(28),Oe=Un(fe.subarray(4,8)),Oe==="esds"&&fe.length>20&&fe[19]!==0?(v.codec+="."+Or(fe[19]),v.codec+="."+Or(fe[20]>>>2&63).replace(/^0/,"")):v.codec="mp4a.40.2"):v.codec=v.codec.toLowerCase())}var qe=bt(f,["mdia","mdhd"])[0];qe&&(v.timescale=Ja(qe)),p.push(v)}),p},Wu=function(u,h=0){var p=bt(u,["emsg"]);return p.map(f=>{var v=Za.parseEmsgBox(new Uint8Array(f)),_=fm(v.message_data);return{cueTime:Za.scaleTime(v.presentation_time,v.timescale,v.presentation_time_delta,h),duration:Za.scaleTime(v.event_duration,v.timescale),frames:_}})};var Br={findBox:bt,parseType:Un,timescale:zu,startTime:Hu,compositionStartTime:qu,videoTrackIds:ju,tracks:Gu,getTimescaleFromMediaHeader:Ja,getEmsgID3:Wu};const{parseTrun:pm}=Fu,{findBox:Yu}=Br;var Xu=Uu,mm=function(u){var h=Yu(u,["moof","traf"]),p=Yu(u,["mdat"]),f=[];return p.forEach(function(v,_){var P=h[_];f.push({mdat:v,traf:P})}),f},gm=function(u,h,p){var f=h,v=p.defaultSampleDuration||0,_=p.defaultSampleSize||0,P=p.trackId,F=[];return u.forEach(function(W){var K=pm(W),ie=K.samples;ie.forEach(function(de){de.duration===void 0&&(de.duration=v),de.size===void 0&&(de.size=_),de.trackId=P,de.dts=f,de.compositionTimeOffset===void 0&&(de.compositionTimeOffset=0),typeof f=="bigint"?(de.pts=f+Xu.BigInt(de.compositionTimeOffset),f+=Xu.BigInt(de.duration)):(de.pts=f+de.compositionTimeOffset,f+=de.duration)}),F=F.concat(ie)}),F},Ku={getMdatTrafPairs:mm,parseSamples:gm},vm=zt.discardEmulationPreventionBytes,ym=te.CaptionStream,to=Ka,_m=Qa,Tm=Pu,{getMdatTrafPairs:bm,parseSamples:Cm}=Ku,xm=function(u,h){for(var p=u,f=0;f<h.length;f++){var v=h[f];if(p<v.size)return v;p-=v.size}return null},Sm=function(u,h,p){var f=new DataView(u.buffer,u.byteOffset,u.byteLength),v={logs:[],seiNals:[]},_,P,F,W;for(P=0;P+4<u.length;P+=F)if(F=f.getUint32(P),P+=4,!(F<=0))switch(u[P]&31){case 6:var K=u.subarray(P+1,P+1+F),ie=xm(P,h);if(_={nalUnitType:"sei_rbsp",size:F,data:K,escapedRBSP:vm(K),trackId:p},ie)_.pts=ie.pts,_.dts=ie.dts,W=ie;else if(W)_.pts=W.pts,_.dts=W.dts;else{v.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+P+" for trackId "+p+". See mux.js#223."});break}v.seiNals.push(_);break}return v},Em=function(u,h){var p={},f=bm(u);return f.forEach(function(v){var _=v.mdat,P=v.traf,F=to(P,["tfhd"]),W=Tm(F[0]),K=W.trackId,ie=to(P,["tfdt"]),de=ie.length>0?_m(ie[0]).baseMediaDecodeTime:0,xe=to(P,["trun"]),fe,Oe;h===K&&xe.length>0&&(fe=Cm(xe,de,W),Oe=Sm(_,fe,K),p[K]||(p[K]={seiNals:[],logs:[]}),p[K].seiNals=p[K].seiNals.concat(Oe.seiNals),p[K].logs=p[K].logs.concat(Oe.logs))}),p},km=function(u,h,p){var f;if(h===null)return null;f=Em(u,h);var v=f[h]||{};return{seiNals:v.seiNals,logs:v.logs,timescale:p}},wm=function(){var u=!1,h,p,f,v,_,P;this.isInitialized=function(){return u},this.init=function(F){h=new ym,u=!0,P=F?F.isPartial:!1,h.on("data",function(W){W.startTime=W.startPts/v,W.endTime=W.endPts/v,_.captions.push(W),_.captionStreams[W.stream]=!0}),h.on("log",function(W){_.logs.push(W)})},this.isNewInit=function(F,W){return F&&F.length===0||W&&typeof W=="object"&&Object.keys(W).length===0?!1:f!==F[0]||v!==W[f]},this.parse=function(F,W,K){var ie;if(this.isInitialized()){if(!W||!K)return null;if(this.isNewInit(W,K))f=W[0],v=K[f];else if(f===null||!v)return p.push(F),null}else return null;for(;p.length>0;){var de=p.shift();this.parse(de,W,K)}return ie=km(F,f,v),ie&&ie.logs&&(_.logs=_.logs.concat(ie.logs)),ie===null||!ie.seiNals?_.logs.length?{logs:_.logs,captions:[],captionStreams:[]}:null:(this.pushNals(ie.seiNals),this.flushStream(),_)},this.pushNals=function(F){if(!this.isInitialized()||!F||F.length===0)return null;F.forEach(function(W){h.push(W)})},this.flushStream=function(){if(!this.isInitialized())return null;P?h.partialFlush():h.flush()},this.clearParsedCaptions=function(){_.captions=[],_.captionStreams={},_.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;h.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){p=[],f=null,v=null,_?this.clearParsedCaptions():_={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()},Dm=wm;const{parseTfdt:Am}=Fu,an=Ka,{getTimescaleFromMediaHeader:Im}=Br,{parseSamples:Nm,getMdatTrafPairs:Om}=Ku;var Qu=function(){let u=9e4;this.init=function(h){const p=an(h,["moov","trak","mdia","mdhd"])[0];p&&(u=Im(p))},this.parseSegment=function(h){const p=[],f=Om(h);let v=0;return f.forEach(function(_){const P=_.mdat,F=_.traf,W=an(F,["tfdt"])[0],K=an(F,["tfhd"])[0],ie=an(F,["trun"]);if(W&&(v=Am(W).baseMediaDecodeTime),ie.length&&K){const de=Nm(ie,v,K);let xe=0;de.forEach(function(fe){const Oe="utf-8",qe=new TextDecoder(Oe),Bt=P.slice(xe,xe+fe.size);if(an(Bt,["vtte"])[0]){xe+=fe.size;return}an(Bt,["vttc"]).forEach(function(Lr){const Pr=an(Lr,["payl"])[0],Mr=an(Lr,["sttg"])[0],Rr=fe.pts/u,Bs=(fe.pts+fe.duration)/u;let dt,Vr;if(Pr)try{dt=qe.decode(Pr)}catch(Di){console.error(Di)}if(Mr)try{Vr=qe.decode(Mr)}catch(Di){console.error(Di)}fe.duration&&dt&&p.push({cueText:dt,start:Rr,end:Bs,settings:Vr})}),xe+=fe.size})}}),p}},io=ve,Zu=function(u){var h=u[1]&31;return h<<=8,h|=u[2],h},Ns=function(u){return!!(u[1]&64)},Os=function(u){var h=0;return(u[3]&48)>>>4>1&&(h+=u[4]+1),h},Bm=function(u,h){var p=Zu(u);return p===0?"pat":p===h?"pmt":h?"pes":null},Lm=function(u){var h=Ns(u),p=4+Os(u);return h&&(p+=u[p]+1),(u[p+10]&31)<<8|u[p+11]},Pm=function(u){var h={},p=Ns(u),f=4+Os(u);if(p&&(f+=u[f]+1),!!(u[f+5]&1)){var v,_,P;v=(u[f+1]&15)<<8|u[f+2],_=3+v-4,P=(u[f+10]&15)<<8|u[f+11];for(var F=12+P;F<_;){var W=f+F;h[(u[W+1]&31)<<8|u[W+2]]=u[W],F+=((u[W+3]&15)<<8|u[W+4])+5}return h}},Mm=function(u,h){var p=Zu(u),f=h[p];switch(f){case io.H264_STREAM_TYPE:return"video";case io.ADTS_STREAM_TYPE:return"audio";case io.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},Rm=function(u){var h=Ns(u);if(!h)return null;var p=4+Os(u);if(p>=u.byteLength)return null;var f=null,v;return v=u[p+7],v&192&&(f={},f.pts=(u[p+9]&14)<<27|(u[p+10]&255)<<20|(u[p+11]&254)<<12|(u[p+12]&255)<<5|(u[p+13]&254)>>>3,f.pts*=4,f.pts+=(u[p+13]&6)>>>1,f.dts=f.pts,v&64&&(f.dts=(u[p+14]&14)<<27|(u[p+15]&255)<<20|(u[p+16]&254)<<12|(u[p+17]&255)<<5|(u[p+18]&254)>>>3,f.dts*=4,f.dts+=(u[p+18]&6)>>>1)),f},no=function(u){switch(u){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Vm=function(u){for(var h=4+Os(u),p=u.subarray(h),f=0,v=0,_=!1,P;v<p.byteLength-3;v++)if(p[v+2]===1){f=v+5;break}for(;f<p.byteLength;)switch(p[f]){case 0:if(p[f-1]!==0){f+=2;break}else if(p[f-2]!==0){f++;break}v+3!==f-2&&(P=no(p[v+3]&31),P==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0));do f++;while(p[f]!==1&&f<p.length);v=f-2,f+=3;break;case 1:if(p[f-1]!==0||p[f-2]!==0){f+=3;break}P=no(p[v+3]&31),P==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0),v=f-2,f+=3;break;default:f+=3;break}return p=p.subarray(v),f-=v,v=0,p&&p.byteLength>3&&(P=no(p[v+3]&31),P==="slice_layer_without_partitioning_rbsp_idr"&&(_=!0)),_},Fm={parseType:Bm,parsePat:Lm,parsePmt:Pm,parsePayloadUnitStartIndicator:Ns,parsePesType:Mm,parsePesTime:Rm,videoPacketContainsKeyFrame:Vm},Ju=ve,zn=yt.handleRollover,ot={};ot.ts=Fm,ot.aac=Xa;var xn=$e.ONE_SECOND_IN_TS,Kt=188,Pi=71,$m=function(u,h){for(var p=0,f=Kt,v,_;f<u.byteLength;){if(u[p]===Pi&&u[f]===Pi){switch(v=u.subarray(p,f),_=ot.ts.parseType(v,h.pid),_){case"pat":h.pid=ot.ts.parsePat(v);break;case"pmt":var P=ot.ts.parsePmt(v);h.table=h.table||{},Object.keys(P).forEach(function(F){h.table[F]=P[F]});break}p+=Kt,f+=Kt;continue}p++,f++}},ec=function(u,h,p){for(var f=0,v=Kt,_,P,F,W,K,ie=!1;v<=u.byteLength;){if(u[f]===Pi&&(u[v]===Pi||v===u.byteLength)){switch(_=u.subarray(f,v),P=ot.ts.parseType(_,h.pid),P){case"pes":F=ot.ts.parsePesType(_,h.table),W=ot.ts.parsePayloadUnitStartIndicator(_),F==="audio"&&W&&(K=ot.ts.parsePesTime(_),K&&(K.type="audio",p.audio.push(K),ie=!0));break}if(ie)break;f+=Kt,v+=Kt;continue}f++,v++}for(v=u.byteLength,f=v-Kt,ie=!1;f>=0;){if(u[f]===Pi&&(u[v]===Pi||v===u.byteLength)){switch(_=u.subarray(f,v),P=ot.ts.parseType(_,h.pid),P){case"pes":F=ot.ts.parsePesType(_,h.table),W=ot.ts.parsePayloadUnitStartIndicator(_),F==="audio"&&W&&(K=ot.ts.parsePesTime(_),K&&(K.type="audio",p.audio.push(K),ie=!0));break}if(ie)break;f-=Kt,v-=Kt;continue}f--,v--}},Um=function(u,h,p){for(var f=0,v=Kt,_,P,F,W,K,ie,de,xe,fe=!1,Oe={data:[],size:0};v<u.byteLength;){if(u[f]===Pi&&u[v]===Pi){switch(_=u.subarray(f,v),P=ot.ts.parseType(_,h.pid),P){case"pes":if(F=ot.ts.parsePesType(_,h.table),W=ot.ts.parsePayloadUnitStartIndicator(_),F==="video"&&(W&&!fe&&(K=ot.ts.parsePesTime(_),K&&(K.type="video",p.video.push(K),fe=!0)),!p.firstKeyFrame)){if(W&&Oe.size!==0){for(ie=new Uint8Array(Oe.size),de=0;Oe.data.length;)xe=Oe.data.shift(),ie.set(xe,de),de+=xe.byteLength;if(ot.ts.videoPacketContainsKeyFrame(ie)){var qe=ot.ts.parsePesTime(ie);qe?(p.firstKeyFrame=qe,p.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}Oe.size=0}Oe.data.push(_),Oe.size+=_.byteLength}break}if(fe&&p.firstKeyFrame)break;f+=Kt,v+=Kt;continue}f++,v++}for(v=u.byteLength,f=v-Kt,fe=!1;f>=0;){if(u[f]===Pi&&u[v]===Pi){switch(_=u.subarray(f,v),P=ot.ts.parseType(_,h.pid),P){case"pes":F=ot.ts.parsePesType(_,h.table),W=ot.ts.parsePayloadUnitStartIndicator(_),F==="video"&&W&&(K=ot.ts.parsePesTime(_),K&&(K.type="video",p.video.push(K),fe=!0));break}if(fe)break;f-=Kt,v-=Kt;continue}f--,v--}},zm=function(u,h){if(u.audio&&u.audio.length){var p=h;(typeof p>"u"||isNaN(p))&&(p=u.audio[0].dts),u.audio.forEach(function(_){_.dts=zn(_.dts,p),_.pts=zn(_.pts,p),_.dtsTime=_.dts/xn,_.ptsTime=_.pts/xn})}if(u.video&&u.video.length){var f=h;if((typeof f>"u"||isNaN(f))&&(f=u.video[0].dts),u.video.forEach(function(_){_.dts=zn(_.dts,f),_.pts=zn(_.pts,f),_.dtsTime=_.dts/xn,_.ptsTime=_.pts/xn}),u.firstKeyFrame){var v=u.firstKeyFrame;v.dts=zn(v.dts,f),v.pts=zn(v.pts,f),v.dtsTime=v.dts/xn,v.ptsTime=v.pts/xn}}},Hm=function(u){for(var h=!1,p=0,f=null,v=null,_=0,P=0,F;u.length-P>=3;){var W=ot.aac.parseType(u,P);switch(W){case"timed-metadata":if(u.length-P<10){h=!0;break}if(_=ot.aac.parseId3TagSize(u,P),_>u.length){h=!0;break}v===null&&(F=u.subarray(P,P+_),v=ot.aac.parseAacTimestamp(F)),P+=_;break;case"audio":if(u.length-P<7){h=!0;break}if(_=ot.aac.parseAdtsSize(u,P),_>u.length){h=!0;break}f===null&&(F=u.subarray(P,P+_),f=ot.aac.parseSampleRate(F)),p++,P+=_;break;default:P++;break}if(h)return null}if(f===null||v===null)return null;var K=xn/f,ie={audio:[{type:"audio",dts:v,pts:v},{type:"audio",dts:v+p*1024*K,pts:v+p*1024*K}]};return ie},qm=function(u){var h={pid:null,table:null},p={};$m(u,h);for(var f in h.table)if(h.table.hasOwnProperty(f)){var v=h.table[f];switch(v){case Ju.H264_STREAM_TYPE:p.video=[],Um(u,h,p),p.video.length===0&&delete p.video;break;case Ju.ADTS_STREAM_TYPE:p.audio=[],ec(u,h,p),p.audio.length===0&&delete p.audio;break}}return p},jm=function(u,h){var p=ot.aac.isLikelyAacData(u),f;return p?f=Hm(u):f=qm(u),!f||!f.audio&&!f.video?null:(zm(f,h),f)},Gm={inspect:jm,parseAudioPes_:ec};const Wm=function(u,h){h.on("data",function(p){const f=p.initSegment;p.initSegment={data:f.buffer,byteOffset:f.byteOffset,byteLength:f.byteLength};const v=p.data;p.data=v.buffer,u.postMessage({action:"data",segment:p,byteOffset:v.byteOffset,byteLength:v.byteLength},[p.data])}),h.on("done",function(p){u.postMessage({action:"done"})}),h.on("gopInfo",function(p){u.postMessage({action:"gopInfo",gopInfo:p})}),h.on("videoSegmentTimingInfo",function(p){const f={start:{decode:$e.videoTsToSeconds(p.start.dts),presentation:$e.videoTsToSeconds(p.start.pts)},end:{decode:$e.videoTsToSeconds(p.end.dts),presentation:$e.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:$e.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=$e.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:f})}),h.on("audioSegmentTimingInfo",function(p){const f={start:{decode:$e.videoTsToSeconds(p.start.dts),presentation:$e.videoTsToSeconds(p.start.pts)},end:{decode:$e.videoTsToSeconds(p.end.dts),presentation:$e.videoTsToSeconds(p.end.pts)},baseMediaDecodeTime:$e.videoTsToSeconds(p.baseMediaDecodeTime)};p.prependedContentDuration&&(f.prependedContentDuration=$e.videoTsToSeconds(p.prependedContentDuration)),u.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:f})}),h.on("id3Frame",function(p){u.postMessage({action:"id3Frame",id3Frame:p})}),h.on("caption",function(p){u.postMessage({action:"caption",caption:p})}),h.on("trackinfo",function(p){u.postMessage({action:"trackinfo",trackInfo:p})}),h.on("audioTimingInfo",function(p){u.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:$e.videoTsToSeconds(p.start),end:$e.videoTsToSeconds(p.end)}})}),h.on("videoTimingInfo",function(p){u.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:$e.videoTsToSeconds(p.start),end:$e.videoTsToSeconds(p.end)}})}),h.on("log",function(p){u.postMessage({action:"log",log:p})})};class tc{constructor(h,p){this.options=p||{},this.self=h,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new Hp.Transmuxer(this.options),Wm(this.self,this.transmuxer)}pushMp4Captions(h){this.captionParser||(this.captionParser=new Dm,this.captionParser.init());const p=new Uint8Array(h.data,h.byteOffset,h.byteLength),f=this.captionParser.parse(p,h.trackIds,h.timescales);this.self.postMessage({action:"mp4Captions",captions:f&&f.captions||[],logs:f&&f.logs||[],data:p.buffer},[p.buffer])}initMp4WebVttParser(h){this.webVttParser||(this.webVttParser=new Qu);const p=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.webVttParser.init(p)}getMp4WebVttText(h){this.webVttParser||(this.webVttParser=new Qu);const p=new Uint8Array(h.data,h.byteOffset,h.byteLength),f=this.webVttParser.parseSegment(p);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:f||[],data:p.buffer},[p.buffer])}probeMp4StartTime({timescales:h,data:p}){const f=Br.startTime(h,p);this.self.postMessage({action:"probeMp4StartTime",startTime:f,data:p},[p.buffer])}probeMp4Tracks({data:h}){const p=Br.tracks(h);this.self.postMessage({action:"probeMp4Tracks",tracks:p,data:h},[h.buffer])}probeEmsgID3({data:h,offset:p}){const f=Br.getEmsgID3(h,p);this.self.postMessage({action:"probeEmsgID3",id3Frames:f,emsgData:h},[h.buffer])}probeTs({data:h,baseStartTime:p}){const f=typeof p=="number"&&!isNaN(p)?p*$e.ONE_SECOND_IN_TS:void 0,v=Gm.inspect(h,f);let _=null;v&&(_={hasVideo:v.video&&v.video.length===2||!1,hasAudio:v.audio&&v.audio.length===2||!1},_.hasVideo&&(_.videoStart=v.video[0].ptsTime),_.hasAudio&&(_.audioStart=v.audio[0].ptsTime)),this.self.postMessage({action:"probeTs",result:_,data:h},[h.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(h){const p=new Uint8Array(h.data,h.byteOffset,h.byteLength);this.transmuxer.push(p)}reset(){this.transmuxer.reset()}setTimestampOffset(h){const p=h.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round($e.secondsToVideoTs(p)))}setAudioAppendStart(h){this.transmuxer.setAudioAppendStart(Math.ceil($e.secondsToVideoTs(h.appendStart)))}setRemux(h){this.transmuxer.setRemux(h.remux)}flush(h){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(h){this.transmuxer.alignGopsWith(h.gopsToAlignWith.slice())}}self.onmessage=function(u){if(u.data.action==="init"&&u.data.options){this.messageHandlers=new tc(self,u.data.options);return}this.messageHandlers||(this.messageHandlers=new tc(self)),u.data&&u.data.action&&u.data.action!=="init"&&this.messageHandlers[u.data.action]&&this.messageHandlers[u.data.action](u.data)}}));var i8=Rf(t8);const n8=(r,e,i)=>{const{type:n,initSegment:s,captions:a,captionStreams:o,metadata:l,videoFrameDtsTime:c,videoFramePtsTime:d}=r.data.segment;e.buffer.push({captions:a,captionStreams:o,metadata:l});const m=r.data.segment.boxes||{data:r.data.segment.data},g={type:n,data:new Uint8Array(m.data,m.data.byteOffset,m.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};typeof c<"u"&&(g.videoFrameDtsTime=c),typeof d<"u"&&(g.videoFramePtsTime=d),i(g)},r8=({transmuxedData:r,callback:e})=>{r.buffer=[],e(r)},s8=(r,e)=>{e.gopInfo=r.data.gopInfo},$f=r=>{const{transmuxer:e,bytes:i,audioAppendStart:n,gopsToAlignWith:s,remux:a,onData:o,onTrackInfo:l,onAudioTimingInfo:c,onVideoTimingInfo:d,onVideoSegmentTimingInfo:m,onAudioSegmentTimingInfo:g,onId3:S,onCaptions:T,onDone:b,onEndedTimeline:y,onTransmuxerLog:x,isEndOfTimeline:N,segment:I,triggerSegmentEventFn:D}=r,z={buffer:[]};let H=N;const U=G=>{e.currentTransmux===r&&(G.data.action==="data"&&n8(G,z,o),G.data.action==="trackinfo"&&l(G.data.trackInfo),G.data.action==="gopInfo"&&s8(G,z),G.data.action==="audioTimingInfo"&&c(G.data.audioTimingInfo),G.data.action==="videoTimingInfo"&&d(G.data.videoTimingInfo),G.data.action==="videoSegmentTimingInfo"&&m(G.data.videoSegmentTimingInfo),G.data.action==="audioSegmentTimingInfo"&&g(G.data.audioSegmentTimingInfo),G.data.action==="id3Frame"&&S([G.data.id3Frame],G.data.id3Frame.dispatchType),G.data.action==="caption"&&T(G.data.caption),G.data.action==="endedtimeline"&&(H=!1,y()),G.data.action==="log"&&x(G.data.log),G.data.type==="transmuxed"&&(H||(e.onmessage=null,r8({transmuxedData:z,callback:b}),Uf(e))))},B=()=>{const G={message:"Received an error message from the transmuxer worker",metadata:{errorType:ae.Error.StreamingFailedToTransmuxSegment,segmentInfo:Dn({segment:I})}};b(null,G)};if(e.onmessage=U,e.onerror=B,n&&e.postMessage({action:"setAudioAppendStart",appendStart:n}),Array.isArray(s)&&e.postMessage({action:"alignGopsWith",gopsToAlignWith:s}),typeof a<"u"&&e.postMessage({action:"setRemux",remux:a}),i.byteLength){const G=i instanceof ArrayBuffer?i:i.buffer,C=i instanceof ArrayBuffer?0:i.byteOffset;D({type:"segmenttransmuxingstart",segment:I}),e.postMessage({action:"push",data:G,byteOffset:C,byteLength:i.byteLength},[G])}N&&e.postMessage({action:"endTimeline"}),e.postMessage({action:"flush"})},Uf=r=>{r.currentTransmux=null,r.transmuxQueue.length&&(r.currentTransmux=r.transmuxQueue.shift(),typeof r.currentTransmux=="function"?r.currentTransmux():$f(r.currentTransmux))},Pd=(r,e)=>{r.postMessage({action:e}),Uf(r)},zf=(r,e)=>{if(!e.currentTransmux){e.currentTransmux=r,Pd(e,r);return}e.transmuxQueue.push(Pd.bind(null,e,r))},a8=r=>{zf("reset",r)},o8=r=>{zf("endTimeline",r)},Hf=r=>{if(!r.transmuxer.currentTransmux){r.transmuxer.currentTransmux=r,$f(r);return}r.transmuxer.transmuxQueue.push(r)},l8=r=>{const e=new i8;e.currentTransmux=null,e.transmuxQueue=[];const i=e.terminate;return e.terminate=()=>(e.currentTransmux=null,e.transmuxQueue.length=0,i.call(e)),e.postMessage({action:"init",options:r}),e};var Wo={reset:a8,endTimeline:o8,transmux:Hf,createTransmuxer:l8};const er=function(r){const e=r.transmuxer,i=r.endAction||r.action,n=r.callback,s=Ct({},r,{endAction:null,transmuxer:null,callback:null}),a=o=>{o.data.action===i&&(e.removeEventListener("message",a),o.data.data&&(o.data.data=new Uint8Array(o.data.data,r.byteOffset||0,r.byteLength||o.data.data.byteLength),r.data&&(r.data=o.data.data)),n(o.data))};if(e.addEventListener("message",a),r.data){const o=r.data instanceof ArrayBuffer;s.byteOffset=o?0:r.data.byteOffset,s.byteLength=r.data.byteLength;const l=[o?r.data:r.data.buffer];e.postMessage(s,l)}else e.postMessage(s)},zi={FAILURE:2,TIMEOUT:-101,ABORTED:-102},qf="wvtt",Cl=r=>{r.forEach(e=>{e.abort()})},u8=r=>({bandwidth:r.bandwidth,bytesReceived:r.bytesReceived||0,roundTripTime:r.roundTripTime||0}),c8=r=>{const e=r.target,n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-e.requestTime||0};return n.bytesReceived=r.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n},pu=(r,e)=>{const{requestType:i}=e,n=Mn({requestType:i,request:e,error:r});return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:zi.TIMEOUT,xhr:e,metadata:n}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:zi.ABORTED,xhr:e,metadata:n}:r?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:zi.FAILURE,xhr:e,metadata:n}:e.responseType==="arraybuffer"&&e.response.byteLength===0?{status:e.status,message:"Empty HLS response at URL: "+e.uri,code:zi.FAILURE,xhr:e,metadata:n}:null},Md=(r,e,i,n)=>(s,a)=>{const o=a.response,l=pu(s,a);if(l)return i(l,r);if(o.byteLength!==16)return i({status:a.status,message:"Invalid HLS key at URL: "+a.uri,code:zi.FAILURE,xhr:a},r);const c=new DataView(o),d=new Uint32Array([c.getUint32(0),c.getUint32(4),c.getUint32(8),c.getUint32(12)]);for(let g=0;g<e.length;g++)e[g].bytes=d;const m={uri:a.uri};return n({type:"segmentkeyloadcomplete",segment:r,keyInfo:m}),i(null,r)},d8=(r,e)=>{e===qf&&r.transmuxer.postMessage({action:"initMp4WebVttParser",data:r.map.bytes})},h8=(r,e,i)=>{e===qf&&er({action:"getMp4WebVttText",data:r.bytes,transmuxer:r.transmuxer,callback:({data:n,mp4VttCues:s})=>{r.bytes=n,i(null,r,{mp4VttCues:s})}})},jf=(r,e)=>{const i=Rl(r.map.bytes);if(i!=="mp4"){const n=r.map.resolvedUri||r.map.uri,s=i||"unknown";return e({internal:!0,message:`Found unsupported ${s} container for initialization segment at URL: ${n}`,code:zi.FAILURE,metadata:{mediaType:s}})}er({action:"probeMp4Tracks",data:r.map.bytes,transmuxer:r.transmuxer,callback:({tracks:n,data:s})=>(r.map.bytes=s,n.forEach(function(a){r.map.tracks=r.map.tracks||{},!r.map.tracks[a.type]&&(r.map.tracks[a.type]=a,typeof a.id=="number"&&a.timescale&&(r.map.timescales=r.map.timescales||{},r.map.timescales[a.id]=a.timescale),a.type==="text"&&d8(r,a.codec))}),e(null))})},f8=({segment:r,finishProcessingFn:e,triggerSegmentEventFn:i})=>(n,s)=>{const a=pu(n,s);if(a)return e(a,r);const o=new Uint8Array(s.response);if(i({type:"segmentloaded",segment:r}),r.map.key)return r.map.encryptedBytes=o,e(null,r);r.map.bytes=o,jf(r,function(l){if(l)return l.xhr=s,l.status=s.status,e(l,r);e(null,r)})},p8=({segment:r,finishProcessingFn:e,responseType:i,triggerSegmentEventFn:n})=>(s,a)=>{const o=pu(s,a);if(o)return e(o,r);n({type:"segmentloaded",segment:r});const l=i==="arraybuffer"||!a.responseText?a.response:J4(a.responseText.substring(r.lastReachedChar||0));return r.stats=u8(a),r.key?r.encryptedBytes=new Uint8Array(l):r.bytes=new Uint8Array(l),e(null,r)},m8=({segment:r,bytes:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{const b=r.map&&r.map.tracks||{},y=!!(b.audio&&b.video);let x=n.bind(null,r,"audio","start");const N=n.bind(null,r,"audio","end");let I=n.bind(null,r,"video","start");const D=n.bind(null,r,"video","end"),z=()=>Hf({bytes:e,transmuxer:r.transmuxer,audioAppendStart:r.audioAppendStart,gopsToAlignWith:r.gopsToAlignWith,remux:y,onData:H=>{H.type=H.type==="combined"?"video":H.type,m(r,H)},onTrackInfo:H=>{i&&(y&&(H.isMuxed=!0),i(r,H))},onAudioTimingInfo:H=>{x&&typeof H.start<"u"&&(x(H.start),x=null),N&&typeof H.end<"u"&&N(H.end)},onVideoTimingInfo:H=>{I&&typeof H.start<"u"&&(I(H.start),I=null),D&&typeof H.end<"u"&&D(H.end)},onVideoSegmentTimingInfo:H=>{const U={pts:{start:H.start.presentation,end:H.end.presentation},dts:{start:H.start.decode,end:H.end.decode}};T({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:U}),s(H)},onAudioSegmentTimingInfo:H=>{const U={pts:{start:H.start.pts,end:H.end.pts},dts:{start:H.start.dts,end:H.end.dts}};T({type:"segmenttransmuxingtiminginfoavailable",segment:r,timingInfo:U}),a(H)},onId3:(H,U)=>{o(r,H,U)},onCaptions:H=>{l(r,[H])},isEndOfTimeline:c,onEndedTimeline:()=>{d()},onTransmuxerLog:S,onDone:(H,U)=>{g&&(H.type=H.type==="combined"?"video":H.type,T({type:"segmenttransmuxingcomplete",segment:r}),g(U,r,H))},segment:r,triggerSegmentEventFn:T});er({action:"probeTs",transmuxer:r.transmuxer,data:e,baseStartTime:r.baseStartTime,callback:H=>{r.bytes=e=H.data;const U=H.result;U&&(i(r,{hasAudio:U.hasAudio,hasVideo:U.hasVideo,isMuxed:y}),i=null),z()}})},Gf=({segment:r,bytes:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{let b=new Uint8Array(e);if(MT(b)){r.isFmp4=!0;const{tracks:y}=r.map;if(y.text&&(!y.audio||!y.video)){m(r,{data:b,type:"text"}),h8(r,y.text.codec,g);return}const N={isFmp4:!0,hasVideo:!!y.video,hasAudio:!!y.audio};y.audio&&y.audio.codec&&y.audio.codec!=="enca"&&(N.audioCodec=y.audio.codec),y.video&&y.video.codec&&y.video.codec!=="encv"&&(N.videoCodec=y.video.codec),y.video&&y.audio&&(N.isMuxed=!0),i(r,N);const I=(D,z)=>{m(r,{data:b,type:N.hasAudio&&!N.isMuxed?"audio":"video"}),z&&z.length&&o(r,z),D&&D.length&&l(r,D),g(null,r,{})};er({action:"probeMp4StartTime",timescales:r.map.timescales,data:b,transmuxer:r.transmuxer,callback:({data:D,startTime:z})=>{e=D.buffer,r.bytes=b=D,N.hasAudio&&!N.isMuxed&&n(r,"audio","start",z),N.hasVideo&&n(r,"video","start",z),er({action:"probeEmsgID3",data:b,transmuxer:r.transmuxer,offset:z,callback:({emsgData:H,id3Frames:U})=>{if(e=H.buffer,r.bytes=b=H,!y.video||!H.byteLength||!r.transmuxer){I(void 0,U);return}er({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:r.transmuxer,data:b,timescales:r.map.timescales,trackIds:[y.video.id],callback:B=>{e=B.data.buffer,r.bytes=b=B.data,B.logs.forEach(function(G){S(at(G,{stream:"mp4CaptionParser"}))}),I(B.captions,U)}})}})}});return}if(!r.transmuxer){g(null,r,{});return}if(typeof r.container>"u"&&(r.container=Rl(b)),r.container!=="ts"&&r.container!=="aac"){i(r,{hasAudio:!1,hasVideo:!1}),g(null,r,{});return}m8({segment:r,bytes:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T})},Wf=function({id:r,key:e,encryptedBytes:i,decryptionWorker:n,segment:s,doneFn:a},o){const l=d=>{if(d.data.source===r){n.removeEventListener("message",l);const m=d.data.decrypted;o(new Uint8Array(m.bytes,m.byteOffset,m.byteLength))}};n.onerror=()=>{const d="An error occurred in the decryption worker",m=Dn({segment:s}),g={message:d,metadata:{error:new Error(d),errorType:ae.Error.StreamingFailedToDecryptSegment,segmentInfo:m,keyInfo:{uri:s.key.resolvedUri||s.map.key.resolvedUri}}};a(g,s)},n.addEventListener("message",l);let c;e.bytes.slice?c=e.bytes.slice():c=new Uint32Array(Array.prototype.slice.call(e.bytes)),n.postMessage(Nf({source:r,encrypted:i,key:c,iv:e.iv}),[i.buffer,c.buffer])},g8=({decryptionWorker:r,segment:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{T({type:"segmentdecryptionstart"}),Wf({id:e.requestId,key:e.key,encryptedBytes:e.encryptedBytes,decryptionWorker:r,segment:e,doneFn:g},b=>{e.bytes=b,T({type:"segmentdecryptioncomplete",segment:e}),Gf({segment:e,bytes:e.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T})})},v8=({activeXhrs:r,decryptionWorker:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T})=>{let b=0,y=!1;return(x,N)=>{if(!y){if(x)return y=!0,Cl(r),g(x,N);if(b+=1,b===r.length){const I=function(){if(N.encryptedBytes)return g8({decryptionWorker:e,segment:N,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T});Gf({segment:N,bytes:N.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m,doneFn:g,onTransmuxerLog:S,triggerSegmentEventFn:T})};if(N.endOfAllRequests=Date.now(),N.map&&N.map.encryptedBytes&&!N.map.bytes)return T({type:"segmentdecryptionstart",segment:N}),Wf({decryptionWorker:e,id:N.requestId+"-init",encryptedBytes:N.map.encryptedBytes,key:N.map.key,segment:N,doneFn:g},D=>{N.map.bytes=D,T({type:"segmentdecryptioncomplete",segment:N}),jf(N,z=>{if(z)return Cl(r),g(z,N);I()})});I()}}}},y8=({loadendState:r,abortFn:e})=>i=>{i.target.aborted&&e&&!r.calledAbortFn&&(e(),r.calledAbortFn=!0)},_8=({segment:r,progressFn:e,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:a,id3Fn:o,captionsFn:l,isEndOfTimeline:c,endedTimelineFn:d,dataFn:m})=>g=>{if(!g.target.aborted)return r.stats=at(r.stats,c8(g)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),e(g,r)},T8=({xhr:r,xhrOptions:e,decryptionWorker:i,segment:n,abortFn:s,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:m,captionsFn:g,isEndOfTimeline:S,endedTimelineFn:T,dataFn:b,doneFn:y,onTransmuxerLog:x,triggerSegmentEventFn:N})=>{const I=[],D=v8({activeXhrs:I,decryptionWorker:i,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:m,captionsFn:g,isEndOfTimeline:S,endedTimelineFn:T,dataFn:b,doneFn:y,onTransmuxerLog:x,triggerSegmentEventFn:N});if(n.key&&!n.key.bytes){const G=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&G.push(n.map.key);const C=at(e,{uri:n.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),k=Md(n,G,D,N),O={uri:n.key.resolvedUri};N({type:"segmentkeyloadstart",segment:n,keyInfo:O});const j=r(C,k);I.push(j)}if(n.map&&!n.map.bytes){if(n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri)){const j=at(e,{uri:n.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),L=Md(n,[n.map.key],D,N),V={uri:n.map.key.resolvedUri};N({type:"segmentkeyloadstart",segment:n,keyInfo:V});const M=r(j,L);I.push(M)}const C=at(e,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:Tl(n.map),requestType:"segment-media-initialization"}),k=f8({segment:n,finishProcessingFn:D,triggerSegmentEventFn:N});N({type:"segmentloadstart",segment:n});const O=r(C,k);I.push(O)}const z=at(e,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:Tl(n),requestType:"segment"}),H=p8({segment:n,finishProcessingFn:D,responseType:z.responseType,triggerSegmentEventFn:N});N({type:"segmentloadstart",segment:n});const U=r(z,H);U.addEventListener("progress",_8({segment:n,progressFn:a,trackInfoFn:o,timingInfoFn:l,videoSegmentTimingInfoFn:c,audioSegmentTimingInfoFn:d,id3Fn:m,captionsFn:g,isEndOfTimeline:S,endedTimelineFn:T,dataFn:b})),I.push(U);const B={};return I.forEach(G=>{G.addEventListener("loadend",y8({loadendState:B,abortFn:s}))}),()=>Cl(I)},zs=xi("PlaylistSelector"),Rd=function(r){if(!r||!r.playlist)return;const e=r.playlist;return JSON.stringify({id:e.id,bandwidth:r.bandwidth,width:r.width,height:r.height,codecs:e.attributes&&e.attributes.CODECS||""})},tr=function(r,e){if(!r)return"";const i=Y.getComputedStyle(r);return i?i[e]:""},ir=function(r,e){const i=r.slice();r.sort(function(n,s){const a=e(n,s);return a===0?i.indexOf(n)-i.indexOf(s):a})},mu=function(r,e){let i,n;return r.attributes.BANDWIDTH&&(i=r.attributes.BANDWIDTH),i=i||Y.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||Y.Number.MAX_VALUE,i-n},b8=function(r,e){let i,n;return r.attributes.RESOLUTION&&r.attributes.RESOLUTION.width&&(i=r.attributes.RESOLUTION.width),i=i||Y.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||Y.Number.MAX_VALUE,i===n&&r.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?r.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-n};let Yf=function(r){const{main:e,bandwidth:i,playerWidth:n,playerHeight:s,playerObjectFit:a,limitRenditionByPlayerDimensions:o,playlistController:l}=r;if(!e)return;const c={bandwidth:i,width:n,height:s,limitRenditionByPlayerDimensions:o};let d=e.playlists;oi.isAudioOnly(e)&&(d=l.getAudioTrackPlaylists_(),c.audioOnly=!0);let m=d.map(B=>{let G;const C=B.attributes&&B.attributes.RESOLUTION&&B.attributes.RESOLUTION.width,k=B.attributes&&B.attributes.RESOLUTION&&B.attributes.RESOLUTION.height;return G=B.attributes&&B.attributes.BANDWIDTH,G=G||Y.Number.MAX_VALUE,{bandwidth:G,width:C,height:k,playlist:B}});ir(m,(B,G)=>B.bandwidth-G.bandwidth),m=m.filter(B=>!oi.isIncompatible(B.playlist));let g=m.filter(B=>oi.isEnabled(B.playlist));g.length||(g=m.filter(B=>!oi.isDisabled(B.playlist)));const S=g.filter(B=>B.bandwidth*Lt.BANDWIDTH_VARIANCE<i);let T=S[S.length-1];const b=S.filter(B=>B.bandwidth===T.bandwidth)[0];if(o===!1){const B=b||g[0]||m[0];if(B&&B.playlist){let G="sortedPlaylistReps";return b&&(G="bandwidthBestRep"),g[0]&&(G="enabledPlaylistReps"),zs(`choosing ${Rd(B)} using ${G} with options`,c),B.playlist}return zs("could not choose a playlist with options",c),null}const y=S.filter(B=>B.width&&B.height);ir(y,(B,G)=>B.width-G.width);const x=y.filter(B=>B.width===n&&B.height===s);T=x[x.length-1];const N=x.filter(B=>B.bandwidth===T.bandwidth)[0];let I,D,z;N||(I=y.filter(B=>a==="cover"?B.width>n&&B.height>s:B.width>n||B.height>s),D=I.filter(B=>B.width===I[0].width&&B.height===I[0].height),T=D[D.length-1],z=D.filter(B=>B.bandwidth===T.bandwidth)[0]);let H;if(l.leastPixelDiffSelector){const B=y.map(G=>(G.pixelDiff=Math.abs(G.width-n)+Math.abs(G.height-s),G));ir(B,(G,C)=>G.pixelDiff===C.pixelDiff?C.bandwidth-G.bandwidth:G.pixelDiff-C.pixelDiff),H=B[0]}const U=H||z||N||b||g[0]||m[0];if(U&&U.playlist){let B="sortedPlaylistReps";return H?B="leastPixelDiffRep":z?B="resolutionPlusOneRep":N?B="resolutionBestRep":b?B="bandwidthBestRep":g[0]&&(B="enabledPlaylistReps"),zs(`choosing ${Rd(U)} using ${B} with options`,c),U.playlist}return zs("could not choose a playlist with options",c),null};const Vd=function(){let r=this.useDevicePixelRatio&&Y.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(r=this.customPixelRatio),Yf({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(tr(this.tech_.el(),"width"),10)*r,playerHeight:parseInt(tr(this.tech_.el(),"height"),10)*r,playerObjectFit:this.usePlayerObjectFit?tr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})},C8=function(r){let e=-1,i=-1;if(r<0||r>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let n=this.useDevicePixelRatio&&Y.devicePixelRatio||1;return isNaN(this.customPixelRatio)||(n=this.customPixelRatio),e<0&&(e=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(e=r*this.systemBandwidth+(1-r)*e,i=this.systemBandwidth),Yf({main:this.playlists.main,bandwidth:e,playerWidth:parseInt(tr(this.tech_.el(),"width"),10)*n,playerHeight:parseInt(tr(this.tech_.el(),"height"),10)*n,playerObjectFit:this.usePlayerObjectFit?tr(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},x8=function(r){const{main:e,currentTime:i,bandwidth:n,duration:s,segmentDuration:a,timeUntilRebuffer:o,currentTimeline:l,syncController:c}=r,d=e.playlists.filter(b=>!oi.isIncompatible(b));let m=d.filter(oi.isEnabled);m.length||(m=d.filter(b=>!oi.isDisabled(b)));const S=m.filter(oi.hasAttribute.bind(null,"BANDWIDTH")).map(b=>{const x=c.getSyncPoint(b,s,l,i)?1:2,I=oi.estimateSegmentRequestTime(a,n,b)*x-o;return{playlist:b,rebufferingImpact:I}}),T=S.filter(b=>b.rebufferingImpact<=0);return ir(T,(b,y)=>mu(y.playlist,b.playlist)),T.length?T[0]:(ir(S,(b,y)=>b.rebufferingImpact-y.rebufferingImpact),S[0]||null)},S8=function(){const r=this.playlists.main.playlists.filter(oi.isEnabled);return ir(r,(i,n)=>mu(i,n)),r.filter(i=>!!es(this.playlists.main,i).video)[0]||null},E8=r=>{let e=0,i;return r.bytes&&(i=new Uint8Array(r.bytes),r.segments.forEach(n=>{i.set(n,e),e+=n.byteLength})),i};function Xf(r){try{return new URL(r).pathname.split("/").slice(-2).join("/")}catch{return""}}const k8=function(r,e,i){if(!r[i]){e.trigger({type:"usage",name:"vhs-608"});let n=i;/^cc708_/.test(i)&&(n="SERVICE"+i.split("_")[1]);const s=e.textTracks().getTrackById(n);if(s)r[i]=s;else{const a=e.options_.vhs&&e.options_.vhs.captionServices||{};let o=i,l=i,c=!1;const d=a[n];d&&(o=d.label,l=d.language,c=d.default),r[i]=e.addRemoteTextTrack({kind:"captions",id:n,default:c,label:o,language:l},!1).track}}},w8=function({inbandTextTracks:r,captionArray:e,timestampOffset:i}){if(!e)return;const n=Y.WebKitDataCue||Y.VTTCue;e.forEach(s=>{const a=s.stream;s.content?s.content.forEach(o=>{const l=new n(s.startTime+i,s.endTime+i,o.text);l.line=o.line,l.align="left",l.position=o.position,l.positionAlign="line-left",r[a].addCue(l)}):r[a].addCue(new n(s.startTime+i,s.endTime+i,s.text))})},D8=function(r){Object.defineProperties(r.frame,{id:{get(){return ae.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),r.value.key}},value:{get(){return ae.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),r.value.data}},privateData:{get(){return ae.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),r.value.data}}})},A8=({inbandTextTracks:r,metadataArray:e,timestampOffset:i,videoDuration:n})=>{if(!e)return;const s=Y.WebKitDataCue||Y.VTTCue,a=r.metadataTrack_;if(!a||(e.forEach(m=>{const g=m.cueTime+i;typeof g!="number"||Y.isNaN(g)||g<0||!(g<1/0)||!m.frames||!m.frames.length||m.frames.forEach(S=>{const T=new s(g,g,S.value||S.url||S.data||"");T.frame=S,T.value=S,D8(T),a.addCue(T)})}),!a.cues||!a.cues.length))return;const o=a.cues,l=[];for(let m=0;m<o.length;m++)o[m]&&l.push(o[m]);const c=l.reduce((m,g)=>{const S=m[g.startTime]||[];return S.push(g),m[g.startTime]=S,m},{}),d=Object.keys(c).sort((m,g)=>Number(m)-Number(g));d.forEach((m,g)=>{const S=c[m],T=isFinite(n)?n:m,b=Number(d[g+1])||T;S.forEach(y=>{y.endTime=b})})},I8={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},N8=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),O8=({inbandTextTracks:r,dateRanges:e})=>{const i=r.metadataTrack_;if(!i)return;const n=Y.WebKitDataCue||Y.VTTCue;e.forEach(s=>{for(const a of Object.keys(s)){if(N8.has(a))continue;const o=new n(s.startTime,s.endTime,"");o.id=s.id,o.type="com.apple.quicktime.HLS",o.value={key:I8[a],data:s[a]},(a==="scte35Out"||a==="scte35In")&&(o.value.data=new Uint8Array(o.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(o)}s.processDateRange()})},Fd=(r,e,i)=>{r.metadataTrack_||(r.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,ae.browser.IS_ANY_SAFARI||(r.metadataTrack_.inBandMetadataTrackDispatchType=e))},Yr=function(r,e,i){let n,s;if(i&&i.cues)for(n=i.cues.length;n--;)s=i.cues[n],s.startTime>=r&&s.endTime<=e&&i.removeCue(s)},B8=function(r){const e=r.cues;if(!e)return;const i={};for(let n=e.length-1;n>=0;n--){const s=e[n],a=`${s.startTime}-${s.endTime}-${s.text}`;i[a]?r.removeCue(s):i[a]=s}},L8=(r,e,i)=>{if(typeof e>"u"||e===null||!r.length)return[];const n=Math.ceil((e-i+3)*An.ONE_SECOND_IN_TS);let s;for(s=0;s<r.length&&!(r[s].pts>n);s++);return r.slice(s)},P8=(r,e,i)=>{if(!e.length)return r;if(i)return e.slice();const n=e[0].pts;let s=0;for(s;s<r.length&&!(r[s].pts>=n);s++);return r.slice(0,s).concat(e)},M8=(r,e,i,n)=>{const s=Math.ceil((e-n)*An.ONE_SECOND_IN_TS),a=Math.ceil((i-n)*An.ONE_SECOND_IN_TS),o=r.slice();let l=r.length;for(;l--&&!(r[l].pts<=a););if(l===-1)return o;let c=l+1;for(;c--&&!(r[c].pts<=s););return c=Math.max(c,0),o.splice(c,l-c+1),o},R8=function(r,e){if(!r&&!e||!r&&e||r&&!e)return!1;if(r===e)return!0;const i=Object.keys(r).sort(),n=Object.keys(e).sort();if(i.length!==n.length)return!1;for(let s=0;s<i.length;s++){const a=i[s];if(a!==n[s]||r[a]!==e[a])return!1}return!0},V8=function(r,e,i){e=e||[];const n=[];let s=0;for(let a=0;a<e.length;a++){const o=e[a];if(r===o.timeline&&(n.push(a),s+=o.duration,s>i))return a}return n.length===0?0:n[n.length-1]},qr=1,F8=500,$d=r=>typeof r=="number"&&isFinite(r),Hs=1/60,$8=(r,e,i)=>r!=="main"||!e||!i?null:!i.hasAudio&&!i.hasVideo?"Neither audio nor video found in segment.":e.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!e.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null,U8=(r,e,i)=>{let n=e-Lt.BACK_BUFFER_LENGTH;r.length&&(n=Math.max(n,r.start(0)));const s=e-i;return Math.min(s,n)},jn=r=>{const{startOfSegment:e,duration:i,segment:n,part:s,playlist:{mediaSequence:a,id:o,segments:l=[]},mediaIndex:c,partIndex:d,timeline:m}=r,g=l.length-1;let S="mediaIndex/partIndex increment";r.getMediaInfoForTime?S=`getMediaInfoForTime (${r.getMediaInfoForTime})`:r.isSyncRequest&&(S="getSyncSegmentCandidate (isSyncRequest)"),r.independent&&(S+=` with independent ${r.independent}`);const T=typeof d=="number",b=r.segment.uri?"segment":"pre-segment",y=T?ff({preloadSegment:n})-1:0;return`${b} [${a+c}/${a+g}]`+(T?` part [${d}/${y}]`:"")+` segment start/end [${n.start} => ${n.end}]`+(T?` part start/end [${s.start} => ${s.end}]`:"")+` startOfSegment [${e}] duration [${i}] timeline [${m}] selected by [${S}] playlist [${o}]`},Ud=r=>`${r}TimingInfo`,z8=({segmentTimeline:r,currentTimeline:e,startOfSegment:i,buffered:n,overrideCheck:s})=>!s&&r===e?null:r<e?i:n.length?n.end(n.length-1):i,xl=({timelineChangeController:r,currentTimeline:e,segmentTimeline:i,loaderType:n,audioDisabled:s})=>{if(e===i)return!1;if(n==="audio"){const a=r.lastTimelineChange({type:"main"});return!a||a.to!==i}if(n==="main"&&s){const a=r.pendingTimelineChange({type:"audio"});return!(a&&a.to===i)}return!1},H8=r=>{if(!r)return!1;const e=r.pendingTimelineChange({type:"audio"}),i=r.pendingTimelineChange({type:"main"}),n=e&&i,s=n&&e.to!==i.to;return!!(n&&e.from!==-1&&i.from!==-1&&s)},q8=r=>{const e=r.timelineChangeController_.pendingTimelineChange({type:"audio"}),i=r.timelineChangeController_.pendingTimelineChange({type:"main"});return e&&i&&e.to<i.to},cn=r=>{const e=r.pendingSegment_;if(!e)return;if(xl({timelineChangeController:r.timelineChangeController_,currentTimeline:r.currentTimeline_,segmentTimeline:e.timeline,loaderType:r.loaderType_,audioDisabled:r.audioDisabled_})&&H8(r.timelineChangeController_)){if(q8(r)){r.timelineChangeController_.trigger("audioTimelineBehind");return}r.timelineChangeController_.trigger("fixBadTimelineChange")}},j8=r=>{let e=0;return["video","audio"].forEach(function(i){const n=r[`${i}TimingInfo`];if(!n)return;const{start:s,end:a}=n;let o;typeof s=="bigint"||typeof a=="bigint"?o=Y.BigInt(a)-Y.BigInt(s):typeof s=="number"&&typeof a=="number"&&(o=a-s),typeof o<"u"&&o>e&&(e=o)}),typeof e=="bigint"&&e<Number.MAX_SAFE_INTEGER&&(e=Number(e)),e},zd=({segmentDuration:r,maxDuration:e})=>r?Math.round(r)>e+$i:!1,G8=(r,e)=>{if(e!=="hls")return null;const i=j8({audioTimingInfo:r.audioTimingInfo,videoTimingInfo:r.videoTimingInfo});if(!i)return null;const n=r.playlist.targetDuration,s=zd({segmentDuration:i,maxDuration:n*2}),a=zd({segmentDuration:i,maxDuration:n}),o=`Segment with index ${r.mediaIndex} from playlist ${r.playlist.id} has a duration of ${i} when the reported duration is ${r.duration} and the target duration is ${n}. For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1`;return s||a?{severity:s?"warn":"info",message:o}:null},Dn=({type:r,segment:e})=>{if(!e)return;const i=!!(e.key||e.map&&e.map.ke),n=!!(e.map&&!e.map.bytes),s=e.startOfSegment===void 0?e.start:e.startOfSegment;return{type:r||e.type,uri:e.resolvedUri||e.uri,start:s,duration:e.duration,isEncrypted:i,isMediaInitialization:n}};class Sl extends ae.EventTarget{constructor(e,i={}){if(super(),!e)throw new TypeError("Initialization settings are required");if(typeof e.currentTime!="function")throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={},this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",()=>{this.isEndOfStream_()||(this.ended_=!1)}),this.fetchAtBuffer_=!1,this.logger_=xi(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(n){n!==this.state_&&(this.logger_(`${this.state_} -> ${n}`),this.state_=n,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this)}),this.sourceUpdater_.on("codecschange",n=>{this.trigger(Ct({type:"codecschange"},n))}),this.loaderType_==="main"&&this.timelineChangeController_.on("pendingtimelinechange",()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this)}),this.loaderType_==="audio"&&this.timelineChangeController_.on("timelinechange",n=>{this.trigger(Ct({type:"timelinechange"},n)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():cn(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():cn(this)})}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return Wo.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&Y.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if(this.state!=="WAITING"){this.pendingSegment_&&(this.pendingSegment_=null),this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);return}this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,Y.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return this.state==="APPENDING"&&!this.pendingSegment_?(this.state="READY",!0):!this.pendingSegment_||this.pendingSegment_.requestId!==e}error(e){return typeof e<"u"&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&Wo.reset(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Mt();if(this.loaderType_==="main"){const{hasAudio:i,hasVideo:n,isMuxed:s}=e;if(n&&i&&!this.audioDisabled_&&!s)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,i=!1){if(!e)return null;const n=ya(e);let s=this.initSegments_[n];return i&&!s&&e.bytes&&(this.initSegments_[n]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),s||e}segmentKey(e,i=!1){if(!e)return null;const n=Of(e);let s=this.keyCache_[n];this.cacheEncryptionKeys_&&i&&!s&&e.bytes&&(this.keyCache_[n]=s={resolvedUri:e.resolvedUri,bytes:e.bytes});const a={resolvedUri:(s||e).resolvedUri};return s&&(a.bytes=s.bytes),a}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){if(this.monitorBuffer_(),!!this.playlist_){if(this.state==="INIT"&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||this.state!=="READY"&&this.state!=="INIT"||(this.state="READY")}}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,i={}){if(!e||this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const n=this.playlist_,s=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=i,this.state==="INIT"&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},this.loaderType_==="main"&&this.syncController_.setDateTimeMappingForStart(e));let a=null;if(n&&(n.id?a=n.id:n.uri&&(a=n.uri)),this.logger_(`playlist update [${a} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:
209
209
  currentTime: ${this.currentTime_()}
210
210
  bufferedEnd: ${jo(this.buffered_())}
211
211
  `,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),this.state==="INIT"&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri){this.mediaIndex!==null&&(!e.endList&&typeof e.partTargetDuration=="number"?this.resetLoader():this.resyncLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate");return}const o=e.mediaSequence-n.mediaSequence;if(this.logger_(`live window shift [${o}]`),this.mediaIndex!==null)if(this.mediaIndex-=o,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const l=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!l.parts||!l.parts.length||!l.parts[this.partIndex])){const c=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=c}}s&&(s.mediaIndex-=o,s.mediaIndex<0?(s.mediaIndex=null,s.partIndex=null):(s.mediaIndex>=0&&(s.segment=e.segments[s.mediaIndex]),s.partIndex>=0&&s.segment.parts&&(s.part=s.segment.parts[s.partIndex]))),this.syncController_.saveExpiredSegmentInfo(n,e)}pause(){this.checkBufferTimeout_&&(Y.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return this.checkBufferTimeout_===null}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&Wo.reset(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;this.sourceType_==="hls"&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,i,n=()=>{},s=!1){if(i===1/0&&(i=this.duration_()),i<=e){this.logger_("skipping remove because end ${end} is <= start ${start}");return}if(!this.sourceUpdater_||!this.getMediaInfo_()){this.logger_("skipping remove because no source updater or starting media info");return}let a=1;const o=()=>{a--,a===0&&n()};(s||!this.audioDisabled_)&&(a++,this.sourceUpdater_.removeAudio(e,i,o)),(s||this.loaderType_==="main")&&(this.gopBuffer_=M8(this.gopBuffer_,e,i,this.timeMapping_),a++,this.sourceUpdater_.removeVideo(e,i,o));for(const l in this.inbandTextTracks_)Yr(e,i,this.inbandTextTracks_[l]);Yr(e,i,this.segmentMetadataTrack_),o()}monitorBuffer_(){this.checkBufferTimeout_&&Y.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Y.setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){this.state==="READY"&&this.fillBuffer_(),this.checkBufferTimeout_&&Y.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=Y.setTimeout(this.monitorBufferTick_.bind(this),F8)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const i={segmentInfo:Dn({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:i}),typeof e.timestampOffset=="number"&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,i=this.playlist_,n=this.partIndex){if(!i||!this.mediaSource_)return!1;const s=typeof e=="number"&&i.segments[e],a=e+1===i.segments.length,o=!s||!s.parts||n+1===s.parts.length;return i.endList&&this.mediaSource_.readyState==="open"&&a&&o}chooseNextRequest_(){const e=this.buffered_(),i=jo(e)||0,n=cu(e,this.currentTime_()),s=!this.hasPlayed_()&&n>=1,a=n>=this.goalBufferLength_(),o=this.playlist_.segments;if(!o.length||s||a)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const l={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(l.isSyncRequest)l.mediaIndex=V8(this.currentTimeline_,o,i),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${l.mediaIndex}`);else if(this.mediaIndex!==null){const S=o[this.mediaIndex],T=typeof this.partIndex=="number"?this.partIndex:-1;l.startOfSegment=S.end?S.end:i,S.parts&&S.parts[T+1]?(l.mediaIndex=this.mediaIndex,l.partIndex=T+1):l.mediaIndex=this.mediaIndex+1}else{let S,T,b;const y=this.fetchAtBuffer_?i:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:
@@ -221,4 +221,4 @@ ${jn(e)}`),i.map&&!i.map.bytes&&(this.logger_("going to request init segment."),
221
221
  `,o=n,l=i;this.start_=o,e.forEach((c,d)=>{const m=this.storage_.get(l),g=o,S=g+c.duration,T=!!(m&&m.segmentSyncInfo&&m.segmentSyncInfo.isAppended),b=new Gd({start:g,end:S,appended:T,segmentIndex:d});c.syncInfo=b;let y=o;const x=(c.parts||[]).map((N,I)=>{const D=y,z=y+N.duration,H=!!(m&&m.partsSyncInfo&&m.partsSyncInfo[I]&&m.partsSyncInfo[I].isAppended),U=new Gd({start:D,end:z,appended:H,segmentIndex:d,partIndex:I});return y=z,a+=`Media Sequence: ${l}.${I} | Range: ${D} --> ${z} | Appended: ${H}
222
222
  `,N.syncInfo=U,U});s.set(l,new eC(b,x)),a+=`${Xf(c.resolvedUri)} | Media Sequence: ${l} | Range: ${g} --> ${S} | Appended: ${T}
223
223
  `,l++,o=S}),this.end_=o,this.storage_=s,this.diagnostics_=a}calculateBaseTime_(e,i,n){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const s=Math.min(...this.storage_.keys());if(e<s){const a=s-e;let o=this.storage_.get(s).segmentSyncInfo.start;for(let l=0;l<a;l++){const c=i[l];o-=c.duration}return o}return n}isReliablePlaylist_(e,i){return e!=null&&Array.isArray(i)&&i.length}}class Wd extends Jf{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,i,n){if(!this.storage_.size){const s=this.parent_.getSyncInfoForMediaSequence(e);return s?s.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,i,n)}}const tC=86400,Yo=[{name:"VOD",run:(r,e,i,n,s)=>i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(r,e,i,n,s,a)=>{const o=r.getMediaSequenceSync(a);if(!o||!o.isReliable)return null;const l=o.getSyncInfoForTime(s);return l?{time:l.start,partIndex:l.partIndex,segmentIndex:l.segmentIndex}:null}},{name:"ProgramDateTime",run:(r,e,i,n,s)=>{if(!Object.keys(r.timelineToDatetimeMappings).length)return null;let a=null,o=null;const l=ml(e);s=s||0;for(let c=0;c<l.length;c++){const d=e.endList||s===0?c:l.length-(c+1),m=l[d],g=m.segment,S=r.timelineToDatetimeMappings[g.timeline];if(!S||!g.dateTimeObject)continue;let b=g.dateTimeObject.getTime()/1e3+S;if(g.parts&&typeof m.partIndex=="number")for(let x=0;x<m.partIndex;x++)b+=g.parts[x].duration;const y=Math.abs(s-b);if(o!==null&&(y===0||o<y))break;o=y,a={time:b,segmentIndex:m.segmentIndex,partIndex:m.partIndex}}return a}},{name:"Segment",run:(r,e,i,n,s)=>{let a=null,o=null;s=s||0;const l=ml(e);for(let c=0;c<l.length;c++){const d=e.endList||s===0?c:l.length-(c+1),m=l[d],g=m.segment,S=m.part&&m.part.start||g&&g.start;if(g.timeline===n&&typeof S<"u"){const T=Math.abs(s-S);if(o!==null&&o<T)break;(!a||o===null||o>=T)&&(o=T,a={time:S,segmentIndex:m.segmentIndex,partIndex:m.partIndex})}}return a}},{name:"Discontinuity",run:(r,e,i,n,s)=>{let a=null;if(s=s||0,e.discontinuityStarts&&e.discontinuityStarts.length){let o=null;for(let l=0;l<e.discontinuityStarts.length;l++){const c=e.discontinuityStarts[l],d=e.discontinuitySequence+l+1,m=r.discontinuities[d];if(m){const g=Math.abs(s-m.time);if(o!==null&&o<g)break;(!a||o===null||o>=g)&&(o=g,a={time:m.time,segmentIndex:c,partIndex:null})}}}return a}},{name:"Playlist",run:(r,e,i,n,s)=>e.syncInfo?{time:e.syncInfo.time,segmentIndex:e.syncInfo.mediaSequence-e.mediaSequence,partIndex:null}:null}];class iC extends ae.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const i=new Jf,n=new Wd(i),s=new Wd(i);this.mediaSequenceStorage_={main:i,audio:n,vtt:s},this.logger_=xi("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,i,n,s,a){if(i!==1/0)return Yo.find(({name:c})=>c==="VOD").run(this,e,i);const o=this.runStrategies_(e,i,n,s,a);if(!o.length)return null;for(const l of o){const{syncPoint:c,strategy:d}=l,{segmentIndex:m,time:g}=c;if(m<0)continue;const S=e.segments[m],T=g,b=T+S.duration;if(this.logger_(`Strategy: ${d}. Current time: ${s}. selected segment: ${m}. Time: [${T} -> ${b}]}`),s>=T&&s<b)return this.logger_("Found sync point with exact match: ",c),c}return this.selectSyncPoint_(o,{key:"time",value:s})}getExpiredTime(e,i){if(!e||!e.segments)return null;const n=this.runStrategies_(e,i,e.discontinuitySequence,0);if(!n.length)return null;const s=this.selectSyncPoint_(n,{key:"segmentIndex",value:0});return s.segmentIndex>0&&(s.time*=-1),Math.abs(s.time+Jr({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:s.segmentIndex,endIndex:0}))}runStrategies_(e,i,n,s,a){const o=[];for(let l=0;l<Yo.length;l++){const c=Yo[l],d=c.run(this,e,i,n,s,a);d&&(d.strategy=c.name,o.push({strategy:c.name,syncPoint:d}))}return o}selectSyncPoint_(e,i){let n=e[0].syncPoint,s=Math.abs(e[0].syncPoint[i.key]-i.value),a=e[0].strategy;for(let o=1;o<e.length;o++){const l=Math.abs(e[o].syncPoint[i.key]-i.value);l<s&&(s=l,n=e[o].syncPoint,a=e[o].strategy)}return this.logger_(`syncPoint for [${i.key}: ${i.value}] chosen with strategy [${a}]: [time:${n.time}, segmentIndex:${n.segmentIndex}`+(typeof n.partIndex=="number"?`,partIndex:${n.partIndex}`:"")+"]"),n}saveExpiredSegmentInfo(e,i){const n=i.mediaSequence-e.mediaSequence;if(n>tC){ae.log.warn(`Not saving expired segment info. Media sequence gap ${n} is too large.`);return}for(let s=n-1;s>=0;s--){const a=e.segments[s];if(a&&typeof a.start<"u"){i.syncInfo={mediaSequence:e.mediaSequence+s,time:a.start},this.logger_(`playlist refresh sync: [time:${i.syncInfo.time}, mediaSequence: ${i.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const i=e.segments[0],n=i.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[i.timeline]=-n}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:i}){const n=this.calculateSegmentTimeMapping_(e,e.timingInfo,i),s=e.segment;n&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:s.start}));const a=s.dateTimeObject;s.discontinuity&&i&&a&&(this.timelineToDatetimeMappings[s.timeline]=-(a.getTime()/1e3))}timestampOffsetForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].time}mappingForTimeline(e){return typeof this.timelines[e]>"u"?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,i,n){const s=e.segment,a=e.part;let o=this.timelines[e.timeline],l,c;if(typeof e.timestampOffset=="number")o={time:e.startOfSegment,mapping:e.startOfSegment-i.start},n&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),l=e.startOfSegment,c=i.end+o.mapping;else if(o)l=i.start+o.mapping,c=i.end+o.mapping;else return!1;return a&&(a.start=l,a.end=c),(!s.start||l<s.start)&&(s.start=l),s.end=c,!0}saveDiscontinuitySyncInfo_(e){const i=e.playlist,n=e.segment;if(n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(i.discontinuityStarts&&i.discontinuityStarts.length)for(let s=0;s<i.discontinuityStarts.length;s++){const a=i.discontinuityStarts[s],o=i.discontinuitySequence+s+1,l=a-e.mediaIndex,c=Math.abs(l);if(!this.discontinuities[o]||this.discontinuities[o].accuracy>c){let d;l<0?d=n.start-Jr({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex,endIndex:a}):d=n.end+Jr({defaultDuration:i.targetDuration,durationList:i.segments,startIndex:e.mediaIndex+1,endIndex:a}),this.discontinuities[o]={time:d,accuracy:c}}}}dispose(){this.trigger("dispose"),this.off()}}class nC extends ae.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:i,to:n}){return typeof i=="number"&&typeof n=="number"&&(this.pendingTimelineChanges_[e]={type:e,from:i,to:n},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:i,to:n}){if(typeof i=="number"&&typeof n=="number"){this.lastTimelineChanges_[e]={type:e,from:i,to:n},delete this.pendingTimelineChanges_[e];const s={timelineChangeInfo:{from:i,to:n}};this.trigger({type:"timelinechange",metadata:s})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const rC=Vf(Ff(function(){var r=(function(){function y(){this.listeners={}}var x=y.prototype;return x.on=function(I,D){this.listeners[I]||(this.listeners[I]=[]),this.listeners[I].push(D)},x.off=function(I,D){if(!this.listeners[I])return!1;var z=this.listeners[I].indexOf(D);return this.listeners[I]=this.listeners[I].slice(0),this.listeners[I].splice(z,1),z>-1},x.trigger=function(I){var D=this.listeners[I];if(D)if(arguments.length===2)for(var z=D.length,H=0;H<z;++H)D[H].call(this,arguments[1]);else for(var U=Array.prototype.slice.call(arguments,1),B=D.length,G=0;G<B;++G)D[G].apply(this,U)},x.dispose=function(){this.listeners={}},x.pipe=function(I){this.on("data",function(D){I.push(D)})},y})();/*! @name pkcs7 @version 1.0.4 @license Apache-2.0 */function e(y){return y.subarray(0,y.byteLength-y[y.byteLength-1])}/*! @name aes-decrypter @version 4.0.2 @license Apache-2.0 */const i=function(){const y=[[[],[],[],[],[]],[[],[],[],[],[]]],x=y[0],N=y[1],I=x[4],D=N[4];let z,H,U;const B=[],G=[];let C,k,O,j,L,V;for(z=0;z<256;z++)G[(B[z]=z<<1^(z>>7)*283)^z]=z;for(H=U=0;!I[H];H^=C||1,U=G[U]||1)for(j=U^U<<1^U<<2^U<<3^U<<4,j=j>>8^j&255^99,I[H]=j,D[j]=H,O=B[k=B[C=B[H]]],V=O*16843009^k*65537^C*257^H*16843008,L=B[j]*257^j*16843008,z=0;z<4;z++)x[z][H]=L=L<<24^L>>>8,N[z][j]=V=V<<24^V>>>8;for(z=0;z<5;z++)x[z]=x[z].slice(0),N[z]=N[z].slice(0);return y};let n=null;class s{constructor(x){n||(n=i()),this._tables=[[n[0][0].slice(),n[0][1].slice(),n[0][2].slice(),n[0][3].slice(),n[0][4].slice()],[n[1][0].slice(),n[1][1].slice(),n[1][2].slice(),n[1][3].slice(),n[1][4].slice()]];let N,I,D;const z=this._tables[0][4],H=this._tables[1],U=x.length;let B=1;if(U!==4&&U!==6&&U!==8)throw new Error("Invalid aes key size");const G=x.slice(0),C=[];for(this._key=[G,C],N=U;N<4*U+28;N++)D=G[N-1],(N%U===0||U===8&&N%U===4)&&(D=z[D>>>24]<<24^z[D>>16&255]<<16^z[D>>8&255]<<8^z[D&255],N%U===0&&(D=D<<8^D>>>24^B<<24,B=B<<1^(B>>7)*283)),G[N]=G[N-U]^D;for(I=0;N;I++,N--)D=G[I&3?N:N-4],N<=4||I<4?C[I]=D:C[I]=H[0][z[D>>>24]]^H[1][z[D>>16&255]]^H[2][z[D>>8&255]]^H[3][z[D&255]]}decrypt(x,N,I,D,z,H){const U=this._key[1];let B=x^U[0],G=D^U[1],C=I^U[2],k=N^U[3],O,j,L;const V=U.length/4-2;let M,q=4;const $=this._tables[1],X=$[0],R=$[1],ee=$[2],ue=$[3],J=$[4];for(M=0;M<V;M++)O=X[B>>>24]^R[G>>16&255]^ee[C>>8&255]^ue[k&255]^U[q],j=X[G>>>24]^R[C>>16&255]^ee[k>>8&255]^ue[B&255]^U[q+1],L=X[C>>>24]^R[k>>16&255]^ee[B>>8&255]^ue[G&255]^U[q+2],k=X[k>>>24]^R[B>>16&255]^ee[G>>8&255]^ue[C&255]^U[q+3],q+=4,B=O,G=j,C=L;for(M=0;M<4;M++)z[(3&-M)+H]=J[B>>>24]<<24^J[G>>16&255]<<16^J[C>>8&255]<<8^J[k&255]^U[q++],O=B,B=G,G=C,C=k,k=O}}class a extends r{constructor(){super(r),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(x){this.jobs.push(x),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const o=function(y){return y<<24|(y&65280)<<8|(y&16711680)>>8|y>>>24},l=function(y,x,N){const I=new Int32Array(y.buffer,y.byteOffset,y.byteLength>>2),D=new s(Array.prototype.slice.call(x)),z=new Uint8Array(y.byteLength),H=new Int32Array(z.buffer);let U,B,G,C,k,O,j,L,V;for(U=N[0],B=N[1],G=N[2],C=N[3],V=0;V<I.length;V+=4)k=o(I[V]),O=o(I[V+1]),j=o(I[V+2]),L=o(I[V+3]),D.decrypt(k,O,j,L,H,V),H[V]=o(H[V]^U),H[V+1]=o(H[V+1]^B),H[V+2]=o(H[V+2]^G),H[V+3]=o(H[V+3]^C),U=k,B=O,G=j,C=L;return z};class c{constructor(x,N,I,D){const z=c.STEP,H=new Int32Array(x.buffer),U=new Uint8Array(x.byteLength);let B=0;for(this.asyncStream_=new a,this.asyncStream_.push(this.decryptChunk_(H.subarray(B,B+z),N,I,U)),B=z;B<H.length;B+=z)I=new Uint32Array([o(H[B-4]),o(H[B-3]),o(H[B-2]),o(H[B-1])]),this.asyncStream_.push(this.decryptChunk_(H.subarray(B,B+z),N,I,U));this.asyncStream_.push(function(){D(null,e(U))})}static get STEP(){return 32e3}decryptChunk_(x,N,I,D){return function(){const z=l(x,N,I);D.set(z,x.byteOffset)}}}var d=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},m;typeof window<"u"?m=window:typeof d<"u"?m=d:typeof self<"u"?m=self:m={};var g=m,S=function(x){return ArrayBuffer.isView==="function"?ArrayBuffer.isView(x):x&&x.buffer instanceof ArrayBuffer},T=g.BigInt||Number;T("0x1"),T("0x100"),T("0x10000"),T("0x1000000"),T("0x100000000"),T("0x10000000000"),T("0x1000000000000"),T("0x100000000000000"),T("0x10000000000000000"),(function(){var y=new Uint16Array([65484]),x=new Uint8Array(y.buffer,y.byteOffset,y.byteLength);return x[0]===255?"big":x[0]===204?"little":"unknown"})();const b=function(y){const x={};return Object.keys(y).forEach(N=>{const I=y[N];S(I)?x[N]={bytes:I.buffer,byteOffset:I.byteOffset,byteLength:I.byteLength}:x[N]=I}),x};self.onmessage=function(y){const x=y.data,N=new Uint8Array(x.encrypted.bytes,x.encrypted.byteOffset,x.encrypted.byteLength),I=new Uint32Array(x.key.bytes,x.key.byteOffset,x.key.byteLength/4),D=new Uint32Array(x.iv.bytes,x.iv.byteOffset,x.iv.byteLength/4);new c(N,I,D,function(z,H){self.postMessage(b({source:x.source,decrypted:H}),[H.buffer])})}}));var sC=Rf(rC);const aC=r=>{let e=r.default?"main":"alternative";return r.characteristics&&r.characteristics.indexOf("public.accessibility.describes-video")>=0&&(e="main-desc"),e},ep=(r,e)=>{r.abort(),r.pause(),e&&e.activePlaylistLoader&&(e.activePlaylistLoader.pause(),e.activePlaylistLoader=null)},kl=(r,e)=>{e.activePlaylistLoader=r,r.load()},oC=(r,e)=>()=>{const{segmentLoaders:{[r]:i,main:n},mediaTypes:{[r]:s}}=e,a=s.activeTrack(),o=s.getActiveGroup(),l=s.activePlaylistLoader,c=s.lastGroup_;if(!(o&&c&&o.id===c.id)&&(s.lastGroup_=o,s.lastTrack_=a,ep(i,s),!(!o||o.isMainPlaylist))){if(!o.playlistLoader){l&&n.resetEverything();return}i.resyncLoader(),kl(o.playlistLoader,s)}},lC=(r,e)=>()=>{const{segmentLoaders:{[r]:i},mediaTypes:{[r]:n}}=e;n.lastGroup_=null,i.abort(),i.pause()},uC=(r,e)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[r]:n,main:s},mediaTypes:{[r]:a}}=e,o=a.activeTrack(),l=a.getActiveGroup(),c=a.activePlaylistLoader,d=a.lastTrack_;if(!(d&&o&&d.id===o.id)&&(a.lastGroup_=l,a.lastTrack_=o,ep(n,a),!!l)){if(l.isMainPlaylist){if(!o||!d||o.id===d.id)return;const m=e.vhs.playlistController_,g=m.selectPlaylist();if(m.media()===g)return;a.logger_(`track change. Switching main audio from ${d.id} to ${o.id}`),i.pause(),s.resetEverything(),m.fastQualityChange_(g);return}if(r==="AUDIO"){if(!l.playlistLoader){s.setAudio(!0),s.resetEverything();return}n.setAudio(!0),s.setAudio(!1)}if(c===l.playlistLoader){kl(l.playlistLoader,a);return}n.track&&n.track(o),n.resetEverything(),kl(l.playlistLoader,a)}},_a={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:i},excludePlaylist:n}=e,s=i.activeTrack(),a=i.activeGroup(),o=(a.filter(c=>c.default)[0]||a[0]).id,l=i.tracks[o];if(s===l){n({error:{message:"Problem encountered loading the default audio track."}});return}ae.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const c in i.tracks)i.tracks[c].enabled=i.tracks[c]===l;i.onTrackChanged()},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:i}}=e;ae.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const n=i.activeTrack();n&&(n.mode="disabled"),i.onTrackChanged()}},Yd={AUDIO:(r,e,i)=>{if(!e)return;const{tech:n,requestOptions:s,segmentLoaders:{[r]:a}}=i;e.on("loadedmetadata",()=>{const o=e.media();a.playlist(o,s),(!n.paused()||o.endList&&n.preload()!=="none")&&a.load()}),e.on("loadedplaylist",()=>{a.playlist(e.media(),s),n.paused()||a.load()}),e.on("error",_a[r](r,i))},SUBTITLES:(r,e,i)=>{const{tech:n,requestOptions:s,segmentLoaders:{[r]:a},mediaTypes:{[r]:o}}=i;e.on("loadedmetadata",()=>{const l=e.media();a.playlist(l,s),a.track(o.activeTrack()),(!n.paused()||l.endList&&n.preload()!=="none")&&a.load()}),e.on("loadedplaylist",()=>{a.playlist(e.media(),s),n.paused()||a.load()}),e.on("error",_a[r](r,i))}},cC={AUDIO:(r,e)=>{const{vhs:i,sourceType:n,segmentLoaders:{[r]:s},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[r]:{groups:l,tracks:c,logger_:d}},mainPlaylistLoader:m}=e,g=hs(m.main);(!o[r]||Object.keys(o[r]).length===0)&&(o[r]={main:{default:{default:!0}}},g&&(o[r].main.default.playlists=m.main.playlists));for(const S in o[r]){l[S]||(l[S]=[]);for(const T in o[r][S]){let b=o[r][S][T],y;if(g?(d(`AUDIO group '${S}' label '${T}' is a main playlist`),b.isMainPlaylist=!0,y=null):n==="vhs-json"&&b.playlists?y=new Yn(b.playlists[0],i,a):b.resolvedUri?y=new Yn(b.resolvedUri,i,a):b.playlists&&n==="dash"?y=new bl(b.playlists[0],i,a,m):y=null,b=at({id:T,playlistLoader:y},b),Yd[r](r,b.playlistLoader,e),l[S].push(b),typeof c[T]>"u"){const x=new ae.AudioTrack({id:T,kind:aC(b),enabled:!1,language:b.language,default:b.default,label:T});c[T]=x}}}s.on("error",_a[r](r,e))},SUBTITLES:(r,e)=>{const{tech:i,vhs:n,sourceType:s,segmentLoaders:{[r]:a},requestOptions:o,main:{mediaGroups:l},mediaTypes:{[r]:{groups:c,tracks:d}},mainPlaylistLoader:m}=e;for(const g in l[r]){c[g]||(c[g]=[]);for(const S in l[r][g]){if(!n.options_.useForcedSubtitles&&l[r][g][S].forced)continue;let T=l[r][g][S],b;if(s==="hls")b=new Yn(T.resolvedUri,n,o);else if(s==="dash"){if(!T.playlists.filter(x=>x.excludeUntil!==1/0).length)return;b=new bl(T.playlists[0],n,o,m)}else s==="vhs-json"&&(b=new Yn(T.playlists?T.playlists[0]:T.resolvedUri,n,o));if(T=at({id:S,playlistLoader:b},T),Yd[r](r,T.playlistLoader,e),c[g].push(T),typeof d[S]>"u"){const y=i.addRemoteTextTrack({id:S,kind:"subtitles",default:T.default&&T.autoselect,language:T.language,label:S},!1).track;d[S]=y}}}a.on("error",_a[r](r,e))},"CLOSED-CAPTIONS":(r,e)=>{const{tech:i,main:{mediaGroups:n},mediaTypes:{[r]:{groups:s,tracks:a}}}=e;for(const o in n[r]){s[o]||(s[o]=[]);for(const l in n[r][o]){const c=n[r][o][l];if(!/^(?:CC|SERVICE)/.test(c.instreamId))continue;const d=i.options_.vhs&&i.options_.vhs.captionServices||{};let m={label:l,language:c.language,instreamId:c.instreamId,default:c.default&&c.autoselect};if(d[m.instreamId]&&(m=at(m,d[m.instreamId])),m.default===void 0&&delete m.default,s[o].push(at({id:l},c)),typeof a[l]>"u"){const g=i.addRemoteTextTrack({id:m.instreamId,kind:"captions",default:m.default,language:m.language,label:m.label},!1).track;a[l]=g}}}}},tp=(r,e)=>{for(let i=0;i<r.length;i++)if(fu(e,r[i])||r[i].playlists&&tp(r[i].playlists,e))return!0;return!1},dC=(r,e)=>i=>{const{mainPlaylistLoader:n,mediaTypes:{[r]:{groups:s}}}=e,a=n.media();if(!a)return null;let o=null;a.attributes[r]&&(o=s[a.attributes[r]]);const l=Object.keys(s);if(!o)if(r==="AUDIO"&&l.length>1&&hs(e.main))for(let c=0;c<l.length;c++){const d=s[l[c]];if(tp(d,a)){o=d;break}}else s.main?o=s.main:l.length===1&&(o=s[l[0]]);return typeof i>"u"?o:i===null||!o?null:o.filter(c=>c.id===i.id)[0]||null},hC={AUDIO:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:i}}}=e;for(const n in i)if(i[n].enabled)return i[n];return null},SUBTITLES:(r,e)=>()=>{const{mediaTypes:{[r]:{tracks:i}}}=e;for(const n in i)if(i[n].mode==="showing"||i[n].mode==="hidden")return i[n];return null}},fC=(r,{mediaTypes:e})=>()=>{const i=e[r].activeTrack();return i?e[r].activeGroup(i):null},pC=r=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(d=>{cC[d](d,r)});const{mediaTypes:e,mainPlaylistLoader:i,tech:n,vhs:s,segmentLoaders:{["AUDIO"]:a,main:o}}=r;["AUDIO","SUBTITLES"].forEach(d=>{e[d].activeGroup=dC(d,r),e[d].activeTrack=hC[d](d,r),e[d].onGroupChanged=oC(d,r),e[d].onGroupChanging=lC(d,r),e[d].onTrackChanged=uC(d,r),e[d].getActiveGroup=fC(d,r)});const l=e.AUDIO.activeGroup();if(l){const d=(l.filter(g=>g.default)[0]||l[0]).id;e.AUDIO.tracks[d].enabled=!0,e.AUDIO.onGroupChanged(),e.AUDIO.onTrackChanged(),e.AUDIO.getActiveGroup().playlistLoader?(o.setAudio(!1),a.setAudio(!0)):o.setAudio(!0)}i.on("mediachange",()=>{["AUDIO","SUBTITLES"].forEach(d=>e[d].onGroupChanged())}),i.on("mediachanging",()=>{["AUDIO","SUBTITLES"].forEach(d=>e[d].onGroupChanging())});const c=()=>{e.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"vhs-audio-change"})};n.audioTracks().addEventListener("change",c),n.remoteTextTracks().addEventListener("change",e.SUBTITLES.onTrackChanged),s.on("dispose",()=>{n.audioTracks().removeEventListener("change",c),n.remoteTextTracks().removeEventListener("change",e.SUBTITLES.onTrackChanged)}),n.clearTracks("audio");for(const d in e.AUDIO.tracks)n.audioTracks().addTrack(e.AUDIO.tracks[d])},mC=()=>{const r={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{r[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:en,activeTrack:en,getActiveGroup:en,onGroupChanged:en,onTrackChanged:en,lastTrack_:null,logger_:xi(`MediaGroups[${e}]`)}}),r};class Xd{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){e===1&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=ai(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map(i=>[i.ID,i])))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class gC extends ae.EventTarget{constructor(e,i){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Xd,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=xi("Content Steering"),this.xhr_=e,this.getBandwidth_=i}assignTagProperties(e,i){this.manifestType_=i.serverUri?"HLS":"DASH";const n=i.serverUri||i.serverURL;if(!n){this.logger_(`steering manifest URL is ${n}, cannot request steering manifest.`),this.trigger("error");return}if(n.startsWith("data:")){this.decodeDataUriManifest_(n.substring(n.indexOf(",")+1));return}this.steeringManifest.reloadUri=ai(e,n),this.defaultPathway=i.pathwayId||i.defaultServiceLocation,this.queryBeforeStart=i.queryBeforeStart,this.proxyServerUrl_=i.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")}requestSteeringManifest(e){const i=this.steeringManifest.reloadUri;if(!i)return;const n=e?i:this.getRequestURI(i);if(!n){this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose();return}const s={contentSteeringInfo:{uri:n}};this.trigger({type:"contentsteeringloadstart",metadata:s}),this.request_=this.xhr_({uri:n,requestType:"content-steering-manifest"},(a,o)=>{if(a){if(o.status===410){this.logger_(`manifest request 410 ${a}.`),this.logger_(`There will be no more content steering requests to ${n} this session.`),this.excludedSteeringManifestURLs.add(n);return}if(o.status===429){const d=o.responseHeaders["retry-after"];this.logger_(`manifest request 429 ${a}.`),this.logger_(`content steering will retry in ${d} seconds.`),this.startTTLTimeout_(parseInt(d,10));return}this.logger_(`manifest failed to load ${a}.`),this.startTTLTimeout_();return}this.trigger({type:"contentsteeringloadcomplete",metadata:s});let l;try{l=JSON.parse(this.request_.responseText)}catch(d){const m={errorType:ae.Error.StreamingContentSteeringParserError,error:d};this.trigger({type:"error",metadata:m})}this.assignSteeringProperties_(l);const c={contentSteeringInfo:s.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:c}),this.startTTLTimeout_()})}setProxyServerUrl_(e){const i=new Y.URL(e),n=new Y.URL(this.proxyServerUrl_);return n.searchParams.set("url",encodeURI(i.toString())),this.setSteeringParams_(n.toString())}decodeDataUriManifest_(e){const i=JSON.parse(Y.atob(e));this.assignSteeringProperties_(i)}setSteeringParams_(e){const i=new Y.URL(e),n=this.getPathway(),s=this.getBandwidth_();if(n){const a=`_${this.manifestType_}_pathway`;i.searchParams.set(a,n)}if(s){const a=`_${this.manifestType_}_throughput`;i.searchParams.set(a,s)}return i.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version){this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),this.trigger("error");return}this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for content steering. Ending content steering."),this.trigger("error"),this.dispose());const n=(s=>{for(const a of s)if(this.availablePathways_.has(a))return a;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==n&&(this.currentPathway=n,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const i=s=>this.excludedSteeringManifestURLs.has(s);if(this.proxyServerUrl_){const s=this.setProxyServerUrl_(e);if(!i(s))return s}const n=this.setSteeringParams_(e);return i(n)?null:n}startTTLTimeout_(e=this.steeringManifest.ttl){const i=e*1e3;this.ttlTimeout_=Y.setTimeout(()=>{this.requestSteeringManifest()},i)}clearTTLTimeout_(){Y.clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Xd}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,i){return!i&&this.steeringManifest.reloadUri||i&&(ai(e,i.serverURL)!==this.steeringManifest.reloadUri||i.defaultServiceLocation!==this.defaultPathway||i.queryBeforeStart!==this.queryBeforeStart||i.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}const vC=(r,e)=>{let i=null;return(...n)=>{clearTimeout(i),i=setTimeout(()=>{r.apply(null,n)},e)}},yC=10;let Qi;const _C=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],TC=function(r){return this.audioSegmentLoader_[r]+this.mainSegmentLoader_[r]},bC=function({currentPlaylist:r,buffered:e,currentTime:i,nextPlaylist:n,bufferLowWaterLine:s,bufferHighWaterLine:a,duration:o,bufferBasedABR:l,log:c}){if(!n)return ae.log.warn("We received no playlist to switch to. Please check your stream."),!1;const d=`allowing switch ${r&&r.id||"null"} -> ${n.id}`;if(!r)return c(`${d} as current playlist is not set`),!0;if(n.id===r.id)return!1;const m=!!Wn(e,i).length;if(!r.endList)return!m&&typeof r.partTargetDuration=="number"?(c(`not ${d} as current playlist is live llhls, but currentTime isn't in buffered.`),!1):(c(`${d} as current playlist is live`),!0);const g=cu(e,i),S=l?Lt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:Lt.MAX_BUFFER_LOW_WATER_LINE;if(o<S)return c(`${d} as duration < max low water line (${o} < ${S})`),!0;const T=n.attributes.BANDWIDTH,b=r.attributes.BANDWIDTH;if(T<b&&(!l||g<a)){let y=`${d} as next bandwidth < current bandwidth (${T} < ${b})`;return l&&(y+=` and forwardBuffer < bufferHighWaterLine (${g} < ${a})`),c(y),!0}if((!l||T>b)&&g>=s){let y=`${d} as forwardBuffer >= bufferLowWaterLine (${g} >= ${s})`;return l&&(y+=` and next bandwidth > current bandwidth (${T} > ${b})`),c(y),!0}return c(`not ${d} as no switching criteria met`),!1};class CC extends ae.EventTarget{constructor(e){super(),this.fastQualityChange_=vC(this.fastQualityChange_.bind(this),100);const{src:i,withCredentials:n,tech:s,bandwidth:a,externVhs:o,useCueTags:l,playlistExclusionDuration:c,enableLowInitialPlaylist:d,sourceType:m,cacheEncryptionKeys:g,bufferBasedABR:S,leastPixelDiffSelector:T,captionServices:b,experimentalUseMMS:y}=e;if(!i)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:x}=e;(x===null||typeof x>"u")&&(x=1/0),Qi=o,this.bufferBasedABR=!!S,this.leastPixelDiffSelector=!!T,this.withCredentials=n,this.tech_=s,this.vhs_=s.vhs,this.player_=e.player_,this.sourceType_=m,this.useCueTags_=l,this.playlistExclusionDuration=c,this.maxPlaylistRetries=x,this.enableLowInitialPlaylist=d,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:n,maxPlaylistRetries:x,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=mC(),y&&Y.ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new Y.ManagedMediaSource,this.usingManagedMediaSource_=!0,ae.log("Using ManagedMediaSource")):Y.MediaSource&&(this.mediaSource=new Y.MediaSource),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=Mt(),this.hasPlayed_=!1,this.syncController_=new iC(e),this.segmentMetadataTrack_=s.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new sC,this.sourceUpdater_=new Zf(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new nC,this.keyStatusMap_=new Map;const N={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:b,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:a,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:g,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_=this.sourceType_==="dash"?new bl(i,this.vhs_,at(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new Yn(i,this.vhs_,at(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Sl(at(N,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Sl(at(N,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new Q8(at(N,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise((z,H)=>{function U(){s.off("vttjserror",B),z()}function B(){s.off("vttjsloaded",U),H()}s.one("vttjsloaded",U),s.one("vttjserror",B),s.addWebVttScript_()})}),e);const I=()=>this.mainSegmentLoader_.bandwidth;this.contentSteeringController_=new gC(this.vhs_.xhr,I),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",()=>this.startABRTimer_()),this.tech_.on("pause",()=>this.stopABRTimer_()),this.tech_.on("play",()=>this.startABRTimer_())),_C.forEach(z=>{this[z+"_"]=TC.bind(this,z)}),this.logger_=xi("pc"),this.triggeredFmp4Usage=!1,this.tech_.preload()==="none"?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const D=this.tech_.preload()==="none"?"play":"loadstart";this.tech_.one(D,()=>{const z=Date.now();this.tech_.one("loadeddata",()=>{this.timeToLoadedData__=Date.now()-z,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends})})}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),i=this.audioAppendsToLoadedData_();return e===-1||i===-1?-1:e+i}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const i=this.selectPlaylist();i&&this.shouldSwitchToMedia_(i)&&this.switchMedia_(i,e)}switchMedia_(e,i,n){const s=this.media(),a=s&&(s.id||s.uri),o=e&&(e.id||e.uri);if(a&&a!==o){this.logger_(`switch media ${a} -> ${o} from ${i}`);const l={renditionInfo:{id:o,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:i};this.trigger({type:"renditionselected",metadata:l}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${i}`})}this.mainPlaylistLoader_.media(e,n)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(e=>{const i=this.mediaTypes_[e],n=i?i.activeGroup():null,s=this.contentSteeringController_.getPathway();if(n&&s){const o=(n.length?n[0].playlists:n.playlists).filter(l=>l.attributes.serviceLocation===s);o.length&&this.mediaTypes_[e].activePlaylistLoader.media(o[0])}})}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=Y.setInterval(()=>this.checkABR_(),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(Y.clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),i=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return i;const n=e.mediaGroups.AUDIO,s=Object.keys(n);let a;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)a=this.mediaTypes_.AUDIO.activeTrack();else{const l=n.main||s.length&&n[s[0]];for(const c in l)if(l[c].default){a={label:c};break}}if(!a)return i;const o=[];for(const l in n)if(n[l][a.label]){const c=n[l][a.label];if(c.playlists&&c.playlists.length)o.push.apply(o,c.playlists);else if(c.uri)o.push(c);else if(e.playlists.length)for(let d=0;d<e.playlists.length;d++){const m=e.playlists[d];m.attributes&&m.attributes.AUDIO&&m.attributes.AUDIO===l&&o.push(m)}}return o.length?o:i}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",()=>{const i=this.mainPlaylistLoader_.media(),n=i.targetDuration*1.5*1e3;gl(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=n,i.endList&&this.tech_.preload()!=="none"&&(this.mainSegmentLoader_.playlist(i,this.requestOptions_),this.mainSegmentLoader_.load()),pC({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),i),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",()=>{this.trigger("selectedinitialmedia")})}),this.mainPlaylistLoader_.on("loadedplaylist",()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let i=this.mainPlaylistLoader_.media();if(!i){this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_();let n;if(this.enableLowInitialPlaylist&&(n=this.selectInitialPlaylist()),n||(n=this.selectPlaylist()),!n||!this.shouldSwitchToMedia_(n)||(this.initialMedia_=n,this.switchMedia_(this.initialMedia_,"initial"),!(this.sourceType_==="vhs-json"&&this.initialMedia_.segments)))return;i=this.initialMedia_}this.handleUpdatedMediaPlaylist(i)}),this.mainPlaylistLoader_.on("error",()=>{const i=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:i.playlist,error:i})}),this.mainPlaylistLoader_.on("mediachanging",()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()}),this.mainPlaylistLoader_.on("mediachange",()=>{const i=this.mainPlaylistLoader_.media(),n=i.targetDuration*1.5*1e3;gl(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=n,this.sourceType_==="dash"&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(i,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})}),this.mainPlaylistLoader_.on("playlistunchanged",()=>{const i=this.mainPlaylistLoader_.media();if(i.lastExcludeReason_==="playlist-unchanged")return;this.stuckAtPlaylistEnd_(i)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))}),this.mainPlaylistLoader_.on("renditiondisabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})}),this.mainPlaylistLoader_.on("renditionenabled",()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})}),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach(i=>{this.mainPlaylistLoader_.on(i,n=>{this.player_.trigger(Ct({},n))})})}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,i){const n=e.mediaGroups||{};let s=!0;const a=Object.keys(n.AUDIO);for(const o in n.AUDIO)for(const l in n.AUDIO[o])n.AUDIO[o][l].uri||(s=!1);s&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(n.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),Qi.Playlist.isAes(i)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),a.length&&Object.keys(n.AUDIO[a[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const i=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,n=this.tech_.currentTime(),s=this.bufferLowWaterLine(),a=this.bufferHighWaterLine(),o=this.tech_.buffered();return bC({buffered:o,currentTime:n,currentPlaylist:i,nextPlaylist:e,bufferLowWaterLine:s,bufferHighWaterLine:a,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("timeout",()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()}),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",()=>{this.trigger("progress")}),this.mainSegmentLoader_.on("error",()=>{const n=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:n.playlist,error:n})}),this.mainSegmentLoader_.on("appenderror",()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",()=>{this.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")}),this.mainSegmentLoader_.on("ended",()=>{this.logger_("main segment loader ended"),this.onEndOfStream()}),this.timelineChangeController_.on("audioTimelineBehind",()=>{const n=this.audioSegmentLoader_.pendingSegment_;if(!n||!n.segment||!n.segment.syncInfo)return;const s=n.segment.syncInfo.end+.01;this.tech_.setCurrentTime(s)}),this.timelineChangeController_.on("fixBadTimelineChange",()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}),this.mainSegmentLoader_.on("earlyabort",n=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:yC}))});const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const n=this.getCodecsOrExclude_();n&&this.sourceUpdater_.addOrChangeSourceBuffers(n)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()}),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach(n=>{this.mainSegmentLoader_.on(n,s=>{this.player_.trigger(Ct({},s))}),this.audioSegmentLoader_.on(n,s=>{this.player_.trigger(Ct({},s))}),this.subtitleSegmentLoader_.on(n,s=>{this.player_.trigger(Ct({},s))})})}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){if(e&&e===this.mainPlaylistLoader_.media()){this.logger_("skipping fastQualityChange because new media is same as old");return}this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const e=this.tech_.seekable();if(this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0))return this.tech_.setCurrentTime(e.end(e.length-1))}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const i=this.seekable();if(!i.length)return!1;const n=i.end(0);let s=n;if(e.start){const a=e.start.timeOffset;if(a<0){const o=this.mainPlaylistLoader_.main,l=Qi.Playlist.liveEdgeDelay(o,e),c=n+l;s=Math.max(Math.min(c+a,n),i.start(0))}else s=Math.min(n,a)}this.trigger("firstplay"),this.tech_.setCurrentTime(s)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();typeof e<"u"&&typeof e.then=="function"&&e.then(null,i=>{})}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const i=this.duration();e[e.length-1].endTime=isNaN(i)||Math.abs(i)===1/0?Number.MAX_VALUE:i}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const i=this.mainSegmentLoader_.getCurrentMediaInfo_();!i||i.hasVideo?e=e&&this.audioSegmentLoader_.ended_:e=this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const n=this.syncController_.getExpiredTime(e,this.duration());if(n===null)return!1;const s=Qi.Playlist.playlistEnd(e,n),a=this.tech_.currentTime(),o=this.tech_.buffered();if(!o.length)return s-a<=Ui;const l=o.end(o.length-1);return l-a<=Ui&&s-l<=Ui}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:i={},playlistExclusionDuration:n}){if(e=e||this.mainPlaylistLoader_.media(),n=n||i.playlistExclusionDuration||this.playlistExclusionDuration,!e){this.error=i,this.mediaSource.readyState!=="open"?this.trigger("error"):this.sourceUpdater_.endOfStream("network");return}e.playlistErrors_++;const s=this.mainPlaylistLoader_.main.playlists,a=s.filter(qa),o=a.length===1&&a[0]===e;if(s.length===1&&n!==1/0)return ae.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(o);if(o){if(this.main().contentSteering){const b=this.pathwayAttribute_(e),y=this.contentSteeringController_.steeringManifest.ttl*1e3;this.contentSteeringController_.excludePathway(b),this.excludeThenChangePathway_(),setTimeout(()=>{this.contentSteeringController_.addAvailablePathway(b)},y);return}let T=!1;s.forEach(b=>{if(b===e)return;const y=b.excludeUntil;typeof y<"u"&&y!==1/0&&(T=!0,delete b.excludeUntil)}),T&&(ae.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let l;e.playlistErrors_>this.maxPlaylistRetries?l=1/0:l=Date.now()+n*1e3,e.excludeUntil=l,i.reason&&(e.lastExcludeReason_=i.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const c=this.selectPlaylist();if(!c){this.error="Playback cannot continue. No available working or supported playlists.",this.trigger("error");return}const d=i.internal?this.logger_:ae.log.warn,m=i.message?" "+i.message:"";d(`${i.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${m} Switching to playlist ${c.id}.`),c.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),c.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const g=c.targetDuration/2*1e3||5*1e3,S=typeof c.lastRequest=="number"&&Date.now()-c.lastRequest<=g;return this.switchMedia_(c,"exclude",o||S)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,i){const n=[],s=e==="all";(s||e==="main")&&n.push(this.mainPlaylistLoader_);const a=[];(s||e==="audio")&&a.push("AUDIO"),(s||e==="subtitle")&&(a.push("CLOSED-CAPTIONS"),a.push("SUBTITLES")),a.forEach(o=>{const l=this.mediaTypes_[o]&&this.mediaTypes_[o].activePlaylistLoader;l&&n.push(l)}),["main","audio","subtitle"].forEach(o=>{const l=this[`${o}SegmentLoader_`];l&&(e===o||e==="all")&&n.push(l)}),n.forEach(o=>i.forEach(l=>{typeof o[l]=="function"&&o[l]()}))}setCurrentTime(e){const i=Wn(this.tech_.buffered(),e);if(!(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media())||!this.mainPlaylistLoader_.media().segments)return 0;if(i&&i.length)return e;this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Qi.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,i){const n=e.media();if(!n)return null;const s=this.syncController_.getMediaSequenceSync(i);if(s&&s.isReliable){const l=s.start,c=s.end;if(!isFinite(l)||!isFinite(c))return null;const d=Qi.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n),m=Math.max(l,c-d);return Mt([[l,m]])}const a=this.syncController_.getExpiredTime(n,this.duration());if(a===null)return null;const o=Qi.Playlist.seekable(n,a,Qi.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,n));return o.length?o:null}computeFinalSeekable_(e,i){if(!i)return e;const n=e.start(0),s=e.end(0),a=i.start(0),o=i.end(0);return a>s||n>o?e:Mt([[Math.max(n,a),Math.min(s,o)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let i;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(i=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!i))return;const n=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,i),!this.seekable_||n&&n.length&&this.seekable_.length&&n.start(0)===this.seekable_.start(0)&&n.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${df(this.seekable_)}]`);const s={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:s}),this.tech_.trigger("seekablechanged")}updateDuration(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),this.mediaSource.readyState!=="open"){this.updateDuration_=this.updateDuration.bind(this,e),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);return}if(e){const s=this.seekable();if(!s.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<s.end(s.length-1))&&this.sourceUpdater_.setDuration(s.end(s.length-1));return}const i=this.tech_.buffered();let n=Qi.Playlist.duration(this.mainPlaylistLoader_.media());i.length>0&&(n=Math.max(n,i.end(i.length-1))),this.mediaSource.duration!==n&&this.sourceUpdater_.setDuration(n)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(e=>{const i=this.mediaTypes_[e].groups;for(const n in i)i[n].forEach(s=>{s.playlistLoader&&s.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,i=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),n=e?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return!(!i||!n)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},i=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const n=es(this.main(),i),s={},a=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(s.video=n.video||e.main.videoCodec||c3),e.main.isMuxed&&(s.video+=`,${n.audio||e.main.audioCodec||Vc}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||a)&&(s.audio=n.audio||e.main.audioCodec||e.audio.audioCodec||Vc,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!s.audio&&!s.video){this.excludePlaylist({playlistToExclude:i,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});return}const o=(d,m)=>d?Xr(m,this.usingManagedMediaSource_):Do(m),l={};let c;if(["video","audio"].forEach(function(d){if(s.hasOwnProperty(d)&&!o(e[d].isFmp4,s[d])){const m=e[d].isFmp4?"browser":"muxer";l[m]=l[m]||[],l[m].push(s[d]),d==="audio"&&(c=m)}}),a&&c&&i.attributes.AUDIO){const d=i.attributes.AUDIO;this.main().playlists.forEach(m=>{(m.attributes&&m.attributes.AUDIO)===d&&m!==i&&(m.excludeUntil=1/0)}),this.logger_(`excluding audio group ${d} as ${c} does not support codec(s): "${s.audio}"`)}if(Object.keys(l).length){const d=Object.keys(l).reduce((m,g)=>(m&&(m+=", "),m+=`${g} does not support codec(s): "${l[g].join(",")}"`,m),"")+".";this.excludePlaylist({playlistToExclude:i,error:{internal:!0,message:d},playlistExclusionDuration:1/0});return}if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const d=[];if(["video","audio"].forEach(m=>{const g=(Ri(this.sourceUpdater_.codecs[m]||"")[0]||{}).type,S=(Ri(s[m]||"")[0]||{}).type;g&&S&&g.toLowerCase()!==S.toLowerCase()&&d.push(`"${this.sourceUpdater_.codecs[m]}" -> "${s[m]}"`)}),d.length){this.excludePlaylist({playlistToExclude:i,error:{message:`Codec switching not supported: ${d.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0});return}}return s}tryToCreateSourceBuffers_(){if(this.mediaSource.readyState!=="open"||this.sourceUpdater_.hasCreatedSourceBuffers()||!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const i=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(i)}excludeUnsupportedVariants_(){const e=this.main().playlists,i=[];Object.keys(e).forEach(n=>{const s=e[n];if(i.indexOf(s.id)!==-1)return;i.push(s.id);const a=es(this.main,s),o=[];a.audio&&!Do(a.audio)&&!Xr(a.audio,this.usingManagedMediaSource_)&&o.push(`audio codec ${a.audio}`),a.video&&!Do(a.video)&&!Xr(a.video,this.usingManagedMediaSource_)&&o.push(`video codec ${a.video}`),a.text&&a.text==="stpp.ttml.im1t"&&o.push(`text codec ${a.text}`),o.length&&(s.excludeUntil=1/0,this.logger_(`excluding ${s.id} for unsupported: ${o.join(", ")}`))})}excludeIncompatibleVariants_(e){const i=[],n=this.main().playlists,s=as(Ri(e)),a=Nd(s),o=s.video&&Ri(s.video)[0]||null,l=s.audio&&Ri(s.audio)[0]||null;Object.keys(n).forEach(c=>{const d=n[c];if(i.indexOf(d.id)!==-1||d.excludeUntil===1/0)return;i.push(d.id);const m=[],g=es(this.mainPlaylistLoader_.main,d),S=Nd(g);if(!(!g.audio&&!g.video)){if(S!==a&&m.push(`codec count "${S}" !== "${a}"`),!this.sourceUpdater_.canChangeType()){const T=g.video&&Ri(g.video)[0]||null,b=g.audio&&Ri(g.audio)[0]||null;T&&o&&T.type.toLowerCase()!==o.type.toLowerCase()&&m.push(`video codec "${T.type}" !== "${o.type}"`),b&&l&&b.type.toLowerCase()!==l.type.toLowerCase()&&m.push(`audio codec "${b.type}" !== "${l.type}"`)}m.length&&(d.excludeUntil=1/0,this.logger_(`excluding ${d.id}: ${m.join(" && ")}`))}})}updateAdCues_(e){let i=0;const n=this.seekable();n.length&&(i=n.start(0)),J8(e,this.cueTagsTrack_,i)}goalBufferLength(){const e=this.tech_.currentTime(),i=Lt.GOAL_BUFFER_LENGTH,n=Lt.GOAL_BUFFER_LENGTH_RATE,s=Math.max(i,Lt.MAX_GOAL_BUFFER_LENGTH);return Math.min(i+e*n,s)}bufferLowWaterLine(){const e=this.tech_.currentTime(),i=Lt.BUFFER_LOW_WATER_LINE,n=Lt.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(i,Lt.MAX_BUFFER_LOW_WATER_LINE),a=Math.max(i,Lt.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(i+e*n,this.bufferBasedABR?a:s)}bufferHighWaterLine(){return Lt.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Fd(this.inbandTextTracks_,"com.apple.streaming",this.tech_),O8({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,i,n){const s=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Fd(this.inbandTextTracks_,e,this.tech_),A8({inbandTextTracks:this.inbandTextTracks_,metadataArray:i,timestampOffset:s,videoDuration:n})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const i of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(i));if(this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart){this.contentSteeringController_.requestSteeringManifest(!0);return}this.tech_.one("canplay",()=>{this.contentSteeringController_.requestSteeringManifest()})}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(i=>{this.contentSteeringController_.on(i,n=>{this.trigger(Ct({},n))})}),this.sourceType_==="dash"&&this.mainPlaylistLoader_.on("loadedplaylist",()=>{const i=this.main();(this.contentSteeringController_.didDASHTagChange(i.uri,i.contentSteering)||(()=>{const a=this.contentSteeringController_.getAvailablePathways(),o=[];for(const l of i.playlists){const c=l.attributes.serviceLocation;if(c&&(o.push(c),!a.has(c)))return!0}return!!(!o.length&&a.size)})())&&this.resetContentSteeringController_()})}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const n=this.main().playlists,s=new Set;let a=!1;Object.keys(n).forEach(o=>{const l=n[o],c=this.pathwayAttribute_(l),d=c&&e!==c;l.excludeUntil===1/0&&l.lastExcludeReason_==="content-steering"&&!d&&(delete l.excludeUntil,delete l.lastExcludeReason_,a=!0);const g=!l.excludeUntil&&l.excludeUntil!==1/0;!s.has(l.id)&&d&&g&&(s.add(l.id),l.excludeUntil=1/0,l.lastExcludeReason_="content-steering",this.logger_(`excluding ${l.id} for ${l.lastExcludeReason_}`))}),this.contentSteeringController_.manifestType_==="DASH"&&Object.keys(this.mediaTypes_).forEach(o=>{const l=this.mediaTypes_[o];if(l.activePlaylistLoader){const c=l.activePlaylistLoader.media_;c&&c.attributes.serviceLocation!==e&&(a=!0)}}),a&&this.changeSegmentPathway_()}handlePathwayClones_(){const i=this.main().playlists,n=this.contentSteeringController_.currentPathwayClones,s=this.contentSteeringController_.nextPathwayClones;if(n&&n.size||s&&s.size){for(const[o,l]of n.entries())s.get(o)||(this.mainPlaylistLoader_.updateOrDeleteClone(l),this.contentSteeringController_.excludePathway(o));for(const[o,l]of s.entries()){const c=n.get(o);if(!c){i.filter(m=>m.attributes["PATHWAY-ID"]===l["BASE-ID"]).forEach(m=>{this.mainPlaylistLoader_.addClonePathway(l,m)}),this.contentSteeringController_.addAvailablePathway(o);continue}this.equalPathwayClones_(c,l)||(this.mainPlaylistLoader_.updateOrDeleteClone(l,!0),this.contentSteeringController_.addAvailablePathway(o))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...s])))}}equalPathwayClones_(e,i){if(e["BASE-ID"]!==i["BASE-ID"]||e.ID!==i.ID||e["URI-REPLACEMENT"].HOST!==i["URI-REPLACEMENT"].HOST)return!1;const n=e["URI-REPLACEMENT"].PARAMS,s=i["URI-REPLACEMENT"].PARAMS;for(const a in n)if(n[a]!==s[a])return!1;for(const a in s)if(n[a]!==s[a])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),this.contentSteeringController_.manifestType_==="DASH"&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const i="non-usable";this.mainPlaylistLoader_.main.playlists.forEach(n=>{const s=this.mainPlaylistLoader_.getKeyIdSet(n);!s||!s.size||s.forEach(a=>{const o="usable",l=this.keyStatusMap_.has(a)&&this.keyStatusMap_.get(a)===o,c=n.lastExcludeReason_===i&&n.excludeUntil===1/0;l?l&&c&&(delete n.excludeUntil,delete n.lastExcludeReason_,this.logger_(`enabling playlist ${n.id} because key ID ${a} is ${o}`)):(n.excludeUntil!==1/0&&n.lastExcludeReason_!==i&&(n.excludeUntil=1/0,n.lastExcludeReason_=i,this.logger_(`excluding playlist ${n.id} because the key ID ${a} doesn't exist in the keyStatusMap or is not ${o}`)),e++)})}),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(n=>{const s=n&&n.attributes&&n.attributes.RESOLUTION&&n.attributes.RESOLUTION.height<720,a=n.excludeUntil===1/0&&n.lastExcludeReason_===i;s&&a&&(delete n.excludeUntil,ae.log.warn(`enabling non-HD playlist ${n.id} because all playlists were excluded due to ${i} key IDs`))})}addKeyStatus_(e,i){const a=(typeof e=="string"?e:X8(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${i}' with key ID ${a} added to the keyStatusMap`),this.keyStatusMap_.set(a,i)}updatePlaylistByKeyStatus(e,i){this.addKeyStatus_(e,i),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}const xC=(r,e,i)=>n=>{const s=r.main.playlists[e],a=hu(s),o=qa(s);if(typeof n>"u")return o;n?delete s.disabled:s.disabled=!0;const l={renditionInfo:{id:e,bandwidth:s.attributes.BANDWIDTH,resolution:s.attributes.RESOLUTION,codecs:s.attributes.CODECS},cause:"fast-quality"};return n!==o&&!a&&(n?(i(s),r.trigger({type:"renditionenabled",metadata:l})):r.trigger({type:"renditiondisabled",metadata:l})),n};class SC{constructor(e,i,n){const{playlistController_:s}=e,a=s.fastQualityChange_.bind(s);if(i.attributes){const o=i.attributes.RESOLUTION;this.width=o&&o.width,this.height=o&&o.height,this.bandwidth=i.attributes.BANDWIDTH,this.frameRate=i.attributes["FRAME-RATE"]}this.codecs=es(s.main(),i),this.playlist=i,this.id=n,this.enabled=xC(e.playlists,i.id,a)}}const EC=function(r){r.representations=()=>{const e=r.playlistController_.main(),i=hs(e)?r.playlistController_.getAudioTrackPlaylists_():e.playlists;return i?i.filter(n=>!hu(n)).map((n,s)=>new SC(r,n,n.id)):[]}},Kd=["seeking","seeked","pause","playing","error"];class kC extends ae.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=xi("PlaybackWatcher"),this.logger_("initialize");const i=()=>this.monitorCurrentTime_(),n=()=>this.monitorCurrentTime_(),s=()=>this.techWaiting_(),a=()=>this.resetTimeUpdate_(),o=this.playlistController_,l=["main","subtitle","audio"],c={};l.forEach(m=>{c[m]={reset:()=>this.resetSegmentDownloads_(m),updateend:()=>this.checkSegmentDownloads_(m)},o[`${m}SegmentLoader_`].on("appendsdone",c[m].updateend),o[`${m}SegmentLoader_`].on("playlistupdate",c[m].reset),this.tech_.on(["seeked","seeking"],c[m].reset)});const d=m=>{["main","audio"].forEach(g=>{o[`${g}SegmentLoader_`][m]("appended",this.seekingAppendCheck_)})};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),d("off"))},this.clearSeekingAppendCheck_=()=>d("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),d("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",s),this.tech_.on(Kd,a),this.tech_.on("canplay",n),this.tech_.one("play",i),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",s),this.tech_.off(Kd,a),this.tech_.off("canplay",n),this.tech_.off("play",i),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),l.forEach(m=>{o[`${m}SegmentLoader_`].off("appendsdone",c[m].updateend),o[`${m}SegmentLoader_`].off("playlistupdate",c[m].reset),this.tech_.off(["seeked","seeking"],c[m].reset)}),this.checkCurrentTimeTimeout_&&Y.clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&Y.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=Y.setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const i=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=i.buffered_()}checkSegmentDownloads_(e){const i=this.playlistController_,n=i[`${e}SegmentLoader_`],s=n.buffered_(),a=d4(this[`${e}Buffered_`],s);if(this[`${e}Buffered_`]=s,a){const o={bufferedRanges:s};i.trigger({type:"bufferedrangeschanged",metadata:o}),this.resetSegmentDownloads_(e);return}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:n.playlist_&&n.playlist_.id,buffered:In(s)}),!(this[`${e}StalledDownloads_`]<10)&&(this.logger_(`${e} loader stalled download exclusion`),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:`vhs-${e}-download-exclusion`}),e!=="subtitle"&&i.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),i=this.tech_.buffered();if(this.lastRecordedTime===e&&(!i.length||e+Ui>=i.end(i.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Mt([this.lastRecordedTime,e]));const n={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:n}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const i=this.seekable(),n=this.tech_.currentTime(),s=this.afterSeekableWindow_(i,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow);let a;if(s&&(a=i.end(i.length-1)),this.beforeSeekableWindow_(i,n)){const b=i.start(0);a=b+(b===i.end(0)?0:Ui)}if(typeof a<"u")return this.logger_(`Trying to seek outside of seekable at time ${n} with seekable range ${df(i)}. Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0;const o=this.playlistController_.sourceUpdater_,l=this.tech_.buffered(),c=o.audioBuffer?o.audioBuffered():null,d=o.videoBuffer?o.videoBuffered():null,m=this.media(),g=m.partTargetDuration?m.partTargetDuration:(m.targetDuration-$i)*2,S=[c,d];for(let b=0;b<S.length;b++){if(!S[b])continue;if(cu(S[b],n)<g)return!1}const T=Us(l,n);return T.length===0?!1:(a=T.start(0)+Ui,this.logger_(`Buffered region starts (${T.start(0)}) just beyond seek point (${n}). Seeking to ${a}.`),this.tech_.setCurrentTime(a),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),i=this.tech_.buffered(),n=Wn(i,e);if(n.length&&e+3<=n.end(0)){this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${n.start(0)} -> ${n.end(0)}]. Attempting to resume playback by seeking to the current time.`),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"});return}}techWaiting_(){const e=this.seekable(),i=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,i)){const l=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${i}. Seeking to live point (seekable end) ${l}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(l),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const n=this.tech_.vhs.playlistController_.sourceUpdater_,s=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:n.audioBuffered(),videoBuffered:n.videoBuffered(),currentTime:i}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const o=Us(s,i);return o.length>0?(this.logger_(`Stopped at ${i} and seeking to ${o.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(i),!0):!1}afterSeekableWindow_(e,i,n,s=!1){if(!e.length)return!1;let a=e.end(e.length-1)+Ui;const o=!n.endList,l=typeof n.partTargetDuration=="number";return o&&(l||s)&&(a=e.end(e.length-1)+n.targetDuration*3),i>a}beforeSeekableWindow_(e,i){return!!(e.length&&e.start(0)>0&&i<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:i,currentTime:n}){if(!e)return;let s;if(e.length&&i.length){const a=Wn(e,n-3),o=Wn(e,n),l=Wn(i,n);l.length&&!o.length&&a.length&&(s={start:a.end(0),end:l.end(0)})}else Us(e,n).length||(s=this.gapFromVideoUnderflow_(e,n));return s?(this.logger_(`Encountered a gap in video from ${s.start} to ${s.end}. Seeking to current time ${n}`),!0):!1}skipTheGap_(e){const i=this.tech_.buffered(),n=this.tech_.currentTime(),s=Us(i,n);if(this.resetTimeUpdate_(),s.length===0||n!==e)return;this.logger_("skipTheGap_:","currentTime:",n,"scheduled currentTime:",e,"nextRange start:",s.start(0)),this.tech_.setCurrentTime(s.start(0)+$i);const a={gapInfo:{from:n,to:s.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:a}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,i){const n=l4(e);for(let s=0;s<n.length;s++){const a=n.start(s),o=n.end(s);if(i-a<4&&i-a>2)return{start:a,end:o}}return null}}const wC={errorInterval:30,getSource(r){const i=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return r(i)}},ip=function(r,e){let i=0,n=0;const s=at(wC,e);r.ready(()=>{r.trigger({type:"usage",name:"vhs-error-reload-initialized"})});const a=function(){n&&r.currentTime(n)},o=function(m){m!=null&&(n=r.duration()!==1/0&&r.currentTime()||0,r.one("loadedmetadata",a),r.src(m),r.trigger({type:"usage",name:"vhs-error-reload"}),r.play())},l=function(){if(Date.now()-i<s.errorInterval*1e3){r.trigger({type:"usage",name:"vhs-error-reload-canceled"});return}if(!s.getSource||typeof s.getSource!="function"){ae.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!");return}return i=Date.now(),s.getSource.call(r,o)},c=function(){r.off("loadedmetadata",a),r.off("error",l),r.off("dispose",c)},d=function(m){c(),ip(r,m)};r.on("error",l),r.on("dispose",c),r.reloadSourceOnError=d},DC=function(r){ip(this,r)};var np="3.17.3",AC="7.1.0",IC="1.3.1",NC="7.2.0",OC="4.0.2";const mt={PlaylistLoader:Yn,Playlist:oi,utils:R4,STANDARD_PLAYLIST_SELECTOR:Vd,INITIAL_PLAYLIST_SELECTOR:S8,lastBandwidthSelector:Vd,movingAverageBandwidthSelector:C8,comparePlaylistBandwidth:mu,comparePlaylistResolution:b8,xhr:If()};Object.keys(Lt).forEach(r=>{Object.defineProperty(mt,r,{get(){return ae.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),Lt[r]},set(e){if(ae.log.warn(`using Vhs.${r} is UNSAFE be sure you know what you are doing`),typeof e!="number"||e<0){ae.log.warn(`value of Vhs.${r} must be greater than or equal to 0`);return}Lt[r]=e}})});const rp="videojs-vhs",sp=function(r,e){const i=e.media();let n=-1;for(let s=0;s<r.length;s++)if(r[s].id===i.id){n=s;break}r.selectedIndex_=n,r.trigger({selectedIndex:n,type:"change"})},BC=function(r,e){e.representations().forEach(i=>{r.addQualityLevel(i)}),sp(r,e.playlists)};mt.canPlaySource=function(){return ae.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const LC=(r,e,i)=>{if(!r)return r;let n={};e&&e.attributes&&e.attributes.CODECS&&(n=as(Ri(e.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(n.audio=i.attributes.CODECS);const s=rr(n.video),a=rr(n.audio),o={};for(const l in r)o[l]={},a&&(o[l].audioContentType=a),s&&(o[l].videoContentType=s),e.contentProtection&&e.contentProtection[l]&&e.contentProtection[l].pssh&&(o[l].pssh=e.contentProtection[l].pssh),typeof r[l]=="string"&&(o[l].url=r[l]);return at(r,o)},PC=(r,e)=>r.reduce((i,n)=>{if(!n.contentProtection)return i;const s=e.reduce((a,o)=>{const l=n.contentProtection[o];return l&&l.pssh&&(a[o]={pssh:l.pssh}),a},{});return Object.keys(s).length&&i.push(s),i},[]),MC=({player:r,sourceKeySystems:e,audioMedia:i,mainPlaylists:n})=>{if(!r.eme.initializeMediaKeys)return Promise.resolve();const s=i?n.concat([i]):n,a=PC(s,Object.keys(e)),o=[],l=[];return a.forEach(c=>{l.push(new Promise((d,m)=>{r.tech_.one("keysessioncreated",d)})),o.push(new Promise((d,m)=>{r.eme.initializeMediaKeys({keySystems:c},g=>{if(g){m(g);return}d()})}))}),Promise.race([Promise.all(o),Promise.race(l)])},RC=({player:r,sourceKeySystems:e,media:i,audioMedia:n})=>{const s=LC(e,i,n);return s?(r.currentSource().keySystems=s,s&&!r.eme?(ae.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0):!1},ap=()=>{if(!Y.localStorage)return null;const r=Y.localStorage.getItem(rp);if(!r)return null;try{return JSON.parse(r)}catch{return null}},VC=r=>{if(!Y.localStorage)return!1;let e=ap();e=e?at(e,r):r;try{Y.localStorage.setItem(rp,JSON.stringify(e))}catch{return!1}return e},FC=r=>r.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")===0?JSON.parse(r.substring(r.indexOf(",")+1)):r,op=(r,e)=>{r._requestCallbackSet||(r._requestCallbackSet=new Set),r._requestCallbackSet.add(e)},lp=(r,e)=>{r._responseCallbackSet||(r._responseCallbackSet=new Set),r._responseCallbackSet.add(e)},up=(r,e)=>{r._requestCallbackSet&&(r._requestCallbackSet.delete(e),r._requestCallbackSet.size||delete r._requestCallbackSet)},cp=(r,e)=>{r._responseCallbackSet&&(r._responseCallbackSet.delete(e),r._responseCallbackSet.size||delete r._responseCallbackSet)};mt.supportsNativeHls=(function(){if(!Te||!Te.createElement)return!1;const r=Te.createElement("video");return ae.getTech("Html5").isSupported()?["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(i){return/maybe|probably/i.test(r.canPlayType(i))}):!1})();mt.supportsNativeDash=(function(){return!Te||!Te.createElement||!ae.getTech("Html5").isSupported()?!1:/maybe|probably/i.test(Te.createElement("video").canPlayType("application/dash+xml"))})();mt.supportsTypeNatively=r=>r==="hls"?mt.supportsNativeHls:r==="dash"?mt.supportsNativeDash:!1;mt.isSupported=function(){return ae.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};mt.xhr.onRequest=function(r){op(mt.xhr,r)};mt.xhr.onResponse=function(r){lp(mt.xhr,r)};mt.xhr.offRequest=function(r){up(mt.xhr,r)};mt.xhr.offResponse=function(r){cp(mt.xhr,r)};const $C=ae.getComponent("Component");class dp extends $C{constructor(e,i,n){if(super(i,n.vhs),typeof n.initialBandwidth=="number"&&(this.options_.bandwidth=n.initialBandwidth),this.logger_=xi("VhsHandler"),i.options_&&i.options_.playerId){const s=ae.getPlayer(i.options_.playerId);this.player_=s}if(this.tech_=i,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&i.overrideNativeAudioTracks&&i.overrideNativeVideoTracks)i.overrideNativeAudioTracks(!0),i.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(i.featuresNativeVideoTracks||i.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(Te,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],s=>{const a=Te.fullscreenElement||Te.webkitFullscreenElement||Te.mozFullScreenElement||Te.msFullscreenElement;a&&a.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()}),this.on(this.tech_,"seeking",function(){if(this.ignoreNextSeekingEvent_){this.ignoreNextSeekingEvent_=!1;return}this.setCurrentTime(this.tech_.currentTime())}),this.on(this.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=at(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions!==!1,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=typeof this.source_.useBandwidthFromLocalStorage<"u"?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||!1,this.options_.useNetworkInformationApi=typeof this.options_.useNetworkInformationApi<"u"?this.options_.useNetworkInformationApi:!0,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=this.options_.llhls!==!1,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,typeof this.options_.playlistExclusionDuration!="number"&&(this.options_.playlistExclusionDuration=60),typeof this.options_.bandwidth!="number"&&this.options_.useBandwidthFromLocalStorage){const n=ap();n&&n.bandwidth&&(this.options_.bandwidth=n.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),n&&n.throughput&&(this.options_.throughput=n.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}typeof this.options_.bandwidth!="number"&&(this.options_.bandwidth=Lt.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===Lt.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach(n=>{typeof this.source_[n]<"u"&&(this.options_[n]=this.source_[n])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const i=this.options_.customPixelRatio;typeof i=="number"&&i>=0&&(this.customPixelRatio=i)}setOptions(e={}){this.setOptions_(e)}src(e,i){if(!e)return;this.setOptions_(),this.options_.src=FC(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=mt,this.options_.sourceType=Nh(i),this.options_.seekTo=a=>{this.tech_.setCurrentTime(a)},this.options_.player_=this.player_,this.playlistController_=new CC(this.options_);const n=at({liveRangeSafeTimeDelta:Ui},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new kC(n),this.attachStreamingEventListeners_(),this.playlistController_.on("error",()=>{const a=ae.players[this.tech_.options_.playerId];let o=this.playlistController_.error;typeof o=="object"&&!o.code?o.code=3:typeof o=="string"&&(o={message:o,code:3}),a.error(o)});const s=this.options_.bufferBasedABR?mt.movingAverageBandwidthSelector(.55):mt.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):s.bind(this),this.playlistController_.selectInitialPlaylist=mt.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(a){this.playlistController_.selectPlaylist=a.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(a){this.playlistController_.mainSegmentLoader_.throughput.rate=a,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let a=this.playlistController_.mainSegmentLoader_.bandwidth;const o=Y.navigator.connection||Y.navigator.mozConnection||Y.navigator.webkitConnection,l=1e7;if(this.options_.useNetworkInformationApi&&o){const c=o.downlink*1e3*1e3;c>=l&&a>=l?a=Math.max(a,c):a=c}return a},set(a){this.playlistController_.mainSegmentLoader_.bandwidth=a,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const a=1/(this.bandwidth||1);let o;return this.throughput>0?o=1/this.throughput:o=0,Math.floor(1/(a+o))},set(){ae.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>In(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>In(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",()=>{this.options_.useBandwidthFromLocalStorage&&VC({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})}),this.playlistController_.on("selectedinitialmedia",()=>{EC(this)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",()=>{this.setupEme_()}),this.on(this.playlistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.playlistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=Y.URL.createObjectURL(this.playlistController_.mediaSource),(ae.browser.IS_ANY_SAFARI||ae.browser.IS_IOS)&&this.options_.overrideNative&&this.options_.sourceType==="hls"&&typeof this.tech_.addSourceElement=="function"?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),MC({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then(()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()}).catch(i=>{this.logger_("error while creating EME key session",i),this.player_.error({message:"Failed to initialize media keys for EME",code:3})})}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,i=RC({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});if(this.player_.tech_.on("keystatuschange",n=>{this.playlistController_.updatePlaylistByKeyStatus(n.keyId,n.status)}),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),!i){this.playlistController_.sourceUpdater_.initializedEme();return}this.createKeySessions_()}setupQualityLevels_(){const e=ae.players[this.tech_.options_.playerId];!e||!e.qualityLevels||this.qualityLevels_||(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",()=>{BC(this.qualityLevels_,this)}),this.playlists.on("mediachange",()=>{sp(this.qualityLevels_,this.playlists)}))}static version(){return{"@videojs/http-streaming":np,"mux.js":AC,"mpd-parser":IC,"m3u8-parser":NC,"aes-decrypter":OC}}version(){return this.constructor.version()}canChangeType(){return Zf.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&Y.URL.revokeObjectURL&&(Y.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,i){return q4({playlist:this.playlistController_.media(),time:e,callback:i})}seekToProgramTime(e,i,n=!0,s=2){return Pf({programTime:e,playlist:this.playlistController_.media(),retryCount:s,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:i})}setupXhrHooks_(){this.xhr.onRequest=e=>{op(this.xhr,e)},this.xhr.onResponse=e=>{lp(this.xhr,e)},this.xhr.offRequest=e=>{up(this.xhr,e)},this.xhr.offResponse=e=>{cp(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){const e=["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"],i=["gapjumped","playedrangeschanged"];e.forEach(n=>{this.playlistController_.on(n,s=>{this.player_.trigger(Ct({},s))})}),i.forEach(n=>{this.playbackWatcher_.on(n,s=>{this.player_.trigger(Ct({},s))})})}}const Ta={name:"videojs-http-streaming",VERSION:np,canHandleSource(r,e={}){const i=at(ae.options,e);return!i.vhs.experimentalUseMMS&&!Xr("avc1.4d400d,mp4a.40.2",!1)?!1:Ta.canPlayType(r.type,i)},handleSource(r,e,i={}){const n=at(ae.options,i);return e.vhs=new dp(r,e,n),e.vhs.xhr=If(),e.vhs.setupXhrHooks_(),e.vhs.src(r.src,r.type),e.vhs},canPlayType(r,e){const i=Nh(r);if(!i)return"";const n=Ta.getOverrideNative(e);return!mt.supportsTypeNatively(i)||n?"maybe":""},getOverrideNative(r={}){const{vhs:e={}}=r,i=!(ae.browser.IS_ANY_SAFARI||ae.browser.IS_IOS),{overrideNative:n=i}=e;return n}},UC=()=>Xr("avc1.4d400d,mp4a.40.2",!0);UC()&&ae.getTech("Html5").registerSourceHandler(Ta,0);ae.VhsHandler=dp;ae.VhsSourceHandler=Ta;ae.Vhs=mt;ae.use||ae.registerComponent("Vhs",mt);ae.options.vhs=ae.options.vhs||{};(!ae.getPlugin||!ae.getPlugin("reloadSourceOnError"))&&ae.registerPlugin("reloadSourceOnError",DC);const zC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAB4AAAAQ4AQMAAADSHVMAAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAANQTFRFAAAAp3o92gAAAAF0Uk5TAEDm2GYAAASYSURBVHic7c8BDQAgDMAw7t80Lk5SVgXbnM/M64BtDesa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNaxrWNewrmFdw7qGdQ3rGtY1rGtY17CuYV3DuoZ1Desa1jWsa1jXsK5hXcO6hnUN6xrWNay7Fz0EOVPDeGwAAAAASUVORK5CYII=",HC={class:"o-meeting-playback-video"},qC={key:0,class:"poster-title"},jC=t.defineComponent({__name:"OMeetingPlaybackVideo",props:{src:{default:""},vtt:{default:""},captions:{default:()=>[]},poster:{},posterTitle:{},instance:{},trackIdx:{}},emits:["getDuration","getInstance","setTrackIdx"],setup(r,{expose:e,emit:i}){const n=r,s=t.ref(),a=t.ref(),o=t.ref(),l=i,c=t.ref(!1),d=()=>{c.value=!1},m=(y,x=!1)=>{var D,z;const N=n.instance;if(!N)return;const I=(D=y.activeCues)==null?void 0:D[0];if(s.value&&clearInterval(s.value),I){I.text=((z=I==null?void 0:I.text)==null?void 0:z.replace(/\[(SPEAKER_)\d+]: /g,""))||"";const H=I.text.split(`
224
- `),U=H.length,B=I.endTime-I.startTime,G=parseFloat((B/U).toFixed(3));let C=0;if(x){const j=(N.currentTime()-I.startTime)/(I.endTime-I.startTime);for(;(C+1)/U<j;)C++}C<U?I.text=H.length?H[C]:I==null?void 0:I.text:I.text=H.length?H[0]:I==null?void 0:I.text;let k=G*1e3;const O=()=>{s.value=setInterval(()=>{y.mode="hidden",C++,C>H.length-1?clearInterval(s.value):C===H.length-1?(I.text=H[C],clearInterval(s.value),k=G*(U-C)*1e3,O()):I.text=H[C],y.mode="showing"},k)};O()}},g=t.ref([]);t.watch(()=>g.value,y=>{const x=n.instance;if(x){const N=x.textTracks();for(let I=0;I<N.length;I++)N[I].kind==="subtitles"&&(m(N[I],!0),N[I].mode=y.length?"showing":"hidden")}},{deep:!0});const S=t.ref(!1),T=t.ref("init"),b=async()=>{if(!n.src)return;const y=ae("playerId",{controls:!0,autoplay:!1,preload:"auto",fluid:!0,poster:n.poster||zC,playbackRates:[.5,.75,1,1.25,1.5,2],controlBar:{skipButtons:{backward:5,forward:5},children:{playToggle:!0,SkipBackward:{backward:5},skipForward:{forward:5},currentTimeDisplay:!0,timeDivider:!0,durationDisplay:!0,progressControl:!0,PlaybackRateMenuButton:!0,volumePanel:{inline:!1},FullscreenToggle:!0}}});l("getInstance",y),y.src(n.src),y.addRemoteTextTrack({kind:"subtitles",src:n.vtt,srclang:"zh",label:"中文",default:!1}),S.value=!0;class x extends ae.getComponent("Button"){constructor(D,z){super(D,z),this.addClass("vjs-subtitle-toggle-button","vjs-subtitle-hidden"),this.controlText("Toggle Subtitles")}buildCSSClass(){return`vjs-subtitle-toggle-button ${super.buildCSSClass()}`}handleClick(){const D=this.player().textTracks();for(let z=0;z<D.length;z++)D[z].kind==="subtitles"&&(m(D[z],!0),D[z].mode=D[z].mode==="showing"?"hidden":"showing",D[z].mode==="showing"?(this.removeClass("vjs-subtitle-hidden"),this.addClass("vjs-subtitle-showing")):(this.removeClass("vjs-subtitle-showing"),this.addClass("vjs-subtitle-hidden")))}}n.vtt&&(ae.registerComponent("SubtitleToggleButton",x),y.controlBar.children_.some(I=>I.name_==="SubtitleToggleButton")||y.controlBar.addChild("SubtitleToggleButton",{},8)),(y==null?void 0:y.textTracks().tracks_).forEach(I=>{I==null||I.addEventListener("cuechange",()=>{m(I)})}),y.on("play",()=>{T.value="playing"}),y.on("timeupdate",()=>{const I=y.currentTime()||0,D=n.captions.findIndex(z=>Jo(z.start_time)>I);l("setTrackIdx",D)}),y.one("loadedmetadata",()=>{l("getDuration",y.duration())}),t.nextTick(()=>{const I=document.getElementsByClassName("o-meeting-playback-video")[0];a.value=I.offsetHeight}),o.value=y};return t.onMounted(()=>{b(),document.addEventListener("click",d)}),t.watch(()=>n.src,()=>{b()}),t.onUnmounted(()=>{var y;(y=n==null?void 0:n.instance)==null||y.dispose(),document.removeEventListener("click",d)}),e({changeTime:y=>{var x;(x=o.value)==null||x.currentTime(y)}}),(y,x)=>(t.openBlock(),t.createElementBlock("div",HC,[t.createElementVNode("div",{class:t.normalizeClass(["video-placeholder",{loaded:S.value,"no-poster":!r.poster,[T.value]:!0}])},[x[0]||(x[0]=t.createElementVNode("video",{class:"video-js",id:"playerId"},null,-1)),r.posterTitle?(t.openBlock(),t.createElementBlock("div",qC,t.toDisplayString(r.posterTitle),1)):t.createCommentVNode("",!0)],2)]))}}),GC={class:"o-meeting-playback"},WC={class:"video-header"},YC={class:"video-title"},XC={class:"video-content"},KC={class:"info-wrapper"},QC={class:"tab-content"},ZC={key:0,class:"base-info"},JC={class:"info-item"},ex={class:"info-item"},tx={class:"info-item"},ix={class:"info-item"},nx={key:1,class:"subject-list"},rx={class:"subject-title"},sx={key:0,class:"subject-progress"},ax=["data-start","data-end"],Qd=t.defineComponent({__name:"OMeetingPlayback",props:{dates:{default:()=>[]},detail:{default:()=>({})},data:{default:()=>({})}},emits:["change-date"],setup(r,{emit:e}){const i=r,n=e,{t:s}=$e.useI18n(),a=t.ref(null),o=X=>{a.value=X},l=t.ref(0),c=X=>{l.value=X},d=t.ref([]),m=async X=>{const ee=await(await fetch(X)).json();d.value=(ee.segments||[]).map(ue=>{const J=py(ue.speaker);return{...ue,contentHtml:ue.content,speakerIdx:J,speakerLabel:`${s("meeting.speaker")}${J}`}})},g=t.ref([]),S=X=>yv[X%3],T=t.ref(0),b=X=>{T.value=X},y=t.ref(),x=t.ref(""),N=t.ref([0,0]);function I(X,R){const ee=R.getBoundingClientRect(),J=(X.clientX-ee.left)/ee.width;return N.value[1]=`${R.offsetTop+R.parentElement.offsetTop}px`,N.value[0]=`${J*100}%`,J*T.value}const D=X=>{let R=X;for(;R&&R.className!=="subject-progress";)R=R.parentElement;return R},z=X=>{let R=D(X.target);R&&(x.value=my(I(X,R)))},H=()=>{x.value=""},U=X=>{var ee;let R=D(X.target);R&&((ee=y.value)==null||ee.changeTime(I(X,R)))},B=async X=>{const ee=await(await fetch(X)).json();g.value=(ee||[]).map(ue=>({...ue,startTimeNumber:Jo(ue.startTime),endTimeNumber:Jo(ue.endTime)}))},G=t.ref("info"),C=t.computed(()=>{const X=[{label:s("meeting.baseInfo"),value:"info"}];return g.value.length&&X.push({label:s("meeting.subject"),value:"subject"}),X}),k=()=>{i.data&&(i.data.textJson&&m(i.data.textJson),i.data.topicJson&&B(i.data.topicJson))};t.watchEffect(()=>{k()});const O=X=>{n("change-date",X)},j=t.ref(null),L=t.ref("auto");let V=null,M=null;const q=()=>{j.value&&(L.value=`${j.value.offsetHeight}px`)},$=()=>{cancelAnimationFrame(M),M=requestAnimationFrame(q)};return t.onMounted(()=>{j.value&&(V=new ResizeObserver($),V.observe(j.value),q())}),t.onUnmounted(()=>{cancelAnimationFrame(M),V==null||V.disconnect()}),(X,R)=>{var ee,ue,J,oe,Z;return t.openBlock(),t.createElementBlock("div",GC,[t.createElementVNode("div",{class:"left-card card-wrapper",ref_key:"leftRef",ref:j},[t.createElementVNode("div",WC,[t.createElementVNode("div",YC,t.toDisplayString((ee=r.detail)==null?void 0:ee.topic)+"("+t.toDisplayString((ue=r.detail)==null?void 0:ue.date)+")",1),(J=r.dates)!=null&&J.length?(t.openBlock(),t.createBlock(t.unref(A.OSelect),{key:0,size:"large",clearable:!1,"model-value":(oe=r.detail)==null?void 0:oe.date,placeholder:t.unref(s)("meeting.selectDate"),onChange:O},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.dates,se=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{key:se,value:se,label:se},null,8,["value","label"]))),128))]),_:1},8,["model-value","placeholder"])):t.createCommentVNode("",!0)]),t.createElementVNode("div",XC,[r.data?(t.openBlock(),t.createBlock(jC,{key:0,ref_key:"playerRef",ref:y,src:r.data.video,vtt:r.data.textVtt,poster:r.data.poster,captions:d.value,onGetDuration:b,instance:a.value,onGetInstance:o,trackIdx:l.value,onSetTrackIdx:c},null,8,["src","vtt","poster","captions","instance","trackIdx"])):t.createCommentVNode("",!0)]),t.createElementVNode("div",KC,[t.createVNode(t.unref(A.OTab),{modelValue:G.value,"onUpdate:modelValue":R[0]||(R[0]=se=>G.value=se)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(C.value,se=>(t.openBlock(),t.createBlock(t.unref(A.OTabPane),{key:se.value,value:se.value,label:se.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"]),t.createElementVNode("div",QC,[G.value===C.value[0].value?(t.openBlock(),t.createElementBlock("div",ZC,[t.createElementVNode("div",JC,[t.createElementVNode("span",null,t.toDisplayString(t.unref(s)("meeting.item1")),1),t.createElementVNode("span",null,t.toDisplayString(r.detail.sponsor),1)]),t.createElementVNode("div",ex,[t.createElementVNode("span",null,t.toDisplayString(t.unref(s)("meeting.item2")),1),t.createElementVNode("span",null,t.toDisplayString(r.detail.groupName),1)]),t.createElementVNode("div",tx,[t.createElementVNode("span",null,t.toDisplayString(t.unref(s)("meeting.item3")),1),t.createElementVNode("span",null,t.toDisplayString(r.detail.date)+"  "+t.toDisplayString(r.detail.start)+"~"+t.toDisplayString(r.detail.end),1)]),t.createElementVNode("div",ix,[t.createElementVNode("span",null,t.toDisplayString(t.unref(s)("meeting.item4")),1),t.createElementVNode("span",null,t.toDisplayString(r.detail.agenda||"-"),1)])])):t.createCommentVNode("",!0),G.value===((Z=C.value[1])==null?void 0:Z.value)?(t.openBlock(),t.createElementBlock("div",nx,[x.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"mouse-current-time",style:t.normalizeStyle({top:N.value[1],left:N.value[0]})},t.toDisplayString(x.value),5)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,(se,_e)=>(t.openBlock(),t.createElementBlock("div",{class:"subject-item",key:se.title},[t.createElementVNode("div",rx,t.toDisplayString(se.title),1),T.value?(t.openBlock(),t.createElementBlock("div",sx,[t.createElementVNode("div",{class:"subject-progress-item",onClick:U,onMousemove:z,onMouseleave:H,"data-start":se.startTime,"data-end":se.endTime,style:t.normalizeStyle({"--start":(se.startTimeNumber<0?0:se.startTimeNumber)/T.value,"--end":(se.endTimeNumber>T.value?T.value:se.endTimeNumber)/T.value,background:S(_e)})},null,44,ax)])):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0)])])],512),t.createElementVNode("div",{class:"right-card card-wrapper",style:t.normalizeStyle({height:L.value})},[t.createVNode(M_,{captions:d.value,trackIdx:l.value,instance:a.value},null,8,["captions","trackIdx","instance"])],4)])}}}),ox={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function lx(r,e){return t.openBlock(),t.createElementBlock("svg",ox,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M12.032 2.355c1.632 0 3.205 0.404 4.611 1.166 0.34 0.182 0.466 0.609 0.281 0.949s-0.609 0.463-0.949 0.281c-1.201-0.65-2.546-0.996-3.943-0.996-4.585 0-8.3 3.715-8.3 8.297 0 4.588 3.715 8.303 8.3 8.303s8.3-3.715 8.3-8.303c0-2.063-0.753-4.002-2.098-5.514-0.258-0.287-0.231-0.732 0.059-0.984 0.287-0.258 0.729-0.234 0.987 0.053 1.57 1.764 2.452 4.037 2.452 6.445 0 5.361-4.342 9.703-9.7 9.703s-9.7-4.342-9.7-9.703c0-5.355 4.342-9.697 9.7-9.697zM10.866 7.658c0-0.627 0.507-1.131 1.134-1.131s1.134 0.504 1.134 1.131c0 0.627-0.507 1.131-1.134 1.131s-1.134-0.504-1.134-1.131zM12.706 10.002c-0.044-0.346-0.337-0.609-0.691-0.609-0.387 0-0.7 0.311-0.703 0.697l-0.023 6.762 0.006 0.1c0.044 0.34 0.337 0.603 0.691 0.603 0.387 0.006 0.7-0.311 0.703-0.697l0.023-6.762-0.006-0.094z"},null,-1)])])}const ux={name:"components-icon-tips",render:lx},cx={class:"o-sig-meeting-aside"},dx={class:"month"},hx={class:"days"},fx=["onClick"],px={class:"day-d"},mx={class:"day-c"},gx={class:"arrow-wrapper"},qs=1,vx=t.defineComponent({__name:"OSigMeetingAside",props:{data:{},current:{},total:{},active:{},meetingDates:{},eventsDates:{}},emits:["click-date","change-month"],setup(r,{emit:e}){const{getConfig:i}=Fn(),n=r,s=e,a=l=>{s("click-date",l)},o=l=>{n.current+l>=n.total||n.current+l<0||s("change-month",l)};return(l,c)=>(t.openBlock(),t.createElementBlock("div",cx,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.data,(d,m)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:m},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d,g=>(t.openBlock(),t.createElementBlock("div",{key:g.month,class:"month-item"},[t.createElementVNode("div",dx,t.toDisplayString(g.month.replace(/-/g,"/")),1),t.createElementVNode("div",hx,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.days,S=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["day-item",r.active===`${g.month}-${S}`&&"active"]),key:S,onClick:T=>a(`${g.month}-${S}`)},[t.createElementVNode("div",px,t.toDisplayString(S),1),t.createElementVNode("div",mx,[r.meetingDates.includes(`${g.month}-${S}`)?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0,style:t.normalizeStyle({zIndex:t.unref(i)(t.unref(Be).MEETING,"zIndex"),backgroundColor:t.unref(i)(t.unref(Be).MEETING,"color")})},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(i)(t.unref(Be).MEETING,"icon"))))]),_:1},8,["style"])):t.createCommentVNode("",!0),r.eventsDates.includes(`${g.month}-${S}`)?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:1,style:t.normalizeStyle({zIndex:t.unref(i)(t.unref(Be).EVENTS,"zIndex"),backgroundColor:t.unref(i)(t.unref(Be).EVENTS,"color")})},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(i)(t.unref(Be).EVENTS,"icon"))))]),_:1},8,["style"])):t.createCommentVNode("",!0)])],10,fx))),128))])]))),128))],64))),128)),t.createElementVNode("div",gx,[t.createVNode(t.unref(A.OIcon),{onClick:c[0]||(c[0]=d=>o(0-qs)),class:t.normalizeClass(r.current-qs<0&&"disabled")},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconArrowLeft))]),_:1},8,["class"]),t.createVNode(t.unref(A.OIcon),{onClick:c[1]||(c[1]=d=>o(qs)),class:t.normalizeClass(r.current+qs>=r.total&&"disabled")},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconArrowRight))]),_:1},8,["class"])])]))}}),yx={class:"o-sig-meeting-calendar"},_x={key:0,class:"meeting-card-header"},Tx={key:0,class:"header-left"},bx={key:1,class:"date-select"},Cx={class:"meeting-card-content"},Zd=t.defineComponent({__name:"OSigMeetingCalendar",props:{sigName:{},getMeetingListRequest:{},getDateListRequest:{},getEventsListRequest:{},dates:{}},setup(r){const e=r,{t:i,meetingTabs:n}=Fn(),{lePadV:s}=It.useScreen(),a=t.ref(""),o=t.ref(!1),l=t.ref([]),c=t.computed(()=>s.value?100:5),d=t.ref(""),m=t.ref([]),g=t.ref([]),S=t.ref([]),T=t.ref(-1),b=O=>{x(O)},y=O=>{x(O)},x=async O=>{if(e.getMeetingListRequest)try{o.value=!0,a.value=ye(O).format("YYYY-MM-DD");const j=await e.getMeetingListRequest(a.value,e.sigName);l.value=j.map(L=>({...L,time:`${L.start}-${L.end}`,date:L.date||a.value,type:Be.MEETING}))}finally{o.value=!1,S.value.forEach(j=>{var L;(L=j.dates)!=null&&L.includes(a.value)&&l.value.push(j)})}},N=async()=>{e.getDateListRequest&&(m.value=await e.getDateListRequest()),e.getEventsListRequest&&(S.value=await e.getEventsListRequest(),g.value=(S.value||[]).map(O=>O.dates||[]).flat())},I=t.ref(Be.ALL),D=()=>{N()};t.watch(()=>s.value,()=>{s.value&&(I.value=Be.ALL,D())});const z=O=>{const j=ye(O).format("YYYY-MM-DD");return[j.slice(0,7),j.slice(8,10)]},H=t.computed(()=>{let O=[];return I.value===Be.ALL?O=[...m.value||[],...g.value]:I.value===Be.MEETING?O=m.value||[]:O=g.value,[...new Set(O)].sort((j,L)=>ye(j).isAfter(ye(L))?1:-1).map(j=>ye(j).format("YYYY-MM-DD"))}),U=()=>{let O=H.value.find(j=>j===ye().format("YYYY-MM-DD"));O||(O=H.value.find(j=>ye(j).isAfter(ye()))||[...H.value].reverse().find(j=>ye().isAfter(ye(j)))),d.value=O};t.watch(()=>H.value,O=>{O.length&&(U(),t.nextTick(()=>{x(d.value)}))});const B=t.computed(()=>{const O=H.value.reduce((M,q)=>{var R,ee;const[$,X]=z(q);return M[$]={count:(((R=M[$])==null?void 0:R.count)||0)+1,days:[...((ee=M[$])==null?void 0:ee.days)||[],X]},M},{}),j=Object.keys(O).map(M=>({...O[M],month:M})),L=[];let V=[];return j.forEach(M=>{for(;M.days.length;)if(!V.length)M.days.splice(0,6).forEach(q=>{V.push({month:M.month,day:q})}),V.length>=5&&(L.push(V),V=[]);else{let q=V.length;q%2===1&&(q+=1),M.days.length+V.length<=6?(M.days.splice(0,6).forEach($=>{V.push({month:M.month,day:$})}),V.length>=5&&(L.push(V),V=[])):(M.days.splice(0,6-q).forEach($=>{V.push({month:M.month,day:$})}),V.length>=5&&(L.push(V),V=[]))}}),V.length&&(L.push(V),V=[]),L}),G=t.computed(()=>B.value.map(O=>{const j=O.reduce((L,V)=>(L[V.month]=L[V.month]||[],L[V.month].push(V.day),L),{});return Object.keys(j).map(L=>({month:L,days:j[L]||[]}))})),C=()=>{B.value.length?(T.value=B.value.findIndex(O=>O.some(j=>d.value===`${j.month}-${j.day}`)),T.value===-1&&(T.value=B.value.findIndex(O=>O.some(j=>d.value.includes(j.month))))):T.value=-1};t.watch([()=>B.value,()=>d.value],()=>{C()},{deep:!0});const k=O=>{T.value+=O};return t.onMounted(()=>{N()}),(O,j)=>{const L=t.resolveComponent("ElOption"),V=t.resolveComponent("ElSelect");return t.openBlock(),t.createElementBlock("div",yx,[t.unref(s)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",_x,[d.value?(t.openBlock(),t.createElementBlock("div",Tx,[t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("meeting.latestMeeting")),1),t.createElementVNode("span",null,t.toDisplayString(t.unref(ye)(d.value).format("YYYY/MM/DD")),1),t.createVNode(t.unref(A.OPopover),null,{target:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),{class:"tips"},{default:t.withCtx(()=>[t.createVNode(t.unref(ux))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createElementVNode("p",null,t.toDisplayString(t.unref(i)("meeting.detailHalfYearMeetings")),1)])]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OTab),{modelValue:I.value,"onUpdate:modelValue":j[0]||(j[0]=M=>I.value=M),onChange:D,line:!1},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(n).slice(0,-1),M=>(t.openBlock(),t.createBlock(t.unref(A.OTabPane),{key:M.value,value:M.value},{nav:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(M.icon)))]),_:2},1024),t.createTextVNode(" "+t.toDisplayString(M.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])),t.unref(s)&&H.value.length?(t.openBlock(),t.createElementBlock("div",bx,[t.createVNode(V,{modelValue:a.value,"onUpdate:modelValue":j[1]||(j[1]=M=>a.value=M),onChange:y},{label:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.latestMeeting"))+" "+t.toDisplayString(a.value),1)]),default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(H.value,M=>(t.openBlock(),t.createBlock(L,{key:M,value:M,label:t.unref(ye)(M).format("YYYY/MM/DD")},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),!t.unref(s)||t.unref(s)&&H.value.length?(t.openBlock(),t.createBlock(t.unref(A.ODivider),{key:2,class:"meeting-divider"})):t.createCommentVNode("",!0),t.createElementVNode("div",Cx,[!t.unref(s)&&T.value!==-1?(t.openBlock(),t.createBlock(vx,{key:0,data:G.value.slice(T.value,T.value+1),meetingDates:I.value!==t.unref(Be).EVENTS?m.value:[],eventsDates:I.value!==t.unref(Be).MEETING?g.value:[],onClickDate:b,onChangeMonth:k,current:T.value,total:G.value.length,active:a.value},null,8,["data","meetingDates","eventsDates","current","total","active"])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OScroller),{class:"list-content","show-type":"hover",size:"small"},{default:t.withCtx(()=>[t.createVNode(Eh,{list:l.value,rows:c.value},{empty:t.withCtx(()=>[t.renderSlot(O.$slots,"empty")]),_:3},8,["list","rows"])]),_:3})])])}}}),xx={class:"o-my-meeting-calendar"},Sx={class:"meeting-list"},Ex={class:"list-calendar-mb"},kx={class:"list-calendar"},wx=["onClick"],Dx={class:"date-cell-text"},Ax={class:"list-body"},Ix=["id"],Nx={class:"item-header-left"},Ox={class:"meeting-icon"},Bx={class:"header-info"},Lx={key:0},Px={class:"title-wrapper"},Mx={class:"title-text"},Rx={key:1,class:"tag-wrapper"},Vx={class:"meeting-info"},Fx={key:0,class:"item-header-right"},$x={class:"meeting-detail"},Ux={key:0,class:"meeting-btn"},zx={key:0,class:"load-text"},Hx={class:"dialog-content"},Jd=t.defineComponent({__name:"OMyMeetingCalendar",props:{cancelSubMeetingRequest:{},deleteMeetingRequest:{},getMeetingListRequest:{},groupType:{default:vi.SIG}},emits:["edit"],setup(r,{emit:e}){const i=A.useMessage(null),n=t.ref(!1),s=t.ref(1),a=t.ref(50),o=t.ref(null),l=t.ref([]),c=t.ref([]),d=t.computed(()=>o.value===null||c.value.length<o.value),m=t.ref(!1),{t:g,locale:S,getPointStr:T,getWeekFromDate:b}=Fn(),y=t.computed(()=>S.value===$e.Locales.EN),x=r,N=t.ref(!1),{isPhone:I}=It.useScreen(),D=t.ref([]),z=e,H=t.ref(!1),U=t.ref(!1),B=t.ref(),G=t.ref(0),C=()=>{var ne;G.value=((ne=B.value)==null?void 0:ne.clientHeight)||0},k=async()=>{if(x.getMeetingListRequest&&!H.value)try{if(o.value!==null&&o.value>0&&(s.value-1)*a.value>o.value)return;if(!d.value&&I.value){it("next-month");return}n.value=!0,H.value=!0;const ne=await x.getMeetingListRequest({page:s.value,size:a.value,order_by:"date",order_type:"asc",month:ye(Ue.value).format("YYYY-MM")}),re=(ne.data||[]).map(le=>{var Gi,Ut,Wi;const{is_cycle:Ee,date:pe,start:Ze,end:Je,cycle_sub:Fe,cycle_start_date:Nt,cycle_end_date:xt,cycle_start:ui,cycle_end:Ot,cycle_type:St,cycle_interval:ii,cycle_point:$t}=le;if(Ee){let E="",w="";St===mn&&(w=g("meeting.cycleDay")),St===vn&&(ii>1?w=g("meeting.cycleWeek.other",[T(St,$t),ii]):w=g("meeting.cycleWeek.one",[T(St,$t)])),St===tn&&(w=g("meeting.cycleMonth",[T(St,$t)])),E=g("meeting.cycleMeetingText2",{startDate:Nt,endDate:xt,startTime:ui,endTime:Ot,cycleType:w});const Q=((Gi=le.obs_data)==null?void 0:Gi.filter(ce=>ce.text_video_url))||[];return Fe.filter(ce=>ye(ce.date).isBefore(ye(Ue.value).add(1,"month").format("YYYY-MM-01"))&&!ye(ce.date).isBefore(ye(Ue.value).format("YYYY-MM-01"))).map(({id:ce,...ge})=>({...le,...ge,timeRange:E,dateRange:`${ge.start}-${ge.end}`,hasObsData:Q.find(Ie=>Ie.sub_id===ge.sub_id),time:`${ge.start}-${ge.end}`,isExpired:ye(`${ge.date} ${ge.start}`).isBefore(ye())}))}return[{...le,dateRange:`${Ze} - ${Je}`,timeRange:`${Ze} - ${Je}`,hasObsData:!!((Wi=(Ut=le.obs_data)==null?void 0:Ut.filter(E=>E.text_video_url))!=null&&Wi.length),time:`${Ze}-${Je}`,isExpired:ye(`${pe} ${Ze}`).isBefore(ye())}]}).flat().filter(le=>le.date.slice(0,7)===ht(Ue.value,"YYYY-MM-DD").slice(0,7));m.value?(c.value=ne.data||[],l.value=re):s.value===1&&!I.value?(c.value=ne.data||[],l.value=re):(c.value=[...c.value,...ne.data||[]],l.value=[...l.value,...re]),l.value.sort((le,Ee)=>le.date===Ee.date?Nn(le.start)>Nn(Ee.start)?1:-1:ye(le.date).isAfter(ye(Ee.date))?1:-1),o.value=(ne==null?void 0:ne.total)||0,t.nextTick(()=>{Xe(),be.value&&!I.value&&M()})}finally{n.value=!1,H.value=!1,U.value=!1,m.value=!1}},O=fi.useDebounceFn(()=>{d.value&&(I.value||(U.value=!0,s.value++,k()))},200),j=fi.useDebounceFn(()=>{if(!d.value||!I.value)return;const ne=window.scrollY||window.pageYOffset,re=window.innerHeight;document.documentElement.scrollHeight-(ne+re)<=300&&!H.value&&(U.value=!0,s.value++,k())},200),L=ne=>{const re=l.value.filter(le=>le.date===ne);return re.length&&re.every(le=>le.is_delete)},V=ne=>{const re=ne.target;if(!re)return;const le=re.scrollTop,Ee=re.scrollHeight,pe=re.clientHeight;le+pe>=Ee&&O()},M=()=>{be.value.getContainerEl().addEventListener("scroll",V)},q=t.ref({}),$=(ne,re)=>{ne&&re&&(q.value[re]=ne)},X=async ne=>{await q.value[ne].copyInfo(),i.success({content:g("common.copySuccess")})},R=t.ref(!1),ee=t.ref(null),ue=ne=>{z("edit",ne,"whole")},J=ne=>{ee.value=ne,R.value=!0},oe=async()=>{if(x.deleteMeetingRequest&&ee.value)try{N.value=!0,await x.deleteMeetingRequest(ee.value.id),R.value=!1,i.success({content:`${g("meeting.meetingCancel",[ee.value.topic])}`}),m.value=!0,k()}finally{N.value=!1}},Z=t.ref(!1),se=t.ref(""),_e=t.ref(null),ke=[{label:g("meeting.meetingSingle"),value:"single"},{label:g("meeting.meetingCycle"),value:"whole"}],De=t.ref("single"),Ne=(ne,re)=>{ne.is_cycle?(_e.value=ne,se.value=re,Z.value=!0):re==="cancel"?J(ne):ue(ne)},Re=()=>{Z.value=!1,_e.value=null,se.value="",De.value="single"},et=async()=>{const ne=_e.value;if(ne)if(se.value==="cancel")try{if(N.value=!0,De.value==="single"&&ne.is_cycle){if(!x.cancelSubMeetingRequest)return;await x.cancelSubMeetingRequest(ne.sub_id),i.success({content:`${g("meeting.meetingCancel",[ne.topic])}`})}else{if(!x.deleteMeetingRequest)return;await x.deleteMeetingRequest(ne.id),i.success({content:`${g("meeting.meetingCancel",[ne.topic])}`})}Re(),m.value=!0,k()}finally{N.value=!1}else z("edit",ne,De.value),Re()},Ve=t.ref(),Ke=t.computed(()=>[...new Set(l.value.map(ne=>ne.date))].sort((ne,re)=>ye(ne).isBefore(ye(re))?-1:1)),Ge=t.computed(()=>[...new Set(l.value.filter(ne=>!ne.isExpired&&!ne.is_delete).map(ne=>ne.date))].sort((ne,re)=>ye(ne).isBefore(ye(re))?-1:1)),Ue=t.ref(),Xe=()=>{var le;const ne=Ge.value.find(Ee=>!ye(Ee).isBefore(ye(new Date).format("YYYY-MM-DD")));ne?Ue.value=ne:Ue.value||(Ue.value=ye().format("YYYY-MM-DD")),(le=Ve.value)==null||le.pickDay(ye(Ue.value)),Ue.value=ye(Ue.value).format("YYYY-MM-DD");const re=l.value.find(Ee=>Ee.date===Ue.value&&!Ee.isExpired&&!Ee.is_delete);re&&(D.value=[re.sub_id||re.id])},kt=(ne,re)=>{var le;(!re||!((le=ne.target)!=null&&le.className.includes("date-cell-text")))&&(ne.stopPropagation(),ne.preventDefault())},it=ne=>{Ve.value&&(s.value=1,o.value=null,window.scrollTo({top:0,behavior:"smooth"}),Ve.value.selectDate(ne),m.value=!0,t.nextTick(()=>{Ue.value=ye(Ve.value.selectedDay).format("YYYY-MM-DD"),k()}))},Ae=t.computed(()=>l.value.reduce((ne,re)=>{if(ne.length){const le=ne.at(-1);return(le==null?void 0:le.date)===re.date?le.list.push(re):ne.push({date:re.date,list:[re]}),ne}else return[{date:re.date,list:[re]}]},[])),be=t.ref();t.watch(()=>Ue.value,()=>{me(Ue.value)});const me=ne=>{var Ee,pe,Ze;const re=ye(ne).format("YYYY-MM-DD"),le=document.querySelector(`#group-title-${re}`);le&&(I.value?window.scrollTo({top:(((Ee=le.parentElement)==null?void 0:Ee.offsetTop)||0)-52,behavior:"smooth"}):(Ze=be.value)==null||Ze.scrollTo({top:((pe=le.parentElement)==null?void 0:pe.offsetTop)||0,behavior:"smooth"}))};t.onMounted(()=>{k(),window.addEventListener("scroll",j),window.addEventListener("resize",j),C(),window.addEventListener("resize",C)}),t.onUnmounted(()=>{var re;window.removeEventListener("scroll",j),window.removeEventListener("resize",j),window.removeEventListener("resize",C);const ne=(re=be.value)==null?void 0:re.getContainerEl();ne==null||ne.removeEventListener("scroll",V)});const Pe=ne=>{const re=ye(ne||void 0);return y.value?re.format("MMMM YYYY"):re.format("YYYY MM月")},Ye=t.computed(()=>[{id:"confirm",color:"primary",label:g("common.confirm"),variant:"solid",size:"large",round:"pill",loading:N.value,onClick:()=>{et()}},{id:"cancel",color:"primary",label:g("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{Re()}}]),vt=t.computed(()=>[{id:"confirm",color:"primary",label:g("common.confirm"),variant:"solid",size:"large",round:"pill",loading:N.value,onClick:()=>{oe()}},{id:"cancel",color:"primary",label:g("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{R.value=!1}}]);return(ne,re)=>(t.openBlock(),t.createElementBlock("div",xx,[t.createElementVNode("div",Sx,[t.createElementVNode("div",Ex,[t.createElementVNode("span",null,t.toDisplayString(Pe(Ue.value)),1),t.createElementVNode("span",null,[t.createVNode(t.unref(A.OIcon),{onClick:re[0]||(re[0]=le=>it("prev-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronLeft))]),_:1}),t.createVNode(t.unref(A.OIcon),{onClick:re[1]||(re[1]=le=>it("next-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})])]),t.createElementVNode("div",kx,[t.createVNode(t.unref(rt.ElCalendar),{ref_key:"calendarRef",ref:Ve,modelValue:Ue.value,"onUpdate:modelValue":re[4]||(re[4]=le=>Ue.value=le)},{header:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(Pe(Ue.value)),1),t.createElementVNode("div",null,[t.createVNode(t.unref(A.OIcon),{onClick:re[2]||(re[2]=le=>it("prev-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronLeft))]),_:1}),t.createVNode(t.unref(A.OIcon),{onClick:re[3]||(re[3]=le=>it("next-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})])]),"date-cell":t.withCtx(({data:le})=>[t.createElementVNode("div",{onClick:Ee=>kt(Ee,Ke.value.includes(le.day)),class:t.normalizeClass({"date-cell":!0,"is-selected":le.isSelected,"is-today":t.unref(ht)(le.day)===t.unref(ht)(),clickable:Ke.value.includes(le.day),expired:t.unref(ye)(t.unref(ht)()).isAfter(t.unref(ye)(le.day)),"all-deleted":L(le.day)})},[t.createElementVNode("div",Dx,t.toDisplayString(Number(le.day.split("-")[2])),1)],10,wx)]),_:1},8,["modelValue"])]),t.createElementVNode("div",{class:t.normalizeClass(["list-wrapper",l.value.length?"":"is-empty"])},[l.value.length?(t.openBlock(),t.createBlock(t.unref(A.OScroller),{key:0,ref_key:"scrollerRef",ref:be,onScrollend:t.unref(O),style:t.normalizeStyle({"--header-height":G.value}),class:"scroller-container","show-type":"hover"},{default:t.withCtx(()=>[t.createElementVNode("div",Ax,[t.createVNode(t.unref(A.OCollapse),{modelValue:D.value,"onUpdate:modelValue":re[7]||(re[7]=le=>D.value=le),accordion:t.unref(I)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Ae.value,(le,Ee)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:le.date},[Ee===0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:re[5]||(re[5]=pe=>it("prev-month"))},[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconArrowLeft))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(g)("meeting.preMonth")),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["group-item",Ee===Ae.value.length-1&&"last-item"])},[t.createElementVNode("div",{class:t.normalizeClass({"group-bar":!0,"is-active":t.unref(ye)(Ue.value).format("YYYY-MM-DD")===le.date,"is-end":le.list.every(pe=>pe.isExpired)})},[...re[11]||(re[11]=[t.createElementVNode("div",{class:"group-bar-line"},null,-1),t.createElementVNode("div",{class:"group-bar-dot"},null,-1)])],2),t.createElementVNode("div",{class:t.normalizeClass({"group-title":!0,"is-end":le.list.every(pe=>pe.isExpired)}),id:`group-title-${t.unref(ye)(new Date(le.date)).format("YYYY-MM-DD")}`},t.toDisplayString(t.unref(ye)(le.date).format("MM/DD"))+" "+t.toDisplayString(t.unref(b)(le.date)),11,Ix),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(le.list,(pe,Ze)=>(t.openBlock(),t.createBlock(t.unref(A.OCollapseItem),{key:pe.sub_id||pe.id,value:pe.sub_id||pe.id,class:t.normalizeClass({"last-item":Ee===Ae.value.length-1&&Ze===le.list.length-1})},{title:t.withCtx(()=>[t.createElementVNode("div",Nx,[t.createElementVNode("div",Ox,[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(Il))]),_:1})]),t.createElementVNode("div",Bx,[t.createElementVNode("div",{class:t.normalizeClass({"meeting-title":!0,"is-delete":pe.is_delete,"is-end":pe.isExpired})},[pe.is_delete?(t.openBlock(),t.createElementBlock("div",Lx,t.toDisplayString(t.unref(g)("meeting.meetingCancelled")),1)):t.createCommentVNode("",!0),t.createElementVNode("div",Px,[t.createElementVNode("div",Mx,t.toDisplayString(pe.topic),1)]),pe.is_cycle?(t.openBlock(),t.createElementBlock("div",Rx,[t.createVNode(t.unref(A.OTag),{color:"primary",variant:"outline"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.cycle")),1)]),_:1})])):t.createCommentVNode("",!0)],2),t.createElementVNode("div",Vx,[t.createElementVNode("span",null,t.toDisplayString(pe.dateRange),1),t.createVNode(t.unref(A.ODivider),{direction:"v"}),t.createElementVNode("span",null,t.toDisplayString(r.groupType===t.unref(vi).GROUP?t.unref(g)("meeting.groups"):t.unref(g)("meeting.sigs"))+": "+t.toDisplayString(pe.group_name),1)])])]),pe.is_delete?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Fx,[pe.isExpired?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[pe.etherpad?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,target:"_blank",href:pe.etherpad},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.meetingSummary"))+" ",1)]),_:1},8,["href"])):t.createCommentVNode("",!0),pe.hasObsData?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:1,target:"_blank",href:`/${t.unref(S)}/video/${pe.group_name}/${pe.mid}/${pe.date}`},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.viewRecord"))+" ",1)]),_:1},8,["href"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,target:"_blank",href:pe.join_url,rel:"noopener noreferrer"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.joinMeeting"))+" ",1)]),_:1},8,["href"]))])),t.createVNode(t.unref(A.OIcon),{onClick:t.withModifiers(()=>X(Ze),["stop"]),class:"copy-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Nl))]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createElementVNode("div",$x,[t.createVNode(ts,{show:D.value.includes(pe.sub_id||pe.id),data:pe,ref_for:!0,ref:Je=>$(Je,pe.id),from:"my"},null,8,["show","data"]),!pe.isExpired&&!pe.is_delete?(t.openBlock(),t.createElementBlock("div",Ux,[t.createVNode(t.unref(A.OLink),{onClick:Je=>Ne(pe,"edit")},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.editMeeting")),1)]),_:1},8,["onClick"]),t.createVNode(t.unref(A.OLink),{onClick:Je=>Ne(pe,"cancel")},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.cancelMeeting")),1)]),_:1},8,["onClick"])])):t.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),re[12]||(re[12]=t.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),Ee===Ae.value.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[U.value?(t.openBlock(),t.createElementBlock("div",zx,t.toDisplayString(t.unref(g)("common.loading")),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"list-month-change next-month",onClick:re[6]||(re[6]=pe=>it("next-month"))},[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconArrowRight))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(g)("meeting.nextMonth")),1)])],64)):t.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):n.value?t.createCommentVNode("",!0):t.renderSlot(ne.$slots,"empty",{key:1})],2),t.createVNode(t.unref(A.ODialog),{visible:Z.value,"onUpdate:visible":re[9]||(re[9]=le=>Z.value=le),"main-class":"handle-dialog",onClose:Re,actions:Ye.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.meetingHandleText",[se.value==="edit"?t.unref(g)("meeting.edit"):t.unref(g)("meeting.cancel2")])),1)]),default:t.withCtx(()=>[t.createVNode(t.unref(A.ORadioGroup),{modelValue:De.value,"onUpdate:modelValue":re[8]||(re[8]=le=>De.value=le)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(ke,le=>t.createVNode(t.unref(A.ORadio),{value:le.value,key:le.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(le.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1},8,["visible","actions"]),t.createVNode(t.unref(A.ODialog),{visible:R.value,"onUpdate:visible":re[10]||(re[10]=le=>R.value=le),"main-class":"cancel-dialog",actions:vt.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.confirmCancel")),1)]),default:t.withCtx(()=>{var le;return[t.createElementVNode("div",Hx,t.toDisplayString(t.unref(g)("meeting.confirmCancelDesc",[(le=ee.value)==null?void 0:le.topic])),1)]}),_:1},8,["visible","actions"])])]))}}),qx=Object.assign(yc,{install(r){r.component("OMeetingCalendar",yc)}}),jx=Object.assign(bc,{install(r){r.component("OMeetingForm",bc)}}),Gx=Object.assign(Qd,{install(r){r.component("OMeetingPlayback",Qd)}}),Wx=Object.assign(Zd,{install(r){r.component("OSigMeetingCalendar",Zd)}}),Yx=Object.assign(Jd,{install(r){r.component("OMyMeetingCalendar",Jd)}}),Xx={class:"o-activity-table"},Kx={key:0,class:"table-wrapper"},Qx={class:"expand-detail"},Zx={class:"sort-btn"},Jx={class:"activity-btn"},e5={key:0,class:"pagination-wrapper"},t5={key:1,class:"collapse-wrapper"},i5={class:"title-top"},n5={class:"act-title"},r5={class:"act-sponsor"},s5={class:"sponsor"},a5={class:"activity-btn"},o5={class:"activity-detail"},l5={key:0,class:"pagination"},u5={class:"dialog-content"},c5={class:"dialog-content"},eh=t.defineComponent({__name:"OActivityApproval",props:{getTableDataRequest:{},applicantList:{},cancelActivityRequest:{},deleteActivityRequest:{},approveActivityRequest:{},rejectActivityRequest:{},getActivityDetailRequest:{}},setup(r){const{t:e,locale:i}=$e.useI18n(),n=t.computed(()=>i.value==="zh"),{approvalStatusMap:s,statusMap:a,activityTypeMap:o}=ba(),l=A.useMessage(null),{isPhone:c,lePadV:d}=It.useScreen(),m=r,g=t.reactive({page:1,size:10,status:"",is_delete:0,search:"",sponsor:"",order_by:""}),S=t.ref([]),T=t.computed(()=>m.applicantList.map(Ae=>({value:Ae,label:Ae}))),b=()=>{g.sponsor=S.value.join(",")},y=t.ref("desc"),x=()=>{y.value=y.value==="asc"?"desc":"asc",g.order_by=y.value},N=t.ref(),I=t.computed(()=>{const Ae=[];return s.value.forEach(be=>{Ae.push(be)}),Ae.slice(1)}),D=()=>{g.status=N.value,N.value==="cancel"?g.is_delete=1:g.is_delete=0},z=t.ref([]),H=t.ref(0),U=[10,20,30,40],B=async()=>{const{page:Ae,size:be,status:me,sponsor:Pe,order_by:Ye,search:vt,is_delete:ne}=g;let re={page:Ae,size:be,sponsor:Pe,order_by:Ye,search:vt};if(me!=="all"&&me!==""&&(re.is_delete=ne),me==="cancel"?re.status="":re.status=me,!m.getTableDataRequest)return;const le=await m.getTableDataRequest(re);z.value=(le.data||[]).map(Ee=>{var xt;const{start_date:pe,end_date:Ze,start:Je,end:Fe,activity_type:Nt}=Ee;return[{...Ee,time:`${pe}-${Fe}`,start_date_time:`${pe} ${Je}`,end_date_time:`${Ze} ${Fe}`,type:Be.EVENTS,dateRange:`${pe} ${Je}-${Ze} ${Fe}`,activity_type:(xt=o.value.get(Nt))==null?void 0:xt.label}]}).flat(),H.value=le.total},G=Ae=>{Ae.pageSize!==g.size?g.page=1:g.page=Ae.page,g.size=Ae.pageSize,B()},C=t.ref({reason:""}),k=t.ref(),O=t.ref(!1),j=t.ref(null),L=t.ref(""),V=t.ref(0),M=t.ref(!1),q=t.ref({reason:[{required:!0,message:e("meeting.enterReviewNotes")}]}),$=async()=>{var Ae,be,me,Pe;if(!(!m.approveActivityRequest||!m.rejectActivityRequest))try{O.value=!0;const Ye=await((Ae=k.value)==null?void 0:Ae.validate());if(!Ye||Ye.some(vt=>!!vt)){O.value=!1;return}V.value===1?await m.approveActivityRequest((be=j.value)==null?void 0:be.id,C.value):await m.rejectActivityRequest((me=j.value)==null?void 0:me.id,C.value),B(),X(),l.success({content:e("meeting.reviewSuccess",[(Pe=j.value)==null?void 0:Pe.title])})}finally{M.value=!1,O.value=!1}},X=()=>{M.value=!1,ee.value=!1,O.value=!1,C.value.reason=""},R=async()=>{var Ae;if(m.deleteActivityRequest&&m.cancelActivityRequest)try{O.value=!0,oe.value===1?await m.cancelActivityRequest(j.value.id,C.value):await m.deleteActivityRequest(j.value.id,C.value),B(),X(),l.success({content:e("meeting.activityActionSuccess",[(Ae=j.value)==null?void 0:Ae.title,J.value])})}finally{O.value=!1,ee.value=!1}},ee=t.ref(!1),ue=t.ref(""),J=t.ref(""),oe=t.ref(0),Z=Ae=>{ue.value=e("meeting.deleteActivity"),J.value=e("meeting.deleteActivity").toLowerCase(),j.value=Ae,oe.value=0,ee.value=!0},se=Ae=>{ue.value=e("meeting.cancelActivity"),J.value=e("common.cancel").toLowerCase(),j.value=Ae,oe.value=1,ee.value=!0},_e=Ae=>{j.value=Ae,L.value=e("meeting.approveReview"),V.value=1,M.value=!0},ke=Ae=>{j.value=Ae,L.value=e("meeting.rejectReview"),V.value=0,M.value=!0},De=t.ref([]),Ne=t.ref([]),Re=Ae=>{const be=Ae.toString();if(!m.getActivityDetailRequest)return;De.value.includes(be)||(De.value.push(be),m.getActivityDetailRequest(be).then(Pe=>{var Ye;(Ye=z.value)==null||Ye.forEach(vt=>{vt.id===Pe.id&&(vt.approve_record=Pe.approve_record,vt.approver=Pe.approver)})}));const me=Ne.value.indexOf(be);Ne.value.includes(be)?Ne.value.splice(me,1):Ne.value.push(be)},et=Ae=>{Re(Ae.id)},Ve=Ae=>Ae.id.toString(),Ke=t.ref([]),Ge=Ae=>{Ae.length&&Ae.forEach(be=>{Re(be)})},Ue=t.ref({}),Xe=(Ae,be)=>{Ae&&be&&(Ue.value[be]=Ae)};t.onMounted(()=>{B()}),t.watch(()=>[g.status,g.sponsor,g.order_by,g.search,g.is_delete],()=>{B()},{deep:!0});const kt=t.computed(()=>[{id:"confirm",loading:O.value,color:"primary",variant:d.value?"text":"solid",round:"pill",size:"large",label:e("meeting.confirmBtn"),onClick:()=>{R()}},{id:"cancel",color:"primary",variant:d.value?"text":"outline",round:"pill",size:"large",label:e("meeting.cancelBtn"),onClick:()=>{X()}}]),it=t.computed(()=>[{id:"confirm",loading:O.value,color:"primary",variant:d.value?"text":"solid",round:"pill",size:"large",label:e("meeting.confirmBtn"),onClick:()=>{$()}},{id:"cancel",color:"primary",variant:d.value?"text":"outline",round:"pill",size:"large",label:e("meeting.cancelBtn"),onClick:()=>{X()}}]);return(Ae,be)=>(t.openBlock(),t.createElementBlock("div",Xx,[t.unref(c)?(t.openBlock(),t.createElementBlock("div",t5,[t.createVNode(t.unref(A.OCollapse),{modelValue:Ke.value,"onUpdate:modelValue":be[2]||(be[2]=me=>Ke.value=me),accordion:t.unref(c),onChange:Ge},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value,me=>{var Pe;return t.openBlock(),t.createElementBlock(t.Fragment,{key:me.id},[t.createElementVNode("div",i5,[t.createElementVNode("p",n5,t.toDisplayString(me.title),1),me.is_delete!==1?(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:0,color:"primary",variant:"outline",class:t.normalizeClass([`tag-${(Pe=t.unref(a).get(me.status))==null?void 0:Pe.id}`])},{default:t.withCtx(()=>{var Ye;return[t.createTextVNode(t.toDisplayString((Ye=t.unref(a).get(me.status))==null?void 0:Ye.text),1)]}),_:2},1032,["class"])):(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:1,color:"primary",variant:"outline",class:"tag-cancel"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.statusCanceled")),1)]),_:1}))]),t.createVNode(t.unref(A.OCollapseItem),{value:me.id},{title:t.withCtx(()=>[t.createElementVNode("div",r5,[t.createElementVNode("p",s5,t.toDisplayString(me.sponsor),1),t.createElementVNode("p",null,t.toDisplayString(t.unref(rt.dayjs)(me.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),t.createElementVNode("div",a5,[me.status===7||me.is_delete?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,color:"danger",variant:"text",onClick:t.withModifiers(Ye=>Z(me),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),(me.status===3||me.status===4)&&me.is_delete!==1?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:1,color:"danger",variant:"text",onClick:t.withModifiers(Ye=>se(me),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.cancelActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),me.status===2?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:2,color:"primary",variant:"text",onClick:t.withModifiers(Ye=>_e(me),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.approve")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),me.status===2?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:3,color:"primary",variant:"text",onClick:t.withModifiers(Ye=>ke(me),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.reject")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0)])]),default:t.withCtx(()=>[t.createElementVNode("div",o5,[t.createVNode(ts,{show:Ke.value.includes(me.id),data:me,ref_for:!0,ref:Ye=>Xe(Ye,me.id),page:t.unref(Be).APPROVAL},null,8,["show","data","page"])])]),_:2},1032,["value"])],64)}),128))]),_:1},8,["modelValue","accordion"]),H.value>U[0]?(t.openBlock(),t.createElementBlock("div",l5,[t.createVNode(t.unref(A.OPagination),{total:H.value,page:g.page,"page-size":g.size,"page-sizes":U,layout:["total","jumper","pager","pagesize"],"show-more":!1,simple:!0,onChange:G},null,8,["total","page","page-size"])])):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",Kx,[t.createVNode(t.unref(rt.ElTable),{data:z.value,onExpandChange:et,"row-key":Ve,"expand-row-keys":Ne.value},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElTableColumn),{type:"expand"},{default:t.withCtx(me=>[t.createElementVNode("div",Qx,[t.createVNode(ts,{data:me.row,page:t.unref(Be).APPROVAL,show:""},null,8,["data","page"])])]),_:1}),t.createVNode(t.unref(rt.ElTableColumn),{label:t.unref(e)("meeting.activityName"),prop:"title"},null,8,["label"]),t.createVNode(t.unref(rt.ElTableColumn),{prop:"sponsor"},{header:t.withCtx(()=>[t.createVNode(mc,{modelValue:S.value,"onUpdate:modelValue":be[0]||(be[0]=me=>S.value=me),onConfirm:b,list:T.value,multiple:!0},{empty:t.withCtx(()=>[t.renderSlot(Ae.$slots,"filter-empty")]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(t.unref(e)("meeting.applicant")),1)]),_:3},8,["modelValue","list"])]),_:3}),t.createVNode(t.unref(rt.ElTableColumn),{prop:"create_time"},{header:t.withCtx(()=>[t.createElementVNode("div",{class:"sort-time",onClick:x},[t.createElementVNode("span",null,t.toDisplayString(t.unref(e)("meeting.submissionTime")),1),t.createElementVNode("div",Zx,[t.createElementVNode("div",{class:t.normalizeClass(["sort-asc sort-item",{active:y.value==="asc"}])},null,2),t.createElementVNode("div",{class:t.normalizeClass(["sort-desc sort-item",{active:y.value==="desc"}])},null,2)])])]),default:t.withCtx(me=>[t.createTextVNode(t.toDisplayString(t.unref(rt.dayjs)(me.row.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),_:1}),t.createVNode(t.unref(rt.ElTableColumn),{prop:"status",width:"90px"},{header:t.withCtx(()=>[t.createVNode(mc,{modelValue:N.value,"onUpdate:modelValue":be[1]||(be[1]=me=>N.value=me),onConfirm:D,list:I.value},{empty:t.withCtx(()=>[t.renderSlot(Ae.$slots,"filter-empty")]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(t.unref(e)("meeting.status")),1)]),_:3},8,["modelValue","list"])]),default:t.withCtx(me=>{var Pe;return[me.row.is_delete!==1?(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:0,color:"primary",variant:"outline",class:t.normalizeClass([`tag-${(Pe=t.unref(a).get(me.row.status))==null?void 0:Pe.id}`])},{default:t.withCtx(()=>{var Ye;return[t.createTextVNode(t.toDisplayString((Ye=t.unref(a).get(me.row.status))==null?void 0:Ye.text),1)]}),_:2},1032,["class"])):(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:1,color:"primary",variant:"outline",class:"tag-cancel"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.statusCanceled")),1)]),_:1}))]}),_:3}),t.createVNode(t.unref(rt.ElTableColumn),{label:t.unref(e)("meeting.action")},{default:t.withCtx(me=>[t.createElementVNode("div",Jx,[me.row.status===7||me.row.is_delete?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,color:"danger",onClick:Pe=>Z(me.row)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),(me.row.status===3||me.row.status===4)&&me.row.is_delete!==1?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:1,color:"danger",onClick:Pe=>se(me.row)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.cancelActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),me.row.status===2?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:2,color:"primary",onClick:Pe=>_e(me.row)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.approve")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),me.row.status===2?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:3,color:"primary",onClick:Pe=>ke(me.row)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.reject")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0)])]),_:1},8,["label"])]),_:3},8,["data","expand-row-keys"]),H.value>U[0]?(t.openBlock(),t.createElementBlock("div",e5,[t.createVNode(t.unref(A.OPagination),{total:H.value,page:g.page,"page-size":g.size,"page-sizes":U,layout:["total","jumper","pager","pagesize"],"show-more":!1,onChange:G},null,8,["total","page","page-size"])])):t.createCommentVNode("",!0)])),t.createVNode(t.unref(A.ODialog),{visible:M.value,"onUpdate:visible":be[4]||(be[4]=me=>M.value=me),"phone-half-full":t.unref(d),"main-class":"handle-dialog-approval review-dialog",actions:it.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(L.value),1)]),default:t.withCtx(()=>[t.createElementVNode("div",u5,[t.createVNode(t.unref(A.OForm),{model:C.value,ref_key:"formRef",ref:k,"has-required":"",layout:"v",class:"form-wrapper"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OFormItem),{rules:q.value.reason,label:`${t.unref(e)("meeting.reviewNotesLabel")}${n.value?":":": "}`,field:"reason"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OTextarea),{size:"large",placeholder:t.unref(e)("meeting.enterReviewNotes"),rows:4,resize:"none","max-length":1e3,"input-on-outlimit":!1,modelValue:C.value.reason,"onUpdate:modelValue":be[3]||(be[3]=me=>C.value.reason=me)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"])]),_:1},8,["model"])])]),_:1},8,["visible","phone-half-full","actions"]),t.createVNode(t.unref(A.ODialog),{visible:ee.value,"onUpdate:visible":be[5]||(be[5]=me=>ee.value=me),"phone-half-full":t.unref(d),"main-class":"handle-dialog-approval cancel-dialog",actions:kt.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(ue.value),1)]),default:t.withCtx(()=>{var me,Pe;return[t.createElementVNode("div",c5,t.toDisplayString(oe.value===1?t.unref(e)("meeting.confirmCancelActivity",[(me=j.value)==null?void 0:me.title]):t.unref(e)("meeting.confirmDeleteActivity",[(Pe=j.value)==null?void 0:Pe.title])),1)]}),_:1},8,["visible","phone-half-full","actions"])]))}}),d5={class:"o-my-activity-calendar"},h5={class:"activity-list"},f5={key:0,class:"list-calendar-mb"},p5={class:"left-calendar"},m5=["onClick"],g5={class:"date-cell-text"},v5={class:"right-meeting"},y5={class:"list-body"},_5=["id"],T5={class:"item-header-left"},b5={class:"act-icon"},C5={class:"header-info"},x5={class:"title-text"},S5={class:"act-info"},E5={class:"date-range"},k5={key:0,class:"item-header-right"},w5={class:"activity-detail"},D5={key:0,class:"activity-btn"},A5={key:0,class:"load-text"},I5={class:"dialog-content"},N5={class:"dialog-content"},th=t.defineComponent({__name:"OMyActivityCalendar",props:{getListRequest:{},revokeActivityRequest:{},deleteActivityRequest:{},editActivityRequest:{},getActivityDetailRequest:{}},emits:["edit"],setup(r,{emit:e}){const{t:i,locale:n}=$e.useI18n(),s=t.computed(()=>n.value===$e.Locales.ZH),{statusMap:a,activityTypeMap:o}=ba(),l=ne=>{const re=ye(ne||new Date);return s.value?re.format("YYYY MM月"):re.format("MMMM YYYY")},c=A.useMessage(null),{isPhone:d}=It.useScreen(),m=r,g=e,S=t.ref([]),T=t.ref([]),b=t.ref(1),y=t.ref(50),x=t.ref(null),N=t.ref(!1),I=t.ref([]),D=t.ref(!1),z=t.ref(!1),H=t.computed(()=>x.value===null||T.value.length<x.value),U=async()=>{if(m.getListRequest&&!D.value)try{if(x.value!==null&&x.value>0&&(b.value-1)*y.value>x.value)return;if(!H.value&&d.value){R("next-month");return}D.value=!0;const ne=await m.getListRequest({page:b.value,size:y.value,start_date:V.value}),re=(ne.data||[]).map(le=>{const{start_date:Ee,end_date:pe,start:Ze,end:Je}=le;return[{...le,time:`${Ee}-${Je}`,start_date_time:`${Ee} ${Ze}`,end_date_time:`${pe} ${Je}`,type:Be.EVENTS,dateRange:`${Ee} ${Ze}-${pe} ${Je}`,isExpired:ye(`${Ee} ${Ze}`).isBefore(ye())}]}).flat().filter(le=>le.start_date.slice(0,7)===ht(V.value,"YYYY-MM-DD").slice(0,7));N.value?(T.value=ne.data||[],S.value=re):b.value===1&&!d.value?(T.value=ne.data||[],S.value=re):(T.value=[...T.value,...ne.data||[]],S.value=[...S.value,...re]),S.value.sort((le,Ee)=>le.start_date===Ee.start_date?Nn(le.start)>Nn(Ee.start)?1:-1:ye(le.start_date).isAfter(ye(Ee.start_date))?1:-1),x.value=(ne==null?void 0:ne.total)||0,t.nextTick(()=>{$(),Z.value&&!d.value&&j()})}finally{D.value=!1,z.value=!1,N.value=!1}},B=t.ref([]),G=ne=>{m.getActivityDetailRequest&&(B.value.includes(ne)||(B.value.push(ne),m.getActivityDetailRequest(ne).then(re=>{var le;(le=S.value)==null||le.forEach(Ee=>{Ee.id===re.id&&(Ee.approve_record=re.approve_record)})})))},C=ne=>{ne.length&&ne.forEach(re=>{G(re)})},k=ne=>{const re=S.value.filter(le=>le.start_date===ne);return re.length&&re.every(le=>le.status===3||le.status===4)},O=ne=>{const re=ne.target;if(!re)return;const le=re.scrollTop,Ee=re.scrollHeight,pe=re.clientHeight;le+pe>=Ee&&_e()},j=()=>{Z.value.getContainerEl().addEventListener("scroll",O)},L=t.ref(),V=t.ref(ye().format("YYYY-MM-DD")),M=t.computed(()=>[...new Set(S.value.map(ne=>ne.start_date))].sort((ne,re)=>ye(ne).isBefore(ye(re))?-1:1)),q=t.computed(()=>[...new Set(S.value.filter(ne=>!ne.isExpired&&!ne.is_delete).map(ne=>ne.start_date))].sort((ne,re)=>ye(ne).isBefore(ye(re))?-1:1)),$=()=>{var le;const ne=q.value.find(Ee=>!ye(Ee).isBefore(ye(new Date).format("YYYY-MM-DD")));ne?V.value=ne:V.value||(V.value=ye().format("YYYY-MM-DD")),(le=L.value)==null||le.pickDay(ye(V.value)),V.value=ye(V.value).format("YYYY-MM-DD");const re=S.value.find(Ee=>Ee.start_date===V.value&&!Ee.isExpired&&!Ee.is_delete);re&&(G(re.id),I.value=[re.id])},X=(ne,re)=>{var le;(!re||!((le=ne.target)!=null&&le.className.includes("date-cell-text")))&&(ne.stopPropagation(),ne.preventDefault())},R=ne=>{L.value&&(b.value=1,x.value=null,B.value=[],window.scrollTo({top:0,behavior:"smooth"}),L.value.selectDate(ne),N.value=!0,t.nextTick(()=>{V.value=ye(L.value.selectedDay).format("YYYY-MM-DD"),U()}))},ee=t.computed(()=>S.value.reduce((ne,re)=>{if(ne.length){const le=ne.at(-1);return(le==null?void 0:le.start_date)===re.start_date?le==null||le.list.push(re):ne.push({start_date:re.start_date,list:[re]}),ne}else return[{start_date:re.start_date,list:[re]}]},[])),ue=t.ref({}),J=(ne,re)=>{ne&&re&&(ue.value[re]=ne)},oe=async ne=>{await ue.value[ne].copyInfo(),c.success({content:i("common.copySuccess")})},Z=t.ref(),se=ne=>{var Ee,pe,Ze;const re=ye(ne).format("YYYY-MM-DD"),le=document.querySelector(`#group-title-${re}`);le&&(d.value?window.scrollTo({top:(((Ee=le.parentElement)==null?void 0:Ee.offsetTop)||0)-52,behavior:"smooth"}):(Ze=Z.value)==null||Ze.scrollTo({top:((pe=le.parentElement)==null?void 0:pe.offsetTop)||0,behavior:"smooth"}))};t.watch(()=>V.value,()=>{se(V.value)});const _e=fi.useDebounceFn(()=>{H.value&&(d.value||(z.value=!0,b.value++,U()))},200),ke=t.ref(!1),De=t.ref(null),Ne=t.ref(!1),Re=ne=>{De.value=ne,Ne.value=!0},et=()=>{var ne;m.revokeActivityRequest&&De.value&&(ke.value=!0,m.revokeActivityRequest((ne=De.value)==null?void 0:ne.id).then(()=>{var re;c.success({content:i("meeting.revokeActivitySuccess",[(re=De.value)==null?void 0:re.title])}),N.value=!0,U()}).finally(()=>{Ne.value=!1,ke.value=!1}))},Ve=()=>{Ne.value=!1},Ke=ne=>{g("edit",ne)},Ge=ne=>{if(!m.editActivityRequest)return;const{title:re,start_date:le,end_date:Ee,register_end_date:pe,activity_type:Ze,synopsis:Je,register_url:Fe,content_url:Nt,address:xt,start:ui,end:Ot,approver:St}=ne;let ii={title:re,start_date:le,end_date:Ee,register_end_date:pe,activity_type:Ze,synopsis:Je,register_url:Fe,content_url:Nt,address:xt,start:ui,end:Ot,approver:St,is_publish:"true"};m.editActivityRequest(ne.id,ii).then(()=>{c.success({content:i("meeting.submitReviewSuccess",[ne.title])}),N.value=!0,U()})},Ue=t.ref(!1),Xe=ne=>{De.value=ne,Ue.value=!0},kt=()=>{var ne;m.deleteActivityRequest&&(ke.value=!0,m.deleteActivityRequest((ne=De.value)==null?void 0:ne.id).then(()=>{var re;c.success({content:i("meeting.deleteActivitySuccess",[(re=De.value)==null?void 0:re.title])}),N.value=!0,U()}).finally(()=>{Ue.value=!1,ke.value=!1}))},it=()=>{Ue.value=!1},Ae=t.ref(),be=t.ref(0),me=()=>{var ne;be.value=((ne=Ae.value)==null?void 0:ne.clientHeight)||0},Pe=fi.useDebounceFn(()=>{if(!H.value||!d.value)return;const ne=window.scrollY||window.pageYOffset,re=window.innerHeight;document.documentElement.scrollHeight-(ne+re)<=300&&!D.value&&(z.value=!0,b.value++,U())},200);t.onMounted(()=>{U(),window.addEventListener("scroll",Pe),window.addEventListener("resize",Pe),me(),window.addEventListener("resize",me)}),t.onUnmounted(()=>{var re;window.removeEventListener("scroll",Pe),window.removeEventListener("resize",Pe),window.removeEventListener("resize",me);const ne=(re=Z.value)==null?void 0:re.getContainerEl();ne==null||ne.removeEventListener("scroll",O)});const Ye=t.computed(()=>[{id:"confirm",loading:ke.value,color:"primary",variant:"outline",round:"pill",size:"large",label:i("meeting.confirmBtn"),onClick:()=>{et()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:i("meeting.cancelBtn"),onClick:()=>{Ve()}}]),vt=t.computed(()=>[{id:"confirm",loading:ke.value,color:"primary",variant:"outline",round:"pill",size:"large",label:i("meeting.confirmBtn"),onClick:()=>{kt()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:i("meeting.cancelBtn"),onClick:()=>{it()}}]);return(ne,re)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",d5,[t.createElementVNode("div",h5,[t.unref(d)?(t.openBlock(),t.createElementBlock("div",f5,[t.createElementVNode("span",null,t.toDisplayString(l(V.value)),1),t.createElementVNode("span",null,[t.createVNode(t.unref(A.OIcon),{onClick:re[0]||(re[0]=le=>R("prev-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronLeft))]),_:1}),t.createVNode(t.unref(A.OIcon),{onClick:re[1]||(re[1]=le=>R("next-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})])])):t.createCommentVNode("",!0),t.createElementVNode("div",p5,[t.createVNode(t.unref(rt.ElCalendar),{ref_key:"calendarRef",ref:L,modelValue:V.value,"onUpdate:modelValue":re[4]||(re[4]=le=>V.value=le)},{header:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(l(V.value)),1),t.createElementVNode("div",null,[t.createVNode(t.unref(A.OIcon),{onClick:re[2]||(re[2]=le=>R("prev-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronLeft))]),_:1}),t.createVNode(t.unref(A.OIcon),{onClick:re[3]||(re[3]=le=>R("next-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})])]),"date-cell":t.withCtx(({data:le})=>[t.createElementVNode("div",{onClick:Ee=>X(Ee,M.value.includes(le.day)),class:t.normalizeClass({"date-cell":!0,"is-selected":le.isSelected,"is-today":t.unref(ht)(le.day)===t.unref(ht)(),clickable:M.value.includes(le.day),approved:k(le.day)})},[t.createElementVNode("div",g5,t.toDisplayString(Number(le.day.split("-")[2])),1)],10,m5)]),_:1},8,["modelValue"])]),t.createElementVNode("div",v5,[S.value.length?(t.openBlock(),t.createBlock(t.unref(A.OScroller),{key:0,ref_key:"scrollerRef",ref:Z,onScrollend:t.unref(_e),style:t.normalizeStyle({"--header-height":be.value}),"show-type":"hover",class:"scroller-container"},{default:t.withCtx(()=>[t.createElementVNode("div",y5,[t.createVNode(t.unref(A.OCollapse),{modelValue:I.value,"onUpdate:modelValue":re[7]||(re[7]=le=>I.value=le),accordion:t.unref(d),onChange:C},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(ee.value,(le,Ee)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:le.start_date},[Ee===0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:re[5]||(re[5]=pe=>R("prev-month"))},[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconArrowLeft))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("meeting.preMonth")),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["act-item",Ee===ee.value.length-1&&"last-item"])},[t.createElementVNode("div",{class:t.normalizeClass({"act-bar":!0,"is-active":t.unref(ye)(V.value).format("YYYY-MM-DD")===le.start_date,"is-end":le.list.every(pe=>pe.isExpired),approved:le.list.every(pe=>pe.status===3||pe.status===4)})},[...re[10]||(re[10]=[t.createElementVNode("div",{class:"act-bar-line"},null,-1),t.createElementVNode("div",{class:"act-bar-dot"},null,-1)])],2),t.createElementVNode("div",{class:t.normalizeClass({"group-title":!0,"is-end":le.list.every(pe=>pe.isExpired)}),id:`group-title-${t.unref(ye)(new Date(le.start_date)).format("YYYY-MM-DD")}`},t.toDisplayString(t.unref(ye)(le.start_date).format("MM/DD")),11,_5),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(le.list,(pe,Ze)=>(t.openBlock(),t.createBlock(t.unref(A.OCollapseItem),{key:pe.sub_id||pe.id,value:pe.sub_id||pe.id,class:t.normalizeClass({"last-item":Ee===ee.value.length-1&&Ze===le.list.length-1})},{title:t.withCtx(()=>{var Je,Fe;return[t.createElementVNode("div",T5,[t.createElementVNode("div",b5,[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(Al))]),_:1})]),t.createElementVNode("div",C5,[t.createElementVNode("div",{class:t.normalizeClass({"act-title":!0,"is-delete":pe.is_delete,"is-end":pe.isExpired})},[t.createElementVNode("div",x5,t.toDisplayString(pe.title),1),t.createVNode(t.unref(A.OTag),{color:"primary",variant:"outline",class:t.normalizeClass([`tag-${pe.is_delete?"delete":(Je=t.unref(a).get(pe.status))==null?void 0:Je.id}`])},{default:t.withCtx(()=>{var Nt;return[t.createTextVNode(t.toDisplayString(pe.is_delete===1?t.unref(i)("meeting.statusCanceled"):(Nt=t.unref(a).get(pe.status))==null?void 0:Nt.text),1)]}),_:2},1032,["class"])],2),t.createElementVNode("div",S5,[t.createElementVNode("span",E5,t.toDisplayString(pe.dateRange),1),t.createVNode(t.unref(A.ODivider),{direction:"v"}),t.createElementVNode("span",null,t.toDisplayString((Fe=t.unref(o).get(pe.activity_type))==null?void 0:Fe.label),1)])])]),pe.content_url&&!pe.is_delete&&[3,4,5,6].includes(pe.status)?(t.openBlock(),t.createElementBlock("div",k5,[pe.content_url?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,href:pe.content_url,target:"_blank",rel:"noopener noreferrer"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.activityDetail"))+" ",1)]),_:1},8,["href"])):t.createCommentVNode("",!0),pe.register_url&&(pe.status===3||pe.status===4||pe.status===2&&pe.update_activity_id&&new Date(pe.register_end_date).getTime()>new Date().getTime())?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:1,href:pe.register_url,target:"_blank",rel:"noopener noreferrer"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.registerNow"))+" ",1)]),_:1},8,["href"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OIcon),{onClick:t.withModifiers(()=>oe(Ze),["stop"]),class:"copy-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Nl))]),_:1},8,["onClick"])]}),default:t.withCtx(()=>[t.createElementVNode("div",w5,[t.createVNode(ts,{show:I.value.includes(pe.id),data:pe,ref_for:!0,ref:Je=>J(Je,pe.id)},null,8,["show","data"]),!pe.isExpired&&!pe.is_delete?(t.openBlock(),t.createElementBlock("div",D5,[pe.status===2?(t.openBlock(),t.createBlock(t.unref(A.OButton),{key:0,variant:"text",onClick:Je=>Re(pe)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.withdrawReview")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),pe.status===1||pe.status===3||pe.status===4||pe.status===7?(t.openBlock(),t.createBlock(t.unref(A.OButton),{key:1,variant:"text",onClick:Je=>Ke(pe)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.modifyActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),pe.status===1||pe.status===7?(t.openBlock(),t.createBlock(t.unref(A.OButton),{key:2,variant:"text",onClick:Je=>Xe(pe)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),pe.status===1||pe.status===7?(t.openBlock(),t.createBlock(t.unref(A.OButton),{key:3,variant:"text",onClick:Je=>Ge(pe)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.submitReview")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),re[11]||(re[11]=t.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),Ee===ee.value.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[z.value?(t.openBlock(),t.createElementBlock("div",A5,t.toDisplayString(t.unref(i)("meeting.loading")),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"list-month-change next-month",onClick:re[6]||(re[6]=pe=>R("next-month"))},[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconArrowRight))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("meeting.nextMonth")),1)])],64)):t.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):t.renderSlot(ne.$slots,"empty",{key:1})])])]),t.createVNode(t.unref(A.ODialog),{visible:Ne.value,"onUpdate:visible":re[8]||(re[8]=le=>Ne.value=le),"main-class":"handle-dialog-active",actions:Ye.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.withdrawReview")),1)]),default:t.withCtx(()=>{var le;return[t.createElementVNode("div",I5,t.toDisplayString(t.unref(i)("meeting.confirmRevokeActivity",[(le=De.value)==null?void 0:le.title])),1)]}),_:1},8,["visible","actions"]),t.createVNode(t.unref(A.ODialog),{visible:Ue.value,"onUpdate:visible":re[9]||(re[9]=le=>Ue.value=le),"main-class":"handle-dialog-active",actions:vt.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.deleteActivity")),1)]),default:t.withCtx(()=>{var le;return[t.createElementVNode("div",N5,t.toDisplayString(t.unref(i)("meeting.confirmDeleteActivity",[(le=De.value)==null?void 0:le.title])),1)]}),_:1},8,["visible","actions"])],64))}}),O5=Object.assign(ac,{install(r){r.component("OActivityForm",ac)}}),B5=Object.assign(eh,{install(r){r.component("OActivityApproval",eh)}}),L5=Object.assign(th,{install(r){r.component("OMyActivityCalendar",th)}}),P5={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function M5(r,e){return t.openBlock(),t.createElementBlock("svg",P5,[...e[0]||(e[0]=[t.createElementVNode("rect",{id:"峰会",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),t.createElementVNode("path",{id:"矢量 425",d:"M8.36719 4.75439L8.36523 4.75537L8.36523 4.75537C7.63184 5.05518 6.93555 5.44629 6.27734 5.9292C6.00098 6.13184 5.94238 6.5083 6.14551 6.78516C6.34766 7.06201 6.72461 7.11963 7.00098 6.91699C7.61035 6.47119 8.25391 6.11475 8.93262 5.84766C9.05371 5.7998 9.17676 5.75488 9.30078 5.71289C9.73242 5.56641 10.1699 5.45752 10.6143 5.38672C10.6191 5.38574 10.624 5.38525 10.6289 5.38428L10.6289 5.38428C11.0439 5.31836 11.4639 5.28564 11.8896 5.28564C12.3193 5.28564 12.7451 5.31934 13.1641 5.38672L13.165 5.38672C13.6084 5.45752 14.0459 5.56641 14.4775 5.71289C14.6016 5.75488 14.7246 5.7998 14.8457 5.84766C15.5254 6.11475 16.1689 6.47119 16.7773 6.91699C17.0537 7.11963 17.4307 7.06201 17.6328 6.78516C17.8359 6.5083 17.7783 6.13184 17.501 5.9292C16.8418 5.4458 16.1455 5.0542 15.4111 4.75439C15.2334 4.68213 15.0537 4.61475 14.8711 4.55273C14.376 4.38477 13.873 4.25977 13.3643 4.17773C12.8789 4.09961 12.3877 4.06055 11.8896 4.06055C11.3916 4.06055 10.8994 4.09961 10.4141 4.17773L10.4141 4.17773C9.90527 4.25977 9.40332 4.38477 8.90723 4.55273C8.72559 4.61475 8.54492 4.68213 8.36719 4.75439L8.36719 4.75439ZM20.377 14.2979L20.377 13.4229C20.377 13.0801 20.1074 12.8105 19.7646 12.8105C19.4219 12.8105 19.1523 13.0801 19.1523 13.4229L19.1523 14.2979C19.1523 14.334 19.1455 14.3677 19.1328 14.3984L19.1328 14.3989C19.1074 14.4243 19.0215 14.5283 18.9902 14.5415C18.96 14.5542 18.9258 14.5605 18.8896 14.5605L4.88965 14.5605C4.85352 14.5605 4.82031 14.5542 4.78906 14.5415C4.76367 14.5156 4.65918 14.4297 4.64648 14.3989C4.63379 14.3677 4.62695 14.3345 4.62695 14.2979L4.62695 9.04785C4.62695 9.01172 4.63379 8.97803 4.64648 8.94727C4.67188 8.92188 4.75781 8.81738 4.78906 8.80469L4.78906 8.80469C4.82031 8.79199 4.85352 8.78564 4.88965 8.78564L18.8896 8.78564C18.9258 8.78564 18.96 8.79199 18.9902 8.80469C19.0166 8.83057 19.1201 8.9165 19.1328 8.94727C19.1455 8.97803 19.1523 9.01172 19.1523 9.04785L19.1523 11.6729C19.1523 12.0161 19.4219 12.2856 19.7646 12.2856C20.1074 12.2856 20.377 12.0161 20.377 11.6729L20.377 9.04785C20.377 8.94141 20.3662 8.83691 20.3447 8.73535L20.3447 8.73438L20.3447 8.73389C20.3252 8.64355 20.2969 8.55518 20.2598 8.46875C20.2236 8.3833 20.1807 8.30225 20.1299 8.22559C20.0752 8.14355 20.0127 8.06738 19.9414 7.99609C19.8701 7.92529 19.7939 7.8623 19.7119 7.80811C19.6357 7.75732 19.5547 7.71387 19.4688 7.67773C19.3828 7.64111 19.2939 7.61328 19.2041 7.59375C19.1016 7.57178 18.9971 7.56055 18.8896 7.56055L4.88965 7.56055C4.78418 7.56055 4.68066 7.57129 4.5791 7.59277L4.5791 7.59277C4.57812 7.59326 4.57715 7.59326 4.57617 7.59375L4.5752 7.59375C4.48535 7.61328 4.39746 7.64111 4.31055 7.67773C4.22461 7.71387 4.14355 7.75732 4.06738 7.80811C3.98535 7.8623 3.90918 7.92529 3.83789 7.99609C3.7666 8.06738 3.7041 8.14355 3.64941 8.22559C3.64941 8.22656 3.64844 8.22705 3.64844 8.22803C3.59863 8.30371 3.55566 8.38379 3.51953 8.46875C3.48242 8.55518 3.45508 8.64355 3.43555 8.73389C3.41309 8.83643 3.40234 8.94092 3.40234 9.04785L3.40234 14.2979C3.40234 14.4053 3.41309 14.5098 3.43555 14.6123C3.45508 14.7021 3.48242 14.7905 3.51953 14.8774C3.55566 14.9629 3.59961 15.0439 3.64941 15.1201C3.7041 15.2021 3.7666 15.2788 3.83789 15.3501C3.90918 15.4209 3.98535 15.4834 4.06738 15.5381C4.14355 15.5889 4.22461 15.6323 4.31055 15.6685C4.39746 15.7051 4.48535 15.7329 4.5752 15.7524C4.67773 15.7744 4.78223 15.7856 4.88965 15.7856L18.8896 15.7856C18.9971 15.7856 19.1016 15.7744 19.2041 15.7524C19.2939 15.7329 19.3828 15.7051 19.4688 15.6685C19.5547 15.6318 19.6357 15.5889 19.7119 15.5381C19.7939 15.4834 19.8701 15.4209 19.9414 15.3501C20.0127 15.2788 20.0752 15.2021 20.1299 15.1201C20.1807 15.0439 20.2236 14.9629 20.2598 14.8774C20.2969 14.7905 20.3252 14.7021 20.3447 14.6123C20.3662 14.5098 20.377 14.4053 20.377 14.2979ZM14.8291 16.3438L14.8291 16.3438C14.9189 16.3633 15.0078 16.3911 15.0938 16.4277C15.1797 16.4639 15.2607 16.5073 15.3369 16.5581C15.4189 16.6123 15.4951 16.6753 15.5664 16.7461C15.6377 16.8174 15.7002 16.8936 15.7549 16.9756C15.8057 17.0522 15.8486 17.1328 15.8848 17.2188C15.9219 17.3052 15.9502 17.3936 15.9697 17.4839C15.9912 17.5864 16.002 17.6909 16.002 17.7979C16.002 17.9053 15.9912 18.0098 15.9697 18.1123C15.9502 18.2021 15.9219 18.2905 15.8848 18.3774C15.8486 18.4629 15.8057 18.5439 15.7549 18.6201C15.7002 18.7021 15.6377 18.7788 15.5664 18.8501C15.4951 18.9209 15.4189 18.9834 15.3369 19.0381C15.2607 19.0889 15.1797 19.1318 15.0938 19.1685C15.0078 19.2051 14.9189 19.2329 14.8291 19.2524C14.7266 19.2744 14.6221 19.2856 14.5146 19.2856L9.26465 19.2856C9.1582 19.2856 9.05273 19.2744 8.9502 19.2524C8.86035 19.2329 8.77246 19.2051 8.68555 19.1685C8.59961 19.1318 8.51855 19.0889 8.44238 19.0381C8.36035 18.9834 8.28418 18.9209 8.21289 18.8501C8.1416 18.7788 8.0791 18.7021 8.02441 18.6201C7.97461 18.5439 7.93066 18.4629 7.89453 18.3774C7.85742 18.2905 7.83008 18.2021 7.81055 18.1123C7.78809 18.0098 7.77734 17.9053 7.77734 17.7979C7.77734 17.6909 7.78809 17.5864 7.81055 17.4839C7.83008 17.3936 7.85742 17.3052 7.89453 17.2188C7.93066 17.1328 7.97461 17.0522 8.02441 16.9756C8.0791 16.8936 8.1416 16.8174 8.21289 16.7461C8.28418 16.6753 8.36035 16.6123 8.44238 16.5581C8.51855 16.5073 8.59961 16.4639 8.68555 16.4277C8.77246 16.3911 8.86035 16.3633 8.9502 16.3438C9.05273 16.3218 9.1582 16.3105 9.26465 16.3105L14.5146 16.3105C14.6221 16.3105 14.7266 16.3218 14.8291 16.3438ZM9.2666 17.5352L14.5166 17.5352C14.5527 17.5352 14.5859 17.5415 14.6172 17.5547C14.6426 17.5801 14.7471 17.666 14.7598 17.6973C14.7725 17.728 14.7793 17.7617 14.7793 17.7979C14.7793 17.834 14.7725 17.8677 14.7598 17.8984C14.7344 17.9243 14.6484 18.0283 14.6172 18.041C14.5859 18.0542 14.5527 18.0605 14.5166 18.0605L9.2666 18.0605C9.23047 18.0605 9.19629 18.0542 9.16602 18.041C9.13965 18.0156 9.03613 17.9297 9.02344 17.8984C9.01074 17.8677 9.00391 17.834 9.00391 17.7979C9.00391 17.7617 9.01074 17.728 9.02344 17.6973C9.04883 17.6714 9.13477 17.5674 9.16602 17.5547C9.19629 17.5415 9.23047 17.5352 9.2666 17.5352Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const R5={name:"events-icon-summit",render:M5},V5={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function F5(r,e){return t.openBlock(),t.createElementBlock("svg",V5,[...e[0]||(e[0]=[t.createElementVNode("rect",{id:"活动",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),t.createElementVNode("path",{id:"矢量 426",d:"M18.3065 11.0924L17.7206 11.6295C17.455 11.8722 17.4384 12.2711 17.6806 12.5362C17.9237 12.8009 18.3221 12.8185 18.5868 12.5758L19.1737 12.0387L20.0418 11.2433C20.1746 11.1217 20.2811 10.9859 20.3631 10.8365C20.4256 10.7198 20.4735 10.5948 20.5057 10.4615C20.5369 10.3316 20.5516 10.2017 20.5496 10.0723C20.5467 9.92 20.5213 9.76765 20.4725 9.61531C20.4237 9.46345 20.3553 9.32478 20.2684 9.19978C20.1942 9.09333 20.1063 8.99665 20.0057 8.90925C19.9012 8.81989 19.7899 8.74616 19.6698 8.68854C19.5165 8.61481 19.3504 8.56744 19.1717 8.54645L15.3212 8.09185C15.2997 8.08355 15.2119 8.05572 15.1923 8.04156C15.1777 8.02398 15.1142 7.9566 15.1044 7.93511L13.4697 4.43751C13.3945 4.27638 13.2978 4.13477 13.1816 4.0127L13.1816 4.0127C13.0898 3.91797 12.9853 3.83496 12.8691 3.76416C12.7549 3.69531 12.6367 3.64209 12.5137 3.60498L12.5137 3.60498C12.3682 3.56104 12.2168 3.53906 12.0586 3.53906C11.8994 3.53906 11.7481 3.56104 11.6025 3.60498L11.6025 3.60498C11.4795 3.64209 11.3613 3.69531 11.2471 3.76416C11.1309 3.83496 11.0264 3.91797 10.9356 4.0127C10.8184 4.13477 10.7217 4.27589 10.6465 4.43751L9.01178 7.93511C8.99713 7.95269 8.94342 8.0274 8.92389 8.04156C8.90241 8.04986 8.81843 8.08892 8.79499 8.09185L4.94448 8.54645C4.76577 8.56744 4.59976 8.61481 4.44644 8.68854L4.44644 8.68854C4.32731 8.74616 4.215 8.81989 4.11149 8.90925C4.00993 8.99665 3.92204 9.09333 3.8488 9.19978C3.76091 9.32478 3.69353 9.46345 3.64373 9.61531C3.5949 9.76765 3.56951 9.92 3.56658 10.0723C3.56463 10.2017 3.57927 10.3316 3.61052 10.4615C3.64275 10.5948 3.6906 10.7198 3.75407 10.8365C3.83513 10.9859 3.94157 11.1217 4.07438 11.2433L6.90635 13.837C6.91807 13.8566 6.97374 13.9313 6.98155 13.9542C6.98155 13.9606 6.98252 13.9713 6.98448 13.9845L6.98448 13.986C6.98838 14.0226 6.99327 14.0763 6.98936 14.0939L6.2384 17.8488C6.20324 18.0241 6.19738 18.196 6.21985 18.3635C6.23645 18.4948 6.2716 18.6232 6.32434 18.7497C6.37512 18.8727 6.43957 18.986 6.51671 19.0891C6.60851 19.2106 6.71788 19.3181 6.84679 19.4118C6.97471 19.5061 7.11045 19.5778 7.254 19.6281C7.37607 19.6711 7.50302 19.698 7.63583 19.7097C7.77157 19.7209 7.90438 19.7155 8.03524 19.6926L8.03524 19.6926C8.20223 19.6628 8.36336 19.6047 8.52058 19.5183L11.9248 17.6369C11.9473 17.631 12.0342 17.6022 12.0586 17.6022C12.0801 17.6081 12.1709 17.6252 12.1914 17.6369L15.5117 19.4719C15.6718 19.5603 15.8368 19.6189 16.0068 19.6481L16.0077 19.6481C16.1396 19.6706 16.2743 19.675 16.412 19.6618C16.5468 19.6491 16.6747 19.6203 16.7968 19.5754C16.9423 19.5222 17.079 19.447 17.2079 19.3488C17.3368 19.2512 17.4462 19.1394 17.537 19.0139C17.6132 18.9079 17.6747 18.7917 17.7235 18.6662C17.7733 18.5368 17.8046 18.4055 17.8182 18.2722C17.8368 18.1008 17.8241 17.926 17.7821 17.7482L16.3495 11.7125C16.2665 11.3629 15.9267 11.1534 15.5771 11.2359C15.2275 11.3189 15.0175 11.6593 15.1005 12.0089L16.5331 18.0446C16.5468 18.1027 16.5458 18.155 16.5292 18.2023C16.5116 18.2492 16.4794 18.2907 16.4325 18.3268C16.3847 18.363 16.3359 18.383 16.286 18.3864C16.2362 18.3903 16.1855 18.3776 16.1327 18.3488L12.8115 16.5133C12.6943 16.4489 12.5732 16.4001 12.4473 16.3678L12.4473 16.3678C12.3223 16.3351 12.1924 16.319 12.0586 16.319C11.9238 16.319 11.794 16.3351 11.669 16.3678C11.543 16.4001 11.4219 16.4489 11.3047 16.5133L7.8995 18.3952C7.84872 18.4235 7.79794 18.4362 7.74911 18.4328C7.69931 18.4299 7.65146 18.4108 7.60458 18.3762C7.55673 18.342 7.52451 18.3015 7.50693 18.2556C7.48837 18.2097 7.48545 18.1579 7.49716 18.1003L8.24813 14.3453C8.27449 14.2116 8.28426 14.0792 8.27644 13.9474C8.26863 13.816 8.24324 13.6852 8.20125 13.5558C8.15926 13.4259 8.10262 13.3058 8.03036 13.1949C7.95907 13.0841 7.87313 12.983 7.77255 12.8907L4.94155 10.297C4.89761 10.2569 4.87026 10.213 4.85757 10.1651C4.84487 10.1173 4.8478 10.0655 4.86538 10.0094C4.88393 9.95369 4.91128 9.90975 4.94936 9.8785C4.98842 9.84676 5.03628 9.82771 5.09487 9.82088L8.94538 9.36628C9.07916 9.35066 9.20709 9.31892 9.32916 9.27155C9.45025 9.22419 9.56646 9.16071 9.67583 9.0821C9.7852 9.003 9.8809 8.91315 9.96391 8.81256C10.0479 8.71198 10.1172 8.60065 10.1748 8.47858L11.8086 4.98097C11.834 4.92824 11.8672 4.88869 11.9082 4.86183C11.9502 4.83546 12 4.82228 12.0586 4.82228C12.1162 4.82228 12.166 4.83546 12.208 4.86183C12.25 4.88869 12.2822 4.92824 12.3076 4.98097L13.9414 8.47858C13.999 8.60065 14.0693 8.71198 14.1523 8.81256C14.2353 8.91315 14.332 9.003 14.4414 9.0821C14.5507 9.16071 14.666 9.22419 14.7871 9.27155C14.9091 9.31892 15.0371 9.35066 15.1708 9.36628L19.0213 9.82088C19.0799 9.82771 19.1278 9.84676 19.1668 9.8785C19.2049 9.90975 19.2333 9.95369 19.2508 10.0094C19.2694 10.0655 19.2713 10.1173 19.2586 10.1651C19.2459 10.213 19.2186 10.2569 19.1747 10.297L18.3065 11.0924ZM9.31256 13.2311L7.93856 11.8561C7.68368 11.6017 7.68368 11.2027 7.93856 10.9483C8.19246 10.6944 8.59187 10.6944 8.84577 10.9483L10.2207 12.3233C10.4746 12.5777 10.4746 12.9772 10.2207 13.2311C9.96586 13.485 9.56743 13.485 9.31256 13.2311Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const $5={name:"events-icon-events",render:F5},U5={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function z5(r,e){return t.openBlock(),t.createElementBlock("svg",U5,[...e[0]||(e[0]=[t.createElementVNode("rect",{id:"高校 & 比赛",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),t.createElementVNode("path",{id:"矢量 578",d:"M3.05078 7.51904L11.6914 4.13965C11.8086 4.09424 11.9219 4.07178 12.0391 4.07178C12.1523 4.07178 12.2695 4.09473 12.3867 4.14062L20.9609 7.51953C21.0625 7.55957 21.1523 7.61328 21.2305 7.67969C21.2969 7.73779 21.3555 7.80566 21.4062 7.88379C21.5078 8.03857 21.5586 8.20898 21.5625 8.39502C21.5625 8.58057 21.5156 8.75195 21.418 8.9082C21.3125 9.07861 21.1641 9.20264 20.9766 9.28076L19.457 9.91309L19.457 12.2915C19.457 12.6558 19.168 12.9419 18.8047 12.9419C18.4414 12.9419 18.1562 12.6558 18.1562 12.292L18.1562 10.4531L16.0742 11.3188L16.0742 14.7134C16.2852 14.897 16.418 15.1675 16.418 15.4692C16.418 16.0215 15.9688 16.4692 15.418 16.4692C14.8672 16.4692 14.418 16.0215 14.418 15.4692C14.418 15.1626 14.5547 14.8887 14.7734 14.7051L14.7734 11.8589L12.4023 12.8442C12.2852 12.8926 12.1641 12.917 12.0391 12.917C11.9141 12.9175 11.793 12.8936 11.6758 12.8452L5.63281 10.354L5.61328 17.6836C5.61328 17.7285 5.62109 17.771 5.63281 17.8101C5.65234 17.854 5.67969 17.894 5.71484 17.9307C5.75 17.9658 5.78906 17.9917 5.83203 18.0088C5.87109 18.0259 5.91797 18.0342 5.96484 18.0342L17.7812 18.0342C17.832 18.0342 17.875 18.0254 17.918 18.0083C17.957 17.9912 17.9961 17.9658 18.0312 17.9316C18.0625 17.8975 18.0898 17.8599 18.1055 17.8184C18.125 17.7773 18.1328 17.7324 18.1328 17.6841L18.1328 14.1411C18.1328 13.7773 18.418 13.4912 18.7812 13.4912C19.1445 13.4912 19.4336 13.7773 19.4336 14.1411L19.4336 17.6841C19.4336 17.8032 19.418 17.9194 19.3945 18.0332C19.375 18.1333 19.3438 18.231 19.3008 18.3267C19.2188 18.5239 19.1016 18.6987 18.9492 18.8511C18.8711 18.9297 18.7852 18.9995 18.6953 19.0596C18.6094 19.1157 18.5195 19.1641 18.4258 19.2041C18.3281 19.2446 18.2305 19.2759 18.1328 19.2974L18.1328 19.2974C18.0156 19.3218 17.9023 19.334 17.7812 19.334L5.96484 19.334C5.84375 19.334 5.73047 19.3218 5.61719 19.2979C5.51562 19.2759 5.41797 19.2446 5.32031 19.2036C5.12109 19.1201 4.94922 19.002 4.79688 18.8501C4.64453 18.6978 4.52734 18.5225 4.44141 18.3252C4.35547 18.1196 4.3125 17.9048 4.3125 17.6797L4.33594 9.81836L3.03125 9.28174C2.84375 9.2041 2.69531 9.08008 2.58984 8.90967C2.54297 8.83496 2.50781 8.75684 2.48438 8.67578C2.45703 8.58643 2.44531 8.49268 2.44531 8.39502C2.44531 8.29736 2.46094 8.20361 2.48828 8.11475C2.51562 8.03369 2.55078 7.95654 2.59766 7.8833C2.65234 7.80469 2.71094 7.73682 2.77734 7.67871C2.85547 7.61182 2.94922 7.55859 3.05078 7.51904ZM18.5547 8.87891L15.457 10.1665L11.5 8.05322C11.1758 7.88184 10.7891 7.99951 10.6172 8.32031C10.4492 8.6416 10.5664 9.02832 10.8867 9.19971L13.9062 10.8115L12.0352 11.5884L5.23438 8.78271L4.33594 8.41211L12.0352 5.40039L19.6797 8.41211L18.5547 8.87891Z",fill:"rgb(255,254.745,254.745)","fill-rule":"evenodd"},null,-1)])])}const H5={name:"events-icon-competition",render:z5},q5={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function j5(r,e){return t.openBlock(),t.createElementBlock("svg",q5,[...e[0]||(e[0]=[t.createElementVNode("rect",{id:"版本发布计划",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),t.createElementVNode("path",{id:"矢量 579",d:"M8.94922 6.90332L8.94922 6.3335C8.94922 6.23779 8.95703 6.14404 8.97656 6.05225L8.97656 6.05225C8.99609 5.97119 9.01953 5.89209 9.05469 5.81396C9.08594 5.7373 9.125 5.66455 9.17188 5.59619C9.21875 5.52246 9.27734 5.4541 9.33984 5.39062C9.40234 5.32715 9.47266 5.271 9.54297 5.22217L9.54297 5.22217L9.54297 5.22217C9.61328 5.17676 9.6875 5.1377 9.76172 5.10498C9.83984 5.07227 9.91797 5.04688 10 5.02979L10 5.02979C10.0938 5.00977 10.1875 5 10.2812 5L18.668 5C18.7617 5 18.8555 5.00977 18.9492 5.02979L18.9492 5.02979C19.0273 5.04688 19.1094 5.07227 19.1875 5.10498C19.2617 5.1377 19.3359 5.17676 19.4023 5.22217C19.4766 5.271 19.5469 5.32715 19.6094 5.39062C19.6719 5.4541 19.7305 5.52246 19.7773 5.59619L19.7773 5.59619C19.8242 5.66455 19.8633 5.7373 19.8945 5.81396C19.9297 5.89209 19.9531 5.97119 19.9688 6.05225C19.9883 6.14404 20 6.23779 20 6.3335L20 12.2441C20 12.3398 19.9883 12.4336 19.9688 12.5249C19.9531 12.606 19.9297 12.6855 19.8945 12.7632C19.8633 12.8403 19.8242 12.9131 19.7773 12.9814C19.7305 13.0547 19.6719 13.123 19.6094 13.187C19.5469 13.2505 19.4766 13.3066 19.4023 13.3555C19.3359 13.4009 19.2617 13.4399 19.1875 13.4722C19.1094 13.5054 19.0273 13.5303 18.9492 13.5479C18.8555 13.5674 18.7617 13.5771 18.668 13.5771L18.3906 13.5771C18.0664 13.5771 17.8125 13.3232 17.8125 13C17.8125 12.6768 18.0664 12.4229 18.3906 12.4229L18.668 12.4229C18.6914 12.4229 18.7734 12.3789 18.793 12.3701C18.8086 12.353 18.8359 12.2651 18.8438 12.2441L18.8438 6.3335C18.8438 6.30859 18.8008 6.22803 18.793 6.20703C18.7773 6.18945 18.6875 6.16357 18.668 6.15479L10.2812 6.15479C10.2578 6.15479 10.1758 6.19824 10.1562 6.20703C10.1367 6.22461 10.1133 6.3125 10.1016 6.3335L10.1016 6.90332C10.1016 7.22656 9.84766 7.48047 9.52734 7.48047C9.20312 7.48047 8.94922 7.22656 8.94922 6.90332ZM6.47266 9.39307L6.47266 9.21973C6.47266 9.12402 6.48438 9.03027 6.50391 8.93896C6.51953 8.85791 6.54688 8.77832 6.57812 8.70068C6.61328 8.62354 6.65234 8.55127 6.69531 8.48242C6.74609 8.40918 6.80078 8.34082 6.86328 8.27734C6.92969 8.21338 6.99609 8.15723 7.07031 8.10889C7.13672 8.06299 7.21094 8.02441 7.28906 7.9917C7.36719 7.9585 7.44531 7.93359 7.52734 7.91602C7.61719 7.89648 7.71094 7.88672 7.80859 7.88672L16.1914 7.88672C16.2891 7.88672 16.3828 7.89648 16.4727 7.91602C16.5547 7.93359 16.6328 7.9585 16.7109 7.9917C16.7891 8.02441 16.8594 8.06299 16.9297 8.1084C17.0039 8.15723 17.0703 8.21338 17.1367 8.27734C17.1992 8.34082 17.2539 8.40918 17.3047 8.48242C17.3477 8.55127 17.3867 8.62354 17.4219 8.70068C17.4531 8.77832 17.4805 8.85791 17.4961 8.93896C17.5156 9.03027 17.5273 9.12402 17.5273 9.21973L17.5273 15.1304C17.5273 15.2266 17.5156 15.3198 17.4961 15.4116C17.4805 15.4927 17.4531 15.5718 17.4219 15.6499C17.3867 15.7266 17.3477 15.7993 17.3047 15.8682C17.2539 15.9414 17.1992 16.0098 17.1367 16.0732C17.0703 16.1367 17.0039 16.1929 16.9297 16.2417C16.8633 16.2871 16.7891 16.3262 16.7109 16.3589C16.6328 16.3916 16.5547 16.417 16.4727 16.4346C16.3828 16.4541 16.2891 16.4639 16.1914 16.4639L15.8789 16.4639C15.5547 16.4639 15.3008 16.21 15.3008 15.8867C15.3008 15.5635 15.5547 15.3091 15.8789 15.3091L16.1914 15.3091C16.2188 15.3091 16.2969 15.2656 16.3203 15.2568C16.3359 15.2393 16.3633 15.1519 16.3711 15.1304L16.3711 9.21973C16.3711 9.19531 16.3281 9.11475 16.3203 9.09375C16.3008 9.07617 16.2148 9.0498 16.1914 9.04102L7.80859 9.04102C7.78125 9.04102 7.70312 9.08496 7.67969 9.09375C7.66406 9.11084 7.63672 9.19873 7.62891 9.21973L7.62891 9.39307C7.62891 9.71631 7.375 9.97021 7.05078 9.97021C6.72656 9.97021 6.47266 9.71631 6.47266 9.39307ZM14 10.3901C13.9062 10.3706 13.8125 10.3608 13.7188 10.3608L5.33203 10.3608C5.23828 10.3608 5.14453 10.3706 5.05078 10.3901L5.05078 10.3901C4.97266 10.4077 4.89062 10.4331 4.8125 10.4658C4.73828 10.4985 4.66406 10.5376 4.59766 10.583L4.59766 10.583L4.59766 10.583C4.52344 10.6318 4.45312 10.688 4.39062 10.7515C4.32812 10.8149 4.26953 10.8833 4.22266 10.957C4.17578 11.0254 4.13672 11.0981 4.10547 11.1748C4.07031 11.2529 4.04688 11.332 4.03125 11.4131L4.03125 11.4131C4.01172 11.5049 4 11.5981 4 11.6943L4 17.605C4 17.7007 4.01172 17.7944 4.03125 17.8857C4.04688 17.9668 4.07031 18.0464 4.10547 18.124C4.13672 18.2012 4.17578 18.2739 4.22266 18.3423C4.26953 18.4155 4.32812 18.4839 4.39062 18.5479C4.45312 18.6113 4.52344 18.6675 4.59766 18.7163C4.66406 18.7617 4.73828 18.8008 4.8125 18.833C4.89062 18.8662 4.97266 18.8911 5.05078 18.9087L5.05078 18.9087C5.14453 18.9282 5.23828 18.938 5.33203 18.938L13.7188 18.938C13.8125 18.938 13.9062 18.9282 14 18.9087C14.082 18.8911 14.1602 18.8662 14.2383 18.833C14.3125 18.8008 14.3867 18.7617 14.457 18.7163C14.5273 18.6675 14.5977 18.6113 14.6602 18.5479C14.7227 18.4839 14.7812 18.4155 14.8281 18.3423C14.875 18.2739 14.9141 18.2012 14.9453 18.124C14.9805 18.0464 15.0039 17.9668 15.0234 17.8857C15.043 17.7944 15.0508 17.7007 15.0508 17.605L15.0508 11.6943C15.0508 11.5981 15.043 11.5049 15.0234 11.4131C15.0039 11.332 14.9805 11.2529 14.9453 11.1748C14.9141 11.0981 14.875 11.0254 14.8281 10.957C14.7812 10.8833 14.7227 10.8149 14.6602 10.7515C14.5977 10.688 14.5273 10.6318 14.457 10.583C14.3867 10.5376 14.3125 10.4985 14.2383 10.4658C14.1602 10.4331 14.082 10.4077 14 10.3901ZM5.33203 11.5156L13.7188 11.5156C13.7383 11.5244 13.8281 11.5503 13.8438 11.5679C13.8516 11.5889 13.8984 11.6694 13.8984 11.6943L13.8984 17.605C13.8867 17.626 13.8633 17.7139 13.8438 17.731C13.8242 17.7397 13.7422 17.7837 13.7188 17.7837L5.33203 17.7837C5.3125 17.7749 5.22266 17.7485 5.20703 17.731C5.19922 17.71 5.15625 17.6294 5.15625 17.605L5.15625 11.6943C5.16406 11.6733 5.19141 11.5854 5.20703 11.5679C5.22266 11.5503 5.3125 11.5244 5.33203 11.5156ZM11 12.7754C10.8086 12.5776 10.5 12.5742 10.3008 12.7676C10.1055 12.9614 10.1016 13.2695 10.293 13.4678L11 14.1875L8.36719 14.1875C8.08984 14.1875 7.87109 14.4053 7.87109 14.6826C7.87109 14.9595 8.08984 15.1772 8.36719 15.1772L10.9414 15.1772L10.2969 15.8286C10.1016 16.0254 10.1016 16.3335 10.3008 16.5283C10.4961 16.7236 10.8047 16.7222 11 16.5254L12.5039 15.0078C12.6172 14.8926 12.6758 14.7769 12.6758 14.6611C12.6758 14.5459 12.6172 14.4297 12.5039 14.3135L11 12.7754ZM7.39453 13.6792L7.39453 15.9336C7.39453 16.2109 7.17969 16.4287 6.90234 16.4287C6.625 16.4287 6.40625 16.2109 6.40625 15.9336L6.40625 13.6792C6.40625 13.4019 6.625 13.1841 6.90234 13.1841C7.17969 13.1841 7.39453 13.4019 7.39453 13.6792Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const G5={name:"events-icon-release",render:j5},W5={summit:"--o-orange-6",events:"--o-cyan-6",competition:"--o-blue-6",release:"--o-purple-6"},Y5={events:$5,competition:H5,release:G5,summit:R5},js={上海:"https://infrastructure-website.osinfra.cn/picture/city/shanghai.jpg",北京:"https://infrastructure-website.osinfra.cn/picture/city/beijing.jpg",南京:"https://infrastructure-website.osinfra.cn/picture/city/nanjing.jpg",天津:"https://infrastructure-website.osinfra.cn/picture/city/tianjin.jpg",成都:"https://infrastructure-website.osinfra.cn/picture/city/chengdu.jpg",无锡:"https://infrastructure-website.osinfra.cn/picture/city/wuxi.jpg",杭州:"https://infrastructure-website.osinfra.cn/picture/city/hangzhou.jpg",深圳:["https://infrastructure-website.osinfra.cn/picture/city/shenzhen1.jpg","https://infrastructure-website.osinfra.cn/picture/city/shenzhen2.jpg"],苏州:"https://infrastructure-website.osinfra.cn/picture/city/suzhou.jpg",西安:"https://infrastructure-website.osinfra.cn/picture/city/xian.jpg",郑州:"https://infrastructure-website.osinfra.cn/picture/city/zhengzhou.jpg",武汉:"https://infrastructure-website.osinfra.cn/picture/city/wuhan.jpg"},X5="https://infrastructure-website.osinfra.cn/picture/city/default-cover.jpg",K5={class:"o-events-calendar"},Q5={key:0,class:"month-list"},Z5={class:"collapse-header"},J5={class:"collapse-title"},eS={key:0,class:"collapse-desc"},tS={key:0,class:"month-content month-content-span"},iS={key:0,class:"event-location"},nS={class:"event-name"},rS={key:1},sS={key:0,class:"month-content-row"},aS={class:"month-name"},oS={class:"event-name"},lS={class:"event-location"},uS={class:"event-name"},cS={class:"event-location"},dS={key:1,class:"month-content month-content-column"},hS={class:"event-location"},fS={class:"event-name"},pS={key:1},ih=t.defineComponent({__name:"OEventsCalendar",props:{data:{default:()=>[]}},setup(r){const e=Ca(),{lePadV:i}=It.useScreen(),n=r,s=["JAN","FEB","MAR","Apr","May","JUN","Jul","Aug","Sep","Oct","Nov","Dec"],a=t.ref([]);t.watch([()=>n.data,()=>i.value],()=>{var g;n.data.length?i.value?a.value=[(g=n.data[0])==null?void 0:g.name]:a.value=n.data.map(S=>S.name):a.value=[]},{immediate:!0});const o=g=>{const S=g.split("/");return parseInt(S[1],10)},l=g=>{const S=new Array(12).fill(0),T=[];return g.forEach((b,y)=>{const[x,N]=Array.isArray(b.date)?[o(b.date[0]),o(b.date[1])]:[o(b.date),o(b.date)];let I=0;for(let z=x-1;z<N;z++)I=Math.max(I,S[z]);const D=I+1;for(let z=x-1;z<N;z++)S[z]=D;T.push({event:b,row:D,eventIndex:y,start:x,end:N})}),T},c=g=>{const S=Array.from({length:12},()=>[]);return g.forEach(T=>{const b=Array.isArray(T.date)?o(T.date[0]):o(T.date);S[b-1].push(T)}),S},d=g=>{const S=g.color||W5[g.type];return S!=null&&S.startsWith("--")?`var(${S})`:S},m=g=>g.icon?g.icon:Y5[g.type];return(g,S)=>(t.openBlock(),t.createElementBlock("div",K5,[t.unref(i)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Q5,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(s,T=>t.createElementVNode("div",{class:"month-header",key:T},t.toDisplayString(T),1)),64))])),t.createVNode(t.unref(A.OCollapse),{modelValue:a.value,"onUpdate:modelValue":S[0]||(S[0]=T=>a.value=T)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.data,(T,b)=>(t.openBlock(),t.createBlock(t.unref(A.OCollapseItem),{key:b,value:T.name},{title:t.withCtx(()=>[t.createElementVNode("div",Z5,[t.createElementVNode("div",J5,[t.createElementVNode("div",{class:"title-icon",style:t.normalizeStyle({"--bg-color":d(T)})},[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(m(T))))]),_:2},1024)],4),t.createElementVNode("span",null,t.toDisplayString(T.name),1)]),T.desc?(t.openBlock(),t.createElementBlock("div",eS,[t.withDirectives(t.createElementVNode("div",null,null,512),[[t.unref(e),T.desc]])])):t.createCommentVNode("",!0)])]),default:t.withCtx(()=>[T.isSpanMonth?(t.openBlock(),t.createElementBlock("div",tS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l(T.data),({event:y,row:x,eventIndex:N,start:I,end:D})=>(t.openBlock(),t.createElementBlock("div",{key:N,class:t.normalizeClass(["event-item",{"event-item-center":y.align==="center","has-link":y.link}]),style:t.normalizeStyle({gridColumn:`${I} / ${D+1}`,gridRow:x,"--bg-color":d(T)||void 0})},[y.location?(t.openBlock(),t.createElementBlock("div",iS,t.toDisplayString(y.location),1)):t.createCommentVNode("",!0),t.createElementVNode("div",nS,[y.link?(t.openBlock(),t.createBlock(t.unref(A.OLink),t.mergeProps({key:0,href:y.link,target:"_blank"},{ref_for:!0},y.linkProps||{}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(y.name),1)]),_:2},1040,["href"])):(t.openBlock(),t.createElementBlock("span",rS,t.toDisplayString(y.name),1))])],6))),128))])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.unref(i)?(t.openBlock(),t.createElementBlock("div",sS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c(T.data),(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:x,class:t.normalizeClass(["month-row",{"empty-month":y.length===0}])},[t.createElementVNode("div",aS,t.toDisplayString(s[x]),1),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y,(N,I)=>(t.openBlock(),t.createElementBlock("div",{key:I,class:t.normalizeClass(["event-item",N.link?"has-link":""]),style:t.normalizeStyle({"--bd-color":d(T)||void 0})},[N.link?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,href:N.link,target:"_blank"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createElementVNode("div",oS,[t.createElementVNode("span",null,t.toDisplayString(N.name),1)]),t.createElementVNode("div",lS,t.toDisplayString(N.location),1)]),t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})]),_:2},1032,["href"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",uS,t.toDisplayString(N.name),1),t.createElementVNode("div",cS,t.toDisplayString(N.location),1)],64))],6))),128))],2))),128))])):(t.openBlock(),t.createElementBlock("div",dS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c(T.data),(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:x,class:"month-column"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y,(N,I)=>(t.openBlock(),t.createElementBlock("div",{key:I,class:t.normalizeClass(["event-item",N.link?"has-link":""]),style:t.normalizeStyle({"--bg-color":d(T)||void 0})},[t.createElementVNode("div",hS,t.toDisplayString(N.location),1),t.createElementVNode("div",fS,[N.link?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,href:N.link,target:"_blank"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(N.name),1)]),_:2},1032,["href"])):(t.openBlock(),t.createElementBlock("span",pS,t.toDisplayString(N.name),1))])],6))),128))]))),128))]))],64))]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]))}});var Zi=(r=>(r.FINISH="finish",r.ING="ing",r.ALL="",r))(Zi||{});const Gs=(r,e)=>new Date(r).getTime()>new Date(e).getTime(),mS={class:"o-events-list"},gS={class:"filter-wrapper"},vS={class:"filter-left"},yS={class:"list-content"},_S={class:"event-name"},TS={class:"event-desc"},bS={class:"event-date"},CS={key:0,class:"event-location"},nh=t.defineComponent({__name:"OEventsList",props:{data:{default:()=>[]},page:{},pageSize:{},total:{}},emits:["search"],setup(r,{emit:e}){const{t:i}=$e.useI18n(),{lePadV:n}=It.useScreen(),s=r,a=[{label:i("events.statusAll"),value:Zi.ALL},{label:i("events.statusIng"),value:Zi.ING},{label:i("events.statusFinish"),value:Zi.FINISH}],o=e,l=t.ref(Zi.ALL),c=t.ref(""),d=t.ref(""),m=(b={})=>{o("search",Object.assign({page:s.page,pageSize:s.pageSize,status:l.value,keyword:d.value},b))},g=()=>{m()},S=()=>{d.value=c.value,m()},T=t.computed(()=>s.data.map(b=>{let y=b.startDate,x=b.endDate,N=ye(b.date).format("YYYY/MM/DD");if(y&&x){const I=ye().format("YYYY-01-01");Gs(I,y)&&(y=I);const D=ye().format("YYYY-12-31");Gs(x,D)&&(x=D),N=`${ye(y).format("YYYY/MM/DD")}-${ye(x).format("MM/DD")}`}return{...b,startDate:y,endDate:x,dateStr:N,status:Gs(new Date,b.date||b.endDate)?Zi.FINISH:Zi.ING}}).sort((b,y)=>Gs(b.date||b.endDate,y.date||y.endDate)?-1:1).map(b=>{var N,I,D;const y=(D=(I=(N=b.city)==null?void 0:N.replace("市",""))==null?void 0:I.replace("中国",""))==null?void 0:D.replaceAll(" ","");let x=null;return Array.isArray(js[y])?x=js[y][b.name.length%js[y].length]:x=js[y],x||(x=X5),{...b,cover:x}}));return(b,y)=>(t.openBlock(),t.createElementBlock("div",mS,[t.createElementVNode("div",gS,[t.createElementVNode("div",vS,[t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("events.status")),1),t.createVNode(t.unref(A.ORadioGroup),{modelValue:l.value,"onUpdate:modelValue":y[0]||(y[0]=x=>l.value=x),style:{"--radio-group-gap":"8px"},onChange:g},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(a,x=>t.createVNode(t.unref(A.ORadio),{key:x.value,value:x.value},{radio:t.withCtx(({checked:N})=>[t.createVNode(t.unref(A.OToggle),{checked:N},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(x.label),1)]),_:2},1032,["checked"])]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),t.createVNode(t.unref(A.OInput),{modelValue:c.value,"onUpdate:modelValue":y[1]||(y[1]=x=>c.value=x),placeholder:t.unref(i)("events.searchPlaceholder"),onPressEnter:S,onClear:S,clearable:""},{prefix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),{class:"input-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconSearch))]),_:1})]),_:1},8,["modelValue","placeholder"])]),t.createElementVNode("div",yS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(T.value,x=>(t.openBlock(),t.createBlock(t.unref(A.OCard),{key:x.name,cover:x.cover,href:x.link},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OTag),{class:"event-status"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(x.status===t.unref(Zi).ING?t.unref(i)("events.statusIng"):t.unref(i)("events.statusFinish")),1)]),_:2},1024),t.createElementVNode("div",_S,t.toDisplayString(x.name),1),t.createElementVNode("div",TS,[t.createElementVNode("div",bS,t.toDisplayString(x.dateStr),1),t.createVNode(t.unref(A.ODivider),{direction:"v"}),x.city?(t.openBlock(),t.createElementBlock("div",CS,t.toDisplayString(x.city),1)):t.createCommentVNode("",!0)])]),_:2},1032,["cover","href"]))),128))]),T.value.length?t.createCommentVNode("",!0):t.renderSlot(b.$slots,"empty",{key:0}),r.total>8?(t.openBlock(),t.createBlock(t.unref(A.OPagination),{key:1,page:r.page,simple:t.unref(n),"show-total":!0,pageSize:r.pageSize,total:r.total,onChange:m,pageSizes:[4,12,24,36,48]},null,8,["page","simple","pageSize","total"])):t.createCommentVNode("",!0)]))}}),xS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function SS(r,e){return t.openBlock(),t.createElementBlock("svg",xS,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"#1da9ff",d:"M20.4 5.95c0.27-0.27 0.71-0.27 0.99 0 0.24 0.25 0.27 0.63 0.070 0.91l-0.070 0.080-10.5 10.47c-0.53 0.53-1.36 0.56-1.93 0.1l-0.11-0.1-5.23-5.2c-0.28-0.28-0.28-0.72-0.010-0.99 0.25-0.25 0.63-0.28 0.91-0.080l0.080 0.070 5.24 5.21c0.010 0.010 0.030 0.010 0.040 0.010l0.030-0.010 10.49-10.47z"},null,-1)])])}const ES={name:"events-icon-checked",render:SS},kS={class:"o-events-apply"},wS={class:"events-apply-grid"},DS={class:"timeline-number"},AS={class:"number-circle"},IS={class:"step-title"},NS={class:"step-idx"},OS={class:"step-desc"},BS={key:0},LS={class:"desc-list-wrapper"},PS={key:0,class:"desc-list-title"},MS={class:"desc-list-content"},RS={class:"desc-list-item-title"},VS={class:"desc-list-item-desc"},rh=t.defineComponent({__name:"OEventsApply",props:{steps:{}},setup(r){const{isDark:e}=It.useTheme(),i=Ca();return(n,s)=>(t.openBlock(),t.createElementBlock("div",kS,[t.createElementVNode("div",wS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.steps,(a,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:o},[t.createElementVNode("div",DS,[t.createElementVNode("div",AS,t.toDisplayString(o+1),1)]),t.createElementVNode("div",{class:t.normalizeClass(["step-item",`step-${o+1} ${t.unref(e)?"is-dark":""}`]),style:{}},[t.createElementVNode("div",IS,[t.createElementVNode("div",NS,t.toDisplayString(o+1),1),t.createElementVNode("span",null,t.toDisplayString(a.title),1)]),t.createElementVNode("div",OS,[a.desc?t.withDirectives((t.openBlock(),t.createElementBlock("div",BS,null,512)),[[t.unref(i),a.desc]]):t.createCommentVNode("",!0),t.renderSlot(n.$slots,`step${o+1}`),t.createElementVNode("div",LS,[a.listTitle?(t.openBlock(),t.createElementBlock("div",PS,t.toDisplayString(a.listTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("div",MS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.list,(l,c)=>(t.openBlock(),t.createElementBlock("div",{class:"desc-list-item",key:c},[t.createElementVNode("div",RS,[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(ES))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(l.title),1)]),t.createElementVNode("div",VS,t.toDisplayString(l.desc),1)]))),128))])])]),a.img?(t.openBlock(),t.createElementBlock("div",{key:0,class:"img-wrapper",style:t.normalizeStyle({backgroundImage:`url(${a.img})`})},null,4)):t.createCommentVNode("",!0),a.imgPhone?(t.openBlock(),t.createElementBlock("div",{key:1,class:"img-wrapper-phone",style:t.normalizeStyle({backgroundImage:`url(${a.imgPhone})`})},null,4)):t.createCommentVNode("",!0)],2)],64))),128))])]))}}),FS=Object.assign(ih,{install(r){r.component("OEventsCalendar",ih)}}),$S=Object.assign(nh,{install(r){r.component("OEventsList",nh)}}),US=Object.assign(rh,{install(r){r.component("OEventsApply",rh)}}),zS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function HS(r,e){return t.openBlock(),t.createElementBlock("svg",zS,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M9.461 11.616l4.719-3.932c0.212-0.177 0.527-0.148 0.704 0.064 0.075 0.090 0.116 0.203 0.116 0.32v7.865c0 0.276-0.224 0.5-0.5 0.5-0.117 0-0.23-0.041-0.32-0.116l-4.719-3.932c-0.212-0.177-0.241-0.492-0.064-0.704 0.019-0.023 0.041-0.045 0.064-0.064z"},null,-1)])])}const qS={name:"components-icon-caret-left",render:HS},jS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function GS(r,e){return t.openBlock(),t.createElementBlock("svg",jS,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M14.539 11.616l-4.719-3.932c-0.212-0.177-0.527-0.148-0.704 0.064-0.075 0.090-0.116 0.203-0.116 0.32v7.865c0 0.276 0.224 0.5 0.5 0.5 0.117 0 0.23-0.041 0.32-0.116l4.719-3.932c0.212-0.177 0.241-0.492 0.064-0.704-0.019-0.023-0.041-0.045-0.064-0.064z"},null,-1)])])}const WS={name:"components-icon-caret-right",render:GS},YS={class:"header-nav-wrap"},XS={key:0,class:"right-icon"},KS=["onMouseenter","onMouseleave"],QS=["id"],ZS={class:"nav-text"},JS=["id","onClick"],eE={class:"nav-text"},tE={key:1,class:"right-icon"},iE=t.defineComponent({__name:"HeaderNav",props:{navData:{},activeIndex:{},hoverId:{}},emits:["handle-mouseenter","handle-mouseleave","handle-click"],setup(r,{emit:e}){const i=e,{isDark:n}=It.useTheme(),s=r,a=t.ref(),o=t.ref(),l=t.ref(null),c=t.ref(!1),d=t.ref(!1),m=t.ref(),g=fi.useDebounceFn((H,U)=>{m.value=H==null?void 0:H.id,U==="mouseenter"&&i("handle-mouseenter",H),U==="mouseleave"&&(m.value="",i("handle-mouseleave",H))},100),S=H=>{i("handle-click",H)},T=()=>{d.value=!0,t.nextTick(()=>{a.value.scrollTo({left:a.value.clientWidth,behavior:"smooth"})})},b=()=>{a.value.scrollTo({left:0,behavior:"smooth"}),d.value=!1},y=()=>{var H,U;((H=a.value)==null?void 0:H.clientWidth)<((U=o.value)==null?void 0:U.clientWidth)?c.value=!0:c.value=!1};let x=0,N=0;const I=()=>N=0,D=H=>N>0?void N++:(N++,x=Date.now(),{event:"hover",properties:{module:"navigation",level1:H,target:H}}),z=H=>({properties:{module:"navigation",level1:H.label,target:H.label,steps:N,url:H.href,duration:Date.now()-x}});return t.onMounted(()=>{window.addEventListener("resize",y),t.nextTick(()=>{y(),l.value=setTimeout(()=>{y()},1e3)})}),t.onUnmounted(()=>{window.removeEventListener("resize",y),clearTimeout(l.value)}),(H,U)=>{const B=t.resolveDirective("analytics");return t.openBlock(),t.createElementBlock("div",YS,[t.createElementVNode("div",{class:t.normalizeClass(["header-nav",{"header-nav-scroll":d.value}])},[d.value?(t.openBlock(),t.createElementBlock("div",XS,[t.createVNode(t.unref(A.OIcon),{onClick:b},{default:t.withCtx(()=>[t.createVNode(t.unref(qS))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"navRef",ref:a,class:t.normalizeClass(["o-nav",{"o-nav-scroll":d.value||!c.value,dark:t.unref(n)}])},[t.createElementVNode("ul",{ref_key:"navListRef",ref:o,class:"o-nav-list",onMouseenter:I},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.navData,(G,C)=>{var k;return t.withDirectives((t.openBlock(),t.createElementBlock("li",{key:G.id,class:t.normalizeClass({"is-selected":m.value===G.id||s.hoverId===G.id,"is-active":s.activeIndex===C}),onMouseenter:O=>t.unref(g)(G,"mouseenter"),onMouseleave:O=>t.unref(g)(G,"mouseleave")},[(k=G==null?void 0:G.children)!=null&&k.length?(t.openBlock(),t.createElementBlock("div",{key:0,id:"tour_headerNav_"+G.id,class:"nav-item"},[t.createElementVNode("span",ZS,t.toDisplayString(G.label),1)],8,QS)):(t.openBlock(),t.createElementBlock("div",{key:1,id:"tour_headerNav_"+G.id,class:"nav-item item-other",onClick:O=>S(G)},[t.createElementVNode("span",eE,t.toDisplayString(G.label),1),G.tag?(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:0,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(G.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,JS))],42,KS)),[[B,D(G.label),"mouseenter"],[B,z(G),void 0,{catchBubble:!0}]])}),128))],544)],2),c.value&&!d.value?(t.openBlock(),t.createElementBlock("div",tE,[t.createVNode(t.unref(A.OIcon),{onClick:T},{default:t.withCtx(()=>[t.createVNode(t.unref(WS))]),_:1})])):t.createCommentVNode("",!0)],2)])}}}),nE=$e._export_sfc(iE,[["__scopeId","data-v-fe042238"]]),rE={class:"nav-sub-content"},sE={class:"content-left"},aE={class:"content-label"},oE={class:"content-container"},lE=["href","target"],uE={class:"item-name"},cE={key:0,class:"desc-container"},dE=["title"],hE={key:0,class:"split-line"},fE={key:1,class:"content-right"},pE={class:"content-label"},mE=["href","target"],gE=["href","target"],vE=["src"],yE={class:"review-content"},_E={class:"review-label"},TE={class:"review-property"},bE=t.defineComponent({__name:"HeaderContent",props:{itemData:{},itemVisible:{type:Boolean},community:{},bgLeft:{},bgRight:{},hoverIndex:{}},emits:["handle-mouseenter-sub","handle-mouseleave-sub"],setup(r,{emit:e}){const i=e,n=r,{locale:s}=It.useLocale(),{theme:a}=It.useTheme(),o=t.ref(!1),l=()=>{var T;i("handle-mouseenter-sub",(T=n.itemData)==null?void 0:T.id),o.value=!0},c=()=>{i("handle-mouseenter-sub",""),o.value=!1},d=t.ref(!1),m=T=>{if(!T||!T.target)return;const b=T.target;d.value=b.clientHeight<b.scrollHeight},g=(T,b)=>({properties:{module:"navigation",level1:T.label,level2:b.label,target:b.label,url:T.href}}),S=T=>({properties:{module:"navigation",level1:s.value==="zh"?"快捷链接":"Quick Link",level2:T.label,target:T.label,url:T.href}});return(T,b)=>{var x,N,I;const y=t.resolveDirective("analytics");return t.openBlock(),t.createElementBlock("div",{onMouseenter:l,onMouseleave:c},[(n.itemVisible||o.value)&&((N=(x=n.itemData)==null?void 0:x.children)!=null&&N.length)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["nav-content",[(I=n.community)==null?void 0:I.toLowerCase(),n.hoverIndex,t.unref(a),`${n.hoverIndex}-${t.unref(s)}`]])},[t.createElementVNode("div",{class:"nav-background-left",style:t.normalizeStyle({backgroundImage:`url(${n.bgLeft})`})},null,4),t.createElementVNode("div",{class:"nav-background-right",style:t.normalizeStyle({backgroundImage:`url(${n.bgRight})`})},null,4),t.createVNode(gn,null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OScroller),{class:"nav-scroller","show-type":"always",size:"small","disabled-y":""},{default:t.withCtx(()=>{var D,z,H,U,B,G,C,k;return[t.createElementVNode("div",rE,[t.createElementVNode("div",sE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList((D=n.itemData)==null?void 0:D.children,(O,j)=>(t.openBlock(),t.createElementBlock("div",{class:"item-sub",key:j},[t.createElementVNode("span",aE,t.toDisplayString(O.label),1),t.createElementVNode("div",oE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(O.children,L=>(t.openBlock(),t.createElementBlock("div",{key:L.label,class:"content-item"},[t.withDirectives((t.openBlock(),t.createElementBlock("a",{href:L.href,target:(L==null?void 0:L.target)||"_self",rel:"noopener noreferrer",class:"item-label"},[t.createElementVNode("span",uE,t.toDisplayString(L.label),1),L.icon?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(L.icon)))]),_:2},1024)):t.createCommentVNode("",!0),L.tag?(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(L.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,lE)),[[y,()=>g(O,L)]]),L.description?(t.openBlock(),t.createElementBlock("div",cE,[t.createElementVNode("p",{class:"item-desc",title:d.value?L.description:void 0,onMouseenter:b[0]||(b[0]=V=>m(V))},t.toDisplayString(L.description),41,dE)])):t.createCommentVNode("",!0)]))),128))])]))),128))]),(H=(z=n.itemData)==null?void 0:z.shortcut)!=null&&H.length?(t.openBlock(),t.createElementBlock("div",hE)):t.createCommentVNode("",!0),(B=(U=n.itemData)==null?void 0:U.shortcut)!=null&&B.length?(t.openBlock(),t.createElementBlock("div",fE,[t.createElementVNode("span",pE,t.toDisplayString(t.unref(s)==="zh"?"快捷链接":"Quick Link"),1),(G=n.itemData)!=null&&G.withPicture?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList((k=n.itemData)==null?void 0:k.shortcut,O=>t.withDirectives((t.openBlock(),t.createElementBlock("a",{key:O.label,href:O.href,target:(O==null?void 0:O.target)||"_self",rel:"noopener noreferrer",class:"review"},[t.createElementVNode("img",{src:O.picture,class:"review-picture"},null,8,vE),t.createElementVNode("div",yE,[t.createElementVNode("p",_E,t.toDisplayString(O.label),1),t.createElementVNode("div",TE,t.toDisplayString(O.remark),1)])],8,gE)),[[y,()=>S(O)]])),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList((C=n.itemData)==null?void 0:C.shortcut,O=>(t.openBlock(),t.createElementBlock("div",{key:O.label,class:"shortcut"},[t.withDirectives((t.openBlock(),t.createElementBlock("a",{href:O.href,target:(O==null?void 0:O.target)||"_self",rel:"noopener noreferrer",class:"shortcut-link"},[t.createElementVNode("span",null,t.toDisplayString(O.label),1),O.icon?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(O.icon)))]),_:2},1024)):t.createCommentVNode("",!0)],8,mE)),[[y,()=>S(O)]])]))),128))])):t.createCommentVNode("",!0)])]}),_:1})]),_:1})],2)):t.createCommentVNode("",!0)],32)}}}),CE=$e._export_sfc(bE,[["__scopeId","data-v-a2219e83"]]),xE={class:"header"},SE=["src"],EE={class:"header-nav"},kE={key:0,class:"header-toolbar"},wE={class:"header-nav-content"},DE=t.defineComponent({__name:"OHeader",props:{logo:{},community:{},navData:{},bgLeft:{},bgRight:{},activeIndex:{},codeData:{},langData:{},isSimpleHeader:{type:Boolean},headerTitle:{}},emits:["go-home","handle-click"],setup(r,{emit:e}){const{isDark:i}=It.useTheme(),n=e,s=r,a=t.ref(),o=t.ref(),l=t.ref(),c=t.ref(!1),d=()=>{n("go-home")},m=y=>{var x;l.value=y,a.value=y.id,(x=y==null?void 0:y.children)!=null&&x.length&&(c.value=!0)},g=y=>{c.value=!1},S=y=>{n("handle-click",y)},T=y=>{o.value=y},b=y=>{o.value=y};return(y,x)=>(t.openBlock(),t.createElementBlock("div",xE,[t.createElementVNode("div",{class:t.normalizeClass(["header-wrap",{"header-wrap-dark":t.unref(i)}])},[t.createVNode(gn,{class:"header-content"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:"header-logo",onClick:d},[t.renderSlot(y.$slots,"logo",{},()=>[s.logo?(t.openBlock(),t.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:s.logo},null,8,SE)):t.createCommentVNode("",!0)],!0)]),t.createElementVNode("div",EE,[t.renderSlot(y.$slots,"nav",{},()=>[s.navData?(t.openBlock(),t.createBlock(nE,{key:0,"nav-data":s.navData,hoverId:o.value,"active-index":s.activeIndex,onHandleMouseenter:m,onHandleMouseleave:g,onHandleClick:S},null,8,["nav-data","hoverId","active-index"])):t.createCommentVNode("",!0)],!0)]),y.$slots.toolbar?(t.openBlock(),t.createElementBlock("div",kE,[t.renderSlot(y.$slots,"toolbar",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3})],2),t.createElementVNode("div",wE,[t.createVNode(CE,{itemData:l.value,"item-visible":c.value,"bg-left":s.bgLeft,"bg-right":s.bgRight,community:s.community,"hover-index":a.value,onHandleMouseenterSub:T,onHandleMouseleaveSub:b},null,8,["itemData","item-visible","bg-left","bg-right","community","hover-index"])])]))}}),sh=$e._export_sfc(DE,[["__scopeId","data-v-486d601a"]]);var dn=(r=>(r.NAV="nav",r.CODE="code",r.LANG="lang",r))(dn||{});const AE={class:"o-nav"},IE={class:"o-nav-list"},NE=["onClick"],OE={class:"nav-aside"},BE={key:0,class:"nav-aside-wrapper"},LE=["value"],PE={class:"content-label"},ME={class:"container-mobile"},RE=["onClick"],VE={class:"item-label"},FE={class:"desc-container"},$E={class:"item-desc"},UE=["onClick"],zE={class:"item-label"},HE={key:1,class:"nav-aside-wrapper"},qE=["onClick"],jE={class:"header-tool"},GE={key:2,class:"other-tool"},WE=t.defineComponent({__name:"HeaderNavMobile",props:{menuShow:{type:Boolean,default:!1},navData:{default:()=>[]},codeData:{default:()=>[]},langData:{default:()=>[]}},emits:["on-click","lang-click","handle-click"],setup(r,{emit:e}){const i=e,n=r,s=t.ref(""),a=t.ref({}),o=(d,m)=>{var g;m===dn.NAV?(g=d==null?void 0:d.children)!=null&&g.length?(s.value=d.id,a.value=d):i("handle-click",d):m===dn.CODE?(s.value=m,a.value=n.codeData.list):m===dn.LANG&&(s.value=m,a.value=n.langData.list)},l=(d,m)=>{window.open(d,m||"_self"),i("on-click")},c=d=>{s.value===dn.CODE?l(d.href,d==null?void 0:d.target):s.value===dn.LANG&&i("lang-click",d)};return t.onMounted(()=>{s.value=n.navData[0].id,a.value=n.navData[0]}),t.watch(()=>n.navData||n.codeData||n.langData,()=>{s.value===dn.CODE?a.value=n.codeData.list:s.value===dn.LANG?a.value=n.langData.list:a.value=n.navData.find(d=>d.id===s.value)},{deep:!0}),(d,m)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["header-nav",{active:r.menuShow}])},[t.createElementVNode("div",AE,[t.createElementVNode("ul",IE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.navData,g=>(t.openBlock(),t.createElementBlock("li",{key:g.id,class:t.normalizeClass({active:s.value===g.id})},[t.createElementVNode("span",{onClick:S=>o(g,"nav")},t.toDisplayString(g.label),9,NE)],2))),128))]),t.createElementVNode("div",OE,[s.value!=="code"&&s.value!=="lang"?(t.openBlock(),t.createElementBlock("ul",BE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value.children,g=>(t.openBlock(),t.createElementBlock("li",{value:g.label,key:g.label,class:"nav-aside-content"},[g!=null&&g.children?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("p",PE,t.toDisplayString(g.label),1),t.createElementVNode("div",ME,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g==null?void 0:g.children,S=>(t.openBlock(),t.createElementBlock("div",{key:S.label,class:"content-container-mobile"},[t.createElementVNode("a",{onClick:T=>l(S.href,S==null?void 0:S.target),rel:"noopener noreferrer",class:"content-subtitle"},[t.createElementVNode("span",VE,t.toDisplayString(S.label),1),S.icon?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(S.icon),{class:"icon"}))]),_:2},1024)):t.createCommentVNode("",!0),S.tag?(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(S.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,RE),t.createElementVNode("div",FE,[t.createElementVNode("p",$E,t.toDisplayString(S.description),1)])]))),128))])],64)):(t.openBlock(),t.createElementBlock("a",{key:1,onClick:S=>l(g.href,g==null?void 0:g.target),rel:"noopener noreferrer",class:"content-subtitle item-not-children"},[t.createElementVNode("span",zE,t.toDisplayString(g.label),1),g.icon?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(g.icon),{class:"icon"}))]),_:2},1024)):t.createCommentVNode("",!0),g.tag?(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,UE))],8,LE))),128))])):(t.openBlock(),t.createElementBlock("div",HE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,g=>(t.openBlock(),t.createElementBlock("a",{key:g.label,onClick:S=>c(g),class:"source-code-item"},[t.createElementVNode("span",null,t.toDisplayString(g.label),1),g.icon?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(g.icon),{class:"icon"}))]),_:2},1024)):t.createCommentVNode("",!0)],8,qE))),128))]))])]),t.createElementVNode("div",jE,[r.codeData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["header-tool-item",{active:s.value==="code"}]),onClick:m[0]||(m[0]=g=>o(null,"code"))},t.toDisplayString(r.codeData.label),3)):t.createCommentVNode("",!0),r.langData?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["header-tool-item",{active:s.value==="lang"}]),onClick:m[1]||(m[1]=g=>o(null,"lang"))},t.toDisplayString(r.langData.label),3)):t.createCommentVNode("",!0),d.$slots.tool?(t.openBlock(),t.createElementBlock("div",GE,[t.renderSlot(d.$slots,"tool",{},void 0,!0)])):t.createCommentVNode("",!0)])],2))}}),YE=$e._export_sfc(WE,[["__scopeId","data-v-7aa3e2e5"]]),XE={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function KE(r,e){return t.openBlock(),t.createElementBlock("svg",XE,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M3.8 5h16.4c0.442 0 0.8 0.359 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.358-0.8-0.8s0.358-0.8 0.8-0.8zM3.8 11h16.4c0.442 0 0.8 0.359 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.358-0.8-0.8s0.358-0.8 0.8-0.8zM3.8 17h16.4c0.442 0 0.8 0.358 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.359-0.8-0.8s0.358-0.8 0.8-0.8z"},null,-1)])])}const QE={name:"components-icon-header-menu",render:KE},ZE={class:"header"},JE={class:"header-box"},e7={key:0,class:"header-simple"},t7={class:"simple-header-left"},i7={key:0,class:"header-title"},n7={key:0,class:"simple-header-right"},r7={class:"header-left"},s7={class:"header-center"},a7=["src"],o7={class:"header-right"},l7=t.defineComponent({__name:"OHeaderMobile",props:{logo:{},community:{},navData:{},bgLeft:{},bgRight:{},activeIndex:{},codeData:{},langData:{},isSimpleHeader:{type:Boolean},headerTitle:{}},emits:["go-back","lang-click","go-home"],setup(r,{emit:e}){const i=e,n=r,s=()=>{i("go-back")},a=()=>{i("go-home")},o=t.ref(!1),l=()=>{setTimeout(()=>{o.value=!o.value},200)},c=()=>{l()},d=()=>{l()},m=g=>{i("lang-click",g),l()};return(g,S)=>(t.openBlock(),t.createElementBlock("div",ZE,[t.createElementVNode("div",JE,[t.createVNode(gn,{class:"header-wrap"},{default:t.withCtx(()=>[r.isSimpleHeader?(t.openBlock(),t.createElementBlock("div",e7,[t.createElementVNode("div",t7,[t.createVNode(t.unref(A.OIcon),{onClick:s},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconArrowLeft))]),_:1}),r.headerTitle?(t.openBlock(),t.createElementBlock("div",i7,t.toDisplayString(r.headerTitle),1)):t.createCommentVNode("",!0)]),g.$slots.rightConfig?(t.openBlock(),t.createElementBlock("div",n7,[t.renderSlot(g.$slots,"rightConfig",{},void 0,!0)])):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",r7,[t.createVNode(t.unref(A.OIcon),{onClick:l},{default:t.withCtx(()=>[o.value?(t.openBlock(),t.createBlock(t.unref(wl),{key:1})):(t.openBlock(),t.createBlock(t.unref(QE),{key:0}))]),_:1})]),t.createElementVNode("div",s7,[t.createElementVNode("div",{class:"header-logo",onClick:a},[t.renderSlot(g.$slots,"logo",{},()=>[n.logo?(t.openBlock(),t.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:n.logo},null,8,a7)):t.createCommentVNode("",!0)],!0)])]),t.createElementVNode("div",o7,[t.renderSlot(g.$slots,"toolbar",{},void 0,!0)])],64))]),_:3})]),t.createElementVNode("div",{class:t.normalizeClass(["header-content-mb",{"header-content-active":o.value}])},[t.createVNode(YE,{ref:"mobileNav","nav-data":r.navData,"code-data":r.codeData,"lang-data":r.langData,"menu-show":o.value,onHandleClick:d,onOnClick:c,onLangClick:m},{tool:t.withCtx(()=>[t.renderSlot(g.$slots,"tool",{},void 0,!0)]),_:3},8,["nav-data","code-data","lang-data","menu-show"])],2)]))}}),ah=$e._export_sfc(l7,[["__scopeId","data-v-1d6060f9"]]),u7=Object.assign(sh,{install(r){r.component("OHeader",sh)}}),c7=Object.assign(ah,{install(r){r.component("OHeaderMobile",ah)}}),d7={class:"o-search-input-box"},h7={key:0,class:"o-search-input-dropdown"},f7={key:0,class:"o-search-input-suggest-list-row"},p7={class:"o-search-input-suggest-list-label"},m7={class:"o-search-input-suggest-list"},g7=["onClick"],v7=["innerHTML"],y7={key:1},_7=t.defineComponent({__name:"OSearchInput",props:{modelValue:{default:""},imageUrl:{default:""},size:{default:"large"},placeholder:{},imagePlaceholder:{},enableImageSearch:{type:Boolean,default:!1},uploadImage:{},maxImageSize:{default:10*1024*1024},imageUploadTooltip:{},suggestItems:{default:()=>[]},onestepItems:{default:()=>[]},suggestTitle:{},onestepTitle:{},noDataText:{},showSuggestEmpty:{type:Boolean,default:!0},highlightKeyword:{type:Boolean,default:!0},debounce:{default:300},enableHistory:{type:Boolean,default:!0},historyItems:{default:()=>[]},maxHistoryCount:{default:6},storeHistory:{type:Boolean,default:!1},storageKey:{default:"search-history"},historyTitle:{},autoSaveHistory:{type:Boolean,default:!0},suggestList:{default:()=>[]},suggestListLabel:{},allowHtmlInSuggest:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},closeOnSearch:{type:Boolean,default:!0},closeOnClickOutside:{type:Boolean,default:!0},openOnFocus:{type:Boolean,default:!0},alwaysInlineThumbnail:{type:Boolean}},emits:["update:modelValue","update:imageUrl","update:historyItems","focus","blur","input","clear","search","recommend-click","onestep-click","history-click","suggest-list-click","delete-history","delete-history-item","image-upload-start","image-upload-success","image-upload-error","image-validate-error"],setup(r,{expose:e,emit:i}){const n=r,s=i,{t:a}=$e.useI18n(),o=t.ref(),l=t.ref(null),c=t.computed({get:()=>n.modelValue,set:R=>s("update:modelValue",R)}),d=t.ref(!1),m=t.ref(!1),g=t.ref(!1),S=t.ref(!1),T=t.computed(()=>{if(!d.value||n.imageUrl||S.value)return!1;const R=!!c.value&&(n.suggestItems.length>0||n.onestepItems.length>0||n.showSuggestEmpty),ee=n.enableHistory&&I.items.value.length>0&&!c.value;return!!(R||n.openOnFocus&&ee)}),b=t.toRef(n,"historyItems"),y=t.toRef(n,"storageKey"),x=t.toRef(n,"storeHistory"),N=t.toRef(n,"maxHistoryCount"),I=ph({initial:b,storageKey:y,storeHistory:x,maxHistoryCount:N,onChange:R=>s("update:historyItems",R)}),D=fi.useDebounceFn(R=>{s("input",R)},()=>n.debounce);t.watch(c,R=>{D(R)}),fi.onClickOutside(l,()=>{n.closeOnClickOutside&&(m.value||g.value||(d.value=!1))});const z=()=>{d.value=!0,s("focus")},H=()=>{s("blur")},U=async()=>{var ue,J,oe,Z,se,_e;(J=(ue=o.value)==null?void 0:ue.getIsUploading)!=null&&J.call(ue)&&await((Z=(oe=o.value).awaitUpload)==null?void 0:Z.call(oe));const R=c.value.trim(),ee=((_e=(se=o.value)==null?void 0:se.getUploadedUrl)==null?void 0:_e.call(se))||n.imageUrl;!R&&!ee||(n.autoSaveHistory&&R&&I.push(R),n.closeOnSearch&&(d.value=!1),s("search",{keyword:R,imageUrl:ee||void 0}))},B=()=>{c.value="",s("clear")},G=R=>{s("recommend-click",R),c.value=R.key,U()},C=R=>{if(s("onestep-click",R),R.path){const ee=R.path;typeof window<"u"&&window.open(ee,"_blank","noopener,noreferrer")}},k=R=>{s("history-click",R),c.value=R,U()},O=R=>{I.remove(R),s("delete-history-item",R)},j=()=>{const R=[...I.items.value];I.clearAll(),s("delete-history",R)},L=R=>{const ee=n.allowHtmlInSuggest?R.replace(/<[^>]+>/g,""):R;s("suggest-list-click",ee),c.value=ee,U()},V=R=>{m.value=R,R||(g.value=!0,setTimeout(()=>{g.value=!1},100))},M=t.computed(()=>!!n.imageUrl&&(n.alwaysInlineThumbnail||!d.value)),q=R=>{S.value=!0,s("image-upload-start",R)},$=(R,ee)=>{S.value=!1,s("image-upload-success",R,ee)},X=()=>{S.value=!1,s("update:imageUrl","")};return e({focus:()=>{var R,ee;return(ee=(R=o.value)==null?void 0:R.focus)==null?void 0:ee.call(R)},blur:()=>{var R,ee;return(ee=(R=o.value)==null?void 0:R.blur)==null?void 0:ee.call(R)},search:U,saveHistory:R=>I.push(R??c.value)}),(R,ee)=>{var ue;return t.openBlock(),t.createElementBlock("div",{ref_key:"wrapperRef",ref:l,class:t.normalizeClass(["o-search-input",{"is-focus":d.value}])},[t.createElementVNode("div",d7,[t.createVNode(hh,{ref_key:"inputRef",ref:o,modelValue:c.value,"onUpdate:modelValue":ee[0]||(ee[0]=J=>c.value=J),"image-url":r.imageUrl,placeholder:r.placeholder,"image-placeholder":r.imagePlaceholder,size:r.size,"enable-image-search":r.enableImageSearch,"upload-image":r.uploadImage,"max-image-size":r.maxImageSize,"image-upload-tooltip":r.imageUploadTooltip,expanded:d.value&&!n.alwaysInlineThumbnail,"inline-thumbnail":M.value,clearable:r.clearable,class:"o-search-input-field","onUpdate:imageUrl":ee[1]||(ee[1]=J=>s("update:imageUrl",J)),onFocus:z,onBlur:H,onEnter:U,onClear:B,onImageClear:X,onImageUploadStart:q,onImageUploadSuccess:$,onImageUploadError:ee[2]||(ee[2]=(J,oe)=>s("image-upload-error",J,oe)),onImageValidateError:ee[3]||(ee[3]=(J,oe)=>s("image-validate-error",J,oe)),onPreviewChange:V},t.createSlots({prefix:t.withCtx(()=>[t.renderSlot(R.$slots,"input-prefix",{},void 0,!0)]),suffix:t.withCtx(J=>[t.renderSlot(R.$slots,"input-suffix",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),_:2},[R.$slots["image-preview"]?{name:"preview",fn:t.withCtx(J=>[t.renderSlot(R.$slots,"image-preview",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","image-url","placeholder","image-placeholder","size","enable-image-search","upload-image","max-image-size","image-upload-tooltip","expanded","inline-thumbnail","clearable"]),t.createVNode(t.Transition,{name:"o-search-input-dropdown"},{default:t.withCtx(()=>[T.value?(t.openBlock(),t.createElementBlock("div",h7,[t.renderSlot(R.$slots,"dropdown",{keyword:r.modelValue},()=>[t.createVNode(fh,{keyword:r.modelValue,"onestep-items":r.onestepItems,"onestep-title":r.onestepTitle,"suggest-items":r.suggestItems,"suggest-title":r.suggestTitle,"history-items":r.enableHistory?t.unref(I).items.value:[],"history-title":r.historyTitle,"no-data-text":r.noDataText,"highlight-keyword":r.highlightKeyword,"hide-on-keyword":!0,"show-suggest-empty":r.showSuggestEmpty,"history-layout":"list",onOnestepClick:C,onSuggestClick:G,onHistoryClick:k,onHistoryRemove:O,onHistoryClear:j},t.createSlots({_:2},[R.$slots["onestep-header"]?{name:"onestep-header",fn:t.withCtx(J=>[t.renderSlot(R.$slots,"onestep-header",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),key:"0"}:void 0,R.$slots["onestep-content"]?{name:"onestep-content",fn:t.withCtx(J=>[t.renderSlot(R.$slots,"onestep-content",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),key:"1"}:void 0,R.$slots["suggest-header"]?{name:"suggest-header",fn:t.withCtx(J=>[t.renderSlot(R.$slots,"suggest-header",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),key:"2"}:void 0,R.$slots["suggest-content"]?{name:"suggest-content",fn:t.withCtx(J=>[t.renderSlot(R.$slots,"suggest-content",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),key:"3"}:void 0,R.$slots["history-header"]?{name:"history-header",fn:t.withCtx(J=>[t.renderSlot(R.$slots,"history-header",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),key:"4"}:void 0,R.$slots["history-content"]?{name:"history-content",fn:t.withCtx(J=>[t.renderSlot(R.$slots,"history-content",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),key:"5"}:void 0]),1032,["keyword","onestep-items","onestep-title","suggest-items","suggest-title","history-items","history-title","no-data-text","highlight-keyword","show-suggest-empty"])],!0)])):t.createCommentVNode("",!0)]),_:3})]),(ue=r.suggestList)!=null&&ue.length?(t.openBlock(),t.createElementBlock("div",f7,[t.renderSlot(R.$slots,"suggest-list",{items:r.suggestList},()=>[t.createElementVNode("span",p7,t.toDisplayString(r.suggestListLabel??t.unref(a)("search.suggestListLabel")),1),t.createElementVNode("ul",m7,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.suggestList,(J,oe)=>(t.openBlock(),t.createElementBlock("li",{key:J+oe,class:"o-search-input-suggest-list-item",onClick:Z=>L(J)},[r.allowHtmlInSuggest?(t.openBlock(),t.createElementBlock("span",{key:0,innerHTML:J},null,8,v7)):(t.openBlock(),t.createElementBlock("span",y7,t.toDisplayString(J),1))],8,g7))),128))])],!0)])):t.createCommentVNode("",!0)],2)}}}),oh=$e._export_sfc(_7,[["__scopeId","data-v-0652930f"]]),T7=Object.assign(oh,{install(r){r.component("OSearchInput",oh)}}),b7={OBanner:lh,OCookieNotice:uh,OFooter:ch,OHeaderSearch:mh,OHeaderUser:gh,OPlusConfigProvider:vh,OSection:yh,OSourceCode:_h,OThemeSwitcher:Th},C7={install:r=>{Object.entries(b7).forEach(([e,i])=>{r.component(e,i)})}};exports.OElCookieNotice=$e.OElCookieNotice;exports.CalendarDataType=Be;exports.EventsStatusT=Zi;exports.MeetingGroupType=vi;exports.OActivityApproval=B5;exports.OActivityForm=O5;exports.OBanner=lh;exports.OCookieNotice=uh;exports.OEventsApply=US;exports.OEventsCalendar=FS;exports.OEventsList=$S;exports.OFooter=ch;exports.OHeader=u7;exports.OHeaderMobile=c7;exports.OHeaderSearch=mh;exports.OHeaderUser=gh;exports.OMeetingCalendar=qx;exports.OMeetingForm=jx;exports.OMeetingPlayback=Gx;exports.OMyActivityCalendar=L5;exports.OMyMeetingCalendar=Yx;exports.OPlusConfigProvider=vh;exports.OSearchInput=T7;exports.OSection=yh;exports.OSigMeetingCalendar=Wx;exports.OSourceCode=_h;exports.OThemeSwitcher=Th;exports.default=C7;
224
+ `),U=H.length,B=I.endTime-I.startTime,G=parseFloat((B/U).toFixed(3));let C=0;if(x){const j=(N.currentTime()-I.startTime)/(I.endTime-I.startTime);for(;(C+1)/U<j;)C++}C<U?I.text=H.length?H[C]:I==null?void 0:I.text:I.text=H.length?H[0]:I==null?void 0:I.text;let k=G*1e3;const O=()=>{s.value=setInterval(()=>{y.mode="hidden",C++,C>H.length-1?clearInterval(s.value):C===H.length-1?(I.text=H[C],clearInterval(s.value),k=G*(U-C)*1e3,O()):I.text=H[C],y.mode="showing"},k)};O()}},g=t.ref([]);t.watch(()=>g.value,y=>{const x=n.instance;if(x){const N=x.textTracks();for(let I=0;I<N.length;I++)N[I].kind==="subtitles"&&(m(N[I],!0),N[I].mode=y.length?"showing":"hidden")}},{deep:!0});const S=t.ref(!1),T=t.ref("init"),b=async()=>{if(!n.src)return;const y=ae("playerId",{controls:!0,autoplay:!1,preload:"auto",fluid:!0,poster:n.poster||zC,playbackRates:[.5,.75,1,1.25,1.5,2],controlBar:{skipButtons:{backward:5,forward:5},children:{playToggle:!0,SkipBackward:{backward:5},skipForward:{forward:5},currentTimeDisplay:!0,timeDivider:!0,durationDisplay:!0,progressControl:!0,PlaybackRateMenuButton:!0,volumePanel:{inline:!1},FullscreenToggle:!0}}});l("getInstance",y),y.src(n.src),y.addRemoteTextTrack({kind:"subtitles",src:n.vtt,srclang:"zh",label:"中文",default:!1}),S.value=!0;class x extends ae.getComponent("Button"){constructor(D,z){super(D,z),this.addClass("vjs-subtitle-toggle-button","vjs-subtitle-hidden"),this.controlText("Toggle Subtitles")}buildCSSClass(){return`vjs-subtitle-toggle-button ${super.buildCSSClass()}`}handleClick(){const D=this.player().textTracks();for(let z=0;z<D.length;z++)D[z].kind==="subtitles"&&(m(D[z],!0),D[z].mode=D[z].mode==="showing"?"hidden":"showing",D[z].mode==="showing"?(this.removeClass("vjs-subtitle-hidden"),this.addClass("vjs-subtitle-showing")):(this.removeClass("vjs-subtitle-showing"),this.addClass("vjs-subtitle-hidden")))}}n.vtt&&(ae.registerComponent("SubtitleToggleButton",x),y.controlBar.children_.some(I=>I.name_==="SubtitleToggleButton")||y.controlBar.addChild("SubtitleToggleButton",{},8)),(y==null?void 0:y.textTracks().tracks_).forEach(I=>{I==null||I.addEventListener("cuechange",()=>{m(I)})}),y.on("play",()=>{T.value="playing"}),y.on("timeupdate",()=>{const I=y.currentTime()||0,D=n.captions.findIndex(z=>Jo(z.start_time)>I);l("setTrackIdx",D)}),y.one("loadedmetadata",()=>{l("getDuration",y.duration())}),t.nextTick(()=>{const I=document.getElementsByClassName("o-meeting-playback-video")[0];a.value=I.offsetHeight}),o.value=y};return t.onMounted(()=>{b(),document.addEventListener("click",d)}),t.watch(()=>n.src,()=>{b()}),t.onUnmounted(()=>{var y;(y=n==null?void 0:n.instance)==null||y.dispose(),document.removeEventListener("click",d)}),e({changeTime:y=>{var x;(x=o.value)==null||x.currentTime(y)}}),(y,x)=>(t.openBlock(),t.createElementBlock("div",HC,[t.createElementVNode("div",{class:t.normalizeClass(["video-placeholder",{loaded:S.value,"no-poster":!r.poster,[T.value]:!0}])},[x[0]||(x[0]=t.createElementVNode("video",{class:"video-js",id:"playerId"},null,-1)),r.posterTitle?(t.openBlock(),t.createElementBlock("div",qC,t.toDisplayString(r.posterTitle),1)):t.createCommentVNode("",!0)],2)]))}}),GC={class:"o-meeting-playback"},WC={class:"video-header"},YC={class:"video-title"},XC={class:"video-content"},KC={class:"info-wrapper"},QC={class:"tab-content"},ZC={key:0,class:"base-info"},JC={class:"info-item"},ex={class:"info-item"},tx={class:"info-item"},ix={class:"info-item"},nx={key:1,class:"subject-list"},rx={class:"subject-title"},sx={key:0,class:"subject-progress"},ax=["data-start","data-end"],Qd=t.defineComponent({__name:"OMeetingPlayback",props:{dates:{default:()=>[]},detail:{default:()=>({})},data:{default:()=>({})}},emits:["change-date"],setup(r,{emit:e}){const i=r,n=e,{t:s}=Ue.useI18n(),a=t.ref(null),o=X=>{a.value=X},l=t.ref(0),c=X=>{l.value=X},d=t.ref([]),m=async X=>{const ee=await(await fetch(X)).json();d.value=(ee.segments||[]).map(ue=>{const J=py(ue.speaker);return{...ue,contentHtml:ue.content,speakerIdx:J,speakerLabel:`${s("meeting.speaker")}${J}`}})},g=t.ref([]),S=X=>yv[X%3],T=t.ref(0),b=X=>{T.value=X},y=t.ref(),x=t.ref(""),N=t.ref([0,0]);function I(X,R){const ee=R.getBoundingClientRect(),J=(X.clientX-ee.left)/ee.width;return N.value[1]=`${R.offsetTop+R.parentElement.offsetTop}px`,N.value[0]=`${J*100}%`,J*T.value}const D=X=>{let R=X;for(;R&&R.className!=="subject-progress";)R=R.parentElement;return R},z=X=>{let R=D(X.target);R&&(x.value=my(I(X,R)))},H=()=>{x.value=""},U=X=>{var ee;let R=D(X.target);R&&((ee=y.value)==null||ee.changeTime(I(X,R)))},B=async X=>{const ee=await(await fetch(X)).json();g.value=(ee||[]).map(ue=>({...ue,startTimeNumber:Jo(ue.startTime),endTimeNumber:Jo(ue.endTime)}))},G=t.ref("info"),C=t.computed(()=>{const X=[{label:s("meeting.baseInfo"),value:"info"}];return g.value.length&&X.push({label:s("meeting.subject"),value:"subject"}),X}),k=()=>{i.data&&(i.data.textJson&&m(i.data.textJson),i.data.topicJson&&B(i.data.topicJson))};t.watchEffect(()=>{k()});const O=X=>{n("change-date",X)},j=t.ref(null),L=t.ref("auto");let V=null,M=null;const q=()=>{j.value&&(L.value=`${j.value.offsetHeight}px`)},$=()=>{cancelAnimationFrame(M),M=requestAnimationFrame(q)};return t.onMounted(()=>{j.value&&(V=new ResizeObserver($),V.observe(j.value),q())}),t.onUnmounted(()=>{cancelAnimationFrame(M),V==null||V.disconnect()}),(X,R)=>{var ee,ue,J,oe,Z;return t.openBlock(),t.createElementBlock("div",GC,[t.createElementVNode("div",{class:"left-card card-wrapper",ref_key:"leftRef",ref:j},[t.createElementVNode("div",WC,[t.createElementVNode("div",YC,t.toDisplayString((ee=r.detail)==null?void 0:ee.topic)+"("+t.toDisplayString((ue=r.detail)==null?void 0:ue.date)+")",1),(J=r.dates)!=null&&J.length?(t.openBlock(),t.createBlock(t.unref(A.OSelect),{key:0,size:"large",clearable:!1,"model-value":(oe=r.detail)==null?void 0:oe.date,placeholder:t.unref(s)("meeting.selectDate"),onChange:O},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.dates,se=>(t.openBlock(),t.createBlock(t.unref(A.OOption),{key:se,value:se,label:se},null,8,["value","label"]))),128))]),_:1},8,["model-value","placeholder"])):t.createCommentVNode("",!0)]),t.createElementVNode("div",XC,[r.data?(t.openBlock(),t.createBlock(jC,{key:0,ref_key:"playerRef",ref:y,src:r.data.video,vtt:r.data.textVtt,poster:r.data.poster,captions:d.value,onGetDuration:b,instance:a.value,onGetInstance:o,trackIdx:l.value,onSetTrackIdx:c},null,8,["src","vtt","poster","captions","instance","trackIdx"])):t.createCommentVNode("",!0)]),t.createElementVNode("div",KC,[t.createVNode(t.unref(A.OTab),{modelValue:G.value,"onUpdate:modelValue":R[0]||(R[0]=se=>G.value=se)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(C.value,se=>(t.openBlock(),t.createBlock(t.unref(A.OTabPane),{key:se.value,value:se.value,label:se.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue"]),t.createElementVNode("div",QC,[G.value===C.value[0].value?(t.openBlock(),t.createElementBlock("div",ZC,[t.createElementVNode("div",JC,[t.createElementVNode("span",null,t.toDisplayString(t.unref(s)("meeting.item1")),1),t.createElementVNode("span",null,t.toDisplayString(r.detail.sponsor),1)]),t.createElementVNode("div",ex,[t.createElementVNode("span",null,t.toDisplayString(t.unref(s)("meeting.item2")),1),t.createElementVNode("span",null,t.toDisplayString(r.detail.groupName),1)]),t.createElementVNode("div",tx,[t.createElementVNode("span",null,t.toDisplayString(t.unref(s)("meeting.item3")),1),t.createElementVNode("span",null,t.toDisplayString(r.detail.date)+"  "+t.toDisplayString(r.detail.start)+"~"+t.toDisplayString(r.detail.end),1)]),t.createElementVNode("div",ix,[t.createElementVNode("span",null,t.toDisplayString(t.unref(s)("meeting.item4")),1),t.createElementVNode("span",null,t.toDisplayString(r.detail.agenda||"-"),1)])])):t.createCommentVNode("",!0),G.value===((Z=C.value[1])==null?void 0:Z.value)?(t.openBlock(),t.createElementBlock("div",nx,[x.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:"mouse-current-time",style:t.normalizeStyle({top:N.value[1],left:N.value[0]})},t.toDisplayString(x.value),5)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,(se,_e)=>(t.openBlock(),t.createElementBlock("div",{class:"subject-item",key:se.title},[t.createElementVNode("div",rx,t.toDisplayString(se.title),1),T.value?(t.openBlock(),t.createElementBlock("div",sx,[t.createElementVNode("div",{class:"subject-progress-item",onClick:U,onMousemove:z,onMouseleave:H,"data-start":se.startTime,"data-end":se.endTime,style:t.normalizeStyle({"--start":(se.startTimeNumber<0?0:se.startTimeNumber)/T.value,"--end":(se.endTimeNumber>T.value?T.value:se.endTimeNumber)/T.value,background:S(_e)})},null,44,ax)])):t.createCommentVNode("",!0)]))),128))])):t.createCommentVNode("",!0)])])],512),t.createElementVNode("div",{class:"right-card card-wrapper",style:t.normalizeStyle({height:L.value})},[t.createVNode(M_,{captions:d.value,trackIdx:l.value,instance:a.value},null,8,["captions","trackIdx","instance"])],4)])}}}),ox={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function lx(r,e){return t.openBlock(),t.createElementBlock("svg",ox,[...e[0]||(e[0]=[t.createElementVNode("path",{d:"M12.032 2.355c1.632 0 3.205 0.404 4.611 1.166 0.34 0.182 0.466 0.609 0.281 0.949s-0.609 0.463-0.949 0.281c-1.201-0.65-2.546-0.996-3.943-0.996-4.585 0-8.3 3.715-8.3 8.297 0 4.588 3.715 8.303 8.3 8.303s8.3-3.715 8.3-8.303c0-2.063-0.753-4.002-2.098-5.514-0.258-0.287-0.231-0.732 0.059-0.984 0.287-0.258 0.729-0.234 0.987 0.053 1.57 1.764 2.452 4.037 2.452 6.445 0 5.361-4.342 9.703-9.7 9.703s-9.7-4.342-9.7-9.703c0-5.355 4.342-9.697 9.7-9.697zM10.866 7.658c0-0.627 0.507-1.131 1.134-1.131s1.134 0.504 1.134 1.131c0 0.627-0.507 1.131-1.134 1.131s-1.134-0.504-1.134-1.131zM12.706 10.002c-0.044-0.346-0.337-0.609-0.691-0.609-0.387 0-0.7 0.311-0.703 0.697l-0.023 6.762 0.006 0.1c0.044 0.34 0.337 0.603 0.691 0.603 0.387 0.006 0.7-0.311 0.703-0.697l0.023-6.762-0.006-0.094z"},null,-1)])])}const ux={name:"components-icon-tips",render:lx},cx={class:"o-sig-meeting-aside"},dx={class:"month"},hx={class:"days"},fx=["onClick"],px={class:"day-d"},mx={class:"day-c"},gx={class:"arrow-wrapper"},qs=1,vx=t.defineComponent({__name:"OSigMeetingAside",props:{data:{},current:{},total:{},active:{},meetingDates:{},eventsDates:{}},emits:["click-date","change-month"],setup(r,{emit:e}){const{getConfig:i}=Fn(),n=r,s=e,a=l=>{s("click-date",l)},o=l=>{n.current+l>=n.total||n.current+l<0||s("change-month",l)};return(l,c)=>(t.openBlock(),t.createElementBlock("div",cx,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.data,(d,m)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:m},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d,g=>(t.openBlock(),t.createElementBlock("div",{key:g.month,class:"month-item"},[t.createElementVNode("div",dx,t.toDisplayString(g.month.replace(/-/g,"/")),1),t.createElementVNode("div",hx,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.days,S=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["day-item",r.active===`${g.month}-${S}`&&"active"]),key:S,onClick:T=>a(`${g.month}-${S}`)},[t.createElementVNode("div",px,t.toDisplayString(S),1),t.createElementVNode("div",mx,[r.meetingDates.includes(`${g.month}-${S}`)?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0,style:t.normalizeStyle({zIndex:t.unref(i)(t.unref(Be).MEETING,"zIndex"),backgroundColor:t.unref(i)(t.unref(Be).MEETING,"color")})},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(i)(t.unref(Be).MEETING,"icon"))))]),_:1},8,["style"])):t.createCommentVNode("",!0),r.eventsDates.includes(`${g.month}-${S}`)?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:1,style:t.normalizeStyle({zIndex:t.unref(i)(t.unref(Be).EVENTS,"zIndex"),backgroundColor:t.unref(i)(t.unref(Be).EVENTS,"color")})},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(i)(t.unref(Be).EVENTS,"icon"))))]),_:1},8,["style"])):t.createCommentVNode("",!0)])],10,fx))),128))])]))),128))],64))),128)),t.createElementVNode("div",gx,[t.createVNode(t.unref(A.OIcon),{onClick:c[0]||(c[0]=d=>o(0-qs)),class:t.normalizeClass(r.current-qs<0&&"disabled")},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconArrowLeft))]),_:1},8,["class"]),t.createVNode(t.unref(A.OIcon),{onClick:c[1]||(c[1]=d=>o(qs)),class:t.normalizeClass(r.current+qs>=r.total&&"disabled")},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconArrowRight))]),_:1},8,["class"])])]))}}),yx={class:"o-sig-meeting-calendar"},_x={key:0,class:"meeting-card-header"},Tx={key:0,class:"header-left"},bx={key:1,class:"date-select"},Cx={class:"meeting-card-content"},Zd=t.defineComponent({__name:"OSigMeetingCalendar",props:{sigName:{},getMeetingListRequest:{},getDateListRequest:{},getEventsListRequest:{},dates:{}},setup(r){const e=r,{t:i,meetingTabs:n}=Fn(),{lePadV:s}=It.useScreen(),a=t.ref(""),o=t.ref(!1),l=t.ref([]),c=t.computed(()=>s.value?100:5),d=t.ref(""),m=t.ref([]),g=t.ref([]),S=t.ref([]),T=t.ref(-1),b=O=>{x(O)},y=O=>{x(O)},x=async O=>{if(e.getMeetingListRequest)try{o.value=!0,a.value=ye(O).format("YYYY-MM-DD");const j=await e.getMeetingListRequest(a.value,e.sigName);l.value=j.map(L=>({...L,time:`${L.start}-${L.end}`,date:L.date||a.value,type:Be.MEETING}))}finally{o.value=!1,S.value.forEach(j=>{var L;(L=j.dates)!=null&&L.includes(a.value)&&l.value.push(j)})}},N=async()=>{e.getDateListRequest&&(m.value=await e.getDateListRequest()),e.getEventsListRequest&&(S.value=await e.getEventsListRequest(),g.value=(S.value||[]).map(O=>O.dates||[]).flat())},I=t.ref(Be.ALL),D=()=>{N()};t.watch(()=>s.value,()=>{s.value&&(I.value=Be.ALL,D())});const z=O=>{const j=ye(O).format("YYYY-MM-DD");return[j.slice(0,7),j.slice(8,10)]},H=t.computed(()=>{let O=[];return I.value===Be.ALL?O=[...m.value||[],...g.value]:I.value===Be.MEETING?O=m.value||[]:O=g.value,[...new Set(O)].sort((j,L)=>ye(j).isAfter(ye(L))?1:-1).map(j=>ye(j).format("YYYY-MM-DD"))}),U=()=>{let O=H.value.find(j=>j===ye().format("YYYY-MM-DD"));O||(O=H.value.find(j=>ye(j).isAfter(ye()))||[...H.value].reverse().find(j=>ye().isAfter(ye(j)))),d.value=O};t.watch(()=>H.value,O=>{O.length&&(U(),t.nextTick(()=>{x(d.value)}))});const B=t.computed(()=>{const O=H.value.reduce((M,q)=>{var R,ee;const[$,X]=z(q);return M[$]={count:(((R=M[$])==null?void 0:R.count)||0)+1,days:[...((ee=M[$])==null?void 0:ee.days)||[],X]},M},{}),j=Object.keys(O).map(M=>({...O[M],month:M})),L=[];let V=[];return j.forEach(M=>{for(;M.days.length;)if(!V.length)M.days.splice(0,6).forEach(q=>{V.push({month:M.month,day:q})}),V.length>=5&&(L.push(V),V=[]);else{let q=V.length;q%2===1&&(q+=1),M.days.length+V.length<=6?(M.days.splice(0,6).forEach($=>{V.push({month:M.month,day:$})}),V.length>=5&&(L.push(V),V=[])):(M.days.splice(0,6-q).forEach($=>{V.push({month:M.month,day:$})}),V.length>=5&&(L.push(V),V=[]))}}),V.length&&(L.push(V),V=[]),L}),G=t.computed(()=>B.value.map(O=>{const j=O.reduce((L,V)=>(L[V.month]=L[V.month]||[],L[V.month].push(V.day),L),{});return Object.keys(j).map(L=>({month:L,days:j[L]||[]}))})),C=()=>{B.value.length?(T.value=B.value.findIndex(O=>O.some(j=>d.value===`${j.month}-${j.day}`)),T.value===-1&&(T.value=B.value.findIndex(O=>O.some(j=>d.value.includes(j.month))))):T.value=-1};t.watch([()=>B.value,()=>d.value],()=>{C()},{deep:!0});const k=O=>{T.value+=O};return t.onMounted(()=>{N()}),(O,j)=>{const L=t.resolveComponent("ElOption"),V=t.resolveComponent("ElSelect");return t.openBlock(),t.createElementBlock("div",yx,[t.unref(s)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",_x,[d.value?(t.openBlock(),t.createElementBlock("div",Tx,[t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("meeting.latestMeeting")),1),t.createElementVNode("span",null,t.toDisplayString(t.unref(ye)(d.value).format("YYYY/MM/DD")),1),t.createVNode(t.unref(A.OPopover),null,{target:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),{class:"tips"},{default:t.withCtx(()=>[t.createVNode(t.unref(ux))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createElementVNode("p",null,t.toDisplayString(t.unref(i)("meeting.detailHalfYearMeetings")),1)])]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OTab),{modelValue:I.value,"onUpdate:modelValue":j[0]||(j[0]=M=>I.value=M),onChange:D,line:!1},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(n).slice(0,-1),M=>(t.openBlock(),t.createBlock(t.unref(A.OTabPane),{key:M.value,value:M.value},{nav:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(M.icon)))]),_:2},1024),t.createTextVNode(" "+t.toDisplayString(M.label),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])),t.unref(s)&&H.value.length?(t.openBlock(),t.createElementBlock("div",bx,[t.createVNode(V,{modelValue:a.value,"onUpdate:modelValue":j[1]||(j[1]=M=>a.value=M),onChange:y},{label:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.latestMeeting"))+" "+t.toDisplayString(a.value),1)]),default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(H.value,M=>(t.openBlock(),t.createBlock(L,{key:M,value:M,label:t.unref(ye)(M).format("YYYY/MM/DD")},null,8,["value","label"]))),128))]),_:1},8,["modelValue"])])):t.createCommentVNode("",!0),!t.unref(s)||t.unref(s)&&H.value.length?(t.openBlock(),t.createBlock(t.unref(A.ODivider),{key:2,class:"meeting-divider"})):t.createCommentVNode("",!0),t.createElementVNode("div",Cx,[!t.unref(s)&&T.value!==-1?(t.openBlock(),t.createBlock(vx,{key:0,data:G.value.slice(T.value,T.value+1),meetingDates:I.value!==t.unref(Be).EVENTS?m.value:[],eventsDates:I.value!==t.unref(Be).MEETING?g.value:[],onClickDate:b,onChangeMonth:k,current:T.value,total:G.value.length,active:a.value},null,8,["data","meetingDates","eventsDates","current","total","active"])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OScroller),{class:"list-content","show-type":"hover",size:"small"},{default:t.withCtx(()=>[t.createVNode(Eh,{list:l.value,rows:c.value},{empty:t.withCtx(()=>[t.renderSlot(O.$slots,"empty")]),_:3},8,["list","rows"])]),_:3})])])}}}),xx={class:"o-my-meeting-calendar"},Sx={class:"meeting-list"},Ex={class:"list-calendar-mb"},kx={class:"list-calendar"},wx=["onClick"],Dx={class:"date-cell-text"},Ax={class:"list-body"},Ix=["id"],Nx={class:"item-header-left"},Ox={class:"meeting-icon"},Bx={class:"header-info"},Lx={key:0},Px={class:"title-wrapper"},Mx={class:"title-text"},Rx={key:1,class:"tag-wrapper"},Vx={class:"meeting-info"},Fx={key:0,class:"item-header-right"},$x={class:"meeting-detail"},Ux={key:0,class:"meeting-btn"},zx={key:0,class:"load-text"},Hx={class:"dialog-content"},Jd=t.defineComponent({__name:"OMyMeetingCalendar",props:{cancelSubMeetingRequest:{},deleteMeetingRequest:{},getMeetingListRequest:{},groupType:{default:vi.SIG}},emits:["edit"],setup(r,{emit:e}){const i=A.useMessage(null),n=t.ref(!1),s=t.ref(1),a=t.ref(50),o=t.ref(null),l=t.ref([]),c=t.ref([]),d=t.computed(()=>o.value===null||c.value.length<o.value),m=t.ref(!1),{t:g,locale:S,getPointStr:T,getWeekFromDate:b}=Fn(),y=t.computed(()=>S.value===Ue.Locales.EN),x=r,N=t.ref(!1),{isPhone:I}=It.useScreen(),D=t.ref([]),z=e,H=t.ref(!1),U=t.ref(!1),B=t.ref(),G=t.ref(0),C=()=>{var ne;G.value=((ne=B.value)==null?void 0:ne.clientHeight)||0},k=async()=>{if(x.getMeetingListRequest&&!H.value)try{if(o.value!==null&&o.value>0&&(s.value-1)*a.value>o.value)return;if(!d.value&&I.value){it("next-month");return}n.value=!0,H.value=!0;const ne=await x.getMeetingListRequest({page:s.value,size:a.value,order_by:"date",order_type:"asc",month:ye(Fe.value).format("YYYY-MM")}),re=(ne.data||[]).map(le=>{var Gi,Ut,Wi;const{is_cycle:Ee,date:pe,start:Ze,end:Je,cycle_sub:$e,cycle_start_date:Nt,cycle_end_date:xt,cycle_start:ui,cycle_end:Ot,cycle_type:St,cycle_interval:ii,cycle_point:$t}=le;if(Ee){let E="",w="";St===mn&&(w=g("meeting.cycleDay")),St===vn&&(ii>1?w=g("meeting.cycleWeek.other",[T(St,$t),ii]):w=g("meeting.cycleWeek.one",[T(St,$t)])),St===tn&&(w=g("meeting.cycleMonth",[T(St,$t)])),E=g("meeting.cycleMeetingText2",{startDate:Nt,endDate:xt,startTime:ui,endTime:Ot,cycleType:w});const Q=((Gi=le.obs_data)==null?void 0:Gi.filter(ce=>ce.text_video_url))||[];return $e.filter(ce=>ye(ce.date).isBefore(ye(Fe.value).add(1,"month").format("YYYY-MM-01"))&&!ye(ce.date).isBefore(ye(Fe.value).format("YYYY-MM-01"))).map(({id:ce,...ge})=>({...le,...ge,timeRange:E,dateRange:`${ge.start}-${ge.end}`,hasObsData:Q.find(Ie=>Ie.sub_id===ge.sub_id),time:`${ge.start}-${ge.end}`,isExpired:ye(`${ge.date} ${ge.start}`).isBefore(ye())}))}return[{...le,dateRange:`${Ze} - ${Je}`,timeRange:`${Ze} - ${Je}`,hasObsData:!!((Wi=(Ut=le.obs_data)==null?void 0:Ut.filter(E=>E.text_video_url))!=null&&Wi.length),time:`${Ze}-${Je}`,isExpired:ye(`${pe} ${Ze}`).isBefore(ye())}]}).flat().filter(le=>le.date.slice(0,7)===ht(Fe.value,"YYYY-MM-DD").slice(0,7));m.value?(c.value=ne.data||[],l.value=re):s.value===1&&!I.value?(c.value=ne.data||[],l.value=re):(c.value=[...c.value,...ne.data||[]],l.value=[...l.value,...re]),l.value.sort((le,Ee)=>le.date===Ee.date?Nn(le.start)>Nn(Ee.start)?1:-1:ye(le.date).isAfter(ye(Ee.date))?1:-1),o.value=(ne==null?void 0:ne.total)||0,t.nextTick(()=>{We(),be.value&&!I.value&&M()})}finally{n.value=!1,H.value=!1,U.value=!1,m.value=!1}},O=fi.useDebounceFn(()=>{d.value&&(I.value||(U.value=!0,s.value++,k()))},200),j=fi.useDebounceFn(()=>{if(!d.value||!I.value)return;const ne=window.scrollY||window.pageYOffset,re=window.innerHeight;document.documentElement.scrollHeight-(ne+re)<=300&&!H.value&&(U.value=!0,s.value++,k())},200),L=ne=>{const re=l.value.filter(le=>le.date===ne);return re.length&&re.every(le=>le.is_delete)},V=ne=>{const re=ne.target;if(!re)return;const le=re.scrollTop,Ee=re.scrollHeight,pe=re.clientHeight;le+pe>=Ee&&O()},M=()=>{be.value.getContainerEl().addEventListener("scroll",V)},q=t.ref({}),$=(ne,re)=>{ne&&re&&(q.value[re]=ne)},X=async ne=>{await q.value[ne].copyInfo(),i.success({content:g("common.copySuccess")})},R=t.ref(!1),ee=t.ref(null),ue=ne=>{z("edit",ne,"whole")},J=ne=>{ee.value=ne,R.value=!0},oe=async()=>{if(x.deleteMeetingRequest&&ee.value)try{N.value=!0,await x.deleteMeetingRequest(ee.value.id),R.value=!1,i.success({content:`${g("meeting.meetingCancel",[ee.value.topic])}`}),m.value=!0,k()}finally{N.value=!1}},Z=t.ref(!1),se=t.ref(""),_e=t.ref(null),ke=[{label:g("meeting.meetingSingle"),value:"single"},{label:g("meeting.meetingCycle"),value:"whole"}],De=t.ref("single"),Ne=(ne,re)=>{ne.is_cycle?(_e.value=ne,se.value=re,Z.value=!0):re==="cancel"?J(ne):ue(ne)},Ve=()=>{Z.value=!1,_e.value=null,se.value="",De.value="single"},et=async()=>{const ne=_e.value;if(ne)if(se.value==="cancel")try{if(N.value=!0,De.value==="single"&&ne.is_cycle){if(!x.cancelSubMeetingRequest)return;await x.cancelSubMeetingRequest(ne.sub_id),i.success({content:`${g("meeting.meetingCancel",[ne.topic])}`})}else{if(!x.deleteMeetingRequest)return;await x.deleteMeetingRequest(ne.id),i.success({content:`${g("meeting.meetingCancel",[ne.topic])}`})}Ve(),m.value=!0,k()}finally{N.value=!1}else z("edit",ne,De.value),Ve()},Re=t.ref(),Ke=t.computed(()=>[...new Set(l.value.map(ne=>ne.date))].sort((ne,re)=>ye(ne).isBefore(ye(re))?-1:1)),He=t.computed(()=>[...new Set(l.value.filter(ne=>!ne.isExpired&&!ne.is_delete).map(ne=>ne.date))].sort((ne,re)=>ye(ne).isBefore(ye(re))?-1:1)),Fe=t.ref(),We=()=>{var le;const ne=He.value.find(Ee=>!ye(Ee).isBefore(ye(new Date).format("YYYY-MM-DD")));ne?Fe.value=ne:Fe.value||(Fe.value=ye().format("YYYY-MM-DD")),(le=Re.value)==null||le.pickDay(ye(Fe.value)),Fe.value=ye(Fe.value).format("YYYY-MM-DD");const re=l.value.find(Ee=>Ee.date===Fe.value&&!Ee.isExpired&&!Ee.is_delete);re&&(D.value=[re.sub_id||re.id])},kt=(ne,re)=>{var le;(!re||!((le=ne.target)!=null&&le.className.includes("date-cell-text")))&&(ne.stopPropagation(),ne.preventDefault())},it=ne=>{Re.value&&(s.value=1,o.value=null,window.scrollTo({top:0,behavior:"smooth"}),Re.value.selectDate(ne),m.value=!0,t.nextTick(()=>{Fe.value=ye(Re.value.selectedDay).format("YYYY-MM-DD"),k()}))},Ae=t.computed(()=>l.value.reduce((ne,re)=>{if(ne.length){const le=ne.at(-1);return(le==null?void 0:le.date)===re.date?le.list.push(re):ne.push({date:re.date,list:[re]}),ne}else return[{date:re.date,list:[re]}]},[])),be=t.ref();t.watch(()=>Fe.value,()=>{me(Fe.value)});const me=ne=>{var Ee,pe,Ze;const re=ye(ne).format("YYYY-MM-DD"),le=document.querySelector(`#group-title-${re}`);le&&(I.value?window.scrollTo({top:(((Ee=le.parentElement)==null?void 0:Ee.offsetTop)||0)-52,behavior:"smooth"}):(Ze=be.value)==null||Ze.scrollTo({top:((pe=le.parentElement)==null?void 0:pe.offsetTop)||0,behavior:"smooth"}))};t.onMounted(()=>{k(),window.addEventListener("scroll",j),window.addEventListener("resize",j),C(),window.addEventListener("resize",C)}),t.onUnmounted(()=>{var re;window.removeEventListener("scroll",j),window.removeEventListener("resize",j),window.removeEventListener("resize",C);const ne=(re=be.value)==null?void 0:re.getContainerEl();ne==null||ne.removeEventListener("scroll",V)});const Pe=ne=>{const re=ye(ne||void 0);return y.value?re.format("MMMM YYYY"):re.format("YYYY MM月")},Xe=t.computed(()=>[{id:"confirm",color:"primary",label:g("common.confirm"),variant:"solid",size:"large",round:"pill",loading:N.value,onClick:()=>{et()}},{id:"cancel",color:"primary",label:g("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{Ve()}}]),vt=t.computed(()=>[{id:"confirm",color:"primary",label:g("common.confirm"),variant:"solid",size:"large",round:"pill",loading:N.value,onClick:()=>{oe()}},{id:"cancel",color:"primary",label:g("common.cancel"),variant:"outline",size:"large",round:"pill",onClick:()=>{R.value=!1}}]);return(ne,re)=>(t.openBlock(),t.createElementBlock("div",xx,[t.createElementVNode("div",Sx,[t.createElementVNode("div",Ex,[t.createElementVNode("span",null,t.toDisplayString(Pe(Fe.value)),1),t.createElementVNode("span",null,[t.createVNode(t.unref(A.OIcon),{onClick:re[0]||(re[0]=le=>it("prev-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronLeft))]),_:1}),t.createVNode(t.unref(A.OIcon),{onClick:re[1]||(re[1]=le=>it("next-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})])]),t.createElementVNode("div",kx,[t.createVNode(t.unref(rt.ElCalendar),{ref_key:"calendarRef",ref:Re,modelValue:Fe.value,"onUpdate:modelValue":re[4]||(re[4]=le=>Fe.value=le)},{header:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(Pe(Fe.value)),1),t.createElementVNode("div",null,[t.createVNode(t.unref(A.OIcon),{onClick:re[2]||(re[2]=le=>it("prev-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronLeft))]),_:1}),t.createVNode(t.unref(A.OIcon),{onClick:re[3]||(re[3]=le=>it("next-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})])]),"date-cell":t.withCtx(({data:le})=>[t.createElementVNode("div",{onClick:Ee=>kt(Ee,Ke.value.includes(le.day)),class:t.normalizeClass({"date-cell":!0,"is-selected":le.isSelected,"is-today":t.unref(ht)(le.day)===t.unref(ht)(),clickable:Ke.value.includes(le.day),expired:t.unref(ye)(t.unref(ht)()).isAfter(t.unref(ye)(le.day)),"all-deleted":L(le.day)})},[t.createElementVNode("div",Dx,t.toDisplayString(Number(le.day.split("-")[2])),1)],10,wx)]),_:1},8,["modelValue"])]),t.createElementVNode("div",{class:t.normalizeClass(["list-wrapper",l.value.length?"":"is-empty"])},[l.value.length?(t.openBlock(),t.createBlock(t.unref(A.OScroller),{key:0,ref_key:"scrollerRef",ref:be,onScrollend:t.unref(O),style:t.normalizeStyle({"--header-height":G.value}),class:"scroller-container","show-type":"hover"},{default:t.withCtx(()=>[t.createElementVNode("div",Ax,[t.createVNode(t.unref(A.OCollapse),{modelValue:D.value,"onUpdate:modelValue":re[7]||(re[7]=le=>D.value=le),accordion:t.unref(I)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Ae.value,(le,Ee)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:le.date},[Ee===0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:re[5]||(re[5]=pe=>it("prev-month"))},[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconArrowLeft))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(g)("meeting.preMonth")),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["group-item",Ee===Ae.value.length-1&&"last-item"])},[t.createElementVNode("div",{class:t.normalizeClass({"group-bar":!0,"is-active":t.unref(ye)(Fe.value).format("YYYY-MM-DD")===le.date,"is-end":le.list.every(pe=>pe.isExpired)})},[...re[11]||(re[11]=[t.createElementVNode("div",{class:"group-bar-line"},null,-1),t.createElementVNode("div",{class:"group-bar-dot"},null,-1)])],2),t.createElementVNode("div",{class:t.normalizeClass({"group-title":!0,"is-end":le.list.every(pe=>pe.isExpired)}),id:`group-title-${t.unref(ye)(new Date(le.date)).format("YYYY-MM-DD")}`},t.toDisplayString(t.unref(ye)(le.date).format("MM/DD"))+" "+t.toDisplayString(t.unref(b)(le.date)),11,Ix),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(le.list,(pe,Ze)=>(t.openBlock(),t.createBlock(t.unref(A.OCollapseItem),{key:pe.sub_id||pe.id,value:pe.sub_id||pe.id,class:t.normalizeClass({"last-item":Ee===Ae.value.length-1&&Ze===le.list.length-1})},{title:t.withCtx(()=>[t.createElementVNode("div",Nx,[t.createElementVNode("div",Ox,[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(Il))]),_:1})]),t.createElementVNode("div",Bx,[t.createElementVNode("div",{class:t.normalizeClass({"meeting-title":!0,"is-delete":pe.is_delete,"is-end":pe.isExpired})},[pe.is_delete?(t.openBlock(),t.createElementBlock("div",Lx,t.toDisplayString(t.unref(g)("meeting.meetingCancelled")),1)):t.createCommentVNode("",!0),t.createElementVNode("div",Px,[t.createElementVNode("div",Mx,t.toDisplayString(pe.topic),1)]),pe.is_cycle?(t.openBlock(),t.createElementBlock("div",Rx,[t.createVNode(t.unref(A.OTag),{color:"primary",variant:"outline"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.cycle")),1)]),_:1})])):t.createCommentVNode("",!0)],2),t.createElementVNode("div",Vx,[t.createElementVNode("span",null,t.toDisplayString(pe.dateRange),1),t.createVNode(t.unref(A.ODivider),{direction:"v"}),t.createElementVNode("span",null,t.toDisplayString(r.groupType===t.unref(vi).GROUP?t.unref(g)("meeting.groups"):t.unref(g)("meeting.sigs"))+": "+t.toDisplayString(pe.group_name),1)])])]),pe.is_delete?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Fx,[pe.isExpired?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[pe.etherpad?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,target:"_blank",href:pe.etherpad},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.meetingSummary"))+" ",1)]),_:1},8,["href"])):t.createCommentVNode("",!0),pe.hasObsData?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:1,target:"_blank",href:`/${t.unref(S)}/video/${pe.group_name}/${pe.mid}/${pe.date}`},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.viewRecord"))+" ",1)]),_:1},8,["href"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,target:"_blank",href:pe.join_url,rel:"noopener noreferrer"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.joinMeeting"))+" ",1)]),_:1},8,["href"]))])),t.createVNode(t.unref(A.OIcon),{onClick:t.withModifiers(()=>X(Ze),["stop"]),class:"copy-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Nl))]),_:1},8,["onClick"])]),default:t.withCtx(()=>[t.createElementVNode("div",$x,[t.createVNode(ts,{show:D.value.includes(pe.sub_id||pe.id),data:pe,ref_for:!0,ref:Je=>$(Je,pe.id),from:"my"},null,8,["show","data"]),!pe.isExpired&&!pe.is_delete?(t.openBlock(),t.createElementBlock("div",Ux,[t.createVNode(t.unref(A.OLink),{onClick:Je=>Ne(pe,"edit")},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.editMeeting")),1)]),_:1},8,["onClick"]),t.createVNode(t.unref(A.OLink),{onClick:Je=>Ne(pe,"cancel")},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.cancelMeeting")),1)]),_:1},8,["onClick"])])):t.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),re[12]||(re[12]=t.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),Ee===Ae.value.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[U.value?(t.openBlock(),t.createElementBlock("div",zx,t.toDisplayString(t.unref(g)("common.loading")),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"list-month-change next-month",onClick:re[6]||(re[6]=pe=>it("next-month"))},[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconArrowRight))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(g)("meeting.nextMonth")),1)])],64)):t.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):n.value?t.createCommentVNode("",!0):t.renderSlot(ne.$slots,"empty",{key:1})],2),t.createVNode(t.unref(A.ODialog),{visible:Z.value,"onUpdate:visible":re[9]||(re[9]=le=>Z.value=le),"main-class":"handle-dialog",onClose:Ve,actions:Xe.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.meetingHandleText",[se.value==="edit"?t.unref(g)("meeting.edit"):t.unref(g)("meeting.cancel2")])),1)]),default:t.withCtx(()=>[t.createVNode(t.unref(A.ORadioGroup),{modelValue:De.value,"onUpdate:modelValue":re[8]||(re[8]=le=>De.value=le)},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(ke,le=>t.createVNode(t.unref(A.ORadio),{value:le.value,key:le.value},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(le.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),_:1},8,["visible","actions"]),t.createVNode(t.unref(A.ODialog),{visible:R.value,"onUpdate:visible":re[10]||(re[10]=le=>R.value=le),"main-class":"cancel-dialog",actions:vt.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(g)("meeting.confirmCancel")),1)]),default:t.withCtx(()=>{var le;return[t.createElementVNode("div",Hx,t.toDisplayString(t.unref(g)("meeting.confirmCancelDesc",[(le=ee.value)==null?void 0:le.topic])),1)]}),_:1},8,["visible","actions"])])]))}}),qx=Object.assign(yc,{install(r){r.component("OMeetingCalendar",yc)}}),jx=Object.assign(bc,{install(r){r.component("OMeetingForm",bc)}}),Gx=Object.assign(Qd,{install(r){r.component("OMeetingPlayback",Qd)}}),Wx=Object.assign(Zd,{install(r){r.component("OSigMeetingCalendar",Zd)}}),Yx=Object.assign(Jd,{install(r){r.component("OMyMeetingCalendar",Jd)}}),Xx={class:"o-activity-table"},Kx={key:0,class:"table-wrapper"},Qx={class:"expand-detail"},Zx={class:"sort-btn"},Jx={class:"activity-btn"},e5={key:0,class:"pagination-wrapper"},t5={key:1,class:"collapse-wrapper"},i5={class:"title-top"},n5={class:"act-title"},r5={class:"act-sponsor"},s5={class:"sponsor"},a5={class:"activity-btn"},o5={class:"activity-detail"},l5={key:0,class:"pagination"},u5={class:"dialog-content"},c5={class:"dialog-content"},eh=t.defineComponent({__name:"OActivityApproval",props:{getTableDataRequest:{},applicantList:{},cancelActivityRequest:{},deleteActivityRequest:{},approveActivityRequest:{},rejectActivityRequest:{},getActivityDetailRequest:{}},setup(r){const{t:e,locale:i}=Ue.useI18n(),n=t.computed(()=>i.value==="zh"),{approvalStatusMap:s,statusMap:a,activityTypeMap:o}=ba(),l=A.useMessage(null),{isPhone:c,lePadV:d}=It.useScreen(),m=r,g=t.reactive({page:1,size:10,status:"",is_delete:0,search:"",sponsor:"",order_by:""}),S=t.ref([]),T=t.computed(()=>m.applicantList.map(Ae=>({value:Ae,label:Ae}))),b=()=>{g.sponsor=S.value.join(",")},y=t.ref("desc"),x=()=>{y.value=y.value==="asc"?"desc":"asc",g.order_by=y.value},N=t.ref(),I=t.computed(()=>{const Ae=[];return s.value.forEach(be=>{Ae.push(be)}),Ae.slice(1)}),D=()=>{g.status=N.value,N.value==="cancel"?g.is_delete=1:g.is_delete=0},z=t.ref([]),H=t.ref(0),U=[10,20,30,40],B=async()=>{const{page:Ae,size:be,status:me,sponsor:Pe,order_by:Xe,search:vt,is_delete:ne}=g;let re={page:Ae,size:be,sponsor:Pe,order_by:Xe,search:vt};if(me!=="all"&&me!==""&&(re.is_delete=ne),me==="cancel"?re.status="":re.status=me,!m.getTableDataRequest)return;const le=await m.getTableDataRequest(re);z.value=(le.data||[]).map(Ee=>{var xt;const{start_date:pe,end_date:Ze,start:Je,end:$e,activity_type:Nt}=Ee;return[{...Ee,time:`${pe}-${$e}`,start_date_time:`${pe} ${Je}`,end_date_time:`${Ze} ${$e}`,type:Be.EVENTS,dateRange:`${pe} ${Je}-${Ze} ${$e}`,activity_type:(xt=o.value.get(Nt))==null?void 0:xt.label}]}).flat(),H.value=le.total},G=Ae=>{Ae.pageSize!==g.size?g.page=1:g.page=Ae.page,g.size=Ae.pageSize,B()},C=t.ref({reason:""}),k=t.ref(),O=t.ref(!1),j=t.ref(null),L=t.ref(""),V=t.ref(0),M=t.ref(!1),q=t.ref({reason:[{required:!0,message:e("meeting.enterReviewNotes")}]}),$=async()=>{var Ae,be,me,Pe;if(!(!m.approveActivityRequest||!m.rejectActivityRequest))try{O.value=!0;const Xe=await((Ae=k.value)==null?void 0:Ae.validate());if(!Xe||Xe.some(vt=>!!vt)){O.value=!1;return}V.value===1?await m.approveActivityRequest((be=j.value)==null?void 0:be.id,C.value):await m.rejectActivityRequest((me=j.value)==null?void 0:me.id,C.value),B(),X(),l.success({content:e("meeting.reviewSuccess",[(Pe=j.value)==null?void 0:Pe.title])})}finally{M.value=!1,O.value=!1}},X=()=>{M.value=!1,ee.value=!1,O.value=!1,C.value.reason=""},R=async()=>{var Ae;if(m.deleteActivityRequest&&m.cancelActivityRequest)try{O.value=!0,oe.value===1?await m.cancelActivityRequest(j.value.id,C.value):await m.deleteActivityRequest(j.value.id,C.value),B(),X(),l.success({content:e("meeting.activityActionSuccess",[(Ae=j.value)==null?void 0:Ae.title,J.value])})}finally{O.value=!1,ee.value=!1}},ee=t.ref(!1),ue=t.ref(""),J=t.ref(""),oe=t.ref(0),Z=Ae=>{ue.value=e("meeting.deleteActivity"),J.value=e("meeting.deleteActivity").toLowerCase(),j.value=Ae,oe.value=0,ee.value=!0},se=Ae=>{ue.value=e("meeting.cancelActivity"),J.value=e("common.cancel").toLowerCase(),j.value=Ae,oe.value=1,ee.value=!0},_e=Ae=>{j.value=Ae,L.value=e("meeting.approveReview"),V.value=1,M.value=!0},ke=Ae=>{j.value=Ae,L.value=e("meeting.rejectReview"),V.value=0,M.value=!0},De=t.ref([]),Ne=t.ref([]),Ve=Ae=>{const be=Ae.toString();if(!m.getActivityDetailRequest)return;De.value.includes(be)||(De.value.push(be),m.getActivityDetailRequest(be).then(Pe=>{var Xe;(Xe=z.value)==null||Xe.forEach(vt=>{vt.id===Pe.id&&(vt.approve_record=Pe.approve_record,vt.approver=Pe.approver)})}));const me=Ne.value.indexOf(be);Ne.value.includes(be)?Ne.value.splice(me,1):Ne.value.push(be)},et=Ae=>{Ve(Ae.id)},Re=Ae=>Ae.id.toString(),Ke=t.ref([]),He=Ae=>{Ae.length&&Ae.forEach(be=>{Ve(be)})},Fe=t.ref({}),We=(Ae,be)=>{Ae&&be&&(Fe.value[be]=Ae)};t.onMounted(()=>{B()}),t.watch(()=>[g.status,g.sponsor,g.order_by,g.search,g.is_delete],()=>{B()},{deep:!0});const kt=t.computed(()=>[{id:"confirm",loading:O.value,color:"primary",variant:d.value?"text":"solid",round:"pill",size:"large",label:e("meeting.confirmBtn"),onClick:()=>{R()}},{id:"cancel",color:"primary",variant:d.value?"text":"outline",round:"pill",size:"large",label:e("meeting.cancelBtn"),onClick:()=>{X()}}]),it=t.computed(()=>[{id:"confirm",loading:O.value,color:"primary",variant:d.value?"text":"solid",round:"pill",size:"large",label:e("meeting.confirmBtn"),onClick:()=>{$()}},{id:"cancel",color:"primary",variant:d.value?"text":"outline",round:"pill",size:"large",label:e("meeting.cancelBtn"),onClick:()=>{X()}}]);return(Ae,be)=>(t.openBlock(),t.createElementBlock("div",Xx,[t.unref(c)?(t.openBlock(),t.createElementBlock("div",t5,[t.createVNode(t.unref(A.OCollapse),{modelValue:Ke.value,"onUpdate:modelValue":be[2]||(be[2]=me=>Ke.value=me),accordion:t.unref(c),onChange:He},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(z.value,me=>{var Pe;return t.openBlock(),t.createElementBlock(t.Fragment,{key:me.id},[t.createElementVNode("div",i5,[t.createElementVNode("p",n5,t.toDisplayString(me.title),1),me.is_delete!==1?(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:0,color:"primary",variant:"outline",class:t.normalizeClass([`tag-${(Pe=t.unref(a).get(me.status))==null?void 0:Pe.id}`])},{default:t.withCtx(()=>{var Xe;return[t.createTextVNode(t.toDisplayString((Xe=t.unref(a).get(me.status))==null?void 0:Xe.text),1)]}),_:2},1032,["class"])):(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:1,color:"primary",variant:"outline",class:"tag-cancel"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.statusCanceled")),1)]),_:1}))]),t.createVNode(t.unref(A.OCollapseItem),{value:me.id},{title:t.withCtx(()=>[t.createElementVNode("div",r5,[t.createElementVNode("p",s5,t.toDisplayString(me.sponsor),1),t.createElementVNode("p",null,t.toDisplayString(t.unref(rt.dayjs)(me.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),t.createElementVNode("div",a5,[me.status===7||me.is_delete?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,color:"danger",variant:"text",onClick:t.withModifiers(Xe=>Z(me),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),(me.status===3||me.status===4)&&me.is_delete!==1?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:1,color:"danger",variant:"text",onClick:t.withModifiers(Xe=>se(me),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.cancelActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),me.status===2?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:2,color:"primary",variant:"text",onClick:t.withModifiers(Xe=>_e(me),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.approve")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),me.status===2?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:3,color:"primary",variant:"text",onClick:t.withModifiers(Xe=>ke(me),["stop"])},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.reject")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0)])]),default:t.withCtx(()=>[t.createElementVNode("div",o5,[t.createVNode(ts,{show:Ke.value.includes(me.id),data:me,ref_for:!0,ref:Xe=>We(Xe,me.id),page:t.unref(Be).APPROVAL},null,8,["show","data","page"])])]),_:2},1032,["value"])],64)}),128))]),_:1},8,["modelValue","accordion"]),H.value>U[0]?(t.openBlock(),t.createElementBlock("div",l5,[t.createVNode(t.unref(A.OPagination),{total:H.value,page:g.page,"page-size":g.size,"page-sizes":U,layout:["total","jumper","pager","pagesize"],"show-more":!1,simple:!0,onChange:G},null,8,["total","page","page-size"])])):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",Kx,[t.createVNode(t.unref(rt.ElTable),{data:z.value,onExpandChange:et,"row-key":Re,"expand-row-keys":Ne.value},{default:t.withCtx(()=>[t.createVNode(t.unref(rt.ElTableColumn),{type:"expand"},{default:t.withCtx(me=>[t.createElementVNode("div",Qx,[t.createVNode(ts,{data:me.row,page:t.unref(Be).APPROVAL,show:""},null,8,["data","page"])])]),_:1}),t.createVNode(t.unref(rt.ElTableColumn),{label:t.unref(e)("meeting.activityName"),prop:"title"},null,8,["label"]),t.createVNode(t.unref(rt.ElTableColumn),{prop:"sponsor"},{header:t.withCtx(()=>[t.createVNode(mc,{modelValue:S.value,"onUpdate:modelValue":be[0]||(be[0]=me=>S.value=me),onConfirm:b,list:T.value,multiple:!0},{empty:t.withCtx(()=>[t.renderSlot(Ae.$slots,"filter-empty")]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(t.unref(e)("meeting.applicant")),1)]),_:3},8,["modelValue","list"])]),_:3}),t.createVNode(t.unref(rt.ElTableColumn),{prop:"create_time"},{header:t.withCtx(()=>[t.createElementVNode("div",{class:"sort-time",onClick:x},[t.createElementVNode("span",null,t.toDisplayString(t.unref(e)("meeting.submissionTime")),1),t.createElementVNode("div",Zx,[t.createElementVNode("div",{class:t.normalizeClass(["sort-asc sort-item",{active:y.value==="asc"}])},null,2),t.createElementVNode("div",{class:t.normalizeClass(["sort-desc sort-item",{active:y.value==="desc"}])},null,2)])])]),default:t.withCtx(me=>[t.createTextVNode(t.toDisplayString(t.unref(rt.dayjs)(me.row.create_time).format("YYYY/MM/DD HH:mm:ss")),1)]),_:1}),t.createVNode(t.unref(rt.ElTableColumn),{prop:"status",width:"90px"},{header:t.withCtx(()=>[t.createVNode(mc,{modelValue:N.value,"onUpdate:modelValue":be[1]||(be[1]=me=>N.value=me),onConfirm:D,list:I.value},{empty:t.withCtx(()=>[t.renderSlot(Ae.$slots,"filter-empty")]),default:t.withCtx(()=>[t.createTextVNode(" "+t.toDisplayString(t.unref(e)("meeting.status")),1)]),_:3},8,["modelValue","list"])]),default:t.withCtx(me=>{var Pe;return[me.row.is_delete!==1?(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:0,color:"primary",variant:"outline",class:t.normalizeClass([`tag-${(Pe=t.unref(a).get(me.row.status))==null?void 0:Pe.id}`])},{default:t.withCtx(()=>{var Xe;return[t.createTextVNode(t.toDisplayString((Xe=t.unref(a).get(me.row.status))==null?void 0:Xe.text),1)]}),_:2},1032,["class"])):(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:1,color:"primary",variant:"outline",class:"tag-cancel"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.statusCanceled")),1)]),_:1}))]}),_:3}),t.createVNode(t.unref(rt.ElTableColumn),{label:t.unref(e)("meeting.action")},{default:t.withCtx(me=>[t.createElementVNode("div",Jx,[me.row.status===7||me.row.is_delete?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,color:"danger",onClick:Pe=>Z(me.row)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),(me.row.status===3||me.row.status===4)&&me.row.is_delete!==1?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:1,color:"danger",onClick:Pe=>se(me.row)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.cancelActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),me.row.status===2?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:2,color:"primary",onClick:Pe=>_e(me.row)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.approve")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),me.row.status===2?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:3,color:"primary",onClick:Pe=>ke(me.row)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(e)("meeting.reject")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0)])]),_:1},8,["label"])]),_:3},8,["data","expand-row-keys"]),H.value>U[0]?(t.openBlock(),t.createElementBlock("div",e5,[t.createVNode(t.unref(A.OPagination),{total:H.value,page:g.page,"page-size":g.size,"page-sizes":U,layout:["total","jumper","pager","pagesize"],"show-more":!1,onChange:G},null,8,["total","page","page-size"])])):t.createCommentVNode("",!0)])),t.createVNode(t.unref(A.ODialog),{visible:M.value,"onUpdate:visible":be[4]||(be[4]=me=>M.value=me),"phone-half-full":t.unref(d),"main-class":"handle-dialog-approval review-dialog",actions:it.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(L.value),1)]),default:t.withCtx(()=>[t.createElementVNode("div",u5,[t.createVNode(t.unref(A.OForm),{model:C.value,ref_key:"formRef",ref:k,"has-required":"",layout:"v",class:"form-wrapper"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OFormItem),{rules:q.value.reason,label:`${t.unref(e)("meeting.reviewNotesLabel")}${n.value?":":": "}`,field:"reason"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OTextarea),{size:"large",placeholder:t.unref(e)("meeting.enterReviewNotes"),rows:4,resize:"none","max-length":1e3,"input-on-outlimit":!1,modelValue:C.value.reason,"onUpdate:modelValue":be[3]||(be[3]=me=>C.value.reason=me)},null,8,["placeholder","modelValue"])]),_:1},8,["rules","label"])]),_:1},8,["model"])])]),_:1},8,["visible","phone-half-full","actions"]),t.createVNode(t.unref(A.ODialog),{visible:ee.value,"onUpdate:visible":be[5]||(be[5]=me=>ee.value=me),"phone-half-full":t.unref(d),"main-class":"handle-dialog-approval cancel-dialog",actions:kt.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(ue.value),1)]),default:t.withCtx(()=>{var me,Pe;return[t.createElementVNode("div",c5,t.toDisplayString(oe.value===1?t.unref(e)("meeting.confirmCancelActivity",[(me=j.value)==null?void 0:me.title]):t.unref(e)("meeting.confirmDeleteActivity",[(Pe=j.value)==null?void 0:Pe.title])),1)]}),_:1},8,["visible","phone-half-full","actions"])]))}}),d5={class:"o-my-activity-calendar"},h5={class:"activity-list"},f5={key:0,class:"list-calendar-mb"},p5={class:"left-calendar"},m5=["onClick"],g5={class:"date-cell-text"},v5={class:"right-meeting"},y5={class:"list-body"},_5=["id"],T5={class:"item-header-left"},b5={class:"act-icon"},C5={class:"header-info"},x5={class:"title-text"},S5={class:"act-info"},E5={class:"date-range"},k5={key:0,class:"item-header-right"},w5={class:"activity-detail"},D5={key:0,class:"activity-btn"},A5={key:0,class:"load-text"},I5={class:"dialog-content"},N5={class:"dialog-content"},th=t.defineComponent({__name:"OMyActivityCalendar",props:{getListRequest:{},revokeActivityRequest:{},deleteActivityRequest:{},editActivityRequest:{},getActivityDetailRequest:{}},emits:["edit"],setup(r,{emit:e}){const{t:i,locale:n}=Ue.useI18n(),s=t.computed(()=>n.value===Ue.Locales.ZH),{statusMap:a,activityTypeMap:o}=ba(),l=ne=>{const re=ye(ne||new Date);return s.value?re.format("YYYY MM月"):re.format("MMMM YYYY")},c=A.useMessage(null),{isPhone:d}=It.useScreen(),m=r,g=e,S=t.ref([]),T=t.ref([]),b=t.ref(1),y=t.ref(50),x=t.ref(null),N=t.ref(!1),I=t.ref([]),D=t.ref(!1),z=t.ref(!1),H=t.computed(()=>x.value===null||T.value.length<x.value),U=async()=>{if(m.getListRequest&&!D.value)try{if(x.value!==null&&x.value>0&&(b.value-1)*y.value>x.value)return;if(!H.value&&d.value){R("next-month");return}D.value=!0;const ne=await m.getListRequest({page:b.value,size:y.value,start_date:V.value}),re=(ne.data||[]).map(le=>{const{start_date:Ee,end_date:pe,start:Ze,end:Je}=le;return[{...le,time:`${Ee}-${Je}`,start_date_time:`${Ee} ${Ze}`,end_date_time:`${pe} ${Je}`,type:Be.EVENTS,dateRange:`${Ee} ${Ze}-${pe} ${Je}`,isExpired:ye(`${Ee} ${Ze}`).isBefore(ye())}]}).flat().filter(le=>le.start_date.slice(0,7)===ht(V.value,"YYYY-MM-DD").slice(0,7));N.value?(T.value=ne.data||[],S.value=re):b.value===1&&!d.value?(T.value=ne.data||[],S.value=re):(T.value=[...T.value,...ne.data||[]],S.value=[...S.value,...re]),S.value.sort((le,Ee)=>le.start_date===Ee.start_date?Nn(le.start)>Nn(Ee.start)?1:-1:ye(le.start_date).isAfter(ye(Ee.start_date))?1:-1),x.value=(ne==null?void 0:ne.total)||0,t.nextTick(()=>{$(),Z.value&&!d.value&&j()})}finally{D.value=!1,z.value=!1,N.value=!1}},B=t.ref([]),G=ne=>{m.getActivityDetailRequest&&(B.value.includes(ne)||(B.value.push(ne),m.getActivityDetailRequest(ne).then(re=>{var le;(le=S.value)==null||le.forEach(Ee=>{Ee.id===re.id&&(Ee.approve_record=re.approve_record)})})))},C=ne=>{ne.length&&ne.forEach(re=>{G(re)})},k=ne=>{const re=S.value.filter(le=>le.start_date===ne);return re.length&&re.every(le=>le.status===3||le.status===4)},O=ne=>{const re=ne.target;if(!re)return;const le=re.scrollTop,Ee=re.scrollHeight,pe=re.clientHeight;le+pe>=Ee&&_e()},j=()=>{Z.value.getContainerEl().addEventListener("scroll",O)},L=t.ref(),V=t.ref(ye().format("YYYY-MM-DD")),M=t.computed(()=>[...new Set(S.value.map(ne=>ne.start_date))].sort((ne,re)=>ye(ne).isBefore(ye(re))?-1:1)),q=t.computed(()=>[...new Set(S.value.filter(ne=>!ne.isExpired&&!ne.is_delete).map(ne=>ne.start_date))].sort((ne,re)=>ye(ne).isBefore(ye(re))?-1:1)),$=()=>{var le;const ne=q.value.find(Ee=>!ye(Ee).isBefore(ye(new Date).format("YYYY-MM-DD")));ne?V.value=ne:V.value||(V.value=ye().format("YYYY-MM-DD")),(le=L.value)==null||le.pickDay(ye(V.value)),V.value=ye(V.value).format("YYYY-MM-DD");const re=S.value.find(Ee=>Ee.start_date===V.value&&!Ee.isExpired&&!Ee.is_delete);re&&(G(re.id),I.value=[re.id])},X=(ne,re)=>{var le;(!re||!((le=ne.target)!=null&&le.className.includes("date-cell-text")))&&(ne.stopPropagation(),ne.preventDefault())},R=ne=>{L.value&&(b.value=1,x.value=null,B.value=[],window.scrollTo({top:0,behavior:"smooth"}),L.value.selectDate(ne),N.value=!0,t.nextTick(()=>{V.value=ye(L.value.selectedDay).format("YYYY-MM-DD"),U()}))},ee=t.computed(()=>S.value.reduce((ne,re)=>{if(ne.length){const le=ne.at(-1);return(le==null?void 0:le.start_date)===re.start_date?le==null||le.list.push(re):ne.push({start_date:re.start_date,list:[re]}),ne}else return[{start_date:re.start_date,list:[re]}]},[])),ue=t.ref({}),J=(ne,re)=>{ne&&re&&(ue.value[re]=ne)},oe=async ne=>{await ue.value[ne].copyInfo(),c.success({content:i("common.copySuccess")})},Z=t.ref(),se=ne=>{var Ee,pe,Ze;const re=ye(ne).format("YYYY-MM-DD"),le=document.querySelector(`#group-title-${re}`);le&&(d.value?window.scrollTo({top:(((Ee=le.parentElement)==null?void 0:Ee.offsetTop)||0)-52,behavior:"smooth"}):(Ze=Z.value)==null||Ze.scrollTo({top:((pe=le.parentElement)==null?void 0:pe.offsetTop)||0,behavior:"smooth"}))};t.watch(()=>V.value,()=>{se(V.value)});const _e=fi.useDebounceFn(()=>{H.value&&(d.value||(z.value=!0,b.value++,U()))},200),ke=t.ref(!1),De=t.ref(null),Ne=t.ref(!1),Ve=ne=>{De.value=ne,Ne.value=!0},et=()=>{var ne;m.revokeActivityRequest&&De.value&&(ke.value=!0,m.revokeActivityRequest((ne=De.value)==null?void 0:ne.id).then(()=>{var re;c.success({content:i("meeting.revokeActivitySuccess",[(re=De.value)==null?void 0:re.title])}),N.value=!0,U()}).finally(()=>{Ne.value=!1,ke.value=!1}))},Re=()=>{Ne.value=!1},Ke=ne=>{g("edit",ne)},He=ne=>{if(!m.editActivityRequest)return;const{title:re,start_date:le,end_date:Ee,register_end_date:pe,activity_type:Ze,synopsis:Je,register_url:$e,content_url:Nt,address:xt,start:ui,end:Ot,approver:St}=ne;let ii={title:re,start_date:le,end_date:Ee,register_end_date:pe,activity_type:Ze,synopsis:Je,register_url:$e,content_url:Nt,address:xt,start:ui,end:Ot,approver:St,is_publish:"true"};m.editActivityRequest(ne.id,ii).then(()=>{c.success({content:i("meeting.submitReviewSuccess",[ne.title])}),N.value=!0,U()})},Fe=t.ref(!1),We=ne=>{De.value=ne,Fe.value=!0},kt=()=>{var ne;m.deleteActivityRequest&&(ke.value=!0,m.deleteActivityRequest((ne=De.value)==null?void 0:ne.id).then(()=>{var re;c.success({content:i("meeting.deleteActivitySuccess",[(re=De.value)==null?void 0:re.title])}),N.value=!0,U()}).finally(()=>{Fe.value=!1,ke.value=!1}))},it=()=>{Fe.value=!1},Ae=t.ref(),be=t.ref(0),me=()=>{var ne;be.value=((ne=Ae.value)==null?void 0:ne.clientHeight)||0},Pe=fi.useDebounceFn(()=>{if(!H.value||!d.value)return;const ne=window.scrollY||window.pageYOffset,re=window.innerHeight;document.documentElement.scrollHeight-(ne+re)<=300&&!D.value&&(z.value=!0,b.value++,U())},200);t.onMounted(()=>{U(),window.addEventListener("scroll",Pe),window.addEventListener("resize",Pe),me(),window.addEventListener("resize",me)}),t.onUnmounted(()=>{var re;window.removeEventListener("scroll",Pe),window.removeEventListener("resize",Pe),window.removeEventListener("resize",me);const ne=(re=Z.value)==null?void 0:re.getContainerEl();ne==null||ne.removeEventListener("scroll",O)});const Xe=t.computed(()=>[{id:"confirm",loading:ke.value,color:"primary",variant:"outline",round:"pill",size:"large",label:i("meeting.confirmBtn"),onClick:()=>{et()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:i("meeting.cancelBtn"),onClick:()=>{Re()}}]),vt=t.computed(()=>[{id:"confirm",loading:ke.value,color:"primary",variant:"outline",round:"pill",size:"large",label:i("meeting.confirmBtn"),onClick:()=>{kt()}},{id:"cancel",color:"primary",variant:"solid",round:"pill",size:"large",label:i("meeting.cancelBtn"),onClick:()=>{it()}}]);return(ne,re)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",d5,[t.createElementVNode("div",h5,[t.unref(d)?(t.openBlock(),t.createElementBlock("div",f5,[t.createElementVNode("span",null,t.toDisplayString(l(V.value)),1),t.createElementVNode("span",null,[t.createVNode(t.unref(A.OIcon),{onClick:re[0]||(re[0]=le=>R("prev-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronLeft))]),_:1}),t.createVNode(t.unref(A.OIcon),{onClick:re[1]||(re[1]=le=>R("next-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})])])):t.createCommentVNode("",!0),t.createElementVNode("div",p5,[t.createVNode(t.unref(rt.ElCalendar),{ref_key:"calendarRef",ref:L,modelValue:V.value,"onUpdate:modelValue":re[4]||(re[4]=le=>V.value=le)},{header:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(l(V.value)),1),t.createElementVNode("div",null,[t.createVNode(t.unref(A.OIcon),{onClick:re[2]||(re[2]=le=>R("prev-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronLeft))]),_:1}),t.createVNode(t.unref(A.OIcon),{onClick:re[3]||(re[3]=le=>R("next-month"))},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})])]),"date-cell":t.withCtx(({data:le})=>[t.createElementVNode("div",{onClick:Ee=>X(Ee,M.value.includes(le.day)),class:t.normalizeClass({"date-cell":!0,"is-selected":le.isSelected,"is-today":t.unref(ht)(le.day)===t.unref(ht)(),clickable:M.value.includes(le.day),approved:k(le.day)})},[t.createElementVNode("div",g5,t.toDisplayString(Number(le.day.split("-")[2])),1)],10,m5)]),_:1},8,["modelValue"])]),t.createElementVNode("div",v5,[S.value.length?(t.openBlock(),t.createBlock(t.unref(A.OScroller),{key:0,ref_key:"scrollerRef",ref:Z,onScrollend:t.unref(_e),style:t.normalizeStyle({"--header-height":be.value}),"show-type":"hover",class:"scroller-container"},{default:t.withCtx(()=>[t.createElementVNode("div",y5,[t.createVNode(t.unref(A.OCollapse),{modelValue:I.value,"onUpdate:modelValue":re[7]||(re[7]=le=>I.value=le),accordion:t.unref(d),onChange:C},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(ee.value,(le,Ee)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:le.start_date},[Ee===0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"list-month-change prev-month",onClick:re[5]||(re[5]=pe=>R("prev-month"))},[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconArrowLeft))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("meeting.preMonth")),1)])):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["act-item",Ee===ee.value.length-1&&"last-item"])},[t.createElementVNode("div",{class:t.normalizeClass({"act-bar":!0,"is-active":t.unref(ye)(V.value).format("YYYY-MM-DD")===le.start_date,"is-end":le.list.every(pe=>pe.isExpired),approved:le.list.every(pe=>pe.status===3||pe.status===4)})},[...re[10]||(re[10]=[t.createElementVNode("div",{class:"act-bar-line"},null,-1),t.createElementVNode("div",{class:"act-bar-dot"},null,-1)])],2),t.createElementVNode("div",{class:t.normalizeClass({"group-title":!0,"is-end":le.list.every(pe=>pe.isExpired)}),id:`group-title-${t.unref(ye)(new Date(le.start_date)).format("YYYY-MM-DD")}`},t.toDisplayString(t.unref(ye)(le.start_date).format("MM/DD")),11,_5),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(le.list,(pe,Ze)=>(t.openBlock(),t.createBlock(t.unref(A.OCollapseItem),{key:pe.sub_id||pe.id,value:pe.sub_id||pe.id,class:t.normalizeClass({"last-item":Ee===ee.value.length-1&&Ze===le.list.length-1})},{title:t.withCtx(()=>{var Je,$e;return[t.createElementVNode("div",T5,[t.createElementVNode("div",b5,[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(Al))]),_:1})]),t.createElementVNode("div",C5,[t.createElementVNode("div",{class:t.normalizeClass({"act-title":!0,"is-delete":pe.is_delete,"is-end":pe.isExpired})},[t.createElementVNode("div",x5,t.toDisplayString(pe.title),1),t.createVNode(t.unref(A.OTag),{color:"primary",variant:"outline",class:t.normalizeClass([`tag-${pe.is_delete?"delete":(Je=t.unref(a).get(pe.status))==null?void 0:Je.id}`])},{default:t.withCtx(()=>{var Nt;return[t.createTextVNode(t.toDisplayString(pe.is_delete===1?t.unref(i)("meeting.statusCanceled"):(Nt=t.unref(a).get(pe.status))==null?void 0:Nt.text),1)]}),_:2},1032,["class"])],2),t.createElementVNode("div",S5,[t.createElementVNode("span",E5,t.toDisplayString(pe.dateRange),1),t.createVNode(t.unref(A.ODivider),{direction:"v"}),t.createElementVNode("span",null,t.toDisplayString(($e=t.unref(o).get(pe.activity_type))==null?void 0:$e.label),1)])])]),pe.content_url&&!pe.is_delete&&[3,4,5,6].includes(pe.status)?(t.openBlock(),t.createElementBlock("div",k5,[pe.content_url?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,href:pe.content_url,target:"_blank",rel:"noopener noreferrer"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.activityDetail"))+" ",1)]),_:1},8,["href"])):t.createCommentVNode("",!0),pe.register_url&&(pe.status===3||pe.status===4||pe.status===2&&pe.update_activity_id&&new Date(pe.register_end_date).getTime()>new Date().getTime())?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:1,href:pe.register_url,target:"_blank",rel:"noopener noreferrer"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.registerNow"))+" ",1)]),_:1},8,["href"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createVNode(t.unref(A.OIcon),{onClick:t.withModifiers(()=>oe(Ze),["stop"]),class:"copy-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(Nl))]),_:1},8,["onClick"])]}),default:t.withCtx(()=>[t.createElementVNode("div",w5,[t.createVNode(ts,{show:I.value.includes(pe.id),data:pe,ref_for:!0,ref:Je=>J(Je,pe.id)},null,8,["show","data"]),!pe.isExpired&&!pe.is_delete?(t.openBlock(),t.createElementBlock("div",D5,[pe.status===2?(t.openBlock(),t.createBlock(t.unref(A.OButton),{key:0,variant:"text",onClick:Je=>Ve(pe)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.withdrawReview")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),pe.status===1||pe.status===3||pe.status===4||pe.status===7?(t.openBlock(),t.createBlock(t.unref(A.OButton),{key:1,variant:"text",onClick:Je=>Ke(pe)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.modifyActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),pe.status===1||pe.status===7?(t.openBlock(),t.createBlock(t.unref(A.OButton),{key:2,variant:"text",onClick:Je=>We(pe)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.deleteActivity")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0),pe.status===1||pe.status===7?(t.openBlock(),t.createBlock(t.unref(A.OButton),{key:3,variant:"text",onClick:Je=>He(pe)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.submitReview")),1)]),_:1},8,["onClick"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)])]),_:2},1032,["value","class"]))),128)),re[11]||(re[11]=t.createElementVNode("div",{class:"height-placeholder"},null,-1))],2),Ee===ee.value.length-1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[z.value?(t.openBlock(),t.createElementBlock("div",A5,t.toDisplayString(t.unref(i)("meeting.loading")),1)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"list-month-change next-month",onClick:re[6]||(re[6]=pe=>R("next-month"))},[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconArrowRight))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("meeting.nextMonth")),1)])],64)):t.createCommentVNode("",!0)],64))),128))]),_:1},8,["modelValue","accordion"])])]),_:1},8,["onScrollend","style"])):t.renderSlot(ne.$slots,"empty",{key:1})])])]),t.createVNode(t.unref(A.ODialog),{visible:Ne.value,"onUpdate:visible":re[8]||(re[8]=le=>Ne.value=le),"main-class":"handle-dialog-active",actions:Xe.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.withdrawReview")),1)]),default:t.withCtx(()=>{var le;return[t.createElementVNode("div",I5,t.toDisplayString(t.unref(i)("meeting.confirmRevokeActivity",[(le=De.value)==null?void 0:le.title])),1)]}),_:1},8,["visible","actions"]),t.createVNode(t.unref(A.ODialog),{visible:Fe.value,"onUpdate:visible":re[9]||(re[9]=le=>Fe.value=le),"main-class":"handle-dialog-active",actions:vt.value},{header:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(i)("meeting.deleteActivity")),1)]),default:t.withCtx(()=>{var le;return[t.createElementVNode("div",N5,t.toDisplayString(t.unref(i)("meeting.confirmDeleteActivity",[(le=De.value)==null?void 0:le.title])),1)]}),_:1},8,["visible","actions"])],64))}}),O5=Object.assign(ac,{install(r){r.component("OActivityForm",ac)}}),B5=Object.assign(eh,{install(r){r.component("OActivityApproval",eh)}}),L5=Object.assign(th,{install(r){r.component("OMyActivityCalendar",th)}}),P5={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function M5(r,e){return t.openBlock(),t.createElementBlock("svg",P5,[...e[0]||(e[0]=[t.createElementVNode("rect",{id:"峰会",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),t.createElementVNode("path",{id:"矢量 425",d:"M8.36719 4.75439L8.36523 4.75537L8.36523 4.75537C7.63184 5.05518 6.93555 5.44629 6.27734 5.9292C6.00098 6.13184 5.94238 6.5083 6.14551 6.78516C6.34766 7.06201 6.72461 7.11963 7.00098 6.91699C7.61035 6.47119 8.25391 6.11475 8.93262 5.84766C9.05371 5.7998 9.17676 5.75488 9.30078 5.71289C9.73242 5.56641 10.1699 5.45752 10.6143 5.38672C10.6191 5.38574 10.624 5.38525 10.6289 5.38428L10.6289 5.38428C11.0439 5.31836 11.4639 5.28564 11.8896 5.28564C12.3193 5.28564 12.7451 5.31934 13.1641 5.38672L13.165 5.38672C13.6084 5.45752 14.0459 5.56641 14.4775 5.71289C14.6016 5.75488 14.7246 5.7998 14.8457 5.84766C15.5254 6.11475 16.1689 6.47119 16.7773 6.91699C17.0537 7.11963 17.4307 7.06201 17.6328 6.78516C17.8359 6.5083 17.7783 6.13184 17.501 5.9292C16.8418 5.4458 16.1455 5.0542 15.4111 4.75439C15.2334 4.68213 15.0537 4.61475 14.8711 4.55273C14.376 4.38477 13.873 4.25977 13.3643 4.17773C12.8789 4.09961 12.3877 4.06055 11.8896 4.06055C11.3916 4.06055 10.8994 4.09961 10.4141 4.17773L10.4141 4.17773C9.90527 4.25977 9.40332 4.38477 8.90723 4.55273C8.72559 4.61475 8.54492 4.68213 8.36719 4.75439L8.36719 4.75439ZM20.377 14.2979L20.377 13.4229C20.377 13.0801 20.1074 12.8105 19.7646 12.8105C19.4219 12.8105 19.1523 13.0801 19.1523 13.4229L19.1523 14.2979C19.1523 14.334 19.1455 14.3677 19.1328 14.3984L19.1328 14.3989C19.1074 14.4243 19.0215 14.5283 18.9902 14.5415C18.96 14.5542 18.9258 14.5605 18.8896 14.5605L4.88965 14.5605C4.85352 14.5605 4.82031 14.5542 4.78906 14.5415C4.76367 14.5156 4.65918 14.4297 4.64648 14.3989C4.63379 14.3677 4.62695 14.3345 4.62695 14.2979L4.62695 9.04785C4.62695 9.01172 4.63379 8.97803 4.64648 8.94727C4.67188 8.92188 4.75781 8.81738 4.78906 8.80469L4.78906 8.80469C4.82031 8.79199 4.85352 8.78564 4.88965 8.78564L18.8896 8.78564C18.9258 8.78564 18.96 8.79199 18.9902 8.80469C19.0166 8.83057 19.1201 8.9165 19.1328 8.94727C19.1455 8.97803 19.1523 9.01172 19.1523 9.04785L19.1523 11.6729C19.1523 12.0161 19.4219 12.2856 19.7646 12.2856C20.1074 12.2856 20.377 12.0161 20.377 11.6729L20.377 9.04785C20.377 8.94141 20.3662 8.83691 20.3447 8.73535L20.3447 8.73438L20.3447 8.73389C20.3252 8.64355 20.2969 8.55518 20.2598 8.46875C20.2236 8.3833 20.1807 8.30225 20.1299 8.22559C20.0752 8.14355 20.0127 8.06738 19.9414 7.99609C19.8701 7.92529 19.7939 7.8623 19.7119 7.80811C19.6357 7.75732 19.5547 7.71387 19.4688 7.67773C19.3828 7.64111 19.2939 7.61328 19.2041 7.59375C19.1016 7.57178 18.9971 7.56055 18.8896 7.56055L4.88965 7.56055C4.78418 7.56055 4.68066 7.57129 4.5791 7.59277L4.5791 7.59277C4.57812 7.59326 4.57715 7.59326 4.57617 7.59375L4.5752 7.59375C4.48535 7.61328 4.39746 7.64111 4.31055 7.67773C4.22461 7.71387 4.14355 7.75732 4.06738 7.80811C3.98535 7.8623 3.90918 7.92529 3.83789 7.99609C3.7666 8.06738 3.7041 8.14355 3.64941 8.22559C3.64941 8.22656 3.64844 8.22705 3.64844 8.22803C3.59863 8.30371 3.55566 8.38379 3.51953 8.46875C3.48242 8.55518 3.45508 8.64355 3.43555 8.73389C3.41309 8.83643 3.40234 8.94092 3.40234 9.04785L3.40234 14.2979C3.40234 14.4053 3.41309 14.5098 3.43555 14.6123C3.45508 14.7021 3.48242 14.7905 3.51953 14.8774C3.55566 14.9629 3.59961 15.0439 3.64941 15.1201C3.7041 15.2021 3.7666 15.2788 3.83789 15.3501C3.90918 15.4209 3.98535 15.4834 4.06738 15.5381C4.14355 15.5889 4.22461 15.6323 4.31055 15.6685C4.39746 15.7051 4.48535 15.7329 4.5752 15.7524C4.67773 15.7744 4.78223 15.7856 4.88965 15.7856L18.8896 15.7856C18.9971 15.7856 19.1016 15.7744 19.2041 15.7524C19.2939 15.7329 19.3828 15.7051 19.4688 15.6685C19.5547 15.6318 19.6357 15.5889 19.7119 15.5381C19.7939 15.4834 19.8701 15.4209 19.9414 15.3501C20.0127 15.2788 20.0752 15.2021 20.1299 15.1201C20.1807 15.0439 20.2236 14.9629 20.2598 14.8774C20.2969 14.7905 20.3252 14.7021 20.3447 14.6123C20.3662 14.5098 20.377 14.4053 20.377 14.2979ZM14.8291 16.3438L14.8291 16.3438C14.9189 16.3633 15.0078 16.3911 15.0938 16.4277C15.1797 16.4639 15.2607 16.5073 15.3369 16.5581C15.4189 16.6123 15.4951 16.6753 15.5664 16.7461C15.6377 16.8174 15.7002 16.8936 15.7549 16.9756C15.8057 17.0522 15.8486 17.1328 15.8848 17.2188C15.9219 17.3052 15.9502 17.3936 15.9697 17.4839C15.9912 17.5864 16.002 17.6909 16.002 17.7979C16.002 17.9053 15.9912 18.0098 15.9697 18.1123C15.9502 18.2021 15.9219 18.2905 15.8848 18.3774C15.8486 18.4629 15.8057 18.5439 15.7549 18.6201C15.7002 18.7021 15.6377 18.7788 15.5664 18.8501C15.4951 18.9209 15.4189 18.9834 15.3369 19.0381C15.2607 19.0889 15.1797 19.1318 15.0938 19.1685C15.0078 19.2051 14.9189 19.2329 14.8291 19.2524C14.7266 19.2744 14.6221 19.2856 14.5146 19.2856L9.26465 19.2856C9.1582 19.2856 9.05273 19.2744 8.9502 19.2524C8.86035 19.2329 8.77246 19.2051 8.68555 19.1685C8.59961 19.1318 8.51855 19.0889 8.44238 19.0381C8.36035 18.9834 8.28418 18.9209 8.21289 18.8501C8.1416 18.7788 8.0791 18.7021 8.02441 18.6201C7.97461 18.5439 7.93066 18.4629 7.89453 18.3774C7.85742 18.2905 7.83008 18.2021 7.81055 18.1123C7.78809 18.0098 7.77734 17.9053 7.77734 17.7979C7.77734 17.6909 7.78809 17.5864 7.81055 17.4839C7.83008 17.3936 7.85742 17.3052 7.89453 17.2188C7.93066 17.1328 7.97461 17.0522 8.02441 16.9756C8.0791 16.8936 8.1416 16.8174 8.21289 16.7461C8.28418 16.6753 8.36035 16.6123 8.44238 16.5581C8.51855 16.5073 8.59961 16.4639 8.68555 16.4277C8.77246 16.3911 8.86035 16.3633 8.9502 16.3438C9.05273 16.3218 9.1582 16.3105 9.26465 16.3105L14.5146 16.3105C14.6221 16.3105 14.7266 16.3218 14.8291 16.3438ZM9.2666 17.5352L14.5166 17.5352C14.5527 17.5352 14.5859 17.5415 14.6172 17.5547C14.6426 17.5801 14.7471 17.666 14.7598 17.6973C14.7725 17.728 14.7793 17.7617 14.7793 17.7979C14.7793 17.834 14.7725 17.8677 14.7598 17.8984C14.7344 17.9243 14.6484 18.0283 14.6172 18.041C14.5859 18.0542 14.5527 18.0605 14.5166 18.0605L9.2666 18.0605C9.23047 18.0605 9.19629 18.0542 9.16602 18.041C9.13965 18.0156 9.03613 17.9297 9.02344 17.8984C9.01074 17.8677 9.00391 17.834 9.00391 17.7979C9.00391 17.7617 9.01074 17.728 9.02344 17.6973C9.04883 17.6714 9.13477 17.5674 9.16602 17.5547C9.19629 17.5415 9.23047 17.5352 9.2666 17.5352Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const R5={name:"events-icon-summit",render:M5},V5={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function F5(r,e){return t.openBlock(),t.createElementBlock("svg",V5,[...e[0]||(e[0]=[t.createElementVNode("rect",{id:"活动",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),t.createElementVNode("path",{id:"矢量 426",d:"M18.3065 11.0924L17.7206 11.6295C17.455 11.8722 17.4384 12.2711 17.6806 12.5362C17.9237 12.8009 18.3221 12.8185 18.5868 12.5758L19.1737 12.0387L20.0418 11.2433C20.1746 11.1217 20.2811 10.9859 20.3631 10.8365C20.4256 10.7198 20.4735 10.5948 20.5057 10.4615C20.5369 10.3316 20.5516 10.2017 20.5496 10.0723C20.5467 9.92 20.5213 9.76765 20.4725 9.61531C20.4237 9.46345 20.3553 9.32478 20.2684 9.19978C20.1942 9.09333 20.1063 8.99665 20.0057 8.90925C19.9012 8.81989 19.7899 8.74616 19.6698 8.68854C19.5165 8.61481 19.3504 8.56744 19.1717 8.54645L15.3212 8.09185C15.2997 8.08355 15.2119 8.05572 15.1923 8.04156C15.1777 8.02398 15.1142 7.9566 15.1044 7.93511L13.4697 4.43751C13.3945 4.27638 13.2978 4.13477 13.1816 4.0127L13.1816 4.0127C13.0898 3.91797 12.9853 3.83496 12.8691 3.76416C12.7549 3.69531 12.6367 3.64209 12.5137 3.60498L12.5137 3.60498C12.3682 3.56104 12.2168 3.53906 12.0586 3.53906C11.8994 3.53906 11.7481 3.56104 11.6025 3.60498L11.6025 3.60498C11.4795 3.64209 11.3613 3.69531 11.2471 3.76416C11.1309 3.83496 11.0264 3.91797 10.9356 4.0127C10.8184 4.13477 10.7217 4.27589 10.6465 4.43751L9.01178 7.93511C8.99713 7.95269 8.94342 8.0274 8.92389 8.04156C8.90241 8.04986 8.81843 8.08892 8.79499 8.09185L4.94448 8.54645C4.76577 8.56744 4.59976 8.61481 4.44644 8.68854L4.44644 8.68854C4.32731 8.74616 4.215 8.81989 4.11149 8.90925C4.00993 8.99665 3.92204 9.09333 3.8488 9.19978C3.76091 9.32478 3.69353 9.46345 3.64373 9.61531C3.5949 9.76765 3.56951 9.92 3.56658 10.0723C3.56463 10.2017 3.57927 10.3316 3.61052 10.4615C3.64275 10.5948 3.6906 10.7198 3.75407 10.8365C3.83513 10.9859 3.94157 11.1217 4.07438 11.2433L6.90635 13.837C6.91807 13.8566 6.97374 13.9313 6.98155 13.9542C6.98155 13.9606 6.98252 13.9713 6.98448 13.9845L6.98448 13.986C6.98838 14.0226 6.99327 14.0763 6.98936 14.0939L6.2384 17.8488C6.20324 18.0241 6.19738 18.196 6.21985 18.3635C6.23645 18.4948 6.2716 18.6232 6.32434 18.7497C6.37512 18.8727 6.43957 18.986 6.51671 19.0891C6.60851 19.2106 6.71788 19.3181 6.84679 19.4118C6.97471 19.5061 7.11045 19.5778 7.254 19.6281C7.37607 19.6711 7.50302 19.698 7.63583 19.7097C7.77157 19.7209 7.90438 19.7155 8.03524 19.6926L8.03524 19.6926C8.20223 19.6628 8.36336 19.6047 8.52058 19.5183L11.9248 17.6369C11.9473 17.631 12.0342 17.6022 12.0586 17.6022C12.0801 17.6081 12.1709 17.6252 12.1914 17.6369L15.5117 19.4719C15.6718 19.5603 15.8368 19.6189 16.0068 19.6481L16.0077 19.6481C16.1396 19.6706 16.2743 19.675 16.412 19.6618C16.5468 19.6491 16.6747 19.6203 16.7968 19.5754C16.9423 19.5222 17.079 19.447 17.2079 19.3488C17.3368 19.2512 17.4462 19.1394 17.537 19.0139C17.6132 18.9079 17.6747 18.7917 17.7235 18.6662C17.7733 18.5368 17.8046 18.4055 17.8182 18.2722C17.8368 18.1008 17.8241 17.926 17.7821 17.7482L16.3495 11.7125C16.2665 11.3629 15.9267 11.1534 15.5771 11.2359C15.2275 11.3189 15.0175 11.6593 15.1005 12.0089L16.5331 18.0446C16.5468 18.1027 16.5458 18.155 16.5292 18.2023C16.5116 18.2492 16.4794 18.2907 16.4325 18.3268C16.3847 18.363 16.3359 18.383 16.286 18.3864C16.2362 18.3903 16.1855 18.3776 16.1327 18.3488L12.8115 16.5133C12.6943 16.4489 12.5732 16.4001 12.4473 16.3678L12.4473 16.3678C12.3223 16.3351 12.1924 16.319 12.0586 16.319C11.9238 16.319 11.794 16.3351 11.669 16.3678C11.543 16.4001 11.4219 16.4489 11.3047 16.5133L7.8995 18.3952C7.84872 18.4235 7.79794 18.4362 7.74911 18.4328C7.69931 18.4299 7.65146 18.4108 7.60458 18.3762C7.55673 18.342 7.52451 18.3015 7.50693 18.2556C7.48837 18.2097 7.48545 18.1579 7.49716 18.1003L8.24813 14.3453C8.27449 14.2116 8.28426 14.0792 8.27644 13.9474C8.26863 13.816 8.24324 13.6852 8.20125 13.5558C8.15926 13.4259 8.10262 13.3058 8.03036 13.1949C7.95907 13.0841 7.87313 12.983 7.77255 12.8907L4.94155 10.297C4.89761 10.2569 4.87026 10.213 4.85757 10.1651C4.84487 10.1173 4.8478 10.0655 4.86538 10.0094C4.88393 9.95369 4.91128 9.90975 4.94936 9.8785C4.98842 9.84676 5.03628 9.82771 5.09487 9.82088L8.94538 9.36628C9.07916 9.35066 9.20709 9.31892 9.32916 9.27155C9.45025 9.22419 9.56646 9.16071 9.67583 9.0821C9.7852 9.003 9.8809 8.91315 9.96391 8.81256C10.0479 8.71198 10.1172 8.60065 10.1748 8.47858L11.8086 4.98097C11.834 4.92824 11.8672 4.88869 11.9082 4.86183C11.9502 4.83546 12 4.82228 12.0586 4.82228C12.1162 4.82228 12.166 4.83546 12.208 4.86183C12.25 4.88869 12.2822 4.92824 12.3076 4.98097L13.9414 8.47858C13.999 8.60065 14.0693 8.71198 14.1523 8.81256C14.2353 8.91315 14.332 9.003 14.4414 9.0821C14.5507 9.16071 14.666 9.22419 14.7871 9.27155C14.9091 9.31892 15.0371 9.35066 15.1708 9.36628L19.0213 9.82088C19.0799 9.82771 19.1278 9.84676 19.1668 9.8785C19.2049 9.90975 19.2333 9.95369 19.2508 10.0094C19.2694 10.0655 19.2713 10.1173 19.2586 10.1651C19.2459 10.213 19.2186 10.2569 19.1747 10.297L18.3065 11.0924ZM9.31256 13.2311L7.93856 11.8561C7.68368 11.6017 7.68368 11.2027 7.93856 10.9483C8.19246 10.6944 8.59187 10.6944 8.84577 10.9483L10.2207 12.3233C10.4746 12.5777 10.4746 12.9772 10.2207 13.2311C9.96586 13.485 9.56743 13.485 9.31256 13.2311Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const $5={name:"events-icon-events",render:F5},U5={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function z5(r,e){return t.openBlock(),t.createElementBlock("svg",U5,[...e[0]||(e[0]=[t.createElementVNode("rect",{id:"高校 & 比赛",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),t.createElementVNode("path",{id:"矢量 578",d:"M3.05078 7.51904L11.6914 4.13965C11.8086 4.09424 11.9219 4.07178 12.0391 4.07178C12.1523 4.07178 12.2695 4.09473 12.3867 4.14062L20.9609 7.51953C21.0625 7.55957 21.1523 7.61328 21.2305 7.67969C21.2969 7.73779 21.3555 7.80566 21.4062 7.88379C21.5078 8.03857 21.5586 8.20898 21.5625 8.39502C21.5625 8.58057 21.5156 8.75195 21.418 8.9082C21.3125 9.07861 21.1641 9.20264 20.9766 9.28076L19.457 9.91309L19.457 12.2915C19.457 12.6558 19.168 12.9419 18.8047 12.9419C18.4414 12.9419 18.1562 12.6558 18.1562 12.292L18.1562 10.4531L16.0742 11.3188L16.0742 14.7134C16.2852 14.897 16.418 15.1675 16.418 15.4692C16.418 16.0215 15.9688 16.4692 15.418 16.4692C14.8672 16.4692 14.418 16.0215 14.418 15.4692C14.418 15.1626 14.5547 14.8887 14.7734 14.7051L14.7734 11.8589L12.4023 12.8442C12.2852 12.8926 12.1641 12.917 12.0391 12.917C11.9141 12.9175 11.793 12.8936 11.6758 12.8452L5.63281 10.354L5.61328 17.6836C5.61328 17.7285 5.62109 17.771 5.63281 17.8101C5.65234 17.854 5.67969 17.894 5.71484 17.9307C5.75 17.9658 5.78906 17.9917 5.83203 18.0088C5.87109 18.0259 5.91797 18.0342 5.96484 18.0342L17.7812 18.0342C17.832 18.0342 17.875 18.0254 17.918 18.0083C17.957 17.9912 17.9961 17.9658 18.0312 17.9316C18.0625 17.8975 18.0898 17.8599 18.1055 17.8184C18.125 17.7773 18.1328 17.7324 18.1328 17.6841L18.1328 14.1411C18.1328 13.7773 18.418 13.4912 18.7812 13.4912C19.1445 13.4912 19.4336 13.7773 19.4336 14.1411L19.4336 17.6841C19.4336 17.8032 19.418 17.9194 19.3945 18.0332C19.375 18.1333 19.3438 18.231 19.3008 18.3267C19.2188 18.5239 19.1016 18.6987 18.9492 18.8511C18.8711 18.9297 18.7852 18.9995 18.6953 19.0596C18.6094 19.1157 18.5195 19.1641 18.4258 19.2041C18.3281 19.2446 18.2305 19.2759 18.1328 19.2974L18.1328 19.2974C18.0156 19.3218 17.9023 19.334 17.7812 19.334L5.96484 19.334C5.84375 19.334 5.73047 19.3218 5.61719 19.2979C5.51562 19.2759 5.41797 19.2446 5.32031 19.2036C5.12109 19.1201 4.94922 19.002 4.79688 18.8501C4.64453 18.6978 4.52734 18.5225 4.44141 18.3252C4.35547 18.1196 4.3125 17.9048 4.3125 17.6797L4.33594 9.81836L3.03125 9.28174C2.84375 9.2041 2.69531 9.08008 2.58984 8.90967C2.54297 8.83496 2.50781 8.75684 2.48438 8.67578C2.45703 8.58643 2.44531 8.49268 2.44531 8.39502C2.44531 8.29736 2.46094 8.20361 2.48828 8.11475C2.51562 8.03369 2.55078 7.95654 2.59766 7.8833C2.65234 7.80469 2.71094 7.73682 2.77734 7.67871C2.85547 7.61182 2.94922 7.55859 3.05078 7.51904ZM18.5547 8.87891L15.457 10.1665L11.5 8.05322C11.1758 7.88184 10.7891 7.99951 10.6172 8.32031C10.4492 8.6416 10.5664 9.02832 10.8867 9.19971L13.9062 10.8115L12.0352 11.5884L5.23438 8.78271L4.33594 8.41211L12.0352 5.40039L19.6797 8.41211L18.5547 8.87891Z",fill:"rgb(255,254.745,254.745)","fill-rule":"evenodd"},null,-1)])])}const H5={name:"events-icon-competition",render:z5},q5={viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",width:"24.000000",height:"24.000000",fill:"none",customFrame:"#000000"};function j5(r,e){return t.openBlock(),t.createElementBlock("svg",q5,[...e[0]||(e[0]=[t.createElementVNode("rect",{id:"版本发布计划",width:"24.000000",height:"24.000000",x:"0.000000",y:"0.000000"},null,-1),t.createElementVNode("path",{id:"矢量 579",d:"M8.94922 6.90332L8.94922 6.3335C8.94922 6.23779 8.95703 6.14404 8.97656 6.05225L8.97656 6.05225C8.99609 5.97119 9.01953 5.89209 9.05469 5.81396C9.08594 5.7373 9.125 5.66455 9.17188 5.59619C9.21875 5.52246 9.27734 5.4541 9.33984 5.39062C9.40234 5.32715 9.47266 5.271 9.54297 5.22217L9.54297 5.22217L9.54297 5.22217C9.61328 5.17676 9.6875 5.1377 9.76172 5.10498C9.83984 5.07227 9.91797 5.04688 10 5.02979L10 5.02979C10.0938 5.00977 10.1875 5 10.2812 5L18.668 5C18.7617 5 18.8555 5.00977 18.9492 5.02979L18.9492 5.02979C19.0273 5.04688 19.1094 5.07227 19.1875 5.10498C19.2617 5.1377 19.3359 5.17676 19.4023 5.22217C19.4766 5.271 19.5469 5.32715 19.6094 5.39062C19.6719 5.4541 19.7305 5.52246 19.7773 5.59619L19.7773 5.59619C19.8242 5.66455 19.8633 5.7373 19.8945 5.81396C19.9297 5.89209 19.9531 5.97119 19.9688 6.05225C19.9883 6.14404 20 6.23779 20 6.3335L20 12.2441C20 12.3398 19.9883 12.4336 19.9688 12.5249C19.9531 12.606 19.9297 12.6855 19.8945 12.7632C19.8633 12.8403 19.8242 12.9131 19.7773 12.9814C19.7305 13.0547 19.6719 13.123 19.6094 13.187C19.5469 13.2505 19.4766 13.3066 19.4023 13.3555C19.3359 13.4009 19.2617 13.4399 19.1875 13.4722C19.1094 13.5054 19.0273 13.5303 18.9492 13.5479C18.8555 13.5674 18.7617 13.5771 18.668 13.5771L18.3906 13.5771C18.0664 13.5771 17.8125 13.3232 17.8125 13C17.8125 12.6768 18.0664 12.4229 18.3906 12.4229L18.668 12.4229C18.6914 12.4229 18.7734 12.3789 18.793 12.3701C18.8086 12.353 18.8359 12.2651 18.8438 12.2441L18.8438 6.3335C18.8438 6.30859 18.8008 6.22803 18.793 6.20703C18.7773 6.18945 18.6875 6.16357 18.668 6.15479L10.2812 6.15479C10.2578 6.15479 10.1758 6.19824 10.1562 6.20703C10.1367 6.22461 10.1133 6.3125 10.1016 6.3335L10.1016 6.90332C10.1016 7.22656 9.84766 7.48047 9.52734 7.48047C9.20312 7.48047 8.94922 7.22656 8.94922 6.90332ZM6.47266 9.39307L6.47266 9.21973C6.47266 9.12402 6.48438 9.03027 6.50391 8.93896C6.51953 8.85791 6.54688 8.77832 6.57812 8.70068C6.61328 8.62354 6.65234 8.55127 6.69531 8.48242C6.74609 8.40918 6.80078 8.34082 6.86328 8.27734C6.92969 8.21338 6.99609 8.15723 7.07031 8.10889C7.13672 8.06299 7.21094 8.02441 7.28906 7.9917C7.36719 7.9585 7.44531 7.93359 7.52734 7.91602C7.61719 7.89648 7.71094 7.88672 7.80859 7.88672L16.1914 7.88672C16.2891 7.88672 16.3828 7.89648 16.4727 7.91602C16.5547 7.93359 16.6328 7.9585 16.7109 7.9917C16.7891 8.02441 16.8594 8.06299 16.9297 8.1084C17.0039 8.15723 17.0703 8.21338 17.1367 8.27734C17.1992 8.34082 17.2539 8.40918 17.3047 8.48242C17.3477 8.55127 17.3867 8.62354 17.4219 8.70068C17.4531 8.77832 17.4805 8.85791 17.4961 8.93896C17.5156 9.03027 17.5273 9.12402 17.5273 9.21973L17.5273 15.1304C17.5273 15.2266 17.5156 15.3198 17.4961 15.4116C17.4805 15.4927 17.4531 15.5718 17.4219 15.6499C17.3867 15.7266 17.3477 15.7993 17.3047 15.8682C17.2539 15.9414 17.1992 16.0098 17.1367 16.0732C17.0703 16.1367 17.0039 16.1929 16.9297 16.2417C16.8633 16.2871 16.7891 16.3262 16.7109 16.3589C16.6328 16.3916 16.5547 16.417 16.4727 16.4346C16.3828 16.4541 16.2891 16.4639 16.1914 16.4639L15.8789 16.4639C15.5547 16.4639 15.3008 16.21 15.3008 15.8867C15.3008 15.5635 15.5547 15.3091 15.8789 15.3091L16.1914 15.3091C16.2188 15.3091 16.2969 15.2656 16.3203 15.2568C16.3359 15.2393 16.3633 15.1519 16.3711 15.1304L16.3711 9.21973C16.3711 9.19531 16.3281 9.11475 16.3203 9.09375C16.3008 9.07617 16.2148 9.0498 16.1914 9.04102L7.80859 9.04102C7.78125 9.04102 7.70312 9.08496 7.67969 9.09375C7.66406 9.11084 7.63672 9.19873 7.62891 9.21973L7.62891 9.39307C7.62891 9.71631 7.375 9.97021 7.05078 9.97021C6.72656 9.97021 6.47266 9.71631 6.47266 9.39307ZM14 10.3901C13.9062 10.3706 13.8125 10.3608 13.7188 10.3608L5.33203 10.3608C5.23828 10.3608 5.14453 10.3706 5.05078 10.3901L5.05078 10.3901C4.97266 10.4077 4.89062 10.4331 4.8125 10.4658C4.73828 10.4985 4.66406 10.5376 4.59766 10.583L4.59766 10.583L4.59766 10.583C4.52344 10.6318 4.45312 10.688 4.39062 10.7515C4.32812 10.8149 4.26953 10.8833 4.22266 10.957C4.17578 11.0254 4.13672 11.0981 4.10547 11.1748C4.07031 11.2529 4.04688 11.332 4.03125 11.4131L4.03125 11.4131C4.01172 11.5049 4 11.5981 4 11.6943L4 17.605C4 17.7007 4.01172 17.7944 4.03125 17.8857C4.04688 17.9668 4.07031 18.0464 4.10547 18.124C4.13672 18.2012 4.17578 18.2739 4.22266 18.3423C4.26953 18.4155 4.32812 18.4839 4.39062 18.5479C4.45312 18.6113 4.52344 18.6675 4.59766 18.7163C4.66406 18.7617 4.73828 18.8008 4.8125 18.833C4.89062 18.8662 4.97266 18.8911 5.05078 18.9087L5.05078 18.9087C5.14453 18.9282 5.23828 18.938 5.33203 18.938L13.7188 18.938C13.8125 18.938 13.9062 18.9282 14 18.9087C14.082 18.8911 14.1602 18.8662 14.2383 18.833C14.3125 18.8008 14.3867 18.7617 14.457 18.7163C14.5273 18.6675 14.5977 18.6113 14.6602 18.5479C14.7227 18.4839 14.7812 18.4155 14.8281 18.3423C14.875 18.2739 14.9141 18.2012 14.9453 18.124C14.9805 18.0464 15.0039 17.9668 15.0234 17.8857C15.043 17.7944 15.0508 17.7007 15.0508 17.605L15.0508 11.6943C15.0508 11.5981 15.043 11.5049 15.0234 11.4131C15.0039 11.332 14.9805 11.2529 14.9453 11.1748C14.9141 11.0981 14.875 11.0254 14.8281 10.957C14.7812 10.8833 14.7227 10.8149 14.6602 10.7515C14.5977 10.688 14.5273 10.6318 14.457 10.583C14.3867 10.5376 14.3125 10.4985 14.2383 10.4658C14.1602 10.4331 14.082 10.4077 14 10.3901ZM5.33203 11.5156L13.7188 11.5156C13.7383 11.5244 13.8281 11.5503 13.8438 11.5679C13.8516 11.5889 13.8984 11.6694 13.8984 11.6943L13.8984 17.605C13.8867 17.626 13.8633 17.7139 13.8438 17.731C13.8242 17.7397 13.7422 17.7837 13.7188 17.7837L5.33203 17.7837C5.3125 17.7749 5.22266 17.7485 5.20703 17.731C5.19922 17.71 5.15625 17.6294 5.15625 17.605L5.15625 11.6943C5.16406 11.6733 5.19141 11.5854 5.20703 11.5679C5.22266 11.5503 5.3125 11.5244 5.33203 11.5156ZM11 12.7754C10.8086 12.5776 10.5 12.5742 10.3008 12.7676C10.1055 12.9614 10.1016 13.2695 10.293 13.4678L11 14.1875L8.36719 14.1875C8.08984 14.1875 7.87109 14.4053 7.87109 14.6826C7.87109 14.9595 8.08984 15.1772 8.36719 15.1772L10.9414 15.1772L10.2969 15.8286C10.1016 16.0254 10.1016 16.3335 10.3008 16.5283C10.4961 16.7236 10.8047 16.7222 11 16.5254L12.5039 15.0078C12.6172 14.8926 12.6758 14.7769 12.6758 14.6611C12.6758 14.5459 12.6172 14.4297 12.5039 14.3135L11 12.7754ZM7.39453 13.6792L7.39453 15.9336C7.39453 16.2109 7.17969 16.4287 6.90234 16.4287C6.625 16.4287 6.40625 16.2109 6.40625 15.9336L6.40625 13.6792C6.40625 13.4019 6.625 13.1841 6.90234 13.1841C7.17969 13.1841 7.39453 13.4019 7.39453 13.6792Z",fill:"rgb(255,255,255)","fill-rule":"evenodd"},null,-1)])])}const G5={name:"events-icon-release",render:j5},W5={summit:"--o-orange-6",events:"--o-cyan-6",competition:"--o-blue-6",release:"--o-purple-6"},Y5={events:$5,competition:H5,release:G5,summit:R5},js={上海:"https://infrastructure-website.osinfra.cn/picture/city/shanghai.jpg",北京:"https://infrastructure-website.osinfra.cn/picture/city/beijing.jpg",南京:"https://infrastructure-website.osinfra.cn/picture/city/nanjing.jpg",天津:"https://infrastructure-website.osinfra.cn/picture/city/tianjin.jpg",成都:"https://infrastructure-website.osinfra.cn/picture/city/chengdu.jpg",无锡:"https://infrastructure-website.osinfra.cn/picture/city/wuxi.jpg",杭州:"https://infrastructure-website.osinfra.cn/picture/city/hangzhou.jpg",深圳:["https://infrastructure-website.osinfra.cn/picture/city/shenzhen1.jpg","https://infrastructure-website.osinfra.cn/picture/city/shenzhen2.jpg"],苏州:"https://infrastructure-website.osinfra.cn/picture/city/suzhou.jpg",西安:"https://infrastructure-website.osinfra.cn/picture/city/xian.jpg",郑州:"https://infrastructure-website.osinfra.cn/picture/city/zhengzhou.jpg",武汉:"https://infrastructure-website.osinfra.cn/picture/city/wuhan.jpg"},X5="https://infrastructure-website.osinfra.cn/picture/city/default-cover.jpg",K5={class:"o-events-calendar"},Q5={key:0,class:"month-list"},Z5={class:"collapse-header"},J5={class:"collapse-title"},eS={key:0,class:"collapse-desc"},tS={key:0,class:"month-content month-content-span"},iS={key:0,class:"event-location"},nS={class:"event-name"},rS={key:1},sS={key:0,class:"month-content-row"},aS={class:"month-name"},oS={class:"event-name"},lS={class:"event-location"},uS={class:"event-name"},cS={class:"event-location"},dS={key:1,class:"month-content month-content-column"},hS={class:"event-location"},fS={class:"event-name"},pS={key:1},ih=t.defineComponent({__name:"OEventsCalendar",props:{data:{default:()=>[]}},setup(r){const e=Ca(),{lePadV:i}=It.useScreen(),n=r,s=["JAN","FEB","MAR","Apr","May","JUN","Jul","Aug","Sep","Oct","Nov","Dec"],a=t.ref([]);t.watch([()=>n.data,()=>i.value],()=>{var g;n.data.length?i.value?a.value=[(g=n.data[0])==null?void 0:g.name]:a.value=n.data.map(S=>S.name):a.value=[]},{immediate:!0});const o=g=>{const S=g.split("/");return parseInt(S[1],10)},l=g=>{const S=new Array(12).fill(0),T=[];return g.forEach((b,y)=>{const[x,N]=Array.isArray(b.date)?[o(b.date[0]),o(b.date[1])]:[o(b.date),o(b.date)];let I=0;for(let z=x-1;z<N;z++)I=Math.max(I,S[z]);const D=I+1;for(let z=x-1;z<N;z++)S[z]=D;T.push({event:b,row:D,eventIndex:y,start:x,end:N})}),T},c=g=>{const S=Array.from({length:12},()=>[]);return g.forEach(T=>{const b=Array.isArray(T.date)?o(T.date[0]):o(T.date);S[b-1].push(T)}),S},d=g=>{const S=g.color||W5[g.type];return S!=null&&S.startsWith("--")?`var(${S})`:S},m=g=>g.icon?g.icon:Y5[g.type];return(g,S)=>(t.openBlock(),t.createElementBlock("div",K5,[t.unref(i)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Q5,[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(s,T=>t.createElementVNode("div",{class:"month-header",key:T},t.toDisplayString(T),1)),64))])),t.createVNode(t.unref(A.OCollapse),{modelValue:a.value,"onUpdate:modelValue":S[0]||(S[0]=T=>a.value=T)},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.data,(T,b)=>(t.openBlock(),t.createBlock(t.unref(A.OCollapseItem),{key:b,value:T.name},{title:t.withCtx(()=>[t.createElementVNode("div",Z5,[t.createElementVNode("div",J5,[t.createElementVNode("div",{class:"title-icon",style:t.normalizeStyle({"--bg-color":d(T)})},[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(m(T))))]),_:2},1024)],4),t.createElementVNode("span",null,t.toDisplayString(T.name),1)]),T.desc?(t.openBlock(),t.createElementBlock("div",eS,[t.withDirectives(t.createElementVNode("div",null,null,512),[[t.unref(e),T.desc]])])):t.createCommentVNode("",!0)])]),default:t.withCtx(()=>[T.isSpanMonth?(t.openBlock(),t.createElementBlock("div",tS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l(T.data),({event:y,row:x,eventIndex:N,start:I,end:D})=>(t.openBlock(),t.createElementBlock("div",{key:N,class:t.normalizeClass(["event-item",{"event-item-center":y.align==="center","has-link":y.link}]),style:t.normalizeStyle({gridColumn:`${I} / ${D+1}`,gridRow:x,"--bg-color":d(T)||void 0})},[y.location?(t.openBlock(),t.createElementBlock("div",iS,t.toDisplayString(y.location),1)):t.createCommentVNode("",!0),t.createElementVNode("div",nS,[y.link?(t.openBlock(),t.createBlock(t.unref(A.OLink),t.mergeProps({key:0,href:y.link,target:"_blank"},{ref_for:!0},y.linkProps||{}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(y.name),1)]),_:2},1040,["href"])):(t.openBlock(),t.createElementBlock("span",rS,t.toDisplayString(y.name),1))])],6))),128))])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.unref(i)?(t.openBlock(),t.createElementBlock("div",sS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c(T.data),(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:x,class:t.normalizeClass(["month-row",{"empty-month":y.length===0}])},[t.createElementVNode("div",aS,t.toDisplayString(s[x]),1),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y,(N,I)=>(t.openBlock(),t.createElementBlock("div",{key:I,class:t.normalizeClass(["event-item",N.link?"has-link":""]),style:t.normalizeStyle({"--bd-color":d(T)||void 0})},[N.link?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,href:N.link,target:"_blank"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createElementVNode("div",oS,[t.createElementVNode("span",null,t.toDisplayString(N.name),1)]),t.createElementVNode("div",lS,t.toDisplayString(N.location),1)]),t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})]),_:2},1032,["href"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",uS,t.toDisplayString(N.name),1),t.createElementVNode("div",cS,t.toDisplayString(N.location),1)],64))],6))),128))],2))),128))])):(t.openBlock(),t.createElementBlock("div",dS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c(T.data),(y,x)=>(t.openBlock(),t.createElementBlock("div",{key:x,class:"month-column"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y,(N,I)=>(t.openBlock(),t.createElementBlock("div",{key:I,class:t.normalizeClass(["event-item",N.link?"has-link":""]),style:t.normalizeStyle({"--bg-color":d(T)||void 0})},[t.createElementVNode("div",hS,t.toDisplayString(N.location),1),t.createElementVNode("div",fS,[N.link?(t.openBlock(),t.createBlock(t.unref(A.OLink),{key:0,href:N.link,target:"_blank"},{suffix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconChevronRight))]),_:1})]),default:t.withCtx(()=>[t.createElementVNode("span",null,t.toDisplayString(N.name),1)]),_:2},1032,["href"])):(t.openBlock(),t.createElementBlock("span",pS,t.toDisplayString(N.name),1))])],6))),128))]))),128))]))],64))]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])]))}});var Zi=(r=>(r.FINISH="finish",r.ING="ing",r.ALL="",r))(Zi||{});const Gs=(r,e)=>new Date(r).getTime()>new Date(e).getTime(),mS={class:"o-events-list"},gS={class:"filter-wrapper"},vS={class:"filter-left"},yS={class:"list-content"},_S={class:"event-name"},TS={class:"event-desc"},bS={class:"event-date"},CS={key:0,class:"event-location"},nh=t.defineComponent({__name:"OEventsList",props:{data:{default:()=>[]},page:{},pageSize:{},total:{}},emits:["search"],setup(r,{emit:e}){const{t:i}=Ue.useI18n(),{lePadV:n}=It.useScreen(),s=r,a=[{label:i("events.statusAll"),value:Zi.ALL},{label:i("events.statusIng"),value:Zi.ING},{label:i("events.statusFinish"),value:Zi.FINISH}],o=e,l=t.ref(Zi.ALL),c=t.ref(""),d=t.ref(""),m=(b={})=>{o("search",Object.assign({page:s.page,pageSize:s.pageSize,status:l.value,keyword:d.value},b))},g=()=>{m()},S=()=>{d.value=c.value,m()},T=t.computed(()=>s.data.map(b=>{let y=b.startDate,x=b.endDate,N=ye(b.date).format("YYYY/MM/DD");if(y&&x){const I=ye().format("YYYY-01-01");Gs(I,y)&&(y=I);const D=ye().format("YYYY-12-31");Gs(x,D)&&(x=D),N=`${ye(y).format("YYYY/MM/DD")}-${ye(x).format("MM/DD")}`}return{...b,startDate:y,endDate:x,dateStr:N,status:Gs(new Date,b.date||b.endDate)?Zi.FINISH:Zi.ING}}).sort((b,y)=>Gs(b.date||b.endDate,y.date||y.endDate)?-1:1).map(b=>{var N,I,D;const y=(D=(I=(N=b.city)==null?void 0:N.replace("市",""))==null?void 0:I.replace("中国",""))==null?void 0:D.replaceAll(" ","");let x=null;return Array.isArray(js[y])?x=js[y][b.name.length%js[y].length]:x=js[y],x||(x=X5),{...b,cover:x}}));return(b,y)=>(t.openBlock(),t.createElementBlock("div",mS,[t.createElementVNode("div",gS,[t.createElementVNode("div",vS,[t.createElementVNode("span",null,t.toDisplayString(t.unref(i)("events.status")),1),t.createVNode(t.unref(A.ORadioGroup),{modelValue:l.value,"onUpdate:modelValue":y[0]||(y[0]=x=>l.value=x),style:{"--radio-group-gap":"8px"},onChange:g},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(a,x=>t.createVNode(t.unref(A.ORadio),{key:x.value,value:x.value},{radio:t.withCtx(({checked:N})=>[t.createVNode(t.unref(A.OToggle),{checked:N},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(x.label),1)]),_:2},1032,["checked"])]),_:2},1032,["value"])),64))]),_:1},8,["modelValue"])]),t.createVNode(t.unref(A.OInput),{modelValue:c.value,"onUpdate:modelValue":y[1]||(y[1]=x=>c.value=x),placeholder:t.unref(i)("events.searchPlaceholder"),onPressEnter:S,onClear:S,clearable:""},{prefix:t.withCtx(()=>[t.createVNode(t.unref(A.OIcon),{class:"input-icon"},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconSearch))]),_:1})]),_:1},8,["modelValue","placeholder"])]),t.createElementVNode("div",yS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(T.value,x=>(t.openBlock(),t.createBlock(t.unref(A.OCard),{key:x.name,cover:x.cover,href:x.link},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OTag),{class:"event-status"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(x.status===t.unref(Zi).ING?t.unref(i)("events.statusIng"):t.unref(i)("events.statusFinish")),1)]),_:2},1024),t.createElementVNode("div",_S,t.toDisplayString(x.name),1),t.createElementVNode("div",TS,[t.createElementVNode("div",bS,t.toDisplayString(x.dateStr),1),t.createVNode(t.unref(A.ODivider),{direction:"v"}),x.city?(t.openBlock(),t.createElementBlock("div",CS,t.toDisplayString(x.city),1)):t.createCommentVNode("",!0)])]),_:2},1032,["cover","href"]))),128))]),T.value.length?t.createCommentVNode("",!0):t.renderSlot(b.$slots,"empty",{key:0}),r.total>8?(t.openBlock(),t.createBlock(t.unref(A.OPagination),{key:1,page:r.page,simple:t.unref(n),"show-total":!0,pageSize:r.pageSize,total:r.total,onChange:m,pageSizes:[4,12,24,36,48]},null,8,["page","simple","pageSize","total"])):t.createCommentVNode("",!0)]))}}),xS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function SS(r,e){return t.openBlock(),t.createElementBlock("svg",xS,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"#1da9ff",d:"M20.4 5.95c0.27-0.27 0.71-0.27 0.99 0 0.24 0.25 0.27 0.63 0.070 0.91l-0.070 0.080-10.5 10.47c-0.53 0.53-1.36 0.56-1.93 0.1l-0.11-0.1-5.23-5.2c-0.28-0.28-0.28-0.72-0.010-0.99 0.25-0.25 0.63-0.28 0.91-0.080l0.080 0.070 5.24 5.21c0.010 0.010 0.030 0.010 0.040 0.010l0.030-0.010 10.49-10.47z"},null,-1)])])}const ES={name:"events-icon-checked",render:SS},kS={class:"o-events-apply"},wS={class:"events-apply-grid"},DS={class:"timeline-number"},AS={class:"number-circle"},IS={class:"step-title"},NS={class:"step-idx"},OS={class:"step-desc"},BS={key:0},LS={class:"desc-list-wrapper"},PS={key:0,class:"desc-list-title"},MS={class:"desc-list-content"},RS={class:"desc-list-item-title"},VS={class:"desc-list-item-desc"},rh=t.defineComponent({__name:"OEventsApply",props:{steps:{}},setup(r){const{isDark:e}=It.useTheme(),i=Ca();return(n,s)=>(t.openBlock(),t.createElementBlock("div",kS,[t.createElementVNode("div",wS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.steps,(a,o)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:o},[t.createElementVNode("div",DS,[t.createElementVNode("div",AS,t.toDisplayString(o+1),1)]),t.createElementVNode("div",{class:t.normalizeClass(["step-item",`step-${o+1} ${t.unref(e)?"is-dark":""}`]),style:{}},[t.createElementVNode("div",IS,[t.createElementVNode("div",NS,t.toDisplayString(o+1),1),t.createElementVNode("span",null,t.toDisplayString(a.title),1)]),t.createElementVNode("div",OS,[a.desc?t.withDirectives((t.openBlock(),t.createElementBlock("div",BS,null,512)),[[t.unref(i),a.desc]]):t.createCommentVNode("",!0),t.renderSlot(n.$slots,`step${o+1}`),t.createElementVNode("div",LS,[a.listTitle?(t.openBlock(),t.createElementBlock("div",PS,t.toDisplayString(a.listTitle),1)):t.createCommentVNode("",!0),t.createElementVNode("div",MS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.list,(l,c)=>(t.openBlock(),t.createElementBlock("div",{class:"desc-list-item",key:c},[t.createElementVNode("div",RS,[t.createVNode(t.unref(A.OIcon),null,{default:t.withCtx(()=>[t.createVNode(t.unref(ES))]),_:1}),t.createElementVNode("span",null,t.toDisplayString(l.title),1)]),t.createElementVNode("div",VS,t.toDisplayString(l.desc),1)]))),128))])])]),a.img?(t.openBlock(),t.createElementBlock("div",{key:0,class:"img-wrapper",style:t.normalizeStyle({backgroundImage:`url(${a.img})`})},null,4)):t.createCommentVNode("",!0),a.imgPhone?(t.openBlock(),t.createElementBlock("div",{key:1,class:"img-wrapper-phone",style:t.normalizeStyle({backgroundImage:`url(${a.imgPhone})`})},null,4)):t.createCommentVNode("",!0)],2)],64))),128))])]))}}),FS=Object.assign(ih,{install(r){r.component("OEventsCalendar",ih)}}),$S=Object.assign(nh,{install(r){r.component("OEventsList",nh)}}),US=Object.assign(rh,{install(r){r.component("OEventsApply",rh)}}),zS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function HS(r,e){return t.openBlock(),t.createElementBlock("svg",zS,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M9.461 11.616l4.719-3.932c0.212-0.177 0.527-0.148 0.704 0.064 0.075 0.090 0.116 0.203 0.116 0.32v7.865c0 0.276-0.224 0.5-0.5 0.5-0.117 0-0.23-0.041-0.32-0.116l-4.719-3.932c-0.212-0.177-0.241-0.492-0.064-0.704 0.019-0.023 0.041-0.045 0.064-0.064z"},null,-1)])])}const qS={name:"components-icon-caret-left",render:HS},jS={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function GS(r,e){return t.openBlock(),t.createElementBlock("svg",jS,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M14.539 11.616l-4.719-3.932c-0.212-0.177-0.527-0.148-0.704 0.064-0.075 0.090-0.116 0.203-0.116 0.32v7.865c0 0.276 0.224 0.5 0.5 0.5 0.117 0 0.23-0.041 0.32-0.116l4.719-3.932c0.212-0.177 0.241-0.492 0.064-0.704-0.019-0.023-0.041-0.045-0.064-0.064z"},null,-1)])])}const WS={name:"components-icon-caret-right",render:GS},YS={class:"header-nav-wrap"},XS={key:0,class:"right-icon"},KS=["onMouseenter","onMouseleave"],QS=["id"],ZS={class:"nav-text"},JS=["id","onClick"],eE={class:"nav-text"},tE={key:1,class:"right-icon"},iE=t.defineComponent({__name:"HeaderNav",props:{navData:{},activeIndex:{},hoverId:{}},emits:["handle-mouseenter","handle-mouseleave","handle-click"],setup(r,{emit:e}){const i=e,{isDark:n}=It.useTheme(),s=r,a=t.ref(),o=t.ref(),l=t.ref(null),c=t.ref(!1),d=t.ref(!1),m=t.ref(),g=fi.useDebounceFn((H,U)=>{m.value=H==null?void 0:H.id,U==="mouseenter"&&i("handle-mouseenter",H),U==="mouseleave"&&(m.value="",i("handle-mouseleave",H))},100),S=H=>{i("handle-click",H)},T=()=>{d.value=!0,t.nextTick(()=>{a.value.scrollTo({left:a.value.clientWidth,behavior:"smooth"})})},b=()=>{a.value.scrollTo({left:0,behavior:"smooth"}),d.value=!1},y=()=>{var H,U;((H=a.value)==null?void 0:H.clientWidth)<((U=o.value)==null?void 0:U.clientWidth)?c.value=!0:c.value=!1};let x=0,N=0;const I=()=>N=0,D=H=>N>0?void N++:(N++,x=Date.now(),{event:"hover",properties:{module:"navigation",level1:H,target:H}}),z=H=>({properties:{module:"navigation",level1:H.label,target:H.label,steps:N,url:H.href,duration:Date.now()-x}});return t.onMounted(()=>{window.addEventListener("resize",y),t.nextTick(()=>{y(),l.value=setTimeout(()=>{y()},1e3)})}),t.onUnmounted(()=>{window.removeEventListener("resize",y),clearTimeout(l.value)}),(H,U)=>{const B=t.resolveDirective("analytics");return t.openBlock(),t.createElementBlock("div",YS,[t.createElementVNode("div",{class:t.normalizeClass(["header-nav",{"header-nav-scroll":d.value}])},[d.value?(t.openBlock(),t.createElementBlock("div",XS,[t.createVNode(t.unref(A.OIcon),{onClick:b},{default:t.withCtx(()=>[t.createVNode(t.unref(qS))]),_:1})])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_key:"navRef",ref:a,class:t.normalizeClass(["o-nav",{"o-nav-scroll":d.value||!c.value,dark:t.unref(n)}])},[t.createElementVNode("ul",{ref_key:"navListRef",ref:o,class:"o-nav-list",onMouseenter:I},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.navData,(G,C)=>{var k;return t.withDirectives((t.openBlock(),t.createElementBlock("li",{key:G.id,class:t.normalizeClass({"is-selected":m.value===G.id||s.hoverId===G.id,"is-active":s.activeIndex===C}),onMouseenter:O=>t.unref(g)(G,"mouseenter"),onMouseleave:O=>t.unref(g)(G,"mouseleave")},[(k=G==null?void 0:G.children)!=null&&k.length?(t.openBlock(),t.createElementBlock("div",{key:0,id:"tour_headerNav_"+G.id,class:"nav-item"},[t.createElementVNode("span",ZS,t.toDisplayString(G.label),1)],8,QS)):(t.openBlock(),t.createElementBlock("div",{key:1,id:"tour_headerNav_"+G.id,class:"nav-item item-other",onClick:O=>S(G)},[t.createElementVNode("span",eE,t.toDisplayString(G.label),1),G.tag?(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:0,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(G.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,JS))],42,KS)),[[B,D(G.label),"mouseenter"],[B,z(G),void 0,{catchBubble:!0}]])}),128))],544)],2),c.value&&!d.value?(t.openBlock(),t.createElementBlock("div",tE,[t.createVNode(t.unref(A.OIcon),{onClick:T},{default:t.withCtx(()=>[t.createVNode(t.unref(WS))]),_:1})])):t.createCommentVNode("",!0)],2)])}}}),nE=Ue._export_sfc(iE,[["__scopeId","data-v-fe042238"]]),rE={class:"nav-sub-content"},sE={class:"content-left"},aE={class:"content-label"},oE={class:"content-container"},lE=["href","target"],uE={class:"item-name"},cE={key:0,class:"desc-container"},dE=["title"],hE={key:0,class:"split-line"},fE={key:1,class:"content-right"},pE={class:"content-label"},mE=["href","target"],gE=["href","target"],vE=["src"],yE={class:"review-content"},_E={class:"review-label"},TE={class:"review-property"},bE=t.defineComponent({__name:"HeaderContent",props:{itemData:{},itemVisible:{type:Boolean},community:{},bgLeft:{},bgRight:{},hoverIndex:{}},emits:["handle-mouseenter-sub","handle-mouseleave-sub"],setup(r,{emit:e}){const i=e,n=r,{locale:s}=It.useLocale(),{theme:a}=It.useTheme(),o=t.ref(!1),l=()=>{var T;i("handle-mouseenter-sub",(T=n.itemData)==null?void 0:T.id),o.value=!0},c=()=>{i("handle-mouseenter-sub",""),o.value=!1},d=t.ref(!1),m=T=>{if(!T||!T.target)return;const b=T.target;d.value=b.clientHeight<b.scrollHeight},g=(T,b)=>({properties:{module:"navigation",level1:T.label,level2:b.label,target:b.label,url:T.href}}),S=T=>({properties:{module:"navigation",level1:s.value==="zh"?"快捷链接":"Quick Link",level2:T.label,target:T.label,url:T.href}});return(T,b)=>{var x,N,I;const y=t.resolveDirective("analytics");return t.openBlock(),t.createElementBlock("div",{onMouseenter:l,onMouseleave:c},[(n.itemVisible||o.value)&&((N=(x=n.itemData)==null?void 0:x.children)!=null&&N.length)?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["nav-content",[(I=n.community)==null?void 0:I.toLowerCase(),n.hoverIndex,t.unref(a),`${n.hoverIndex}-${t.unref(s)}`]])},[t.createElementVNode("div",{class:"nav-background-left",style:t.normalizeStyle({backgroundImage:`url(${n.bgLeft})`})},null,4),t.createElementVNode("div",{class:"nav-background-right",style:t.normalizeStyle({backgroundImage:`url(${n.bgRight})`})},null,4),t.createVNode(gn,null,{default:t.withCtx(()=>[t.createVNode(t.unref(A.OScroller),{class:"nav-scroller","show-type":"always",size:"small","disabled-y":""},{default:t.withCtx(()=>{var D,z,H,U,B,G,C,k;return[t.createElementVNode("div",rE,[t.createElementVNode("div",sE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList((D=n.itemData)==null?void 0:D.children,(O,j)=>(t.openBlock(),t.createElementBlock("div",{class:"item-sub",key:j},[t.createElementVNode("span",aE,t.toDisplayString(O.label),1),t.createElementVNode("div",oE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(O.children,L=>(t.openBlock(),t.createElementBlock("div",{key:L.label,class:"content-item"},[t.withDirectives((t.openBlock(),t.createElementBlock("a",{href:L.href,target:(L==null?void 0:L.target)||"_self",rel:"noopener noreferrer",class:"item-label"},[t.createElementVNode("span",uE,t.toDisplayString(L.label),1),L.icon?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(L.icon)))]),_:2},1024)):t.createCommentVNode("",!0),L.tag?(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(L.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,lE)),[[y,()=>g(O,L)]]),L.description?(t.openBlock(),t.createElementBlock("div",cE,[t.createElementVNode("p",{class:"item-desc",title:d.value?L.description:void 0,onMouseenter:b[0]||(b[0]=V=>m(V))},t.toDisplayString(L.description),41,dE)])):t.createCommentVNode("",!0)]))),128))])]))),128))]),(H=(z=n.itemData)==null?void 0:z.shortcut)!=null&&H.length?(t.openBlock(),t.createElementBlock("div",hE)):t.createCommentVNode("",!0),(B=(U=n.itemData)==null?void 0:U.shortcut)!=null&&B.length?(t.openBlock(),t.createElementBlock("div",fE,[t.createElementVNode("span",pE,t.toDisplayString(t.unref(s)==="zh"?"快捷链接":"Quick Link"),1),(G=n.itemData)!=null&&G.withPicture?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList((k=n.itemData)==null?void 0:k.shortcut,O=>t.withDirectives((t.openBlock(),t.createElementBlock("a",{key:O.label,href:O.href,target:(O==null?void 0:O.target)||"_self",rel:"noopener noreferrer",class:"review"},[t.createElementVNode("img",{src:O.picture,class:"review-picture"},null,8,vE),t.createElementVNode("div",yE,[t.createElementVNode("p",_E,t.toDisplayString(O.label),1),t.createElementVNode("div",TE,t.toDisplayString(O.remark),1)])],8,gE)),[[y,()=>S(O)]])),128)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList((C=n.itemData)==null?void 0:C.shortcut,O=>(t.openBlock(),t.createElementBlock("div",{key:O.label,class:"shortcut"},[t.withDirectives((t.openBlock(),t.createElementBlock("a",{href:O.href,target:(O==null?void 0:O.target)||"_self",rel:"noopener noreferrer",class:"shortcut-link"},[t.createElementVNode("span",null,t.toDisplayString(O.label),1),O.icon?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(O.icon)))]),_:2},1024)):t.createCommentVNode("",!0)],8,mE)),[[y,()=>S(O)]])]))),128))])):t.createCommentVNode("",!0)])]}),_:1})]),_:1})],2)):t.createCommentVNode("",!0)],32)}}}),CE=Ue._export_sfc(bE,[["__scopeId","data-v-a2219e83"]]),xE={class:"header"},SE=["src"],EE={class:"header-nav"},kE={key:0,class:"header-toolbar"},wE={class:"header-nav-content"},DE=t.defineComponent({__name:"OHeader",props:{logo:{},community:{},navData:{},bgLeft:{},bgRight:{},activeIndex:{},codeData:{},langData:{},isSimpleHeader:{type:Boolean},headerTitle:{}},emits:["go-home","handle-click"],setup(r,{emit:e}){const{isDark:i}=It.useTheme(),n=e,s=r,a=t.ref(),o=t.ref(),l=t.ref(),c=t.ref(!1),d=()=>{n("go-home")},m=y=>{var x;l.value=y,a.value=y.id,(x=y==null?void 0:y.children)!=null&&x.length&&(c.value=!0)},g=y=>{c.value=!1},S=y=>{n("handle-click",y)},T=y=>{o.value=y},b=y=>{o.value=y};return(y,x)=>(t.openBlock(),t.createElementBlock("div",xE,[t.createElementVNode("div",{class:t.normalizeClass(["header-wrap",{"header-wrap-dark":t.unref(i)}])},[t.createVNode(gn,{class:"header-content"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:"header-logo",onClick:d},[t.renderSlot(y.$slots,"logo",{},()=>[s.logo?(t.openBlock(),t.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:s.logo},null,8,SE)):t.createCommentVNode("",!0)],!0)]),t.createElementVNode("div",EE,[t.renderSlot(y.$slots,"nav",{},()=>[s.navData?(t.openBlock(),t.createBlock(nE,{key:0,"nav-data":s.navData,hoverId:o.value,"active-index":s.activeIndex,onHandleMouseenter:m,onHandleMouseleave:g,onHandleClick:S},null,8,["nav-data","hoverId","active-index"])):t.createCommentVNode("",!0)],!0)]),y.$slots.toolbar?(t.openBlock(),t.createElementBlock("div",kE,[t.renderSlot(y.$slots,"toolbar",{},void 0,!0)])):t.createCommentVNode("",!0)]),_:3})],2),t.createElementVNode("div",wE,[t.createVNode(CE,{itemData:l.value,"item-visible":c.value,"bg-left":s.bgLeft,"bg-right":s.bgRight,community:s.community,"hover-index":a.value,onHandleMouseenterSub:T,onHandleMouseleaveSub:b},null,8,["itemData","item-visible","bg-left","bg-right","community","hover-index"])])]))}}),sh=Ue._export_sfc(DE,[["__scopeId","data-v-486d601a"]]);var dn=(r=>(r.NAV="nav",r.CODE="code",r.LANG="lang",r))(dn||{});const AE={class:"o-nav"},IE={class:"o-nav-list"},NE=["onClick"],OE={class:"nav-aside"},BE={key:0,class:"nav-aside-wrapper"},LE=["value"],PE={class:"content-label"},ME={class:"container-mobile"},RE=["onClick"],VE={class:"item-label"},FE={class:"desc-container"},$E={class:"item-desc"},UE=["onClick"],zE={class:"item-label"},HE={key:1,class:"nav-aside-wrapper"},qE=["onClick"],jE={class:"header-tool"},GE={key:2,class:"other-tool"},WE=t.defineComponent({__name:"HeaderNavMobile",props:{menuShow:{type:Boolean,default:!1},navData:{default:()=>[]},codeData:{default:()=>[]},langData:{default:()=>[]}},emits:["on-click","lang-click","handle-click"],setup(r,{emit:e}){const i=e,n=r,s=t.ref(""),a=t.ref({}),o=(d,m)=>{var g;m===dn.NAV?(g=d==null?void 0:d.children)!=null&&g.length?(s.value=d.id,a.value=d):i("handle-click",d):m===dn.CODE?(s.value=m,a.value=n.codeData.list):m===dn.LANG&&(s.value=m,a.value=n.langData.list)},l=(d,m)=>{window.open(d,m||"_self"),i("on-click")},c=d=>{s.value===dn.CODE?l(d.href,d==null?void 0:d.target):s.value===dn.LANG&&i("lang-click",d)};return t.onMounted(()=>{s.value=n.navData[0].id,a.value=n.navData[0]}),t.watch(()=>n.navData||n.codeData||n.langData,()=>{s.value===dn.CODE?a.value=n.codeData.list:s.value===dn.LANG?a.value=n.langData.list:a.value=n.navData.find(d=>d.id===s.value)},{deep:!0}),(d,m)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["header-nav",{active:r.menuShow}])},[t.createElementVNode("div",AE,[t.createElementVNode("ul",IE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.navData,g=>(t.openBlock(),t.createElementBlock("li",{key:g.id,class:t.normalizeClass({active:s.value===g.id})},[t.createElementVNode("span",{onClick:S=>o(g,"nav")},t.toDisplayString(g.label),9,NE)],2))),128))]),t.createElementVNode("div",OE,[s.value!=="code"&&s.value!=="lang"?(t.openBlock(),t.createElementBlock("ul",BE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value.children,g=>(t.openBlock(),t.createElementBlock("li",{value:g.label,key:g.label,class:"nav-aside-content"},[g!=null&&g.children?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createElementVNode("p",PE,t.toDisplayString(g.label),1),t.createElementVNode("div",ME,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g==null?void 0:g.children,S=>(t.openBlock(),t.createElementBlock("div",{key:S.label,class:"content-container-mobile"},[t.createElementVNode("a",{onClick:T=>l(S.href,S==null?void 0:S.target),rel:"noopener noreferrer",class:"content-subtitle"},[t.createElementVNode("span",VE,t.toDisplayString(S.label),1),S.icon?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(S.icon),{class:"icon"}))]),_:2},1024)):t.createCommentVNode("",!0),S.tag?(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small",class:"content-tag"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(S.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,RE),t.createElementVNode("div",FE,[t.createElementVNode("p",$E,t.toDisplayString(S.description),1)])]))),128))])],64)):(t.openBlock(),t.createElementBlock("a",{key:1,onClick:S=>l(g.href,g==null?void 0:g.target),rel:"noopener noreferrer",class:"content-subtitle item-not-children"},[t.createElementVNode("span",zE,t.toDisplayString(g.label),1),g.icon?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(g.icon),{class:"icon"}))]),_:2},1024)):t.createCommentVNode("",!0),g.tag?(t.openBlock(),t.createBlock(t.unref(A.OTag),{key:1,round:"pill",color:"danger",size:"small"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.tag),1)]),_:2},1024)):t.createCommentVNode("",!0)],8,UE))],8,LE))),128))])):(t.openBlock(),t.createElementBlock("div",HE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,g=>(t.openBlock(),t.createElementBlock("a",{key:g.label,onClick:S=>c(g),class:"source-code-item"},[t.createElementVNode("span",null,t.toDisplayString(g.label),1),g.icon?(t.openBlock(),t.createBlock(t.unref(A.OIcon),{key:0},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(g.icon),{class:"icon"}))]),_:2},1024)):t.createCommentVNode("",!0)],8,qE))),128))]))])]),t.createElementVNode("div",jE,[r.codeData?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["header-tool-item",{active:s.value==="code"}]),onClick:m[0]||(m[0]=g=>o(null,"code"))},t.toDisplayString(r.codeData.label),3)):t.createCommentVNode("",!0),r.langData?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["header-tool-item",{active:s.value==="lang"}]),onClick:m[1]||(m[1]=g=>o(null,"lang"))},t.toDisplayString(r.langData.label),3)):t.createCommentVNode("",!0),d.$slots.tool?(t.openBlock(),t.createElementBlock("div",GE,[t.renderSlot(d.$slots,"tool",{},void 0,!0)])):t.createCommentVNode("",!0)])],2))}}),YE=Ue._export_sfc(WE,[["__scopeId","data-v-7aa3e2e5"]]),XE={version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"};function KE(r,e){return t.openBlock(),t.createElementBlock("svg",XE,[...e[0]||(e[0]=[t.createElementVNode("path",{fill:"currentColor",d:"M3.8 5h16.4c0.442 0 0.8 0.359 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.358-0.8-0.8s0.358-0.8 0.8-0.8zM3.8 11h16.4c0.442 0 0.8 0.359 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.358-0.8-0.8s0.358-0.8 0.8-0.8zM3.8 17h16.4c0.442 0 0.8 0.358 0.8 0.8s-0.358 0.8-0.8 0.8h-16.4c-0.442 0-0.8-0.359-0.8-0.8s0.358-0.8 0.8-0.8z"},null,-1)])])}const QE={name:"components-icon-header-menu",render:KE},ZE={class:"header"},JE={class:"header-box"},e7={key:0,class:"header-simple"},t7={class:"simple-header-left"},i7={key:0,class:"header-title"},n7={key:0,class:"simple-header-right"},r7={class:"header-left"},s7={class:"header-center"},a7=["src"],o7={class:"header-right"},l7=t.defineComponent({__name:"OHeaderMobile",props:{logo:{},community:{},navData:{},bgLeft:{},bgRight:{},activeIndex:{},codeData:{},langData:{},isSimpleHeader:{type:Boolean},headerTitle:{}},emits:["go-back","lang-click","go-home"],setup(r,{emit:e}){const i=e,n=r,s=()=>{i("go-back")},a=()=>{i("go-home")},o=t.ref(!1),l=()=>{setTimeout(()=>{o.value=!o.value},200)},c=()=>{l()},d=()=>{l()},m=g=>{i("lang-click",g),l()};return(g,S)=>(t.openBlock(),t.createElementBlock("div",ZE,[t.createElementVNode("div",JE,[t.createVNode(gn,{class:"header-wrap"},{default:t.withCtx(()=>[r.isSimpleHeader?(t.openBlock(),t.createElementBlock("div",e7,[t.createElementVNode("div",t7,[t.createVNode(t.unref(A.OIcon),{onClick:s},{default:t.withCtx(()=>[t.createVNode(t.unref(A.OIconArrowLeft))]),_:1}),r.headerTitle?(t.openBlock(),t.createElementBlock("div",i7,t.toDisplayString(r.headerTitle),1)):t.createCommentVNode("",!0)]),g.$slots.rightConfig?(t.openBlock(),t.createElementBlock("div",n7,[t.renderSlot(g.$slots,"rightConfig",{},void 0,!0)])):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",r7,[t.createVNode(t.unref(A.OIcon),{onClick:l},{default:t.withCtx(()=>[o.value?(t.openBlock(),t.createBlock(t.unref(wl),{key:1})):(t.openBlock(),t.createBlock(t.unref(QE),{key:0}))]),_:1})]),t.createElementVNode("div",s7,[t.createElementVNode("div",{class:"header-logo",onClick:a},[t.renderSlot(g.$slots,"logo",{},()=>[n.logo?(t.openBlock(),t.createElementBlock("img",{key:0,class:"logo",alt:"logo",src:n.logo},null,8,a7)):t.createCommentVNode("",!0)],!0)])]),t.createElementVNode("div",o7,[t.renderSlot(g.$slots,"toolbar",{},void 0,!0)])],64))]),_:3})]),t.createElementVNode("div",{class:t.normalizeClass(["header-content-mb",{"header-content-active":o.value}])},[t.createVNode(YE,{ref:"mobileNav","nav-data":r.navData,"code-data":r.codeData,"lang-data":r.langData,"menu-show":o.value,onHandleClick:d,onOnClick:c,onLangClick:m},{tool:t.withCtx(()=>[t.renderSlot(g.$slots,"tool",{},void 0,!0)]),_:3},8,["nav-data","code-data","lang-data","menu-show"])],2)]))}}),ah=Ue._export_sfc(l7,[["__scopeId","data-v-1d6060f9"]]),u7=Object.assign(sh,{install(r){r.component("OHeader",sh)}}),c7=Object.assign(ah,{install(r){r.component("OHeaderMobile",ah)}}),d7={class:"o-search-input-box"},h7={key:0,class:"o-search-input-dropdown"},f7={key:0,class:"o-search-input-suggest-list-row"},p7={class:"o-search-input-suggest-list-label"},m7={class:"o-search-input-suggest-list"},g7=["onClick"],v7=["innerHTML"],y7={key:1},_7=t.defineComponent({__name:"OSearchInput",props:{modelValue:{default:""},imageUrl:{default:""},size:{default:"large"},placeholder:{},imagePlaceholder:{},enableImageSearch:{type:Boolean,default:!1},uploadImage:{},maxImageSize:{default:10*1024*1024},imageUploadTooltip:{},suggestItems:{default:()=>[]},onestepItems:{default:()=>[]},suggestTitle:{},onestepTitle:{},noDataText:{},showSuggestEmpty:{type:Boolean,default:!0},highlightKeyword:{type:Boolean,default:!0},debounce:{default:300},enableHistory:{type:Boolean,default:!0},historyItems:{default:()=>[]},maxHistoryCount:{default:6},storeHistory:{type:Boolean,default:!1},storageKey:{default:"search-history"},historyTitle:{},autoSaveHistory:{type:Boolean,default:!0},suggestList:{default:()=>[]},suggestListLabel:{},allowHtmlInSuggest:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},closeOnSearch:{type:Boolean,default:!0},closeOnClickOutside:{type:Boolean,default:!0},openOnFocus:{type:Boolean,default:!0},alwaysInlineThumbnail:{type:Boolean}},emits:["update:modelValue","update:imageUrl","update:historyItems","focus","blur","input","clear","search","recommend-click","onestep-click","history-click","suggest-list-click","delete-history","delete-history-item","image-upload-start","image-upload-success","image-upload-error","image-validate-error"],setup(r,{expose:e,emit:i}){const n=r,s=i,{t:a}=Ue.useI18n(),o=t.ref(),l=t.ref(null),c=t.computed({get:()=>n.modelValue,set:R=>s("update:modelValue",R)}),d=t.ref(!1),m=t.ref(!1),g=t.ref(!1),S=t.ref(!1),T=t.computed(()=>{if(!d.value||n.imageUrl||S.value)return!1;const R=!!c.value&&(n.suggestItems.length>0||n.onestepItems.length>0||n.showSuggestEmpty),ee=n.enableHistory&&I.items.value.length>0&&!c.value;return!!(R||n.openOnFocus&&ee)}),b=t.toRef(n,"historyItems"),y=t.toRef(n,"storageKey"),x=t.toRef(n,"storeHistory"),N=t.toRef(n,"maxHistoryCount"),I=ph({initial:b,storageKey:y,storeHistory:x,maxHistoryCount:N,onChange:R=>s("update:historyItems",R)}),D=fi.useDebounceFn(R=>{s("input",R)},()=>n.debounce);t.watch(c,R=>{D(R)}),fi.onClickOutside(l,()=>{n.closeOnClickOutside&&(m.value||g.value||(d.value=!1))});const z=()=>{d.value=!0,s("focus")},H=()=>{s("blur")},U=async()=>{var ue,J,oe,Z,se,_e;(J=(ue=o.value)==null?void 0:ue.getIsUploading)!=null&&J.call(ue)&&await((Z=(oe=o.value).awaitUpload)==null?void 0:Z.call(oe));const R=c.value.trim(),ee=((_e=(se=o.value)==null?void 0:se.getUploadedUrl)==null?void 0:_e.call(se))||n.imageUrl;!R&&!ee||(n.autoSaveHistory&&R&&I.push(R),n.closeOnSearch&&(d.value=!1),s("search",{keyword:R,imageUrl:ee||void 0}))},B=()=>{c.value="",s("clear")},G=R=>{s("recommend-click",R),c.value=R.key,U()},C=R=>{if(s("onestep-click",R),R.path){const ee=R.path;typeof window<"u"&&window.open(ee,"_blank","noopener,noreferrer")}},k=R=>{s("history-click",R),c.value=R,U()},O=R=>{I.remove(R),s("delete-history-item",R)},j=()=>{const R=[...I.items.value];I.clearAll(),s("delete-history",R)},L=R=>{const ee=n.allowHtmlInSuggest?R.replace(/<[^>]+>/g,""):R;s("suggest-list-click",ee),c.value=ee,U()},V=R=>{m.value=R,R||(g.value=!0,setTimeout(()=>{g.value=!1},100))},M=t.computed(()=>!!n.imageUrl&&(n.alwaysInlineThumbnail||!d.value)),q=R=>{S.value=!0,s("image-upload-start",R)},$=(R,ee)=>{S.value=!1,s("image-upload-success",R,ee)},X=()=>{S.value=!1,s("update:imageUrl","")};return e({focus:()=>{var R,ee;return(ee=(R=o.value)==null?void 0:R.focus)==null?void 0:ee.call(R)},blur:()=>{var R,ee;return(ee=(R=o.value)==null?void 0:R.blur)==null?void 0:ee.call(R)},search:U,saveHistory:R=>I.push(R??c.value)}),(R,ee)=>{var ue;return t.openBlock(),t.createElementBlock("div",{ref_key:"wrapperRef",ref:l,class:t.normalizeClass(["o-search-input",{"is-focus":d.value}])},[t.createElementVNode("div",d7,[t.createVNode(hh,{ref_key:"inputRef",ref:o,modelValue:c.value,"onUpdate:modelValue":ee[0]||(ee[0]=J=>c.value=J),"image-url":r.imageUrl,placeholder:r.placeholder,"image-placeholder":r.imagePlaceholder,size:r.size,"enable-image-search":r.enableImageSearch,"upload-image":r.uploadImage,"max-image-size":r.maxImageSize,"image-upload-tooltip":r.imageUploadTooltip,expanded:d.value&&!n.alwaysInlineThumbnail,"inline-thumbnail":M.value,clearable:r.clearable,class:"o-search-input-field","onUpdate:imageUrl":ee[1]||(ee[1]=J=>s("update:imageUrl",J)),onFocus:z,onBlur:H,onEnter:U,onClear:B,onImageClear:X,onImageUploadStart:q,onImageUploadSuccess:$,onImageUploadError:ee[2]||(ee[2]=(J,oe)=>s("image-upload-error",J,oe)),onImageValidateError:ee[3]||(ee[3]=(J,oe)=>s("image-validate-error",J,oe)),onPreviewChange:V},t.createSlots({prefix:t.withCtx(()=>[t.renderSlot(R.$slots,"input-prefix",{},void 0,!0)]),suffix:t.withCtx(J=>[t.renderSlot(R.$slots,"input-suffix",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),_:2},[R.$slots["image-preview"]?{name:"preview",fn:t.withCtx(J=>[t.renderSlot(R.$slots,"image-preview",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),key:"0"}:void 0]),1032,["modelValue","image-url","placeholder","image-placeholder","size","enable-image-search","upload-image","max-image-size","image-upload-tooltip","expanded","inline-thumbnail","clearable"]),t.createVNode(t.Transition,{name:"o-search-input-dropdown"},{default:t.withCtx(()=>[T.value?(t.openBlock(),t.createElementBlock("div",h7,[t.renderSlot(R.$slots,"dropdown",{keyword:r.modelValue},()=>[t.createVNode(fh,{keyword:r.modelValue,"onestep-items":r.onestepItems,"onestep-title":r.onestepTitle,"suggest-items":r.suggestItems,"suggest-title":r.suggestTitle,"history-items":r.enableHistory?t.unref(I).items.value:[],"history-title":r.historyTitle,"no-data-text":r.noDataText,"highlight-keyword":r.highlightKeyword,"hide-on-keyword":!0,"show-suggest-empty":r.showSuggestEmpty,"history-layout":"list",onOnestepClick:C,onSuggestClick:G,onHistoryClick:k,onHistoryRemove:O,onHistoryClear:j},t.createSlots({_:2},[R.$slots["onestep-header"]?{name:"onestep-header",fn:t.withCtx(J=>[t.renderSlot(R.$slots,"onestep-header",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),key:"0"}:void 0,R.$slots["onestep-content"]?{name:"onestep-content",fn:t.withCtx(J=>[t.renderSlot(R.$slots,"onestep-content",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),key:"1"}:void 0,R.$slots["suggest-header"]?{name:"suggest-header",fn:t.withCtx(J=>[t.renderSlot(R.$slots,"suggest-header",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),key:"2"}:void 0,R.$slots["suggest-content"]?{name:"suggest-content",fn:t.withCtx(J=>[t.renderSlot(R.$slots,"suggest-content",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),key:"3"}:void 0,R.$slots["history-header"]?{name:"history-header",fn:t.withCtx(J=>[t.renderSlot(R.$slots,"history-header",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),key:"4"}:void 0,R.$slots["history-content"]?{name:"history-content",fn:t.withCtx(J=>[t.renderSlot(R.$slots,"history-content",t.normalizeProps(t.guardReactiveProps(J)),void 0,!0)]),key:"5"}:void 0]),1032,["keyword","onestep-items","onestep-title","suggest-items","suggest-title","history-items","history-title","no-data-text","highlight-keyword","show-suggest-empty"])],!0)])):t.createCommentVNode("",!0)]),_:3})]),(ue=r.suggestList)!=null&&ue.length?(t.openBlock(),t.createElementBlock("div",f7,[t.renderSlot(R.$slots,"suggest-list",{items:r.suggestList},()=>[t.createElementVNode("span",p7,t.toDisplayString(r.suggestListLabel??t.unref(a)("search.suggestListLabel")),1),t.createElementVNode("ul",m7,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.suggestList,(J,oe)=>(t.openBlock(),t.createElementBlock("li",{key:J+oe,class:"o-search-input-suggest-list-item",onClick:Z=>L(J)},[r.allowHtmlInSuggest?(t.openBlock(),t.createElementBlock("span",{key:0,innerHTML:J},null,8,v7)):(t.openBlock(),t.createElementBlock("span",y7,t.toDisplayString(J),1))],8,g7))),128))])],!0)])):t.createCommentVNode("",!0)],2)}}}),oh=Ue._export_sfc(_7,[["__scopeId","data-v-0652930f"]]),T7=Object.assign(oh,{install(r){r.component("OSearchInput",oh)}}),b7={OBanner:lh,OCookieNotice:uh,OFooter:ch,OHeaderSearch:mh,OHeaderUser:gh,OPlusConfigProvider:vh,OSection:yh,OSourceCode:_h,OThemeSwitcher:Th},C7={install:r=>{Object.entries(b7).forEach(([e,i])=>{r.component(e,i)})}};exports.OElCookieNotice=Ue.OElCookieNotice;exports.CalendarDataType=Be;exports.EventsStatusT=Zi;exports.MeetingGroupType=vi;exports.OActivityApproval=B5;exports.OActivityForm=O5;exports.OBanner=lh;exports.OCookieNotice=uh;exports.OEventsApply=US;exports.OEventsCalendar=FS;exports.OEventsList=$S;exports.OFooter=ch;exports.OHeader=u7;exports.OHeaderMobile=c7;exports.OHeaderSearch=mh;exports.OHeaderUser=gh;exports.OMeetingCalendar=qx;exports.OMeetingForm=jx;exports.OMeetingPlayback=Gx;exports.OMyActivityCalendar=L5;exports.OMyMeetingCalendar=Yx;exports.OPlusConfigProvider=vh;exports.OSearchInput=T7;exports.OSection=yh;exports.OSigMeetingCalendar=Wx;exports.OSourceCode=_h;exports.OThemeSwitcher=Th;exports.default=C7;