@shumai-one/shumai 0.3.9 → 0.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/{chunk-q3y6kdkh.js → chunk-02tqxzgz.js} +2 -2
- package/bin/chunk-09c03qdg.js +2 -0
- package/bin/{chunk-p65avrcv.js → chunk-0fpgfrv8.js} +2 -2
- package/bin/{chunk-fbqr4v70.js → chunk-0hbqkcsd.js} +1 -1
- package/bin/{chunk-zafjhkkk.js → chunk-0qcp4v52.js} +1 -1
- package/bin/chunk-0te5kcy3.js +2 -0
- package/bin/chunk-15zbprbe.js +1 -0
- package/bin/{chunk-ptmxkptc.js → chunk-1ev668rp.js} +2 -2
- package/bin/{chunk-z7m6sa7g.js → chunk-1qd83phd.js} +1 -1
- package/bin/{chunk-mwrheqe3.js → chunk-1whn0v5n.js} +1 -1
- package/bin/{chunk-s78r8f5v.js → chunk-28axgckk.js} +1 -1
- package/bin/{chunk-r0c9vmfm.js → chunk-2mxqjx3x.js} +1 -1
- package/bin/{chunk-x6ta6e2v.js → chunk-2sk6e4q0.js} +1 -1
- package/bin/{chunk-awaf0g5z.js → chunk-2sp0gkaw.js} +2 -2
- package/bin/{chunk-fhd9yadg.js → chunk-2t2wjzme.js} +2 -2
- package/bin/chunk-301pewt3.js +1 -0
- package/bin/chunk-33hax7fe.js +66 -0
- package/bin/{chunk-9fc118ea.js → chunk-34f4hk54.js} +2 -2
- package/bin/{chunk-331s5eb9.js → chunk-39s0cxq1.js} +2 -2
- package/bin/{chunk-c32x8x6z.js → chunk-41de755j.js} +1 -1
- package/bin/{chunk-naaa5ejw.js → chunk-42et2rqa.js} +2 -2
- package/bin/{chunk-pfwt5734.js → chunk-42f9r1sg.js} +2 -2
- package/bin/chunk-484yr1a7.js +1 -0
- package/bin/{chunk-jx9tqjh9.js → chunk-4shqnfq1.js} +1 -1
- package/bin/{chunk-h7jb1xb4.js → chunk-60xawsa6.js} +2 -2
- package/bin/chunk-62ag2nfa.js +2 -0
- package/bin/chunk-63emv4q3.js +1 -0
- package/bin/chunk-6529sh41.js +2 -0
- package/bin/{chunk-4yp5add5.js → chunk-661mcdxj.js} +2 -2
- package/bin/{chunk-n3997tqa.js → chunk-69sf7kb1.js} +1 -1
- package/bin/{chunk-0kfcfd0x.js → chunk-6gx6gdnk.js} +2 -2
- package/bin/chunk-6w395tfy.js +2 -0
- package/bin/chunk-7735r8d7.js +1 -0
- package/bin/{chunk-tx42kfdh.js → chunk-7m07t899.js} +1 -1
- package/bin/{chunk-dt9wfyf2.js → chunk-7r6h3fta.js} +2 -2
- package/bin/{chunk-5657zj59.js → chunk-7xwmj4ew.js} +1 -1
- package/bin/{chunk-vf6mpxrd.js → chunk-8r2agmv2.js} +2 -2
- package/bin/{chunk-dntwxkyf.js → chunk-8zmk029n.js} +1 -1
- package/bin/{chunk-hx2y4d75.js → chunk-90jcmarf.js} +2 -2
- package/bin/{chunk-7wh2mr72.js → chunk-94fyesf6.js} +1 -1
- package/bin/chunk-94yxj3yy.js +2 -0
- package/bin/{chunk-zwny8t7c.js → chunk-9rhckjgf.js} +1 -1
- package/bin/chunk-9ykcjdsv.js +3 -0
- package/bin/chunk-9yn5r2hh.js +2 -0
- package/bin/chunk-a80aab0f.js +2 -0
- package/bin/{chunk-rq6bvf0t.js → chunk-ag0pavv1.js} +1 -1
- package/bin/{chunk-6ja68bbj.js → chunk-at5ksmqs.js} +1 -1
- package/bin/{chunk-11j7ejan.js → chunk-bv5mh0e0.js} +3 -3
- package/bin/{chunk-7w01v7bw.js → chunk-bxexm2hd.js} +3 -3
- package/bin/{chunk-5ex69zt3.js → chunk-cc9fftnv.js} +2 -2
- package/bin/{chunk-r7crhkhn.js → chunk-ch25gq27.js} +2 -2
- package/bin/chunk-csky7q56.js +2 -0
- package/bin/{chunk-z71h48pj.js → chunk-d4ktgq49.js} +1 -1
- package/bin/{chunk-jvn0xnj8.js → chunk-day61cfg.js} +2 -2
- package/bin/{chunk-03ec6p4p.js → chunk-dgvcraag.js} +2 -2
- package/bin/{chunk-va9hwggw.js → chunk-e26p9vrv.js} +1 -1
- package/bin/{chunk-f37ywvvp.js → chunk-emyax05s.js} +1 -1
- package/bin/{chunk-3h4t28zz.js → chunk-enq1hf8g.js} +2 -2
- package/bin/{chunk-mffjg6zb.js → chunk-f03whbny.js} +2 -2
- package/bin/{chunk-vtm39m0n.js → chunk-fk9pd7ra.js} +1 -1
- package/bin/{chunk-8hex1hjk.js → chunk-fscyvjzb.js} +2 -2
- package/bin/{chunk-nw1ch5d8.js → chunk-g2bkj92r.js} +2 -2
- package/bin/chunk-g5qfxnz1.js +2 -0
- package/bin/{chunk-5efr8prc.js → chunk-g6aq2cyq.js} +1 -1
- package/bin/chunk-gh6j1nsm.js +1 -0
- package/bin/{chunk-wjk0f9fq.js → chunk-gra1fhdp.js} +2 -2
- package/bin/{chunk-79wjyt2p.js → chunk-gtenq4kq.js} +1 -1
- package/bin/chunk-h5jre78a.js +2 -0
- package/bin/{chunk-wth2f791.js → chunk-hcaw54dj.js} +2 -2
- package/bin/{chunk-8qryr65z.js → chunk-hsemzjvr.js} +2 -2
- package/bin/chunk-hte6gd36.js +1 -0
- package/bin/{chunk-vwayy6dy.js → chunk-j6dea33m.js} +3 -3
- package/bin/{chunk-bdwtaj3w.js → chunk-j99cr9mz.js} +2 -2
- package/bin/chunk-jn805ccq.js +1 -0
- package/bin/{chunk-tfwtxwth.js → chunk-k2w676wz.js} +2 -2
- package/bin/{chunk-ej18j83b.js → chunk-k33qdrdp.js} +1 -1
- package/bin/chunk-kmhkhcy6.js +68 -0
- package/bin/chunk-kp4kn4b4.js +2 -0
- package/bin/{chunk-9s1fdecm.js → chunk-m3ghgqc2.js} +1 -1
- package/bin/chunk-m84qgdyj.js +2 -0
- package/bin/{chunk-jt7fdhke.js → chunk-mk5hqjjd.js} +1 -1
- package/bin/{chunk-p2wyyvfa.js → chunk-mnhg12fm.js} +2 -2
- package/bin/{chunk-nc9hbzad.js → chunk-n3vzdzdw.js} +2 -2
- package/bin/{chunk-a6s80m0k.js → chunk-nw03w9pa.js} +1 -1
- package/bin/{chunk-7a4347xe.js → chunk-p31qe5mc.js} +2 -2
- package/bin/chunk-p48npmbh.js +2 -0
- package/bin/{chunk-6ts9djn2.js → chunk-p9w4ar11.js} +1 -1
- package/bin/chunk-pbztc6kv.js +1 -0
- package/bin/{chunk-v2dksv7p.js → chunk-pg55qp08.js} +2 -2
- package/bin/{chunk-agvb6bpw.js → chunk-pv4scagf.js} +1 -1
- package/bin/chunk-q0hrd0yw.js +2 -0
- package/bin/{chunk-wy82m4nq.js → chunk-qev7trtm.js} +2 -2
- package/bin/chunk-qk9npww4.js +2 -0
- package/bin/{chunk-zq665ybs.js → chunk-qphebjbv.js} +1 -1
- package/bin/{chunk-qp1hkx9k.js → chunk-rakz3pe6.js} +2 -2
- package/bin/chunk-rjga1vn2.js +2 -0
- package/bin/chunk-rt8yqz51.js +1 -0
- package/bin/chunk-s542e1y0.js +1 -0
- package/bin/{chunk-0rydta2q.js → chunk-s6e91ky2.js} +1 -1
- package/bin/{chunk-w4e52ade.js → chunk-s9s9hhet.js} +1 -1
- package/bin/{chunk-39j992fb.js → chunk-s9yzt7s3.js} +2 -2
- package/bin/chunk-sjsn35mp.js +1 -0
- package/bin/{chunk-0x6zt5yg.js → chunk-stggq92k.js} +1 -1
- package/bin/{chunk-zvq0btde.js → chunk-t16qt2ka.js} +3 -3
- package/bin/chunk-tc5evq8x.js +2 -0
- package/bin/chunk-tjrdsmdw.js +1 -0
- package/bin/{chunk-tk362keq.js → chunk-tkh0s7hg.js} +2 -2
- package/bin/{chunk-nn753fbs.js → chunk-tsym31yb.js} +2 -2
- package/bin/{chunk-a2m63585.js → chunk-v1ybpqrz.js} +1 -1
- package/bin/chunk-vbkwteh4.js +1 -0
- package/bin/chunk-vevscfh2.js +2 -0
- package/bin/chunk-vg33qt6z.js +11 -0
- package/bin/{chunk-wzw7rrfy.js → chunk-vgwjg37a.js} +2 -2
- package/bin/chunk-vwz2pa54.js +2 -0
- package/bin/chunk-we3vdyhb.js +1 -0
- package/bin/chunk-whn6dvak.js +1 -0
- package/bin/{chunk-j4byth37.js → chunk-wwjqqqr4.js} +1 -1
- package/bin/{chunk-mv4v52ah.js → chunk-xext4yvc.js} +1 -1
- package/bin/chunk-xr1wr22v.css +1 -0
- package/bin/chunk-xvpttxen.js +7 -0
- package/bin/chunk-y45tzhdn.js +2 -0
- package/bin/{chunk-c4yr75hy.js → chunk-y5ptk39s.js} +2 -2
- package/bin/{chunk-ytgtf0ak.js → chunk-y7b5gy17.js} +1 -1
- package/bin/{chunk-zcxajg6j.js → chunk-y8ffp5zj.js} +2 -2
- package/bin/chunk-yfgwknpa.js +78 -0
- package/bin/{chunk-yvknqnkb.js → chunk-z7b132c0.js} +2 -2
- package/bin/{chunk-v5c6t1w3.js → chunk-zdmcc6ps.js} +2 -2
- package/bin/shumai-app.html +1 -1
- package/bin/shumai-app.js +485 -291
- package/package.json +7 -7
- package/prisma/migrations/20260819091331_add_kanban_schema/migration.sql +164 -0
- package/prisma/migrations/20260821102514_add_kanban_notifications/migration.sql +26 -0
- package/prisma/migrations/20260821133500_add_c_collation_to_kanban_sort_index/migration.sql +10 -0
- package/prisma/migrations/20260822020609_add_kanban_task_assets/migration.sql +17 -0
- package/prisma/migrations/20260822071734_remove_kanban_task_cancelled_status/migration.sql +28 -0
- package/prisma/schema.prisma +187 -0
- package/bin/chunk-0h1yw3eq.js +0 -1
- package/bin/chunk-1eqdvehm.js +0 -2
- package/bin/chunk-2ckj039r.js +0 -2
- package/bin/chunk-2wcfw38x.js +0 -1
- package/bin/chunk-4st1t79p.js +0 -2
- package/bin/chunk-5ctpz542.js +0 -78
- package/bin/chunk-7t9c532y.js +0 -1
- package/bin/chunk-7zvv37z0.js +0 -7
- package/bin/chunk-9vjkb4vh.js +0 -1
- package/bin/chunk-ar79dg9g.js +0 -2
- package/bin/chunk-b0kh9jpt.js +0 -1
- package/bin/chunk-d5v9nz51.js +0 -1
- package/bin/chunk-ddt5224b.js +0 -2
- package/bin/chunk-eekmnfn4.js +0 -2
- package/bin/chunk-ff8zrme6.js +0 -1
- package/bin/chunk-g2qeb32y.js +0 -2
- package/bin/chunk-gtqchcj0.js +0 -2
- package/bin/chunk-hdx9q31r.js +0 -1
- package/bin/chunk-hk5pwxhf.js +0 -2
- package/bin/chunk-jkpxykx9.css +0 -1
- package/bin/chunk-jq28ge97.js +0 -1
- package/bin/chunk-n3e4agsa.js +0 -2
- package/bin/chunk-ppwy5dja.js +0 -1
- package/bin/chunk-px660tvj.js +0 -2
- package/bin/chunk-qbs0nvbn.js +0 -3
- package/bin/chunk-qt6j0fm6.js +0 -65
- package/bin/chunk-t6gqzden.js +0 -1
- package/bin/chunk-tn24as5d.js +0 -2
- package/bin/chunk-v2n1hwt3.js +0 -1
- package/bin/chunk-vhcsdnzv.js +0 -2
- package/bin/chunk-wk153p7c.js +0 -1
- package/bin/chunk-y8wj6g7y.js +0 -11
- package/bin/chunk-ympx92ct.js +0 -1
- package/bin/chunk-yx6mahz0.js +0 -1
- package/bin/chunk-z8s40zfa.js +0 -68
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{E as _S,G as i7,Q as l7,R as FS,S as fv,T as Il,U as Am,V as qg,W as Wm,X as rv}from"./chunk-hk5pwxhf.js";import{Y as Qp}from"./chunk-5ex69zt3.js";import{$ as Qu,_ as Ju,aa as Zu}from"./chunk-n3e4agsa.js";import{ra as Jp}from"./chunk-ptmxkptc.js";import{Aa as Gp,Ba as Xp,Ca as Kp,Da as Lp,Ea as Vp,Fa as Yp,ya as Ip,za as Up}from"./chunk-ar79dg9g.js";import{Af as Ek,Bf as AS,Cf as yS,Df as V8,Ef as Y8,Lf as Yu,of as Vm,pf as Ym,qf as Hk,sf as Vg,tf as Dk,uf as xk,wf as Rk,xf as Xk,yf as Yg,zf as Nk}from"./chunk-4st1t79p.js";import{Mg as _1}from"./chunk-z8s40zfa.js";import{Ng as J8}from"./chunk-zcxajg6j.js";import{Pg as SS,Qg as cs}from"./chunk-vhcsdnzv.js";import{Rg as Rp,Sg as Np,Tg as Ep,Ug as zp}from"./chunk-03ec6p4p.js";import{Vg as M3}from"./chunk-331s5eb9.js";import{sh as Kc,th as Lc,uh as Vc}from"./chunk-naaa5ejw.js";import{Ch as Sm,Dh as lv,Hh as s7,Ih as CS,vh as ar,xh as nr,yh as sr,zh as Ki}from"./chunk-8qryr65z.js";import{$i as pS,$j as ko,Bi as f7,Fk as sv,Gk as iv,Ik as B1,Ki as $p,Lh as Wa,Mh as F1,Mi as O3,Nh as I,Oh as oe,Oi as $m,Ph as Ku,Pj as Cm,Sh as Lu,Uh as tr,Uj as _m,Vh as kS,Vi as Wp,Vj as Ul,Yi as qo,Yj as e7,Zi as O1,Zj as tv,_i as gS,_j as vo,dk as t7,dl as vs,fj as Pp,fl as Si,gk as av,hj as oA,ii as Zp,il as Ke,kj as Ci,kk as nv,nj as Vu,pi as Ht,pk as a7,ql as T3,vk as xp,zi as Dp,zk as n7}from"./chunk-5ctpz542.js";import{nm as Dt,om as Mt,pm as IR}from"./chunk-j4byth37.js";var Li=Mt((Pz,o7)=>{var Jc;if(typeof window<"u")Jc=window;else if(typeof global<"u")Jc=global;else if(typeof self<"u")Jc=self;else Jc={};o7.exports=Jc});var H3=Mt((eI,h7)=>{var c7=Array.prototype.slice;h7.exports=y_;function y_(e,t){if(!("length"in e))e=[e];e=c7.call(e);while(e.length){var a=e.shift(),n=t(a);if(n)return n;if(a.childNodes&&a.childNodes.length)e=c7.call(a.childNodes).concat(e)}}});var m7=Mt((tI,u7)=>{u7.exports=T1;function T1(e,t){if(!(this instanceof T1))return new T1(e,t);this.data=e,this.nodeValue=e,this.length=e.length,this.ownerDocument=t||null}T1.prototype.nodeType=8;T1.prototype.nodeName="#comment";T1.prototype.toString=function(){return"[object Comment]"}});var p7=Mt((aI,g7)=>{g7.exports=Gl;function Gl(e,t){if(!(this instanceof Gl))return new Gl(e);this.data=e||"",this.length=this.data.length,this.ownerDocument=t||null}Gl.prototype.type="DOMTextNode";Gl.prototype.nodeType=3;Gl.prototype.nodeName="#text";Gl.prototype.toString=function(){return this.data};Gl.prototype.replaceData=function(t,a,n){var s=this.data,i=s.substring(0,t),l=s.substring(t+a,s.length);this.data=i+n+l,this.length=this.data.length}});var D3=Mt((nI,b7)=>{b7.exports=S_;function S_(e){var t=this,a=e.type;if(!e.target)e.target=t;if(!t.listeners)t.listeners={};var n=t.listeners[a];if(n)return n.forEach(function(s){if(e.currentTarget=t,typeof s==="function")s(e);else s.handleEvent(e)});if(t.parentNode)t.parentNode.dispatchEvent(e)}});var x3=Mt((sI,w7)=>{w7.exports=C_;function C_(e,t){var a=this;if(!a.listeners)a.listeners={};if(!a.listeners[e])a.listeners[e]=[];if(a.listeners[e].indexOf(t)===-1)a.listeners[e].push(t)}});var R3=Mt((iI,d7)=>{d7.exports=__;function __(e,t){var a=this;if(!a.listeners)return;if(!a.listeners[e])return;var n=a.listeners[e],s=n.indexOf(t);if(s!==-1)n.splice(s,1)}});var k7=Mt((lI,v7)=>{v7.exports=j7;var F_=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function j7(e){switch(e.nodeType){case 3:return N3(e.data);case 8:return"<!--"+e.data+"-->";default:return O_(e)}}function O_(e){var t=[],a=e.tagName;if(e.namespaceURI==="http://www.w3.org/1999/xhtml")a=a.toLowerCase();if(t.push("<"+a+H_(e)+M_(e)),F_.indexOf(a)>-1)t.push(" />");else{if(t.push(">"),e.childNodes.length)t.push.apply(t,e.childNodes.map(j7));else if(e.textContent||e.innerText)t.push(N3(e.textContent||e.innerText));else if(e.innerHTML)t.push(e.innerHTML);t.push("</"+a+">")}return t.join("")}function B_(e,t){var a=typeof e[t];if(t==="style"&&Object.keys(e.style).length>0)return!0;return e.hasOwnProperty(t)&&(a==="string"||a==="boolean"||a==="number")&&t!=="nodeName"&&t!=="className"&&t!=="tagName"&&t!=="textContent"&&t!=="innerText"&&t!=="namespaceURI"&&t!=="innerHTML"}function T_(e){if(typeof e==="string")return e;var t="";return Object.keys(e).forEach(function(a){var n=e[a];a=a.replace(/[A-Z]/g,function(s){return"-"+s.toLowerCase()}),t+=a+":"+n+";"}),t}function M_(e){var t=e.dataset,a=[];for(var n in t)a.push({name:"data-"+n,value:t[n]});return a.length?q7(a):""}function q7(e){var t=[];return e.forEach(function(a){var{name:n,value:s}=a;if(n==="style")s=T_(s);t.push(n+'="'+D_(s)+'"')}),t.length?" "+t.join(" "):""}function H_(e){var t=[];for(var a in e)if(B_(e,a))t.push({name:a,value:e[a]});for(var n in e._attributes)for(var s in e._attributes[n]){var i=e._attributes[n][s],l=(i.prefix?i.prefix+":":"")+s;t.push({name:l,value:i.value})}if(e.className)t.push({name:"class",value:e.className});return t.length?q7(t):""}function N3(e){var t="";if(typeof e==="string")t=e;else if(e)t=e.toString();return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function D_(e){return N3(e).replace(/"/g,""")}});var z3=Mt((fI,y7)=>{var E3=H3(),x_=D3(),R_=x3(),N_=R3(),E_=k7(),A7="http://www.w3.org/1999/xhtml";y7.exports=ba;function ba(e,t,a){if(!(this instanceof ba))return new ba(e);var n=a===void 0?A7:a||null;if(this.tagName=n===A7?String(e).toUpperCase():e,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=t||null,this.namespaceURI=n,this._attributes={},this.tagName==="INPUT")this.type="text"}ba.prototype.type="DOMElement";ba.prototype.nodeType=1;ba.prototype.appendChild=function(t){if(t.parentNode)t.parentNode.removeChild(t);return this.childNodes.push(t),t.parentNode=this,t};ba.prototype.replaceChild=function(t,a){if(t.parentNode)t.parentNode.removeChild(t);var n=this.childNodes.indexOf(a);return a.parentNode=null,this.childNodes[n]=t,t.parentNode=this,a};ba.prototype.removeChild=function(t){var a=this.childNodes.indexOf(t);return this.childNodes.splice(a,1),t.parentNode=null,t};ba.prototype.insertBefore=function(t,a){if(t.parentNode)t.parentNode.removeChild(t);var n=a===null||a===void 0?-1:this.childNodes.indexOf(a);if(n>-1)this.childNodes.splice(n,0,t);else this.childNodes.push(t);return t.parentNode=this,t};ba.prototype.setAttributeNS=function(t,a,n){var s=null,i=a,l=a.indexOf(":");if(l>-1)s=a.substr(0,l),i=a.substr(l+1);if(this.tagName==="INPUT"&&a==="type")this.type=n;else{var f=this._attributes[t]||(this._attributes[t]={});f[i]={value:n,prefix:s}}};ba.prototype.getAttributeNS=function(t,a){var n=this._attributes[t],s=n&&n[a]&&n[a].value;if(this.tagName==="INPUT"&&a==="type")return this.type;if(typeof s!=="string")return null;return s};ba.prototype.removeAttributeNS=function(t,a){if(!Object.prototype.hasOwnProperty.call(this._attributes,t))return;var n=this._attributes[t];if(n&&Object.prototype.hasOwnProperty.call(n,a))delete n[a]};ba.prototype.hasAttributeNS=function(t,a){var n=this._attributes[t];return!!n&&a in n};ba.prototype.setAttribute=function(t,a){return this.setAttributeNS(null,t,a)};ba.prototype.getAttribute=function(t){return this.getAttributeNS(null,t)};ba.prototype.removeAttribute=function(t){return this.removeAttributeNS(null,t)};ba.prototype.hasAttribute=function(t){return this.hasAttributeNS(null,t)};ba.prototype.removeEventListener=N_;ba.prototype.addEventListener=R_;ba.prototype.dispatchEvent=x_;ba.prototype.focus=function(){return};ba.prototype.toString=function(){return E_(this)};ba.prototype.getElementsByClassName=function(t){var a=t.split(" "),n=[];return E3(this,function(s){if(s.nodeType===1){var i=s.className||"",l=i.split(" ");if(a.every(function(f){return l.indexOf(f)!==-1}))n.push(s)}}),n};ba.prototype.getElementsByTagName=function(t){t=t.toLowerCase();var a=[];return E3(this.childNodes,function(n){if(n.nodeType===1&&(t==="*"||n.tagName.toLowerCase()===t))a.push(n)}),a};ba.prototype.contains=function(t){return E3(this,function(a){return t===a})||!1}});var C7=Mt((rI,S7)=>{var I3=z3();S7.exports=Vi;function Vi(e){if(!(this instanceof Vi))return new Vi;this.childNodes=[],this.parentNode=null,this.ownerDocument=e||null}Vi.prototype.type="DocumentFragment";Vi.prototype.nodeType=11;Vi.prototype.nodeName="#document-fragment";Vi.prototype.appendChild=I3.prototype.appendChild;Vi.prototype.replaceChild=I3.prototype.replaceChild;Vi.prototype.removeChild=I3.prototype.removeChild;Vi.prototype.toString=function(){return this.childNodes.map(function(t){return String(t)}).join("")}});var F7=Mt((oI,_7)=>{_7.exports=U3;function U3(e){}U3.prototype.initEvent=function(t,a,n){this.type=t,this.bubbles=a,this.cancelable=n};U3.prototype.preventDefault=function(){}});var B7=Mt((cI,O7)=>{var z_=H3(),I_=m7(),U_=p7(),Qc=z3(),G_=C7(),X_=F7(),K_=D3(),L_=x3(),V_=R3();O7.exports=$u;function $u(){if(!(this instanceof $u))return new $u;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}var Ns=$u.prototype;Ns.createTextNode=function(t){return new U_(t,this)};Ns.createElementNS=function(t,a){var n=t===null?null:String(t);return new Qc(a,this,n)};Ns.createElement=function(t){return new Qc(t,this)};Ns.createDocumentFragment=function(){return new G_(this)};Ns.createEvent=function(t){return new X_(t)};Ns.createComment=function(t){return new I_(t,this)};Ns.getElementById=function(t){t=String(t);var a=z_(this.childNodes,function(n){if(String(n.id)===t)return n});return a||null};Ns.getElementsByClassName=Qc.prototype.getElementsByClassName;Ns.getElementsByTagName=Qc.prototype.getElementsByTagName;Ns.contains=Qc.prototype.contains;Ns.removeEventListener=V_;Ns.addEventListener=L_;Ns.dispatchEvent=K_});var M7=Mt((hI,T7)=>{var Y_=B7();T7.exports=new Y_});var G3=Mt((uI,D7)=>{var H7=typeof global<"u"?global:typeof window<"u"?window:{},J_=M7(),Zc;if(typeof document<"u")Zc=document;else if(Zc=H7["__GLOBAL_DOCUMENT_CACHE@4"],!Zc)Zc=H7["__GLOBAL_DOCUMENT_CACHE@4"]=J_;D7.exports=Zc});var x7=Mt((mI,z0)=>{function X3(){return z0.exports=X3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},z0.exports.__esModule=!0,z0.exports.default=z0.exports,X3.apply(null,arguments)}z0.exports=X3,z0.exports.__esModule=!0,z0.exports.default=z0.exports});var N7=Mt((gI,R7)=>{R7.exports=Z_;var Q_=Object.prototype.toString;function Z_(e){if(!e)return!1;var t=Q_.call(e);return t==="[object Function]"||typeof e==="function"&&t!=="[object RegExp]"||typeof window<"u"&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}});var I7=Mt((pI,z7)=>{function $_(e,t){var a=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a)return(a=a.call(e)).next.bind(a);if(Array.isArray(e)||(a=W_(e))||t&&e&&typeof e.length==="number"){if(a)e=a;var n=0;return function(){if(n>=e.length)return{done:!0};return{done:!1,value:e[n++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
1
|
+
import{B as l7,L as FS,M as fv,N as Il,O as Am,P as qg,Q as Wm,R as rv,z as _S}from"./chunk-9yn5r2hh.js";import{S as Qp}from"./chunk-cc9fftnv.js";import{$e as Xk,Se as Vm,Te as Ym,Ue as Hk,We as Vg,Xe as Dk,Ye as xk,_e as Rk,af as Yg,bf as Nk,cf as Ek,jf as Yu}from"./chunk-kp4kn4b4.js";import{tf as AS,uf as yS,vf as V8,wf as Y8}from"./chunk-g5qfxnz1.js";import{Cf as i7}from"./chunk-94yxj3yy.js";import{Ff as Ju,Gf as Qu,Hf as Zu}from"./chunk-33hax7fe.js";import{eg as Jp}from"./chunk-1ev668rp.js";import{gg as _1}from"./chunk-a80aab0f.js";import{Yg as J8}from"./chunk-y8ffp5zj.js";import{_g as cs}from"./chunk-6w395tfy.js";import{$g as SS}from"./chunk-rjga1vn2.js";import{ah as Rp,bh as Np,ch as Ep,dh as zp}from"./chunk-dgvcraag.js";import{eh as M3}from"./chunk-39s0cxq1.js";import{Fh as Kc,Gh as Lc,Hh as Vc}from"./chunk-42et2rqa.js";import{Ih as ar,Kh as nr,Lh as sr,Mh as Ki,Ph as Sm,Qh as lv,Uh as s7,Vh as CS}from"./chunk-hsemzjvr.js";import{$h as oe,$i as $m,Ai as Ht,Aj as Vu,Ek as a7,Hl as T3,Il as Ip,Jl as Up,Ki as Dp,Kl as Gp,Lk as xp,Ll as Xp,Mi as f7,Ml as Kp,Nl as Lp,Ol as Vp,Pk as n7,Pl as Yp,Vk as sv,Wk as iv,Xi as $p,Yh as Wa,Yk as B1,Zh as F1,Zi as O3,_h as I,ai as Ku,ck as Cm,di as Lu,fi as tr,gi as kS,gj as Wp,hk as _m,ik as Ul,jj as qo,kj as O1,lj as gS,lk as e7,mj as pS,mk as tv,nk as vo,ok as ko,sj as Pp,sk as t7,sl as vs,uj as oA,ul as Si,vi as Zp,vk as av,xj as Ci,xl as Ke,zk as nv}from"./chunk-yfgwknpa.js";import{Mm as Dt,Nm as Mt,Om as IR}from"./chunk-wwjqqqr4.js";var Li=Mt((Pz,o7)=>{var Jc;if(typeof window<"u")Jc=window;else if(typeof global<"u")Jc=global;else if(typeof self<"u")Jc=self;else Jc={};o7.exports=Jc});var H3=Mt((eI,h7)=>{var c7=Array.prototype.slice;h7.exports=y_;function y_(e,t){if(!("length"in e))e=[e];e=c7.call(e);while(e.length){var a=e.shift(),n=t(a);if(n)return n;if(a.childNodes&&a.childNodes.length)e=c7.call(a.childNodes).concat(e)}}});var m7=Mt((tI,u7)=>{u7.exports=T1;function T1(e,t){if(!(this instanceof T1))return new T1(e,t);this.data=e,this.nodeValue=e,this.length=e.length,this.ownerDocument=t||null}T1.prototype.nodeType=8;T1.prototype.nodeName="#comment";T1.prototype.toString=function(){return"[object Comment]"}});var p7=Mt((aI,g7)=>{g7.exports=Gl;function Gl(e,t){if(!(this instanceof Gl))return new Gl(e);this.data=e||"",this.length=this.data.length,this.ownerDocument=t||null}Gl.prototype.type="DOMTextNode";Gl.prototype.nodeType=3;Gl.prototype.nodeName="#text";Gl.prototype.toString=function(){return this.data};Gl.prototype.replaceData=function(t,a,n){var s=this.data,i=s.substring(0,t),l=s.substring(t+a,s.length);this.data=i+n+l,this.length=this.data.length}});var D3=Mt((nI,b7)=>{b7.exports=S_;function S_(e){var t=this,a=e.type;if(!e.target)e.target=t;if(!t.listeners)t.listeners={};var n=t.listeners[a];if(n)return n.forEach(function(s){if(e.currentTarget=t,typeof s==="function")s(e);else s.handleEvent(e)});if(t.parentNode)t.parentNode.dispatchEvent(e)}});var x3=Mt((sI,w7)=>{w7.exports=C_;function C_(e,t){var a=this;if(!a.listeners)a.listeners={};if(!a.listeners[e])a.listeners[e]=[];if(a.listeners[e].indexOf(t)===-1)a.listeners[e].push(t)}});var R3=Mt((iI,d7)=>{d7.exports=__;function __(e,t){var a=this;if(!a.listeners)return;if(!a.listeners[e])return;var n=a.listeners[e],s=n.indexOf(t);if(s!==-1)n.splice(s,1)}});var k7=Mt((lI,v7)=>{v7.exports=j7;var F_=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function j7(e){switch(e.nodeType){case 3:return N3(e.data);case 8:return"<!--"+e.data+"-->";default:return O_(e)}}function O_(e){var t=[],a=e.tagName;if(e.namespaceURI==="http://www.w3.org/1999/xhtml")a=a.toLowerCase();if(t.push("<"+a+H_(e)+M_(e)),F_.indexOf(a)>-1)t.push(" />");else{if(t.push(">"),e.childNodes.length)t.push.apply(t,e.childNodes.map(j7));else if(e.textContent||e.innerText)t.push(N3(e.textContent||e.innerText));else if(e.innerHTML)t.push(e.innerHTML);t.push("</"+a+">")}return t.join("")}function B_(e,t){var a=typeof e[t];if(t==="style"&&Object.keys(e.style).length>0)return!0;return e.hasOwnProperty(t)&&(a==="string"||a==="boolean"||a==="number")&&t!=="nodeName"&&t!=="className"&&t!=="tagName"&&t!=="textContent"&&t!=="innerText"&&t!=="namespaceURI"&&t!=="innerHTML"}function T_(e){if(typeof e==="string")return e;var t="";return Object.keys(e).forEach(function(a){var n=e[a];a=a.replace(/[A-Z]/g,function(s){return"-"+s.toLowerCase()}),t+=a+":"+n+";"}),t}function M_(e){var t=e.dataset,a=[];for(var n in t)a.push({name:"data-"+n,value:t[n]});return a.length?q7(a):""}function q7(e){var t=[];return e.forEach(function(a){var{name:n,value:s}=a;if(n==="style")s=T_(s);t.push(n+'="'+D_(s)+'"')}),t.length?" "+t.join(" "):""}function H_(e){var t=[];for(var a in e)if(B_(e,a))t.push({name:a,value:e[a]});for(var n in e._attributes)for(var s in e._attributes[n]){var i=e._attributes[n][s],l=(i.prefix?i.prefix+":":"")+s;t.push({name:l,value:i.value})}if(e.className)t.push({name:"class",value:e.className});return t.length?q7(t):""}function N3(e){var t="";if(typeof e==="string")t=e;else if(e)t=e.toString();return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function D_(e){return N3(e).replace(/"/g,""")}});var z3=Mt((fI,y7)=>{var E3=H3(),x_=D3(),R_=x3(),N_=R3(),E_=k7(),A7="http://www.w3.org/1999/xhtml";y7.exports=ba;function ba(e,t,a){if(!(this instanceof ba))return new ba(e);var n=a===void 0?A7:a||null;if(this.tagName=n===A7?String(e).toUpperCase():e,this.nodeName=this.tagName,this.className="",this.dataset={},this.childNodes=[],this.parentNode=null,this.style={},this.ownerDocument=t||null,this.namespaceURI=n,this._attributes={},this.tagName==="INPUT")this.type="text"}ba.prototype.type="DOMElement";ba.prototype.nodeType=1;ba.prototype.appendChild=function(t){if(t.parentNode)t.parentNode.removeChild(t);return this.childNodes.push(t),t.parentNode=this,t};ba.prototype.replaceChild=function(t,a){if(t.parentNode)t.parentNode.removeChild(t);var n=this.childNodes.indexOf(a);return a.parentNode=null,this.childNodes[n]=t,t.parentNode=this,a};ba.prototype.removeChild=function(t){var a=this.childNodes.indexOf(t);return this.childNodes.splice(a,1),t.parentNode=null,t};ba.prototype.insertBefore=function(t,a){if(t.parentNode)t.parentNode.removeChild(t);var n=a===null||a===void 0?-1:this.childNodes.indexOf(a);if(n>-1)this.childNodes.splice(n,0,t);else this.childNodes.push(t);return t.parentNode=this,t};ba.prototype.setAttributeNS=function(t,a,n){var s=null,i=a,l=a.indexOf(":");if(l>-1)s=a.substr(0,l),i=a.substr(l+1);if(this.tagName==="INPUT"&&a==="type")this.type=n;else{var f=this._attributes[t]||(this._attributes[t]={});f[i]={value:n,prefix:s}}};ba.prototype.getAttributeNS=function(t,a){var n=this._attributes[t],s=n&&n[a]&&n[a].value;if(this.tagName==="INPUT"&&a==="type")return this.type;if(typeof s!=="string")return null;return s};ba.prototype.removeAttributeNS=function(t,a){if(!Object.prototype.hasOwnProperty.call(this._attributes,t))return;var n=this._attributes[t];if(n&&Object.prototype.hasOwnProperty.call(n,a))delete n[a]};ba.prototype.hasAttributeNS=function(t,a){var n=this._attributes[t];return!!n&&a in n};ba.prototype.setAttribute=function(t,a){return this.setAttributeNS(null,t,a)};ba.prototype.getAttribute=function(t){return this.getAttributeNS(null,t)};ba.prototype.removeAttribute=function(t){return this.removeAttributeNS(null,t)};ba.prototype.hasAttribute=function(t){return this.hasAttributeNS(null,t)};ba.prototype.removeEventListener=N_;ba.prototype.addEventListener=R_;ba.prototype.dispatchEvent=x_;ba.prototype.focus=function(){return};ba.prototype.toString=function(){return E_(this)};ba.prototype.getElementsByClassName=function(t){var a=t.split(" "),n=[];return E3(this,function(s){if(s.nodeType===1){var i=s.className||"",l=i.split(" ");if(a.every(function(f){return l.indexOf(f)!==-1}))n.push(s)}}),n};ba.prototype.getElementsByTagName=function(t){t=t.toLowerCase();var a=[];return E3(this.childNodes,function(n){if(n.nodeType===1&&(t==="*"||n.tagName.toLowerCase()===t))a.push(n)}),a};ba.prototype.contains=function(t){return E3(this,function(a){return t===a})||!1}});var C7=Mt((rI,S7)=>{var I3=z3();S7.exports=Vi;function Vi(e){if(!(this instanceof Vi))return new Vi;this.childNodes=[],this.parentNode=null,this.ownerDocument=e||null}Vi.prototype.type="DocumentFragment";Vi.prototype.nodeType=11;Vi.prototype.nodeName="#document-fragment";Vi.prototype.appendChild=I3.prototype.appendChild;Vi.prototype.replaceChild=I3.prototype.replaceChild;Vi.prototype.removeChild=I3.prototype.removeChild;Vi.prototype.toString=function(){return this.childNodes.map(function(t){return String(t)}).join("")}});var F7=Mt((oI,_7)=>{_7.exports=U3;function U3(e){}U3.prototype.initEvent=function(t,a,n){this.type=t,this.bubbles=a,this.cancelable=n};U3.prototype.preventDefault=function(){}});var B7=Mt((cI,O7)=>{var z_=H3(),I_=m7(),U_=p7(),Qc=z3(),G_=C7(),X_=F7(),K_=D3(),L_=x3(),V_=R3();O7.exports=$u;function $u(){if(!(this instanceof $u))return new $u;this.head=this.createElement("head"),this.body=this.createElement("body"),this.documentElement=this.createElement("html"),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body),this.childNodes=[this.documentElement],this.nodeType=9}var Ns=$u.prototype;Ns.createTextNode=function(t){return new U_(t,this)};Ns.createElementNS=function(t,a){var n=t===null?null:String(t);return new Qc(a,this,n)};Ns.createElement=function(t){return new Qc(t,this)};Ns.createDocumentFragment=function(){return new G_(this)};Ns.createEvent=function(t){return new X_(t)};Ns.createComment=function(t){return new I_(t,this)};Ns.getElementById=function(t){t=String(t);var a=z_(this.childNodes,function(n){if(String(n.id)===t)return n});return a||null};Ns.getElementsByClassName=Qc.prototype.getElementsByClassName;Ns.getElementsByTagName=Qc.prototype.getElementsByTagName;Ns.contains=Qc.prototype.contains;Ns.removeEventListener=V_;Ns.addEventListener=L_;Ns.dispatchEvent=K_});var M7=Mt((hI,T7)=>{var Y_=B7();T7.exports=new Y_});var G3=Mt((uI,D7)=>{var H7=typeof global<"u"?global:typeof window<"u"?window:{},J_=M7(),Zc;if(typeof document<"u")Zc=document;else if(Zc=H7["__GLOBAL_DOCUMENT_CACHE@4"],!Zc)Zc=H7["__GLOBAL_DOCUMENT_CACHE@4"]=J_;D7.exports=Zc});var x7=Mt((mI,z0)=>{function X3(){return z0.exports=X3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},z0.exports.__esModule=!0,z0.exports.default=z0.exports,X3.apply(null,arguments)}z0.exports=X3,z0.exports.__esModule=!0,z0.exports.default=z0.exports});var N7=Mt((gI,R7)=>{R7.exports=Z_;var Q_=Object.prototype.toString;function Z_(e){if(!e)return!1;var t=Q_.call(e);return t==="[object Function]"||typeof e==="function"&&t!=="[object RegExp]"||typeof window<"u"&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}});var I7=Mt((pI,z7)=>{function $_(e,t){var a=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(a)return(a=a.call(e)).next.bind(a);if(Array.isArray(e)||(a=W_(e))||t&&e&&typeof e.length==="number"){if(a)e=a;var n=0;return function(){if(n>=e.length)return{done:!0};return{done:!1,value:e[n++]}}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2
2
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W_(e,t){if(!e)return;if(typeof e==="string")return E7(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);if(a==="Object"&&e.constructor)a=e.constructor.name;if(a==="Map"||a==="Set")return Array.from(e);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return E7(e,t)}function E7(e,t){if(t==null||t>e.length)t=e.length;for(var a=0,n=Array(t);a<t;a++)n[a]=e[a];return n}var P_=function(){function e(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.typeToInterceptorsMap_=new Map,this.enabled_=!1},t.addInterceptor=function(n,s){if(!this.typeToInterceptorsMap_.has(n))this.typeToInterceptorsMap_.set(n,new Set);var i=this.typeToInterceptorsMap_.get(n);if(i.has(s))return!1;return i.add(s),!0},t.removeInterceptor=function(n,s){var i=this.typeToInterceptorsMap_.get(n);if(i&&i.has(s))return i.delete(s),!0;return!1},t.clearInterceptorsByType=function(n){var s=this.typeToInterceptorsMap_.get(n);if(!s)return!1;return this.typeToInterceptorsMap_.delete(n),this.typeToInterceptorsMap_.set(n,new Set),!0},t.clear=function(){if(!this.typeToInterceptorsMap_.size)return!1;return this.typeToInterceptorsMap_=new Map,!0},t.getForType=function(n){return this.typeToInterceptorsMap_.get(n)||new Set},t.execute=function(n,s){var i=this.getForType(n);for(var l=$_(i),f;!(f=l()).done;){var c=f.value;try{s=c(s)}catch(h){}}return s},e}();z7.exports=P_});var G7=Mt((bI,U7)=>{var eF=function(){function e(){this.maxAttempts_=1,this.delayFactor_=0.1,this.fuzzFactor_=0.1,this.initialDelay_=1000,this.enabled_=!1}var t=e.prototype;return t.getIsEnabled=function(){return this.enabled_},t.enable=function(){this.enabled_=!0},t.disable=function(){this.enabled_=!1},t.reset=function(){this.maxAttempts_=1,this.delayFactor_=0.1,this.fuzzFactor_=0.1,this.initialDelay_=1000,this.enabled_=!1},t.getMaxAttempts=function(){return this.maxAttempts_},t.setMaxAttempts=function(n){this.maxAttempts_=n},t.getDelayFactor=function(){return this.delayFactor_},t.setDelayFactor=function(n){this.delayFactor_=n},t.getFuzzFactor=function(){return this.fuzzFactor_},t.setFuzzFactor=function(n){this.fuzzFactor_=n},t.getInitialDelay=function(){return this.initialDelay_},t.setInitialDelay=function(n){this.initialDelay_=n},t.createRetry=function(n){var s=n===void 0?{}:n,i=s.maxAttempts,l=s.delayFactor,f=s.fuzzFactor,c=s.initialDelay;return new tF({maxAttempts:i||this.maxAttempts_,delayFactor:l||this.delayFactor_,fuzzFactor:f||this.fuzzFactor_,initialDelay:c||this.initialDelay_})},e}(),tF=function(){function e(a){this.maxAttempts_=a.maxAttempts,this.delayFactor_=a.delayFactor,this.fuzzFactor_=a.fuzzFactor,this.currentDelay_=a.initialDelay,this.currentAttempt_=1}var t=e.prototype;return t.moveToNextAttempt=function(){this.currentAttempt_++;var n=this.currentDelay_*this.delayFactor_;this.currentDelay_=this.currentDelay_+n},t.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_},t.getCurrentDelay=function(){return this.currentDelay_},t.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_},t.getCurrentMaxPossibleDelay=function(){return(1+this.fuzzFactor_)*this.currentDelay_},t.getCurrentFuzzedDelay=function(){var n=this.getCurrentMinPossibleDelay(),s=this.getCurrentMaxPossibleDelay();return n+Math.random()*(s-n)},e}();U7.exports=eF});var K7=Mt((wI,X7)=>{var aF=Li(),nF=function(t,a){if(a===void 0)a=!1;return function(n,s,i){if(n){t(n);return}if(s.statusCode>=400&&s.statusCode<=599){var l=i;if(a)if(aF.TextDecoder){var f=sF(s.headers&&s.headers["content-type"]);try{l=new TextDecoder(f).decode(i)}catch(c){}}else l=String.fromCharCode.apply(null,new Uint8Array(i));t({cause:l});return}t(null,i)}};function sF(e){if(e===void 0)e="";return e.toLowerCase().split(";").reduce(function(t,a){var n=a.split("="),s=n[0],i=n[1];if(s.trim()==="charset")return i.trim();return t},"utf-8")}X7.exports=nF});var J7=Mt((dI,L3)=>{var L7=Li(),iF=x7(),lF=N7(),V7=I7(),fF=G7();Ga.httpHandler=K7();Ga.requestInterceptorsStorage=new V7;Ga.responseInterceptorsStorage=new V7;Ga.retryManager=new fF;var rF=function(t){var a={};if(!t)return a;return t.trim().split(`
|
|
3
3
|
`).forEach(function(n){var s=n.indexOf(":"),i=n.slice(0,s).trim().toLowerCase(),l=n.slice(s+1).trim();if(typeof a[i]>"u")a[i]=l;else if(Array.isArray(a[i]))a[i].push(l);else a[i]=[a[i],l]}),a};L3.exports=Ga;L3.exports.default=Ga;Ga.XMLHttpRequest=L7.XMLHttpRequest||uF;Ga.XDomainRequest="withCredentials"in new Ga.XMLHttpRequest?Ga.XMLHttpRequest:L7.XDomainRequest;oF(["get","put","post","patch","head","delete"],function(e){Ga[e==="delete"?"del":e]=function(t,a,n){return a=Y7(t,a,n),a.method=e.toUpperCase(),K3(a)}});function oF(e,t){for(var a=0;a<e.length;a++)t(e[a])}function cF(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function Y7(e,t,a){var n=e;if(lF(t)){if(a=t,typeof e==="string")n={uri:e}}else n=iF({},t,{uri:e});return n.callback=a,n}function Ga(e,t,a){return t=Y7(e,t,a),K3(t)}function K3(e){if(typeof e.callback>"u")throw Error("callback argument missing");if(e.requestType&&Ga.requestInterceptorsStorage.getIsEnabled()){var t={uri:e.uri||e.url,headers:e.headers||{},body:e.body,metadata:e.metadata||{},retry:e.retry,timeout:e.timeout},a=Ga.requestInterceptorsStorage.execute(e.requestType,t);e.uri=a.uri,e.headers=a.headers,e.body=a.body,e.metadata=a.metadata,e.retry=a.retry,e.timeout=a.timeout}var n=!1,s=function(M,x,R){if(!n)n=!0,e.callback(M,x,R)};function i(){if(h.readyState===4&&!Ga.responseInterceptorsStorage.getIsEnabled())setTimeout(c,0)}function l(){var H=void 0;if(h.response)H=h.response;else H=h.responseText||hF(h);if(y)try{H=JSON.parse(H)}catch(M){}return H}function f(H){if(clearTimeout(O),clearTimeout(e.retryTimeout),!(H instanceof Error))H=Error(""+(H||"Unknown XMLHttpRequest Error"));if(H.statusCode=0,!g&&Ga.retryManager.getIsEnabled()&&e.retry&&e.retry.shouldRetry()){e.retryTimeout=setTimeout(function(){e.retry.moveToNextAttempt(),e.xhr=h,K3(e)},e.retry.getCurrentFuzzedDelay());return}if(e.requestType&&Ga.responseInterceptorsStorage.getIsEnabled()){var M={headers:T.headers||{},body:T.body,responseUrl:h.responseURL,responseType:h.responseType},x=Ga.responseInterceptorsStorage.execute(e.requestType,M);T.body=x.body,T.headers=x.headers}return s(H,T)}function c(){if(g)return;var H;if(clearTimeout(O),clearTimeout(e.retryTimeout),e.useXDR&&h.status===void 0)H=200;else H=h.status===1223?204:h.status;var M=T,x=null;if(H!==0){if(M={body:l(),statusCode:H,method:d,headers:{},url:b,rawRequest:h},h.getAllResponseHeaders)M.headers=rF(h.getAllResponseHeaders())}else x=Error("Internal XMLHttpRequest Error");if(e.requestType&&Ga.responseInterceptorsStorage.getIsEnabled()){var R={headers:M.headers||{},body:M.body,responseUrl:h.responseURL,responseType:h.responseType},E=Ga.responseInterceptorsStorage.execute(e.requestType,R);M.body=E.body,M.headers=E.headers}return s(x,M,M.body)}var h=e.xhr||null;if(!h)if(e.cors||e.useXDR)h=new Ga.XDomainRequest;else h=new Ga.XMLHttpRequest;var u,g,b=h.url=e.uri||e.url,d=h.method=e.method||"GET",j=e.body||e.data,A=h.headers=e.headers||{},C=!!e.sync,y=!1,O,T={body:void 0,headers:{},statusCode:0,method:d,url:b,rawRequest:h};if("json"in e&&e.json!==!1){if(y=!0,A.accept||A.Accept||(A.Accept="application/json"),d!=="GET"&&d!=="HEAD")A["content-type"]||A["Content-Type"]||(A["Content-Type"]="application/json"),j=JSON.stringify(e.json===!0?j:e.json)}if(h.onreadystatechange=i,h.onload=c,h.onerror=f,h.onprogress=function(){},h.onabort=function(){g=!0,clearTimeout(e.retryTimeout)},h.ontimeout=f,h.open(d,b,!C,e.username,e.password),!C)h.withCredentials=!!e.withCredentials;if(!C&&e.timeout>0)O=setTimeout(function(){if(g)return;g=!0,h.abort("timeout");var H=Error("XMLHttpRequest timeout");H.code="ETIMEDOUT",f(H)},e.timeout);if(h.setRequestHeader){for(u in A)if(A.hasOwnProperty(u))h.setRequestHeader(u,A[u])}else if(e.headers&&!cF(e.headers))throw Error("Headers cannot be set on an XDomainRequest object");if("responseType"in e)h.responseType=e.responseType;if("beforeSend"in e&&typeof e.beforeSend==="function")e.beforeSend(h);return h.send(j||null),h}function hF(e){try{if(e.responseType==="document")return e.responseXML;var t=e.responseXML&&e.responseXML.documentElement.nodeName==="parsererror";if(e.responseType===""&&!t)return e.responseXML}catch(a){}return null}function uF(){}});var tb=Mt((jI,eb)=>{var Q7=G3(),Y3=Object.create||function(){function e(){}return function(t){if(arguments.length!==1)throw Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function Es(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}Es.prototype=Y3(Error.prototype);Es.prototype.constructor=Es;Es.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};function J3(e){function t(n,s,i,l){return(n|0)*3600+(s|0)*60+(i|0)+(l|0)/1000}var a=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);if(!a)return null;if(a[3])return t(a[1],a[2],a[3].replace(":",""),a[4]);else if(a[1]>59)return t(a[1],a[2],0,a[4]);else return t(0,a[1],a[2],a[4])}function Wc(){this.values=Y3(null)}Wc.prototype={set:function(e,t){if(!this.get(e)&&t!=="")this.values[e]=t},get:function(e,t,a){if(a)return this.has(e)?this.values[e]:t[a];return this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,a){for(var n=0;n<a.length;++n)if(t===a[n]){this.set(e,t);break}},integer:function(e,t){if(/^-?\d+$/.test(t))this.set(e,parseInt(t,10))},percent:function(e,t){var a;if(a=t.match(/^([\d]{1,3})(\.[\d]*)?%$/)){if(t=parseFloat(t),t>=0&&t<=100)return this.set(e,t),!0}return!1}};function $c(e,t,a,n){var s=n?e.split(n):[e];for(var i in s){if(typeof s[i]!=="string")continue;var l=s[i].split(a);if(l.length!==2)continue;var f=l[0].trim(),c=l[1].trim();t(f,c)}}function mF(e,t,a){var n=e;function s(){var f=J3(e);if(f===null)throw new Es(Es.Errors.BadTimeStamp,"Malformed timestamp: "+n);return e=e.replace(/^[^\sa-zA-Z-]+/,""),f}function i(f,c){var h=new Wc;$c(f,function(u,g){switch(u){case"region":for(var b=a.length-1;b>=0;b--)if(a[b].id===g){h.set(u,a[b].region);break}break;case"vertical":h.alt(u,g,["rl","lr"]);break;case"line":var d=g.split(","),j=d[0];if(h.integer(u,j),h.percent(u,j)&&h.set("snapToLines",!1),h.alt(u,j,["auto"]),d.length===2)h.alt("lineAlign",d[1],["start","center","end"]);break;case"position":if(d=g.split(","),h.percent(u,d[0]),d.length===2)h.alt("positionAlign",d[1],["start","center","end"]);break;case"size":h.percent(u,g);break;case"align":h.alt(u,g,["start","center","end","left","right"]);break}},/:/,/\s/),c.region=h.get("region",null),c.vertical=h.get("vertical","");try{c.line=h.get("line","auto")}catch(u){}c.lineAlign=h.get("lineAlign","start"),c.snapToLines=h.get("snapToLines",!0),c.size=h.get("size",100);try{c.align=h.get("align","center")}catch(u){c.align=h.get("align","middle")}try{c.position=h.get("position","auto")}catch(u){c.position=h.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},c.align)}c.positionAlign=h.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},c.align)}function l(){e=e.replace(/^\s+/,"")}if(l(),t.startTime=s(),l(),e.substr(0,3)!=="-->")throw new Es(Es.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+n);e=e.substr(3),l(),t.endTime=s(),l(),i(e,t)}var V3=Q7.createElement&&Q7.createElement("textarea"),gF={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Z7={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)"},pF={v:"title",lang:"lang"},$7={rt:"ruby"};function P7(e,t){function a(){if(!t)return null;function j(C){return t=t.substr(C.length),C}var A=t.match(/^([^<]*)(<[^>]*>?)?/);return j(A[1]?A[1]:A[2])}function n(j){return V3.innerHTML=j,j=V3.textContent,V3.textContent="",j}function s(j,A){return!$7[A.localName]||$7[A.localName]===j.localName}function i(j,A){var C=gF[j];if(!C)return null;var y=e.document.createElement(C),O=pF[j];if(O&&A)y[O]=A.trim();return y}var l=e.document.createElement("div"),f=l,c,h=[];while((c=a())!==null){if(c[0]==="<"){if(c[1]==="/"){if(h.length&&h[h.length-1]===c.substr(2).replace(">",""))h.pop(),f=f.parentNode;continue}var u=J3(c.substr(1,c.length-2)),g;if(u){g=e.document.createProcessingInstruction("timestamp",u),f.appendChild(g);continue}var b=c.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!b)continue;if(g=i(b[1],b[3]),!g)continue;if(!s(f,g))continue;if(b[2]){var d=b[2].split(".");d.forEach(function(j){var A=/^bg_/.test(j),C=A?j.slice(3):j;if(Z7.hasOwnProperty(C)){var y=A?"background-color":"color",O=Z7[C];g.style[y]=O}}),g.className=d.join(" ")}h.push(b[1]),f.appendChild(g),f=g;continue}f.appendChild(e.document.createTextNode(n(c)))}return l}var W7=[[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 bF(e){for(var t=0;t<W7.length;t++){var a=W7[t];if(e>=a[0]&&e<=a[1])return!0}return!1}function wF(e){var t=[],a="",n;if(!e||!e.childNodes)return"ltr";function s(f,c){for(var h=c.childNodes.length-1;h>=0;h--)f.push(c.childNodes[h])}function i(f){if(!f||!f.length)return null;var c=f.pop(),h=c.textContent||c.innerText;if(h){var u=h.match(/^.*(\n|\r)/);if(u)return f.length=0,u[0];return h}if(c.tagName==="ruby")return i(f);if(c.childNodes)return s(f,c),i(f)}s(t,e);while(a=i(t))for(var l=0;l<a.length;l++)if(n=a.charCodeAt(l),bF(n))return"rtl";return"ltr"}function dF(e){if(typeof e.line==="number"&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;var t=e.track,a=t.textTrackList,n=0;for(var s=0;s<a.length&&a[s]!==t;s++)if(a[s].mode==="showing")n++;return++n*-1}function Pu(){}Pu.prototype.applyStyles=function(e,t){t=t||this.div;for(var a in e)if(e.hasOwnProperty(a))t.style[a]=e[a]};Pu.prototype.formatStyle=function(e,t){return e===0?0:e+t};function Wu(e,t,a){Pu.call(this),this.cue=t,this.cueDiv=P7(e,t.text);var n={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:t.vertical===""?"horizontal-tb":t.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=e.document.createElement("div"),n={direction:wF(this.cueDiv),writingMode:t.vertical===""?"horizontal-tb":t.vertical==="lr"?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:t.align==="middle"?"center":t.align,font:a.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var s=0;switch(t.positionAlign){case"start":case"line-left":s=t.position;break;case"center":s=t.position-t.size/2;break;case"end":case"line-right":s=t.position-t.size;break}if(t.vertical==="")this.applyStyles({left:this.formatStyle(s,"%"),width:this.formatStyle(t.size,"%")});else this.applyStyles({top:this.formatStyle(s,"%"),height:this.formatStyle(t.size,"%")});this.move=function(i){this.applyStyles({top:this.formatStyle(i.top,"px"),bottom:this.formatStyle(i.bottom,"px"),left:this.formatStyle(i.left,"px"),right:this.formatStyle(i.right,"px"),height:this.formatStyle(i.height,"px"),width:this.formatStyle(i.width,"px")})}}Wu.prototype=Y3(Pu.prototype);Wu.prototype.constructor=Wu;function Yn(e){var t,a,n,s;if(e.div){a=e.div.offsetHeight,n=e.div.offsetWidth,s=e.div.offsetTop;var i=(i=e.div.childNodes)&&(i=i[0])&&i.getClientRects&&i.getClientRects();e=e.div.getBoundingClientRect(),t=i?Math.max(i[0]&&i[0].height||0,e.height/i.length):0}this.left=e.left,this.right=e.right,this.top=e.top||s,this.height=e.height||a,this.bottom=e.bottom||s+(e.height||a),this.width=e.width||n,this.lineHeight=t!==void 0?t:e.lineHeight}Yn.prototype.move=function(e,t){switch(t=t!==void 0?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t;break}};Yn.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top};Yn.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1};Yn.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right};Yn.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}};Yn.prototype.intersectPercentage=function(e){var t=Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left)),a=Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top)),n=t*a;return n/(this.height*this.width)};Yn.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}};Yn.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,a=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e;var s={left:e.left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||a};return s};function jF(e,t,a,n){function s(C,y){var O,T=new Yn(C),H=1;for(var M=0;M<y.length;M++){while(C.overlapsOppositeAxis(a,y[M])||C.within(a)&&C.overlapsAny(n))C.move(y[M]);if(C.within(a))return C;var x=C.intersectPercentage(a);if(H>x)O=new Yn(C),H=x;C=new Yn(T)}return O||T}var i=new Yn(t),l=t.cue,f=dF(l),c=[];if(l.snapToLines){var h;switch(l.vertical){case"":c=["+y","-y"],h="height";break;case"rl":c=["+x","-x"],h="width";break;case"lr":c=["-x","+x"],h="width";break}var u=i.lineHeight,g=u*Math.round(f),b=a[h]+u,d=c[0];if(Math.abs(g)>b)g=g<0?-1:1,g*=Math.ceil(b/u)*u;if(f<0)g+=l.vertical===""?a.height:a.width,c=c.reverse();i.move(d,g)}else{var j=i.lineHeight/a.height*100;switch(l.lineAlign){case"center":f-=j/2;break;case"end":f-=j;break}switch(l.vertical){case"":t.applyStyles({top:t.formatStyle(f,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(f,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(f,"%")});break}c=["+y","-x","+x","-y"],i=new Yn(t)}var A=s(i,c);t.move(A.toCSSCompatValues(a))}function M1(){}M1.StringDecoder=function(){return{decode:function(e){if(!e)return"";if(typeof e!=="string")throw Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}};M1.convertCueToDOMTree=function(e,t){if(!e||!t)return null;return P7(e,t)};var qF=0.05,vF="sans-serif",kF="1.5%";M1.processCues=function(e,t,a){if(!e||!t||!a)return null;while(a.firstChild)a.removeChild(a.firstChild);var n=e.document.createElement("div");n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin=kF,a.appendChild(n);function s(u){for(var g=0;g<u.length;g++)if(u[g].hasBeenReset||!u[g].displayState)return!0;return!1}if(!s(t)){for(var i=0;i<t.length;i++)n.appendChild(t[i].displayState);return}var l=[],f=Yn.getSimpleBoxPosition(n),c=Math.round(f.height*qF*100)/100,h={font:c+"px "+vF};(function(){var u,g;for(var b=0;b<t.length;b++)g=t[b],u=new Wu(e,g,h),n.appendChild(u.div),jF(e,u,f,l),g.displayState=u.div,l.push(Yn.getSimpleBoxPosition(u))})()};M1.Parser=function(e,t,a){if(!a)a=t,t={};if(!t)t={};this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=a||new TextDecoder("utf8"),this.regionList=[]};M1.Parser.prototype={reportOrThrowError:function(e){if(e instanceof Es)this.onparsingerror&&this.onparsingerror(e);else throw e},parse:function(e){var t=this;if(e)t.buffer+=t.decoder.decode(e,{stream:!0});function a(){var u=t.buffer,g=0;while(g<u.length&&u[g]!=="\r"&&u[g]!==`
|
|
4
4
|
`)++g;var b=u.substr(0,g);if(u[g]==="\r")++g;if(u[g]===`
|
|
@@ -22,7 +22,7 @@ Error generating stack: `+w.message+`
|
|
|
22
22
|
`+(w.join(" > ")+`
|
|
23
23
|
|
|
24
24
|
No matching component was found for:
|
|
25
|
-
`)+r.join(" > ")}return null},ot.getPublicRootInstance=function(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 27:case 5:return Fc(r.child.stateNode);default:return r.child.stateNode}},ot.injectIntoDevTools=function(){var r={bundleType:0,version:MS,rendererPackageName:HS,currentDispatcherRef:Ze,reconcilerVersion:"19.2.0"};if(W8!==null&&(r.rendererConfig=W8),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")r=!1;else{var o=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(o.isDisabled||!o.supportsFiber)r=!0;else{try{Tc=o.inject(r),Ms=o}catch(m){}r=o.checkDCE?!0:!1}}return r},ot.isAlreadyRendering=function(){return(kt&6)!==0},ot.observeVisibleRects=function(r,o,m,w){if(!Oc)throw Error(n(363));r=yc(r,o);var S=sC(r,m,w).disconnect;return{disconnect:function(){S()}}},ot.shouldError=function(){return null},ot.shouldSuspend=function(){return!1},ot.startHostTransition=function(r,o,m,w){if(r.tag!==5)throw Error(n(476));var S=R2(r).queue;x2(r,S,o,r1,m===null?a:function(){var F=R2(r);return F.next===null&&(F=r.alternate.memoizedState),vn(r,F.next.queue,{},ls()),m(w)})},ot.updateContainer=function(r,o,m,w){var S=o.current,F=ls();return Fl(S,F,r,o,m,w),F},ot.updateContainerSync=function(r,o,m,w){return Fl(o.current,2,r,o,m,w),2},ot};Wh.exports.default=Wh.exports;Object.defineProperty(Wh.exports,"__esModule",{value:!0})});var nA=Mt((eJ,aA)=>{var c0=Dt(Wa());aA.exports=function(t,a,n){let s=c0.useRef("loading"),i=c0.useRef(),[l,f]=c0.useState(0),c=c0.useRef(),h=c0.useRef(),u=c0.useRef();if(c.current!==t||h.current!==a||u.current!==n)s.current="loading",i.current=void 0,c.current=t,h.current=a,u.current=n;return c0.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function b(){g.decode().catch(()=>{}).finally(()=>{s.current="loaded",i.current=g,f(Math.random())})}function d(){s.current="failed",i.current=void 0,f(Math.random())}return g.addEventListener("load",b),g.addEventListener("error",d),a&&(g.crossOrigin=a),n&&(g.referrerPolicy=n),g.src=t,function(){g.removeEventListener("load",b),g.removeEventListener("error",d)}},[t,a,n]),[i.current,s.current]}});function lz(e){if(!e||e.length<2)return null;let t=[...e].sort((a,n)=>n.version-a.version);return{left:t[0],right:t[1]}}function Mp(e,t){return Math.max(0,Math.min(e,Math.max(0,t-1)))}var di=Dt(Wa(),1);var Xc=Dt(Wa(),1);var v_=(e)=>oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[I("circle",{cx:"12",cy:"12",r:"10"}),I("path",{d:"m9 12 2 2 4-4"})]}),k_=(e)=>oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",...e,children:[I("circle",{cx:"12",cy:"12",r:"10"}),I("path",{d:"m9 12 2 2 4-4",fill:"none",stroke:"white",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Hp={__CHAT__:"Generating...",__AUTOFILL__:"Autofilling metadata...",__EMBEDDING__:"Generating embeddings...",__RUNNING__:"Generating..."},F3=({teamId:e,message:t,isReply:a,hasReplies:n,isLastReply:s,getUser:i,onReply:l,onViewAttachment:f,isSelected:c,onSelect:h,frameRate:u,startTimecode:g,formatTimestamp:b})=>{let d=t,j=!!d.annotations&&Array.isArray(d.annotations)&&d.annotations.length>0,A=d.creator,C=!!d.sessionId&&!!d.message&&d.message in Hp,y=d.message&&Hp[d.message]||"Generating...",[O,T]=Xc.default.useState(!1),{videoTimeDisplayMode:H}=_1(),M=Xc.default.useMemo(()=>{if(d.second===null||d.second===void 0)return"";if(b)return b(d.second);if(!u)return"";let Q=Math.round(d.second*u);return Il(Q,u,H,g)},[d.second,u,H,g,b]),{data:x}=Lu({queryKey:["teams",e,"me"],queryFn:async()=>{let Q=await Ht.api.teams[":teamId"].me.$get({param:{teamId:e}});if(!Q.ok)throw Error("Failed to fetch current member info");return await Q.json()},enabled:!!e,staleTime:300000}),R=x?.role==="owner",E=Ku(),{mutate:L}=tr({mutationFn:async()=>{let Q=await Ht.api.comments[":commentId"].complete.$post({param:{commentId:d.id},json:{isCompleted:!d.isCompleted}});if(!Q.ok)throw Error("Failed to update comment completion status");return await Q.json()},onSuccess:()=>{E.invalidateQueries({predicate:(Q)=>Q.queryKey.includes("comments")})}}),[P,$]=Xc.default.useState(!1),{mutate:te,isPending:ee}=tr({mutationFn:async()=>{let Q=await Ht.api.comments[":commentId"].$delete({param:{commentId:d.id}});if(!Q.ok)throw Error("Failed to delete comment");return await Q.json()},onSuccess:()=>{E.invalidateQueries({predicate:(Q)=>Q.queryKey.includes("comments")}),$(!1)}}),ae=Xc.default.useMemo(()=>{if(!x)return!1;if(x.role==="owner")return!0;if(d.creator?.id===x.id)return!0;return!1},[x,d.creator?.id]),K=(Q)=>{return Q.split(/(<@[a-zA-Z0-9_-]+>)/g).map((je,ce)=>{if(je.match(/^<@[a-zA-Z0-9_-]+>$/)){let ve=je.slice(2,-1),Ce=d.mentions?.find((_e)=>_e.id===ve)||i(ve);return oe("span",{className:"text-primary font-medium hover:underline cursor-pointer",children:["@",Ce?.name||"Unknown"]},ce)}return I("span",{children:je},ce)})},J=(Q)=>{return Q.replace(/<@([a-zA-Z0-9_-]+)>/g,"@$1").replace(/^\[([^\]]+)\]:/gm,"\\[$1\\]:")},me=()=>{l(d)};return oe("div",{onClick:h,className:`relative flex gap-4 ${a?"mt-[-1px]":"mt-3"} mr-3 group p-3 py-4 border transition-all duration-200 cursor-pointer ${a?s?"rounded-b-xl rounded-t-none":"rounded-none":n?"rounded-t-xl rounded-b-none":"rounded-xl"} ${c?"z-20 border-blue-500/40 dark:border-blue-400/40 bg-blue-500/10 dark:bg-blue-400/10 shadow-sm":"z-10 border-transparent bg-foreground/2 dark:bg-foreground/10 hover:bg-foreground/4 dark:hover:bg-foreground/15"}`,children:[oe("div",{className:"flex flex-col items-center shrink-0 w-8 relative",children:[a&&I("div",{className:"absolute top-[-1rem] h-8 w-0.5 bg-foreground/10 left-1/2 -translate-x-1/2 z-0"}),(n&&!a||a&&!s)&&I("div",{className:"absolute top-4 bottom-[-1rem] w-0.5 bg-foreground/10 left-1/2 -translate-x-1/2 z-0"}),oe(Kc,{className:"z-10 relative",children:[A?.image&&I(Lc,{src:A.image,alt:A.name||"",className:"object-cover"}),I(Vc,{className:"bg-rose-400 text-black",children:A?.name?.[0]?.toUpperCase()||"U"})]})]}),oe("div",{className:"flex-1 min-w-0",children:[oe("div",{className:"flex items-center justify-between w-full mb-1",children:[oe("div",{className:"flex items-center gap-2",children:[I("span",{className:"font-semibold text-sm",children:A?.name||"Unknown"}),I("span",{className:"text-xs text-gray-400",children:new Date(d.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),ae&&I("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity",children:oe(ar,{modal:!1,children:[I(nr,{asChild:!0,children:I(Si,{size:"icon-xs",variant:"ghost",className:"h-6 w-6 cursor-pointer",onClick:(Q)=>Q.stopPropagation(),children:I(Dp,{className:"h-4 w-4 text-foreground/70"})})}),I(sr,{align:"end",onClick:(Q)=>Q.stopPropagation(),children:oe(Ki,{className:"text-destructive focus:text-destructive cursor-pointer",onClick:(Q)=>{Q.stopPropagation(),$(!0)},children:[I(xp,{className:"mr-2 h-4 w-4"}),I("span",{children:Ke.delete()})]})})]})})]}),oe("div",{className:"flow-root mt-1",children:[d.second!==null&&d.second!==void 0&&u&&I("div",{className:"float-left select-none bg-blue-100 dark:bg-blue-900/40 text-blue-600 dark:text-blue-300 px-2.5 py-1 mt-[2px] mr-2 rounded-sm text-xs leading-none font-mono font-bold flex items-center gap-1",children:M}),j&&I("div",{className:"float-left select-none bg-blue-100 dark:bg-blue-900/40 text-blue-600 dark:text-blue-300 px-1 py-1 mt-[2px] mr-2 rounded-sm text-xs leading-none font-bold flex items-center gap-1",title:"Contains drawing annotations",children:I(Yu,{className:"w-3.5 h-3.5"})}),C?oe("div",{className:"space-y-2",children:[I(cs,{className:"h-4 w-3/4"}),I(cs,{className:"h-4 w-1/2"}),I("span",{className:"text-xs text-muted-foreground animate-pulse",children:y})]}):d.sessionId?I("div",{className:"text-sm leading-[1.8] prose prose-sm dark:prose-invert max-w-none break-words",children:I(Jp,{children:J(d.message)})}):I("div",{className:"text-sm leading-[1.8] whitespace-pre-wrap break-words text-wrap break-all",children:K(d.message)})]}),d.attachments&&d.attachments.length>0&&I("div",{className:"flex flex-wrap gap-2 mt-3",children:d.attachments.map((Q)=>{let pe=Q.proxyType==="image",je=Q.url?.split("/").pop()?.split("?")[0]||"file";return oe("div",{className:"relative group rounded-lg overflow-hidden border bg-white shadow-sm hover:shadow-md transition-shadow w-48 h-32",onClick:()=>pe&&f(Q),children:[pe?I("img",{src:Q.url,alt:je,className:"w-full h-full object-cover cursor-pointer"}):oe("div",{className:"w-full h-full bg-gray-100 flex flex-col items-center justify-center p-2 text-center",children:[I(Vu,{className:"w-8 h-8 text-gray-500 mb-2"}),I("span",{className:"text-xs font-medium text-gray-700 break-all line-clamp-2",children:je})]}),I("a",{href:Q.url,target:"_blank",rel:"noreferrer",download:je,className:"absolute right-2 bottom-2 bg-black/60 text-white hover:bg-black/80 p-1.5 rounded-full opacity-0 group-hover:opacity-100 transition-opacity",onClick:(ce)=>ce.stopPropagation(),children:I(Ci,{className:"w-4 h-4"})})]},Q.id)})}),d.sessionId&&oe("div",{className:"mt-3 pt-2 border-t border-foreground/5 flex items-center justify-between text-xs text-muted-foreground/60",children:[I("span",{className:"flex items-center gap-1.5 font-medium text-muted-foreground/80",children:"Created by Agent"}),R&&I(Si,{variant:"outline",size:"xs",onClick:()=>T(!0),className:"cursor-pointer border-violet-500/20 text-violet-600 dark:text-violet-400 hover:bg-violet-500/10 hover:text-violet-700 hover:border-violet-500/30 font-semibold",children:"Logs"})]}),oe("div",{className:"mt-2 flex items-center justify-between w-full",children:[I("button",{onClick:me,className:"text-xs font-medium text-gray-500 hover:text-blue-600 flex items-center gap-1 cursor-pointer",children:Ke.reply()}),I(Rp,{children:oe(Np,{children:[I(Ep,{asChild:!0,children:I("button",{onClick:(Q)=>{Q.stopPropagation(),L()},className:`flex items-center justify-center p-1 rounded-full transition-colors cursor-pointer ${d.isCompleted?"text-green-500 hover:text-green-600 hover:bg-green-500/10":"text-gray-400 hover:text-green-500 hover:bg-green-500/10"}`,children:d.isCompleted?I(k_,{className:"w-5 h-5"}):I(v_,{className:"w-5 h-5"})})}),I(zp,{children:d.isCompleted?Ke.mark_as_incomplete():Ke.mark_as_complete()})]})})]})]}),I(Qp,{sessionId:d.sessionId,open:O,onOpenChange:T}),I(Ip,{open:P,onOpenChange:$,children:oe(Up,{onClick:(Q)=>Q.stopPropagation(),children:[oe(Gp,{children:[I(Kp,{children:Ke.delete_comment_confirm()}),I(Lp,{children:Ke.delete_comment_description()})]}),oe(Xp,{children:[I(Yp,{disabled:ee,onClick:(Q)=>{Q.stopPropagation(),$(!1)},children:Ke.cancel()}),I(Vp,{className:"bg-destructive hover:bg-destructive/90 text-white",disabled:ee,onClick:(Q)=>{Q.stopPropagation(),te()},children:Ke.delete()})]})]})})]})};var hs=Zp((e,t)=>({isDrawing:!1,currentTool:"arrow",currentColor:"#ef4444",annotations:[],history:[[]],historyIndex:0,setIsDrawing:(a)=>e({isDrawing:a}),setTool:(a)=>e({currentTool:a}),setColor:(a)=>e({currentColor:a}),addAnnotation:(a)=>{let{annotations:n,history:s,historyIndex:i}=t(),l=[...n,a],f=s.slice(0,i+1);f.push(l),e({annotations:l,history:f,historyIndex:f.length-1})},setAnnotations:(a)=>{e({annotations:a,history:[a],historyIndex:0})},undo:()=>{let{historyIndex:a,history:n}=t();if(a>0){let s=a-1;e({annotations:n[s],historyIndex:s})}},redo:()=>{let{historyIndex:a,history:n}=t();if(a<n.length-1){let s=a+1;e({annotations:n[s],historyIndex:s})}},reset:()=>e({isDrawing:!1,currentTool:"arrow",annotations:[],history:[[]],historyIndex:0})}));var ra=Dt(Wa(),1);var A_=["#ef4444","#f97316","#eab308","#22c55e","#3b82f6","#a855f7","#ec4899","#000000","#ffffff"],B3=ra.default.forwardRef(({projectId:e,onSendMessage:t,replyingTo:a,onCancelReply:n,initialText:s="",hideAnnotationControl:i=!1,disableMentions:l=!1,currentTime:f,frameRate:c,startTimecode:h,formatTimestamp:u,onTyping:g},b)=>{let[d,j]=ra.useState([]),[A,C]=ra.useState(null),[y,O]=ra.useState(!0),{videoTimeDisplayMode:T}=_1(),H=ra.default.useMemo(()=>{if(f===void 0)return"";if(u)return u(f);if(!c)return"";let be=Math.round(f*c);return Il(be,c,T,h)},[f,c,T,h,u]),{teamId:M,ensureTeamIdForProject:x}=s7(),{members:R,loading:E,fetchMembers:L,fetchProjectMembers:P}=l7();ra.useEffect(()=>{if(e&&!M)x(e)},[e,M,x]);let{isDrawing:$,setIsDrawing:te,currentTool:ee,setTool:ae,currentColor:K,setColor:J,undo:me,redo:Q,history:pe,historyIndex:je,annotations:ce,reset:ve}=hs(),[Ce,_e]=ra.useState(!1),[Ue,Ge]=ra.useState(""),[xe,ut]=ra.useState(0),[_t,xt]=ra.useState({bots:!1,users:!1}),[jt,ta]=ra.useState(!1),ln=ra.default.useMemo(()=>{if(!y||f===void 0||!u&&!c||jt)return"";if(T==="timecode")return"pl-[120px]";return"pl-[85px]"},[y,f,c,jt,T]),qt=ra.useRef(null),Re=ra.useRef(null),Ie=ra.useRef(null),We=ra.useRef(null),{mutateAsync:at}=tr({mutationFn:async({projectId:be,data:Pe})=>{let Qe=await Ht.api.projects[":projectId"].attachments.$post({param:{projectId:be},json:Pe});if(!Qe.ok)throw Error("Failed to create attachment");return await Qe.json()}});ra.useEffect(()=>{if(s&&qt.current){qt.current.innerText=s,ta(!!s.trim()),qt.current.focus();let be=document.createRange(),Pe=window.getSelection();be.selectNodeContents(qt.current),be.collapse(!1),Pe?.removeAllRanges(),Pe?.addRange(be)}},[s]),ra.useEffect(()=>{if(a&&qt.current){qt.current.focus();let be=document.createRange(),Pe=window.getSelection();be.selectNodeContents(qt.current),be.collapse(!1),Pe?.removeAllRanges(),Pe?.addRange(be)}},[a]),ra.useEffect(()=>{return()=>{te(!1)}},[te]);let Bt=R.filter((be)=>be.type==="agent"&&be.name?.toLowerCase().startsWith(Ue.toLowerCase())).map((be)=>({type:"user",data:be})),Je=R.filter((be)=>be.type!=="agent"&&be.name?.toLowerCase().startsWith(Ue.toLowerCase())).map((be)=>({type:"user",data:be})),aa=[..._t.bots?[]:Bt,..._t.users?[]:Je];ra.useEffect(()=>{ut(0)},[Ue,Ce,_t]),ra.useEffect(()=>{We.current?.querySelector(`[data-index="${xe}"]`)?.scrollIntoView({block:"nearest"})},[xe]);let wt=(be)=>{return be.split(" ").map((Pe)=>Pe[0]).slice(0,2).join("").toUpperCase()},Hn=()=>{if(!qt.current)return;if(ta(!!qt.current.innerText.trim()),g?.(),l){_e(!1),Ie.current=null;return}let be=window.getSelection();if(!be||be.rangeCount===0)return;let Pe=be.getRangeAt(0),Qe=Pe.startContainer,zt=Pe.startOffset;if(Qe.nodeType===Node.TEXT_NODE){let ha=(Qe.textContent||"").slice(0,zt),He=ha.lastIndexOf("@");if(He!==-1){let Ne=He===0,It=ha[He-1];if(Ne||/\s/.test(It)){let Ae=ha.slice(He+1);if(!/\s/.test(Ae)){if(Ge(Ae),_e(!0),e)P(e,!0,!0);else if(M)L(M,!0,!0);let Ye=document.createRange();Ye.setStart(Qe,He),Ye.setEnd(Qe,zt),Ie.current=Ye;return}}}}_e(!1),Ie.current=null},Dn=(be)=>{if(!Ie.current||!qt.current)return;let Pe=Ie.current;Pe.deleteContents();let Qe=document.createElement("span");Qe.contentEditable="false",Qe.dataset.type="mention",Qe.dataset.id=be.data.id,Qe.className="inline-block bg-blue-100 text-blue-700 dark:bg-blue-900/40 dark:text-blue-300 px-1.5 py-0.5 rounded-md text-sm font-medium align-middle select-none mx-0.5",Qe.innerText=`@${be.data.name}`,Pe.insertNode(Qe);let zt=document.createTextNode(" ");Qe.after(zt);let Ha=document.createRange(),ha=window.getSelection();Ha.setStartAfter(zt),Ha.collapse(!0),ha?.removeAllRanges(),ha?.addRange(Ha),_e(!1),Ie.current=null,ta(!0),qt.current.focus()},La=(be)=>{if(be.nativeEvent.isComposing)return;if(Ce&&aa.length>0){if(be.key==="ArrowUp"){be.preventDefault(),ut((Pe)=>Pe>0?Pe-1:aa.length-1);return}if(be.key==="ArrowDown"){be.preventDefault(),ut((Pe)=>Pe<aa.length-1?Pe+1:0);return}if(be.key==="Enter"||be.key==="Tab"){be.preventDefault(),Dn(aa[xe]);return}if(be.key==="Escape"){be.preventDefault(),_e(!1);return}}if(be.key==="Enter"&&!be.shiftKey)be.preventDefault(),ga()},Va=ra.useCallback(async(be)=>{if(!be.target.files)return;let Pe=Array.from(be.target.files);for(let Qe of Pe){let zt=`${Date.now()}-${Qe.name}`,Ha={id:zt,file:Qe,progress:0};j((ha)=>[...ha,Ha]);try{let ha=await at({projectId:e,data:{fileName:Qe.name,contentType:Qe.type,size:Qe.size}});if(ha.uploadUrl&&ha.id)await fetch(ha.uploadUrl,{method:"PUT",body:Qe,headers:{"Content-Type":Qe.type}}),j((He)=>He.map((Ne)=>Ne.id===zt?{...Ne,progress:100,attachmentId:ha.id}:Ne))}catch(ha){j((He)=>He.map((Ne)=>Ne.id===zt?{...Ne,error:ha instanceof Error?ha.message:"Upload failed"}:Ne))}}if(Re.current)Re.current.value=""},[e,at]),xn=(be)=>{j((Pe)=>Pe.filter((Qe)=>Qe.id!==be))},ga=()=>{if(!qt.current)return;if(d.some((zt)=>!zt.attachmentId&&!zt.error))return;let Pe=d.map((zt)=>zt.attachmentId).filter((zt)=>!!zt),Qe="";if(qt.current.childNodes.forEach((zt)=>{if(zt.nodeType===Node.TEXT_NODE)Qe+=zt.textContent;else if(zt.nodeType===Node.ELEMENT_NODE){let Ha=zt;if(Ha.dataset.type==="mention")Qe+=`<@${Ha.dataset.id}>`;else if(Ha.tagName==="BR")Qe+=`
|
|
25
|
+
`)+r.join(" > ")}return null},ot.getPublicRootInstance=function(r){if(r=r.current,!r.child)return null;switch(r.child.tag){case 27:case 5:return Fc(r.child.stateNode);default:return r.child.stateNode}},ot.injectIntoDevTools=function(){var r={bundleType:0,version:MS,rendererPackageName:HS,currentDispatcherRef:Ze,reconcilerVersion:"19.2.0"};if(W8!==null&&(r.rendererConfig=W8),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")r=!1;else{var o=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(o.isDisabled||!o.supportsFiber)r=!0;else{try{Tc=o.inject(r),Ms=o}catch(m){}r=o.checkDCE?!0:!1}}return r},ot.isAlreadyRendering=function(){return(kt&6)!==0},ot.observeVisibleRects=function(r,o,m,w){if(!Oc)throw Error(n(363));r=yc(r,o);var S=sC(r,m,w).disconnect;return{disconnect:function(){S()}}},ot.shouldError=function(){return null},ot.shouldSuspend=function(){return!1},ot.startHostTransition=function(r,o,m,w){if(r.tag!==5)throw Error(n(476));var S=R2(r).queue;x2(r,S,o,r1,m===null?a:function(){var F=R2(r);return F.next===null&&(F=r.alternate.memoizedState),vn(r,F.next.queue,{},ls()),m(w)})},ot.updateContainer=function(r,o,m,w){var S=o.current,F=ls();return Fl(S,F,r,o,m,w),F},ot.updateContainerSync=function(r,o,m,w){return Fl(o.current,2,r,o,m,w),2},ot};Wh.exports.default=Wh.exports;Object.defineProperty(Wh.exports,"__esModule",{value:!0})});var nA=Mt((eJ,aA)=>{var c0=Dt(Wa());aA.exports=function(t,a,n){let s=c0.useRef("loading"),i=c0.useRef(),[l,f]=c0.useState(0),c=c0.useRef(),h=c0.useRef(),u=c0.useRef();if(c.current!==t||h.current!==a||u.current!==n)s.current="loading",i.current=void 0,c.current=t,h.current=a,u.current=n;return c0.useLayoutEffect(function(){if(!t)return;var g=document.createElement("img");function b(){g.decode().catch(()=>{}).finally(()=>{s.current="loaded",i.current=g,f(Math.random())})}function d(){s.current="failed",i.current=void 0,f(Math.random())}return g.addEventListener("load",b),g.addEventListener("error",d),a&&(g.crossOrigin=a),n&&(g.referrerPolicy=n),g.src=t,function(){g.removeEventListener("load",b),g.removeEventListener("error",d)}},[t,a,n]),[i.current,s.current]}});function lz(e){if(!e||e.length<2)return null;let t=[...e].sort((a,n)=>n.version-a.version);return{left:t[0],right:t[1]}}function Mp(e,t){return Math.max(0,Math.min(e,Math.max(0,t-1)))}var di=Dt(Wa(),1);var Xc=Dt(Wa(),1);var v_=(e)=>oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[I("circle",{cx:"12",cy:"12",r:"10"}),I("path",{d:"m9 12 2 2 4-4"})]}),k_=(e)=>oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",stroke:"none",...e,children:[I("circle",{cx:"12",cy:"12",r:"10"}),I("path",{d:"m9 12 2 2 4-4",fill:"none",stroke:"white",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),Hp={__CHAT__:"Generating...",__AUTOFILL__:"Autofilling metadata...",__EMBEDDING__:"Generating embeddings...",__RUNNING__:"Generating..."},F3=({teamId:e,message:t,isReply:a,hasReplies:n,isLastReply:s,getUser:i,onReply:l,onViewAttachment:f,isSelected:c,onSelect:h,frameRate:u,startTimecode:g,formatTimestamp:b})=>{let d=t,j=!!d.annotations&&Array.isArray(d.annotations)&&d.annotations.length>0,A=d.creator,C=!!d.sessionId&&!!d.message&&d.message in Hp,y=d.message&&Hp[d.message]||"Generating...",[O,T]=Xc.default.useState(!1),{videoTimeDisplayMode:H}=_1(),M=Xc.default.useMemo(()=>{if(d.second===null||d.second===void 0)return"";if(b)return b(d.second);if(!u)return"";let Q=Math.round(d.second*u);return Il(Q,u,H,g)},[d.second,u,H,g,b]),{data:x}=Lu({queryKey:["teams",e,"me"],queryFn:async()=>{let Q=await Ht.api.teams[":teamId"].me.$get({param:{teamId:e}});if(!Q.ok)throw Error("Failed to fetch current member info");return await Q.json()},enabled:!!e,staleTime:300000}),R=x?.role==="owner",E=Ku(),{mutate:L}=tr({mutationFn:async()=>{let Q=await Ht.api.comments[":commentId"].complete.$post({param:{commentId:d.id},json:{isCompleted:!d.isCompleted}});if(!Q.ok)throw Error("Failed to update comment completion status");return await Q.json()},onSuccess:()=>{E.invalidateQueries({predicate:(Q)=>Q.queryKey.includes("comments")})}}),[P,$]=Xc.default.useState(!1),{mutate:te,isPending:ee}=tr({mutationFn:async()=>{let Q=await Ht.api.comments[":commentId"].$delete({param:{commentId:d.id}});if(!Q.ok)throw Error("Failed to delete comment");return await Q.json()},onSuccess:()=>{E.invalidateQueries({predicate:(Q)=>Q.queryKey.includes("comments")}),$(!1)}}),ae=Xc.default.useMemo(()=>{if(!x)return!1;if(x.role==="owner")return!0;if(d.creator?.id===x.id)return!0;return!1},[x,d.creator?.id]),K=(Q)=>{return Q.split(/(<@[a-zA-Z0-9_-]+>)/g).map((je,ce)=>{if(je.match(/^<@[a-zA-Z0-9_-]+>$/)){let ve=je.slice(2,-1),Ce=d.mentions?.find((_e)=>_e.id===ve)||i(ve);return oe("span",{className:"text-primary font-medium hover:underline cursor-pointer",children:["@",Ce?.name||"Unknown"]},ce)}return I("span",{children:je},ce)})},J=(Q)=>{return Q.replace(/<@([a-zA-Z0-9_-]+)>/g,"@$1").replace(/^\[([^\]]+)\]:/gm,"\\[$1\\]:")},me=()=>{l(d)};return oe("div",{onClick:h,className:`relative flex gap-4 ${a?"mt-[-1px]":"mt-3"} mr-3 group p-3 py-4 border transition-all duration-200 cursor-pointer ${a?s?"rounded-b-xl rounded-t-none":"rounded-none":n?"rounded-t-xl rounded-b-none":"rounded-xl"} ${c?"z-20 border-blue-500/40 dark:border-blue-400/40 bg-blue-500/10 dark:bg-blue-400/10 shadow-sm":"z-10 border-transparent bg-foreground/2 dark:bg-foreground/10 hover:bg-foreground/4 dark:hover:bg-foreground/15"}`,children:[oe("div",{className:"flex flex-col items-center shrink-0 w-8 relative",children:[a&&I("div",{className:"absolute top-[-1rem] h-8 w-0.5 bg-foreground/10 left-1/2 -translate-x-1/2 z-0"}),(n&&!a||a&&!s)&&I("div",{className:"absolute top-4 bottom-[-1rem] w-0.5 bg-foreground/10 left-1/2 -translate-x-1/2 z-0"}),oe(Kc,{className:"z-10 relative",children:[A?.image&&I(Lc,{src:A.image,alt:A.name||"",className:"object-cover"}),I(Vc,{className:"bg-rose-400 text-black",children:A?.name?.[0]?.toUpperCase()||"U"})]})]}),oe("div",{className:"flex-1 min-w-0",children:[oe("div",{className:"flex items-center justify-between w-full mb-1",children:[oe("div",{className:"flex items-center gap-2",children:[I("span",{className:"font-semibold text-sm",children:A?.name||"Unknown"}),I("span",{className:"text-xs text-gray-400",children:new Date(d.createdAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),ae&&I("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity",children:oe(ar,{modal:!1,children:[I(nr,{asChild:!0,children:I(Si,{size:"icon-xs",variant:"ghost",className:"h-6 w-6 cursor-pointer",onClick:(Q)=>Q.stopPropagation(),children:I(Dp,{className:"h-4 w-4 text-foreground/70"})})}),I(sr,{align:"end",onClick:(Q)=>Q.stopPropagation(),children:oe(Ki,{className:"text-destructive focus:text-destructive cursor-pointer",onClick:(Q)=>{Q.stopPropagation(),$(!0)},children:[I(xp,{className:"mr-2 h-4 w-4"}),I("span",{children:Ke.delete()})]})})]})})]}),oe("div",{className:"flow-root mt-1",children:[d.second!==null&&d.second!==void 0&&u&&I("div",{className:"float-left select-none bg-blue-100 dark:bg-blue-900/40 text-blue-600 dark:text-blue-300 px-2.5 py-1 mt-[2px] mr-2 rounded-sm text-xs leading-none font-mono font-bold flex items-center gap-1",children:M}),j&&I("div",{className:"float-left select-none bg-blue-100 dark:bg-blue-900/40 text-blue-600 dark:text-blue-300 px-1 py-1 mt-[2px] mr-2 rounded-sm text-xs leading-none font-bold flex items-center gap-1",title:"Contains drawing annotations",children:I(Yu,{className:"w-3.5 h-3.5"})}),C?oe("div",{className:"space-y-2",children:[I(cs,{className:"h-4 w-3/4"}),I(cs,{className:"h-4 w-1/2"}),I("span",{className:"text-xs text-muted-foreground animate-pulse",children:y})]}):d.sessionId?I("div",{className:"text-sm leading-[1.8] prose prose-sm dark:prose-invert max-w-none break-words",children:I(Jp,{children:J(d.message)})}):I("div",{className:"text-sm leading-[1.8] whitespace-pre-wrap break-words text-wrap break-all",children:K(d.message)})]}),d.attachments&&d.attachments.length>0&&I("div",{className:"flex flex-wrap gap-2 mt-3",children:d.attachments.map((Q)=>{let pe=Q.proxyType==="image",je=Q.url?.split("/").pop()?.split("?")[0]||"file";return oe("div",{className:"relative group rounded-lg overflow-hidden border bg-white shadow-sm hover:shadow-md transition-shadow w-48 h-32",onClick:()=>pe&&f(Q),children:[pe?I("img",{src:Q.url,alt:je,className:"w-full h-full object-cover cursor-pointer"}):oe("div",{className:"w-full h-full bg-gray-100 flex flex-col items-center justify-center p-2 text-center",children:[I(Vu,{className:"w-8 h-8 text-gray-500 mb-2"}),I("span",{className:"text-xs font-medium text-gray-700 break-all line-clamp-2",children:je})]}),I("a",{href:Q.url,target:"_blank",rel:"noreferrer",download:je,className:"absolute right-2 bottom-2 bg-black/60 text-white hover:bg-black/80 p-1.5 rounded-full opacity-0 group-hover:opacity-100 transition-opacity",onClick:(ce)=>ce.stopPropagation(),children:I(Ci,{className:"w-4 h-4"})})]},Q.id)})}),d.sessionId&&oe("div",{className:"mt-3 pt-2 border-t border-foreground/5 flex items-center justify-between text-xs text-muted-foreground/60",children:[I("span",{className:"flex items-center gap-1.5 font-medium text-muted-foreground/80",children:"Created by Agent"}),R&&I(Si,{variant:"outline",size:"xs",onClick:()=>T(!0),className:"cursor-pointer border-violet-500/20 text-violet-600 dark:text-violet-400 hover:bg-violet-500/10 hover:text-violet-700 hover:border-violet-500/30 font-semibold",children:"Logs"})]}),oe("div",{className:"mt-2 flex items-center justify-between w-full",children:[I("button",{onClick:me,className:"text-xs font-medium text-gray-500 hover:text-blue-600 flex items-center gap-1 cursor-pointer",children:Ke.reply()}),I(Rp,{children:oe(Np,{children:[I(Ep,{asChild:!0,children:I("button",{onClick:(Q)=>{Q.stopPropagation(),L()},className:`flex items-center justify-center p-1 rounded-full transition-colors cursor-pointer ${d.isCompleted?"text-green-500 hover:text-green-600 hover:bg-green-500/10":"text-gray-400 hover:text-green-500 hover:bg-green-500/10"}`,children:d.isCompleted?I(k_,{className:"w-5 h-5"}):I(v_,{className:"w-5 h-5"})})}),I(zp,{children:d.isCompleted?Ke.mark_as_incomplete():Ke.mark_as_complete()})]})})]})]}),I(Qp,{sessionId:d.sessionId,open:O,onOpenChange:T}),I(Ip,{open:P,onOpenChange:$,children:oe(Up,{onClick:(Q)=>Q.stopPropagation(),children:[oe(Gp,{children:[I(Kp,{children:Ke.delete_comment_confirm()}),I(Lp,{children:Ke.delete_comment_description()})]}),oe(Xp,{children:[I(Yp,{disabled:ee,onClick:(Q)=>{Q.stopPropagation(),$(!1)},children:Ke.cancel()}),I(Vp,{className:"bg-destructive hover:bg-destructive/90 text-white",disabled:ee,onClick:(Q)=>{Q.stopPropagation(),te()},children:Ke.delete()})]})]})})]})};var hs=Zp((e,t)=>({isDrawing:!1,currentTool:"arrow",currentColor:"#ef4444",annotations:[],history:[[]],historyIndex:0,setIsDrawing:(a)=>e({isDrawing:a}),setTool:(a)=>e({currentTool:a}),setColor:(a)=>e({currentColor:a}),addAnnotation:(a)=>{let{annotations:n,history:s,historyIndex:i}=t(),l=[...n,a],f=s.slice(0,i+1);f.push(l),e({annotations:l,history:f,historyIndex:f.length-1})},setAnnotations:(a)=>{e({annotations:a,history:[a],historyIndex:0})},undo:()=>{let{historyIndex:a,history:n}=t();if(a>0){let s=a-1;e({annotations:n[s],historyIndex:s})}},redo:()=>{let{historyIndex:a,history:n}=t();if(a<n.length-1){let s=a+1;e({annotations:n[s],historyIndex:s})}},reset:()=>e({isDrawing:!1,currentTool:"arrow",annotations:[],history:[[]],historyIndex:0})}));var ra=Dt(Wa(),1);var A_=["#ef4444","#f97316","#eab308","#22c55e","#3b82f6","#a855f7","#ec4899","#000000","#ffffff"],B3=ra.default.forwardRef(({projectId:e,onSendMessage:t,replyingTo:a,onCancelReply:n,initialText:s="",hideAnnotationControl:i=!1,disableMentions:l=!1,currentTime:f,frameRate:c,startTimecode:h,formatTimestamp:u,onTyping:g},b)=>{let[d,j]=ra.useState([]),[A,C]=ra.useState(null),[y,O]=ra.useState(!0),{videoTimeDisplayMode:T}=_1(),H=ra.default.useMemo(()=>{if(f===void 0)return"";if(u)return u(f);if(!c)return"";let be=Math.round(f*c);return Il(be,c,T,h)},[f,c,T,h,u]),{teamId:M,ensureTeamIdForProject:x}=s7(),{members:R,loading:E,fetchMembers:L,fetchProjectMembers:P}=i7();ra.useEffect(()=>{if(e&&!M)x(e)},[e,M,x]);let{isDrawing:$,setIsDrawing:te,currentTool:ee,setTool:ae,currentColor:K,setColor:J,undo:me,redo:Q,history:pe,historyIndex:je,annotations:ce,reset:ve}=hs(),[Ce,_e]=ra.useState(!1),[Ue,Ge]=ra.useState(""),[xe,ut]=ra.useState(0),[_t,xt]=ra.useState({bots:!1,users:!1}),[jt,ta]=ra.useState(!1),ln=ra.default.useMemo(()=>{if(!y||f===void 0||!u&&!c||jt)return"";if(T==="timecode")return"pl-[120px]";return"pl-[85px]"},[y,f,c,jt,T]),qt=ra.useRef(null),Re=ra.useRef(null),Ie=ra.useRef(null),We=ra.useRef(null),{mutateAsync:at}=tr({mutationFn:async({projectId:be,data:Pe})=>{let Qe=await Ht.api.projects[":projectId"].attachments.$post({param:{projectId:be},json:Pe});if(!Qe.ok)throw Error("Failed to create attachment");return await Qe.json()}});ra.useEffect(()=>{if(s&&qt.current){qt.current.innerText=s,ta(!!s.trim()),qt.current.focus();let be=document.createRange(),Pe=window.getSelection();be.selectNodeContents(qt.current),be.collapse(!1),Pe?.removeAllRanges(),Pe?.addRange(be)}},[s]),ra.useEffect(()=>{if(a&&qt.current){qt.current.focus();let be=document.createRange(),Pe=window.getSelection();be.selectNodeContents(qt.current),be.collapse(!1),Pe?.removeAllRanges(),Pe?.addRange(be)}},[a]),ra.useEffect(()=>{return()=>{te(!1)}},[te]);let Bt=R.filter((be)=>be.type==="agent"&&be.name?.toLowerCase().startsWith(Ue.toLowerCase())).map((be)=>({type:"user",data:be})),Je=R.filter((be)=>be.type!=="agent"&&be.name?.toLowerCase().startsWith(Ue.toLowerCase())).map((be)=>({type:"user",data:be})),aa=[..._t.bots?[]:Bt,..._t.users?[]:Je];ra.useEffect(()=>{ut(0)},[Ue,Ce,_t]),ra.useEffect(()=>{We.current?.querySelector(`[data-index="${xe}"]`)?.scrollIntoView({block:"nearest"})},[xe]);let wt=(be)=>{return be.split(" ").map((Pe)=>Pe[0]).slice(0,2).join("").toUpperCase()},Hn=()=>{if(!qt.current)return;if(ta(!!qt.current.innerText.trim()),g?.(),l){_e(!1),Ie.current=null;return}let be=window.getSelection();if(!be||be.rangeCount===0)return;let Pe=be.getRangeAt(0),Qe=Pe.startContainer,zt=Pe.startOffset;if(Qe.nodeType===Node.TEXT_NODE){let ha=(Qe.textContent||"").slice(0,zt),He=ha.lastIndexOf("@");if(He!==-1){let Ne=He===0,It=ha[He-1];if(Ne||/\s/.test(It)){let Ae=ha.slice(He+1);if(!/\s/.test(Ae)){if(Ge(Ae),_e(!0),e)P(e,!0,!0);else if(M)L(M,!0,!0);let Ye=document.createRange();Ye.setStart(Qe,He),Ye.setEnd(Qe,zt),Ie.current=Ye;return}}}}_e(!1),Ie.current=null},Dn=(be)=>{if(!Ie.current||!qt.current)return;let Pe=Ie.current;Pe.deleteContents();let Qe=document.createElement("span");Qe.contentEditable="false",Qe.dataset.type="mention",Qe.dataset.id=be.data.id,Qe.className="inline-block bg-blue-100 text-blue-700 dark:bg-blue-900/40 dark:text-blue-300 px-1.5 py-0.5 rounded-md text-sm font-medium align-middle select-none mx-0.5",Qe.innerText=`@${be.data.name}`,Pe.insertNode(Qe);let zt=document.createTextNode(" ");Qe.after(zt);let Ha=document.createRange(),ha=window.getSelection();Ha.setStartAfter(zt),Ha.collapse(!0),ha?.removeAllRanges(),ha?.addRange(Ha),_e(!1),Ie.current=null,ta(!0),qt.current.focus()},La=(be)=>{if(be.nativeEvent.isComposing)return;if(Ce&&aa.length>0){if(be.key==="ArrowUp"){be.preventDefault(),ut((Pe)=>Pe>0?Pe-1:aa.length-1);return}if(be.key==="ArrowDown"){be.preventDefault(),ut((Pe)=>Pe<aa.length-1?Pe+1:0);return}if(be.key==="Enter"||be.key==="Tab"){be.preventDefault(),Dn(aa[xe]);return}if(be.key==="Escape"){be.preventDefault(),_e(!1);return}}if(be.key==="Enter"&&!be.shiftKey)be.preventDefault(),ga()},Va=ra.useCallback(async(be)=>{if(!be.target.files)return;let Pe=Array.from(be.target.files);for(let Qe of Pe){let zt=`${Date.now()}-${Qe.name}`,Ha={id:zt,file:Qe,progress:0};j((ha)=>[...ha,Ha]);try{let ha=await at({projectId:e,data:{fileName:Qe.name,contentType:Qe.type,size:Qe.size}});if(ha.uploadUrl&&ha.id)await fetch(ha.uploadUrl,{method:"PUT",body:Qe,headers:{"Content-Type":Qe.type}}),j((He)=>He.map((Ne)=>Ne.id===zt?{...Ne,progress:100,attachmentId:ha.id}:Ne))}catch(ha){j((He)=>He.map((Ne)=>Ne.id===zt?{...Ne,error:ha instanceof Error?ha.message:"Upload failed"}:Ne))}}if(Re.current)Re.current.value=""},[e,at]),xn=(be)=>{j((Pe)=>Pe.filter((Qe)=>Qe.id!==be))},ga=()=>{if(!qt.current)return;if(d.some((zt)=>!zt.attachmentId&&!zt.error))return;let Pe=d.map((zt)=>zt.attachmentId).filter((zt)=>!!zt),Qe="";if(qt.current.childNodes.forEach((zt)=>{if(zt.nodeType===Node.TEXT_NODE)Qe+=zt.textContent;else if(zt.nodeType===Node.ELEMENT_NODE){let Ha=zt;if(Ha.dataset.type==="mention")Qe+=`<@${Ha.dataset.id}>`;else if(Ha.tagName==="BR")Qe+=`
|
|
26
26
|
`;else if(Ha.tagName==="DIV"||Ha.tagName==="P")Qe+=`
|
|
27
27
|
`+Ha.innerText;else Qe+=Ha.innerText}}),Qe=Qe.trim(),!Qe&&Pe.length===0&&ce.length===0)return;if(t(Qe,Pe,ce,a?.id,y?f:void 0),qt.current.innerHTML="",ta(!1),j([]),C(null),te(!1),ve(),_e(!1),n)n()},Ma=d.some((be)=>!be.attachmentId&&!be.error),Ys=d.some((be)=>!!be.attachmentId),Ss=jt||Ys||ce.length>0,Tt=d.length>0||!!a;return oe("div",{ref:b,className:"relative flex flex-col w-full border border-foreground/35 rounded-3xl shadow-sm transition-all duration-200",children:[I("style",{children:`
|
|
28
28
|
[contenteditable]:empty:before {
|
|
@@ -30,7 +30,7 @@ No matching component was found for:
|
|
|
30
30
|
color: #9ca3af;
|
|
31
31
|
cursor: text;
|
|
32
32
|
}
|
|
33
|
-
`}),Ce&&(E||Bt.length>0||Je.length>0)&&I("div",{className:"absolute bottom-full left-4 mb-2 w-64 rounded-xl shadow-lg border border-border overflow-hidden z-20 bg-popover text-popover-foreground animate-in fade-in slide-in-from-bottom-2 duration-200",children:I("div",{ref:We,className:"h-64 overflow-y-auto",children:E?oe("div",{className:"p-2 space-y-4 animate-pulse",children:[oe("div",{className:"space-y-2",children:[I("div",{className:"px-3 py-1.5 bg-muted/50 border-b border-border",children:I(cs,{className:"h-3 w-16"})}),oe("div",{className:"flex items-center gap-2 px-3 py-2",children:[I(cs,{className:"w-6 h-6 rounded-full"}),I(cs,{className:"h-4 w-28"})]}),oe("div",{className:"flex items-center gap-2 px-3 py-2",children:[I(cs,{className:"w-6 h-6 rounded-full"}),I(cs,{className:"h-4 w-20"})]})]}),oe("div",{className:"space-y-2",children:[I("div",{className:"px-3 py-1.5 bg-muted/50 border-b border-border",children:I(cs,{className:"h-3 w-16"})}),oe("div",{className:"flex items-center gap-2 px-3 py-2",children:[I(cs,{className:"w-6 h-6 rounded-full"}),I(cs,{className:"h-4 w-32"})]}),oe("div",{className:"flex items-center gap-2 px-3 py-2",children:[I(cs,{className:"w-6 h-6 rounded-full"}),I(cs,{className:"h-4 w-24"})]})]})]}):oe(F1,{children:[Bt.length>0&&oe(F1,{children:[oe("button",{onClick:(be)=>{be.preventDefault(),be.stopPropagation(),xt((Pe)=>({...Pe,bots:!Pe.bots}))},className:"w-full text-xs font-semibold text-muted-foreground px-3 py-2 bg-muted/50 border-b border-border flex items-center justify-between hover:bg-muted transition-colors",children:[I("span",{children:"Agents"}),I(O1,{className:`w-3 h-3 transition-transform ${_t.bots?"-rotate-90":""}`})]}),!_t.bots&&Bt.map((be,Pe)=>{let Qe=Pe;return oe("button",{"data-index":Qe,onClick:()=>Dn(be),onMouseEnter:()=>ut(Qe),className:`w-full flex items-center gap-2 px-3 py-2 transition-colors text-left ${Qe===xe?"bg-accent text-accent-foreground":"hover:bg-accent/50"}`,children:[oe(Kc,{className:"w-6 h-6",children:[be.type==="user"&&be.data.image&&I(Lc,{src:be.data.image,alt:be.data.name,className:"object-cover"}),I(Vc,{className:"text-[10px] bg-purple-400 text-black font-semibold",children:wt(be.data.name)})]}),I("span",{className:"text-sm",children:be.data.name})]},be.data.id)})]}),Je.length>0&&oe(F1,{children:[oe("button",{onClick:(be)=>{be.preventDefault(),be.stopPropagation(),xt((Pe)=>({...Pe,users:!Pe.users}))},className:"w-full text-xs font-semibold text-muted-foreground px-3 py-2 bg-muted/50 border-b border-border flex items-center justify-between hover:bg-muted transition-colors",children:[I("span",{children:"Members"}),I(O1,{className:`w-3 h-3 transition-transform ${_t.users?"-rotate-90":""}`})]}),!_t.users&&Je.map((be,Pe)=>{let Qe=(_t.bots?0:Bt.length)+Pe;return oe("button",{"data-index":Qe,onClick:()=>Dn(be),onMouseEnter:()=>ut(Qe),className:`w-full flex items-center gap-2 px-3 py-2 transition-colors text-left ${Qe===xe?"bg-accent text-accent-foreground":"hover:bg-accent/50"}`,children:[oe(Kc,{className:"w-6 h-6",children:[be.type==="user"&&be.data.image&&I(Lc,{src:be.data.image,alt:be.data.name,className:"object-cover"}),I(Vc,{className:"text-[10px] bg-blue-400 text-black font-semibold",children:wt(be.data.name)})]}),I("span",{className:"text-sm",children:be.data.name})]},be.data.id)})]})]})})}),Tt&&oe("div",{className:"flex flex-col gap-2 p-3 pb-0 animate-in fade-in slide-in-from-bottom-2 duration-200",children:[a&&oe("div",{className:"flex items-center justify-between bg-muted p-2 px-3 rounded-lg border border-border",children:[I("div",{className:"text-xs text-muted-foreground truncate mr-2",children:Ke.reply_to_message({message:a.message||""})}),I("button",{onClick:n,className:"text-muted-foreground hover:text-foreground p-1 rounded-full hover:bg-muted-foreground/10 shrink-0",children:I(B1,{className:"w-3.5 h-3.5"})})]}),d.length>0&&I("div",{className:"flex gap-3 overflow-x-auto py-2 px-1 scrollbar-hide",children:d.map((be)=>oe("div",{className:"relative group flex-shrink-0",children:[oe("div",{className:"w-16 h-16 rounded-lg border border-gray-200 overflow-hidden bg-gray-50 flex items-center justify-center",children:[be.file.type.startsWith("image/")?I("img",{src:URL.createObjectURL(be.file),alt:"preview",onClick:()=>C(be.file),className:`w-full h-full object-cover ${!be.attachmentId?"opacity-50":""}`}):I(Vu,{className:"w-8 h-8 text-gray-400"}),Ma&&!be.attachmentId&&!be.error&&I("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50",children:I(i7,{progress:be.progress,className:"w-10 h-10"})})]}),I("button",{onClick:()=>xn(be.id),className:"absolute -top-1.5 -right-1.5 bg-gray-500 text-white rounded-full p-0.5 shadow-md opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-500 z-10",children:I(B1,{className:"w-3 h-3"})}),I("span",{className:"text-[10px] text-gray-500 mt-1 block max-w-[4rem] truncate text-center",children:be.file.name})]},be.id))})]}),oe("div",{onClick:()=>qt.current?.focus(),className:"w-full px-4 pt-1 pb-1 cursor-text flow-root max-h-60 overflow-y-auto",children:[y&&f!==void 0&&c!==void 0&&I("div",{onClick:(be)=>{be.stopPropagation(),qt.current?.focus()},className:"float-left select-none bg-blue-100 dark:bg-blue-900/40 text-blue-600 dark:text-blue-300 px-2.5 py-0.5 mt-3 mr-2 rounded-sm text-xs font-mono font-bold flex items-center gap-1 cursor-text",children:H}),I("div",{ref:qt,contentEditable:!0,suppressContentEditableWarning:!0,onInput:Hn,onKeyDown:La,"data-placeholder":a?Ke.reply_placeholder():Ke.message_placeholder(),className:`bg-transparent border-none focus:ring-0 resize-none min-h-[40px] leading-relaxed py-2 focus:outline-none block ${ln}`})]}),oe("div",{className:"flex justify-between items-center px-2 pb-2",children:[$?oe("div",{className:"flex items-center gap-2 overflow-x-auto scrollbar-hide w-full mr-2",children:[I(Si,{onClick:()=>{te(!1),ve()},variant:"ghost",size:"icon",className:"p-2 rounded-full cursor-pointer text-gray-500 hover:text-gray-700 hover:bg-gray-100 mr-2",title:"Back",children:I($p,{className:"w-4 h-4"})}),I("div",{className:"h-4 w-px bg-gray-300 mx-1"}),I("button",{onClick:()=>ae("arrow"),className:`p-1.5 rounded hover:bg-gray-100 ${ee==="arrow"?"text-blue-500 bg-blue-50":"text-gray-500"}`,title:"Arrow",children:I(O3,{size:16,className:"rotate-45"})}),I("button",{onClick:()=>ae("line"),className:`p-1.5 rounded hover:bg-gray-100 ${ee==="line"?"text-blue-500 bg-blue-50":"text-gray-500"}`,title:"Line",children:I(Ul,{size:16,className:"-rotate-45"})}),I("button",{onClick:()=>ae("box"),className:`p-1.5 rounded hover:bg-gray-100 ${ee==="box"?"text-blue-500 bg-blue-50":"text-gray-500"}`,title:"Box",children:I(a7,{size:16})}),I("button",{onClick:()=>ae("freehand"),className:`p-1.5 rounded hover:bg-gray-100 ${ee==="freehand"?"text-blue-500 bg-blue-50":"text-gray-500"}`,title:"Freehand",children:I(Wp,{size:16})}),I("div",{className:"h-4 w-px bg-gray-300 mx-1"}),oe(Ju,{children:[I(Qu,{asChild:!0,children:oe("button",{className:"flex items-center gap-1 p-1 rounded hover:bg-gray-100",children:[I("div",{className:"w-4 h-4 rounded-full border border-gray-200",style:{backgroundColor:K}}),I(O1,{size:12,className:"text-gray-500"})]})}),I(Zu,{className:"w-auto p-2",align:"center",side:"top",children:I("div",{className:"flex items-center gap-1",children:A_.map((be)=>I("button",{onClick:()=>J(be),className:`w-6 h-6 rounded-full border border-gray-200 transition-transform hover:scale-110 ${K===be?"ring-2 ring-blue-500 ring-offset-1":""}`,style:{backgroundColor:be}},be))})})]}),I("div",{className:"h-4 w-px bg-gray-300 mx-1"}),I("button",{onClick:me,disabled:je<=0,className:"p-1.5 rounded hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed text-gray-500",children:I(n7,{size:16})}),I("button",{onClick:Q,disabled:je>=pe.length-1,className:"p-1.5 rounded hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed text-gray-500",children:I(t7,{size:16})})]}):oe("div",{className:"flex items-center gap-1",children:[I("input",{type:"file",ref:Re,className:"hidden",multiple:!0,onChange:Va}),f!==void 0&&c!==void 0&&I(Si,{onClick:()=>O(!y),variant:y?"secondary":"ghost",size:"icon",className:`p-2 rounded-full cursor-pointer ${y?"text-blue-600 bg-blue-50 dark:bg-blue-900/20":""}`,title:y?Ke.disable_timestamp():Ke.enable_timestamp(),children:I(Pp,{className:"w-4 h-4"})}),I(Si,{onClick:()=>Re.current?.click(),className:"p-2 rounded-full cursor-pointer",variant:"ghost",size:"icon",title:Ke.attach_files(),children:I(e7,{className:"w-4 h-4"})}),!i&&I(Si,{onClick:()=>te(!0),variant:"ghost",size:"icon",className:"p-2 rounded-full cursor-pointer",title:Ke.toggle_annotation(),children:I(Yu,{className:"w-4 h-4"})})]}),I("button",{onClick:ga,disabled:!Ss||Ma,className:`p-2 rounded-full transition-all duration-200 flex items-center justify-center shrink-0 ${Ss&&!Ma?"bg-blue-600 text-white shadow-md hover:bg-blue-700 hover:shadow-lg transform hover:-translate-y-0.5":"bg-gray-400 cursor-not-allowed"}`,children:I(O3,{className:"w-4 h-4"})})]}),A&&oe("div",{className:"fixed inset-0 z-[100] bg-black/95 flex flex-col items-center justify-center p-4 animate-in fade-in duration-200",onClick:()=>C(null),children:[I("button",{className:"absolute top-4 right-4 text-white/70 hover:text-white hover:bg-white/20 rounded-full p-2 transition-colors z-50",children:I(B1,{className:"w-8 h-8"})}),I("div",{className:"w-full h-full flex items-center justify-center p-2",children:I("img",{src:URL.createObjectURL(A),alt:"Enlarged view",className:"max-w-full max-h-[85vh] object-contain rounded shadow-2xl cursor-zoom-out",onClick:(be)=>{be.stopPropagation(),C(null)}})}),I("div",{className:"absolute bottom-6 text-white text-sm font-medium bg-black/50 px-4 py-2 rounded-full backdrop-blur-sm",children:A.name})]})]})});B3.displayName="ChatInput";var Yc=Dt(Wa(),1);function r7({isOpen:e,onClose:t,onSuccess:a,children:n}){let[s,i]=Yc.useState(""),[l,f]=Yc.useState(""),[c,h]=Yc.useState(!1),[u,g]=Yc.useState(null);return oe(Ju,{open:e,onOpenChange:(d)=>!d&&t(),children:[I(Qu,{asChild:!0,children:n}),I(Zu,{className:"w-80",align:"end",side:"top",children:oe("form",{onSubmit:async(d)=>{d.preventDefault(),h(!0),g(null);try{let j=await Ht.api.identify.$post({json:{username:s,email:l}});if(!j.ok){let C=await j.json();throw Error(C.error||"Failed to identify")}let{id:A}=await j.json();localStorage.setItem("guest_user_id",A),a(A),t()}catch(j){g(j.message)}finally{h(!1)}},className:"space-y-4",children:[oe("div",{className:"space-y-2",children:[I("h4",{className:"font-medium leading-none",children:Ke.enter_your_details()}),I("p",{className:"text-sm text-muted-foreground",children:Ke.provide_name_email_for_comment()})]}),oe("div",{className:"grid gap-2",children:[oe("div",{className:"grid gap-1",children:[I(M3,{htmlFor:"name",children:Ke.name()}),I(T3,{id:"name",value:s,onChange:(d)=>i(d.target.value),placeholder:Ke.name_placeholder(),size:32,required:!0})]}),oe("div",{className:"grid gap-1",children:[I(M3,{htmlFor:"email",children:Ke.email()}),I(T3,{id:"email",type:"email",value:l,onChange:(d)=>f(d.target.value),placeholder:Ke.email_field_placeholder(),required:!0})]}),u&&I("p",{className:"text-xs text-destructive",children:u})]}),oe("div",{className:"flex justify-end gap-2",children:[I(Si,{type:"button",variant:"outline",size:"sm",onClick:t,children:Ke.cancel()}),oe(Si,{type:"submit",size:"sm",disabled:c,children:[c&&I(f7,{className:"mr-2 h-3 w-3 animate-spin"}),Ke.confirm()]})]})]})})]})}var pt=Dt(Wa(),1);var V=Dt(Li(),1),ye=Dt(G3(),1),A4=Dt(J7(),1),$6=Dt(rb(),1);function Ca(){return Ca=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},Ca.apply(null,arguments)}var H1=Dt(Li(),1),ob="https://example.com",DF=function(t,a){if(/^[a-z]+:/i.test(a))return a;if(/^data:/.test(t))t=H1.default.location&&H1.default.location.href||"";var n=/^\/\//.test(t),s=!H1.default.location&&!/\/\//i.test(t);t=new H1.default.URL(t,H1.default.location||ob);var i=new URL(a,t);if(s)return i.href.slice(ob.length);else if(n)return i.href.slice(i.protocol.length);return i.href},D1=DF;var e9=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(n,s){if(!this.listeners[n])this.listeners[n]=[];this.listeners[n].push(s)},t.off=function(n,s){if(!this.listeners[n])return!1;var i=this.listeners[n].indexOf(s);return this.listeners[n]=this.listeners[n].slice(0),this.listeners[n].splice(i,1),i>-1},t.trigger=function(n){var s=this.listeners[n];if(!s)return;if(arguments.length===2){var i=s.length;for(var l=0;l<i;++l)s[l].call(this,arguments[1])}else{var f=Array.prototype.slice.call(arguments,1),c=s.length;for(var h=0;h<c;++h)s[h].apply(this,f)}},t.dispose=function(){this.listeners={}},t.pipe=function(n){this.on("data",function(s){n.push(s)})},e}();var Z3=Dt(Li(),1),xF=function(t){return Z3.default.atob?Z3.default.atob(t):Buffer.from(t,"base64").toString("binary")};function eh(e){var t=xF(e),a=new Uint8Array(t.length);for(var n=0;n<t.length;n++)a[n]=t.charCodeAt(n);return a}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class hb extends e9{constructor(){super();this.buffer=""}push(e){let t;this.buffer+=e,t=this.buffer.indexOf(`
|
|
33
|
+
`}),Ce&&(E||Bt.length>0||Je.length>0)&&I("div",{className:"absolute bottom-full left-4 mb-2 w-64 rounded-xl shadow-lg border border-border overflow-hidden z-20 bg-popover text-popover-foreground animate-in fade-in slide-in-from-bottom-2 duration-200",children:I("div",{ref:We,className:"h-64 overflow-y-auto",children:E?oe("div",{className:"p-2 space-y-4 animate-pulse",children:[oe("div",{className:"space-y-2",children:[I("div",{className:"px-3 py-1.5 bg-muted/50 border-b border-border",children:I(cs,{className:"h-3 w-16"})}),oe("div",{className:"flex items-center gap-2 px-3 py-2",children:[I(cs,{className:"w-6 h-6 rounded-full"}),I(cs,{className:"h-4 w-28"})]}),oe("div",{className:"flex items-center gap-2 px-3 py-2",children:[I(cs,{className:"w-6 h-6 rounded-full"}),I(cs,{className:"h-4 w-20"})]})]}),oe("div",{className:"space-y-2",children:[I("div",{className:"px-3 py-1.5 bg-muted/50 border-b border-border",children:I(cs,{className:"h-3 w-16"})}),oe("div",{className:"flex items-center gap-2 px-3 py-2",children:[I(cs,{className:"w-6 h-6 rounded-full"}),I(cs,{className:"h-4 w-32"})]}),oe("div",{className:"flex items-center gap-2 px-3 py-2",children:[I(cs,{className:"w-6 h-6 rounded-full"}),I(cs,{className:"h-4 w-24"})]})]})]}):oe(F1,{children:[Bt.length>0&&oe(F1,{children:[oe("button",{onClick:(be)=>{be.preventDefault(),be.stopPropagation(),xt((Pe)=>({...Pe,bots:!Pe.bots}))},className:"w-full text-xs font-semibold text-muted-foreground px-3 py-2 bg-muted/50 border-b border-border flex items-center justify-between hover:bg-muted transition-colors",children:[I("span",{children:"Agents"}),I(O1,{className:`w-3 h-3 transition-transform ${_t.bots?"-rotate-90":""}`})]}),!_t.bots&&Bt.map((be,Pe)=>{let Qe=Pe;return oe("button",{"data-index":Qe,onClick:()=>Dn(be),onMouseEnter:()=>ut(Qe),className:`w-full flex items-center gap-2 px-3 py-2 transition-colors text-left ${Qe===xe?"bg-accent text-accent-foreground":"hover:bg-accent/50"}`,children:[oe(Kc,{className:"w-6 h-6",children:[be.type==="user"&&be.data.image&&I(Lc,{src:be.data.image,alt:be.data.name,className:"object-cover"}),I(Vc,{className:"text-[10px] bg-purple-400 text-black font-semibold",children:wt(be.data.name)})]}),I("span",{className:"text-sm",children:be.data.name})]},be.data.id)})]}),Je.length>0&&oe(F1,{children:[oe("button",{onClick:(be)=>{be.preventDefault(),be.stopPropagation(),xt((Pe)=>({...Pe,users:!Pe.users}))},className:"w-full text-xs font-semibold text-muted-foreground px-3 py-2 bg-muted/50 border-b border-border flex items-center justify-between hover:bg-muted transition-colors",children:[I("span",{children:"Members"}),I(O1,{className:`w-3 h-3 transition-transform ${_t.users?"-rotate-90":""}`})]}),!_t.users&&Je.map((be,Pe)=>{let Qe=(_t.bots?0:Bt.length)+Pe;return oe("button",{"data-index":Qe,onClick:()=>Dn(be),onMouseEnter:()=>ut(Qe),className:`w-full flex items-center gap-2 px-3 py-2 transition-colors text-left ${Qe===xe?"bg-accent text-accent-foreground":"hover:bg-accent/50"}`,children:[oe(Kc,{className:"w-6 h-6",children:[be.type==="user"&&be.data.image&&I(Lc,{src:be.data.image,alt:be.data.name,className:"object-cover"}),I(Vc,{className:"text-[10px] bg-blue-400 text-black font-semibold",children:wt(be.data.name)})]}),I("span",{className:"text-sm",children:be.data.name})]},be.data.id)})]})]})})}),Tt&&oe("div",{className:"flex flex-col gap-2 p-3 pb-0 animate-in fade-in slide-in-from-bottom-2 duration-200",children:[a&&oe("div",{className:"flex items-center justify-between bg-muted p-2 px-3 rounded-lg border border-border",children:[I("div",{className:"text-xs text-muted-foreground truncate mr-2",children:Ke.reply_to_message({message:a.message||""})}),I("button",{onClick:n,className:"text-muted-foreground hover:text-foreground p-1 rounded-full hover:bg-muted-foreground/10 shrink-0",children:I(B1,{className:"w-3.5 h-3.5"})})]}),d.length>0&&I("div",{className:"flex gap-3 overflow-x-auto py-2 px-1 scrollbar-hide",children:d.map((be)=>oe("div",{className:"relative group flex-shrink-0",children:[oe("div",{className:"w-16 h-16 rounded-lg border border-gray-200 overflow-hidden bg-gray-50 flex items-center justify-center",children:[be.file.type.startsWith("image/")?I("img",{src:URL.createObjectURL(be.file),alt:"preview",onClick:()=>C(be.file),className:`w-full h-full object-cover ${!be.attachmentId?"opacity-50":""}`}):I(Vu,{className:"w-8 h-8 text-gray-400"}),Ma&&!be.attachmentId&&!be.error&&I("div",{className:"absolute inset-0 flex items-center justify-center bg-black/50",children:I(l7,{progress:be.progress,className:"w-10 h-10"})})]}),I("button",{onClick:()=>xn(be.id),className:"absolute -top-1.5 -right-1.5 bg-gray-500 text-white rounded-full p-0.5 shadow-md opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-500 z-10",children:I(B1,{className:"w-3 h-3"})}),I("span",{className:"text-[10px] text-gray-500 mt-1 block max-w-[4rem] truncate text-center",children:be.file.name})]},be.id))})]}),oe("div",{onClick:()=>qt.current?.focus(),className:"w-full px-4 pt-1 pb-1 cursor-text flow-root max-h-60 overflow-y-auto",children:[y&&f!==void 0&&c!==void 0&&I("div",{onClick:(be)=>{be.stopPropagation(),qt.current?.focus()},className:"float-left select-none bg-blue-100 dark:bg-blue-900/40 text-blue-600 dark:text-blue-300 px-2.5 py-0.5 mt-3 mr-2 rounded-sm text-xs font-mono font-bold flex items-center gap-1 cursor-text",children:H}),I("div",{ref:qt,contentEditable:!0,suppressContentEditableWarning:!0,onInput:Hn,onKeyDown:La,"data-placeholder":a?Ke.reply_placeholder():Ke.message_placeholder(),className:`bg-transparent border-none focus:ring-0 resize-none min-h-[40px] leading-relaxed py-2 focus:outline-none block ${ln}`})]}),oe("div",{className:"flex justify-between items-center px-2 pb-2",children:[$?oe("div",{className:"flex items-center gap-2 overflow-x-auto scrollbar-hide w-full mr-2",children:[I(Si,{onClick:()=>{te(!1),ve()},variant:"ghost",size:"icon",className:"p-2 rounded-full cursor-pointer text-gray-500 hover:text-gray-700 hover:bg-gray-100 mr-2",title:"Back",children:I($p,{className:"w-4 h-4"})}),I("div",{className:"h-4 w-px bg-gray-300 mx-1"}),I("button",{onClick:()=>ae("arrow"),className:`p-1.5 rounded hover:bg-gray-100 ${ee==="arrow"?"text-blue-500 bg-blue-50":"text-gray-500"}`,title:"Arrow",children:I(O3,{size:16,className:"rotate-45"})}),I("button",{onClick:()=>ae("line"),className:`p-1.5 rounded hover:bg-gray-100 ${ee==="line"?"text-blue-500 bg-blue-50":"text-gray-500"}`,title:"Line",children:I(Ul,{size:16,className:"-rotate-45"})}),I("button",{onClick:()=>ae("box"),className:`p-1.5 rounded hover:bg-gray-100 ${ee==="box"?"text-blue-500 bg-blue-50":"text-gray-500"}`,title:"Box",children:I(a7,{size:16})}),I("button",{onClick:()=>ae("freehand"),className:`p-1.5 rounded hover:bg-gray-100 ${ee==="freehand"?"text-blue-500 bg-blue-50":"text-gray-500"}`,title:"Freehand",children:I(Wp,{size:16})}),I("div",{className:"h-4 w-px bg-gray-300 mx-1"}),oe(Ju,{children:[I(Qu,{asChild:!0,children:oe("button",{className:"flex items-center gap-1 p-1 rounded hover:bg-gray-100",children:[I("div",{className:"w-4 h-4 rounded-full border border-gray-200",style:{backgroundColor:K}}),I(O1,{size:12,className:"text-gray-500"})]})}),I(Zu,{className:"w-auto p-2",align:"center",side:"top",children:I("div",{className:"flex items-center gap-1",children:A_.map((be)=>I("button",{onClick:()=>J(be),className:`w-6 h-6 rounded-full border border-gray-200 transition-transform hover:scale-110 ${K===be?"ring-2 ring-blue-500 ring-offset-1":""}`,style:{backgroundColor:be}},be))})})]}),I("div",{className:"h-4 w-px bg-gray-300 mx-1"}),I("button",{onClick:me,disabled:je<=0,className:"p-1.5 rounded hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed text-gray-500",children:I(n7,{size:16})}),I("button",{onClick:Q,disabled:je>=pe.length-1,className:"p-1.5 rounded hover:bg-gray-100 disabled:opacity-30 disabled:cursor-not-allowed text-gray-500",children:I(t7,{size:16})})]}):oe("div",{className:"flex items-center gap-1",children:[I("input",{type:"file",ref:Re,className:"hidden",multiple:!0,onChange:Va}),f!==void 0&&c!==void 0&&I(Si,{onClick:()=>O(!y),variant:y?"secondary":"ghost",size:"icon",className:`p-2 rounded-full cursor-pointer ${y?"text-blue-600 bg-blue-50 dark:bg-blue-900/20":""}`,title:y?Ke.disable_timestamp():Ke.enable_timestamp(),children:I(Pp,{className:"w-4 h-4"})}),I(Si,{onClick:()=>Re.current?.click(),className:"p-2 rounded-full cursor-pointer",variant:"ghost",size:"icon",title:Ke.attach_files(),children:I(e7,{className:"w-4 h-4"})}),!i&&I(Si,{onClick:()=>te(!0),variant:"ghost",size:"icon",className:"p-2 rounded-full cursor-pointer",title:Ke.toggle_annotation(),children:I(Yu,{className:"w-4 h-4"})})]}),I("button",{onClick:ga,disabled:!Ss||Ma,className:`p-2 rounded-full transition-all duration-200 flex items-center justify-center shrink-0 ${Ss&&!Ma?"bg-blue-600 text-white shadow-md hover:bg-blue-700 hover:shadow-lg transform hover:-translate-y-0.5":"bg-gray-400 cursor-not-allowed"}`,children:I(O3,{className:"w-4 h-4"})})]}),A&&oe("div",{className:"fixed inset-0 z-[100] bg-black/95 flex flex-col items-center justify-center p-4 animate-in fade-in duration-200",onClick:()=>C(null),children:[I("button",{className:"absolute top-4 right-4 text-white/70 hover:text-white hover:bg-white/20 rounded-full p-2 transition-colors z-50",children:I(B1,{className:"w-8 h-8"})}),I("div",{className:"w-full h-full flex items-center justify-center p-2",children:I("img",{src:URL.createObjectURL(A),alt:"Enlarged view",className:"max-w-full max-h-[85vh] object-contain rounded shadow-2xl cursor-zoom-out",onClick:(be)=>{be.stopPropagation(),C(null)}})}),I("div",{className:"absolute bottom-6 text-white text-sm font-medium bg-black/50 px-4 py-2 rounded-full backdrop-blur-sm",children:A.name})]})]})});B3.displayName="ChatInput";var Yc=Dt(Wa(),1);function r7({isOpen:e,onClose:t,onSuccess:a,children:n}){let[s,i]=Yc.useState(""),[l,f]=Yc.useState(""),[c,h]=Yc.useState(!1),[u,g]=Yc.useState(null);return oe(Ju,{open:e,onOpenChange:(d)=>!d&&t(),children:[I(Qu,{asChild:!0,children:n}),I(Zu,{className:"w-80",align:"end",side:"top",children:oe("form",{onSubmit:async(d)=>{d.preventDefault(),h(!0),g(null);try{let j=await Ht.api.identify.$post({json:{username:s,email:l}});if(!j.ok){let C=await j.json();throw Error(C.error||"Failed to identify")}let{id:A}=await j.json();localStorage.setItem("guest_user_id",A),a(A),t()}catch(j){g(j.message)}finally{h(!1)}},className:"space-y-4",children:[oe("div",{className:"space-y-2",children:[I("h4",{className:"font-medium leading-none",children:Ke.enter_your_details()}),I("p",{className:"text-sm text-muted-foreground",children:Ke.provide_name_email_for_comment()})]}),oe("div",{className:"grid gap-2",children:[oe("div",{className:"grid gap-1",children:[I(M3,{htmlFor:"name",children:Ke.name()}),I(T3,{id:"name",value:s,onChange:(d)=>i(d.target.value),placeholder:Ke.name_placeholder(),size:32,required:!0})]}),oe("div",{className:"grid gap-1",children:[I(M3,{htmlFor:"email",children:Ke.email()}),I(T3,{id:"email",type:"email",value:l,onChange:(d)=>f(d.target.value),placeholder:Ke.email_field_placeholder(),required:!0})]}),u&&I("p",{className:"text-xs text-destructive",children:u})]}),oe("div",{className:"flex justify-end gap-2",children:[I(Si,{type:"button",variant:"outline",size:"sm",onClick:t,children:Ke.cancel()}),oe(Si,{type:"submit",size:"sm",disabled:c,children:[c&&I(f7,{className:"mr-2 h-3 w-3 animate-spin"}),Ke.confirm()]})]})]})})]})}var pt=Dt(Wa(),1);var V=Dt(Li(),1),ye=Dt(G3(),1),A4=Dt(J7(),1),$6=Dt(rb(),1);function Ca(){return Ca=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},Ca.apply(null,arguments)}var H1=Dt(Li(),1),ob="https://example.com",DF=function(t,a){if(/^[a-z]+:/i.test(a))return a;if(/^data:/.test(t))t=H1.default.location&&H1.default.location.href||"";var n=/^\/\//.test(t),s=!H1.default.location&&!/\/\//i.test(t);t=new H1.default.URL(t,H1.default.location||ob);var i=new URL(a,t);if(s)return i.href.slice(ob.length);else if(n)return i.href.slice(i.protocol.length);return i.href},D1=DF;var e9=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(n,s){if(!this.listeners[n])this.listeners[n]=[];this.listeners[n].push(s)},t.off=function(n,s){if(!this.listeners[n])return!1;var i=this.listeners[n].indexOf(s);return this.listeners[n]=this.listeners[n].slice(0),this.listeners[n].splice(i,1),i>-1},t.trigger=function(n){var s=this.listeners[n];if(!s)return;if(arguments.length===2){var i=s.length;for(var l=0;l<i;++l)s[l].call(this,arguments[1])}else{var f=Array.prototype.slice.call(arguments,1),c=s.length;for(var h=0;h<c;++h)s[h].apply(this,f)}},t.dispose=function(){this.listeners={}},t.pipe=function(n){this.on("data",function(s){n.push(s)})},e}();var Z3=Dt(Li(),1),xF=function(t){return Z3.default.atob?Z3.default.atob(t):Buffer.from(t,"base64").toString("binary")};function eh(e){var t=xF(e),a=new Uint8Array(t.length);for(var n=0;n<t.length;n++)a[n]=t.charCodeAt(n);return a}/*! @name m3u8-parser @version 7.2.0 @license Apache-2.0 */class hb extends e9{constructor(){super();this.buffer=""}push(e){let t;this.buffer+=e,t=this.buffer.indexOf(`
|
|
34
34
|
`);for(;t>-1;t=this.buffer.indexOf(`
|
|
35
35
|
`))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)}}var RF=String.fromCharCode(9),$3=function(e){let t=/([0-9.]*)?@?([0-9.]*)?/.exec(e||""),a={};if(t[1])a.length=parseInt(t[1],10);if(t[2])a.offset=parseInt(t[2],10);return a},NF=function(){return new RegExp("(?:^|,)("+'(?:[^=]*)=(?:"[^"]*"|[^,]*)'+")")},Jn=function(e){let t={};if(!e)return t;let a=e.split(NF()),n=a.length,s;while(n--){if(a[n]==="")continue;s=/([^=]*)=(.*)/.exec(a[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"),t[s[0]]=s[1]}return t},cb=(e)=>{let t=e.split("x"),a={};if(t[0])a.width=parseInt(t[0],10);if(t[1])a.height=parseInt(t[1],10);return a};class ub extends e9{constructor(){super();this.customParsers=[],this.tagMappers=[]}push(e){let t,a;if(e=e.trim(),e.length===0)return;if(e[0]!=="#"){this.trigger("data",{type:"uri",uri:e});return}this.tagMappers.reduce((s,i)=>{let l=i(e);if(l===e)return s;return s.concat([l])},[e]).forEach((s)=>{for(let i=0;i<this.customParsers.length;i++)if(this.customParsers[i].call(this,s))return;if(s.indexOf("#EXT")!==0){this.trigger("data",{type:"comment",text:s.slice(1)});return}if(s=s.replace("\r",""),t=/^#EXTM3U/.exec(s),t){this.trigger("data",{type:"tag",tagType:"m3u"});return}if(t=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(s),t){if(a={type:"tag",tagType:"inf"},t[1])a.duration=parseFloat(t[1]);if(t[2])a.title=t[2];this.trigger("data",a);return}if(t=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(s),t){if(a={type:"tag",tagType:"targetduration"},t[1])a.duration=parseInt(t[1],10);this.trigger("data",a);return}if(t=/^#EXT-X-VERSION:([0-9.]*)?/.exec(s),t){if(a={type:"tag",tagType:"version"},t[1])a.version=parseInt(t[1],10);this.trigger("data",a);return}if(t=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(s),t){if(a={type:"tag",tagType:"media-sequence"},t[1])a.number=parseInt(t[1],10);this.trigger("data",a);return}if(t=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(s),t){if(a={type:"tag",tagType:"discontinuity-sequence"},t[1])a.number=parseInt(t[1],10);this.trigger("data",a);return}if(t=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(s),t){if(a={type:"tag",tagType:"playlist-type"},t[1])a.playlistType=t[1];this.trigger("data",a);return}if(t=/^#EXT-X-BYTERANGE:(.*)?$/.exec(s),t){a=Ca($3(t[1]),{type:"tag",tagType:"byterange"}),this.trigger("data",a);return}if(t=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(s),t){if(a={type:"tag",tagType:"allow-cache"},t[1])a.allowed=!/NO/.test(t[1]);this.trigger("data",a);return}if(t=/^#EXT-X-MAP:(.*)$/.exec(s),t){if(a={type:"tag",tagType:"map"},t[1]){let i=Jn(t[1]);if(i.URI)a.uri=i.URI;if(i.BYTERANGE)a.byterange=$3(i.BYTERANGE)}this.trigger("data",a);return}if(t=/^#EXT-X-STREAM-INF:(.*)$/.exec(s),t){if(a={type:"tag",tagType:"stream-inf"},t[1]){if(a.attributes=Jn(t[1]),a.attributes.RESOLUTION)a.attributes.RESOLUTION=cb(a.attributes.RESOLUTION);if(a.attributes.BANDWIDTH)a.attributes.BANDWIDTH=parseInt(a.attributes.BANDWIDTH,10);if(a.attributes["FRAME-RATE"])a.attributes["FRAME-RATE"]=parseFloat(a.attributes["FRAME-RATE"]);if(a.attributes["PROGRAM-ID"])a.attributes["PROGRAM-ID"]=parseInt(a.attributes["PROGRAM-ID"],10)}this.trigger("data",a);return}if(t=/^#EXT-X-MEDIA:(.*)$/.exec(s),t){if(a={type:"tag",tagType:"media"},t[1])a.attributes=Jn(t[1]);this.trigger("data",a);return}if(t=/^#EXT-X-ENDLIST/.exec(s),t){this.trigger("data",{type:"tag",tagType:"endlist"});return}if(t=/^#EXT-X-DISCONTINUITY/.exec(s),t){this.trigger("data",{type:"tag",tagType:"discontinuity"});return}if(t=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(s),t){if(a={type:"tag",tagType:"program-date-time"},t[1])a.dateTimeString=t[1],a.dateTimeObject=new Date(t[1]);this.trigger("data",a);return}if(t=/^#EXT-X-KEY:(.*)$/.exec(s),t){if(a={type:"tag",tagType:"key"},t[1]){if(a.attributes=Jn(t[1]),a.attributes.IV){if(a.attributes.IV.substring(0,2).toLowerCase()==="0x")a.attributes.IV=a.attributes.IV.substring(2);a.attributes.IV=a.attributes.IV.match(/.{8}/g),a.attributes.IV[0]=parseInt(a.attributes.IV[0],16),a.attributes.IV[1]=parseInt(a.attributes.IV[1],16),a.attributes.IV[2]=parseInt(a.attributes.IV[2],16),a.attributes.IV[3]=parseInt(a.attributes.IV[3],16),a.attributes.IV=new Uint32Array(a.attributes.IV)}}this.trigger("data",a);return}if(t=/^#EXT-X-START:(.*)$/.exec(s),t){if(a={type:"tag",tagType:"start"},t[1])a.attributes=Jn(t[1]),a.attributes["TIME-OFFSET"]=parseFloat(a.attributes["TIME-OFFSET"]),a.attributes.PRECISE=/YES/.test(a.attributes.PRECISE);this.trigger("data",a);return}if(t=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(s),t){if(a={type:"tag",tagType:"cue-out-cont"},t[1])a.data=t[1];else a.data="";this.trigger("data",a);return}if(t=/^#EXT-X-CUE-OUT:(.*)?$/.exec(s),t){if(a={type:"tag",tagType:"cue-out"},t[1])a.data=t[1];else a.data="";this.trigger("data",a);return}if(t=/^#EXT-X-CUE-IN:?(.*)?$/.exec(s),t){if(a={type:"tag",tagType:"cue-in"},t[1])a.data=t[1];else a.data="";this.trigger("data",a);return}if(t=/^#EXT-X-SKIP:(.*)$/.exec(s),t&&t[1]){if(a={type:"tag",tagType:"skip"},a.attributes=Jn(t[1]),a.attributes.hasOwnProperty("SKIPPED-SEGMENTS"))a.attributes["SKIPPED-SEGMENTS"]=parseInt(a.attributes["SKIPPED-SEGMENTS"],10);if(a.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES"))a.attributes["RECENTLY-REMOVED-DATERANGES"]=a.attributes["RECENTLY-REMOVED-DATERANGES"].split(RF);this.trigger("data",a);return}if(t=/^#EXT-X-PART:(.*)$/.exec(s),t&&t[1]){if(a={type:"tag",tagType:"part"},a.attributes=Jn(t[1]),["DURATION"].forEach(function(i){if(a.attributes.hasOwnProperty(i))a.attributes[i]=parseFloat(a.attributes[i])}),["INDEPENDENT","GAP"].forEach(function(i){if(a.attributes.hasOwnProperty(i))a.attributes[i]=/YES/.test(a.attributes[i])}),a.attributes.hasOwnProperty("BYTERANGE"))a.attributes.byterange=$3(a.attributes.BYTERANGE);this.trigger("data",a);return}if(t=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(s),t&&t[1]){a={type:"tag",tagType:"server-control"},a.attributes=Jn(t[1]),["CAN-SKIP-UNTIL","PART-HOLD-BACK","HOLD-BACK"].forEach(function(i){if(a.attributes.hasOwnProperty(i))a.attributes[i]=parseFloat(a.attributes[i])}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(i){if(a.attributes.hasOwnProperty(i))a.attributes[i]=/YES/.test(a.attributes[i])}),this.trigger("data",a);return}if(t=/^#EXT-X-PART-INF:(.*)$/.exec(s),t&&t[1]){a={type:"tag",tagType:"part-inf"},a.attributes=Jn(t[1]),["PART-TARGET"].forEach(function(i){if(a.attributes.hasOwnProperty(i))a.attributes[i]=parseFloat(a.attributes[i])}),this.trigger("data",a);return}if(t=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(s),t&&t[1]){a={type:"tag",tagType:"preload-hint"},a.attributes=Jn(t[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(i){if(a.attributes.hasOwnProperty(i)){a.attributes[i]=parseInt(a.attributes[i],10);let l=i==="BYTERANGE-LENGTH"?"length":"offset";a.attributes.byterange=a.attributes.byterange||{},a.attributes.byterange[l]=a.attributes[i],delete a.attributes[i]}}),this.trigger("data",a);return}if(t=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(s),t&&t[1]){a={type:"tag",tagType:"rendition-report"},a.attributes=Jn(t[1]),["LAST-MSN","LAST-PART"].forEach(function(i){if(a.attributes.hasOwnProperty(i))a.attributes[i]=parseInt(a.attributes[i],10)}),this.trigger("data",a);return}if(t=/^#EXT-X-DATERANGE:(.*)$/.exec(s),t&&t[1]){a={type:"tag",tagType:"daterange"},a.attributes=Jn(t[1]),["ID","CLASS"].forEach(function(l){if(a.attributes.hasOwnProperty(l))a.attributes[l]=String(a.attributes[l])}),["START-DATE","END-DATE"].forEach(function(l){if(a.attributes.hasOwnProperty(l))a.attributes[l]=new Date(a.attributes[l])}),["DURATION","PLANNED-DURATION"].forEach(function(l){if(a.attributes.hasOwnProperty(l))a.attributes[l]=parseFloat(a.attributes[l])}),["END-ON-NEXT"].forEach(function(l){if(a.attributes.hasOwnProperty(l))a.attributes[l]=/YES/i.test(a.attributes[l])}),["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(l){if(a.attributes.hasOwnProperty(l))a.attributes[l]=a.attributes[l].toString(16)});let i=/^X-([A-Z]+-)+[A-Z]+$/;for(let l in a.attributes){if(!i.test(l))continue;let f=/[0-9A-Fa-f]{6}/g.test(a.attributes[l]),c=/^\d+(\.\d+)?$/.test(a.attributes[l]);a.attributes[l]=f?a.attributes[l].toString(16):c?parseFloat(a.attributes[l]):String(a.attributes[l])}this.trigger("data",a);return}if(t=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(s),t){this.trigger("data",{type:"tag",tagType:"independent-segments"});return}if(t=/^#EXT-X-I-FRAMES-ONLY/.exec(s),t){this.trigger("data",{type:"tag",tagType:"i-frames-only"});return}if(t=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(s),t){a={type:"tag",tagType:"content-steering"},a.attributes=Jn(t[1]),this.trigger("data",a);return}if(t=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(s),t){if(a={type:"tag",tagType:"i-frame-playlist"},a.attributes=Jn(t[1]),a.attributes.URI)a.uri=a.attributes.URI;if(a.attributes.BANDWIDTH)a.attributes.BANDWIDTH=parseInt(a.attributes.BANDWIDTH,10);if(a.attributes.RESOLUTION)a.attributes.RESOLUTION=cb(a.attributes.RESOLUTION);if(a.attributes["AVERAGE-BANDWIDTH"])a.attributes["AVERAGE-BANDWIDTH"]=parseInt(a.attributes["AVERAGE-BANDWIDTH"],10);if(a.attributes["FRAME-RATE"])a.attributes["FRAME-RATE"]=parseFloat(a.attributes["FRAME-RATE"]);this.trigger("data",a);return}if(t=/^#EXT-X-DEFINE:(.*)$/.exec(s),t){a={type:"tag",tagType:"define"},a.attributes=Jn(t[1]),this.trigger("data",a);return}this.trigger("data",{type:"tag",data:s.slice(4)})})}addParser({expression:e,customType:t,dataParser:a,segment:n}){if(typeof a!=="function")a=(s)=>s;this.customParsers.push((s)=>{if(e.exec(s))return this.trigger("data",{type:"custom",data:a(s),customType:t,segment:n}),!0})}addTagMapper({expression:e,map:t}){let a=(n)=>{if(e.test(n))return t(n);return n};this.tagMappers.push(a)}}var EF=(e)=>e.toLowerCase().replace(/-(\w)/g,(t)=>t[1].toUpperCase()),Xl=function(e){let t={};return Object.keys(e).forEach(function(a){t[EF(a)]=e[a]}),t},W3=function(e){let{serverControl:t,targetDuration:a,partTargetDuration:n}=e;if(!t)return;let s="#EXT-X-SERVER-CONTROL",i="holdBack",l="partHoldBack",f=a&&a*3,c=n&&n*2;if(a&&!t.hasOwnProperty(i))t[i]=f,this.trigger("info",{message:`${s} defaulting HOLD-BACK to targetDuration * 3 (${f}).`});if(f&&t[i]<f)this.trigger("warn",{message:`${s} clamping HOLD-BACK (${t[i]}) to targetDuration * 3 (${f})`}),t[i]=f;if(n&&!t.hasOwnProperty(l))t[l]=n*3,this.trigger("info",{message:`${s} defaulting PART-HOLD-BACK to partTargetDuration * 3 (${t[l]}).`});if(n&&t[l]<c)this.trigger("warn",{message:`${s} clamping PART-HOLD-BACK (${t[l]}) to partTargetDuration * 2 (${c}).`}),t[l]=c};class P3 extends e9{constructor(e={}){super();this.lineStream=new hb,this.parseStream=new ub,this.lineStream.pipe(this.parseStream),this.mainDefinitions=e.mainDefinitions||{},this.params=new URL(e.uri,"https://a.com").searchParams,this.lastProgramDateTime=null;let t=this,a=[],n={},s,i,l=!1,f=function(){},c={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},h="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed",u=0;this.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};let g=0,b=0,d={};this.on("end",()=>{if(n.uri||!n.parts&&!n.preloadHints)return;if(!n.map&&s)n.map=s;if(!n.key&&i)n.key=i;if(!n.timeline&&typeof u==="number")n.timeline=u;this.manifest.preloadSegment=n}),this.parseStream.on("data",function(j){let A,C;if(t.manifest.definitions)for(let y in t.manifest.definitions){if(j.uri)j.uri=j.uri.replace(`{$${y}}`,t.manifest.definitions[y]);if(j.attributes){for(let O in j.attributes)if(typeof j.attributes[O]==="string")j.attributes[O]=j.attributes[O].replace(`{$${y}}`,t.manifest.definitions[y])}}({tag(){({version(){if(j.version)this.manifest.version=j.version},"allow-cache"(){if(this.manifest.allowCache=j.allowed,!("allowed"in j))this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0},byterange(){let y={};if("length"in j){if(n.byterange=y,y.length=j.length,!("offset"in j))j.offset=g}if("offset"in j)n.byterange=y,y.offset=j.offset;g=y.offset+y.length},endlist(){this.manifest.endList=!0},inf(){if(!("mediaSequence"in this.manifest))this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"});if(!("discontinuitySequence"in this.manifest))this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"});if(j.title)n.title=j.title;if(j.duration>0)n.duration=j.duration;if(j.duration===0)n.duration=0.01,this.trigger("info",{message:"updating zero segment duration to a small value"});this.manifest.segments=a},key(){if(!j.attributes){this.trigger("warn",{message:"ignoring key declaration without attribute list"});return}if(j.attributes.METHOD==="NONE"){i=null;return}if(!j.attributes.URI){this.trigger("warn",{message:"ignoring key declaration without URI"});return}if(j.attributes.KEYFORMAT==="com.apple.streamingkeydelivery"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:j.attributes};return}if(j.attributes.KEYFORMAT==="com.microsoft.playready"){this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:j.attributes.URI};return}if(j.attributes.KEYFORMAT===h){if(["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(j.attributes.METHOD)===-1){this.trigger("warn",{message:"invalid key method provided for Widevine"});return}if(j.attributes.METHOD==="SAMPLE-AES-CENC")this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"});if(j.attributes.URI.substring(0,23)!=="data:text/plain;base64,"){this.trigger("warn",{message:"invalid key URI provided for Widevine"});return}if(!(j.attributes.KEYID&&j.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:j.attributes.KEYFORMAT,keyId:j.attributes.KEYID.substring(2)},pssh:eh(j.attributes.URI.split(",")[1])};return}if(!j.attributes.METHOD)this.trigger("warn",{message:"defaulting key method to AES-128"});if(i={method:j.attributes.METHOD||"AES-128",uri:j.attributes.URI},typeof j.attributes.IV<"u")i.iv=j.attributes.IV},"media-sequence"(){if(!isFinite(j.number)){this.trigger("warn",{message:"ignoring invalid media sequence: "+j.number});return}this.manifest.mediaSequence=j.number},"discontinuity-sequence"(){if(!isFinite(j.number)){this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+j.number});return}this.manifest.discontinuitySequence=j.number,u=j.number},"playlist-type"(){if(!/VOD|EVENT/.test(j.playlistType)){this.trigger("warn",{message:"ignoring unknown playlist type: "+j.playlist});return}this.manifest.playlistType=j.playlistType},map(){if(s={},j.uri)s.uri=j.uri;if(j.byterange)s.byterange=j.byterange;if(i)s.key=i},"stream-inf"(){if(this.manifest.playlists=a,this.manifest.mediaGroups=this.manifest.mediaGroups||c,!j.attributes){this.trigger("warn",{message:"ignoring empty stream-inf attributes"});return}if(!n.attributes)n.attributes={};Ca(n.attributes,j.attributes)},media(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||c,!(j.attributes&&j.attributes.TYPE&&j.attributes["GROUP-ID"]&&j.attributes.NAME)){this.trigger("warn",{message:"ignoring incomplete or missing media group"});return}let y=this.manifest.mediaGroups[j.attributes.TYPE];if(y[j.attributes["GROUP-ID"]]=y[j.attributes["GROUP-ID"]]||{},A=y[j.attributes["GROUP-ID"]],C={default:/yes/i.test(j.attributes.DEFAULT)},C.default)C.autoselect=!0;else C.autoselect=/yes/i.test(j.attributes.AUTOSELECT);if(j.attributes.LANGUAGE)C.language=j.attributes.LANGUAGE;if(j.attributes.URI)C.uri=j.attributes.URI;if(j.attributes["INSTREAM-ID"])C.instreamId=j.attributes["INSTREAM-ID"];if(j.attributes.CHARACTERISTICS)C.characteristics=j.attributes.CHARACTERISTICS;if(j.attributes.FORCED)C.forced=/yes/i.test(j.attributes.FORCED);A[j.attributes.NAME]=C},discontinuity(){u+=1,n.discontinuity=!0,this.manifest.discontinuityStarts.push(a.length)},"program-date-time"(){if(typeof this.manifest.dateTimeString>"u")this.manifest.dateTimeString=j.dateTimeString,this.manifest.dateTimeObject=j.dateTimeObject;n.dateTimeString=j.dateTimeString,n.dateTimeObject=j.dateTimeObject;let{lastProgramDateTime:y}=this;if(this.lastProgramDateTime=new Date(j.dateTimeString).getTime(),y===null)this.manifest.segments.reduceRight((O,T)=>{return T.programDateTime=O-T.duration*1000,T.programDateTime},this.lastProgramDateTime)},targetduration(){if(!isFinite(j.duration)||j.duration<0){this.trigger("warn",{message:"ignoring invalid target duration: "+j.duration});return}this.manifest.targetDuration=j.duration,W3.call(this,this.manifest)},start(){if(!j.attributes||isNaN(j.attributes["TIME-OFFSET"])){this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"});return}this.manifest.start={timeOffset:j.attributes["TIME-OFFSET"],precise:j.attributes.PRECISE}},"cue-out"(){n.cueOut=j.data},"cue-out-cont"(){n.cueOutCont=j.data},"cue-in"(){n.cueIn=j.data},skip(){this.manifest.skip=Xl(j.attributes),this.warnOnMissingAttributes_("#EXT-X-SKIP",j.attributes,["SKIPPED-SEGMENTS"])},part(){l=!0;let y=this.manifest.segments.length,O=Xl(j.attributes);if(n.parts=n.parts||[],n.parts.push(O),O.byterange){if(!O.byterange.hasOwnProperty("offset"))O.byterange.offset=b;b=O.byterange.offset+O.byterange.length}let T=n.parts.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PART #${T} for segment #${y}`,j.attributes,["URI","DURATION"]),this.manifest.renditionReports)this.manifest.renditionReports.forEach((H,M)=>{if(!H.hasOwnProperty("lastPart"))this.trigger("warn",{message:`#EXT-X-RENDITION-REPORT #${M} lacks required attribute(s): LAST-PART`})})},"server-control"(){let y=this.manifest.serverControl=Xl(j.attributes);if(!y.hasOwnProperty("canBlockReload"))y.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"});if(W3.call(this,this.manifest),y.canSkipDateranges&&!y.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"(){let y=this.manifest.segments.length,O=Xl(j.attributes),T=O.type&&O.type==="PART";if(n.preloadHints=n.preloadHints||[],n.preloadHints.push(O),O.byterange){if(!O.byterange.hasOwnProperty("offset")){if(O.byterange.offset=T?b:0,T)b=O.byterange.offset+O.byterange.length}}let H=n.preloadHints.length-1;if(this.warnOnMissingAttributes_(`#EXT-X-PRELOAD-HINT #${H} for segment #${y}`,j.attributes,["TYPE","URI"]),!O.type)return;for(let M=0;M<n.preloadHints.length-1;M++){let x=n.preloadHints[M];if(!x.type)continue;if(x.type===O.type)this.trigger("warn",{message:`#EXT-X-PRELOAD-HINT #${H} for segment #${y} has the same TYPE ${O.type} as preload hint #${M}`})}},"rendition-report"(){let y=Xl(j.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[],this.manifest.renditionReports.push(y);let O=this.manifest.renditionReports.length-1,T=["LAST-MSN","URI"];if(l)T.push("LAST-PART");this.warnOnMissingAttributes_(`#EXT-X-RENDITION-REPORT #${O}`,j.attributes,T)},"part-inf"(){if(this.manifest.partInf=Xl(j.attributes),this.warnOnMissingAttributes_("#EXT-X-PART-INF",j.attributes,["PART-TARGET"]),this.manifest.partInf.partTarget)this.manifest.partTargetDuration=this.manifest.partInf.partTarget;W3.call(this,this.manifest)},daterange(){this.manifest.dateRanges.push(Xl(j.attributes));let y=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_(`#EXT-X-DATERANGE #${y}`,j.attributes,["ID","START-DATE"]);let O=this.manifest.dateRanges[y];if(O.endDate&&O.startDate&&new Date(O.endDate)<new Date(O.startDate))this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"});if(O.duration&&O.duration<0)this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"});if(O.plannedDuration&&O.plannedDuration<0)this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});let T=!!O.endOnNext;if(T&&!O.class)this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must have a CLASS attribute"});if(T&&(O.duration||O.endDate))this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT=YES attribute must not contain DURATION or END-DATE attributes"});if(O.duration&&O.endDate){let M=O.startDate.getTime()+O.duration*1000;this.manifest.dateRanges[y].endDate=new Date(M)}if(!d[O.id])d[O.id]=O;else{for(let M in d[O.id])if(!!O[M]&&JSON.stringify(d[O.id][M])!==JSON.stringify(O[M])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}let H=this.manifest.dateRanges.findIndex((M)=>M.id===O.id);this.manifest.dateRanges[H]=Ca(this.manifest.dateRanges[H],O),d[O.id]=Ca(d[O.id],O),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=Xl(j.attributes),this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING",j.attributes,["SERVER-URI"])},define(){this.manifest.definitions=this.manifest.definitions||{};let y=(O,T)=>{if(O in this.manifest.definitions){this.trigger("error",{message:`EXT-X-DEFINE: Duplicate name ${O}`});return}this.manifest.definitions[O]=T};if("QUERYPARAM"in j.attributes){if("NAME"in j.attributes||"IMPORT"in j.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}let O=this.params.get(j.attributes.QUERYPARAM);if(!O){this.trigger("error",{message:`EXT-X-DEFINE: No query param ${j.attributes.QUERYPARAM}`});return}y(j.attributes.QUERYPARAM,decodeURIComponent(O));return}if("NAME"in j.attributes){if("IMPORT"in j.attributes){this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});return}if(!("VALUE"in j.attributes)||typeof j.attributes.VALUE!=="string"){this.trigger("error",{message:`EXT-X-DEFINE: No value for ${j.attributes.NAME}`});return}y(j.attributes.NAME,j.attributes.VALUE);return}if("IMPORT"in j.attributes){if(!this.mainDefinitions[j.attributes.IMPORT]){this.trigger("error",{message:`EXT-X-DEFINE: No value ${j.attributes.IMPORT} to import, or IMPORT used on main playlist`});return}y(j.attributes.IMPORT,this.mainDefinitions[j.attributes.IMPORT]);return}this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},"i-frame-playlist"(){this.manifest.iFramePlaylists.push({attributes:j.attributes,uri:j.uri,timeline:u}),this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",j.attributes,["BANDWIDTH","URI"])}}[j.tagType]||f).call(t)},uri(){if(n.uri=j.uri,a.push(n),this.manifest.targetDuration&&!("duration"in n))this.trigger("warn",{message:"defaulting segment duration to the target duration"}),n.duration=this.manifest.targetDuration;if(i)n.key=i;if(n.timeline=u,s)n.map=s;if(b=0,this.lastProgramDateTime!==null)n.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=n.duration*1000;n={}},comment(){},custom(){if(j.segment)n.custom=n.custom||{},n.custom[j.customType]=j.data;else this.manifest.custom=this.manifest.custom||{},this.manifest.custom[j.customType]=j.data}})[j.type].call(t)})}requiredCompatibilityversion(e,t){if(e<t||!e)this.trigger("warn",{message:`manifest must be at least version ${t}`})}warnOnMissingAttributes_(e,t,a){let n=[];if(a.forEach(function(s){if(!t.hasOwnProperty(s))n.push(s)}),n.length)this.trigger("warn",{message:`${e} lacks required attribute(s): ${n.join(", ")}`})}push(e){this.lineStream.push(e)}end(){if(this.lineStream.push(`
|
|
36
36
|
`),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 lr=Dt(Li(),1),fr={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^/},zF=["video","audio","text"],mb=["Video","Audio","Text"],e6=function(t){if(!t)return t;return t.replace(/avc1\.(\d+)\.(\d+)/i,function(a,n,s){var i=("00"+Number(n).toString(16)).slice(-2),l=("00"+Number(s).toString(16)).slice(-2);return"avc1."+i+"00"+l})};var _i=function(t){if(t===void 0)t="";var a=t.split(","),n=[];return a.forEach(function(s){s=s.trim();var i;if(zF.forEach(function(l){var f=fr[l].exec(s.toLowerCase());if(!f||f.length<=1)return;i=l;var c=s.substring(0,f[1].length),h=s.replace(c,"");n.push({type:c,details:h,mediaType:l})}),!i)n.push({type:s,details:"",mediaType:"unknown"})}),n},gb=function(t,a){if(!t.mediaGroups.AUDIO||!a)return null;var n=t.mediaGroups.AUDIO[a];if(!n)return null;for(var s in n){var i=n[s];if(i.default&&i.playlists)return _i(i.playlists[0].attributes.CODECS)}return null};var t6=function(t){if(t===void 0)t="";return fr.audio.test(t.trim().toLowerCase())},IF=function(t){if(t===void 0)t="";return fr.text.test(t.trim().toLowerCase())},rr=function(t){if(!t||typeof t!=="string")return;var a=t.toLowerCase().split(",").map(function(i){return e6(i.trim())}),n="video";if(a.length===1&&t6(a[0]))n="audio";else if(a.length===1&&IF(a[0]))n="application";var s="mp4";if(a.every(function(i){return fr.mp4.test(i)}))s="mp4";else if(a.every(function(i){return fr.webm.test(i)}))s="webm";else if(a.every(function(i){return fr.ogg.test(i)}))s="ogg";return n+"/"+s+';codecs="'+t+'"'},x1=function(t,a){if(t===void 0)t="";if(a===void 0)a=!1;return lr.default.MediaSource&&lr.default.MediaSource.isTypeSupported&&lr.default.MediaSource.isTypeSupported(rr(t))||a&&lr.default.ManagedMediaSource&&lr.default.ManagedMediaSource.isTypeSupported&&lr.default.ManagedMediaSource.isTypeSupported(rr(t))||!1},t9=function(t){if(t===void 0)t="";return t.toLowerCase().split(",").every(function(a){a=a.trim();for(var n=0;n<mb.length;n++){var s=mb[n];if(fr["muxer"+s].test(a))return!0}return!1})},a6="mp4a.40.2",pb="avc1.4d400d";var UF=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,GF=/^application\/dash\+xml/i,n6=function(t){if(UF.test(t))return"hls";if(GF.test(t))return"dash";if(t==="application/vnd.videojs.vhs+json")return"vhs-json";return null};var bb=Dt(Li(),1);var XF=function(t){return t.toString(2).length},KF=function(t){return Math.ceil(XF(t)/8)};var i6=function(t){if(ArrayBuffer.isView==="function")return ArrayBuffer.isView(t);return t&&t.buffer instanceof ArrayBuffer},LF=function(t){return i6(t)},Le=function(t){if(t instanceof Uint8Array)return t;if(!Array.isArray(t)&&!LF(t)&&!(t instanceof ArrayBuffer))if(typeof t!=="number"||typeof t==="number"&&t!==t)t=0;else t=[t];return new Uint8Array(t&&t.buffer||t,t&&t.byteOffset||0,t&&t.byteLength||0)};var _n=bb.default.BigInt||Number,s6=[_n("0x1"),_n("0x100"),_n("0x10000"),_n("0x1000000"),_n("0x100000000"),_n("0x10000000000"),_n("0x1000000000000"),_n("0x100000000000000"),_n("0x10000000000000000")],HI=function(){var e=new Uint16Array([65484]),t=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);if(t[0]===255)return"big";if(t[0]===204)return"little";return"unknown"}();var l6=function(t,a){var n=a===void 0?{}:a,s=n.signed,i=s===void 0?!1:s,l=n.le,f=l===void 0?!1:l;t=Le(t);var c=f?"reduce":"reduceRight",h=t[c]?t[c]:Array.prototype[c],u=h.call(t,function(b,d,j){var A=f?j:Math.abs(j+1-t.length);return b+_n(d)*s6[A]},_n(0));if(i){var g=s6[t.length]/_n(2)-_n(1);if(u=_n(u),u>g)u-=g,u-=g,u-=_n(2)}return Number(u)},wb=function(t,a){var n=a===void 0?{}:a,s=n.le,i=s===void 0?!1:s;if(typeof t!=="bigint"&&typeof t!=="number"||typeof t==="number"&&t!==t)t=0;t=_n(t);var l=KF(t),f=new Uint8Array(new ArrayBuffer(l));for(var c=0;c<l;c++){var h=i?c:Math.abs(c+1-f.length);if(f[h]=Number(t/s6[c]&_n(255)),t<0)f[h]=Math.abs(~f[h]),f[h]-=c===0?1:2}return f},f6=function(t){if(!t)return"";t=Array.prototype.slice.call(t);var a=String.fromCharCode.apply(null,Le(t));try{return decodeURIComponent(escape(a))}catch(n){}return a},a9=function(t,a){if(typeof t!=="string"&&t&&typeof t.toString==="function")t=t.toString();if(typeof t!=="string")return new Uint8Array;if(!a)t=unescape(encodeURIComponent(t));var n=new Uint8Array(t.length);for(var s=0;s<t.length;s++)n[s]=t.charCodeAt(s);return n},db=function(){for(var t=arguments.length,a=Array(t),n=0;n<t;n++)a[n]=arguments[n];if(a=a.filter(function(f){return f&&(f.byteLength||f.length)&&typeof f!=="string"}),a.length<=1)return Le(a[0]);var s=a.reduce(function(f,c,h){return f+(c.byteLength||c.length)},0),i=new Uint8Array(s),l=0;return a.forEach(function(f){f=Le(f),i.set(f,l),l+=f.byteLength}),i},Zt=function(t,a,n){var s=n===void 0?{}:n,i=s.offset,l=i===void 0?0:i,f=s.mask,c=f===void 0?[]:f;t=Le(t),a=Le(a);var h=a.every?a.every:Array.prototype.every;return a.length&&t.length-l>=a.length&&h.call(a,function(u,g){var b=c[g]?c[g]&t[l+g]:t[l+g];return u===b})};var Qn=Dt(Li(),1);var jb=function(t,a,n){a.forEach(function(s){for(var i in t.mediaGroups[s])for(var l in t.mediaGroups[s][i]){var f=t.mediaGroups[s][i][l];n(f,s,i,l)}})};var hw=q6();var{DOMImplementation:VO,XMLSerializer:YO}=hw,A6=cw().DOMParser;/*! @name mpd-parser @version 1.3.1 @license Apache-2.0 */var uw=(e)=>{return!!e&&typeof e==="object"},bn=(...e)=>{return e.reduce((t,a)=>{if(typeof a!=="object")return t;return Object.keys(a).forEach((n)=>{if(Array.isArray(t[n])&&Array.isArray(a[n]))t[n]=t[n].concat(a[n]);else if(uw(t[n])&&uw(a[n]))t[n]=bn(t[n],a[n]);else t[n]=a[n]}),t},{})},jw=(e)=>Object.keys(e).map((t)=>e[t]),JO=(e,t)=>{let a=[];for(let n=e;n<t;n++)a.push(n);return a},L1=(e)=>e.reduce((t,a)=>t.concat(a),[]),qw=(e)=>{if(!e.length)return[];let t=[];for(let a=0;a<e.length;a++)t.push(e[a]);return t},QO=(e,t)=>e.reduce((a,n,s)=>{if(n[t])a.push(s);return a},[]),ZO=(e,t)=>{return jw(e.reduce((a,n)=>{return n.forEach((s)=>{a[t(s)]=s}),a},{}))},V1={INVALID_NUMBER_OF_PERIOD:"INVALID_NUMBER_OF_PERIOD",INVALID_NUMBER_OF_CONTENT_STEERING:"INVALID_NUMBER_OF_CONTENT_STEERING",DASH_EMPTY_MANIFEST:"DASH_EMPTY_MANIFEST",DASH_INVALID_XML:"DASH_INVALID_XML",NO_BASE_URL:"NO_BASE_URL",MISSING_SEGMENT_INFORMATION:"MISSING_SEGMENT_INFORMATION",SEGMENT_TIME_UNSPECIFIED:"SEGMENT_TIME_UNSPECIFIED",UNSUPPORTED_UTC_TIMING_SCHEME:"UNSUPPORTED_UTC_TIMING_SCHEME"},uh=({baseUrl:e="",source:t="",range:a="",indexRange:n=""})=>{let s={uri:t,resolvedUri:D1(e||"",t)};if(a||n){let l=(a?a:n).split("-"),f=Qn.default.BigInt?Qn.default.BigInt(l[0]):parseInt(l[0],10),c=Qn.default.BigInt?Qn.default.BigInt(l[1]):parseInt(l[1],10);if(f<Number.MAX_SAFE_INTEGER&&typeof f==="bigint")f=Number(f);if(c<Number.MAX_SAFE_INTEGER&&typeof c==="bigint")c=Number(c);let h;if(typeof c==="bigint"||typeof f==="bigint")h=Qn.default.BigInt(c)-Qn.default.BigInt(f)+Qn.default.BigInt(1);else h=c-f+1;if(typeof h==="bigint"&&h<Number.MAX_SAFE_INTEGER)h=Number(h);s.byterange={length:h,offset:f}}return s},$O=(e)=>{let t;if(typeof e.offset==="bigint"||typeof e.length==="bigint")t=Qn.default.BigInt(e.offset)+Qn.default.BigInt(e.length)-Qn.default.BigInt(1);else t=e.offset+e.length-1;return`${e.offset}-${t}`},mw=(e)=>{if(e&&typeof e!=="number")e=parseInt(e,10);if(isNaN(e))return null;return e},WO={static(e){let{duration:t,timescale:a=1,sourceDuration:n,periodDuration:s}=e,i=mw(e.endNumber),l=t/a;if(typeof i==="number")return{start:0,end:i};if(typeof s==="number")return{start:0,end:s/l};return{start:0,end:n/l}},dynamic(e){let{NOW:t,clientOffset:a,availabilityStartTime:n,timescale:s=1,duration:i,periodStart:l=0,minimumUpdatePeriod:f=0,timeShiftBufferDepth:c=1/0}=e,h=mw(e.endNumber),u=(t+a)/1000,g=n+l,d=u+f-g,j=Math.ceil(d*s/i),A=Math.floor((u-g-c)*s/i),C=Math.floor((u-g)*s/i);return{start:Math.max(0,A),end:typeof h==="number"?h:Math.min(j,C)}}},PO=(e)=>(t)=>{let{duration:a,timescale:n=1,periodStart:s,startNumber:i=1}=e;return{number:i+t,duration:a/n,timeline:s,time:t*a}},S6=(e)=>{let{type:t,duration:a,timescale:n=1,periodDuration:s,sourceDuration:i}=e,{start:l,end:f}=WO[t](e),c=JO(l,f).map(PO(e));if(t==="static"){let h=c.length-1,u=typeof s==="number"?s:i;c[h].duration=u-a/n*h}return c},vw=(e)=>{let{baseUrl:t,initialization:a={},sourceDuration:n,indexRange:s="",periodStart:i,presentationTime:l,number:f=0,duration:c}=e;if(!t)throw Error(V1.NO_BASE_URL);let h=uh({baseUrl:t,source:a.sourceURL,range:a.range}),u=uh({baseUrl:t,source:t,indexRange:s});if(u.map=h,c){let g=S6(e);if(g.length)u.duration=g[0].duration,u.timeline=g[0].timeline}else if(n)u.duration=n,u.timeline=i;return u.presentationTime=l||i,u.number=f,[u]},m9=(e,t,a)=>{let n=e.sidx.map?e.sidx.map:null,s=e.sidx.duration,i=e.timeline||0,l=e.sidx.byterange,f=l.offset+l.length,c=t.timescale,h=t.references.filter((C)=>C.referenceType!==1),u=[],g=e.endList?"static":"dynamic",b=e.sidx.timeline,d=b,j=e.mediaSequence||0,A;if(typeof t.firstOffset==="bigint")A=Qn.default.BigInt(f)+t.firstOffset;else A=f+t.firstOffset;for(let C=0;C<h.length;C++){let y=t.references[C],O=y.referencedSize,T=y.subsegmentDuration,H;if(typeof A==="bigint")H=A+Qn.default.BigInt(O)-Qn.default.BigInt(1);else H=A+O-1;let M=`${A}-${H}`,R=vw({baseUrl:a,timescale:c,timeline:i,periodStart:b,presentationTime:d,number:j,duration:T,sourceDuration:s,indexRange:M,type:g})[0];if(n)R.map=n;if(u.push(R),typeof A==="bigint")A+=Qn.default.BigInt(O);else A+=O;d+=T/c,j++}return e.segments=u,e},eB=["AUDIO","SUBTITLES"],tB=0.016666666666666666,kw=(e)=>{return ZO(e,({timeline:t})=>t).sort((t,a)=>t.timeline>a.timeline?1:-1)},aB=(e,t)=>{for(let a=0;a<e.length;a++)if(e[a].attributes.NAME===t)return e[a];return null},gw=(e)=>{let t=[];return jb(e,eB,(a,n,s,i)=>{t=t.concat(a.playlists||[])}),t},pw=({playlist:e,mediaSequence:t})=>{e.mediaSequence=t,e.segments.forEach((a,n)=>{a.number=e.mediaSequence+n})},nB=({oldPlaylists:e,newPlaylists:t,timelineStarts:a})=>{t.forEach((n)=>{n.discontinuitySequence=a.findIndex(function({timeline:c}){return c===n.timeline});let s=aB(e,n.attributes.NAME);if(!s)return;if(n.sidx)return;let i=n.segments[0],l=s.segments.findIndex(function(c){return Math.abs(c.presentationTime-i.presentationTime)<tB});if(l===-1){if(pw({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}if(s.segments[l].discontinuity&&!i.discontinuity)i.discontinuity=!0,n.discontinuityStarts.unshift(0),n.discontinuitySequence--;pw({playlist:n,mediaSequence:s.segments[l].number})})},sB=({oldManifest:e,newManifest:t})=>{let a=e.playlists.concat(gw(e)),n=t.playlists.concat(gw(t));return t.timelineStarts=kw([e.timelineStarts,t.timelineStarts]),nB({oldPlaylists:a,newPlaylists:n,timelineStarts:t.timelineStarts}),t},mh=(e)=>e&&e.uri+"-"+$O(e.byterange),y6=(e)=>{let t=e.reduce(function(n,s){if(!n[s.attributes.baseUrl])n[s.attributes.baseUrl]=[];return n[s.attributes.baseUrl].push(s),n},{}),a=[];return Object.values(t).forEach((n)=>{let s=jw(n.reduce((i,l)=>{let f=l.attributes.id+(l.attributes.lang||"");if(!i[f])i[f]=l,i[f].attributes.timelineStarts=[];else{if(l.segments){if(l.segments[0])l.segments[0].discontinuity=!0;i[f].segments.push(...l.segments)}if(l.attributes.contentProtection)i[f].attributes.contentProtection=l.attributes.contentProtection}return i[f].attributes.timelineStarts.push({start:l.attributes.periodStart,timeline:l.attributes.periodStart}),i},{}));a=a.concat(s)}),a.map((n)=>{return n.discontinuityStarts=QO(n.segments||[],"discontinuity"),n})},C6=(e,t)=>{let a=mh(e.sidx),n=a&&t[a]&&t[a].sidx;if(n)m9(e,n,e.sidx.resolvedUri);return e},iB=(e,t={})=>{if(!Object.keys(t).length)return e;for(let a in e)e[a]=C6(e[a],t);return e},lB=({attributes:e,segments:t,sidx:a,mediaSequence:n,discontinuitySequence:s,discontinuityStarts:i},l)=>{let f={attributes:{NAME:e.id,BANDWIDTH:e.bandwidth,CODECS:e.codecs,["PROGRAM-ID"]:1},uri:"",endList:e.type==="static",timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuitySequence:s,discontinuityStarts:i,timelineStarts:e.timelineStarts,mediaSequence:n,segments:t};if(e.contentProtection)f.contentProtection=e.contentProtection;if(e.serviceLocation)f.attributes.serviceLocation=e.serviceLocation;if(a)f.sidx=a;if(l)f.attributes.AUDIO="audio",f.attributes.SUBTITLES="subs";return f},fB=({attributes:e,segments:t,mediaSequence:a,discontinuityStarts:n,discontinuitySequence:s})=>{if(typeof t>"u")t=[{uri:e.baseUrl,timeline:e.periodStart,resolvedUri:e.baseUrl||"",duration:e.sourceDuration,number:0}],e.duration=e.sourceDuration;let i={NAME:e.id,BANDWIDTH:e.bandwidth,["PROGRAM-ID"]:1};if(e.codecs)i.CODECS=e.codecs;let l={attributes:i,uri:"",endList:e.type==="static",timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,timelineStarts:e.timelineStarts,discontinuityStarts:n,discontinuitySequence:s,mediaSequence:a,segments:t};if(e.serviceLocation)l.attributes.serviceLocation=e.serviceLocation;return l},rB=(e,t={},a=!1)=>{let n,s=e.reduce((i,l)=>{let f=l.attributes.role&&l.attributes.role.value||"",c=l.attributes.lang||"",h=l.attributes.label||"main";if(c&&!l.attributes.label){let g=f?` (${f})`:"";h=`${l.attributes.lang}${g}`}if(!i[h])i[h]={language:c,autoselect:!0,default:f==="main",playlists:[],uri:""};let u=C6(lB(l,a),t);if(i[h].playlists.push(u),typeof n>"u"&&f==="main")n=l,n.default=!0;return i},{});if(!n){let i=Object.keys(s)[0];s[i].default=!0}return s},oB=(e,t={})=>{return e.reduce((a,n)=>{let s=n.attributes.label||n.attributes.lang||"text",i=n.attributes.lang||"und";if(!a[s])a[s]={language:i,default:!1,autoselect:!1,playlists:[],uri:""};return a[s].playlists.push(C6(fB(n),t)),a},{})},cB=(e)=>e.reduce((t,a)=>{if(!a)return t;return a.forEach((n)=>{let{channel:s,language:i}=n;if(t[i]={autoselect:!1,default:!1,instreamId:s,language:i},n.hasOwnProperty("aspectRatio"))t[i].aspectRatio=n.aspectRatio;if(n.hasOwnProperty("easyReader"))t[i].easyReader=n.easyReader;if(n.hasOwnProperty("3D"))t[i]["3D"]=n["3D"]}),t},{}),hB=({attributes:e,segments:t,sidx:a,discontinuityStarts:n})=>{let s={attributes:{NAME:e.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:e.width,height:e.height},CODECS:e.codecs,BANDWIDTH:e.bandwidth,["PROGRAM-ID"]:1},uri:"",endList:e.type==="static",timeline:e.periodStart,resolvedUri:e.baseUrl||"",targetDuration:e.duration,discontinuityStarts:n,timelineStarts:e.timelineStarts,segments:t};if(e.frameRate)s.attributes["FRAME-RATE"]=e.frameRate;if(e.contentProtection)s.contentProtection=e.contentProtection;if(e.serviceLocation)s.attributes.serviceLocation=e.serviceLocation;if(a)s.sidx=a;return s},uB=({attributes:e})=>e.mimeType==="video/mp4"||e.mimeType==="video/webm"||e.contentType==="video",mB=({attributes:e})=>e.mimeType==="audio/mp4"||e.mimeType==="audio/webm"||e.contentType==="audio",gB=({attributes:e})=>e.mimeType==="text/vtt"||e.contentType==="text",pB=(e,t)=>{e.forEach((a)=>{if(a.mediaSequence=0,a.discontinuitySequence=t.findIndex(function({timeline:n}){return n===a.timeline}),!a.segments)return;a.segments.forEach((n,s)=>{n.number=s})})},bw=(e)=>{if(!e)return[];return Object.keys(e).reduce((t,a)=>{let n=e[a];return t.concat(n.playlists)},[])},bB=({dashPlaylists:e,locations:t,contentSteering:a,sidxMapping:n={},previousManifest:s,eventStream:i})=>{if(!e.length)return{};let{sourceDuration:l,type:f,suggestedPresentationDelay:c,minimumUpdatePeriod:h}=e[0].attributes,u=y6(e.filter(uB)).map(hB),g=y6(e.filter(mB)),b=y6(e.filter(gB)),d=e.map((H)=>H.attributes.captionServices).filter(Boolean),j={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:{AUDIO:{},VIDEO:{},["CLOSED-CAPTIONS"]:{},SUBTITLES:{}},uri:"",duration:l,playlists:iB(u,n)};if(h>=0)j.minimumUpdatePeriod=h*1000;if(t)j.locations=t;if(a)j.contentSteering=a;if(f==="dynamic")j.suggestedPresentationDelay=c;if(i&&i.length>0)j.eventStream=i;let A=j.playlists.length===0,C=g.length?rB(g,n,A):null,y=b.length?oB(b,n):null,O=u.concat(bw(C),bw(y)),T=O.map(({timelineStarts:H})=>H);if(j.timelineStarts=kw(T),pB(O,j.timelineStarts),C)j.mediaGroups.AUDIO.audio=C;if(y)j.mediaGroups.SUBTITLES.subs=y;if(d.length)j.mediaGroups["CLOSED-CAPTIONS"].cc=cB(d);if(s)return sB({oldManifest:s,newManifest:j});return j},wB=(e,t,a)=>{let{NOW:n,clientOffset:s,availabilityStartTime:i,timescale:l=1,periodStart:f=0,minimumUpdatePeriod:c=0}=e,h=(n+s)/1000,u=i+f,b=h+c-u;return Math.ceil((b*l-t)/a)},Aw=(e,t)=>{let{type:a,minimumUpdatePeriod:n=0,media:s="",sourceDuration:i,timescale:l=1,startNumber:f=1,periodStart:c}=e,h=[],u=-1;for(let g=0;g<t.length;g++){let b=t[g],d=b.d,j=b.r||0,A=b.t||0;if(u<0)u=A;if(A&&A>u)u=A;let C;if(j<0){let T=g+1;if(T===t.length)if(a==="dynamic"&&n>0&&s.indexOf("$Number$")>0)C=wB(e,u,d);else C=(i*l-u)/d;else C=(t[T].t-u)/d}else C=j+1;let y=f+h.length+C,O=f+h.length;while(O<y)h.push({number:O,duration:d/l,time:u,timeline:c}),u+=d,O++}return h},dB=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,jB=(e)=>(t,a,n,s)=>{if(t==="$$")return"$";if(typeof e[a]>"u")return t;let i=""+e[a];if(a==="RepresentationID")return i;if(!n)s=1;else s=parseInt(s,10);if(i.length>=s)return i;return`${Array(s-i.length+1).join("0")}${i}`},ww=(e,t)=>e.replace(dB,jB(t)),qB=(e,t)=>{if(!e.duration&&!t)return[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodStart}];if(e.duration)return S6(e);return Aw(e,t)},vB=(e,t)=>{let a={RepresentationID:e.id,Bandwidth:e.bandwidth||0},{initialization:n={sourceURL:"",range:""}}=e,s=uh({baseUrl:e.baseUrl,source:ww(n.sourceURL,a),range:n.range});return qB(e,t).map((l)=>{a.Number=l.number,a.Time=l.time;let f=ww(e.media||"",a),c=e.timescale||1,h=e.presentationTimeOffset||0,u=e.periodStart+(l.time-h)/c;return{uri:f,timeline:l.timeline,duration:l.duration,resolvedUri:D1(e.baseUrl||"",f),map:s,number:l.number,presentationTime:u}})},kB=(e,t)=>{let{baseUrl:a,initialization:n={}}=e,s=uh({baseUrl:a,source:n.sourceURL,range:n.range}),i=uh({baseUrl:a,source:t.media,range:t.mediaRange});return i.map=s,i},AB=(e,t)=>{let{duration:a,segmentUrls:n=[],periodStart:s}=e;if(!a&&!t||a&&t)throw Error(V1.SEGMENT_TIME_UNSPECIFIED);let i=n.map((c)=>kB(e,c)),l;if(a)l=S6(e);if(t)l=Aw(e,t);return l.map((c,h)=>{if(i[h]){let u=i[h],g=e.timescale||1,b=e.presentationTimeOffset||0;return u.timeline=c.timeline,u.duration=c.duration,u.number=c.number,u.presentationTime=s+(c.time-b)/g,u}}).filter((c)=>c)},yB=({attributes:e,segmentInfo:t})=>{let a,n;if(t.template)n=vB,a=bn(e,t.template);else if(t.base)n=vw,a=bn(e,t.base);else if(t.list)n=AB,a=bn(e,t.list);let s={attributes:e};if(!n)return s;let i=n(a,t.segmentTimeline);if(a.duration){let{duration:l,timescale:f=1}=a;a.duration=l/f}else if(i.length)a.duration=i.reduce((l,f)=>{return Math.max(l,Math.ceil(f.duration))},0);else a.duration=0;if(s.attributes=a,s.segments=i,t.base&&a.indexRange)s.sidx=i[0],s.segments=[];return s},SB=(e)=>e.map(yB),ja=(e,t)=>qw(e.childNodes).filter(({tagName:a})=>a===t),gh=(e)=>e.textContent.trim(),CB=(e)=>{return parseFloat(e.split("/").reduce((t,a)=>t/a))},K1=(e)=>{let f=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e);if(!f)return 0;let[c,h,u,g,b,d]=f.slice(1);return parseFloat(c||0)*31536000+parseFloat(h||0)*2592000+parseFloat(u||0)*86400+parseFloat(g||0)*3600+parseFloat(b||0)*60+parseFloat(d||0)},_B=(e)=>{if(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e))e+="Z";return Date.parse(e)},dw={mediaPresentationDuration(e){return K1(e)},availabilityStartTime(e){return _B(e)/1000},minimumUpdatePeriod(e){return K1(e)},suggestedPresentationDelay(e){return K1(e)},type(e){return e},timeShiftBufferDepth(e){return K1(e)},start(e){return K1(e)},width(e){return parseInt(e,10)},height(e){return parseInt(e,10)},bandwidth(e){return parseInt(e,10)},frameRate(e){return CB(e)},startNumber(e){return parseInt(e,10)},timescale(e){return parseInt(e,10)},presentationTimeOffset(e){return parseInt(e,10)},duration(e){let t=parseInt(e,10);if(isNaN(t))return K1(e);return t},d(e){return parseInt(e,10)},t(e){return parseInt(e,10)},r(e){return parseInt(e,10)},presentationTime(e){return parseInt(e,10)},DEFAULT(e){return e}},Pa=(e)=>{if(!(e&&e.attributes))return{};return qw(e.attributes).reduce((t,a)=>{let n=dw[a.name]||dw.DEFAULT;return t[a.name]=n(a.value),t},{})},FB={"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"},g9=(e,t)=>{if(!t.length)return e;return L1(e.map(function(a){return t.map(function(n){let s=gh(n),i=D1(a.baseUrl,s),l=bn(Pa(n),{baseUrl:i});if(i!==s&&!l.serviceLocation&&a.serviceLocation)l.serviceLocation=a.serviceLocation;return l})}))},_6=(e)=>{let t=ja(e,"SegmentTemplate")[0],a=ja(e,"SegmentList")[0],n=a&&ja(a,"SegmentURL").map((g)=>bn({tag:"SegmentURL"},Pa(g))),s=ja(e,"SegmentBase")[0],i=a||t,l=i&&ja(i,"SegmentTimeline")[0],f=a||s||t,c=f&&ja(f,"Initialization")[0],h=t&&Pa(t);if(h&&c)h.initialization=c&&Pa(c);else if(h&&h.initialization)h.initialization={sourceURL:h.initialization};let u={template:h,segmentTimeline:l&&ja(l,"S").map((g)=>Pa(g)),list:a&&bn(Pa(a),{segmentUrls:n,initialization:Pa(c)}),base:s&&bn(Pa(s),{initialization:Pa(c)})};return Object.keys(u).forEach((g)=>{if(!u[g])delete u[g]}),u},OB=(e,t,a)=>(n)=>{let s=ja(n,"BaseURL"),i=g9(t,s),l=bn(e,Pa(n)),f=_6(n);return i.map((c)=>{return{segmentInfo:bn(a,f),attributes:bn(l,c)}})},BB=(e)=>{return e.reduce((t,a)=>{let n=Pa(a);if(n.schemeIdUri)n.schemeIdUri=n.schemeIdUri.toLowerCase();let s=FB[n.schemeIdUri];if(s){t[s]={attributes:n};let i=ja(a,"cenc:pssh")[0];if(i){let l=gh(i);t[s].pssh=l&&eh(l)}}return t},{})},TB=(e)=>{if(e.schemeIdUri==="urn:scte:dash:cc:cea-608:2015")return(typeof e.value!=="string"?[]:e.value.split(";")).map((a)=>{let n,s;if(s=a,/^CC\d=/.test(a))[n,s]=a.split("=");else if(/^CC\d$/.test(a))n=a;return{channel:n,language:s}});else if(e.schemeIdUri==="urn:scte:dash:cc:cea-708:2015")return(typeof e.value!=="string"?[]:e.value.split(";")).map((a)=>{let n={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(a)){let[s,i=""]=a.split("=");n.channel=s,n.language=a,i.split(",").forEach((l)=>{let[f,c]=l.split(":");if(f==="lang")n.language=c;else if(f==="er")n.easyReader=Number(c);else if(f==="war")n.aspectRatio=Number(c);else if(f==="3D")n["3D"]=Number(c)})}else n.language=a;if(n.channel)n.channel="SERVICE"+n.channel;return n})},MB=(e)=>{return L1(ja(e.node,"EventStream").map((t)=>{let a=Pa(t),n=a.schemeIdUri;return ja(t,"Event").map((s)=>{let i=Pa(s),l=i.presentationTime||0,f=a.timescale||1,c=i.duration||0,h=l/f+e.attributes.start;return{schemeIdUri:n,value:a.value,id:i.id,start:h,end:h+c/f,messageData:gh(s)||i.messageData,contentEncoding:a.contentEncoding,presentationTimeOffset:a.presentationTimeOffset||0}})}))},HB=(e,t,a)=>(n)=>{let s=Pa(n),i=g9(t,ja(n,"BaseURL")),l=ja(n,"Role")[0],f={role:Pa(l)},c=bn(e,s,f),h=ja(n,"Accessibility")[0],u=TB(Pa(h));if(u)c=bn(c,{captionServices:u});let g=ja(n,"Label")[0];if(g&&g.childNodes.length){let C=g.childNodes[0].nodeValue.trim();c=bn(c,{label:C})}let b=BB(ja(n,"ContentProtection"));if(Object.keys(b).length)c=bn(c,{contentProtection:b});let d=_6(n),j=ja(n,"Representation"),A=bn(a,d);return L1(j.map(OB(c,i,A)))},DB=(e,t)=>(a,n)=>{let s=g9(t,ja(a.node,"BaseURL")),i=bn(e,{periodStart:a.attributes.start});if(typeof a.attributes.duration==="number")i.periodDuration=a.attributes.duration;let l=ja(a.node,"AdaptationSet"),f=_6(a.node);return L1(l.map(HB(i,s,f)))},xB=(e,t)=>{if(e.length>1)t({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"});if(!e.length)return null;let a=bn({serverURL:gh(e[0])},Pa(e[0]));return a.queryBeforeStart=a.queryBeforeStart==="true",a},RB=({attributes:e,priorPeriodAttributes:t,mpdType:a})=>{if(typeof e.start==="number")return e.start;if(t&&typeof t.start==="number"&&typeof t.duration==="number")return t.start+t.duration;if(!t&&a==="static")return 0;return null},NB=(e,t={})=>{let{manifestUri:a="",NOW:n=Date.now(),clientOffset:s=0,eventHandler:i=function(){}}=t,l=ja(e,"Period");if(!l.length)throw Error(V1.INVALID_NUMBER_OF_PERIOD);let f=ja(e,"Location"),c=Pa(e),h=g9([{baseUrl:a}],ja(e,"BaseURL")),u=ja(e,"ContentSteering");if(c.type=c.type||"static",c.sourceDuration=c.mediaPresentationDuration||0,c.NOW=n,c.clientOffset=s,f.length)c.locations=f.map(gh);let g=[];return l.forEach((b,d)=>{let j=Pa(b),A=g[d-1];j.start=RB({attributes:j,priorPeriodAttributes:A?A.attributes:null,mpdType:c.type}),g.push({node:b,attributes:j})}),{locations:c.locations,contentSteeringInfo:xB(u,i),representationInfo:L1(g.map(DB(c,h))),eventStream:L1(g.map(MB))}},yw=(e)=>{if(e==="")throw Error(V1.DASH_EMPTY_MANIFEST);let t=new A6,a,n;try{a=t.parseFromString(e,"application/xml"),n=a&&a.documentElement.tagName==="MPD"?a.documentElement:null}catch(s){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw Error(V1.DASH_INVALID_XML);return n},EB=(e)=>{let t=ja(e,"UTCTiming")[0];if(!t)return null;let a=Pa(t);switch(a.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":a.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":a.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":a.method="DIRECT",a.value=Date.parse(a.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 Error(V1.UNSUPPORTED_UTC_TIMING_SCHEME)}return a};var Sw=(e,t={})=>{let a=NB(yw(e),t),n=SB(a.representationInfo);return bB({dashPlaylists:n,locations:a.locations,contentSteering:a.contentSteeringInfo,sidxMapping:t.sidxMapping,previousManifest:t.previousManifest,eventStream:a.eventStream})},Cw=(e)=>EB(yw(e));var Rd=Dt(Mw(),1);var UB=Le([73,68,51]),GB=function(t,a){if(a===void 0)a=0;t=Le(t);var n=t[a+5],s=t[a+6]<<21|t[a+7]<<14|t[a+8]<<7|t[a+9],i=(n&16)>>4;if(i)return s+20;return s+10},cr=function e(t,a){if(a===void 0)a=0;if(t=Le(t),t.length-a<10||!Zt(t,UB,{offset:a}))return a;return a+=GB(t,a),e(t,a)};var cU=new Uint8Array([79,112,117,115,72,101,97,100]);var Dw=function(t){if(typeof t==="string")return a9(t);if(typeof t==="number")return t;return t},YB=function(t){if(!Array.isArray(t))return[Dw(t)];return t.map(function(a){return Dw(a)})},F6,xw=function(t){t=Le(t);var a=[],n=0;while(t.length>n){var s=t[n],i=0,l=0;l++;var f=t[l];l++;while(f&128)i=(f&127)<<7,f=t[l],l++;i+=f&127;for(var c=0;c<F6.length;c++){var h=F6[c],u=h.id,g=h.parser;if(s===u){a.push(g(t.subarray(l,l+i)));break}}n+=i+l}return a};F6=[{id:3,parser:function(t){var a={tag:3,id:t[0]<<8|t[1],flags:t[2],size:3,dependsOnEsId:0,ocrEsId:0,descriptors:[],url:""};if(a.flags&128)a.dependsOnEsId=t[a.size]<<8|t[a.size+1],a.size+=2;if(a.flags&64){var n=t[a.size];a.url=f6(t.subarray(a.size+1,a.size+1+n)),a.size+=n}if(a.flags&32)a.ocrEsId=t[a.size]<<8|t[a.size+1],a.size+=2;return a.descriptors=xw(t.subarray(a.size))||[],a}},{id:4,parser:function(t){var a={tag:4,oti:t[0],streamType:t[1],bufferSize:t[2]<<16|t[3]<<8|t[4],maxBitrate:t[5]<<24|t[6]<<16|t[7]<<8|t[8],avgBitrate:t[9]<<24|t[10]<<16|t[11]<<8|t[12],descriptors:xw(t.subarray(13))};return a}},{id:5,parser:function(t){return{tag:5,bytes:t}}},{id:6,parser:function(t){return{tag:6,bytes:t}}}];var Rw=function e(t,a,n){if(n===void 0)n=!1;a=YB(a),t=Le(t);var s=[];if(!a.length)return s;var i=0;while(i<t.length){var l=(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])>>>0,f=t.subarray(i+4,i+8);if(l===0)break;var c=i+l;if(c>t.length){if(n)break;c=t.length}var h=t.subarray(i+8,c);if(Zt(f,a[0]))if(a.length===1)s.push(h);else s.push.apply(s,e(h,a.slice(1),n));i=c}return s};var ph={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])},O6=[128,64,32,16,8,4,2,1],JB=function(t){var a=1;for(var n=0;n<O6.length;n++){if(t&O6[n])break;a++}return a},p9=function(t,a,n,s){if(n===void 0)n=!0;if(s===void 0)s=!1;var i=JB(t[a]),l=t.subarray(a,a+i);if(n)l=Array.prototype.slice.call(t,a,a+i),l[0]^=O6[i-1];return{length:i,value:l6(l,{signed:s}),bytes:l}},Nw=function e(t){if(typeof t==="string")return t.match(/.{1,2}/g).map(function(a){return e(a)});if(typeof t==="number")return wb(t);return t},QB=function(t){if(!Array.isArray(t))return[Nw(t)];return t.map(function(a){return Nw(a)})},ZB=function e(t,a,n){if(n>=a.length)return a.length;var s=p9(a,n,!1);if(Zt(t.bytes,s.bytes))return n;var i=p9(a,n+s.length);return e(t,a,n+i.length+i.value+s.length)},B6=function e(t,a){a=QB(a),t=Le(t);var n=[];if(!a.length)return n;var s=0;while(s<t.length){var i=p9(t,s,!1),l=p9(t,s+i.length),f=s+i.length+l.length;if(l.value===127){if(l.value=ZB(i,t,f),l.value!==t.length)l.value-=f}var c=f+l.value>t.length?t.length:f+l.value,h=t.subarray(f,c);if(Zt(a[0],i.bytes))if(a.length===1)n.push(h);else n=n.concat(e(h,a.slice(1)));var u=i.length+l.length+h.length;s+=u}return n};var $B=Le([0,0,0,1]),WB=Le([0,0,1]),PB=Le([0,0,3]),eT=function(t){var a=[],n=1;while(n<t.length-2){if(Zt(t.subarray(n,n+3),PB))a.push(n+2),n++;n++}if(a.length===0)return t;var s=t.length-a.length,i=new Uint8Array(s),l=0;for(n=0;n<s;l++,n++){if(l===a[0])l++,a.shift();i[n]=t[l]}return i},Ew=function(t,a,n,s){if(s===void 0)s=1/0;t=Le(t),n=[].concat(n);var i=0,l,f=0;while(i<t.length&&(f<s||l)){var c=void 0;if(Zt(t.subarray(i),$B))c=4;else if(Zt(t.subarray(i),WB))c=3;if(!c){i++;continue}if(f++,l)return eT(t.subarray(l,i));var h=void 0;if(a==="h264")h=t[i+c]&31;else if(a==="h265")h=t[i+c]>>1&63;if(n.indexOf(h)!==-1)l=i+c;i+=c+(a==="h264"?1:2)}return t.subarray(0,0)},zw=function(t,a,n){return Ew(t,"h264",a,n)},Iw=function(t,a,n){return Ew(t,"h265",a,n)};var Zn={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])},Y1={aac:function(t){var a=cr(t);return Zt(t,[255,16],{offset:a,mask:[255,22]})},mp3:function(t){var a=cr(t);return Zt(t,[255,2],{offset:a,mask:[255,6]})},webm:function(t){var a=B6(t,[ph.EBML,ph.DocType])[0];return Zt(a,Zn.webm)},mkv:function(t){var a=B6(t,[ph.EBML,ph.DocType])[0];return Zt(a,Zn.matroska)},mp4:function(t){if(Y1["3gp"](t)||Y1.mov(t))return!1;if(Zt(t,Zn.mp4,{offset:4})||Zt(t,Zn.fmp4,{offset:4}))return!0;if(Zt(t,Zn.moof,{offset:4})||Zt(t,Zn.moov,{offset:4}))return!0},mov:function(t){return Zt(t,Zn.mov,{offset:4})},"3gp":function(t){return Zt(t,Zn["3gp"],{offset:4})},ac3:function(t){var a=cr(t);return Zt(t,Zn.ac3,{offset:a})},ts:function(t){if(t.length<189&&t.length>=1)return t[0]===71;var a=0;while(a+188<t.length&&a<188){if(t[a]===71&&t[a+188]===71)return!0;a+=1}return!1},flac:function(t){var a=cr(t);return Zt(t,Zn.flac,{offset:a})},ogg:function(t){return Zt(t,Zn.ogg)},avi:function(t){return Zt(t,Zn.riff)&&Zt(t,Zn.avi,{offset:8})},wav:function(t){return Zt(t,Zn.riff)&&Zt(t,Zn.wav,{offset:8})},h264:function(t){return zw(t,7,3).length},h265:function(t){return Iw(t,[32,33],3).length}},T6=Object.keys(Y1).filter(function(e){return e!=="ts"&&e!=="h264"&&e!=="h265"}).concat(["ts","h264","h265"]);T6.forEach(function(e){var t=Y1[e];Y1[e]=function(a){return t(Le(a))}});var tT=Y1,b9=function(t){t=Le(t);for(var a=0;a<T6.length;a++){var n=T6[a];if(tT[n](t))return n}return""},Uw=function(t){return Rw(t,["moof"]).length>0};var Ql=Dt(Vw(),1),W6="8.23.7",L0={},$l=function(e,t){if(L0[e]=L0[e]||[],t)L0[e]=L0[e].concat(t);return L0[e]},aT=function(e,t){$l(e,t)},Nd=function(e,t){let a=$l(e).indexOf(t);if(a<=-1)return!1;return L0[e]=L0[e].slice(),L0[e].splice(a,1),!0},nT=function(e,t){$l(e,[].concat(t).map((a)=>{let n=(...s)=>{return Nd(e,n),a(...s)};return n}))},S9={prefixed:!0},k9=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],Yw=k9[0],jh;for(let e=0;e<k9.length;e++)if(k9[e][1]in ye.default){jh=k9[e];break}if(jh){for(let e=0;e<jh.length;e++)S9[Yw[e]]=jh[e];S9.prefixed=jh[0]!==Yw[0]}var ps=[],sT=(e,t,a)=>(n,s,i)=>{let l=t.levels[s],f=new RegExp(`^(${l})$`),c=e;if(n!=="log")i.unshift(n.toUpperCase()+":");if(a)c=`%c${e}`,i.unshift(a);if(i.unshift(c+":"),ps){ps.push([].concat(i));let u=ps.length-1000;ps.splice(0,u>0?u:0)}if(!V.default.console)return;let h=V.default.console[n];if(!h&&n==="debug")h=V.default.console.info||V.default.console.log;if(!h||!l||!f.test(n))return;h[Array.isArray(i)?"apply":"call"](V.default.console,i)};function P6(e,t=":",a=""){let n="info",s;function i(...l){s("log",n,l)}return s=sT(e,i,a),i.createLogger=(l,f,c)=>{let h=f!==void 0?f:t,u=c!==void 0?c:a,g=`${e} ${h} ${l}`;return P6(g,h,u)},i.createNewLogger=(l,f,c)=>{return P6(l,f,c)},i.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:n},i.level=(l)=>{if(typeof l==="string"){if(!i.levels.hasOwnProperty(l))throw Error(`"${l}" in not a valid log level`);n=l}return n},i.history=()=>ps?[].concat(ps):[],i.history.filter=(l)=>{return(ps||[]).filter((f)=>{return new RegExp(`.*${l}.*`).test(f[0])})},i.history.clear=()=>{if(ps)ps.length=0},i.history.disable=()=>{if(ps!==null)ps.length=0,ps=null},i.history.enable=()=>{if(ps===null)ps=[]},i.error=(...l)=>s("error",n,l),i.warn=(...l)=>s("warn",n,l),i.debug=(...l)=>s("debug",n,l),i}var dt=P6("VIDEOJS"),Ed=dt.createLogger,iT=Object.prototype.toString,zd=function(e){return t0(e)?Object.keys(e):[]};function W1(e,t){zd(e).forEach((a)=>t(e[a],a))}function Id(e,t,a=0){return zd(e).reduce((n,s)=>t(n,e[s],s),a)}function t0(e){return!!e&&typeof e==="object"}function fo(e){return t0(e)&&iT.call(e)==="[object Object]"&&e.constructor===Object}function ia(...e){let t={};return e.forEach((a)=>{if(!a)return;W1(a,(n,s)=>{if(!fo(n)){t[s]=n;return}if(!fo(t[s]))t[s]={};t[s]=ia(t[s],n)})}),t}function Ud(e={}){let t=[];for(let a in e)if(e.hasOwnProperty(a)){let n=e[a];t.push(n)}return t}function V9(e,t,a,n=!0){let s=(l)=>Object.defineProperty(e,t,{value:l,enumerable:!0,writable:!0}),i={configurable:!0,enumerable:!0,get(){let l=a();return s(l),l}};if(n)i.set=s;return Object.defineProperty(e,t,i)}var lT=Object.freeze({__proto__:null,each:W1,reduce:Id,isObject:t0,isPlain:fo,merge:ia,values:Ud,defineLazyProperty:V9}),y4=!1,Gd=null,Oi=!1,Xd,Kd=!1,P1=!1,eo=!1,a0=!1,S4=null,Y9=null,fT=Boolean(V.default.cast&&V.default.cast.framework&&V.default.cast.framework.CastReceiverContext),Ld=null,C9=!1,J9=!1,_9=!1,Q9=!1,F9=!1,O9=!1,B9=!1,Ch=Boolean(uo()&&(("ontouchstart"in V.default)||V.default.navigator.maxTouchPoints||V.default.DocumentTouch&&V.default.document instanceof V.default.DocumentTouch)),Ll=V.default.navigator&&V.default.navigator.userAgentData;if(Ll&&Ll.platform&&Ll.brands)Oi=Ll.platform==="Android",P1=Boolean(Ll.brands.find((e)=>e.brand==="Microsoft Edge")),eo=Boolean(Ll.brands.find((e)=>e.brand==="Chromium")),a0=!P1&&eo,S4=Y9=(Ll.brands.find((e)=>e.brand==="Chromium")||{}).version||null,J9=Ll.platform==="Windows";if(!eo){let e=V.default.navigator&&V.default.navigator.userAgent||"";y4=/iPod/i.test(e),Gd=function(){let t=e.match(/OS (\d+)_/i);if(t&&t[1])return t[1];return null}(),Oi=/Android/i.test(e),Xd=function(){let t=e.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;let a=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);if(a&&n)return parseFloat(t[1]+"."+t[2]);else if(a)return a;return null}(),Kd=/Firefox/i.test(e),P1=/Edg/i.test(e),eo=/Chrome/i.test(e)||/CriOS/i.test(e),a0=!P1&&eo,S4=Y9=function(){let t=e.match(/(Chrome|CriOS)\/(\d+)/);if(t&&t[2])return parseFloat(t[2]);return null}(),Ld=function(){let t=/MSIE\s(\d+)\.\d/.exec(e),a=t&&parseFloat(t[1]);if(!a&&/Trident\/7.0/i.test(e)&&/rv:11.0/.test(e))a=11;return a}(),F9=/Tizen/i.test(e),O9=/Web0S/i.test(e),B9=F9||O9,C9=/Safari/i.test(e)&&!a0&&!Oi&&!P1&&!B9,J9=/Windows/i.test(e),_9=/iPad/i.test(e)||C9&&Ch&&!/iPhone/i.test(e),Q9=/iPhone/i.test(e)&&!_9}var Un=Q9||_9||y4,Z9=(C9||Un)&&!a0,Vd=Object.freeze({__proto__:null,get IS_IPOD(){return y4},get IOS_VERSION(){return Gd},get IS_ANDROID(){return Oi},get ANDROID_VERSION(){return Xd},get IS_FIREFOX(){return Kd},get IS_EDGE(){return P1},get IS_CHROMIUM(){return eo},get IS_CHROME(){return a0},get CHROMIUM_VERSION(){return S4},get CHROME_VERSION(){return Y9},IS_CHROMECAST_RECEIVER:fT,get IE_VERSION(){return Ld},get IS_SAFARI(){return C9},get IS_WINDOWS(){return J9},get IS_IPAD(){return _9},get IS_IPHONE(){return Q9},get IS_TIZEN(){return F9},get IS_WEBOS(){return O9},get IS_SMART_TV(){return B9},TOUCH_ENABLED:Ch,IS_IOS:Un,IS_ANY_SAFARI:Z9});function Jw(e){return typeof e==="string"&&Boolean(e.trim())}function rT(e){if(e.indexOf(" ")>=0)throw Error("class has illegal whitespace characters")}function uo(){return ye.default===V.default.document}function mo(e){return t0(e)&&e.nodeType===1}function Yd(){try{return V.default.parent!==V.default.self}catch(e){return!0}}function Jd(e){return function(t,a){if(!Jw(t))return ye.default[e](null);if(Jw(a))a=ye.default.querySelector(a);let n=mo(a)?a:ye.default;return n[e]&&n[e](t)}}function tt(e="div",t={},a={},n){let s=ye.default.createElement(e);if(Object.getOwnPropertyNames(t).forEach(function(i){let l=t[i];if(i==="textContent")ef(s,l);else if(s[i]!==l||i==="tabIndex")s[i]=l}),Object.getOwnPropertyNames(a).forEach(function(i){s.setAttribute(i,a[i])}),n)C4(s,n);return s}function ef(e,t){if(typeof e.textContent>"u")e.innerText=t;else e.textContent=t;return e}function e4(e,t){if(t.firstChild)t.insertBefore(e,t.firstChild);else t.appendChild(e)}function vh(e,t){return rT(t),e.classList.contains(t)}function br(e,...t){return e.classList.add(...t.reduce((a,n)=>a.concat(n.split(/\s+/)),[])),e}function $9(e,...t){if(!e)return dt.warn("removeClass was called with an element that doesn't exist"),null;return e.classList.remove(...t.reduce((a,n)=>a.concat(n.split(/\s+/)),[])),e}function Qd(e,t,a){if(typeof a==="function")a=a(e,t);if(typeof a!=="boolean")a=void 0;return t.split(/\s+/).forEach((n)=>e.classList.toggle(n,a)),e}function Zd(e,t){Object.getOwnPropertyNames(t).forEach(function(a){let n=t[a];if(n===null||typeof n>"u"||n===!1)e.removeAttribute(a);else e.setAttribute(a,n===!0?"":n)})}function Yl(e){let t={},a=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(e&&e.attributes&&e.attributes.length>0){let n=e.attributes;for(let s=n.length-1;s>=0;s--){let i=n[s].name,l=n[s].value;if(a.includes(i))l=l!==null?!0:!1;t[i]=l}}return t}function $d(e,t){return e.getAttribute(t)}function ro(e,t,a){e.setAttribute(t,a)}function W9(e,t){e.removeAttribute(t)}function Wd(){ye.default.body.focus(),ye.default.onselectstart=function(){return!1}}function Pd(){ye.default.onselectstart=function(){return!0}}function oo(e){if(e&&e.getBoundingClientRect&&e.parentNode){let t=e.getBoundingClientRect(),a={};if(["bottom","height","left","right","top","width"].forEach((n)=>{if(t[n]!==void 0)a[n]=t[n]}),!a.height)a.height=parseFloat(co(e,"height"));if(!a.width)a.width=parseFloat(co(e,"width"));return a}}function _h(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};let{offsetWidth:t,offsetHeight:a}=e,n=0,s=0;while(e.offsetParent&&e!==ye.default[S9.fullscreenElement])n+=e.offsetLeft,s+=e.offsetTop,e=e.offsetParent;return{left:n,top:s,width:t,height:a}}function P9(e,t){let a={x:0,y:0};if(Un){let u=e;while(u&&u.nodeName.toLowerCase()!=="html"){let g=co(u,"transform");if(/^matrix/.test(g)){let b=g.slice(7,-1).split(/,\s/).map(Number);a.x+=b[4],a.y+=b[5]}else if(/^matrix3d/.test(g)){let b=g.slice(9,-1).split(/,\s/).map(Number);a.x+=b[12],a.y+=b[13]}if(u.assignedSlot&&u.assignedSlot.parentElement&&V.default.WebKitCSSMatrix){let b=V.default.getComputedStyle(u.assignedSlot.parentElement).transform,d=new V.default.WebKitCSSMatrix(b);a.x+=d.m41,a.y+=d.m42}u=u.parentNode||u.host}}let n={},s=_h(t.target),i=_h(e),l=i.width,f=i.height,c=t.offsetY-(i.top-s.top),h=t.offsetX-(i.left-s.left);if(t.changedTouches){if(h=t.changedTouches[0].pageX-i.left,c=t.changedTouches[0].pageY+i.top,Un)h-=a.x,c-=a.y}return n.y=1-Math.max(0,Math.min(1,c/f)),n.x=Math.max(0,Math.min(1,h/l)),n}function ej(e){return t0(e)&&e.nodeType===3}function em(e){while(e.firstChild)e.removeChild(e.firstChild);return e}function tj(e){if(typeof e==="function")e=e();return(Array.isArray(e)?e:[e]).map((t)=>{if(typeof t==="function")t=t();if(mo(t)||ej(t))return t;if(typeof t==="string"&&/\S/.test(t))return ye.default.createTextNode(t)}).filter((t)=>t)}function C4(e,t){return tj(t).forEach((a)=>e.appendChild(a)),e}function aj(e,t){return C4(em(e),t)}function Fh(e){if(e.button===void 0&&e.buttons===void 0)return!0;if(e.button===0&&e.buttons===void 0)return!0;if(e.type==="mouseup"&&e.button===0&&e.buttons===0)return!0;if(e.type==="mousedown"&&e.button===0&&e.buttons===0)return!0;if(e.button!==0||e.buttons!==1)return!1;return!0}var Wl=Jd("querySelector"),nj=Jd("querySelectorAll");function co(e,t){if(!e||!t)return"";if(typeof V.default.getComputedStyle==="function"){let a;try{a=V.default.getComputedStyle(e)}catch(n){return""}return a?a.getPropertyValue(t)||a[t]:""}return""}function sj(e){[...ye.default.styleSheets].forEach((t)=>{try{let a=[...t.cssRules].map((s)=>s.cssText).join(""),n=ye.default.createElement("style");n.textContent=a,e.document.head.appendChild(n)}catch(a){let n=ye.default.createElement("link");n.rel="stylesheet",n.type=t.type,n.media=t.media.mediaText,n.href=t.href,e.document.head.appendChild(n)}})}var ij=Object.freeze({__proto__:null,isReal:uo,isEl:mo,isInFrame:Yd,createEl:tt,textContent:ef,prependTo:e4,hasClass:vh,addClass:br,removeClass:$9,toggleClass:Qd,setAttributes:Zd,getAttributes:Yl,getAttribute:$d,setAttribute:ro,removeAttribute:W9,blockTextSelection:Wd,unblockTextSelection:Pd,getBoundingClientRect:oo,findPosition:_h,getPointerPosition:P9,isTextNode:ej,emptyEl:em,normalizeContent:tj,appendContent:C4,insertContent:aj,isSingleLeftClick:Fh,$:Wl,$$:nj,computedStyle:co,copyStyleSheetsToWindow:sj}),lj=!1,t4,oT=function(){if(t4.options.autoSetup===!1)return;let e=Array.prototype.slice.call(ye.default.getElementsByTagName("video")),t=Array.prototype.slice.call(ye.default.getElementsByTagName("audio")),a=Array.prototype.slice.call(ye.default.getElementsByTagName("video-js")),n=e.concat(t,a);if(n&&n.length>0)for(let s=0,i=n.length;s<i;s++){let l=n[s];if(l&&l.getAttribute){if(l.player===void 0){if(l.getAttribute("data-setup")!==null)t4(l)}}else{a4(1);break}}else if(!lj)a4(1)};function a4(e,t){if(!uo())return;if(t)t4=t;V.default.setTimeout(oT,e)}function n4(){lj=!0,V.default.removeEventListener("load",n4)}if(uo())if(ye.default.readyState==="complete")n4();else V.default.addEventListener("load",n4);var fj=function(e){let t=ye.default.createElement("style");return t.className=e,t},rj=function(e,t){if(e.styleSheet)e.styleSheet.cssText=t;else e.textContent=t},Wn=new WeakMap,cT=3,hT=cT;function fi(){return hT++}function Qw(e,t){if(!Wn.has(e))return;let a=Wn.get(e);if(a.handlers[t].length===0){if(delete a.handlers[t],e.removeEventListener)e.removeEventListener(t,a.dispatcher,!1);else if(e.detachEvent)e.detachEvent("on"+t,a.dispatcher)}if(Object.getOwnPropertyNames(a.handlers).length<=0)delete a.handlers,delete a.dispatcher,delete a.disabled;if(Object.getOwnPropertyNames(a).length===0)Wn.delete(e)}function _4(e,t,a,n){a.forEach(function(s){e(t,s,n)})}function tm(e){if(e.fixed_)return e;function t(){return!0}function a(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){let n=e||V.default.event;e={};let s=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(let i in n)if(!s.includes(i)){if(!(i==="returnValue"&&n.preventDefault))e[i]=n[i]}if(!e.target)e.target=e.srcElement||ye.default;if(!e.relatedTarget)e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement;if(e.preventDefault=function(){if(n.preventDefault)n.preventDefault();e.returnValue=!1,n.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){if(n.stopPropagation)n.stopPropagation();e.cancelBubble=!0,n.cancelBubble=!0,e.isPropagationStopped=t},e.isPropagationStopped=a,e.stopImmediatePropagation=function(){if(n.stopImmediatePropagation)n.stopImmediatePropagation();e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=a,e.clientX!==null&&e.clientX!==void 0){let i=ye.default.documentElement,l=ye.default.body;e.pageX=e.clientX+(i&&i.scrollLeft||l&&l.scrollLeft||0)-(i&&i.clientLeft||l&&l.clientLeft||0),e.pageY=e.clientY+(i&&i.scrollTop||l&&l.scrollTop||0)-(i&&i.clientTop||l&&l.clientTop||0)}if(e.which=e.charCode||e.keyCode,e.button!==null&&e.button!==void 0)e.button=e.button&1?0:e.button&4?1:e.button&2?2:0}return e.fixed_=!0,e}var d9,uT=function(){if(typeof d9!=="boolean"){d9=!1;try{let e=Object.defineProperty({},"passive",{get(){d9=!0}});V.default.addEventListener("test",null,e),V.default.removeEventListener("test",null,e)}catch(e){}}return d9},mT=["touchstart","touchmove"];function Us(e,t,a){if(Array.isArray(t))return _4(Us,e,t,a);if(!Wn.has(e))Wn.set(e,{});let n=Wn.get(e);if(!n.handlers)n.handlers={};if(!n.handlers[t])n.handlers[t]=[];if(!a.guid)a.guid=fi();if(n.handlers[t].push(a),!n.dispatcher)n.disabled=!1,n.dispatcher=function(s,i){if(n.disabled)return;s=tm(s);let l=n.handlers[s.type];if(l){let f=l.slice(0);for(let c=0,h=f.length;c<h;c++)if(s.isImmediatePropagationStopped())break;else try{f[c].call(e,s,i)}catch(u){dt.error(u)}}};if(n.handlers[t].length===1){if(e.addEventListener){let s=!1;if(uT()&&mT.indexOf(t)>-1)s={passive:!0};e.addEventListener(t,n.dispatcher,s)}else if(e.attachEvent)e.attachEvent("on"+t,n.dispatcher)}}function Gn(e,t,a){if(!Wn.has(e))return;let n=Wn.get(e);if(!n.handlers)return;if(Array.isArray(t))return _4(Gn,e,t,a);let s=function(l,f){n.handlers[f]=[],Qw(l,f)};if(t===void 0){for(let l in n.handlers)if(Object.prototype.hasOwnProperty.call(n.handlers||{},l))s(e,l);return}let i=n.handlers[t];if(!i)return;if(!a){s(e,t);return}if(a.guid){for(let l=0;l<i.length;l++)if(i[l].guid===a.guid)i.splice(l--,1)}Qw(e,t)}function go(e,t,a){let n=Wn.has(e)?Wn.get(e):{},s=e.parentNode||e.ownerDocument;if(typeof t==="string")t={type:t,target:e};else if(!t.target)t.target=e;if(t=tm(t),n.dispatcher)n.dispatcher.call(e,t,a);if(s&&!t.isPropagationStopped()&&t.bubbles===!0)go.call(null,s,t,a);else if(!s&&!t.defaultPrevented&&t.target&&t.target[t.type]){if(!Wn.has(t.target))Wn.set(t.target,{});let i=Wn.get(t.target);if(t.target[t.type]){if(i.disabled=!0,typeof t.target[t.type]==="function")t.target[t.type]();i.disabled=!1}}return!t.defaultPrevented}function am(e,t,a){if(Array.isArray(t))return _4(am,e,t,a);let n=function(){Gn(e,t,n),a.apply(this,arguments)};n.guid=a.guid=a.guid||fi(),Us(e,t,n)}function F4(e,t,a){let n=function(){Gn(e,t,n),a.apply(this,arguments)};n.guid=a.guid=a.guid||fi(),Us(e,t,n)}var gT=Object.freeze({__proto__:null,fixEvent:tm,on:Us,off:Gn,trigger:go,one:am,any:F4}),ri=30,ua=function(e,t,a){if(!t.guid)t.guid=fi();let n=t.bind(e);return n.guid=a?a+"_"+t.guid:t.guid,n},n0=function(e,t){let a=V.default.performance.now();return function(...s){let i=V.default.performance.now();if(i-a>=t)e(...s),a=i}},oj=function(e,t,a,n=V.default){let s,i=()=>{n.clearTimeout(s),s=null},l=function(){let f=this,c=arguments,h=function(){if(s=null,h=null,!a)e.apply(f,c)};if(!s&&a)e.apply(f,c);n.clearTimeout(s),s=n.setTimeout(h,t)};return l.cancel=i,l},pT=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:ri,bind_:ua,throttle:n0,debounce:oj}),bh;class js{on(e,t){let a=this.addEventListener;this.addEventListener=()=>{},Us(this,e,t),this.addEventListener=a}off(e,t){Gn(this,e,t)}one(e,t){let a=this.addEventListener;this.addEventListener=()=>{},am(this,e,t),this.addEventListener=a}any(e,t){let a=this.addEventListener;this.addEventListener=()=>{},F4(this,e,t),this.addEventListener=a}trigger(e){let t=e.type||e;if(typeof e==="string")e={type:t};if(e=tm(e),this.allowedEvents_[t]&&this["on"+t])this["on"+t](e);go(this,e)}queueTrigger(e){if(!bh)bh=new Map;let t=e.type||e,a=bh.get(this);if(!a)a=new Map,bh.set(this,a);let n=a.get(t);a.delete(t),V.default.clearTimeout(n);let s=V.default.setTimeout(()=>{if(a.delete(t),a.size===0)a=null,bh.delete(this);this.trigger(e)},0);a.set(t,s)}}js.prototype.allowedEvents_={};js.prototype.addEventListener=js.prototype.on;js.prototype.removeEventListener=js.prototype.off;js.prototype.dispatchEvent=js.prototype.trigger;var nm=(e)=>{if(typeof e.name==="function")return e.name();if(typeof e.name==="string")return e.name;if(e.name_)return e.name_;if(e.constructor&&e.constructor.name)return e.constructor.name;return typeof e},Y0=(e)=>e instanceof js||!!e.eventBusEl_&&["on","one","off","trigger"].every((t)=>typeof e[t]==="function"),bT=(e,t)=>{if(Y0(e))t();else{if(!e.eventedCallbacks)e.eventedCallbacks=[];e.eventedCallbacks.push(t)}},s4=(e)=>typeof e==="string"&&/\S/.test(e)||Array.isArray(e)&&!!e.length,T9=(e,t,a)=>{if(!e||!e.nodeName&&!Y0(e))throw Error(`Invalid target for ${nm(t)}#${a}; must be a DOM node or evented object.`)},cj=(e,t,a)=>{if(!s4(e))throw Error(`Invalid event type for ${nm(t)}#${a}; must be a non-empty string or array.`)},hj=(e,t,a)=>{if(typeof e!=="function")throw Error(`Invalid listener for ${nm(t)}#${a}; must be a function.`)},R6=(e,t,a)=>{let n=t.length<3||t[0]===e||t[0]===e.eventBusEl_,s,i,l;if(n){if(s=e.eventBusEl_,t.length>=3)t.shift();[i,l]=t}else s=t[0],i=t[1],l=t[2];return T9(s,e,a),cj(i,e,a),hj(l,e,a),l=ua(e,l),{isTargetingSelf:n,target:s,type:i,listener:l}},hr=(e,t,a,n)=>{if(T9(e,e,t),e.nodeName)gT[t](e,a,n);else e[t](a,n)},wT={on(...e){let{isTargetingSelf:t,target:a,type:n,listener:s}=R6(this,e,"on");if(hr(a,"on",n,s),!t){let i=()=>this.off(a,n,s);i.guid=s.guid;let l=()=>this.off("dispose",i);l.guid=s.guid,hr(this,"on","dispose",i),hr(a,"on","dispose",l)}},one(...e){let{isTargetingSelf:t,target:a,type:n,listener:s}=R6(this,e,"one");if(t)hr(a,"one",n,s);else{let i=(...l)=>{this.off(a,n,i),s.apply(null,l)};i.guid=s.guid,hr(a,"one",n,i)}},any(...e){let{isTargetingSelf:t,target:a,type:n,listener:s}=R6(this,e,"any");if(t)hr(a,"any",n,s);else{let i=(...l)=>{this.off(a,n,i),s.apply(null,l)};i.guid=s.guid,hr(a,"any",n,i)}},off(e,t,a){if(!e||s4(e))Gn(this.eventBusEl_,e,t);else{let n=e,s=t;if(T9(n,this,"off"),cj(s,this,"off"),hj(a,this,"off"),a=ua(this,a),this.off("dispose",a),n.nodeName)Gn(n,s,a),Gn(n,"dispose",a);else if(Y0(n))n.off(s,a),n.off("dispose",a)}},trigger(e,t){T9(this.eventBusEl_,this,"trigger");let a=e&&typeof e!=="string"?e.type:e;if(!s4(a))throw Error(`Invalid event type for ${nm(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return go(this.eventBusEl_,e,t)}};function O4(e,t={}){let{eventBusKey:a}=t;if(a){if(!e[a].nodeName)throw Error(`The eventBusKey "${a}" does not refer to an element.`);e.eventBusEl_=e[a]}else e.eventBusEl_=tt("span",{className:"vjs-event-bus"});if(Object.assign(e,wT),e.eventedCallbacks)e.eventedCallbacks.forEach((n)=>{n()});return e.on("dispose",()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach(function(n){if(n&&Wn.has(n))Wn.delete(n)}),V.default.setTimeout(()=>{e.eventBusEl_=null},0)}),e}var dT={state:{},setState(e){if(typeof e==="function")e=e();let t;if(W1(e,(a,n)=>{if(this.state[n]!==a)t=t||{},t[n]={from:this.state[n],to:a};this.state[n]=a}),t&&Y0(this))this.trigger({changes:t,type:"statechanged"});return t}};function uj(e,t){if(Object.assign(e,dT),e.state=Object.assign({},e.state,t),typeof e.handleStateChanged==="function"&&Y0(e))e.on("statechanged",e.handleStateChanged);return e}var kh=function(e){if(typeof e!=="string")return e;return e.replace(/./,(t)=>t.toLowerCase())},Ra=function(e){if(typeof e!=="string")return e;return e.replace(/./,(t)=>t.toUpperCase())},mj=function(e,t){return Ra(e)===Ra(t)},jT=Object.freeze({__proto__:null,toLowerCase:kh,toTitleCase:Ra,titleCaseEquals:mj});class he{constructor(e,t,a){if(!e&&this.play)this.player_=e=this;else this.player_=e;if(this.isDisposed_=!1,this.parentComponent_=null,this.options_=ia({},this.options_),t=this.options_=ia(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){let n=e&&e.id&&e.id()||"no_player";this.id_=`${n}_component_${fi()}`}if(this.name_=t.name||null,t.el)this.el_=t.el;else if(t.createEl!==!1)this.el_=this.createEl();if(t.className&&this.el_)t.className.split(" ").forEach((n)=>this.addClass(n));if(["on","off","one","any","trigger"].forEach((n)=>{this[n]=void 0}),t.evented!==!1)O4(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange);if(uj(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,t.initChildren!==!1)this.initChildren();if(this.ready(a),t.reportTouchActivity!==!1)this.enableTouchActivity()}dispose(e={}){if(this.isDisposed_)return;if(this.readyQueue_)this.readyQueue_.length=0;if(this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_){for(let t=this.children_.length-1;t>=0;t--)if(this.children_[t].dispose)this.children_[t].dispose()}if(this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_){if(this.el_.parentNode)if(e.restoreEl)this.el_.parentNode.replaceChild(e.restoreEl,this.el_);else this.el_.parentNode.removeChild(this.el_);this.el_=null}this.player_=null}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){if(!e)return this.options_;return this.options_=ia(this.options_,e),this.options_}el(){return this.el_}createEl(e,t,a){return tt(e,t,a)}localize(e,t,a=e){let n=this.player_.language&&this.player_.language(),s=this.player_.languages&&this.player_.languages(),i=s&&s[n],l=n&&n.split("-")[0],f=s&&s[l],c=a;if(i&&i[e])c=i[e];else if(f&&f[e])c=f[e];if(t)c=c.replace(/\{(\d+)\}/g,function(h,u){let g=t[u-1],b=g;if(typeof g>"u")b=h;return b});return c}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;return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce((a,n)=>a.concat(n),[]);let t=this;for(let a=0;a<e.length;a++)if(t=t.getChild(e[a]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;let a="http://www.w3.org/2000/svg",n=tt("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),s=ye.default.createElementNS(a,"svg");s.setAttributeNS(null,"viewBox","0 0 512 512");let i=ye.default.createElementNS(a,"use");if(s.appendChild(i),i.setAttributeNS(null,"href",`#vjs-icon-${e}`),n.appendChild(s),this.iconIsSet_)t.replaceChild(n,t.querySelector(".vjs-icon-placeholder"));else t.appendChild(n);return this.iconIsSet_=!0,n}addChild(e,t={},a=this.children_.length){let n,s;if(typeof e==="string"){s=Ra(e);let i=t.componentClass||s;t.name=s;let l=he.getComponent(i);if(!l)throw Error(`Component ${i} does not exist`);if(typeof l!=="function")return null;n=new l(this.player_||this,t)}else n=e;if(n.parentComponent_)n.parentComponent_.removeChild(n);if(this.children_.splice(a,0,n),n.parentComponent_=this,typeof n.id==="function")this.childIndex_[n.id()]=n;if(s=s||n.name&&Ra(n.name()),s)this.childNameIndex_[s]=n,this.childNameIndex_[kh(s)]=n;if(typeof n.el==="function"&&n.el()){let i=null;if(this.children_[a+1]){if(this.children_[a+1].el_)i=this.children_[a+1].el_;else if(mo(this.children_[a+1]))i=this.children_[a+1]}this.contentEl().insertBefore(n.el(),i)}return n}removeChild(e){if(typeof e==="string")e=this.getChild(e);if(!e||!this.children_)return;let t=!1;for(let n=this.children_.length-1;n>=0;n--)if(this.children_[n]===e){t=!0,this.children_.splice(n,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[Ra(e.name())]=null,this.childNameIndex_[kh(e.name())]=null;let a=e.el();if(a&&a.parentNode===this.contentEl())this.contentEl().removeChild(e.el())}initChildren(){let e=this.options_.children;if(e){let t=this.options_,a=(i)=>{let{name:l,opts:f}=i;if(t[l]!==void 0)f=t[l];if(f===!1)return;if(f===!0)f={};f.playerOptions=this.options_.playerOptions;let c=this.addChild(l,f);if(c)this[l]=c},n,s=he.getComponent("Tech");if(Array.isArray(e))n=e;else n=Object.keys(e);n.concat(Object.keys(this.options_).filter(function(i){return!n.some(function(l){if(typeof l==="string")return i===l;return i===l.name})})).map((i)=>{let l,f;if(typeof i==="string")l=i,f=e[l]||this.options_[l]||{};else l=i.name,f=i;return{name:l,opts:f}}).filter((i)=>{let l=he.getComponent(i.opts.componentClass||Ra(i.name));return l&&!s.isTech(l)}).forEach(a)}}buildCSSClass(){return""}ready(e,t=!1){if(!e)return;if(!this.isReady_){this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e);return}if(t)e.call(this);else this.setTimeout(e,1)}triggerReady(){this.isReady_=!0,this.setTimeout(function(){let e=this.readyQueue_;if(this.readyQueue_=[],e&&e.length>0)e.forEach(function(t){t.call(this)},this);this.trigger("ready")},1)}$(e,t){return Wl(e,t||this.contentEl())}$$(e,t){return nj(e,t||this.contentEl())}hasClass(e){return vh(this.el_,e)}addClass(...e){br(this.el_,...e)}removeClass(...e){$9(this.el_,...e)}toggleClass(e,t){Qd(this.el_,e,t)}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 $d(this.el_,e)}setAttribute(e,t){ro(this.el_,e,t)}removeAttribute(e){W9(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,a){if(t!==void 0){if(t===null||t!==t)t=0;if((""+t).indexOf("%")!==-1||(""+t).indexOf("px")!==-1)this.el_.style[e]=t;else if(t==="auto")this.el_.style[e]="";else this.el_.style[e]=t+"px";if(!a)this.trigger("componentresize");return}if(!this.el_)return 0;let n=this.el_.style[e],s=n.indexOf("px");if(s!==-1)return parseInt(n.slice(0,s),10);return parseInt(this.el_["offset"+Ra(e)],10)}currentDimension(e){let t=0;if(e!=="width"&&e!=="height")throw Error("currentDimension only accepts width or height value");if(t=co(this.el_,e),t=parseFloat(t),t===0||isNaN(t)){let a=`offset${Ra(e)}`;t=this.el_[a]}return t}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){let e=this.el_.getBoundingClientRect(),t={x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},a={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:t,center:a}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){if(this.player_){if(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,t=null,a=10,n=200,s;this.on("touchstart",function(l){if(l.touches.length===1)t={pageX:l.touches[0].pageX,pageY:l.touches[0].pageY},e=V.default.performance.now(),s=!0}),this.on("touchmove",function(l){if(l.touches.length>1)s=!1;else if(t){let f=l.touches[0].pageX-t.pageX,c=l.touches[0].pageY-t.pageY;if(Math.sqrt(f*f+c*c)>a)s=!1}});let i=function(){s=!1};this.on("touchleave",i),this.on("touchcancel",i),this.on("touchend",function(l){if(t=null,s===!0){if(V.default.performance.now()-e<n)l.preventDefault(),this.trigger("tap")}})}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;let e=ua(this.player(),this.player().reportUserActivity),t;this.on("touchstart",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)});let a=function(n){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",a),this.on("touchcancel",a)}setTimeout(e,t){var a;return e=ua(this,e),this.clearTimersOnDispose_(),a=V.default.setTimeout(()=>{if(this.setTimeoutIds_.has(a))this.setTimeoutIds_.delete(a);e()},t),this.setTimeoutIds_.add(a),a}clearTimeout(e){if(this.setTimeoutIds_.has(e))this.setTimeoutIds_.delete(e),V.default.clearTimeout(e);return e}setInterval(e,t){e=ua(this,e),this.clearTimersOnDispose_();let a=V.default.setInterval(e,t);return this.setIntervalIds_.add(a),a}clearInterval(e){if(this.setIntervalIds_.has(e))this.setIntervalIds_.delete(e),V.default.clearInterval(e);return e}requestAnimationFrame(e){this.clearTimersOnDispose_();var t;return e=ua(this,e),t=V.default.requestAnimationFrame(()=>{if(this.rafIds_.has(t))this.rafIds_.delete(t);e()}),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){if(this.namedRafs_.has(e))this.cancelNamedAnimationFrame(e);this.clearTimersOnDispose_(),t=ua(this,t);let a=this.requestAnimationFrame(()=>{if(t(),this.namedRafs_.has(e))this.namedRafs_.delete(e)});return this.namedRafs_.set(e,a),e}cancelNamedAnimationFrame(e){if(!this.namedRafs_.has(e))return;this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e)}cancelAnimationFrame(e){if(this.rafIds_.has(e))this.rafIds_.delete(e),V.default.cancelAnimationFrame(e);return e}clearTimersOnDispose_(){if(this.clearingTimersOnDispose_)return;this.clearingTimersOnDispose_=!0,this.one("dispose",()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(([e,t])=>{this[e].forEach((a,n)=>this[t](n))}),this.clearingTimersOnDispose_=!1})}getIsDisabled(){return Boolean(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 t(s){let i=V.default.getComputedStyle(s,null),l=i.getPropertyValue("visibility");return i.getPropertyValue("display")!=="none"&&!["hidden","collapse"].includes(l)}function a(s){if(!t(s.parentElement))return!1;if(!t(s)||s.style.opacity==="0"||V.default.getComputedStyle(s).height==="0px"||V.default.getComputedStyle(s).width==="0px")return!1;return!0}function n(s){if(s.offsetWidth+s.offsetHeight+s.getBoundingClientRect().height+s.getBoundingClientRect().width===0)return!1;let i={x:s.getBoundingClientRect().left+s.offsetWidth/2,y:s.getBoundingClientRect().top+s.offsetHeight/2};if(i.x<0)return!1;if(i.x>(ye.default.documentElement.clientWidth||V.default.innerWidth))return!1;if(i.y<0)return!1;if(i.y>(ye.default.documentElement.clientHeight||V.default.innerHeight))return!1;let l=ye.default.elementFromPoint(i.x,i.y);while(l){if(l===s)return!0;if(l.parentNode)l=l.parentNode;else return!1}}if(!e)e=this.el();if(n(e)&&a(e)&&(!e.parentElement||e.tabIndex>=0))return!0;return!1}static registerComponent(e,t){if(typeof e!=="string"||!e)throw Error(`Illegal component name, "${e}"; must be a non-empty string.`);let a=he.getComponent("Tech"),n=a&&a.isTech(t),s=he===t||he.prototype.isPrototypeOf(t.prototype);if(n||!s){let l;if(n)l="techs must be registered using Tech.registerTech()";else l="must be a Component subclass";throw Error(`Illegal component, "${e}"; ${l}.`)}if(e=Ra(e),!he.components_)he.components_={};let i=he.getComponent("Player");if(e==="Player"&&i&&i.players){let l=i.players,f=Object.keys(l);if(l&&f.length>0){for(let c=0;c<f.length;c++)if(l[f[c]]!==null)throw Error("Can not register Player component after player has been created.")}}return he.components_[e]=t,he.components_[kh(e)]=t,t}static getComponent(e){if(!e||!he.components_)return;return he.components_[e]}}he.registerComponent("Component",he);function qT(e,t,a){if(typeof t!=="number"||t<0||t>a)throw Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${a}).`)}function Zw(e,t,a,n){return qT(e,n,a.length-1),a[n][t]}function N6(e){let t;if(e===void 0||e.length===0)t={length:0,start(){throw Error("This TimeRanges object is empty")},end(){throw Error("This TimeRanges object is empty")}};else t={length:e.length,start:Zw.bind(null,"start",0,e),end:Zw.bind(null,"end",1,e)};if(V.default.Symbol&&V.default.Symbol.iterator)t[V.default.Symbol.iterator]=()=>(e||[]).values();return t}function Fi(e,t){if(Array.isArray(e))return N6(e);else if(e===void 0||t===void 0)return N6();return N6([[e,t]])}var gj=function(e,t){e=e<0?0:e;let a=Math.floor(e%60),n=Math.floor(e/60%60),s=Math.floor(e/3600),i=Math.floor(t/60%60),l=Math.floor(t/3600);if(isNaN(e)||e===1/0)s=n=a="-";return s=s>0||l>0?s+":":"",n=((s||i>=10)&&n<10?"0"+n:n)+":",a=a<10?"0"+a:a,s+n+a},B4=gj;function pj(e){B4=e}function bj(){B4=gj}function jr(e,t=e){return B4(e,t)}var vT=Object.freeze({__proto__:null,createTimeRanges:Fi,createTimeRange:Fi,setFormatTime:pj,resetFormatTime:bj,formatTime:jr});function wj(e,t){let a=0,n,s;if(!t)return 0;if(!e||!e.length)e=Fi(0,0);for(let i=0;i<e.length;i++){if(n=e.start(i),s=e.end(i),s>t)s=t;a+=s-n}return a/t}function Fa(e){if(e instanceof Fa)return e;if(typeof e==="number")this.code=e;else if(typeof e==="string")this.message=e;else if(t0(e)){if(typeof e.code==="number")this.code=e.code;Object.assign(this,e)}if(!this.message)this.message=Fa.defaultMessages[this.code]||""}Fa.prototype.code=0;Fa.prototype.message="";Fa.prototype.status=null;Fa.prototype.metadata=null;Fa.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"];Fa.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."};Fa.MEDIA_ERR_CUSTOM=0;Fa.prototype.MEDIA_ERR_CUSTOM=0;Fa.MEDIA_ERR_ABORTED=1;Fa.prototype.MEDIA_ERR_ABORTED=1;Fa.MEDIA_ERR_NETWORK=2;Fa.prototype.MEDIA_ERR_NETWORK=2;Fa.MEDIA_ERR_DECODE=3;Fa.prototype.MEDIA_ERR_DECODE=3;Fa.MEDIA_ERR_SRC_NOT_SUPPORTED=4;Fa.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;Fa.MEDIA_ERR_ENCRYPTED=5;Fa.prototype.MEDIA_ERR_ENCRYPTED=5;function Ah(e){return e!==void 0&&e!==null&&typeof e.then==="function"}function $i(e){if(Ah(e))e.then(null,(t)=>{})}var i4=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((a,n,s)=>{if(e[n])a[n]=e[n];return a},{cues:e.cues&&Array.prototype.map.call(e.cues,function(a){return{startTime:a.startTime,endTime:a.endTime,text:a.text,id:a.id}})})},kT=function(e){let t=e.$$("track"),a=Array.prototype.map.call(t,(s)=>s.track);return Array.prototype.map.call(t,function(s){let i=i4(s.track);if(s.src)i.src=s.src;return i}).concat(Array.prototype.filter.call(e.textTracks(),function(s){return a.indexOf(s)===-1}).map(i4))},AT=function(e,t){return e.forEach(function(a){let n=t.addRemoteTextTrack(a).track;if(!a.src&&a.cues)a.cues.forEach((s)=>n.addCue(s))}),t.textTracks()},l4={textTracksToJson:kT,jsonToTextTracks:AT,trackToJson:i4},E6="vjs-modal-dialog";class qr extends he{constructor(e,t){super(e,t);this.handleKeyDown_=(a)=>this.handleKeyDown(a),this.close_=(a)=>this.close(a),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=tt("div",{className:`${E6}-content`},{role:"document"}),this.descEl_=tt("p",{className:`${E6}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),ef(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`${E6} 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.");if(this.closeable())e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.");return e}open(){if(this.opened_){if(this.options_.fillAlways)this.fill();return}let e=this.player();if(this.trigger("beforemodalopen"),this.opened_=!0,this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)this.fill();if(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){if(typeof e==="boolean")this[e?"open":"close"]();return this.opened_}close(){if(!this.opened_)return;let e=this.player();if(this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen)e.play();if(this.off("keydown",this.handleKeyDown_),this.hadControls_)e.controls(!0);if(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"){let t=this.closeable_=!!e,a=this.getChild("closeButton");if(t&&!a){let n=this.contentEl_;this.contentEl_=this.el_,a=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(a,"close",this.close_)}if(!t&&a)this.off(a,"close",this.close_),this.removeChild(a),a.dispose()}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){let t=this.contentEl(),a=t.parentNode,n=t.nextSibling;if(this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,a.removeChild(t),this.empty(),aj(t,e),this.trigger("modalfill"),n)a.insertBefore(t,n);else a.appendChild(t);let s=this.getChild("closeButton");if(s)a.appendChild(s.el_);this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),em(this.contentEl()),this.trigger("modalempty")}content(e){if(typeof e<"u")this.content_=e;return this.content_}conditionalFocus_(){let e=ye.default.activeElement,t=this.player_.el_;if(this.previouslyActiveEl_=null,t.contains(e)||t===e)this.previouslyActiveEl_=e,this.focus()}conditionalBlur_(){if(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;let t=this.focusableEls_(),a=this.el_.querySelector(":focus"),n;for(let s=0;s<t.length;s++)if(a===t[s]){n=s;break}if(ye.default.activeElement===this.el_)n=0;if(e.shiftKey&&n===0)t[t.length-1].focus(),e.preventDefault();else if(!e.shiftKey&&n===t.length-1)t[0].focus(),e.preventDefault()}focusableEls_(){let e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(t)=>{return(t instanceof V.default.HTMLAnchorElement||t instanceof V.default.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof V.default.HTMLInputElement||t instanceof V.default.HTMLSelectElement||t instanceof V.default.HTMLTextAreaElement||t instanceof V.default.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof V.default.HTMLIFrameElement||t instanceof V.default.HTMLObjectElement||t instanceof V.default.HTMLEmbedElement||t.hasAttribute("tabindex")&&t.getAttribute("tabindex")!==-1||t.hasAttribute("contenteditable")})}}qr.prototype.options_={pauseOnOpen:!0,temporary:!0};he.registerComponent("ModalDialog",qr);class Pl extends js{constructor(e=[]){super();this.tracks_=[];for(let t=0;t<e.length;t++)this.addTrack(e[t])}get length(){return this.tracks_.length}addTrack(e){let t=this.tracks_.length;if(!(""+t in this))Object.defineProperty(this,t,{get(){return this.tracks_[t]}});if(this.tracks_.indexOf(e)===-1)this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this});if(e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},Y0(e))e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let a=0,n=this.length;a<n;a++)if(this[a]===e){if(t=this[a],t.off)t.off();this.tracks_.splice(a,1);break}if(!t)return;this.trigger({track:t,type:"removetrack",target:this})}getTrackById(e){let t=null;for(let a=0,n=this.length;a<n;a++){let s=this[a];if(s.id===e){t=s;break}}return t}}Pl.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(let e in Pl.prototype.allowedEvents_)Pl.prototype["on"+e]=null;var z6=function(e,t){for(let a=0;a<e.length;a++){if(!Object.keys(e[a]).length||t.id===e[a].id)continue;e[a].enabled=!1}};class T4 extends Pl{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){z6(e,e[t]);break}super(e);this.changing_=!1}addTrack(e){if(e.enabled)z6(this,e);if(super.addTrack(e),!e.addEventListener)return;e.enabledChange_=()=>{if(this.changing_)return;this.changing_=!0,z6(this,e),this.changing_=!1,this.trigger("change")},e.addEventListener("enabledchange",e.enabledChange_)}removeTrack(e){if(super.removeTrack(e),e.removeEventListener&&e.enabledChange_)e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null}}var I6=function(e,t){for(let a=0;a<e.length;a++){if(!Object.keys(e[a]).length||t.id===e[a].id)continue;e[a].selected=!1}};class M4 extends Pl{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){I6(e,e[t]);break}super(e);this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set(){}})}addTrack(e){if(e.selected)I6(this,e);if(super.addTrack(e),!e.addEventListener)return;e.selectedChange_=()=>{if(this.changing_)return;this.changing_=!0,I6(this,e),this.changing_=!1,this.trigger("change")},e.addEventListener("selectedchange",e.selectedChange_)}removeTrack(e){if(super.removeTrack(e),e.removeEventListener&&e.selectedChange_)e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null}}class sm extends Pl{addTrack(e){if(super.addTrack(e),!this.queueChange_)this.queueChange_=()=>this.queueTrigger("change");if(!this.triggerSelectedlanguagechange)this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange");if(e.addEventListener("modechange",this.queueChange_),["metadata","chapters"].indexOf(e.kind)===-1)e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){if(super.removeTrack(e),e.removeEventListener){if(this.queueChange_)e.removeEventListener("modechange",this.queueChange_);if(this.selectedlanguagechange_)e.removeEventListener("modechange",this.triggerSelectedlanguagechange_)}}toJSON(){return this.tracks_.map((e)=>e.toJSON())}}class dj{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,a=e.length;t<a;t++)this.addTrackElement_(e[t])}addTrackElement_(e){let t=this.trackElements_.length;if(!(""+t in this))Object.defineProperty(this,t,{get(){return this.trackElements_[t]}});if(this.trackElements_.indexOf(e)===-1)this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let a=0,n=this.trackElements_.length;a<n;a++)if(e===this.trackElements_[a].track){t=this.trackElements_[a];break}return t}removeTrackElement_(e){for(let t=0,a=this.trackElements_.length;t<a;t++)if(e===this.trackElements_[t]){if(this.trackElements_[t].track&&typeof this.trackElements_[t].track.off==="function")this.trackElements_[t].track.off();if(typeof this.trackElements_[t].off==="function")this.trackElements_[t].off();this.trackElements_.splice(t,1);break}}}class M9{constructor(e){M9.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){let t=this.length||0,a=0,n=e.length;this.cues_=e,this.length_=e.length;let s=function(i){if(!(""+i in this))Object.defineProperty(this,""+i,{get(){return this.cues_[i]}})};if(t<n){a=t;for(;a<n;a++)s.call(this,a)}}getCueById(e){let t=null;for(let a=0,n=this.length;a<n;a++){let s=this[a];if(s.id===e){t=s;break}}return t}}var yT={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},ST={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},CT={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},$w={disabled:"disabled",hidden:"hidden",showing:"showing"};class im extends js{constructor(e={}){super();let t={id:e.id||"vjs_track_"+fi(),kind:e.kind||"",language:e.language||""},a=e.label||"";for(let n in t)Object.defineProperty(this,n,{get(){return t[n]},set(){}});Object.defineProperty(this,"label",{get(){return a},set(n){if(n!==a)a=n,this.trigger("labelchange")}})}}var H4=function(e){return new URL(e,ye.default.baseURI)},jj=function(e){return new URL(e,ye.default.baseURI).href},D4=function(e){if(typeof e==="string"){let a=e.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return a?a[1].toLowerCase():""}return""},lm=function(e,t=V.default.location){return H4(e).origin!==t.origin},_T=Object.freeze({__proto__:null,parseUrl:H4,getAbsoluteURL:jj,getFileExtension:D4,isCrossOrigin:lm}),Ww=function(e,t){let a=new V.default.WebVTT.Parser(V.default,V.default.vttjs,V.default.WebVTT.StringDecoder()),n=[];if(a.oncue=function(s){t.addCue(s)},a.onparsingerror=function(s){n.push(s)},a.onflush=function(){t.trigger({type:"loadeddata",target:t})},a.parse(e),n.length>0){if(V.default.console&&V.default.console.groupCollapsed)V.default.console.groupCollapsed(`Text Track parsing errors for ${t.src}`);if(n.forEach((s)=>dt.error(s)),V.default.console&&V.default.console.groupEnd)V.default.console.groupEnd()}a.flush()},Pw=function(e,t){let a={uri:e},n=lm(e);if(n)a.cors=n;let s=t.tech_.crossOrigin()==="use-credentials";if(s)a.withCredentials=s;A4.default(a,ua(this,function(i,l,f){if(i)return dt.error(i,l);if(t.loaded_=!0,typeof V.default.WebVTT!=="function"){if(t.tech_)t.tech_.any(["vttjsloaded","vttjserror"],(c)=>{if(c.type==="vttjserror"){dt.error(`vttjs failed to load, stopping trying to process ${t.src}`);return}return Ww(f,t)})}else Ww(f,t)}))};class po extends im{constructor(e={}){if(!e.tech)throw Error("A tech was not provided.");let t=ia(e,{kind:CT[e.kind]||"subtitles",language:e.language||e.srclang||""}),a=$w[t.mode]||"disabled",n=t.default;if(t.kind==="metadata"||t.kind==="chapters")a="hidden";super(t);this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=this.tech_.preloadTextTracks!==!1;let s=new M9(this.cues_),i=new M9(this.activeCues_),l=!1;this.timeupdateHandler=ua(this,function(c={}){if(this.tech_.isDisposed())return;if(!this.tech_.isReady_){if(c.type!=="timeupdate")this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler);return}if(this.activeCues=this.activeCues,l)this.trigger("cuechange"),l=!1;if(c.type!=="timeupdate")this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)});let f=()=>{this.stopTracking()};if(this.tech_.one("dispose",f),a!=="disabled")this.startTracking();if(Object.defineProperties(this,{default:{get(){return n},set(){}},mode:{get(){return a},set(c){if(!$w[c])return;if(a===c)return;if(a=c,!this.preload_&&a!=="disabled"&&this.cues.length===0)Pw(this.src,this);if(this.stopTracking(),a!=="disabled")this.startTracking();this.trigger("modechange")}},cues:{get(){if(!this.loaded_)return null;return s},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(this.cues.length===0)return i;let c=this.tech_.currentTime(),h=[];for(let u=0,g=this.cues.length;u<g;u++){let b=this.cues[u];if(b.startTime<=c&&b.endTime>=c)h.push(b)}if(l=!1,h.length!==this.activeCues_.length)l=!0;else for(let u=0;u<h.length;u++)if(this.activeCues_.indexOf(h[u])===-1)l=!0;return this.activeCues_=h,i.setCues_(this.activeCues_),i},set(){}}}),t.src){if(this.src=t.src,!this.preload_)this.loaded_=!0;if(this.preload_||t.kind!=="subtitles"&&t.kind!=="captions")Pw(this.src,this)}else this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){if(this.rvf_)this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0;this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let t=e;if(!("getCueAsHTML"in t)){t=new V.default.vttjs.VTTCue(e.startTime,e.endTime,e.text);for(let n in e)if(!(n in t))t[n]=e[n];t.id=e.id,t.originalCue_=e}let a=this.tech_.textTracks();for(let n=0;n<a.length;n++)if(a[n]!==this)a[n].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return l4.trackToJson(this)}removeCue(e){let t=this.cues_.length;while(t--){let a=this.cues_[t];if(a===e||a.originalCue_&&a.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}po.prototype.allowedEvents_={cuechange:"cuechange"};class x4 extends im{constructor(e={}){let t=ia(e,{kind:ST[e.kind]||""});super(t);let a=!1;if(Object.defineProperty(this,"enabled",{get(){return a},set(n){if(typeof n!=="boolean"||n===a)return;a=n,this.trigger("enabledchange")}}),t.enabled)this.enabled=t.enabled;this.loaded_=!0}}class R4 extends im{constructor(e={}){let t=ia(e,{kind:yT[e.kind]||""});super(t);let a=!1;if(Object.defineProperty(this,"selected",{get(){return a},set(n){if(typeof n!=="boolean"||n===a)return;a=n,this.trigger("selectedchange")}}),t.selected)this.selected=t.selected}}class J0 extends js{constructor(e={}){super();let t,a=new po(e);this.kind=a.kind,this.src=a.src,this.srclang=a.language,this.label=a.label,this.default=a.default,Object.defineProperties(this,{readyState:{get(){return t}},track:{get(){return a}}}),t=J0.NONE,a.addEventListener("loadeddata",()=>{t=J0.LOADED,this.trigger({type:"load",target:this})})}}J0.prototype.allowedEvents_={load:"load"};J0.NONE=0;J0.LOADING=1;J0.LOADED=2;J0.ERROR=3;var li={audio:{ListClass:T4,TrackClass:x4,capitalName:"Audio"},video:{ListClass:M4,TrackClass:R4,capitalName:"Video"},text:{ListClass:sm,TrackClass:po,capitalName:"Text"}};Object.keys(li).forEach(function(e){li[e].getterName=`${e}Tracks`,li[e].privateName=`${e}Tracks_`});var ho={remoteText:{ListClass:sm,TrackClass:po,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:dj,TrackClass:J0,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},$n=Object.assign({},li,ho);ho.names=Object.keys(ho);li.names=Object.keys(li);$n.names=[].concat(ho.names).concat(li.names);function FT(e,t,a,n,s={}){let i=e.textTracks();if(s.kind=t,a)s.label=a;if(n)s.language=n;s.tech=e;let l=new $n.text.TrackClass(s);return i.addTrack(l),l}class ht extends he{constructor(e={},t=function(){}){e.reportTouchActivity=!1;super(null,e,t);if(this.onDurationChange_=(a)=>this.onDurationChange(a),this.trackProgress_=(a)=>this.trackProgress(a),this.trackCurrentTime_=(a)=>this.trackCurrentTime(a),this.stopTrackingCurrentTime_=(a)=>this.stopTrackingCurrentTime(a),this.disposeSourceHandler_=(a)=>this.disposeSourceHandler(a),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",function(){this.hasStarted_=!0}),this.on("loadstart",function(){this.hasStarted_=!1}),$n.names.forEach((a)=>{let n=$n[a];if(e&&e[n.getterName])this[n.privateName]=e[n.getterName]}),!this.featuresProgressEvents)this.manualProgressOn();if(!this.featuresTimeupdateEvents)this.manualTimeUpdatesOn();if(["Text","Audio","Video"].forEach((a)=>{if(e[`native${a}Tracks`]===!1)this[`featuresNative${a}Tracks`]=!1}),e.nativeCaptions===!1||e.nativeTextTracks===!1)this.featuresNativeTextTracks=!1;else if(e.nativeCaptions===!0||e.nativeTextTracks===!0)this.featuresNativeTextTracks=!0;if(!this.featuresNativeTextTracks)this.emulateTextTracks();if(this.preloadTextTracks=e.preloadTextTracks!==!1,this.autoRemoteTextTracks_=new $n.text.ListClass,this.initTrackListeners(),!e.nativeControlsForTouch)this.emitTapEvents();if(this.constructor)this.name_=this.constructor.name||"Unknown Tech"}triggerSourceset(e){if(!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(ua(this,function(){let t=this.bufferedPercent();if(this.bufferedPercent_!==t)this.trigger("progress");if(this.bufferedPercent_=t,t===1)this.stopTrackingProgress()}),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return Fi(0,0)}bufferedPercent(){return wj(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(){if(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(){if(this.clearTracks(li.names),this.manualProgress)this.manualProgressOff();if(this.manualTimeUpdates)this.manualTimeUpdatesOff();super.dispose()}clearTracks(e){e=[].concat(e),e.forEach((t)=>{let a=this[`${t}Tracks`]()||[],n=a.length;while(n--){let s=a[n];if(t==="text")this.removeRemoteTextTrack(s);a.removeTrack(s)}})}cleanupAutoTextTracks(){let e=this.autoRemoteTextTracks_||[],t=e.length;while(t--){let a=e[t];this.removeRemoteTextTrack(a)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){if(e!==void 0)this.error_=new Fa(e),this.trigger("error");return this.error_}played(){if(this.hasStarted_)return Fi(0,0);return Fi()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){if(this.manualTimeUpdates)this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){li.names.forEach((e)=>{let t=li[e],a=()=>{this.trigger(`${e}trackchange`)},n=this[t.getterName]();n.addEventListener("removetrack",a),n.addEventListener("addtrack",a),this.on("dispose",()=>{n.removeEventListener("removetrack",a),n.removeEventListener("addtrack",a)})})}addWebVttScript_(){if(V.default.WebVTT)return;if(ye.default.body.contains(this.el())){if(!this.options_["vtt.js"]&&fo($6.default)&&Object.keys($6.default).length>0){this.trigger("vttjsloaded");return}let e=ye.default.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}),V.default.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){let e=this.textTracks(),t=this.remoteTextTracks(),a=(l)=>e.addTrack(l.track),n=(l)=>e.removeTrack(l.track);t.on("addtrack",a),t.on("removetrack",n),this.addWebVttScript_();let s=()=>this.trigger("texttrackchange"),i=()=>{s();for(let l=0;l<e.length;l++){let f=e[l];if(f.removeEventListener("cuechange",s),f.mode==="showing")f.addEventListener("cuechange",s)}};i(),e.addEventListener("change",i),e.addEventListener("addtrack",i),e.addEventListener("removetrack",i),this.on("dispose",function(){t.off("addtrack",a),t.off("removetrack",n),e.removeEventListener("change",i),e.removeEventListener("addtrack",i),e.removeEventListener("removetrack",i);for(let l=0;l<e.length;l++)e[l].removeEventListener("cuechange",s)})}addTextTrack(e,t,a){if(!e)throw Error("TextTrack kind is required but was not provided");return FT(this,e,t,a)}createRemoteTextTrack(e){let t=ia(e,{tech:this});return new ho.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){let a=this.createRemoteTextTrack(e);if(typeof t!=="boolean")t=!1;if(this.remoteTextTrackEls().addTrackElement_(a),this.remoteTextTracks().addTrack(a.track),t===!1)this.ready(()=>this.autoRemoteTextTracks_.addTrack(a.track));return a}removeRemoteTextTrack(e){let t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){let t=fi();if(!this.isReady_||this.paused())this.queuedHanders_.add(t),this.one("playing",()=>{if(this.queuedHanders_.has(t))this.queuedHanders_.delete(t),e()});else this.requestNamedAnimationFrame(t,e);return t}cancelVideoFrameCallback(e){if(this.queuedHanders_.has(e))this.queuedHanders_.delete(e);else this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,t){return ht.canPlayType(e.type)}static isTech(e){return e.prototype instanceof ht||e instanceof ht||e===ht}static registerTech(e,t){if(!ht.techs_)ht.techs_={};if(!ht.isTech(t))throw Error(`Tech ${e} must be a Tech`);if(!ht.canPlayType)throw Error("Techs must have a static canPlayType method on them");if(!ht.canPlaySource)throw Error("Techs must have a static canPlaySource method on them");if(e=Ra(e),ht.techs_[e]=t,ht.techs_[kh(e)]=t,e!=="Tech")ht.defaultTechOrder_.push(e);return t}static getTech(e){if(!e)return;if(ht.techs_&&ht.techs_[e])return ht.techs_[e];if(e=Ra(e),V.default&&V.default.videojs&&V.default.videojs[e])return dt.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),V.default.videojs[e]}}$n.names.forEach(function(e){let t=$n[e];ht.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}});ht.prototype.featuresVolumeControl=!0;ht.prototype.featuresMuteControl=!0;ht.prototype.featuresFullscreenResize=!1;ht.prototype.featuresPlaybackRate=!1;ht.prototype.featuresProgressEvents=!1;ht.prototype.featuresSourceset=!1;ht.prototype.featuresTimeupdateEvents=!1;ht.prototype.featuresNativeTextTracks=!1;ht.prototype.featuresVideoFrameCallback=!1;ht.withSourceHandlers=function(e){e.registerSourceHandler=function(a,n){let s=e.sourceHandlers;if(!s)s=e.sourceHandlers=[];if(n===void 0)n=s.length;s.splice(n,0,a)},e.canPlayType=function(a){let n=e.sourceHandlers||[],s;for(let i=0;i<n.length;i++)if(s=n[i].canPlayType(a),s)return s;return""},e.selectSourceHandler=function(a,n){let s=e.sourceHandlers||[],i;for(let l=0;l<s.length;l++)if(i=s[l].canHandleSource(a,n),i)return s[l];return null},e.canPlaySource=function(a,n){let s=e.selectSourceHandler(a,n);if(s)return s.canHandleSource(a,n);return""},["seekable","seeking","duration"].forEach(function(a){let n=this[a];if(typeof n!=="function")return;this[a]=function(){if(this.sourceHandler_&&this.sourceHandler_[a])return this.sourceHandler_[a].apply(this.sourceHandler_,arguments);return n.apply(this,arguments)}},e.prototype),e.prototype.setSource=function(a){let n=e.selectSourceHandler(a,this.options_);if(!n)if(e.nativeSourceHandler)n=e.nativeSourceHandler;else dt.error("No source handler found for the current source.");if(this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),n!==e.nativeSourceHandler)this.currentSource_=a;this.sourceHandler_=n.handleSource(a,this,this.options_),this.one("dispose",this.disposeSourceHandler_)},e.prototype.disposeSourceHandler=function(){if(this.currentSource_)this.clearTracks(["audio","video"]),this.currentSource_=null;if(this.cleanupAutoTextTracks(),this.sourceHandler_){if(this.sourceHandler_.dispose)this.sourceHandler_.dispose();this.sourceHandler_=null}}};he.registerComponent("Tech",ht);ht.registerTech("Tech",ht);ht.defaultTechOrder_=[];var wr={},H9={},D9={};function OT(e,t){wr[e]=wr[e]||[],wr[e].push(t)}function BT(e,t,a){e.setTimeout(()=>ur(t,wr[t.type],a,e),1)}function TT(e,t){e.forEach((a)=>a.setTech&&a.setTech(t))}function MT(e,t,a){return e.reduceRight(N4(a),t[a]())}function HT(e,t,a,n){return t[a](e.reduce(N4(a),n))}function ed(e,t,a,n=null){let s="call"+Ra(a),i=e.reduce(N4(s),n),l=i===D9,f=l?null:t[a](i);return RT(e,a,f,l),f}var DT={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},xT={setCurrentTime:1,setMuted:1,setVolume:1},td={play:1,pause:1};function N4(e){return(t,a)=>{if(t===D9)return D9;if(a[e])return a[e](t);return t}}function RT(e,t,a,n){for(let s=e.length-1;s>=0;s--){let i=e[s];if(i[t])i[t](n,a)}}function NT(e){if(H9.hasOwnProperty(e.id()))delete H9[e.id()]}function ET(e,t){let a=H9[e.id()],n=null;if(a===void 0||a===null)return n=t(e),H9[e.id()]=[[t,n]],n;for(let s=0;s<a.length;s++){let[i,l]=a[s];if(i!==t)continue;n=l}if(n===null)n=t(e),a.push([t,n]);return n}function ur(e={},t=[],a,n,s=[],i=!1){let[l,...f]=t;if(typeof l==="string")ur(e,wr[l],a,n,s,i);else if(l){let c=ET(n,l);if(!c.setSource)return s.push(c),ur(e,f,a,n,s,i);c.setSource(Object.assign({},e),function(h,u){if(h)return ur(e,f,a,n,s,i);s.push(c),ur(u,e.type===u.type?f:wr[u.type],a,n,s,i)})}else if(f.length)ur(e,f,a,n,s,i);else if(i)a(e,s);else ur(e,wr["*"],a,n,s,!0)}var zT={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"},x9=function(e=""){let t=D4(e);return zT[t.toLowerCase()]||""},IT=(e,t)=>{if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;let a=e.cache_.sources.filter((s)=>s.src===t);if(a.length)return a[0].type;let n=e.$$("source");for(let s=0;s<n.length;s++){let i=n[s];if(i.type&&i.src&&i.src===t)return i.type}return x9(t)},qj=function(e){if(Array.isArray(e)){let t=[];e.forEach(function(a){if(a=qj(a),Array.isArray(a))t=t.concat(a);else if(t0(a))t.push(a)}),e=t}else if(typeof e==="string"&&e.trim())e=[ad({src:e})];else if(t0(e)&&typeof e.src==="string"&&e.src&&e.src.trim())e=[ad(e)];else e=[];return e};function ad(e){if(!e.type){let t=x9(e.src);if(t)e.type=t}return e}var UT=`<svg xmlns="http://www.w3.org/2000/svg">
|