UNPKG

@7sage/vidstack

Version:

UI component library for building high-quality, accessible video and audio experiences on the web.

3 lines 82.2 kB
const Z=Symbol(0);let Ut=!1,m1=!1,N=null,at=null,k=null,M=0,ut=[],y1={};const s3=()=>{},ft=0,n6=1,qt=2,Gt=3;function o3(){Ut=!0,queueMicrotask(i6)}function i6(){if(!ut.length){Ut=!1;return}m1=!0;for(let t=0;t<ut.length;t++)ut[t].$st!==ft&&l3(ut[t]);ut=[],Ut=!1,m1=!1}function l3(t){let e=[t];for(;t=t[Z];)t.$e&&t.$st!==ft&&e.push(t);for(let n=e.length-1;n>=0;n--)_1(e[n])}function c3(t){const e=Kt();return At(e,t.length?t.bind(null,ht.bind(e)):t,null)}function a3(t){return At(N,t,null)}function r6(t){return At(null,t,null)}function u3(){m1||i6()}function b1(){return N}function F(t,e){try{return At(e,t,null)}catch(n){w1(e,n);return}}function s6(t,e=N){return e?.$cx[t]}function f3(t,e,n=N){n&&(n.$cx={...n.$cx,[t]:e})}function wt(t){if(!t||!N)return t||s3;const e=N;return e.$d?Array.isArray(e.$d)?e.$d.push(t):e.$d=[e.$d,t]:e.$d=t,function(){e.$st!==Gt&&(t.call(null),Yt(e.$d)?e.$d=null:Array.isArray(e.$d)&&e.$d.splice(e.$d.indexOf(t),1))}}function ht(t=!0){if(this.$st!==Gt){if(this.$h)if(Array.isArray(this.$h))for(let e=this.$h.length-1;e>=0;e--)ht.call(this.$h[e]);else ht.call(this.$h);if(t){const e=this[Z];e&&(Array.isArray(e.$h)?e.$h.splice(e.$h.indexOf(this),1):e.$h=null),h3(this)}}}function h3(t){t.$st=Gt,t.$d&&o6(t),t.$s&&E1(t,0),t[Z]=null,t.$s=null,t.$o=null,t.$h=null,t.$cx=y1,t.$eh=null}function o6(t){try{if(Array.isArray(t.$d))for(let e=t.$d.length-1;e>=0;e--){const n=t.$d[e];n.call(n)}else t.$d.call(t.$d);t.$d=null}catch(e){w1(t,e)}}function At(t,e,n){const i=N,r=at;N=t,at=n;try{return e.call(t)}finally{N=i,at=r}}function w1(t,e){if(!t||!t.$eh)throw e;let n=0,i=t.$eh.length,r=e;for(n=0;n<i;n++)try{t.$eh[n](r);break}catch(s){r=s}if(n===i)throw r}function A1(){return this.$st===Gt?this.$v:(at&&!this.$e&&(!k&&at.$s&&at.$s[M]==this?M++:k?k.push(this):k=[this]),this.$c&&_1(this),this.$v)}function l6(t){const e=Yt(t)?t(this.$v):t;if(this.$ch(this.$v,e)&&(this.$v=e,this.$o))for(let n=0;n<this.$o.length;n++)f6(this.$o[n],qt);return this.$v}const L1=function(){this[Z]=null,this.$h=null,N&&N.append(this)},tt=L1.prototype;tt.$cx=y1,tt.$eh=null,tt.$c=null,tt.$d=null,tt.append=function(t){t[Z]=this,this.$h?Array.isArray(this.$h)?this.$h.push(t):this.$h=[this.$h,t]:this.$h=t,t.$cx=t.$cx===y1?this.$cx:{...this.$cx,...t.$cx},this.$eh&&(t.$eh=t.$eh?[...t.$eh,...this.$eh]:this.$eh)},tt.dispose=function(){ht.call(this)};function Kt(){return new L1}const c6=function(e,n,i){L1.call(this),this.$st=n?qt:ft,this.$i=!1,this.$e=!1,this.$s=null,this.$o=null,this.$v=e,n&&(this.$c=n),i&&i.dirty&&(this.$ch=i.dirty)},x1=c6.prototype;Object.setPrototypeOf(x1,tt),x1.$ch=d3,x1.call=A1;function H1(t,e,n){return new c6(t,e,n)}function d3(t,e){return t!==e}function Yt(t){return typeof t=="function"}function _1(t){if(t.$st===n6)for(let e=0;e<t.$s.length&&(_1(t.$s[e]),t.$st!==qt);e++);t.$st===qt?a6(t):t.$st=ft}function C3(t){t.$h&&ht.call(t,!1),t.$d&&o6(t),t.$eh=t[Z]?t[Z].$eh:null}function a6(t){let e=k,n=M;k=null,M=0;try{C3(t);const i=At(t,t.$c,t);u6(t),!t.$e&&t.$i?l6.call(t,i):(t.$v=i,t.$i=!0)}catch(i){u6(t),w1(t,i)}finally{k=e,M=n,t.$st=ft}}function u6(t){if(k){if(t.$s&&E1(t,M),t.$s&&M>0){t.$s.length=M+k.length;for(let n=0;n<k.length;n++)t.$s[M+n]=k[n]}else t.$s=k;let e;for(let n=M;n<t.$s.length;n++)e=t.$s[n],e.$o?e.$o.push(t):e.$o=[t]}else t.$s&&M<t.$s.length&&(E1(t,M),t.$s.length=M)}function f6(t,e){if(!(t.$st>=e)&&(t.$e&&t.$st===ft&&(ut.push(t),Ut||o3()),t.$st=e,t.$o))for(let n=0;n<t.$o.length;n++)f6(t.$o[n],n6)}function E1(t,e){let n,i;for(let r=e;r<t.$s.length;r++)n=t.$s[r],n.$o&&(i=n.$o.indexOf(t),n.$o[i]=n.$o[n.$o.length-1],n.$o.pop())}function V1(...t){}function h6(t){return t===null}function Xt(t){return typeof t>"u"}function p3(t){return h6(t)||Xt(t)}function $3(t){return t?.constructor===Object}function g3(t){return typeof t=="number"&&!Number.isNaN(t)}function M1(t){return typeof t=="string"}function v3(t){return typeof t=="boolean"}function Jt(t){return typeof t=="function"}function S1(t){return Array.isArray(t)}const m3=Event,d6=Symbol("DOM_EVENT");class T1 extends m3{[d6]=!0;detail;triggers=new y3;get trigger(){return this.triggers.source}get originEvent(){return this.triggers.origin}get isOriginTrusted(){return this.triggers.origin?.isTrusted??!1}constructor(e,...n){super(e,n[0]),this.detail=n[0]?.detail;const i=n[0]?.trigger;i&&this.triggers.add(i)}}class y3{chain=[];get source(){return this.chain[0]}get origin(){return this.chain[this.chain.length-1]}add(e){this.chain.push(e),b3(e)&&this.chain.push(...e.triggers)}remove(e){return this.chain.splice(this.chain.indexOf(e),1)[0]}has(e){return this.chain.some(n=>n===e)}hasType(e){return!!this.findType(e)}findType(e){return this.chain.find(n=>n.type===e)}walk(e){for(const n of this.chain){const i=e(n);if(i)return[n,i]}}[Symbol.iterator](){return this.chain.values()}}function b3(t){return!!t?.[d6]}class w3 extends EventTarget{$ts__events;addEventListener(e,n,i){return super.addEventListener(e,n,i)}removeEventListener(e,n,i){return super.removeEventListener(e,n,i)}}function C6(t,e,n,i){return t.addEventListener(e,n,i),wt(()=>t.removeEventListener(e,n,i))}class A3{#t;#e;get signal(){return this.#e.signal}constructor(e){this.#t=e,this.#e=new AbortController,wt(this.abort.bind(this))}add(e,n,i){if(this.signal.aborted)throw Error("aborted");return this.#t.addEventListener(e,n,{...i,signal:i?.signal?L3(this.signal,i.signal):this.signal}),this}remove(e,n){return this.#t.removeEventListener(e,n),this}abort(e){this.#e.abort(e)}}function L3(...t){const e=new AbortController,n={signal:e.signal};function i(r){e.abort(r.target.reason)}for(const r of t){if(r.aborted){e.abort(r.reason);break}r.addEventListener("abort",i,n)}return e.signal}function x3(t){return!!t?.type.startsWith("pointer")}function H3(t){return!!t?.type.startsWith("touch")}function _3(t){return/^(click|mouse)/.test(t?.type??"")}function k1(t){return!!t?.type.startsWith("key")}function E3(t){return k1(t)&&t.key==="Enter"}function V3(t){return k1(t)&&(t.key==="Enter"||t.key===" ")}function M3(t){return t instanceof Node}function O1(t,e,n){if(t)if(!n&&n!==""&&n!==0)t.removeAttribute(e);else{const i=n===!0?"":n+"";t.getAttribute(e)!==i&&t.setAttribute(e,i)}else return}function N1(t,e,n){if(t)!n&&n!==0?t.style.removeProperty(e):t.style.setProperty(e,n+"");else return}function S3(t,e,n){t.classList[n?"add":"remove"](e)}function Qt(t,e){const n=H1(t,null,e),i=A1.bind(n);return i[Z]=!0,i.set=l6.bind(n),i}function T3(t){return Yt(t)&&Z in t}function p6(t,e){const n=H1(e?.initial,t,e),i=A1.bind(n);return i[Z]=!0,i}function k3(t,e){const n=H1(null,function(){let r=t();return Yt(r)&&wt(r),null},void 0);return n.$e=!0,a6(n),ht.bind(n,!0)}function O3(t){return T3(t)&&"set"in t}const t1=k3;function N3(t){return{id:Symbol(),provide:t}}function $6(t,e,n=b1()){const i=!Xt(e);f3(t.id,i?e:t.provide?.(),n)}function g6(t){return s6(t.id)}function R3(t){return!Xt(s6(t.id))}const Lt=Symbol(0),xt=Symbol(0),v6=Symbol(0),R1={};class I3{$ts__events;$ts__vars;[v6]=null;$el=Qt(null);el=null;scope=null;attachScope=null;connectScope=null;component=null;destroyed=!1;props=R1;attrs=null;styles=null;state;$state;#t=[];#e=[];#n=[];#i=[];constructor(e,n,i){this.scope=n,i?.scope&&i.scope.append(n);let r=e.state,s=e.props;if(r&&(this.$state=r.create(),this.state=new Proxy(this.$state,{get:(o,l)=>this.$state[l]()}),$6(r,this.$state)),s&&(this.props=P3(s),i?.props))for(const o of Object.keys(i.props))this.props[o]?.set(i.props[o]);wt(this.destroy.bind(this))}setup(){F(()=>{for(const e of this.#t)e()},this.scope)}attach(e){this.el||(this.el=e,this.$el.set(e),F(()=>{this.attachScope=Kt(),F(()=>{for(const n of this.#e)n(this.el);this.#r(),this.#s()},this.attachScope)},this.scope),e.dispatchEvent(new Event("attached")))}detach(){this.attachScope?.dispose(),this.attachScope=null,this.connectScope=null,this.el=null,this.$el.set(null)}connect(){!this.el||!this.attachScope||!this.#n.length||F(()=>{this.connectScope=Kt(),F(()=>{for(const e of this.#n)e(this.el)},this.connectScope)},this.attachScope)}disconnect(){this.connectScope?.dispose(),this.connectScope=null}destroy(){if(this.destroyed)return;this.destroyed=!0,F(()=>{for(const n of this.#i)n(this.el)},this.scope);const e=this.el;this.detach(),this.scope.dispose(),this.#t.length=0,this.#e.length=0,this.#n.length=0,this.#i.length=0,this.component=null,this.attrs=null,this.styles=null,this.props=R1,this.scope=null,this.state=R1,this.$state=null,e&&delete e.$}addHooks(e){e.onSetup&&this.#t.push(e.onSetup.bind(e)),e.onAttach&&this.#e.push(e.onAttach.bind(e)),e.onConnect&&this.#n.push(e.onConnect.bind(e)),e.onDestroy&&this.#i.push(e.onDestroy.bind(e))}#r(){if(this.attrs)for(const e of Object.keys(this.attrs))Jt(this.attrs[e])?t1(this.#o.bind(this,e)):O1(this.el,e,this.attrs[e])}#s(){if(this.styles)for(const e of Object.keys(this.styles))Jt(this.styles[e])?t1(this.#l.bind(this,e)):N1(this.el,e,this.styles[e])}#o(e){O1(this.el,e,this.attrs[e].call(this.component))}#l(e){N1(this.el,e,this.styles[e].call(this.component))}}function P3(t){const e={};for(const n of Object.keys(t)){const i=t[n];e[n]=Qt(i,i)}return e}let Ht={$$:null};function Z3(t,e){return c3(()=>{Ht.$$=new I3(t,b1(),e);const n=new t;return Ht.$$.component=n,Ht.$$=null,n})}class m6 extends EventTarget{$$;get el(){return this.$$.el}get $el(){return this.$$.$el()}get scope(){return this.$$.scope}get attachScope(){return this.$$.attachScope}get connectScope(){return this.$$.connectScope}get $props(){return this.$$.props}get $state(){return this.$$.$state}get state(){return this.$$.state}constructor(){super(),Ht.$$&&this.attach(Ht)}attach({$$:e}){return this.$$=e,e.addHooks(this),this}addEventListener(e,n,i){this.listen(e,n,i)}removeEventListener(e,n,i){this.el?.removeEventListener(e,n,i)}setAttributes(e){this.$$.attrs||(this.$$.attrs={}),Object.assign(this.$$.attrs,e)}setStyles(e){this.$$.styles||(this.$$.styles={}),Object.assign(this.$$.styles,e)}setCSSVars(e){this.setStyles(e)}createEvent(e,...n){return new T1(e,n[0])}dispatch(e,...n){if(!this.el)return!1;const i=e instanceof Event?e:new T1(e,n[0]);return Object.defineProperty(i,"target",{get:()=>this.$$.component}),r6(()=>(this.$$[v6]?.(i),this.el.dispatchEvent(i)))}dispatchEvent(e){return this.dispatch(e)}listen(e,n,i){return this.el?C6(this.el,e,n,i):V1}}function F3(t,e){for(const n of t)n(e)}function y6(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function D3(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function W3(t){return t.charAt(0).toUpperCase()+t.slice(1)}const I1=t=>t===null?"":t+"",B3=t=>t===null?null:t+"",j3=t=>t===null?0:Number(t),b6=t=>t!==null,z3=()=>null,U3=t=>t===null?[]:JSON.parse(t),q3=t=>t===null?{}:JSON.parse(t);function G3(t){if(t===null)return B3;switch(typeof t){case"undefined":return I1;case"string":return I1;case"boolean":return b6;case"number":return j3;case"function":return z3;case"object":return S1(t)?U3:q3;default:return I1}}const Y=Symbol(0),w6=Symbol(0),et=Symbol(0),_t=Symbol(0);var z;(function(t){t[t.Idle=0]="Idle";const n=1;t[t.Pending=n]="Pending";const i=2;t[t.Ready=i]="Ready"})(z||(z={}));function K3(t,e){class n extends t{static attrs;static[Y]=null;static get observedAttributes(){if(!this[Y]&&e.props){const r=new Map;for(const s of Object.keys(e.props)){let o=this.attrs?.[s],l=M1(o)?o:o&&o?.attr;l!==!1&&(l||(l=y6(s)),r.set(l,{prop:s,converter:o&&!M1(o)&&o?.converter||G3(e.props[s])}))}this[Y]=r}return this[Y]?Array.from(this[Y].keys()):[]}$;[et]=z.Idle;[_t]=null;keepAlive=!1;forwardKeepAlive=!0;get scope(){return this.$.$$.scope}get attachScope(){return this.$.$$.attachScope}get connectScope(){return this.$.$$.connectScope}get $props(){return this.$.$$.props}get $state(){return this.$.$$.$state}get state(){return this.$.state}constructor(...r){if(super(...r),this.$=F(()=>Z3(e),null),this.$.$$.addHooks(this),e.props){const s=this.$props,o=Object.getOwnPropertyDescriptors(this);for(const l of Object.keys(o))l in e.props&&(s[l].set(this[l]),delete this[l])}}attributeChangedCallback(r,s,o){const l=this.constructor;if(!l[Y]){super.attributeChangedCallback?.(r,s,o);return}const c=l[Y].get(r);c&&(this[c.prop]=c.converter(o))}connectedCallback(){const r=this.$?.$$;if(!r||r.destroyed)return;if(this[et]!==z.Ready){X3.call(this);return}if(!this.isConnected)return;this.hasAttribute("keep-alive")&&(this.keepAlive=!0),r.connect(),S1(this[_t])&&F3(this[_t],this),this[_t]=null;const s=super.connectedCallback;s&&F(()=>s.call(this),this.connectScope)}disconnectedCallback(){const r=this.$?.$$;if(!r||r.destroyed)return;r.disconnect();const s=super.disconnectedCallback;s&&s.call(this),!this.keepAlive&&!this.hasAttribute("keep-alive")&&setTimeout(()=>{requestAnimationFrame(()=>{this.isConnected||r.destroy()})},0)}[w6](){const r=this.$.$$,s=this.constructor;if(r.destroyed)return;const o=s[Y];if(o)for(const l of this.attributes){let c=o.get(l.name);c&&c.converter&&r.props[c.prop].set(c.converter(this.getAttribute(l.name)))}r.setup(),r.attach(this),this[et]=z.Ready,this.connectedCallback()}subscribe(r){return this.$.subscribe(r)}destroy(){this.disconnectedCallback(),this.$.destroy()}}return Y3(n,e),n}function Y3(t,e){const n=t.prototype,i=e.prototype;if(e.props)for(const r of Object.keys(e.props))Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get(){return this.$props[r]()},set(s){this.$props[r].set(s)}});if(i[Lt])for(const r of i[Lt])Object.defineProperty(n,r,{enumerable:!0,configurable:!0,get(){return this.$[r]},set(s){this.$[r]=s}});if(i[xt])for(const r of i[xt])n[r]=function(...s){return this.$[r](...s)}}function X3(){if(this[et]!==z.Idle)return;this[et]=z.Pending;const t=Q3(this),e=t&&window.customElements.get(t.localName),n=t&&t[et]===z.Ready;if(t&&(!e||!n)){J3.call(this,t);return}A6.call(this,t)}async function J3(t){await window.customElements.whenDefined(t.localName),t[et]!==z.Ready&&await new Promise(e=>(t[_t]??=[]).push(e)),A6.call(this,t)}function A6(t){if(this.isConnected){if(t){t.keepAlive&&t.forwardKeepAlive&&(this.keepAlive=!0,this.setAttribute("keep-alive",""));const e=this.$.$$.scope;e&&t.$.$$.attachScope.append(e)}this[w6]()}}function Q3(t){let e=t.parentNode,n=t.localName.split("-",1)[0]+"-";for(;e;){if(e.nodeType===1&&e.localName.startsWith(n))return e;e=e.parentNode}return null}function te(t,e=!1){(e||!window.customElements.get(t.tagName))&&window.customElements.define(t.tagName,t)}class ee extends m6{subscribe(e){return F(()=>t1(()=>e(this.state)),this.$$.scope)}destroy(){this.$$.destroy()}}function ne(t,e,n){t[Lt]||(t[Lt]=new Set),t[Lt].add(e)}function ie(t,e,n){t[xt]||(t[xt]=new Set),t[xt].add(e)}class re{id=Symbol(0);record;#t;constructor(e){this.record=e,this.#t=Object.getOwnPropertyDescriptors(e)}create(){const e={},n=new Proxy(e,{get:(i,r)=>e[r]()});for(const i of Object.keys(this.record)){const r=this.#t[i].get;e[i]=r?p6(r.bind(n)):Qt(this.record[i])}return e}reset(e,n){for(const i of Object.keys(e))!this.#t[i].get&&(!n||n(i))&&e[i].set(this.record[i])}}function se(t){return g6(t)}function oe(t){return Jt(t)?t():t}function le(t){return t?"true":"false"}function ce(){const t=new Set;return{add(...e){for(const n of e)t.add(n)},empty(){for(const e of t)e();t.clear()}}}function ae(t){return Object.keys(t)}function ue(){let t,e;return{promise:new Promise((i,r)=>{t=i,e=r}),resolve:t,reject:e}}function fe(t){return new Promise(e=>setTimeout(e,t))}function he(t){let e=-1,n;function i(...r){n=r,!(e>=0)&&(e=window.requestAnimationFrame(()=>{t.apply(this,n),e=-1,n=void 0}))}return i}const de=typeof window<"u"?"requestIdleCallback"in window?window.requestIdleCallback:t=>window.setTimeout(t,1):V1;function Ce(t,e){return new Promise(n=>{de(i=>{t?.(i),n()},e)})}var S={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},L6=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],x6=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],H6=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],H=typeof window<"u"&&typeof window.document<"u"?window.document:{},O="fullscreenEnabled"in H&&Object.keys(S)||L6[0]in H&&L6||x6[0]in H&&x6||H6[0]in H&&H6||[],pe={requestFullscreen:function(t){return t[O[S.requestFullscreen]]()},requestFullscreenFunction:function(t){return t[O[S.requestFullscreen]]},get exitFullscreen(){return H[O[S.exitFullscreen]].bind(H)},get fullscreenPseudoClass(){return":"+O[S.fullscreen]},addEventListener:function(t,e,n){return H.addEventListener(O[S[t]],e,n)},removeEventListener:function(t,e,n){return H.removeEventListener(O[S[t]],e,n)},get fullscreenEnabled(){return!!H[O[S.fullscreenEnabled]]},set fullscreenEnabled(t){},get fullscreenElement(){return H[O[S.fullscreenElement]]},set fullscreenElement(t){},get onfullscreenchange(){return H[("on"+O[S.fullscreenchange]).toLowerCase()]},set onfullscreenchange(t){return H[("on"+O[S.fullscreenchange]).toLowerCase()]=t},get onfullscreenerror(){return H[("on"+O[S.fullscreenerror]).toLowerCase()]},set onfullscreenerror(t){return H[("on"+O[S.fullscreenerror]).toLowerCase()]=t}};const e1=Math.min,nt=Math.max,n1=Math.round,i1=Math.floor,D=t=>({x:t,y:t}),$e={left:"right",right:"left",bottom:"top",top:"bottom"},ge={start:"end",end:"start"};function _6(t,e,n){return nt(t,e1(e,n))}function P1(t,e){return typeof t=="function"?t(e):t}function dt(t){return t.split("-")[0]}function Z1(t){return t.split("-")[1]}function E6(t){return t==="x"?"y":"x"}function V6(t){return t==="y"?"height":"width"}function Et(t){return["top","bottom"].includes(dt(t))?"y":"x"}function M6(t){return E6(Et(t))}function ve(t,e,n){n===void 0&&(n=!1);const i=Z1(t),r=M6(t),s=V6(r);let o=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(o=r1(o)),[o,r1(o)]}function me(t){const e=r1(t);return[F1(t),e,F1(e)]}function F1(t){return t.replace(/start|end/g,e=>ge[e])}function ye(t,e,n){const i=["left","right"],r=["right","left"],s=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:i:e?i:r;case"left":case"right":return e?s:o;default:return[]}}function be(t,e,n,i){const r=Z1(t);let s=ye(dt(t),n==="start",i);return r&&(s=s.map(o=>o+"-"+r),e&&(s=s.concat(s.map(F1)))),s}function r1(t){return t.replace(/left|right|bottom|top/g,e=>$e[e])}function we(t){return{top:0,right:0,bottom:0,left:0,...t}}function Ae(t){return typeof t!="number"?we(t):{top:t,right:t,bottom:t,left:t}}function s1(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function S6(t,e,n){let{reference:i,floating:r}=t;const s=Et(e),o=M6(e),l=V6(o),c=dt(e),a=s==="y",u=i.x+i.width/2-r.width/2,f=i.y+i.height/2-r.height/2,d=i[l]/2-r[l]/2;let h;switch(c){case"top":h={x:u,y:i.y-r.height};break;case"bottom":h={x:u,y:i.y+i.height};break;case"right":h={x:i.x+i.width,y:f};break;case"left":h={x:i.x-r.width,y:f};break;default:h={x:i.x,y:i.y}}switch(Z1(e)){case"start":h[o]-=d*(n&&a?-1:1);break;case"end":h[o]+=d*(n&&a?-1:1);break}return h}const Le=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:o}=n,l=s.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let a=await o.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:f}=S6(a,i,c),d=i,h={},C=0;for(let p=0;p<l.length;p++){const{name:v,fn:$}=l[p],{x:m,y,data:A,reset:w}=await $({x:u,y:f,initialPlacement:i,placement:d,strategy:r,middlewareData:h,rects:a,platform:o,elements:{reference:t,floating:e}});u=m??u,f=y??f,h={...h,[v]:{...h[v],...A}},w&&C<=50&&(C++,typeof w=="object"&&(w.placement&&(d=w.placement),w.rects&&(a=w.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:r}):w.rects),{x:u,y:f}=S6(a,d,c)),p=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:h}};async function T6(t,e){var n;e===void 0&&(e={});const{x:i,y:r,platform:s,rects:o,elements:l,strategy:c}=t,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=P1(e,t),C=Ae(h),v=l[d?f==="floating"?"reference":"floating":f],$=s1(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(l.floating)),boundary:a,rootBoundary:u,strategy:c})),m=f==="floating"?{x:i,y:r,width:o.floating.width,height:o.floating.height}:o.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(l.floating)),A=await(s.isElement==null?void 0:s.isElement(y))?await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1}:{x:1,y:1},w=s1(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:m,offsetParent:y,strategy:c}):m);return{top:($.top-w.top+C.top)/A.y,bottom:(w.bottom-$.bottom+C.bottom)/A.y,left:($.left-w.left+C.left)/A.x,right:(w.right-$.right+C.right)/A.x}}const xe=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:r,middlewareData:s,rects:o,initialPlacement:l,platform:c,elements:a}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:C="none",flipAlignment:p=!0,...v}=P1(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const $=dt(r),m=Et(l),y=dt(l)===l,A=await(c.isRTL==null?void 0:c.isRTL(a.floating)),w=d||(y||!p?[r1(l)]:me(l)),j=C!=="none";!d&&j&&w.push(...be(l,p,C,A));const P=[l,...w],U=await T6(e,v),Q=[];let q=((i=s.flip)==null?void 0:i.overflows)||[];if(u&&Q.push(U[$]),f){const L=ve(r,o,A);Q.push(U[L[0]],U[L[1]])}if(q=[...q,{placement:r,overflows:Q}],!Q.every(L=>L<=0)){var yt,bt;const L=(((yt=s.flip)==null?void 0:yt.index)||0)+1,lt=P[L];if(lt)return{data:{index:L,overflows:q},reset:{placement:lt}};let _=(bt=q.filter(g=>g.overflows[0]<=0).sort((g,E)=>g.overflows[1]-E.overflows[1])[0])==null?void 0:bt.placement;if(!_)switch(h){case"bestFit":{var x;const g=(x=q.filter(E=>{if(j){const V=Et(E.placement);return V===m||V==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(V=>V>0).reduce((V,ct)=>V+ct,0)]).sort((E,V)=>E[1]-V[1])[0])==null?void 0:x[0];g&&(_=g);break}case"initialPlacement":_=l;break}if(r!==_)return{reset:{placement:_}}}return{}}}},He=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r}=e,{mainAxis:s=!0,crossAxis:o=!1,limiter:l={fn:v=>{let{x:$,y:m}=v;return{x:$,y:m}}},...c}=P1(t,e),a={x:n,y:i},u=await T6(e,c),f=Et(dt(r)),d=E6(f);let h=a[d],C=a[f];if(s){const v=d==="y"?"top":"left",$=d==="y"?"bottom":"right",m=h+u[v],y=h-u[$];h=_6(m,h,y)}if(o){const v=f==="y"?"top":"left",$=f==="y"?"bottom":"right",m=C+u[v],y=C-u[$];C=_6(m,C,y)}const p=l.fn({...e,[d]:h,[f]:C});return{...p,data:{x:p.x-n,y:p.y-i,enabled:{[d]:s,[f]:o}}}}}};function o1(){return typeof window<"u"}function Ct(t){return k6(t)?(t.nodeName||"").toLowerCase():"#document"}function T(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function W(t){var e;return(e=(k6(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function k6(t){return o1()?t instanceof Node||t instanceof T(t).Node:!1}function R(t){return o1()?t instanceof Element||t instanceof T(t).Element:!1}function B(t){return o1()?t instanceof HTMLElement||t instanceof T(t).HTMLElement:!1}function O6(t){return!o1()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof T(t).ShadowRoot}function Vt(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=I(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(r)}function _e(t){return["table","td","th"].includes(Ct(t))}function l1(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function D1(t){const e=W1(),n=R(t)?I(t):t;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function Ee(t){let e=X(t);for(;B(e)&&!pt(e);){if(D1(e))return e;if(l1(e))return null;e=X(e)}return null}function W1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pt(t){return["html","body","#document"].includes(Ct(t))}function I(t){return T(t).getComputedStyle(t)}function c1(t){return R(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function X(t){if(Ct(t)==="html")return t;const e=t.assignedSlot||t.parentNode||O6(t)&&t.host||W(t);return O6(e)?e.host:e}function N6(t){const e=X(t);return pt(e)?t.ownerDocument?t.ownerDocument.body:t.body:B(e)&&Vt(e)?e:N6(e)}function Mt(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=N6(t),s=r===((i=t.ownerDocument)==null?void 0:i.body),o=T(r);if(s){const l=B1(o);return e.concat(o,o.visualViewport||[],Vt(r)?r:[],l&&n?Mt(l):[])}return e.concat(r,Mt(r,[],n))}function B1(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function R6(t){const e=I(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=B(t),s=r?t.offsetWidth:n,o=r?t.offsetHeight:i,l=n1(n)!==s||n1(i)!==o;return l&&(n=s,i=o),{width:n,height:i,$:l}}function j1(t){return R(t)?t:t.contextElement}function $t(t){const e=j1(t);if(!B(e))return D(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:s}=R6(e);let o=(s?n1(n.width):n.width)/i,l=(s?n1(n.height):n.height)/r;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const Ve=D(0);function I6(t){const e=T(t);return!W1()||!e.visualViewport?Ve:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Me(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==T(t)?!1:e}function it(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=j1(t);let o=D(1);e&&(i?R(i)&&(o=$t(i)):o=$t(t));const l=Me(s,n,i)?I6(s):D(0);let c=(r.left+l.x)/o.x,a=(r.top+l.y)/o.y,u=r.width/o.x,f=r.height/o.y;if(s){const d=T(s),h=i&&R(i)?T(i):i;let C=d,p=B1(C);for(;p&&i&&h!==C;){const v=$t(p),$=p.getBoundingClientRect(),m=I(p),y=$.left+(p.clientLeft+parseFloat(m.paddingLeft))*v.x,A=$.top+(p.clientTop+parseFloat(m.paddingTop))*v.y;c*=v.x,a*=v.y,u*=v.x,f*=v.y,c+=y,a+=A,C=T(p),p=B1(C)}}return s1({width:u,height:f,x:c,y:a})}function z1(t,e){const n=c1(t).scrollLeft;return e?e.left+n:it(W(t)).left+n}function P6(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=i.left+e.scrollLeft-(n?0:z1(t,i)),s=i.top+e.scrollTop;return{x:r,y:s}}function Se(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const s=r==="fixed",o=W(i),l=e?l1(e.floating):!1;if(i===o||l&&s)return n;let c={scrollLeft:0,scrollTop:0},a=D(1);const u=D(0),f=B(i);if((f||!f&&!s)&&((Ct(i)!=="body"||Vt(o))&&(c=c1(i)),B(i))){const h=it(i);a=$t(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}const d=o&&!f&&!s?P6(o,c,!0):D(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-c.scrollLeft*a.x+u.x+d.x,y:n.y*a.y-c.scrollTop*a.y+u.y+d.y}}function Te(t){return Array.from(t.getClientRects())}function ke(t){const e=W(t),n=c1(t),i=t.ownerDocument.body,r=nt(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),s=nt(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+z1(t);const l=-n.scrollTop;return I(i).direction==="rtl"&&(o+=nt(e.clientWidth,i.clientWidth)-r),{width:r,height:s,x:o,y:l}}function Oe(t,e){const n=T(t),i=W(t),r=n.visualViewport;let s=i.clientWidth,o=i.clientHeight,l=0,c=0;if(r){s=r.width,o=r.height;const a=W1();(!a||a&&e==="fixed")&&(l=r.offsetLeft,c=r.offsetTop)}return{width:s,height:o,x:l,y:c}}function Ne(t,e){const n=it(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,s=B(t)?$t(t):D(1),o=t.clientWidth*s.x,l=t.clientHeight*s.y,c=r*s.x,a=i*s.y;return{width:o,height:l,x:c,y:a}}function Z6(t,e,n){let i;if(e==="viewport")i=Oe(t,n);else if(e==="document")i=ke(W(t));else if(R(e))i=Ne(e,n);else{const r=I6(t);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return s1(i)}function F6(t,e){const n=X(t);return n===e||!R(n)||pt(n)?!1:I(n).position==="fixed"||F6(n,e)}function Re(t,e){const n=e.get(t);if(n)return n;let i=Mt(t,[],!1).filter(l=>R(l)&&Ct(l)!=="body"),r=null;const s=I(t).position==="fixed";let o=s?X(t):t;for(;R(o)&&!pt(o);){const l=I(o),c=D1(o);!c&&l.position==="fixed"&&(r=null),(s?!c&&!r:!c&&l.position==="static"&&!!r&&["absolute","fixed"].includes(r.position)||Vt(o)&&!c&&F6(t,o))?i=i.filter(u=>u!==o):r=l,o=X(o)}return e.set(t,i),i}function Ie(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const o=[...n==="clippingAncestors"?l1(e)?[]:Re(e,this._c):[].concat(n),i],l=o[0],c=o.reduce((a,u)=>{const f=Z6(e,u,r);return a.top=nt(f.top,a.top),a.right=e1(f.right,a.right),a.bottom=e1(f.bottom,a.bottom),a.left=nt(f.left,a.left),a},Z6(e,l,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Pe(t){const{width:e,height:n}=R6(t);return{width:e,height:n}}function Ze(t,e,n){const i=B(e),r=W(e),s=n==="fixed",o=it(t,!0,s,e);let l={scrollLeft:0,scrollTop:0};const c=D(0);if(i||!i&&!s)if((Ct(e)!=="body"||Vt(r))&&(l=c1(e)),i){const d=it(e,!0,s,e);c.x=d.x+e.clientLeft,c.y=d.y+e.clientTop}else r&&(c.x=z1(r));const a=r&&!i&&!s?P6(r,l):D(0),u=o.left+l.scrollLeft-c.x-a.x,f=o.top+l.scrollTop-c.y-a.y;return{x:u,y:f,width:o.width,height:o.height}}function U1(t){return I(t).position==="static"}function D6(t,e){if(!B(t)||I(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return W(t)===n&&(n=n.ownerDocument.body),n}function W6(t,e){const n=T(t);if(l1(t))return n;if(!B(t)){let r=X(t);for(;r&&!pt(r);){if(R(r)&&!U1(r))return r;r=X(r)}return n}let i=D6(t,e);for(;i&&_e(i)&&U1(i);)i=D6(i,e);return i&&pt(i)&&U1(i)&&!D1(i)?n:i||Ee(t)||n}const Fe=async function(t){const e=this.getOffsetParent||W6,n=this.getDimensions,i=await n(t.floating);return{reference:Ze(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function De(t){return I(t).direction==="rtl"}const We={convertOffsetParentRelativeRectToViewportRelativeRect:Se,getDocumentElement:W,getClippingRect:Ie,getOffsetParent:W6,getElementRects:Fe,getClientRects:Te,getDimensions:Pe,getScale:$t,isElement:R,isRTL:De};function B6(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Be(t,e){let n=null,i;const r=W(t);function s(){var l;clearTimeout(i),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),s();const a=t.getBoundingClientRect(),{left:u,top:f,width:d,height:h}=a;if(l||e(),!d||!h)return;const C=i1(f),p=i1(r.clientWidth-(u+d)),v=i1(r.clientHeight-(f+h)),$=i1(u),y={rootMargin:-C+"px "+-p+"px "+-v+"px "+-$+"px",threshold:nt(0,e1(1,c))||1};let A=!0;function w(j){const P=j[0].intersectionRatio;if(P!==c){if(!A)return o();P?o(!1,P):i=setTimeout(()=>{o(!1,1e-7)},1e3)}P===1&&!B6(a,t.getBoundingClientRect())&&o(),A=!1}try{n=new IntersectionObserver(w,{...y,root:r.ownerDocument})}catch{n=new IntersectionObserver(w,y)}n.observe(t)}return o(!0),s}function je(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,a=j1(t),u=r||s?[...a?Mt(a):[],...Mt(e)]:[];u.forEach($=>{r&&$.addEventListener("scroll",n,{passive:!0}),s&&$.addEventListener("resize",n)});const f=a&&l?Be(a,n):null;let d=-1,h=null;o&&(h=new ResizeObserver($=>{let[m]=$;m&&m.target===a&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var y;(y=h)==null||y.observe(e)})),n()}),a&&!c&&h.observe(a),h.observe(e));let C,p=c?it(t):null;c&&v();function v(){const $=it(t);p&&!B6(p,$)&&n(),p=$,C=requestAnimationFrame(v)}return n(),()=>{var $;u.forEach(m=>{r&&m.removeEventListener("scroll",n),s&&m.removeEventListener("resize",n)}),f?.(),($=h)==null||$.disconnect(),h=null,c&&cancelAnimationFrame(C)}}const ze=He,Ue=xe,qe=(t,e,n)=>{const i=new Map,r={platform:We,...n},s={...r.platform,_c:i};return Le(t,e,{...r,platform:s})};var Ge=Ke;function Ke(t,e,n){var i=null,r=null,s=function(){i&&(clearTimeout(i),r=null,i=null)},o=function(){var c=r;s(),c&&c()},l=function(){if(!e)return t.apply(this,arguments);var c=this,a=arguments,u=n&&!i;if(s(),r=function(){t.apply(c,a)},i=setTimeout(function(){if(i=null,!u){var f=r;return r=null,f()}},e),u)return r()};return l.cancel=s,l.flush=o,l}var Ye=Xe;function Xe(t,e,n){var i=null,r=null,s=n&&n.leading,o=n&&n.trailing;s==null&&(s=!0),o==null&&(o=!s),s==!0&&(o=!1);var l=function(){i&&(clearTimeout(i),i=null)},c=function(){var u=r;l(),u&&u()},a=function(){var u=s&&!i,f=this,d=arguments;if(r=function(){return t.apply(f,d)},i||(i=setTimeout(function(){if(i=null,o)return r()},e)),u)return u=!1,r()};return a.cancel=l,a.flush=c,a}var q1;const a1=window,gt=a1.trustedTypes,j6=gt?gt.createPolicy("lit-html",{createHTML:t=>t}):void 0,G1="$lit$",J=`lit$${(Math.random()+"").slice(9)}$`,z6="?"+J,Je=`<${z6}>`,rt=document,St=()=>rt.createComment(""),Tt=t=>t===null||typeof t!="object"&&typeof t!="function",U6=Array.isArray,Qe=t=>U6(t)||typeof t?.[Symbol.iterator]=="function",K1=`[ \f\r]`,kt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,q6=/-->/g,G6=/>/g,st=RegExp(`>|${K1}(?:([^\\s"'>=/]+)(${K1}*=${K1}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),K6=/'/g,Y6=/"/g,X6=/^(?:script|style|textarea|title)$/i,t2=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),e2=t2(1),vt=Symbol.for("lit-noChange"),b=Symbol.for("lit-nothing"),J6=new WeakMap,ot=rt.createTreeWalker(rt,129,null,!1);function Q6(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return j6!==void 0?j6.createHTML(e):e}const n2=(t,e)=>{const n=t.length-1,i=[];let r,s=e===2?"<svg>":"",o=kt;for(let l=0;l<n;l++){const c=t[l];let a,u,f=-1,d=0;for(;d<c.length&&(o.lastIndex=d,u=o.exec(c),u!==null);)d=o.lastIndex,o===kt?u[1]==="!--"?o=q6:u[1]!==void 0?o=G6:u[2]!==void 0?(X6.test(u[2])&&(r=RegExp("</"+u[2],"g")),o=st):u[3]!==void 0&&(o=st):o===st?u[0]===">"?(o=r??kt,f=-1):u[1]===void 0?f=-2:(f=o.lastIndex-u[2].length,a=u[1],o=u[3]===void 0?st:u[3]==='"'?Y6:K6):o===Y6||o===K6?o=st:o===q6||o===G6?o=kt:(o=st,r=void 0);const h=o===st&&t[l+1].startsWith("/>")?" ":"";s+=o===kt?c+Je:f>=0?(i.push(a),c.slice(0,f)+G1+c.slice(f)+J+h):c+J+(f===-2?(i.push(void 0),l):h)}return[Q6(t,s+(t[n]||"<?>")+(e===2?"</svg>":"")),i]};class Rt{constructor({strings:e,_$litType$:n},i){let r;this.parts=[];let s=0,o=0;const l=e.length-1,c=this.parts,[a,u]=n2(e,n);if(this.el=Rt.createElement(a,i),ot.currentNode=this.el.content,n===2){const f=this.el.content,d=f.firstChild;d.remove(),f.append(...d.childNodes)}for(;(r=ot.nextNode())!==null&&c.length<l;){if(r.nodeType===1){if(r.hasAttributes()){const f=[];for(const d of r.getAttributeNames())if(d.endsWith(G1)||d.startsWith(J)){const h=u[o++];if(f.push(d),h!==void 0){const C=r.getAttribute(h.toLowerCase()+G1).split(J),p=/([.?@])?(.*)/.exec(h);c.push({type:1,index:s,name:p[2],strings:C,ctor:p[1]==="."?r2:p[1]==="?"?o2:p[1]==="@"?l2:u1})}else c.push({type:6,index:s})}for(const d of f)r.removeAttribute(d)}if(X6.test(r.tagName)){const f=r.textContent.split(J),d=f.length-1;if(d>0){r.textContent=gt?gt.emptyScript:"";for(let h=0;h<d;h++)r.append(f[h],St()),ot.nextNode(),c.push({type:2,index:++s});r.append(f[d],St())}}}else if(r.nodeType===8)if(r.data===z6)c.push({type:2,index:s});else{let f=-1;for(;(f=r.data.indexOf(J,f+1))!==-1;)c.push({type:7,index:s}),f+=J.length-1}s++}}static createElement(e,n){const i=rt.createElement("template");return i.innerHTML=e,i}}function mt(t,e,n=t,i){var r,s,o,l;if(e===vt)return e;let c=i!==void 0?(r=n._$Co)===null||r===void 0?void 0:r[i]:n._$Cl;const a=Tt(e)?void 0:e._$litDirective$;return c?.constructor!==a&&((s=c?._$AO)===null||s===void 0||s.call(c,!1),a===void 0?c=void 0:(c=new a(t),c._$AT(t,n,i)),i!==void 0?((o=(l=n)._$Co)!==null&&o!==void 0?o:l._$Co=[])[i]=c:n._$Cl=c),c!==void 0&&(e=mt(t,c._$AS(t,e.values),c,i)),e}class i2{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var n;const{el:{content:i},parts:r}=this._$AD,s=((n=e?.creationScope)!==null&&n!==void 0?n:rt).importNode(i,!0);ot.currentNode=s;let o=ot.nextNode(),l=0,c=0,a=r[0];for(;a!==void 0;){if(l===a.index){let u;a.type===2?u=new It(o,o.nextSibling,this,e):a.type===1?u=new a.ctor(o,a.name,a.strings,this,e):a.type===6&&(u=new c2(o,this,e)),this._$AV.push(u),a=r[++c]}l!==a?.index&&(o=ot.nextNode(),l++)}return ot.currentNode=rt,s}v(e){let n=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,n),n+=i.strings.length-2):i._$AI(e[n])),n++}}class It{constructor(e,n,i,r){var s;this.type=2,this._$AH=b,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=r,this._$Cp=(s=r?.isConnected)===null||s===void 0||s}get _$AU(){var e,n;return(n=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&n!==void 0?n:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&e?.nodeType===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=mt(this,e,n),Tt(e)?e===b||e==null||e===""?(this._$AH!==b&&this._$AR(),this._$AH=b):e!==this._$AH&&e!==vt&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Qe(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==b&&Tt(this._$AH)?this._$AA.nextSibling.data=e:this.$(rt.createTextNode(e)),this._$AH=e}g(e){var n;const{values:i,_$litType$:r}=e,s=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=Rt.createElement(Q6(r.h,r.h[0]),this.options)),r);if(((n=this._$AH)===null||n===void 0?void 0:n._$AD)===s)this._$AH.v(i);else{const o=new i2(s,this),l=o.u(this.options);o.v(i),this.$(l),this._$AH=o}}_$AC(e){let n=J6.get(e.strings);return n===void 0&&J6.set(e.strings,n=new Rt(e)),n}T(e){U6(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,r=0;for(const s of e)r===n.length?n.push(i=new It(this.k(St()),this.k(St()),this,this.options)):i=n[r],i._$AI(s),r++;r<n.length&&(this._$AR(i&&i._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,n){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,n);e&&e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var n;this._$AM===void 0&&(this._$Cp=e,(n=this._$AP)===null||n===void 0||n.call(this,e))}}class u1{constructor(e,n,i,r,s){this.type=1,this._$AH=b,this._$AN=void 0,this.element=e,this.name=n,this._$AM=r,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=b}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,n=this,i,r){const s=this.strings;let o=!1;if(s===void 0)e=mt(this,e,n,0),o=!Tt(e)||e!==this._$AH&&e!==vt,o&&(this._$AH=e);else{const l=e;let c,a;for(e=s[0],c=0;c<s.length-1;c++)a=mt(this,l[i+c],n,c),a===vt&&(a=this._$AH[c]),o||(o=!Tt(a)||a!==this._$AH[c]),a===b?e=b:e!==b&&(e+=(a??"")+s[c+1]),this._$AH[c]=a}o&&!r&&this.j(e)}j(e){e===b?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class r2 extends u1{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===b?void 0:e}}const s2=gt?gt.emptyScript:"";class o2 extends u1{constructor(){super(...arguments),this.type=4}j(e){e&&e!==b?this.element.setAttribute(this.name,s2):this.element.removeAttribute(this.name)}}class l2 extends u1{constructor(e,n,i,r,s){super(e,n,i,r,s),this.type=5}_$AI(e,n=this){var i;if((e=(i=mt(this,e,n,0))!==null&&i!==void 0?i:b)===vt)return;const r=this._$AH,s=e===b&&r!==b||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,o=e!==b&&(r===b||s);s&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,i;typeof this._$AH=="function"?this._$AH.call((i=(n=this.options)===null||n===void 0?void 0:n.host)!==null&&i!==void 0?i:this.element,e):this._$AH.handleEvent(e)}}class c2{constructor(e,n,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){mt(this,e)}}const t3=a1.litHtmlPolyfillSupport;t3?.(Rt,It),((q1=a1.litHtmlVersions)!==null&&q1!==void 0?q1:a1.litHtmlVersions=[]).push("2.8.0");const a2=(t,e,n)=>{var i,r;const s=(i=n?.renderBefore)!==null&&i!==void 0?i:e;let o=s._$litPart$;if(o===void 0){const l=(r=n?.renderBefore)!==null&&r!==void 0?r:null;s._$litPart$=o=new It(e.insertBefore(St(),l),l,void 0,n??{})}return o._$AI(t),o};const u2=t=>t.strings===void 0,f2={},h2=(t,e=f2)=>t._$AH=e;const Y1={ATTRIBUTE:1,CHILD:2,BOOLEAN_ATTRIBUTE:4},Ot=t=>(...e)=>({_$litDirective$:t,values:e});let X1=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,i){this._$Ct=e,this._$AM=n,this._$Ci=i}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}};const Nt=(t,e)=>{var n,i;const r=t._$AN;if(r===void 0)return!1;for(const s of r)(i=(n=s)._$AO)===null||i===void 0||i.call(n,e,!1),Nt(s,e);return!0},f1=t=>{let e,n;do{if((e=t._$AM)===void 0)break;n=e._$AN,n.delete(t),t=e}while(n?.size===0)},e3=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(n===void 0)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),p2(e)}};function d2(t){this._$AN!==void 0?(f1(this),this._$AM=t,e3(this)):this._$AM=t}function C2(t,e=!1,n=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(i))for(let s=n;s<i.length;s++)Nt(i[s],!1),f1(i[s]);else i!=null&&(Nt(i,!1),f1(i));else Nt(this,t)}const p2=t=>{var e,n,i,r;t.type==Y1.CHILD&&((e=(i=t)._$AP)!==null&&e!==void 0||(i._$AP=C2),(n=(r=t)._$AQ)!==null&&n!==void 0||(r._$AQ=d2))};class n3 extends X1{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,n,i){super._$AT(e,n,i),e3(this),this.isConnected=e._$AU}_$AO(e,n=!0){var i,r;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)===null||i===void 0||i.call(this):(r=this.disconnected)===null||r===void 0||r.call(this)),n&&(Nt(this,e),f1(this))}setValue(e){if(u2(this._$Ct))this._$Ct._$AI(e,this);else{const n=[...this._$Ct._$AH];n[this._$Ci]=e,this._$Ct._$AI(n,this,0)}}disconnected(){}reconnected(){}}const $2=t=>t??b,J1=new WeakMap,g2=Ot(class extends n3{render(t){return b}update(t,[e]){var n;const i=e!==this.G;return i&&this.G!==void 0&&this.ot(void 0),(i||this.rt!==this.lt)&&(this.G=e,this.dt=(n=t.options)===null||n===void 0?void 0:n.host,this.ot(this.lt=t.element)),b}ot(t){var e;if(typeof this.G=="function"){const n=(e=this.dt)!==null&&e!==void 0?e:globalThis;let i=J1.get(n);i===void 0&&(i=new WeakMap,J1.set(n,i)),i.get(this.G)!==void 0&&this.G.call(this.dt,void 0),i.set(this.G,t),t!==void 0&&this.G.call(this.dt,t)}else this.G.value=t}get rt(){var t,e,n;return typeof this.G=="function"?(e=J1.get((t=this.dt)!==null&&t!==void 0?t:globalThis))===null||e===void 0?void 0:e.get(this.G):(n=this.G)===null||n===void 0?void 0:n.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}});let h1=class extends X1{constructor(e){if(super(e),this.et=b,e.type!==Y1.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===b||e==null)return this.ft=void 0,this.et=e;if(e===vt)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.et)return this.ft;this.et=e;const n=[e];return n.raw=n,this.ft={_$litType$:this.constructor.resultType,strings:n,values:[]}}};h1.directiveName="unsafeHTML",h1.resultType=1;const v2=Ot(h1);let Q1=class extends h1{};Q1.directiveName="unsafeSVG",Q1.resultType=2;const m2=Ot(Q1);const y2=Ot(class extends X1{constructor(){super(...arguments),this.key=b}render(t,e){return this.key=t,e}update(t,[e,n]){return e!==this.key&&(h2(t),this.key=e),n}}),i3=t=>typeof t=="object"&&t!=null&&t.nodeType===1,r3=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",d1=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return r3(n.overflowY,e)||r3(n.overflowX,e)||(i=>{const r=(s=>{if(!s.ownerDocument||!s.ownerDocument.defaultView)return null;try{return s.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!r&&(r.clientHeight<i.scrollHeight||r.clientWidth<i.scrollWidth)})(t)}return!1},C1=(t,e,n,i,r,s,o,l)=>s<t&&o>e||s>t&&o<e?0:s<=t&&l<=n||o>=e&&l>=n?s-t-i:o>e&&l<n||s<t&&l>n?o-e+r:0,b2=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},w2=(t,e)=>{var n,i,r,s;if(typeof document>"u")return[];const{scrollMode:o,block:l,inline:c,boundary:a,skipOverflowHiddenElements:u}=e,f=typeof a=="function"?a:_=>_!==a;if(!i3(t))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let C=t;for(;i3(C)&&f(C);){if(C=b2(C),C===d){h.push(C);break}C!=null&&C===document.body&&d1(C)&&!d1(document.documentElement)||C!=null&&d1(C,u)&&h.push(C)}const p=(i=(n=window.visualViewport)==null?void 0:n.width)!=null?i:innerWidth,v=(s=(r=window.visualViewport)==null?void 0:r.height)!=null?s:innerHeight,{scrollX:$,scrollY:m}=window,{height:y,width:A,top:w,right:j,bottom:P,left:U}=t.getBoundingClientRect(),{top:Q,right:q,bottom:yt,left:bt}=(_=>{const g=window.getComputedStyle(_);return{top:parseFloat(g.scrollMarginTop)||0,right:parseFloat(g.scrollMarginRight)||0,bottom:parseFloat(g.scrollMarginBottom)||0,left:parseFloat(g.scrollMarginLeft)||0}})(t);let x=l==="start"||l==="nearest"?w-Q:l==="end"?P+yt:w+y/2-Q+yt,L=c==="center"?U+A/2-bt+q:c==="end"?j+q:U-bt;const lt=[];for(let _=0;_<h.length;_++){const g=h[_],{height:E,width:V,top:ct,right:p1,bottom:$1,left:Pt}=g.getBoundingClientRect();if(o==="if-needed"&&w>=0&&U>=0&&P<=v&&j<=p&&(g===d&&!d1(g)||w>=ct&&P<=$1&&U>=Pt&&j<=p1))return lt;const Zt=getComputedStyle(g),Ft=parseInt(Zt.borderLeftWidth,10),Dt=parseInt(Zt.borderTopWidth,10),Wt=parseInt(Zt.borderRightWidth,10),Bt=parseInt(Zt.borderBottomWidth,10);let G=0,K=0;const jt="offsetWidth"in g?g.offsetWidth-g.clientWidth-Ft-Wt:0,zt="offsetHeight"in g?g.offsetHeight-g.clientHeight-Dt-Bt:0,g1="offsetWidth"in g?g.offsetWidth===0?0:V/g.offsetWidth:0,v1="offsetHeight"in g?g.offsetHeight===0?0:E/g.offsetHeight:0;if(d===g)G=l==="start"?x:l==="end"?x-v:l==="nearest"?C1(m,m+v,v,Dt,Bt,m+x,m+x+y,y):x-v/2,K=c==="start"?L:c==="center"?L-p/2:c==="end"?L-p:C1($,$+p,p,Ft,Wt,$+L,$+L+A,A),G=Math.max(0,G+m),K=Math.max(0,K+$);else{G=l==="start"?x-ct-Dt:l==="end"?x-$1+Bt+zt:l==="nearest"?C1(ct,$1,E,Dt,Bt+zt,x,x+y,y):x-(ct+E/2)+zt/2,K=c==="start"?L-Pt-Ft:c==="center"?L-(Pt+V/2)+jt/2:c==="end"?L-p1+Wt+jt:C1(Pt,p1,V,Ft,Wt+jt,L,L+A,A);const{scrollLeft:t6,scrollTop:e6}=g;G=v1===0?0:Math.max(0,Math.min(e6+G/v1,g.scrollHeight-E/v1+zt)),K=g1===0?0:Math.max(0,Math.min(t6+K/g1,g.scrollWidth-V/g1+jt)),x+=e6-G,L+=t6-K}lt.push({el:g,top:G,left:K})}return lt};var A2='<path fill-rule="evenodd" clip-rule="evenodd" d="M6 7C5.63181 7 5.33333 7.29848 5.33333 7.66667V14.8667C5.33333 14.9403 5.39361 14.9999 5.46724 15.0009C10.8844 15.0719 15.2614 19.449 15.3325 24.8661C15.3334 24.9397 15.393 25 15.4667 25H26C26.3682 25 26.6667 24.7015 26.6667 24.3333V7.66667C26.6667 7.29848 26.3682 7 26 7H6ZM17.0119 22.2294C17.0263 22.29 17.0802 22.3333 17.1425 22.3333H23.3333C23.7015 22.3333 24 22.0349 24 21.6667V10.3333C24 9.96514 23.7015 9.66667 23.3333 9.66667H8.66667C8.29848 9.66667 8 9.96514 8 10.3333V13.1909C8 13.2531 8.04332 13.3071 8.10392 13.3214C12.5063 14.3618 15.9715 17.827 17.0119 22.2294Z" fill="currentColor"/> <path d="M13.2 25C13.2736 25 13.3334 24.9398 13.3322 24.8661C13.2615 20.5544 9.77889 17.0718 5.46718 17.0011C5.39356 16.9999 5.33333 17.0597 5.33333 17.1333V18.8667C5.33333 18.9403 5.39348 18.9999 5.4671 19.0015C8.67465 19.0716 11.2617 21.6587 11.3319 24.8662C11.3335 24.9399 11.393 25 11.4667 25H13.2Z" fill="currentColor"/> <path d="M5.33333 21.1333C5.33333 21.0597 5.39332 20.9998 5.46692 21.0022C7.57033 21.0712 9.26217 22.763 9.33114 24.8664C9.33356 24.94 9.27364 25 9.2 25H6C5.63181 25 5.33333 24.7015 5.33333 24.3333V21.1333Z" fill="currentColor"/>',L2='<path fill-rule="evenodd" clip-rule="evenodd" d="M15.0007 28.7923C15.0007 29.0152 14.9774 29.096 14.9339 29.1775C14.8903 29.259 14.8263 29.323 14.7449 29.3665C14.6634 29.4101 14.5826 29.4333 14.3597 29.4333H12.575C12.3521 29.4333 12.2713 29.4101 12.1898 29.3665C12.1083 29.323 12.0443 29.259 12.0008 29.1775C11.9572 29.096 11.934 29.0152 11.934 28.7923V12.2993L5.97496 12.3C5.75208 12.3 5.67125 12.2768 5.58977 12.2332C5.50829 12.1896 5.44434 12.1257 5.40077 12.0442C5.35719 11.9627 5.33398 11.8819 5.33398 11.659V9.87429C5.33398 9.65141 5.35719 9.57059 5.40077 9.48911C5.44434 9.40762 5.50829 9.34368 5.58977 9.3001C5.67125 9.25652 5.75208 9.23332 5.97496 9.23332H26.0263C26.2492 9.23332 26.33 9.25652 26.4115 9.3001C26.493 9.34368 26.557 9.40762 26.6005 9.48911C26.6441 9.57059 26.6673 9.65141 26.6673 9.87429V11.659C26.6673 11.8819 26.6441 11.9627 26.6005 12.0442C26.557 12.1257 26.493 12.1896 26.4115 12.2332C26.33 12.2768 26.2492 12.3 26.0263 12.3L20.067 12.2993L20.0673 28.7923C20.0673 29.0152 20.0441 29.096 20.0005 29.1775C19.957 29.259 19.893 29.323 19.8115 29.3665C19.73 29.4101 19.6492 29.4333 19.4263 29.4333H17.6416C17.4187 29.4333 17.3379 29.4101 17.2564 29.3665C17.175 29.323 17.111 29.259 17.0674 29.1775C17.0239 29.096 17.0007 29.0152 17.0007 28.7923L17 22.7663H15L15.0007 28.7923Z" fill="currentColor"/> <path d="M16.0007 7.89998C17.4734 7.89998 18.6673 6.70608 18.6673 5.23332C18.6673 3.76056 17.4734 2.56665 16.0007 2.56665C14.5279 2.56665 13.334 3.76056 13.334 5.23332C13.334 6.70608 14.5279 7.89998 16.0007 7.89998Z" fill="currentColor"/>',x2='<path d="M5.33334 6.00001C5.33334 5.63182 5.63181 5.33334 6 5.33334H26C26.3682 5.3