@7sage/vidstack
Version:
UI component library for building high-quality, accessible video and audio experiences on the web.
4 lines (3 loc) • 45.5 kB
JavaScript
const I=Symbol(0);let zt=!1,pe=!1,H=null,at=null,P=null,k=0,ut=[],ge={};const Xn=()=>{},ft=0,Ke=1,Ut=2,qt=3;function Jn(){zt=!0,queueMicrotask(Ze)}function Ze(){if(!ut.length){zt=!1;return}pe=!0;for(let t=0;t<ut.length;t++)ut[t].$st!==ft&&Gn(ut[t]);ut=[],zt=!1,pe=!1}function Gn(t){let e=[t];for(;t=t[I];)t.$e&&t.$st!==ft&&e.push(t);for(let n=e.length-1;n>=0;n--)Ae(e[n])}function Qn(t){const e=Yt();return At(e,t.length?t.bind(null,ht.bind(e)):t,null)}function ti(t){return At(H,t,null)}function Xe(t){return At(null,t,null)}function ei(){pe||Ze()}function $e(){return H}function W(t,e){try{return At(e,t,null)}catch(n){me(e,n);return}}function Je(t,e=H){return e?.$cx[t]}function ni(t,e,n=H){n&&(n.$cx={...n.$cx,[t]:e})}function wt(t){if(!t||!H)return t||Xn;const e=H;return e.$d?Array.isArray(e.$d)?e.$d.push(t):e.$d=[e.$d,t]:e.$d=t,function(){e.$st!==qt&&(t.call(null),Kt(e.$d)?e.$d=null:Array.isArray(e.$d)&&e.$d.splice(e.$d.indexOf(t),1))}}function ht(t=!0){if(this.$st!==qt){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[I];e&&(Array.isArray(e.$h)?e.$h.splice(e.$h.indexOf(this),1):e.$h=null),ii(this)}}}function ii(t){t.$st=qt,t.$d&&Ge(t),t.$s&&xe(t,0),t[I]=null,t.$s=null,t.$o=null,t.$h=null,t.$cx=ge,t.$eh=null}function Ge(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){me(t,e)}}function At(t,e,n){const i=H,s=at;H=t,at=n;try{return e.call(t)}finally{H=i,at=s}}function me(t,e){if(!t||!t.$eh)throw e;let n=0,i=t.$eh.length,s=e;for(n=0;n<i;n++)try{t.$eh[n](s);break}catch(r){s=r}if(n===i)throw s}function ve(){return this.$st===qt?this.$v:(at&&!this.$e&&(!P&&at.$s&&at.$s[k]==this?k++:P?P.push(this):P=[this]),this.$c&&Ae(this),this.$v)}function Qe(t){const e=Kt(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++)sn(this.$o[n],Ut);return this.$v}const ye=function(){this[I]=null,this.$h=null,H&&H.append(this)},tt=ye.prototype;tt.$cx=ge,tt.$eh=null,tt.$c=null,tt.$d=null,tt.append=function(t){t[I]=this,this.$h?Array.isArray(this.$h)?this.$h.push(t):this.$h=[this.$h,t]:this.$h=t,t.$cx=t.$cx===ge?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 Yt(){return new ye}const tn=function(e,n,i){ye.call(this),this.$st=n?Ut: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)},be=tn.prototype;Object.setPrototypeOf(be,tt),be.$ch=si,be.call=ve;function we(t,e,n){return new tn(t,e,n)}function si(t,e){return t!==e}function Kt(t){return typeof t=="function"}function Ae(t){if(t.$st===Ke)for(let e=0;e<t.$s.length&&(Ae(t.$s[e]),t.$st!==Ut);e++);t.$st===Ut?en(t):t.$st=ft}function ri(t){t.$h&&ht.call(t,!1),t.$d&&Ge(t),t.$eh=t[I]?t[I].$eh:null}function en(t){let e=P,n=k;P=null,k=0;try{ri(t);const i=At(t,t.$c,t);nn(t),!t.$e&&t.$i?Qe.call(t,i):(t.$v=i,t.$i=!0)}catch(i){nn(t),me(t,i)}finally{P=e,k=n,t.$st=ft}}function nn(t){if(P){if(t.$s&&xe(t,k),t.$s&&k>0){t.$s.length=k+P.length;for(let n=0;n<P.length;n++)t.$s[k+n]=P[n]}else t.$s=P;let e;for(let n=k;n<t.$s.length;n++)e=t.$s[n],e.$o?e.$o.push(t):e.$o=[t]}else t.$s&&k<t.$s.length&&(xe(t,k),t.$s.length=k)}function sn(t,e){if(!(t.$st>=e)&&(t.$e&&t.$st===ft&&(ut.push(t),zt||Jn()),t.$st=e,t.$o))for(let n=0;n<t.$o.length;n++)sn(t.$o[n],Ke)}function xe(t,e){let n,i;for(let s=e;s<t.$s.length;s++)n=t.$s[s],n.$o&&(i=n.$o.indexOf(t),n.$o[i]=n.$o[n.$o.length-1],n.$o.pop())}function Ee(...t){}function rn(t){return t===null}function Zt(t){return typeof t>"u"}function oi(t){return rn(t)||Zt(t)}function li(t){return t?.constructor===Object}function ci(t){return typeof t=="number"&&!Number.isNaN(t)}function Ce(t){return typeof t=="string"}function ai(t){return typeof t=="boolean"}function Se(t){return typeof t=="function"}function _e(t){return Array.isArray(t)}const ui=Event,on=Symbol("DOM_EVENT");class Te extends ui{[on]=!0;detail;triggers=new fi;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 fi{chain=[];get source(){return this.chain[0]}get origin(){return this.chain[this.chain.length-1]}add(e){this.chain.push(e),hi(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 hi(t){return!!t?.[on]}class di 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 ln(t,e,n,i){return t.addEventListener(e,n,i),wt(()=>t.removeEventListener(e,n,i))}class pi{#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?gi(this.signal,i.signal):this.signal}),this}remove(e,n){return this.#t.removeEventListener(e,n),this}abort(e){this.#e.abort(e)}}function gi(...t){const e=new AbortController,n={signal:e.signal};function i(s){e.abort(s.target.reason)}for(const s of t){if(s.aborted){e.abort(s.reason);break}s.addEventListener("abort",i,n)}return e.signal}function $i(t){return!!t?.type.startsWith("pointer")}function mi(t){return!!t?.type.startsWith("touch")}function vi(t){return/^(click|mouse)/.test(t?.type??"")}function Oe(t){return!!t?.type.startsWith("key")}function yi(t){return Oe(t)&&t.key==="Enter"}function bi(t){return Oe(t)&&(t.key==="Enter"||t.key===" ")}function wi(t){return t instanceof Node}function ke(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 Re(t,e,n){if(t)!n&&n!==0?t.style.removeProperty(e):t.style.setProperty(e,n+"");else return}function Xt(t,e){const n=we(t,null,e),i=ve.bind(n);return i[I]=!0,i.set=Qe.bind(n),i}function Ai(t){return Kt(t)&&I in t}function cn(t,e){const n=we(e?.initial,t,e),i=ve.bind(n);return i[I]=!0,i}function xi(t,e){const n=we(null,function(){let s=t();return Kt(s)&&wt(s),null},void 0);return n.$e=!0,en(n),ht.bind(n,!0)}function Ei(t){return Ai(t)&&"set"in t}const Jt=xi;function Ci(t){return{id:Symbol(),provide:t}}function an(t,e,n=$e()){const i=!Zt(e);ni(t.id,i?e:t.provide?.(),n)}function un(t){return Je(t.id)}function Si(t){return!Zt(Je(t.id))}const xt=Symbol(0),Et=Symbol(0),fn=Symbol(0),Ne={};class _i{$ts__events;$ts__vars;[fn]=null;$el=Xt(null);el=null;scope=null;attachScope=null;connectScope=null;component=null;destroyed=!1;props=Ne;attrs=null;styles=null;state;$state;#t=[];#e=[];#n=[];#i=[];constructor(e,n,i){this.scope=n,i?.scope&&i.scope.append(n);let s=e.state,r=e.props;if(s&&(this.$state=s.create(),this.state=new Proxy(this.$state,{get:(o,l)=>this.$state[l]()}),an(s,this.$state)),r&&(this.props=Ti(r),i?.props))for(const o of Object.keys(i.props))this.props[o]?.set(i.props[o]);wt(this.destroy.bind(this))}setup(){W(()=>{for(const e of this.#t)e()},this.scope)}attach(e){this.el||(this.el=e,this.$el.set(e),W(()=>{this.attachScope=Yt(),W(()=>{for(const n of this.#e)n(this.el);this.#s(),this.#r()},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||W(()=>{this.connectScope=Yt(),W(()=>{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,W(()=>{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=Ne,this.scope=null,this.state=Ne,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))}#s(){if(this.attrs)for(const e of Object.keys(this.attrs))Se(this.attrs[e])?Jt(this.#o.bind(this,e)):ke(this.el,e,this.attrs[e])}#r(){if(this.styles)for(const e of Object.keys(this.styles))Se(this.styles[e])?Jt(this.#l.bind(this,e)):Re(this.el,e,this.styles[e])}#o(e){ke(this.el,e,this.attrs[e].call(this.component))}#l(e){Re(this.el,e,this.styles[e].call(this.component))}}function Ti(t){const e={};for(const n of Object.keys(t)){const i=t[n];e[n]=Xt(i,i)}return e}let Ct={$$:null};function Oi(t,e){return Qn(()=>{Ct.$$=new _i(t,$e(),e);const n=new t;return Ct.$$.component=n,Ct.$$=null,n})}class hn 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(),Ct.$$&&this.attach(Ct)}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 Te(e,n[0])}dispatch(e,...n){if(!this.el)return!1;const i=e instanceof Event?e:new Te(e,n[0]);return Object.defineProperty(i,"target",{get:()=>this.$$.component}),Xe(()=>(this.$$[fn]?.(i),this.el.dispatchEvent(i)))}dispatchEvent(e){return this.dispatch(e)}listen(e,n,i){return this.el?ln(this.el,e,n,i):Ee}}function ki(t,e){for(const n of t)n(e)}function dn(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function Ri(t){return t.replace(/-./g,e=>e[1].toUpperCase())}function Ni(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Pe=t=>t===null?"":t+"",Pi=t=>t===null?null:t+"",Li=t=>t===null?0:Number(t),pn=t=>t!==null,Hi=()=>null,Fi=t=>t===null?[]:JSON.parse(t),Mi=t=>t===null?{}:JSON.parse(t);function Di(t){if(t===null)return Pi;switch(typeof t){case"undefined":return Pe;case"string":return Pe;case"boolean":return pn;case"number":return Li;case"function":return Hi;case"object":return _e(t)?Fi:Mi;default:return Pe}}const X=Symbol(0),gn=Symbol(0),et=Symbol(0),St=Symbol(0);var U;(function(t){t[t.Idle=0]="Idle";const n=1;t[t.Pending=n]="Pending";const i=2;t[t.Ready=i]="Ready"})(U||(U={}));function Ii(t,e){class n extends t{static attrs;static[X]=null;static get observedAttributes(){if(!this[X]&&e.props){const s=new Map;for(const r of Object.keys(e.props)){let o=this.attrs?.[r],l=Ce(o)?o:o&&o?.attr;l!==!1&&(l||(l=dn(r)),s.set(l,{prop:r,converter:o&&!Ce(o)&&o?.converter||Di(e.props[r])}))}this[X]=s}return this[X]?Array.from(this[X].keys()):[]}$;[et]=U.Idle;[St]=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(...s){if(super(...s),this.$=W(()=>Oi(e),null),this.$.$$.addHooks(this),e.props){const r=this.$props,o=Object.getOwnPropertyDescriptors(this);for(const l of Object.keys(o))l in e.props&&(r[l].set(this[l]),delete this[l])}}attributeChangedCallback(s,r,o){const l=this.constructor;if(!l[X]){super.attributeChangedCallback?.(s,r,o);return}const c=l[X].get(s);c&&(this[c.prop]=c.converter(o))}connectedCallback(){const s=this.$?.$$;if(!s||s.destroyed)return;if(this[et]!==U.Ready){Bi.call(this);return}if(!this.isConnected)return;this.hasAttribute("keep-alive")&&(this.keepAlive=!0),s.connect(),_e(this[St])&&ki(this[St],this),this[St]=null;const r=super.connectedCallback;r&&W(()=>r.call(this),this.connectScope)}disconnectedCallback(){const s=this.$?.$$;if(!s||s.destroyed)return;s.disconnect();const r=super.disconnectedCallback;r&&r.call(this),!this.keepAlive&&!this.hasAttribute("keep-alive")&&setTimeout(()=>{requestAnimationFrame(()=>{this.isConnected||s.destroy()})},0)}[gn](){const s=this.$.$$,r=this.constructor;if(s.destroyed)return;const o=r[X];if(o)for(const l of this.attributes){let c=o.get(l.name);c&&c.converter&&s.props[c.prop].set(c.converter(this.getAttribute(l.name)))}s.setup(),s.attach(this),this[et]=U.Ready,this.connectedCallback()}subscribe(s){return this.$.subscribe(s)}destroy(){this.disconnectedCallback(),this.$.destroy()}}return Wi(n,e),n}function Wi(t,e){const n=t.prototype,i=e.prototype;if(e.props)for(const s of Object.keys(e.props))Object.defineProperty(n,s,{enumerable:!0,configurable:!0,get(){return this.$props[s]()},set(r){this.$props[s].set(r)}});if(i[xt])for(const s of i[xt])Object.defineProperty(n,s,{enumerable:!0,configurable:!0,get(){return this.$[s]},set(r){this.$[s]=r}});if(i[Et])for(const s of i[Et])n[s]=function(...r){return this.$[s](...r)}}function Bi(){if(this[et]!==U.Idle)return;this[et]=U.Pending;const t=ji(this),e=t&&window.customElements.get(t.localName),n=t&&t[et]===U.Ready;if(t&&(!e||!n)){Vi.call(this,t);return}$n.call(this,t)}async function Vi(t){await window.customElements.whenDefined(t.localName),t[et]!==U.Ready&&await new Promise(e=>(t[St]??=[]).push(e)),$n.call(this,t)}function $n(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[gn]()}}function ji(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 zi(t,e=!1){(e||!window.customElements.get(t.tagName))&&window.customElements.define(t.tagName,t)}class Ui extends hn{subscribe(e){return W(()=>Jt(()=>e(this.state)),this.$$.scope)}destroy(){this.$$.destroy()}}function qi(t,e,n){t[xt]||(t[xt]=new Set),t[xt].add(e)}function Yi(t,e,n){t[Et]||(t[Et]=new Set),t[Et].add(e)}class Ki{id=Symbol(0);record;#t;constructor(e){this.record=e,this.#t=Object.getOwnPropertyDescriptors(e)}create(){const e={},n=new Proxy(e,{get:(i,s)=>e[s]()});for(const i of Object.keys(this.record)){const s=this.#t[i].get;e[i]=s?cn(s.bind(n)):Xt(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 Zi(t){return un(t)}function Xi(t){return t?"true":"false"}function Ji(t){return Object.keys(t)}function Gi(){let t,e;return{promise:new Promise((i,s)=>{t=i,e=s}),resolve:t,reject:e}}function Qi(t){return new Promise(e=>setTimeout(e,t))}function ts(t){let e=-1,n;function i(...s){n=s,!(e>=0)&&(e=window.requestAnimationFrame(()=>{t.apply(this,n),e=-1,n=void 0}))}return i}const es=typeof window<"u"?"requestIdleCallback"in window?window.requestIdleCallback:t=>window.setTimeout(t,1):Ee;function ns(t,e){return new Promise(n=>{es(i=>{t?.(i),n()},e)})}var R={fullscreenEnabled:0,fullscreenElement:1,requestFullscreen:2,exitFullscreen:3,fullscreenchange:4,fullscreenerror:5,fullscreen:6},mn=["webkitFullscreenEnabled","webkitFullscreenElement","webkitRequestFullscreen","webkitExitFullscreen","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],vn=["mozFullScreenEnabled","mozFullScreenElement","mozRequestFullScreen","mozCancelFullScreen","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],yn=["msFullscreenEnabled","msFullscreenElement","msRequestFullscreen","msExitFullscreen","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"],S=typeof window<"u"&&typeof window.document<"u"?window.document:{},L="fullscreenEnabled"in S&&Object.keys(R)||mn[0]in S&&mn||vn[0]in S&&vn||yn[0]in S&&yn||[],is={requestFullscreen:function(t){return t[L[R.requestFullscreen]]()},requestFullscreenFunction:function(t){return t[L[R.requestFullscreen]]},get exitFullscreen(){return S[L[R.exitFullscreen]].bind(S)},get fullscreenPseudoClass(){return":"+L[R.fullscreen]},addEventListener:function(t,e,n){return S.addEventListener(L[R[t]],e,n)},removeEventListener:function(t,e,n){return S.removeEventListener(L[R[t]],e,n)},get fullscreenEnabled(){return!!S[L[R.fullscreenEnabled]]},set fullscreenEnabled(t){},get fullscreenElement(){return S[L[R.fullscreenElement]]},set fullscreenElement(t){},get onfullscreenchange(){return S[("on"+L[R.fullscreenchange]).toLowerCase()]},set onfullscreenchange(t){return S[("on"+L[R.fullscreenchange]).toLowerCase()]=t},get onfullscreenerror(){return S[("on"+L[R.fullscreenerror]).toLowerCase()]},set onfullscreenerror(t){return S[("on"+L[R.fullscreenerror]).toLowerCase()]=t}};const Gt=Math.min,nt=Math.max,Qt=Math.round,te=Math.floor,B=t=>({x:t,y:t}),ss={left:"right",right:"left",bottom:"top",top:"bottom"},rs={start:"end",end:"start"};function bn(t,e,n){return nt(t,Gt(e,n))}function Le(t,e){return typeof t=="function"?t(e):t}function dt(t){return t.split("-")[0]}function He(t){return t.split("-")[1]}function wn(t){return t==="x"?"y":"x"}function An(t){return t==="y"?"height":"width"}function _t(t){return["top","bottom"].includes(dt(t))?"y":"x"}function xn(t){return wn(_t(t))}function os(t,e,n){n===void 0&&(n=!1);const i=He(t),s=xn(t),r=An(s);let o=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(o=ee(o)),[o,ee(o)]}function ls(t){const e=ee(t);return[Fe(t),e,Fe(e)]}function Fe(t){return t.replace(/start|end/g,e=>rs[e])}function cs(t,e,n){const i=["left","right"],s=["right","left"],r=["top","bottom"],o=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:i:e?i:s;case"left":case"right":return e?r:o;default:return[]}}function as(t,e,n,i){const s=He(t);let r=cs(dt(t),n==="start",i);return s&&(r=r.map(o=>o+"-"+s),e&&(r=r.concat(r.map(Fe)))),r}function ee(t){return t.replace(/left|right|bottom|top/g,e=>ss[e])}function us(t){return{top:0,right:0,bottom:0,left:0,...t}}function fs(t){return typeof t!="number"?us(t):{top:t,right:t,bottom:t,left:t}}function ne(t){const{x:e,y:n,width:i,height:s}=t;return{width:i,height:s,top:n,left:e,right:e+i,bottom:n+s,x:e,y:n}}function En(t,e,n){let{reference:i,floating:s}=t;const r=_t(e),o=xn(e),l=An(o),c=dt(e),a=r==="y",u=i.x+i.width/2-s.width/2,f=i.y+i.height/2-s.height/2,d=i[l]/2-s[l]/2;let h;switch(c){case"top":h={x:u,y:i.y-s.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-s.width,y:f};break;default:h={x:i.x,y:i.y}}switch(He(e)){case"start":h[o]-=d*(n&&a?-1:1);break;case"end":h[o]+=d*(n&&a?-1:1);break}return h}const hs=async(t,e,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:r=[],platform:o}=n,l=r.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(e));let a=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:f}=En(a,i,c),d=i,h={},p=0;for(let g=0;g<l.length;g++){const{name:v,fn:$}=l[g],{x:y,y:b,data:A,reset:w}=await $({x:u,y:f,initialPlacement:i,placement:d,strategy:s,middlewareData:h,rects:a,platform:o,elements:{reference:t,floating:e}});u=y??u,f=b??f,h={...h,[v]:{...h[v],...A}},w&&p<=50&&(p++,typeof w=="object"&&(w.placement&&(d=w.placement),w.rects&&(a=w.rects===!0?await o.getElementRects({reference:t,floating:e,strategy:s}):w.rects),{x:u,y:f}=En(a,d,c)),g=-1)}return{x:u,y:f,placement:d,strategy:s,middlewareData:h}};async function Cn(t,e){var n;e===void 0&&(e={});const{x:i,y:s,platform:r,rects:o,elements:l,strategy:c}=t,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Le(e,t),p=fs(h),v=l[d?f==="floating"?"reference":"floating":f],$=ne(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(v)))==null||n?v:v.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:a,rootBoundary:u,strategy:c})),y=f==="floating"?{x:i,y:s,width:o.floating.width,height:o.floating.height}:o.reference,b=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),A=await(r.isElement==null?void 0:r.isElement(b))?await(r.getScale==null?void 0:r.getScale(b))||{x:1,y:1}:{x:1,y:1},w=ne(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:y,offsetParent:b,strategy:c}):y);return{top:($.top-w.top+p.top)/A.y,bottom:(w.bottom-$.bottom+p.bottom)/A.y,left:($.left-w.left+p.left)/A.x,right:(w.right-$.right+p.right)/A.x}}const ds=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:s,middlewareData:r,rects:o,initialPlacement:l,platform:c,elements:a}=e,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...v}=Le(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const $=dt(s),y=_t(l),b=dt(l)===l,A=await(c.isRTL==null?void 0:c.isRTL(a.floating)),w=d||(b||!g?[ee(l)]:ls(l)),z=p!=="none";!d&&z&&w.push(...as(l,g,p,A));const D=[l,...w],q=await Cn(e,v),Q=[];let Y=((i=r.flip)==null?void 0:i.overflows)||[];if(u&&Q.push(q[$]),f){const x=os(s,o,A);Q.push(q[x[0]],q[x[1]])}if(Y=[...Y,{placement:s,overflows:Q}],!Q.every(x=>x<=0)){var yt,bt;const x=(((yt=r.flip)==null?void 0:yt.index)||0)+1,lt=D[x];if(lt)return{data:{index:x,overflows:Y},reset:{placement:lt}};let _=(bt=Y.filter(m=>m.overflows[0]<=0).sort((m,T)=>m.overflows[1]-T.overflows[1])[0])==null?void 0:bt.placement;if(!_)switch(h){case"bestFit":{var C;const m=(C=Y.filter(T=>{if(z){const O=_t(T.placement);return O===y||O==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(O=>O>0).reduce((O,ct)=>O+ct,0)]).sort((T,O)=>T[1]-O[1])[0])==null?void 0:C[0];m&&(_=m);break}case"initialPlacement":_=l;break}if(s!==_)return{reset:{placement:_}}}return{}}}},ps=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:s}=e,{mainAxis:r=!0,crossAxis:o=!1,limiter:l={fn:v=>{let{x:$,y}=v;return{x:$,y}}},...c}=Le(t,e),a={x:n,y:i},u=await Cn(e,c),f=_t(dt(s)),d=wn(f);let h=a[d],p=a[f];if(r){const v=d==="y"?"top":"left",$=d==="y"?"bottom":"right",y=h+u[v],b=h-u[$];h=bn(y,h,b)}if(o){const v=f==="y"?"top":"left",$=f==="y"?"bottom":"right",y=p+u[v],b=p-u[$];p=bn(y,p,b)}const g=l.fn({...e,[d]:h,[f]:p});return{...g,data:{x:g.x-n,y:g.y-i,enabled:{[d]:r,[f]:o}}}}}};function ie(){return typeof window<"u"}function pt(t){return Sn(t)?(t.nodeName||"").toLowerCase():"#document"}function N(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function V(t){var e;return(e=(Sn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Sn(t){return ie()?t instanceof Node||t instanceof N(t).Node:!1}function F(t){return ie()?t instanceof Element||t instanceof N(t).Element:!1}function j(t){return ie()?t instanceof HTMLElement||t instanceof N(t).HTMLElement:!1}function _n(t){return!ie()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof N(t).ShadowRoot}function Tt(t){const{overflow:e,overflowX:n,overflowY:i,display:s}=M(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(s)}function gs(t){return["table","td","th"].includes(pt(t))}function se(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Me(t){const e=De(),n=F(t)?M(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 $s(t){let e=J(t);for(;j(e)&&!gt(e);){if(Me(e))return e;if(se(e))return null;e=J(e)}return null}function De(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function gt(t){return["html","body","#document"].includes(pt(t))}function M(t){return N(t).getComputedStyle(t)}function re(t){return F(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function J(t){if(pt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||_n(t)&&t.host||V(t);return _n(e)?e.host:e}function Tn(t){const e=J(t);return gt(e)?t.ownerDocument?t.ownerDocument.body:t.body:j(e)&&Tt(e)?e:Tn(e)}function Ot(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=Tn(t),r=s===((i=t.ownerDocument)==null?void 0:i.body),o=N(s);if(r){const l=Ie(o);return e.concat(o,o.visualViewport||[],Tt(s)?s:[],l&&n?Ot(l):[])}return e.concat(s,Ot(s,[],n))}function Ie(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function On(t){const e=M(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=j(t),r=s?t.offsetWidth:n,o=s?t.offsetHeight:i,l=Qt(n)!==r||Qt(i)!==o;return l&&(n=r,i=o),{width:n,height:i,$:l}}function We(t){return F(t)?t:t.contextElement}function $t(t){const e=We(t);if(!j(e))return B(1);const n=e.getBoundingClientRect(),{width:i,height:s,$:r}=On(e);let o=(r?Qt(n.width):n.width)/i,l=(r?Qt(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const ms=B(0);function kn(t){const e=N(t);return!De()||!e.visualViewport?ms:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function vs(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==N(t)?!1:e}function it(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),r=We(t);let o=B(1);e&&(i?F(i)&&(o=$t(i)):o=$t(t));const l=vs(r,n,i)?kn(r):B(0);let c=(s.left+l.x)/o.x,a=(s.top+l.y)/o.y,u=s.width/o.x,f=s.height/o.y;if(r){const d=N(r),h=i&&F(i)?N(i):i;let p=d,g=Ie(p);for(;g&&i&&h!==p;){const v=$t(g),$=g.getBoundingClientRect(),y=M(g),b=$.left+(g.clientLeft+parseFloat(y.paddingLeft))*v.x,A=$.top+(g.clientTop+parseFloat(y.paddingTop))*v.y;c*=v.x,a*=v.y,u*=v.x,f*=v.y,c+=b,a+=A,p=N(g),g=Ie(p)}}return ne({width:u,height:f,x:c,y:a})}function Be(t,e){const n=re(t).scrollLeft;return e?e.left+n:it(V(t)).left+n}function Rn(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=i.left+e.scrollLeft-(n?0:Be(t,i)),r=i.top+e.scrollTop;return{x:s,y:r}}function ys(t){let{elements:e,rect:n,offsetParent:i,strategy:s}=t;const r=s==="fixed",o=V(i),l=e?se(e.floating):!1;if(i===o||l&&r)return n;let c={scrollLeft:0,scrollTop:0},a=B(1);const u=B(0),f=j(i);if((f||!f&&!r)&&((pt(i)!=="body"||Tt(o))&&(c=re(i)),j(i))){const h=it(i);a=$t(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}const d=o&&!f&&!r?Rn(o,c,!0):B(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 bs(t){return Array.from(t.getClientRects())}function ws(t){const e=V(t),n=re(t),i=t.ownerDocument.body,s=nt(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=nt(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+Be(t);const l=-n.scrollTop;return M(i).direction==="rtl"&&(o+=nt(e.clientWidth,i.clientWidth)-s),{width:s,height:r,x:o,y:l}}function As(t,e){const n=N(t),i=V(t),s=n.visualViewport;let r=i.clientWidth,o=i.clientHeight,l=0,c=0;if(s){r=s.width,o=s.height;const a=De();(!a||a&&e==="fixed")&&(l=s.offsetLeft,c=s.offsetTop)}return{width:r,height:o,x:l,y:c}}function xs(t,e){const n=it(t,!0,e==="fixed"),i=n.top+t.clientTop,s=n.left+t.clientLeft,r=j(t)?$t(t):B(1),o=t.clientWidth*r.x,l=t.clientHeight*r.y,c=s*r.x,a=i*r.y;return{width:o,height:l,x:c,y:a}}function Nn(t,e,n){let i;if(e==="viewport")i=As(t,n);else if(e==="document")i=ws(V(t));else if(F(e))i=xs(e,n);else{const s=kn(t);i={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return ne(i)}function Pn(t,e){const n=J(t);return n===e||!F(n)||gt(n)?!1:M(n).position==="fixed"||Pn(n,e)}function Es(t,e){const n=e.get(t);if(n)return n;let i=Ot(t,[],!1).filter(l=>F(l)&&pt(l)!=="body"),s=null;const r=M(t).position==="fixed";let o=r?J(t):t;for(;F(o)&&!gt(o);){const l=M(o),c=Me(o);!c&&l.position==="fixed"&&(s=null),(r?!c&&!s:!c&&l.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Tt(o)&&!c&&Pn(t,o))?i=i.filter(u=>u!==o):s=l,o=J(o)}return e.set(t,i),i}function Cs(t){let{element:e,boundary:n,rootBoundary:i,strategy:s}=t;const o=[...n==="clippingAncestors"?se(e)?[]:Es(e,this._c):[].concat(n),i],l=o[0],c=o.reduce((a,u)=>{const f=Nn(e,u,s);return a.top=nt(f.top,a.top),a.right=Gt(f.right,a.right),a.bottom=Gt(f.bottom,a.bottom),a.left=nt(f.left,a.left),a},Nn(e,l,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Ss(t){const{width:e,height:n}=On(t);return{width:e,height:n}}function _s(t,e,n){const i=j(e),s=V(e),r=n==="fixed",o=it(t,!0,r,e);let l={scrollLeft:0,scrollTop:0};const c=B(0);if(i||!i&&!r)if((pt(e)!=="body"||Tt(s))&&(l=re(e)),i){const d=it(e,!0,r,e);c.x=d.x+e.clientLeft,c.y=d.y+e.clientTop}else s&&(c.x=Be(s));const a=s&&!i&&!r?Rn(s,l):B(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 Ve(t){return M(t).position==="static"}function Ln(t,e){if(!j(t)||M(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return V(t)===n&&(n=n.ownerDocument.body),n}function Hn(t,e){const n=N(t);if(se(t))return n;if(!j(t)){let s=J(t);for(;s&&!gt(s);){if(F(s)&&!Ve(s))return s;s=J(s)}return n}let i=Ln(t,e);for(;i&&gs(i)&&Ve(i);)i=Ln(i,e);return i&>(i)&&Ve(i)&&!Me(i)?n:i||$s(t)||n}const Ts=async function(t){const e=this.getOffsetParent||Hn,n=this.getDimensions,i=await n(t.floating);return{reference:_s(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Os(t){return M(t).direction==="rtl"}const ks={convertOffsetParentRelativeRectToViewportRelativeRect:ys,getDocumentElement:V,getClippingRect:Cs,getOffsetParent:Hn,getElementRects:Ts,getClientRects:bs,getDimensions:Ss,getScale:$t,isElement:F,isRTL:Os};function Fn(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Rs(t,e){let n=null,i;const s=V(t);function r(){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),r();const a=t.getBoundingClientRect(),{left:u,top:f,width:d,height:h}=a;if(l||e(),!d||!h)return;const p=te(f),g=te(s.clientWidth-(u+d)),v=te(s.clientHeight-(f+h)),$=te(u),b={rootMargin:-p+"px "+-g+"px "+-v+"px "+-$+"px",threshold:nt(0,Gt(1,c))||1};let A=!0;function w(z){const D=z[0].intersectionRatio;if(D!==c){if(!A)return o();D?o(!1,D):i=setTimeout(()=>{o(!1,1e-7)},1e3)}D===1&&!Fn(a,t.getBoundingClientRect())&&o(),A=!1}try{n=new IntersectionObserver(w,{...b,root:s.ownerDocument})}catch{n=new IntersectionObserver(w,b)}n.observe(t)}return o(!0),r}function Ns(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,a=We(t),u=s||r?[...a?Ot(a):[],...Ot(e)]:[];u.forEach($=>{s&&$.addEventListener("scroll",n,{passive:!0}),r&&$.addEventListener("resize",n)});const f=a&&l?Rs(a,n):null;let d=-1,h=null;o&&(h=new ResizeObserver($=>{let[y]=$;y&&y.target===a&&h&&(h.unobserve(e),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(e)})),n()}),a&&!c&&h.observe(a),h.observe(e));let p,g=c?it(t):null;c&&v();function v(){const $=it(t);g&&!Fn(g,$)&&n(),g=$,p=requestAnimationFrame(v)}return n(),()=>{var $;u.forEach(y=>{s&&y.removeEventListener("scroll",n),r&&y.removeEventListener("resize",n)}),f?.(),($=h)==null||$.disconnect(),h=null,c&&cancelAnimationFrame(p)}}const Ps=ps,Ls=ds,Hs=(t,e,n)=>{const i=new Map,s={platform:ks,...n},r={...s.platform,_c:i};return hs(t,e,{...s,platform:r})};var Fs=Ms;function Ms(t,e,n){var i=null,s=null,r=function(){i&&(clearTimeout(i),s=null,i=null)},o=function(){var c=s;r(),c&&c()},l=function(){if(!e)return t.apply(this,arguments);var c=this,a=arguments,u=n&&!i;if(r(),s=function(){t.apply(c,a)},i=setTimeout(function(){if(i=null,!u){var f=s;return s=null,f()}},e),u)return s()};return l.cancel=r,l.flush=o,l}var Ds=Is;function Is(t,e,n){var i=null,s=null,r=n&&n.leading,o=n&&n.trailing;r==null&&(r=!0),o==null&&(o=!r),r==!0&&(o=!1);var l=function(){i&&(clearTimeout(i),i=null)},c=function(){var u=s;l(),u&&u()},a=function(){var u=r&&!i,f=this,d=arguments;if(s=function(){return t.apply(f,d)},i||(i=setTimeout(function(){if(i=null,o)return s()},e)),u)return u=!1,s()};return a.cancel=l,a.flush=c,a}const Mn=t=>typeof t=="object"&&t!=null&&t.nodeType===1,Dn=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",oe=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const n=getComputedStyle(t,null);return Dn(n.overflowY,e)||Dn(n.overflowX,e)||(i=>{const s=(r=>{if(!r.ownerDocument||!r.ownerDocument.defaultView)return null;try{return r.ownerDocument.defaultView.frameElement}catch{return null}})(i);return!!s&&(s.clientHeight<i.scrollHeight||s.clientWidth<i.scrollWidth)})(t)}return!1},le=(t,e,n,i,s,r,o,l)=>r<t&&o>e||r>t&&o<e?0:r<=t&&l<=n||o>=e&&l>=n?r-t-i:o>e&&l<n||r<t&&l>n?o-e+s:0,Ws=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},Bs=(t,e)=>{var n,i,s,r;if(typeof document>"u")return[];const{scrollMode:o,block:l,inline:c,boundary:a,skipOverflowHiddenElements:u}=e,f=typeof a=="function"?a:_=>_!==a;if(!Mn(t))throw new TypeError("Invalid target");const d=document.scrollingElement||document.documentElement,h=[];let p=t;for(;Mn(p)&&f(p);){if(p=Ws(p),p===d){h.push(p);break}p!=null&&p===document.body&&oe(p)&&!oe(document.documentElement)||p!=null&&oe(p,u)&&h.push(p)}const g=(i=(n=window.visualViewport)==null?void 0:n.width)!=null?i:innerWidth,v=(r=(s=window.visualViewport)==null?void 0:s.height)!=null?r:innerHeight,{scrollX:$,scrollY:y}=window,{height:b,width:A,top:w,right:z,bottom:D,left:q}=t.getBoundingClientRect(),{top:Q,right:Y,bottom:yt,left:bt}=(_=>{const m=window.getComputedStyle(_);return{top:parseFloat(m.scrollMarginTop)||0,right:parseFloat(m.scrollMarginRight)||0,bottom:parseFloat(m.scrollMarginBottom)||0,left:parseFloat(m.scrollMarginLeft)||0}})(t);let C=l==="start"||l==="nearest"?w-Q:l==="end"?D+yt:w+b/2-Q+yt,x=c==="center"?q+A/2-bt+Y:c==="end"?z+Y:q-bt;const lt=[];for(let _=0;_<h.length;_++){const m=h[_],{height:T,width:O,top:ct,right:ue,bottom:fe,left:Ft}=m.getBoundingClientRect();if(o==="if-needed"&&w>=0&&q>=0&&D<=v&&z<=g&&(m===d&&!oe(m)||w>=ct&&D<=fe&&q>=Ft&&z<=ue))return lt;const Mt=getComputedStyle(m),Dt=parseInt(Mt.borderLeftWidth,10),It=parseInt(Mt.borderTopWidth,10),Wt=parseInt(Mt.borderRightWidth,10),Bt=parseInt(Mt.borderBottomWidth,10);let K=0,Z=0;const Vt="offsetWidth"in m?m.offsetWidth-m.clientWidth-Dt-Wt:0,jt="offsetHeight"in m?m.offsetHeight-m.clientHeight-It-Bt:0,he="offsetWidth"in m?m.offsetWidth===0?0:O/m.offsetWidth:0,de="offsetHeight"in m?m.offsetHeight===0?0:T/m.offsetHeight:0;if(d===m)K=l==="start"?C:l==="end"?C-v:l==="nearest"?le(y,y+v,v,It,Bt,y+C,y+C+b,b):C-v/2,Z=c==="start"?x:c==="center"?x-g/2:c==="end"?x-g:le($,$+g,g,Dt,Wt,$+x,$+x+A,A),K=Math.max(0,K+y),Z=Math.max(0,Z+$);else{K=l==="start"?C-ct-It:l==="end"?C-fe+Bt+jt:l==="nearest"?le(ct,fe,T,It,Bt+jt,C,C+b,b):C-(ct+T/2)+jt/2,Z=c==="start"?x-Ft-Dt:c==="center"?x-(Ft+O/2)+Vt/2:c==="end"?x-ue+Wt+Vt:le(Ft,ue,O,Dt,Wt+Vt,x,x+A,A);const{scrollLeft:qe,scrollTop:Ye}=m;K=de===0?0:Math.max(0,Math.min(Ye+K/de,m.scrollHeight-T/de+jt)),Z=he===0?0:Math.max(0,Math.min(qe+Z/he,m.scrollWidth-O/he+Vt)),C+=Ye-K,x+=qe-Z}lt.push({el:m,top:K,left:Z})}return lt};var je;const ce=window,mt=ce.trustedTypes,In=mt?mt.createPolicy("lit-html",{createHTML:t=>t}):void 0,ze="$lit$",G=`lit$${(Math.random()+"").slice(9)}$`,Wn="?"+G,Vs=`<${Wn}>`,st=document,kt=()=>st.createComment(""),Rt=t=>t===null||typeof t!="object"&&typeof t!="function",Bn=Array.isArray,js=t=>Bn(t)||typeof t?.[Symbol.iterator]=="function",Ue=`[
\f\r]`,Nt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Vn=/-->/g,jn=/>/g,rt=RegExp(`>|${Ue}(?:([^\\s"'>=/]+)(${Ue}*=${Ue}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),zn=/'/g,Un=/"/g,qn=/^(?:script|style|textarea|title)$/i,zs=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),Us=zs(1),Pt=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),Yn=new WeakMap,ot=st.createTreeWalker(st,129,null,!1);function Kn(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return In!==void 0?In.createHTML(e):e}const qs=(t,e)=>{const n=t.length-1,i=[];let s,r=e===2?"<svg>":"",o=Nt;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===Nt?u[1]==="!--"?o=Vn:u[1]!==void 0?o=jn:u[2]!==void 0?(qn.test(u[2])&&(s=RegExp("</"+u[2],"g")),o=rt):u[3]!==void 0&&(o=rt):o===rt?u[0]===">"?(o=s??Nt,f=-1):u[1]===void 0?f=-2:(f=o.lastIndex-u[2].length,a=u[1],o=u[3]===void 0?rt:u[3]==='"'?Un:zn):o===Un||o===zn?o=rt:o===Vn||o===jn?o=Nt:(o=rt,s=void 0);const h=o===rt&&t[l+1].startsWith("/>")?" ":"";r+=o===Nt?c+Vs:f>=0?(i.push(a),c.slice(0,f)+ze+c.slice(f)+G+h):c+G+(f===-2?(i.push(void 0),l):h)}return[Kn(t,r+(t[n]||"<?>")+(e===2?"</svg>":"")),i]};class Lt{constructor({strings:e,_$litType$:n},i){let s;this.parts=[];let r=0,o=0;const l=e.length-1,c=this.parts,[a,u]=qs(e,n);if(this.el=Lt.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(;(s=ot.nextNode())!==null&&c.length<l;){if(s.nodeType===1){if(s.hasAttributes()){const f=[];for(const d of s.getAttributeNames())if(d.endsWith(ze)||d.startsWith(G)){const h=u[o++];if(f.push(d),h!==void 0){const p=s.getAttribute(h.toLowerCase()+ze).split(G),g=/([.?@])?(.*)/.exec(h);c.push({type:1,index:r,name:g[2],strings:p,ctor:g[1]==="."?Ks:g[1]==="?"?Xs:g[1]==="@"?Js:ae})}else c.push({type:6,index:r})}for(const d of f)s.removeAttribute(d)}if(qn.test(s.tagName)){const f=s.textContent.split(G),d=f.length-1;if(d>0){s.textContent=mt?mt.emptyScript:"";for(let h=0;h<d;h++)s.append(f[h],kt()),ot.nextNode(),c.push({type:2,index:++r});s.append(f[d],kt())}}}else if(s.nodeType===8)if(s.data===Wn)c.push({type:2,index:r});else{let f=-1;for(;(f=s.data.indexOf(G,f+1))!==-1;)c.push({type:7,index:r}),f+=G.length-1}r++}}static createElement(e,n){const i=st.createElement("template");return i.innerHTML=e,i}}function vt(t,e,n=t,i){var s,r,o,l;if(e===Pt)return e;let c=i!==void 0?(s=n._$Co)===null||s===void 0?void 0:s[i]:n._$Cl;const a=Rt(e)?void 0:e._$litDirective$;return c?.constructor!==a&&((r=c?._$AO)===null||r===void 0||r.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=vt(t,c._$AS(t,e.values),c,i)),e}class Ys{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:s}=this._$AD,r=((n=e?.creationScope)!==null&&n!==void 0?n:st).importNode(i,!0);ot.currentNode=r;let o=ot.nextNode(),l=0,c=0,a=s[0];for(;a!==void 0;){if(l===a.index){let u;a.type===2?u=new Ht(o,o.nextSibling,this,e):a.type===1?u=new a.ctor(o,a.name,a.strings,this,e):a.type===6&&(u=new Gs(o,this,e)),this._$AV.push(u),a=s[++c]}l!==a?.index&&(o=ot.nextNode(),l++)}return ot.currentNode=st,r}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 Ht{constructor(e,n,i,s){var r;this.type=2,this._$AH=E,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=s,this._$Cp=(r=s?.isConnected)===null||r===void 0||r}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=vt(this,e,n),Rt(e)?e===E||e==null||e===""?(this._$AH!==E&&this._$AR(),this._$AH=E):e!==this._$AH&&e!==Pt&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):js(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!==E&&Rt(this._$AH)?this._$AA.nextSibling.data=e:this.$(st.createTextNode(e)),this._$AH=e}g(e){var n;const{values:i,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=Lt.createElement(Kn(s.h,s.h[0]),this.options)),s);if(((n=this._$AH)===null||n===void 0?void 0:n._$AD)===r)this._$AH.v(i);else{const o=new Ys(r,this),l=o.u(this.options);o.v(i),this.$(l),this._$AH=o}}_$AC(e){let n=Yn.get(e.strings);return n===void 0&&Yn.set(e.strings,n=new Lt(e)),n}T(e){Bn(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,s=0;for(const r of e)s===n.length?n.push(i=new Ht(this.k(kt()),this.k(kt()),this,this.options)):i=n[s],i._$AI(r),s++;s<n.length&&(this._$AR(i&&i._$AB.nextSibling,s),n.length=s)}_$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 s=e.nextSibling;e.remove(),e=s}}setConnected(e){var n;this._$AM===void 0&&(this._$Cp=e,(n=this._$AP)===null||n===void 0||n.call(this,e))}}class ae{constructor(e,n,i,s,r){this.type=1,this._$AH=E,this._$AN=void 0,this.element=e,this.name=n,this._$AM=s,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=E}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,n=this,i,s){const r=this.strings;let o=!1;if(r===void 0)e=vt(this,e,n,0),o=!Rt(e)||e!==this._$AH&&e!==Pt,o&&(this._$AH=e);else{const l=e;let c,a;for(e=r[0],c=0;c<r.length-1;c++)a=vt(this,l[i+c],n,c),a===Pt&&(a=this._$AH[c]),o||(o=!Rt(a)||a!==this._$AH[c]),a===E?e=E:e!==E&&(e+=(a??"")+r[c+1]),this._$AH[c]=a}o&&!s&&this.j(e)}j(e){e===E?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Ks extends ae{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===E?void 0:e}}const Zs=mt?mt.emptyScript:"";class Xs extends ae{constructor(){super(...arguments),this.type=4}j(e){e&&e!==E?this.element.setAttribute(this.name,Zs):this.element.removeAttribute(this.name)}}class Js extends ae{constructor(e,n,i,s,r){super(e,n,i,s,r),this.type=5}_$AI(e,n=this){var i;if((e=(i=vt(this,e,n,0))!==null&&i!==void 0?i:E)===Pt)return;const s=this._$AH,r=e===E&&s!==E||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,o=e!==E&&(s===E||r);r&&this.element.removeEventListener(this.name,this,s),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 Gs{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){vt(this,e)}}const Zn=ce.litHtmlPolyfillSupport;Zn?.(Lt,Ht),((je=ce.litHtmlVersions)!==null&&je!==void 0?je:ce.litHtmlVersions=[]).push("2.8.0");const Qs=(t,e,n)=>{var i,s;const r=(i=n?.renderBefore)!==null&&i!==void 0?i:e;let o=r._$litPart$;if(o===void 0){const l=(s=n?.renderBefore)!==null&&s!==void 0?s:null;r._$litPart$=o=new Ht(e.insertBefore(kt(),l),l,void 0,n??{})}return o._$AI(t),o};var tr='<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"/>';export{ai as $,Ps as A,Oe as B,Zt as C,Te as D,pi as E,ci as F,Ds as G,Fs as H,Ui as I,qi as J,Yi as K,an as L,ts as M,Ni as N,dn as O,cn as P,Ii as Q,Ee as R,Ki as S,zi as T,rn as U,hn as V,Xi as W,Ei as X,$i as Y,vi as Z,Ri as _,_e as a,Si as a0,Bs as a1,yi as a2,Zi as a3,Yt as a4,li as a5,pn as a6,Qs as a7,Us as a8,oi as a9,Qi as aa,Ji as ab,tr as ac,bi as b,Ci as c,di as d,Jt as e,is as f,Xe as g,Gi as h,Ce as i,Se as j,ke as k,ln as l,mi as m,W as n,wt as o,ti as p,$e as q,wi as r,Xt as s,ei as t,un as u,Re as v,ns as w,Ns as x,Hs as y,Ls as z};