playlight-sdk 0.3.10 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/playlight-sdk.es.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var t=Object.defineProperty,e=t=>{throw TypeError(t)},n=(e,n,r)=>((e,n,r)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r)(e,"symbol"!=typeof n?n+"":n,r),r=(t,n,r)=>n.has(t)||e("Cannot "+r),o=(t,e,n)=>(r(t,e,"read from private field"),n?n.call(t):e.get(t)),i=(t,n,r)=>n.has(t)?e("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(t):n.set(t,r),s=(t,e,n,o)=>(r(t,e,"write to private field"),o?o.call(t,n):e.set(t,n),n),a=(t,e,n)=>(r(t,e,"access private method"),n);const l={exitIntent:{enabled:!0,immediate:!1},sidebar:{hasFrameworkRoot:"auto",forceVisible:!1}};function c(t={}){return u(l,t)}function u(t,e){const n={...t};return d(t)&&d(e)&&Object.keys(e).forEach(r=>{d(e[r])?r in t?n[r]=u(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})}),n}function d(t){return t&&"object"==typeof t&&!Array.isArray(t)}var f=Array.isArray,h=Array.prototype.indexOf,v=Array.from,p=Object.defineProperty,g=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyDescriptors,w=Object.prototype,y=Array.prototype,b=Object.getPrototypeOf,x=Object.isExtensible;function $(t){return"function"==typeof t}const k=()=>{};function _(){var t,e;return{promise:new Promise((n,r)=>{t=n,e=r}),resolve:t,reject:e}}function M(t,e){if(Array.isArray(t))return t;if(!(Symbol.iterator in t))return Array.from(t);const n=[];for(const r of t)if(n.push(r),n.length===e)break;return n}const S=16,E=1024,C=2048,O=4096,I=8192,W=16384,P=32768,L=65536,T=1<<19,j=1<<20,A=256,N=32768,z=1<<21,R=1<<22,B=1<<23,D=Symbol("$state"),q=Symbol("legacy props"),F=Symbol(""),G=new class extends Error{constructor(){super(...arguments),n(this,"name","StaleReactionError"),n(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function H(t){return t===this.v}function Y(t,e){return t!=t?e==e:t!==e||null!==t&&"object"==typeof t||"function"==typeof t}function V(t){return!Y(t,this.v)}function U(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let K=!1;const X=Symbol();let Z=null;function J(t){Z=t}function Q(t){return rt().get(t)}function tt(t,e=!1,n){Z={p:Z,c:null,e:null,s:t,x:null,l:K&&!e?{s:null,u:null,$:[]}:null}}function et(t){var e=Z,n=e.e;if(null!==n)for(var r of(e.e=null,n))Sn(r);return Z=e.p,{}}function nt(){return!K||null!==Z&&null===Z.l}function rt(t){return null===Z&&U(),Z.c??(Z.c=new Map(function(){let t=Z.p;for(;null!==t;){const e=t.c;if(null!==e)return e;t=t.p}return null}()||void 0))}let ot=[];function it(){var t=ot;ot=[],function(t){for(var e=0;e<t.length;e++)t[e]()}(t)}function st(t){if(0===ot.length&&!Lt){var e=ot;queueMicrotask(()=>{e===ot&&it()})}ot.push(t)}function at(){for(;ot.length>0;)it()}function lt(t){if("object"!=typeof t||null===t||D in t)return t;const e=b(t);if(e!==w&&e!==y)return t;var n=new Map,r=f(t),o=je(0),i=an,s=t=>{if(an===i)return t();var e=Ue,n=an;Xe(null),ln(i);var r=t();return Xe(e),ln(n),r};return r&&n.set("length",je(t.length)),new Proxy(t,{defineProperty(t,e,r){(!("value"in r)||!1===r.configurable||!1===r.enumerable||!1===r.writable)&&function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var o=n.get(e);return void 0===o?o=s(()=>{var t=je(r.value);return n.set(e,t),t}):Ne(o,r.value,!0),!0},deleteProperty(t,e){var r=n.get(e);if(void 0===r){if(e in t){const t=s(()=>je(X));n.set(e,t),Re(o)}}else Ne(r,X),Re(o);return!0},get(e,r,o){if(r===D)return t;var i=n.get(r),a=r in e;if(void 0===i&&(!a||g(e,r)?.writable)&&(i=s(()=>je(lt(a?e[r]:X))),n.set(r,i)),void 0!==i){var l=mn(i);return l===X?void 0:l}return Reflect.get(e,r,o)},getOwnPropertyDescriptor(t,e){var r=Reflect.getOwnPropertyDescriptor(t,e);if(r&&"value"in r){var o=n.get(e);o&&(r.value=mn(o))}else if(void 0===r){var i=n.get(e),s=i?.v;if(void 0!==i&&s!==X)return{enumerable:!0,configurable:!0,value:s,writable:!0}}return r},has(t,e){if(e===D)return!0;var r=n.get(e),o=void 0!==r&&r.v!==X||Reflect.has(t,e);return!((void 0!==r||null!==Ze&&(!o||g(t,e)?.writable))&&(void 0===r&&(r=s(()=>je(o?lt(t[e]):X)),n.set(e,r)),mn(r)===X))&&o},set(t,e,i,a){var l=n.get(e),c=e in t;if(r&&"length"===e)for(var u=i;u<l.v;u+=1){var d=n.get(u+"");void 0!==d?Ne(d,X):u in t&&(d=s(()=>je(X)),n.set(u+"",d))}void 0===l?(!c||g(t,e)?.writable)&&(Ne(l=s(()=>je(void 0)),lt(i)),n.set(e,l)):(c=l.v!==X,Ne(l,s(()=>lt(i))));var f=Reflect.getOwnPropertyDescriptor(t,e);if(f?.set&&f.set.call(a,i),!c){if(r&&"string"==typeof e){var h=n.get("length"),v=Number(e);Number.isInteger(v)&&v>=h.v&&Ne(h,v+1)}Re(o)}return!0},ownKeys(t){mn(o);var e=Reflect.ownKeys(t).filter(t=>{var e=n.get(t);return void 0===e||e.v!==X});for(var[r,i]of n)i.v!==X&&!(r in t)&&e.push(r);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function ct(t){try{if(null!==t&&"object"==typeof t&&D in t)return t[D]}catch{}return t}function ut(t,e){return Object.is(ct(t),ct(e))}var dt,ft,ht,vt;function pt(t=""){return document.createTextNode(t)}function gt(t){return ht.call(t)}function mt(t){return vt.call(t)}function wt(t,e){return gt(t)}function yt(t,e=!1){var n=gt(t);return n instanceof Comment&&""===n.data?mt(n):n}function bt(t,e=1,n=!1){let r=t;for(;e--;)r=mt(r);return r}const xt=new WeakMap;function $t(t){var e=Ze;if(null===e)return Ue.f|=B,t;if(0===(e.f&P)){if(!(128&e.f))throw!e.parent&&t instanceof Error&&_t(t),t;e.b.error(t)}else kt(t,e)}function kt(t,e){for(;null!==e;){if(128&e.f)try{return void e.b.error(t)}catch(e){t=e}e=e.parent}throw t instanceof Error&&_t(t),t}function _t(t){const e=xt.get(t);e&&(p(t,"message",{value:e.message}),p(t,"stack",{value:e.stack}))}const Mt=new Set;let St=null,Et=null,Ct=null,Ot=new Set,It=[],Wt=null,Pt=!1,Lt=!1;var Tt,jt,At,Nt,zt,Rt,Bt,Dt,qt,Ft,Gt,Ht;Tt=new WeakMap,jt=new WeakMap,At=new WeakMap,Nt=new WeakMap,zt=new WeakMap,Rt=new WeakMap,Bt=new WeakMap,Dt=new WeakSet,qt=function(t,e){t.f^=E;for(var n=t.first;null!==n;){var r=n.f,o=!!(96&r),i=o&&0!==(r&E)||0!==(r&I)||this.skipped_effects.has(n);if(!!(128&n.f)&&n.b?.is_pending()&&(e={parent:e,effect:n,effects:[],render_effects:[],block_effects:[]}),!i&&null!==n.fn){o?n.f^=E:4&r?e.effects.push(n):dn(n)&&(0!==(n.f&S)&&e.block_effects.push(n),gn(n));var s=n.first;if(null!==s){n=s;continue}}var l=n.parent;for(n=n.next;null===n&&null!==l;)l===e.effect&&(a(this,Dt,Ft).call(this,e.effects),a(this,Dt,Ft).call(this,e.render_effects),a(this,Dt,Ft).call(this,e.block_effects),e=e.parent),n=l.next,l=l.parent}},Ft=function(t){for(const e of t)(0!==(e.f&C)?o(this,Rt):o(this,Bt)).push(e),xn(e,E)},Gt=function(){if(0===o(this,Nt)){for(const t of o(this,jt))t();o(this,jt).clear()}0===o(this,At)&&a(this,Dt,Ht).call(this)},Ht=function(){var t;if(Mt.size>1){o(this,Tt).clear();var e=Ct,n=!0,r={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const e of Mt){if(e===this){n=!1;continue}const o=[];for(const[t,r]of this.current){if(e.current.has(t)){if(!n||r===e.current.get(t))continue;e.current.set(t,r)}o.push(t)}if(0===o.length)continue;const i=[...e.current.keys()].filter(t=>!this.current.has(t));if(i.length>0){const n=new Set,s=new Map;for(const t of o)Zt(t,i,n,s);if(It.length>0){St=e,e.apply();for(const n of It)a(t=e,Dt,qt).call(t,n,r);It=[],e.deactivate()}}}St=null,Ct=e}this.committed=!0,Mt.delete(this),o(this,zt)?.resolve()};let Yt=class t{constructor(){i(this,Dt),n(this,"committed",!1),n(this,"current",new Map),i(this,Tt,new Map),i(this,jt,new Set),i(this,At,0),i(this,Nt,0),i(this,zt,null),i(this,Rt,[]),i(this,Bt,[]),n(this,"skipped_effects",new Set)}process(t){It=[],Et=null,this.apply();var e={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of t)a(this,Dt,qt).call(this,n,e);a(this,Dt,Gt).call(this),o(this,Nt)>0?(a(this,Dt,Ft).call(this,e.effects),a(this,Dt,Ft).call(this,e.render_effects),a(this,Dt,Ft).call(this,e.block_effects)):(Et=this,St=null,Xt(e.render_effects),Xt(e.effects),Et=null),Ct=null}capture(t,e){o(this,Tt).has(t)||o(this,Tt).set(t,e),this.current.set(t,t.v),Ct?.set(t,t.v)}activate(){St=this}deactivate(){St=null,Ct=null}flush(){if(It.length>0){if(this.activate(),Vt(),null!==St&&St!==this)return}else a(this,Dt,Gt).call(this);this.deactivate();for(const t of Ot)if(Ot.delete(t),t(),null!==St)break}increment(t){s(this,At,o(this,At)+1),t&&s(this,Nt,o(this,Nt)+1)}decrement(t){s(this,At,o(this,At)-1),t&&s(this,Nt,o(this,Nt)-1);for(const t of o(this,Rt))xn(t,C),Qt(t);for(const t of o(this,Bt))xn(t,O),Qt(t);s(this,Rt,[]),s(this,Bt,[]),this.flush()}add_callback(t){o(this,jt).add(t)}settled(){return(o(this,zt)??s(this,zt,_())).promise}static ensure(){if(null===St){const e=St=new t;Mt.add(St),Lt||t.enqueue(()=>{St===e&&e.flush()})}return St}static enqueue(t){st(t)}apply(){}};function Vt(){var t=Ge;Pt=!0;try{var e=0;for(He(!0);It.length>0;){var n=Yt.ensure();e++>1e3&&Ut(),n.process(It),Le.clear()}}finally{Pt=!1,He(t),Wt=null}}function Ut(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){kt(t,Wt)}}let Kt=null;function Xt(t){var e=t.length;if(0!==e){for(var n=0;n<e;){var r=t[n++];if(!(24576&r.f)&&dn(r)&&(Kt=new Set,gn(r),null===r.deps&&null===r.first&&null===r.nodes_start&&(null===r.teardown&&null===r.ac?jn(r):r.fn=null),Kt?.size>0)){Le.clear();for(const t of Kt){if(24576&t.f)continue;const e=[t];let n=t.parent;for(;null!==n;)Kt.has(n)&&(Kt.delete(n),e.push(n)),n=n.parent;for(let t=e.length-1;t>=0;t--){const n=e[t];!(24576&n.f)&&gn(n)}}Kt.clear()}}Kt=null}}function Zt(t,e,n,r){if(!n.has(t)&&(n.add(t),null!==t.reactions))for(const o of t.reactions){const t=o.f;2&t?Zt(o,e,n,r):0!==(t&(R|S))&&0===(t&C)&&Jt(o,e,r)&&(xn(o,C),Qt(o))}}function Jt(t,e,n){const r=n.get(t);if(void 0!==r)return r;if(null!==t.deps)for(const r of t.deps){if(e.includes(r))return!0;if(2&r.f&&Jt(r,e,n))return n.set(r,!0),!0}return n.set(t,!1),!1}function Qt(t){for(var e=Wt=t;null!==e.parent;){var n=(e=e.parent).f;if(Pt&&e===Ze&&0!==(n&S))return;if(96&n){if(0===(n&E))return;e.f^=E}}It.push(e)}function te(t){let e,n=0,r=Te(0);return()=>{null!==Ue&&!Ke&&(mn(r),Cn(()=>(0===n&&(e=yn(()=>t(()=>Re(r)))),n+=1,()=>{st(()=>{n-=1,0===n&&(e?.(),e=void 0,Re(r))})})))}}var ee,ne,re,oe,ie,se,ae,le,ce,ue,de,fe,he,ve,pe,ge,me,we,ye,be,xe,$e;class ke{constructor(t,e,r){i(this,we),n(this,"parent"),i(this,ee,!1),i(this,ne),i(this,re,null),i(this,oe),i(this,ie),i(this,se),i(this,ae,null),i(this,le,null),i(this,ce,null),i(this,ue,null),i(this,de,null),i(this,fe,0),i(this,he,0),i(this,ve,!1),i(this,pe,null),i(this,ge,()=>{o(this,pe)&&ze(o(this,pe),o(this,fe))}),i(this,me,te(()=>(s(this,pe,Te(o(this,fe))),()=>{s(this,pe,null)}))),s(this,ne,t),s(this,oe,e),s(this,ie,r),this.parent=Ze.b,s(this,ee,!!o(this,oe).pending),s(this,se,In(()=>{Ze.b=this;var t=a(this,we,ye).call(this);try{s(this,ae,Wn(()=>r(t)))}catch(t){this.error(t)}return o(this,he)>0?a(this,we,xe).call(this):s(this,ee,!1),()=>{o(this,de)?.remove()}},589952))}is_pending(){return o(this,ee)||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!o(this,oe).pending}update_pending_count(t){a(this,we,$e).call(this,t),s(this,fe,o(this,fe)+t),Ot.add(o(this,ge))}get_effect_pending(){return o(this,me).call(this),mn(o(this,pe))}error(t){var e=o(this,oe).onerror;let n=o(this,oe).failed;if(o(this,ve)||!e&&!n)throw t;o(this,ae)&&(Tn(o(this,ae)),s(this,ae,null)),o(this,le)&&(Tn(o(this,le)),s(this,le,null)),o(this,ce)&&(Tn(o(this,ce)),s(this,ce,null));var r=!1,i=!1;const l=()=>{r?console.warn("https://svelte.dev/e/svelte_boundary_reset_noop"):(r=!0,i&&function(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}(),Yt.ensure(),s(this,fe,0),null!==o(this,ce)&&An(o(this,ce),()=>{s(this,ce,null)}),s(this,ee,this.has_pending_snippet()),s(this,ae,a(this,we,be).call(this,()=>(s(this,ve,!1),Wn(()=>o(this,ie).call(this,o(this,ne)))))),o(this,he)>0?a(this,we,xe).call(this):s(this,ee,!1))};var c=Ue;try{Xe(null),i=!0,e?.(t,l),i=!1}catch(t){kt(t,o(this,se)&&o(this,se).parent)}finally{Xe(c)}n&&st(()=>{s(this,ce,a(this,we,be).call(this,()=>{Yt.ensure(),s(this,ve,!0);try{return Wn(()=>{n(o(this,ne),()=>t,()=>l)})}catch(t){return kt(t,o(this,se).parent),null}finally{s(this,ve,!1)}}))})}}function _e(t,e,n){const r=nt()?Se:Oe;if(0!==e.length){var o=St,i=Ze,s=function(){var t=Ze,e=Ue,n=Z,r=St;return function(){Je(t),Xe(e),J(n),r?.activate()}}();Promise.all(e.map(t=>Ee(t))).then(e=>{s();try{n([...t.map(r),...e])}catch(t){0===(i.f&W)&&kt(t,i)}o?.deactivate(),Me()}).catch(t=>{kt(t,i)})}else n(t.map(r))}function Me(){Je(null),Xe(null),J(null)}function Se(t){var e=2050,n=null!==Ue&&2&Ue.f?Ue:null;return null===Ze||null!==n&&0!==(n.f&A)?e|=A:Ze.f|=T,{ctx:Z,deps:null,effects:null,equals:H,f:e,fn:t,reactions:null,rv:0,v:X,wv:0,parent:n??Ze,ac:null}}function Ee(t,e){let n=Ze;null===n&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var r=n.b,o=void 0,i=Te(X),s=!Ue,a=new Map;return function(t){kn(R|T,t,!0)}(()=>{var e=_();o=e.promise;try{Promise.resolve(t()).then(e.resolve,e.reject).then(()=>{n===St&&n.committed&&n.deactivate(),Me()})}catch(t){e.reject(t),Me()}var n=St;if(s){var l=!r.is_pending();r.update_pending_count(1),n.increment(l),a.get(n)?.reject(G),a.delete(n),a.set(n,e)}const c=(t,e=void 0)=>{if(n.activate(),e)e!==G&&(i.f|=B,ze(i,e));else{0!==(i.f&B)&&(i.f^=B),ze(i,t);for(const[t,e]of a){if(a.delete(t),t===n)break;e.reject(G)}}s&&(r.update_pending_count(-1),n.decrement(l))};e.promise.then(c,t=>c(null,t||"unknown"))}),_n(()=>{for(const t of a.values())t.reject(G)}),new Promise(t=>{!function e(n){function r(){n===o?t(i):e(o)}n.then(r,r)}(o)})}function Ce(t){const e=Se(t);return tn(e),e}function Oe(t){const e=Se(t);return e.equals=V,e}function Ie(t){var e=t.effects;if(null!==e){t.effects=null;for(var n=0;n<e.length;n+=1)Tn(e[n])}}function We(t){var e,n=Ze;Je(function(t){for(var e=t.parent;null!==e;){if(!(2&e.f))return e;e=e.parent}return null}(t));try{t.f&=~N,Ie(t),e=hn(t)}finally{Je(n)}return e}function Pe(t){var e=We(t);t.equals(e)||(t.v=e,t.wv=un()),Ye||(null!==Ct?Ct.set(t,t.v):xn(t,!cn&&0===(t.f&A)||null===t.deps?E:O))}ee=new WeakMap,ne=new WeakMap,re=new WeakMap,oe=new WeakMap,ie=new WeakMap,se=new WeakMap,ae=new WeakMap,le=new WeakMap,ce=new WeakMap,ue=new WeakMap,de=new WeakMap,fe=new WeakMap,he=new WeakMap,ve=new WeakMap,pe=new WeakMap,ge=new WeakMap,me=new WeakMap,we=new WeakSet,ye=function(){var t=o(this,ne);return o(this,ee)&&(s(this,de,pt()),o(this,ne).before(o(this,de)),t=o(this,de)),t},be=function(t){var e=Ze,n=Ue,r=Z;Je(o(this,se)),Xe(o(this,se)),J(o(this,se).ctx);try{return t()}catch(t){return $t(t),null}finally{Je(e),Xe(n),J(r)}},xe=function(){const t=o(this,oe).pending;null!==o(this,ae)&&(s(this,ue,document.createDocumentFragment()),o(this,ue).append(o(this,de)),Dn(o(this,ae),o(this,ue))),null===o(this,le)&&s(this,le,Wn(()=>t(o(this,ne))))},$e=function(t){var e;this.has_pending_snippet()?(s(this,he,o(this,he)+t),0===o(this,he)&&(s(this,ee,!1),o(this,le)&&An(o(this,le),()=>{s(this,le,null)}),o(this,ue)&&(o(this,ne).before(o(this,ue)),s(this,ue,null)))):this.parent&&a(e=this.parent,we,$e).call(e,t)};const Le=new Map;function Te(t,e){return{f:0,v:t,reactions:null,equals:H,rv:0,wv:0}}function je(t,e){const n=Te(t);return tn(n),n}function Ae(t,e=!1,n=!0){var r;const o=Te(t);return e||(o.equals=V),K&&n&&null!==Z&&null!==Z.l&&((r=Z.l).s??(r.s=[])).push(o),o}function Ne(t,e,n=!1){return null!==Ue&&(!Ke||!!(131072&Ue.f))&&nt()&&4325394&Ue.f&&!Qe?.includes(t)&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),ze(t,n?lt(e):e)}function ze(t,e){if(!t.equals(e)){var n=t.v;Ye?Le.set(t,e):Le.set(t,n),t.v=e,Yt.ensure().capture(t,n),!!(2&t.f)&&(0!==(t.f&C)&&We(t),xn(t,0===(t.f&A)?E:O)),t.wv=un(),Be(t,C),nt()&&null!==Ze&&0!==(Ze.f&E)&&!(96&Ze.f)&&(null===rn?function(t){rn=t}([t]):rn.push(t))}return e}function Re(t){Ne(t,t.v+1)}function Be(t,e){var n=t.reactions;if(null!==n)for(var r=nt(),o=n.length,i=0;i<o;i++){var s=n[i],a=s.f;if(r||s!==Ze){var l=0===(a&C);l&&xn(s,e),2&a?0===(a&N)&&(s.f|=N,Be(s,O)):l&&(0!==(a&S)&&null!==Kt&&Kt.add(s),Qt(s))}}}function De(t,e){if(e){const e=document.body;t.autofocus=!0,st(()=>{document.activeElement===e&&t.focus()})}}let qe=!1;function Fe(t){var e=Ue,n=Ze;Xe(null),Je(null);try{return t()}finally{Xe(e),Je(n)}}let Ge=!1;function He(t){Ge=t}let Ye=!1;function Ve(t){Ye=t}let Ue=null,Ke=!1;function Xe(t){Ue=t}let Ze=null;function Je(t){Ze=t}let Qe=null;function tn(t){null!==Ue&&(null===Qe?Qe=[t]:Qe.push(t))}let en=null,nn=0,rn=null,on=1,sn=0,an=sn;function ln(t){an=t}let cn=!1;function un(){return++on}function dn(t){var e=t.f;if(0!==(e&C))return!0;if(0!==(e&O)){var n=t.deps,r=0!==(e&A);if(2&e&&(t.f&=~N),null!==n){var o,i,s=!!(512&e),a=r&&null!==Ze&&!cn,l=n.length;if((s||a)&&(null===Ze||0===(Ze.f&W))){var c=t,u=c.parent;for(o=0;o<l;o++)i=n[o],(s||!i?.reactions?.includes(c))&&(i.reactions??(i.reactions=[])).push(c);s&&(c.f^=512),a&&null!==u&&0===(u.f&A)&&(c.f^=A)}for(o=0;o<l;o++)if(dn(i=n[o])&&Pe(i),i.wv>t.wv)return!0}(!r||null!==Ze&&!cn)&&xn(t,E)}return!1}function fn(t,e,n=!0){var r=t.reactions;if(null!==r&&!Qe?.includes(t))for(var o=0;o<r.length;o++){var i=r[o];2&i.f?fn(i,e,!1):e===i&&(n?xn(i,C):0!==(i.f&E)&&xn(i,O),Qt(i))}}function hn(t){var e,n=en,r=nn,o=rn,i=Ue,s=cn,a=Qe,l=Z,c=Ke,u=an,d=t.f;en=null,nn=0,rn=null,cn=0!==(d&A)&&(Ke||!Ge||null===Ue),Ue=96&d?null:t,Qe=null,J(t.ctx),Ke=!1,an=++sn,null!==t.ac&&(Fe(()=>{t.ac.abort(G)}),t.ac=null);try{t.f|=z;var f=(0,t.fn)(),h=t.deps;if(null!==en){var v;if(pn(t,nn),null!==h&&nn>0)for(h.length=nn+en.length,v=0;v<en.length;v++)h[nn+v]=en[v];else t.deps=h=en;if(!cn||2&d&&null!==t.reactions)for(v=nn;v<h.length;v++)((e=h[v]).reactions??(e.reactions=[])).push(t)}else null!==h&&nn<h.length&&(pn(t,nn),h.length=nn);if(nt()&&null!==rn&&!Ke&&null!==h&&!(6146&t.f))for(v=0;v<rn.length;v++)fn(rn[v],t);return null!==i&&i!==t&&(sn++,null!==rn&&(null===o?o=rn:o.push(...rn))),0!==(t.f&B)&&(t.f^=B),f}catch(t){return $t(t)}finally{t.f^=z,en=n,nn=r,rn=o,Ue=i,cn=s,Qe=a,J(l),Ke=c,an=u}}function vn(t,e){let n=e.reactions;if(null!==n){var r=h.call(n,t);if(-1!==r){var o=n.length-1;0===o?n=e.reactions=null:(n[r]=n[o],n.pop())}}null===n&&2&e.f&&(null===en||!en.includes(e))&&(xn(e,O),!(768&e.f)&&(e.f^=512),Ie(e),pn(e,0))}function pn(t,e){var n=t.deps;if(null!==n)for(var r=e;r<n.length;r++)vn(t,n[r])}function gn(t){var e=t.f;if(0===(e&W)){xn(t,E);var n=Ze,r=Ge;Ze=t,Ge=!0;try{0!==(e&S)?function(t){for(var e=t.first;null!==e;){var n=e.next;!(32&e.f)&&Tn(e),e=n}}(t):Ln(t),Pn(t);var o=hn(t);t.teardown="function"==typeof o?o:null,t.wv=on}finally{Ge=r,Ze=n}}}function mn(t){var e=!!(2&t.f);if(null===Ue||Ke){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null!==r&&0===(r.f&A)&&(n.f^=A)}}else if((null===Ze||0===(Ze.f&W))&&!Qe?.includes(t)){var o=Ue.deps;if(0!==(Ue.f&z))t.rv<sn&&(t.rv=sn,null===en&&null!==o&&o[nn]===t?nn++:null===en?en=[t]:(!cn||!en.includes(t))&&en.push(t));else{(Ue.deps??(Ue.deps=[])).push(t);var i=t.reactions;null===i?t.reactions=[Ue]:i.includes(Ue)||i.push(Ue)}}if(Ye){if(Le.has(t))return Le.get(t);if(e){var s=(n=t).v;return(0===(n.f&E)&&null!==n.reactions||wn(n))&&(s=We(n)),Le.set(n,s),s}}else if(e){if(n=t,Ct?.has(n))return Ct.get(n);dn(n)&&Pe(n)}if(Ct?.has(t))return Ct.get(t);if(0!==(t.f&B))throw t.v;return t.v}function wn(t){if(t.v===X)return!0;if(null===t.deps)return!1;for(const e of t.deps)if(Le.has(e)||2&e.f&&wn(e))return!0;return!1}function yn(t){var e=Ke;try{return Ke=!0,t()}finally{Ke=e}}const bn=-7169;function xn(t,e){t.f=t.f&bn|e}function $n(t){null===Ze&&null===Ue&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==Ue&&0!==(Ue.f&A)&&null===Ze&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),Ye&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function kn(t,e,n,r=!0){var o=Ze;null!==o&&0!==(o.f&I)&&(t|=I);var i={ctx:Z,deps:null,nodes_start:null,nodes_end:null,f:t|C,first:null,fn:e,last:null,next:null,parent:o,b:o&&o.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{gn(i),i.f|=P}catch(t){throw Tn(i),t}else null!==e&&Qt(i);if(r){var s=i;if(n&&null===s.deps&&null===s.teardown&&null===s.nodes_start&&s.first===s.last&&0===(s.f&T)&&(s=s.first,0!==(t&S)&&0!==(t&L)&&null!==s&&(s.f|=L)),null!==s&&(s.parent=o,null!==o&&function(t,e){var n=e.last;null===n?e.last=e.first=t:(n.next=t,t.prev=n,e.last=t)}(s,o),null!==Ue&&2&Ue.f&&!(64&t))){var a=Ue;(a.effects??(a.effects=[])).push(s)}}return i}function _n(t){const e=kn(8,null,!1);return xn(e,E),e.teardown=t,e}function Mn(t){$n();var e=Ze.f;if(Ue||!(32&e)||0!==(e&P))return Sn(t);var n=Z;(n.e??(n.e=[])).push(t)}function Sn(t){return kn(4|j,t,!1)}function En(t){return kn(4,t,!1)}function Cn(t,e=0){return kn(8|e,t,!0)}function On(t,e=[],n=[]){_e(e,n,e=>{kn(8,()=>t(...e.map(mn)),!0)})}function In(t,e=0){return kn(S|e,t,!0)}function Wn(t,e=!0){return kn(32|T,t,!0,e)}function Pn(t){var e=t.teardown;if(null!==e){const t=Ye,n=Ue;Ve(!0),Xe(null);try{e.call(null)}finally{Ve(t),Xe(n)}}}function Ln(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){const t=n.ac;null!==t&&Fe(()=>{t.abort(G)});var r=n.next;64&n.f?n.parent=null:Tn(n,e),n=r}}function Tn(t,e=!0){var n=!1;(e||!!(262144&t.f))&&null!==t.nodes_start&&null!==t.nodes_end&&(function(t,e){for(;null!==t;){var n=t===e?null:mt(t);t.remove(),t=n}}(t.nodes_start,t.nodes_end),n=!0),Ln(t,e&&!n),pn(t,0),xn(t,W);var r=t.transitions;if(null!==r)for(const t of r)t.stop();Pn(t);var o=t.parent;null!==o&&null!==o.first&&jn(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function jn(t){var e=t.parent,n=t.prev,r=t.next;null!==n&&(n.next=r),null!==r&&(r.prev=n),null!==e&&(e.first===t&&(e.first=r),e.last===t&&(e.last=n))}function An(t,e,n=!0){var r=[];zn(t,r,!0),Nn(r,()=>{n&&Tn(t),e&&e()})}function Nn(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function zn(t,e,n){if(0===(t.f&I)){if(t.f^=I,null!==t.transitions)for(const r of t.transitions)(r.is_global||n)&&e.push(r);for(var r=t.first;null!==r;){var o=r.next;zn(r,e,!!(0!==(r.f&L)||32&r.f&&0!==(t.f&S))&&n),r=o}}}function Rn(t){Bn(t,!0)}function Bn(t,e){if(0!==(t.f&I)){t.f^=I,0===(t.f&E)&&(xn(t,C),Qt(t));for(var n=t.first;null!==n;){var r=n.next;Bn(n,!!(0!==(n.f&L)||32&n.f)&&e),n=r}if(null!==t.transitions)for(const n of t.transitions)(n.is_global||e)&&n.in()}}function Dn(t,e){for(var n=t.nodes_start,r=t.nodes_end;null!==n;){var o=n===r?null:mt(n);e.append(n),n=o}}function qn(t){return t.endsWith("capture")&&"gotpointercapture"!==t&&"lostpointercapture"!==t}const Fn=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Gn(t){return Fn.includes(t)}const Hn={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Yn(t){return t=t.toLowerCase(),Hn[t]??t}const Vn=["touchstart","touchmove"];function Un(t){return Vn.includes(t)}const Kn=new Set,Xn=new Set;function Zn(t,e,n,r={}){function o(t){if(r.capture||nr.call(e,t),!t.cancelBubble)return Fe(()=>n?.call(this,t))}return t.startsWith("pointer")||t.startsWith("touch")||"wheel"===t?st(()=>{e.addEventListener(t,o,r)}):e.addEventListener(t,o,r),o}function Jn(t,e,n,r={}){var o=Zn(e,t,n,r);return()=>{t.removeEventListener(e,o,r)}}function Qn(t,e,n,r,o){var i={capture:r,passive:o},s=Zn(t,e,n,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&_n(()=>{e.removeEventListener(t,s,i)})}function tr(t){for(var e=0;e<t.length;e++)Kn.add(t[e]);for(var n of Xn)n(t)}let er=null;function nr(t){var e=this,n=e.ownerDocument,r=t.type,o=t.composedPath?.()||[],i=o[0]||t.target;er=t;var s=0,a=er===t&&t.__root;if(a){var l=o.indexOf(a);if(-1!==l&&(e===document||e===window))return void(t.__root=e);var c=o.indexOf(e);if(-1===c)return;l<=c&&(s=l)}if((i=o[s]||t.target)!==e){p(t,"currentTarget",{configurable:!0,get:()=>i||n});var u=Ue,d=Ze;Xe(null),Je(null);try{for(var h,v=[];null!==i;){var g=i.assignedSlot||i.parentNode||i.host||null;try{var m=i["__"+r];if(null!=m&&(!i.disabled||t.target===i))if(f(m)){var[w,...y]=m;w.apply(i,[t,...y])}else m.call(i,t)}catch(t){h?v.push(t):h=t}if(t.cancelBubble||g===e||null===g)break;i=g}if(h){for(let t of v)queueMicrotask(()=>{throw t});throw h}}finally{t.__root=e,delete t.currentTarget,Xe(u),Je(d)}}}function rr(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","\x3c!----\x3e"),e.content}function or(t,e){var n=Ze;null===n.nodes_start&&(n.nodes_start=t,n.nodes_end=e)}function ir(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("<!>");return()=>{void 0===n&&(n=rr(i?t:"<!>"+t),r||(n=gt(n)));var e=o||ft?document.importNode(n,!0):n.cloneNode(!0);return r?or(gt(e),e.lastChild):or(e,e),e}}function sr(t,e,n="svg"){var r,o=`<${n}>${t.startsWith("<!>")?"<!>"+t:t}</${n}>`;return()=>{if(!r){var t=rr(o);r=gt(gt(t))}var e=r.cloneNode(!0);return or(e,e),e}}function ar(t,e){return sr(t,0,"svg")}function lr(t=""){var e=pt(t+"");return or(e,e),e}function cr(){var t=document.createDocumentFragment(),e=document.createComment(""),n=pt();return t.append(e,n),or(e,n),t}function ur(t,e){null!==t&&t.before(e)}let dr=!0;function fr(t){dr=t}function hr(t,e){var n=null==e?"":"object"==typeof e?e+"":e;n!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=n,t.nodeValue=n+"")}function vr(t,e){return function(t,{target:e,anchor:n,props:r={},events:o,context:i,intro:s=!0}){!function(){if(void 0===dt){dt=window,ft=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;ht=g(e,"firstChild").get,vt=g(e,"nextSibling").get,x(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),x(n)&&(n.__t=void 0)}}();var a=new Set,l=t=>{for(var n=0;n<t.length;n++){var r=t[n];if(!a.has(r)){a.add(r);var o=Un(r);e.addEventListener(r,nr,{passive:o});var i=pr.get(r);void 0===i?(document.addEventListener(r,nr,{passive:o}),pr.set(r,1)):pr.set(r,i+1)}}};l(v(Kn)),Xn.add(l);var c=void 0,u=function(t){Yt.ensure();const e=kn(64|T,t,!0);return(t={})=>new Promise(n=>{t.outro?An(e,()=>{Tn(e),n(void 0)}):(Tn(e),n(void 0))})}(()=>{var u=n??e.appendChild(pt());return function(t,e,n){new ke(t,{pending:()=>{}},n)}(u,0,e=>{i&&(tt({}),Z.c=i),o&&(r.$$events=o),dr=s,c=t(e,r)||{},dr=!0,i&&et()}),()=>{for(var t of a){e.removeEventListener(t,nr);var r=pr.get(t);0===--r?(document.removeEventListener(t,nr),pr.delete(t)):pr.set(t,r)}Xn.delete(l),u!==n&&u.parentNode?.removeChild(u)}});return gr.set(c,u),c}(t,e)}const pr=new Map;let gr=new WeakMap;function mr(t,e){const n=gr.get(t);return n?(gr.delete(t),n(e)):Promise.resolve()}var wr,yr,br,xr,$r;class kr{constructor(t,e=!0){n(this,"anchor"),i(this,wr,new Map),i(this,yr,new Map),i(this,br,new Map),i(this,xr,!0),i(this,$r,()=>{var t=St;if(o(this,wr).has(t)){var e=o(this,wr).get(t),n=o(this,yr).get(e);if(n)Rn(n);else{var r=o(this,br).get(e);r&&(o(this,yr).set(e,r.effect),o(this,br).delete(e),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(const[e,n]of o(this,wr)){if(o(this,wr).delete(e),e===t)break;const r=o(this,br).get(n);r&&(Tn(r.effect),o(this,br).delete(n))}for(const[t,r]of o(this,yr)){if(t===e)continue;const i=()=>{if(Array.from(o(this,wr).values()).includes(t)){var e=document.createDocumentFragment();Dn(r,e),e.append(pt()),o(this,br).set(t,{effect:r,fragment:e})}else Tn(r);o(this,yr).delete(t)};o(this,xr)||!n?An(r,i,!1):i()}}}),this.anchor=t,s(this,xr,e)}ensure(t,e){var n=St;!e||o(this,yr).has(t)||o(this,br).has(t)||o(this,yr).set(t,Wn(()=>e(this.anchor))),o(this,wr).set(n,t),o(this,$r).call(this)}}function _r(t,e,n=!1){var r=new kr(t);function o(t,e){r.ensure(t,e)}In(()=>{var t=!1;e((e,n=!0)=>{t=!0,o(n,e)}),t||o(!1,null)},n?L:0)}wr=new WeakMap,yr=new WeakMap,br=new WeakMap,xr=new WeakMap,$r=new WeakMap;let Mr=null;function Sr(t){Mr=t}function Er(t,e){return e}function Cr(t,e,n,r,o,i=null){var s=t,a={flags:e,items:new Map,first:null};!(4&e)||(s=t.appendChild(pt()));var l,c,u=null,d=!1,h=new Map,p=Oe(()=>{var t=n();return f(t)?t:null==t?[]:v(t)});In(()=>{c??(c=Ze);var t=(l=mn(p)).length;d&&0===t||(d=0===t,function(t,e,n,r,o,i,s,a,l){var c,u,d,f,h,p,g=!!(8&s),m=!!(3&s),w=e.length,y=n.items,b=n.first,x=null,$=[],k=[];if(g)for(p=0;p<w;p+=1)f=a(d=e[p],p),void 0!==(h=y.get(f))&&(h.a?.measure(),(u??(u=new Set)).add(h));for(p=0;p<w;p+=1)if(f=a(d=e[p],p),void 0!==(h=y.get(f))){if(m&&Or(h,d,p,s),0!==(h.e.f&I)&&(Rn(h.e),g&&(h.a?.unfix(),(u??(u=new Set)).delete(h))),h!==b){if(void 0!==c&&c.has(h)){if($.length<k.length){var _,M=k[0];x=M.prev;var S=$[0],E=$[$.length-1];for(_=0;_<$.length;_+=1)Wr($[_],M,o);for(_=0;_<k.length;_+=1)c.delete(k[_]);Pr(n,S.prev,E.next),Pr(n,x,S),Pr(n,E,M),b=M,x=E,p-=1,$=[],k=[]}else c.delete(h),Wr(h,b,o),Pr(n,h.prev,h.next),Pr(n,h,null===x?n.first:x.next),Pr(n,x,h),x=h;continue}for($=[],k=[];null!==b&&b.k!==f;)0===(b.e.f&I)&&(c??(c=new Set)).add(b),k.push(b),b=b.next;if(null===b)continue;h=b}$.push(h),x=h,b=h.next}else{var C=r.get(f);if(void 0!==C){r.delete(f),y.set(f,C);var O=x?x.next:b;Pr(n,x,C),Pr(n,C,O),Wr(C,O,o),x=C}else x=Ir(b?b.e.nodes_start:o,n,x,null===x?n.first:x.next,d,f,p,i,s,l);y.set(f,x),$=[],k=[],b=x.next}if(null!==b||void 0!==c){for(var W=void 0===c?[]:v(c);null!==b;)0===(b.e.f&I)&&W.push(b),b=b.next;var P=W.length;if(P>0){var L=4&s&&0===w?o:null;if(g){for(p=0;p<P;p+=1)W[p].a?.measure();for(p=0;p<P;p+=1)W[p].a?.fix()}!function(t,e,n){for(var r=t.items,o=[],i=e.length,s=0;s<i;s++)zn(e[s].e,o,!0);var a=i>0&&0===o.length&&null!==n;if(a){var l=n.parentNode;(function(t){t.textContent=""})(l),l.append(n),r.clear(),Pr(t,e[0].prev,e[i-1].next)}Nn(o,()=>{for(var n=0;n<i;n++){var o=e[n];a||(r.delete(o.k),Pr(t,o.prev,o.next)),Tn(o.e,!a)}})}(n,W,L)}}for(var T of(g&&st(()=>{if(void 0!==u)for(h of u)h.a?.apply()}),t.first=n.first&&n.first.e,t.last=x&&x.e,r.values()))Tn(T.e);r.clear()}(c,l,a,h,s,o,e,r,n),null!==i&&(0===l.length?u?Rn(u):u=Wn(()=>i(s)):null!==u&&An(u,()=>{u=null})),mn(p))})}function Or(t,e,n,r){!!(1&r)&&ze(t.v,e),2&r?ze(t.i,n):t.i=n}function Ir(t,e,n,r,o,i,s,a,l,c,u){var d=Mr,f=1&l?16&l?Te(o):Ae(o,!1,!1):o,h=2&l?Te(s):s,v={i:h,v:f,k:i,a:null,e:null,prev:n,next:r};Mr=v;try{return null===t&&document.createDocumentFragment().append(t=pt()),v.e=Wn(()=>a(t,f,h,c),!1),v.e.prev=n&&n.e,v.e.next=r&&r.e,null===n?u||(e.first=v):(n.next=v,n.e.next=v.e),null!==r&&(r.prev=v,r.e.prev=v.e),v}finally{Mr=d}}function Wr(t,e,n){for(var r=t.next?t.next.e.nodes_start:n,o=e?e.e.nodes_start:n,i=t.e.nodes_start;null!==i&&i!==r;){var s=mt(i);o.before(i),i=s}}function Pr(t,e,n){null===e?t.first=n:(e.next=n,e.e.next=n&&n.e),null!==n&&(n.prev=e,n.e.prev=e&&e.e)}function Lr(t,e,...n){var r=new kr(t);In(()=>{const t=e()??null;r.ensure(t,t&&(e=>t(e,...n)))},L)}function Tr(t,e,n){var r=new kr(t);In(()=>{var t=e()??null;r.ensure(t,t&&(e=>n(e,t)))},L)}function jr(t,e){var n,r=void 0;In(()=>{r!==(r=e())&&(n&&(Tn(n),n=null),r&&(n=Wn(()=>{En(()=>r(t))})))})}function Ar(t){var e,n,r="";if("string"==typeof t||"number"==typeof t)r+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(n=Ar(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Nr(t){return"object"==typeof t?function(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=Ar(t))&&(r&&(r+=" "),r+=e);return r}(t):t??""}const zr=[..." \t\n\r\f \v\ufeff"];function Rr(t,e=!1){var n=e?" !important;":";",r="";for(var o in t){var i=t[o];null!=i&&""!==i&&(r+=" "+o+": "+i+n)}return r}function Br(t){return"-"!==t[0]||"-"!==t[1]?t.toLowerCase():t}function Dr(t,e,n,r,o,i){var s=t.__className;if(s!==n||void 0===s){var a=function(t,e,n){var r=null==t?"":""+t;if(e&&(r=r?r+" "+e:e),n)for(var o in n)if(n[o])r=r?r+" "+o:o;else if(r.length)for(var i=o.length,s=0;(s=r.indexOf(o,s))>=0;){var a=s+i;0!==s&&!zr.includes(r[s-1])||a!==r.length&&!zr.includes(r[a])?s=a:r=(0===s?"":r.substring(0,s))+r.substring(a+1)}return""===r?null:r}(n,r,i);null==a?t.removeAttribute("class"):e?t.className=a:t.setAttribute("class",a),t.__className=n}else if(i&&o!==i)for(var l in i){var c=!!i[l];(null==o||c!==!!o[l])&&t.classList.toggle(l,c)}return i}function qr(t,e={},n,r){for(var o in n){var i=n[o];e[o]!==i&&(null==n[o]?t.style.removeProperty(o):t.style.setProperty(o,i,r))}}function Fr(t,e,n,r){if(t.__style!==e){var o=function(t,e){if(e){var n,r,o="";if(Array.isArray(e)?(n=e[0],r=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var i=!1,s=0,a=!1,l=[];n&&l.push(...Object.keys(n).map(Br)),r&&l.push(...Object.keys(r).map(Br));var c=0,u=-1;const e=t.length;for(var d=0;d<e;d++){var f=t[d];if(a?"/"===f&&"*"===t[d-1]&&(a=!1):i?i===f&&(i=!1):"/"===f&&"*"===t[d+1]?a=!0:'"'===f||"'"===f?i=f:"("===f?s++:")"===f&&s--,!a&&!1===i&&0===s)if(":"===f&&-1===u)u=d;else if(";"===f||d===e-1){if(-1!==u){var h=Br(t.substring(c,u).trim());l.includes(h)||(";"!==f&&d++,o+=" "+t.substring(c,d).trim()+";")}c=d+1,u=-1}}}return n&&(o+=Rr(n)),r&&(o+=Rr(r,!0)),""===(o=o.trim())?null:o}return null==t?null:String(t)}(e,r);null==o?t.removeAttribute("style"):t.style.cssText=o,t.__style=e}else r&&(Array.isArray(r)?(qr(t,n?.[0],r[0]),qr(t,n?.[1],r[1],"important")):qr(t,n,r));return r}function Gr(t,e,n=!1){if(t.multiple){if(null==e)return;if(!f(e))return void console.warn("https://svelte.dev/e/select_multiple_invalid_value");for(var r of t.options)r.selected=e.includes(Hr(r))}else{for(r of t.options)if(ut(Hr(r),e))return void(r.selected=!0);(!n||void 0!==e)&&(t.selectedIndex=-1)}}function Hr(t){return"__value"in t?t.__value:t.value}const Yr=Symbol("class"),Vr=Symbol("style"),Ur=Symbol("is custom element"),Kr=Symbol("is html");function Xr(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function Zr(t,e,n,r){var o=Qr(t);o[e]!==(o[e]=n)&&("loading"===e&&(t[F]=n),null==n?t.removeAttribute(e):"string"!=typeof n&&eo(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function Jr(t,e,n=[],r=[],o,i=!1,s=!1){_e(n,r,n=>{var r=void 0,i={},s="SELECT"===t.nodeName,a=!1;if(In(()=>{var l=e(...n.map(mn)),c=function(t,e,n,r){var o=Qr(t),i=o[Ur],s=!o[Kr],a=e||{},l="OPTION"===t.tagName;for(var c in e)c in n||(n[c]=null);n.class?n.class=Nr(n.class):(r||n[Yr])&&(n.class=null),n[Vr]&&(n.style??(n.style=null));var u=eo(t);for(const c in n){let g=n[c];if(l&&"value"===c&&null==g)t.value=t.__value="",a[c]=g;else if("class"!==c)if("style"!==c){var d=a[c];if(g!==d||void 0===g&&t.hasAttribute(c)){a[c]=g;var f=c[0]+c[1];if("$$"!==f)if("on"===f){const e={},n="$$"+c;let r=c.slice(2);var h=Gn(r);if(qn(r)&&(r=r.slice(0,-7),e.capture=!0),!h&&d){if(null!=g)continue;t.removeEventListener(r,a[n],e),a[n]=null}if(null!=g)if(h)t[`__${r}`]=g,tr([r]);else{let o=function(t){a[c].call(this,t)};a[n]=Zn(r,t,o,e)}else h&&(t[`__${r}`]=void 0)}else if("style"===c)Zr(t,c,g);else if("autofocus"===c)De(t,!!g);else if(i||"__value"!==c&&("value"!==c||null==g))if("selected"===c&&l)Xr(t,g);else{var v=c;s||(v=Yn(v));var p="defaultValue"===v||"defaultChecked"===v;if(null!=g||i||p)p||u.includes(v)&&(i||"string"!=typeof g)?(t[v]=g,v in o&&(o[v]=X)):"function"!=typeof g&&Zr(t,v,g);else if(o[c]=null,"value"===v||"checked"===v){let n=t;const r=void 0===e;if("value"===v){let t=n.defaultValue;n.removeAttribute(v),n.defaultValue=t,n.value=n.__value=r?t:null}else{let t=n.defaultChecked;n.removeAttribute(v),n.defaultChecked=t,n.checked=!!r&&t}}else t.removeAttribute(c)}else t.value=t.__value=g}}else Fr(t,g,e?.[Vr],n[Vr]),a[c]=g,a[Vr]=n[Vr];else Dr(t,"http://www.w3.org/1999/xhtml"===t.namespaceURI,g,r,e?.[Yr],n[Yr]),a[c]=g,a[Yr]=n[Yr]}return a}(t,r,l,o);a&&s&&"value"in l&&Gr(t,l.value);for(let t of Object.getOwnPropertySymbols(i))l[t]||Tn(i[t]);for(let e of Object.getOwnPropertySymbols(l)){var u=l[e];"@attach"===e.description&&(!r||u!==r[e])&&(i[e]&&Tn(i[e]),i[e]=Wn(()=>jr(t,()=>u))),c[e]=u}r=c}),s){var l=t;En(()=>{Gr(l,r.value,!0),function(t){var e=new MutationObserver(()=>{Gr(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),_n(()=>{e.disconnect()})}(l)})}a=!0})}function Qr(t){return t.__attributes??(t.__attributes={[Ur]:t.nodeName.includes("-"),[Kr]:"http://www.w3.org/1999/xhtml"===t.namespaceURI})}var to=new Map;function eo(t){var e=t.getAttribute("is")||t.nodeName,n=to.get(e);if(n)return n;to.set(e,n=[]);for(var r,o=t,i=Element.prototype;i!==o;){for(var s in r=m(o))r[s].set&&n.push(s);o=b(o)}return n}const no={tick:t=>requestAnimationFrame(t),now:()=>performance.now(),tasks:new Set};function ro(){const t=no.now();no.tasks.forEach(e=>{e.c(t)||(no.tasks.delete(e),e.f())}),0!==no.tasks.size&&no.tick(ro)}function oo(t,e){Fe(()=>{t.dispatchEvent(new CustomEvent(e))})}function io(t){if("float"===t)return"cssFloat";if("offset"===t)return"cssOffset";if(t.startsWith("--"))return t;const e=t.split("-");return 1===e.length?e[0]:e[0]+e.slice(1).map(t=>t[0].toUpperCase()+t.slice(1)).join("")}function so(t){const e={},n=t.split(";");for(const t of n){const[n,r]=t.split(":");if(!n||void 0===r)break;e[io(n.trim())]=r.trim()}return e}const ao=t=>t;function lo(t,e,n,r){var o,i,s,a=!!(1&t),l=!!(2&t),c=!!(4&t),u=a&&l?"both":a?"in":"out",d=e.inert,f=e.style.overflow;function h(){return Fe(()=>o??(o=n()(e,r?.()??{},{direction:u})))}var v={is_global:c,in(){if(e.inert=d,!a)return s?.abort(),void s?.reset?.();l||i?.abort(),oo(e,"introstart"),i=co(e,h(),s,1,()=>{oo(e,"introend"),i?.abort(),i=o=void 0,e.style.overflow=f})},out(t){if(!l)return t?.(),void(o=void 0);e.inert=!0,oo(e,"outrostart"),s=co(e,h(),i,0,()=>{oo(e,"outroend"),t?.()})},stop:()=>{i?.abort(),s?.abort()}},p=Ze;if((p.transitions??(p.transitions=[])).push(v),a&&dr){var g=c;if(!g){for(var m=p.parent;m&&0!==(m.f&L);)for(;(m=m.parent)&&0===(m.f&S););g=!m||0!==(m.f&P)}g&&En(()=>{yn(()=>v.in())})}}function co(t,e,n,r,o){var i=1===r;if($(e)){var s,a=!1;return st(()=>{if(!a){var l=e({direction:i?"in":"out"});s=co(t,l,n,r,o)}}),{abort:()=>{a=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(n?.deactivate(),!e?.duration)return o(),{abort:k,deactivate:k,reset:k,t:()=>r};const{delay:l=0,css:c,tick:u,easing:d=ao}=e;var f=[];if(i&&void 0===n&&(u&&u(0,1),c)){var h=so(c(0,1));f.push(h,h)}var v=()=>1-r,p=t.animate(f,{duration:l,fill:"forwards"});return p.onfinish=()=>{p.cancel();var i=n?.t()??1-r;n?.abort();var s=r-i,a=e.duration*Math.abs(s),l=[];if(a>0){var f=!1;if(c)for(var h=Math.ceil(a/16.666666666666668),g=0;g<=h;g+=1){var m=i+s*d(g/h),w=so(c(m,1-m));l.push(w),f||(f="hidden"===w.overflow)}f&&(t.style.overflow="hidden"),v=()=>{var t=p.currentTime;return i+s*d(t/a)},u&&function(t){let e;0===no.tasks.size&&no.tick(ro),new Promise(n=>{no.tasks.add(e={c:t,f:n})})}(()=>{if("running"!==p.playState)return!1;var t=v();return u(t,1-t),!0})}(p=t.animate(l,{duration:a,fill:"forwards"})).onfinish=()=>{v=()=>r,u?.(r,1-r),o()}},{abort:()=>{p&&(p.cancel(),p.effect=null,p.onfinish=k)},deactivate:()=>{o=k},reset:()=>{0===r&&u?.(1,0)},t:()=>v()}}function uo(t){var e=t.type;return"number"===e||"range"===e}function fo(t){return""===t?null:+t}var ho,vo,po,go,mo;const wo=class{constructor(t){i(this,go),i(this,ho,new WeakMap),i(this,vo),i(this,po),s(this,po,t)}observe(t,e){var n=o(this,ho).get(t)||new Set;return n.add(e),o(this,ho).set(t,n),a(this,go,mo).call(this).observe(t,o(this,po)),()=>{var n=o(this,ho).get(t);n.delete(e),0===n.size&&(o(this,ho).delete(t),o(this,vo).unobserve(t))}}};ho=new WeakMap,vo=new WeakMap,po=new WeakMap,go=new WeakSet,mo=function(){return o(this,vo)??s(this,vo,new ResizeObserver(t=>{for(var e of t)for(var n of(wo.entries.set(e.target,e),o(this,ho).get(e.target)||[]))n(e)}))},n(wo,"entries",new WeakMap);var yo=new wo({box:"border-box"});function bo(t,e){return t===e||t?.[D]===e}function xo(t={},e,n,r){return En(()=>{var r,o;return Cn(()=>{r=o,o=[],yn(()=>{t!==n(...o)&&(e(t,...o),r&&bo(n(...r),t)&&e(null,...r))})}),()=>{st(()=>{o&&bo(n(...o),t)&&e(null,...o)})}}),t}let $o=!1,ko=Symbol();function _o(t,e,n){const r=n[e]??(n[e]={store:null,source:Ae(void 0),unsubscribe:k});if(r.store!==t&&!(ko in n))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=k;else{var o=!0;r.unsubscribe=Lo(t,t=>{o?r.source.v=t:Ne(r.source,t)}),o=!1}return t&&ko in n?No(t):mn(r.source)}function Mo(t,e){return t.set(e),e}function So(){const t={};return[t,function(){_n(()=>{for(var e in t)t[e].unsubscribe();p(t,ko,{enumerable:!1,value:!0})})}]}const Eo={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set:(t,e)=>!1,getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has:(t,e)=>!t.exclude.includes(e)&&e in t.props,ownKeys:t=>Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))};function Co(t,e,n){return new Proxy({props:t,exclude:e},Eo)}const Oo={get(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if($(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r)return r[e]}},set(t,e,n){let r=t.props.length;for(;r--;){let o=t.props[r];$(o)&&(o=o());const i=g(o,e);if(i&&i.set)return i.set(n),!0}return!1},getOwnPropertyDescriptor(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if($(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r){const t=g(r,e);return t&&!t.configurable&&(t.configurable=!0),t}}},has(t,e){if(e===D||e===q)return!1;for(let n of t.props)if($(n)&&(n=n()),null!=n&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props)if($(n)&&(n=n()),n){for(const t in n)e.includes(t)||e.push(t);for(const t of Object.getOwnPropertySymbols(n))e.includes(t)||e.push(t)}return e}};function Io(...t){return new Proxy({props:t},Oo)}function Wo(t,e,n,r){var o,i=!K||!!(2&n),s=!!(8&n),a=!!(16&n),l=r,c=!0,u=()=>(c&&(c=!1,l=a?yn(r):r),l);if(s){var d=D in t||q in t;o=g(t,e)?.set??(d&&e in t?n=>t[e]=n:void 0)}var f,h,v=!1;if(s?[f,v]=function(t){var e=$o;try{return $o=!1,[t(),$o]}finally{$o=e}}(()=>t[e]):f=t[e],void 0===f&&void 0!==r&&(f=u(),o&&(i&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),o(f))),h=i?()=>{var n=t[e];return void 0===n?u():(c=!0,n)}:()=>{var n=t[e];return void 0!==n&&(l=void 0),void 0===n?l:n},i&&!(4&n))return h;if(o){var p=t.$$legacy;return function(t,e){return arguments.length>0?((!i||!e||p||v)&&o(e?h():t),t):h()}}var m=!1,w=(1&n?Se:Oe)(()=>(m=!1,h()));s&&mn(w);var y=Ze;return function(t,e){if(arguments.length>0){const n=e?mn(w):i&&s?lt(t):t;return Ne(w,n),m=!0,void 0!==l&&(l=n),t}return Ye&&m||0!==(y.f&W)?w.v:mn(w)}}function Po(t){var e;null===Z&&U(),K&&null!==Z.l?(e=Z.l,e.u??(e.u={a:[],b:[],m:[]})).m.push(t):Mn(()=>{const e=yn(t);if("function"==typeof e)return e})}function Lo(t,e,n){if(null==t)return e(void 0),k;const r=yn(()=>t.subscribe(e,n));return r.unsubscribe?()=>r.unsubscribe():r}const To=[];function jo(t,e){return{subscribe:Ao(t,e).subscribe}}function Ao(t,e=k){let n=null;const r=new Set;function o(e){if(Y(t,e)&&(t=e,n)){const e=!To.length;for(const e of r)e[1](),To.push(e,t);if(e){for(let t=0;t<To.length;t+=2)To[t][0](To[t+1]);To.length=0}}}function i(e){o(e(t))}return{set:o,update:i,subscribe:function(s,a=k){const l=[s,a];return r.add(l),1===r.size&&(n=e(o,i)||k),s(t),()=>{r.delete(l),0===r.size&&n&&(n(),n=null)}}}}function No(t){let e;return Lo(t,t=>e=t)(),e}const zo=new Map;async function Ro(t,...e){const n=zo.get(t);if(n)for(const r of n)try{await r(...e)}catch(e){console.error(`Playlight ${t} callback error:`,e)}}var Bo;typeof window<"u"&&((Bo=window.__svelte??(window.__svelte={})).v??(Bo.v=new Set)).add("5"),K=!0;const Do=t=>t;function qo(t){const e=t-1;return e*e*e+1}function Fo(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Go(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Ho(t,{delay:e=0,duration:n=400,easing:r=Fo,amount:o=5,opacity:i=0}={}){const s=getComputedStyle(t),a=+s.opacity,l="none"===s.filter?"":s.filter,c=a*(1-i),[u,d]=Go(o);return{delay:e,duration:n,easing:r,css:(t,e)=>`opacity: ${a-c*e}; filter: ${l} blur(${e*u}${d});`}}function Yo(t,{delay:e=0,duration:n=400,easing:r=Do}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:t=>"opacity: "+t*o}}function Vo(t,{delay:e=0,duration:n=400,easing:r=qo,x:o=0,y:i=0,opacity:s=0}={}){const a=getComputedStyle(t),l=+a.opacity,c="none"===a.transform?"":a.transform,u=l*(1-s),[d,f]=Go(o),[h,v]=Go(i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${c} translate(${(1-t)*d}${f}, ${(1-t)*h}${v});\n\t\t\topacity: ${l-u*e}`}}function Uo(t,{delay:e=0,duration:n=400,easing:r=qo,axis:o="y"}={}){const i=getComputedStyle(t),s=+i.opacity,a="y"===o?"height":"width",l=parseFloat(i[a]),c="y"===o?["top","bottom"]:["left","right"],u=c.map(t=>`${t[0].toUpperCase()}${t.slice(1)}`),d=parseFloat(i[`padding${u[0]}`]),f=parseFloat(i[`padding${u[1]}`]),h=parseFloat(i[`margin${u[0]}`]),v=parseFloat(i[`margin${u[1]}`]),p=parseFloat(i[`border${u[0]}Width`]),g=parseFloat(i[`border${u[1]}Width`]);return{delay:e,duration:n,easing:r,css:t=>`overflow: hidden;opacity: ${Math.min(20*t,1)*s};${a}: ${t*l}px;padding-${c[0]}: ${t*d}px;padding-${c[1]}: ${t*f}px;margin-${c[0]}: ${t*h}px;margin-${c[1]}: ${t*v}px;border-${c[0]}-width: ${t*p}px;border-${c[1]}-width: ${t*g}px;min-${a}: 0`}}function Ko(t,{delay:e=0,duration:n=400,easing:r=qo,start:o=0,opacity:i=0}={}){const s=getComputedStyle(t),a=+s.opacity,l="none"===s.transform?"":s.transform,c=1-o,u=a*(1-i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${l} scale(${1-c*e});\n\t\t\topacity: ${a-u*e}\n\t\t`}}const Xo={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var Zo=ar("<svg><!><!></svg>");function Jo(t,e){tt(e,!0);const n=Wo(e,"color",3,"currentColor"),r=Wo(e,"size",3,24),o=Wo(e,"strokeWidth",3,2),i=Wo(e,"absoluteStrokeWidth",3,!1),s=Wo(e,"iconNode",19,()=>[]),a=Co(e,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var l=Zo();Jr(l,t=>({...Xo,...a,width:r(),height:r(),stroke:n(),"stroke-width":t,class:["lucide-icon lucide",e.name&&`lucide-${e.name}`,e.class]}),[()=>i()?24*Number(o())/Number(r()):o()]);var c=wt(l);Cr(c,17,s,Er,(t,e)=>{var n=Ce(()=>M(mn(e),2)),r=cr();(function(t,e,r,o){var i=null,s=Mr,a=new kr(t,!1);In(()=>{const t=mn(n)[0]||null;return null===t?(a.ensure(null,null),void fr(!0)):(a.ensure(t,e=>{var n=Mr;if(Sr(s),t){if(or(i=document.createElementNS("http://www.w3.org/2000/svg",t),i),o){i.appendChild(pt());o(i)}Ze.nodes_end=i,e.before(i)}Sr(n)}),fr(!0),()=>{t&&fr(!1)})},L),_n(()=>{fr(!0)})})(yt(r),0,0,(t,e)=>{Jr(t,()=>({...mn(n)[1]}))}),ur(t,r)}),Lr(bt(c),()=>e.children??k),ur(t,l),et()}function Qo(t,e){tt(e,!0);let n=Co(e,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];Jo(t,Io({name:"loader-circle"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=cr();Lr(yt(r),()=>e.children??k),ur(t,r)},$$slots:{default:!0}})),et()}const ti=Array(12).fill(0);var ei=ir('<div class="sonner-loading-bar"></div>'),ni=ir('<div><div class="sonner-spinner"></div></div>');function ri(...t){return t.filter(Boolean).join(" ")}const oi=typeof document<"u",ii=typeof window<"u"?window:void 0;var si,ai,li,ci;si=new WeakMap,ai=new WeakMap,new class{constructor(t={}){i(this,si),i(this,ai);const{window:e=ii,document:n=e?.document}=t;void 0!==e&&(s(this,si,n),s(this,ai,te(t=>{const n=Jn(e,"focusin",t),r=Jn(e,"focusout",t);return()=>{n(),r()}})))}get current(){var t;return null==(t=o(this,ai))||t.call(this),o(this,si)?function(t){let e=t.activeElement;for(;e?.shadowRoot;){const t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}(o(this,si)):null}},li=new WeakMap,ci=new WeakMap;const ui=new class{constructor(t){i(this,li),i(this,ci),s(this,li,t),s(this,ci,Symbol(t))}get key(){return o(this,ci)}exists(){return t=o(this,ci),rt().has(t);var t}get(){const t=Q(o(this,ci));if(void 0===t)throw new Error(`Context "${o(this,li)}" not found`);return t}getOr(t){const e=Q(o(this,ci));return void 0===e?t:e}set(t){return function(t,e){return rt().set(t,e),e}(o(this,ci),t)}}("<Toaster/>");let di=0;var fi,hi,vi;fi=new WeakMap,hi=new WeakMap,vi=new WeakMap;const pi=new class{constructor(){i(this,fi,je(lt([]))),i(this,hi,je(lt([]))),i(this,vi,t=>{const e=this.toasts.findIndex(e=>e.id===t);return-1===e?null:e}),n(this,"addToast",t=>{oi&&this.toasts.unshift(t)}),n(this,"updateToast",({id:t,data:e,type:n,message:r})=>{const o=this.toasts.findIndex(e=>e.id===t),i=this.toasts[o];this.toasts[o]={...i,...e,id:t,title:r,type:n,updated:!0}}),n(this,"create",t=>{const{message:e,...n}=t,r="number"==typeof t?.id||t.id&&t.id?.length>0?t.id:di++,o=void 0===t.dismissable||t.dismissable,i=void 0===t.type?"default":t.type;return yn(()=>{this.toasts.find(t=>t.id===r)?this.updateToast({id:r,data:t,type:i,message:e,dismissable:o}):this.addToast({...n,id:r,title:e,dismissable:o,type:i})}),r}),n(this,"dismiss",t=>(yn(()=>{if(void 0===t)return void(this.toasts=this.toasts.map(t=>({...t,dismiss:!0})));const e=this.toasts.findIndex(e=>e.id===t);this.toasts[e]&&(this.toasts[e]={...this.toasts[e],dismiss:!0})}),t)),n(this,"remove",t=>{if(void 0===t)return void(this.toasts=[]);const e=o(this,vi).call(this,t);return null!==e?(this.toasts.splice(e,1),t):void 0}),n(this,"message",(t,e)=>this.create({...e,type:"default",message:t})),n(this,"error",(t,e)=>this.create({...e,type:"error",message:t})),n(this,"success",(t,e)=>this.create({...e,type:"success",message:t})),n(this,"info",(t,e)=>this.create({...e,type:"info",message:t})),n(this,"warning",(t,e)=>this.create({...e,type:"warning",message:t})),n(this,"loading",(t,e)=>this.create({...e,type:"loading",message:t})),n(this,"promise",(t,e)=>{if(!e)return;let n;void 0!==e.loading&&(n=this.create({...e,promise:t,type:"loading",message:"string"==typeof e.loading?e.loading:e.loading()}));const r=t instanceof Promise?t:t();let o=void 0!==n;return r.then(t=>{if("object"==typeof t&&t&&"ok"in t&&"boolean"==typeof t.ok&&!t.ok){o=!1;const e=(r=t)&&"object"==typeof r&&"status"in r?`HTTP error! Status: ${r.status}`:`Error! ${r}`;this.create({id:n,type:"error",message:e})}else if(void 0!==e.success){o=!1;const r="function"==typeof e.success?e.success(t):e.success;this.create({id:n,type:"success",message:r})}var r}).catch(t=>{if(void 0!==e.error){o=!1;const r="function"==typeof e.error?e.error(t):e.error;this.create({id:n,type:"error",message:r})}}).finally(()=>{o&&(this.dismiss(n),n=void 0),e.finally?.()}),n}),n(this,"custom",(t,e)=>{const n=e?.id||di++;return this.create({component:t,id:n,...e}),n}),n(this,"removeHeight",t=>{this.heights=this.heights.filter(e=>e.toastId!==t)}),n(this,"setHeight",t=>{const e=o(this,vi).call(this,t.toastId);null!==e?this.heights[e]=t:this.heights.push(t)}),n(this,"reset",()=>{this.toasts=[],this.heights=[]})}get toasts(){return mn(o(this,fi))}set toasts(t){Ne(o(this,fi),t,!0)}get heights(){return mn(o(this,hi))}set heights(t){Ne(o(this,hi),t,!0)}};var gi;class mi{constructor(){i(this,gi,Ce(()=>pi.toasts.filter(t=>!t.dismiss)))}get toasts(){return mn(o(this,gi))}}gi=new WeakMap;const wi=Object.assign(function(t,e){return pi.create({message:t,...e})},{success:pi.success,info:pi.info,warning:pi.warning,error:pi.error,custom:pi.custom,message:pi.message,promise:pi.promise,dismiss:pi.dismiss,loading:pi.loading,getActiveToasts:()=>pi.toasts.filter(t=>!t.dismiss)});function yi(t){return void 0!==t.label}const bi={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function xi(t){return 1/(1.5+Math.abs(t)/20)}var $i=ir("<div><!></div>"),ki=(t,e,n,r,o)=>{mn(e)||!mn(n)||(r(),o.toast.onDismiss?.(o.toast))},_i=ir('<button data-close-button=""><!></button>'),Mi=ir('<div data-icon=""><!> <!></div>'),Si=ir('<div data-description=""><!></div>'),Ei=(t,e,n,r)=>{yi(e.toast.cancel)&&mn(n)&&(e.toast.cancel?.onClick?.(t),r())},Ci=ir('<button data-button="" data-cancel=""> </button>'),Oi=(t,e,n)=>{yi(e.toast.action)&&(e.toast.action?.onClick(t),!t.defaultPrevented&&n())},Ii=ir('<button data-button=""> </button>'),Wi=ir('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),Pi=ir('<li data-sonner-toast=""><!> <!></li>');function Li(t,e){tt(e,!0);let n=Wo(e,"cancelButtonStyle",3,""),r=Wo(e,"actionButtonStyle",3,""),o=Wo(e,"descriptionClass",3,""),i=Wo(e,"unstyled",3,!1),s=Wo(e,"defaultRichColors",3,!1);const a={...bi};let l=je(!1),c=je(!1),u=je(!1),d=je(!1),f=je(!1),h=je(0),v=je(0),p=e.toast.duration||e.duration||4e3,g=je(void 0),m=je(null),w=je(null);const y=Ce(()=>0===e.index),b=Ce(()=>e.index+1<=e.visibleToasts),x=Ce(()=>e.toast.type),$=Ce(()=>!1!==e.toast.dismissable),_=Ce(()=>e.toast.class||""),M=Ce(()=>e.toast.descriptionClass||""),S=Ce(()=>pi.heights.findIndex(t=>t.toastId===e.toast.id)||0),E=Ce(()=>e.toast.closeButton??e.closeButton),C=Ce(()=>e.toast.duration??e.duration??4e3);let O=null;const I=Ce(()=>e.position.split("-")),W=Ce(()=>pi.heights.reduce((t,e,n)=>n>=mn(S)?t:t+e.height,0)),P=function(){let t=je(lt(typeof document<"u"&&document.hidden));return Mn(()=>Jn(document,"visibilitychange",()=>{Ne(t,document.hidden,!0)})),{get current(){return mn(t)}}}(),L=Ce(()=>e.toast.invert||e.invert),T=Ce(()=>"loading"===mn(x)),j=Ce(()=>({...a,...e.classes})),A=Ce(()=>e.toast.title),N=Ce(()=>e.toast.description);let z=je(0),R=je(0);const B=Ce(()=>Math.round(14*mn(S)+mn(W)));function D(){Ne(c,!0),Ne(h,mn(B),!0),pi.removeHeight(e.toast.id),setTimeout(()=>{pi.remove(e.toast.id)},200)}let q;Mn(()=>{let t;mn(A),mn(N),t=e.expanded||e.expandByDefault?1:1-.05*e.index;const n=yn(()=>mn(g));if(void 0===n)return;n.style.setProperty("height","auto");const r=n.offsetHeight,o=n.getBoundingClientRect().height,i=Math.round(o/t+Number.EPSILON&100)/100;let s;n.style.removeProperty("height"),s=Math.abs(i-r)<1?i:r,Ne(v,s,!0),yn(()=>{pi.setHeight({toastId:e.toast.id,height:s})})});const F=Ce(()=>e.toast.promise&&"loading"===mn(x)||e.toast.duration===Number.POSITIVE_INFINITY);function G(){Ne(z,(new Date).getTime(),!0),q=setTimeout(()=>{e.toast.onAutoClose?.(e.toast),D()},p)}Mn(()=>{e.toast.updated&&(clearTimeout(q),p=mn(C),G())}),Mn(()=>(mn(F)||(e.expanded||e.interacting||P.current?function(){if(mn(R)<mn(z)){const t=(new Date).getTime()-mn(z);p-=t}Ne(R,(new Date).getTime(),!0)}():G()),()=>clearTimeout(q))),Po(()=>{Ne(l,!0);const t=mn(g)?.getBoundingClientRect().height;return Ne(v,t,!0),pi.setHeight({toastId:e.toast.id,height:t}),()=>{pi.removeHeight(e.toast.id)}}),Mn(()=>{e.toast.delete&&yn(()=>{D(),e.toast.onDismiss?.(e.toast)})});const H=Ce(()=>e.toast.icon?e.toast.icon:"success"===mn(x)?e.successIcon:"error"===mn(x)?e.errorIcon:"warning"===mn(x)?e.warningIcon:"info"===mn(x)?e.infoIcon:"loading"===mn(x)?e.loadingIcon:null);var Y=Pi();let V;Zr(Y,"tabindex",0),Y.__pointermove=t=>{if(!O||!mn($)||(window.getSelection()?.toString().length??-1)>0)return;const n=t.clientY-O.y,r=t.clientX-O.x,o=e.swipeDirections??function(t){const[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}(e.position);!mn(m)&&(Math.abs(r)>1||Math.abs(n)>1)&&Ne(m,Math.abs(r)>Math.abs(n)?"x":"y",!0);let i={x:0,y:0};if("y"===mn(m)){if(o.includes("top")||o.includes("bottom"))if(o.includes("top")&&n<0||o.includes("bottom")&&n>0)i.y=n;else{const t=n*xi(n);i.y=Math.abs(t)<Math.abs(n)?t:n}}else if("x"===mn(m)&&(o.includes("left")||o.includes("right")))if(o.includes("left")&&r<0||o.includes("right")&&r>0)i.x=r;else{const t=r*xi(r);i.x=Math.abs(t)<Math.abs(r)?t:r}(Math.abs(i.x)>0||Math.abs(i.y)>0)&&Ne(f,!0),mn(g)?.style.setProperty("--swipe-amount-x",`${i.x}px`),mn(g)?.style.setProperty("--swipe-amount-y",`${i.y}px`)},Y.__pointerup=()=>{if(mn(d)||!mn($))return;O=null;const t=Number(mn(g)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),n=Number(mn(g)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),r=(new Date).getTime()-0,o="x"===mn(m)?t:n,i=Math.abs(o)/r;if(Math.abs(o)>=45||i>.11)return Ne(h,mn(B),!0),e.toast.onDismiss?.(e.toast),"x"===mn(m)?Ne(w,t>0?"right":"left",!0):Ne(w,n>0?"down":"up",!0),D(),void Ne(d,!0);mn(g)?.style.setProperty("--swipe-amount-x","0px"),mn(g)?.style.setProperty("--swipe-amount-y","0px"),Ne(f,!1),Ne(u,!1),Ne(m,null)},Y.__pointerdown=t=>{if(mn(T))return;Ne(h,mn(B),!0);const e=t.target;e.setPointerCapture(t.pointerId),"BUTTON"!==e.tagName&&(Ne(u,!0),O={x:t.clientX,y:t.clientY})};var U=wt(Y),K=t=>{var n=_i();n.__click=[ki,T,$,D,e],Lr(wt(n),()=>e.closeIcon??k),On(t=>{Zr(n,"aria-label",e.closeButtonAriaLabel),Zr(n,"data-disabled",mn(T)),Dr(n,1,t)},[()=>Nr(ri(mn(j)?.closeButton,e.toast?.classes?.closeButton))]),ur(t,n)};_r(U,t=>{mn(E)&&!e.toast.component&&"loading"!==mn(x)&&null!==e.closeIcon&&t(K)});var X=bt(U,2),Z=t=>{const n=Ce(()=>e.toast.component);var r=cr();Tr(yt(r),()=>mn(n),(t,n)=>{n(t,Io(()=>e.toast.componentProps,{closeToast:D}))}),ur(t,r)},J=t=>{var i=Wi(),s=yt(i),a=t=>{var n=Mi(),r=wt(n),o=t=>{var n=cr(),r=yt(n),o=t=>{var n=cr();Tr(yt(n),()=>e.toast.icon,(t,e)=>{e(t,{})}),ur(t,n)},i=t=>{(t=>{var n=cr(),r=yt(n),o=t=>{var n=$i();Lr(wt(n),()=>e.loadingIcon),On(t=>{Dr(n,1,t),Zr(n,"data-visible","loading"===mn(x))},[()=>Nr(ri(mn(j)?.loader,e.toast?.classes?.loader,"sonner-loader"))]),ur(t,n)},i=t=>{{let n=Ce(()=>ri(mn(j)?.loader,e.toast.classes?.loader)),r=Ce(()=>"loading"===mn(x));!function(t,e){tt(e,!0);var n=ni();Cr(wt(n),23,()=>ti,(t,e)=>`spinner-bar-${e}`,(t,e)=>{ur(t,ei())}),On(t=>{Dr(n,1,t),Zr(n,"data-visible",e.visible)},[()=>Nr(["sonner-loading-wrapper",e.class].filter(Boolean).join(" "))]),ur(t,n),et()}(t,{get class(){return mn(n)},get visible(){return mn(r)}})}};_r(r,t=>{e.loadingIcon?t(o):t(i,!1)}),ur(t,n)})(t)};_r(r,t=>{e.toast.icon?t(o):t(i,!1)}),ur(t,n)};_r(r,t=>{(e.toast.promise||"loading"===mn(x))&&t(o)});var i=bt(r,2),s=t=>{var n=cr(),r=yt(n),o=t=>{var n=cr();Tr(yt(n),()=>e.toast.icon,(t,e)=>{e(t,{})}),ur(t,n)},i=t=>{var n=cr(),r=yt(n),o=t=>{var n=cr();Lr(yt(n),()=>e.successIcon??k),ur(t,n)},i=t=>{var n=cr(),r=yt(n),o=t=>{var n=cr();Lr(yt(n),()=>e.errorIcon??k),ur(t,n)},i=t=>{var n=cr(),r=yt(n),o=t=>{var n=cr();Lr(yt(n),()=>e.warningIcon??k),ur(t,n)},i=t=>{var n=cr(),r=yt(n),o=t=>{var n=cr();Lr(yt(n),()=>e.infoIcon??k),ur(t,n)};_r(r,t=>{"info"===mn(x)&&t(o)},!0),ur(t,n)};_r(r,t=>{"warning"===mn(x)?t(o):t(i,!1)},!0),ur(t,n)};_r(r,t=>{"error"===mn(x)?t(o):t(i,!1)},!0),ur(t,n)};_r(r,t=>{"success"===mn(x)?t(o):t(i,!1)},!0),ur(t,n)};_r(r,t=>{e.toast.icon?t(o):t(i,!1)}),ur(t,n)};_r(i,t=>{"loading"!==e.toast.type&&t(s)}),On(t=>Dr(n,1,t),[()=>Nr(ri(mn(j)?.icon,e.toast?.classes?.icon))]),ur(t,n)};_r(s,t=>{(mn(x)||e.toast.icon||e.toast.promise)&&null!==e.toast.icon&&(null!==mn(H)||e.toast.icon)&&t(a)});var l=bt(s,2),c=wt(l),u=wt(c),d=t=>{var n=cr(),r=yt(n),o=t=>{const n=Ce(()=>e.toast.title);var r=cr();Tr(yt(r),()=>mn(n),(t,n)=>{n(t,Io(()=>e.toast.componentProps))}),ur(t,r)},i=t=>{var n=lr();On(()=>hr(n,e.toast.title)),ur(t,n)};_r(r,t=>{"string"!=typeof e.toast.title?t(o):t(i,!1)}),ur(t,n)};_r(u,t=>{e.toast.title&&t(d)});var f=bt(c,2),h=t=>{var n=Si(),r=wt(n),i=t=>{const n=Ce(()=>e.toast.description);var r=cr();Tr(yt(r),()=>mn(n),(t,n)=>{n(t,Io(()=>e.toast.componentProps))}),ur(t,r)},s=t=>{var n=lr();On(()=>hr(n,e.toast.description)),ur(t,n)};_r(r,t=>{"string"!=typeof e.toast.description?t(i):t(s,!1)}),On(t=>Dr(n,1,t),[()=>Nr(ri(o(),mn(M),mn(j)?.description,e.toast.classes?.description))]),ur(t,n)};_r(f,t=>{e.toast.description&&t(h)});var v=bt(l,2),p=t=>{var r=cr(),o=yt(r),i=t=>{var n=cr();Tr(yt(n),()=>e.toast.cancel,(t,e)=>{e(t,{})}),ur(t,n)},s=t=>{var r=cr(),o=yt(r),i=t=>{var r=Ci();r.__click=[Ei,e,$,D];var o=wt(r);On(t=>{Fr(r,e.toast.cancelButtonStyle??n()),Dr(r,1,t),hr(o,e.toast.cancel.label)},[()=>Nr(ri(mn(j)?.cancelButton,e.toast?.classes?.cancelButton))]),ur(t,r)};_r(o,t=>{yi(e.toast.cancel)&&t(i)},!0),ur(t,r)};_r(o,t=>{"function"==typeof e.toast.cancel?t(i):t(s,!1)}),ur(t,r)};_r(v,t=>{e.toast.cancel&&t(p)});var g=bt(v,2),m=t=>{var n=cr(),o=yt(n),i=t=>{var n=cr();Tr(yt(n),()=>e.toast.action,(t,e)=>{e(t,{})}),ur(t,n)},s=t=>{var n=cr(),o=yt(n),i=t=>{var n=Ii();n.__click=[Oi,e,D];var o=wt(n);On(t=>{Fr(n,e.toast.actionButtonStyle??r()),Dr(n,1,t),hr(o,e.toast.action.label)},[()=>Nr(ri(mn(j)?.actionButton,e.toast?.classes?.actionButton))]),ur(t,n)};_r(o,t=>{yi(e.toast.action)&&t(i)},!0),ur(t,n)};_r(o,t=>{"function"==typeof e.toast.action?t(i):t(s,!1)}),ur(t,n)};_r(g,t=>{e.toast.action&&t(m)}),On(t=>Dr(c,1,t),[()=>Nr(ri(mn(j)?.title,e.toast?.classes?.title))]),ur(t,i)};_r(X,t=>{e.toast.component?t(Z):t(J,!1)}),xo(Y,t=>Ne(g,t),()=>mn(g)),On((t,n,r,o)=>{Dr(Y,1,t),Zr(Y,"data-rich-colors",e.toast.richColors??s()),Zr(Y,"data-styled",!(e.toast.component||e.toast.unstyled||i())),Zr(Y,"data-mounted",mn(l)),Zr(Y,"data-promise",n),Zr(Y,"data-swiped",mn(f)),Zr(Y,"data-removed",mn(c)),Zr(Y,"data-visible",mn(b)),Zr(Y,"data-y-position",mn(I)[0]),Zr(Y,"data-x-position",mn(I)[1]),Zr(Y,"data-index",e.index),Zr(Y,"data-front",mn(y)),Zr(Y,"data-swiping",mn(u)),Zr(Y,"data-dismissable",mn($)),Zr(Y,"data-type",mn(x)),Zr(Y,"data-invert",mn(L)),Zr(Y,"data-swipe-out",mn(d)),Zr(Y,"data-swipe-direction",mn(w)),Zr(Y,"data-expanded",r),V=Fr(Y,`${e.style} ${e.toast.style}`,V,o)},[()=>Nr(ri(e.class,mn(_),mn(j)?.toast,e.toast?.classes?.toast,mn(j)?.[mn(x)],e.toast?.classes?.[mn(x)])),()=>!!e.toast.promise,()=>!!(e.expanded||e.expandByDefault&&mn(l)),()=>({"--index":e.index,"--toasts-before":e.index,"--z-index":pi.toasts.length-e.index,"--offset":`${mn(c)?mn(h):mn(B)}px`,"--initial-height":e.expandByDefault?"auto":`${mn(v)}px`})]),Qn("dragend",Y,()=>{Ne(u,!1),Ne(m,null),O=null}),ur(t,Y),et()}tr(["pointermove","pointerup","pointerdown","click"]);var Ti=ar('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>'),ji=ar('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>'),Ai=ar('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>'),Ni=ar('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>'),zi=ar('<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');const Ri="24px",Bi="16px",Di="dark",qi="light";var Fi,Gi,Hi=ir("<ol></ol>"),Yi=ir('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');Fi=new WeakSet,Gi=function(){const t=window.location.hostname;return t.startsWith("www.")?t.substring(4):t};const Vi=new class{constructor(){i(this,Fi),this.cachedRequests=new Map,this.pendingCacheRequests=new Map}async request(t,e={}){const{deduplicate:n,...r}=e;if(n&&this.pendingCacheRequests.has(t))return this.pendingCacheRequests.get(t);const o=async()=>{try{const e=`${No(Ha)}${t}`,n=await fetch(e,{...r,headers:{"Content-Type":"application/json",...r.headers}});if(!n.ok){let t;try{t=await n.json()}catch{}switch(n.status){case 429:return console.warn("Playlight request failed due to rate limiting."),null;case 404:return console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production."),null;default:throw new Error(t?.error||t?.message||n.status)}}return await n.json()}catch(t){wi.error("Request failed: "+t.message),console.error("Playlight API request error:",t)}};if(n){const e=o().then(e=>(this.pendingCacheRequests.delete(t),e));return this.pendingCacheRequests.set(t,e),e}return o()}async getCategories(){const t="/categories";if(this.cachedRequests.has(t))return structuredClone(this.cachedRequests.get(t));const e=await this.request(t,{deduplicate:!0});return e&&this.cachedRequests.set(t,e),structuredClone(e)}async getSuggestions(t,e=1){let n="/suggestions";if(t&&(n+="/"+t),n+="?without="+a(this,Fi,Gi).call(this),e&&(n+="&page="+e),this.cachedRequests.has(n))return structuredClone(this.cachedRequests.get(n));const r=await this.request(n,{deduplicate:!0});return r&&this.cachedRequests.set(n,r),structuredClone(r)}async getCurrentGameInfo(){const t="/game-by-domain/"+a(this,Fi,Gi).call(this);if(this.cachedRequests.has(t))return structuredClone(this.cachedRequests.get(t));const e=await this.request(t,{deduplicate:!0});return e&&this.cachedRequests.set(t,e),structuredClone(e)}async trackOpen(t){const e=a(this,Fi,Gi).call(this);await this.request("/event/open",{method:"POST",body:JSON.stringify({domain:e,format:t})})}async trackClick(t,e){const n=a(this,Fi,Gi).call(this);await this.request("/event/click",{method:"POST",body:JSON.stringify({sourceDomain:n,gameId:t,format:e})})}async toggleLike(t,e=!0){const n=e?"like":"unlike";return(await this.request(`/rating/${t}/${n}`,{method:"POST"}))?.success||!1}};var Ui=ir('<div><p class="font-bold text-white uppercase"> </p></div>'),Ki=(t,e,n,r,o,i,s)=>{!mn(e)||mn(n)||r()?function(t,e,n){if(!t||null==e)return console.error("Domain or Game ID are missing!");Vi.trackClick(e,n),window.open("https://"+t+"?utm_source=playlight","_blank","noopener")}(i.game.domain,i.game.id,s()?"widget":r()?"sidebar":"discovery"):o()},Xi=ir('<video playsinline="" loop fetchpriority="low"></video>',2),Zi=ir('<div class="bg-background/25 text-muted-foreground flex items-center justify-center gap-1 border-t p-1 px-2 text-sm"><!> <p class="text-muted-foreground text-sm">Tap again to open</p></div>'),Ji=ir('<div class="bg-background/75 absolute right-0 bottom-0 left-0 z-2 flex max-h-1/3 flex-col overflow-hidden text-white backdrop-blur-xl"><div class="h-full w-full overflow-y-auto p-3"><h3 class="mb-2 truncate text-center text-lg font-bold"> </h3> <p class="text-muted-foreground mb-4 text-center text-sm text-balance"> </p></div> <!> <div></div></div>'),Qi=ir('<div class="prevent-image-select bg-background absolute right-0 -bottom-[18%] left-0 mx-auto aspect-square w-1/5 animate-pulse rounded-full shadow-xl svelte-n3ft5o"></div> <img alt="game logo" fetchpriority="high"/>',1),ts=ir('<div role="button" tabindex="0"><!> <!> <img alt="cover" fetchpriority="high"/> <!> <!></div>');function es(t,e){tt(e,!0);const[n,r]=So(),o=(t,e=k,n=k)=>{var r=Ui();let o;var i=wt(r),l=wt(i);On(t=>{o=Dr(r,1,`bg-background absolute ${a()?"top-2 right-2":"top-3 right-3"} z-3 px-2 py-0.5 transition-opacity select-none`,null,o,t),hr(l,n())},[()=>({"opacity-0":e(),"text-xs":a(),"text-sm":s()})]),ur(t,r)};let i,s=Wo(e,"inWidget",3,!1),a=Wo(e,"inSidebar",3,!1),l=je(!1),c=je(!1),u=je(!1),d=je(!1),f=je(!1),h=je(void 0),v=je(!1),p=je(void 0);function g(){!mn(l)&&!mn(u)&&function(t,e=1){try{const n=new Audio(t);n.volume=e,n.play()}catch(t){console.error("Error playing sound:",t)}}(_o(Ga,"$cdnURL",n)+"/assets/sounds/hover-selection.ogg",.25),Ne(l,!0),clearTimeout(i),i=setTimeout(()=>Ne(c,!0),300),mn(h)&&e.game.cover_video_url&&mn(h).play().catch(t=>console.error("Video error:",t))}function m(){mn(h)&&mn(v)&&mn(h).pause(),Ne(l,!1),clearTimeout(i),Ne(c,!1)}var w=ts();Qn("touchstart",dt,t=>{mn(p)&&!mn(p).contains(t.target)&&m()},void 0,!0),Qn("pointerdown",dt,t=>Ne(u,"touch"===t.pointerType)),Qn("pointermove",dt,t=>Ne(u,"touch"===t.pointerType)),w.__click=[Ki,u,c,a,g,e,s];var y=wt(w),b=t=>{o(t,()=>mn(l),()=>"Featured")},x=t=>{var n=cr(),r=yt(n),i=t=>{o(t,()=>mn(l),()=>"New")};_r(r,t=>{(function(t){const e=new Date;return e.setDate(e.getDate()-7),new Date(t)>e})(e.game?.created_at)&&t(i)},!0),ur(t,n)};_r(y,t=>{e.game?.featured?t(b):t(x,!1)});var $=bt(y,2),_=t=>{var n=Xi();let r;n.muted=!0,xo(n,t=>Ne(h,t),()=>mn(h)),On(t=>{Zr(n,"src",e.game.cover_video_url),r=Dr(n,1,"absolute top-0 left-0 z-1 aspect-[2/3] w-full object-cover opacity-0",null,r,t)},[()=>({"opacity-100":mn(l)&&mn(v)&&e.game.cover_video_url})]),Qn("loadeddata",n,()=>{Ne(v,!0)}),ur(t,n)};_r($,t=>{e.game.cover_video_url&&t(_)});var M=bt($,2);let S;var E=bt(M,2),C=t=>{var n=Ji(),r=wt(n),o=wt(r),i=wt(o),s=wt(bt(o,2)),a=bt(r,2),l=t=>{var e=Zi();(function(t,e){tt(e,!0);let n=Co(e,["$$slots","$$events","$$legacy"]);const r=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];Jo(t,Io({name:"info"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=cr();Lr(yt(r),()=>e.children??k),ur(t,r)},$$slots:{default:!0}})),et()})(wt(e),{size:15}),ur(t,e)};_r(a,t=>{mn(u)&&t(l)});var c=bt(a,2);On(()=>{hr(i,e.game.name),hr(s,e.game.description||"No description."),Dr(c,1,`bg-background/75 pointer-events-none absolute right-0 mask-t-from-0% mask-t-to-100% ${mn(u)?"bottom-7":"bottom-0"} left-0 h-8`)}),lo(3,n,()=>Uo),ur(t,n)};_r(E,t=>{mn(l)&&!a()&&t(C)});var O=bt(E,2),I=t=>{var n=Qi(),r=bt(yt(n),2);let o;On(t=>{Zr(r,"src",e.game.logo_url),o=Dr(r,1,"prevent-image-select absolute right-0 -bottom-[18%] left-0 mx-auto aspect-square w-1/5 overflow-hidden rounded-full object-center opacity-0 transition group-hover:outline-2 svelte-n3ft5o",null,o,t)},[()=>({"opacity-100":mn(f)})]),Qn("load",r,()=>{Ne(f,!0)}),ur(t,n)};_r(O,t=>{a()||t(I)}),xo(w,t=>Ne(p,t),()=>mn(p)),On(t=>{Dr(w,1,`highlight-border group relative flex aspect-[2/3] cursor-pointer flex-col shadow-xl transition hover:outline-2 ${mn(d)?"":"animate-pulse"} ${a()?"h-44":s()?"h-62":"h-92"} ${a()?"bg-muted":"bg-background mt-5 mb-[calc(3dvh+1.5vw)]"}`,"svelte-n3ft5o"),Zr(M,"src",e.game.cover_image_url),S=Dr(M,1,"prevent-image-select absolute top-0 left-0 aspect-[2/3] w-full object-cover opacity-0 transition svelte-n3ft5o",null,S,t)},[()=>({"opacity-100":mn(d)&&(!mn(l)||!mn(v)||!e.game.cover_video_url)})]),Qn("mouseenter",w,g),Qn("mouseleave",w,m),Qn("load",M,()=>{Ne(d,!0)}),ur(t,w),et(),r()}function ns(t){const e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}function rs(t){return--t*t*(2.70158*t+1.70158)+1}function os(t){const e=t-1;return e*e*e+1}function is(t){return Math.sin(t*Math.PI/2)}function ss(t,{from:e,to:n},r={}){var{delay:o=0,duration:i=t=>120*Math.sqrt(t),easing:s=os}=r,a=getComputedStyle(t),l="none"===a.transform?"":a.transform,[c,u]=a.transformOrigin.split(" ").map(parseFloat);c/=t.clientWidth,u/=t.clientHeight;var d=function(t){if("currentCSSZoom"in t)return t.currentCSSZoom;for(var e=t,n=1;null!==e;)n*=+getComputedStyle(e).zoom,e=e.parentElement;return n}(t),f=t.clientWidth/n.width/d,h=t.clientHeight/n.height/d,v=e.left+e.width*c,p=e.top+e.height*u,g=n.left+n.width*c,m=n.top+n.height*u,w=(v-g)*f,y=(p-m)*h,b=e.width/n.width,x=e.height/n.height;return{delay:o,duration:"function"==typeof i?i(Math.sqrt(w*w+y*y)):i,easing:s,css:(t,e)=>`transform: ${l} translate(${e*w}px, ${e*y}px) scale(${t+e*b}, ${t+e*x});`}}tr(["click"]);var as=(t,e,n)=>{Ne(e,""),Ne(n,!mn(n))},ls=ir('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'),cs=ir('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'),us=(t,e,n,r,o)=>{e(n),Ne(r,!1),o.onCategoryChange?.()},ds=ir("<button> </button>"),fs=ir('<div class="space-y-2 p-2"></div>'),hs=ir('<div class="bg-background/85 fixed left-1/2 z-50 mt-22 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur-xl"><div class="border-b p-3"><div class="relative"><div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-1"><!></div> <input type="text" placeholder="Search categories..." class="w-full border-0 bg-transparent text-base p-1 pl-10 text-white focus:ring-0 focus:outline-none"/></div></div> <div class="max-h-60 overflow-y-auto"><!></div></div>'),vs=ir('<div class="flex w-full flex-col"><h1 class="mb-0! text-center text-2xl font-bold text-white drop-shadow-xl sm:text-4xl"><span> </span> <button class="group mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 text-black transition hover:rotate-5"><span class="max-w-[40vw] truncate text-2xl font-bold text-black sm:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');function ps(t,e){tt(e,!0);let n,r=Wo(e,"categories",19,()=>[]),o=Wo(e,"selectedCategory",15),i=je(!1),s=Ce(()=>o()||(r().length>0?r()[0]:"...")),a=je(""),l=je(void 0),c=Ce(()=>mn(a)?r().filter(t=>t.toLowerCase().includes(mn(a).toLowerCase())):r());const u=["Looking for","Interested in","Searching for","Fancy some","What about these"];let d=je(lt(u[0]));Po(()=>{Ne(d,u[Math.floor(Math.random()*u?.length)],!0)});var f=vs();Qn("click",dt,t=>{mn(l)&&!mn(l)?.contains(t.target)&&!n?.contains(t.target)&&Ne(i,!1)});var h=wt(f),v=wt(h),p=wt(v),g=bt(v,2);g.__click=[as,a,i];var m=wt(g),w=wt(m),y=bt(m,2);{let t=Ce(()=>mn(i)?"rotate-180 transform":"");!function(t,e){tt(e,!0);let n=Co(e,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"m6 9 6 6 6-6"}]];Jo(t,Io({name:"chevron-down"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=cr();Lr(yt(r),()=>e.children??k),ur(t,r)},$$slots:{default:!0}})),et()}(y,{size:25,strokeWidth:3,get class(){return`mt-1 ml-1 text-black ${mn(t)??""} transition-transform duration-200`}})}xo(g,t=>n=t,()=>n);var b=bt(h,2),x=t=>{var n=hs(),s=wt(n),u=wt(s),d=wt(u);!function(t,e){tt(e,!0);let n=Co(e,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];Jo(t,Io({name:"search"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=cr();Lr(yt(r),()=>e.children??k),ur(t,r)},$$slots:{default:!0}})),et()}(wt(d),{size:18,strokeWidth:2.5,class:"text-muted-foreground"});var f=bt(d,2),h=wt(bt(s,2)),v=t=>{ur(t,ls())},p=t=>{var n=cr(),r=yt(n),s=t=>{ur(t,cs())},a=t=>{var n=fs();Cr(n,28,()=>mn(c),t=>t,(t,n)=>{var r=ds();r.__click=[us,o,n,i,e];var s=wt(r);On(()=>{Dr(r,1,`w-full cursor-pointer px-4 py-2 text-left transition-colors ${o()!=n?"hover:bg-muted-foreground/20":""} ${o()==n?"bg-white text-black":"text-white"}`),hr(s,n)}),function(t){var e,n,r,o=Mr,i=null;o.a??(o.a={element:t,measure(){e=this.element.getBoundingClientRect()},apply(){if(r?.abort(),n=this.element.getBoundingClientRect(),e.left!==n.left||e.right!==n.right||e.top!==n.top||e.bottom!==n.bottom){const t=ss(this.element,{from:e,to:n},{duration:150});r=co(this.element,t,void 0,1,()=>{r?.abort(),r=void 0})}},fix(){if(!t.getAnimations().length){var{position:n,width:r,height:o}=getComputedStyle(t);if("absolute"!==n&&"fixed"!==n){var s=t.style;i={position:s.position,width:s.width,height:s.height,transform:s.transform},s.position="absolute",s.width=r,s.height=o;var a=t.getBoundingClientRect();if(e.left!==a.left||e.top!==a.top){var l=`translate(${e.left-a.left}px, ${e.top-a.top}px)`;s.transform=s.transform?`${s.transform} ${l}`:l}}}},unfix(){if(i){var e=t.style;e.position=i.position,e.width=i.width,e.height=i.height,e.transform=i.transform}}}),o.a.element=t}(r),ur(t,r)}),ur(t,n)};_r(r,t=>{0===mn(c).length?t(s):t(a,!1)},!0),ur(t,n)};_r(h,t=>{0===r().length?t(v):t(p,!1)}),xo(n,t=>Ne(l,t),()=>mn(l)),function(t,e,n=e){var r=new WeakSet;(function(t,e,n,r=n){t.addEventListener(e,()=>Fe(n));const o=t.__on_r;t.__on_r=o?()=>{o(),r(!0)}:()=>r(!0),qe||(qe=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{if(!t.defaultPrevented)for(const e of t.target.elements)e.__on_r?.()})},{capture:!0}))})(t,"input",async o=>{var i=o?t.defaultValue:t.value;if(i=uo(t)?fo(i):i,n(i),null!==St&&r.add(St),await async function(){await Promise.resolve(),function(){var t=Lt;Lt=!0;try{for(;;){if(at(),0===It.length&&(St?.flush(),0===It.length))return void(Wt=null);Vt()}}finally{Lt=t}}()}(),i!==(i=e())){var s=t.selectionStart,a=t.selectionEnd,l=t.value.length;if(t.value=i??"",null!==a){var c=t.value.length;s===a&&a===l&&c>l?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=s,t.selectionEnd=Math.min(a,c))}}}),null==yn(e)&&t.value&&(n(uo(t)?fo(t.value):t.value),null!==St&&r.add(St)),Cn(()=>{var n=e();if(t===document.activeElement){var o=Et??St;if(r.has(o))return}uo(t)&&n===fo(t.value)||"date"===t.type&&!n&&!t.value||n!==t.value&&(t.value=n??"")})}(f,()=>mn(a),t=>Ne(a,t)),lo(1,n,()=>Yo,()=>({duration:150,easing:is})),lo(2,n,()=>Yo,()=>({duration:200,easing:is})),ur(t,n)};_r(b,t=>{mn(i)&&t(x)}),On(()=>{hr(p,mn(d)),hr(w,mn(s))}),lo(3,f,()=>Ko,()=>({easing:ns,start:.95})),ur(t,f),et()}async function gs(t,e,n,r){e.currentGame?.id&&(Mo(Ba,!n()),Mo(Da,r()+(n()?1:-1)),n()?localStorage.setItem(`playlight_${e.currentGame.id}_liked`,"true"):localStorage.removeItem(`playlight_${e.currentGame.id}_liked`),await Vi.toggleLike(e.currentGame.id,n())||Mo(Da,r()+(n()?-1:1)))}tr(["click"]);var ms=ir('<img alt="logo"/>'),ws=ir('<div class="bg-muted size-5"></div>'),ys=ir('<div class="flex flex-wrap gap-1 text-start"><div class="w-full"><p class="text-muted-foreground text-sm text-nowrap select-none">Currently playing</p></div> <div class="flex w-full items-center gap-2"><!> <p> </p> <div class="mt-0.5 ml-auto flex items-center gap-2"><p class="text-muted-foreground text-sm"> </p> <button class="text-muted-foreground cursor-pointer transition hover:text-white"><!></button></div></div></div>');function bs(t,e){tt(e,!0);const n=()=>_o(Ba,"$currentGameIsLiked",o),r=()=>_o(Da,"$currentGameLikeCount",o),[o,i]=So();let s=je(!1);Mn(()=>{null!=e.currentGame?.id&&(Mo(Ba,null!==localStorage.getItem(`playlight_${e.currentGame.id}_liked`)),Mo(Da,e.currentGame?.likes||0))});var a=ys(),l=bt(wt(a),2),c=wt(l),u=t=>{var n=ms();let r;On(t=>{Zr(n,"src",e.currentGame?.logo_url),r=Dr(n,1,"bg-muted-foreground/50 size-5 text-[0px]! select-none",null,r,t)},[()=>({"animate-pulse":!mn(s)})]),Qn("load",n,()=>{Ne(s,!0)}),ur(t,n)},d=t=>{ur(t,ws())};_r(c,t=>{e.currentGame?.logo_url?t(u):t(d,!1)});var f=bt(c,2);let h;var v=wt(f),p=wt(bt(f,2)),g=wt(p),m=bt(p,2);m.__click=[gs,e,n,r];var w=wt(m);{let t=Ce(()=>n()?"currentColor":"none");!function(t,e){tt(e,!0);let n=Co(e,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"M7 10v12"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"}]];Jo(t,Io({name:"thumbs-up"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=cr();Lr(yt(r),()=>e.children??k),ur(t,r)},$$slots:{default:!0}})),et()}(w,{size:18,strokeWidth:2.5,get fill(){return mn(t)},style:"margin-top: -5px;"})}On(t=>{h=Dr(f,1,"max-w-35 truncate text-lg font-bold text-white",null,h,t),hr(v,e.currentGame?.name||"Unavailable"),hr(g,r()),Fr(m,`color: ${n()?"white !important":""};`),Zr(m,"aria-label",n()?"Unlike game":"Like game")},[()=>({"opacity-50":!e.currentGame?.name})]),ur(t,a),et(),i()}function xs(t,e,n,r,o){Ne(e,!1),Ne(n,250),Ne(r,0),o(250,t=>{Ne(n,250*(1-t)),Ne(r,t,!0)})}tr(["click"]);var $s=ir('<div class="bg-background/85 fixed bottom-4 left-4 z-2 touch-none border p-4 shadow-lg backdrop-blur-xl max-sm:right-4 sm:w-72" role="button" tabindex="0"><!></div>'),ks=ir('<div class="fixed bottom-0 z-3 shadow-xl max-sm:right-4 max-sm:left-4 sm:left-4 sm:w-72"><button class="bg-background/85 hover:bg-background/95 w-full rounded-t-md border border-b-0 px-4 py-2 backdrop-blur-sm transition" aria-label="Show game display"><div class="bg-muted-foreground mx-auto h-px w-16"></div></button></div>'),_s=ir("<!> <!>",1);function Ms(t,e){t.target===t.currentTarget&&"touch"!==t.pointerType&&Mo(Ra,!1)}tr(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend"]);var Ss=ir('<div class="-mx-10 mt-5 flex h-92 w-10 flex-col"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between"><div class="bg-muted-foreground h-1/5 w-px opacity-60 min-[1920px]:h-1/4"></div> <div class="text-muted-foreground origin-center -rotate-90 transform text-sm whitespace-nowrap select-none">From other categories</div> <div class="bg-muted-foreground h-1/5 w-px opacity-60 min-[1920px]:h-1/4"></div></div></div></div>'),Es=(t,e)=>Mo(Ra,!1),Cs=ir('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'),Os=ir('<div class="pointer-events-none flex h-4/5 items-center justify-center gap-4"><p class="text-white">No games found that match the filter.</p></div>'),Is=ir("<!> <!>",1),Ws=ir('<div class="flex h-30 items-center"><!></div>'),Ps=ir('<div class="pointer-events-none mx-auto flex h-fit flex-wrap content-start justify-center gap-10 md:max-w-4/5"><!> <div class="pointer-events-none flex min-h-10 w-full justify-center"><!></div></div>'),Ls=ir('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 flex flex-col justify-center text-white backdrop-blur-md" id="playlight-discovery"><div class="pointer-events-none flex items-center justify-between p-4"><img alt="logo" class="pointer-events-none ml-3 w-50 select-none max-sm:w-40"/> <div class="mt-3.5 mr-4 flex items-center justify-evenly gap-8 overflow-hidden max-sm:mt-3"><button class="cursor-pointer text-white transition hover:opacity-50"><!></button></div></div> <div class="mx-auto px-6 max-sm:py-1 sm:pt-2 sm:pb-6"><!></div> <!> <div class="mask-fade show-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-1so2hji"><!></div> <a href="https://playlight.dev" target="_blank" class="text-muted-foreground fixed right-4 bottom-4 flex items-center gap-1 text-sm transition hover:text-white max-lg:invisible">Game dev? Join Playlight <!></a></div>');function Ts(t,e){tt(e,!0);const n=()=>_o(Ra,"$discoveryOpen",r),[r,o]=So();let i,s=je(!0),a=je(!1),l=je(void 0),c=je(lt([])),u=je(void 0),d=je(lt([])),f=je(1),h=je(!0),v=je(!1),p=je(void 0),g=je(void 0);async function m(){Ne(d,[],!0),Ne(f,1),Ne(h,!0),Ne(v,!1),mn(l)?.featured_game&&mn(u)==mn(l)?.category&&mn(d).push({...mn(l).featured_game,featured:!0}),await w()}async function w(){if(mn(s)||mn(a))return;1===mn(f)?Ne(s,!0):Ne(a,!0);const t=mn(v)?null:mn(u),e=await Vi.getSuggestions(t,mn(f)),n=e?.games||[],r=e?.pageSize||15,o=n.filter(t=>!mn(d).some(e=>e.id===t.id));Ne(d,[...mn(d),...o],!0),n.length<r?!mn(v)&&mn(u)?(Ne(v,!0),Ne(f,1)):Ne(h,!1):Ne(f,mn(f)+1),Ne(s,!1),Ne(a,!1),mn(h)&&mn(p)&&mn(p).getBoundingClientRect().bottom<=window.innerHeight+300&&w()}Po(()=>(i=new IntersectionObserver(t=>{t[0].isIntersecting&&mn(h)&&w()},{rootMargin:"300px",root:mn(g)}),()=>i?.disconnect())),Mn(()=>{mn(p)&&i&&i.observe(mn(p))}),Po(async()=>{await(async t=>{var e=M(t,2);Ne(l,e[0],!0),Ne(c,e[1],!0)})(await Promise.all([Vi.getCurrentGameInfo(),Vi.getCategories()])),Ne(u,mn(l)?.category||mn(c)?.[mn(c)?.length-1],!0),Ne(s,!1),await m()});var y=Ls();Qn("keydown",dt,t=>{"Escape"==t.key&&Mo(Ra,!1)}),y.__pointerup=[Ms,n];var b=wt(y),x=wt(b),$=wt(bt(x,2));$.__click=[Es,n],function(t,e){tt(e,!0);let n=Co(e,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];Jo(t,Io({name:"x"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=cr();Lr(yt(r),()=>e.children??k),ur(t,r)},$$slots:{default:!0}})),et()}(wt($),{size:24,strokeWidth:2.5});var _=bt(b,2);ps(wt(_),{get categories(){return mn(c)},onCategoryChange:m,get selectedCategory(){return mn(u)},set selectedCategory(t){Ne(u,t,!0)}});var S=bt(_,2),E=t=>{!function(t,e){tt(e,!0);let n=je(!1),r=je(0),o=je(1),i=je(!1),s=0;function a(t,e){const n=Date.now();!function r(){const o=Math.min((Date.now()-n)/t,1);e(o),o<1&&requestAnimationFrame(r)}()}function l(t){Ne(i,!0),s=t.type.includes("touch")?t.touches[0].clientY:t.clientY}function c(t){if(!mn(i))return;const e=Math.max(0,(t.type.includes("touch")?t.touches[0].clientY:t.clientY)-s);Ne(r,e,!0),Ne(o,Math.max(0,1-e/150),!0),e>40&&function(){Ne(i,!1);const t=mn(r);a(250,e=>{Ne(r,t+(250-t)*e),Ne(o,Math.max(0,1-1.5*e),!0),1===e&&Ne(n,!0)})}()}function u(){if(mn(i)&&(Ne(i,!1),mn(r)<40)){const t=mn(r);a(250,e=>{Ne(r,t*(1-e)),Ne(o,1)})}}Po(()=>a(250,t=>Ne(o,t,!0)));var d=_s(),f=yt(d),h=t=>{var n=$s();n.__mousedown=l,n.__mousemove=c,n.__mouseup=u,n.__touchstart=l,n.__touchmove=c,n.__touchend=u,bs(wt(n),{get currentGame(){return e.currentGame}}),On(()=>Fr(n,`transform: translateY(${mn(r)??""}px); opacity: ${mn(o)??""}; cursor: grab;`)),Qn("mouseleave",n,u),ur(t,n)};_r(f,t=>{e.currentGame&&!mn(n)&&t(h)});var v=bt(f,2),p=t=>{var e=ks(),i=wt(e);i.__mousedown=[xs,n,r,o,a],i.__touchstart=[xs,n,r,o,a],lo(3,i,()=>Vo,()=>({delay:150,y:30})),ur(t,e)};_r(v,t=>{e.currentGame&&mn(n)&&t(p)}),ur(t,d),et()}(t,{get currentGame(){return mn(l)}})};_r(S,t=>{(!_o(qa,"$sidebarEnabled",r)||_o(Fa,"$sidebarCollapsed",r))&&t(E)});var C=bt(S,2);C.__pointerup=[Ms,n];var O=wt(C),I=t=>{var e=Cs();Qo(wt(e),{class:"animate-spin opacity-75",size:50,strokeWidth:2.25}),ur(t,e)},W=t=>{var e=cr(),n=yt(e),r=t=>{ur(t,Os())},o=t=>{var e=Ps(),n=wt(e);Cr(n,17,()=>mn(d),Er,(t,e,n)=>{const r=Ce(()=>mn(d).findIndex(t=>t.category!==mn(u)&&!t.featured));var o=Is(),i=yt(o),s=t=>{(t=>{ur(t,Ss())})(t)};_r(i,t=>{n==mn(r)&&t(s)}),es(bt(i,2),{get game(){return mn(e)}}),ur(t,o)});var r=bt(n,2),o=wt(r),i=t=>{var e=Ws();Qo(wt(e),{class:"animate-spin opacity-75",size:40,strokeWidth:2.5}),ur(t,e)};_r(o,t=>{mn(a)&&t(i)}),xo(r,t=>Ne(p,t),()=>mn(p)),ur(t,e)};_r(n,t=>{0!==mn(d).length||mn(s)?t(o,!1):t(r)},!0),ur(t,e)};_r(O,t=>{mn(s)&&0===mn(d).length?t(I):t(W,!1)}),xo(C,t=>Ne(g,t),()=>mn(g));var P=bt(C,2);(function(t,e){tt(e,!0);let n=Co(e,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];Jo(t,Io({name:"external-link"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=cr();Lr(yt(r),()=>e.children??k),ur(t,r)},$$slots:{default:!0}})),et()})(bt(wt(P)),{size:14}),On(()=>Zr(x,"src",_o(Ga,"$cdnURL",r)+"/assets/images/logo-white-small.png")),lo(3,y,()=>Ho,()=>({duration:250})),ur(t,y),et(),o()}tr(["pointerup","click"]);var js=ir("<button><!></button>");function As(t,e){let n=Wo(e,"disabled",3,!1),r=Wo(e,"variant",3,"primary");var o=js();o.__click=function(...t){e.onclick?.apply(this,t)},Lr(wt(o),()=>e.children??k),On(()=>{o.disabled=n(),Dr(o,1,`${"primary"==r()?"outline-muted bg-white text-black hover:outline":"secondary"==r()?"bg-background hover:bg-muted outline-muted outline":"ghost"==r()?"hover:opacity-50":""} text-md inline-flex cursor-pointer items-center justify-center gap-2 ${"ghost"!==r()?"hover:bg-background px-3 py-2":""} font-bold text-nowrap uppercase transition hover:text-white ${n()?"pointer-events-none opacity-50":""} ${e.class??""}`)}),ur(t,o)}async function Ns(t=10,e=!1){const[n,r]=await Promise.all([Vi.getCategories(),Vi.getCurrentGameInfo()]),o=r?.category||n?.[n?.length-1],i=await Vi.getSuggestions(o,1);i?.pageSize<t&&console.error("Threshold must be <= than page size to avoid guaranteed re-fetch!");let s=i?.games||[];if(e&&(s=s.slice(0,Math.ceil(t/2))),s.length<t||e){const t=((await Vi.getSuggestions(null,1))?.games||[]).filter(t=>!s.some(e=>e.id===t.id));s=[...s,...t]}return s.slice(0,t)}function zs(t){No(Ra)||(t||console.warn("Format is not specified for open event!"),Ra.set(!0),Vi.trackOpen(t))}tr(["click"]);var Rs=(t,e,n)=>{"touch"!==t.pointerType&&!e()&&n()},Bs=ir('<div class="fixed top-0 right-0 left-0 h-4 max-lg:hidden"></div>'),Ds=ir('<div class="relative"><img alt="" class="group-hover:outline-background relative h-7 w-7 bg-stone-200 outline outline-4 outline-white transition-colors select-none"/></div>'),qs=ir('<div class="ml-3 flex items-center -space-x-2"></div>'),Fs=ir("More games <!>",1),Gs=ir('<div role="menu" tabindex="0" class="bg-background/85 fixed top-4 right-4 left-4 mx-auto flex w-fit max-w-[calc(100%-2rem)] flex-wrap items-center gap-4 overflow-hidden border-1 p-4 shadow-lg backdrop-blur-xl"><p class="truncate text-lg font-semibold text-nowrap text-white"> </p> <!></div>'),Hs=ir("<!> <!>",1);tr(["pointerover"]);var Ys=ir("<!> <!> <!>",1);function Vs(t){const e=()=>_o(Ra,"$discoveryOpen",n),[n,r]=So();var o=Ys(),i=yt(o),s=t=>{Ts(t,{})};_r(i,t=>{e()&&t(s)});var a=bt(i,2);!function(t){tt({},!0);const e=()=>_o(Na,"$config",r),n=()=>_o(Ra,"$discoveryOpen",r),[r,o]=So();let i,s=je(void 0),a=je(void 0),l=je(lt([])),c=je(!1),u=je(void 0);function d(){setTimeout(async()=>{i<Date.now()-50&&(clearTimeout(mn(u)),Ne(u,null),e()?.exitIntent?.immediate?(Ro("exitIntent"),zs("exit intent")):(Ro("exitIntent"),Ne(c,!0),mn(l)?.length||Ne(l,await Ns(3),!0)))},150)}let f=["The cure for boredom.","Ready for what’s next?","Why stop the fun now?","Games don’t play themselves.","A new adventure awaits.","There’s always time for one more."];var h=Hs();Qn("mousemove",dt,function(t){e()?.exitIntent?.enabled&&(mn(s)?.contains(t.target)||mn(a)?.contains(t.target)||(!mn(u)&&mn(c)&&Ne(u,setTimeout(()=>Ne(c,!1),1500),!0),i=Date.now()))});var v=yt(h),p=t=>{var e=Bs();e.__pointerover=[Rs,n,d],xo(e,t=>Ne(s,t),()=>mn(s)),ur(t,e)};_r(v,t=>{e()?.exitIntent?.enabled&&t(p)});var g=bt(v,2),m=t=>{var e=Gs(),n=wt(e),r=wt(n);As(bt(n,2),{class:"group",onclick:()=>{zs("exit intent"),setTimeout(()=>Ne(c,!1),150)},children:(t,e)=>{var n=Fs(),r=bt(yt(n)),o=t=>{var e=qs();Cr(e,21,()=>mn(l),Er,(t,e,n)=>{var r=Ds();let o;var i=wt(r);On(t=>{o=Fr(r,"",o,t),Zr(i,"src",mn(e).logo_url)},[()=>({"z-index":mn(l).length-n})]),ur(t,r)}),lo(3,e,()=>Uo,()=>({axis:"x",duration:150})),ur(t,e)};_r(r,t=>{mn(l)?.length>=3&&t(o)}),ur(t,n)},$$slots:{default:!0}}),xo(e,t=>Ne(a,t),()=>mn(a)),On(t=>hr(r,t),[()=>f[Math.floor(Math.random()*f.length)]]),Qn("mouseenter",e,()=>{clearTimeout(mn(u)),Ne(u,null)}),lo(3,e,()=>Vo,()=>({y:-100,easing:rs,duration:500})),ur(t,e)};_r(g,t=>{mn(c)&&t(m)}),ur(t,h),et(),o()}(a);var l=bt(a,2),c=t=>{!function(t,e){tt(e,!0);let n=Wo(e,"invert",3,!1),r=Wo(e,"position",3,"bottom-right"),o=Wo(e,"hotkey",19,()=>["altKey","KeyT"]),i=Wo(e,"expand",3,!1),s=Wo(e,"closeButton",3,!1),a=Wo(e,"offset",3,Ri),l=Wo(e,"mobileOffset",3,Bi),c=Wo(e,"theme",3,"light"),u=Wo(e,"richColors",3,!1),d=Wo(e,"duration",3,4e3),f=Wo(e,"visibleToasts",3,3),h=Wo(e,"toastOptions",19,()=>({})),v=Wo(e,"dir",7,"auto"),p=Wo(e,"gap",3,14),g=Wo(e,"containerAriaLabel",3,"Notifications"),m=Wo(e,"closeButtonAriaLabel",3,"Close toast"),w=Co(e,["$$slots","$$events","$$legacy","invert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function y(){if("auto"!==v())return v();if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return"auto"!==t&&t?(yn(()=>v(t)),t):(yn(()=>v(window.getComputedStyle(document.documentElement).direction??"ltr")),v())}const b=Ce(()=>Array.from(new Set([r(),...pi.toasts.filter(t=>t.position).map(t=>t.position)].filter(Boolean))));let x=je(!1),$=je(!1),_=je(lt("system"!==(C=c())?C:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Di:qi)),M=je(void 0),S=je(null),E=je(!1);var C;const O=Ce(()=>o().join("+").replace(/Key/g,"").replace(/Digit/g,""));Mn(()=>{pi.toasts.length<=1&&Ne(x,!1)}),Mn(()=>{const t=pi.toasts.filter(t=>t.dismiss&&!t.delete);if(t.length>0){const e=pi.toasts.map(e=>t.find(t=>t.id===e.id)?{...e,delete:!0}:e);pi.toasts=e}}),Mn(()=>()=>{mn(M)&&mn(S)&&(mn(S).focus({preventScroll:!0}),Ne(S,null),Ne(E,!1))}),Po(()=>(pi.reset(),Jn(document,"keydown",t=>{o().every(e=>t[e]||t.code===e)&&(Ne(x,!0),mn(M)?.focus()),"Escape"===t.code&&(document.activeElement===mn(M)||mn(M)?.contains(document.activeElement))&&Ne(x,!1)}))),Mn(()=>{if("system"!==c()&&Ne(_,c()),typeof window<"u"){"system"===c()&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ne(_,Di):Ne(_,qi));const t=window.matchMedia("(prefers-color-scheme: dark)"),e=({matches:t})=>{Ne(_,t?Di:qi,!0)};"addEventListener"in t?t.addEventListener("change",e):t.addListener(e)}});const I=t=>{e.onblur?.(t),mn(E)&&!t.currentTarget.contains(t.relatedTarget)&&(Ne(E,!1),mn(S)&&(mn(S).focus({preventScroll:!0}),Ne(S,null)))},W=t=>{e.onfocus?.(t),!(t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissable)&&(mn(E)||(Ne(E,!0),Ne(S,t.relatedTarget,!0)))},P=t=>{e.onpointerdown?.(t),!(t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissable)&&Ne($,!0)},L=t=>{e.onmouseenter?.(t),Ne(x,!0)},T=t=>{e.onmouseleave?.(t),mn($)||Ne(x,!1)},j=t=>{e.onmousemove?.(t),Ne(x,!0)},A=t=>{e.ondragend?.(t),Ne(x,!1)},N=t=>{e.onpointerup?.(t),Ne($,!1)};ui.set(new mi);var z=Yi();Zr(z,"tabindex",-1);var R=wt(z),B=t=>{var r=cr();Cr(yt(r),18,()=>mn(b),t=>t,(t,r,o,c)=>{const v=Ce(()=>{const[t,e]=r.split("-");return{y:t,x:e}}),g=Ce(()=>function(t,e){const n={};return[t,e].forEach((t,e)=>{const r=1===e,o=r?"--mobile-offset":"--offset",i=r?Bi:Ri;function s(t){["top","right","bottom","left"].forEach(e=>{n[`${o}-${e}`]="number"==typeof t?`${t}px`:t})}"number"==typeof t||"string"==typeof t?s(t):"object"==typeof t?["top","right","bottom","left"].forEach(e=>{const r=t[e];n[`${o}-${e}`]=void 0===r?i:"number"==typeof r?`${r}px`:r}):s(i)}),n}(a(),l()));var b=Hi();Jr(b,(t,n)=>({tabindex:-1,dir:t,class:e.class,"data-sonner-toaster":!0,"data-sonner-theme":mn(_),"data-y-position":mn(v).y,"data-x-position":mn(v).x,style:e.style,onblur:I,onfocus:W,onmouseenter:L,onmousemove:j,onmouseleave:T,ondragend:A,onpointerdown:P,onpointerup:N,...w,[Vr]:n}),[y,()=>({"--front-toast-height":`${pi.heights[0]?.height}px`,"--width":"356px","--gap":`${p()}px`,"--offset-top":mn(g)["--offset-top"],"--offset-right":mn(g)["--offset-right"],"--offset-bottom":mn(g)["--offset-bottom"],"--offset-left":mn(g)["--offset-left"],"--mobile-offset-top":mn(g)["--mobile-offset-top"],"--mobile-offset-right":mn(g)["--mobile-offset-right"],"--mobile-offset-bottom":mn(g)["--mobile-offset-bottom"],"--mobile-offset-left":mn(g)["--mobile-offset-left"]})],void 0,"svelte-nbs0zk"),Cr(b,23,()=>pi.toasts.filter(t=>!t.position&&0===mn(o)||t.position===r),t=>t.id,(t,o,a,l)=>{{const l=t=>{var n=cr(),r=yt(n),o=t=>{var n=cr();Lr(yt(n),()=>e.successIcon??k),ur(t,n)},i=t=>{var n=cr(),r=yt(n),o=t=>{!function(t){ur(t,Ti())}(t)};_r(r,t=>{null!==e.successIcon&&t(o)},!0),ur(t,n)};_r(r,t=>{e.successIcon?t(o):t(i,!1)}),ur(t,n)},c=t=>{var n=cr(),r=yt(n),o=t=>{var n=cr();Lr(yt(n),()=>e.errorIcon??k),ur(t,n)},i=t=>{var n=cr(),r=yt(n),o=t=>{!function(t){ur(t,ji())}(t)};_r(r,t=>{null!==e.errorIcon&&t(o)},!0),ur(t,n)};_r(r,t=>{e.errorIcon?t(o):t(i,!1)}),ur(t,n)},v=t=>{var n=cr(),r=yt(n),o=t=>{var n=cr();Lr(yt(n),()=>e.warningIcon??k),ur(t,n)},i=t=>{var n=cr(),r=yt(n),o=t=>{!function(t){ur(t,Ai())}(t)};_r(r,t=>{null!==e.warningIcon&&t(o)},!0),ur(t,n)};_r(r,t=>{e.warningIcon?t(o):t(i,!1)}),ur(t,n)},p=t=>{var n=cr(),r=yt(n),o=t=>{var n=cr();Lr(yt(n),()=>e.infoIcon??k),ur(t,n)},i=t=>{var n=cr(),r=yt(n),o=t=>{!function(t){ur(t,Ni())}(t)};_r(r,t=>{null!==e.infoIcon&&t(o)},!0),ur(t,n)};_r(r,t=>{e.infoIcon?t(o):t(i,!1)}),ur(t,n)},g=t=>{var n=cr(),r=yt(n),o=t=>{var n=cr();Lr(yt(n),()=>e.closeIcon??k),ur(t,n)},i=t=>{var n=cr(),r=yt(n),o=t=>{!function(t){ur(t,zi())}(t)};_r(r,t=>{null!==e.closeIcon&&t(o)},!0),ur(t,n)};_r(r,t=>{e.closeIcon?t(o):t(i,!1)}),ur(t,n)};let w=Ce(()=>h()?.duration??d()),y=Ce(()=>h()?.class??""),b=Ce(()=>h()?.descriptionClass||""),_=Ce(()=>h()?.style??""),M=Ce(()=>h().classes||{}),S=Ce(()=>h().unstyled??!1),E=Ce(()=>h()?.cancelButtonStyle??""),C=Ce(()=>h()?.actionButtonStyle??""),O=Ce(()=>h()?.closeButtonAriaLabel??m());Li(t,{get index(){return mn(a)},get toast(){return mn(o)},get defaultRichColors(){return u()},get duration(){return mn(w)},get class(){return mn(y)},get descriptionClass(){return mn(b)},get invert(){return n()},get visibleToasts(){return f()},get closeButton(){return s()},get interacting(){return mn($)},get position(){return r},get style(){return mn(_)},get classes(){return mn(M)},get unstyled(){return mn(S)},get cancelButtonStyle(){return mn(E)},get actionButtonStyle(){return mn(C)},get closeButtonAriaLabel(){return mn(O)},get expandByDefault(){return i()},get expanded(){return mn(x)},get loadingIcon(){return e.loadingIcon},successIcon:l,errorIcon:c,warningIcon:v,infoIcon:p,closeIcon:g,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),xo(b,t=>Ne(M,t),()=>mn(M)),On(()=>b.dir=b.dir),ur(t,b)}),ur(t,r)};_r(R,t=>{pi.toasts.length>0&&t(B)}),On(()=>Zr(z,"aria-label",`${g()??""} ${mn(O)??""}`)),ur(t,z),et()}(t,{})};_r(l,t=>{(e()||_o(qa,"$sidebarEnabled",n))&&t(c)}),ur(t,o),r()}var Us=ir('<div class="flex h-full w-full items-center justify-center"><!></div>'),Ks=ir('<div class="mt-8 flex flex-col gap-5"></div>'),Xs=ir('<div class="grid grid-cols-2 gap-5"></div>'),Zs=ir('<div class="flex h-full w-full items-center justify-center"><p class="text-muted-foreground">Error – See console</p></div>'),Js=ir("All games <!>",1),Qs=(t,e)=>e(t.clientY),ta=(t,e)=>e(t.touches[0].clientY),ea=ir('<img alt="icon" class="pointer-events-none aspect-square w-8"/>'),na=ir('<div role="button" tabindex="0"><!> <!></div>'),ra=ir('<div><img alt="logo" class="pointer-events-none mx-auto mt-4 w-50 select-none"/> <div class="grow-1 overflow-hidden mask-y-from-90% mask-y-to-100% p-5 transition-opacity"><!></div> <div class="flex w-full items-center gap-4 px-4 pb-2"><!></div> <div class="flex w-full border-t"><div class="mt-auto p-4"><!></div> <!></div></div> <!>',1);function oa(t,e){tt(e,!0);const n=()=>_o(Fa,"$sidebarCollapsed",i),r=()=>_o(Ga,"$cdnURL",i),o=()=>_o(Ra,"$discoveryOpen",i),[i,s]=So();let a=je(!1),l=je(void 0),c=je(0),u=je(null),d=je(lt([])),f=Ce(()=>mn(d)?.filter((t,e)=>e%2==0)||[]),h=Ce(()=>mn(d)?.filter((t,e)=>e%2==1)||[]);function v(){sessionStorage.setItem("playlightSidebarState",JSON.stringify({collapsed:n(),buttonY:mn(m)}))}function p(){try{return JSON.parse(sessionStorage.getItem("playlightSidebarState")||"{}")}catch{}}$n(),kn(8|j,()=>{const t=document.documentElement.clientWidth<=768;Mo(Fa,t||!!p()?.collapsed)},!0),Po(async()=>(Ne(m,p()?.buttonY??mn(m),!0),Ne(a,!0),Ne(d,await Ns(14,!0),!0),Ne(l,await Vi.getCurrentGameInfo(),!0),Ne(a,!1),Jn(window,"touchmove",_,{passive:!1})));let g,m=je(100),w=je(!1),y=je(0),b=je(0),x=je(null);function $(t){Ne(w,!0),Ne(y,t,!0),Ne(b,mn(m),!0)}function _(t){mn(w)&&(t.preventDefault(),M(t.touches[0].clientY))}function M(t){if(!mn(w))return;const e=t-mn(y),n=mn(b)+e,r=mn(x)?.offsetHeight;Ne(m,Math.max(0,Math.min(window.innerHeight-r,n)),!0),cancelAnimationFrame(g),g=requestAnimationFrame(v)}function S(t){if(t.preventDefault(),Ne(c,mn(c)-t.deltaY),mn(u)){const t=mn(u).offsetHeight/3;Ne(c,(mn(c)%t+t)%t)}}var E=ra();Qn("mousemove",dt,function(t){mn(w)&&M(t.clientY)}),Qn("mouseup",dt,()=>Ne(w,!1)),Qn("touchend",dt,()=>Ne(w,!1)),Qn("resize",dt,()=>{document.documentElement.clientWidth<=768&&Mo(Fa,!0)});var C=yt(E),O=wt(C),I=bt(O,2),W=wt(I),P=t=>{var e=Us();Qo(wt(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),ur(t,e)},L=t=>{var e=cr(),n=yt(e),r=t=>{var e=Xs();Cr(e,20,()=>({length:2}),Er,(t,e,n)=>{const r=Ce(()=>mn(0==n?f:h));var o=Ks();let i;Cr(o,21,()=>[...mn(r),...mn(r),...mn(r)],Er,(t,e)=>{es(t,{get game(){return mn(e)},inSidebar:!0})}),xo(o,t=>Ne(u,t),()=>mn(u)),On(t=>i=Fr(o,"",i,t),[()=>({transform:`translateY(calc(-33.333% + ${mn(c)??""}px))`})]),ur(t,o)}),Qn("wheel",e,S),ur(t,e)},o=t=>{ur(t,Zs())};_r(n,t=>{mn(d)?.length?t(r):t(o,!1)},!0),ur(t,e)};_r(W,t=>{mn(a)?t(P):t(L,!1)});var T=bt(I,2);As(wt(T),{class:"w-full py-2.5",onclick:()=>zs("sidebar"),get disabled(){return o()},children:(t,e)=>{var n=Js();(function(t,e){tt(e,!0);let n=Co(e,["$$slots","$$events","$$legacy"]);const r=[["line",{x1:"6",x2:"10",y1:"11",y2:"11"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z"}]];Jo(t,Io({name:"gamepad-2"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=cr();Lr(yt(r),()=>e.children??k),ur(t,r)},$$slots:{default:!0}})),et()})(bt(yt(n)),{style:"margin-top: -1px;"}),ur(t,n)},$$slots:{default:!0}});var A=wt(bt(T,2));bs(wt(A),{get currentGame(){return mn(l)}}),As(bt(A,2),{variant:"secondary",class:"text-muted-foreground border-l outline-none!",onclick:()=>{Mo(Fa,!0),v()},children:(t,e)=>{!function(t,e){tt(e,!0);let n=Co(e,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"m6 17 5-5-5-5"}],["path",{d:"m13 17 5-5-5-5"}]];Jo(t,Io({name:"chevrons-right"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=cr();Lr(yt(r),()=>e.children??k),ur(t,r)},$$slots:{default:!0}})),et()}(t,{})},$$slots:{default:!0}});var N=bt(C,2),z=t=>{var e=na();let n;e.__mousedown=[Qs,$],e.__touchstart=[ta,$];var o=wt(e);!function(t,e){tt(e,!0);let n=Co(e,["$$slots","$$events","$$legacy"]);const r=[["circle",{cx:"9",cy:"12",r:"1"}],["circle",{cx:"9",cy:"5",r:"1"}],["circle",{cx:"9",cy:"19",r:"1"}],["circle",{cx:"15",cy:"12",r:"1"}],["circle",{cx:"15",cy:"5",r:"1"}],["circle",{cx:"15",cy:"19",r:"1"}]];Jo(t,Io({name:"grip-vertical"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=cr();Lr(yt(r),()=>e.children??k),ur(t,r)},$$slots:{default:!0}})),et()}(o,{class:"text-muted-foreground aspect-square"}),As(bt(o,2),{variant:"ghost",onclick:()=>{document.documentElement.clientWidth>768?(Mo(Fa,!1),v()):zs("sidebar")},children:(t,e)=>{var n=ea();On(()=>Zr(n,"src",r()+"/assets/images/icon-white-small.png")),ur(t,n)},$$slots:{default:!0}}),xo(e,t=>Ne(x,t),()=>mn(x)),On(t=>{Dr(e,1,"bg-background/85 fixed right-0 flex items-center gap-2 border border-r-0 p-2 shadow-xl backdrop-blur-xl "+(mn(w)?"cursor-grabbing":"cursor-grab")),n=Fr(e,"",n,t)},[()=>({top:mn(m)+"px"})]),lo(3,e,()=>Ho),ur(t,e)};_r(N,t=>{n()&&!o()&&t(z)}),On(()=>{Dr(C,1,`relative z-1 ml-auto flex h-dvh overflow-y-auto ${n()?"w-0":"w-75 border-l"} bg-background flex-col items-center gap-4 text-white transition-[width] duration-150 ease-out`),Zr(O,"src",r()+"/assets/images/logo-white-small.png")}),ur(t,E),et(),s()}tr(["mousedown","touchstart"]);let ia=null,sa=null,aa=!1,la=null,ca=new Map,ua=null;function da(t,e,n,r,o){const i=t.getAttribute("data-playlight-original-href");let s=i?function(t,e){try{const n=new URL(e,document.baseURI);return t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/gi,(t,e,r)=>!(r=r.trim())||/^(data:|https?:|\/\/|\/|#)/.test(r)?t:`url(${e}${new URL(r,n).href}${e})`)}catch{return t}}(e,i):e;s=fa(s,n,r,o),t.textContent=s,t.setAttribute("data-playlight-modified","true")}function fa(t,e,n,r){const o=e/(e+r),i=n+r;return t=(t=(t=(t=(t=(t=(t=(t=t.replace(/(\d+(?:\.\d+)?)(vw|svw|lvw|dvw)/gi,(e,n,r,i)=>{const s=t.substring(0,i),a=s.lastIndexOf("{"),l=s.lastIndexOf("}");if(a>l){const t=s.substring(l+1,a).trim();if(/^html[.\s,:[]/.test(t))return e}return`${(parseFloat(n)*o).toFixed(2)}${r}`})).replace(/\((min-width|max-width):\s*([\d.]+[a-z]+)\)/gi,(t,e,n)=>`(${e}: calc(${n} + ${r}px))`)).replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi,(t,e,n,o,i)=>`(calc(${e} + ${r}px) ${n} width ${o} calc(${i} + ${r}px))`)).replace(/\(width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi,(t,e,n)=>`(width ${e} calc(${n} + ${r}px))`)).replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\)/gi,(t,e,n)=>`(calc(${e} + ${r}px) ${n} width)`)).replace(/\(\s*orientation:\s*portrait\s*\)/gi,`(max-width: ${i}px)`)).replace(/\(\s*orientation:\s*landscape\s*\)/gi,`(min-width: ${i+1}px)`)).replace(/\bbody\s*\{([^}]*)\}/gi,(t,e)=>`.playlight-sdk-inner-wrapper {${e.replace(/\s*!important\s*/gi,"")}}`)}let ha,va=null,pa=null,ga=null,ma=null,wa=null,ya=null,ba=null,xa=null,$a=null,ka=null,_a=new Map,Ma=null,Sa=null,Ea=null,Ca=!1,Oa=!1,Ia=[],Wa=null,Pa=null,La=null;function Ta(){try{const t=document.createElement("div");t.id="playlight-sdk-container",t.className="playlight-sdk playlight-sdk-container",document.body.appendChild(t);const e=vr(Vs,{target:t}),n=new MutationObserver(()=>{document.body.contains(t)||(clearTimeout(La),La=setTimeout(()=>{document.body.contains(t)||(console.warn("Re-mounting Playlight's main container as it was removed!"),n.disconnect(),mr(e),Ta())},0))});n.observe(document.body,{childList:!0})}catch(t){console.error("Error during Playlight mount:",t)}}function ja(){if(!Ca)try{const t=document.body,e=document.documentElement,n=["DIV","MAIN","ARTICLE","SECTION","HEADER","FOOTER","NAV","ASIDE","FORM"],r=Array.from(t.children).filter(t=>n.includes(t.tagName)&&!t.id?.includes("playlight")&&t.children.length>0),o=()=>{const e=document.createElement("div");return e.id="playlight-sdk-inner-wrapper",Array.from(t.children).filter(t=>!["SCRIPT","STYLE"].includes(t.tagName)&&!t.id?.includes("playlight")).forEach(t=>e.appendChild(t)),t.appendChild(e),Oa=!0,e};if(!1!==No(Na)?.sidebar?.hasFrameworkRoot&&r.length>0)if(1===r.length)Sa=r[0],Oa=!1;else if(!0===No(Na)?.sidebar?.hasFrameworkRoot){const t=r.map(t=>t.querySelectorAll("*").length),e=Math.max(...t);Sa=r[t.indexOf(e)],Oa=!1}Sa||(Sa=o()),e.classList.add("playlight-sdk-html"),t.classList.add("playlight-sdk-body"),Sa.classList.add("playlight-sdk-inner-wrapper"),function(t,e){try{va=Object.getOwnPropertyDescriptor(window,"innerWidth"),Object.defineProperty(window,"innerWidth",{get:()=>t.clientWidth,configurable:!0}),ga=Object.getOwnPropertyDescriptor(window,"scrollY")||Object.getOwnPropertyDescriptor(Window.prototype,"scrollY"),Object.defineProperty(window,"scrollY",{get:()=>e.scrollTop,configurable:!0}),ma=Object.getOwnPropertyDescriptor(window,"pageYOffset")||Object.getOwnPropertyDescriptor(Window.prototype,"pageYOffset"),Object.defineProperty(window,"pageYOffset",{get:()=>e.scrollTop,configurable:!0}),wa=Object.getOwnPropertyDescriptor(window,"scrollX")||Object.getOwnPropertyDescriptor(Window.prototype,"scrollX"),Object.defineProperty(window,"scrollX",{get:()=>e.scrollLeft,configurable:!0}),ya=Object.getOwnPropertyDescriptor(window,"pageXOffset")||Object.getOwnPropertyDescriptor(Window.prototype,"pageXOffset"),Object.defineProperty(window,"pageXOffset",{get:()=>e.scrollLeft,configurable:!0}),ba=window.scrollTo,xa=window.scroll,$a=window.scrollBy,window.scrollTo=(...t)=>e.scrollTo(...t),window.scroll=(...t)=>e.scrollTo(...t),window.scrollBy=(...t)=>e.scrollBy(...t),ka=()=>{window.dispatchEvent(new Event("scroll"))},e.addEventListener("scroll",ka),pa=window.matchMedia,window.matchMedia=function(e){const n=()=>{const n=pa||window.matchMedia,r=t.clientWidth,o=document.documentElement.clientWidth-r,i=fa(e,r,window.innerHeight,o);return n.call(window,i)},r=n();_a.has(e)||_a.set(e,{listeners:new Set,lastMatches:r.matches});const o=_a.get(e);return new Proxy(r,{get(t,r){if("media"===r)return e;if("matches"===r)return n().matches;if("addEventListener"===r)return(e,n,...r)=>{"change"===e?o.listeners.add(n):t.addEventListener(e,n,...r)};if("removeEventListener"===r)return(e,n,...r)=>{"change"===e?o.listeners.delete(n):t.removeEventListener(e,n,...r)};const i=t[r];return"function"==typeof i?i.bind(t):i}})},ha||(ha=window.addEventListener("resize",()=>{for(const[t,{listeners:e,lastMatches:n}]of _a.entries()){const r=window.matchMedia(t);if(r.matches!==n){_a.get(t).lastMatches=r.matches;const n=new MediaQueryListEvent("change",{matches:r.matches,media:r.media});e.forEach(t=>t(n))}}}))}catch(t){console.warn("Could not polyfill window properties:",t)}}(t,Sa),function(t){const e=()=>{const e=t.clientWidth,n=document.documentElement.clientWidth-e;Array.from(document.styleSheets).forEach(t=>function(t,e,n,r){const o=t.ownerNode;if(!(!o||t.href&&/playlight/i.test(t.href)))try{if(ca.has(o)){const{originalCSS:t}=ca.get(o);if(null===t)return;da(o,t,e,n,r)}else{if(!t.cssRules?.length)return;if("LINK"===o.tagName){const i=t.href;ca.set(o,{originalCSS:null,originalElement:null}),fetch(i).then(t=>t.text()).then(t=>{if(!ca.has(o))return;ca.delete(o);const i=document.createElement("style");i.setAttribute("data-playlight-original-href",o.href),ca.set(i,{originalCSS:t,originalElement:o}),o.replaceWith(i),da(i,t,e,n,r)}).catch(e=>{console.warn(`Playlight failed to process stylesheet ${t.href||"inline"}:`,e)})}else{const i=o.textContent.trim()||Array.from(t.cssRules).map(t=>t.cssText).join("\n");ca.set(o,{originalCSS:i,originalElement:null}),da(o,i,e,n,r)}}}catch(e){console.warn(`Playlight cannot process stylesheet ${t.href||"inline"}, likely due to CORS restrictions:`,e)}}(t,e,window.innerHeight,n))},n=()=>{aa||(aa=!0,requestAnimationFrame(()=>{aa=!1,e()}))};ia=new ResizeObserver(()=>{const e=document.documentElement.clientWidth-t.clientWidth;ua!==e&&(ua=e,window.dispatchEvent(new Event("resize")),clearTimeout(la),la=setTimeout(n,50))}),ia.observe(t),sa=new MutationObserver(t=>{for(const e of t){for(const t of e.addedNodes)"STYLE"===t.nodeName?n():"LINK"===t.nodeName&&"stylesheet"===t.rel&&(t.sheet?n():t.addEventListener("load",n,{once:!0}));if("attributes"===e.type&&"LINK"===e.target.nodeName){const t=e.target;"stylesheet"===t.rel&&"rel"===e.attributeName&&(t.sheet?n():t.addEventListener("load",n,{once:!0}))}}}),sa.observe(document.head,{childList:!0,attributes:!0,attributeFilter:["rel"]}),e()}(t),Ia=Array.from(t.classList).filter(t=>!t.startsWith("playlight")),Ia.forEach(e=>{Sa.classList.add(e),t.classList.remove(e)});const i=window.getComputedStyle(Sa);"contents"===i.display&&Sa.style.setProperty("display","block","important"),"visible"===i.overflow&&Sa.style.setProperty("overflow","auto","important"),Ma=document.createElement("div"),Ma.className="playlight-sdk playlight-sdk-container-sidebar",e.appendChild(Ma),Ea=vr(oa,{target:Ma}),Wa=new MutationObserver(()=>{const t=!document.documentElement.classList.contains("playlight-sdk-html"),e=!document.body.classList.contains("playlight-sdk-body"),n=Sa&&!document.body.contains(Sa),r=Ma&&!document.documentElement.contains(Ma);(t||e||n||r)&&(clearTimeout(Pa),Pa=setTimeout(()=>{console.warn("Re-mounting Playlight's sidebar container as it was removed!"),Aa(),ja()},0))}),Wa.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),Wa.observe(document.body,{childList:!0}),Ca=!0}catch(t){console.error("Error during sidebar setup:",t)}}function Aa(){if(Ca)try{const t=document.body,e=document.documentElement;Wa?.disconnect(),clearTimeout(Pa),Ea&&mr(Ea),Ma?.parentNode&&e.removeChild(Ma),Oa?(Sa.parentNode===t&&Array.from(Sa.children).forEach(e=>{e.parentNode===Sa&&t.insertBefore(e,Sa)}),Sa.remove()):Sa.classList.remove("playlight-sdk-inner-wrapper"),e.classList.remove("playlight-sdk-html"),t.classList.remove("playlight-sdk-body"),Ia.forEach(e=>{t.classList.add(e),Sa.classList.remove(e)}),function(t){try{Object.defineProperty(window,"innerWidth",va),Object.defineProperty(window,"scrollY",ga),Object.defineProperty(window,"pageYOffset",ma),Object.defineProperty(window,"scrollX",wa),Object.defineProperty(window,"pageXOffset",ya),window.scrollTo=ba,window.scroll=xa,window.scrollBy=$a,t.removeEventListener("scroll",ka),window.matchMedia=pa,va=null,ga=null,ma=null,wa=null,ya=null,ba=null,xa=null,$a=null,ka=null,pa=null}catch(t){console.warn("Could not restore window polyfills:",t)}}(Sa),function(){ia?.disconnect(),window.dispatchEvent(new Event("resize")),sa?.disconnect(),clearTimeout(la),ia=sa=la=ua=null;for(const[t,{originalCSS:e,originalElement:n}]of ca.entries())n?t.replaceWith(n):(t.textContent=e,t.removeAttribute("data-playlight-modified"));ca.clear()}(),Wa=null,Pa=null,Ma=null,Ea=null,Sa=null,Ia=[],Oa=!1,Ca=!1}catch(t){console.error("Error during sidebar removal:",t)}}const Na=Ao(null),za=Ao(!1),Ra=Ao(!1),Ba=Ao(!1),Da=Ao(0),qa=Ao(!1),Fa=Ao(!1),Ga=jo("https://sdk.playlight.dev"),Ha=jo("https://api.playlight.dev/platform");let Ya;Ra.subscribe(t=>{try{t?(Ro("discoveryOpen"),Ya=document.body.style.overflow,document.body.style.setProperty("overflow","hidden","important")):(Ro("discoveryClose"),document.body.style.overflow=Ya)}catch(t){console.error("Error in discoveryOpen store subscription:",t)}}),Na.subscribe(t=>{t?.sidebar?.forceVisible||No(za)?qa.set(!0):qa.set(!1)}),za.subscribe(t=>{t&&qa.set(!0)}),qa.subscribe(t=>{t?(ja(),Ro("sidebarEnable")):(Aa(),Ro("sidebarDisable"))});var Va=ir('<div class="flex h-62 w-full items-center justify-center"><!></div>'),Ua=ir('<div class="snap-center"><!></div>'),Ka=ir('<!> <div class="bg-background/85 my-auto mb-30 flex min-w-40 snap-center flex-wrap items-center justify-center gap-4 p-4 pb-6 shadow-lg backdrop-blur-xl"><p class="w-full text-center text-lg font-semibold text-white">Fancy more?</p> <!></div>',1),Xa=(t,e,n)=>mn(e).scrollBy({left:2*-mn(n),behavior:"smooth"}),Za=ir('<button class="bg-background/85 absolute top-4/9 left-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'),Ja=(t,e,n)=>mn(e).scrollBy({left:2*mn(n),behavior:"smooth"}),Qa=ir('<button class="bg-background/85 absolute top-4/9 right-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'),tl=ir("<!> <!>",1),el=ir('<div class="playlight-sdk playlight-sdk-widget"><div class="relative flex h-full w-full snap-x gap-6 px-0.5 overflow-x-auto"><!></div> <!></div>');function nl(t,e){tt(e,!0);let n=je(!0),r=je(lt([])),o=je(void 0),i=je(0),s=je(!1),a=je(!0),l=je("");function c(t,e){const n=Math.min(t/50,1),r=Math.min(e/50,1);Ne(l,`mask-image: linear-gradient(\n\t\t\tto right,\n\t\t\trgba(0, 0, 0, ${1-.95*n}) 0%,\n\t\t\trgba(0, 0, 0, ${1-.674*n}) 2%,\n\t\t\trgba(0, 0, 0, ${1-.446*n}) 3.5%,\n\t\t\trgba(0, 0, 0, ${1-.26*n}) 5%,\n\t\t\trgba(0, 0, 0, ${1-.14*n}) 6.5%,\n\t\t\trgba(0, 0, 0, ${1-.046*n}) 8%,\n\t\t\tblack 9%,\n\t\t\tblack 91%,\n\t\t\trgba(0, 0, 0, ${.954*r+(1-r)}) 92%,\n\t\t\trgba(0, 0, 0, ${.86*r+(1-r)}) 93.5%,\n\t\t\trgba(0, 0, 0, ${.74*r+(1-r)}) 95%,\n\t\t\trgba(0, 0, 0, ${.554*r+(1-r)}) 96.5%,\n\t\t\trgba(0, 0, 0, ${.326*r+(1-r)}) 98%,\n\t\t\trgba(0, 0, 0, ${.05*r+(1-r)})\n\t\t)`)}Po(async()=>{Ne(n,!0),Ne(r,await Ns(10,!0),!0),Ne(n,!1),requestAnimationFrame(()=>{if(mn(o)){const t=mn(o).scrollWidth-mn(o).clientWidth;c(mn(o).scrollLeft,t-mn(o).scrollLeft)}})});var u=el(),d=wt(u),f=wt(d),h=t=>{var e=Va();Qo(wt(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),ur(t,e)},v=t=>{var e=Ka(),n=yt(e);Cr(n,17,()=>mn(r),Er,(t,e)=>{var n=Ua();es(wt(n),{get game(){return mn(e)},inWidget:!0}),function(t,e,n){var r=yo.observe(t,()=>n(t[e]));En(()=>(yn(()=>n(t[e])),r))}(n,"clientWidth",t=>Ne(i,t)),ur(t,n)});var o=bt(n,2);As(bt(wt(o),2),{onclick:()=>zs("widget"),children:(t,e)=>{ur(t,lr("See all"))},$$slots:{default:!0}}),ur(t,e)};_r(f,t=>{mn(n)?t(h):t(v,!1)}),xo(d,t=>Ne(o,t),()=>mn(o));var p=bt(d,2),g=t=>{var e=tl(),n=yt(e),r=t=>{var e=Za();e.__click=[Xa,o,i],function(t,e){tt(e,!0);let n=Co(e,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"m15 18-6-6 6-6"}]];Jo(t,Io({name:"chevron-left"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=cr();Lr(yt(r),()=>e.children??k),ur(t,r)},$$slots:{default:!0}})),et()}(wt(e),{size:22,strokeWidth:2.75}),lo(3,e,()=>Ho),ur(t,e)};_r(n,t=>{mn(s)&&t(r)});var l=bt(n,2),c=t=>{var e=Qa();e.__click=[Ja,o,i],function(t,e){tt(e,!0);let n=Co(e,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"m9 18 6-6-6-6"}]];Jo(t,Io({name:"chevron-right"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=cr();Lr(yt(r),()=>e.children??k),ur(t,r)},$$slots:{default:!0}})),et()}(wt(e),{size:22,strokeWidth:2.75}),lo(3,e,()=>Ho),ur(t,e)};_r(l,t=>{mn(a)&&t(c)}),ur(t,e)};_r(p,t=>{mn(r).length>0&&t(g)}),On(()=>Fr(d,mn(l))),Qn("scroll",d,t=>{const e=t.target;Ne(s,e.scrollLeft>20),Ne(a,e.scrollLeft<e.scrollWidth-e.clientWidth-20),c(e.scrollLeft,e.scrollWidth-e.clientWidth-e.scrollLeft)}),ur(t,u),et()}function rl(){try{const t=document.querySelectorAll(".playlight-widget-carousel");t.length>0&&t.forEach(t=>{t.dataset.playlightInitialized||(t.dataset.playlightInitialized="true",vr(nl,{target:t}))})}catch(t){console.error("Error occurred initializing and mounting carousel widget:",t)}}tr(["click"]);const ol=new class{init(t={}){if(typeof window>"u")return console.error("Playlight cannot run on the server.");if(window.playlightInitialized)return console.warn("Playlight SDK is already initialized!");this.setConfig(t),Ta(),rl(),function(){try{new MutationObserver(()=>{rl()}).observe(document.body,{childList:!0,subtree:!0})}catch(t){console.error("Error occurred setting up widget observer:",t)}}();const e="true"===sessionStorage.getItem("fromPlaylight"),n="playlight"===new URLSearchParams(window.location.search).get("utm_source");n&&sessionStorage.setItem("fromPlaylight","true"),za.set(e||n),window.playlightInitialized=!0}setDiscovery(t=!0){t?zs("custom"):Ra.set(!1)}onEvent(t,e){if(!["discoveryOpen","discoveryClose","exitIntent","sidebarEnable","sidebarDisable"].includes(t))return console.warn(`Invalid event type "${t}!"`);zo.has(t)||zo.set(t,[]),zo.get(t).push(e)}setConfig(t={}){Na.set(c(t))}};typeof window<"u"&&(window.playlightSDK=ol);export{ol as default};
|
|
1
|
+
var e=Object.defineProperty,t=e=>{throw TypeError(e)},n=(t,n,r)=>((t,n,r)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[n]=r)(t,"symbol"!=typeof n?n+"":n,r),r=(e,n,r)=>n.has(e)||t("Cannot "+r),i=(e,t,n)=>(r(e,t,"read from private field"),n?n.call(e):t.get(e)),o=(e,n,r)=>n.has(e)?t("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,r),s=(e,t,n,i)=>(r(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),l=(e,t,n)=>(r(e,t,"access private method"),n);const a={exitIntent:{enabled:!0,immediate:!1}};function u(e={}){return c(a,e)}function c(e,t){const n={...e};return f(e)&&f(t)&&Object.keys(t).forEach(r=>{f(t[r])?r in e?n[r]=c(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n}function f(e){return e&&"object"==typeof e&&!Array.isArray(e)}var d=Array.isArray,h=Array.prototype.indexOf,v=Array.prototype.includes,p=Array.from,g=Object.defineProperty,m=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyDescriptors,y=Object.prototype,b=Array.prototype,x=Object.getPrototypeOf,k=Object.isExtensible;function _(e){return"function"==typeof e}const $=()=>{};function M(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}const S=1<<24,W=16,j=32,O=512,C=1024,T=2048,E=4096,P=8192,z=16384,A=32768,N=1<<25,q=65536,R=1<<17,I=1<<19,L=1<<25,D=65536,F=1<<21,B=1<<22,V=1<<23,H=Symbol("$state"),K=Symbol("legacy props"),U=Symbol(""),G=Symbol("attributes"),J=Symbol("class"),Z=Symbol("style"),Q=Symbol("text"),X=new class extends Error{constructor(){super(...arguments),n(this,"name","StaleReactionError"),n(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}},Y=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml");function ee(e){return e===this.v}function te(e,t){return e!=e?t==t:e!==t||null!==e&&"object"==typeof e||"function"==typeof e}function ne(e){return!te(e,this.v)}let re=!1;const ie=Symbol(),oe="http://www.w3.org/1999/xhtml";let se=null;function le(e){se=e}function ae(e,t=!1,n){se={p:se,i:!1,c:null,e:null,s:e,x:null,r:Pn,l:re&&!t?{s:null,u:null,$:[]}:null}}function ue(e){var t=se,n=t.e;if(null!==n)for(var r of(t.e=null,n))or(r);return t.i=!0,se=t.p,{}}function ce(){return!re||null!==se&&null===se.l}let fe=[];function de(e){if(0===fe.length){var t=fe;queueMicrotask(()=>{t===fe&&function(){var e=fe;fe=[],function(e){for(var t=0;t<e.length;t++)e[t]()}(e)}()})}fe.push(e)}function he(e){if("object"!=typeof e||null===e||H in e)return e;const t=x(e);if(t!==y&&t!==b)return e;var n=new Map,r=d(e),i=yn(0),o=Fn,s=e=>{if(Fn===o)return e();var t=Cn,n=Fn;En(null),Bn(o);var r=e();return En(t),Bn(n),r};return r&&n.set("length",yn(e.length)),new Proxy(e,{defineProperty(e,t,r){(!("value"in r)||!1===r.configurable||!1===r.enumerable||!1===r.writable)&&function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var i=n.get(t);return void 0===i?s(()=>{var e=yn(r.value);return n.set(t,e),e}):xn(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(void 0===r){if(t in e){const e=s(()=>yn(ie));n.set(t,e),_n(i)}}else xn(r,ie),_n(i);return!0},get(t,r,i){if(r===H)return e;var o=n.get(r),l=r in t;if(void 0===o&&(!l||m(t,r)?.writable)&&(o=s(()=>yn(he(l?t[r]:ie))),n.set(r,o)),void 0!==o){var a=Qn(o);return a===ie?void 0:a}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&"value"in r){var i=n.get(t);i&&(r.value=Qn(i))}else if(void 0===r){var o=n.get(t),s=o?.v;if(void 0!==o&&s!==ie)return{enumerable:!0,configurable:!0,value:s,writable:!0}}return r},has(e,t){if(t===H)return!0;var r=n.get(t),i=void 0!==r&&r.v!==ie||Reflect.has(e,t);return!((void 0!==r||null!==Pn&&(!i||m(e,t)?.writable))&&(void 0===r&&(r=s(()=>yn(i?he(e[t]):ie)),n.set(t,r)),Qn(r)===ie))&&i},set(e,t,o,l){var a=n.get(t),u=t in e;if(r&&"length"===t)for(var c=o;c<a.v;c+=1){var f=n.get(c+"");void 0!==f?xn(f,ie):c in e&&(f=s(()=>yn(ie)),n.set(c+"",f))}void 0===a?(!u||m(e,t)?.writable)&&(xn(a=s(()=>yn(void 0)),he(o)),n.set(t,a)):(u=a.v!==ie,xn(a,s(()=>he(o))));var d=Reflect.getOwnPropertyDescriptor(e,t);if(d?.set&&d.set.call(l,o),!u){if(r&&"string"==typeof t){var h=n.get("length"),v=Number(t);Number.isInteger(v)&&v>=h.v&&xn(h,v+1)}_n(i)}return!0},ownKeys(e){Qn(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return void 0===t||t.v!==ie});for(var[r,o]of n)o.v!==ie&&!(r in e)&&t.push(r);return t},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function ve(e){try{if(null!==e&&"object"==typeof e&&H in e)return e[H]}catch{}return e}function pe(e,t){return Object.is(ve(e),ve(t))}var ge,me,we,ye;function be(e=""){return document.createTextNode(e)}function xe(e){return we.call(e)}function ke(e){return ye.call(e)}function _e(e,t){return xe(e)}function $e(e,t=!1){var n=xe(e);return n instanceof Comment&&""===n.data?ke(n):n}function Me(e,t=1,n=!1){let r=e;for(;t--;)r=ke(r);return r}function Se(e,t,n){return document.createElementNS(t??oe,e,void 0)}function We(e){var t=Pn;if(null===t)return Cn.f|=V,e;if(0===(t.f&A)&&!(4&t.f))throw e;je(e,t)}function je(e,t){for(;null!==t;){if(128&t.f){if(0===(t.f&A))throw e;try{return void t.b.error(e)}catch(t){e=t}}t=t.parent}throw e}const Oe=-7169;function Ce(e,t){e.f=e.f&Oe|t}function Te(e){0!==(e.f&O)||null===e.deps?Ce(e,C):Ce(e,E)}function Ee(e){if(null!==e)for(const t of e)!(2&t.f)||0===(t.f&D)||(t.f^=D,Ee(t.deps))}function Pe(e,t,n){0!==(e.f&T)?t.add(e):0!==(e.f&E)&&n.add(e),Ee(e.deps),Ce(e,C)}function ze(e,t,n){if(null==e)return t(void 0),$;const r=er(()=>e.subscribe(t,n));return r.unsubscribe?()=>r.unsubscribe():r}const Ae=[];function Ne(e,t){return{subscribe:qe(e,t).subscribe}}function qe(e,t=$){let n=null;const r=new Set;function i(t){if(te(e,t)&&(e=t,n)){const t=!Ae.length;for(const t of r)t[1](),Ae.push(t,e);if(t){for(let e=0;e<Ae.length;e+=2)Ae[e][0](Ae[e+1]);Ae.length=0}}}function o(t){i(t(e))}return{set:i,update:o,subscribe:function(s,l=$){const a=[s,l];return r.add(a),1===r.size&&(n=t(i,o)||$),s(e),()=>{r.delete(a),0===r.size&&n&&(n(),n=null)}}}}function Re(e){let t;return ze(e,e=>t=e)(),t}let Ie=!1,Le=!1,De=Symbol();function Fe(e,t,n){const r=n[t]??(n[t]={store:null,source:bn(void 0),unsubscribe:$});if(r.store!==e&&!(De in n))if(r.unsubscribe(),r.store=e??null,null==e)r.source.v=void 0,r.unsubscribe=$;else{var i=!0;r.unsubscribe=ze(e,e=>{i?r.source.v=e:xn(r.source,e)}),i=!1}return e&&De in n?Re(e):Qn(r.source)}function Be(e,t){return function(e,t){Ie=!0;try{e.set(t)}finally{Ie=!1}}(e,t),t}function Ve(){const e={};return[e,function(){rr(()=>{for(var t in e)e[t].unsubscribe();g(e,De,{enumerable:!1,value:!0})})}]}let He=null,Ke=null,Ue=null,Ge=null,Je=null,Ze=null,Qe=!1,Xe=null,Ye=null;var et=0;let tt=1;var nt,rt,it,ot,st,lt,at,ut,ct,ft,dt,ht,vt,pt,gt,mt,wt,yt,bt,xt,kt,_t,$t,Mt,St;const Wt=class e{constructor(){o(this,wt),n(this,"id",tt++),o(this,nt,!1),n(this,"linked",!0),o(this,rt,null),o(this,it,null),n(this,"async_deriveds",new Map),n(this,"current",new Map),n(this,"previous",new Map),n(this,"unblocked",new Set),o(this,ot,new Set),o(this,st,new Set),o(this,lt,new Set),o(this,at,0),o(this,ut,new Map),o(this,ct,null),o(this,ft,[]),o(this,dt,[]),o(this,ht,new Set),o(this,vt,new Set),o(this,pt,new Map),o(this,gt,new Set),n(this,"is_fork",!1),o(this,mt,!1)}skip_effect(e){i(this,pt).has(e)||i(this,pt).set(e,{d:[],m:[]}),i(this,gt).delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=i(this,pt).get(e);if(n){for(var r of(i(this,pt).delete(e),n.d))Ce(r,T),t(r);for(r of n.m)Ce(r,E),t(r)}i(this,gt).add(e)}capture(e,t,n=!1){e.v!==ie&&!this.previous.has(e)&&this.previous.set(e,e.v),0===(e.f&V)&&(this.current.set(e,[t,n]),Je?.set(e,t)),this.is_fork||(e.v=t)}activate(){Ue=this}deactivate(){Ue=null,Je=null}flush(){try{Qe=!0,Ue=this,l(this,wt,bt).call(this)}finally{et=0,Ze=null,Xe=null,Ye=null,Qe=!1,Ue=null,Je=null,gn.clear()}}discard(){for(const e of i(this,st))e(this);i(this,st).clear(),i(this,lt).clear(),l(this,wt,St).call(this)}register_created_effect(e){i(this,dt).push(e)}increment(e,t){if(s(this,at,i(this,at)+1),e){let e=i(this,ut).get(t)??0;i(this,ut).set(t,e+1)}}decrement(e,t){if(s(this,at,i(this,at)-1),e){let e=i(this,ut).get(t)??0;1===e?i(this,ut).delete(t):i(this,ut).set(t,e-1)}i(this,mt)||(s(this,mt,!0),de(()=>{s(this,mt,!1),this.linked&&this.flush()}))}transfer_effects(e,t){for(const t of e)i(this,ht).add(t);for(const e of t)i(this,vt).add(e);e.clear(),t.clear()}oncommit(e){i(this,ot).add(e)}ondiscard(e){i(this,st).add(e)}on_fork_commit(e){i(this,lt).add(e)}run_fork_commit_callbacks(){for(const e of i(this,lt))e(this);i(this,lt).clear()}settled(){return(i(this,ct)??s(this,ct,M())).promise}static ensure(){var t;if(null===Ue){const n=Ue=new e;l(t=n,wt,Mt).call(t),Qe||de(()=>{i(n,nt)||n.flush()})}return Ue}apply(){Je=null}schedule(e){if(Ze=e,e.b?.is_pending&&e.f&(12|S)&&0===(e.f&A))e.b.defer_effect(e);else{for(var t=e;null!==t.parent;){var n=(t=t.parent).f;if(!(null===Xe||t!==Pn||null!==Cn&&2&Cn.f||Ie))return;if(96&n){if(0===(n&C))return;t.f^=C}}i(this,ft).push(t)}}};nt=new WeakMap,rt=new WeakMap,it=new WeakMap,ot=new WeakMap,st=new WeakMap,lt=new WeakMap,at=new WeakMap,ut=new WeakMap,ct=new WeakMap,ft=new WeakMap,dt=new WeakMap,ht=new WeakMap,vt=new WeakMap,pt=new WeakMap,gt=new WeakMap,mt=new WeakMap,wt=new WeakSet,yt=function(){if(this.is_fork)return!0;for(const n of i(this,ut).keys()){for(var e=n,t=!1;null!==e.parent;){if(i(this,pt).has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1},bt=function(){var e,t,n;if(s(this,nt,!0),et++>1e3&&(l(this,wt,St).call(this),function(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(e){je(e,Ze)}}()),!l(this,wt,yt).call(this)){for(const e of i(this,ht))i(this,vt).delete(e),Ce(e,T),this.schedule(e);for(const e of i(this,vt))Ce(e,E),this.schedule(e)}const r=i(this,ft);s(this,ft,[]),this.apply();var o=Xe=[],a=[],u=Ye=[];for(const e of r)try{l(this,wt,xt).call(this,e,o,a)}catch(t){throw Pt(e),t}if(Ue=null,u.length>0){var c=Wt.ensure();for(const e of u)c.schedule(e)}if(Xe=null,Ye=null,l(this,wt,yt).call(this)){l(this,wt,$t).call(this,a),l(this,wt,$t).call(this,o);for(const[e,t]of i(this,pt))Et(e,t);return void(u.length>0&&l(e=Ue,wt,bt).call(e))}const f=l(this,wt,kt).call(this);if(f)l(t=f,wt,_t).call(t,this);else{i(this,ht).clear(),i(this,vt).clear();for(const e of i(this,ot))e(this);i(this,ot).clear(),Ge=this,Ct(a),Ct(o),Ge=null,i(this,ct)?.resolve();var d=Ue;if(this.linked&&0===i(this,at)&&l(this,wt,St).call(this),i(this,ft).length>0){null===d&&(d=this,l(this,wt,Mt).call(this));const e=d;i(e,ft).push(...i(this,ft).filter(t=>!i(e,ft).includes(t)))}null!==d&&l(n=d,wt,bt).call(n)}},xt=function(e,t,n){e.f^=C;for(var r=e.first;null!==r;){var o=r.f,s=!!(96&o);if(!(s&&0!==(o&C)||0!==(o&P)||i(this,pt).has(r))&&null!==r.fn){s?r.f^=C:4&o?t.push(r):Hn(r)&&(0!==(o&W)&&i(this,vt).add(r),Zn(r));var l=r.first;if(null!==l){r=l;continue}}for(;null!==r;){var a=r.next;if(null!==a){r=a;break}r=r.parent}}},kt=function(){for(var e=i(this,rt);null!==e;){if(!e.is_fork)for(const[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e;e=i(e,rt)}return null},_t=function(e){var t;for(const[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(const[t,n]of e.async_deriveds){const e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve)}const n=e=>{var t=e.reactions;if(null!==t)for(const e of t){var r=e.f;if(2&r)n(e);else{var o=e;r&(B|W)&&!this.async_deriveds.has(o)&&(i(this,vt).delete(o),Ce(o,T),this.schedule(o))}}};for(const e of this.current.keys())n(e);this.oncommit(()=>e.discard()),l(t=e,wt,St).call(t),Ue=this,l(this,wt,bt).call(this)},$t=function(e){for(var t=0;t<e.length;t+=1)Pe(e[t],i(this,ht),i(this,vt))},Mt=function(){null===Ke?He=Ke=this:(s(Ke,it,this),s(this,rt,Ke)),Ke=this},St=function(){var e=i(this,rt),t=i(this,it);null===e?He=t:s(e,it,t),null===t?Ke=e:s(t,rt,e),this.linked=!1};let jt=Wt,Ot=null;function Ct(e){var t=e.length;if(0!==t){for(var n=0;n<t;){var r=e[n++];if(!(24576&r.f)&&Hn(r)&&(Ot=new Set,Zn(r),null===r.deps&&null===r.first&&null===r.nodes&&null===r.teardown&&null===r.ac&&pr(r),Ot?.size>0)){gn.clear();for(const e of Ot){if(24576&e.f)continue;const t=[e];let n=e.parent;for(;null!==n;)Ot.has(n)&&(Ot.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){const n=t[e];!(24576&n.f)&&Zn(n)}}Ot.clear()}}Ot=null}}function Tt(e){Ue.schedule(e)}function Et(e,t){if(0===(e.f&j)||0===(e.f&C)){0!==(e.f&T)?t.d.push(e):0!==(e.f&E)&&t.m.push(e),Ce(e,C);for(var n=e.first;null!==n;)Et(n,t),n=n.next}}function Pt(e){Ce(e,C);for(var t=e.first;null!==t;)Pt(t),t=t.next}var zt,At,Nt,qt,Rt,It,Lt,Dt,Ft,Bt,Vt,Ht,Kt,Ut,Gt,Jt,Zt,Qt,Xt,Yt,en,tn;class nn{constructor(e,t,r,a){o(this,Zt),n(this,"parent"),n(this,"is_pending",!1),n(this,"transform_error"),o(this,zt),o(this,At,null),o(this,Nt),o(this,qt),o(this,Rt),o(this,It,null),o(this,Lt,null),o(this,Dt,null),o(this,Ft,null),o(this,Bt,0),o(this,Vt,0),o(this,Ht,!1),o(this,Kt,new Set),o(this,Ut,new Set),o(this,Gt,null),o(this,Jt,function(e){let t,n=0,r=wn(0);return()=>{nr()&&(Qn(r),lr(()=>(0===n&&(t=er(()=>e())),n+=1,()=>{de(()=>{n-=1,0===n&&(t?.(),t=void 0,_n(r))})})))}}(()=>(s(this,Gt,wn(i(this,Bt))),()=>{s(this,Gt,null)}))),s(this,zt,e),s(this,Nt,t),s(this,qt,e=>{var t=Pn;t.b=this,t.f|=128,r(e)}),this.parent=Pn.b,this.transform_error=a??this.parent?.transform_error??(e=>e),s(this,Rt,ur(()=>{l(this,Zt,Qt).call(this)},589824))}defer_effect(e){Pe(e,i(this,Kt),i(this,Ut))}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!i(this,Nt).pending}update_pending_count(e,t){l(this,Zt,en).call(this,e,t),s(this,Bt,i(this,Bt)+e),i(this,Gt)&&!i(this,Ht)&&(s(this,Ht,!0),de(()=>{s(this,Ht,!1),i(this,Gt)&&kn(i(this,Gt),i(this,Bt))}))}get_effect_pending(){return i(this,Jt).call(this),Qn(i(this,Gt))}error(e){if(!i(this,Nt).onerror&&!i(this,Nt).failed)throw e;Ue?.is_fork?(i(this,It)&&Ue.skip_effect(i(this,It)),i(this,Lt)&&Ue.skip_effect(i(this,Lt)),i(this,Dt)&&Ue.skip_effect(i(this,Dt)),Ue.on_fork_commit(()=>{l(this,Zt,tn).call(this,e)})):l(this,Zt,tn).call(this,e)}}function rn(e,t,n,r){const i=ce()?ln:fn;var o=e.filter(e=>!e.settled);if(0!==n.length||0!==o.length){var s=Pn,l=function(){var e=Pn,t=Cn,n=se,r=Ue;return function(i=!0){zn(e),En(t),le(n),i&&0===(e.f&z)&&(r?.activate(),r?.apply())}}(),a=1===o.length?o[0].promise:o.length>1?Promise.all(o.map(e=>e.promise)):null,u=sn();0!==n.length?a?a.then(()=>{l(),f(),on()}):f():a.then(()=>c(t.map(i))).finally(u)}else r(t.map(i));function c(e){if(0===(s.f&z)){l();try{r(e)}catch(e){je(e,s)}on()}}function f(){Promise.all(n.map(e=>un(e))).then(e=>c([...t.map(i),...e])).catch(e=>je(e,s)).finally(u)}}function on(e=!0){zn(null),En(null),le(null),e&&Ue?.deactivate()}function sn(){var e=Pn,t=e.b,n=Ue,r=t.is_rendered();return t.update_pending_count(1,n),n.increment(r,e),()=>{t.update_pending_count(-1,n),n.decrement(r,e)}}function ln(e){return null!==Pn&&(Pn.f|=I),{ctx:se,deps:null,effects:null,equals:ee,f:2050,fn:e,reactions:null,rv:0,v:ie,wv:0,parent:Pn,ac:null}}zt=new WeakMap,At=new WeakMap,Nt=new WeakMap,qt=new WeakMap,Rt=new WeakMap,It=new WeakMap,Lt=new WeakMap,Dt=new WeakMap,Ft=new WeakMap,Bt=new WeakMap,Vt=new WeakMap,Ht=new WeakMap,Kt=new WeakMap,Ut=new WeakMap,Gt=new WeakMap,Jt=new WeakMap,Zt=new WeakSet,Qt=function(){try{if(this.is_pending=this.has_pending_snippet(),s(this,Vt,0),s(this,Bt,0),s(this,It,fr(()=>{i(this,qt).call(this,i(this,zt))})),i(this,Vt)>0){var e=s(this,Ft,document.createDocumentFragment());br(i(this,It),e);const t=i(this,Nt).pending;s(this,Lt,fr(()=>t(i(this,zt))))}else l(this,Zt,Xt).call(this,Ue)}catch(e){this.error(e)}},Xt=function(e){this.is_pending=!1,e.transfer_effects(i(this,Kt),i(this,Ut))},Yt=function(e){var t=Pn,n=Cn,r=se;zn(i(this,Rt)),En(i(this,Rt)),le(i(this,Rt).ctx);try{return jt.ensure(),e()}catch(e){return We(e),null}finally{zn(t),En(n),le(r)}},en=function(e,t){var n;this.has_pending_snippet()?(s(this,Vt,i(this,Vt)+e),0===i(this,Vt)&&(l(this,Zt,Xt).call(this,t),i(this,Lt)&&gr(i(this,Lt),()=>{s(this,Lt,null)}),i(this,Ft)&&(i(this,zt).before(i(this,Ft)),s(this,Ft,null)))):this.parent&&l(n=this.parent,Zt,en).call(n,e,t)},tn=function(e){i(this,It)&&(vr(i(this,It)),s(this,It,null)),i(this,Lt)&&(vr(i(this,Lt)),s(this,Lt,null)),i(this,Dt)&&(vr(i(this,Dt)),s(this,Dt,null));var t=i(this,Nt).onerror;let n=i(this,Nt).failed;var r=!1,o=!1;const a=()=>{r?console.warn("https://svelte.dev/e/svelte_boundary_reset_noop"):(r=!0,o&&function(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}(),null!==i(this,Dt)&&gr(i(this,Dt),()=>{s(this,Dt,null)}),l(this,Zt,Yt).call(this,()=>{l(this,Zt,Qt).call(this)}))},u=e=>{try{o=!0,t?.(e,a),o=!1}catch(e){je(e,i(this,Rt)&&i(this,Rt).parent)}n&&s(this,Dt,l(this,Zt,Yt).call(this,()=>{try{return fr(()=>{var t=Pn;t.b=this,t.f|=128,n(i(this,zt),()=>e,()=>a)})}catch(e){return je(e,i(this,Rt).parent),null}}))};de(()=>{var t;try{t=this.transform_error(e)}catch(e){return void je(e,i(this,Rt)&&i(this,Rt).parent)}null!==t&&"object"==typeof t&&"function"==typeof t.then?t.then(u,e=>je(e,i(this,Rt)&&i(this,Rt).parent)):u(t)})};const an=Symbol("obsolete");function un(e,t,n){let r=Pn;null===r&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var i=void 0,o=wn(ie),s=!Cn,l=new Set;return function(e){tr(B|I,e)}(()=>{var t=Pn,n=M();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==X&&n.reject(e)}).finally(on)}catch(e){n.reject(e),on()}var a=Ue;if(s){if(0!==(t.f&A))var u=sn();if(r.b.is_rendered())a.async_deriveds.get(t)?.reject(an);else for(const e of l.values())e.reject(an);l.add(n),a.async_deriveds.set(t,n)}const c=(e,t=void 0)=>{u?.(),l.delete(n),t!==an&&(a.activate(),t?(o.f|=V,kn(o,t)):(0!==(o.f&V)&&(o.f^=V),kn(o,e)),a.deactivate())};n.promise.then(c,e=>c(null,e||"unknown"))}),rr(()=>{for(const e of l)e.reject(an)}),new Promise(e=>{!function t(n){function r(){n===i?e(o):t(i)}n.then(r,r)}(i)})}function cn(e){const t=ln(e);return Nn(t),t}function fn(e){const t=ln(e);return t.equals=ne,t}function dn(e){var t,n=Pn,r=e.parent;if(!jn&&null!==r&&24576&r.f)return console.warn("https://svelte.dev/e/derived_inert"),e.v;zn(r);try{e.f&=~D,function(e){var t=e.effects;if(null!==t){e.effects=null;for(var n=0;n<t.length;n+=1)vr(t[n])}}(e),t=Un(e)}finally{zn(n)}return t}function hn(e){var t=dn(e);e.equals(t)||(e.wv=Vn(),Ue?.is_fork&&null!==e.deps||(null!==Ue?(Ue.capture(e,t,!0),Ge?.capture(e,t,!0)):e.v=t,null!==e.deps))?jn||(null!==Je?(nr()||Ue?.is_fork)&&Je.set(e,t):Te(e)):Ce(e,C)}function vn(e){if(null!==e.effects)for(const t of e.effects)t.teardown&&Zn(t)}let pn=new Set;const gn=new Map;let mn=!1;function wn(e,t){return{f:0,v:e,reactions:null,equals:ee,rv:0,wv:0}}function yn(e,t){const n=wn(e);return Nn(n),n}function bn(e,t=!1,n=!0){var r;const i=wn(e);return t||(i.equals=ne),re&&n&&null!==se&&null!==se.l&&((r=se.l).s??(r.s=[])).push(i),i}function xn(e,t,n=!1){return null!==Cn&&(!Tn||0!==(Cn.f&R))&&ce()&&4325394&Cn.f&&(null===An||!v.call(An,e))&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),kn(e,n?he(t):t,Ye)}function kn(e,t,n=null){if(!e.equals(t)){gn.set(e,jn?t:e.v);var r=jt.ensure();if(r.capture(e,t),2&e.f){const t=e;0!==(e.f&T)&&dn(t),null===Je&&Te(t)}e.wv=Vn(),$n(e,T,n),ce()&&null!==Pn&&0!==(Pn.f&C)&&!(96&Pn.f)&&(null===In?function(e){In=e}([e]):In.push(e)),!r.is_fork&&pn.size>0&&!mn&&function(){mn=!1;for(const e of pn){let t;0!==(e.f&C)&&Ce(e,E);try{t=Hn(e)}catch{t=!0}t&&Zn(e)}pn.clear()}()}return t}function _n(e){xn(e,e.v+1)}function $n(e,t,n){var r=e.reactions;if(null!==r)for(var i=ce(),o=r.length,s=0;s<o;s++){var l=r[s],a=l.f;if(i||l!==Pn){var u=0===(a&T);if(u&&Ce(l,t),0!==(a&R))pn.add(l);else if(2&a){var c=l;Je?.delete(c),0===(a&D)&&(a&O&&(null===Pn||0===(Pn.f&F))&&(l.f|=D),$n(c,E,n))}else if(u){var f=l;0!==(a&W)&&null!==Ot&&Ot.add(f),null!==n?n.push(f):Tt(f)}}}}function Mn(e,t){if(t){const t=document.body;e.autofocus=!0,de(()=>{document.activeElement===t&&e.focus()})}}function Sn(e){var t=Cn,n=Pn;En(null),zn(null);try{return e()}finally{En(t),zn(n)}}let Wn=!1,jn=!1;function On(e){jn=e}let Cn=null,Tn=!1;function En(e){Cn=e}let Pn=null;function zn(e){Pn=e}let An=null;function Nn(e){null!==Cn&&(null===An?An=[e]:An.push(e))}let qn=null,Rn=0,In=null,Ln=1,Dn=0,Fn=Dn;function Bn(e){Fn=e}function Vn(){return++Ln}function Hn(e){var t=e.f;if(0!==(t&T))return!0;if(2&t&&(e.f&=~D),0!==(t&E)){for(var n=e.deps,r=n.length,i=0;i<r;i++){var o=n[i];if(Hn(o)&&hn(o),o.wv>e.wv)return!0}0!==(t&O)&&null===Je&&Ce(e,C)}return!1}function Kn(e,t,n=!0){var r=e.reactions;if(null!==r&&(null===An||!v.call(An,e)))for(var i=0;i<r.length;i++){var o=r[i];2&o.f?Kn(o,t,!1):t===o&&(n?Ce(o,T):0!==(o.f&C)&&Ce(o,E),Tt(o))}}function Un(e){var t,n=qn,r=Rn,i=In,o=Cn,s=An,l=se,a=Tn,u=Fn,c=e.f;qn=null,Rn=0,In=null,Cn=96&c?null:e,An=null,le(e.ctx),Tn=!1,Fn=++Dn,null!==e.ac&&(Sn(()=>{e.ac.abort(X)}),e.ac=null);try{e.f|=F;var f=(0,e.fn)();e.f|=A;var d=e.deps,h=Ue?.is_fork;if(null!==qn){var v;if(h||Jn(e,Rn),null!==d&&Rn>0)for(d.length=Rn+qn.length,v=0;v<qn.length;v++)d[Rn+v]=qn[v];else e.deps=d=qn;if(nr()&&0!==(e.f&O))for(v=Rn;v<d.length;v++)((t=d[v]).reactions??(t.reactions=[])).push(e)}else!h&&null!==d&&Rn<d.length&&(Jn(e,Rn),d.length=Rn);if(ce()&&null!==In&&!Tn&&null!==d&&!(6146&e.f))for(v=0;v<In.length;v++)Kn(In[v],e);if(null!==o&&o!==e){if(Dn++,null!==o.deps)for(let e=0;e<r;e+=1)o.deps[e].rv=Dn;if(null!==n)for(const e of n)e.rv=Dn;null!==In&&(null===i?i=In:i.push(...In))}return 0!==(e.f&V)&&(e.f^=V),f}catch(e){return We(e)}finally{e.f^=F,qn=n,Rn=r,In=i,Cn=o,An=s,le(l),Tn=a,Fn=u}}function Gn(e,t){let n=t.reactions;if(null!==n){var r=h.call(n,e);if(-1!==r){var i=n.length-1;0===i?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(null===n&&2&t.f&&(null===qn||!v.call(qn,t))){var o=t;0!==(o.f&O)&&(o.f^=O,o.f&=~D),o.v!==ie&&Te(o),function(e){if(null!==e.effects)for(const t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(X),t.teardown=$,t.ac=null,Jn(t,0),hr(t))}(o),Jn(o,0)}}function Jn(e,t){var n=e.deps;if(null!==n)for(var r=t;r<n.length;r++)Gn(e,n[r])}function Zn(e){var t=e.f;if(0===(t&z)){Ce(e,C);var n=Pn,r=Wn;Pn=e,Wn=!0;try{0!==(t&(W|S))?function(e){for(var t=e.first;null!==t;){var n=t.next;0===(t.f&j)&&vr(t),t=n}}(e):hr(e),dr(e);var i=Un(e);e.teardown="function"==typeof i?i:null,e.wv=Ln}finally{Wn=r,Pn=n}}}function Qn(e){var t=!!(2&e.f);if(null!==Cn&&!Tn&&!(null!==Pn&&0!==(Pn.f&z)||null!==An&&v.call(An,e))){var n=Cn.deps;if(0!==(Cn.f&F))e.rv<Dn&&(e.rv=Dn,null===qn&&null!==n&&n[Rn]===e?Rn++:null===qn?qn=[e]:qn.push(e));else{(Cn.deps??(Cn.deps=[])).push(e);var r=e.reactions;null===r?e.reactions=[Cn]:v.call(r,Cn)||r.push(Cn)}}if(jn&&gn.has(e))return gn.get(e);if(t){var i=e;if(jn){var o=i.v;return(0===(i.f&C)&&null!==i.reactions||Yn(i))&&(o=dn(i)),gn.set(i,o),o}var s=0===(i.f&O)&&!Tn&&null!==Cn&&(Wn||0!==(Cn.f&O)),l=0===(i.f&A);Hn(i)&&(s&&(i.f|=O),hn(i)),s&&!l&&(vn(i),Xn(i))}if(Je?.has(e))return Je.get(e);if(0!==(e.f&V))throw e.v;return e.v}function Xn(e){if(e.f|=O,null!==e.deps)for(const t of e.deps)(t.reactions??(t.reactions=[])).push(e),2&t.f&&0===(t.f&O)&&(vn(t),Xn(t))}function Yn(e){if(e.v===ie)return!0;if(null===e.deps)return!1;for(const t of e.deps)if(gn.has(t)||2&t.f&&Yn(t))return!0;return!1}function er(e){var t=Tn;try{return Tn=!0,e()}finally{Tn=t}}function tr(e,t){var n=Pn;null!==n&&0!==(n.f&P)&&(e|=P);var r={ctx:se,deps:null,nodes:null,f:e|T|O,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};Ue?.register_created_effect(r);var i=r;if(4&e)null!==Xe?Xe.push(r):jt.ensure().schedule(r);else if(null!==t){try{Zn(r)}catch(e){throw vr(r),e}null===i.deps&&null===i.teardown&&null===i.nodes&&i.first===i.last&&0===(i.f&I)&&(i=i.first,0!==(e&W)&&0!==(e&q)&&null!==i&&(i.f|=q))}if(null!==i&&(i.parent=n,null!==n&&function(e,t){var n=t.last;null===n?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}(i,n),null!==Cn&&2&Cn.f&&!(64&e))){var o=Cn;(o.effects??(o.effects=[])).push(i)}return r}function nr(){return null!==Cn&&!Tn}function rr(e){const t=tr(8,null);return Ce(t,C),t.teardown=e,t}function ir(e){null===Pn&&(null===Cn&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}()),jn&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}();var t=Pn.f;if(Cn||0===(t&j)||0!==(t&A))return or(e);var n=se;(n.e??(n.e=[])).push(e)}function or(e){return tr(1048580,e)}function sr(e){return tr(4,e)}function lr(e,t=0){return tr(8|t,e)}function ar(e,t=[],n=[],r=[]){rn(r,t,n,t=>{tr(8,()=>e(...t.map(Qn)))})}function ur(e,t=0){return tr(W|t,e)}function cr(e,t=0){return tr(S|t,e)}function fr(e){return tr(j|I,e)}function dr(e){var t=e.teardown;if(null!==t){const e=jn,n=Cn;On(!0),En(null);try{t.call(null)}finally{On(e),En(n)}}}function hr(e,t=!1){var n=e.first;for(e.first=e.last=null;null!==n;){const e=n.ac;null!==e&&Sn(()=>{e.abort(X)});var r=n.next;64&n.f?n.parent=null:vr(n,t),n=r}}function vr(e,t=!0){var n=!1;(t||!!(262144&e.f))&&null!==e.nodes&&null!==e.nodes.end&&(function(e,t){for(;null!==e;){var n=e===t?null:ke(e);e.remove(),e=n}}(e.nodes.start,e.nodes.end),n=!0),Ce(e,N),hr(e,t&&!n),Jn(e,0);var r=e.nodes&&e.nodes.t;if(null!==r)for(const e of r)e.stop();dr(e),e.f^=N,e.f|=z;var i=e.parent;null!==i&&null!==i.first&&pr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function pr(e){var t=e.parent,n=e.prev,r=e.next;null!==n&&(n.next=r),null!==r&&(r.prev=n),null!==t&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function gr(e,t,n=!0){var r=[];mr(e,r,!0);var i=()=>{n&&vr(e),t&&t()},o=r.length;if(o>0){var s=()=>--o||i();for(var l of r)l.out(s)}else i()}function mr(e,t,n){if(0===(e.f&P)){e.f^=P;var r=e.nodes&&e.nodes.t;if(null!==r)for(const e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;null!==i;){var o=i.next;64&i.f||mr(i,t,!(0===(i.f&q)&&(0===(i.f&j)||0===(e.f&W)))&&n),i=o}}}function wr(e){yr(e,!0)}function yr(e,t){if(0!==(e.f&P)){e.f^=P,0===(e.f&C)&&(Ce(e,T),jt.ensure().schedule(e));for(var n=e.first;null!==n;){var r=n.next;yr(n,!(0===(n.f&q)&&0===(n.f&j))&&t),n=r}var i=e.nodes&&e.nodes.t;if(null!==i)for(const e of i)(e.is_global||t)&&e.in()}}function br(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;null!==n;){var i=n===r?null:ke(n);t.append(n),n=i}}const xr=new Map;async function kr(e,...t){const n=xr.get(e);if(n)for(const r of n)try{await r(...t)}catch(t){console.error(`Playlight ${e} callback error:`,t)}}const _r=qe(null),$r=qe(!1),Mr=Ne("https://sdk.playlight.dev"),Sr=Ne("https://api.playlight.dev/platform");function Wr(e){return e.endsWith("capture")&&"gotpointercapture"!==e&&"lostpointercapture"!==e}$r.subscribe(e=>kr(e?"discoveryOpen":"discoveryClose"));const jr=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function Or(e){return jr.includes(e)}const Cr={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Tr(e){return e=e.toLowerCase(),Cr[e]??e}const Er=["touchstart","touchmove"];function Pr(e){return Er.includes(e)}const zr=Symbol("events"),Ar=new Set,Nr=new Set;function qr(e,t,n,r={}){function i(e){if(r.capture||Fr.call(t,e),!e.cancelBubble)return Sn(()=>n?.call(this,e))}return e.startsWith("pointer")||e.startsWith("touch")||"wheel"===e?de(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Rr(e,t,n,r,i){var o={capture:r,passive:i},s=qr(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&rr(()=>{t.removeEventListener(e,s,o)})}function Ir(e,t,n){(t[zr]??(t[zr]={}))[e]=n}function Lr(e){for(var t=0;t<e.length;t++)Ar.add(e[t]);for(var n of Nr)n(e)}let Dr=null;function Fr(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],o=i[0]||e.target;Dr=e;var s=0,l=Dr===e&&e[zr];if(l){var a=i.indexOf(l);if(-1!==a&&(t===document||t===window))return void(e[zr]=t);var u=i.indexOf(t);if(-1===u)return;a<=u&&(s=a)}if((o=i[s]||e.target)!==t){g(e,"currentTarget",{configurable:!0,get:()=>o||n});var c=Cn,f=Pn;En(null),zn(null);try{for(var d,h=[];null!==o;){var v=o.assignedSlot||o.parentNode||o.host||null;try{var p=o[zr]?.[r];null!=p&&(!o.disabled||e.target===o)&&p.call(o,e)}catch(e){d?h.push(e):d=e}if(e.cancelBubble||v===t||null===v)break;o=v}if(d){for(let e of h)queueMicrotask(()=>{throw e});throw d}}finally{e[zr]=t,delete e.currentTarget,En(c),zn(f)}}}const Br=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:e=>e});function Vr(e){var t=Se("template");return t.innerHTML=function(e){return Br?.createHTML(e)??e}(e.replaceAll("<!>","\x3c!----\x3e")),t.content}function Hr(e,t){var n=Pn;null===n.nodes&&(n.nodes={start:e,end:t,a:null,t:null})}function Kr(e,t){var n,r=!!(1&t),i=!!(2&t),o=!e.startsWith("<!>");return()=>{void 0===n&&(n=Vr(o?e:"<!>"+e),r||(n=xe(n)));var t=i||me?document.importNode(n,!0):n.cloneNode(!0);return r?Hr(xe(t),t.lastChild):Hr(t,t),t}}function Ur(e,t,n="svg"){var r,i=!e.startsWith("<!>"),o=!!(1&t),s=`<${n}>${i?e:"<!>"+e}</${n}>`;return()=>{if(!r){var e=xe(Vr(s));if(o)for(r=document.createDocumentFragment();xe(e);)r.appendChild(xe(e));else r=xe(e)}var t=r.cloneNode(!0);return o?Hr(xe(t),t.lastChild):Hr(t,t),t}}function Gr(e,t){return Ur(e,t,"svg")}function Jr(){var e=document.createDocumentFragment(),t=document.createComment(""),n=be();return e.append(t,n),Hr(t,n),e}function Zr(e,t){null!==e&&e.before(t)}let Qr=!0;function Xr(e){Qr=e}function Yr(e,t){var n=null==t?"":"object"==typeof t?`${t}`:t;n!==(e[Q]??(e[Q]=e.nodeValue))&&(e[Q]=n,e.nodeValue=`${n}`)}function ei(e,t){return function(e,{target:t,anchor:n,props:r={},events:i,context:o,intro:s=!0,transformError:l}){!function(){if(void 0===ge){ge=window,me=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;we=m(t,"firstChild").get,ye=m(t,"nextSibling").get,k(e)&&(e[J]=void 0,e[G]=null,e[Z]=void 0,e.__e=void 0),k(n)&&(n[Q]=void 0)}}();var a=void 0,u=function(e){jt.ensure();const t=tr(64|I,e);return(e={})=>new Promise(n=>{e.outro?gr(t,()=>{vr(t),n(void 0)}):(vr(t),n(void 0))})}(()=>{var u=n??t.appendChild(be());!function(e,t,n,r){new nn(e,{pending:()=>{}},n,r)}(u,0,t=>{ae({}),o&&(se.c=o),i&&(r.$$events=i),Qr=s,a=e(t,r)||{},Qr=!0,ue()},l);var c=new Set,f=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!c.has(r)){c.add(r);var i=Pr(r);for(const e of[t,document]){var o=ti.get(e);void 0===o&&(o=new Map,ti.set(e,o));var s=o.get(r);void 0===s?(e.addEventListener(r,Fr,{passive:i}),o.set(r,1)):o.set(r,s+1)}}}};return f(p(Ar)),Nr.add(f),()=>{for(var e of c)for(const n of[t,document]){var r=ti.get(n),i=r.get(e);0==--i?(n.removeEventListener(e,Fr),r.delete(e),0===r.size&&ti.delete(n)):r.set(e,i)}Nr.delete(f),u!==n&&u.parentNode?.removeChild(u)}});return ni.set(a,u),a}(e,t)}const ti=new Map;let ni=new WeakMap;var ri,ii,oi,si,li,ai,ui,ci;class fi{constructor(e,t=!0){n(this,"anchor"),o(this,ri,new Map),o(this,ii,new Map),o(this,oi,new Map),o(this,si,new Set),o(this,li,!0),o(this,ai,e=>{if(i(this,ri).has(e)){var t=i(this,ri).get(e),n=i(this,ii).get(t);if(n)wr(n),i(this,si).delete(t);else{var r=i(this,oi).get(t);r&&(i(this,ii).set(t,r.effect),i(this,oi).delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(const[t,n]of i(this,ri)){if(i(this,ri).delete(t),t===e)break;const r=i(this,oi).get(n);r&&(vr(r.effect),i(this,oi).delete(n))}for(const[e,r]of i(this,ii)){if(e===t||i(this,si).has(e))continue;const o=()=>{if(Array.from(i(this,ri).values()).includes(e)){var t=document.createDocumentFragment();br(r,t),t.append(be()),i(this,oi).set(e,{effect:r,fragment:t})}else vr(r);i(this,si).delete(e),i(this,ii).delete(e)};i(this,li)||!n?(i(this,si).add(e),gr(r,o,!1)):o()}}}),o(this,ui,e=>{i(this,ri).delete(e);const t=Array.from(i(this,ri).values());for(const[e,n]of i(this,oi))t.includes(e)||(vr(n.effect),i(this,oi).delete(e))}),this.anchor=e,s(this,li,t)}ensure(e,t){var n=Ue;!t||i(this,ii).has(e)||i(this,oi).has(e)||i(this,ii).set(e,fr(()=>t(this.anchor))),i(this,ri).set(n,e),i(this,ai).call(this,n)}}function di(e,t,n=!1){var r=new fi(e);function i(e,t){r.ensure(e,t)}ur(()=>{var e=!1;t((t,n=0)=>{e=!0,i(n,t)}),e||i(-1,null)},n?q:0)}function hi(e,t){return t}function vi(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(const t of e.pending.values())for(const n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var o=t[i];r?.has(o)?(o.f|=L,br(o,document.createDocumentFragment())):vr(t[i],n)}}function pi(e,t,n,r,i,o=null){var s=e,l=new Map;!(4&t)||(s=e.appendChild(be()));var a,u=null,c=fn(()=>{var e=n();return d(e)?e:null==e?[]:p(e)}),f=new Map,h=!0;var v={effect:ur(()=>{for(var e=(a=Qn(c)).length,d=new Set,g=Ue,m=0;m<e;m+=1){var w=a[m],y=r(w,m),b=h?null:l.get(y);b?(b.v&&kn(b.v,w),b.i&&kn(b.i,m)):(b=mi(l,h?s:ci??(ci=be()),w,y,m,i,t,n),h||(b.e.f|=L),l.set(y,b)),d.add(y)}0===e&&o&&!u&&(h?u=fr(()=>o(s)):(u=fr(()=>o(ci??(ci=be())))).f|=L),e>d.size&&function(){throw new Error("https://svelte.dev/e/each_key_duplicate")}(),h||(f.set(g,d),function(e){0===(v.effect.f&z)&&(v.pending.delete(e),v.fallback=u,function(e,t,n,r,i){var o,s,l,a,u,c=!!(8&r),f=t.length,d=e.items,h=gi(e.effect.first),v=null,g=[],m=[];if(c)for(u=0;u<f;u+=1)l=i(t[u],u),0===((a=d.get(l).e).f&L)&&(a.nodes?.a?.measure(),(s??(s=new Set)).add(a));for(u=0;u<f;u+=1){if(l=i(t[u],u),a=d.get(l).e,null!==e.outrogroups)for(const t of e.outrogroups)t.pending.delete(a),t.done.delete(a);if(0!==(a.f&P)&&(wr(a),c&&(a.nodes?.a?.unfix(),(s??(s=new Set)).delete(a))),0!==(a.f&L)){if(a.f^=L,a!==h){var w=v?v.next:h;a===e.effect.last&&(e.effect.last=a.prev),a.prev&&(a.prev.next=a.next),a.next&&(a.next.prev=a.prev),yi(e,v,a),yi(e,a,w),wi(a,w,n),g=[],m=[],h=gi((v=a).next);continue}wi(a,null,n)}if(a!==h){if(void 0!==o&&o.has(a)){if(g.length<m.length){var y,b=m[0];v=b.prev;var x=g[0],k=g[g.length-1];for(y=0;y<g.length;y+=1)wi(g[y],b,n);for(y=0;y<m.length;y+=1)o.delete(m[y]);yi(e,x.prev,k.next),yi(e,v,x),yi(e,k,b),h=b,v=k,u-=1,g=[],m=[]}else o.delete(a),wi(a,h,n),yi(e,a.prev,a.next),yi(e,a,null===v?e.effect.first:v.next),yi(e,v,a),v=a;continue}for(g=[],m=[];null!==h&&h!==a;)(o??(o=new Set)).add(h),m.push(h),h=gi(h.next);if(null===h)continue}0===(a.f&L)&&g.push(a),v=a,h=gi(a.next)}if(null!==e.outrogroups){for(const t of e.outrogroups)0===t.pending.size&&(vi(e,p(t.done)),e.outrogroups?.delete(t));0===e.outrogroups.size&&(e.outrogroups=null)}if(null!==h||void 0!==o){var _=[];if(void 0!==o)for(a of o)0===(a.f&P)&&_.push(a);for(;null!==h;)0===(h.f&P)&&h!==e.fallback&&_.push(h),h=gi(h.next);var $=_.length;if($>0){var M=4&r&&0===f?n:null;if(c){for(u=0;u<$;u+=1)_[u].nodes?.a?.measure();for(u=0;u<$;u+=1)_[u].nodes?.a?.fix()}!function(e,t,n){for(var r,i=t.length,o=t.length,s=0;s<i;s++){let n=t[s];gr(n,()=>{if(r){if(r.pending.delete(n),r.done.add(n),0===r.pending.size){var t=e.outrogroups;vi(e,p(r.done)),t.delete(r),0===t.size&&(e.outrogroups=null)}}else o-=1},!1)}if(0===o){var l=null!==n;if(l){var a=n,u=a.parentNode;(function(e){e.textContent=""})(u),u.append(a),e.items.clear()}vi(e,t,!l)}else r={pending:new Set(t),done:new Set},(e.outrogroups??(e.outrogroups=new Set)).add(r)}(e,_,M)}}c&&de(()=>{if(void 0!==s)for(a of s)a.nodes?.a?.apply()})}(v,a,s,t,r),null!==u&&(0===a.length?0===(u.f&L)?wr(u):(u.f^=L,wi(u,null,s)):gr(u,()=>{u=null})))}(g)),Qn(c)}),items:l,pending:f,outrogroups:null,fallback:u};h=!1}function gi(e){for(;null!==e&&0===(e.f&j);)e=e.next;return e}function mi(e,t,n,r,i,o,s,l){var a=1&s?16&s?wn(n):bn(n,!1,!1):null,u=2&s?wn(i):null;return{v:a,i:u,e:fr(()=>(o(t,a??n,u??i,l),()=>{e.delete(r)}))}}function wi(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,o=t&&0===(t.f&L)?t.nodes.start:n;null!==r;){var s=ke(r);if(o.before(r),r===i)return;r=s}}function yi(e,t,n){null===t?e.effect.first=n:t.next=n,null===n?e.effect.last=t:n.prev=t}function bi(e,t,...n){var r=new fi(e);ur(()=>{const e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},q)}ri=new WeakMap,ii=new WeakMap,oi=new WeakMap,si=new WeakMap,li=new WeakMap,ai=new WeakMap,ui=new WeakMap;const xi={tick:e=>requestAnimationFrame(e),now:()=>performance.now(),tasks:new Set};function ki(){const e=xi.now();xi.tasks.forEach(t=>{t.c(e)||(xi.tasks.delete(t),t.f())}),0!==xi.tasks.size&&xi.tick(ki)}function _i(e,t){Sn(()=>{e.dispatchEvent(new CustomEvent(t))})}function $i(e){if("float"===e)return"cssFloat";if("offset"===e)return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return 1===t.length?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join("")}function Mi(e){const t={},n=e.split(";");for(const e of n){const[n,r]=e.split(":");if(!n||void 0===r)break;t[$i(n.trim())]=r.trim()}return t}const Si=e=>e;function Wi(e,t,n,r){var i,o,s,l,a=!!(4&e),u=t.inert,c=t.style.overflow;function f(){return Sn(()=>o??(o=n()(t,r?.()??{},{direction:"both"})))}var d={is_global:a,in(){t.inert=u,s=ji(t,f(),l,1,()=>{_i(t,"introstart")},()=>{_i(t,"introend"),s?.abort(),s=o=void 0,t.style.overflow=c})},out(e){t.inert=!0,l=ji(t,f(),s,0,()=>{_i(t,"outrostart")},()=>{_i(t,"outroend"),e?.()})},stop:()=>{s?.abort(),l?.abort()}},h=Pn;if(((i=h.nodes).t??(i.t=[])).push(d),Qr){var v=a;if(!v){for(var p=h.parent;p&&0!==(p.f&q);)for(;(p=p.parent)&&0===(p.f&W););v=!p||0!==(p.f&A)}v&&sr(()=>{er(()=>d.in())})}}function ji(e,t,n,r,i,o){var s=1===r;if(_(t)){var l,a=!1;return de(()=>{if(!a){var u=t({direction:s?"in":"out"});l=ji(e,u,n,r,i,o)}}),{abort:()=>{a=!0,l?.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(n?.deactivate(),!t?.duration&&!t?.delay)return i(),o(),{abort:$,deactivate:$,reset:$,t:()=>r};const{delay:u=0,css:c,tick:f,easing:d=Si}=t;var h=[];if(s&&void 0===n&&(f&&f(0,1),c)){var v=Mi(c(0,1));h.push(v,v)}var p=()=>1-r,g=e.animate(h,{duration:u,fill:"forwards"});return g.onfinish=()=>{g.cancel(),i();var s=n?.t()??1-r;n?.abort();var l=r-s,a=t.duration*Math.abs(l),u=[];if(a>0){var h=!1;if(c)for(var v=Math.ceil(a/16.666666666666668),m=0;m<=v;m+=1){var w=s+l*d(m/v),y=Mi(c(w,1-w));u.push(y),h||(h="hidden"===y.overflow)}h&&(e.style.overflow="hidden"),p=()=>{var e=g.currentTime;return s+l*d(e/a)},f&&function(e){let t;0===xi.tasks.size&&xi.tick(ki),new Promise(n=>{xi.tasks.add(t={c:e,f:n})})}(()=>{if("running"!==g.playState)return!1;var e=p();return f(e,1-e),!0})}(g=e.animate(u,{duration:a,fill:"forwards"})).onfinish=()=>{p=()=>r,f?.(r,1-r),o()}},{abort:()=>{g&&(g.cancel(),g.effect=null,g.onfinish=$)},deactivate:()=>{o=$},reset:()=>{0===r&&f?.(1,0)},t:()=>p()}}function Oi(e,t){var n,r=void 0;cr(()=>{r!==(r=t())&&(n&&(vr(n),n=null),r&&(n=fr(()=>{sr(()=>r(e))})))})}function Ci(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ci(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}const Ti=[..." \t\n\r\f \v\ufeff"];function Ei(e,t=!1){var n=t?" !important;":";",r="";for(var i of Object.keys(e)){var o=e[i];null!=o&&""!==o&&(r+=" "+i+": "+o+n)}return r}function Pi(e){return"-"!==e[0]||"-"!==e[1]?e.toLowerCase():e}function zi(e,t,n,r,i,o){var s=e[J];if(s!==n||void 0===s){var l=function(e,t,n){var r=null==e?"":""+e;if(t&&(r=r?r+" "+t:t),n)for(var i of Object.keys(n))if(n[i])r=r?r+" "+i:i;else if(r.length)for(var o=i.length,s=0;(s=r.indexOf(i,s))>=0;){var l=s+o;0!==s&&!Ti.includes(r[s-1])||l!==r.length&&!Ti.includes(r[l])?s=l:r=(0===s?"":r.substring(0,s))+r.substring(l+1)}return""===r?null:r}(n,r,o);null==l?e.removeAttribute("class"):t?e.className=l:e.setAttribute("class",l),e[J]=n}else if(o&&i!==o)for(var a in o){var u=!!o[a];(null==i||u!==!!i[a])&&e.classList.toggle(a,u)}return o}function Ai(e,t={},n,r){for(var i in n){var o=n[i];t[i]!==o&&(null==n[i]?e.style.removeProperty(i):e.style.setProperty(i,o,r))}}function Ni(e,t,n,r){if(e[Z]!==t){var i=function(e,t){if(t){var n,r,i="";if(Array.isArray(t)?(n=t[0],r=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,s=0,l=!1,a=[];n&&a.push(...Object.keys(n).map(Pi)),r&&a.push(...Object.keys(r).map(Pi));var u=0,c=-1;const t=e.length;for(var f=0;f<t;f++){var d=e[f];if(l?"/"===d&&"*"===e[f-1]&&(l=!1):o?o===d&&(o=!1):"/"===d&&"*"===e[f+1]?l=!0:'"'===d||"'"===d?o=d:"("===d?s++:")"===d&&s--,!l&&!1===o&&0===s)if(":"===d&&-1===c)c=f;else if(";"===d||f===t-1){if(-1!==c){var h=Pi(e.substring(u,c).trim());a.includes(h)||(";"!==d&&f++,i+=" "+e.substring(u,f).trim()+";")}u=f+1,c=-1}}}return n&&(i+=Ei(n)),r&&(i+=Ei(r,!0)),""===(i=i.trim())?null:i}return null==e?null:String(e)}(t,r);null==i?e.removeAttribute("style"):e.style.cssText=i,e[Z]=t}else r&&(Array.isArray(r)?(Ai(e,n?.[0],r[0]),Ai(e,n?.[1],r[1],"important")):Ai(e,n,r));return r}function qi(e,t,n=!1){if(e.multiple){if(null==t)return;if(!d(t))return void console.warn("https://svelte.dev/e/select_multiple_invalid_value");for(var r of e.options)r.selected=t.includes(Ri(r))}else{for(r of e.options)if(pe(Ri(r),t))return void(r.selected=!0);(!n||void 0!==t)&&(e.selectedIndex=-1)}}function Ri(e){return"__value"in e?e.__value:e.value}const Ii=Symbol("class"),Li=Symbol("style"),Di=Symbol("is custom element"),Fi=Symbol("is html"),Bi=Y?"option":"OPTION",Vi=Y?"select":"SELECT";function Hi(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Ki(e,t,n,r){var i=Gi(e);i[t]!==(i[t]=n)&&("loading"===t&&(e[U]=n),null==n?e.removeAttribute(t):"string"!=typeof n&&to(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Ui(e,t,n=[],r=[],i=[],o,s=!1,l=!1){rn(i,n,r,n=>{var r=void 0,i={},s=e.nodeName===Vi,l=!1;if(cr(()=>{var a=t(...n.map(Qn)),u=function(e,t,n,r){var i=Gi(e),o=i[Di],s=!i[Fi],l=t||{},a=e.nodeName===Bi;for(var u in t)u in n||(n[u]=null);n.class?n.class=function(e){return"object"==typeof e?function(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ci(e))&&(r&&(r+=" "),r+=t);return r}(e):e??""}(n.class):n[Ii]&&(n.class=null),n[Li]&&(n.style??(n.style=null));var c=to(e);for(const u in n){let g=n[u];if(a&&"value"===u&&null==g)e.value=e.__value="",l[u]=g;else if("class"!==u)if("style"!==u){var f=l[u];if(g!==f||void 0===g&&e.hasAttribute(u)){l[u]=g;var d=u[0]+u[1];if("$$"!==d)if("on"===d){const t={},n="$$"+u;let r=u.slice(2);var h=Or(r);if(Wr(r)&&(r=r.slice(0,-7),t.capture=!0),!h&&f){if(null!=g)continue;e.removeEventListener(r,l[n],t),l[n]=null}if(h)Ir(r,e,g),Lr([r]);else if(null!=g){let i=function(e){l[u].call(this,e)};l[n]=qr(r,e,i,t)}}else if("style"===u)Ki(e,u,g);else if("autofocus"===u)Mn(e,!!g);else if(o||"__value"!==u&&("value"!==u||null==g))if("selected"===u&&a)Hi(e,g);else{var v=u;s||(v=Tr(v));var p="defaultValue"===v||"defaultChecked"===v;if(null!=g||o||p)p||c.includes(v)&&(o||"string"!=typeof g)?(e[v]=g,v in i&&(i[v]=ie)):"function"!=typeof g&&Ki(e,v,g);else if(i[u]=null,"value"===v||"checked"===v){let n=e;const r=void 0===t;if("value"===v){let e=n.defaultValue;n.removeAttribute(v),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(v),n.defaultChecked=e,n.checked=!!r&&e}}else e.removeAttribute(u)}else e.value=e.__value=g}}else Ni(e,g,t?.[Li],n[Li]),l[u]=g,l[Li]=n[Li];else zi(e,"http://www.w3.org/1999/xhtml"===e.namespaceURI,g,r,t?.[Ii],n[Ii]),l[u]=g,l[Ii]=n[Ii]}return l}(e,r,a,o);l&&s&&"value"in a&&qi(e,a.value);for(let e of Object.getOwnPropertySymbols(i))a[e]||vr(i[e]);for(let t of Object.getOwnPropertySymbols(a)){var c=a[t];"@attach"===t.description&&(!r||c!==r[t])&&(i[t]&&vr(i[t]),i[t]=fr(()=>Oi(e,()=>c))),u[t]=c}r=u}),s){var a=e;sr(()=>{qi(a,r.value,!0),function(e){var t=new MutationObserver(()=>{qi(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),rr(()=>{t.disconnect()})}(a)})}l=!0})}function Gi(e){return e[G]??(e[G]={[Di]:e.nodeName.includes("-"),[Fi]:e.namespaceURI===oe})}var Ji,Zi,Qi,Xi,Yi,eo=new Map;function to(e){var t=e.getAttribute("is")||e.nodeName,n=eo.get(t);if(n)return n;eo.set(t,n=[]);for(var r,i=e,o=Element.prototype;o!==i;){for(var s in r=w(i))r[s].set&&"innerHTML"!==s&&"textContent"!==s&&"innerText"!==s&&n.push(s);i=x(i)}return n}const no=class{constructor(e){o(this,Xi),o(this,Ji,new WeakMap),o(this,Zi),o(this,Qi),s(this,Qi,e)}observe(e,t){var n=i(this,Ji).get(e)||new Set;return n.add(t),i(this,Ji).set(e,n),l(this,Xi,Yi).call(this).observe(e,i(this,Qi)),()=>{var n=i(this,Ji).get(e);n.delete(t),0===n.size&&(i(this,Ji).delete(e),i(this,Zi).unobserve(e))}}};Ji=new WeakMap,Zi=new WeakMap,Qi=new WeakMap,Xi=new WeakSet,Yi=function(){return i(this,Zi)??s(this,Zi,new ResizeObserver(e=>{for(var t of e)for(var n of(no.entries.set(t.target,t),i(this,Ji).get(t.target)||[]))n(t)}))},n(no,"entries",new WeakMap);var ro=new no({box:"border-box"});function io(e,t){return e===t||e?.[H]===t}function oo(e={},t,n,r){var i=se.r,o=Pn;return sr(()=>{var r,s;return lr(()=>{r=s,s=[],er(()=>{io(n(...s),e)||(t(e,...s),r&&io(n(...r),e)&&t(null,...r))})}),()=>{let r=o;for(;r!==i&&null!==r.parent&&r.parent.f&N;)r=r.parent;const l=r.teardown;r.teardown=()=>{s&&io(n(...s),e)&&t(null,...s),l?.()}}}),e}const so={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set:(e,t)=>!1,getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has:(e,t)=>!e.exclude.includes(t)&&t in e.props,ownKeys:e=>Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))};function lo(e,t,n){return new Proxy({props:e,exclude:t},so)}const ao={get(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(_(r)&&(r=r()),"object"==typeof r&&null!==r&&t in r)return r[t]}},set(e,t,n){let r=e.props.length;for(;r--;){let i=e.props[r];_(i)&&(i=i());const o=m(i,t);if(o&&o.set)return o.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let r=e.props[n];if(_(r)&&(r=r()),"object"==typeof r&&null!==r&&t in r){const e=m(r,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===H||t===K)return!1;for(let n of e.props)if(_(n)&&(n=n()),null!=n&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props)if(_(n)&&(n=n()),n){for(const e in n)t.includes(e)||t.push(e);for(const e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function uo(...e){return new Proxy({props:e},ao)}function co(e,t,n,r){var i=!re||!!(2&n),o=!!(8&n),s=!!(16&n),l=r,a=!0,u=void 0,c=()=>s&&i?(u??(u=ln(r)),Qn(u)):(a&&(a=!1,l=s?er(r):r),l);let f;if(o){var d=H in e||K in e;f=m(e,t)?.set??(d&&t in e?n=>e[t]=n:void 0)}var h,v,p=!1;if(o?[h,p]=function(e){var t=Le;try{return Le=!1,[e(),Le]}finally{Le=t}}(()=>e[t]):h=e[t],void 0===h&&void 0!==r&&(h=c(),f&&(i&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),f(h))),v=i?()=>{var n=e[t];return void 0===n?c():(a=!0,n)}:()=>{var n=e[t];return void 0!==n&&(l=void 0),void 0===n?l:n},i&&!(4&n))return v;if(f){var g=e.$$legacy;return function(e,t){return arguments.length>0?((!i||!t||g||p)&&f(t?v():e),e):v()}}var w=!1,y=(1&n?ln:fn)(()=>(w=!1,v()));o&&Qn(y);var b=Pn;return function(e,t){if(arguments.length>0){const n=t?Qn(y):i&&o?he(e):e;return xn(y,n),w=!0,void 0!==l&&(l=n),e}return jn&&w||0!==(b.f&z)?y.v:Qn(y)}}function fo(e){var t;null===se&&function(){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}(),re&&null!==se.l?(t=se.l,t.u??(t.u={a:[],b:[],m:[]})).m.push(e):ir(()=>{const t=er(e);if("function"==typeof t)return t})}var ho;typeof window<"u"&&((ho=window.__svelte??(window.__svelte={})).v??(ho.v=new Set)).add("5");const vo={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var po,go,mo=Gr("<svg><!><!></svg>");function wo(e,t){ae(t,!0);const n=co(t,"color",3,"currentColor"),r=co(t,"size",3,24),i=co(t,"strokeWidth",3,2),o=co(t,"absoluteStrokeWidth",3,!1),s=co(t,"iconNode",19,()=>[]),l=lo(t,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var a=mo();Ui(a,e=>({...vo,...l,width:r(),height:r(),stroke:n(),"stroke-width":e,class:["lucide-icon lucide",t.name&&`lucide-${t.name}`,t.class]}),[()=>o()?24*Number(i())/Number(r()):i()]);var u=_e(a);pi(u,17,s,hi,(e,t)=>{var n=cn(()=>function(e){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const t=[];for(const n of e)if(t.push(n),2===t.length)break;return t}(Qn(t))),r=Jr();(function(e,t,r,i){var o=null,s=new fi(e,!1);ur(()=>{const e=Qn(n)[0]||null;return null===e?(s.ensure(null,null),void Xr(!0)):(s.ensure(e,t=>{if(e){if(Hr(o=Se(e,"http://www.w3.org/2000/svg"),o),i){o.appendChild(be());i(o)}Pn.nodes.end=o,t.before(o)}}),Xr(!0),()=>{e&&Xr(!1)})},q),rr(()=>{Xr(!0)})})($e(r),0,0,(e,t)=>{Ui(e,()=>({...Qn(n)[1]}))}),Zr(e,r)}),bi(Me(u),()=>t.children??$),Zr(e,a),ue()}function yo(e,t){ae(t,!0);let n=lo(t,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];wo(e,uo({name:"loader-circle"},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=Jr();bi($e(r),()=>t.children??$),Zr(e,r)},$$slots:{default:!0}})),ue()}function bo(e){const t=e-1;return t*t*t+1}function xo(e){return e<.5?4*e*e*e:.5*Math.pow(2*e-2,3)+1}function ko(e){const t="string"==typeof e&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function _o(e,{delay:t=0,duration:n=400,easing:r=xo,amount:i=5,opacity:o=0}={}){const s=getComputedStyle(e),l=+s.opacity,a="none"===s.filter?"":s.filter,u=l*(1-o),[c,f]=ko(i);return{delay:t,duration:n,easing:r,css:(e,t)=>`opacity: ${l-u*t}; filter: ${a} blur(${t*c}${f});`}}function $o(e,{delay:t=0,duration:n=400,easing:r=bo,x:i=0,y:o=0,opacity:s=0}={}){const l=getComputedStyle(e),a=+l.opacity,u="none"===l.transform?"":l.transform,c=a*(1-s),[f,d]=ko(i),[h,v]=ko(o);return{delay:t,duration:n,easing:r,css:(e,t)=>`\n\t\t\ttransform: ${u} translate(${(1-e)*f}${d}, ${(1-e)*h}${v});\n\t\t\topacity: ${a-c*t}`}}function Mo(e,{delay:t=0,duration:n=400,easing:r=bo,axis:i="y"}={}){const o=getComputedStyle(e),s=+o.opacity,l="y"===i?"height":"width",a=parseFloat(o[l]),u="y"===i?["top","bottom"]:["left","right"],c=u.map(e=>`${e[0].toUpperCase()}${e.slice(1)}`),f=parseFloat(o[`padding${c[0]}`]),d=parseFloat(o[`padding${c[1]}`]),h=parseFloat(o[`margin${c[0]}`]),v=parseFloat(o[`margin${c[1]}`]),p=parseFloat(o[`border${c[0]}Width`]),g=parseFloat(o[`border${c[1]}Width`]);return{delay:t,duration:n,easing:r,css:e=>`overflow: hidden;opacity: ${Math.min(20*e,1)*s};${l}: ${e*a}px;padding-${u[0]}: ${e*f}px;padding-${u[1]}: ${e*d}px;margin-${u[0]}: ${e*h}px;margin-${u[1]}: ${e*v}px;border-${u[0]}-width: ${e*p}px;border-${u[1]}-width: ${e*g}px;min-${l}: 0`}}po=new WeakSet,go=function(){const e=window.location.hostname;return e.startsWith("www.")?e.substring(4):e};const So=new class{constructor(){o(this,po),this.cachedRequests=new Map,this.pendingCacheRequests=new Map}async request(e,t={}){const{deduplicate:n,...r}=t;if(n&&this.pendingCacheRequests.has(e))return this.pendingCacheRequests.get(e);const i=async()=>{try{const t=`${Re(Sr)}${e}`,n=await fetch(t,{...r,headers:{"Content-Type":"application/json",...r.headers}});if(!n.ok){let e;try{e=await n.json()}catch{}switch(n.status){case 429:return console.warn("Playlight request failed due to rate limiting."),null;case 404:return console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production."),null;default:throw new Error(e?.error||e?.message||n.status)}}return await n.json()}catch(e){console.error("Playlight API request error:",e)}};if(n){const t=i().then(t=>(this.pendingCacheRequests.delete(e),t));return this.pendingCacheRequests.set(e,t),t}return i()}async getSuggestions(e=1){let t="/suggestions";if(t+="?without="+l(this,po,go).call(this),e&&(t+="&page="+e),this.cachedRequests.has(t))return structuredClone(this.cachedRequests.get(t));const n=await this.request(t,{deduplicate:!0});return n&&this.cachedRequests.set(t,n),structuredClone(n)}async getCurrentGameInfo(){const e="/game-by-domain/"+l(this,po,go).call(this);if(this.cachedRequests.has(e))return structuredClone(this.cachedRequests.get(e));const t=await this.request(e,{deduplicate:!0});return t&&this.cachedRequests.set(e,t),structuredClone(t)}async trackOpen(e){const t=l(this,po,go).call(this);await this.request("/event/open",{method:"POST",body:JSON.stringify({domain:t,format:e})})}async trackClick(e,t){const n=l(this,po,go).call(this);await this.request("/event/click",{method:"POST",body:JSON.stringify({sourceDomain:n,gameId:e,format:t})})}};var Wo=Kr('<div><p class="font-bold text-white uppercase"> </p></div>'),jo=Kr('<video playsinline="" loop="" fetchpriority="low"></video>',2),Oo=Kr('<div class="bg-background/25 text-muted-foreground flex items-center justify-center gap-1 border-t p-1 px-2 text-sm"><!> <p class="text-muted-foreground text-sm">Tap again to open</p></div>'),Co=Kr('<div class="bg-background/75 absolute right-0 bottom-0 left-0 z-2 flex max-h-1/3 flex-col overflow-hidden text-white backdrop-blur-xl"><div class="h-full w-full overflow-y-auto p-3"><h3 class="mb-2 truncate text-center text-lg font-bold"> </h3> <p class="text-muted-foreground mb-4 text-center text-sm text-balance"> </p></div> <!> <div></div></div>'),To=Kr('<div role="button" tabindex="0"><!> <!> <img alt="cover" fetchpriority="high"/> <!> <div class="prevent-image-select bg-background absolute right-0 -bottom-[18%] left-0 mx-auto aspect-square w-1/5 animate-pulse rounded-full shadow-xl svelte-n3ft5o"></div> <img alt="game logo" fetchpriority="high"/></div>');function Eo(e,t){ae(t,!0);const[n,r]=Ve(),i=(e,t=$,n=$)=>{var r=Wo();let i;var o=_e(r),l=_e(o);ar(()=>{i=zi(r,1,"bg-background absolute top-3 right-3 z-3 px-2 py-0.5 transition-opacity select-none",null,i,{"opacity-0":t(),"text-sm":s()}),Yr(l,n())}),Zr(e,r)};let o,s=co(t,"inWidget",3,!1),l=co(t,"cardElement",15),a=yn(!1),u=yn(!1),c=yn(!1),f=yn(!1),d=yn(!1),h=yn(void 0),v=yn(!1);function p(){!Qn(a)&&!Qn(c)&&function(e,t=1){try{const n=new Audio(e);n.volume=t,n.play()}catch(e){console.error("Error playing sound:",e)}}(Fe(Mr,"$cdnURL",n)+"/assets/sounds/hover-selection.ogg",.25),xn(a,!0),clearTimeout(o),o=setTimeout(()=>xn(u,!0),300),Qn(h)&&t.game.cover_video_url&&(Qn(h).currentTime=0,Qn(h).play().catch(e=>console.error("Video error:",e)))}function g(){Qn(h)&&Qn(v)&&Qn(h).pause(),xn(a,!1),clearTimeout(o),xn(u,!1)}var m=To();Rr("touchstart",ge,e=>{l()&&!l().contains(e.target)&&g()},void 0,!0),Rr("pointerdown",ge,e=>xn(c,"touch"===e.pointerType)),Rr("pointermove",ge,e=>xn(c,"touch"===e.pointerType));var w=_e(m),y=e=>{i(e,()=>Qn(a),()=>"Featured")},b=e=>{i(e,()=>Qn(a),()=>"New")},x=cn(()=>function(e){const t=new Date;return t.setDate(t.getDate()-7),new Date(e)>t}(t.game?.created_at));di(w,e=>{t.game?.featured?e(y):Qn(x)&&e(b,1)});var k=Me(w,2),_=e=>{var n=jo();let r;n.muted=!0,oo(n,e=>xn(h,e),()=>Qn(h)),ar(()=>{Ki(n,"src",t.game.cover_video_url),r=zi(n,1,"absolute top-0 left-0 z-1 aspect-[2/3] w-full object-cover opacity-0",null,r,{"opacity-100":Qn(a)&&Qn(v)&&t.game.cover_video_url})}),Rr("loadeddata",n,()=>{xn(v,!0)}),Zr(e,n)};di(k,e=>{t.game.cover_video_url&&e(_)});var M=Me(k,2);let S;var W=Me(M,2),j=e=>{var n=Co(),r=_e(n),i=_e(r),o=_e(i),s=_e(Me(i,2)),l=Me(r,2),a=e=>{var t=Oo();(function(e,t){ae(t,!0);let n=lo(t,["$$slots","$$events","$$legacy"]);const r=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];wo(e,uo({name:"info"},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=Jr();bi($e(r),()=>t.children??$),Zr(e,r)},$$slots:{default:!0}})),ue()})(_e(t),{size:15}),Zr(e,t)};di(l,e=>{Qn(c)&&e(a)});var u=Me(l,2);ar(()=>{Yr(o,t.game.name),Yr(s,t.game.description||"No description."),zi(u,1,`bg-background/75 pointer-events-none absolute right-0 mask-t-from-0% mask-t-to-100% ${Qn(c)?"bottom-7":"bottom-0"} left-0 h-8`)}),Wi(3,n,()=>Mo),Zr(e,n)};di(W,e=>{Qn(a)&&e(j)});var O=Me(W,4);let C;oo(m,e=>l(e),()=>l()),ar(()=>{zi(m,1,`highlight-border group bg-background relative mb-[calc(min(5dvh,55px)+min(1vw,20px))] block aspect-[2/3] shrink-0 cursor-pointer shadow-xl transition hover:outline-2 ${Qn(f)?"":"animate-pulse"} ${s()?"mt-5 h-62":"mt-5 w-[clamp(min(85vw,17.75rem),calc((100%-10.5rem)/4),25rem)]"}`,"svelte-n3ft5o"),Ki(M,"src",t.game.cover_image_url),S=zi(M,1,"prevent-image-select absolute top-0 left-0 aspect-[2/3] w-full object-cover opacity-0 transition svelte-n3ft5o",null,S,{"opacity-100":Qn(f)&&(!Qn(a)||!Qn(v)||!t.game.cover_video_url)}),Ki(O,"src",t.game.logo_url),C=zi(O,1,"prevent-image-select absolute right-0 -bottom-[18%] left-0 mx-auto aspect-square w-1/5 overflow-hidden rounded-full object-center opacity-0 transition group-hover:outline-2 svelte-n3ft5o",null,C,{"opacity-100":Qn(d)})}),Rr("mouseenter",m,p),Rr("mouseleave",m,g),Ir("click",m,()=>{!Qn(c)||Qn(u)?function(e,t,n){if(!e||null==t)return console.error("Domain or Game ID are missing!");So.trackClick(t,n),window.open("https://"+e+"?utm_source=playlight","_blank","noopener")}(t.game.domain,t.game.id,s()?"widget":"discovery"):p()}),Rr("load",M,()=>{xn(f,!0)}),Rr("load",O,()=>{xn(d,!0)}),Zr(e,m),ue(),r()}Lr(["click"]);var Po=Kr("<button><!></button>");function zo(e,t){let n=co(t,"disabled",3,!1),r=co(t,"variant",3,"primary"),i=co(t,"size",3,"md"),o=co(t,"uppercase",3,!0);var s=Po();bi(_e(s),()=>t.children??$),ar(()=>{s.disabled=n(),zi(s,1,`${"primary"==r()?"outline-muted bg-foreground text-black hover:outline":"secondary"==r()?"bg-background hover:bg-muted outline-muted outline":"ghost"==r()?"hover:opacity-50":""} inline-flex cursor-pointer items-center justify-center ${"ghost"!==r()?"hover:bg-background":""} ${"lg"==i()?"gap-3 p-4 text-lg font-semibold":"gap-2 px-3 py-2 text-md font-bold"} text-nowrap ${o()?"uppercase":""} transition hover:text-white ${n()?"pointer-events-none opacity-50":""} ${t.class??""}`)}),Ir("click",s,function(...e){t.onclick?.apply(this,e)}),Zr(e,s)}async function Ao(e=10){if(e>10)throw new Error("Can't truncate to more than 10");return((await So.getSuggestions(1))?.games||[]).slice(0,e)}function No(e){Re($r)||(e||console.warn("Format is not specified for open event!"),$r.set(!0),So.trackOpen(e))}Lr(["click"]);var qo=Kr('<div class="flex h-full w-full items-center justify-center"><!></div>'),Ro=Kr('<div class="flex h-full w-full items-center justify-center"><p class="text-white">No games available.</p></div>'),Io=Kr('<div class="snap-center"><!></div>'),Lo=Kr('<!> <div class="bg-background/85 my-auto mb-30 flex min-w-40 snap-center flex-wrap items-center justify-center gap-4 p-4 pb-6 shadow-lg backdrop-blur-xl"><p class="w-full text-center text-lg font-semibold text-white">Fancy more?</p> <!></div>',1),Do=Kr('<button class="bg-background/85 absolute top-4/9 left-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-foreground hover:text-black max-sm:hidden"><!></button>'),Fo=Kr('<button class="bg-background/85 absolute top-4/9 right-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-foreground hover:text-black max-sm:hidden"><!></button>'),Bo=Kr("<!> <!>",1),Vo=Kr('<div class="playlight-sdk playlight-sdk-widget"><div class="relative flex h-full w-full snap-x gap-6 px-0.5 overflow-x-auto"><!></div> <!></div>');function Ho(e,t){ae(t,!0);let n=yn(!0),r=yn(he([])),i=yn(void 0),o=yn(0),s=yn(!1),l=yn(!0),a=yn("");function u(e,t){const n=Math.min(e/50,1),r=Math.min(t/50,1);xn(a,`mask-image: linear-gradient(\n\t\t\tto right,\n\t\t\trgba(0, 0, 0, ${1-.95*n}) 0%,\n\t\t\trgba(0, 0, 0, ${1-.674*n}) 2%,\n\t\t\trgba(0, 0, 0, ${1-.446*n}) 3.5%,\n\t\t\trgba(0, 0, 0, ${1-.26*n}) 5%,\n\t\t\trgba(0, 0, 0, ${1-.14*n}) 6.5%,\n\t\t\trgba(0, 0, 0, ${1-.046*n}) 8%,\n\t\t\tblack 9%,\n\t\t\tblack 91%,\n\t\t\trgba(0, 0, 0, ${.954*r+(1-r)}) 92%,\n\t\t\trgba(0, 0, 0, ${.86*r+(1-r)}) 93.5%,\n\t\t\trgba(0, 0, 0, ${.74*r+(1-r)}) 95%,\n\t\t\trgba(0, 0, 0, ${.554*r+(1-r)}) 96.5%,\n\t\t\trgba(0, 0, 0, ${.326*r+(1-r)}) 98%,\n\t\t\trgba(0, 0, 0, ${.05*r+(1-r)})\n\t\t)`)}fo(async()=>{xn(n,!0),xn(r,await Ao(10),!0),xn(n,!1),requestAnimationFrame(()=>{if(Qn(i)){const e=Qn(i).scrollWidth-Qn(i).clientWidth;u(Qn(i).scrollLeft,e-Qn(i).scrollLeft)}})});var c=Vo(),f=_e(c),d=_e(f),h=e=>{var t=qo();yo(_e(t),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),Zr(e,t)},v=e=>{Zr(e,Ro())},p=e=>{var t=Lo(),n=$e(t);pi(n,17,()=>Qn(r),hi,(e,t)=>{var n=Io();Eo(_e(n),{get game(){return Qn(t)},inWidget:!0}),function(e,t,n){var r=ro.observe(e,()=>n(e[t]));sr(()=>(er(()=>n(e[t])),r))}(n,"clientWidth",e=>xn(o,e)),Zr(e,n)});var i=Me(n,2);zo(Me(_e(i),2),{onclick:()=>No("widget"),children:(e,t)=>{var n=function(e=""){var t=be(e+"");return Hr(t,t),t}("See all");Zr(e,n)},$$slots:{default:!0}}),Zr(e,t)};di(d,e=>{Qn(n)?e(h):0===Qn(r).length?e(v,1):e(p,-1)}),oo(f,e=>xn(i,e),()=>Qn(i));var g=Me(f,2),m=e=>{var t=Bo(),n=$e(t),r=e=>{var t=Do();(function(e,t){ae(t,!0);let n=lo(t,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"m15 18-6-6 6-6"}]];wo(e,uo({name:"chevron-left"},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=Jr();bi($e(r),()=>t.children??$),Zr(e,r)},$$slots:{default:!0}})),ue()})(_e(t),{size:22,strokeWidth:2.75}),Ir("click",t,()=>Qn(i).scrollBy({left:2*-Qn(o),behavior:"smooth"})),Wi(3,t,()=>_o),Zr(e,t)};di(n,e=>{Qn(s)&&e(r)});var a=Me(n,2),u=e=>{var t=Fo();(function(e,t){ae(t,!0);let n=lo(t,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"m9 18 6-6-6-6"}]];wo(e,uo({name:"chevron-right"},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=Jr();bi($e(r),()=>t.children??$),Zr(e,r)},$$slots:{default:!0}})),ue()})(_e(t),{size:22,strokeWidth:2.75}),Ir("click",t,()=>Qn(i).scrollBy({left:2*Qn(o),behavior:"smooth"})),Wi(3,t,()=>_o),Zr(e,t)};di(a,e=>{Qn(l)&&e(u)}),Zr(e,t)};di(g,e=>{Qn(r).length>0&&e(m)}),ar(()=>Ni(f,Qn(a))),Rr("scroll",f,e=>{const t=e.target;xn(s,t.scrollLeft>20),xn(l,t.scrollLeft<t.scrollWidth-t.clientWidth-20),u(t.scrollLeft,t.scrollWidth-t.clientWidth-t.scrollLeft)}),Zr(e,c),ue()}function Ko(){try{const e=document.querySelectorAll(".playlight-widget-carousel");e.length>0&&e.forEach(e=>{e.dataset.playlightInitialized||(e.dataset.playlightInitialized="true",ei(Ho,{target:e}))})}catch(e){console.error("Error occurred initializing and mounting carousel widget:",e)}}function Uo(e){return--e*e*(2.70158*e+1.70158)+1}Lr(["click"]),re=!0;var Go=Gr('<svg width="18px" height="28px" viewBox="-10 -10 267 410" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;" class="svelte-1so2hji"><circle id="wheel" cx="123.359" cy="125" r="44" style="fill:currentColor;" class="svelte-1so2hji"></circle><path id="mouse" d="M236.717,123.359c0,-62.565 -50.794,-113.359 -113.358,-113.359c-62.565,0 -113.359,50.794 -113.359,113.359l0,143.237c0,62.565 50.794,113.359 113.359,113.359c62.564,0 113.358,-50.794 113.358,-113.359l0,-143.237Z" style="fill:none;stroke:currentColor;stroke-width:32px;" class="svelte-1so2hji"></path></svg> Scroll to view more',1),Jo=Kr('<div class="fixed right-6 bottom-6 left-6 z-2 mx-auto w-fit max-w-[calc(100%-2rem)] max-lg:hidden svelte-1so2hji"><!></div>'),Zo=Kr('<div class="flex h-full items-center justify-center gap-4 svelte-1so2hji"><!></div>'),Qo=Kr('<div class="pointer-events-none flex h-full items-center justify-center gap-4 svelte-1so2hji"><p class="text-white svelte-1so2hji"> </p></div>'),Xo=Kr('<div class="flex h-30 items-center svelte-1so2hji"><!></div>'),Yo=Kr('<div class="pointer-events-none container mx-auto flex h-fit flex-wrap content-start justify-center gap-14 sm:!px-14 2xl:!max-w-[1420px] svelte-1so2hji"><!> <div class="pointer-events-none flex h-8 w-full justify-center svelte-1so2hji"><!></div></div>'),es=Kr('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 flex flex-col justify-center text-white backdrop-blur-md svelte-1so2hji" id="playlight-discovery"><div class="pointer-events-none absolute top-0 right-0 left-0 z-1 flex items-center justify-between p-4 svelte-1so2hji"><img alt="logo" class="pointer-events-none ml-3 w-50 transition-[filter] select-none max-sm:w-40 svelte-1so2hji"/> <div class="mt-3.5 mr-4 flex items-center justify-evenly gap-8 overflow-hidden transition-[filter] max-sm:mt-3 svelte-1so2hji"><button class="cursor-pointer text-white transition hover:opacity-50 svelte-1so2hji"><!></button></div></div> <!> <div class="mask-fade relative h-full w-full overflow-y-auto overscroll-contain p-4 pt-20 sm:pt-24 svelte-1so2hji"><!></div></div>');Lr(["pointerup","click"]);var ts=Kr('<div class="fixed top-0 right-0 left-0 h-4 max-lg:hidden"></div>'),ns=Kr('<div class="relative"><img alt="" class="group-hover:outline-background relative h-7 w-7 bg-stone-200 outline outline-4 outline-white transition-colors select-none"/></div>'),rs=Kr('<div class="ml-3 flex items-center -space-x-2"></div>'),is=Kr("More games <!>",1),os=Kr('<div role="menu" tabindex="0" class="bg-background/85 fixed top-6 right-6 left-6 mx-auto flex w-fit max-w-[calc(100%-2rem)] flex-wrap items-center gap-4 overflow-hidden border-1 p-4 shadow-lg backdrop-blur-xl"><p class="truncate text-lg font-semibold text-nowrap text-white"> </p> <!></div>'),ss=Kr("<!> <!>",1);Lr(["pointerover"]);var ls=Kr("<!> <!>",1);function as(e){const[t,n]=Ve();var r=ls(),i=$e(r),o=e=>{!function(e,t){ae(t,!0);const[n,r]=Ve();let i,o,s,l=yn(!0),a=yn(!1),u=yn(!1),c=yn(void 0),f=yn(0),d=yn(!1),h=yn(!1),v=yn(he([])),p=yn(1),g=yn(!0),m=yn(void 0),w=yn(void 0),y=yn(void 0);async function b(){if(Qn(l)||Qn(a))return;1===Qn(p)?xn(l,!0):xn(a,!0);const e=await So.getSuggestions(Qn(p));if(e){xn(u,!1);const t=e.games||[],n=e.pageSize,r=t.filter(e=>!Qn(v).some(t=>t.id===e.id));xn(v,[...Qn(v),...r],!0),t.length<n?xn(g,!1):xn(p,Qn(p)+1)}else xn(u,!0);xn(l,!1),xn(a,!1),Qn(g)&&Qn(m)&&Qn(w)&&Qn(m).getBoundingClientRect().bottom<=Qn(w).getBoundingClientRect().bottom+1e3&&b()}function x(e){e.target===e.currentTarget&&"touch"!==e.pointerType&&Be($r,!1)}fo(()=>(i=new IntersectionObserver(e=>{e[0].isIntersecting&&Qn(g)&&b()},{rootMargin:"1000px",root:Qn(w)}),()=>i?.disconnect())),ir(()=>{Qn(m)&&i&&i.observe(Qn(m))}),fo(async()=>{xn(c,await So.getCurrentGameInfo(),!0),xn(l,!1),await async function(){xn(v,[],!0),xn(p,1),xn(g,!0),Qn(c)?.featured_game&&Qn(v).push({...Qn(c).featured_game,featured:!0}),await b()}()}),fo(()=>{o=new ResizeObserver(()=>{xn(h,Qn(w).scrollHeight>Qn(w).clientHeight)}),o.observe(Qn(w));for(const e of Qn(w).children)o.observe(e);return()=>o.disconnect()}),ir(()=>{Fe($r,"$discoveryOpen",n)&&(s=setTimeout(()=>xn(d,!0),750))}),ir(()=>{Qn(f)>0&&1==Qn(d)&&(clearTimeout(s),xn(d,!1))});var k=es();Rr("keydown",ge,e=>{"Escape"==e.key&&Be($r,!1)});var _=_e(k),M=_e(_);let S;var W=Me(M,2);let j;var O=_e(W);!function(e,t){ae(t,!0);let n=lo(t,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];wo(e,uo({name:"x"},()=>n,{get iconNode(){return r},children:(e,n)=>{var r=Jr();bi($e(r),()=>t.children??$),Zr(e,r)},$$slots:{default:!0}})),ue()}(_e(O),{size:24,strokeWidth:2.5});var C=Me(_,2),T=e=>{var t=Jo();zo(_e(t),{size:"lg",uppercase:!1,onclick:()=>{Qn(y)&&Qn(w).scrollBy({top:1.18*Qn(y).getBoundingClientRect().height+28,behavior:"smooth"})},class:"shadow-lg backdrop-blur-xl",children:(e,t)=>{Zr(e,Go())},$$slots:{default:!0}}),Wi(3,t,()=>$o,()=>({y:100,easing:Uo,duration:500})),Zr(e,t)};di(C,e=>{Qn(d)&&Qn(h)&&e(T)});var E=Me(C,2),P=_e(E),z=e=>{var t=Zo();yo(_e(t),{class:"animate-spin opacity-75",size:50,strokeWidth:2.25}),Zr(e,t)},A=e=>{var t=Qo(),n=_e(t),r=_e(n);ar(()=>Yr(r,Qn(u)?"Failed to load games.":"No games available.")),Zr(e,t)},N=e=>{var t=Yo(),n=_e(t);pi(n,17,()=>Qn(v),hi,(e,t,n)=>{var r=Jr(),i=$e(r),o=e=>{Eo(e,{get game(){return Qn(t)},get cardElement(){return Qn(y)},set cardElement(e){xn(y,e,!0)}})},s=e=>{Eo(e,{get game(){return Qn(t)}})};di(i,e=>{0===n?e(o):e(s,-1)}),Zr(e,r)});var r=Me(n,2),i=_e(r),o=e=>{var t=Xo();yo(_e(t),{class:"animate-spin opacity-75",size:40,strokeWidth:2.5}),Zr(e,t)};di(i,e=>{Qn(a)&&e(o)}),oo(r,e=>xn(m,e),()=>Qn(m)),Zr(e,t)};di(P,e=>{Qn(l)&&0===Qn(v).length?e(z):0!==Qn(v).length||Qn(l)?e(N,-1):e(A,1)}),oo(E,e=>xn(w,e),()=>Qn(w)),ar((e,t)=>{Ki(M,"src",Fe(Mr,"$cdnURL",n)+"/assets/images/logo-white-small.png"),S=Ni(M,"",S,e),j=Ni(W,"",j,t)},[()=>({filter:`drop-shadow(0 0 25px rgba(0,0,0,${Math.min(.6,Qn(f)/200)}))`}),()=>({filter:`drop-shadow(0 0 25px rgba(0,0,0,${Math.min(.6,Qn(f)/200)}))`})]),Ir("pointerup",k,x),Ir("click",O,()=>Be($r,!1)),Ir("pointerup",E,x),Rr("scroll",E,e=>xn(f,e.currentTarget.scrollTop,!0)),Wi(3,k,()=>_o,()=>({duration:250})),Zr(e,k),ue(),r()}(e,{})};di(i,e=>{Fe($r,"$discoveryOpen",t)&&e(o)}),function(e,t){ae(t,!0);const n=()=>Fe(_r,"$config",r),[r,i]=Ve();let o,s=yn(void 0),l=yn(void 0),a=yn(he([])),u=yn(!1),c=yn(void 0),f=["The cure for boredom","Ready for what’s next?","Why stop the fun now?","Games don’t play themselves","A new adventure awaits","There’s always time for one more"];var d=ss();Rr("mousemove",ge,function(e){n()?.exitIntent?.enabled&&(Qn(s)?.contains(e.target)||Qn(l)?.contains(e.target)||(!Qn(c)&&Qn(u)&&xn(c,setTimeout(()=>xn(u,!1),1500),!0),o=Date.now()))});var h=$e(d),v=e=>{var t=ts();oo(t,e=>xn(s,e),()=>Qn(s)),Ir("pointerover",t,e=>{"touch"!==e.pointerType&&!Fe($r,"$discoveryOpen",r)&&setTimeout(async()=>{o<Date.now()-50&&(clearTimeout(Qn(c)),xn(c,null),n()?.exitIntent?.immediate?(kr("exitIntent"),No("exit intent")):(kr("exitIntent"),xn(u,!0),Qn(a)?.length||xn(a,await Ao(3),!0)))},150)}),Zr(e,t)};di(h,e=>{n()?.exitIntent?.enabled&&e(v)});var p=Me(h,2),g=e=>{var t=os(),n=_e(t),r=_e(n);zo(Me(n,2),{class:"group",onclick:()=>{No("exit intent"),setTimeout(()=>xn(u,!1),150)},children:(e,t)=>{var n=is(),r=Me($e(n)),i=e=>{var t=rs();pi(t,21,()=>Qn(a),hi,(e,t,n)=>{var r=ns();let i;var o=_e(r);ar(()=>{i=Ni(r,"",i,{"z-index":Qn(a).length-n}),Ki(o,"src",Qn(t).logo_url)}),Zr(e,r)}),Wi(3,t,()=>Mo,()=>({axis:"x",duration:150})),Zr(e,t)};di(r,e=>{Qn(a)?.length>=3&&e(i)}),Zr(e,n)},$$slots:{default:!0}}),oo(t,e=>xn(l,e),()=>Qn(l)),ar(e=>Yr(r,e),[()=>f[Math.floor(Math.random()*f.length)]]),Rr("mouseenter",t,()=>{clearTimeout(Qn(c)),xn(c,null)}),Wi(3,t,()=>$o,()=>({y:-100,easing:Uo,duration:500})),Zr(e,t)};di(p,e=>{Qn(u)&&e(g)}),Zr(e,d),ue(),i()}(Me(i,2),{}),Zr(e,r),n()}let us=null;function cs(){try{const e=document.createElement("div");e.id="playlight-sdk-container",e.className="playlight-sdk playlight-sdk-container",document.body.appendChild(e);const t=ei(as,{target:e}),n=new MutationObserver(()=>{document.body.contains(e)||(clearTimeout(us),us=setTimeout(()=>{document.body.contains(e)||(console.warn("Re-mounting Playlight's main container as it was removed!"),n.disconnect(),function(e){const t=ni.get(e);t?(ni.delete(e),t(void 0)):Promise.resolve()}(t),cs())},0))});n.observe(document.body,{childList:!0})}catch(e){console.error("Error during Playlight mount:",e)}}const fs=new class{init(e={}){return typeof window>"u"?console.error("Playlight cannot run on the server."):window.playlightInitialized?console.warn("Playlight SDK is already initialized!"):(this.setConfig(e),cs(),Ko(),function(){try{new MutationObserver(()=>{Ko()}).observe(document.body,{childList:!0,subtree:!0})}catch(e){console.error("Error occurred setting up widget observer:",e)}}(),void(window.playlightInitialized=!0))}setDiscovery(e=!0){e?No("custom"):$r.set(!1)}onEvent(e,t){if(!["discoveryOpen","discoveryClose","exitIntent"].includes(e))return console.warn(`Invalid event type "${e}!"`);xr.has(e)||xr.set(e,[]),xr.get(e).push(t)}offEvent(e,t){const n=xr.get(e);if(!n)return;const r=n.indexOf(t);-1!==r&&n.splice(r,1)}setConfig(e={}){_r.set(u(e))}};typeof window<"u"&&(window.playlightSDK=fs);export{fs as default};
|
|
2
2
|
//# sourceMappingURL=playlight-sdk.es.js.map
|