@vouchfor/embeds 6.4.4 → 6.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es/embeds.js CHANGED
@@ -195,7 +195,7 @@ class FetcherController {
195
195
  return this._fetching;
196
196
  }
197
197
  }
198
- const version = "6.4.4";
198
+ const version = "6.4.6";
199
199
  const packageJson = {
200
200
  version
201
201
  };
@@ -2473,7 +2473,7 @@ vec4 transition(vec2 uv) {
2473
2473
  return mix(a, b, step(0.0+p.y,progress));
2474
2474
  }
2475
2475
  `,author:"Jake Nelson",license:"MIT",createdAt:"Wed, 1 Nov 2017 15:24:36 -0500",updatedAt:"Thu, 2 Nov 2017 18:37:42 -0500"}];const vh=Pa(fv);var yh;function gv(i){if(typeof i=="string"){const[e,t]=i.split(":");return Math.min(parseFloat(e),parseFloat(t))}return i}function pv(i){if(typeof i=="string"){const[e,t]=i.split(":"),r=parseFloat(e),n=parseFloat(t);return r/n}return i}function fl({resolution:i,aspectRatio:e}){const t=gv(i),r=pv(e),n=r>=1,s=Math.min(n?t*r:t/r,t),o=Math.max(n?t*r:t/r,t);return{resolution:t,aspectRatio:r,height:Math.round(n?s:o),width:Math.round(n?o:s)}}const Ch={linear:Qm,easeIn:Ma,easeInOut:wm,easeOut:_m,circIn:pu,circInOut:Rm,circOut:mu,backIn:Fa,backInOut:Lm,backOut:Dm,anticipate:km,bounceIn:Nm,bounceInOut:Om,bounceOut:Fs};Rs((i,e,{clamp:t=!0,ease:r="easeIn",...n}={})=>Cm(i,e,{...n,clamp:t,ease:Ch[r]}),{cacheKey:([i,e,t])=>JSON.stringify({from:i,to:e,options:t})});function mv({animation:i,sceneTime:e}){const t=i.keyframes;if(!t||t.length===0)return null;const r=[...t].sort((s,o)=>s.time-o.time);if(e<r[0].time)return null;const n=r[r.length-1];if(e>=n.time)return i.renderer.processor.getTargetState(n.value);for(let s=0;s<r.length-1;s++){const o=r[s],a=r[s+1];if(e>=o.time&&e<=a.time){const l=a.time-o.time,c=l===0?0:(e-o.time)/l,u=o.easing||"linear",A=i.renderer.processor.getTargetState(o.value);return i.renderer.processor.interpolateState({easing:u,progress:c,from:A,value:a.value})}}return null}function Ev({layout:i,sceneTime:e,animations:t}){var r,n,s,o,a,l,c,u,A,h,d;let f={clip:null,opacity:((r=i==null?void 0:i.transform)==null?void 0:r.opacity)??1,translation:{x:((s=(n=i==null?void 0:i.transform)==null?void 0:n.translate)==null?void 0:s.x)??0,y:((a=(o=i==null?void 0:i.transform)==null?void 0:o.translate)==null?void 0:a.y)??0},scale:((l=i==null?void 0:i.transform)==null?void 0:l.scale)??1,rotation:((c=i==null?void 0:i.transform)==null?void 0:c.rotation)??0,dimensions:{widthRatio:((A=(u=i==null?void 0:i.transform)==null?void 0:u.dimension)==null?void 0:A.widthRatio)??1,heightRatio:((d=(h=i==null?void 0:i.transform)==null?void 0:h.dimension)==null?void 0:d.heightRatio)??1}};if(!t)return f;for(const g of Object.values(t)){const p=mv({animation:g,sceneTime:e});p&&(f={...f,...p})}return f}let ro;const Iv=new Uint8Array(16);function vv(){if(!ro&&(ro=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ro))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ro(Iv)}const wt=[];for(let i=0;i<256;++i)wt.push((i+256).toString(16).slice(1));function yv(i,e=0){return wt[i[e+0]]+wt[i[e+1]]+wt[i[e+2]]+wt[i[e+3]]+"-"+wt[i[e+4]]+wt[i[e+5]]+"-"+wt[i[e+6]]+wt[i[e+7]]+"-"+wt[i[e+8]]+wt[i[e+9]]+"-"+wt[i[e+10]]+wt[i[e+11]]+wt[i[e+12]]+wt[i[e+13]]+wt[i[e+14]]+wt[i[e+15]]}const Bh={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Cv(i,e,t){if(Bh.randomUUID&&!i)return Bh.randomUUID();i=i||{};const r=i.random||(i.rng||vv)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,yv(r)}function Bv(i=.4,e=.4){const t=Math.max(.1,Math.min(.8,i)),r=Math.max(.2,Math.min(.6,e)),s=(1-t)/2,a=1-r;return[{x:0,y:s},{x:a,y:s},{x:a,y:0},{x:1,y:.5},{x:a,y:1},{x:a,y:1-s},{x:0,y:1-s}]}const no=64;function Tv(){const i=[],e={x:.5,y:.5},t=.5;for(let r=0;r<no;r++){const n=r/no*2*Math.PI,s=e.x+t*Math.cos(n),o=e.y+t*Math.sin(n);i.push({x:s,y:o})}return i}function bv(i=1){const e=[],t={x:.5,y:.5};let r,n;i>=1?(r=.5,n=.5/i):(r=.5*i,n=.5);for(let s=0;s<no;s++){const o=s/no*2*Math.PI,a=t.x+r*Math.cos(o),l=t.y+n*Math.sin(o);e.push({x:a,y:l})}return e}function Sv(){const i=[];for(let t=0;t<=100;t++){const r=t/100*2*Math.PI,n=16*Math.sin(r)**3,s=-(13*Math.cos(r)-5*Math.cos(2*r)-2*Math.cos(3*r)-Math.cos(4*r)),o=(n+16)/32,a=(s+13)/26;i.push({x:o,y:a})}return i}function Th(i=0,e=1){if(i===0)return[{x:0,y:0},{x:1,y:0},{x:1,y:1},{x:0,y:1}];const t=i*Math.PI/180,r=Math.tan(t)/e;return[{x:Math.max(0,Math.min(1,0+r)),y:0},{x:Math.max(0,Math.min(1,1+r)),y:0},{x:Math.max(0,Math.min(1,1-r)),y:1},{x:Math.max(0,Math.min(1,0-r)),y:1}]}function so(i){if(i<3)throw new Error("A polygon must have at least 3 sides");const e=[],t=[];for(let c=0;c<i;c++){const u=c*2*Math.PI/i-Math.PI/2,A=Math.cos(u),h=Math.sin(u);t.push({x:A,y:h})}const r=Math.min(...t.map(c=>c.x)),n=Math.max(...t.map(c=>c.x)),s=Math.min(...t.map(c=>c.y)),o=Math.max(...t.map(c=>c.y)),a=n-r,l=o-s;for(const c of t){const u=(c.x-r)/a,A=(c.y-s)/l;e.push({x:u,y:A})}return e}function bh(i=90){const e=i*Math.PI/180,r=.5/Math.tan(e),s=1/(1+Math.abs(r)*2),o=r*s;return[{x:.5+o,y:0},{x:1,y:.5},{x:.5-o,y:1},{x:0,y:.5}]}function xv(i=5,e=.4){const t=[];for(let n=0;n<i*2;n++){const s=n*Math.PI/i-Math.PI/2,o=n%2===0?.5:e,a=.5+o*Math.cos(s),l=.5+o*Math.sin(s);t.push({x:a,y:l})}return t}function Qv(i="isosceles",e={}){switch(i){case"equilateral":return _v();case"isosceles":return Sh(e.baseAngle??60);case"right":return wv(e.rightAnglePosition??"bottom-left");case"scalene":return Rv(e.angles??[60,60,60])}}function _v(){return[{x:.5,y:0},{x:0,y:1},{x:1,y:1}]}function Sh(i){const e=i*Math.PI/180,t=.5/Math.tan(e),r=Math.max(.1,Math.min(2,t));return[{x:.5,y:1-Math.min(1,r)},{x:0,y:1},{x:1,y:1}]}function wv(i){switch(i){case"top":return[{x:.5,y:0},{x:0,y:1},{x:1,y:1}];case"bottom-left":return[{x:.5,y:0},{x:0,y:1},{x:1,y:1}];case"bottom-right":return[{x:.5,y:0},{x:0,y:1},{x:1,y:1}]}}function Rv(i){return Sh(i[0])}function Dv(i={},e=1){const{type:t="rectangle",customPolygon:r,parallelogram:n,triangle:s,rhombus:o,arrow:a,star:l,regularPolygon:c}=i;switch(t){case"rectangle":return Th(0,e);case"parallelogram":return Th((n==null?void 0:n.angle)??30,e);case"triangle":return Qv((s==null?void 0:s.type)??"isosceles",{baseAngle:s==null?void 0:s.baseAngle,angles:s==null?void 0:s.angles,rightAnglePosition:s==null?void 0:s.rightAnglePosition});case"rhombus":return bh((o==null?void 0:o.angle)??90);case"diamond":return bh(90);case"pentagon":return so(5);case"hexagon":return so(6);case"octagon":return so(8);case"star":return xv((l==null?void 0:l.points)??5,(l==null?void 0:l.innerRadius)??.4);case"arrow":return Bv((a==null?void 0:a.shaftRatio)??.4,(a==null?void 0:a.headRatio)??.4);case"heart":return Sv();case"circle":return Tv();case"ellipse":return bv(e);case"custom-polygon":if(!(r!=null&&r.points)||r.points.length<3)throw new Error("Custom polygon must have at least 3 points");return r.points;default:return so((c==null?void 0:c.sides)??6)}}function Lv(i,e){let t=!1;const r=i.x,n=i.y;for(let s=0,o=e.length-1;s<e.length;o=s++){const a=e[s].x,l=e[s].y,c=e[o].x,u=e[o].y;l>n!=u>n&&r<(c-a)*(n-l)/(u-l)+a&&(t=!t)}return t}function kv(i,e){let t=1,r=0;const n=200;for(let s=0;s<=n;s++){const o=s/n;Lv({x:o,y:i},e)&&(t=Math.min(t,o),r=Math.max(r,o))}return r>=t?{left:t,right:r}:null}function Mv(i){const e=Math.min(...i.map(l=>l.y)),t=Math.max(...i.map(l=>l.y));let r={x:0,y:0,width:0,height:0},n=0;const s=200,o=(t-e)/s,a=[];for(let l=0;l<=s;l++){const c=e+l*o;a.push({y:c,span:kv(c,i)})}for(let l=0;l<a.length-1;l++){const c=a[l].y;for(let u=l+1;u<a.length;u++){const h=a[u].y-c;let d=0,f=1,g=!0;const p=Math.min(5,u-l+1);for(let v=0;v<p;v++){const B=l+Math.floor(v/(p-1)*(u-l)),C=a[B].span;if(C){if(d=Math.max(d,C.left),f=Math.min(f,C.right),d>=f){g=!1;break}}else{g=!1;break}}if(g&&f>d){const v=f-d,B=v*h;B>n&&(n=B,r={x:d,y:c,width:v,height:h})}}}return r}function Fv(i,e=1){const t=Dv(i,e);if(t.length<3)return{top:0,right:0,bottom:0,left:0};if(i.type==="rectangle")return{top:0,right:0,bottom:0,left:0};const r=Mv(t),n=r.y,s=r.x,o=1-(r.x+r.width),a=1-(r.y+r.height);return{top:Math.max(0,n),right:Math.max(0,o),bottom:Math.max(0,a),left:Math.max(0,s)}}function Pv(i){return typeof i=="number"?{topLeft:i,topRight:i,bottomRight:i,bottomLeft:i}:{topLeft:(i==null?void 0:i.topLeft)??0,topRight:(i==null?void 0:i.topRight)??0,bottomRight:(i==null?void 0:i.bottomRight)??0,bottomLeft:(i==null?void 0:i.bottomLeft)??0}}function Nv(i,e){return typeof i=="number"?{top:i*e,right:i*e,bottom:i*e,left:i*e}:typeof i=="string"?{top:i,right:i,bottom:i,left:i}:{top:typeof i.top=="number"?i.top*e:i.top,right:typeof i.right=="number"?i.right*e:i.right,bottom:typeof i.bottom=="number"?i.bottom*e:i.bottom,left:typeof i.left=="number"?i.left*e:i.left}}function Ov(i,e){return typeof i=="number"?{top:i*e,right:i*e,bottom:i*e,left:i*e}:typeof i=="string"?{top:i,right:i,bottom:i,left:i}:{top:(typeof i.top=="number"?i.top*e:i.top)??0,right:(typeof i.right=="number"?i.right*e:i.right)??0,bottom:(typeof i.bottom=="number"?i.bottom*e:i.bottom)??0,left:(typeof i.left=="number"?i.left*e:i.left)??0}}function Uv(i,e){return typeof i=="number"?{top:i*e,right:i*e,bottom:i*e,left:i*e}:typeof i=="string"?{top:i,right:i,bottom:i,left:i}:{top:(typeof i.top=="number"?i.top*e:i.top)??0,right:(typeof i.right=="number"?i.right*e:i.right)??0,bottom:(typeof i.bottom=="number"?i.bottom*e:i.bottom)??0,left:(typeof i.left=="number"?i.left*e:i.left)??0}}const Gv=Er(()=>Eu.loadYoga());function xh(i,e,{layout:t,scale:r=1}){const{position:n="relative",inset:s,width:o,height:a,minWidth:l,minHeight:c,maxWidth:u,maxHeight:A,flex:h,flexGrow:d,flexShrink:f,gap:g,margin:p,padding:v,direction:B="column",align:C="start",alignSelf:y,justify:x="start"}=t??{},w={static:i.POSITION_TYPE_STATIC,relative:i.POSITION_TYPE_RELATIVE,absolute:i.POSITION_TYPE_ABSOLUTE};if(e.setPositionType(w[n]),typeof s<"u"){const{top:M,right:j,bottom:X,left:le}=Nv(s,r);typeof M<"u"&&e.setPosition(i.EDGE_TOP,M),typeof j<"u"&&e.setPosition(i.EDGE_RIGHT,j),typeof X<"u"&&e.setPosition(i.EDGE_BOTTOM,X),typeof le<"u"&&e.setPosition(i.EDGE_LEFT,le)}const D={row:i.FLEX_DIRECTION_ROW,column:i.FLEX_DIRECTION_COLUMN,"row-reverse":i.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":i.FLEX_DIRECTION_COLUMN_REVERSE};e.setFlexDirection(D[B]);const F={start:i.ALIGN_FLEX_START,end:i.ALIGN_FLEX_END,center:i.ALIGN_CENTER,stretch:i.ALIGN_STRETCH};e.setAlignItems(F[C]),y&&e.setAlignSelf(F[y]);const O={start:i.JUSTIFY_FLEX_START,end:i.JUSTIFY_FLEX_END,center:i.JUSTIFY_CENTER,"space-between":i.JUSTIFY_SPACE_BETWEEN,"space-around":i.JUSTIFY_SPACE_AROUND,"space-evenly":i.JUSTIFY_SPACE_EVENLY};if(e.setJustifyContent(O[x]),typeof p<"u"){const{top:M,right:j,bottom:X,left:le}=Ov(p,r);e.setMargin(i.EDGE_TOP,M),e.setMargin(i.EDGE_RIGHT,j),e.setMargin(i.EDGE_BOTTOM,X),e.setMargin(i.EDGE_LEFT,le)}if(typeof v<"u"){const{top:M,right:j,bottom:X,left:le}=Uv(v,r);e.setPadding(i.EDGE_TOP,M),e.setPadding(i.EDGE_RIGHT,j),e.setPadding(i.EDGE_BOTTOM,X),e.setPadding(i.EDGE_LEFT,le)}typeof d<"u"||typeof f<"u"?(typeof d<"u"&&e.setFlexGrow(d),typeof f<"u"&&e.setFlexShrink(f)):typeof h<"u"&&e.setFlex(h),e.setGap(i.GUTTER_ALL,(g??0)*r),typeof o<"u"&&e.setWidth(typeof o=="number"?o*r:o),typeof a<"u"&&e.setHeight(typeof a=="number"?a*r:a),typeof l<"u"&&e.setMinWidth(typeof l=="number"?l*r:l),typeof c<"u"&&e.setMinHeight(typeof c=="number"?c*r:c),typeof u<"u"&&e.setMaxWidth(typeof u=="number"?u*r:u),typeof A<"u"&&e.setMaxHeight(typeof A=="number"?A*r:A)}async function Qh({id:i,yoga:e,index:t,parent:r,element:n,resolvers:s}){var o,a,l;const{layout:c={},config:u={},options:A={},renderer:h}=n,d=e.Node.create();xh(e,d,{layout:c}),r.insertChild(d,t);let f=null;s&&((h==null?void 0:h.type)==="text"||(h==null?void 0:h.type)==="caption"||(h==null?void 0:h.type)==="image"||(h==null?void 0:h.type)==="video")&&((h==null?void 0:h.type)==="caption"?f=await((o=s.text)==null?void 0:o.call(s,{id:i,config:u,options:A}))??null:f=await((a=s[h.type])==null?void 0:a.call(s,{id:i,config:u,options:A}))??null);const g=[];for await(const[p,v]of((l=n.children)==null?void 0:l.entries())??[])g.push(await Qh({id:i,yoga:e,index:p,parent:d,element:v,resolvers:s}));return{node:d,radius:Pv(c.radius),element:n,renderer:h,config:u,options:A,dependencies:f,childNodes:g}}function _h(i,e,t=0,r=0){const{top:n,left:s}=i.getComputedLayout(),{top:o,left:a,width:l,height:c}=e.node.getComputedLayout(),u=t+a,A=r+o,h=e.childNodes.map(d=>_h(i,d,u,A));return{...e,x:s+u,y:n+A,width:l,height:c,childNodes:h}}async function gl({yoga:i,root:e,tree:t,measureCanvas:r}){for await(const{node:n,options:s,dependencies:o,renderer:a,childNodes:l}of t){if(a){const{width:c,height:u}=a;if(c&&r){e.calculateLayout();const A=await c({node:n,options:s,dependencies:o,measureCanvas:r});A&&n.setWidth(A)}if(u&&r){e.calculateLayout();const A=await u({node:n,options:s,dependencies:o,measureCanvas:r});A&&n.setHeight(A)}if(await gl({yoga:i,root:e,tree:l,measureCanvas:r}),s!=null&&s.shape){const A=n.getComputedWidth(),h=n.getComputedHeight(),d=Fv(s.shape,A/h);n.setPadding(i.EDGE_TOP,d.top*h),n.setPadding(i.EDGE_RIGHT,d.right*A),n.setPadding(i.EDGE_BOTTOM,d.bottom*h),n.setPadding(i.EDGE_LEFT,d.left*A)}}e.calculateLayout(),await gl({yoga:i,root:e,tree:l,measureCanvas:r})}}async function wh({id:i,root:e,resolvers:t,measureCanvas:r}){const n=await Gv(),s=n.Node.create();xh(n,s,{layout:e.layout});const o=await Qh({id:i,yoga:n,index:0,parent:s,element:e.element,resolvers:t});await gl({yoga:n,root:s,tree:[o],measureCanvas:r});const{top:a,left:l,width:c,height:u}=s.getComputedLayout(),A={root:{x:l,y:a,width:c,height:u},node:_h(s,o)};return s.freeRecursive(),A}const $v={type:"audio"},On=/(?<value>\d+\.?\d*)(?=px)/;function pl({words:i,spaceMetrics:e,strokeWidth:t=0}){return i.reduce((r,n,s)=>{const o=n.metrics.width+t,a=s<i.length-1?e.width:0;return r+o+a},0)}Rs(({context:i,font:e,fontSizes:t,words:r,maxW:n=1/0,strokeWidth:s=0,letterSpacing:o=0})=>{try{i.save(),i.letterSpacing=`${o}px`,i.font=e.replace(On,t[0].toString());const a=i.measureText("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");if(r.length<=0)return[];const l=i.measureText(r[0].text);return r.slice(1).reduce((c,u)=>{const A=c[c.length-1],h=i.measureText(u.text),d={...u,metrics:h},f=[...A.words,d],g=pl({strokeWidth:s,words:f,spaceMetrics:A.spaceMetrics});if(g>n){const p=t[c.length%t.length];i.font=e.replace(On,p.toString());const v=i.measureText(" "),B=i.measureText(u.text),C=[{...u,metrics:B}],y=i.measureText("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");c=[...c,{allMetrics:y,spaceMetrics:v,lineWidth:pl({strokeWidth:s,spaceMetrics:v,words:C}),font:i.font,words:C,lineHeight:y.actualBoundingBoxAscent+y.actualBoundingBoxDescent+s}]}else c[c.length-1]={...A,lineWidth:g,words:f};return c},[{allMetrics:a,lineWidth:pl({strokeWidth:s,words:[{...r[0],metrics:l}],spaceMetrics:i.measureText(" ")}),lineHeight:a.actualBoundingBoxAscent+a.actualBoundingBoxDescent+s,font:i.font,words:[{...r[0],metrics:l}],spaceMetrics:i.measureText(" ")}])}finally{i.restore()}},{cacheKey:([{font:i,fontSizes:e,words:t,maxW:r,strokeWidth:n,letterSpacing:s}])=>`${i}_${JSON.stringify(e)}_${JSON.stringify(t)}_${r}_${n}_${s}`});function Hv(i){return i.slice(0,1).toUpperCase()+i.slice(1)}const Rh=[{family:"Noto Arabic",regex:new RegExp("\\p{Script=Arabic}","u"),url:"https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/NotoSansArabic-VariableFont_wdth%2Cwght.woff2",style:"normal"},{family:"Noto Chinese",regex:new RegExp("\\p{Script=Han}","u"),url:"https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/NotoSansSC-VariableFont_wght.woff2",style:"normal"},{family:"Noto Hebrew",regex:new RegExp("\\p{Script=Hebrew}","u"),url:"https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/NotoSansHebrew-VariableFont_wdth%2Cwght.woff2",style:"normal"},{family:"Noto Hindi",regex:new RegExp("\\p{Script=Devanagari}","u"),url:"https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/NotoSansDevanagari-VariableFont_wdth%2Cwght.woff2",style:"normal"},{family:"Noto Japanese",regex:new RegExp("\\p{Script=Han}|\\p{Script=Katakana}|\\p{Script=Hiragana}","u"),url:"https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/NotoSansJP-VariableFont_wght.woff2",style:"normal"},{family:"Noto Korean",regex:new RegExp("\\p{Script=Hangul}","u"),url:"https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/NotoSansKR-VariableFont_wght.woff2",style:"normal"},{family:"Noto Color Emoji",regex:new RegExp("\\p{Extended_Pictographic}","u"),url:"https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/NotoColorEmoji-Regular.woff2",style:"normal"}];function Yv({text:i,font:e}){let t=e;return Rh.forEach(({family:r,regex:n})=>{n.exec(i)&&(t+=`, ${r}`)}),t}const Vv="caption";Object.keys(Ch).map(i=>({label:Hv(i),value:i,data:i}));const Kv={type:Vv},Wv={type:"image"};function Dh({context:i,word:e,maxW:t=1/0}){const r=[],n=i.measureText(e);if(Math.floor(n.width)<=t)return[{text:e,metrics:n}];for(let s=0;s<e.length;s++){const o=r[r.length-1],a=((o==null?void 0:o.text)??"")+e[s],l=i.measureText(a);l.width<t?r[o?r.length-1:0]={text:a,metrics:l}:r.push({text:e[s],metrics:i.measureText(e[s])})}return r}const qv=Rs(({font:i,context:e,fontSizes:t,text:r,maxW:n=1/0,letterSpacing:s=0})=>{try{return e.save(),e.letterSpacing=`${s}px`,e.font=i.replace(On,t[0].toString()),r.split(`
2476
- `).flatMap(a=>{const l=a.split(" ").filter(Boolean);return l.length?l.slice(1).reduce((c,u,A)=>{const d=`${c[c.length-1].text} ${u}`.trim(),f=e.measureText(d);if(f.width>n)c=[...c,...Dh({context:e,word:u,maxW:n})];else{const g=t[A%t.length];e.font=i.replace(On,g.toString()),c[c.length-1]={text:d,metrics:f}}return c},Dh({context:e,word:l[0],maxW:n})):{text:"",metrics:e.measureText("")}})}finally{e.restore()}},{cacheKey:([{font:i,fontSizes:e,text:t,maxW:r,letterSpacing:n}])=>`${i}_${JSON.stringify(e)}_${t}_${r}_${n}`});Rs(({font:i,text:e,scale:t,context:r,maxW:n,maxH:s,minSize:o,maxSize:a,letterSpacing:l=0})=>{var c,u;let A=0;if(a){A=(o??0)*t;let d=0;for(;a*t>A+1;){A+=1;const f=qv({font:i,context:r,fontSizes:[A],text:e,maxW:n,letterSpacing:l});if(d=f.reduce((g,p)=>(p.metrics.width>g&&(g=p.metrics.width),g),0),d>n||f.length*A>s){A-=1;break}}}else A=parseFloat(((u=(c=i.match(On))==null?void 0:c.groups)==null?void 0:u.value)??"0")*t;return A},{cacheKey:([{font:i,text:e,scale:t,maxW:r,maxH:n,minSize:s,maxSize:o,letterSpacing:a}])=>`${i}_${e}_${s}_${o}_${t}_${r}_${n}_${a}`});const Jv={type:"text"},jv={type:"video"};function Lh(){return document.createElement("canvas")}function Xv(i,e){return Object.keys(i).reduce((t,r)=>(e.includes(r)||(t[r]=i[r]),t),{})}function Jt(i){let e=0;for(const t of i)Array.isArray(t)?e+=Jt(t):e+=t;return e}function oo(i){return i.map(({type:e,duration:t},r)=>{var n,s,o,a;if(e==="transition"){const l=((n=i[r-2])==null?void 0:n.type)==="transition"?i[r-2]:null,c=((s=i[r-1])==null?void 0:s.duration)??1/0,u=((o=i[r+1])==null?void 0:o.duration)??1/0,A=((a=i[r+2])==null?void 0:a.type)==="transition"?i[r+2]:null;return Math.min(l?c/2:c,t,A?u/2:u)*-1}return t})}function kh(i){var e;return{...i,children:((e=i.children)==null?void 0:e.map(t=>{if(!t.renderer)return kh(t)}).filter(Boolean))??[]}}function Mh(i){const e={box:0,shape:0,image:0,video:0,text:0,audio:0,gradient:0,caption:0};i.renderer&&(e[i.renderer.type]+=1);for(const t of i.children??[]){const{box:r,shape:n,image:s,video:o,text:a,audio:l,gradient:c,caption:u}=Mh(t);e.box+=r,e.shape+=n,e.image+=s,e.video+=o,e.text+=a,e.audio+=l,e.gradient+=c,e.caption+=u}return e}function zv(i){return i.video>0?jv.type:i.image>0?Wv.type:i.audio>0?$v.type:i.caption>0?Kv.type:Jv.type}function Fh({node:i,duration:e,parentAnimations:t}){const r=[],n={...t,...i.element.animations};if(i.renderer){const s=kh({...i.element,layout:{...i.element.layout?Xv(i.element.layout,["maxWidth","maxHeight"]):{},width:"100%",height:"100%",margin:0}}),o=Mh(s);r.push({type:zv(o),id:Cv(),x:i.x,y:i.y,width:i.width,height:i.height,duration:e,root:{element:s}})}for(const s of i.childNodes)r.push(...Fh({node:s,duration:e,parentAnimations:n}));return r}function Zv(i){if(i===null||typeof i!="object")return!1;if(Object.getPrototypeOf(i)===null)return!0;let e=i;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(i)===e}function ey(i){return i.replace(/\\/g,"\\\\").replace(/\//g,"\\/").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\f/g,"\\f").replace(/"/g,'\\"')}Um.filters.define("parse",i=>typeof i>"u"?null:typeof i=="string"?`"${ey(i)}"`:Zv(i)||Array.isArray(i)?JSON.stringify(i):i);const ty="3";async function iy({scene:i,start:e=0}){const{id:t,root:r,duration:n}=i,s=await wh({id:t,root:r});return{type:i.type,start:e,duration:n,layout:s,id:i.id,config:i}}async function ry({track:i}){const e=oo(i),t=await Promise.all(i.reduce((s,o,a)=>{if(o.type!=="audio")return s;const l=Jt(e.slice(0,a));return s.push(iy({scene:o,start:l})),s},[])),r=i.reduce((s,o,a)=>{if(o.type!=="gap")return s;const l=Jt(e.slice(0,a));return s.push({type:o.type,id:o.id,start:l,config:o,duration:o.duration}),s},[]),n=i.map(({id:s})=>t.find(({id:o})=>o===s)??r.find(({id:o})=>o===s)).filter(Boolean);return{type:"audio",scenes:t,gapScenes:r,mergedScenes:n,config:i,duration:Math.max(...n.map(({start:s,duration:o})=>s+o))}}async function Ph({node:i,canvases:e,sceneTime:t,parentOpacity:r=1,parentTransform:n,debug:s=!1}){var o,a;const l=e.sceneCanvas.getContext("2d");if(l){l.save(),l.setTransform(n);const c=Ev({layout:i.element.layout,sceneTime:t,animations:i.element.animations}),{opacity:u,translation:A,scale:h,clip:d,dimensions:f,rotation:g}=c,p=i.width*f.widthRatio,v=i.height*f.heightRatio;if(l.globalAlpha=u*r,(A.x||A.y)&&l.translate(A.x,A.y),(h!==1||g!==0)&&(l.translate(i.x+p/2,i.y+v/2),l.scale(h,h),l.rotate(g*Math.PI/180),l.translate(-(i.x+p/2),-(i.y+v/2))),d){l.beginPath();const B={x:i.x+d.x*p,y:i.y+d.y*v,width:d.width*p,height:d.height*v};l.rect(B.x,B.y,B.width,B.height),l.clip()}if(s){const B=l.globalAlpha;l.globalAlpha=1,l.strokeStyle="red",l.strokeRect(i.x,i.y,p,v),l.globalAlpha=B}await((a=(o=i.renderer)==null?void 0:o.render)==null?void 0:a.call(o,{canvases:e,sceneTime:t,dx:i.x,dy:i.y,dw:p,dh:v,radius:i.radius,options:i.options,dependencies:i.dependencies}));for await(const B of i.childNodes)await Ph({debug:s,node:B,canvases:e,sceneTime:t,parentOpacity:l.globalAlpha,parentTransform:l.getTransform()});l.restore()}}async function ny({layout:i,canvases:e,sceneTime:t,debug:r=!1}){const{node:n}=i;await Ph({debug:r,node:n,canvases:e,sceneTime:t})}async function ao({debug:i=!1,scene:e,start:t=0,resolvers:r,rootWidth:n,rootHeight:s,canvasFactory:o=Lh}){var a,l;const{id:c,x:u,y:A,width:h,height:d,root:f,duration:g}=e,p=o(),v=o(),B=o(),C=o(),y=o(),x=await wh({id:c,root:{...f,layout:{...f.layout,width:n,height:s},element:{...f.element,layout:{...f.element.layout,...typeof u=="number"&&typeof A=="number"?{position:"absolute",inset:{top:A,left:u}}:{},width:h??((a=f.element.layout)==null?void 0:a.width),height:d??((l=f.element.layout)==null?void 0:l.height)}}},resolvers:r,measureCanvas:y}),w=async D=>{const F=Math.max(0,D-t);p.width=p.height=0,p.width=n,p.height=s,await ny({debug:i,layout:x,sceneTime:F,canvases:{sceneCanvas:p,cropCanvas:v,letterboxCanvas:B,posterCanvas:C}})};return{id:c,type:e.type,start:t,duration:g,layout:x,sceneCanvas:p,draw:w,config:e,childScenes:x.node.childNodes.flatMap(D=>Fh({node:D,duration:g}))}}async function sy({debug:i=!1,track:e,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s}){const o=oo(e),a=await Promise.all(e.reduce((A,h,d)=>{const f=Jt(o.slice(0,d));return h.type==="caption"&&A.push(ao({debug:i,scene:h,start:f,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s})),A},[])),l=e.reduce((A,h,d)=>{if(h.type!=="gap")return A;const f=Jt(o.slice(0,d));return A.push({type:h.type,id:h.id,start:f,config:h,duration:h.duration}),A},[]),c=e.reduce((A,h,d)=>{if(h.type!=="transition")return A;const f=h.duration,g=Jt(o.slice(0,d))-f;return A.push({type:h.type,id:h.id,name:h.name,start:g,duration:f,config:h,transitionCanvas:s(),to:a.find(({id:p})=>{var v;return p===((v=e[d+1])==null?void 0:v.id)}),from:a.find(({id:p})=>{var v;return p===((v=e[d-1])==null?void 0:v.id)})}),A},[]),u=e.map(({id:A})=>a.find(({id:h})=>h===A)??l.find(({id:h})=>h===A)??c.find(({id:h})=>h===A)).filter(Boolean);return{type:"caption",scenes:a,gapScenes:l,transitions:c,mergedScenes:u,duration:Math.max(...u.map(({start:A,duration:h})=>A+h)),trackCanvas:s()}}async function oy({debug:i=!1,track:e,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s}){const o=oo(e),a=await Promise.all(e.reduce((A,h,d)=>{const f=Jt(o.slice(0,d));return h.type==="video"&&A.push(ao({debug:i,scene:h,start:f,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s})),h.type==="image"&&A.push(ao({debug:i,scene:h,start:f,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s})),A},[])),l=e.reduce((A,h,d)=>{if(h.type!=="gap")return A;const f=Jt(o.slice(0,d));return A.push({type:h.type,id:h.id,start:f,config:h,duration:h.duration}),A},[]),c=e.reduce((A,h,d)=>{if(h.type!=="transition")return A;const f=h.duration,g=Jt(o.slice(0,d))-f;return A.push({type:h.type,id:h.id,name:h.name,start:g,duration:f,config:h,transitionCanvas:s(),to:a.find(({id:p})=>{var v;return p===((v=e[d+1])==null?void 0:v.id)}),from:a.find(({id:p})=>{var v;return p===((v=e[d-1])==null?void 0:v.id)})}),A},[]),u=e.map(({id:A})=>a.find(({id:h})=>h===A)??l.find(({id:h})=>h===A)??c.find(({id:h})=>h===A)).filter(Boolean);return{type:"picture",scenes:a,gapScenes:l,transitions:c,mergedScenes:u,duration:Math.max(0,...u.map(({start:A,duration:h})=>A+h)),trackCanvas:s()}}async function ay({debug:i=!1,track:e,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s}){const o=oo(e),a=await Promise.all(e.reduce((A,h,d)=>{const f=Jt(o.slice(0,d));return h.type==="text"&&A.push(ao({debug:i,scene:h,start:f,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s})),A},[])),l=e.reduce((A,h,d)=>{if(h.type!=="gap")return A;const f=Jt(o.slice(0,d));return A.push({type:h.type,id:h.id,start:f,config:h,duration:h.duration}),A},[]),c=e.reduce((A,h,d)=>{if(h.type!=="transition")return A;const f=h.duration,g=Jt(o.slice(0,d))-f;return A.push({type:h.type,id:h.id,name:h.name,start:g,duration:f,config:h,transitionCanvas:s(),to:a.find(({id:p})=>{var v;return p===((v=e[d+1])==null?void 0:v.id)}),from:a.find(({id:p})=>{var v;return p===((v=e[d-1])==null?void 0:v.id)})}),A},[]),u=e.map(({id:A})=>a.find(({id:h})=>h===A)??l.find(({id:h})=>h===A)??c.find(({id:h})=>h===A)).filter(Boolean);return{type:"text",scenes:a,gapScenes:l,transitions:c,mergedScenes:u,duration:Math.max(...u.map(({start:A,duration:h})=>A+h)),trackCanvas:s()}}function ly(i){return i.some(({type:e})=>e==="text")}function cy(i){return i.some(({type:e})=>e==="caption")}function Ay(i){return i.some(({type:e})=>e==="audio")}function uy(i){return i.some(({type:e})=>e==="video"||e==="image")}function hy(i){return i.type==="audio"}const dy=(((yh=vh)==null?void 0:yh.default)??vh).reduce((i,e)=>(i[e.name]=e,i),{});function fy(i,e){return i.has(e)||i.set(e,{buffer:null,transitions:{},fromTexture:null,toTexture:null}),i.get(e)}function gy({name:i,to:e,from:t,progress:r,width:n,height:s,glContext:o,contextResources:a,returnPixels:l=!0}){var c,u,A;const h=fy(a,o);if(o.disable(o.DEPTH_TEST),h.buffer?o.bindBuffer(o.ARRAY_BUFFER,h.buffer):(h.buffer=o.createBuffer(),o.bindBuffer(o.ARRAY_BUFFER,h.buffer),o.bufferData(o.ARRAY_BUFFER,new Float32Array([-1,-1,-1,4,4,-1]),o.STATIC_DRAW)),o.viewport(0,0,n,s),h.fromTexture?h.fromTexture.setPixels(t):(h.fromTexture=(((c=Zs)==null?void 0:c.default)??Zs)(o,t),h.fromTexture.minFilter=o.LINEAR,h.fromTexture.magFilter=o.LINEAR),h.toTexture?h.toTexture.setPixels(e):(h.toTexture=(((u=Zs)==null?void 0:u.default)??Zs)(o,e),h.toTexture.minFilter=o.LINEAR,h.toTexture.magFilter=o.LINEAR),h.transitions[i]||(h.transitions[i]=(((A=Ih)==null?void 0:A.default)??Ih)(o,dy[i])),h.transitions[i].draw(r,h.fromTexture,h.toTexture,n,s),!l)return o.flush(),new Uint8Array(0);const f=new Uint8Array(n*s*4);return o.readPixels(0,0,n,s,o.RGBA,o.UNSIGNED_BYTE,f),o.flush(),f}function py(i){for(const[e,t]of i.entries())t.buffer&&e.deleteBuffer(t.buffer),t.fromTexture&&t.fromTexture.dispose(),t.toTexture&&t.toTexture.dispose(),Object.values(t.transitions).forEach(r=>{r.dispose()}),i.delete(e)}function my({name:i,to:e,from:t,progress:r,canvas:n,contextResources:s}){const o=n.getContext("webgl",{alpha:!0,depth:!1,antialias:!1,preserveDrawingBuffer:!1});o&&(o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!0),gy({name:i,to:e,from:t,progress:r,width:n.width,height:n.height,glContext:o,contextResources:s,returnPixels:!1}))}async function Nh({debug:i=!1,config:e,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s=Lh,drawTransition:o=my}){const a=new Map,l=await Promise.all(e.tracks.map(async A=>{if(uy(A))return{...await oy({debug:i,track:A,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s}),config:A};if(ly(A))return{...await ay({debug:i,track:A,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s}),config:A};if(cy(A))return{...await sy({debug:i,track:A,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s}),config:A};if(Ay(A))return{...await ry({track:A}),config:A};throw new Error("Unknown track type")}));return{draw:async({canvas:A,currentTime:h})=>{const d=A.getContext("2d");if(d){d.globalAlpha=1,d.globalCompositeOperation="source-over",d.clearRect(0,0,A.width,A.height),d.save(),d.fillStyle="black",d.fillRect(0,0,A.width,A.height),d.restore();for await(const f of l){if(hy(f))continue;const{scenes:g,transitions:p,trackCanvas:v}=f;v.width=v.height=0,v.width=A.width,v.height=A.height;const B=v.getContext("2d"),C=g.filter(({start:x,duration:w})=>h>=x&&h<x+w);if(!B||C.length<=0)continue;const y=p.find(({start:x,duration:w})=>h>=x&&h<x+w);for await(const{sceneCanvas:x,draw:w}of C)await(w==null?void 0:w(h)),(!y||y&&(!y.to||!y.from))&&B.drawImage(x,0,0,x.width,x.height);if(y&&y.to&&y.from&&y.duration>0){const{name:x,to:w,from:D,duration:F,transitionCanvas:O}=y;O.width=O.height=0,O.width=v.width,O.height=v.height;const M=Math.min(1,Math.max(0,(h-w.start)/F));await o({name:x,progress:M,contextResources:a,to:w.sceneCanvas,from:D.sceneCanvas,canvas:O}),B.globalCompositeOperation="lighter",B.drawImage(O,0,0,O.width,O.height)}d.drawImage(v,0,0,v.width,v.height)}}},cleanup:()=>{py(a)},tracks:l,aspectRatio:e.aspectRatio,transcriptions:e.transcriptions,duration:Math.max(...l.map(({duration:A})=>A))}}const Ey={version:"6.4.4"};function Iy(i){const{publicApiUrl:e}=ws(i),t=Ki();return navigator.sendBeacon(`${e}/api/visitor`,JSON.stringify({visitorId:t})),t}function vy(i){var s,o,a,l,c,u,A,h,d,f,g,p;if(typeof window>"u")return{client:null,tab:null,request:Ki()};let e=(o=(s=window.localStorage)==null?void 0:s.getItem)==null?void 0:o.call(s,"vouch-uid-visitor"),t=(l=(a=window.localStorage)==null?void 0:a.getItem)==null?void 0:l.call(a,"vouch-uid-client"),r=(u=(c=window.sessionStorage)==null?void 0:c.getItem)==null?void 0:u.call(c,"vouch-uid-tab");const n=Ki();return e||(e=Iy(i),(h=(A=window.localStorage)==null?void 0:A.setItem)==null||h.call(A,"vouch-uid-visitor",e)),t||(t=Ki(),(f=(d=window.localStorage)==null?void 0:d.setItem)==null||f.call(d,"vouch-uid-client",t)),r||(r=Ki(),(p=(g=window.sessionStorage)==null?void 0:g.setItem)==null||p.call(g,"vouch-uid-tab",r)),{client:t,tab:r,request:n,visitor:e}}function yy(i,e){return i&&"vouchId"in i?i.vouchId:(e==null?void 0:e.id)??null}function Cy(i="embedded_player"){var n,s;const[e,t]=((s=(n=Intl.DateTimeFormat().resolvedOptions().timeZone)==null?void 0:n.split)==null?void 0:s.call(n,"/"))??[],r={};return[...new URLSearchParams(location.search).entries()].forEach(([o,a])=>{if(/utm/.test(o)){const l=o.toLowerCase().replace(/[-_][a-z0-9]/g,c=>c.slice(-1).toUpperCase());r[l]=a}}),{source:i,time:new Date,region:t,country:e,screenHeight:window.screen.height,screenWidth:window.screen.width,referrer:document.referrer,currentUrl:location.href,embedType:"media-player-embed",embedVersion:Ey.version,templateVersion:ty,...r}}const Oh=1;class By{constructor(e){this._batchedEvents=[],this._hasPlayed=!1,this._hasLoaded={},this._answersViewed={},this._streamStartTime={},this._streamLatestTime={},this._currentlyPlayingVideo=null,this._createTrackingEvent=(t,r)=>{const n=yy(r,this.host.vouch);!n||this.host.disableTracking||this._batchedEvents.push({event:t,payload:{...r,senderId:this.host.senderId,vouchId:n,time:new Date().toISOString()}})},this._sendTrackingEvent=()=>{if(this._batchedEvents.length<=0)return;const{publicApiUrl:t}=ws(this.host.env),{client:r,tab:n,request:s,visitor:o}=vy(this.host.env);navigator.sendBeacon(`${t}/api/batchevents`,JSON.stringify({payload:{events:this._batchedEvents},context:{"x-uid-client":r,"x-uid-tab":n,"x-uid-request":s,"x-uid-visitor":o,"x-reporting-metadata":Cy(this.host.trackingSource)}})),this._batchedEvents=[]},this._streamEnded=()=>{if(this._currentlyPlayingVideo){const{id:t,key:r}=this._currentlyPlayingVideo;this._streamLatestTime[r]>this._streamStartTime[r]+Oh&&this._createTrackingEvent("VIDEO_STREAMED",{answerId:t,streamStart:this._streamStartTime[r],streamEnd:this._streamLatestTime[r]}),delete this._streamStartTime[r],delete this._streamLatestTime[r]}},this._handleVouchLoaded=({detail:t})=>{t&&(this._hasLoaded[t]||(this._createTrackingEvent("VOUCH_LOADED",{vouchId:t}),this._hasLoaded[t]=!0))},this._handlePlay=()=>{this._hasPlayed||(this._createTrackingEvent("VIDEO_PLAYED",{streamStart:this.host.currentTime}),this._hasPlayed=!0)},this._handleVideoPlay=({detail:{id:t,key:r}})=>{this._answersViewed[r]||(this._createTrackingEvent("VOUCH_RESPONSE_VIEWED",{answerId:t}),this._answersViewed[r]=!0)},this._handleVideoTimeUpdate=({detail:{id:t,key:r,node:n}})=>{this.host.paused||(this._currentlyPlayingVideo={id:t,key:r,node:n},this._streamLatestTime[r]=n.currentTime,this._streamStartTime[r]||(this._streamStartTime[r]=n.currentTime,this._streamLatestTime[r]=n.currentTime))},this._handleVideoPause=({detail:{id:t,key:r}})=>{this._streamLatestTime[r]>this._streamStartTime[r]+Oh&&this._createTrackingEvent("VIDEO_STREAMED",{answerId:t,streamStart:this._streamStartTime[r],streamEnd:this._streamLatestTime[r]}),delete this._streamStartTime[r],delete this._streamLatestTime[r]},this._pageUnloading=()=>{this._streamEnded(),this._sendTrackingEvent()},this._handleVisibilityChange=()=>{document.visibilityState==="hidden"&&this._pageUnloading()},this._handlePageHide=()=>{this._pageUnloading()},this.host=e,e.addController(this)}hostConnected(){requestAnimationFrame(()=>{var e,t,r,n;"onvisibilitychange"in document?document.addEventListener("visibilitychange",this._handleVisibilityChange):window.addEventListener("pagehide",this._handlePageHide),this.host.addEventListener("vouch:loaded",this._handleVouchLoaded),(e=this.host.mediaPlayer)==null||e.addEventListener("play",this._handlePlay),(t=this.host.mediaPlayer)==null||t.addEventListener("video:play",this._handleVideoPlay),(r=this.host.mediaPlayer)==null||r.addEventListener("video:pause",this._handleVideoPause),(n=this.host.mediaPlayer)==null||n.addEventListener("video:timeupdate",this._handleVideoTimeUpdate)})}hostDisconnected(){var e,t,r,n;this._pageUnloading(),"onvisibilitychange"in document?document.removeEventListener("visibilitychange",this._handleVisibilityChange):window.removeEventListener("pagehide",this._handlePageHide),this.host.removeEventListener("vouch:loaded",this._handleVouchLoaded),(e=this.host.mediaPlayer)==null||e.removeEventListener("play",this._handlePlay),(t=this.host.mediaPlayer)==null||t.removeEventListener("video:play",this._handleVideoPlay),(r=this.host.mediaPlayer)==null||r.removeEventListener("video:pause",this._handleVideoPause),(n=this.host.mediaPlayer)==null||n.removeEventListener("video:timeupdate",this._handleVideoTimeUpdate)}}var ml={exports:{}};(function(i,e){var t=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Ji<"u"&&Ji,r=function(){function s(){this.fetch=!1,this.DOMException=t.DOMException}return s.prototype=t,new s}();(function(s){(function(o){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof Ji<"u"&&Ji||{},l={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function c(L){return L&&DataView.prototype.isPrototypeOf(L)}if(l.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],A=ArrayBuffer.isView||function(L){return L&&u.indexOf(Object.prototype.toString.call(L))>-1};function h(L){if(typeof L!="string"&&(L=String(L)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(L)||L==="")throw new TypeError('Invalid character in header field name: "'+L+'"');return L.toLowerCase()}function d(L){return typeof L!="string"&&(L=String(L)),L}function f(L){var U={next:function(){var q=L.shift();return{done:q===void 0,value:q}}};return l.iterable&&(U[Symbol.iterator]=function(){return U}),U}function g(L){this.map={},L instanceof g?L.forEach(function(U,q){this.append(q,U)},this):Array.isArray(L)?L.forEach(function(U){if(U.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+U.length);this.append(U[0],U[1])},this):L&&Object.getOwnPropertyNames(L).forEach(function(U){this.append(U,L[U])},this)}g.prototype.append=function(L,U){L=h(L),U=d(U);var q=this.map[L];this.map[L]=q?q+", "+U:U},g.prototype.delete=function(L){delete this.map[h(L)]},g.prototype.get=function(L){return L=h(L),this.has(L)?this.map[L]:null},g.prototype.has=function(L){return this.map.hasOwnProperty(h(L))},g.prototype.set=function(L,U){this.map[h(L)]=d(U)},g.prototype.forEach=function(L,U){for(var q in this.map)this.map.hasOwnProperty(q)&&L.call(U,this.map[q],q,this)},g.prototype.keys=function(){var L=[];return this.forEach(function(U,q){L.push(q)}),f(L)},g.prototype.values=function(){var L=[];return this.forEach(function(U){L.push(U)}),f(L)},g.prototype.entries=function(){var L=[];return this.forEach(function(U,q){L.push([q,U])}),f(L)},l.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function p(L){if(!L._noBody){if(L.bodyUsed)return Promise.reject(new TypeError("Already read"));L.bodyUsed=!0}}function v(L){return new Promise(function(U,q){L.onload=function(){U(L.result)},L.onerror=function(){q(L.error)}})}function B(L){var U=new FileReader,q=v(U);return U.readAsArrayBuffer(L),q}function C(L){var U=new FileReader,q=v(U),R=/charset=([A-Za-z0-9_-]+)/.exec(L.type),_=R?R[1]:"utf-8";return U.readAsText(L,_),q}function y(L){for(var U=new Uint8Array(L),q=new Array(U.length),R=0;R<U.length;R++)q[R]=String.fromCharCode(U[R]);return q.join("")}function x(L){if(L.slice)return L.slice(0);var U=new Uint8Array(L.byteLength);return U.set(new Uint8Array(L)),U.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(L){this.bodyUsed=this.bodyUsed,this._bodyInit=L,L?typeof L=="string"?this._bodyText=L:l.blob&&Blob.prototype.isPrototypeOf(L)?this._bodyBlob=L:l.formData&&FormData.prototype.isPrototypeOf(L)?this._bodyFormData=L:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(L)?this._bodyText=L.toString():l.arrayBuffer&&l.blob&&c(L)?(this._bodyArrayBuffer=x(L.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(L)||A(L))?this._bodyArrayBuffer=x(L):this._bodyText=L=Object.prototype.toString.call(L):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof L=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(L)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var L=p(this);if(L)return L;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var L=p(this);return L||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(l.blob)return this.blob().then(B);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var L=p(this);if(L)return L;if(this._bodyBlob)return C(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(y(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(M)}),this.json=function(){return this.text().then(JSON.parse)},this}var D=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function F(L){var U=L.toUpperCase();return D.indexOf(U)>-1?U:L}function O(L,U){if(!(this instanceof O))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');U=U||{};var q=U.body;if(L instanceof O){if(L.bodyUsed)throw new TypeError("Already read");this.url=L.url,this.credentials=L.credentials,U.headers||(this.headers=new g(L.headers)),this.method=L.method,this.mode=L.mode,this.signal=L.signal,!q&&L._bodyInit!=null&&(q=L._bodyInit,L.bodyUsed=!0)}else this.url=String(L);if(this.credentials=U.credentials||this.credentials||"same-origin",(U.headers||!this.headers)&&(this.headers=new g(U.headers)),this.method=F(U.method||this.method||"GET"),this.mode=U.mode||this.mode||null,this.signal=U.signal||this.signal||function(){if("AbortController"in a){var k=new AbortController;return k.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&q)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(q),(this.method==="GET"||this.method==="HEAD")&&(U.cache==="no-store"||U.cache==="no-cache")){var R=/([?&])_=[^&]*/;if(R.test(this.url))this.url=this.url.replace(R,"$1_="+new Date().getTime());else{var _=/\?/;this.url+=(_.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}O.prototype.clone=function(){return new O(this,{body:this._bodyInit})};function M(L){var U=new FormData;return L.trim().split("&").forEach(function(q){if(q){var R=q.split("="),_=R.shift().replace(/\+/g," "),k=R.join("=").replace(/\+/g," ");U.append(decodeURIComponent(_),decodeURIComponent(k))}}),U}function j(L){var U=new g,q=L.replace(/\r?\n[\t ]+/g," ");return q.split("\r").map(function(R){return R.indexOf(`
2476
+ `).flatMap(a=>{const l=a.split(" ").filter(Boolean);return l.length?l.slice(1).reduce((c,u,A)=>{const d=`${c[c.length-1].text} ${u}`.trim(),f=e.measureText(d);if(f.width>n)c=[...c,...Dh({context:e,word:u,maxW:n})];else{const g=t[A%t.length];e.font=i.replace(On,g.toString()),c[c.length-1]={text:d,metrics:f}}return c},Dh({context:e,word:l[0],maxW:n})):{text:"",metrics:e.measureText("")}})}finally{e.restore()}},{cacheKey:([{font:i,fontSizes:e,text:t,maxW:r,letterSpacing:n}])=>`${i}_${JSON.stringify(e)}_${t}_${r}_${n}`});Rs(({font:i,text:e,scale:t,context:r,maxW:n,maxH:s,minSize:o,maxSize:a,letterSpacing:l=0})=>{var c,u;let A=0;if(a){A=(o??0)*t;let d=0;for(;a*t>A+1;){A+=1;const f=qv({font:i,context:r,fontSizes:[A],text:e,maxW:n,letterSpacing:l});if(d=f.reduce((g,p)=>(p.metrics.width>g&&(g=p.metrics.width),g),0),d>n||f.length*A>s){A-=1;break}}}else A=parseFloat(((u=(c=i.match(On))==null?void 0:c.groups)==null?void 0:u.value)??"0")*t;return A},{cacheKey:([{font:i,text:e,scale:t,maxW:r,maxH:n,minSize:s,maxSize:o,letterSpacing:a}])=>`${i}_${e}_${s}_${o}_${t}_${r}_${n}_${a}`});const Jv={type:"text"},jv={type:"video"};function Lh(){return document.createElement("canvas")}function Xv(i,e){return Object.keys(i).reduce((t,r)=>(e.includes(r)||(t[r]=i[r]),t),{})}function Jt(i){let e=0;for(const t of i)Array.isArray(t)?e+=Jt(t):e+=t;return e}function oo(i){return i.map(({type:e,duration:t},r)=>{var n,s,o,a;if(e==="transition"){const l=((n=i[r-2])==null?void 0:n.type)==="transition"?i[r-2]:null,c=((s=i[r-1])==null?void 0:s.duration)??1/0,u=((o=i[r+1])==null?void 0:o.duration)??1/0,A=((a=i[r+2])==null?void 0:a.type)==="transition"?i[r+2]:null;return Math.min(l?c/2:c,t,A?u/2:u)*-1}return t})}function kh(i){var e;return{...i,children:((e=i.children)==null?void 0:e.map(t=>{if(!t.renderer)return kh(t)}).filter(Boolean))??[]}}function Mh(i){const e={box:0,shape:0,image:0,video:0,text:0,audio:0,gradient:0,caption:0};i.renderer&&(e[i.renderer.type]+=1);for(const t of i.children??[]){const{box:r,shape:n,image:s,video:o,text:a,audio:l,gradient:c,caption:u}=Mh(t);e.box+=r,e.shape+=n,e.image+=s,e.video+=o,e.text+=a,e.audio+=l,e.gradient+=c,e.caption+=u}return e}function zv(i){return i.video>0?jv.type:i.image>0?Wv.type:i.audio>0?$v.type:i.caption>0?Kv.type:Jv.type}function Fh({node:i,duration:e,parentAnimations:t}){const r=[],n={...t,...i.element.animations};if(i.renderer){const s=kh({...i.element,layout:{...i.element.layout?Xv(i.element.layout,["maxWidth","maxHeight"]):{},width:"100%",height:"100%",margin:0}}),o=Mh(s);r.push({type:zv(o),id:Cv(),x:i.x,y:i.y,width:i.width,height:i.height,duration:e,root:{element:s}})}for(const s of i.childNodes)r.push(...Fh({node:s,duration:e,parentAnimations:n}));return r}function Zv(i){if(i===null||typeof i!="object")return!1;if(Object.getPrototypeOf(i)===null)return!0;let e=i;for(;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(i)===e}function ey(i){return i.replace(/\\/g,"\\\\").replace(/\//g,"\\/").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\f/g,"\\f").replace(/"/g,'\\"')}Um.filters.define("parse",i=>typeof i>"u"?null:typeof i=="string"?`"${ey(i)}"`:Zv(i)||Array.isArray(i)?JSON.stringify(i):i);const ty="3";async function iy({scene:i,start:e=0}){const{id:t,root:r,duration:n}=i,s=await wh({id:t,root:r});return{type:i.type,start:e,duration:n,layout:s,id:i.id,config:i}}async function ry({track:i}){const e=oo(i),t=await Promise.all(i.reduce((s,o,a)=>{if(o.type!=="audio")return s;const l=Jt(e.slice(0,a));return s.push(iy({scene:o,start:l})),s},[])),r=i.reduce((s,o,a)=>{if(o.type!=="gap")return s;const l=Jt(e.slice(0,a));return s.push({type:o.type,id:o.id,start:l,config:o,duration:o.duration}),s},[]),n=i.map(({id:s})=>t.find(({id:o})=>o===s)??r.find(({id:o})=>o===s)).filter(Boolean);return{type:"audio",scenes:t,gapScenes:r,mergedScenes:n,config:i,duration:Math.max(...n.map(({start:s,duration:o})=>s+o))}}async function Ph({node:i,canvases:e,sceneTime:t,parentOpacity:r=1,parentTransform:n,debug:s=!1}){var o,a;const l=e.sceneCanvas.getContext("2d");if(l){l.save(),l.setTransform(n);const c=Ev({layout:i.element.layout,sceneTime:t,animations:i.element.animations}),{opacity:u,translation:A,scale:h,clip:d,dimensions:f,rotation:g}=c,p=i.width*f.widthRatio,v=i.height*f.heightRatio;if(l.globalAlpha=u*r,(A.x||A.y)&&l.translate(A.x,A.y),(h!==1||g!==0)&&(l.translate(i.x+p/2,i.y+v/2),l.scale(h,h),l.rotate(g*Math.PI/180),l.translate(-(i.x+p/2),-(i.y+v/2))),d){l.beginPath();const B={x:i.x+d.x*p,y:i.y+d.y*v,width:d.width*p,height:d.height*v};l.rect(B.x,B.y,B.width,B.height),l.clip()}if(s){const B=l.globalAlpha;l.globalAlpha=1,l.strokeStyle="red",l.strokeRect(i.x,i.y,p,v),l.globalAlpha=B}await((a=(o=i.renderer)==null?void 0:o.render)==null?void 0:a.call(o,{canvases:e,sceneTime:t,dx:i.x,dy:i.y,dw:p,dh:v,radius:i.radius,options:i.options,dependencies:i.dependencies}));for await(const B of i.childNodes)await Ph({debug:s,node:B,canvases:e,sceneTime:t,parentOpacity:l.globalAlpha,parentTransform:l.getTransform()});l.restore()}}async function ny({layout:i,canvases:e,sceneTime:t,debug:r=!1}){const{node:n}=i;await Ph({debug:r,node:n,canvases:e,sceneTime:t})}async function ao({debug:i=!1,scene:e,start:t=0,resolvers:r,rootWidth:n,rootHeight:s,canvasFactory:o=Lh}){var a,l;const{id:c,x:u,y:A,width:h,height:d,root:f,duration:g}=e,p=o(),v=o(),B=o(),C=o(),y=o(),x=await wh({id:c,root:{...f,layout:{...f.layout,width:n,height:s},element:{...f.element,layout:{...f.element.layout,...typeof u=="number"&&typeof A=="number"?{position:"absolute",inset:{top:A,left:u}}:{},width:h??((a=f.element.layout)==null?void 0:a.width),height:d??((l=f.element.layout)==null?void 0:l.height)}}},resolvers:r,measureCanvas:y}),w=async D=>{const F=Math.max(0,D-t);p.width=p.height=0,p.width=n,p.height=s,await ny({debug:i,layout:x,sceneTime:F,canvases:{sceneCanvas:p,cropCanvas:v,letterboxCanvas:B,posterCanvas:C}})};return{id:c,type:e.type,start:t,duration:g,layout:x,sceneCanvas:p,draw:w,config:e,childScenes:x.node.childNodes.flatMap(D=>Fh({node:D,duration:g}))}}async function sy({debug:i=!1,track:e,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s}){const o=oo(e),a=await Promise.all(e.reduce((A,h,d)=>{const f=Jt(o.slice(0,d));return h.type==="caption"&&A.push(ao({debug:i,scene:h,start:f,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s})),A},[])),l=e.reduce((A,h,d)=>{if(h.type!=="gap")return A;const f=Jt(o.slice(0,d));return A.push({type:h.type,id:h.id,start:f,config:h,duration:h.duration}),A},[]),c=e.reduce((A,h,d)=>{if(h.type!=="transition")return A;const f=h.duration,g=Jt(o.slice(0,d))-f;return A.push({type:h.type,id:h.id,name:h.name,start:g,duration:f,config:h,transitionCanvas:s(),to:a.find(({id:p})=>{var v;return p===((v=e[d+1])==null?void 0:v.id)}),from:a.find(({id:p})=>{var v;return p===((v=e[d-1])==null?void 0:v.id)})}),A},[]),u=e.map(({id:A})=>a.find(({id:h})=>h===A)??l.find(({id:h})=>h===A)??c.find(({id:h})=>h===A)).filter(Boolean);return{type:"caption",scenes:a,gapScenes:l,transitions:c,mergedScenes:u,duration:Math.max(...u.map(({start:A,duration:h})=>A+h)),trackCanvas:s()}}async function oy({debug:i=!1,track:e,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s}){const o=oo(e),a=await Promise.all(e.reduce((A,h,d)=>{const f=Jt(o.slice(0,d));return h.type==="video"&&A.push(ao({debug:i,scene:h,start:f,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s})),h.type==="image"&&A.push(ao({debug:i,scene:h,start:f,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s})),A},[])),l=e.reduce((A,h,d)=>{if(h.type!=="gap")return A;const f=Jt(o.slice(0,d));return A.push({type:h.type,id:h.id,start:f,config:h,duration:h.duration}),A},[]),c=e.reduce((A,h,d)=>{if(h.type!=="transition")return A;const f=h.duration,g=Jt(o.slice(0,d))-f;return A.push({type:h.type,id:h.id,name:h.name,start:g,duration:f,config:h,transitionCanvas:s(),to:a.find(({id:p})=>{var v;return p===((v=e[d+1])==null?void 0:v.id)}),from:a.find(({id:p})=>{var v;return p===((v=e[d-1])==null?void 0:v.id)})}),A},[]),u=e.map(({id:A})=>a.find(({id:h})=>h===A)??l.find(({id:h})=>h===A)??c.find(({id:h})=>h===A)).filter(Boolean);return{type:"picture",scenes:a,gapScenes:l,transitions:c,mergedScenes:u,duration:Math.max(0,...u.map(({start:A,duration:h})=>A+h)),trackCanvas:s()}}async function ay({debug:i=!1,track:e,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s}){const o=oo(e),a=await Promise.all(e.reduce((A,h,d)=>{const f=Jt(o.slice(0,d));return h.type==="text"&&A.push(ao({debug:i,scene:h,start:f,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s})),A},[])),l=e.reduce((A,h,d)=>{if(h.type!=="gap")return A;const f=Jt(o.slice(0,d));return A.push({type:h.type,id:h.id,start:f,config:h,duration:h.duration}),A},[]),c=e.reduce((A,h,d)=>{if(h.type!=="transition")return A;const f=h.duration,g=Jt(o.slice(0,d))-f;return A.push({type:h.type,id:h.id,name:h.name,start:g,duration:f,config:h,transitionCanvas:s(),to:a.find(({id:p})=>{var v;return p===((v=e[d+1])==null?void 0:v.id)}),from:a.find(({id:p})=>{var v;return p===((v=e[d-1])==null?void 0:v.id)})}),A},[]),u=e.map(({id:A})=>a.find(({id:h})=>h===A)??l.find(({id:h})=>h===A)??c.find(({id:h})=>h===A)).filter(Boolean);return{type:"text",scenes:a,gapScenes:l,transitions:c,mergedScenes:u,duration:Math.max(...u.map(({start:A,duration:h})=>A+h)),trackCanvas:s()}}function ly(i){return i.some(({type:e})=>e==="text")}function cy(i){return i.some(({type:e})=>e==="caption")}function Ay(i){return i.some(({type:e})=>e==="audio")}function uy(i){return i.some(({type:e})=>e==="video"||e==="image")}function hy(i){return i.type==="audio"}const dy=(((yh=vh)==null?void 0:yh.default)??vh).reduce((i,e)=>(i[e.name]=e,i),{});function fy(i,e){return i.has(e)||i.set(e,{buffer:null,transitions:{},fromTexture:null,toTexture:null}),i.get(e)}function gy({name:i,to:e,from:t,progress:r,width:n,height:s,glContext:o,contextResources:a,returnPixels:l=!0}){var c,u,A;const h=fy(a,o);if(o.disable(o.DEPTH_TEST),h.buffer?o.bindBuffer(o.ARRAY_BUFFER,h.buffer):(h.buffer=o.createBuffer(),o.bindBuffer(o.ARRAY_BUFFER,h.buffer),o.bufferData(o.ARRAY_BUFFER,new Float32Array([-1,-1,-1,4,4,-1]),o.STATIC_DRAW)),o.viewport(0,0,n,s),h.fromTexture?h.fromTexture.setPixels(t):(h.fromTexture=(((c=Zs)==null?void 0:c.default)??Zs)(o,t),h.fromTexture.minFilter=o.LINEAR,h.fromTexture.magFilter=o.LINEAR),h.toTexture?h.toTexture.setPixels(e):(h.toTexture=(((u=Zs)==null?void 0:u.default)??Zs)(o,e),h.toTexture.minFilter=o.LINEAR,h.toTexture.magFilter=o.LINEAR),h.transitions[i]||(h.transitions[i]=(((A=Ih)==null?void 0:A.default)??Ih)(o,dy[i])),h.transitions[i].draw(r,h.fromTexture,h.toTexture,n,s),!l)return o.flush(),new Uint8Array(0);const f=new Uint8Array(n*s*4);return o.readPixels(0,0,n,s,o.RGBA,o.UNSIGNED_BYTE,f),o.flush(),f}function py(i){for(const[e,t]of i.entries())t.buffer&&e.deleteBuffer(t.buffer),t.fromTexture&&t.fromTexture.dispose(),t.toTexture&&t.toTexture.dispose(),Object.values(t.transitions).forEach(r=>{r.dispose()}),i.delete(e)}function my({name:i,to:e,from:t,progress:r,canvas:n,contextResources:s}){const o=n.getContext("webgl",{alpha:!0,depth:!1,antialias:!1,preserveDrawingBuffer:!1});o&&(o.pixelStorei(o.UNPACK_FLIP_Y_WEBGL,!0),gy({name:i,to:e,from:t,progress:r,width:n.width,height:n.height,glContext:o,contextResources:s,returnPixels:!1}))}async function Nh({debug:i=!1,config:e,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s=Lh,drawTransition:o=my}){const a=new Map,l=await Promise.all(e.tracks.map(async A=>{if(uy(A))return{...await oy({debug:i,track:A,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s}),config:A};if(ly(A))return{...await ay({debug:i,track:A,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s}),config:A};if(cy(A))return{...await sy({debug:i,track:A,resolvers:t,rootWidth:r,rootHeight:n,canvasFactory:s}),config:A};if(Ay(A))return{...await ry({track:A}),config:A};throw new Error("Unknown track type")}));return{draw:async({canvas:A,currentTime:h})=>{const d=A.getContext("2d");if(d){d.globalAlpha=1,d.globalCompositeOperation="source-over",d.clearRect(0,0,A.width,A.height),d.save(),d.fillStyle="black",d.fillRect(0,0,A.width,A.height),d.restore();for await(const f of l){if(hy(f))continue;const{scenes:g,transitions:p,trackCanvas:v}=f;v.width=v.height=0,v.width=A.width,v.height=A.height;const B=v.getContext("2d"),C=g.filter(({start:x,duration:w})=>h>=x&&h<x+w);if(!B||C.length<=0)continue;const y=p.find(({start:x,duration:w})=>h>=x&&h<x+w);for await(const{sceneCanvas:x,draw:w}of C)await(w==null?void 0:w(h)),(!y||y&&(!y.to||!y.from))&&B.drawImage(x,0,0,x.width,x.height);if(y&&y.to&&y.from&&y.duration>0){const{name:x,to:w,from:D,duration:F,transitionCanvas:O}=y;O.width=O.height=0,O.width=v.width,O.height=v.height;const M=Math.min(1,Math.max(0,(h-w.start)/F));await o({name:x,progress:M,contextResources:a,to:w.sceneCanvas,from:D.sceneCanvas,canvas:O}),B.globalCompositeOperation="lighter",B.drawImage(O,0,0,O.width,O.height)}d.drawImage(v,0,0,v.width,v.height)}}},cleanup:()=>{py(a)},tracks:l,aspectRatio:e.aspectRatio,transcriptions:e.transcriptions,duration:Math.max(...l.map(({duration:A})=>A))}}const Ey={version:"6.4.6"};function Iy(i){const{publicApiUrl:e}=ws(i),t=Ki();return navigator.sendBeacon(`${e}/api/visitor`,JSON.stringify({visitorId:t})),t}function vy(i){var s,o,a,l,c,u,A,h,d,f,g,p;if(typeof window>"u")return{client:null,tab:null,request:Ki()};let e=(o=(s=window.localStorage)==null?void 0:s.getItem)==null?void 0:o.call(s,"vouch-uid-visitor"),t=(l=(a=window.localStorage)==null?void 0:a.getItem)==null?void 0:l.call(a,"vouch-uid-client"),r=(u=(c=window.sessionStorage)==null?void 0:c.getItem)==null?void 0:u.call(c,"vouch-uid-tab");const n=Ki();return e||(e=Iy(i),(h=(A=window.localStorage)==null?void 0:A.setItem)==null||h.call(A,"vouch-uid-visitor",e)),t||(t=Ki(),(f=(d=window.localStorage)==null?void 0:d.setItem)==null||f.call(d,"vouch-uid-client",t)),r||(r=Ki(),(p=(g=window.sessionStorage)==null?void 0:g.setItem)==null||p.call(g,"vouch-uid-tab",r)),{client:t,tab:r,request:n,visitor:e}}function yy(i,e){return i&&"vouchId"in i?i.vouchId:(e==null?void 0:e.id)??null}function Cy(i="embedded_player"){var n,s;const[e,t]=((s=(n=Intl.DateTimeFormat().resolvedOptions().timeZone)==null?void 0:n.split)==null?void 0:s.call(n,"/"))??[],r={};return[...new URLSearchParams(location.search).entries()].forEach(([o,a])=>{if(/utm/.test(o)){const l=o.toLowerCase().replace(/[-_][a-z0-9]/g,c=>c.slice(-1).toUpperCase());r[l]=a}}),{source:i,time:new Date,region:t,country:e,screenHeight:window.screen.height,screenWidth:window.screen.width,referrer:document.referrer,currentUrl:location.href,embedType:"media-player-embed",embedVersion:Ey.version,templateVersion:ty,...r}}const Oh=1;class By{constructor(e){this._batchedEvents=[],this._hasPlayed=!1,this._hasLoaded={},this._answersViewed={},this._streamStartTime={},this._streamLatestTime={},this._currentlyPlayingVideo=null,this._createTrackingEvent=(t,r)=>{const n=yy(r,this.host.vouch);!n||this.host.disableTracking||this._batchedEvents.push({event:t,payload:{...r,senderId:this.host.senderId,vouchId:n,time:new Date().toISOString()}})},this._sendTrackingEvent=()=>{if(this._batchedEvents.length<=0)return;const{publicApiUrl:t}=ws(this.host.env),{client:r,tab:n,request:s,visitor:o}=vy(this.host.env);navigator.sendBeacon(`${t}/api/batchevents`,JSON.stringify({payload:{events:this._batchedEvents},context:{"x-uid-client":r,"x-uid-tab":n,"x-uid-request":s,"x-uid-visitor":o,"x-reporting-metadata":Cy(this.host.trackingSource)}})),this._batchedEvents=[]},this._streamEnded=()=>{if(this._currentlyPlayingVideo){const{id:t,key:r}=this._currentlyPlayingVideo;this._streamLatestTime[r]>this._streamStartTime[r]+Oh&&this._createTrackingEvent("VIDEO_STREAMED",{answerId:t,streamStart:this._streamStartTime[r],streamEnd:this._streamLatestTime[r]}),delete this._streamStartTime[r],delete this._streamLatestTime[r]}},this._handleVouchLoaded=({detail:t})=>{t&&(this._hasLoaded[t]||(this._createTrackingEvent("VOUCH_LOADED",{vouchId:t}),this._hasLoaded[t]=!0))},this._handlePlay=()=>{this._hasPlayed||(this._createTrackingEvent("VIDEO_PLAYED",{streamStart:this.host.currentTime}),this._hasPlayed=!0)},this._handleVideoPlay=({detail:{id:t,key:r}})=>{this._answersViewed[r]||(this._createTrackingEvent("VOUCH_RESPONSE_VIEWED",{answerId:t}),this._answersViewed[r]=!0)},this._handleVideoTimeUpdate=({detail:{id:t,key:r,node:n}})=>{this.host.paused||(this._currentlyPlayingVideo={id:t,key:r,node:n},this._streamLatestTime[r]=n.currentTime,this._streamStartTime[r]||(this._streamStartTime[r]=n.currentTime,this._streamLatestTime[r]=n.currentTime))},this._handleVideoPause=({detail:{id:t,key:r}})=>{this._streamLatestTime[r]>this._streamStartTime[r]+Oh&&this._createTrackingEvent("VIDEO_STREAMED",{answerId:t,streamStart:this._streamStartTime[r],streamEnd:this._streamLatestTime[r]}),delete this._streamStartTime[r],delete this._streamLatestTime[r]},this._pageUnloading=()=>{this._streamEnded(),this._sendTrackingEvent()},this._handleVisibilityChange=()=>{document.visibilityState==="hidden"&&this._pageUnloading()},this._handlePageHide=()=>{this._pageUnloading()},this.host=e,e.addController(this)}hostConnected(){requestAnimationFrame(()=>{var e,t,r,n;"onvisibilitychange"in document?document.addEventListener("visibilitychange",this._handleVisibilityChange):window.addEventListener("pagehide",this._handlePageHide),this.host.addEventListener("vouch:loaded",this._handleVouchLoaded),(e=this.host.mediaPlayer)==null||e.addEventListener("play",this._handlePlay),(t=this.host.mediaPlayer)==null||t.addEventListener("video:play",this._handleVideoPlay),(r=this.host.mediaPlayer)==null||r.addEventListener("video:pause",this._handleVideoPause),(n=this.host.mediaPlayer)==null||n.addEventListener("video:timeupdate",this._handleVideoTimeUpdate)})}hostDisconnected(){var e,t,r,n;this._pageUnloading(),"onvisibilitychange"in document?document.removeEventListener("visibilitychange",this._handleVisibilityChange):window.removeEventListener("pagehide",this._handlePageHide),this.host.removeEventListener("vouch:loaded",this._handleVouchLoaded),(e=this.host.mediaPlayer)==null||e.removeEventListener("play",this._handlePlay),(t=this.host.mediaPlayer)==null||t.removeEventListener("video:play",this._handleVideoPlay),(r=this.host.mediaPlayer)==null||r.removeEventListener("video:pause",this._handleVideoPause),(n=this.host.mediaPlayer)==null||n.removeEventListener("video:timeupdate",this._handleVideoTimeUpdate)}}var ml={exports:{}};(function(i,e){var t=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Ji<"u"&&Ji,r=function(){function s(){this.fetch=!1,this.DOMException=t.DOMException}return s.prototype=t,new s}();(function(s){(function(o){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof Ji<"u"&&Ji||{},l={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function c(L){return L&&DataView.prototype.isPrototypeOf(L)}if(l.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],A=ArrayBuffer.isView||function(L){return L&&u.indexOf(Object.prototype.toString.call(L))>-1};function h(L){if(typeof L!="string"&&(L=String(L)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(L)||L==="")throw new TypeError('Invalid character in header field name: "'+L+'"');return L.toLowerCase()}function d(L){return typeof L!="string"&&(L=String(L)),L}function f(L){var U={next:function(){var q=L.shift();return{done:q===void 0,value:q}}};return l.iterable&&(U[Symbol.iterator]=function(){return U}),U}function g(L){this.map={},L instanceof g?L.forEach(function(U,q){this.append(q,U)},this):Array.isArray(L)?L.forEach(function(U){if(U.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+U.length);this.append(U[0],U[1])},this):L&&Object.getOwnPropertyNames(L).forEach(function(U){this.append(U,L[U])},this)}g.prototype.append=function(L,U){L=h(L),U=d(U);var q=this.map[L];this.map[L]=q?q+", "+U:U},g.prototype.delete=function(L){delete this.map[h(L)]},g.prototype.get=function(L){return L=h(L),this.has(L)?this.map[L]:null},g.prototype.has=function(L){return this.map.hasOwnProperty(h(L))},g.prototype.set=function(L,U){this.map[h(L)]=d(U)},g.prototype.forEach=function(L,U){for(var q in this.map)this.map.hasOwnProperty(q)&&L.call(U,this.map[q],q,this)},g.prototype.keys=function(){var L=[];return this.forEach(function(U,q){L.push(q)}),f(L)},g.prototype.values=function(){var L=[];return this.forEach(function(U){L.push(U)}),f(L)},g.prototype.entries=function(){var L=[];return this.forEach(function(U,q){L.push([q,U])}),f(L)},l.iterable&&(g.prototype[Symbol.iterator]=g.prototype.entries);function p(L){if(!L._noBody){if(L.bodyUsed)return Promise.reject(new TypeError("Already read"));L.bodyUsed=!0}}function v(L){return new Promise(function(U,q){L.onload=function(){U(L.result)},L.onerror=function(){q(L.error)}})}function B(L){var U=new FileReader,q=v(U);return U.readAsArrayBuffer(L),q}function C(L){var U=new FileReader,q=v(U),R=/charset=([A-Za-z0-9_-]+)/.exec(L.type),_=R?R[1]:"utf-8";return U.readAsText(L,_),q}function y(L){for(var U=new Uint8Array(L),q=new Array(U.length),R=0;R<U.length;R++)q[R]=String.fromCharCode(U[R]);return q.join("")}function x(L){if(L.slice)return L.slice(0);var U=new Uint8Array(L.byteLength);return U.set(new Uint8Array(L)),U.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(L){this.bodyUsed=this.bodyUsed,this._bodyInit=L,L?typeof L=="string"?this._bodyText=L:l.blob&&Blob.prototype.isPrototypeOf(L)?this._bodyBlob=L:l.formData&&FormData.prototype.isPrototypeOf(L)?this._bodyFormData=L:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(L)?this._bodyText=L.toString():l.arrayBuffer&&l.blob&&c(L)?(this._bodyArrayBuffer=x(L.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(L)||A(L))?this._bodyArrayBuffer=x(L):this._bodyText=L=Object.prototype.toString.call(L):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof L=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(L)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var L=p(this);if(L)return L;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var L=p(this);return L||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(l.blob)return this.blob().then(B);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var L=p(this);if(L)return L;if(this._bodyBlob)return C(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(y(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(M)}),this.json=function(){return this.text().then(JSON.parse)},this}var D=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function F(L){var U=L.toUpperCase();return D.indexOf(U)>-1?U:L}function O(L,U){if(!(this instanceof O))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');U=U||{};var q=U.body;if(L instanceof O){if(L.bodyUsed)throw new TypeError("Already read");this.url=L.url,this.credentials=L.credentials,U.headers||(this.headers=new g(L.headers)),this.method=L.method,this.mode=L.mode,this.signal=L.signal,!q&&L._bodyInit!=null&&(q=L._bodyInit,L.bodyUsed=!0)}else this.url=String(L);if(this.credentials=U.credentials||this.credentials||"same-origin",(U.headers||!this.headers)&&(this.headers=new g(U.headers)),this.method=F(U.method||this.method||"GET"),this.mode=U.mode||this.mode||null,this.signal=U.signal||this.signal||function(){if("AbortController"in a){var k=new AbortController;return k.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&q)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(q),(this.method==="GET"||this.method==="HEAD")&&(U.cache==="no-store"||U.cache==="no-cache")){var R=/([?&])_=[^&]*/;if(R.test(this.url))this.url=this.url.replace(R,"$1_="+new Date().getTime());else{var _=/\?/;this.url+=(_.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}O.prototype.clone=function(){return new O(this,{body:this._bodyInit})};function M(L){var U=new FormData;return L.trim().split("&").forEach(function(q){if(q){var R=q.split("="),_=R.shift().replace(/\+/g," "),k=R.join("=").replace(/\+/g," ");U.append(decodeURIComponent(_),decodeURIComponent(k))}}),U}function j(L){var U=new g,q=L.replace(/\r?\n[\t ]+/g," ");return q.split("\r").map(function(R){return R.indexOf(`
2477
2477
  `)===0?R.substr(1,R.length):R}).forEach(function(R){var _=R.split(":"),k=_.shift().trim();if(k){var K=_.join(":").trim();try{U.append(k,K)}catch(Y){console.warn("Response "+Y.message)}}}),U}w.call(O.prototype);function X(L,U){if(!(this instanceof X))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(U||(U={}),this.type="default",this.status=U.status===void 0?200:U.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=U.statusText===void 0?"":""+U.statusText,this.headers=new g(U.headers),this.url=U.url||"",this._initBody(L)}w.call(X.prototype),X.prototype.clone=function(){return new X(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new g(this.headers),url:this.url})},X.error=function(){var L=new X(null,{status:200,statusText:""});return L.ok=!1,L.status=0,L.type="error",L};var le=[301,302,303,307,308];X.redirect=function(L,U){if(le.indexOf(U)===-1)throw new RangeError("Invalid status code");return new X(null,{status:U,headers:{location:L}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(U,q){this.message=U,this.name=q;var R=Error(U);this.stack=R.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function oe(L,U){return new Promise(function(q,R){var _=new O(L,U);if(_.signal&&_.signal.aborted)return R(new o.DOMException("Aborted","AbortError"));var k=new XMLHttpRequest;function K(){k.abort()}k.onload=function(){var re={statusText:k.statusText,headers:j(k.getAllResponseHeaders()||"")};_.url.indexOf("file://")===0&&(k.status<200||k.status>599)?re.status=200:re.status=k.status,re.url="responseURL"in k?k.responseURL:re.headers.get("X-Request-URL");var he="response"in k?k.response:k.responseText;setTimeout(function(){q(new X(he,re))},0)},k.onerror=function(){setTimeout(function(){R(new TypeError("Network request failed"))},0)},k.ontimeout=function(){setTimeout(function(){R(new TypeError("Network request timed out"))},0)},k.onabort=function(){setTimeout(function(){R(new o.DOMException("Aborted","AbortError"))},0)};function Y(re){try{return re===""&&a.location.href?a.location.href:re}catch{return re}}if(k.open(_.method,Y(_.url),!0),_.credentials==="include"?k.withCredentials=!0:_.credentials==="omit"&&(k.withCredentials=!1),"responseType"in k&&(l.blob?k.responseType="blob":l.arrayBuffer&&(k.responseType="arraybuffer")),U&&typeof U.headers=="object"&&!(U.headers instanceof g||a.Headers&&U.headers instanceof a.Headers)){var ie=[];Object.getOwnPropertyNames(U.headers).forEach(function(re){ie.push(h(re)),k.setRequestHeader(re,d(U.headers[re]))}),_.headers.forEach(function(re,he){ie.indexOf(he)===-1&&k.setRequestHeader(he,re)})}else _.headers.forEach(function(re,he){k.setRequestHeader(he,re)});_.signal&&(_.signal.addEventListener("abort",K),k.onreadystatechange=function(){k.readyState===4&&_.signal.removeEventListener("abort",K)}),k.send(typeof _._bodyInit>"u"?null:_._bodyInit)})}return oe.polyfill=!0,a.fetch||(a.fetch=oe,a.Headers=g,a.Request=O,a.Response=X),o.Headers=g,o.Request=O,o.Response=X,o.fetch=oe,o})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var n=t.fetch?t:r;e=n.fetch,e.default=n.fetch,e.fetch=n.fetch,e.Headers=n.Headers,e.Request=n.Request,e.Response=n.Response,i.exports=e})(ml,ml.exports);var Ty=ml.exports;const Uh=Pa(Ty);async function by(i){var e;try{if((e=await Uh(i,{method:"HEAD"}))!=null&&e.ok)return i}catch{return}}async function El({sources:i}){let e=null;const t=i==null?void 0:i.filter(Boolean),r=t==null?void 0:t.find(s=>s.startsWith("blob:")),n=t==null?void 0:t.find(s=>!s.startsWith("http")&&!s.startsWith("blob:"));if(r||n)return r??n;if(t.length>0){const s=t.map(o=>by(o));e=(await Promise.all(s)).find(Boolean)}return e}async function Sy(i){try{return(await Uh(i)).text()}catch{return null}}async function xy(i){return i=i.trim(),i.startsWith("http")||i.startsWith("blob:")?Sy(i):i}const Qy=Er(async({original:i,translation:e,originalLanguage:t="",translationLanguage:r=""},{language:n})=>{var s,o;const a={[(s=r==null?void 0:r.split("-"))==null?void 0:s[0]]:e,[(o=t==null?void 0:t.split("-"))==null?void 0:o[0]]:i},l=(n&&a[n])??i;return l?xy(l):null},{cacheKey:([i,{language:e}])=>JSON.stringify({...i,language:e})});function _y(i){var e;return((e=i==null?void 0:i.items)==null?void 0:e.map(t=>{var r;return{text:(r=t.alternatives[0])==null?void 0:r.content,start:t.start_time,end:t.end_time}}))??[]}const wy=Er(async i=>{var e,t,r,n,s,o,a,l,c,u,A;const[h,d,f]=await Promise.all([El({sources:[(t=(e=i==null?void 0:i.answer)==null?void 0:e.media)==null?void 0:t.video,(n=(r=i==null?void 0:i.answer)==null?void 0:r.media)==null?void 0:n.input]}),El({sources:[(o=(s=i==null?void 0:i.answer)==null?void 0:s.media)==null?void 0:o.playlist]}),El({sources:[((l=(a=i==null?void 0:i.answer)==null?void 0:a.media)==null?void 0:l.reducedQuality)??((A=(u=(c=i==null?void 0:i.answer)==null?void 0:c.media)==null?void 0:u.videos)==null?void 0:A.xs)]})]);return{src:h,playlist:d,preview:f}},{cacheKey:([i])=>{var e,t,r,n,s,o,a,l,c,u,A;return JSON.stringify({video:(t=(e=i==null?void 0:i.answer)==null?void 0:e.media)==null?void 0:t.video,input:(n=(r=i==null?void 0:i.answer)==null?void 0:r.media)==null?void 0:n.input,playlist:(o=(s=i==null?void 0:i.answer)==null?void 0:s.media)==null?void 0:o.playlist,preview:((l=(a=i==null?void 0:i.answer)==null?void 0:a.media)==null?void 0:l.reducedQuality)??((A=(u=(c=i==null?void 0:i.answer)==null?void 0:c.media)==null?void 0:u.videos)==null?void 0:A.xs)})}});function Gh(i){var e,t,r,n,s,o,a,l,c,u,A,h;const d=((t=(e=i==null?void 0:i.answer)==null?void 0:e.contact)==null?void 0:t.name)==="Anonymous"?"":((s=(n=(r=i==null?void 0:i.answer)==null?void 0:r.contact)==null?void 0:n.name)==null?void 0:s.trim())??"",f=((l=(a=(o=i==null?void 0:i.answer)==null?void 0:o.contact)==null?void 0:a.client)==null?void 0:l.name)==="Not Supplied"?"":((h=(A=(u=(c=i==null?void 0:i.answer)==null?void 0:c.contact)==null?void 0:u.client)==null?void 0:A.name)==null?void 0:h.trim())??"",[g,p]=d.split(" ");return{name:d,firstName:g,lastName:p,companyName:f}}function Ry(i){var e,t;const r=(t=(e=i==null?void 0:i.answer)==null?void 0:e.contact)==null?void 0:t.roleTitle,n=r==null?void 0:r.split(" ");return{roleTitle:r,roleWords:n,firstRoleWord:n==null?void 0:n[0],remainingRoleWords:n==null?void 0:n.slice(1).join(" ")}}async function Dy(i,e,t){var r,n,s;const o=(r=e==null?void 0:e.answer)==null?void 0:r.id;return((s=(n=i==null?void 0:i.questions)==null?void 0:n.items)==null?void 0:s.reduce((l,c)=>{var u;return((u=c==null?void 0:c.answer)==null?void 0:u.id)===o?(l??0)+1:l},0))<=1?o:`${o}-${t}`}async function Il({data:i,rootData:e,index:t},r){var n,s,o,a,l,c,u,A,h,d,f,g,p,v,B,C,y,x,w,D,F,O,M,j;const[X,le,oe]=await Promise.all([Dy(i,e,t),wy(e),Qy({original:((s=(n=e==null?void 0:e.answer)==null?void 0:n.media)==null?void 0:s.captions)??((a=(o=e==null?void 0:e.answer)==null?void 0:o.captions)==null?void 0:a.current),translation:((c=(l=e==null?void 0:e.answer)==null?void 0:l.media)==null?void 0:c.translation)??((A=(u=e==null?void 0:e.answer)==null?void 0:u.captions)==null?void 0:A.translation),originalLanguage:(d=(h=e==null?void 0:e.answer)==null?void 0:h.transcription)==null?void 0:d.language,translationLanguage:(p=(g=(f=e==null?void 0:e.answer)==null?void 0:f.transcription)==null?void 0:g.translation)==null?void 0:p.language},r)]),L=Gh(e),U=Ry(e);return{...le,...L,...U,key:X,captions:oe,wordTimings:_y((v=e==null?void 0:e.answer)==null?void 0:v.transcription),answerLabel:((B=e==null?void 0:e.answer)==null?void 0:B.label)??(e==null?void 0:e.title),prevAnswerLabel:t?((w=(x=(y=(C=i==null?void 0:i.questions)==null?void 0:C.items)==null?void 0:y[t-1])==null?void 0:x.answer)==null?void 0:w.label)??((O=(F=(D=i==null?void 0:i.questions)==null?void 0:D.items)==null?void 0:F[t-1])==null?void 0:O.title)??null:null,isFirstInstanceOfName:t?((j=(M=i==null?void 0:i.questions)==null?void 0:M.items)==null?void 0:j.findIndex(q=>Gh(q).name===L.name))===t:!0}}const lo={af:"Afrikaans",sq:"Albanian",am:"Amharic",ar:"Arabic",hy:"Armenian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",bg:"Bulgarian",ca:"Catalan",zh:"Chinese (Simplified)",zh_TW:"Chinese (Traditional)",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch",en:"English",et:"Estonian",fi:"Finnish",fr:"French",fa:"Farsi",tl:"Filipino",ka:"Georgian",de:"German",el:"Greek",gu:"Gujarati",ht:"Haitian Creole",ha:"Hausa",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",ga:"Irish",it:"Italian",ja:"Japanese",kn:"Kannada",kk:"Kazakh",ko:"Korean",lv:"Latvian",lt:"Lithuanian",mk:"Macedonian",ms:"Malay",ml:"Malayalam",mt:"Maltese",mr:"Marathi",mn:"Mongolian",no:"Norwegian",ps:"Pashto",pl:"Polish",pt:"Portuguese",pa:"Punjabi",ro:"Romanian",ru:"Russian",sr:"Serbian",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",sw:"Swahili",sv:"Swedish",ta:"Tamil",te:"Telugu",th:"Thai",tr:"Turkish",uk:"Ukrainian",ur:"Urdu",uz:"Uzbek",vi:"Vietnamese",cy:"Welsh"};function Ly({data:i}){var e,t;return((t=(e=i==null?void 0:i.questions)==null?void 0:e.items)==null?void 0:t.reduce((r,n)=>{var s,o,a,l,c,u,A;const h=(a=(o=(s=n==null?void 0:n.answer)==null?void 0:s.transcription)==null?void 0:o.language)==null?void 0:a.split("-")[0],d=(A=(u=(c=(l=n==null?void 0:n.answer)==null?void 0:l.transcription)==null?void 0:c.translation)==null?void 0:u.language)==null?void 0:A.split("-")[0];return h&&lo[h]&&!r.find(f=>f.value===h)&&r.push({value:h,label:lo[h]}),d&&lo[d]&&!r.find(f=>f.value===d)&&r.push({value:d,label:lo[d]}),r},[]))??[]}/**
2478
2478
  * @license
2479
2479
  * Copyright 2018 Google LLC
@@ -2525,7 +2525,7 @@ Schedule: ${l.map(d=>rr(d))}`),u.length&&this.log(`Removed events ${u}`),this.pl
2525
2525
  * @license
2526
2526
  * Copyright 2017 Google LLC
2527
2527
  * SPDX-License-Identifier: BSD-3-Clause
2528
- */const Sg=(i,e,t)=>{const r=new Map;for(let n=e;n<=t;n++)r.set(i[n],n);return r},xg=Nr(class extends bn{constructor(i){if(super(i),i.type!==Pr.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,e,t){let r;t===void 0?t=e:e!==void 0&&(r=e);const n=[],s=[];let o=0;for(const a of i)n[o]=r?r(a,o):o,s[o]=t(a,o),o++;return{values:s,keys:n}}render(i,e,t){return this.dt(i,e,t).values}update(i,[e,t,r]){const n=Cp(i),{values:s,keys:o}=this.dt(e,t,r);if(!Array.isArray(n))return this.ut=o,s;const a=this.ut??(this.ut=[]),l=[];let c,u,A=0,h=n.length-1,d=0,f=s.length-1;for(;A<=h&&d<=f;)if(n[A]===null)A++;else if(n[h]===null)h--;else if(a[A]===o[d])l[d]=pr(n[A],s[d]),A++,d++;else if(a[h]===o[f])l[f]=pr(n[h],s[f]),h--,f--;else if(a[A]===o[f])l[f]=pr(n[A],s[f]),Tn(i,l[f+1],n[A]),A++,f--;else if(a[h]===o[d])l[d]=pr(n[h],s[d]),Tn(i,n[A],n[h]),h--,d++;else if(c===void 0&&(c=Sg(o,d,f),u=Sg(a,A,h)),c.has(a[A]))if(c.has(a[h])){const g=u.get(o[d]),p=g!==void 0?n[g]:null;if(p===null){const v=Tn(i,n[A]);pr(v,s[d]),l[d]=v}else l[d]=pr(p,s[d]),Tn(i,n[A],p),n[g]=null;d++}else Ca(n[h]),h--;else Ca(n[A]),A++;for(;d<=f;){const g=Tn(i,l[f+1]);pr(g,s[d]),l[d++]=g}for(;A<=h;){const g=n[A++];g!==null&&Ca(g)}return this.ut=o,yp(i,l),$i}});var Ut="top",Zt="bottom",ei="right",Gt="left",wc="auto",es=[Ut,Zt,ei,Gt],zr="start",ts="end",bb="clippingParents",Qg="viewport",is="popper",Sb="reference",_g=es.reduce(function(i,e){return i.concat([e+"-"+zr,e+"-"+ts])},[]),wg=[].concat(es,[wc]).reduce(function(i,e){return i.concat([e,e+"-"+zr,e+"-"+ts])},[]),xb="beforeRead",Qb="read",_b="afterRead",wb="beforeMain",Rb="main",Db="afterMain",Lb="beforeWrite",kb="write",Mb="afterWrite",Fb=[xb,Qb,_b,wb,Rb,Db,Lb,kb,Mb];function yi(i){return i?(i.nodeName||"").toLowerCase():null}function Vt(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var e=i.ownerDocument;return e&&e.defaultView||window}return i}function Sr(i){var e=Vt(i).Element;return i instanceof e||i instanceof Element}function ti(i){var e=Vt(i).HTMLElement;return i instanceof e||i instanceof HTMLElement}function Rc(i){if(typeof ShadowRoot>"u")return!1;var e=Vt(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function Pb(i){var e=i.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];!ti(s)||!yi(s)||(Object.assign(s.style,r),Object.keys(n).forEach(function(o){var a=n[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function Nb(i){var e=i.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(r){var n=e.elements[r],s=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:t[r]),a=o.reduce(function(l,c){return l[c]="",l},{});!ti(n)||!yi(n)||(Object.assign(n.style,a),Object.keys(s).forEach(function(l){n.removeAttribute(l)}))})}}const Rg={name:"applyStyles",enabled:!0,phase:"write",fn:Pb,effect:Nb,requires:["computeStyles"]};function Ci(i){return i.split("-")[0]}var xr=Math.max,Yo=Math.min,Zr=Math.round;function Dc(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Dg(){return!/^((?!chrome|android).)*safari/i.test(Dc())}function en(i,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=i.getBoundingClientRect(),n=1,s=1;e&&ti(i)&&(n=i.offsetWidth>0&&Zr(r.width)/i.offsetWidth||1,s=i.offsetHeight>0&&Zr(r.height)/i.offsetHeight||1);var o=Sr(i)?Vt(i):window,a=o.visualViewport,l=!Dg()&&t,c=(r.left+(l&&a?a.offsetLeft:0))/n,u=(r.top+(l&&a?a.offsetTop:0))/s,A=r.width/n,h=r.height/s;return{width:A,height:h,top:u,right:c+A,bottom:u+h,left:c,x:c,y:u}}function Lc(i){var e=en(i),t=i.offsetWidth,r=i.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:i.offsetLeft,y:i.offsetTop,width:t,height:r}}function Lg(i,e){var t=e.getRootNode&&e.getRootNode();if(i.contains(e))return!0;if(t&&Rc(t)){var r=e;do{if(r&&i.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Fi(i){return Vt(i).getComputedStyle(i)}function Ob(i){return["table","td","th"].indexOf(yi(i))>=0}function nr(i){return((Sr(i)?i.ownerDocument:i.document)||window.document).documentElement}function Vo(i){return yi(i)==="html"?i:i.assignedSlot||i.parentNode||(Rc(i)?i.host:null)||nr(i)}function kg(i){return!ti(i)||Fi(i).position==="fixed"?null:i.offsetParent}function Ub(i){var e=/firefox/i.test(Dc()),t=/Trident/i.test(Dc());if(t&&ti(i)){var r=Fi(i);if(r.position==="fixed")return null}var n=Vo(i);for(Rc(n)&&(n=n.host);ti(n)&&["html","body"].indexOf(yi(n))<0;){var s=Fi(n);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return n;n=n.parentNode}return null}function rs(i){for(var e=Vt(i),t=kg(i);t&&Ob(t)&&Fi(t).position==="static";)t=kg(t);return t&&(yi(t)==="html"||yi(t)==="body"&&Fi(t).position==="static")?e:t||Ub(i)||e}function kc(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function ns(i,e,t){return xr(i,Yo(e,t))}function Gb(i,e,t){var r=ns(i,e,t);return r>t?t:r}function Mg(){return{top:0,right:0,bottom:0,left:0}}function Fg(i){return Object.assign({},Mg(),i)}function Pg(i,e){return e.reduce(function(t,r){return t[r]=i,t},{})}var $b=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Fg(typeof e!="number"?e:Pg(e,es))};function Hb(i){var e,t=i.state,r=i.name,n=i.options,s=t.elements.arrow,o=t.modifiersData.popperOffsets,a=Ci(t.placement),l=kc(a),c=[Gt,ei].indexOf(a)>=0,u=c?"height":"width";if(!(!s||!o)){var A=$b(n.padding,t),h=Lc(s),d=l==="y"?Ut:Gt,f=l==="y"?Zt:ei,g=t.rects.reference[u]+t.rects.reference[l]-o[l]-t.rects.popper[u],p=o[l]-t.rects.reference[l],v=rs(s),B=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,C=g/2-p/2,y=A[d],x=B-h[u]-A[f],w=B/2-h[u]/2+C,D=ns(y,w,x),F=l;t.modifiersData[r]=(e={},e[F]=D,e.centerOffset=D-w,e)}}function Yb(i){var e=i.state,t=i.options,r=t.element,n=r===void 0?"[data-popper-arrow]":r;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||Lg(e.elements.popper,n)&&(e.elements.arrow=n))}const Vb={name:"arrow",enabled:!0,phase:"main",fn:Hb,effect:Yb,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function tn(i){return i.split("-")[1]}var Kb={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Wb(i,e){var t=i.x,r=i.y,n=e.devicePixelRatio||1;return{x:Zr(t*n)/n||0,y:Zr(r*n)/n||0}}function Ng(i){var e,t=i.popper,r=i.popperRect,n=i.placement,s=i.variation,o=i.offsets,a=i.position,l=i.gpuAcceleration,c=i.adaptive,u=i.roundOffsets,A=i.isFixed,h=o.x,d=h===void 0?0:h,f=o.y,g=f===void 0?0:f,p=typeof u=="function"?u({x:d,y:g}):{x:d,y:g};d=p.x,g=p.y;var v=o.hasOwnProperty("x"),B=o.hasOwnProperty("y"),C=Gt,y=Ut,x=window;if(c){var w=rs(t),D="clientHeight",F="clientWidth";if(w===Vt(t)&&(w=nr(t),Fi(w).position!=="static"&&a==="absolute"&&(D="scrollHeight",F="scrollWidth")),w=w,n===Ut||(n===Gt||n===ei)&&s===ts){y=Zt;var O=A&&w===x&&x.visualViewport?x.visualViewport.height:w[D];g-=O-r.height,g*=l?1:-1}if(n===Gt||(n===Ut||n===Zt)&&s===ts){C=ei;var M=A&&w===x&&x.visualViewport?x.visualViewport.width:w[F];d-=M-r.width,d*=l?1:-1}}var j=Object.assign({position:a},c&&Kb),X=u===!0?Wb({x:d,y:g},Vt(t)):{x:d,y:g};if(d=X.x,g=X.y,l){var le;return Object.assign({},j,(le={},le[y]=B?"0":"",le[C]=v?"0":"",le.transform=(x.devicePixelRatio||1)<=1?"translate("+d+"px, "+g+"px)":"translate3d("+d+"px, "+g+"px, 0)",le))}return Object.assign({},j,(e={},e[y]=B?g+"px":"",e[C]=v?d+"px":"",e.transform="",e))}function qb(i){var e=i.state,t=i.options,r=t.gpuAcceleration,n=r===void 0?!0:r,s=t.adaptive,o=s===void 0?!0:s,a=t.roundOffsets,l=a===void 0?!0:a,c={placement:Ci(e.placement),variation:tn(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Ng(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Ng(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Jb={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:qb,data:{}};var Ko={passive:!0};function jb(i){var e=i.state,t=i.instance,r=i.options,n=r.scroll,s=n===void 0?!0:n,o=r.resize,a=o===void 0?!0:o,l=Vt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach(function(u){u.addEventListener("scroll",t.update,Ko)}),a&&l.addEventListener("resize",t.update,Ko),function(){s&&c.forEach(function(u){u.removeEventListener("scroll",t.update,Ko)}),a&&l.removeEventListener("resize",t.update,Ko)}}const Xb={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:jb,data:{}};var zb={left:"right",right:"left",bottom:"top",top:"bottom"};function Wo(i){return i.replace(/left|right|bottom|top/g,function(e){return zb[e]})}var Zb={start:"end",end:"start"};function Og(i){return i.replace(/start|end/g,function(e){return Zb[e]})}function Mc(i){var e=Vt(i),t=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:t,scrollTop:r}}function Fc(i){return en(nr(i)).left+Mc(i).scrollLeft}function eS(i,e){var t=Vt(i),r=nr(i),n=t.visualViewport,s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(n){s=n.width,o=n.height;var c=Dg();(c||!c&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:s,height:o,x:a+Fc(i),y:l}}function tS(i){var e,t=nr(i),r=Mc(i),n=(e=i.ownerDocument)==null?void 0:e.body,s=xr(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),o=xr(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-r.scrollLeft+Fc(i),l=-r.scrollTop;return Fi(n||t).direction==="rtl"&&(a+=xr(t.clientWidth,n?n.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}function Pc(i){var e=Fi(i),t=e.overflow,r=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+n+r)}function Ug(i){return["html","body","#document"].indexOf(yi(i))>=0?i.ownerDocument.body:ti(i)&&Pc(i)?i:Ug(Vo(i))}function ss(i,e){var t;e===void 0&&(e=[]);var r=Ug(i),n=r===((t=i.ownerDocument)==null?void 0:t.body),s=Vt(r),o=n?[s].concat(s.visualViewport||[],Pc(r)?r:[]):r,a=e.concat(o);return n?a:a.concat(ss(Vo(o)))}function Nc(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function iS(i,e){var t=en(i,!1,e==="fixed");return t.top=t.top+i.clientTop,t.left=t.left+i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top,t}function Gg(i,e,t){return e===Qg?Nc(eS(i,t)):Sr(e)?iS(e,t):Nc(tS(nr(i)))}function rS(i){var e=ss(Vo(i)),t=["absolute","fixed"].indexOf(Fi(i).position)>=0,r=t&&ti(i)?rs(i):i;return Sr(r)?e.filter(function(n){return Sr(n)&&Lg(n,r)&&yi(n)!=="body"}):[]}function nS(i,e,t,r){var n=e==="clippingParents"?rS(i):[].concat(e),s=[].concat(n,[t]),o=s[0],a=s.reduce(function(l,c){var u=Gg(i,c,r);return l.top=xr(u.top,l.top),l.right=Yo(u.right,l.right),l.bottom=Yo(u.bottom,l.bottom),l.left=xr(u.left,l.left),l},Gg(i,o,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function $g(i){var e=i.reference,t=i.element,r=i.placement,n=r?Ci(r):null,s=r?tn(r):null,o=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2,l;switch(n){case Ut:l={x:o,y:e.y-t.height};break;case Zt:l={x:o,y:e.y+e.height};break;case ei:l={x:e.x+e.width,y:a};break;case Gt:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var c=n?kc(n):null;if(c!=null){var u=c==="y"?"height":"width";switch(s){case zr:l[c]=l[c]-(e[u]/2-t[u]/2);break;case ts:l[c]=l[c]+(e[u]/2-t[u]/2);break}}return l}function os(i,e){e===void 0&&(e={});var t=e,r=t.placement,n=r===void 0?i.placement:r,s=t.strategy,o=s===void 0?i.strategy:s,a=t.boundary,l=a===void 0?bb:a,c=t.rootBoundary,u=c===void 0?Qg:c,A=t.elementContext,h=A===void 0?is:A,d=t.altBoundary,f=d===void 0?!1:d,g=t.padding,p=g===void 0?0:g,v=Fg(typeof p!="number"?p:Pg(p,es)),B=h===is?Sb:is,C=i.rects.popper,y=i.elements[f?B:h],x=nS(Sr(y)?y:y.contextElement||nr(i.elements.popper),l,u,o),w=en(i.elements.reference),D=$g({reference:w,element:C,placement:n}),F=Nc(Object.assign({},C,D)),O=h===is?F:w,M={top:x.top-O.top+v.top,bottom:O.bottom-x.bottom+v.bottom,left:x.left-O.left+v.left,right:O.right-x.right+v.right},j=i.modifiersData.offset;if(h===is&&j){var X=j[n];Object.keys(M).forEach(function(le){var oe=[ei,Zt].indexOf(le)>=0?1:-1,L=[Ut,Zt].indexOf(le)>=0?"y":"x";M[le]+=X[L]*oe})}return M}function sS(i,e){e===void 0&&(e={});var t=e,r=t.placement,n=t.boundary,s=t.rootBoundary,o=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=l===void 0?wg:l,u=tn(r),A=u?a?_g:_g.filter(function(f){return tn(f)===u}):es,h=A.filter(function(f){return c.indexOf(f)>=0});h.length===0&&(h=A);var d=h.reduce(function(f,g){return f[g]=os(i,{placement:g,boundary:n,rootBoundary:s,padding:o})[Ci(g)],f},{});return Object.keys(d).sort(function(f,g){return d[f]-d[g]})}function oS(i){if(Ci(i)===wc)return[];var e=Wo(i);return[Og(i),e,Og(e)]}function aS(i){var e=i.state,t=i.options,r=i.name;if(!e.modifiersData[r]._skip){for(var n=t.mainAxis,s=n===void 0?!0:n,o=t.altAxis,a=o===void 0?!0:o,l=t.fallbackPlacements,c=t.padding,u=t.boundary,A=t.rootBoundary,h=t.altBoundary,d=t.flipVariations,f=d===void 0?!0:d,g=t.allowedAutoPlacements,p=e.options.placement,v=Ci(p),B=v===p,C=l||(B||!f?[Wo(p)]:oS(p)),y=[p].concat(C).reduce(function(re,he){return re.concat(Ci(he)===wc?sS(e,{placement:he,boundary:u,rootBoundary:A,padding:c,flipVariations:f,allowedAutoPlacements:g}):he)},[]),x=e.rects.reference,w=e.rects.popper,D=new Map,F=!0,O=y[0],M=0;M<y.length;M++){var j=y[M],X=Ci(j),le=tn(j)===zr,oe=[Ut,Zt].indexOf(X)>=0,L=oe?"width":"height",U=os(e,{placement:j,boundary:u,rootBoundary:A,altBoundary:h,padding:c}),q=oe?le?ei:Gt:le?Zt:Ut;x[L]>w[L]&&(q=Wo(q));var R=Wo(q),_=[];if(s&&_.push(U[X]<=0),a&&_.push(U[q]<=0,U[R]<=0),_.every(function(re){return re})){O=j,F=!1;break}D.set(j,_)}if(F)for(var k=f?3:1,K=function(he){var fe=y.find(function(_e){var be=D.get(_e);if(be)return be.slice(0,he).every(function(Fe){return Fe})});if(fe)return O=fe,"break"},Y=k;Y>0;Y--){var ie=K(Y);if(ie==="break")break}e.placement!==O&&(e.modifiersData[r]._skip=!0,e.placement=O,e.reset=!0)}}const lS={name:"flip",enabled:!0,phase:"main",fn:aS,requiresIfExists:["offset"],data:{_skip:!1}};function Hg(i,e,t){return t===void 0&&(t={x:0,y:0}),{top:i.top-e.height-t.y,right:i.right-e.width+t.x,bottom:i.bottom-e.height+t.y,left:i.left-e.width-t.x}}function Yg(i){return[Ut,ei,Zt,Gt].some(function(e){return i[e]>=0})}function cS(i){var e=i.state,t=i.name,r=e.rects.reference,n=e.rects.popper,s=e.modifiersData.preventOverflow,o=os(e,{elementContext:"reference"}),a=os(e,{altBoundary:!0}),l=Hg(o,r),c=Hg(a,n,s),u=Yg(l),A=Yg(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:A},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":A})}const AS={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:cS};function uS(i,e,t){var r=Ci(i),n=[Gt,Ut].indexOf(r)>=0?-1:1,s=typeof t=="function"?t(Object.assign({},e,{placement:i})):t,o=s[0],a=s[1];return o=o||0,a=(a||0)*n,[Gt,ei].indexOf(r)>=0?{x:a,y:o}:{x:o,y:a}}function hS(i){var e=i.state,t=i.options,r=i.name,n=t.offset,s=n===void 0?[0,0]:n,o=wg.reduce(function(u,A){return u[A]=uS(A,e.rects,s),u},{}),a=o[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=o}const dS={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:hS};function fS(i){var e=i.state,t=i.name;e.modifiersData[t]=$g({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const gS={name:"popperOffsets",enabled:!0,phase:"read",fn:fS,data:{}};function pS(i){return i==="x"?"y":"x"}function mS(i){var e=i.state,t=i.options,r=i.name,n=t.mainAxis,s=n===void 0?!0:n,o=t.altAxis,a=o===void 0?!1:o,l=t.boundary,c=t.rootBoundary,u=t.altBoundary,A=t.padding,h=t.tether,d=h===void 0?!0:h,f=t.tetherOffset,g=f===void 0?0:f,p=os(e,{boundary:l,rootBoundary:c,padding:A,altBoundary:u}),v=Ci(e.placement),B=tn(e.placement),C=!B,y=kc(v),x=pS(y),w=e.modifiersData.popperOffsets,D=e.rects.reference,F=e.rects.popper,O=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,M=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),j=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,X={x:0,y:0};if(w){if(s){var le,oe=y==="y"?Ut:Gt,L=y==="y"?Zt:ei,U=y==="y"?"height":"width",q=w[y],R=q+p[oe],_=q-p[L],k=d?-F[U]/2:0,K=B===zr?D[U]:F[U],Y=B===zr?-F[U]:-D[U],ie=e.elements.arrow,re=d&&ie?Lc(ie):{width:0,height:0},he=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Mg(),fe=he[oe],_e=he[L],be=ns(0,D[U],re[U]),Fe=C?D[U]/2-k-be-fe-M.mainAxis:K-be-fe-M.mainAxis,pe=C?-D[U]/2+k+be+_e+M.mainAxis:Y+be+_e+M.mainAxis,Qe=e.elements.arrow&&rs(e.elements.arrow),Ne=Qe?y==="y"?Qe.clientTop||0:Qe.clientLeft||0:0,Re=(le=j==null?void 0:j[y])!=null?le:0,Ke=q+Fe-Re-Ne,Se=q+pe-Re,ye=ns(d?Yo(R,Ke):R,q,d?xr(_,Se):_);w[y]=ye,X[y]=ye-q}if(a){var ke,Ue=y==="x"?Ut:Gt,Xe=y==="x"?Zt:ei,Ge=w[x],$e=x==="y"?"height":"width",Ce=Ge+p[Ue],tt=Ge-p[Xe],ot=[Ut,Gt].indexOf(v)!==-1,et=(ke=j==null?void 0:j[x])!=null?ke:0,ze=ot?Ce:Ge-D[$e]-F[$e]-et+M.altAxis,T=ot?Ge+D[$e]+F[$e]-et-M.altAxis:tt,m=d&&ot?Gb(ze,Ge,T):ns(d?ze:Ce,Ge,d?T:tt);w[x]=m,X[x]=m-Ge}e.modifiersData[r]=X}}const ES={name:"preventOverflow",enabled:!0,phase:"main",fn:mS,requiresIfExists:["offset"]};function IS(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function vS(i){return i===Vt(i)||!ti(i)?Mc(i):IS(i)}function yS(i){var e=i.getBoundingClientRect(),t=Zr(e.width)/i.offsetWidth||1,r=Zr(e.height)/i.offsetHeight||1;return t!==1||r!==1}function CS(i,e,t){t===void 0&&(t=!1);var r=ti(e),n=ti(e)&&yS(e),s=nr(e),o=en(i,n,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!t)&&((yi(e)!=="body"||Pc(s))&&(a=vS(e)),ti(e)?(l=en(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=Fc(s))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function BS(i){var e=new Map,t=new Set,r=[];i.forEach(function(s){e.set(s.name,s)});function n(s){t.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&n(l)}}),r.push(s)}return i.forEach(function(s){t.has(s.name)||n(s)}),r}function TS(i){var e=BS(i);return Fb.reduce(function(t,r){return t.concat(e.filter(function(n){return n.phase===r}))},[])}function bS(i){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(i())})})),e}}function SS(i){var e=i.reduce(function(t,r){var n=t[r.name];return t[r.name]=n?Object.assign({},n,r,{options:Object.assign({},n.options,r.options),data:Object.assign({},n.data,r.data)}):r,t},{});return Object.keys(e).map(function(t){return e[t]})}var Vg={placement:"bottom",modifiers:[],strategy:"absolute"};function Kg(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function xS(i){i===void 0&&(i={});var e=i,t=e.defaultModifiers,r=t===void 0?[]:t,n=e.defaultOptions,s=n===void 0?Vg:n;return function(a,l,c){c===void 0&&(c=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Vg,s),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},A=[],h=!1,d={state:u,setOptions:function(v){var B=typeof v=="function"?v(u.options):v;g(),u.options=Object.assign({},s,u.options,B),u.scrollParents={reference:Sr(a)?ss(a):a.contextElement?ss(a.contextElement):[],popper:ss(l)};var C=TS(SS([].concat(r,u.options.modifiers)));return u.orderedModifiers=C.filter(function(y){return y.enabled}),f(),d.update()},forceUpdate:function(){if(!h){var v=u.elements,B=v.reference,C=v.popper;if(Kg(B,C)){u.rects={reference:CS(B,rs(C),u.options.strategy==="fixed"),popper:Lc(C)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(M){return u.modifiersData[M.name]=Object.assign({},M.data)});for(var y=0;y<u.orderedModifiers.length;y++){if(u.reset===!0){u.reset=!1,y=-1;continue}var x=u.orderedModifiers[y],w=x.fn,D=x.options,F=D===void 0?{}:D,O=x.name;typeof w=="function"&&(u=w({state:u,options:F,name:O,instance:d})||u)}}}},update:bS(function(){return new Promise(function(p){d.forceUpdate(),p(u)})}),destroy:function(){g(),h=!0}};if(!Kg(a,l))return d;d.setOptions(c).then(function(p){!h&&c.onFirstUpdate&&c.onFirstUpdate(p)});function f(){u.orderedModifiers.forEach(function(p){var v=p.name,B=p.options,C=B===void 0?{}:B,y=p.effect;if(typeof y=="function"){var x=y({state:u,name:v,instance:d,options:C}),w=function(){};A.push(x||w)}})}function g(){A.forEach(function(p){return p()}),A=[]}return d}}var QS=[Xb,gS,Jb,Rg,dS,lS,ES,Vb,AS],_S=xS({defaultModifiers:QS}),wS="tippy-box",Wg="tippy-content",RS="tippy-backdrop",qg="tippy-arrow",Jg="tippy-svg-arrow",Qr={passive:!0,capture:!0},jg=function(){return document.body};function Oc(i,e,t){if(Array.isArray(i)){var r=i[e];return r??(Array.isArray(t)?t[e]:t)}return i}function Uc(i,e){var t={}.toString.call(i);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function Xg(i,e){return typeof i=="function"?i.apply(void 0,e):i}function zg(i,e){if(e===0)return i;var t;return function(r){clearTimeout(t),t=setTimeout(function(){i(r)},e)}}function DS(i){return i.split(/\s+/).filter(Boolean)}function rn(i){return[].concat(i)}function Zg(i,e){i.indexOf(e)===-1&&i.push(e)}function LS(i){return i.filter(function(e,t){return i.indexOf(e)===t})}function kS(i){return i.split("-")[0]}function qo(i){return[].slice.call(i)}function e0(i){return Object.keys(i).reduce(function(e,t){return i[t]!==void 0&&(e[t]=i[t]),e},{})}function as(){return document.createElement("div")}function Jo(i){return["Element","Fragment"].some(function(e){return Uc(i,e)})}function MS(i){return Uc(i,"NodeList")}function FS(i){return Uc(i,"MouseEvent")}function PS(i){return!!(i&&i._tippy&&i._tippy.reference===i)}function NS(i){return Jo(i)?[i]:MS(i)?qo(i):Array.isArray(i)?i:qo(document.querySelectorAll(i))}function Gc(i,e){i.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function t0(i,e){i.forEach(function(t){t&&t.setAttribute("data-state",e)})}function OS(i){var e,t=rn(i),r=t[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function US(i,e){var t=e.clientX,r=e.clientY;return i.every(function(n){var s=n.popperRect,o=n.popperState,a=n.props,l=a.interactiveBorder,c=kS(o.placement),u=o.modifiersData.offset;if(!u)return!0;var A=c==="bottom"?u.top.y:0,h=c==="top"?u.bottom.y:0,d=c==="right"?u.left.x:0,f=c==="left"?u.right.x:0,g=s.top-r+A>l,p=r-s.bottom-h>l,v=s.left-t+d>l,B=t-s.right-f>l;return g||p||v||B})}function $c(i,e,t){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(n){i[r](n,t)})}function i0(i,e){for(var t=e;t;){var r;if(i.contains(t))return!0;t=t.getRootNode==null||(r=t.getRootNode())==null?void 0:r.host}return!1}var Bi={isTouch:!1},r0=0;function GS(){Bi.isTouch||(Bi.isTouch=!0,window.performance&&document.addEventListener("mousemove",n0))}function n0(){var i=performance.now();i-r0<20&&(Bi.isTouch=!1,document.removeEventListener("mousemove",n0)),r0=i}function $S(){var i=document.activeElement;if(PS(i)){var e=i._tippy;i.blur&&!e.state.isVisible&&i.blur()}}function HS(){document.addEventListener("touchstart",GS,Qr),window.addEventListener("blur",$S)}var YS=typeof window<"u"&&typeof document<"u",VS=YS?!!window.msCrypto:!1,KS={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},WS={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ai=Object.assign({appendTo:jg,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},KS,WS),qS=Object.keys(ai),JS=function(e){var t=Object.keys(e);t.forEach(function(r){ai[r]=e[r]})};function s0(i){var e=i.plugins||[],t=e.reduce(function(r,n){var s=n.name,o=n.defaultValue;if(s){var a;r[s]=i[s]!==void 0?i[s]:(a=ai[s])!=null?a:o}return r},{});return Object.assign({},i,t)}function jS(i,e){var t=e?Object.keys(s0(Object.assign({},ai,{plugins:e}))):qS,r=t.reduce(function(n,s){var o=(i.getAttribute("data-tippy-"+s)||"").trim();if(!o)return n;if(s==="content")n[s]=o;else try{n[s]=JSON.parse(o)}catch{n[s]=o}return n},{});return r}function o0(i,e){var t=Object.assign({},e,{content:Xg(e.content,[i])},e.ignoreAttributes?{}:jS(i,e.plugins));return t.aria=Object.assign({},ai.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}var XS=function(){return"innerHTML"};function Hc(i,e){i[XS()]=e}function a0(i){var e=as();return i===!0?e.className=qg:(e.className=Jg,Jo(i)?e.appendChild(i):Hc(e,i)),e}function l0(i,e){Jo(e.content)?(Hc(i,""),i.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Hc(i,e.content):i.textContent=e.content)}function Yc(i){var e=i.firstElementChild,t=qo(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(Wg)}),arrow:t.find(function(r){return r.classList.contains(qg)||r.classList.contains(Jg)}),backdrop:t.find(function(r){return r.classList.contains(RS)})}}function c0(i){var e=as(),t=as();t.className=wS,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=as();r.className=Wg,r.setAttribute("data-state","hidden"),l0(r,i.props),e.appendChild(t),t.appendChild(r),n(i.props,i.props);function n(s,o){var a=Yc(e),l=a.box,c=a.content,u=a.arrow;o.theme?l.setAttribute("data-theme",o.theme):l.removeAttribute("data-theme"),typeof o.animation=="string"?l.setAttribute("data-animation",o.animation):l.removeAttribute("data-animation"),o.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof o.maxWidth=="number"?o.maxWidth+"px":o.maxWidth,o.role?l.setAttribute("role",o.role):l.removeAttribute("role"),(s.content!==o.content||s.allowHTML!==o.allowHTML)&&l0(c,i.props),o.arrow?u?s.arrow!==o.arrow&&(l.removeChild(u),l.appendChild(a0(o.arrow))):l.appendChild(a0(o.arrow)):u&&l.removeChild(u)}return{popper:e,onUpdate:n}}c0.$$tippy=!0;var zS=1,jo=[],Vc=[];function ZS(i,e){var t=o0(i,Object.assign({},ai,s0(e0(e)))),r,n,s,o=!1,a=!1,l=!1,c=!1,u,A,h,d=[],f=zg(Ke,t.interactiveDebounce),g,p=zS++,v=null,B=LS(t.plugins),C={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},y={id:p,reference:i,popper:as(),popperInstance:v,props:t,state:C,plugins:B,clearDelayTimeouts:ze,setProps:T,setContent:m,show:E,hide:Q,hideWithInteractivity:N,enable:ot,disable:et,unmount:J,destroy:z};if(!t.render)return y;var x=t.render(y),w=x.popper,D=x.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+y.id,y.popper=w,i._tippy=y,w._tippy=y;var F=B.map(function($){return $.fn(y)}),O=i.hasAttribute("aria-expanded");return Qe(),k(),q(),R("onCreate",[y]),t.showOnCreate&&Ce(),w.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),w.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&oe().addEventListener("mousemove",f)}),y;function M(){var $=y.props.touch;return Array.isArray($)?$:[$,0]}function j(){return M()[0]==="hold"}function X(){var $;return!!(($=y.props.render)!=null&&$.$$tippy)}function le(){return g||i}function oe(){var $=le().parentNode;return $?OS($):document}function L(){return Yc(w)}function U($){return y.state.isMounted&&!y.state.isVisible||Bi.isTouch||u&&u.type==="focus"?0:Oc(y.props.delay,$?0:1,ai.delay)}function q($){$===void 0&&($=!1),w.style.pointerEvents=y.props.interactive&&!$?"":"none",w.style.zIndex=""+y.props.zIndex}function R($,ae,ue){if(ue===void 0&&(ue=!0),F.forEach(function(me){me[$]&&me[$].apply(me,ae)}),ue){var ve;(ve=y.props)[$].apply(ve,ae)}}function _(){var $=y.props.aria;if($.content){var ae="aria-"+$.content,ue=w.id,ve=rn(y.props.triggerTarget||i);ve.forEach(function(me){var nt=me.getAttribute(ae);if(y.state.isVisible)me.setAttribute(ae,nt?nt+" "+ue:ue);else{var Lt=nt&&nt.replace(ue,"").trim();Lt?me.setAttribute(ae,Lt):me.removeAttribute(ae)}})}}function k(){if(!(O||!y.props.aria.expanded)){var $=rn(y.props.triggerTarget||i);$.forEach(function(ae){y.props.interactive?ae.setAttribute("aria-expanded",y.state.isVisible&&ae===le()?"true":"false"):ae.removeAttribute("aria-expanded")})}}function K(){oe().removeEventListener("mousemove",f),jo=jo.filter(function($){return $!==f})}function Y($){if(!(Bi.isTouch&&(l||$.type==="mousedown"))){var ae=$.composedPath&&$.composedPath()[0]||$.target;if(!(y.props.interactive&&i0(w,ae))){if(rn(y.props.triggerTarget||i).some(function(ue){return i0(ue,ae)})){if(Bi.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else R("onClickOutside",[y,$]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),a=!0,setTimeout(function(){a=!1}),y.state.isMounted||fe())}}}function ie(){l=!0}function re(){l=!1}function he(){var $=oe();$.addEventListener("mousedown",Y,!0),$.addEventListener("touchend",Y,Qr),$.addEventListener("touchstart",re,Qr),$.addEventListener("touchmove",ie,Qr)}function fe(){var $=oe();$.removeEventListener("mousedown",Y,!0),$.removeEventListener("touchend",Y,Qr),$.removeEventListener("touchstart",re,Qr),$.removeEventListener("touchmove",ie,Qr)}function _e($,ae){Fe($,function(){!y.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&ae()})}function be($,ae){Fe($,ae)}function Fe($,ae){var ue=L().box;function ve(me){me.target===ue&&($c(ue,"remove",ve),ae())}if($===0)return ae();$c(ue,"remove",A),$c(ue,"add",ve),A=ve}function pe($,ae,ue){ue===void 0&&(ue=!1);var ve=rn(y.props.triggerTarget||i);ve.forEach(function(me){me.addEventListener($,ae,ue),d.push({node:me,eventType:$,handler:ae,options:ue})})}function Qe(){j()&&(pe("touchstart",Re,{passive:!0}),pe("touchend",Se,{passive:!0})),DS(y.props.trigger).forEach(function($){if($!=="manual")switch(pe($,Re),$){case"mouseenter":pe("mouseleave",Se);break;case"focus":pe(VS?"focusout":"blur",ye);break;case"focusin":pe("focusout",ye);break}})}function Ne(){d.forEach(function($){var ae=$.node,ue=$.eventType,ve=$.handler,me=$.options;ae.removeEventListener(ue,ve,me)}),d=[]}function Re($){var ae,ue=!1;if(!(!y.state.isEnabled||ke($)||a)){var ve=((ae=u)==null?void 0:ae.type)==="focus";u=$,g=$.currentTarget,k(),!y.state.isVisible&&FS($)&&jo.forEach(function(me){return me($)}),$.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||o)&&y.props.hideOnClick!==!1&&y.state.isVisible?ue=!0:Ce($),$.type==="click"&&(o=!ue),ue&&!ve&&tt($)}}function Ke($){var ae=$.target,ue=le().contains(ae)||w.contains(ae);if(!($.type==="mousemove"&&ue)){var ve=$e().concat(w).map(function(me){var nt,Lt=me._tippy,kt=(nt=Lt.popperInstance)==null?void 0:nt.state;return kt?{popperRect:me.getBoundingClientRect(),popperState:kt,props:t}:null}).filter(Boolean);US(ve,$)&&(K(),tt($))}}function Se($){var ae=ke($)||y.props.trigger.indexOf("click")>=0&&o;if(!ae){if(y.props.interactive){y.hideWithInteractivity($);return}tt($)}}function ye($){y.props.trigger.indexOf("focusin")<0&&$.target!==le()||y.props.interactive&&$.relatedTarget&&w.contains($.relatedTarget)||tt($)}function ke($){return Bi.isTouch?j()!==$.type.indexOf("touch")>=0:!1}function Ue(){Xe();var $=y.props,ae=$.popperOptions,ue=$.placement,ve=$.offset,me=$.getReferenceClientRect,nt=$.moveTransition,Lt=X()?Yc(w).arrow:null,kt=me?{getBoundingClientRect:me,contextElement:me.contextElement||le()}:i,ln={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(cn){var lr=cn.state;if(X()){var fs=L(),gs=fs.box;["placement","reference-hidden","escaped"].forEach(function(An){An==="placement"?gs.setAttribute("data-placement",lr.placement):lr.attributes.popper["data-popper-"+An]?gs.setAttribute("data-"+An,""):gs.removeAttribute("data-"+An)}),lr.attributes.popper={}}}},Mt=[{name:"offset",options:{offset:ve}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!nt}},ln];X()&&Lt&&Mt.push({name:"arrow",options:{element:Lt,padding:3}}),Mt.push.apply(Mt,(ae==null?void 0:ae.modifiers)||[]),y.popperInstance=_S(kt,w,Object.assign({},ae,{placement:ue,onFirstUpdate:h,modifiers:Mt}))}function Xe(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Ge(){var $=y.props.appendTo,ae,ue=le();y.props.interactive&&$===jg||$==="parent"?ae=ue.parentNode:ae=Xg($,[ue]),ae.contains(w)||ae.appendChild(w),y.state.isMounted=!0,Ue()}function $e(){return qo(w.querySelectorAll("[data-tippy-root]"))}function Ce($){y.clearDelayTimeouts(),$&&R("onTrigger",[y,$]),he();var ae=U(!0),ue=M(),ve=ue[0],me=ue[1];Bi.isTouch&&ve==="hold"&&me&&(ae=me),ae?r=setTimeout(function(){y.show()},ae):y.show()}function tt($){if(y.clearDelayTimeouts(),R("onUntrigger",[y,$]),!y.state.isVisible){fe();return}if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf($.type)>=0&&o)){var ae=U(!1);ae?n=setTimeout(function(){y.state.isVisible&&y.hide()},ae):s=requestAnimationFrame(function(){y.hide()})}}function ot(){y.state.isEnabled=!0}function et(){y.hide(),y.state.isEnabled=!1}function ze(){clearTimeout(r),clearTimeout(n),cancelAnimationFrame(s)}function T($){if(!y.state.isDestroyed){R("onBeforeUpdate",[y,$]),Ne();var ae=y.props,ue=o0(i,Object.assign({},ae,e0($),{ignoreAttributes:!0}));y.props=ue,Qe(),ae.interactiveDebounce!==ue.interactiveDebounce&&(K(),f=zg(Ke,ue.interactiveDebounce)),ae.triggerTarget&&!ue.triggerTarget?rn(ae.triggerTarget).forEach(function(ve){ve.removeAttribute("aria-expanded")}):ue.triggerTarget&&i.removeAttribute("aria-expanded"),k(),q(),D&&D(ae,ue),y.popperInstance&&(Ue(),$e().forEach(function(ve){requestAnimationFrame(ve._tippy.popperInstance.forceUpdate)})),R("onAfterUpdate",[y,$])}}function m($){y.setProps({content:$})}function E(){var $=y.state.isVisible,ae=y.state.isDestroyed,ue=!y.state.isEnabled,ve=Bi.isTouch&&!y.props.touch,me=Oc(y.props.duration,0,ai.duration);if(!($||ae||ue||ve)&&!le().hasAttribute("disabled")&&(R("onShow",[y],!1),y.props.onShow(y)!==!1)){if(y.state.isVisible=!0,X()&&(w.style.visibility="visible"),q(),he(),y.state.isMounted||(w.style.transition="none"),X()){var nt=L(),Lt=nt.box,kt=nt.content;Gc([Lt,kt],0)}h=function(){var Mt;if(!(!y.state.isVisible||c)){if(c=!0,w.offsetHeight,w.style.transition=y.props.moveTransition,X()&&y.props.animation){var Lr=L(),cn=Lr.box,lr=Lr.content;Gc([cn,lr],me),t0([cn,lr],"visible")}_(),k(),Zg(Vc,y),(Mt=y.popperInstance)==null||Mt.forceUpdate(),R("onMount",[y]),y.props.animation&&X()&&be(me,function(){y.state.isShown=!0,R("onShown",[y])})}},Ge()}}function Q(){var $=!y.state.isVisible,ae=y.state.isDestroyed,ue=!y.state.isEnabled,ve=Oc(y.props.duration,1,ai.duration);if(!($||ae||ue)&&(R("onHide",[y],!1),y.props.onHide(y)!==!1)){if(y.state.isVisible=!1,y.state.isShown=!1,c=!1,o=!1,X()&&(w.style.visibility="hidden"),K(),fe(),q(!0),X()){var me=L(),nt=me.box,Lt=me.content;y.props.animation&&(Gc([nt,Lt],ve),t0([nt,Lt],"hidden"))}_(),k(),y.props.animation?X()&&_e(ve,y.unmount):y.unmount()}}function N($){oe().addEventListener("mousemove",f),Zg(jo,f),f($)}function J(){y.state.isVisible&&y.hide(),y.state.isMounted&&(Xe(),$e().forEach(function($){$._tippy.unmount()}),w.parentNode&&w.parentNode.removeChild(w),Vc=Vc.filter(function($){return $!==y}),y.state.isMounted=!1,R("onHidden",[y]))}function z(){y.state.isDestroyed||(y.clearDelayTimeouts(),y.unmount(),Ne(),delete i._tippy,y.state.isDestroyed=!0,R("onDestroy",[y]))}}function _r(i,e){e===void 0&&(e={});var t=ai.plugins.concat(e.plugins||[]);HS();var r=Object.assign({},e,{plugins:t}),n=NS(i),s=n.reduce(function(o,a){var l=a&&ZS(a,r);return l&&o.push(l),o},[]);return Jo(i)?s[0]:s}_r.defaultProps=ai,_r.setDefaultProps=JS,_r.currentInput=Bi,Object.assign({},Rg,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}}),_r.setDefaultProps({render:c0});function ii(i,e){return`${i}-${e}`}function Ti(i){var e,t;const r=[];return(((e=i.renderer)==null?void 0:e.type)==="video"||((t=i.renderer)==null?void 0:t.type)==="audio")&&r.push({...i.config,...i.options}),r.push(...i.childNodes.flatMap(Ti).filter(Boolean)),r}class Xo extends Error{constructor(e,t=new Error,r=!1){super(),this.fatal=!1,this.fatal=r,this.stack=t.stack,this.message=[e,t.message].filter(Boolean).join(" - ")}}function sr(i,e,t){return Math.min(Math.max(e,i),t)}const ex=5;function tx(i,e){return i.length!==e.length||i.some((t,r)=>t!==e[r])}class ix{constructor(e){this._caption="",this._currentTime=0,this._activeScenes=[],this._upcomingScenes=[],this._canvas=xt(),this._controls=xt(),this.host=e}set activeScenes(e){tx(e,this._activeScenes)&&(this._activeScenes=e,this.host.dispatchEvent(new CustomEvent("scenechange",{detail:e})),this.host.requestUpdate())}get activeScenes(){return this._activeScenes}set currentTime(e){var t,r,n;const s=sr(0,e,this.host.duration);this.activeScenes=((t=this.host.composition)==null?void 0:t.tracks.reduce((a,l)=>a.concat(l.scenes.filter(({start:c,duration:u})=>s>=c&&s<c+u)),[]))??[];const o=s!==this.currentTime;this._currentTime=s,this._upcomingScenes=((r=this.host.composition)==null?void 0:r.tracks.reduce((a,l)=>a.concat(l.scenes.filter(({start:c})=>s>=c-ex&&s<c)),[]))??[],this.loadScenes(),this.syncMediaState(),(n=this._controls.value)==null||n.setAttribute("currentTime",s.toString()),o&&this.host.dispatchEvent(new CustomEvent("timeupdate",{detail:s})),this.draw(s)}get currentTime(){return this._currentTime}set caption(e){e!==this._caption&&(this._caption=e,this.host.requestUpdate())}get caption(){return this._caption}canvas(){return Qt(this._canvas)}controls(){return Qt(this._controls)}loadScenes(){[...this.activeScenes,...this._upcomingScenes].forEach(e=>{Ti(e.layout.node).forEach(({key:r})=>{var n,s,o;const{id:a,start:l,duration:c}=e,u=this.host.currentTime>0||this.host.preload==="auto"||!this.host.paused,A=ii(a,r);if(this.host.media[A]){const h=this.host.media[A],{speed:d,volume:f,hls:g,node:p,start:v,duration:B}=h,C=this.host.mediaState[A];p&&C&&(p.currentTime>=v+B||p.ended||u&&(g?(n=g.startLoadOnce)==null||n.call(g,v):C.initialised||(s=p.startLoadOnce)==null||s.call(p),p.volume=sr(0,this.host.volume*(f??1),1),p.playbackRate=sr(.1,this.host.playbackRate*(d??1),4)))}else if(u){const h=`${l}-${c}`,d=this.host._sceneController.mediaState[h];this.host.duration&&!((o=d==null?void 0:d.buffered)!=null&&o.length)&&(this.host._sceneController.mediaState={...this.host._sceneController.mediaState,[h]:{...d,buffered:[{start:Math.max(0,l/this.host.duration*100),end:Math.min((l+c)/this.host.duration*100,100)}]}})}})})}syncMediaState(){var e;return Promise.all(((e=this.host.composition)==null?void 0:e.tracks.flatMap(t=>t.scenes.flatMap(r=>Ti(r.layout.node).map(async({key:s})=>{const o=ii(r.id,s);if(this.host.media[o]){const a=this.host.media[o],{node:l}=a,c=this.host.mediaState[o];if(!this.activeScenes.includes(r))l.paused||l.pause();else if(c&&!this.host.waiting&&!this.host.loading&&!this.host.paused&&l.paused&&c.initialised)try{await l.play()}catch(A){throw new Xo("Video play error",A,!0)}}}))))??[])}draw(e=this.currentTime){this.host.composition&&this._canvas.value&&this.host.composition.draw({currentTime:e,canvas:this._canvas.value})}clear(){var e;const t=this._canvas.value;(e=t==null?void 0:t.getContext("2d"))==null||e.clearRect(0,0,t.width,t.height)}}const rx=Er(async function(e){const{weight:t,family:r}=e,{client:n,server:s}=r.weights.find(a=>a.weight===t)??{};return!n&&!s?null:new FontFace(e.family.name,`url(${n??s})`,{weight:t,style:"normal"}).load()},{cacheKey:([i])=>JSON.stringify(i)}),nx=Er(async({options:i})=>{const e=await rx(i.font);return e&&document.fonts.add(e),{font:i.font}}),sx=Er(async({config:i})=>i.src?new Promise((e,t)=>{const r=new Image;r.crossOrigin="anonymous",r.onload=()=>{e({image:r})},r.onerror=n=>{t(n)},r.src=i.src}):{image:null},{cacheKey:([{config:i}])=>JSON.stringify(i)});async function A0(i){return i.duration===1/0?new Promise(e=>{i.currentTime=Number.MAX_SAFE_INTEGER,i.ontimeupdate=()=>{i.ontimeupdate=null,e(i.duration),i.currentTime=0}}):i.duration}function ox(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function ax(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function lx({config:i,elementSize:e}){return new Promise(async t=>{let r=null;const{type:n,key:s,src:o,duration:a}=i;n==="video"?(r=document.createElement("video"),r.playsInline=!0,e&&(r.width=e.width,r.height=e.height)):r=document.createElement("audio"),r.muted=!0,r.loop=!1,r.crossOrigin="anonymous",r.src=o;let l=!1;if(r.startLoadOnce=()=>{l||(r.preload="auto",r.load(),l=!0)},n==="video"&&a&&i.aspectRatio)r.preload="none",t({key:s,hls:null,node:r,aspectRatio:i.aspectRatio,totalDuration:a});else{r.preload="metadata";const c=async()=>{const u=await A0(r),A=r instanceof HTMLVideoElement&&r.videoHeight>0?r.videoWidth/r.videoHeight:null;t({key:s,hls:null,node:r,totalDuration:u,aspectRatio:A}),r.removeEventListener("loadedmetadata",c)};r.addEventListener("loadedmetadata",c)}})}function cx({key:i,playlist:e,duration:t,elementSize:r}){return new Promise(n=>{const s=document.createElement("video");s instanceof HTMLVideoElement&&(r&&(s.width=r.width,s.height=r.height),s.playsInline=!0),s.muted=!0,s.loop=!1,s.crossOrigin="anonymous";let o=!1;const a=new vi({autoStartLoad:!0,capLevelToPlayerSize:!0,xhrSetup:l=>{const{open:c}=l,u=e.split("?")[1];l.open=function(A,h,d){u&&!h.toString().includes("?")&&(h+="?"+u),!(!o&&h.toString().includes(".ts"))&&c.apply(this,[A,h,d])}}});a.on(vi.Events.LEVEL_LOADED,async()=>{o||a==null||a.stopLoad();const l=t??await A0(s);n({key:i,hls:a,node:s,aspectRatio:a.levels[0].width/a.levels[0].height,totalDuration:l})}),a.loadSource(e),a.attachMedia(s),a.startLoadOnce=(l=-1,c)=>{if(a&&!o){const u=a.levels.findIndex(A=>Math.min(A.height,A.width)===c);o=!0,a.startLoad(l),u!==-1&&(a.currentLevel=u)}}})}function Ax({config:i,elementSize:e}){const{playlist:t}=i;return t&&!ox()&&vi.isSupported()?cx({key:i.key,playlist:t,duration:i.duration??0,elementSize:e}):lx({config:i,elementSize:e})}let ux=class{constructor(e){this._hasPlayed=!1,this._duration=0,this._composition=null,this._media={},this._mediaState={},this._compositionController=new AbortController,this._delayProcessing=(t=100)=>{const r=new AbortController,n=setTimeout(()=>{r.signal.aborted||(this.host._processing=!0)},t);return r.signal.addEventListener("abort",()=>{clearTimeout(n)}),r},this._mediaFactory=Er(async(t,r)=>{var n,s,o,a;const{key:l}=r,c=((s=(n=this.host.shadowRoot)==null?void 0:n.host)==null?void 0:s.clientWidth)??0,u=((a=(o=this.host.shadowRoot)==null?void 0:o.host)==null?void 0:a.clientHeight)??0,A=await Ax({config:r,elementSize:{width:c,height:u}}),h={loadeddata:this._handleLoadedData,waiting:this._handleWaiting,canplay:this._handleCanPlay,progress:this._handleProgress,seeking:this._handleSeeking,seeked:this._handleSeeked,play:this._handlePlay,playing:this._handlePlaying,pause:this._handlePause,stalled:this._handleStalled,timeupdate:this._handleTimeUpdate,ended:this._handleEnded,error:this._handleError},d=Object.keys(h).reduce((f,g)=>{const p=g,v=h[p]({id:t,key:l,node:A.node});return f[p]=v,A.node.addEventListener(g,v),f},{});return{media:A,listeners:d,aspectRatio:A.aspectRatio,source:()=>A.node}},{cacheKey:([t,{key:r,src:n,playlist:s}])=>JSON.stringify({id:t,key:r,src:n==null?void 0:n.split("?")[0],playlist:s==null?void 0:s.split("?")[0]})}),this._handleLoadedData=({id:t,key:r,node:n})=>()=>{const s=ii(t,r),o=this.mediaState[s];o!=null&&o.initialised||(this.mediaState={...this.mediaState,[s]:{...o,initialised:!0,waiting:!1,buffered:(o==null?void 0:o.buffered)??[]}},this.setMediaCurrentTime(this.host.currentTime),this.host.dispatchEvent(new CustomEvent("video:loadeddata",{detail:{id:t,key:r,node:n}})))},this._handleWaiting=({id:t,key:r,node:n})=>()=>{const s=ii(t,r),o=this.mediaState[s];o!=null&&o.initialised&&!(o!=null&&o.waiting)&&(this.mediaState={...this.mediaState,[s]:{...o,waiting:!0}},this.host.dispatchEvent(new CustomEvent("video:waiting",{detail:{id:t,key:r,node:n}})))},this._handleCanPlay=({id:t,key:r})=>()=>{const n=ii(t,r),s=this.mediaState[n];s!=null&&s.initialised&&(s!=null&&s.waiting)&&(this.mediaState={...this.mediaState,[n]:{...s,waiting:!1}}),this.host.paused&&this.host.draw()},this._handleProgress=()=>()=>{},this._handleSeeking=({id:t,key:r,node:n})=>()=>{this.host.dispatchEvent(new CustomEvent("video:seeking",{detail:{id:t,key:r,node:n}}))},this._handleSeeked=({id:t,key:r,node:n})=>()=>{const s=ii(t,r),o=this.mediaState[s];o!=null&&o.initialised&&(this.host.draw(),this.host.activeScenes.flatMap(a=>Ti(a.layout.node).map(({id:c})=>c)).includes(t)&&this.host.dispatchEvent(new CustomEvent("seeked",{detail:this.host.currentTime})),this.host.dispatchEvent(new CustomEvent("video:seeked",{detail:{id:t,key:r,node:n}})))},this._handlePlay=({id:t,key:r,node:n})=>()=>{this.hasPlayed=!0,this.host.dispatchEvent(new CustomEvent("video:play",{detail:{id:t,key:r,node:n}}))},this._handlePlaying=({id:t,key:r,node:n})=>()=>{this.host.dispatchEvent(new CustomEvent("video:playing",{detail:{id:t,key:r,node:n}}))},this._handlePause=({id:t,key:r,node:n})=>()=>{this.host.dispatchEvent(new CustomEvent("video:pause",{detail:{id:t,key:r,node:n}}))},this._handleStalled=({id:t,key:r,node:n})=>()=>{this.host.dispatchEvent(new CustomEvent("video:stalled",{detail:{id:t,key:r,node:n}}))},this._handleTimeUpdate=({id:t,key:r,node:n})=>()=>{this.host.dispatchEvent(new CustomEvent("video:timeupdate",{detail:{id:t,key:r,node:n}}))},this._handleEnded=({id:t,key:r,node:n})=>()=>{this.host.dispatchEvent(new CustomEvent("video:ended",{detail:{id:t,key:r,node:n}}))},this._handleError=({id:t,key:r,node:n})=>()=>{const s=new Xo(`Video error - answer ${t} failed to load`);this.host.dispatchEvent(new ErrorEvent("error",{bubbles:!0,composed:!0,error:s,message:s.message})),this.host.dispatchEvent(new CustomEvent("video:error",{detail:{id:t,key:r,node:n}}))},this._cleanupMedia=t=>{var r;const n=this.media[t];n&&(n.node.pause(),n.node.src="",(r=n.hls)==null||r.destroy(),Object.keys(n.listeners??{}).forEach(s=>{var o,a;if((o=this.media)!=null&&o[t]){const l=(a=n.listeners)==null?void 0:a[s];l&&n.node.removeEventListener(s,l)}}),delete this._media[t],delete this._mediaState[t])},this.host=e,this.host.addController(this)}set hasPlayed(e){e!==this._hasPlayed&&(this._hasPlayed=e,this.host.requestUpdate())}get hasPlayed(){return this._hasPlayed}set duration(e){!isNaN(e)&&e!==this._duration&&(this._duration=e,this.host.requestUpdate(),this.host.dispatchEvent(new CustomEvent("durationchange",{detail:this._duration})))}get duration(){return this._duration}set composition(e){e!==this._composition&&(this._composition=e,this.host.requestUpdate())}get composition(){return this._composition}set media(e){e!==this._media&&(this._media=e,this.host.requestUpdate())}get media(){return this._media}set mediaState(e){e!==this._mediaState&&(this._mediaState=e,this.host.requestUpdate())}get mediaState(){return this._mediaState}_setupTask(){new _s(this.host,async([e,t,r,n])=>{var s,o;this._compositionController.abort(),this._compositionController=new AbortController;const a=this._compositionController,l=this._delayProcessing();try{if(this.host._errors=[],(!t||!this.host._languages.find(({value:c})=>t===c))&&(this.host._language=(s=this.host._languages[0])==null?void 0:s.value),e){const{width:c,height:u}=fl({aspectRatio:r,resolution:1080});try{(o=this.composition)==null||o.cleanup();const f=await Nh({debug:n,config:e,resolvers:{text:nx,image:sx,video:async({id:g,config:p,options:v})=>{const{media:B,source:C}=await this._mediaFactory(g,{...p,...v});return{video:C,aspectRatio:B.aspectRatio}}},rootWidth:c,rootHeight:u});if(a.signal.aborted)return;this.composition=f}catch(f){throw new Xo("Fatal composition error",f,!0)}this.duration=this.composition.duration;const A={...this.media},h={...this.mediaState},d=[];for(const f of this.composition.tracks)for(const g of f.scenes){const p=Ti(g.layout.node);for(const v of p){const{media:B,listeners:C}=await this._mediaFactory(g.id,v),y=ii(g.id,B.key);d.push(y);const x=(v.startOffset??0)*B.totalDuration,w=(1-(v.endOffset??0))*B.totalDuration;A[y]={...B,listeners:C,start:x,duration:w-x,speed:v.speed??1,volume:v.volume??1},h[y]={initialised:!B,waiting:!!B,...this.mediaState[y]}}}this.media=A,this.mediaState=h,Object.keys(this.media).forEach(f=>{d.includes(f)||this.media[f].node.pause()}),this.host.currentTime>this.duration?this.host.reset(this.duration,!1):this.host.paused?this.host.reset(this.host.currentTime,!this.host.paused):this.setMediaCurrentTime(this.host.currentTime)}this.host.dispatchEvent(new CustomEvent("compositionupdate",{detail:this.composition,bubbles:!0,composed:!0}))}catch(c){this.composition=null,this.duration=0,this.host.dispatchEvent(new ErrorEvent("error",{composed:!0,bubbles:!0,error:c,message:c.message}))}finally{l.abort(),this.host._processing=!1}},()=>[this.host.config,this.host.language,this.host.aspectRatio,this.host.debug])}_setMediaCurrentTime({time:e,scene:t}){const{id:r,layout:n,start:s}=t;Ti(n.node).forEach(({key:a})=>{const l=ii(r,a);if(this.media[l]){const c=this.media[l],u=(e-s)*c.speed;c.node.currentTime=sr(c.start,u+c.start,c.start+c.duration)}})}setMediaCurrentTime(e){var t;(t=this.composition)==null||t.tracks.forEach(r=>{r.scenes.forEach(n=>{this._setMediaCurrentTime({time:e,scene:n})})})}hostConnected(){this._setupTask()}hostDisconnected(){Object.keys(this.media).forEach(e=>{this._cleanupMedia(e)}),this.media={}}};function hx(i){i.requestFullscreen?i.requestFullscreen():i.mozRequestFullScreen?i.mozRequestFullScreen():i.webkitRequestFullscreen?i.webkitRequestFullscreen():i.msRequestFullscreen&&i.msRequestFullscreen()}function dx(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}const Kc=["progress","play-large","navigation","play","volume","current-time","duration","speed","captions","fullscreen","preview"],fx={id:"captions",event:"captions:click",label:"Closed Captions"},gx={id:"fullscreen",event:"fullscreen:click",label:"Full Screen"},u0={title:"Playback Speed",items:[{id:"playback-rate-0.5",event:"playbackRate:click",label:"0.5x",value:.5},{id:"playback-rate-1",event:"playbackRate:click",label:"1.0x",value:1},{id:"playback-rate-1.5",event:"playbackRate:click",label:"1.5x",value:1.5},{id:"playback-rate-2",event:"playbackRate:click",label:"2.0x",value:2}]},px={id:"playbackRate",label:"Playback playbackRate",subItems:u0};class mx extends UA{constructor(e){if(super(e),this.element=null,this.observer=void 0,e.type!==Pr.ELEMENT)throw new Error("Resize directive must be used in an Element expression")}disconnected(){var e;(e=this.observer)==null||e.disconnect(),this.observer=void 0}reconnected(){var e;this.element&&((e=this.observer)==null||e.observe(this.element))}update(e,[t]){return this.isConnected&&!this.observer&&(this.observer=new ResizeObserver(t),this.element=e.element,this.observer.observe(this.element)),Vi}}const Wc=Nr(mx),Ex=Tb(()=>{const i=new FontFace("Roobert","url(https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/Roobert-Regular.woff2)",{style:"normal",weight:"400"}),e=new FontFace("Roobert","url(https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/Roobert-SemiBold.woff2)",{style:"normal",weight:"600"}),t=new FontFace("Roobert","url(https://vouch-clients.s3.ap-southeast-2.amazonaws.com/vouch/fonts/Roobert-Bold.woff2",{style:"normal",weight:"700"}),r=new FontFace("Roobert Captions","url(https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/Roobert-Regular.woff2)",{style:"normal",weight:"400"}),n=Rh.map(s=>({load:!1,font:new FontFace(s.family,`url(${s.url})`,{style:s.style})}));return[{load:!0,font:i},{load:!0,font:e},{load:!0,font:t},{load:!0,font:r},...n]}),bi={"red-120":"#feeded","red-130":"#fcd5d0","red-400":"#e84a4a","red-500":"#c51c3a","red-700":"#a21c39","red-800":"#850231","red-900":"#580A2D","teal-80":"#f3fafa","teal-100":"#d6f1f1","teal-200":"#ace3e3","teal-300":"#7acace","teal-400":"#4faab2","teal-500":"#358f97","teal-600":"#287179","teal-700":"#22555c","teal-800":"#21484e","teal-900":"#1f3d42","teal-950":"#0d2126","purple-100":"#d7cfff","purple-700":"#5f2fe9","green-200":"#a4d7aa","green-500":"#38b319","green-800":"#2b3c2f","grey-100":"#f0f0f0","light-50":"rgba(255, 255, 255, .05)","light-100":"rgba(255, 255, 255, .1)","light-200":"rgba(255, 255, 255, .2)","light-400":"rgba(255, 255, 255, .4)","light-500":"rgba(255, 255, 255, .5)","light-640":"rgba(255, 255, 255, .64)","light-800":"rgba(255, 255, 255, .8)","light-1000":"#fff","dark-50":"rgba(0, 0, 0, .05)","dark-80":"rgba(0, 0, 0, .08)","dark-100":"rgba(0, 0, 0, .1)","dark-200":"rgba(0, 0, 0, .2)","dark-250":"rgba(0, 0, 0, .25)","dark-400":"rgba(0, 0, 0, .4)","dark-500":"rgba(0, 0, 0, .5)","dark-640":"rgba(0, 0, 0, .64)","dark-800":"rgba(0, 0, 0, .8)","dark-900":"rgba(0, 0, 0, .9)","dark-1000":"#000"},Ix={colors:bi,space:{xxs:".25rem",xs:".5rem",small:".75rem",medium:"1rem",large:"1.5rem",xl:"2.5rem"},sizes:{xxs:"1rem",xs:"1.5rem",small:"2rem",medium:"2.5rem",large:"3rem"},fontWeights:{regular:400,semibold:600},lineHeights:{small:1.1,medium:1.25,large:1.4},letterSpacings:{xxs:"-.04rem",xs:"-.03rem",small:"-.02rem",medium:"-.01rem",large:0},fontSizes:{micro:".625rem",small:".75rem",medium:".875rem",large:"1rem",xl:"1.25rem",xxl:"1.5rem",xxxl:"2rem",huge:"2.75rem"},fontFamilies:{sans:'Roobert, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,"Noto Sans", "Noto Color Emoji", sans-serif, "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji"',mono:'"Maison Neue Mono", Menlo, Monaco, Consolas, Liberation Mono, "Courier New", monospace'},borderWidths:{thin:".0625rem"},radii:{small:".25rem",medium:".5rem",large:".75rem",xl:"1rem"},shadows:{small:`.25rem .25rem .25rem ${bi["dark-100"]}`,medium:`0 .125rem .625rem ${bi["dark-100"]}`,large:`0 .25rem 1rem ${bi["dark-50"]}`,xl:`.25rem .25rem 1rem ${bi["dark-250"]}`,xxl:`0 .25rem 2rem ${bi["dark-100"]}`,xxxl:`.25rem .25rem 3rem ${bi["dark-250"]}`,toolbar:`0 -.625rem .625rem ${bi["dark-50"]}`,text:`0 0 .25rem ${bi["dark-250"]}`},timings:{fast:".1s",normal:".2s",slow:".3s"},easings:{linear:"linear"},focusOutline:{width:".2rem",color:bi["dark-400"]},iconSizes:{small:"0.75rem",medium:"1rem",large:"1.5rem"}},h0=yb(Ix,{delimiter:"-"}),vx=Object.keys(h0).map(i=>pn(`:host { --${i}: ${h0[i]}; }`)),Je=(i=>{const e=class extends i{firstUpdated(){Ex().forEach(({load:s,font:o})=>{document.fonts.add(o),s&&o.load()})}};return e.styles=[(i==null?void 0:i.styles)??[],vx,pt`
2528
+ */const Sg=(i,e,t)=>{const r=new Map;for(let n=e;n<=t;n++)r.set(i[n],n);return r},xg=Nr(class extends bn{constructor(i){if(super(i),i.type!==Pr.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,e,t){let r;t===void 0?t=e:e!==void 0&&(r=e);const n=[],s=[];let o=0;for(const a of i)n[o]=r?r(a,o):o,s[o]=t(a,o),o++;return{values:s,keys:n}}render(i,e,t){return this.dt(i,e,t).values}update(i,[e,t,r]){const n=Cp(i),{values:s,keys:o}=this.dt(e,t,r);if(!Array.isArray(n))return this.ut=o,s;const a=this.ut??(this.ut=[]),l=[];let c,u,A=0,h=n.length-1,d=0,f=s.length-1;for(;A<=h&&d<=f;)if(n[A]===null)A++;else if(n[h]===null)h--;else if(a[A]===o[d])l[d]=pr(n[A],s[d]),A++,d++;else if(a[h]===o[f])l[f]=pr(n[h],s[f]),h--,f--;else if(a[A]===o[f])l[f]=pr(n[A],s[f]),Tn(i,l[f+1],n[A]),A++,f--;else if(a[h]===o[d])l[d]=pr(n[h],s[d]),Tn(i,n[A],n[h]),h--,d++;else if(c===void 0&&(c=Sg(o,d,f),u=Sg(a,A,h)),c.has(a[A]))if(c.has(a[h])){const g=u.get(o[d]),p=g!==void 0?n[g]:null;if(p===null){const v=Tn(i,n[A]);pr(v,s[d]),l[d]=v}else l[d]=pr(p,s[d]),Tn(i,n[A],p),n[g]=null;d++}else Ca(n[h]),h--;else Ca(n[A]),A++;for(;d<=f;){const g=Tn(i,l[f+1]);pr(g,s[d]),l[d++]=g}for(;A<=h;){const g=n[A++];g!==null&&Ca(g)}return this.ut=o,yp(i,l),$i}});var Ut="top",Zt="bottom",ei="right",Gt="left",wc="auto",es=[Ut,Zt,ei,Gt],zr="start",ts="end",bb="clippingParents",Qg="viewport",is="popper",Sb="reference",_g=es.reduce(function(i,e){return i.concat([e+"-"+zr,e+"-"+ts])},[]),wg=[].concat(es,[wc]).reduce(function(i,e){return i.concat([e,e+"-"+zr,e+"-"+ts])},[]),xb="beforeRead",Qb="read",_b="afterRead",wb="beforeMain",Rb="main",Db="afterMain",Lb="beforeWrite",kb="write",Mb="afterWrite",Fb=[xb,Qb,_b,wb,Rb,Db,Lb,kb,Mb];function yi(i){return i?(i.nodeName||"").toLowerCase():null}function Vt(i){if(i==null)return window;if(i.toString()!=="[object Window]"){var e=i.ownerDocument;return e&&e.defaultView||window}return i}function Sr(i){var e=Vt(i).Element;return i instanceof e||i instanceof Element}function ti(i){var e=Vt(i).HTMLElement;return i instanceof e||i instanceof HTMLElement}function Rc(i){if(typeof ShadowRoot>"u")return!1;var e=Vt(i).ShadowRoot;return i instanceof e||i instanceof ShadowRoot}function Pb(i){var e=i.state;Object.keys(e.elements).forEach(function(t){var r=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];!ti(s)||!yi(s)||(Object.assign(s.style,r),Object.keys(n).forEach(function(o){var a=n[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function Nb(i){var e=i.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(r){var n=e.elements[r],s=e.attributes[r]||{},o=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:t[r]),a=o.reduce(function(l,c){return l[c]="",l},{});!ti(n)||!yi(n)||(Object.assign(n.style,a),Object.keys(s).forEach(function(l){n.removeAttribute(l)}))})}}const Rg={name:"applyStyles",enabled:!0,phase:"write",fn:Pb,effect:Nb,requires:["computeStyles"]};function Ci(i){return i.split("-")[0]}var xr=Math.max,Yo=Math.min,Zr=Math.round;function Dc(){var i=navigator.userAgentData;return i!=null&&i.brands&&Array.isArray(i.brands)?i.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Dg(){return!/^((?!chrome|android).)*safari/i.test(Dc())}function en(i,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var r=i.getBoundingClientRect(),n=1,s=1;e&&ti(i)&&(n=i.offsetWidth>0&&Zr(r.width)/i.offsetWidth||1,s=i.offsetHeight>0&&Zr(r.height)/i.offsetHeight||1);var o=Sr(i)?Vt(i):window,a=o.visualViewport,l=!Dg()&&t,c=(r.left+(l&&a?a.offsetLeft:0))/n,u=(r.top+(l&&a?a.offsetTop:0))/s,A=r.width/n,h=r.height/s;return{width:A,height:h,top:u,right:c+A,bottom:u+h,left:c,x:c,y:u}}function Lc(i){var e=en(i),t=i.offsetWidth,r=i.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:i.offsetLeft,y:i.offsetTop,width:t,height:r}}function Lg(i,e){var t=e.getRootNode&&e.getRootNode();if(i.contains(e))return!0;if(t&&Rc(t)){var r=e;do{if(r&&i.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Fi(i){return Vt(i).getComputedStyle(i)}function Ob(i){return["table","td","th"].indexOf(yi(i))>=0}function nr(i){return((Sr(i)?i.ownerDocument:i.document)||window.document).documentElement}function Vo(i){return yi(i)==="html"?i:i.assignedSlot||i.parentNode||(Rc(i)?i.host:null)||nr(i)}function kg(i){return!ti(i)||Fi(i).position==="fixed"?null:i.offsetParent}function Ub(i){var e=/firefox/i.test(Dc()),t=/Trident/i.test(Dc());if(t&&ti(i)){var r=Fi(i);if(r.position==="fixed")return null}var n=Vo(i);for(Rc(n)&&(n=n.host);ti(n)&&["html","body"].indexOf(yi(n))<0;){var s=Fi(n);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return n;n=n.parentNode}return null}function rs(i){for(var e=Vt(i),t=kg(i);t&&Ob(t)&&Fi(t).position==="static";)t=kg(t);return t&&(yi(t)==="html"||yi(t)==="body"&&Fi(t).position==="static")?e:t||Ub(i)||e}function kc(i){return["top","bottom"].indexOf(i)>=0?"x":"y"}function ns(i,e,t){return xr(i,Yo(e,t))}function Gb(i,e,t){var r=ns(i,e,t);return r>t?t:r}function Mg(){return{top:0,right:0,bottom:0,left:0}}function Fg(i){return Object.assign({},Mg(),i)}function Pg(i,e){return e.reduce(function(t,r){return t[r]=i,t},{})}var $b=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Fg(typeof e!="number"?e:Pg(e,es))};function Hb(i){var e,t=i.state,r=i.name,n=i.options,s=t.elements.arrow,o=t.modifiersData.popperOffsets,a=Ci(t.placement),l=kc(a),c=[Gt,ei].indexOf(a)>=0,u=c?"height":"width";if(!(!s||!o)){var A=$b(n.padding,t),h=Lc(s),d=l==="y"?Ut:Gt,f=l==="y"?Zt:ei,g=t.rects.reference[u]+t.rects.reference[l]-o[l]-t.rects.popper[u],p=o[l]-t.rects.reference[l],v=rs(s),B=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,C=g/2-p/2,y=A[d],x=B-h[u]-A[f],w=B/2-h[u]/2+C,D=ns(y,w,x),F=l;t.modifiersData[r]=(e={},e[F]=D,e.centerOffset=D-w,e)}}function Yb(i){var e=i.state,t=i.options,r=t.element,n=r===void 0?"[data-popper-arrow]":r;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||Lg(e.elements.popper,n)&&(e.elements.arrow=n))}const Vb={name:"arrow",enabled:!0,phase:"main",fn:Hb,effect:Yb,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function tn(i){return i.split("-")[1]}var Kb={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Wb(i,e){var t=i.x,r=i.y,n=e.devicePixelRatio||1;return{x:Zr(t*n)/n||0,y:Zr(r*n)/n||0}}function Ng(i){var e,t=i.popper,r=i.popperRect,n=i.placement,s=i.variation,o=i.offsets,a=i.position,l=i.gpuAcceleration,c=i.adaptive,u=i.roundOffsets,A=i.isFixed,h=o.x,d=h===void 0?0:h,f=o.y,g=f===void 0?0:f,p=typeof u=="function"?u({x:d,y:g}):{x:d,y:g};d=p.x,g=p.y;var v=o.hasOwnProperty("x"),B=o.hasOwnProperty("y"),C=Gt,y=Ut,x=window;if(c){var w=rs(t),D="clientHeight",F="clientWidth";if(w===Vt(t)&&(w=nr(t),Fi(w).position!=="static"&&a==="absolute"&&(D="scrollHeight",F="scrollWidth")),w=w,n===Ut||(n===Gt||n===ei)&&s===ts){y=Zt;var O=A&&w===x&&x.visualViewport?x.visualViewport.height:w[D];g-=O-r.height,g*=l?1:-1}if(n===Gt||(n===Ut||n===Zt)&&s===ts){C=ei;var M=A&&w===x&&x.visualViewport?x.visualViewport.width:w[F];d-=M-r.width,d*=l?1:-1}}var j=Object.assign({position:a},c&&Kb),X=u===!0?Wb({x:d,y:g},Vt(t)):{x:d,y:g};if(d=X.x,g=X.y,l){var le;return Object.assign({},j,(le={},le[y]=B?"0":"",le[C]=v?"0":"",le.transform=(x.devicePixelRatio||1)<=1?"translate("+d+"px, "+g+"px)":"translate3d("+d+"px, "+g+"px, 0)",le))}return Object.assign({},j,(e={},e[y]=B?g+"px":"",e[C]=v?d+"px":"",e.transform="",e))}function qb(i){var e=i.state,t=i.options,r=t.gpuAcceleration,n=r===void 0?!0:r,s=t.adaptive,o=s===void 0?!0:s,a=t.roundOffsets,l=a===void 0?!0:a,c={placement:Ci(e.placement),variation:tn(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Ng(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Ng(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Jb={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:qb,data:{}};var Ko={passive:!0};function jb(i){var e=i.state,t=i.instance,r=i.options,n=r.scroll,s=n===void 0?!0:n,o=r.resize,a=o===void 0?!0:o,l=Vt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach(function(u){u.addEventListener("scroll",t.update,Ko)}),a&&l.addEventListener("resize",t.update,Ko),function(){s&&c.forEach(function(u){u.removeEventListener("scroll",t.update,Ko)}),a&&l.removeEventListener("resize",t.update,Ko)}}const Xb={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:jb,data:{}};var zb={left:"right",right:"left",bottom:"top",top:"bottom"};function Wo(i){return i.replace(/left|right|bottom|top/g,function(e){return zb[e]})}var Zb={start:"end",end:"start"};function Og(i){return i.replace(/start|end/g,function(e){return Zb[e]})}function Mc(i){var e=Vt(i),t=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:t,scrollTop:r}}function Fc(i){return en(nr(i)).left+Mc(i).scrollLeft}function eS(i,e){var t=Vt(i),r=nr(i),n=t.visualViewport,s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(n){s=n.width,o=n.height;var c=Dg();(c||!c&&e==="fixed")&&(a=n.offsetLeft,l=n.offsetTop)}return{width:s,height:o,x:a+Fc(i),y:l}}function tS(i){var e,t=nr(i),r=Mc(i),n=(e=i.ownerDocument)==null?void 0:e.body,s=xr(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),o=xr(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),a=-r.scrollLeft+Fc(i),l=-r.scrollTop;return Fi(n||t).direction==="rtl"&&(a+=xr(t.clientWidth,n?n.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}function Pc(i){var e=Fi(i),t=e.overflow,r=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+n+r)}function Ug(i){return["html","body","#document"].indexOf(yi(i))>=0?i.ownerDocument.body:ti(i)&&Pc(i)?i:Ug(Vo(i))}function ss(i,e){var t;e===void 0&&(e=[]);var r=Ug(i),n=r===((t=i.ownerDocument)==null?void 0:t.body),s=Vt(r),o=n?[s].concat(s.visualViewport||[],Pc(r)?r:[]):r,a=e.concat(o);return n?a:a.concat(ss(Vo(o)))}function Nc(i){return Object.assign({},i,{left:i.x,top:i.y,right:i.x+i.width,bottom:i.y+i.height})}function iS(i,e){var t=en(i,!1,e==="fixed");return t.top=t.top+i.clientTop,t.left=t.left+i.clientLeft,t.bottom=t.top+i.clientHeight,t.right=t.left+i.clientWidth,t.width=i.clientWidth,t.height=i.clientHeight,t.x=t.left,t.y=t.top,t}function Gg(i,e,t){return e===Qg?Nc(eS(i,t)):Sr(e)?iS(e,t):Nc(tS(nr(i)))}function rS(i){var e=ss(Vo(i)),t=["absolute","fixed"].indexOf(Fi(i).position)>=0,r=t&&ti(i)?rs(i):i;return Sr(r)?e.filter(function(n){return Sr(n)&&Lg(n,r)&&yi(n)!=="body"}):[]}function nS(i,e,t,r){var n=e==="clippingParents"?rS(i):[].concat(e),s=[].concat(n,[t]),o=s[0],a=s.reduce(function(l,c){var u=Gg(i,c,r);return l.top=xr(u.top,l.top),l.right=Yo(u.right,l.right),l.bottom=Yo(u.bottom,l.bottom),l.left=xr(u.left,l.left),l},Gg(i,o,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function $g(i){var e=i.reference,t=i.element,r=i.placement,n=r?Ci(r):null,s=r?tn(r):null,o=e.x+e.width/2-t.width/2,a=e.y+e.height/2-t.height/2,l;switch(n){case Ut:l={x:o,y:e.y-t.height};break;case Zt:l={x:o,y:e.y+e.height};break;case ei:l={x:e.x+e.width,y:a};break;case Gt:l={x:e.x-t.width,y:a};break;default:l={x:e.x,y:e.y}}var c=n?kc(n):null;if(c!=null){var u=c==="y"?"height":"width";switch(s){case zr:l[c]=l[c]-(e[u]/2-t[u]/2);break;case ts:l[c]=l[c]+(e[u]/2-t[u]/2);break}}return l}function os(i,e){e===void 0&&(e={});var t=e,r=t.placement,n=r===void 0?i.placement:r,s=t.strategy,o=s===void 0?i.strategy:s,a=t.boundary,l=a===void 0?bb:a,c=t.rootBoundary,u=c===void 0?Qg:c,A=t.elementContext,h=A===void 0?is:A,d=t.altBoundary,f=d===void 0?!1:d,g=t.padding,p=g===void 0?0:g,v=Fg(typeof p!="number"?p:Pg(p,es)),B=h===is?Sb:is,C=i.rects.popper,y=i.elements[f?B:h],x=nS(Sr(y)?y:y.contextElement||nr(i.elements.popper),l,u,o),w=en(i.elements.reference),D=$g({reference:w,element:C,placement:n}),F=Nc(Object.assign({},C,D)),O=h===is?F:w,M={top:x.top-O.top+v.top,bottom:O.bottom-x.bottom+v.bottom,left:x.left-O.left+v.left,right:O.right-x.right+v.right},j=i.modifiersData.offset;if(h===is&&j){var X=j[n];Object.keys(M).forEach(function(le){var oe=[ei,Zt].indexOf(le)>=0?1:-1,L=[Ut,Zt].indexOf(le)>=0?"y":"x";M[le]+=X[L]*oe})}return M}function sS(i,e){e===void 0&&(e={});var t=e,r=t.placement,n=t.boundary,s=t.rootBoundary,o=t.padding,a=t.flipVariations,l=t.allowedAutoPlacements,c=l===void 0?wg:l,u=tn(r),A=u?a?_g:_g.filter(function(f){return tn(f)===u}):es,h=A.filter(function(f){return c.indexOf(f)>=0});h.length===0&&(h=A);var d=h.reduce(function(f,g){return f[g]=os(i,{placement:g,boundary:n,rootBoundary:s,padding:o})[Ci(g)],f},{});return Object.keys(d).sort(function(f,g){return d[f]-d[g]})}function oS(i){if(Ci(i)===wc)return[];var e=Wo(i);return[Og(i),e,Og(e)]}function aS(i){var e=i.state,t=i.options,r=i.name;if(!e.modifiersData[r]._skip){for(var n=t.mainAxis,s=n===void 0?!0:n,o=t.altAxis,a=o===void 0?!0:o,l=t.fallbackPlacements,c=t.padding,u=t.boundary,A=t.rootBoundary,h=t.altBoundary,d=t.flipVariations,f=d===void 0?!0:d,g=t.allowedAutoPlacements,p=e.options.placement,v=Ci(p),B=v===p,C=l||(B||!f?[Wo(p)]:oS(p)),y=[p].concat(C).reduce(function(re,he){return re.concat(Ci(he)===wc?sS(e,{placement:he,boundary:u,rootBoundary:A,padding:c,flipVariations:f,allowedAutoPlacements:g}):he)},[]),x=e.rects.reference,w=e.rects.popper,D=new Map,F=!0,O=y[0],M=0;M<y.length;M++){var j=y[M],X=Ci(j),le=tn(j)===zr,oe=[Ut,Zt].indexOf(X)>=0,L=oe?"width":"height",U=os(e,{placement:j,boundary:u,rootBoundary:A,altBoundary:h,padding:c}),q=oe?le?ei:Gt:le?Zt:Ut;x[L]>w[L]&&(q=Wo(q));var R=Wo(q),_=[];if(s&&_.push(U[X]<=0),a&&_.push(U[q]<=0,U[R]<=0),_.every(function(re){return re})){O=j,F=!1;break}D.set(j,_)}if(F)for(var k=f?3:1,K=function(he){var fe=y.find(function(_e){var be=D.get(_e);if(be)return be.slice(0,he).every(function(Fe){return Fe})});if(fe)return O=fe,"break"},Y=k;Y>0;Y--){var ie=K(Y);if(ie==="break")break}e.placement!==O&&(e.modifiersData[r]._skip=!0,e.placement=O,e.reset=!0)}}const lS={name:"flip",enabled:!0,phase:"main",fn:aS,requiresIfExists:["offset"],data:{_skip:!1}};function Hg(i,e,t){return t===void 0&&(t={x:0,y:0}),{top:i.top-e.height-t.y,right:i.right-e.width+t.x,bottom:i.bottom-e.height+t.y,left:i.left-e.width-t.x}}function Yg(i){return[Ut,ei,Zt,Gt].some(function(e){return i[e]>=0})}function cS(i){var e=i.state,t=i.name,r=e.rects.reference,n=e.rects.popper,s=e.modifiersData.preventOverflow,o=os(e,{elementContext:"reference"}),a=os(e,{altBoundary:!0}),l=Hg(o,r),c=Hg(a,n,s),u=Yg(l),A=Yg(c);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:A},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":A})}const AS={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:cS};function uS(i,e,t){var r=Ci(i),n=[Gt,Ut].indexOf(r)>=0?-1:1,s=typeof t=="function"?t(Object.assign({},e,{placement:i})):t,o=s[0],a=s[1];return o=o||0,a=(a||0)*n,[Gt,ei].indexOf(r)>=0?{x:a,y:o}:{x:o,y:a}}function hS(i){var e=i.state,t=i.options,r=i.name,n=t.offset,s=n===void 0?[0,0]:n,o=wg.reduce(function(u,A){return u[A]=uS(A,e.rects,s),u},{}),a=o[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=o}const dS={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:hS};function fS(i){var e=i.state,t=i.name;e.modifiersData[t]=$g({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const gS={name:"popperOffsets",enabled:!0,phase:"read",fn:fS,data:{}};function pS(i){return i==="x"?"y":"x"}function mS(i){var e=i.state,t=i.options,r=i.name,n=t.mainAxis,s=n===void 0?!0:n,o=t.altAxis,a=o===void 0?!1:o,l=t.boundary,c=t.rootBoundary,u=t.altBoundary,A=t.padding,h=t.tether,d=h===void 0?!0:h,f=t.tetherOffset,g=f===void 0?0:f,p=os(e,{boundary:l,rootBoundary:c,padding:A,altBoundary:u}),v=Ci(e.placement),B=tn(e.placement),C=!B,y=kc(v),x=pS(y),w=e.modifiersData.popperOffsets,D=e.rects.reference,F=e.rects.popper,O=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,M=typeof O=="number"?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),j=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,X={x:0,y:0};if(w){if(s){var le,oe=y==="y"?Ut:Gt,L=y==="y"?Zt:ei,U=y==="y"?"height":"width",q=w[y],R=q+p[oe],_=q-p[L],k=d?-F[U]/2:0,K=B===zr?D[U]:F[U],Y=B===zr?-F[U]:-D[U],ie=e.elements.arrow,re=d&&ie?Lc(ie):{width:0,height:0},he=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Mg(),fe=he[oe],_e=he[L],be=ns(0,D[U],re[U]),Fe=C?D[U]/2-k-be-fe-M.mainAxis:K-be-fe-M.mainAxis,pe=C?-D[U]/2+k+be+_e+M.mainAxis:Y+be+_e+M.mainAxis,Qe=e.elements.arrow&&rs(e.elements.arrow),Ne=Qe?y==="y"?Qe.clientTop||0:Qe.clientLeft||0:0,Re=(le=j==null?void 0:j[y])!=null?le:0,Ke=q+Fe-Re-Ne,Se=q+pe-Re,ye=ns(d?Yo(R,Ke):R,q,d?xr(_,Se):_);w[y]=ye,X[y]=ye-q}if(a){var ke,Ue=y==="x"?Ut:Gt,Xe=y==="x"?Zt:ei,Ge=w[x],$e=x==="y"?"height":"width",Ce=Ge+p[Ue],tt=Ge-p[Xe],ot=[Ut,Gt].indexOf(v)!==-1,et=(ke=j==null?void 0:j[x])!=null?ke:0,ze=ot?Ce:Ge-D[$e]-F[$e]-et+M.altAxis,T=ot?Ge+D[$e]+F[$e]-et-M.altAxis:tt,m=d&&ot?Gb(ze,Ge,T):ns(d?ze:Ce,Ge,d?T:tt);w[x]=m,X[x]=m-Ge}e.modifiersData[r]=X}}const ES={name:"preventOverflow",enabled:!0,phase:"main",fn:mS,requiresIfExists:["offset"]};function IS(i){return{scrollLeft:i.scrollLeft,scrollTop:i.scrollTop}}function vS(i){return i===Vt(i)||!ti(i)?Mc(i):IS(i)}function yS(i){var e=i.getBoundingClientRect(),t=Zr(e.width)/i.offsetWidth||1,r=Zr(e.height)/i.offsetHeight||1;return t!==1||r!==1}function CS(i,e,t){t===void 0&&(t=!1);var r=ti(e),n=ti(e)&&yS(e),s=nr(e),o=en(i,n,t),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!t)&&((yi(e)!=="body"||Pc(s))&&(a=vS(e)),ti(e)?(l=en(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):s&&(l.x=Fc(s))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function BS(i){var e=new Map,t=new Set,r=[];i.forEach(function(s){e.set(s.name,s)});function n(s){t.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!t.has(a)){var l=e.get(a);l&&n(l)}}),r.push(s)}return i.forEach(function(s){t.has(s.name)||n(s)}),r}function TS(i){var e=BS(i);return Fb.reduce(function(t,r){return t.concat(e.filter(function(n){return n.phase===r}))},[])}function bS(i){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(i())})})),e}}function SS(i){var e=i.reduce(function(t,r){var n=t[r.name];return t[r.name]=n?Object.assign({},n,r,{options:Object.assign({},n.options,r.options),data:Object.assign({},n.data,r.data)}):r,t},{});return Object.keys(e).map(function(t){return e[t]})}var Vg={placement:"bottom",modifiers:[],strategy:"absolute"};function Kg(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];return!e.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function xS(i){i===void 0&&(i={});var e=i,t=e.defaultModifiers,r=t===void 0?[]:t,n=e.defaultOptions,s=n===void 0?Vg:n;return function(a,l,c){c===void 0&&(c=s);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Vg,s),modifiersData:{},elements:{reference:a,popper:l},attributes:{},styles:{}},A=[],h=!1,d={state:u,setOptions:function(v){var B=typeof v=="function"?v(u.options):v;g(),u.options=Object.assign({},s,u.options,B),u.scrollParents={reference:Sr(a)?ss(a):a.contextElement?ss(a.contextElement):[],popper:ss(l)};var C=TS(SS([].concat(r,u.options.modifiers)));return u.orderedModifiers=C.filter(function(y){return y.enabled}),f(),d.update()},forceUpdate:function(){if(!h){var v=u.elements,B=v.reference,C=v.popper;if(Kg(B,C)){u.rects={reference:CS(B,rs(C),u.options.strategy==="fixed"),popper:Lc(C)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(M){return u.modifiersData[M.name]=Object.assign({},M.data)});for(var y=0;y<u.orderedModifiers.length;y++){if(u.reset===!0){u.reset=!1,y=-1;continue}var x=u.orderedModifiers[y],w=x.fn,D=x.options,F=D===void 0?{}:D,O=x.name;typeof w=="function"&&(u=w({state:u,options:F,name:O,instance:d})||u)}}}},update:bS(function(){return new Promise(function(p){d.forceUpdate(),p(u)})}),destroy:function(){g(),h=!0}};if(!Kg(a,l))return d;d.setOptions(c).then(function(p){!h&&c.onFirstUpdate&&c.onFirstUpdate(p)});function f(){u.orderedModifiers.forEach(function(p){var v=p.name,B=p.options,C=B===void 0?{}:B,y=p.effect;if(typeof y=="function"){var x=y({state:u,name:v,instance:d,options:C}),w=function(){};A.push(x||w)}})}function g(){A.forEach(function(p){return p()}),A=[]}return d}}var QS=[Xb,gS,Jb,Rg,dS,lS,ES,Vb,AS],_S=xS({defaultModifiers:QS}),wS="tippy-box",Wg="tippy-content",RS="tippy-backdrop",qg="tippy-arrow",Jg="tippy-svg-arrow",Qr={passive:!0,capture:!0},jg=function(){return document.body};function Oc(i,e,t){if(Array.isArray(i)){var r=i[e];return r??(Array.isArray(t)?t[e]:t)}return i}function Uc(i,e){var t={}.toString.call(i);return t.indexOf("[object")===0&&t.indexOf(e+"]")>-1}function Xg(i,e){return typeof i=="function"?i.apply(void 0,e):i}function zg(i,e){if(e===0)return i;var t;return function(r){clearTimeout(t),t=setTimeout(function(){i(r)},e)}}function DS(i){return i.split(/\s+/).filter(Boolean)}function rn(i){return[].concat(i)}function Zg(i,e){i.indexOf(e)===-1&&i.push(e)}function LS(i){return i.filter(function(e,t){return i.indexOf(e)===t})}function kS(i){return i.split("-")[0]}function qo(i){return[].slice.call(i)}function e0(i){return Object.keys(i).reduce(function(e,t){return i[t]!==void 0&&(e[t]=i[t]),e},{})}function as(){return document.createElement("div")}function Jo(i){return["Element","Fragment"].some(function(e){return Uc(i,e)})}function MS(i){return Uc(i,"NodeList")}function FS(i){return Uc(i,"MouseEvent")}function PS(i){return!!(i&&i._tippy&&i._tippy.reference===i)}function NS(i){return Jo(i)?[i]:MS(i)?qo(i):Array.isArray(i)?i:qo(document.querySelectorAll(i))}function Gc(i,e){i.forEach(function(t){t&&(t.style.transitionDuration=e+"ms")})}function t0(i,e){i.forEach(function(t){t&&t.setAttribute("data-state",e)})}function OS(i){var e,t=rn(i),r=t[0];return r!=null&&(e=r.ownerDocument)!=null&&e.body?r.ownerDocument:document}function US(i,e){var t=e.clientX,r=e.clientY;return i.every(function(n){var s=n.popperRect,o=n.popperState,a=n.props,l=a.interactiveBorder,c=kS(o.placement),u=o.modifiersData.offset;if(!u)return!0;var A=c==="bottom"?u.top.y:0,h=c==="top"?u.bottom.y:0,d=c==="right"?u.left.x:0,f=c==="left"?u.right.x:0,g=s.top-r+A>l,p=r-s.bottom-h>l,v=s.left-t+d>l,B=t-s.right-f>l;return g||p||v||B})}function $c(i,e,t){var r=e+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(n){i[r](n,t)})}function i0(i,e){for(var t=e;t;){var r;if(i.contains(t))return!0;t=t.getRootNode==null||(r=t.getRootNode())==null?void 0:r.host}return!1}var Bi={isTouch:!1},r0=0;function GS(){Bi.isTouch||(Bi.isTouch=!0,window.performance&&document.addEventListener("mousemove",n0))}function n0(){var i=performance.now();i-r0<20&&(Bi.isTouch=!1,document.removeEventListener("mousemove",n0)),r0=i}function $S(){var i=document.activeElement;if(PS(i)){var e=i._tippy;i.blur&&!e.state.isVisible&&i.blur()}}function HS(){document.addEventListener("touchstart",GS,Qr),window.addEventListener("blur",$S)}var YS=typeof window<"u"&&typeof document<"u",VS=YS?!!window.msCrypto:!1,KS={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},WS={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ai=Object.assign({appendTo:jg,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},KS,WS),qS=Object.keys(ai),JS=function(e){var t=Object.keys(e);t.forEach(function(r){ai[r]=e[r]})};function s0(i){var e=i.plugins||[],t=e.reduce(function(r,n){var s=n.name,o=n.defaultValue;if(s){var a;r[s]=i[s]!==void 0?i[s]:(a=ai[s])!=null?a:o}return r},{});return Object.assign({},i,t)}function jS(i,e){var t=e?Object.keys(s0(Object.assign({},ai,{plugins:e}))):qS,r=t.reduce(function(n,s){var o=(i.getAttribute("data-tippy-"+s)||"").trim();if(!o)return n;if(s==="content")n[s]=o;else try{n[s]=JSON.parse(o)}catch{n[s]=o}return n},{});return r}function o0(i,e){var t=Object.assign({},e,{content:Xg(e.content,[i])},e.ignoreAttributes?{}:jS(i,e.plugins));return t.aria=Object.assign({},ai.aria,t.aria),t.aria={expanded:t.aria.expanded==="auto"?e.interactive:t.aria.expanded,content:t.aria.content==="auto"?e.interactive?null:"describedby":t.aria.content},t}var XS=function(){return"innerHTML"};function Hc(i,e){i[XS()]=e}function a0(i){var e=as();return i===!0?e.className=qg:(e.className=Jg,Jo(i)?e.appendChild(i):Hc(e,i)),e}function l0(i,e){Jo(e.content)?(Hc(i,""),i.appendChild(e.content)):typeof e.content!="function"&&(e.allowHTML?Hc(i,e.content):i.textContent=e.content)}function Yc(i){var e=i.firstElementChild,t=qo(e.children);return{box:e,content:t.find(function(r){return r.classList.contains(Wg)}),arrow:t.find(function(r){return r.classList.contains(qg)||r.classList.contains(Jg)}),backdrop:t.find(function(r){return r.classList.contains(RS)})}}function c0(i){var e=as(),t=as();t.className=wS,t.setAttribute("data-state","hidden"),t.setAttribute("tabindex","-1");var r=as();r.className=Wg,r.setAttribute("data-state","hidden"),l0(r,i.props),e.appendChild(t),t.appendChild(r),n(i.props,i.props);function n(s,o){var a=Yc(e),l=a.box,c=a.content,u=a.arrow;o.theme?l.setAttribute("data-theme",o.theme):l.removeAttribute("data-theme"),typeof o.animation=="string"?l.setAttribute("data-animation",o.animation):l.removeAttribute("data-animation"),o.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof o.maxWidth=="number"?o.maxWidth+"px":o.maxWidth,o.role?l.setAttribute("role",o.role):l.removeAttribute("role"),(s.content!==o.content||s.allowHTML!==o.allowHTML)&&l0(c,i.props),o.arrow?u?s.arrow!==o.arrow&&(l.removeChild(u),l.appendChild(a0(o.arrow))):l.appendChild(a0(o.arrow)):u&&l.removeChild(u)}return{popper:e,onUpdate:n}}c0.$$tippy=!0;var zS=1,jo=[],Vc=[];function ZS(i,e){var t=o0(i,Object.assign({},ai,s0(e0(e)))),r,n,s,o=!1,a=!1,l=!1,c=!1,u,A,h,d=[],f=zg(Ke,t.interactiveDebounce),g,p=zS++,v=null,B=LS(t.plugins),C={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},y={id:p,reference:i,popper:as(),popperInstance:v,props:t,state:C,plugins:B,clearDelayTimeouts:ze,setProps:T,setContent:m,show:E,hide:Q,hideWithInteractivity:N,enable:ot,disable:et,unmount:J,destroy:z};if(!t.render)return y;var x=t.render(y),w=x.popper,D=x.onUpdate;w.setAttribute("data-tippy-root",""),w.id="tippy-"+y.id,y.popper=w,i._tippy=y,w._tippy=y;var F=B.map(function($){return $.fn(y)}),O=i.hasAttribute("aria-expanded");return Qe(),k(),q(),R("onCreate",[y]),t.showOnCreate&&Ce(),w.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),w.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&oe().addEventListener("mousemove",f)}),y;function M(){var $=y.props.touch;return Array.isArray($)?$:[$,0]}function j(){return M()[0]==="hold"}function X(){var $;return!!(($=y.props.render)!=null&&$.$$tippy)}function le(){return g||i}function oe(){var $=le().parentNode;return $?OS($):document}function L(){return Yc(w)}function U($){return y.state.isMounted&&!y.state.isVisible||Bi.isTouch||u&&u.type==="focus"?0:Oc(y.props.delay,$?0:1,ai.delay)}function q($){$===void 0&&($=!1),w.style.pointerEvents=y.props.interactive&&!$?"":"none",w.style.zIndex=""+y.props.zIndex}function R($,ae,ue){if(ue===void 0&&(ue=!0),F.forEach(function(me){me[$]&&me[$].apply(me,ae)}),ue){var ve;(ve=y.props)[$].apply(ve,ae)}}function _(){var $=y.props.aria;if($.content){var ae="aria-"+$.content,ue=w.id,ve=rn(y.props.triggerTarget||i);ve.forEach(function(me){var nt=me.getAttribute(ae);if(y.state.isVisible)me.setAttribute(ae,nt?nt+" "+ue:ue);else{var Lt=nt&&nt.replace(ue,"").trim();Lt?me.setAttribute(ae,Lt):me.removeAttribute(ae)}})}}function k(){if(!(O||!y.props.aria.expanded)){var $=rn(y.props.triggerTarget||i);$.forEach(function(ae){y.props.interactive?ae.setAttribute("aria-expanded",y.state.isVisible&&ae===le()?"true":"false"):ae.removeAttribute("aria-expanded")})}}function K(){oe().removeEventListener("mousemove",f),jo=jo.filter(function($){return $!==f})}function Y($){if(!(Bi.isTouch&&(l||$.type==="mousedown"))){var ae=$.composedPath&&$.composedPath()[0]||$.target;if(!(y.props.interactive&&i0(w,ae))){if(rn(y.props.triggerTarget||i).some(function(ue){return i0(ue,ae)})){if(Bi.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else R("onClickOutside",[y,$]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),a=!0,setTimeout(function(){a=!1}),y.state.isMounted||fe())}}}function ie(){l=!0}function re(){l=!1}function he(){var $=oe();$.addEventListener("mousedown",Y,!0),$.addEventListener("touchend",Y,Qr),$.addEventListener("touchstart",re,Qr),$.addEventListener("touchmove",ie,Qr)}function fe(){var $=oe();$.removeEventListener("mousedown",Y,!0),$.removeEventListener("touchend",Y,Qr),$.removeEventListener("touchstart",re,Qr),$.removeEventListener("touchmove",ie,Qr)}function _e($,ae){Fe($,function(){!y.state.isVisible&&w.parentNode&&w.parentNode.contains(w)&&ae()})}function be($,ae){Fe($,ae)}function Fe($,ae){var ue=L().box;function ve(me){me.target===ue&&($c(ue,"remove",ve),ae())}if($===0)return ae();$c(ue,"remove",A),$c(ue,"add",ve),A=ve}function pe($,ae,ue){ue===void 0&&(ue=!1);var ve=rn(y.props.triggerTarget||i);ve.forEach(function(me){me.addEventListener($,ae,ue),d.push({node:me,eventType:$,handler:ae,options:ue})})}function Qe(){j()&&(pe("touchstart",Re,{passive:!0}),pe("touchend",Se,{passive:!0})),DS(y.props.trigger).forEach(function($){if($!=="manual")switch(pe($,Re),$){case"mouseenter":pe("mouseleave",Se);break;case"focus":pe(VS?"focusout":"blur",ye);break;case"focusin":pe("focusout",ye);break}})}function Ne(){d.forEach(function($){var ae=$.node,ue=$.eventType,ve=$.handler,me=$.options;ae.removeEventListener(ue,ve,me)}),d=[]}function Re($){var ae,ue=!1;if(!(!y.state.isEnabled||ke($)||a)){var ve=((ae=u)==null?void 0:ae.type)==="focus";u=$,g=$.currentTarget,k(),!y.state.isVisible&&FS($)&&jo.forEach(function(me){return me($)}),$.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||o)&&y.props.hideOnClick!==!1&&y.state.isVisible?ue=!0:Ce($),$.type==="click"&&(o=!ue),ue&&!ve&&tt($)}}function Ke($){var ae=$.target,ue=le().contains(ae)||w.contains(ae);if(!($.type==="mousemove"&&ue)){var ve=$e().concat(w).map(function(me){var nt,Lt=me._tippy,kt=(nt=Lt.popperInstance)==null?void 0:nt.state;return kt?{popperRect:me.getBoundingClientRect(),popperState:kt,props:t}:null}).filter(Boolean);US(ve,$)&&(K(),tt($))}}function Se($){var ae=ke($)||y.props.trigger.indexOf("click")>=0&&o;if(!ae){if(y.props.interactive){y.hideWithInteractivity($);return}tt($)}}function ye($){y.props.trigger.indexOf("focusin")<0&&$.target!==le()||y.props.interactive&&$.relatedTarget&&w.contains($.relatedTarget)||tt($)}function ke($){return Bi.isTouch?j()!==$.type.indexOf("touch")>=0:!1}function Ue(){Xe();var $=y.props,ae=$.popperOptions,ue=$.placement,ve=$.offset,me=$.getReferenceClientRect,nt=$.moveTransition,Lt=X()?Yc(w).arrow:null,kt=me?{getBoundingClientRect:me,contextElement:me.contextElement||le()}:i,ln={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(cn){var lr=cn.state;if(X()){var fs=L(),gs=fs.box;["placement","reference-hidden","escaped"].forEach(function(An){An==="placement"?gs.setAttribute("data-placement",lr.placement):lr.attributes.popper["data-popper-"+An]?gs.setAttribute("data-"+An,""):gs.removeAttribute("data-"+An)}),lr.attributes.popper={}}}},Mt=[{name:"offset",options:{offset:ve}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!nt}},ln];X()&&Lt&&Mt.push({name:"arrow",options:{element:Lt,padding:3}}),Mt.push.apply(Mt,(ae==null?void 0:ae.modifiers)||[]),y.popperInstance=_S(kt,w,Object.assign({},ae,{placement:ue,onFirstUpdate:h,modifiers:Mt}))}function Xe(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Ge(){var $=y.props.appendTo,ae,ue=le();y.props.interactive&&$===jg||$==="parent"?ae=ue.parentNode:ae=Xg($,[ue]),ae.contains(w)||ae.appendChild(w),y.state.isMounted=!0,Ue()}function $e(){return qo(w.querySelectorAll("[data-tippy-root]"))}function Ce($){y.clearDelayTimeouts(),$&&R("onTrigger",[y,$]),he();var ae=U(!0),ue=M(),ve=ue[0],me=ue[1];Bi.isTouch&&ve==="hold"&&me&&(ae=me),ae?r=setTimeout(function(){y.show()},ae):y.show()}function tt($){if(y.clearDelayTimeouts(),R("onUntrigger",[y,$]),!y.state.isVisible){fe();return}if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf($.type)>=0&&o)){var ae=U(!1);ae?n=setTimeout(function(){y.state.isVisible&&y.hide()},ae):s=requestAnimationFrame(function(){y.hide()})}}function ot(){y.state.isEnabled=!0}function et(){y.hide(),y.state.isEnabled=!1}function ze(){clearTimeout(r),clearTimeout(n),cancelAnimationFrame(s)}function T($){if(!y.state.isDestroyed){R("onBeforeUpdate",[y,$]),Ne();var ae=y.props,ue=o0(i,Object.assign({},ae,e0($),{ignoreAttributes:!0}));y.props=ue,Qe(),ae.interactiveDebounce!==ue.interactiveDebounce&&(K(),f=zg(Ke,ue.interactiveDebounce)),ae.triggerTarget&&!ue.triggerTarget?rn(ae.triggerTarget).forEach(function(ve){ve.removeAttribute("aria-expanded")}):ue.triggerTarget&&i.removeAttribute("aria-expanded"),k(),q(),D&&D(ae,ue),y.popperInstance&&(Ue(),$e().forEach(function(ve){requestAnimationFrame(ve._tippy.popperInstance.forceUpdate)})),R("onAfterUpdate",[y,$])}}function m($){y.setProps({content:$})}function E(){var $=y.state.isVisible,ae=y.state.isDestroyed,ue=!y.state.isEnabled,ve=Bi.isTouch&&!y.props.touch,me=Oc(y.props.duration,0,ai.duration);if(!($||ae||ue||ve)&&!le().hasAttribute("disabled")&&(R("onShow",[y],!1),y.props.onShow(y)!==!1)){if(y.state.isVisible=!0,X()&&(w.style.visibility="visible"),q(),he(),y.state.isMounted||(w.style.transition="none"),X()){var nt=L(),Lt=nt.box,kt=nt.content;Gc([Lt,kt],0)}h=function(){var Mt;if(!(!y.state.isVisible||c)){if(c=!0,w.offsetHeight,w.style.transition=y.props.moveTransition,X()&&y.props.animation){var Lr=L(),cn=Lr.box,lr=Lr.content;Gc([cn,lr],me),t0([cn,lr],"visible")}_(),k(),Zg(Vc,y),(Mt=y.popperInstance)==null||Mt.forceUpdate(),R("onMount",[y]),y.props.animation&&X()&&be(me,function(){y.state.isShown=!0,R("onShown",[y])})}},Ge()}}function Q(){var $=!y.state.isVisible,ae=y.state.isDestroyed,ue=!y.state.isEnabled,ve=Oc(y.props.duration,1,ai.duration);if(!($||ae||ue)&&(R("onHide",[y],!1),y.props.onHide(y)!==!1)){if(y.state.isVisible=!1,y.state.isShown=!1,c=!1,o=!1,X()&&(w.style.visibility="hidden"),K(),fe(),q(!0),X()){var me=L(),nt=me.box,Lt=me.content;y.props.animation&&(Gc([nt,Lt],ve),t0([nt,Lt],"hidden"))}_(),k(),y.props.animation?X()&&_e(ve,y.unmount):y.unmount()}}function N($){oe().addEventListener("mousemove",f),Zg(jo,f),f($)}function J(){y.state.isVisible&&y.hide(),y.state.isMounted&&(Xe(),$e().forEach(function($){$._tippy.unmount()}),w.parentNode&&w.parentNode.removeChild(w),Vc=Vc.filter(function($){return $!==y}),y.state.isMounted=!1,R("onHidden",[y]))}function z(){y.state.isDestroyed||(y.clearDelayTimeouts(),y.unmount(),Ne(),delete i._tippy,y.state.isDestroyed=!0,R("onDestroy",[y]))}}function _r(i,e){e===void 0&&(e={});var t=ai.plugins.concat(e.plugins||[]);HS();var r=Object.assign({},e,{plugins:t}),n=NS(i),s=n.reduce(function(o,a){var l=a&&ZS(a,r);return l&&o.push(l),o},[]);return Jo(i)?s[0]:s}_r.defaultProps=ai,_r.setDefaultProps=JS,_r.currentInput=Bi,Object.assign({},Rg,{effect:function(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow)}}),_r.setDefaultProps({render:c0});function ii(i,e){return`${i}-${e}`}function Ti(i){var e,t;const r=[];return(((e=i.renderer)==null?void 0:e.type)==="video"||((t=i.renderer)==null?void 0:t.type)==="audio")&&r.push({...i.config,...i.options}),r.push(...i.childNodes.flatMap(Ti).filter(Boolean)),r}class Xo extends Error{constructor(e,t=new Error,r=!1){super(),this.fatal=!1,this.fatal=r,this.stack=t.stack,this.message=[e,t.message].filter(Boolean).join(" - ")}}function sr(i,e,t){return Math.min(Math.max(e,i),t)}const ex=5;function tx(i,e){return i.length!==e.length||i.some((t,r)=>t!==e[r])}class ix{constructor(e){this._caption="",this._currentTime=0,this._activeScenes=[],this._upcomingScenes=[],this._canvas=xt(),this._controls=xt(),this.host=e}set activeScenes(e){tx(e,this._activeScenes)&&(this._activeScenes=e,this.host.dispatchEvent(new CustomEvent("scenechange",{detail:e})),this.host.requestUpdate())}get activeScenes(){return this._activeScenes}set currentTime(e){var t,r,n;const s=sr(0,e,this.host.duration);this.activeScenes=((t=this.host.composition)==null?void 0:t.tracks.reduce((a,l)=>a.concat(l.scenes.filter(({start:c,duration:u})=>s>=c&&s<c+u)),[]))??[];const o=s!==this.currentTime;this._currentTime=s,this._upcomingScenes=((r=this.host.composition)==null?void 0:r.tracks.reduce((a,l)=>a.concat(l.scenes.filter(({start:c})=>s>=c-ex&&s<c)),[]))??[],this.loadScenes(),this.syncMediaState(),(n=this._controls.value)==null||n.setAttribute("currentTime",s.toString()),o&&this.host.dispatchEvent(new CustomEvent("timeupdate",{detail:s})),this.draw(s)}get currentTime(){return this._currentTime}set caption(e){e!==this._caption&&(this._caption=e,this.host.requestUpdate())}get caption(){return this._caption}canvas(){return Qt(this._canvas)}controls(){return Qt(this._controls)}loadScenes(){[...this.activeScenes,...this._upcomingScenes].forEach(e=>{Ti(e.layout.node).forEach(({key:r})=>{var n,s,o;const{id:a,start:l,duration:c}=e,u=this.host.currentTime>0||this.host.preload==="auto"||!this.host.paused,A=ii(a,r);if(this.host.media[A]){const h=this.host.media[A],{speed:d,volume:f,hls:g,node:p,start:v,duration:B}=h,C=this.host.mediaState[A];p&&C&&(p.currentTime>=v+B||p.ended||u&&(g?(n=g.startLoadOnce)==null||n.call(g,v):C.initialised||(s=p.startLoadOnce)==null||s.call(p),p.volume=sr(0,this.host.volume*(f??1),1),p.playbackRate=sr(.1,this.host.playbackRate*(d??1),4)))}else if(u){const h=`${l}-${c}`,d=this.host._sceneController.mediaState[h];this.host.duration&&!((o=d==null?void 0:d.buffered)!=null&&o.length)&&(this.host._sceneController.mediaState={...this.host._sceneController.mediaState,[h]:{...d,buffered:[{start:Math.max(0,l/this.host.duration*100),end:Math.min((l+c)/this.host.duration*100,100)}]}})}})})}syncMediaState(){var e;return Promise.all(((e=this.host.composition)==null?void 0:e.tracks.flatMap(t=>t.scenes.flatMap(r=>Ti(r.layout.node).map(async({key:s})=>{const o=ii(r.id,s);if(this.host.media[o]){const a=this.host.media[o],{node:l}=a,c=this.host.mediaState[o];if(!this.activeScenes.includes(r))l.paused||l.pause();else if(c&&!this.host.waiting&&!this.host.loading&&!this.host.paused&&l.paused&&c.initialised)try{await l.play()}catch(A){throw new Xo("Video play error",A,!0)}}}))))??[])}draw(e=this.currentTime){this.host.composition&&this._canvas.value&&this.host.composition.draw({currentTime:e,canvas:this._canvas.value})}clear(){var e;const t=this._canvas.value;(e=t==null?void 0:t.getContext("2d"))==null||e.clearRect(0,0,t.width,t.height)}}const rx=Er(async function(e){const{weight:t,family:r}=e,{client:n,server:s}=r.weights.find(a=>a.weight===t)??{};return!n&&!s?null:new FontFace(e.family.name,`url(${n??s})`,{weight:t,style:"normal"}).load()},{cacheKey:([i])=>JSON.stringify(i)}),nx=Er(async({options:i})=>{const e=await rx(i.font);return e&&document.fonts.add(e),{font:i.font}}),sx=Er(async({config:i})=>i.src?new Promise((e,t)=>{const r=new Image;r.crossOrigin="anonymous",r.onload=()=>{e({image:r})},r.onerror=n=>{t(n)},r.src=i.src}):{image:null},{cacheKey:([{config:i}])=>JSON.stringify(i)});async function A0(i){return i.duration===1/0?new Promise(e=>{i.currentTime=Number.MAX_SAFE_INTEGER,i.ontimeupdate=()=>{i.ontimeupdate=null,e(i.duration),i.currentTime=0}}):i.duration}function ox(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function ax(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function lx({config:i,elementSize:e}){return new Promise(async t=>{let r=null;const{type:n,key:s,src:o,duration:a}=i;n==="video"?(r=document.createElement("video"),r.playsInline=!0,e&&(r.width=e.width,r.height=e.height)):r=document.createElement("audio"),r.muted=!0,r.loop=!1,r.crossOrigin="anonymous",r.src=o;let l=!1;if(r.startLoadOnce=()=>{l||(r.preload="auto",r.load(),l=!0)},n==="video"&&a&&i.aspectRatio)r.preload="none",t({key:s,hls:null,node:r,aspectRatio:i.aspectRatio,totalDuration:a});else{r.preload="metadata";const c=async()=>{const u=await A0(r),A=r instanceof HTMLVideoElement&&r.videoHeight>0?r.videoWidth/r.videoHeight:null;t({key:s,hls:null,node:r,totalDuration:u,aspectRatio:A}),r.removeEventListener("loadedmetadata",c)};r.addEventListener("loadedmetadata",c)}})}function cx({key:i,playlist:e,duration:t,elementSize:r}){return new Promise(n=>{const s=document.createElement("video");s instanceof HTMLVideoElement&&(r&&(s.width=r.width,s.height=r.height),s.playsInline=!0),s.muted=!0,s.loop=!1,s.crossOrigin="anonymous";let o=!1;const a=new vi({autoStartLoad:!0,capLevelToPlayerSize:!0,xhrSetup:l=>{const{open:c}=l,u=e.split("?")[1];l.open=function(A,h,d){u&&!h.toString().includes("?")&&(h+="?"+u),!(!o&&h.toString().includes(".ts"))&&c.apply(this,[A,h,d])}}});a.on(vi.Events.LEVEL_LOADED,async()=>{o||a==null||a.stopLoad();const l=t??await A0(s),c=a.levels.map(h=>+(h.width/h.height).toFixed(6)),u=c.reduce((h,d)=>(h.set(d,(h.get(d)??0)+1),h),new Map),A=c.length?[...u.entries()].reduce((h,d)=>d[1]<h[1]?d:h)[0]:null;n({key:i,hls:a,node:s,aspectRatio:A,totalDuration:l})}),a.loadSource(e),a.attachMedia(s),a.startLoadOnce=(l=-1,c)=>{if(a&&!o){const u=a.levels.findIndex(A=>Math.min(A.height,A.width)===c);o=!0,a.startLoad(l),u!==-1&&(a.currentLevel=u)}}})}function Ax({config:i,elementSize:e}){const{playlist:t}=i;return t&&!ox()&&vi.isSupported()?cx({key:i.key,playlist:t,duration:i.duration??0,elementSize:e}):lx({config:i,elementSize:e})}let ux=class{constructor(e){this._hasPlayed=!1,this._duration=0,this._composition=null,this._media={},this._mediaState={},this._compositionController=new AbortController,this._delayProcessing=(t=100)=>{const r=new AbortController,n=setTimeout(()=>{r.signal.aborted||(this.host._processing=!0)},t);return r.signal.addEventListener("abort",()=>{clearTimeout(n)}),r},this._mediaFactory=Er(async(t,r)=>{var n,s,o,a;const{key:l}=r,c=((s=(n=this.host.shadowRoot)==null?void 0:n.host)==null?void 0:s.clientWidth)??0,u=((a=(o=this.host.shadowRoot)==null?void 0:o.host)==null?void 0:a.clientHeight)??0,A=await Ax({config:r,elementSize:{width:c,height:u}}),h={loadeddata:this._handleLoadedData,waiting:this._handleWaiting,canplay:this._handleCanPlay,progress:this._handleProgress,seeking:this._handleSeeking,seeked:this._handleSeeked,play:this._handlePlay,playing:this._handlePlaying,pause:this._handlePause,stalled:this._handleStalled,timeupdate:this._handleTimeUpdate,ended:this._handleEnded,error:this._handleError},d=Object.keys(h).reduce((f,g)=>{const p=g,v=h[p]({id:t,key:l,node:A.node});return f[p]=v,A.node.addEventListener(g,v),f},{});return{media:A,listeners:d,aspectRatio:A.aspectRatio,source:()=>A.node}},{cacheKey:([t,{key:r,src:n,playlist:s}])=>JSON.stringify({id:t,key:r,src:n==null?void 0:n.split("?")[0],playlist:s==null?void 0:s.split("?")[0]})}),this._handleLoadedData=({id:t,key:r,node:n})=>()=>{const s=ii(t,r),o=this.mediaState[s];o!=null&&o.initialised||(this.mediaState={...this.mediaState,[s]:{...o,initialised:!0,waiting:!1,buffered:(o==null?void 0:o.buffered)??[]}},this.setMediaCurrentTime(this.host.currentTime),this.host.dispatchEvent(new CustomEvent("video:loadeddata",{detail:{id:t,key:r,node:n}})))},this._handleWaiting=({id:t,key:r,node:n})=>()=>{const s=ii(t,r),o=this.mediaState[s];o!=null&&o.initialised&&!(o!=null&&o.waiting)&&(this.mediaState={...this.mediaState,[s]:{...o,waiting:!0}},this.host.dispatchEvent(new CustomEvent("video:waiting",{detail:{id:t,key:r,node:n}})))},this._handleCanPlay=({id:t,key:r})=>()=>{const n=ii(t,r),s=this.mediaState[n];s!=null&&s.initialised&&(s!=null&&s.waiting)&&(this.mediaState={...this.mediaState,[n]:{...s,waiting:!1}}),this.host.paused&&this.host.draw()},this._handleProgress=()=>()=>{},this._handleSeeking=({id:t,key:r,node:n})=>()=>{this.host.dispatchEvent(new CustomEvent("video:seeking",{detail:{id:t,key:r,node:n}}))},this._handleSeeked=({id:t,key:r,node:n})=>()=>{const s=ii(t,r),o=this.mediaState[s];o!=null&&o.initialised&&(this.host.draw(),this.host.activeScenes.flatMap(a=>Ti(a.layout.node).map(({id:c})=>c)).includes(t)&&this.host.dispatchEvent(new CustomEvent("seeked",{detail:this.host.currentTime})),this.host.dispatchEvent(new CustomEvent("video:seeked",{detail:{id:t,key:r,node:n}})))},this._handlePlay=({id:t,key:r,node:n})=>()=>{this.hasPlayed=!0,this.host.dispatchEvent(new CustomEvent("video:play",{detail:{id:t,key:r,node:n}}))},this._handlePlaying=({id:t,key:r,node:n})=>()=>{this.host.dispatchEvent(new CustomEvent("video:playing",{detail:{id:t,key:r,node:n}}))},this._handlePause=({id:t,key:r,node:n})=>()=>{this.host.dispatchEvent(new CustomEvent("video:pause",{detail:{id:t,key:r,node:n}}))},this._handleStalled=({id:t,key:r,node:n})=>()=>{this.host.dispatchEvent(new CustomEvent("video:stalled",{detail:{id:t,key:r,node:n}}))},this._handleTimeUpdate=({id:t,key:r,node:n})=>()=>{this.host.dispatchEvent(new CustomEvent("video:timeupdate",{detail:{id:t,key:r,node:n}}))},this._handleEnded=({id:t,key:r,node:n})=>()=>{this.host.dispatchEvent(new CustomEvent("video:ended",{detail:{id:t,key:r,node:n}}))},this._handleError=({id:t,key:r,node:n})=>()=>{const s=new Xo(`Video error - answer ${t} failed to load`);this.host.dispatchEvent(new ErrorEvent("error",{bubbles:!0,composed:!0,error:s,message:s.message})),this.host.dispatchEvent(new CustomEvent("video:error",{detail:{id:t,key:r,node:n}}))},this._cleanupMedia=t=>{var r;const n=this.media[t];n&&(n.node.pause(),n.node.src="",(r=n.hls)==null||r.destroy(),Object.keys(n.listeners??{}).forEach(s=>{var o,a;if((o=this.media)!=null&&o[t]){const l=(a=n.listeners)==null?void 0:a[s];l&&n.node.removeEventListener(s,l)}}),delete this._media[t],delete this._mediaState[t])},this.host=e,this.host.addController(this)}set hasPlayed(e){e!==this._hasPlayed&&(this._hasPlayed=e,this.host.requestUpdate())}get hasPlayed(){return this._hasPlayed}set duration(e){!isNaN(e)&&e!==this._duration&&(this._duration=e,this.host.requestUpdate(),this.host.dispatchEvent(new CustomEvent("durationchange",{detail:this._duration})))}get duration(){return this._duration}set composition(e){e!==this._composition&&(this._composition=e,this.host.requestUpdate())}get composition(){return this._composition}set media(e){e!==this._media&&(this._media=e,this.host.requestUpdate())}get media(){return this._media}set mediaState(e){e!==this._mediaState&&(this._mediaState=e,this.host.requestUpdate())}get mediaState(){return this._mediaState}_setupTask(){new _s(this.host,async([e,t,r,n])=>{var s,o;this._compositionController.abort(),this._compositionController=new AbortController;const a=this._compositionController,l=this._delayProcessing();try{if(this.host._errors=[],(!t||!this.host._languages.find(({value:c})=>t===c))&&(this.host._language=(s=this.host._languages[0])==null?void 0:s.value),e){const{width:c,height:u}=fl({aspectRatio:r,resolution:1080});try{(o=this.composition)==null||o.cleanup();const f=await Nh({debug:n,config:e,resolvers:{text:nx,image:sx,video:async({id:g,config:p,options:v})=>{const{media:B,source:C}=await this._mediaFactory(g,{...p,...v});return{video:C,aspectRatio:B.aspectRatio}}},rootWidth:c,rootHeight:u});if(a.signal.aborted)return;this.composition=f}catch(f){throw new Xo("Fatal composition error",f,!0)}this.duration=this.composition.duration;const A={...this.media},h={...this.mediaState},d=[];for(const f of this.composition.tracks)for(const g of f.scenes){const p=Ti(g.layout.node);for(const v of p){const{media:B,listeners:C}=await this._mediaFactory(g.id,v),y=ii(g.id,B.key);d.push(y);const x=(v.startOffset??0)*B.totalDuration,w=(1-(v.endOffset??0))*B.totalDuration;A[y]={...B,listeners:C,start:x,duration:w-x,speed:v.speed??1,volume:v.volume??1},h[y]={initialised:!B,waiting:!!B,...this.mediaState[y]}}}this.media=A,this.mediaState=h,Object.keys(this.media).forEach(f=>{d.includes(f)||this.media[f].node.pause()}),this.host.currentTime>this.duration?this.host.reset(this.duration,!1):this.host.paused?this.host.reset(this.host.currentTime,!this.host.paused):this.setMediaCurrentTime(this.host.currentTime)}this.host.dispatchEvent(new CustomEvent("compositionupdate",{detail:this.composition,bubbles:!0,composed:!0}))}catch(c){this.composition=null,this.duration=0,this.host.dispatchEvent(new ErrorEvent("error",{composed:!0,bubbles:!0,error:c,message:c.message}))}finally{l.abort(),this.host._processing=!1}},()=>[this.host.config,this.host.language,this.host.aspectRatio,this.host.debug])}_setMediaCurrentTime({time:e,scene:t}){const{id:r,layout:n,start:s}=t;Ti(n.node).forEach(({key:a})=>{const l=ii(r,a);if(this.media[l]){const c=this.media[l],u=(e-s)*c.speed;c.node.currentTime=sr(c.start,u+c.start,c.start+c.duration)}})}setMediaCurrentTime(e){var t;(t=this.composition)==null||t.tracks.forEach(r=>{r.scenes.forEach(n=>{this._setMediaCurrentTime({time:e,scene:n})})})}hostConnected(){this._setupTask()}hostDisconnected(){Object.keys(this.media).forEach(e=>{this._cleanupMedia(e)}),this.media={}}};function hx(i){i.requestFullscreen?i.requestFullscreen():i.mozRequestFullScreen?i.mozRequestFullScreen():i.webkitRequestFullscreen?i.webkitRequestFullscreen():i.msRequestFullscreen&&i.msRequestFullscreen()}function dx(){document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}const Kc=["progress","play-large","navigation","play","volume","current-time","duration","speed","captions","fullscreen","preview"],fx={id:"captions",event:"captions:click",label:"Closed Captions"},gx={id:"fullscreen",event:"fullscreen:click",label:"Full Screen"},u0={title:"Playback Speed",items:[{id:"playback-rate-0.5",event:"playbackRate:click",label:"0.5x",value:.5},{id:"playback-rate-1",event:"playbackRate:click",label:"1.0x",value:1},{id:"playback-rate-1.5",event:"playbackRate:click",label:"1.5x",value:1.5},{id:"playback-rate-2",event:"playbackRate:click",label:"2.0x",value:2}]},px={id:"playbackRate",label:"Playback playbackRate",subItems:u0};class mx extends UA{constructor(e){if(super(e),this.element=null,this.observer=void 0,e.type!==Pr.ELEMENT)throw new Error("Resize directive must be used in an Element expression")}disconnected(){var e;(e=this.observer)==null||e.disconnect(),this.observer=void 0}reconnected(){var e;this.element&&((e=this.observer)==null||e.observe(this.element))}update(e,[t]){return this.isConnected&&!this.observer&&(this.observer=new ResizeObserver(t),this.element=e.element,this.observer.observe(this.element)),Vi}}const Wc=Nr(mx),Ex=Tb(()=>{const i=new FontFace("Roobert","url(https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/Roobert-Regular.woff2)",{style:"normal",weight:"400"}),e=new FontFace("Roobert","url(https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/Roobert-SemiBold.woff2)",{style:"normal",weight:"600"}),t=new FontFace("Roobert","url(https://vouch-clients.s3.ap-southeast-2.amazonaws.com/vouch/fonts/Roobert-Bold.woff2",{style:"normal",weight:"700"}),r=new FontFace("Roobert Captions","url(https://media-player-fonts.s3.ap-southeast-2.amazonaws.com/Roobert-Regular.woff2)",{style:"normal",weight:"400"}),n=Rh.map(s=>({load:!1,font:new FontFace(s.family,`url(${s.url})`,{style:s.style})}));return[{load:!0,font:i},{load:!0,font:e},{load:!0,font:t},{load:!0,font:r},...n]}),bi={"red-120":"#feeded","red-130":"#fcd5d0","red-400":"#e84a4a","red-500":"#c51c3a","red-700":"#a21c39","red-800":"#850231","red-900":"#580A2D","teal-80":"#f3fafa","teal-100":"#d6f1f1","teal-200":"#ace3e3","teal-300":"#7acace","teal-400":"#4faab2","teal-500":"#358f97","teal-600":"#287179","teal-700":"#22555c","teal-800":"#21484e","teal-900":"#1f3d42","teal-950":"#0d2126","purple-100":"#d7cfff","purple-700":"#5f2fe9","green-200":"#a4d7aa","green-500":"#38b319","green-800":"#2b3c2f","grey-100":"#f0f0f0","light-50":"rgba(255, 255, 255, .05)","light-100":"rgba(255, 255, 255, .1)","light-200":"rgba(255, 255, 255, .2)","light-400":"rgba(255, 255, 255, .4)","light-500":"rgba(255, 255, 255, .5)","light-640":"rgba(255, 255, 255, .64)","light-800":"rgba(255, 255, 255, .8)","light-1000":"#fff","dark-50":"rgba(0, 0, 0, .05)","dark-80":"rgba(0, 0, 0, .08)","dark-100":"rgba(0, 0, 0, .1)","dark-200":"rgba(0, 0, 0, .2)","dark-250":"rgba(0, 0, 0, .25)","dark-400":"rgba(0, 0, 0, .4)","dark-500":"rgba(0, 0, 0, .5)","dark-640":"rgba(0, 0, 0, .64)","dark-800":"rgba(0, 0, 0, .8)","dark-900":"rgba(0, 0, 0, .9)","dark-1000":"#000"},Ix={colors:bi,space:{xxs:".25rem",xs:".5rem",small:".75rem",medium:"1rem",large:"1.5rem",xl:"2.5rem"},sizes:{xxs:"1rem",xs:"1.5rem",small:"2rem",medium:"2.5rem",large:"3rem"},fontWeights:{regular:400,semibold:600},lineHeights:{small:1.1,medium:1.25,large:1.4},letterSpacings:{xxs:"-.04rem",xs:"-.03rem",small:"-.02rem",medium:"-.01rem",large:0},fontSizes:{micro:".625rem",small:".75rem",medium:".875rem",large:"1rem",xl:"1.25rem",xxl:"1.5rem",xxxl:"2rem",huge:"2.75rem"},fontFamilies:{sans:'Roobert, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,"Noto Sans", "Noto Color Emoji", sans-serif, "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji"',mono:'"Maison Neue Mono", Menlo, Monaco, Consolas, Liberation Mono, "Courier New", monospace'},borderWidths:{thin:".0625rem"},radii:{small:".25rem",medium:".5rem",large:".75rem",xl:"1rem"},shadows:{small:`.25rem .25rem .25rem ${bi["dark-100"]}`,medium:`0 .125rem .625rem ${bi["dark-100"]}`,large:`0 .25rem 1rem ${bi["dark-50"]}`,xl:`.25rem .25rem 1rem ${bi["dark-250"]}`,xxl:`0 .25rem 2rem ${bi["dark-100"]}`,xxxl:`.25rem .25rem 3rem ${bi["dark-250"]}`,toolbar:`0 -.625rem .625rem ${bi["dark-50"]}`,text:`0 0 .25rem ${bi["dark-250"]}`},timings:{fast:".1s",normal:".2s",slow:".3s"},easings:{linear:"linear"},focusOutline:{width:".2rem",color:bi["dark-400"]},iconSizes:{small:"0.75rem",medium:"1rem",large:"1.5rem"}},h0=yb(Ix,{delimiter:"-"}),vx=Object.keys(h0).map(i=>pn(`:host { --${i}: ${h0[i]}; }`)),Je=(i=>{const e=class extends i{firstUpdated(){Ex().forEach(({load:s,font:o})=>{document.fonts.add(o),s&&o.load()})}};return e.styles=[(i==null?void 0:i.styles)??[],vx,pt`
2529
2529
  :host {
2530
2530
  font-family: var(--fontFamilies-sans);
2531
2531
  font-size: var(--fontSizes-medium);