@htmlbricks/hb-matrix-video 0.66.2 → 0.66.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/main.iife.js CHANGED
@@ -1,5 +1,5 @@
1
- (function(Jt){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const hr=1,vr=2,Kt=4,_r=8,pr=16,gr=1,mr=2,Xt="[",$t="[!",Zt="[?",Et="]",Pe={},P=Symbol(),Qt="http://www.w3.org/1999/xhtml",wr=!1;var en=Array.isArray,br=Array.prototype.indexOf,Fe=Array.prototype.includes,it=Array.from,st=Object.keys,lt=Object.defineProperty,je=Object.getOwnPropertyDescriptor,yr=Object.getOwnPropertyDescriptors,$r=Object.prototype,Er=Array.prototype,tn=Object.getPrototypeOf,nn=Object.isExtensible;const xr=()=>{};function Tr(e){for(var t=0;t<e.length;t++)e[t]()}function rn(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const I=2,He=4,ot=8,sn=1<<24,ge=16,re=32,me=64,xt=128,X=512,M=1024,j=2048,fe=4096,G=8192,Z=16384,we=32768,ln=1<<25,ze=65536,on=1<<17,kr=1<<18,Ae=1<<19,Ar=1<<20,ae=1<<25,Se=65536,Tt=1<<21,kt=1<<22,be=1<<23,At=Symbol("$state"),Sr=Symbol("legacy props"),Cr=Symbol(""),de=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Nr=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),fn=3,Ke=8;function Rr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Or(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Mr(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Dr(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ir(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Lr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Pr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Fr(){throw new Error("https://svelte.dev/e/hydration_failed")}function jr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Hr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function zr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Br(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function ft(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function qr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let E=!1;function ie(e){E=e}let $;function se(e){if(e===null)throw ft(),Pe;return $=e}function at(){return se(_e($))}function ut(e){if(E){if(_e($)!==null)throw ft(),Pe;$=e}}function an(e=1){if(E){for(var t=e,n=$;t--;)n=_e(n);$=n}}function ct(e=!0){for(var t=0,n=$;;){if(n.nodeType===Ke){var r=n.data;if(r===Et){if(t===0)return n;t-=1}else(r===Xt||r===$t||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=_e(n);e&&n.remove(),n=i}}function un(e){if(!e||e.nodeType!==Ke)throw ft(),Pe;return e.data}function cn(e){return e===this.v}function Yr(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function dn(e){return!Yr(e,this.v)}let Vr=!1,J=null;function Be(e){J=e}function hn(e,t=!1,n){J={p:J,i:!1,c:null,e:null,s:e,x:null,r:m,l:null}}function vn(e){var t=J,n=t.e;if(n!==null){t.e=null;for(var r of n)jn(r)}return e!==void 0&&(t.x=e),t.i=!0,J=t.p,e??{}}function _n(){return!0}let Ce=[];function pn(){var e=Ce;Ce=[],Tr(e)}function ye(e){if(Ce.length===0&&!Xe){var t=Ce;queueMicrotask(()=>{t===Ce&&pn()})}Ce.push(e)}function Wr(){for(;Ce.length>0;)pn()}function gn(e){var t=m;if(t===null)return g.f|=be,e;if((t.f&we)===0&&(t.f&He)===0)throw e;$e(e,t)}function $e(e,t){for(;t!==null;){if((t.f&xt)!==0){if((t.f&we)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Ur=-7169;function R(e,t){e.f=e.f&Ur|t}function St(e){(e.f&X)!==0||e.deps===null?R(e,M):R(e,fe)}function mn(e){if(e!==null)for(const t of e)(t.f&I)===0||(t.f&Se)===0||(t.f^=Se,mn(t.deps))}function wn(e,t,n){(e.f&j)!==0?t.add(e):(e.f&fe)!==0&&n.add(e),mn(e.deps),R(e,M)}const Ee=new Set;let k=null,le=null,Ct=null,Xe=!1,Nt=!1,qe=null,dt=null;var bn=0;let Gr=1;class he{id=Gr++;current=new Map;previous=new Map;#e=new Set;#n=new Set;#t=new Map;#i=new Map;#s=null;#r=[];#l=new Set;#o=new Set;#f=new Map;is_fork=!1;#c=!1;#a=new Set;#d(){return this.is_fork||this.#i.size>0}#v(){for(const r of this.#a)for(const i of r.#i.keys()){for(var t=!1,n=i;n.parent!==null;){if(this.#f.has(n)){t=!0;break}n=n.parent}if(!t)return!0}return!1}skip_effect(t){this.#f.has(t)||this.#f.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#f.get(t);if(n){this.#f.delete(t);for(var r of n.d)R(r,j),this.schedule(r);for(r of n.m)R(r,fe),this.schedule(r)}}#h(){if(bn++>1e3&&(Ee.delete(this),Jr()),!this.#d()){for(const o of this.#l)this.#o.delete(o),R(o,j),this.schedule(o);for(const o of this.#o)R(o,fe),this.schedule(o)}const t=this.#r;this.#r=[],this.apply();var n=qe=[],r=[],i=dt=[];for(const o of t)try{this.#u(o,n,r)}catch(f){throw Tn(o),f}if(k=null,i.length>0){var s=he.ensure();for(const o of i)s.schedule(o)}if(qe=null,dt=null,this.#d()||this.#v()){this.#_(r),this.#_(n);for(const[o,f]of this.#f)xn(o,f)}else{this.#t.size===0&&Ee.delete(this),this.#l.clear(),this.#o.clear();for(const o of this.#e)o(this);this.#e.clear(),yn(r),yn(n),this.#s?.resolve()}var l=k;if(this.#r.length>0){const o=l??=this;o.#r.push(...this.#r.filter(f=>!o.#r.includes(f)))}l!==null&&(Ee.add(l),l.#h()),Ee.has(this)||this.#p()}#u(t,n,r){t.f^=M;for(var i=t.first;i!==null;){var s=i.f,l=(s&(re|me))!==0,o=l&&(s&M)!==0,f=o||(s&G)!==0||this.#f.has(i);if(!f&&i.fn!==null){l?i.f^=M:(s&He)!==0?n.push(i):et(i)&&((s&ge)!==0&&this.#o.add(i),We(i));var a=i.first;if(a!==null){i=a;continue}}for(;i!==null;){var u=i.next;if(u!==null){i=u;break}i=i.parent}}}#_(t){for(var n=0;n<t.length;n+=1)wn(t[n],this.#l,this.#o)}capture(t,n,r=!1){n!==P&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&be)===0&&(this.current.set(t,[t.v,r]),le?.set(t,t.v))}activate(){k=this}deactivate(){k=null,le=null}flush(){try{Nt=!0,k=this,this.#h()}finally{bn=0,Ct=null,qe=null,dt=null,Nt=!1,k=null,le=null,xe.clear()}}discard(){for(const t of this.#n)t(this);this.#n.clear(),Ee.delete(this)}#p(){for(const a of Ee){var t=a.id<this.id,n=[];for(const[u,[d,c]]of this.current){if(a.current.has(u)){var r=a.current.get(u)[0];if(t&&d!==r)a.current.set(u,[d,c]);else continue}n.push(u)}var i=[...a.current.keys()].filter(u=>!this.current.has(u));if(i.length===0)t&&a.discard();else if(n.length>0){a.activate();var s=new Set,l=new Map;for(var o of n)$n(o,i,s,l);if(a.#r.length>0){a.apply();for(var f of a.#r)a.#u(f,[],[]);a.#r=[]}a.deactivate()}}for(const a of Ee)a.#a.has(this)&&(a.#a.delete(this),a.#a.size===0&&!a.#d()&&(a.activate(),a.#h()))}increment(t,n){let r=this.#t.get(n)??0;if(this.#t.set(n,r+1),t){let i=this.#i.get(n)??0;this.#i.set(n,i+1)}}decrement(t,n,r){let i=this.#t.get(n)??0;if(i===1?this.#t.delete(n):this.#t.set(n,i-1),t){let s=this.#i.get(n)??0;s===1?this.#i.delete(n):this.#i.set(n,s-1)}this.#c||r||(this.#c=!0,ye(()=>{this.#c=!1,this.flush()}))}transfer_effects(t,n){for(const r of t)this.#l.add(r);for(const r of n)this.#o.add(r);t.clear(),n.clear()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#n.add(t)}settled(){return(this.#s??=rn()).promise}static ensure(){if(k===null){const t=k=new he;Nt||(Ee.add(k),Xe||ye(()=>{k===t&&t.flush()}))}return k}apply(){{le=null;return}}schedule(t){if(Ct=t,t.b?.is_pending&&(t.f&(He|ot|sn))!==0&&(t.f&we)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(qe!==null&&n===m&&(g===null||(g.f&I)===0))return;if((r&(me|re))!==0){if((r&M)===0)return;n.f^=M}}this.#r.push(n)}}function Rt(e){var t=Xe;Xe=!0;try{for(var n;;){if(Wr(),k===null)return n;k.flush()}}finally{Xe=t}}function Jr(){try{Pr()}catch(e){$e(e,Ct)}}let ve=null;function yn(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(Z|G))===0&&et(r)&&(ve=new Set,We(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Bn(r),ve?.size>0)){xe.clear();for(const i of ve){if((i.f&(Z|G))!==0)continue;const s=[i];let l=i.parent;for(;l!==null;)ve.has(l)&&(ve.delete(l),s.push(l)),l=l.parent;for(let o=s.length-1;o>=0;o--){const f=s[o];(f.f&(Z|G))===0&&We(f)}}ve.clear()}}ve=null}}function $n(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&I)!==0?$n(i,t,n,r):(s&(kt|ge))!==0&&(s&j)===0&&En(i,t,r)&&(R(i,j),Ot(i))}}function En(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(Fe.call(t,i))return!0;if((i.f&I)!==0&&En(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Ot(e){k.schedule(e)}function xn(e,t){if(!((e.f&re)!==0&&(e.f&M)!==0)){(e.f&j)!==0?t.d.push(e):(e.f&fe)!==0&&t.m.push(e),R(e,M);for(var n=e.first;n!==null;)xn(n,t),n=n.next}}function Tn(e){R(e,M);for(var t=e.first;t!==null;)Tn(t),t=t.next}function Kr(e){let t=0,n=Ne(0),r;return()=>{Ht()&&(p(n),Hn(()=>(t===0&&(r=er(()=>e(()=>Ze(n)))),t+=1,()=>{ye(()=>{t-=1,t===0&&(r?.(),r=void 0,Ze(n))})})))}}var Xr=ze|Ae;function Zr(e,t,n,r){new Qr(e,t,n,r)}class Qr{parent;is_pending=!1;transform_error;#e;#n=E?$:null;#t;#i;#s;#r=null;#l=null;#o=null;#f=null;#c=0;#a=0;#d=!1;#v=new Set;#h=new Set;#u=null;#_=Kr(()=>(this.#u=Ne(this.#c),()=>{this.#u=null}));constructor(t,n,r,i){this.#e=t,this.#t=n,this.#i=s=>{var l=m;l.b=this,l.f|=xt,r(s)},this.parent=m.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#s=zt(()=>{if(E){const s=this.#n;at();const l=s.data===$t;if(s.data.startsWith(Zt)){const f=JSON.parse(s.data.slice(Zt.length));this.#y(f)}else l?this.#$():this.#p()}else this.#w()},Xr),E&&(this.#e=$)}#p(){try{this.#r=Q(()=>this.#i(this.#e))}catch(t){this.error(t)}}#y(t){const n=this.#t.failed;n&&(this.#o=Q(()=>{n(this.#e,()=>t,()=>()=>{})}))}#$(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#l=Q(()=>t(this.#e)),ye(()=>{var n=this.#f=document.createDocumentFragment(),r=ue();n.append(r),this.#r=this.#m(()=>Q(()=>this.#i(r))),this.#a===0&&(this.#e.before(n),this.#f=null,Oe(this.#l,()=>{this.#l=null}),this.#g(k))}))}#w(){try{if(this.is_pending=this.has_pending_snippet(),this.#a=0,this.#c=0,this.#r=Q(()=>{this.#i(this.#e)}),this.#a>0){var t=this.#f=document.createDocumentFragment();Yt(this.#r,t);const n=this.#t.pending;this.#l=Q(()=>n(this.#e))}else this.#g(k)}catch(n){this.error(n)}}#g(t){this.is_pending=!1,t.transfer_effects(this.#v,this.#h)}defer_effect(t){wn(t,this.#v,this.#h)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#m(t){var n=m,r=g,i=J;ee(this.#s),q(this.#s),Be(this.#s.ctx);try{return he.ensure(),t()}catch(s){return gn(s),null}finally{ee(n),q(r),Be(i)}}#b(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(t,n);return}this.#a+=t,this.#a===0&&(this.#g(n),this.#l&&Oe(this.#l,()=>{this.#l=null}),this.#f&&(this.#e.before(this.#f),this.#f=null))}update_pending_count(t,n){this.#b(t,n),this.#c+=t,!(!this.#u||this.#d)&&(this.#d=!0,ye(()=>{this.#d=!1,this.#u&&Ye(this.#u,this.#c)}))}get_effect_pending(){return this.#_(),p(this.#u)}error(t){var n=this.#t.onerror;let r=this.#t.failed;if(!n&&!r)throw t;this.#r&&(z(this.#r),this.#r=null),this.#l&&(z(this.#l),this.#l=null),this.#o&&(z(this.#o),this.#o=null),E&&(se(this.#n),an(),se(ct()));var i=!1,s=!1;const l=()=>{if(i){qr();return}i=!0,s&&Br(),this.#o!==null&&Oe(this.#o,()=>{this.#o=null}),this.#m(()=>{this.#w()})},o=f=>{try{s=!0,n?.(f,l),s=!1}catch(a){$e(a,this.#s&&this.#s.parent)}r&&(this.#o=this.#m(()=>{try{return Q(()=>{var a=m;a.b=this,a.f|=xt,r(this.#e,()=>f,()=>l)})}catch(a){return $e(a,this.#s.parent),null}}))};ye(()=>{var f;try{f=this.transform_error(t)}catch(a){$e(a,this.#s&&this.#s.parent);return}f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(o,a=>$e(a,this.#s&&this.#s.parent)):o(f)})}}function ei(e,t,n,r){const i=vt;var s=e.filter(c=>!c.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var l=m,o=ti(),f=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(c=>c.promise)):null;function a(c){o();try{r(c)}catch(_){(l.f&Z)===0&&$e(_,l)}ht()}if(n.length===0){f.then(()=>a(t.map(i)));return}var u=kn();function d(){Promise.all(n.map(c=>ni(c))).then(c=>a([...t.map(i),...c])).catch(c=>$e(c,l)).finally(()=>u())}f?f.then(()=>{o(),d(),ht()}):d()}function ti(){var e=m,t=g,n=J,r=k;return function(s=!0){ee(e),q(t),Be(n),s&&(e.f&Z)===0&&(r?.activate(),r?.apply())}}function ht(e=!0){ee(null),q(null),Be(null),e&&k?.deactivate()}function kn(){var e=m,t=e.b,n=k,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function vt(e){var t=I|j,n=g!==null&&(g.f&I)!==0?g:null;return m!==null&&(m.f|=Ae),{ctx:J,deps:null,effects:null,equals:cn,f:t,fn:e,reactions:null,rv:0,v:P,wv:0,parent:n??m,ac:null}}function ni(e,t,n){let r=m;r===null&&Or();var i=void 0,s=Ne(P),l=!g,o=new Map;return pi(()=>{var f=m,a=rn();i=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).finally(ht)}catch(_){a.reject(_),ht()}var u=k;if(l){if((f.f&we)!==0)var d=kn();if(r.b.is_rendered())o.get(u)?.reject(de),o.delete(u);else{for(const _ of o.values())_.reject(de);o.clear()}o.set(u,a)}const c=(_,v=void 0)=>{if(d){var w=v===de;d(w)}if(!(v===de||(f.f&Z)!==0)){if(u.activate(),v)s.f|=be,Ye(s,v);else{(s.f&be)!==0&&(s.f^=be),Ye(s,_);for(const[h,b]of o){if(o.delete(h),h===u)break;b.reject(de)}}u.deactivate()}};a.promise.then(c,_=>c(null,_||"unknown"))}),Pn(()=>{for(const f of o.values())f.reject(de)}),new Promise(f=>{function a(u){function d(){u===i?f(s):a(i)}u.then(d,d)}a(i)})}function ri(e){const t=vt(e);return Wn(t),t}function ii(e){const t=vt(e);return t.equals=dn,t}function si(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)z(t[n])}}function li(e){for(var t=e.parent;t!==null;){if((t.f&I)===0)return(t.f&Z)===0?t:null;t=t.parent}return null}function Mt(e){var t,n=m;ee(li(e));try{e.f&=~Se,si(e),t=Xn(e)}finally{ee(n)}return t}function An(e){var t=e.v,n=Mt(e);if(!e.equals(n)&&(e.wv=Jn(),(!k?.is_fork||e.deps===null)&&(e.v=n,k?.capture(e,t,!0),e.deps===null))){R(e,M);return}Te||(le!==null?(Ht()||k?.is_fork)&&le.set(e,n):St(e))}function oi(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(de),t.teardown=xr,t.ac=null,tt(t,0),Bt(t))}function Sn(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&We(t)}let Dt=new Set;const xe=new Map;let Cn=!1;function Ne(e,t){var n={f:0,v:e,reactions:null,equals:cn,rv:0,wv:0};return n}function B(e,t){const n=Ne(e);return Wn(n),n}function Nn(e,t=!1,n=!0){const r=Ne(e);return t||(r.equals=dn),r}function H(e,t,n=!1){g!==null&&(!oe||(g.f&on)!==0)&&_n()&&(g.f&(I|ge|kt|on))!==0&&(te===null||!Fe.call(te,e))&&zr();let r=n?Ve(t):t;return Ye(e,r,dt)}function Ye(e,t,n=null){if(!e.equals(t)){var r=e.v;Te?xe.set(e,t):xe.set(e,r),e.v=t;var i=he.ensure();if(i.capture(e,r),(e.f&I)!==0){const s=e;(e.f&j)!==0&&Mt(s),le===null&&St(s)}e.wv=Jn(),Rn(e,j,n),m!==null&&(m.f&M)!==0&&(m.f&(re|me))===0&&(ne===null?wi([e]):ne.push(e)),!i.is_fork&&Dt.size>0&&!Cn&&fi()}return t}function fi(){Cn=!1;for(const e of Dt)(e.f&M)!==0&&R(e,fe),et(e)&&We(e);Dt.clear()}function Ze(e){H(e,e.v+1)}function Rn(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var l=r[s],o=l.f,f=(o&j)===0;if(f&&R(l,t),(o&I)!==0){var a=l;le?.delete(a),(o&Se)===0&&(o&X&&(l.f|=Se),Rn(a,fe,n))}else if(f){var u=l;(o&ge)!==0&&ve!==null&&ve.add(u),n!==null?n.push(u):Ot(u)}}}function Ve(e){if(typeof e!="object"||e===null||At in e)return e;const t=tn(e);if(t!==$r&&t!==Er)return e;var n=new Map,r=en(e),i=B(0),s=De,l=o=>{if(De===s)return o();var f=g,a=De;q(null),Gn(s);var u=o();return q(f),Gn(a),u};return r&&n.set("length",B(e.length)),new Proxy(e,{defineProperty(o,f,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&jr();var u=n.get(f);return u===void 0?l(()=>{var d=B(a.value);return n.set(f,d),d}):H(u,a.value,!0),!0},deleteProperty(o,f){var a=n.get(f);if(a===void 0){if(f in o){const u=l(()=>B(P));n.set(f,u),Ze(i)}}else H(a,P),Ze(i);return!0},get(o,f,a){if(f===At)return e;var u=n.get(f),d=f in o;if(u===void 0&&(!d||je(o,f)?.writable)&&(u=l(()=>{var _=Ve(d?o[f]:P),v=B(_);return v}),n.set(f,u)),u!==void 0){var c=p(u);return c===P?void 0:c}return Reflect.get(o,f,a)},getOwnPropertyDescriptor(o,f){var a=Reflect.getOwnPropertyDescriptor(o,f);if(a&&"value"in a){var u=n.get(f);u&&(a.value=p(u))}else if(a===void 0){var d=n.get(f),c=d?.v;if(d!==void 0&&c!==P)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return a},has(o,f){if(f===At)return!0;var a=n.get(f),u=a!==void 0&&a.v!==P||Reflect.has(o,f);if(a!==void 0||m!==null&&(!u||je(o,f)?.writable)){a===void 0&&(a=l(()=>{var c=u?Ve(o[f]):P,_=B(c);return _}),n.set(f,a));var d=p(a);if(d===P)return!1}return u},set(o,f,a,u){var d=n.get(f),c=f in o;if(r&&f==="length")for(var _=a;_<d.v;_+=1){var v=n.get(_+"");v!==void 0?H(v,P):_ in o&&(v=l(()=>B(P)),n.set(_+"",v))}if(d===void 0)(!c||je(o,f)?.writable)&&(d=l(()=>B(void 0)),H(d,Ve(a)),n.set(f,d));else{c=d.v!==P;var w=l(()=>Ve(a));H(d,w)}var h=Reflect.getOwnPropertyDescriptor(o,f);if(h?.set&&h.set.call(u,a),!c){if(r&&typeof f=="string"){var b=n.get("length"),D=Number(f);Number.isInteger(D)&&D>=b.v&&H(b,D+1)}Ze(i)}return!0},ownKeys(o){p(i);var f=Reflect.ownKeys(o).filter(d=>{var c=n.get(d);return c===void 0||c.v!==P});for(var[a,u]of n)u.v!==P&&!(a in o)&&f.push(a);return f},setPrototypeOf(){Hr()}})}var It,On,Mn,Dn;function Lt(){if(It===void 0){It=window,On=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Mn=je(t,"firstChild").get,Dn=je(t,"nextSibling").get,nn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),nn(n)&&(n.__t=void 0)}}function ue(e=""){return document.createTextNode(e)}function Re(e){return Mn.call(e)}function _e(e){return Dn.call(e)}function Pt(e,t){if(!E)return Re(e);var n=Re($);return n===null&&(n=$.appendChild(ue())),se(n),n}function ai(e,t=!1){if(!E){var n=Re(e);return n instanceof Comment&&n.data===""?_e(n):n}if(t){if($?.nodeType!==fn){var r=ue();return $?.before(r),se(r),r}ui($)}return $}function In(e){e.textContent=""}function Ln(){return!1}function Ft(e,t,n){return document.createElementNS(Qt,e,void 0)}function ui(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===fn;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function jt(e){var t=g,n=m;q(null),ee(null);try{return e()}finally{q(t),ee(n)}}function ci(e){m===null&&(g===null&&Lr(),Ir()),Te&&Dr()}function di(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ce(e,t){var n=m;n!==null&&(n.f&G)!==0&&(e|=G);var r={ctx:J,deps:null,nodes:null,f:e|j|X,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if((e&He)!==0)qe!==null?qe.push(r):he.ensure().schedule(r);else if(t!==null){try{We(r)}catch(l){throw z(r),l}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&Ae)===0&&(i=i.first,(e&ge)!==0&&(e&ze)!==0&&i!==null&&(i.f|=ze))}if(i!==null&&(i.parent=n,n!==null&&di(i,n),g!==null&&(g.f&I)!==0&&(e&me)===0)){var s=g;(s.effects??=[]).push(i)}return r}function Ht(){return g!==null&&!oe}function Pn(e){const t=ce(ot,null);return R(t,M),t.teardown=e,t}function Fn(e){ci();var t=m.f,n=!g&&(t&re)!==0&&(t&we)===0;if(n){var r=J;(r.e??=[]).push(e)}else return jn(e)}function jn(e){return ce(He|Ar,e)}function hi(e){he.ensure();const t=ce(me|Ae,e);return()=>{z(t)}}function vi(e){he.ensure();const t=ce(me|Ae,e);return(n={})=>new Promise(r=>{n.outro?Oe(t,()=>{z(t),r(void 0)}):(z(t),r(void 0))})}function _i(e){return ce(He,e)}function pi(e){return ce(kt|Ae,e)}function Hn(e,t=0){return ce(ot|t,e)}function Qe(e,t=[],n=[],r=[]){ei(r,t,n,i=>{ce(ot,()=>e(...i.map(p)))})}function zt(e,t=0){var n=ce(ge|t,e);return n}function Q(e){return ce(re|Ae,e)}function zn(e){var t=e.teardown;if(t!==null){const n=Te,r=g;Vn(!0),q(null);try{t.call(null)}finally{Vn(n),q(r)}}}function Bt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&jt(()=>{i.abort(de)});var r=n.next;(n.f&me)!==0?n.parent=null:z(n,t),n=r}}function gi(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&re)===0&&z(t),t=n}}function z(e,t=!0){var n=!1;(t||(e.f&kr)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(mi(e.nodes.start,e.nodes.end),n=!0),R(e,ln),Bt(e,t&&!n),tt(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();zn(e),e.f^=ln,e.f|=Z;var i=e.parent;i!==null&&i.first!==null&&Bn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function mi(e,t){for(;e!==null;){var n=e===t?null:_e(e);e.remove(),e=n}}function Bn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Oe(e,t,n=!0){var r=[];qn(e,r,!0);var i=()=>{n&&z(e),t&&t()},s=r.length;if(s>0){var l=()=>--s||i();for(var o of r)o.out(l)}else i()}function qn(e,t,n){if((e.f&G)===0){e.f^=G;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next,l=(i.f&ze)!==0||(i.f&re)!==0&&(e.f&ge)!==0;qn(i,t,l?n:!1),i=s}}}function qt(e){Yn(e,!0)}function Yn(e,t){if((e.f&G)!==0){e.f^=G,(e.f&M)===0&&(R(e,j),he.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&ze)!==0||(n.f&re)!==0;Yn(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const l of s)(l.is_global||t)&&l.in()}}function Yt(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:_e(n);t.append(n),n=i}}let _t=!1,Te=!1;function Vn(e){Te=e}let g=null,oe=!1;function q(e){g=e}let m=null;function ee(e){m=e}let te=null;function Wn(e){g!==null&&(te===null?te=[e]:te.push(e))}let Y=null,K=0,ne=null;function wi(e){ne=e}let Un=1,Me=0,De=Me;function Gn(e){De=e}function Jn(){return++Un}function et(e){var t=e.f;if((t&j)!==0)return!0;if(t&I&&(e.f&=~Se),(t&fe)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(et(s)&&An(s),s.wv>e.wv)return!0}(t&X)!==0&&le===null&&R(e,M)}return!1}function Kn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(te!==null&&Fe.call(te,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&I)!==0?Kn(s,t,!1):t===s&&(n?R(s,j):(s.f&M)!==0&&R(s,fe),Ot(s))}}function Xn(e){var t=Y,n=K,r=ne,i=g,s=te,l=J,o=oe,f=De,a=e.f;Y=null,K=0,ne=null,g=(a&(re|me))===0?e:null,te=null,Be(e.ctx),oe=!1,De=++Me,e.ac!==null&&(jt(()=>{e.ac.abort(de)}),e.ac=null);try{e.f|=Tt;var u=e.fn,d=u();e.f|=we;var c=e.deps,_=k?.is_fork;if(Y!==null){var v;if(_||tt(e,K),c!==null&&K>0)for(c.length=K+Y.length,v=0;v<Y.length;v++)c[K+v]=Y[v];else e.deps=c=Y;if(Ht()&&(e.f&X)!==0)for(v=K;v<c.length;v++)(c[v].reactions??=[]).push(e)}else!_&&c!==null&&K<c.length&&(tt(e,K),c.length=K);if(_n()&&ne!==null&&!oe&&c!==null&&(e.f&(I|fe|j))===0)for(v=0;v<ne.length;v++)Kn(ne[v],e);if(i!==null&&i!==e){if(Me++,i.deps!==null)for(let w=0;w<n;w+=1)i.deps[w].rv=Me;if(t!==null)for(const w of t)w.rv=Me;ne!==null&&(r===null?r=ne:r.push(...ne))}return(e.f&be)!==0&&(e.f^=be),d}catch(w){return gn(w)}finally{e.f^=Tt,Y=t,K=n,ne=r,g=i,te=s,Be(l),oe=o,De=f}}function bi(e,t){let n=t.reactions;if(n!==null){var r=br.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&I)!==0&&(Y===null||!Fe.call(Y,t))){var s=t;(s.f&X)!==0&&(s.f^=X,s.f&=~Se),St(s),oi(s),tt(s,0)}}function tt(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)bi(e,n[r])}function We(e){var t=e.f;if((t&Z)===0){R(e,M);var n=m,r=_t;m=e,_t=!0;try{(t&(ge|sn))!==0?gi(e):Bt(e),zn(e);var i=Xn(e);e.teardown=typeof i=="function"?i:null,e.wv=Un;var s;wr&&Vr&&(e.f&j)!==0&&e.deps}finally{_t=r,m=n}}}function p(e){var t=e.f,n=(t&I)!==0;if(g!==null&&!oe){var r=m!==null&&(m.f&Z)!==0;if(!r&&(te===null||!Fe.call(te,e))){var i=g.deps;if((g.f&Tt)!==0)e.rv<Me&&(e.rv=Me,Y===null&&i!==null&&i[K]===e?K++:Y===null?Y=[e]:Y.push(e));else{(g.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[g]:Fe.call(s,g)||s.push(g)}}}if(Te&&xe.has(e))return xe.get(e);if(n){var l=e;if(Te){var o=l.v;return((l.f&M)===0&&l.reactions!==null||Qn(l))&&(o=Mt(l)),xe.set(l,o),o}var f=(l.f&X)===0&&!oe&&g!==null&&(_t||(g.f&X)!==0),a=(l.f&we)===0;et(l)&&(f&&(l.f|=X),An(l)),f&&!a&&(Sn(l),Zn(l))}if(le?.has(e))return le.get(e);if((e.f&be)!==0)throw e.v;return e.v}function Zn(e){if(e.f|=X,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&I)!==0&&(t.f&X)===0&&(Sn(t),Zn(t))}function Qn(e){if(e.v===P)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(xe.has(t)||(t.f&I)!==0&&Qn(t))return!0;return!1}function er(e){var t=oe;try{return oe=!0,e()}finally{oe=t}}const pt=Symbol("events"),yi=new Set,tr=new Set;function $i(e){if(!E)return;e.removeAttribute("onload"),e.removeAttribute("onerror");const t=e.__e;t!==void 0&&(e.__e=void 0,queueMicrotask(()=>{e.isConnected&&e.dispatchEvent(t)}))}function Ei(e,t,n,r={}){function i(s){if(r.capture||Vt.call(t,s),!s.cancelBubble)return jt(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ye(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function gt(e,t,n,r,i){var s={capture:r,passive:i},l=Ei(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Pn(()=>{t.removeEventListener(e,l,s)})}let nr=null;function Vt(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;nr=e;var l=0,o=nr===e&&e[pt];if(o){var f=i.indexOf(o);if(f!==-1&&(t===document||t===window)){e[pt]=t;return}var a=i.indexOf(t);if(a===-1)return;f<=a&&(l=f)}if(s=i[l]||e.target,s!==t){lt(e,"currentTarget",{configurable:!0,get(){return s||n}});var u=g,d=m;q(null),ee(null);try{for(var c,_=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var w=s[pt]?.[r];w!=null&&(!s.disabled||e.target===s)&&w.call(s,e)}catch(h){c?_.push(h):c=h}if(e.cancelBubble||v===t||v===null)break;s=v}if(c){for(let h of _)queueMicrotask(()=>{throw h});throw c}}finally{e[pt]=t,delete e.currentTarget,q(u),ee(d)}}}const xi=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ti(e){return xi?.createHTML(e)??e}function ki(e){var t=Ft("template");return t.innerHTML=Ti(e.replaceAll("<!>","<!---->")),t.content}function Ue(e,t){var n=m;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function Ie(e,t){var n=(t&gr)!==0,r=(t&mr)!==0,i,s=!e.startsWith("<!>");return()=>{if(E)return Ue($,null),$;i===void 0&&(i=ki(s?e:"<!>"+e),n||(i=Re(i)));var l=r||On?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Re(l),f=l.lastChild;Ue(o,f)}else Ue(l,l);return l}}function Ai(){if(E)return Ue($,null),$;var e=document.createDocumentFragment(),t=document.createComment(""),n=ue();return e.append(t,n),Ue(t,n),e}function pe(e,t){if(E){var n=m;((n.f&we)===0||n.nodes.end===null)&&(n.nodes.end=$),at();return}e!==null&&e.before(t)}const Si=["touchstart","touchmove"];function Ci(e){return Si.includes(e)}function rr(e,t){return ir(e,t)}function Ni(e,t){Lt(),t.intro=t.intro??!1;const n=t.target,r=E,i=$;try{for(var s=Re(n);s&&(s.nodeType!==Ke||s.data!==Xt);)s=_e(s);if(!s)throw Pe;ie(!0),se(s);const l=ir(e,{...t,anchor:s});return ie(!1),l}catch(l){if(l instanceof Error&&l.message.split(`
2
- `).some(o=>o.startsWith("https://svelte.dev/e/")))throw l;return l!==Pe&&console.warn("Failed to hydrate: ",l),t.recover===!1&&Fr(),Lt(),In(n),ie(!1),rr(e,t)}finally{ie(r),se(i)}}const mt=new Map;function ir(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:l=!0,transformError:o}){Lt();var f=void 0,a=vi(()=>{var u=n??t.appendChild(ue());Zr(u,{pending:()=>{}},_=>{hn({});var v=J;if(s&&(v.c=s),i&&(r.$$events=i),E&&Ue(_,null),f=e(_,r)||{},E&&(m.nodes.end=$,$===null||$.nodeType!==Ke||$.data!==Et))throw ft(),Pe;vn()},o);var d=new Set,c=_=>{for(var v=0;v<_.length;v++){var w=_[v];if(!d.has(w)){d.add(w);var h=Ci(w);for(const A of[t,document]){var b=mt.get(A);b===void 0&&(b=new Map,mt.set(A,b));var D=b.get(w);D===void 0?(A.addEventListener(w,Vt,{passive:h}),b.set(w,1)):b.set(w,D+1)}}}};return c(it(yi)),tr.add(c),()=>{for(var _ of d)for(const h of[t,document]){var v=mt.get(h),w=v.get(_);--w==0?(h.removeEventListener(_,Vt),v.delete(_),v.size===0&&mt.delete(h)):v.set(_,w)}tr.delete(c),u!==n&&u.parentNode?.removeChild(u)}});return Wt.set(f,a),f}let Wt=new WeakMap;function Ri(e,t){const n=Wt.get(e);return n?(Wt.delete(e),n(t)):Promise.resolve()}class Oi{anchor;#e=new Map;#n=new Map;#t=new Map;#i=new Set;#s=!0;constructor(t,n=!0){this.anchor=t,this.#s=n}#r=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#n.get(n);if(r)qt(r),this.#i.delete(n);else{var i=this.#t.get(n);i&&(this.#n.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,l]of this.#e){if(this.#e.delete(s),s===t)break;const o=this.#t.get(l);o&&(z(o.effect),this.#t.delete(l))}for(const[s,l]of this.#n){if(s===n||this.#i.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var a=document.createDocumentFragment();Yt(l,a),a.append(ue()),this.#t.set(s,{effect:l,fragment:a})}else z(l);this.#i.delete(s),this.#n.delete(s)};this.#s||!r?(this.#i.add(s),Oe(l,o,!1)):o()}}};#l=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||(z(i.effect),this.#t.delete(r))};ensure(t,n){var r=k,i=Ln();if(n&&!this.#n.has(t)&&!this.#t.has(t))if(i){var s=document.createDocumentFragment(),l=ue();s.append(l),this.#t.set(t,{effect:Q(()=>n(l)),fragment:s})}else this.#n.set(t,Q(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[o,f]of this.#n)o===t?r.unskip_effect(f):r.skip_effect(f);for(const[o,f]of this.#t)o===t?r.unskip_effect(f.effect):r.skip_effect(f.effect);r.oncommit(this.#r),r.ondiscard(this.#l)}else E&&(this.anchor=$),this.#r(r)}}function Mi(e){J===null&&Rr(),Fn(()=>{const t=er(e);if(typeof t=="function")return t})}function sr(e,t,n=!1){var r;E&&(r=$,at());var i=new Oi(e),s=n?ze:0;function l(o,f){if(E){var a=un(r);if(o!==parseInt(a.substring(1))){var u=ct();se(u),i.anchor=u,ie(!1),i.ensure(o,f),ie(!0);return}}i.ensure(o,f)}zt(()=>{var o=!1;t((f,a=0)=>{o=!0,l(a,f)}),o||l(-1,null)},s)}function Di(e,t,n){for(var r=[],i=t.length,s,l=t.length,o=0;o<i;o++){let d=t[o];Oe(d,()=>{if(s){if(s.pending.delete(d),s.done.add(d),s.pending.size===0){var c=e.outrogroups;Ut(e,it(s.done)),c.delete(s),c.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var f=r.length===0&&n!==null;if(f){var a=n,u=a.parentNode;In(u),u.append(a),e.items.clear()}Ut(e,t,!f)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function Ut(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const l of e.pending.values())for(const o of l)r.add(e.items.get(o).e)}for(var i=0;i<t.length;i++){var s=t[i];if(r?.has(s)){s.f|=ae;const l=document.createDocumentFragment();Yt(s,l)}else z(t[i],n)}}var lr;function or(e,t,n,r,i,s=null){var l=e,o=new Map,f=(t&Kt)!==0;if(f){var a=e;l=E?se(Re(a)):a.appendChild(ue())}E&&at();var u=null,d=ii(()=>{var A=n();return en(A)?A:A==null?[]:it(A)}),c,_=new Map,v=!0;function w(A){(D.effect.f&Z)===0&&(D.pending.delete(A),D.fallback=u,Ii(D,c,l,t,r),u!==null&&(c.length===0?(u.f&ae)===0?qt(u):(u.f^=ae,rt(u,null,l)):Oe(u,()=>{u=null})))}function h(A){D.pending.delete(A)}var b=zt(()=>{c=p(d);var A=c.length;let V=!1;if(E){var Je=un(l)===$t;Je!==(A===0)&&(l=ct(),se(l),ie(!1),V=!0)}for(var y=new Set,x=k,L=Ln(),O=0;O<A;O+=1){E&&$.nodeType===Ke&&$.data===Et&&(l=$,V=!0,ie(!1));var C=c[O],T=r(C,O),S=v?null:o.get(T);S?(S.v&&Ye(S.v,C),S.i&&Ye(S.i,O),L&&x.unskip_effect(S.e)):(S=Li(o,v?l:lr??=ue(),C,T,O,i,t,n),v||(S.e.f|=ae),o.set(T,S)),y.add(T)}if(A===0&&s&&!u&&(v?u=Q(()=>s(l)):(u=Q(()=>s(lr??=ue())),u.f|=ae)),A>y.size&&Mr(),E&&A>0&&se(ct()),!v)if(_.set(x,y),L){for(const[N,W]of o)y.has(N)||x.skip_effect(W.e);x.oncommit(w),x.ondiscard(h)}else w(x);V&&ie(!0),p(d)}),D={effect:b,items:o,pending:_,outrogroups:null,fallback:u};v=!1,E&&(l=$)}function nt(e){for(;e!==null&&(e.f&re)===0;)e=e.next;return e}function Ii(e,t,n,r,i){var s=(r&_r)!==0,l=t.length,o=e.items,f=nt(e.effect.first),a,u=null,d,c=[],_=[],v,w,h,b;if(s)for(b=0;b<l;b+=1)v=t[b],w=i(v,b),h=o.get(w).e,(h.f&ae)===0&&(h.nodes?.a?.measure(),(d??=new Set).add(h));for(b=0;b<l;b+=1){if(v=t[b],w=i(v,b),h=o.get(w).e,e.outrogroups!==null)for(const C of e.outrogroups)C.pending.delete(h),C.done.delete(h);if((h.f&G)!==0&&(qt(h),s&&(h.nodes?.a?.unfix(),(d??=new Set).delete(h))),(h.f&ae)!==0)if(h.f^=ae,h===f)rt(h,null,n);else{var D=u?u.next:f;h===e.effect.last&&(e.effect.last=h.prev),h.prev&&(h.prev.next=h.next),h.next&&(h.next.prev=h.prev),ke(e,u,h),ke(e,h,D),rt(h,D,n),u=h,c=[],_=[],f=nt(u.next);continue}if(h!==f){if(a!==void 0&&a.has(h)){if(c.length<_.length){var A=_[0],V;u=A.prev;var Je=c[0],y=c[c.length-1];for(V=0;V<c.length;V+=1)rt(c[V],A,n);for(V=0;V<_.length;V+=1)a.delete(_[V]);ke(e,Je.prev,y.next),ke(e,u,Je),ke(e,y,A),f=A,u=y,b-=1,c=[],_=[]}else a.delete(h),rt(h,f,n),ke(e,h.prev,h.next),ke(e,h,u===null?e.effect.first:u.next),ke(e,u,h),u=h;continue}for(c=[],_=[];f!==null&&f!==h;)(a??=new Set).add(f),_.push(f),f=nt(f.next);if(f===null)continue}(h.f&ae)===0&&c.push(h),u=h,f=nt(h.next)}if(e.outrogroups!==null){for(const C of e.outrogroups)C.pending.size===0&&(Ut(e,it(C.done)),e.outrogroups?.delete(C));e.outrogroups.size===0&&(e.outrogroups=null)}if(f!==null||a!==void 0){var x=[];if(a!==void 0)for(h of a)(h.f&G)===0&&x.push(h);for(;f!==null;)(f.f&G)===0&&f!==e.fallback&&x.push(f),f=nt(f.next);var L=x.length;if(L>0){var O=(r&Kt)!==0&&l===0?n:null;if(s){for(b=0;b<L;b+=1)x[b].nodes?.a?.measure();for(b=0;b<L;b+=1)x[b].nodes?.a?.fix()}Di(e,x,O)}}s&&ye(()=>{if(d!==void 0)for(h of d)h.nodes?.a?.apply()})}function Li(e,t,n,r,i,s,l,o){var f=(l&hr)!==0?(l&pr)===0?Nn(n,!1,!1):Ne(n):null,a=(l&vr)!==0?Ne(i):null;return{v:f,i:a,e:Q(()=>(s(t,f??n,a??i,o),()=>{e.delete(r)}))}}function rt(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,s=t&&(t.f&ae)===0?t.nodes.start:n;r!==null;){var l=_e(r);if(s.before(r),r===i)return;r=l}}function ke(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Pi(e,t){_i(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=Ft("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}const Fi=Symbol("is custom element"),ji=Symbol("is html"),Hi=Nr?"link":"LINK";function Ge(e,t,n,r){var i=zi(e);E&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===Hi)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[Cr]=n),n==null?e.removeAttribute(t):typeof n!="string"&&fr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function wt(e,t,n){var r=g,i=m;let s=E;E&&ie(!1),q(null),ee(null);try{t!=="style"&&(Gt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?fr(e).includes(t):n&&typeof n=="object")?e[t]=n:Ge(e,t,n==null?n:String(n))}finally{q(r),ee(i),s&&ie(!0)}}function zi(e){return e.__attributes??={[Fi]:e.nodeName.includes("-"),[ji]:e.namespaceURI===Qt}}var Gt=new Map;function fr(e){var t=e.getAttribute("is")||e.nodeName,n=Gt.get(t);if(n)return n;Gt.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=yr(i);for(var l in r)r[l].set&&n.push(l);i=tn(i)}return n}function ar(e,t,n,r){var i=r,s=!0,l=()=>(s&&(s=!1,i=r),i),o;o=e[t],o===void 0&&r!==void 0&&(o=l());var f;f=()=>{var c=e[t];return c===void 0?l():(s=!0,c)};var a=!1,u=vt(()=>(a=!1,f())),d=m;return(function(c,_){if(arguments.length>0){const v=_?p(u):c;return H(u,v),a=!0,i!==void 0&&(i=v),c}return Te&&a||(d.f&Z)!==0?u.v:p(u)})}function Bi(e){return new qi(e)}class qi{#e;#n;constructor(t){var n=new Map,r=(s,l)=>{var o=Nn(l,!1,!1);return n.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,l){return p(n.get(l)??r(l,Reflect.get(s,l)))},has(s,l){return l===Sr?!0:(p(n.get(l)??r(l,Reflect.get(s,l))),Reflect.has(s,l))},set(s,l,o){return H(n.get(l)??r(l,o),o),Reflect.set(s,l,o)}});this.#n=(t.hydrate?Ni:rr)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Rt(),this.#e=i.$$events;for(const s of Object.keys(this.#n))s==="$set"||s==="$destroy"||s==="$on"||lt(this,s,{get(){return this.#n[s]},set(l){this.#n[s]=l},enumerable:!0});this.#n.$set=s=>{Object.assign(i,s)},this.#n.$destroy=()=>{Ri(this.#n)}}$set(t){this.#n.$set(t)}$on(t,n){this.#e[t]=this.#e[t]||[];const r=(...i)=>n.call(this,...i);return this.#e[t].push(r),()=>{this.#e[t]=this.#e[t].filter(i=>i!==r)}}$destroy(){this.#n.$destroy()}}let ur;typeof HTMLElement=="function"&&(ur=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{const s=Ft("slot");r!=="default"&&(s.name=r),pe(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Yi(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=bt(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Bi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=hi(()=>{Hn(()=>{this.$$r=!0;for(const r of st(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=bt(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=bt(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return st(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function bt(e,t,n,r){const i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Yi(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function Vi(e,t,n,r,i,s){let l=class extends ur{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return st(t).map(o=>(t[o].attribute||o).toLowerCase())}};return st(t).forEach(o=>{lt(l.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(f){f=bt(o,f,t),this.$$d[o]=f;var a=this.$$c;if(a){var u=je(a,o)?.get;u?a[o]=f:a.$set({[o]:f})}}})}),r.forEach(o=>{lt(l.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=l,l}const Wi={version:"0.66.2"};function Ui(e,t=100,n={}){if(typeof e!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof e}\`.`);if(t<0)throw new RangeError("`wait` must not be negative.");if(typeof n=="boolean")throw new TypeError("The `options` parameter must be an object, not a boolean. Use `{immediate: true}` instead.");const{immediate:r}=n;let i,s,l,o,f;function a(){const c=i,_=s;return i=void 0,s=void 0,f=e.apply(c,_),f}function u(){const c=Date.now()-o;c<t&&c>=0?l=setTimeout(u,t-c):(l=void 0,r||(f=a()))}const d=function(...c){if(i&&this!==i&&Object.getPrototypeOf(this)===Object.getPrototypeOf(i))throw new Error("Debounced method called with different contexts of the same prototype.");i=this,s=c,o=Date.now();const _=r&&!l;if(l||(l=setTimeout(u,t)),_)return f=a(),f};return Object.defineProperty(d,"isPending",{get(){return l!==void 0}}),d.clear=()=>{l&&(clearTimeout(l),l=void 0,i=void 0,s=void 0)},d.flush=()=>{l&&d.trigger()},d.trigger=()=>{f=a(),d.clear()},d}var Le={},cr;function Gi(){if(cr)return Le;cr=1,Object.defineProperty(Le,"__esModule",{value:!0}),Le.LanguageTranslator=void 0,Le.getChildStyleToPass=e,Le.addComponent=t;function e(r,i){var s,l,o="";try{if(r&&i?.length&&(!((s=Object.keys(r))===null||s===void 0)&&s.length)&&(!((l=i?.filter(function(c){return Object.keys(r).includes(c.name)}))===null||l===void 0)&&l.length))for(var f=function(c){var _=i?.filter(function(v){return v.name===c&&v.defaultValue!==r[c]});_&&(o+="".concat(c,":").concat(r[c],";"))},a=0,u=Object.keys(r);a<u.length;a++){var d=u[a];f(d)}}catch(c){console.error("error getting child style to pass",c)}finally{return o}}function t(r){var i,s=((i=r?.repoName.split("/"))===null||i===void 0?void 0:i[1])||r?.repoName;if(!s)throw new Error("wrong componentPath "+r?.repoName);if(!r?.version)throw new Error("wrong version "+r?.version);var l=r?.iifePath||"main.iife.js";if(!document.getElementById(s+"-script"))try{var o=document.createElement("script");if(o.id=s+"-script",o.src="https://cdn.jsdelivr.net/npm/".concat(r.repoName,"@").concat(r.version,"/").concat(l),r?.local)o.src="".concat(r.local);else if(location.href.includes("localhost:6006")){var f=s.split("-")[0];o.src="http://localhost:6006/webcomponents/".concat(s.replace(f+"-",""),"/").concat(l)}document.head.appendChild(o)}catch(a){console.warn(a)}}var n=(function(){function r(i){if(this.lang="",!i?.dictionary)throw new Error("no dictionary provided");this.dictionary=i.dictionary,this.setLang(i?.lang)}return r.prototype.setLang=function(i){i||(i=r.getDefaultLang()),this.lang=i},r.prototype.translateWord=function(i,s){return r.getDictionaryWord(i,this.dictionary,s||this.lang)},r.prototype.translateDate=function(i,s,l){return r.formatDate(i,s,l||this.lang)},r.getDefaultLang=function(){var i,s,l,o="en";return navigator?.languages&&(!((l=(s=(i=navigator.languages[0])===null||i===void 0?void 0:i.split("-")[0])===null||s===void 0?void 0:s.toLowerCase())===null||l===void 0)&&l.length)&&(o=navigator.languages[0].split("-")[0].toLowerCase()),o},r.getDictionaryWord=function(i,s,l){var o;if(!i)throw new Error("no wordKey provided");if(!s)throw new Error("no dictionary provided");if(l&&(!((o=s[l])===null||o===void 0)&&o[i]))return s[l][i];var f="",a=r.getDefaultLang();if(!l||a!==l){var u=s?.[a];u?.[i]&&(f=u[i])}return f},r.formatDate=function(i,s,l){if(!i)throw new Error("no date provided");if(typeof i.getMonth!="function")throw new Error("wrong date format");var o=new Intl.DateTimeFormat(l||r.getDefaultLang(),s);return o.format(i)},r})();return Le.LanguageTranslator=n,Le}var Ji=Gi(),Ki=Ie('<iframe class="svelte-1f6x0x7"></iframe>'),Xi=Ie("<hb-player-live></hb-player-live>",2),Zi=Ie("<hb-player-live-camera-ptz></hb-player-live-camera-ptz>",2),Qi=Ie('<video controls=""><source type="video/mp4"/> <track kind="captions" src="" srclang="en" label="English"/> Your browser does not support the video tag.</video>',2),es=Ie('<div class="col svelte-1f6x0x7" style="padding-right:0px;padding-left:0px;--bs-gutter-x: 0px;"><!></div>'),ts=Ie('<div class="row svelte-1f6x0x7"></div>'),ns=Ie('<div id="matrix" class="svelte-1f6x0x7"><!></div>');const rs={hash:"svelte-1f6x0x7",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host {font-family:"Roboto", sans-serif;width:100%;display:block;background-color:black;}#matrix.svelte-1f6x0x7 {display:grid;gap:5px;
1
+ (function(Gt){"use strict";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add("5");const cr=1,hr=2,Kt=4,dr=8,vr=16,_r=1,pr=2,Jt="[",yt="[!",Xt="[?",$t="]",Pe={},L=Symbol(),Zt="http://www.w3.org/1999/xhtml",gr=!1;var Qt=Array.isArray,mr=Array.prototype.indexOf,Le=Array.prototype.includes,rt=Array.from,it=Object.keys,st=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,wr=Object.getOwnPropertyDescriptors,br=Object.prototype,yr=Array.prototype,en=Object.getPrototypeOf,tn=Object.isExtensible;const $r=()=>{};function Er(e){for(var t=0;t<e.length;t++)e[t]()}function nn(){var e,t,n=new Promise((r,i)=>{e=r,t=i});return{promise:n,resolve:e,reject:t}}const D=2,je=4,lt=8,rn=1<<24,ge=16,re=32,me=64,Et=128,X=512,I=1024,j=2048,fe=4096,G=8192,Z=16384,we=32768,sn=1<<25,He=65536,ln=1<<17,xr=1<<18,ke=1<<19,Tr=1<<20,ae=1<<25,Ae=65536,xt=1<<21,Tt=1<<22,be=1<<23,St=Symbol("$state"),Sr=Symbol("legacy props"),kr=Symbol(""),he=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ar=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),on=3,Ke=8;function Nr(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Cr(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Rr(e,t,n){throw new Error("https://svelte.dev/e/each_key_duplicate")}function Or(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function Ir(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function Mr(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Dr(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Pr(){throw new Error("https://svelte.dev/e/hydration_failed")}function Lr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Fr(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function jr(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function Hr(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function ot(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function zr(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let E=!1;function ie(e){E=e}let $;function se(e){if(e===null)throw ot(),Pe;return $=e}function ft(){return se(_e($))}function at(e){if(E){if(_e($)!==null)throw ot(),Pe;$=e}}function fn(e=1){if(E){for(var t=e,n=$;t--;)n=_e(n);$=n}}function ut(e=!0){for(var t=0,n=$;;){if(n.nodeType===Ke){var r=n.data;if(r===$t){if(t===0)return n;t-=1}else(r===Jt||r===yt||r[0]==="["&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=_e(n);e&&n.remove(),n=i}}function an(e){if(!e||e.nodeType!==Ke)throw ot(),Pe;return e.data}function un(e){return e===this.v}function Br(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function cn(e){return!Br(e,this.v)}let qr=!1,K=null;function ze(e){K=e}function hn(e,t=!1,n){K={p:K,i:!1,c:null,e:null,s:e,x:null,r:m,l:null}}function dn(e){var t=K,n=t.e;if(n!==null){t.e=null;for(var r of n)Fn(r)}return e!==void 0&&(t.x=e),t.i=!0,K=t.p,e??{}}function vn(){return!0}let Ne=[];function _n(){var e=Ne;Ne=[],Er(e)}function ye(e){if(Ne.length===0&&!Je){var t=Ne;queueMicrotask(()=>{t===Ne&&_n()})}Ne.push(e)}function Yr(){for(;Ne.length>0;)_n()}function pn(e){var t=m;if(t===null)return g.f|=be,e;if((t.f&we)===0&&(t.f&je)===0)throw e;$e(e,t)}function $e(e,t){for(;t!==null;){if((t.f&Et)!==0){if((t.f&we)===0)throw e;try{t.b.error(e);return}catch(n){e=n}}t=t.parent}throw e}const Vr=-7169;function R(e,t){e.f=e.f&Vr|t}function kt(e){(e.f&X)!==0||e.deps===null?R(e,I):R(e,fe)}function gn(e){if(e!==null)for(const t of e)(t.f&D)===0||(t.f&Ae)===0||(t.f^=Ae,gn(t.deps))}function mn(e,t,n){(e.f&j)!==0?t.add(e):(e.f&fe)!==0&&n.add(e),gn(e.deps),R(e,I)}const Ee=new Set;let S=null,le=null,At=null,Je=!1,Nt=!1,Be=null,ct=null;var wn=0;let Ur=1;class de{id=Ur++;current=new Map;previous=new Map;#e=new Set;#n=new Set;#t=new Map;#i=new Map;#s=null;#r=[];#l=new Set;#o=new Set;#f=new Map;is_fork=!1;#c=!1;#a=new Set;#h(){return this.is_fork||this.#i.size>0}#v(){for(const r of this.#a)for(const i of r.#i.keys()){for(var t=!1,n=i;n.parent!==null;){if(this.#f.has(n)){t=!0;break}n=n.parent}if(!t)return!0}return!1}skip_effect(t){this.#f.has(t)||this.#f.set(t,{d:[],m:[]})}unskip_effect(t){var n=this.#f.get(t);if(n){this.#f.delete(t);for(var r of n.d)R(r,j),this.schedule(r);for(r of n.m)R(r,fe),this.schedule(r)}}#d(){if(wn++>1e3&&(Ee.delete(this),Wr()),!this.#h()){for(const o of this.#l)this.#o.delete(o),R(o,j),this.schedule(o);for(const o of this.#o)R(o,fe),this.schedule(o)}const t=this.#r;this.#r=[],this.apply();var n=Be=[],r=[],i=ct=[];for(const o of t)try{this.#u(o,n,r)}catch(f){throw xn(o),f}if(S=null,i.length>0){var s=de.ensure();for(const o of i)s.schedule(o)}if(Be=null,ct=null,this.#h()||this.#v()){this.#_(r),this.#_(n);for(const[o,f]of this.#f)En(o,f)}else{this.#t.size===0&&Ee.delete(this),this.#l.clear(),this.#o.clear();for(const o of this.#e)o(this);this.#e.clear(),bn(r),bn(n),this.#s?.resolve()}var l=S;if(this.#r.length>0){const o=l??=this;o.#r.push(...this.#r.filter(f=>!o.#r.includes(f)))}l!==null&&(Ee.add(l),l.#d()),Ee.has(this)||this.#p()}#u(t,n,r){t.f^=I;for(var i=t.first;i!==null;){var s=i.f,l=(s&(re|me))!==0,o=l&&(s&I)!==0,f=o||(s&G)!==0||this.#f.has(i);if(!f&&i.fn!==null){l?i.f^=I:(s&je)!==0?n.push(i):Qe(i)&&((s&ge)!==0&&this.#o.add(i),Ve(i));var a=i.first;if(a!==null){i=a;continue}}for(;i!==null;){var u=i.next;if(u!==null){i=u;break}i=i.parent}}}#_(t){for(var n=0;n<t.length;n+=1)mn(t[n],this.#l,this.#o)}capture(t,n,r=!1){n!==L&&!this.previous.has(t)&&this.previous.set(t,n),(t.f&be)===0&&(this.current.set(t,[t.v,r]),le?.set(t,t.v))}activate(){S=this}deactivate(){S=null,le=null}flush(){try{Nt=!0,S=this,this.#d()}finally{wn=0,At=null,Be=null,ct=null,Nt=!1,S=null,le=null,xe.clear()}}discard(){for(const t of this.#n)t(this);this.#n.clear(),Ee.delete(this)}#p(){for(const a of Ee){var t=a.id<this.id,n=[];for(const[u,[d,c]]of this.current){if(a.current.has(u)){var r=a.current.get(u)[0];if(t&&d!==r)a.current.set(u,[d,c]);else continue}n.push(u)}var i=[...a.current.keys()].filter(u=>!this.current.has(u));if(i.length===0)t&&a.discard();else if(n.length>0){a.activate();var s=new Set,l=new Map;for(var o of n)yn(o,i,s,l);if(a.#r.length>0){a.apply();for(var f of a.#r)a.#u(f,[],[]);a.#r=[]}a.deactivate()}}for(const a of Ee)a.#a.has(this)&&(a.#a.delete(this),a.#a.size===0&&!a.#h()&&(a.activate(),a.#d()))}increment(t,n){let r=this.#t.get(n)??0;if(this.#t.set(n,r+1),t){let i=this.#i.get(n)??0;this.#i.set(n,i+1)}}decrement(t,n,r){let i=this.#t.get(n)??0;if(i===1?this.#t.delete(n):this.#t.set(n,i-1),t){let s=this.#i.get(n)??0;s===1?this.#i.delete(n):this.#i.set(n,s-1)}this.#c||r||(this.#c=!0,ye(()=>{this.#c=!1,this.flush()}))}transfer_effects(t,n){for(const r of t)this.#l.add(r);for(const r of n)this.#o.add(r);t.clear(),n.clear()}oncommit(t){this.#e.add(t)}ondiscard(t){this.#n.add(t)}settled(){return(this.#s??=nn()).promise}static ensure(){if(S===null){const t=S=new de;Nt||(Ee.add(S),Je||ye(()=>{S===t&&t.flush()}))}return S}apply(){{le=null;return}}schedule(t){if(At=t,t.b?.is_pending&&(t.f&(je|lt|rn))!==0&&(t.f&we)===0){t.b.defer_effect(t);return}for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(Be!==null&&n===m&&(g===null||(g.f&D)===0))return;if((r&(me|re))!==0){if((r&I)===0)return;n.f^=I}}this.#r.push(n)}}function Ct(e){var t=Je;Je=!0;try{for(var n;;){if(Yr(),S===null)return n;S.flush()}}finally{Je=t}}function Wr(){try{Dr()}catch(e){$e(e,At)}}let ve=null;function bn(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(Z|G))===0&&Qe(r)&&(ve=new Set,Ve(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&zn(r),ve?.size>0)){xe.clear();for(const i of ve){if((i.f&(Z|G))!==0)continue;const s=[i];let l=i.parent;for(;l!==null;)ve.has(l)&&(ve.delete(l),s.push(l)),l=l.parent;for(let o=s.length-1;o>=0;o--){const f=s[o];(f.f&(Z|G))===0&&Ve(f)}}ve.clear()}}ve=null}}function yn(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&D)!==0?yn(i,t,n,r):(s&(Tt|ge))!==0&&(s&j)===0&&$n(i,t,r)&&(R(i,j),Rt(i))}}function $n(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const i of e.deps){if(Le.call(t,i))return!0;if((i.f&D)!==0&&$n(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function Rt(e){S.schedule(e)}function En(e,t){if(!((e.f&re)!==0&&(e.f&I)!==0)){(e.f&j)!==0?t.d.push(e):(e.f&fe)!==0&&t.m.push(e),R(e,I);for(var n=e.first;n!==null;)En(n,t),n=n.next}}function xn(e){R(e,I);for(var t=e.first;t!==null;)xn(t),t=t.next}function Gr(e){let t=0,n=Ce(0),r;return()=>{jt()&&(p(n),jn(()=>(t===0&&(r=Qn(()=>e(()=>Xe(n)))),t+=1,()=>{ye(()=>{t-=1,t===0&&(r?.(),r=void 0,Xe(n))})})))}}var Kr=He|ke;function Jr(e,t,n,r){new Xr(e,t,n,r)}class Xr{parent;is_pending=!1;transform_error;#e;#n=E?$:null;#t;#i;#s;#r=null;#l=null;#o=null;#f=null;#c=0;#a=0;#h=!1;#v=new Set;#d=new Set;#u=null;#_=Gr(()=>(this.#u=Ce(this.#c),()=>{this.#u=null}));constructor(t,n,r,i){this.#e=t,this.#t=n,this.#i=s=>{var l=m;l.b=this,l.f|=Et,r(s)},this.parent=m.b,this.transform_error=i??this.parent?.transform_error??(s=>s),this.#s=Ht(()=>{if(E){const s=this.#n;ft();const l=s.data===yt;if(s.data.startsWith(Xt)){const f=JSON.parse(s.data.slice(Xt.length));this.#y(f)}else l?this.#$():this.#p()}else this.#w()},Kr),E&&(this.#e=$)}#p(){try{this.#r=Q(()=>this.#i(this.#e))}catch(t){this.error(t)}}#y(t){const n=this.#t.failed;n&&(this.#o=Q(()=>{n(this.#e,()=>t,()=>()=>{})}))}#$(){const t=this.#t.pending;t&&(this.is_pending=!0,this.#l=Q(()=>t(this.#e)),ye(()=>{var n=this.#f=document.createDocumentFragment(),r=ue();n.append(r),this.#r=this.#m(()=>Q(()=>this.#i(r))),this.#a===0&&(this.#e.before(n),this.#f=null,Oe(this.#l,()=>{this.#l=null}),this.#g(S))}))}#w(){try{if(this.is_pending=this.has_pending_snippet(),this.#a=0,this.#c=0,this.#r=Q(()=>{this.#i(this.#e)}),this.#a>0){var t=this.#f=document.createDocumentFragment();qt(this.#r,t);const n=this.#t.pending;this.#l=Q(()=>n(this.#e))}else this.#g(S)}catch(n){this.error(n)}}#g(t){this.is_pending=!1,t.transfer_effects(this.#v,this.#d)}defer_effect(t){mn(t,this.#v,this.#d)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#t.pending}#m(t){var n=m,r=g,i=K;ee(this.#s),q(this.#s),ze(this.#s.ctx);try{return de.ensure(),t()}catch(s){return pn(s),null}finally{ee(n),q(r),ze(i)}}#b(t,n){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(t,n);return}this.#a+=t,this.#a===0&&(this.#g(n),this.#l&&Oe(this.#l,()=>{this.#l=null}),this.#f&&(this.#e.before(this.#f),this.#f=null))}update_pending_count(t,n){this.#b(t,n),this.#c+=t,!(!this.#u||this.#h)&&(this.#h=!0,ye(()=>{this.#h=!1,this.#u&&qe(this.#u,this.#c)}))}get_effect_pending(){return this.#_(),p(this.#u)}error(t){var n=this.#t.onerror;let r=this.#t.failed;if(!n&&!r)throw t;this.#r&&(z(this.#r),this.#r=null),this.#l&&(z(this.#l),this.#l=null),this.#o&&(z(this.#o),this.#o=null),E&&(se(this.#n),fn(),se(ut()));var i=!1,s=!1;const l=()=>{if(i){zr();return}i=!0,s&&Hr(),this.#o!==null&&Oe(this.#o,()=>{this.#o=null}),this.#m(()=>{this.#w()})},o=f=>{try{s=!0,n?.(f,l),s=!1}catch(a){$e(a,this.#s&&this.#s.parent)}r&&(this.#o=this.#m(()=>{try{return Q(()=>{var a=m;a.b=this,a.f|=Et,r(this.#e,()=>f,()=>l)})}catch(a){return $e(a,this.#s.parent),null}}))};ye(()=>{var f;try{f=this.transform_error(t)}catch(a){$e(a,this.#s&&this.#s.parent);return}f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(o,a=>$e(a,this.#s&&this.#s.parent)):o(f)})}}function Zr(e,t,n,r){const i=dt;var s=e.filter(c=>!c.settled);if(n.length===0&&s.length===0){r(t.map(i));return}var l=m,o=Qr(),f=s.length===1?s[0].promise:s.length>1?Promise.all(s.map(c=>c.promise)):null;function a(c){o();try{r(c)}catch(_){(l.f&Z)===0&&$e(_,l)}ht()}if(n.length===0){f.then(()=>a(t.map(i)));return}var u=Tn();function d(){Promise.all(n.map(c=>ei(c))).then(c=>a([...t.map(i),...c])).catch(c=>$e(c,l)).finally(()=>u())}f?f.then(()=>{o(),d(),ht()}):d()}function Qr(){var e=m,t=g,n=K,r=S;return function(s=!0){ee(e),q(t),ze(n),s&&(e.f&Z)===0&&(r?.activate(),r?.apply())}}function ht(e=!0){ee(null),q(null),ze(null),e&&S?.deactivate()}function Tn(){var e=m,t=e.b,n=S,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),(i=!1)=>{t.update_pending_count(-1,n),n.decrement(r,e,i)}}function dt(e){var t=D|j,n=g!==null&&(g.f&D)!==0?g:null;return m!==null&&(m.f|=ke),{ctx:K,deps:null,effects:null,equals:un,f:t,fn:e,reactions:null,rv:0,v:L,wv:0,parent:n??m,ac:null}}function ei(e,t,n){let r=m;r===null&&Cr();var i=void 0,s=Ce(L),l=!g,o=new Map;return vi(()=>{var f=m,a=nn();i=a.promise;try{Promise.resolve(e()).then(a.resolve,a.reject).finally(ht)}catch(_){a.reject(_),ht()}var u=S;if(l){if((f.f&we)!==0)var d=Tn();if(r.b.is_rendered())o.get(u)?.reject(he),o.delete(u);else{for(const _ of o.values())_.reject(he);o.clear()}o.set(u,a)}const c=(_,v=void 0)=>{if(d){var w=v===he;d(w)}if(!(v===he||(f.f&Z)!==0)){if(u.activate(),v)s.f|=be,qe(s,v);else{(s.f&be)!==0&&(s.f^=be),qe(s,_);for(const[h,b]of o){if(o.delete(h),h===u)break;b.reject(he)}}u.deactivate()}};a.promise.then(c,_=>c(null,_||"unknown"))}),Pn(()=>{for(const f of o.values())f.reject(he)}),new Promise(f=>{function a(u){function d(){u===i?f(s):a(i)}u.then(d,d)}a(i)})}function ti(e){const t=dt(e);return Vn(t),t}function ni(e){const t=dt(e);return t.equals=cn,t}function ri(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)z(t[n])}}function ii(e){for(var t=e.parent;t!==null;){if((t.f&D)===0)return(t.f&Z)===0?t:null;t=t.parent}return null}function Ot(e){var t,n=m;ee(ii(e));try{e.f&=~Ae,ri(e),t=Jn(e)}finally{ee(n)}return t}function Sn(e){var t=e.v,n=Ot(e);if(!e.equals(n)&&(e.wv=Gn(),(!S?.is_fork||e.deps===null)&&(e.v=n,S?.capture(e,t,!0),e.deps===null))){R(e,I);return}Te||(le!==null?(jt()||S?.is_fork)&&le.set(e,n):kt(e))}function si(e){if(e.effects!==null)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(he),t.teardown=$r,t.ac=null,et(t,0),zt(t))}function kn(e){if(e.effects!==null)for(const t of e.effects)t.teardown&&Ve(t)}let It=new Set;const xe=new Map;let An=!1;function Ce(e,t){var n={f:0,v:e,reactions:null,equals:un,rv:0,wv:0};return n}function B(e,t){const n=Ce(e);return Vn(n),n}function Nn(e,t=!1,n=!0){const r=Ce(e);return t||(r.equals=cn),r}function H(e,t,n=!1){g!==null&&(!oe||(g.f&ln)!==0)&&vn()&&(g.f&(D|ge|Tt|ln))!==0&&(te===null||!Le.call(te,e))&&jr();let r=n?Ye(t):t;return qe(e,r,ct)}function qe(e,t,n=null){if(!e.equals(t)){var r=e.v;Te?xe.set(e,t):xe.set(e,r),e.v=t;var i=de.ensure();if(i.capture(e,r),(e.f&D)!==0){const s=e;(e.f&j)!==0&&Ot(s),le===null&&kt(s)}e.wv=Gn(),Cn(e,j,n),m!==null&&(m.f&I)!==0&&(m.f&(re|me))===0&&(ne===null?gi([e]):ne.push(e)),!i.is_fork&&It.size>0&&!An&&li()}return t}function li(){An=!1;for(const e of It)(e.f&I)!==0&&R(e,fe),Qe(e)&&Ve(e);It.clear()}function Xe(e){H(e,e.v+1)}function Cn(e,t,n){var r=e.reactions;if(r!==null)for(var i=r.length,s=0;s<i;s++){var l=r[s],o=l.f,f=(o&j)===0;if(f&&R(l,t),(o&D)!==0){var a=l;le?.delete(a),(o&Ae)===0&&(o&X&&(l.f|=Ae),Cn(a,fe,n))}else if(f){var u=l;(o&ge)!==0&&ve!==null&&ve.add(u),n!==null?n.push(u):Rt(u)}}}function Ye(e){if(typeof e!="object"||e===null||St in e)return e;const t=en(e);if(t!==br&&t!==yr)return e;var n=new Map,r=Qt(e),i=B(0),s=Me,l=o=>{if(Me===s)return o();var f=g,a=Me;q(null),Wn(s);var u=o();return q(f),Wn(a),u};return r&&n.set("length",B(e.length)),new Proxy(e,{defineProperty(o,f,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&Lr();var u=n.get(f);return u===void 0?l(()=>{var d=B(a.value);return n.set(f,d),d}):H(u,a.value,!0),!0},deleteProperty(o,f){var a=n.get(f);if(a===void 0){if(f in o){const u=l(()=>B(L));n.set(f,u),Xe(i)}}else H(a,L),Xe(i);return!0},get(o,f,a){if(f===St)return e;var u=n.get(f),d=f in o;if(u===void 0&&(!d||Fe(o,f)?.writable)&&(u=l(()=>{var _=Ye(d?o[f]:L),v=B(_);return v}),n.set(f,u)),u!==void 0){var c=p(u);return c===L?void 0:c}return Reflect.get(o,f,a)},getOwnPropertyDescriptor(o,f){var a=Reflect.getOwnPropertyDescriptor(o,f);if(a&&"value"in a){var u=n.get(f);u&&(a.value=p(u))}else if(a===void 0){var d=n.get(f),c=d?.v;if(d!==void 0&&c!==L)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return a},has(o,f){if(f===St)return!0;var a=n.get(f),u=a!==void 0&&a.v!==L||Reflect.has(o,f);if(a!==void 0||m!==null&&(!u||Fe(o,f)?.writable)){a===void 0&&(a=l(()=>{var c=u?Ye(o[f]):L,_=B(c);return _}),n.set(f,a));var d=p(a);if(d===L)return!1}return u},set(o,f,a,u){var d=n.get(f),c=f in o;if(r&&f==="length")for(var _=a;_<d.v;_+=1){var v=n.get(_+"");v!==void 0?H(v,L):_ in o&&(v=l(()=>B(L)),n.set(_+"",v))}if(d===void 0)(!c||Fe(o,f)?.writable)&&(d=l(()=>B(void 0)),H(d,Ye(a)),n.set(f,d));else{c=d.v!==L;var w=l(()=>Ye(a));H(d,w)}var h=Reflect.getOwnPropertyDescriptor(o,f);if(h?.set&&h.set.call(u,a),!c){if(r&&typeof f=="string"){var b=n.get("length"),M=Number(f);Number.isInteger(M)&&M>=b.v&&H(b,M+1)}Xe(i)}return!0},ownKeys(o){p(i);var f=Reflect.ownKeys(o).filter(d=>{var c=n.get(d);return c===void 0||c.v!==L});for(var[a,u]of n)u.v!==L&&!(a in o)&&f.push(a);return f},setPrototypeOf(){Fr()}})}var Mt,Rn,On,In;function Dt(){if(Mt===void 0){Mt=window,Rn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;On=Fe(t,"firstChild").get,In=Fe(t,"nextSibling").get,tn(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),tn(n)&&(n.__t=void 0)}}function ue(e=""){return document.createTextNode(e)}function Re(e){return On.call(e)}function _e(e){return In.call(e)}function Pt(e,t){if(!E)return Re(e);var n=Re($);return n===null&&(n=$.appendChild(ue())),se(n),n}function oi(e,t=!1){if(!E){var n=Re(e);return n instanceof Comment&&n.data===""?_e(n):n}if(t){if($?.nodeType!==on){var r=ue();return $?.before(r),se(r),r}fi($)}return $}function Mn(e){e.textContent=""}function Dn(){return!1}function Lt(e,t,n){return document.createElementNS(Zt,e,void 0)}function fi(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===on;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Ft(e){var t=g,n=m;q(null),ee(null);try{return e()}finally{q(t),ee(n)}}function ai(e){m===null&&(g===null&&Mr(),Ir()),Te&&Or()}function ui(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function ce(e,t){var n=m;n!==null&&(n.f&G)!==0&&(e|=G);var r={ctx:K,deps:null,nodes:null,f:e|j|X,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null},i=r;if((e&je)!==0)Be!==null?Be.push(r):de.ensure().schedule(r);else if(t!==null){try{Ve(r)}catch(l){throw z(r),l}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&(i.f&ke)===0&&(i=i.first,(e&ge)!==0&&(e&He)!==0&&i!==null&&(i.f|=He))}if(i!==null&&(i.parent=n,n!==null&&ui(i,n),g!==null&&(g.f&D)!==0&&(e&me)===0)){var s=g;(s.effects??=[]).push(i)}return r}function jt(){return g!==null&&!oe}function Pn(e){const t=ce(lt,null);return R(t,I),t.teardown=e,t}function Ln(e){ai();var t=m.f,n=!g&&(t&re)!==0&&(t&we)===0;if(n){var r=K;(r.e??=[]).push(e)}else return Fn(e)}function Fn(e){return ce(je|Tr,e)}function ci(e){de.ensure();const t=ce(me|ke,e);return()=>{z(t)}}function hi(e){de.ensure();const t=ce(me|ke,e);return(n={})=>new Promise(r=>{n.outro?Oe(t,()=>{z(t),r(void 0)}):(z(t),r(void 0))})}function di(e){return ce(je,e)}function vi(e){return ce(Tt|ke,e)}function jn(e,t=0){return ce(lt|t,e)}function Ze(e,t=[],n=[],r=[]){Zr(r,t,n,i=>{ce(lt,()=>e(...i.map(p)))})}function Ht(e,t=0){var n=ce(ge|t,e);return n}function Q(e){return ce(re|ke,e)}function Hn(e){var t=e.teardown;if(t!==null){const n=Te,r=g;Yn(!0),q(null);try{t.call(null)}finally{Yn(n),q(r)}}}function zt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const i=n.ac;i!==null&&Ft(()=>{i.abort(he)});var r=n.next;(n.f&me)!==0?n.parent=null:z(n,t),n=r}}function _i(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&re)===0&&z(t),t=n}}function z(e,t=!0){var n=!1;(t||(e.f&xr)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(pi(e.nodes.start,e.nodes.end),n=!0),R(e,sn),zt(e,t&&!n),et(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(const s of r)s.stop();Hn(e),e.f^=sn,e.f|=Z;var i=e.parent;i!==null&&i.first!==null&&zn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function pi(e,t){for(;e!==null;){var n=e===t?null:_e(e);e.remove(),e=n}}function zn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Oe(e,t,n=!0){var r=[];Bn(e,r,!0);var i=()=>{n&&z(e),t&&t()},s=r.length;if(s>0){var l=()=>--s||i();for(var o of r)o.out(l)}else i()}function Bn(e,t,n){if((e.f&G)===0){e.f^=G;var r=e.nodes&&e.nodes.t;if(r!==null)for(const o of r)(o.is_global||n)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next,l=(i.f&He)!==0||(i.f&re)!==0&&(e.f&ge)!==0;Bn(i,t,l?n:!1),i=s}}}function Bt(e){qn(e,!0)}function qn(e,t){if((e.f&G)!==0){e.f^=G,(e.f&I)===0&&(R(e,j),de.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&He)!==0||(n.f&re)!==0;qn(n,i?t:!1),n=r}var s=e.nodes&&e.nodes.t;if(s!==null)for(const l of s)(l.is_global||t)&&l.in()}}function qt(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:_e(n);t.append(n),n=i}}let vt=!1,Te=!1;function Yn(e){Te=e}let g=null,oe=!1;function q(e){g=e}let m=null;function ee(e){m=e}let te=null;function Vn(e){g!==null&&(te===null?te=[e]:te.push(e))}let Y=null,J=0,ne=null;function gi(e){ne=e}let Un=1,Ie=0,Me=Ie;function Wn(e){Me=e}function Gn(){return++Un}function Qe(e){var t=e.f;if((t&j)!==0)return!0;if(t&D&&(e.f&=~Ae),(t&fe)!==0){for(var n=e.deps,r=n.length,i=0;i<r;i++){var s=n[i];if(Qe(s)&&Sn(s),s.wv>e.wv)return!0}(t&X)!==0&&le===null&&R(e,I)}return!1}function Kn(e,t,n=!0){var r=e.reactions;if(r!==null&&!(te!==null&&Le.call(te,e)))for(var i=0;i<r.length;i++){var s=r[i];(s.f&D)!==0?Kn(s,t,!1):t===s&&(n?R(s,j):(s.f&I)!==0&&R(s,fe),Rt(s))}}function Jn(e){var t=Y,n=J,r=ne,i=g,s=te,l=K,o=oe,f=Me,a=e.f;Y=null,J=0,ne=null,g=(a&(re|me))===0?e:null,te=null,ze(e.ctx),oe=!1,Me=++Ie,e.ac!==null&&(Ft(()=>{e.ac.abort(he)}),e.ac=null);try{e.f|=xt;var u=e.fn,d=u();e.f|=we;var c=e.deps,_=S?.is_fork;if(Y!==null){var v;if(_||et(e,J),c!==null&&J>0)for(c.length=J+Y.length,v=0;v<Y.length;v++)c[J+v]=Y[v];else e.deps=c=Y;if(jt()&&(e.f&X)!==0)for(v=J;v<c.length;v++)(c[v].reactions??=[]).push(e)}else!_&&c!==null&&J<c.length&&(et(e,J),c.length=J);if(vn()&&ne!==null&&!oe&&c!==null&&(e.f&(D|fe|j))===0)for(v=0;v<ne.length;v++)Kn(ne[v],e);if(i!==null&&i!==e){if(Ie++,i.deps!==null)for(let w=0;w<n;w+=1)i.deps[w].rv=Ie;if(t!==null)for(const w of t)w.rv=Ie;ne!==null&&(r===null?r=ne:r.push(...ne))}return(e.f&be)!==0&&(e.f^=be),d}catch(w){return pn(w)}finally{e.f^=xt,Y=t,J=n,ne=r,g=i,te=s,ze(l),oe=o,Me=f}}function mi(e,t){let n=t.reactions;if(n!==null){var r=mr.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&(t.f&D)!==0&&(Y===null||!Le.call(Y,t))){var s=t;(s.f&X)!==0&&(s.f^=X,s.f&=~Ae),kt(s),si(s),et(s,0)}}function et(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)mi(e,n[r])}function Ve(e){var t=e.f;if((t&Z)===0){R(e,I);var n=m,r=vt;m=e,vt=!0;try{(t&(ge|rn))!==0?_i(e):zt(e),Hn(e);var i=Jn(e);e.teardown=typeof i=="function"?i:null,e.wv=Un;var s;gr&&qr&&(e.f&j)!==0&&e.deps}finally{vt=r,m=n}}}function p(e){var t=e.f,n=(t&D)!==0;if(g!==null&&!oe){var r=m!==null&&(m.f&Z)!==0;if(!r&&(te===null||!Le.call(te,e))){var i=g.deps;if((g.f&xt)!==0)e.rv<Ie&&(e.rv=Ie,Y===null&&i!==null&&i[J]===e?J++:Y===null?Y=[e]:Y.push(e));else{(g.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[g]:Le.call(s,g)||s.push(g)}}}if(Te&&xe.has(e))return xe.get(e);if(n){var l=e;if(Te){var o=l.v;return((l.f&I)===0&&l.reactions!==null||Zn(l))&&(o=Ot(l)),xe.set(l,o),o}var f=(l.f&X)===0&&!oe&&g!==null&&(vt||(g.f&X)!==0),a=(l.f&we)===0;Qe(l)&&(f&&(l.f|=X),Sn(l)),f&&!a&&(kn(l),Xn(l))}if(le?.has(e))return le.get(e);if((e.f&be)!==0)throw e.v;return e.v}function Xn(e){if(e.f|=X,e.deps!==null)for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&D)!==0&&(t.f&X)===0&&(kn(t),Xn(t))}function Zn(e){if(e.v===L)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(xe.has(t)||(t.f&D)!==0&&Zn(t))return!0;return!1}function Qn(e){var t=oe;try{return oe=!0,e()}finally{oe=t}}const _t=Symbol("events"),wi=new Set,er=new Set;function bi(e){if(!E)return;e.removeAttribute("onload"),e.removeAttribute("onerror");const t=e.__e;t!==void 0&&(e.__e=void 0,queueMicrotask(()=>{e.isConnected&&e.dispatchEvent(t)}))}function yi(e,t,n,r={}){function i(s){if(r.capture||Yt.call(t,s),!s.cancelBubble)return Ft(()=>n?.call(this,s))}return e.startsWith("pointer")||e.startsWith("touch")||e==="wheel"?ye(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function pt(e,t,n,r,i){var s={capture:r,passive:i},l=yi(e,t,n,s);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Pn(()=>{t.removeEventListener(e,l,s)})}let tr=null;function Yt(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;tr=e;var l=0,o=tr===e&&e[_t];if(o){var f=i.indexOf(o);if(f!==-1&&(t===document||t===window)){e[_t]=t;return}var a=i.indexOf(t);if(a===-1)return;f<=a&&(l=f)}if(s=i[l]||e.target,s!==t){st(e,"currentTarget",{configurable:!0,get(){return s||n}});var u=g,d=m;q(null),ee(null);try{for(var c,_=[];s!==null;){var v=s.assignedSlot||s.parentNode||s.host||null;try{var w=s[_t]?.[r];w!=null&&(!s.disabled||e.target===s)&&w.call(s,e)}catch(h){c?_.push(h):c=h}if(e.cancelBubble||v===t||v===null)break;s=v}if(c){for(let h of _)queueMicrotask(()=>{throw h});throw c}}finally{e[_t]=t,delete e.currentTarget,q(u),ee(d)}}}const $i=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Ei(e){return $i?.createHTML(e)??e}function xi(e){var t=Lt("template");return t.innerHTML=Ei(e.replaceAll("<!>","<!---->")),t.content}function Ue(e,t){var n=m;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function De(e,t){var n=(t&_r)!==0,r=(t&pr)!==0,i,s=!e.startsWith("<!>");return()=>{if(E)return Ue($,null),$;i===void 0&&(i=xi(s?e:"<!>"+e),n||(i=Re(i)));var l=r||Rn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=Re(l),f=l.lastChild;Ue(o,f)}else Ue(l,l);return l}}function Ti(){if(E)return Ue($,null),$;var e=document.createDocumentFragment(),t=document.createComment(""),n=ue();return e.append(t,n),Ue(t,n),e}function pe(e,t){if(E){var n=m;((n.f&we)===0||n.nodes.end===null)&&(n.nodes.end=$),ft();return}e!==null&&e.before(t)}const Si=["touchstart","touchmove"];function ki(e){return Si.includes(e)}function nr(e,t){return rr(e,t)}function Ai(e,t){Dt(),t.intro=t.intro??!1;const n=t.target,r=E,i=$;try{for(var s=Re(n);s&&(s.nodeType!==Ke||s.data!==Jt);)s=_e(s);if(!s)throw Pe;ie(!0),se(s);const l=rr(e,{...t,anchor:s});return ie(!1),l}catch(l){if(l instanceof Error&&l.message.split(`
2
+ `).some(o=>o.startsWith("https://svelte.dev/e/")))throw l;return l!==Pe&&console.warn("Failed to hydrate: ",l),t.recover===!1&&Pr(),Dt(),Mn(n),ie(!1),nr(e,t)}finally{ie(r),se(i)}}const gt=new Map;function rr(e,{target:t,anchor:n,props:r={},events:i,context:s,intro:l=!0,transformError:o}){Dt();var f=void 0,a=hi(()=>{var u=n??t.appendChild(ue());Jr(u,{pending:()=>{}},_=>{hn({});var v=K;if(s&&(v.c=s),i&&(r.$$events=i),E&&Ue(_,null),f=e(_,r)||{},E&&(m.nodes.end=$,$===null||$.nodeType!==Ke||$.data!==$t))throw ot(),Pe;dn()},o);var d=new Set,c=_=>{for(var v=0;v<_.length;v++){var w=_[v];if(!d.has(w)){d.add(w);var h=ki(w);for(const k of[t,document]){var b=gt.get(k);b===void 0&&(b=new Map,gt.set(k,b));var M=b.get(w);M===void 0?(k.addEventListener(w,Yt,{passive:h}),b.set(w,1)):b.set(w,M+1)}}}};return c(rt(wi)),er.add(c),()=>{for(var _ of d)for(const h of[t,document]){var v=gt.get(h),w=v.get(_);--w==0?(h.removeEventListener(_,Yt),v.delete(_),v.size===0&&gt.delete(h)):v.set(_,w)}er.delete(c),u!==n&&u.parentNode?.removeChild(u)}});return Vt.set(f,a),f}let Vt=new WeakMap;function Ni(e,t){const n=Vt.get(e);return n?(Vt.delete(e),n(t)):Promise.resolve()}class Ci{anchor;#e=new Map;#n=new Map;#t=new Map;#i=new Set;#s=!0;constructor(t,n=!0){this.anchor=t,this.#s=n}#r=t=>{if(this.#e.has(t)){var n=this.#e.get(t),r=this.#n.get(n);if(r)Bt(r),this.#i.delete(n);else{var i=this.#t.get(n);i&&(this.#n.set(n,i.effect),this.#t.delete(n),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),r=i.effect)}for(const[s,l]of this.#e){if(this.#e.delete(s),s===t)break;const o=this.#t.get(l);o&&(z(o.effect),this.#t.delete(l))}for(const[s,l]of this.#n){if(s===n||this.#i.has(s))continue;const o=()=>{if(Array.from(this.#e.values()).includes(s)){var a=document.createDocumentFragment();qt(l,a),a.append(ue()),this.#t.set(s,{effect:l,fragment:a})}else z(l);this.#i.delete(s),this.#n.delete(s)};this.#s||!r?(this.#i.add(s),Oe(l,o,!1)):o()}}};#l=t=>{this.#e.delete(t);const n=Array.from(this.#e.values());for(const[r,i]of this.#t)n.includes(r)||(z(i.effect),this.#t.delete(r))};ensure(t,n){var r=S,i=Dn();if(n&&!this.#n.has(t)&&!this.#t.has(t))if(i){var s=document.createDocumentFragment(),l=ue();s.append(l),this.#t.set(t,{effect:Q(()=>n(l)),fragment:s})}else this.#n.set(t,Q(()=>n(this.anchor)));if(this.#e.set(r,t),i){for(const[o,f]of this.#n)o===t?r.unskip_effect(f):r.skip_effect(f);for(const[o,f]of this.#t)o===t?r.unskip_effect(f.effect):r.skip_effect(f.effect);r.oncommit(this.#r),r.ondiscard(this.#l)}else E&&(this.anchor=$),this.#r(r)}}function Ri(e){K===null&&Nr(),Ln(()=>{const t=Qn(e);if(typeof t=="function")return t})}function ir(e,t,n=!1){var r;E&&(r=$,ft());var i=new Ci(e),s=n?He:0;function l(o,f){if(E){var a=an(r);if(o!==parseInt(a.substring(1))){var u=ut();se(u),i.anchor=u,ie(!1),i.ensure(o,f),ie(!0);return}}i.ensure(o,f)}Ht(()=>{var o=!1;t((f,a=0)=>{o=!0,l(a,f)}),o||l(-1,null)},s)}function Oi(e,t,n){for(var r=[],i=t.length,s,l=t.length,o=0;o<i;o++){let d=t[o];Oe(d,()=>{if(s){if(s.pending.delete(d),s.done.add(d),s.pending.size===0){var c=e.outrogroups;Ut(e,rt(s.done)),c.delete(s),c.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var f=r.length===0&&n!==null;if(f){var a=n,u=a.parentNode;Mn(u),u.append(a),e.items.clear()}Ut(e,t,!f)}else s={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(s)}function Ut(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const l of e.pending.values())for(const o of l)r.add(e.items.get(o).e)}for(var i=0;i<t.length;i++){var s=t[i];if(r?.has(s)){s.f|=ae;const l=document.createDocumentFragment();qt(s,l)}else z(t[i],n)}}var sr;function lr(e,t,n,r,i,s=null){var l=e,o=new Map,f=(t&Kt)!==0;if(f){var a=e;l=E?se(Re(a)):a.appendChild(ue())}E&&ft();var u=null,d=ni(()=>{var k=n();return Qt(k)?k:k==null?[]:rt(k)}),c,_=new Map,v=!0;function w(k){(M.effect.f&Z)===0&&(M.pending.delete(k),M.fallback=u,Ii(M,c,l,t,r),u!==null&&(c.length===0?(u.f&ae)===0?Bt(u):(u.f^=ae,nt(u,null,l)):Oe(u,()=>{u=null})))}function h(k){M.pending.delete(k)}var b=Ht(()=>{c=p(d);var k=c.length;let V=!1;if(E){var Ge=an(l)===yt;Ge!==(k===0)&&(l=ut(),se(l),ie(!1),V=!0)}for(var y=new Set,x=S,P=Dn(),O=0;O<k;O+=1){E&&$.nodeType===Ke&&$.data===$t&&(l=$,V=!0,ie(!1));var N=c[O],T=r(N,O),A=v?null:o.get(T);A?(A.v&&qe(A.v,N),A.i&&qe(A.i,O),P&&x.unskip_effect(A.e)):(A=Mi(o,v?l:sr??=ue(),N,T,O,i,t,n),v||(A.e.f|=ae),o.set(T,A)),y.add(T)}if(k===0&&s&&!u&&(v?u=Q(()=>s(l)):(u=Q(()=>s(sr??=ue())),u.f|=ae)),k>y.size&&Rr(),E&&k>0&&se(ut()),!v)if(_.set(x,y),P){for(const[C,U]of o)y.has(C)||x.skip_effect(U.e);x.oncommit(w),x.ondiscard(h)}else w(x);V&&ie(!0),p(d)}),M={effect:b,items:o,pending:_,outrogroups:null,fallback:u};v=!1,E&&(l=$)}function tt(e){for(;e!==null&&(e.f&re)===0;)e=e.next;return e}function Ii(e,t,n,r,i){var s=(r&dr)!==0,l=t.length,o=e.items,f=tt(e.effect.first),a,u=null,d,c=[],_=[],v,w,h,b;if(s)for(b=0;b<l;b+=1)v=t[b],w=i(v,b),h=o.get(w).e,(h.f&ae)===0&&(h.nodes?.a?.measure(),(d??=new Set).add(h));for(b=0;b<l;b+=1){if(v=t[b],w=i(v,b),h=o.get(w).e,e.outrogroups!==null)for(const N of e.outrogroups)N.pending.delete(h),N.done.delete(h);if((h.f&G)!==0&&(Bt(h),s&&(h.nodes?.a?.unfix(),(d??=new Set).delete(h))),(h.f&ae)!==0)if(h.f^=ae,h===f)nt(h,null,n);else{var M=u?u.next:f;h===e.effect.last&&(e.effect.last=h.prev),h.prev&&(h.prev.next=h.next),h.next&&(h.next.prev=h.prev),Se(e,u,h),Se(e,h,M),nt(h,M,n),u=h,c=[],_=[],f=tt(u.next);continue}if(h!==f){if(a!==void 0&&a.has(h)){if(c.length<_.length){var k=_[0],V;u=k.prev;var Ge=c[0],y=c[c.length-1];for(V=0;V<c.length;V+=1)nt(c[V],k,n);for(V=0;V<_.length;V+=1)a.delete(_[V]);Se(e,Ge.prev,y.next),Se(e,u,Ge),Se(e,y,k),f=k,u=y,b-=1,c=[],_=[]}else a.delete(h),nt(h,f,n),Se(e,h.prev,h.next),Se(e,h,u===null?e.effect.first:u.next),Se(e,u,h),u=h;continue}for(c=[],_=[];f!==null&&f!==h;)(a??=new Set).add(f),_.push(f),f=tt(f.next);if(f===null)continue}(h.f&ae)===0&&c.push(h),u=h,f=tt(h.next)}if(e.outrogroups!==null){for(const N of e.outrogroups)N.pending.size===0&&(Ut(e,rt(N.done)),e.outrogroups?.delete(N));e.outrogroups.size===0&&(e.outrogroups=null)}if(f!==null||a!==void 0){var x=[];if(a!==void 0)for(h of a)(h.f&G)===0&&x.push(h);for(;f!==null;)(f.f&G)===0&&f!==e.fallback&&x.push(f),f=tt(f.next);var P=x.length;if(P>0){var O=(r&Kt)!==0&&l===0?n:null;if(s){for(b=0;b<P;b+=1)x[b].nodes?.a?.measure();for(b=0;b<P;b+=1)x[b].nodes?.a?.fix()}Oi(e,x,O)}}s&&ye(()=>{if(d!==void 0)for(h of d)h.nodes?.a?.apply()})}function Mi(e,t,n,r,i,s,l,o){var f=(l&cr)!==0?(l&vr)===0?Nn(n,!1,!1):Ce(n):null,a=(l&hr)!==0?Ce(i):null;return{v:f,i:a,e:Q(()=>(s(t,f??n,a??i,o),()=>{e.delete(r)}))}}function nt(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,s=t&&(t.f&ae)===0?t.nodes.start:n;r!==null;){var l=_e(r);if(s.before(r),r===i)return;r=l}}function Se(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Di(e,t){di(()=>{var n=e.getRootNode(),r=n.host?n:n.head??n.ownerDocument.head;if(!r.querySelector("#"+t.hash)){const i=Lt("style");i.id=t.hash,i.textContent=t.code,r.appendChild(i)}})}const Pi=Symbol("is custom element"),Li=Symbol("is html"),Fi=Ar?"link":"LINK";function We(e,t,n,r){var i=ji(e);E&&(i[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName===Fi)||i[t]!==(i[t]=n)&&(t==="loading"&&(e[kr]=n),n==null?e.removeAttribute(t):typeof n!="string"&&or(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function mt(e,t,n){var r=g,i=m;let s=E;E&&ie(!1),q(null),ee(null);try{t!=="style"&&(Wt.has(e.getAttribute("is")||e.nodeName)||!customElements||customElements.get(e.getAttribute("is")||e.nodeName.toLowerCase())?or(e).includes(t):n&&typeof n=="object")?e[t]=n:We(e,t,n==null?n:String(n))}finally{q(r),ee(i),s&&ie(!0)}}function ji(e){return e.__attributes??={[Pi]:e.nodeName.includes("-"),[Li]:e.namespaceURI===Zt}}var Wt=new Map;function or(e){var t=e.getAttribute("is")||e.nodeName,n=Wt.get(t);if(n)return n;Wt.set(t,n=[]);for(var r,i=e,s=Element.prototype;s!==i;){r=wr(i);for(var l in r)r[l].set&&n.push(l);i=en(i)}return n}function fr(e,t,n,r){var i=r,s=!0,l=()=>(s&&(s=!1,i=r),i),o;o=e[t],o===void 0&&r!==void 0&&(o=l());var f;f=()=>{var c=e[t];return c===void 0?l():(s=!0,c)};var a=!1,u=dt(()=>(a=!1,f())),d=m;return(function(c,_){if(arguments.length>0){const v=_?p(u):c;return H(u,v),a=!0,i!==void 0&&(i=v),c}return Te&&a||(d.f&Z)!==0?u.v:p(u)})}function Hi(e){return new zi(e)}class zi{#e;#n;constructor(t){var n=new Map,r=(s,l)=>{var o=Nn(l,!1,!1);return n.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,l){return p(n.get(l)??r(l,Reflect.get(s,l)))},has(s,l){return l===Sr?!0:(p(n.get(l)??r(l,Reflect.get(s,l))),Reflect.has(s,l))},set(s,l,o){return H(n.get(l)??r(l,o),o),Reflect.set(s,l,o)}});this.#n=(t.hydrate?Ai:nr)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&Ct(),this.#e=i.$$events;for(const s of Object.keys(this.#n))s==="$set"||s==="$destroy"||s==="$on"||st(this,s,{get(){return this.#n[s]},set(l){this.#n[s]=l},enumerable:!0});this.#n.$set=s=>{Object.assign(i,s)},this.#n.$destroy=()=>{Ni(this.#n)}}$set(t){this.#n.$set(t)}$on(t,n){this.#e[t]=this.#e[t]||[];const r=(...i)=>n.call(this,...i);return this.#e[t].push(r),()=>{this.#e[t]=this.#e[t].filter(i=>i!==r)}}$destroy(){this.#n.$destroy()}}let ar;typeof HTMLElement=="function"&&(ar=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;$$shadowRoot=null;constructor(e,t,n){super(),this.$$ctor=e,this.$$s=t,n&&(this.$$shadowRoot=this.attachShadow(n))}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const r=this.$$c.$on(e,t);this.$$l_u.set(t,r)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const r=this.$$l_u.get(t);r&&(r(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(r){return i=>{const s=Lt("slot");r!=="default"&&(s.name=r),pe(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=Bi(this);for(const r of this.$$s)r in n&&(r==="default"&&!this.$$d.children?(this.$$d.children=e(r),t.default=!0):t[r]=e(r));for(const r of this.attributes){const i=this.$$g_p(r.name);i in this.$$d||(this.$$d[i]=wt(i,r.value,this.$$p_d,"toProp"))}for(const r in this.$$p_d)!(r in this.$$d)&&this[r]!==void 0&&(this.$$d[r]=this[r],delete this[r]);this.$$c=Hi({component:this.$$ctor,target:this.$$shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=ci(()=>{jn(()=>{this.$$r=!0;for(const r of it(this.$$c)){if(!this.$$p_d[r]?.reflect)continue;this.$$d[r]=this.$$c[r];const i=wt(r,this.$$d[r],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[r].attribute||r):this.setAttribute(this.$$p_d[r].attribute||r,i)}this.$$r=!1})});for(const r in this.$$l)for(const i of this.$$l[r]){const s=this.$$c.$on(r,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,n){this.$$r||(e=this.$$g_p(e),this.$$d[e]=wt(e,n,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return it(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function wt(e,t,n,r){const i=n[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!r||!n[e])return t;if(r==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Bi(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}function qi(e,t,n,r,i,s){let l=class extends ar{constructor(){super(e,n,i),this.$$p_d=t}static get observedAttributes(){return it(t).map(o=>(t[o].attribute||o).toLowerCase())}};return it(t).forEach(o=>{st(l.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(f){f=wt(o,f,t),this.$$d[o]=f;var a=this.$$c;if(a){var u=Fe(a,o)?.get;u?a[o]=f:a.$set({[o]:f})}}})}),r.forEach(o=>{st(l.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=l,l}const Yi={version:"0.66.4"};function Vi(e,t=100,n={}){if(typeof e!="function")throw new TypeError(`Expected the first parameter to be a function, got \`${typeof e}\`.`);if(t<0)throw new RangeError("`wait` must not be negative.");if(typeof n=="boolean")throw new TypeError("The `options` parameter must be an object, not a boolean. Use `{immediate: true}` instead.");const{immediate:r}=n;let i,s,l,o,f;function a(){const c=i,_=s;return i=void 0,s=void 0,f=e.apply(c,_),f}function u(){const c=Date.now()-o;c<t&&c>=0?l=setTimeout(u,t-c):(l=void 0,r||(f=a()))}const d=function(...c){if(i&&this!==i&&Object.getPrototypeOf(this)===Object.getPrototypeOf(i))throw new Error("Debounced method called with different contexts of the same prototype.");i=this,s=c,o=Date.now();const _=r&&!l;if(l||(l=setTimeout(u,t)),_)return f=a(),f};return Object.defineProperty(d,"isPending",{get(){return l!==void 0}}),d.clear=()=>{l&&(clearTimeout(l),l=void 0,i=void 0,s=void 0)},d.flush=()=>{l&&d.trigger()},d.trigger=()=>{f=a(),d.clear()},d}function Ui(e){const t=e?.repoName.split("/")?.[1]||e?.repoName;if(!t)throw new Error("wrong componentPath "+e?.repoName);if(!e?.version)throw new Error("wrong version "+e?.version);const n=e?.iifePath||"main.iife.js";if(!document.getElementById(t+"-script"))try{const r=document.createElement("script");if(r.id=t+"-script",r.src=`https://cdn.jsdelivr.net/npm/${e.repoName}@${e.version}/${n}`,e?.local)r.src=`${e.local}`;else if(location.href.includes("localhost:6006")){const i=t.split("-")[0];r.src=`http://localhost:6006/webcomponents/${t.replace(i+"-","")}/${n}`}document.head.appendChild(r)}catch(r){console.warn(r)}}var Wi=De('<iframe class="svelte-1f6x0x7"></iframe>'),Gi=De("<hb-player-live></hb-player-live>",2),Ki=De("<hb-player-live-camera-ptz></hb-player-live-camera-ptz>",2),Ji=De('<video controls=""><source type="video/mp4"/> <track kind="captions" src="" srclang="en" label="English"/> Your browser does not support the video tag.</video>',2),Xi=De('<div class="col svelte-1f6x0x7" style="padding-right:0px;padding-left:0px;--bs-gutter-x: 0px;"><!></div>'),Zi=De('<div class="row svelte-1f6x0x7"></div>'),Qi=De('<div id="matrix" class="svelte-1f6x0x7"><!></div>');const es={hash:"svelte-1f6x0x7",code:`@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");:host {font-family:"Roboto", sans-serif;width:100%;display:block;background-color:black;}#matrix.svelte-1f6x0x7 {display:grid;gap:5px;
3
3
  /* Play with min-value */overflow:hidden;}.col.svelte-1f6x0x7 {margin:5px;}.row.svelte-1f6x0x7 {margin-top:5px !important;margin-left:5px !important;margin-right:5px !important;}iframe.svelte-1f6x0x7 {border:none;width:100%;height:100%;margin:0px;padding:0px;}
4
4
  /*!
5
5
  * Bootstrap v5.1.2 (https://getbootstrap.com/)
@@ -16,5 +16,5 @@
16
16
  @media (min-width: 1200px) {
17
17
  }
18
18
  @media (min-width: 1400px) {
19
- }`};function dr(e,t){hn(t,!0),Pi(e,rs);function n(y,x){t.$$host.dispatchEvent(new CustomEvent(y,{detail:x}))}const r=t.$$host;let i=ar(t,"id",7,""),s=ar(t,"items"),l=B(0),o=B(0),f=B(0),a=B(0),u=B(void 0),d=B(Ve([]));function c(){if(p(o)&&p(l)){const y=1.7777777777777777,x=p(o)/p(l);let L=0,O=0;if(s().length===1)L=1,O=1;else if(p(o)<450)O=1,L=s().length;else if(s().length===2)x>y?(L=1,O=2):(L=2,O=1);else if(x>y){let C=1/0;for(let T=1;T<=s().length;T++){const S=Math.ceil(s().length/T),N=p(l)/T*y*S;if(N<=p(o)){const W=p(o)-N;W<C&&(C=W,L=T,O=S)}}}else{let C=1/0;for(let T=1;T<=s().length;T++){const S=Math.ceil(s().length/T),N=p(o)/T/y*S;if(N<=p(l)){const W=p(l)-N;W<C&&(C=W,O=T,L=S)}}}if(H(f,L,!0),H(a,O,!0),p(f)&&p(a)){const C=[];for(let T=0;T<p(f);T++)for(let S=0;S<p(a);S++){const N=s()[T*p(a)+S];N&&(C[T]||(C[T]={row:T,items:[]}),C[T].items[S]=N)}H(d,C,!0),console.log(p(d),p(f),p(a),"drawItems")}}}function _(){if(window.innerWidth&&window.innerHeight&&r?.shadowRoot){const x=r.shadowRoot.getElementById("matrix");x?.style&&(H(l,window.innerHeight-x.offsetTop),H(o,Number(x.clientWidth),!0),x.style.height=p(l)+"px",console.log(`setSize w:${p(o)} h:${p(l)}`),c())}}Fn(()=>{if(typeof s()=="string")try{s(JSON.parse(s())),c()}catch(y){console.error("error parsing items",y)}}),Ji.addComponent({repoName:"@htmlbricks/hb-player-live",version:Wi.version}),Mi(()=>{_()});function v(y){H(u,y,!0),n("hoverItem",{id:y,selected:!!p(u)})}function w(){p(u)?n("clickItem",{id:p(u)}):console.info("No video selected")}function h(y){const x=y;try{x.contentWindow?.document.addEventListener("click",()=>{w()})}catch(L){console.warn("error adding click event to iframe",L)}}var b={get id(){return i()},set id(y=""){i(y),Rt()},get items(){return s()},set items(y){s(y),Rt()}},D=ns(),A=ri(()=>Ui(_,200));gt("resize",It,function(...y){p(A)?.apply(this,y)});var V=Pt(D);{var Je=y=>{var x=Ai(),L=ai(x);or(L,17,()=>p(d),O=>O.row,(O,C)=>{var T=ts();or(T,21,()=>p(C).items,S=>S.id,(S,N)=>{var W=es(),is=Pt(W);{var ss=U=>{var F=Ki();Qe(()=>{Ge(F,"title",p(N).title),Ge(F,"src",p(N).uri)}),gt("load",F,yt=>h(yt.target)),$i(F),pe(U,F)},ls=U=>{var F=Xi();wt(F,"media_type","whep"),Qe(()=>wt(F,"mediauri",`${p(N).uri??""}/whep`)),pe(U,F)},os=U=>{var F=Zi();wt(F,"media_type","whep"),Qe(()=>wt(F,"live_uri",`${p(N).uri??""}/whep`)),pe(U,F)},fs=U=>{var F=Qi(),yt=Pt(F);an(3),ut(F),Qe(()=>{Ge(yt,"title",p(N).title),Ge(yt,"src",p(N).uri)}),pe(U,F)};sr(is,U=>{p(N).type==="iframe"?U(ss):p(N).type==="mediamtx-webrtc"?U(ls,1):p(N).type==="mediamtx-webrtc-ptz"?U(os,2):p(N).type==="video"&&U(fs,3)})}ut(W),Qe(()=>Ge(W,"id",`select_${p(N).id??""}`)),gt("mouseleave",W,U=>v()),gt("mouseenter",W,U=>v(p(N).id)),pe(S,W)}),ut(T),pe(O,T)}),pe(y,x)};sr(V,y=>{s()&&typeof s()=="object"&&y(Je)})}return ut(D),pe(e,D),vn(b)}customElements.define("hb-matrix-video",Vi(dr,{id:{},items:{}},[],[],{mode:"open"})),Jt.Component=dr,Object.defineProperty(Jt,Symbol.toStringTag,{value:"Module"})})(this["matrix-video"]=this["matrix-video"]||{});
19
+ }`};function ur(e,t){hn(t,!0),Di(e,es);function n(y,x){t.$$host.dispatchEvent(new CustomEvent(y,{detail:x}))}const r=t.$$host;let i=fr(t,"id",7,""),s=fr(t,"items"),l=B(0),o=B(0),f=B(0),a=B(0),u=B(void 0),d=B(Ye([]));function c(){if(p(o)&&p(l)){const y=1.7777777777777777,x=p(o)/p(l);let P=0,O=0;if(s().length===1)P=1,O=1;else if(p(o)<450)O=1,P=s().length;else if(s().length===2)x>y?(P=1,O=2):(P=2,O=1);else if(x>y){let N=1/0;for(let T=1;T<=s().length;T++){const A=Math.ceil(s().length/T),C=p(l)/T*y*A;if(C<=p(o)){const U=p(o)-C;U<N&&(N=U,P=T,O=A)}}}else{let N=1/0;for(let T=1;T<=s().length;T++){const A=Math.ceil(s().length/T),C=p(o)/T/y*A;if(C<=p(l)){const U=p(l)-C;U<N&&(N=U,O=T,P=A)}}}if(H(f,P,!0),H(a,O,!0),p(f)&&p(a)){const N=[];for(let T=0;T<p(f);T++)for(let A=0;A<p(a);A++){const C=s()[T*p(a)+A];C&&(N[T]||(N[T]={row:T,items:[]}),N[T].items[A]=C)}H(d,N,!0),console.log(p(d),p(f),p(a),"drawItems")}}}function _(){if(window.innerWidth&&window.innerHeight&&r?.shadowRoot){const x=r.shadowRoot.getElementById("matrix");x?.style&&(H(l,window.innerHeight-x.offsetTop),H(o,Number(x.clientWidth),!0),x.style.height=p(l)+"px",console.log(`setSize w:${p(o)} h:${p(l)}`),c())}}Ln(()=>{if(typeof s()=="string")try{s(JSON.parse(s())),c()}catch(y){console.error("error parsing items",y)}}),Ui({repoName:"@htmlbricks/hb-player-live",version:Yi.version}),Ri(()=>{_()});function v(y){H(u,y,!0),n("hoverItem",{id:y,selected:!!p(u)})}function w(){p(u)?n("clickItem",{id:p(u)}):console.info("No video selected")}function h(y){const x=y;try{x.contentWindow?.document.addEventListener("click",()=>{w()})}catch(P){console.warn("error adding click event to iframe",P)}}var b={get id(){return i()},set id(y=""){i(y),Ct()},get items(){return s()},set items(y){s(y),Ct()}},M=Qi(),k=ti(()=>Vi(_,200));pt("resize",Mt,function(...y){p(k)?.apply(this,y)});var V=Pt(M);{var Ge=y=>{var x=Ti(),P=oi(x);lr(P,17,()=>p(d),O=>O.row,(O,N)=>{var T=Zi();lr(T,21,()=>p(N).items,A=>A.id,(A,C)=>{var U=Xi(),ts=Pt(U);{var ns=W=>{var F=Wi();Ze(()=>{We(F,"title",p(C).title),We(F,"src",p(C).uri)}),pt("load",F,bt=>h(bt.target)),bi(F),pe(W,F)},rs=W=>{var F=Gi();mt(F,"media_type","whep"),Ze(()=>mt(F,"mediauri",`${p(C).uri??""}/whep`)),pe(W,F)},is=W=>{var F=Ki();mt(F,"media_type","whep"),Ze(()=>mt(F,"live_uri",`${p(C).uri??""}/whep`)),pe(W,F)},ss=W=>{var F=Ji(),bt=Pt(F);fn(3),at(F),Ze(()=>{We(bt,"title",p(C).title),We(bt,"src",p(C).uri)}),pe(W,F)};ir(ts,W=>{p(C).type==="iframe"?W(ns):p(C).type==="mediamtx-webrtc"?W(rs,1):p(C).type==="mediamtx-webrtc-ptz"?W(is,2):p(C).type==="video"&&W(ss,3)})}at(U),Ze(()=>We(U,"id",`select_${p(C).id??""}`)),pt("mouseleave",U,W=>v()),pt("mouseenter",U,W=>v(p(C).id)),pe(A,U)}),at(T),pe(O,T)}),pe(y,x)};ir(V,y=>{s()&&typeof s()=="object"&&y(Ge)})}return at(M),pe(e,M),dn(b)}customElements.define("hb-matrix-video",qi(ur,{id:{},items:{}},[],[],{mode:"open"})),Gt.Component=ur,Object.defineProperty(Gt,Symbol.toStringTag,{value:"Module"})})(this["matrix-video"]=this["matrix-video"]||{});
20
20
  //# sourceMappingURL=main.iife.js.map