playlight-sdk 0.3.0 → 0.3.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.css +1 -1
- package/dist/playlight-sdk.es.js +153 -147
- package/dist/playlight-sdk.es.js.map +1 -1
- package/dist/playlight-sdk.iife.js +15 -15
- package/dist/playlight-sdk.iife.js.map +1 -1
- package/package.json +1 -1
- /package/dist/{static → assets}/fonts/geist-variable-weight.woff2 +0 -0
- /package/dist/{static → assets}/images/icon-white-small.png +0 -0
- /package/dist/{static → assets}/images/logo-white-small.png +0 -0
- /package/dist/{static → assets}/sounds/hover-selection.ogg +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m,w,y,b,x,$,k,_,M,S,E,C,O,I,W,P,j,T,L,A,N,z,B,D,R,q,F,Y,G,H,V,K,U,X,Z,J,Q,tt,et,nt,rt,ot,it=Object.defineProperty,lt=t=>{throw TypeError(t)},st=(t,e,n)=>((t,e,n)=>e in t?it(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),at=(t,e,n)=>e.has(t)||lt("Cannot "+n),ct=(t,e,n)=>(at(t,e,"read from private field"),n?n.call(t):e.get(t)),ut=(t,e,n)=>e.has(t)?lt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),dt=(t,e,n,r)=>(at(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ft=(t,e,n)=>(at(t,e,"access private method"),n);const vt={exitIntent:{enabled:!0,immediate:!1},sidebar:{hasFrameworkRoot:"auto",forceVisible:!1}};function ht(t={}){return pt(vt,t)}function pt(t,e){const n={...t};return gt(t)&>(e)&&Object.keys(e).forEach(r=>{gt(e[r])?r in t?n[r]=pt(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})}),n}function gt(t){return t&&"object"==typeof t&&!Array.isArray(t)}var mt=Array.isArray,wt=Array.prototype.indexOf,yt=Array.from,bt=Object.defineProperty,xt=Object.getOwnPropertyDescriptor,$t=Object.getOwnPropertyDescriptors,kt=Object.prototype,_t=Array.prototype,Mt=Object.getPrototypeOf,St=Object.isExtensible;function Et(t){return"function"==typeof t}const Ct=()=>{};function Ot(t){return t()}function It(t){for(var e=0;e<t.length;e++)t[e]()}function Wt(){var t,e;return{promise:new Promise((n,r)=>{t=n,e=r}),resolve:t,reject:e}}function Pt(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 jt=16,Tt=1024,Lt=2048,At=4096,Nt=8192,zt=16384,Bt=32768,Dt=65536,Rt=1<<19,qt=256,Ft=1<<21,Yt=1<<23,Gt=Symbol("$state"),Ht=Symbol("legacy props"),Vt=Symbol(""),Kt=new class extends Error{constructor(){super(...arguments),st(this,"name","StaleReactionError"),st(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Ut(t){return t===this.v}function Xt(t,e){return t!=t?e==e:t!==e||null!==t&&"object"==typeof t||"function"==typeof t}function Zt(t){return!Xt(t,this.v)}function Jt(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let Qt=!1;const te=Symbol();let ee=null;function ne(t){ee=t}function re(t){return se().get(t)}function oe(t,e=!1,n){ee={p:ee,c:null,e:null,s:t,x:null,l:Qt&&!e?{s:null,u:null,$:[]}:null}}function ie(t){var e=ee,n=e.e;if(null!==n)for(var r of(e.e=null,n))Jn(r);return ee=e.p,{}}function le(){return!Qt||null!==ee&&null===ee.l}function se(t){return null===ee&&Jt(),ee.c??(ee.c=new Map(function(t){let e=t.p;for(;null!==e;){const t=e.c;if(null!==t)return t;e=e.p}return null}(ee)||void 0))}let ae=[];function ce(){var t=ae;ae=[],It(t)}function ue(t){if(0===ae.length&&!Ne){var e=ae;queueMicrotask(()=>{e===ae&&ce()})}ae.push(t)}function de(){for(;ae.length>0;)ce()}function fe(t){if("object"!=typeof t||null===t||Gt in t)return t;const e=Mt(t);if(e!==kt&&e!==_t)return t;var n=new Map,r=mt(t),o=on(0),i=Wn,l=t=>{if(Wn===i)return t();var e=yn,n=Wn;xn(null),Pn(i);var r=t();return xn(e),Pn(n),r};return r&&n.set("length",on(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=l(()=>{var t=on(r.value);return n.set(e,t),t}):sn(o,r.value,!0),!0},deleteProperty(t,e){var r=n.get(e);if(void 0===r){if(e in t){const t=l(()=>on(te));n.set(e,t),un(o)}}else sn(r,te),un(o);return!0},get(e,r,o){var i;if(r===Gt)return t;var s=n.get(r),a=r in e;if(void 0!==s||a&&!(null==(i=xt(e,r))?void 0:i.writable)||(s=l(()=>on(fe(a?e[r]:te))),n.set(r,s)),void 0!==s){var c=Rn(s);return c===te?void 0:c}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=Rn(o))}else if(void 0===r){var i=n.get(e),l=null==i?void 0:i.v;if(void 0!==i&&l!==te)return{enumerable:!0,configurable:!0,value:l,writable:!0}}return r},has(t,e){var r;if(e===Gt)return!0;var o=n.get(e),i=void 0!==o&&o.v!==te||Reflect.has(t,e);return!((void 0!==o||null!==$n&&(!i||(null==(r=xt(t,e))?void 0:r.writable)))&&(void 0===o&&(o=l(()=>on(i?fe(t[e]):te)),n.set(e,o)),Rn(o)===te))&&i},set(t,e,i,s){var a,c=n.get(e),u=e in t;if(r&&"length"===e)for(var d=i;d<c.v;d+=1){var f=n.get(d+"");void 0!==f?sn(f,te):d in t&&(f=l(()=>on(te)),n.set(d+"",f))}void 0===c?u&&!(null==(a=xt(t,e))?void 0:a.writable)||(sn(c=l(()=>on(void 0)),fe(i)),n.set(e,c)):(u=c.v!==te,sn(c,l(()=>fe(i))));var v=Reflect.getOwnPropertyDescriptor(t,e);if((null==v?void 0:v.set)&&v.set.call(s,i),!u){if(r&&"string"==typeof e){var h=n.get("length"),p=Number(e);Number.isInteger(p)&&p>=h.v&&sn(h,p+1)}un(o)}return!0},ownKeys(t){Rn(o);var e=Reflect.ownKeys(t).filter(t=>{var e=n.get(t);return void 0===e||e.v!==te});for(var[r,i]of n)i.v===te||r in t||e.push(r);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function ve(t){try{if(null!==t&&"object"==typeof t&&Gt in t)return t[Gt]}catch{}return t}function he(t,e){return Object.is(ve(t),ve(e))}var pe,ge,me,we;function ye(t=""){return document.createTextNode(t)}function be(t){return me.call(t)}function xe(t){return we.call(t)}function $e(t,e){return be(t)}function ke(t,e=!1){var n=be(t);return n instanceof Comment&&""===n.data?xe(n):n}function _e(t,e=1,n=!1){let r=t;for(;e--;)r=xe(r);return r}const Me=new WeakMap;function Se(t){var e=$n;if(null===e)return yn.f|=Yt,t;if(0===(e.f&Bt)){if(!(128&e.f))throw!e.parent&&t instanceof Error&&Ce(t),t;e.b.error(t)}else Ee(t,e)}function Ee(t,e){for(;null!==e;){if(128&e.f)try{return void e.b.error(t)}catch(n){t=n}e=e.parent}throw t instanceof Error&&Ce(t),t}function Ce(t){const e=Me.get(t);e&&(bt(t,"message",{value:e.message}),bt(t,"stack",{value:e.stack}))}const Oe=new Set;let Ie=null,We=null,Pe=null,je=new Set,Te=[],Le=null,Ae=!1,Ne=!1;t=new WeakMap,e=new WeakMap,n=new WeakMap,r=new WeakMap,o=new WeakMap,i=new WeakMap,l=new WeakMap,s=new WeakSet,a=function(t,e){var n;t.f^=Tt;for(var r=t.first;null!==r;){var o=r.f,i=!!(96&o),l=i&&0!==(o&Tt)||0!==(o&Nt)||this.skipped_effects.has(r);if(!!(128&r.f)&&(null==(n=r.b)?void 0:n.is_pending())&&(e={parent:e,effect:r,effects:[],render_effects:[],block_effects:[]}),!l&&null!==r.fn){i?r.f^=Tt:4&o?e.effects.push(r):Ln(r)&&(0!==(r.f&jt)&&e.block_effects.push(r),Dn(r));var a=r.first;if(null!==a){r=a;continue}}var u=r.parent;for(r=r.next;null===r&&null!==u;)u===e.effect&&(ft(this,s,c).call(this,e.effects),ft(this,s,c).call(this,e.render_effects),ft(this,s,c).call(this,e.block_effects),e=e.parent),r=u.next,u=u.parent}},c=function(t){for(const e of t)(0!==(e.f&Lt)?ct(this,i):ct(this,l)).push(e),Gn(e,Tt)},u=function(){if(0===ct(this,r)){for(const t of ct(this,e))t();ct(this,e).clear()}0===ct(this,n)&&ft(this,s,d).call(this)},d=function(){var e,n;if(Oe.size>1){ct(this,t).clear();var r=Pe,i=!0,l={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const t of Oe){if(t===this){i=!1;continue}const n=[];for(const[e,o]of this.current){if(t.current.has(e)){if(!i||o===t.current.get(e))continue;t.current.set(e,o)}n.push(e)}if(0===n.length)continue;const r=[...t.current.keys()].filter(t=>!this.current.has(t));if(r.length>0){const o=new Set,i=new Map;for(const t of n)Fe(t,r,o,i);if(Te.length>0){Ie=t,t.apply();for(const n of Te)ft(e=t,s,a).call(e,n,l);Te=[],t.deactivate()}}}Ie=null,Pe=r}this.committed=!0,Oe.delete(this),null==(n=ct(this,o))||n.resolve()};let ze=class d{constructor(){ut(this,s),st(this,"committed",!1),st(this,"current",new Map),ut(this,t,new Map),ut(this,e,new Set),ut(this,n,0),ut(this,r,0),ut(this,o,null),ut(this,i,[]),ut(this,l,[]),st(this,"skipped_effects",new Set)}process(t){Te=[],We=null,this.apply();var e={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of t)ft(this,s,a).call(this,n,e);ft(this,s,u).call(this),ct(this,r)>0?(ft(this,s,c).call(this,e.effects),ft(this,s,c).call(this,e.render_effects),ft(this,s,c).call(this,e.block_effects)):(We=this,Ie=null,qe(e.render_effects),qe(e.effects),We=null),Pe=null}capture(e,n){ct(this,t).has(e)||ct(this,t).set(e,n),this.current.set(e,e.v),null==Pe||Pe.set(e,e.v)}activate(){Ie=this}deactivate(){Ie=null,Pe=null}flush(){if(Te.length>0){if(this.activate(),Be(),null!==Ie&&Ie!==this)return}else ft(this,s,u).call(this);this.deactivate();for(const t of je)if(je.delete(t),t(),null!==Ie)break}increment(t){dt(this,n,ct(this,n)+1),t&&dt(this,r,ct(this,r)+1)}decrement(t){dt(this,n,ct(this,n)-1),t&&dt(this,r,ct(this,r)-1);for(const e of ct(this,i))Gn(e,Lt),Ge(e);for(const e of ct(this,l))Gn(e,At),Ge(e);dt(this,i,[]),dt(this,l,[]),this.flush()}add_callback(t){ct(this,e).add(t)}settled(){return(ct(this,o)??dt(this,o,Wt())).promise}static ensure(){if(null===Ie){const t=Ie=new d;Oe.add(Ie),Ne||d.enqueue(()=>{Ie===t&&t.flush()})}return Ie}static enqueue(t){ue(t)}apply(){}};function Be(){var t=pn;Ae=!0;try{var e=0;for(gn(!0);Te.length>0;){var n=ze.ensure();e++>1e3&&De(),n.process(Te),nn.clear()}}finally{Ae=!1,gn(t),Le=null}}function De(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){Ee(t,Le)}}let Re=null;function qe(t){var e=t.length;if(0!==e){for(var n=0;n<e;){var r=t[n++];if(!(24576&r.f)&&Ln(r)&&(Re=new Set,Dn(r),null===r.deps&&null===r.first&&null===r.nodes_start&&(null===r.teardown&&null===r.ac?ar(r):r.fn=null),(null==Re?void 0:Re.size)>0)){nn.clear();for(const t of Re){if(24576&t.f)continue;const e=[t];let n=t.parent;for(;null!==n;)Re.has(n)&&(Re.delete(n),e.push(n)),n=n.parent;for(let t=e.length-1;t>=0;t--){const n=e[t];24576&n.f||Dn(n)}}Re.clear()}}Re=null}}function Fe(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?Fe(o,e,n,r):4194320&t&&0===(t&Lt)&&Ye(o,e,r)&&(Gn(o,Lt),Ge(o))}}function Ye(t,e,n){const r=n.get(t);if(void 0!==r)return r;if(null!==t.deps)for(const o of t.deps){if(e.includes(o))return!0;if(2&o.f&&Ye(o,e,n))return n.set(o,!0),!0}return n.set(t,!1),!1}function Ge(t){for(var e=Le=t;null!==e.parent;){var n=(e=e.parent).f;if(Ae&&e===$n&&0!==(n&jt))return;if(96&n){if(0===(n&Tt))return;e.f^=Tt}}Te.push(e)}function He(t){let e,n=0,r=rn(0);return()=>{(function(){return null!==yn&&!bn})()&&(Rn(r),er(()=>(0===n&&(e=Fn(()=>t(()=>un(r)))),n+=1,()=>{ue(()=>{n-=1,0===n&&(null==e||e(),e=void 0,un(r))})})))}}class Ve{constructor(t,e,n){ut(this,O),st(this,"parent"),ut(this,f,!1),ut(this,v),ut(this,h,null),ut(this,p),ut(this,g),ut(this,m),ut(this,w,null),ut(this,y,null),ut(this,b,null),ut(this,x,null),ut(this,$,null),ut(this,k,0),ut(this,_,0),ut(this,M,!1),ut(this,S,null),ut(this,E,()=>{ct(this,S)&&an(ct(this,S),ct(this,k))}),ut(this,C,He(()=>(dt(this,S,rn(ct(this,k))),()=>{dt(this,S,null)}))),dt(this,v,t),dt(this,p,e),dt(this,g,n),this.parent=$n.b,dt(this,f,!!ct(this,p).pending),dt(this,m,rr(()=>{$n.b=this;var t=ft(this,O,I).call(this);try{dt(this,w,or(()=>n(t)))}catch(e){this.error(e)}return ct(this,_)>0?ft(this,O,P).call(this):dt(this,f,!1),()=>{var t;null==(t=ct(this,$))||t.remove()}},589952))}is_pending(){return ct(this,f)||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!ct(this,p).pending}update_pending_count(t){ft(this,O,j).call(this,t),dt(this,k,ct(this,k)+t),je.add(ct(this,E))}get_effect_pending(){return ct(this,C).call(this),Rn(ct(this,S))}error(t){var e=ct(this,p).onerror;let n=ct(this,p).failed;if(ct(this,M)||!e&&!n)throw t;ct(this,w)&&(sr(ct(this,w)),dt(this,w,null)),ct(this,y)&&(sr(ct(this,y)),dt(this,y,null)),ct(this,b)&&(sr(ct(this,b)),dt(this,b,null));var r=!1,o=!1;const i=()=>{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")}(),ze.ensure(),dt(this,k,0),null!==ct(this,b)&&cr(ct(this,b),()=>{dt(this,b,null)}),dt(this,f,this.has_pending_snippet()),dt(this,w,ft(this,O,W).call(this,()=>(dt(this,M,!1),or(()=>ct(this,g).call(this,ct(this,v)))))),ct(this,_)>0?ft(this,O,P).call(this):dt(this,f,!1))};var l=yn;try{xn(null),o=!0,null==e||e(t,i),o=!1}catch(s){Ee(s,ct(this,m)&&ct(this,m).parent)}finally{xn(l)}n&&ue(()=>{dt(this,b,ft(this,O,W).call(this,()=>{ze.ensure(),dt(this,M,!0);try{return or(()=>{n(ct(this,v),()=>t,()=>i)})}catch(s){return Ee(s,ct(this,m).parent),null}finally{dt(this,M,!1)}}))})}}function Ke(t,e,n){const r=le()?Xe:Je;if(0!==e.length){var o=Ie,i=$n,l=function(){var t=$n,e=yn,n=ee,r=Ie;return function(){kn(t),xn(e),ne(n),null==r||r.activate()}}();Promise.all(e.map(t=>function(t){let e=$n;null===e&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var n=e.b,r=void 0,o=rn(te),i=!yn,l=new Map;return Un(4718592,()=>{var e,s=Wt();r=s.promise;try{Promise.resolve(t()).then(s.resolve,s.reject).then(()=>{a===Ie&&a.committed&&a.deactivate(),Ue()})}catch(d){s.reject(d),Ue()}var a=Ie;if(i){var c=!n.is_pending();n.update_pending_count(1),a.increment(c),null==(e=l.get(a))||e.reject(Kt),l.delete(a),l.set(a,s)}const u=(t,e=void 0)=>{if(a.activate(),e)e!==Kt&&(o.f|=Yt,an(o,e));else{0!==(o.f&Yt)&&(o.f^=Yt),an(o,t);for(const[t,e]of l){if(l.delete(t),t===a)break;e.reject(Kt)}}i&&(n.update_pending_count(-1),a.decrement(c))};s.promise.then(u,t=>u(null,t||"unknown"))},!0),Xn(()=>{for(const t of l.values())t.reject(Kt)}),new Promise(t=>{!function e(n){function i(){n===r?t(o):e(r)}n.then(i,i)}(r)})}(t))).then(e=>{l();try{n([...t.map(r),...e])}catch(s){0===(i.f&zt)&&Ee(s,i)}null==o||o.deactivate(),Ue()}).catch(t=>{Ee(t,i)})}else n(t.map(r))}function Ue(){kn(null),xn(null),ne(null)}function Xe(t){var e=2050,n=null!==yn&&2&yn.f?yn:null;return null===$n||null!==n&&0!==(n.f&qt)?e|=qt:$n.f|=Rt,{ctx:ee,deps:null,effects:null,equals:Ut,f:e,fn:t,reactions:null,rv:0,v:te,wv:0,parent:n??$n,ac:null}}function Ze(t){const e=Xe(t);return Mn(e),e}function Je(t){const e=Xe(t);return e.equals=Zt,e}function Qe(t){var e=t.effects;if(null!==e){t.effects=null;for(var n=0;n<e.length;n+=1)sr(e[n])}}function tn(t){var e,n=$n;kn(function(t){for(var e=t.parent;null!==e;){if(!(2&e.f))return e;e=e.parent}return null}(t));try{t.f&=-32769,Qe(t),e=Nn(t)}finally{kn(n)}return e}function en(t){var e=tn(t);t.equals(e)||(t.v=e,t.wv=Tn()),mn||(null!==Pe?Pe.set(t,t.v):Gn(t,!jn&&0===(t.f&qt)||null===t.deps?Tt:At))}f=new WeakMap,v=new WeakMap,h=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,w=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap,$=new WeakMap,k=new WeakMap,_=new WeakMap,M=new WeakMap,S=new WeakMap,E=new WeakMap,C=new WeakMap,O=new WeakSet,I=function(){var t=ct(this,v);return ct(this,f)&&(dt(this,$,ye()),ct(this,v).before(ct(this,$)),t=ct(this,$)),t},W=function(t){var e=$n,n=yn,r=ee;kn(ct(this,m)),xn(ct(this,m)),ne(ct(this,m).ctx);try{return t()}catch(o){return Se(o),null}finally{kn(e),xn(n),ne(r)}},P=function(){const t=ct(this,p).pending;null!==ct(this,w)&&(dt(this,x,document.createDocumentFragment()),ct(this,x).append(ct(this,$)),hr(ct(this,w),ct(this,x))),null===ct(this,y)&&dt(this,y,or(()=>t(ct(this,v))))},j=function(t){var e;this.has_pending_snippet()?(dt(this,_,ct(this,_)+t),0===ct(this,_)&&(dt(this,f,!1),ct(this,y)&&cr(ct(this,y),()=>{dt(this,y,null)}),ct(this,x)&&(ct(this,v).before(ct(this,x)),dt(this,x,null)))):this.parent&&ft(e=this.parent,O,j).call(e,t)};const nn=new Map;function rn(t,e){return{f:0,v:t,reactions:null,equals:Ut,rv:0,wv:0}}function on(t,e){const n=rn(t);return Mn(n),n}function ln(t,e=!1,n=!0){var r;const o=rn(t);return e||(o.equals=Zt),Qt&&n&&null!==ee&&null!==ee.l&&((r=ee.l).s??(r.s=[])).push(o),o}function sn(t,e,n=!1){return null!==yn&&(!bn||!!(131072&yn.f))&&le()&&4325394&yn.f&&!(null==_n?void 0:_n.includes(t))&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),an(t,n?fe(e):e)}function an(t,e){if(!t.equals(e)){var n=t.v;mn?nn.set(t,e):nn.set(t,n),t.v=e,ze.ensure().capture(t,n),2&t.f&&(0!==(t.f&Lt)&&tn(t),Gn(t,0===(t.f&qt)?Tt:At)),t.wv=Tn(),dn(t,Lt),!le()||null===$n||0===($n.f&Tt)||96&$n.f||(null===Cn?Cn=[t]:Cn.push(t))}return e}function cn(t,e=1){var n=Rn(t),r=1===e?n++:n--;return sn(t,n),r}function un(t){sn(t,t.v+1)}function dn(t,e){var n=t.reactions;if(null!==n)for(var r=le(),o=n.length,i=0;i<o;i++){var l=n[i],s=l.f;if(r||l!==$n){var a=0===(s&Lt);a&&Gn(l,e),2&s?!(32768&s)&&(l.f|=32768,dn(l,At)):a&&(0!==(s&jt)&&null!==Re&&Re.add(l),Ge(l))}}}function fn(t,e){if(e){const e=document.body;t.autofocus=!0,ue(()=>{document.activeElement===e&&t.focus()})}}let vn=!1;function hn(t){var e=yn,n=$n;xn(null),kn(null);try{return t()}finally{xn(e),kn(n)}}let pn=!1;function gn(t){pn=t}let mn=!1;function wn(t){mn=t}let yn=null,bn=!1;function xn(t){yn=t}let $n=null;function kn(t){$n=t}let _n=null;function Mn(t){null!==yn&&(null===_n?_n=[t]:_n.push(t))}let Sn=null,En=0,Cn=null,On=1,In=0,Wn=In;function Pn(t){Wn=t}let jn=!1;function Tn(){return++On}function Ln(t){var e,n=t.f;if(0!==(n&Lt))return!0;if(0!==(n&At)){var r=t.deps,o=0!==(n&qt);if(2&n&&(t.f&=-32769),null!==r){var i,l,s=!!(512&n),a=o&&null!==$n&&!jn,c=r.length;if((s||a)&&(null===$n||0===($n.f&zt))){var u=t,d=u.parent;for(i=0;i<c;i++)l=r[i],!s&&(null==(e=null==l?void 0:l.reactions)?void 0:e.includes(u))||(l.reactions??(l.reactions=[])).push(u);s&&(u.f^=512),a&&null!==d&&0===(d.f&qt)&&(u.f^=qt)}for(i=0;i<c;i++)if(Ln(l=r[i])&&en(l),l.wv>t.wv)return!0}o&&(null===$n||jn)||Gn(t,Tt)}return!1}function An(t,e,n=!0){var r=t.reactions;if(null!==r&&!(null==_n?void 0:_n.includes(t)))for(var o=0;o<r.length;o++){var i=r[o];2&i.f?An(i,e,!1):e===i&&(n?Gn(i,Lt):0!==(i.f&Tt)&&Gn(i,At),Ge(i))}}function Nn(t){var e,n=Sn,r=En,o=Cn,i=yn,l=jn,s=_n,a=ee,c=bn,u=Wn,d=t.f;Sn=null,En=0,Cn=null,jn=0!==(d&qt)&&(bn||!pn||null===yn),yn=96&d?null:t,_n=null,ne(t.ctx),bn=!1,Wn=++In,null!==t.ac&&(hn(()=>{t.ac.abort(Kt)}),t.ac=null);try{t.f|=Ft;var f=(0,t.fn)(),v=t.deps;if(null!==Sn){var h;if(Bn(t,En),null!==v&&En>0)for(v.length=En+Sn.length,h=0;h<Sn.length;h++)v[En+h]=Sn[h];else t.deps=v=Sn;if(!jn||2&d&&null!==t.reactions)for(h=En;h<v.length;h++)((e=v[h]).reactions??(e.reactions=[])).push(t)}else null!==v&&En<v.length&&(Bn(t,En),v.length=En);if(le()&&null!==Cn&&!bn&&null!==v&&!(6146&t.f))for(h=0;h<Cn.length;h++)An(Cn[h],t);return null!==i&&i!==t&&(In++,null!==Cn&&(null===o?o=Cn:o.push(...Cn))),0!==(t.f&Yt)&&(t.f^=Yt),f}catch(p){return Se(p)}finally{t.f^=Ft,Sn=n,En=r,Cn=o,yn=i,jn=l,_n=s,ne(a),bn=c,Wn=u}}function zn(t,e){let n=e.reactions;if(null!==n){var r=wt.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===Sn||!Sn.includes(e))&&(Gn(e,At),768&e.f||(e.f^=512),Qe(e),Bn(e,0))}function Bn(t,e){var n=t.deps;if(null!==n)for(var r=e;r<n.length;r++)zn(t,n[r])}function Dn(t){var e=t.f;if(0===(e&zt)){Gn(t,Tt);var n=$n,r=pn;$n=t,pn=!0;try{0!==(e&jt)?function(t){for(var e=t.first;null!==e;){var n=e.next;!(32&e.f)&&sr(e),e=n}}(t):lr(t),ir(t);var o=Nn(t);t.teardown="function"==typeof o?o:null,t.wv=On}finally{pn=r,$n=n}}}function Rn(t){var e=!!(2&t.f);if(null===yn||bn){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null!==r&&0===(r.f&qt)&&(n.f^=qt)}}else if((null===$n||0===($n.f&zt))&&!(null==_n?void 0:_n.includes(t))){var o=yn.deps;if(0!==(yn.f&Ft))t.rv<In&&(t.rv=In,null===Sn&&null!==o&&o[En]===t?En++:null===Sn?Sn=[t]:jn&&Sn.includes(t)||Sn.push(t));else{(yn.deps??(yn.deps=[])).push(t);var i=t.reactions;null===i?t.reactions=[yn]:i.includes(yn)||i.push(yn)}}if(mn){if(nn.has(t))return nn.get(t);if(e){var l=(n=t).v;return(0===(n.f&Tt)&&null!==n.reactions||qn(n))&&(l=tn(n)),nn.set(n,l),l}}else if(e){if(n=t,null==Pe?void 0:Pe.has(n))return Pe.get(n);Ln(n)&&en(n)}if(null==Pe?void 0:Pe.has(t))return Pe.get(t);if(0!==(t.f&Yt))throw t.v;return t.v}function qn(t){if(t.v===te)return!0;if(null===t.deps)return!1;for(const e of t.deps){if(nn.has(e))return!0;if(2&e.f&&qn(e))return!0}return!1}function Fn(t){var e=bn;try{return bn=!0,t()}finally{bn=e}}const Yn=-7169;function Gn(t,e){t.f=t.f&Yn|e}function Hn(t){if("object"==typeof t&&t&&!(t instanceof EventTarget))if(Gt in t)Vn(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];"object"==typeof n&&n&&Gt in n&&Vn(n)}}function Vn(t,e=new Set){if(!("object"!=typeof t||null===t||t instanceof EventTarget||e.has(t))){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{Vn(t[o],e)}catch(n){}const r=Mt(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=$t(r);for(let r in e){const o=e[r].get;if(o)try{o.call(t)}catch(n){}}}}}function Kn(t){null===$n&&null===yn&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==yn&&0!==(yn.f&qt)&&null===$n&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),mn&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function Un(t,e,n,r=!0){var o=$n;null!==o&&0!==(o.f&Nt)&&(t|=Nt);var i,l,s,a={ctx:ee,deps:null,nodes_start:null,nodes_end:null,f:t|Lt,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{Dn(a),a.f|=Bt}catch(d){throw sr(a),d}else null!==e&&Ge(a);if(r){var c=a;if(n&&null===c.deps&&null===c.teardown&&null===c.nodes_start&&c.first===c.last&&0===(c.f&Rt)&&(c=c.first,0!==(t&jt)&&0!==(t&Dt)&&null!==c&&(c.f|=Dt)),null!==c&&(c.parent=o,null!==o&&(i=c,null===(s=(l=o).last)?l.last=l.first=i:(s.next=i,i.prev=s,l.last=i)),null!==yn&&2&yn.f&&!(64&t))){var u=yn;(u.effects??(u.effects=[])).push(c)}}return a}function Xn(t){const e=Un(8,null,!1);return Gn(e,Tt),e.teardown=t,e}function Zn(t){Kn();var e=$n.f;if(yn||!(32&e)||0!==(e&Bt))return Jn(t);var n=ee;(n.e??(n.e=[])).push(t)}function Jn(t){return Un(1048580,t,!1)}function Qn(t){return Kn(),Un(1048584,t,!0)}function tr(t){return Un(4,t,!1)}function er(t,e=0){return Un(8|e,t,!0)}function nr(t,e=[],n=[]){Ke(e,n,e=>{Un(8,()=>t(...e.map(Rn)),!0)})}function rr(t,e=0){return Un(jt|e,t,!0)}function or(t,e=!0){return Un(524320,t,!0,e)}function ir(t){var e=t.teardown;if(null!==e){const t=mn,n=yn;wn(!0),xn(null);try{e.call(null)}finally{wn(t),xn(n)}}}function lr(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){const t=n.ac;null!==t&&hn(()=>{t.abort(Kt)});var r=n.next;64&n.f?n.parent=null:sr(n,e),n=r}}function sr(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:xe(t);t.remove(),t=n}}(t.nodes_start,t.nodes_end),n=!0),lr(t,e&&!n),Bn(t,0),Gn(t,zt);var r=t.transitions;if(null!==r)for(const i of r)i.stop();ir(t);var o=t.parent;null!==o&&null!==o.first&&ar(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function ar(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 cr(t,e,n=!0){var r=[];dr(t,r,!0),ur(r,()=>{n&&sr(t),e&&e()})}function ur(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function dr(t,e,n){if(0===(t.f&Nt)){if(t.f^=Nt,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;dr(r,e,!!(0!==(r.f&Dt)||32&r.f&&0!==(t.f&jt))&&n),r=o}}}function fr(t){vr(t,!0)}function vr(t,e){if(0!==(t.f&Nt)){t.f^=Nt,0===(t.f&Tt)&&(Gn(t,Lt),Ge(t));for(var n=t.first;null!==n;){var r=n.next;vr(n,!!(0!==(n.f&Dt)||32&n.f)&&e),n=r}if(null!==t.transitions)for(const n of t.transitions)(n.is_global||e)&&n.in()}}function hr(t,e){for(var n=t.nodes_start,r=t.nodes_end;null!==n;){var o=n===r?null:xe(n);e.append(n),n=o}}function pr(t){return t.endsWith("capture")&&"gotpointercapture"!==t&&"lostpointercapture"!==t}const gr=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function mr(t){return gr.includes(t)}const wr={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 yr(t){return t=t.toLowerCase(),wr[t]??t}const br=["touchstart","touchmove"];function xr(t){return br.includes(t)}const $r=new Set,kr=new Set;function _r(t,e,n,r={}){function o(t){if(r.capture||Or.call(e,t),!t.cancelBubble)return hn(()=>null==n?void 0:n.call(this,t))}return t.startsWith("pointer")||t.startsWith("touch")||"wheel"===t?ue(()=>{e.addEventListener(t,o,r)}):e.addEventListener(t,o,r),o}function Mr(t,e,n,r={}){var o=_r(e,t,n,r);return()=>{t.removeEventListener(e,o,r)}}function Sr(t,e,n,r,o){var i={capture:r,passive:o},l=_r(t,e,n,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Xn(()=>{e.removeEventListener(t,l,i)})}function Er(t){for(var e=0;e<t.length;e++)$r.add(t[e]);for(var n of kr)n(t)}let Cr=null;function Or(t){var e,n=this,r=n.ownerDocument,o=t.type,i=(null==(e=t.composedPath)?void 0:e.call(t))||[],l=i[0]||t.target;Cr=t;var s=0,a=Cr===t&&t.__root;if(a){var c=i.indexOf(a);if(-1!==c&&(n===document||n===window))return void(t.__root=n);var u=i.indexOf(n);if(-1===u)return;c<=u&&(s=c)}if((l=i[s]||t.target)!==n){bt(t,"currentTarget",{configurable:!0,get:()=>l||r});var d=yn,f=$n;xn(null),kn(null);try{for(var v,h=[];null!==l;){var p=l.assignedSlot||l.parentNode||l.host||null;try{var g=l["__"+o];if(null!=g&&(!l.disabled||t.target===l))if(mt(g)){var[m,...w]=g;m.apply(l,[t,...w])}else g.call(l,t)}catch(y){v?h.push(y):v=y}if(t.cancelBubble||p===n||null===p)break;l=p}if(v){for(let t of h)queueMicrotask(()=>{throw t});throw v}}finally{t.__root=n,delete t.currentTarget,xn(d),kn(f)}}}function Ir(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","\x3c!----\x3e"),e.content}function Wr(t,e){var n=$n;null===n.nodes_start&&(n.nodes_start=t,n.nodes_end=e)}function Pr(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("<!>");return()=>{void 0===n&&(n=Ir(i?t:"<!>"+t),r||(n=be(n)));var e=o||ge?document.importNode(n,!0):n.cloneNode(!0);return r?Wr(be(e),e.lastChild):Wr(e,e),e}}function jr(t,e){return function(t,e,n="svg"){var r,o=`<${n}>${t.startsWith("<!>")?"<!>"+t:t}</${n}>`;return()=>{if(!r){var t=be(Ir(o));r=be(t)}var e=r.cloneNode(!0);return Wr(e,e),e}}(t,0,"svg")}function Tr(t=""){var e=ye(t+"");return Wr(e,e),e}function Lr(){var t=document.createDocumentFragment(),e=document.createComment(""),n=ye();return t.append(e,n),Wr(e,n),t}function Ar(t,e){null!==t&&t.before(e)}let Nr=!0;function zr(t){Nr=t}function Br(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 Dr(t,e){return function(t,{target:e,anchor:n,props:r={},events:o,context:i,intro:l=!0}){!function(){if(void 0===pe){pe=window,ge=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;me=xt(e,"firstChild").get,we=xt(e,"nextSibling").get,St(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),St(n)&&(n.__t=void 0)}}();var s=new Set,a=t=>{for(var n=0;n<t.length;n++){var r=t[n];if(!s.has(r)){s.add(r);var o=xr(r);e.addEventListener(r,Or,{passive:o});var i=Rr.get(r);void 0===i?(document.addEventListener(r,Or,{passive:o}),Rr.set(r,1)):Rr.set(r,i+1)}}};a(yt($r)),kr.add(a);var c=void 0,u=function(t){ze.ensure();const e=Un(524352,t,!0);return(t={})=>new Promise(n=>{t.outro?cr(e,()=>{sr(e),n(void 0)}):(sr(e),n(void 0))})}(()=>{var u,d=n??e.appendChild(ye());return u=e=>{i&&(oe({}),ee.c=i),o&&(r.$$events=o),Nr=l,c=t(e,r)||{},Nr=!0,i&&ie()},new Ve(d,{pending:()=>{}},u),()=>{var t;for(var r of s){e.removeEventListener(r,Or);var o=Rr.get(r);0===--o?(document.removeEventListener(r,Or),Rr.delete(r)):Rr.set(r,o)}kr.delete(a),d!==n&&(null==(t=d.parentNode)||t.removeChild(d))}});return qr.set(c,u),c}(t,e)}const Rr=new Map;let qr=new WeakMap;function Fr(t,e){const n=qr.get(t);return n?(qr.delete(t),n(e)):Promise.resolve()}class Yr{constructor(t,e=!0){st(this,"anchor"),ut(this,T,new Map),ut(this,L,new Map),ut(this,A,new Map),ut(this,N,!0),ut(this,z,()=>{var t=Ie;if(ct(this,T).has(t)){var e=ct(this,T).get(t),n=ct(this,L).get(e);if(n)fr(n);else{var r=ct(this,A).get(e);r&&(ct(this,L).set(e,r.effect),ct(this,A).delete(e),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(const[e,n]of ct(this,T)){if(ct(this,T).delete(e),e===t)break;const r=ct(this,A).get(n);r&&(sr(r.effect),ct(this,A).delete(n))}for(const[t,r]of ct(this,L)){if(t===e)continue;const o=()=>{if(Array.from(ct(this,T).values()).includes(t)){var e=document.createDocumentFragment();hr(r,e),e.append(ye()),ct(this,A).set(t,{effect:r,fragment:e})}else sr(r);ct(this,L).delete(t)};ct(this,N)||!n?cr(r,o,!1):o()}}}),this.anchor=t,dt(this,N,e)}ensure(t,e){var n=Ie;!e||ct(this,L).has(t)||ct(this,A).has(t)||ct(this,L).set(t,or(()=>e(this.anchor))),ct(this,T).set(n,t),ct(this,z).call(this)}}function Gr(t,e,n=!1){var r=new Yr(t);function o(t,e){r.ensure(t,e)}rr(()=>{var t=!1;e((e,n=!0)=>{t=!0,o(n,e)}),t||o(!1,null)},n?Dt:0)}T=new WeakMap,L=new WeakMap,A=new WeakMap,N=new WeakMap,z=new WeakMap;let Hr=null;function Vr(t){Hr=t}function Kr(t,e){return e}function Ur(t,e,n,r,o,i=null){var l=t,s={flags:e,items:new Map,first:null};!(4&e)||(l=t.appendChild(ye()));var a,c,u=null,d=!1,f=new Map,v=Je(()=>{var t=n();return mt(t)?t:null==t?[]:yt(t)});rr(()=>{c??(c=$n);var t=(a=Rn(v)).length;d&&0===t||(d=0===t,function(t,e,n,r,o,i,l,s,a){var c,u,d,f,v,h,p,g,m,w,y=!!(8&l),b=!!(3&l),x=e.length,$=n.items,k=n.first,_=null,M=[],S=[];if(y)for(w=0;w<x;w+=1)g=s(p=e[w],w),void 0!==(m=$.get(g))&&(null==(c=m.a)||c.measure(),(h??(h=new Set)).add(m));for(w=0;w<x;w+=1)if(g=s(p=e[w],w),void 0!==(m=$.get(g))){if(b&&Xr(m,p,w,l),0!==(m.e.f&Nt)&&(fr(m.e),y&&(null==(u=m.a)||u.unfix(),(h??(h=new Set)).delete(m))),m!==k){if(void 0!==v&&v.has(m)){if(M.length<S.length){var E,C=S[0];_=C.prev;var O=M[0],I=M[M.length-1];for(E=0;E<M.length;E+=1)Jr(M[E],C,o);for(E=0;E<S.length;E+=1)v.delete(S[E]);Qr(n,O.prev,I.next),Qr(n,_,O),Qr(n,I,C),k=C,_=I,w-=1,M=[],S=[]}else v.delete(m),Jr(m,k,o),Qr(n,m.prev,m.next),Qr(n,m,null===_?n.first:_.next),Qr(n,_,m),_=m;continue}for(M=[],S=[];null!==k&&k.k!==g;)0===(k.e.f&Nt)&&(v??(v=new Set)).add(k),S.push(k),k=k.next;if(null===k)continue;m=k}M.push(m),_=m,k=m.next}else{var W=r.get(g);if(void 0!==W){r.delete(g),$.set(g,W);var P=_?_.next:k;Qr(n,_,W),Qr(n,W,P),Jr(W,P,o),_=W}else _=Zr(k?k.e.nodes_start:o,n,_,null===_?n.first:_.next,p,g,w,i,l,a);$.set(g,_),M=[],S=[],k=_.next}if(null!==k||void 0!==v){for(var j=void 0===v?[]:yt(v);null!==k;)0===(k.e.f&Nt)&&j.push(k),k=k.next;var T=j.length;if(T>0){var L=4&l&&0===x?o:null;if(y){for(w=0;w<T;w+=1)null==(d=j[w].a)||d.measure();for(w=0;w<T;w+=1)null==(f=j[w].a)||f.fix()}!function(t,e,n){for(var r=t.items,o=[],i=e.length,l=0;l<i;l++)dr(e[l].e,o,!0);var s=i>0&&0===o.length&&null!==n;if(s){var a=n.parentNode;a.textContent="",a.append(n),r.clear(),Qr(t,e[0].prev,e[i-1].next)}ur(o,()=>{for(var n=0;n<i;n++){var o=e[n];s||(r.delete(o.k),Qr(t,o.prev,o.next)),sr(o.e,!s)}})}(n,j,L)}}for(var A of(y&&ue(()=>{var t;if(void 0!==h)for(m of h)null==(t=m.a)||t.apply()}),t.first=n.first&&n.first.e,t.last=_&&_.e,r.values()))sr(A.e);r.clear()}(c,a,s,f,l,o,e,r,n),null!==i&&(0===a.length?u?fr(u):u=or(()=>i(l)):null!==u&&cr(u,()=>{u=null})),Rn(v))})}function Xr(t,e,n,r){1&r&&an(t.v,e),2&r?an(t.i,n):t.i=n}function Zr(t,e,n,r,o,i,l,s,a,c,u){var d=Hr,f=1&a?16&a?rn(o):ln(o,!1,!1):o,v=2&a?rn(l):l,h={i:v,v:f,k:i,a:null,e:null,prev:n,next:r};Hr=h;try{return null===t&&document.createDocumentFragment().append(t=ye()),h.e=or(()=>s(t,f,v,c),!1),h.e.prev=n&&n.e,h.e.next=r&&r.e,null===n?u||(e.first=h):(n.next=h,n.e.next=h.e),null!==r&&(r.prev=h,r.e.prev=h.e),h}finally{Hr=d}}function Jr(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 l=xe(i);o.before(i),i=l}}function Qr(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 to(t,e,n,r,o){var i,l=null==(i=e.$$slots)?void 0:i[n],s=!1;!0===l&&(l=e.children,s=!0),void 0===l||l(t,s?()=>r:r)}function eo(t,e,...n){var r=new Yr(t);rr(()=>{const t=e()??null;r.ensure(t,t&&(e=>t(e,...n)))},Dt)}function no(t,e,n){var r=new Yr(t);rr(()=>{var t=e()??null;r.ensure(t,t&&(e=>n(e,t)))},Dt)}function ro(t,e){var n,r=void 0;rr(()=>{r!==(r=e())&&(n&&(sr(n),n=null),r&&(n=or(()=>{tr(()=>r(t))})))})}function oo(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=oo(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function io(t){return"object"==typeof t?function(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=oo(t))&&(r&&(r+=" "),r+=e);return r}(t):t??""}const lo=[..." \t\n\r\f \v\ufeff"];function so(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 ao(t){return"-"!==t[0]||"-"!==t[1]?t.toLowerCase():t}function co(t,e,n,r,o,i){var l=t.__className;if(l!==n||void 0===l){var s=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,l=0;(l=r.indexOf(o,l))>=0;){var s=l+i;0!==l&&!lo.includes(r[l-1])||s!==r.length&&!lo.includes(r[s])?l=s:r=(0===l?"":r.substring(0,l))+r.substring(s+1)}return""===r?null:r}(n,r,i);null==s?t.removeAttribute("class"):e?t.className=s:t.setAttribute("class",s),t.__className=n}else if(i&&o!==i)for(var a in i){var c=!!i[a];null!=o&&c===!!o[a]||t.classList.toggle(a,c)}return i}function uo(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 fo(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,l=0,s=!1,a=[];n&&a.push(...Object.keys(n).map(ao)),r&&a.push(...Object.keys(r).map(ao));var c=0,u=-1;const e=t.length;for(var d=0;d<e;d++){var f=t[d];if(s?"/"===f&&"*"===t[d-1]&&(s=!1):i?i===f&&(i=!1):"/"===f&&"*"===t[d+1]?s=!0:'"'===f||"'"===f?i=f:"("===f?l++:")"===f&&l--,!s&&!1===i&&0===l)if(":"===f&&-1===u)u=d;else if(";"===f||d===e-1){if(-1!==u){var v=ao(t.substring(c,u).trim());a.includes(v)||(";"!==f&&d++,o+=" "+t.substring(c,d).trim()+";")}c=d+1,u=-1}}}return n&&(o+=so(n)),r&&(o+=so(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)?(uo(t,null==n?void 0:n[0],r[0]),uo(t,null==n?void 0:n[1],r[1],"important")):uo(t,n,r));return r}function vo(t,e,n=!1){if(t.multiple){if(null==e)return;if(!mt(e))return void console.warn("https://svelte.dev/e/select_multiple_invalid_value");for(var r of t.options)r.selected=e.includes(ho(r))}else{for(r of t.options)if(he(ho(r),e))return void(r.selected=!0);n&&void 0===e||(t.selectedIndex=-1)}}function ho(t){return"__value"in t?t.__value:t.value}const po=Symbol("class"),go=Symbol("style"),mo=Symbol("is custom element"),wo=Symbol("is html");function yo(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function bo(t,e,n,r){var o=$o(t);o[e]!==(o[e]=n)&&("loading"===e&&(t[Vt]=n),null==n?t.removeAttribute(e):"string"!=typeof n&&_o(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function xo(t,e,n=[],r=[],o,i=!1,l=!1){Ke(n,r,n=>{var r=void 0,s={},a="SELECT"===t.nodeName,c=!1;if(rr(()=>{var u=e(...n.map(Rn)),d=function(t,e,n,r){var o=$o(t),i=o[mo],l=!o[wo],s=e||{},a="OPTION"===t.tagName;for(var c in e)c in n||(n[c]=null);n.class?n.class=io(n.class):(r||n[po])&&(n.class=null),n[go]&&(n.style??(n.style=null));var u=_o(t);for(const g in n){let c=n[g];if(a&&"value"===g&&null==c)t.value=t.__value="",s[g]=c;else if("class"!==g)if("style"!==g){var d=s[g];if(c!==d||void 0===c&&t.hasAttribute(g)){s[g]=c;var f=g[0]+g[1];if("$$"!==f)if("on"===f){const e={},n="$$"+g;let r=g.slice(2);var v=mr(r);if(pr(r)&&(r=r.slice(0,-7),e.capture=!0),!v&&d){if(null!=c)continue;t.removeEventListener(r,s[n],e),s[n]=null}if(null!=c)if(v)t[`__${r}`]=c,Er([r]);else{let o=function(t){s[g].call(this,t)};s[n]=_r(r,t,o,e)}else v&&(t[`__${r}`]=void 0)}else if("style"===g)bo(t,g,c);else if("autofocus"===g)fn(t,Boolean(c));else if(i||"__value"!==g&&("value"!==g||null==c))if("selected"===g&&a)yo(t,c);else{var h=g;l||(h=yr(h));var p="defaultValue"===h||"defaultChecked"===h;if(null!=c||i||p)p||u.includes(h)&&(i||"string"!=typeof c)?(t[h]=c,h in o&&(o[h]=te)):"function"!=typeof c&&bo(t,h,c);else if(o[g]=null,"value"===h||"checked"===h){let n=t;const r=void 0===e;if("value"===h){let t=n.defaultValue;n.removeAttribute(h),n.defaultValue=t,n.value=n.__value=r?t:null}else{let t=n.defaultChecked;n.removeAttribute(h),n.defaultChecked=t,n.checked=!!r&&t}}else t.removeAttribute(g)}else t.value=t.__value=c}}else fo(t,c,null==e?void 0:e[go],n[go]),s[g]=c,s[go]=n[go];else co(t,"http://www.w3.org/1999/xhtml"===t.namespaceURI,c,r,null==e?void 0:e[po],n[po]),s[g]=c,s[po]=n[po]}return s}(t,r,u,o,i,l);c&&a&&"value"in u&&vo(t,u.value);for(let t of Object.getOwnPropertySymbols(s))u[t]||sr(s[t]);for(let e of Object.getOwnPropertySymbols(u)){var f=u[e];"@attach"!==e.description||r&&f===r[e]||(s[e]&&sr(s[e]),s[e]=or(()=>ro(t,()=>f))),d[e]=f}r=d}),a){var u=t;tr(()=>{var t,e;vo(u,r.value,!0),t=u,(e=new MutationObserver(()=>{vo(t,t.__value)})).observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Xn(()=>{e.disconnect()})})}c=!0})}function $o(t){return t.__attributes??(t.__attributes={[mo]:t.nodeName.includes("-"),[wo]:"http://www.w3.org/1999/xhtml"===t.namespaceURI})}var ko=new Map;function _o(t){var e,n=t.getAttribute("is")||t.nodeName,r=ko.get(n);if(r)return r;ko.set(n,r=[]);for(var o=t,i=Element.prototype;i!==o;){for(var l in e=$t(o))e[l].set&&r.push(l);o=Mt(o)}return r}const Mo={tick:t=>requestAnimationFrame(t),now:()=>performance.now(),tasks:new Set};function So(){const t=Mo.now();Mo.tasks.forEach(e=>{e.c(t)||(Mo.tasks.delete(e),e.f())}),0!==Mo.tasks.size&&Mo.tick(So)}function Eo(t,e){hn(()=>{t.dispatchEvent(new CustomEvent(e))})}function Co(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 Oo(t){const e={},n=t.split(";");for(const r of n){const[t,n]=r.split(":");if(!t||void 0===n)break;e[Co(t.trim())]=n.trim()}return e}const Io=t=>t;function Wo(t,e,n,r){var o,i,l,s=!!(1&t),a=!!(2&t),c=!!(4&t),u=s&&a?"both":s?"in":"out",d=e.inert,f=e.style.overflow;function v(){return hn(()=>o??(o=n()(e,(null==r?void 0:r())??{},{direction:u})))}var h={is_global:c,in(){var t;if(e.inert=d,!s)return null==l||l.abort(),void(null==(t=null==l?void 0:l.reset)||t.call(l));a||null==i||i.abort(),Eo(e,"introstart"),i=Po(e,v(),l,1,()=>{Eo(e,"introend"),null==i||i.abort(),i=o=void 0,e.style.overflow=f})},out(t){if(!a)return null==t||t(),void(o=void 0);e.inert=!0,Eo(e,"outrostart"),l=Po(e,v(),i,0,()=>{Eo(e,"outroend"),null==t||t()})},stop:()=>{null==i||i.abort(),null==l||l.abort()}},p=$n;if((p.transitions??(p.transitions=[])).push(h),s&&Nr){var g=c;if(!g){for(var m=p.parent;m&&0!==(m.f&Dt);)for(;(m=m.parent)&&0===(m.f&jt););g=!m||0!==(m.f&Bt)}g&&tr(()=>{Fn(()=>h.in())})}}function Po(t,e,n,r,o){var i=1===r;if(Et(e)){var l,s=!1;return ue(()=>{if(!s){var a=e({direction:i?"in":"out"});l=Po(t,a,n,r,o)}}),{abort:()=>{s=!0,null==l||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(null==n||n.deactivate(),!(null==e?void 0:e.duration))return o(),{abort:Ct,deactivate:Ct,reset:Ct,t:()=>r};const{delay:a=0,css:c,tick:u,easing:d=Io}=e;var f=[];if(i&&void 0===n&&(u&&u(0,1),c)){var v=Oo(c(0,1));f.push(v,v)}var h=()=>1-r,p=t.animate(f,{duration:a,fill:"forwards"});return p.onfinish=()=>{p.cancel();var i=(null==n?void 0:n.t())??1-r;null==n||n.abort();var l=r-i,s=e.duration*Math.abs(l),a=[];if(s>0){var f=!1;if(c)for(var v=Math.ceil(s/(1e3/60)),g=0;g<=v;g+=1){var m=i+l*d(g/v),w=Oo(c(m,1-m));a.push(w),f||(f="hidden"===w.overflow)}f&&(t.style.overflow="hidden"),h=()=>{var t=p.currentTime;return i+l*d(t/s)},u&&function(t){let e;0===Mo.tasks.size&&Mo.tick(So),new Promise(n=>{Mo.tasks.add(e={c:t,f:n})})}(()=>{if("running"!==p.playState)return!1;var t=h();return u(t,1-t),!0})}(p=t.animate(a,{duration:s,fill:"forwards"})).onfinish=()=>{h=()=>r,null==u||u(r,1-r),o()}},{abort:()=>{p&&(p.cancel(),p.effect=null,p.onfinish=Ct)},deactivate:()=>{o=Ct},reset:()=>{0===r&&(null==u||u(1,0))},t:()=>h()}}function jo(t){var e=t.type;return"number"===e||"range"===e}function To(t){return""===t?null:+t}const Lo=class{constructor(t){ut(this,q),ut(this,B,new WeakMap),ut(this,D),ut(this,R),dt(this,R,t)}observe(t,e){var n=ct(this,B).get(t)||new Set;return n.add(e),ct(this,B).set(t,n),ft(this,q,F).call(this).observe(t,ct(this,R)),()=>{var n=ct(this,B).get(t);n.delete(e),0===n.size&&(ct(this,B).delete(t),ct(this,D).unobserve(t))}}};B=new WeakMap,D=new WeakMap,R=new WeakMap,q=new WeakSet,F=function(){return ct(this,D)??dt(this,D,new ResizeObserver(t=>{for(var e of t)for(var n of(Lo.entries.set(e.target,e),ct(this,B).get(e.target)||[]))n(e)}))},st(Lo,"entries",new WeakMap);var Ao=new Lo({box:"border-box"});function No(t,e){return t===e||(null==t?void 0:t[Gt])===e}function zo(t={},e,n,r){return tr(()=>{var r,o;return er(()=>{r=o,o=[],Fn(()=>{t!==n(...o)&&(e(t,...o),r&&No(n(...r),t)&&e(null,...r))})}),()=>{ue(()=>{o&&No(n(...o),t)&&e(null,...o)})}}),t}function Bo(t=!1){const e=ee,n=e.l.u;if(!n)return;let r=()=>Hn(e.s);if(t){let t=0,n={};const o=Xe(()=>{let r=!1;const o=e.s;for(const t in o)o[t]!==n[t]&&(n[t]=o[t],r=!0);return r&&t++,t});r=()=>Rn(o)}n.b.length&&Qn(()=>{Do(e,r),It(n.b)}),Zn(()=>{const t=Fn(()=>n.m.map(Ot));return()=>{for(const e of t)"function"==typeof e&&e()}}),n.a.length&&Zn(()=>{Do(e,r),It(n.a)})}function Do(t,e){if(t.l.s)for(const n of t.l.s)Rn(n);e()}let Ro=!1,qo=Symbol();function Fo(t,e,n){const r=n[e]??(n[e]={store:null,source:ln(void 0),unsubscribe:Ct});if(r.store!==t&&!(qo in n))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=Ct;else{var o=!0;r.unsubscribe=Qo(t,t=>{o?r.source.v=t:sn(r.source,t)}),o=!1}return t&&qo in n?ni(t):Rn(r.source)}function Yo(t,e){return t.set(e),e}function Go(){const t={};return[t,function(){Xn(()=>{for(var e in t)t[e].unsubscribe();bt(t,qo,{enumerable:!1,value:!0})})}]}const Ho={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set:(t,e)=>!1,getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e))return e in t.props?{enumerable:!0,configurable:!0,value:t.props[e]}:void 0},has:(t,e)=>!t.exclude.includes(e)&&e in t.props,ownKeys:t=>Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))},Vo={get(t,e){if(!t.exclude.includes(e))return Rn(t.version),e in t.special?t.special[e]():t.props[e]},set(t,e,n){if(!(e in t.special)){var r=$n;try{kn(t.parent_effect),t.special[e]=Zo({get[e](){return t.props[e]}},e,4)}finally{kn(r)}}return t.special[e](n),cn(t.version),!0},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e))return e in t.props?{enumerable:!0,configurable:!0,value:t.props[e]}:void 0},deleteProperty:(t,e)=>(t.exclude.includes(e)||(t.exclude.push(e),cn(t.version)),!0),has:(t,e)=>!t.exclude.includes(e)&&e in t.props,ownKeys:t=>Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))};function Ko(t,e){return new Proxy({props:t,exclude:e,special:{},version:rn(0),parent_effect:$n},Vo)}const Uo={get(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(Et(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];Et(o)&&(o=o());const i=xt(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(Et(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r){const t=xt(r,e);return t&&!t.configurable&&(t.configurable=!0),t}}},has(t,e){if(e===Gt||e===Ht)return!1;for(let n of t.props)if(Et(n)&&(n=n()),null!=n&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props)if(Et(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 Xo(...t){return new Proxy({props:t},Uo)}function Zo(t,e,n,r){var o,i,l,s=!Qt||!!(2&n),a=!!(8&n),c=!!(16&n),u=r,d=!0,f=()=>(d&&(d=!1,u=c?Fn(r):r),u);if(a){var v=Gt in t||Ht in t;i=(null==(o=xt(t,e))?void 0:o.set)??(v&&e in t?n=>t[e]=n:void 0)}var h,p=!1;if(a?[l,p]=function(t){var e=Ro;try{return Ro=!1,[t(),Ro]}finally{Ro=e}}(()=>t[e]):l=t[e],void 0===l&&void 0!==r&&(l=f(),i&&(s&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),i(l))),h=s?()=>{var n=t[e];return void 0===n?f():(d=!0,n)}:()=>{var n=t[e];return void 0!==n&&(u=void 0),void 0===n?u:n},s&&!(4&n))return h;if(i){var g=t.$$legacy;return function(t,e){return arguments.length>0?(s&&e&&!g&&!p||i(e?h():t),t):h()}}var m=!1,w=(1&n?Xe:Je)(()=>(m=!1,h()));a&&Rn(w);var y=$n;return function(t,e){if(arguments.length>0){const n=e?Rn(w):s&&a?fe(t):t;return sn(w,n),m=!0,void 0!==u&&(u=n),t}return mn&&m||0!==(y.f&zt)?w.v:Rn(w)}}function Jo(t){var e,n;null===ee&&Jt(),Qt&&null!==ee.l?(e=ee,n=e.l,n.u??(n.u={a:[],b:[],m:[]})).m.push(t):Zn(()=>{const e=Fn(t);if("function"==typeof e)return e})}function Qo(t,e,n){if(null==t)return e(void 0),Ct;const r=Fn(()=>t.subscribe(e,n));return r.unsubscribe?()=>r.unsubscribe():r}const ti=[];function ei(t,e=Ct){let n=null;const r=new Set;function o(e){if(Xt(t,e)&&(t=e,n)){const e=!ti.length;for(const n of r)n[1](),ti.push(n,t);if(e){for(let t=0;t<ti.length;t+=2)ti[t][0](ti[t+1]);ti.length=0}}}function i(e){o(e(t))}return{set:o,update:i,subscribe:function(l,s=Ct){const a=[l,s];return r.add(a),1===r.size&&(n=e(o,i)||Ct),l(t),()=>{r.delete(a),0===r.size&&n&&(n(),n=null)}}}}function ni(t){let e;return Qo(t,t=>e=t)(),e}"undefined"!=typeof window&&((Y=window.__svelte??(window.__svelte={})).v??(Y.v=new Set)).add("5");const ri=Array(12).fill(0);var oi=Pr('<div class="sonner-loading-bar"></div>'),ii=Pr('<div><div class="sonner-spinner"></div></div>');function li(...t){return t.filter(Boolean).join(" ")}const si="undefined"!=typeof document,ai="undefined"!=typeof window?window:void 0;new(V=class{constructor(t={}){ut(this,G),ut(this,H);const{window:e=ai,document:n=(null==e?void 0:e.document)}=t;void 0!==e&&(dt(this,G,n),dt(this,H,He(t=>{const n=Mr(e,"focusin",t),r=Mr(e,"focusout",t);return()=>{n(),r()}})))}get current(){var t;return null==(t=ct(this,H))||t.call(this),ct(this,G)?function(t){let e=t.activeElement;for(;null==e?void 0:e.shadowRoot;){const t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}(ct(this,G)):null}},G=new WeakMap,H=new WeakMap,V);const ci=new(X=class{constructor(t){ut(this,K),ut(this,U),dt(this,K,t),dt(this,U,Symbol(t))}get key(){return ct(this,U)}exists(){return t=ct(this,U),se().has(t);var t}get(){const t=re(ct(this,U));if(void 0===t)throw new Error(`Context "${ct(this,K)}" not found`);return t}getOr(t){const e=re(ct(this,U));return void 0===e?t:e}set(t){return e=ct(this,U),n=t,se().set(e,n),n;var e,n}},K=new WeakMap,U=new WeakMap,X)("<Toaster/>");let ui=0;const di=new(tt=class{constructor(){ut(this,Z,on(fe([]))),ut(this,J,on(fe([]))),ut(this,Q,t=>{const e=this.toasts.findIndex(e=>e.id===t);return-1===e?null:e}),st(this,"addToast",t=>{si&&this.toasts.unshift(t)}),st(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}}),st(this,"create",t=>{var e;const{message:n,...r}=t,o="number"==typeof(null==t?void 0:t.id)||t.id&&(null==(e=t.id)?void 0:e.length)>0?t.id:ui++,i=void 0===t.dismissable||t.dismissable,l=void 0===t.type?"default":t.type;return Fn(()=>{this.toasts.find(t=>t.id===o)?this.updateToast({id:o,data:t,type:l,message:n,dismissable:i}):this.addToast({...r,id:o,title:n,dismissable:i,type:l})}),o}),st(this,"dismiss",t=>(Fn(()=>{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)),st(this,"remove",t=>{if(void 0===t)return void(this.toasts=[]);const e=ct(this,Q).call(this,t);return null!==e?(this.toasts.splice(e,1),t):void 0}),st(this,"message",(t,e)=>this.create({...e,type:"default",message:t})),st(this,"error",(t,e)=>this.create({...e,type:"error",message:t})),st(this,"success",(t,e)=>this.create({...e,type:"success",message:t})),st(this,"info",(t,e)=>this.create({...e,type:"info",message:t})),st(this,"warning",(t,e)=>this.create({...e,type:"warning",message:t})),st(this,"loading",(t,e)=>this.create({...e,type:"loading",message:t})),st(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(()=>{var t;o&&(this.dismiss(n),n=void 0),null==(t=e.finally)||t.call(e)}),n}),st(this,"custom",(t,e)=>{const n=(null==e?void 0:e.id)||ui++;return this.create({component:t,id:n,...e}),n}),st(this,"removeHeight",t=>{this.heights=this.heights.filter(e=>e.toastId!==t)}),st(this,"setHeight",t=>{const e=ct(this,Q).call(this,t.toastId);null!==e?this.heights[e]=t:this.heights.push(t)}),st(this,"reset",()=>{this.toasts=[],this.heights=[]})}get toasts(){return Rn(ct(this,Z))}set toasts(t){sn(ct(this,Z),t,!0)}get heights(){return Rn(ct(this,J))}set heights(t){sn(ct(this,J),t,!0)}},Z=new WeakMap,J=new WeakMap,Q=new WeakMap,tt);class fi{constructor(){ut(this,et,Ze(()=>di.toasts.filter(t=>!t.dismiss)))}get toasts(){return Rn(ct(this,et))}}et=new WeakMap;const vi=Object.assign(function(t,e){return di.create({message:t,...e})},{success:di.success,info:di.info,warning:di.warning,error:di.error,custom:di.custom,message:di.message,promise:di.promise,dismiss:di.dismiss,loading:di.loading,getActiveToasts:()=>di.toasts.filter(t=>!t.dismiss)});function hi(t){return void 0!==t.label}const pi={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function gi(t){return 1/(1.5+Math.abs(t)/20)}var mi=Pr("<div><!></div>"),wi=(t,e,n,r,o)=>{var i,l;!Rn(e)&&Rn(n)&&(r(),null==(l=(i=o.toast).onDismiss)||l.call(i,o.toast))},yi=Pr('<button data-close-button=""><!></button>'),bi=Pr('<div data-icon=""><!> <!></div>'),xi=Pr('<div data-description=""><!></div>'),$i=(t,e,n,r)=>{var o,i;hi(e.toast.cancel)&&Rn(n)&&(null==(i=null==(o=e.toast.cancel)?void 0:o.onClick)||i.call(o,t),r())},ki=Pr('<button data-button="" data-cancel=""> </button>'),_i=(t,e,n)=>{var r;hi(e.toast.action)&&(null==(r=e.toast.action)||r.onClick(t),t.defaultPrevented||n())},Mi=Pr('<button data-button=""> </button>'),Si=Pr('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),Ei=Pr('<li data-sonner-toast=""><!> <!></li>');function Ci(t,e){oe(e,!0);let n=Zo(e,"cancelButtonStyle",3,""),r=Zo(e,"actionButtonStyle",3,""),o=Zo(e,"descriptionClass",3,""),i=Zo(e,"unstyled",3,!1),l=Zo(e,"defaultRichColors",3,!1);const s={...pi};let a=on(!1),c=on(!1),u=on(!1),d=on(!1),f=on(!1),v=on(0),h=on(0),p=e.toast.duration||e.duration||4e3,g=on(void 0),m=on(null),w=on(null);const y=Ze(()=>0===e.index),b=Ze(()=>e.index+1<=e.visibleToasts),x=Ze(()=>e.toast.type),$=Ze(()=>!1!==e.toast.dismissable),k=Ze(()=>e.toast.class||""),_=Ze(()=>e.toast.descriptionClass||""),M=Ze(()=>di.heights.findIndex(t=>t.toastId===e.toast.id)||0),S=Ze(()=>e.toast.closeButton??e.closeButton),E=Ze(()=>e.toast.duration??e.duration??4e3);let C=null;const O=Ze(()=>e.position.split("-")),I=Ze(()=>di.heights.reduce((t,e,n)=>n>=Rn(M)?t:t+e.height,0)),W=function(){let t=on(fe("undefined"!=typeof document&&document.hidden));return Zn(()=>Mr(document,"visibilitychange",()=>{sn(t,document.hidden,!0)})),{get current(){return Rn(t)}}}(),P=Ze(()=>e.toast.invert||e.invert),j=Ze(()=>"loading"===Rn(x)),T=Ze(()=>({...s,...e.classes})),L=Ze(()=>e.toast.title),A=Ze(()=>e.toast.description);let N=on(0),z=on(0);const B=Ze(()=>Math.round(14*Rn(M)+Rn(I)));function D(){sn(c,!0),sn(v,Rn(B),!0),di.removeHeight(e.toast.id),setTimeout(()=>{di.remove(e.toast.id)},200)}let R;Zn(()=>{let t;Rn(L),Rn(A),t=e.expanded||e.expandByDefault?1:1-.05*e.index;const n=Fn(()=>Rn(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 l;n.style.removeProperty("height"),l=Math.abs(i-r)<1?i:r,sn(h,l,!0),Fn(()=>{di.setHeight({toastId:e.toast.id,height:l})})});const q=Ze(()=>e.toast.promise&&"loading"===Rn(x)||e.toast.duration===Number.POSITIVE_INFINITY);function F(){sn(N,(new Date).getTime(),!0),R=setTimeout(()=>{var t,n;null==(n=(t=e.toast).onAutoClose)||n.call(t,e.toast),D()},p)}Zn(()=>{e.toast.updated&&(clearTimeout(R),p=Rn(E),F())}),Zn(()=>(Rn(q)||(e.expanded||e.interacting||W.current?function(){if(Rn(z)<Rn(N)){const t=(new Date).getTime()-Rn(N);p-=t}sn(z,(new Date).getTime(),!0)}():F()),()=>clearTimeout(R))),Jo(()=>{var t;sn(a,!0);const n=null==(t=Rn(g))?void 0:t.getBoundingClientRect().height;return sn(h,n,!0),di.setHeight({toastId:e.toast.id,height:n}),()=>{di.removeHeight(e.toast.id)}}),Zn(()=>{e.toast.delete&&Fn(()=>{var t,n;D(),null==(n=(t=e.toast).onDismiss)||n.call(t,e.toast)})});const Y=Ze(()=>e.toast.icon?e.toast.icon:"success"===Rn(x)?e.successIcon:"error"===Rn(x)?e.errorIcon:"warning"===Rn(x)?e.warningIcon:"info"===Rn(x)?e.infoIcon:"loading"===Rn(x)?e.loadingIcon:null);var G=Ei();let H;bo(G,"tabindex",0),G.__pointermove=t=>{var n,r,o;if(!C||!Rn($))return;if(((null==(n=window.getSelection())?void 0:n.toString().length)??-1)>0)return;const i=t.clientY-C.y,l=t.clientX-C.x,s=e.swipeDirections??function(t){const[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}(e.position);!Rn(m)&&(Math.abs(l)>1||Math.abs(i)>1)&&sn(m,Math.abs(l)>Math.abs(i)?"x":"y",!0);let a={x:0,y:0};if("y"===Rn(m)){if(s.includes("top")||s.includes("bottom"))if(s.includes("top")&&i<0||s.includes("bottom")&&i>0)a.y=i;else{const t=i*gi(i);a.y=Math.abs(t)<Math.abs(i)?t:i}}else if("x"===Rn(m)&&(s.includes("left")||s.includes("right")))if(s.includes("left")&&l<0||s.includes("right")&&l>0)a.x=l;else{const t=l*gi(l);a.x=Math.abs(t)<Math.abs(l)?t:l}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&sn(f,!0),null==(r=Rn(g))||r.style.setProperty("--swipe-amount-x",`${a.x}px`),null==(o=Rn(g))||o.style.setProperty("--swipe-amount-y",`${a.y}px`)},G.__pointerup=()=>{var t,n,r,o,i,l;if(Rn(d)||!Rn($))return;C=null;const s=Number((null==(t=Rn(g))?void 0:t.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),a=Number((null==(n=Rn(g))?void 0:n.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),c=(new Date).getTime()-0,h="x"===Rn(m)?s:a,p=Math.abs(h)/c;if(Math.abs(h)>=45||p>.11)return sn(v,Rn(B),!0),null==(o=(r=e.toast).onDismiss)||o.call(r,e.toast),"x"===Rn(m)?sn(w,s>0?"right":"left",!0):sn(w,a>0?"down":"up",!0),D(),void sn(d,!0);null==(i=Rn(g))||i.style.setProperty("--swipe-amount-x","0px"),null==(l=Rn(g))||l.style.setProperty("--swipe-amount-y","0px"),sn(f,!1),sn(u,!1),sn(m,null)},G.__pointerdown=t=>{if(Rn(j))return;sn(v,Rn(B),!0);const e=t.target;e.setPointerCapture(t.pointerId),"BUTTON"!==e.tagName&&(sn(u,!0),C={x:t.clientX,y:t.clientY})};var V=$e(G),K=t=>{var n=yi();n.__click=[wi,j,$,D,e],eo($e(n),()=>e.closeIcon??Ct),nr(t=>{bo(n,"aria-label",e.closeButtonAriaLabel),bo(n,"data-disabled",Rn(j)),co(n,1,t)},[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.closeButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.closeButton))}]),Ar(t,n)};Gr(V,t=>{Rn(S)&&!e.toast.component&&"loading"!==Rn(x)&&null!==e.closeIcon&&t(K)});var U=_e(V,2),X=t=>{const n=Ze(()=>e.toast.component);var r=Lr();no(ke(r),()=>Rn(n),(t,n)=>{n(t,Xo(()=>e.toast.componentProps,{closeToast:D}))}),Ar(t,r)},Z=t=>{var i=Si(),l=ke(i),s=t=>{var n=bi(),r=$e(n),o=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();no(ke(n),()=>e.toast.icon,(t,e)=>{e(t,{})}),Ar(t,n)},i=t=>{(t=>{var n=Lr(),r=ke(n),o=t=>{var n=mi();eo($e(n),()=>e.loadingIcon),nr(t=>{co(n,1,t),bo(n,"data-visible","loading"===Rn(x))},[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.loader,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.loader,"sonner-loader"))}]),Ar(t,n)},i=t=>{{let n=Ze(()=>{var t,n;return li(null==(t=Rn(T))?void 0:t.loader,null==(n=e.toast.classes)?void 0:n.loader)}),r=Ze(()=>"loading"===Rn(x));!function(t,e){oe(e,!0);var n=ii();Ur($e(n),23,()=>ri,(t,e)=>`spinner-bar-${e}`,(t,e)=>{Ar(t,oi())}),nr(t=>{co(n,1,t),bo(n,"data-visible",e.visible)},[()=>io(["sonner-loading-wrapper",e.class].filter(Boolean).join(" "))]),Ar(t,n),ie()}(t,{get class(){return Rn(n)},get visible(){return Rn(r)}})}};Gr(r,t=>{e.loadingIcon?t(o):t(i,!1)}),Ar(t,n)})(t)};Gr(r,t=>{e.toast.icon?t(o):t(i,!1)}),Ar(t,n)};Gr(r,t=>{(e.toast.promise||"loading"===Rn(x))&&t(o)});var i=_e(r,2),l=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();no(ke(n),()=>e.toast.icon,(t,e)=>{e(t,{})}),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.successIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.errorIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.warningIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.infoIcon??Ct),Ar(t,n)};Gr(r,t=>{"info"===Rn(x)&&t(o)},!0),Ar(t,n)};Gr(r,t=>{"warning"===Rn(x)?t(o):t(i,!1)},!0),Ar(t,n)};Gr(r,t=>{"error"===Rn(x)?t(o):t(i,!1)},!0),Ar(t,n)};Gr(r,t=>{"success"===Rn(x)?t(o):t(i,!1)},!0),Ar(t,n)};Gr(r,t=>{e.toast.icon?t(o):t(i,!1)}),Ar(t,n)};Gr(i,t=>{"loading"!==e.toast.type&&t(l)}),nr(t=>co(n,1,t),[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.icon,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.icon))}]),Ar(t,n)};Gr(l,t=>{(Rn(x)||e.toast.icon||e.toast.promise)&&null!==e.toast.icon&&(null!==Rn(Y)||e.toast.icon)&&t(s)});var a=_e(l,2),c=$e(a),u=$e(c),d=t=>{var n=Lr(),r=ke(n),o=t=>{const n=Ze(()=>e.toast.title);var r=Lr();no(ke(r),()=>Rn(n),(t,n)=>{n(t,Xo(()=>e.toast.componentProps))}),Ar(t,r)},i=t=>{var n=Tr();nr(()=>Br(n,e.toast.title)),Ar(t,n)};Gr(r,t=>{"string"!=typeof e.toast.title?t(o):t(i,!1)}),Ar(t,n)};Gr(u,t=>{e.toast.title&&t(d)});var f=_e(c,2),v=t=>{var n=xi(),r=$e(n),i=t=>{const n=Ze(()=>e.toast.description);var r=Lr();no(ke(r),()=>Rn(n),(t,n)=>{n(t,Xo(()=>e.toast.componentProps))}),Ar(t,r)},l=t=>{var n=Tr();nr(()=>Br(n,e.toast.description)),Ar(t,n)};Gr(r,t=>{"string"!=typeof e.toast.description?t(i):t(l,!1)}),nr(t=>co(n,1,t),[()=>{var t,n;return io(li(o(),Rn(_),null==(t=Rn(T))?void 0:t.description,null==(n=e.toast.classes)?void 0:n.description))}]),Ar(t,n)};Gr(f,t=>{e.toast.description&&t(v)});var h=_e(a,2),p=t=>{var r=Lr(),o=ke(r),i=t=>{var n=Lr();no(ke(n),()=>e.toast.cancel,(t,e)=>{e(t,{})}),Ar(t,n)},l=t=>{var r=Lr(),o=ke(r),i=t=>{var r=ki();r.__click=[$i,e,$,D];var o=$e(r);nr(t=>{fo(r,e.toast.cancelButtonStyle??n()),co(r,1,t),Br(o,e.toast.cancel.label)},[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.cancelButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.cancelButton))}]),Ar(t,r)};Gr(o,t=>{hi(e.toast.cancel)&&t(i)},!0),Ar(t,r)};Gr(o,t=>{"function"==typeof e.toast.cancel?t(i):t(l,!1)}),Ar(t,r)};Gr(h,t=>{e.toast.cancel&&t(p)});var g=_e(h,2),m=t=>{var n=Lr(),o=ke(n),i=t=>{var n=Lr();no(ke(n),()=>e.toast.action,(t,e)=>{e(t,{})}),Ar(t,n)},l=t=>{var n=Lr(),o=ke(n),i=t=>{var n=Mi();n.__click=[_i,e,D];var o=$e(n);nr(t=>{fo(n,e.toast.actionButtonStyle??r()),co(n,1,t),Br(o,e.toast.action.label)},[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.actionButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.actionButton))}]),Ar(t,n)};Gr(o,t=>{hi(e.toast.action)&&t(i)},!0),Ar(t,n)};Gr(o,t=>{"function"==typeof e.toast.action?t(i):t(l,!1)}),Ar(t,n)};Gr(g,t=>{e.toast.action&&t(m)}),nr(t=>co(c,1,t),[()=>{var t,n,r;return io(li(null==(t=Rn(T))?void 0:t.title,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.title))}]),Ar(t,i)};Gr(U,t=>{e.toast.component?t(X):t(Z,!1)}),zo(G,t=>sn(g,t),()=>Rn(g)),nr((t,n,r,o)=>{co(G,1,t),bo(G,"data-rich-colors",e.toast.richColors??l()),bo(G,"data-styled",!(e.toast.component||e.toast.unstyled||i())),bo(G,"data-mounted",Rn(a)),bo(G,"data-promise",n),bo(G,"data-swiped",Rn(f)),bo(G,"data-removed",Rn(c)),bo(G,"data-visible",Rn(b)),bo(G,"data-y-position",Rn(O)[0]),bo(G,"data-x-position",Rn(O)[1]),bo(G,"data-index",e.index),bo(G,"data-front",Rn(y)),bo(G,"data-swiping",Rn(u)),bo(G,"data-dismissable",Rn($)),bo(G,"data-type",Rn(x)),bo(G,"data-invert",Rn(P)),bo(G,"data-swipe-out",Rn(d)),bo(G,"data-swipe-direction",Rn(w)),bo(G,"data-expanded",r),H=fo(G,`${e.style} ${e.toast.style}`,H,o)},[()=>{var t,n,r,o,i,l;return io(li(e.class,Rn(k),null==(t=Rn(T))?void 0:t.toast,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.toast,null==(o=Rn(T))?void 0:o[Rn(x)],null==(l=null==(i=e.toast)?void 0:i.classes)?void 0:l[Rn(x)]))},()=>Boolean(e.toast.promise),()=>Boolean(e.expanded||e.expandByDefault&&Rn(a)),()=>({"--index":e.index,"--toasts-before":e.index,"--z-index":di.toasts.length-e.index,"--offset":`${Rn(c)?Rn(v):Rn(B)}px`,"--initial-height":e.expandByDefault?"auto":`${Rn(h)}px`})]),Sr("dragend",G,()=>{sn(u,!1),sn(m,null),C=null}),Ar(t,G),ie()}Er(["pointermove","pointerup","pointerdown","click"]),Qt=!0;var Oi=jr('<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>'),Ii=jr('<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>'),Wi=jr('<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>'),Pi=jr('<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>'),ji=jr('<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 Ti="24px",Li="16px",Ai="dark",Ni="light";var zi=Pr("<ol></ol>"),Bi=Pr('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');const Di=new(ot=class{constructor(){ut(this,nt),this.baseUrl="https://api.playlight.dev/platform",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=`${this.baseUrl}${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((null==t?void 0:t.error)||(null==t?void 0:t.message)||n.status)}}return await n.json()}catch(e){vi.error("Request failed: "+e.message),console.error("Playlight API request error:",e)}};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="+ft(this,nt,rt).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/"+ft(this,nt,rt).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(){const t=ft(this,nt,rt).call(this);await this.request("/event/open",{method:"POST",body:JSON.stringify({domain:t})})}async trackClick(t){const e=ft(this,nt,rt).call(this);await this.request("/event/click",{method:"POST",body:JSON.stringify({sourceDomain:e,gameId:t})})}async toggleLike(t,e=!0){const n=e?"like":"unlike",r=await this.request(`/rating/${t}/${n}`,{method:"POST"});return(null==r?void 0:r.success)||!1}},nt=new WeakSet,rt=function(){const t=window.location.hostname;return t.startsWith("www.")?t.substring(4):t},ot),Ri=new Map;async function qi(t,...e){const n=Ri.get(t);if(n)for(const o of n)try{await o(...e)}catch(r){console.error(`Playlight ${t} callback error:`,r)}}const Fi=t=>t;function Yi(t){const e=t-1;return e*e*e+1}function Gi(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Hi(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Vi(t,{delay:e=0,duration:n=400,easing:r=Gi,amount:o=5,opacity:i=0}={}){const l=getComputedStyle(t),s=+l.opacity,a="none"===l.filter?"":l.filter,c=s*(1-i),[u,d]=Hi(o);return{delay:e,duration:n,easing:r,css:(t,e)=>`opacity: ${s-c*e}; filter: ${a} blur(${e*u}${d});`}}function Ki(t,{delay:e=0,duration:n=400,easing:r=Fi}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:t=>"opacity: "+t*o}}function Ui(t,{delay:e=0,duration:n=400,easing:r=Yi,x:o=0,y:i=0,opacity:l=0}={}){const s=getComputedStyle(t),a=+s.opacity,c="none"===s.transform?"":s.transform,u=a*(1-l),[d,f]=Hi(o),[v,h]=Hi(i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${c} translate(${(1-t)*d}${f}, ${(1-t)*v}${h});\n\t\t\topacity: ${a-u*e}`}}function Xi(t,{delay:e=0,duration:n=400,easing:r=Yi,axis:o="y"}={}){const i=getComputedStyle(t),l=+i.opacity,s="y"===o?"height":"width",a=parseFloat(i[s]),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]}`]),v=parseFloat(i[`margin${u[0]}`]),h=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)*l};${s}: ${t*a}px;padding-${c[0]}: ${t*d}px;padding-${c[1]}: ${t*f}px;margin-${c[0]}: ${t*v}px;margin-${c[1]}: ${t*h}px;border-${c[0]}-width: ${t*p}px;border-${c[1]}-width: ${t*g}px;min-${s}: 0`}}function Zi(t,{delay:e=0,duration:n=400,easing:r=Yi,start:o=0,opacity:i=0}={}){const l=getComputedStyle(t),s=+l.opacity,a="none"===l.transform?"":l.transform,c=1-o,u=s*(1-i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${a} scale(${1-c*e});\n\t\t\topacity: ${s-u*e}\n\t\t`}}
|
|
1
|
+
var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m,w,y,b,x,$,k,_,M,S,E,C,I,O,W,P,j,T,L,A,N,z,R,B,D,q,F,Y,G,H,U,V,K,X,Z,J,Q,tt,et,nt,rt,ot,it=Object.defineProperty,lt=t=>{throw TypeError(t)},st=(t,e,n)=>((t,e,n)=>e in t?it(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n)(t,"symbol"!=typeof e?e+"":e,n),at=(t,e,n)=>e.has(t)||lt("Cannot "+n),ct=(t,e,n)=>(at(t,e,"read from private field"),n?n.call(t):e.get(t)),ut=(t,e,n)=>e.has(t)?lt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),dt=(t,e,n,r)=>(at(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),ft=(t,e,n)=>(at(t,e,"access private method"),n),vt="undefined"!=typeof document?document.currentScript:null;const ht={exitIntent:{enabled:!0,immediate:!1},sidebar:{hasFrameworkRoot:"auto",forceVisible:!1}};function pt(t={}){return gt(ht,t)}function gt(t,e){const n={...t};return mt(t)&&mt(e)&&Object.keys(e).forEach(r=>{mt(e[r])?r in t?n[r]=gt(t[r],e[r]):Object.assign(n,{[r]:e[r]}):Object.assign(n,{[r]:e[r]})}),n}function mt(t){return t&&"object"==typeof t&&!Array.isArray(t)}var wt=Array.isArray,yt=Array.prototype.indexOf,bt=Array.from,xt=Object.defineProperty,$t=Object.getOwnPropertyDescriptor,kt=Object.getOwnPropertyDescriptors,_t=Object.prototype,Mt=Array.prototype,St=Object.getPrototypeOf,Et=Object.isExtensible;function Ct(t){return"function"==typeof t}const It=()=>{};function Ot(t){return t()}function Wt(t){for(var e=0;e<t.length;e++)t[e]()}function Pt(){var t,e;return{promise:new Promise((n,r)=>{t=n,e=r}),resolve:t,reject:e}}function jt(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 Tt=16,Lt=1024,At=2048,Nt=4096,zt=8192,Rt=16384,Bt=32768,Dt=65536,qt=1<<19,Ft=256,Yt=1<<21,Gt=1<<23,Ht=Symbol("$state"),Ut=Symbol("legacy props"),Vt=Symbol(""),Kt=new class extends Error{constructor(){super(...arguments),st(this,"name","StaleReactionError"),st(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function Xt(t){return t===this.v}function Zt(t,e){return t!=t?e==e:t!==e||null!==t&&"object"==typeof t||"function"==typeof t}function Jt(t){return!Zt(t,this.v)}function Qt(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let te=!1;const ee=Symbol();let ne=null;function re(t){ne=t}function oe(t){return ae().get(t)}function ie(t,e=!1,n){ne={p:ne,c:null,e:null,s:t,x:null,l:te&&!e?{s:null,u:null,$:[]}:null}}function le(t){var e=ne,n=e.e;if(null!==n)for(var r of(e.e=null,n))Qn(r);return ne=e.p,{}}function se(){return!te||null!==ne&&null===ne.l}function ae(t){return null===ne&&Qt(),ne.c??(ne.c=new Map(function(t){let e=t.p;for(;null!==e;){const t=e.c;if(null!==t)return t;e=e.p}return null}(ne)||void 0))}let ce=[];function ue(){var t=ce;ce=[],Wt(t)}function de(t){if(0===ce.length&&!ze){var e=ce;queueMicrotask(()=>{e===ce&&ue()})}ce.push(t)}function fe(){for(;ce.length>0;)ue()}function ve(t){if("object"!=typeof t||null===t||Ht in t)return t;const e=St(t);if(e!==_t&&e!==Mt)return t;var n=new Map,r=wt(t),o=ln(0),i=Pn,l=t=>{if(Pn===i)return t();var e=bn,n=Pn;$n(null),jn(i);var r=t();return $n(e),jn(n),r};return r&&n.set("length",ln(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=l(()=>{var t=ln(r.value);return n.set(e,t),t}):an(o,r.value,!0),!0},deleteProperty(t,e){var r=n.get(e);if(void 0===r){if(e in t){const t=l(()=>ln(ee));n.set(e,t),dn(o)}}else an(r,ee),dn(o);return!0},get(e,r,o){var i;if(r===Ht)return t;var s=n.get(r),a=r in e;if(void 0!==s||a&&!(null==(i=$t(e,r))?void 0:i.writable)||(s=l(()=>ln(ve(a?e[r]:ee))),n.set(r,s)),void 0!==s){var c=qn(s);return c===ee?void 0:c}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=qn(o))}else if(void 0===r){var i=n.get(e),l=null==i?void 0:i.v;if(void 0!==i&&l!==ee)return{enumerable:!0,configurable:!0,value:l,writable:!0}}return r},has(t,e){var r;if(e===Ht)return!0;var o=n.get(e),i=void 0!==o&&o.v!==ee||Reflect.has(t,e);return!((void 0!==o||null!==kn&&(!i||(null==(r=$t(t,e))?void 0:r.writable)))&&(void 0===o&&(o=l(()=>ln(i?ve(t[e]):ee)),n.set(e,o)),qn(o)===ee))&&i},set(t,e,i,s){var a,c=n.get(e),u=e in t;if(r&&"length"===e)for(var d=i;d<c.v;d+=1){var f=n.get(d+"");void 0!==f?an(f,ee):d in t&&(f=l(()=>ln(ee)),n.set(d+"",f))}void 0===c?u&&!(null==(a=$t(t,e))?void 0:a.writable)||(an(c=l(()=>ln(void 0)),ve(i)),n.set(e,c)):(u=c.v!==ee,an(c,l(()=>ve(i))));var v=Reflect.getOwnPropertyDescriptor(t,e);if((null==v?void 0:v.set)&&v.set.call(s,i),!u){if(r&&"string"==typeof e){var h=n.get("length"),p=Number(e);Number.isInteger(p)&&p>=h.v&&an(h,p+1)}dn(o)}return!0},ownKeys(t){qn(o);var e=Reflect.ownKeys(t).filter(t=>{var e=n.get(t);return void 0===e||e.v!==ee});for(var[r,i]of n)i.v===ee||r in t||e.push(r);return e},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function he(t){try{if(null!==t&&"object"==typeof t&&Ht in t)return t[Ht]}catch{}return t}function pe(t,e){return Object.is(he(t),he(e))}var ge,me,we,ye;function be(t=""){return document.createTextNode(t)}function xe(t){return we.call(t)}function $e(t){return ye.call(t)}function ke(t,e){return xe(t)}function _e(t,e=!1){var n=xe(t);return n instanceof Comment&&""===n.data?$e(n):n}function Me(t,e=1,n=!1){let r=t;for(;e--;)r=$e(r);return r}const Se=new WeakMap;function Ee(t){var e=kn;if(null===e)return bn.f|=Gt,t;if(0===(e.f&Bt)){if(!(128&e.f))throw!e.parent&&t instanceof Error&&Ie(t),t;e.b.error(t)}else Ce(t,e)}function Ce(t,e){for(;null!==e;){if(128&e.f)try{return void e.b.error(t)}catch(n){t=n}e=e.parent}throw t instanceof Error&&Ie(t),t}function Ie(t){const e=Se.get(t);e&&(xt(t,"message",{value:e.message}),xt(t,"stack",{value:e.stack}))}const Oe=new Set;let We=null,Pe=null,je=null,Te=new Set,Le=[],Ae=null,Ne=!1,ze=!1;t=new WeakMap,e=new WeakMap,n=new WeakMap,r=new WeakMap,o=new WeakMap,i=new WeakMap,l=new WeakMap,s=new WeakSet,a=function(t,e){var n;t.f^=Lt;for(var r=t.first;null!==r;){var o=r.f,i=!!(96&o),l=i&&0!==(o&Lt)||0!==(o&zt)||this.skipped_effects.has(r);if(!!(128&r.f)&&(null==(n=r.b)?void 0:n.is_pending())&&(e={parent:e,effect:r,effects:[],render_effects:[],block_effects:[]}),!l&&null!==r.fn){i?r.f^=Lt:4&o?e.effects.push(r):An(r)&&(0!==(r.f&Tt)&&e.block_effects.push(r),Dn(r));var a=r.first;if(null!==a){r=a;continue}}var u=r.parent;for(r=r.next;null===r&&null!==u;)u===e.effect&&(ft(this,s,c).call(this,e.effects),ft(this,s,c).call(this,e.render_effects),ft(this,s,c).call(this,e.block_effects),e=e.parent),r=u.next,u=u.parent}},c=function(t){for(const e of t)(0!==(e.f&At)?ct(this,i):ct(this,l)).push(e),Hn(e,Lt)},u=function(){if(0===ct(this,r)){for(const t of ct(this,e))t();ct(this,e).clear()}0===ct(this,n)&&ft(this,s,d).call(this)},d=function(){var e,n;if(Oe.size>1){ct(this,t).clear();var r=je,i=!0,l={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const t of Oe){if(t===this){i=!1;continue}const n=[];for(const[e,o]of this.current){if(t.current.has(e)){if(!i||o===t.current.get(e))continue;t.current.set(e,o)}n.push(e)}if(0===n.length)continue;const r=[...t.current.keys()].filter(t=>!this.current.has(t));if(r.length>0){const o=new Set,i=new Map;for(const t of n)Ye(t,r,o,i);if(Le.length>0){We=t,t.apply();for(const n of Le)ft(e=t,s,a).call(e,n,l);Le=[],t.deactivate()}}}We=null,je=r}this.committed=!0,Oe.delete(this),null==(n=ct(this,o))||n.resolve()};let Re=class d{constructor(){ut(this,s),st(this,"committed",!1),st(this,"current",new Map),ut(this,t,new Map),ut(this,e,new Set),ut(this,n,0),ut(this,r,0),ut(this,o,null),ut(this,i,[]),ut(this,l,[]),st(this,"skipped_effects",new Set)}process(t){Le=[],Pe=null,this.apply();var e={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of t)ft(this,s,a).call(this,n,e);ft(this,s,u).call(this),ct(this,r)>0?(ft(this,s,c).call(this,e.effects),ft(this,s,c).call(this,e.render_effects),ft(this,s,c).call(this,e.block_effects)):(Pe=this,We=null,Fe(e.render_effects),Fe(e.effects),Pe=null),je=null}capture(e,n){ct(this,t).has(e)||ct(this,t).set(e,n),this.current.set(e,e.v),null==je||je.set(e,e.v)}activate(){We=this}deactivate(){We=null,je=null}flush(){if(Le.length>0){if(this.activate(),Be(),null!==We&&We!==this)return}else ft(this,s,u).call(this);this.deactivate();for(const t of Te)if(Te.delete(t),t(),null!==We)break}increment(t){dt(this,n,ct(this,n)+1),t&&dt(this,r,ct(this,r)+1)}decrement(t){dt(this,n,ct(this,n)-1),t&&dt(this,r,ct(this,r)-1);for(const e of ct(this,i))Hn(e,At),He(e);for(const e of ct(this,l))Hn(e,Nt),He(e);dt(this,i,[]),dt(this,l,[]),this.flush()}add_callback(t){ct(this,e).add(t)}settled(){return(ct(this,o)??dt(this,o,Pt())).promise}static ensure(){if(null===We){const t=We=new d;Oe.add(We),ze||d.enqueue(()=>{We===t&&t.flush()})}return We}static enqueue(t){de(t)}apply(){}};function Be(){var t=gn;Ne=!0;try{var e=0;for(mn(!0);Le.length>0;){var n=Re.ensure();e++>1e3&&De(),n.process(Le),rn.clear()}}finally{Ne=!1,mn(t),Ae=null}}function De(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(t){Ce(t,Ae)}}let qe=null;function Fe(t){var e=t.length;if(0!==e){for(var n=0;n<e;){var r=t[n++];if(!(24576&r.f)&&An(r)&&(qe=new Set,Dn(r),null===r.deps&&null===r.first&&null===r.nodes_start&&(null===r.teardown&&null===r.ac?cr(r):r.fn=null),(null==qe?void 0:qe.size)>0)){rn.clear();for(const t of qe){if(24576&t.f)continue;const e=[t];let n=t.parent;for(;null!==n;)qe.has(n)&&(qe.delete(n),e.push(n)),n=n.parent;for(let t=e.length-1;t>=0;t--){const n=e[t];24576&n.f||Dn(n)}}qe.clear()}}qe=null}}function Ye(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?Ye(o,e,n,r):4194320&t&&0===(t&At)&&Ge(o,e,r)&&(Hn(o,At),He(o))}}function Ge(t,e,n){const r=n.get(t);if(void 0!==r)return r;if(null!==t.deps)for(const o of t.deps){if(e.includes(o))return!0;if(2&o.f&&Ge(o,e,n))return n.set(o,!0),!0}return n.set(t,!1),!1}function He(t){for(var e=Ae=t;null!==e.parent;){var n=(e=e.parent).f;if(Ne&&e===kn&&0!==(n&Tt))return;if(96&n){if(0===(n&Lt))return;e.f^=Lt}}Le.push(e)}function Ue(t){let e,n=0,r=on(0);return()=>{(function(){return null!==bn&&!xn})()&&(qn(r),nr(()=>(0===n&&(e=Yn(()=>t(()=>dn(r)))),n+=1,()=>{de(()=>{n-=1,0===n&&(null==e||e(),e=void 0,dn(r))})})))}}class Ve{constructor(t,e,n){ut(this,I),st(this,"parent"),ut(this,f,!1),ut(this,v),ut(this,h,null),ut(this,p),ut(this,g),ut(this,m),ut(this,w,null),ut(this,y,null),ut(this,b,null),ut(this,x,null),ut(this,$,null),ut(this,k,0),ut(this,_,0),ut(this,M,!1),ut(this,S,null),ut(this,E,()=>{ct(this,S)&&cn(ct(this,S),ct(this,k))}),ut(this,C,Ue(()=>(dt(this,S,on(ct(this,k))),()=>{dt(this,S,null)}))),dt(this,v,t),dt(this,p,e),dt(this,g,n),this.parent=kn.b,dt(this,f,!!ct(this,p).pending),dt(this,m,or(()=>{kn.b=this;var t=ft(this,I,O).call(this);try{dt(this,w,ir(()=>n(t)))}catch(e){this.error(e)}return ct(this,_)>0?ft(this,I,P).call(this):dt(this,f,!1),()=>{var t;null==(t=ct(this,$))||t.remove()}},589952))}is_pending(){return ct(this,f)||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!ct(this,p).pending}update_pending_count(t){ft(this,I,j).call(this,t),dt(this,k,ct(this,k)+t),Te.add(ct(this,E))}get_effect_pending(){return ct(this,C).call(this),qn(ct(this,S))}error(t){var e=ct(this,p).onerror;let n=ct(this,p).failed;if(ct(this,M)||!e&&!n)throw t;ct(this,w)&&(ar(ct(this,w)),dt(this,w,null)),ct(this,y)&&(ar(ct(this,y)),dt(this,y,null)),ct(this,b)&&(ar(ct(this,b)),dt(this,b,null));var r=!1,o=!1;const i=()=>{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")}(),Re.ensure(),dt(this,k,0),null!==ct(this,b)&&ur(ct(this,b),()=>{dt(this,b,null)}),dt(this,f,this.has_pending_snippet()),dt(this,w,ft(this,I,W).call(this,()=>(dt(this,M,!1),ir(()=>ct(this,g).call(this,ct(this,v)))))),ct(this,_)>0?ft(this,I,P).call(this):dt(this,f,!1))};var l=bn;try{$n(null),o=!0,null==e||e(t,i),o=!1}catch(s){Ce(s,ct(this,m)&&ct(this,m).parent)}finally{$n(l)}n&&de(()=>{dt(this,b,ft(this,I,W).call(this,()=>{Re.ensure(),dt(this,M,!0);try{return ir(()=>{n(ct(this,v),()=>t,()=>i)})}catch(s){return Ce(s,ct(this,m).parent),null}finally{dt(this,M,!1)}}))})}}function Ke(t,e,n){const r=se()?Ze:Qe;if(0!==e.length){var o=We,i=kn,l=function(){var t=kn,e=bn,n=ne,r=We;return function(){_n(t),$n(e),re(n),null==r||r.activate()}}();Promise.all(e.map(t=>function(t){let e=kn;null===e&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var n=e.b,r=void 0,o=on(ee),i=!bn,l=new Map;return Xn(4718592,()=>{var e,s=Pt();r=s.promise;try{Promise.resolve(t()).then(s.resolve,s.reject).then(()=>{a===We&&a.committed&&a.deactivate(),Xe()})}catch(d){s.reject(d),Xe()}var a=We;if(i){var c=!n.is_pending();n.update_pending_count(1),a.increment(c),null==(e=l.get(a))||e.reject(Kt),l.delete(a),l.set(a,s)}const u=(t,e=void 0)=>{if(a.activate(),e)e!==Kt&&(o.f|=Gt,cn(o,e));else{0!==(o.f&Gt)&&(o.f^=Gt),cn(o,t);for(const[t,e]of l){if(l.delete(t),t===a)break;e.reject(Kt)}}i&&(n.update_pending_count(-1),a.decrement(c))};s.promise.then(u,t=>u(null,t||"unknown"))},!0),Zn(()=>{for(const t of l.values())t.reject(Kt)}),new Promise(t=>{!function e(n){function i(){n===r?t(o):e(r)}n.then(i,i)}(r)})}(t))).then(e=>{l();try{n([...t.map(r),...e])}catch(s){0===(i.f&Rt)&&Ce(s,i)}null==o||o.deactivate(),Xe()}).catch(t=>{Ce(t,i)})}else n(t.map(r))}function Xe(){_n(null),$n(null),re(null)}function Ze(t){var e=2050,n=null!==bn&&2&bn.f?bn:null;return null===kn||null!==n&&0!==(n.f&Ft)?e|=Ft:kn.f|=qt,{ctx:ne,deps:null,effects:null,equals:Xt,f:e,fn:t,reactions:null,rv:0,v:ee,wv:0,parent:n??kn,ac:null}}function Je(t){const e=Ze(t);return Sn(e),e}function Qe(t){const e=Ze(t);return e.equals=Jt,e}function tn(t){var e=t.effects;if(null!==e){t.effects=null;for(var n=0;n<e.length;n+=1)ar(e[n])}}function en(t){var e,n=kn;_n(function(t){for(var e=t.parent;null!==e;){if(!(2&e.f))return e;e=e.parent}return null}(t));try{t.f&=-32769,tn(t),e=zn(t)}finally{_n(n)}return e}function nn(t){var e=en(t);t.equals(e)||(t.v=e,t.wv=Ln()),wn||(null!==je?je.set(t,t.v):Hn(t,!Tn&&0===(t.f&Ft)||null===t.deps?Lt:Nt))}f=new WeakMap,v=new WeakMap,h=new WeakMap,p=new WeakMap,g=new WeakMap,m=new WeakMap,w=new WeakMap,y=new WeakMap,b=new WeakMap,x=new WeakMap,$=new WeakMap,k=new WeakMap,_=new WeakMap,M=new WeakMap,S=new WeakMap,E=new WeakMap,C=new WeakMap,I=new WeakSet,O=function(){var t=ct(this,v);return ct(this,f)&&(dt(this,$,be()),ct(this,v).before(ct(this,$)),t=ct(this,$)),t},W=function(t){var e=kn,n=bn,r=ne;_n(ct(this,m)),$n(ct(this,m)),re(ct(this,m).ctx);try{return t()}catch(o){return Ee(o),null}finally{_n(e),$n(n),re(r)}},P=function(){const t=ct(this,p).pending;null!==ct(this,w)&&(dt(this,x,document.createDocumentFragment()),ct(this,x).append(ct(this,$)),pr(ct(this,w),ct(this,x))),null===ct(this,y)&&dt(this,y,ir(()=>t(ct(this,v))))},j=function(t){var e;this.has_pending_snippet()?(dt(this,_,ct(this,_)+t),0===ct(this,_)&&(dt(this,f,!1),ct(this,y)&&ur(ct(this,y),()=>{dt(this,y,null)}),ct(this,x)&&(ct(this,v).before(ct(this,x)),dt(this,x,null)))):this.parent&&ft(e=this.parent,I,j).call(e,t)};const rn=new Map;function on(t,e){return{f:0,v:t,reactions:null,equals:Xt,rv:0,wv:0}}function ln(t,e){const n=on(t);return Sn(n),n}function sn(t,e=!1,n=!0){var r;const o=on(t);return e||(o.equals=Jt),te&&n&&null!==ne&&null!==ne.l&&((r=ne.l).s??(r.s=[])).push(o),o}function an(t,e,n=!1){return null!==bn&&(!xn||!!(131072&bn.f))&&se()&&4325394&bn.f&&!(null==Mn?void 0:Mn.includes(t))&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),cn(t,n?ve(e):e)}function cn(t,e){if(!t.equals(e)){var n=t.v;wn?rn.set(t,e):rn.set(t,n),t.v=e,Re.ensure().capture(t,n),2&t.f&&(0!==(t.f&At)&&en(t),Hn(t,0===(t.f&Ft)?Lt:Nt)),t.wv=Ln(),fn(t,At),!se()||null===kn||0===(kn.f&Lt)||96&kn.f||(null===In?In=[t]:In.push(t))}return e}function un(t,e=1){var n=qn(t),r=1===e?n++:n--;return an(t,n),r}function dn(t){an(t,t.v+1)}function fn(t,e){var n=t.reactions;if(null!==n)for(var r=se(),o=n.length,i=0;i<o;i++){var l=n[i],s=l.f;if(r||l!==kn){var a=0===(s&At);a&&Hn(l,e),2&s?!(32768&s)&&(l.f|=32768,fn(l,Nt)):a&&(0!==(s&Tt)&&null!==qe&&qe.add(l),He(l))}}}function vn(t,e){if(e){const e=document.body;t.autofocus=!0,de(()=>{document.activeElement===e&&t.focus()})}}let hn=!1;function pn(t){var e=bn,n=kn;$n(null),_n(null);try{return t()}finally{$n(e),_n(n)}}let gn=!1;function mn(t){gn=t}let wn=!1;function yn(t){wn=t}let bn=null,xn=!1;function $n(t){bn=t}let kn=null;function _n(t){kn=t}let Mn=null;function Sn(t){null!==bn&&(null===Mn?Mn=[t]:Mn.push(t))}let En=null,Cn=0,In=null,On=1,Wn=0,Pn=Wn;function jn(t){Pn=t}let Tn=!1;function Ln(){return++On}function An(t){var e,n=t.f;if(0!==(n&At))return!0;if(0!==(n&Nt)){var r=t.deps,o=0!==(n&Ft);if(2&n&&(t.f&=-32769),null!==r){var i,l,s=!!(512&n),a=o&&null!==kn&&!Tn,c=r.length;if((s||a)&&(null===kn||0===(kn.f&Rt))){var u=t,d=u.parent;for(i=0;i<c;i++)l=r[i],!s&&(null==(e=null==l?void 0:l.reactions)?void 0:e.includes(u))||(l.reactions??(l.reactions=[])).push(u);s&&(u.f^=512),a&&null!==d&&0===(d.f&Ft)&&(u.f^=Ft)}for(i=0;i<c;i++)if(An(l=r[i])&&nn(l),l.wv>t.wv)return!0}o&&(null===kn||Tn)||Hn(t,Lt)}return!1}function Nn(t,e,n=!0){var r=t.reactions;if(null!==r&&!(null==Mn?void 0:Mn.includes(t)))for(var o=0;o<r.length;o++){var i=r[o];2&i.f?Nn(i,e,!1):e===i&&(n?Hn(i,At):0!==(i.f&Lt)&&Hn(i,Nt),He(i))}}function zn(t){var e,n=En,r=Cn,o=In,i=bn,l=Tn,s=Mn,a=ne,c=xn,u=Pn,d=t.f;En=null,Cn=0,In=null,Tn=0!==(d&Ft)&&(xn||!gn||null===bn),bn=96&d?null:t,Mn=null,re(t.ctx),xn=!1,Pn=++Wn,null!==t.ac&&(pn(()=>{t.ac.abort(Kt)}),t.ac=null);try{t.f|=Yt;var f=(0,t.fn)(),v=t.deps;if(null!==En){var h;if(Bn(t,Cn),null!==v&&Cn>0)for(v.length=Cn+En.length,h=0;h<En.length;h++)v[Cn+h]=En[h];else t.deps=v=En;if(!Tn||2&d&&null!==t.reactions)for(h=Cn;h<v.length;h++)((e=v[h]).reactions??(e.reactions=[])).push(t)}else null!==v&&Cn<v.length&&(Bn(t,Cn),v.length=Cn);if(se()&&null!==In&&!xn&&null!==v&&!(6146&t.f))for(h=0;h<In.length;h++)Nn(In[h],t);return null!==i&&i!==t&&(Wn++,null!==In&&(null===o?o=In:o.push(...In))),0!==(t.f&Gt)&&(t.f^=Gt),f}catch(p){return Ee(p)}finally{t.f^=Yt,En=n,Cn=r,In=o,bn=i,Tn=l,Mn=s,re(a),xn=c,Pn=u}}function Rn(t,e){let n=e.reactions;if(null!==n){var r=yt.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))&&(Hn(e,Nt),768&e.f||(e.f^=512),tn(e),Bn(e,0))}function Bn(t,e){var n=t.deps;if(null!==n)for(var r=e;r<n.length;r++)Rn(t,n[r])}function Dn(t){var e=t.f;if(0===(e&Rt)){Hn(t,Lt);var n=kn,r=gn;kn=t,gn=!0;try{0!==(e&Tt)?function(t){for(var e=t.first;null!==e;){var n=e.next;!(32&e.f)&&ar(e),e=n}}(t):sr(t),lr(t);var o=zn(t);t.teardown="function"==typeof o?o:null,t.wv=On}finally{gn=r,kn=n}}}function qn(t){var e=!!(2&t.f);if(null===bn||xn){if(e&&null===t.deps&&null===t.effects){var n=t,r=n.parent;null!==r&&0===(r.f&Ft)&&(n.f^=Ft)}}else if((null===kn||0===(kn.f&Rt))&&!(null==Mn?void 0:Mn.includes(t))){var o=bn.deps;if(0!==(bn.f&Yt))t.rv<Wn&&(t.rv=Wn,null===En&&null!==o&&o[Cn]===t?Cn++:null===En?En=[t]:Tn&&En.includes(t)||En.push(t));else{(bn.deps??(bn.deps=[])).push(t);var i=t.reactions;null===i?t.reactions=[bn]:i.includes(bn)||i.push(bn)}}if(wn){if(rn.has(t))return rn.get(t);if(e){var l=(n=t).v;return(0===(n.f&Lt)&&null!==n.reactions||Fn(n))&&(l=en(n)),rn.set(n,l),l}}else if(e){if(n=t,null==je?void 0:je.has(n))return je.get(n);An(n)&&nn(n)}if(null==je?void 0:je.has(t))return je.get(t);if(0!==(t.f&Gt))throw t.v;return t.v}function Fn(t){if(t.v===ee)return!0;if(null===t.deps)return!1;for(const e of t.deps){if(rn.has(e))return!0;if(2&e.f&&Fn(e))return!0}return!1}function Yn(t){var e=xn;try{return xn=!0,t()}finally{xn=e}}const Gn=-7169;function Hn(t,e){t.f=t.f&Gn|e}function Un(t){if("object"==typeof t&&t&&!(t instanceof EventTarget))if(Ht in t)Vn(t);else if(!Array.isArray(t))for(let e in t){const n=t[e];"object"==typeof n&&n&&Ht in n&&Vn(n)}}function Vn(t,e=new Set){if(!("object"!=typeof t||null===t||t instanceof EventTarget||e.has(t))){e.add(t),t instanceof Date&&t.getTime();for(let o in t)try{Vn(t[o],e)}catch(n){}const r=St(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=kt(r);for(let r in e){const o=e[r].get;if(o)try{o.call(t)}catch(n){}}}}}function Kn(t){null===kn&&null===bn&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==bn&&0!==(bn.f&Ft)&&null===kn&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),wn&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function Xn(t,e,n,r=!0){var o=kn;null!==o&&0!==(o.f&zt)&&(t|=zt);var i,l,s,a={ctx:ne,deps:null,nodes_start:null,nodes_end:null,f:t|At,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{Dn(a),a.f|=Bt}catch(d){throw ar(a),d}else null!==e&&He(a);if(r){var c=a;if(n&&null===c.deps&&null===c.teardown&&null===c.nodes_start&&c.first===c.last&&0===(c.f&qt)&&(c=c.first,0!==(t&Tt)&&0!==(t&Dt)&&null!==c&&(c.f|=Dt)),null!==c&&(c.parent=o,null!==o&&(i=c,null===(s=(l=o).last)?l.last=l.first=i:(s.next=i,i.prev=s,l.last=i)),null!==bn&&2&bn.f&&!(64&t))){var u=bn;(u.effects??(u.effects=[])).push(c)}}return a}function Zn(t){const e=Xn(8,null,!1);return Hn(e,Lt),e.teardown=t,e}function Jn(t){Kn();var e=kn.f;if(bn||!(32&e)||0!==(e&Bt))return Qn(t);var n=ne;(n.e??(n.e=[])).push(t)}function Qn(t){return Xn(1048580,t,!1)}function tr(t){return Kn(),Xn(1048584,t,!0)}function er(t){return Xn(4,t,!1)}function nr(t,e=0){return Xn(8|e,t,!0)}function rr(t,e=[],n=[]){Ke(e,n,e=>{Xn(8,()=>t(...e.map(qn)),!0)})}function or(t,e=0){return Xn(Tt|e,t,!0)}function ir(t,e=!0){return Xn(524320,t,!0,e)}function lr(t){var e=t.teardown;if(null!==e){const t=wn,n=bn;yn(!0),$n(null);try{e.call(null)}finally{yn(t),$n(n)}}}function sr(t,e=!1){var n=t.first;for(t.first=t.last=null;null!==n;){const t=n.ac;null!==t&&pn(()=>{t.abort(Kt)});var r=n.next;64&n.f?n.parent=null:ar(n,e),n=r}}function ar(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:$e(t);t.remove(),t=n}}(t.nodes_start,t.nodes_end),n=!0),sr(t,e&&!n),Bn(t,0),Hn(t,Rt);var r=t.transitions;if(null!==r)for(const i of r)i.stop();lr(t);var o=t.parent;null!==o&&null!==o.first&&cr(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function cr(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 ur(t,e,n=!0){var r=[];fr(t,r,!0),dr(r,()=>{n&&ar(t),e&&e()})}function dr(t,e){var n=t.length;if(n>0){var r=()=>--n||e();for(var o of t)o.out(r)}else e()}function fr(t,e,n){if(0===(t.f&zt)){if(t.f^=zt,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;fr(r,e,!!(0!==(r.f&Dt)||32&r.f&&0!==(t.f&Tt))&&n),r=o}}}function vr(t){hr(t,!0)}function hr(t,e){if(0!==(t.f&zt)){t.f^=zt,0===(t.f&Lt)&&(Hn(t,At),He(t));for(var n=t.first;null!==n;){var r=n.next;hr(n,!!(0!==(n.f&Dt)||32&n.f)&&e),n=r}if(null!==t.transitions)for(const n of t.transitions)(n.is_global||e)&&n.in()}}function pr(t,e){for(var n=t.nodes_start,r=t.nodes_end;null!==n;){var o=n===r?null:$e(n);e.append(n),n=o}}function gr(t){return t.endsWith("capture")&&"gotpointercapture"!==t&&"lostpointercapture"!==t}const mr=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function wr(t){return mr.includes(t)}const yr={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 br(t){return t=t.toLowerCase(),yr[t]??t}const xr=["touchstart","touchmove"];function $r(t){return xr.includes(t)}const kr=new Set,_r=new Set;function Mr(t,e,n,r={}){function o(t){if(r.capture||Or.call(e,t),!t.cancelBubble)return pn(()=>null==n?void 0:n.call(this,t))}return t.startsWith("pointer")||t.startsWith("touch")||"wheel"===t?de(()=>{e.addEventListener(t,o,r)}):e.addEventListener(t,o,r),o}function Sr(t,e,n,r={}){var o=Mr(e,t,n,r);return()=>{t.removeEventListener(e,o,r)}}function Er(t,e,n,r,o){var i={capture:r,passive:o},l=Mr(t,e,n,i);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Zn(()=>{e.removeEventListener(t,l,i)})}function Cr(t){for(var e=0;e<t.length;e++)kr.add(t[e]);for(var n of _r)n(t)}let Ir=null;function Or(t){var e,n=this,r=n.ownerDocument,o=t.type,i=(null==(e=t.composedPath)?void 0:e.call(t))||[],l=i[0]||t.target;Ir=t;var s=0,a=Ir===t&&t.__root;if(a){var c=i.indexOf(a);if(-1!==c&&(n===document||n===window))return void(t.__root=n);var u=i.indexOf(n);if(-1===u)return;c<=u&&(s=c)}if((l=i[s]||t.target)!==n){xt(t,"currentTarget",{configurable:!0,get:()=>l||r});var d=bn,f=kn;$n(null),_n(null);try{for(var v,h=[];null!==l;){var p=l.assignedSlot||l.parentNode||l.host||null;try{var g=l["__"+o];if(null!=g&&(!l.disabled||t.target===l))if(wt(g)){var[m,...w]=g;m.apply(l,[t,...w])}else g.call(l,t)}catch(y){v?h.push(y):v=y}if(t.cancelBubble||p===n||null===p)break;l=p}if(v){for(let t of h)queueMicrotask(()=>{throw t});throw v}}finally{t.__root=n,delete t.currentTarget,$n(d),_n(f)}}}function Wr(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","\x3c!----\x3e"),e.content}function Pr(t,e){var n=kn;null===n.nodes_start&&(n.nodes_start=t,n.nodes_end=e)}function jr(t,e){var n,r=!!(1&e),o=!!(2&e),i=!t.startsWith("<!>");return()=>{void 0===n&&(n=Wr(i?t:"<!>"+t),r||(n=xe(n)));var e=o||me?document.importNode(n,!0):n.cloneNode(!0);return r?Pr(xe(e),e.lastChild):Pr(e,e),e}}function Tr(t,e){return function(t,e,n="svg"){var r,o=`<${n}>${t.startsWith("<!>")?"<!>"+t:t}</${n}>`;return()=>{if(!r){var t=xe(Wr(o));r=xe(t)}var e=r.cloneNode(!0);return Pr(e,e),e}}(t,0,"svg")}function Lr(t=""){var e=be(t+"");return Pr(e,e),e}function Ar(){var t=document.createDocumentFragment(),e=document.createComment(""),n=be();return t.append(e,n),Pr(e,n),t}function Nr(t,e){null!==t&&t.before(e)}let zr=!0;function Rr(t){zr=t}function Br(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 Dr(t,e){return function(t,{target:e,anchor:n,props:r={},events:o,context:i,intro:l=!0}){!function(){if(void 0===ge){ge=window,me=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,n=Text.prototype;we=$t(e,"firstChild").get,ye=$t(e,"nextSibling").get,Et(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),Et(n)&&(n.__t=void 0)}}();var s=new Set,a=t=>{for(var n=0;n<t.length;n++){var r=t[n];if(!s.has(r)){s.add(r);var o=$r(r);e.addEventListener(r,Or,{passive:o});var i=qr.get(r);void 0===i?(document.addEventListener(r,Or,{passive:o}),qr.set(r,1)):qr.set(r,i+1)}}};a(bt(kr)),_r.add(a);var c=void 0,u=function(t){Re.ensure();const e=Xn(524352,t,!0);return(t={})=>new Promise(n=>{t.outro?ur(e,()=>{ar(e),n(void 0)}):(ar(e),n(void 0))})}(()=>{var u,d=n??e.appendChild(be());return u=e=>{i&&(ie({}),ne.c=i),o&&(r.$$events=o),zr=l,c=t(e,r)||{},zr=!0,i&&le()},new Ve(d,{pending:()=>{}},u),()=>{var t;for(var r of s){e.removeEventListener(r,Or);var o=qr.get(r);0===--o?(document.removeEventListener(r,Or),qr.delete(r)):qr.set(r,o)}_r.delete(a),d!==n&&(null==(t=d.parentNode)||t.removeChild(d))}});return Fr.set(c,u),c}(t,e)}const qr=new Map;let Fr=new WeakMap;function Yr(t,e){const n=Fr.get(t);return n?(Fr.delete(t),n(e)):Promise.resolve()}class Gr{constructor(t,e=!0){st(this,"anchor"),ut(this,T,new Map),ut(this,L,new Map),ut(this,A,new Map),ut(this,N,!0),ut(this,z,()=>{var t=We;if(ct(this,T).has(t)){var e=ct(this,T).get(t),n=ct(this,L).get(e);if(n)vr(n);else{var r=ct(this,A).get(e);r&&(ct(this,L).set(e,r.effect),ct(this,A).delete(e),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(const[e,n]of ct(this,T)){if(ct(this,T).delete(e),e===t)break;const r=ct(this,A).get(n);r&&(ar(r.effect),ct(this,A).delete(n))}for(const[t,r]of ct(this,L)){if(t===e)continue;const o=()=>{if(Array.from(ct(this,T).values()).includes(t)){var e=document.createDocumentFragment();pr(r,e),e.append(be()),ct(this,A).set(t,{effect:r,fragment:e})}else ar(r);ct(this,L).delete(t)};ct(this,N)||!n?ur(r,o,!1):o()}}}),this.anchor=t,dt(this,N,e)}ensure(t,e){var n=We;!e||ct(this,L).has(t)||ct(this,A).has(t)||ct(this,L).set(t,ir(()=>e(this.anchor))),ct(this,T).set(n,t),ct(this,z).call(this)}}function Hr(t,e,n=!1){var r=new Gr(t);function o(t,e){r.ensure(t,e)}or(()=>{var t=!1;e((e,n=!0)=>{t=!0,o(n,e)}),t||o(!1,null)},n?Dt:0)}T=new WeakMap,L=new WeakMap,A=new WeakMap,N=new WeakMap,z=new WeakMap;let Ur=null;function Vr(t){Ur=t}function Kr(t,e){return e}function Xr(t,e,n,r,o,i=null){var l=t,s={flags:e,items:new Map,first:null};!(4&e)||(l=t.appendChild(be()));var a,c,u=null,d=!1,f=new Map,v=Qe(()=>{var t=n();return wt(t)?t:null==t?[]:bt(t)});or(()=>{c??(c=kn);var t=(a=qn(v)).length;d&&0===t||(d=0===t,function(t,e,n,r,o,i,l,s,a){var c,u,d,f,v,h,p,g,m,w,y=!!(8&l),b=!!(3&l),x=e.length,$=n.items,k=n.first,_=null,M=[],S=[];if(y)for(w=0;w<x;w+=1)g=s(p=e[w],w),void 0!==(m=$.get(g))&&(null==(c=m.a)||c.measure(),(h??(h=new Set)).add(m));for(w=0;w<x;w+=1)if(g=s(p=e[w],w),void 0!==(m=$.get(g))){if(b&&Zr(m,p,w,l),0!==(m.e.f&zt)&&(vr(m.e),y&&(null==(u=m.a)||u.unfix(),(h??(h=new Set)).delete(m))),m!==k){if(void 0!==v&&v.has(m)){if(M.length<S.length){var E,C=S[0];_=C.prev;var I=M[0],O=M[M.length-1];for(E=0;E<M.length;E+=1)Qr(M[E],C,o);for(E=0;E<S.length;E+=1)v.delete(S[E]);to(n,I.prev,O.next),to(n,_,I),to(n,O,C),k=C,_=O,w-=1,M=[],S=[]}else v.delete(m),Qr(m,k,o),to(n,m.prev,m.next),to(n,m,null===_?n.first:_.next),to(n,_,m),_=m;continue}for(M=[],S=[];null!==k&&k.k!==g;)0===(k.e.f&zt)&&(v??(v=new Set)).add(k),S.push(k),k=k.next;if(null===k)continue;m=k}M.push(m),_=m,k=m.next}else{var W=r.get(g);if(void 0!==W){r.delete(g),$.set(g,W);var P=_?_.next:k;to(n,_,W),to(n,W,P),Qr(W,P,o),_=W}else _=Jr(k?k.e.nodes_start:o,n,_,null===_?n.first:_.next,p,g,w,i,l,a);$.set(g,_),M=[],S=[],k=_.next}if(null!==k||void 0!==v){for(var j=void 0===v?[]:bt(v);null!==k;)0===(k.e.f&zt)&&j.push(k),k=k.next;var T=j.length;if(T>0){var L=4&l&&0===x?o:null;if(y){for(w=0;w<T;w+=1)null==(d=j[w].a)||d.measure();for(w=0;w<T;w+=1)null==(f=j[w].a)||f.fix()}!function(t,e,n){for(var r=t.items,o=[],i=e.length,l=0;l<i;l++)fr(e[l].e,o,!0);var s=i>0&&0===o.length&&null!==n;if(s){var a=n.parentNode;a.textContent="",a.append(n),r.clear(),to(t,e[0].prev,e[i-1].next)}dr(o,()=>{for(var n=0;n<i;n++){var o=e[n];s||(r.delete(o.k),to(t,o.prev,o.next)),ar(o.e,!s)}})}(n,j,L)}}for(var A of(y&&de(()=>{var t;if(void 0!==h)for(m of h)null==(t=m.a)||t.apply()}),t.first=n.first&&n.first.e,t.last=_&&_.e,r.values()))ar(A.e);r.clear()}(c,a,s,f,l,o,e,r,n),null!==i&&(0===a.length?u?vr(u):u=ir(()=>i(l)):null!==u&&ur(u,()=>{u=null})),qn(v))})}function Zr(t,e,n,r){1&r&&cn(t.v,e),2&r?cn(t.i,n):t.i=n}function Jr(t,e,n,r,o,i,l,s,a,c,u){var d=Ur,f=1&a?16&a?on(o):sn(o,!1,!1):o,v=2&a?on(l):l,h={i:v,v:f,k:i,a:null,e:null,prev:n,next:r};Ur=h;try{return null===t&&document.createDocumentFragment().append(t=be()),h.e=ir(()=>s(t,f,v,c),!1),h.e.prev=n&&n.e,h.e.next=r&&r.e,null===n?u||(e.first=h):(n.next=h,n.e.next=h.e),null!==r&&(r.prev=h,r.e.prev=h.e),h}finally{Ur=d}}function Qr(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 l=$e(i);o.before(i),i=l}}function to(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 eo(t,e,n,r,o){var i,l=null==(i=e.$$slots)?void 0:i[n],s=!1;!0===l&&(l=e.children,s=!0),void 0===l||l(t,s?()=>r:r)}function no(t,e,...n){var r=new Gr(t);or(()=>{const t=e()??null;r.ensure(t,t&&(e=>t(e,...n)))},Dt)}function ro(t,e,n){var r=new Gr(t);or(()=>{var t=e()??null;r.ensure(t,t&&(e=>n(e,t)))},Dt)}function oo(t,e){var n,r=void 0;or(()=>{r!==(r=e())&&(n&&(ar(n),n=null),r&&(n=ir(()=>{er(()=>r(t))})))})}function io(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=io(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function lo(t){return"object"==typeof t?function(){for(var t,e,n=0,r="",o=arguments.length;n<o;n++)(t=arguments[n])&&(e=io(t))&&(r&&(r+=" "),r+=e);return r}(t):t??""}const so=[..." \t\n\r\f \v\ufeff"];function ao(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 co(t){return"-"!==t[0]||"-"!==t[1]?t.toLowerCase():t}function uo(t,e,n,r,o,i){var l=t.__className;if(l!==n||void 0===l){var s=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,l=0;(l=r.indexOf(o,l))>=0;){var s=l+i;0!==l&&!so.includes(r[l-1])||s!==r.length&&!so.includes(r[s])?l=s:r=(0===l?"":r.substring(0,l))+r.substring(s+1)}return""===r?null:r}(n,r,i);null==s?t.removeAttribute("class"):e?t.className=s:t.setAttribute("class",s),t.__className=n}else if(i&&o!==i)for(var a in i){var c=!!i[a];null!=o&&c===!!o[a]||t.classList.toggle(a,c)}return i}function fo(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 vo(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,l=0,s=!1,a=[];n&&a.push(...Object.keys(n).map(co)),r&&a.push(...Object.keys(r).map(co));var c=0,u=-1;const e=t.length;for(var d=0;d<e;d++){var f=t[d];if(s?"/"===f&&"*"===t[d-1]&&(s=!1):i?i===f&&(i=!1):"/"===f&&"*"===t[d+1]?s=!0:'"'===f||"'"===f?i=f:"("===f?l++:")"===f&&l--,!s&&!1===i&&0===l)if(":"===f&&-1===u)u=d;else if(";"===f||d===e-1){if(-1!==u){var v=co(t.substring(c,u).trim());a.includes(v)||(";"!==f&&d++,o+=" "+t.substring(c,d).trim()+";")}c=d+1,u=-1}}}return n&&(o+=ao(n)),r&&(o+=ao(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)?(fo(t,null==n?void 0:n[0],r[0]),fo(t,null==n?void 0:n[1],r[1],"important")):fo(t,n,r));return r}function ho(t,e,n=!1){if(t.multiple){if(null==e)return;if(!wt(e))return void console.warn("https://svelte.dev/e/select_multiple_invalid_value");for(var r of t.options)r.selected=e.includes(po(r))}else{for(r of t.options)if(pe(po(r),e))return void(r.selected=!0);n&&void 0===e||(t.selectedIndex=-1)}}function po(t){return"__value"in t?t.__value:t.value}const go=Symbol("class"),mo=Symbol("style"),wo=Symbol("is custom element"),yo=Symbol("is html");function bo(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function xo(t,e,n,r){var o=ko(t);o[e]!==(o[e]=n)&&("loading"===e&&(t[Vt]=n),null==n?t.removeAttribute(e):"string"!=typeof n&&Mo(t).includes(e)?t[e]=n:t.setAttribute(e,n))}function $o(t,e,n=[],r=[],o,i=!1,l=!1){Ke(n,r,n=>{var r=void 0,s={},a="SELECT"===t.nodeName,c=!1;if(or(()=>{var u=e(...n.map(qn)),d=function(t,e,n,r){var o=ko(t),i=o[wo],l=!o[yo],s=e||{},a="OPTION"===t.tagName;for(var c in e)c in n||(n[c]=null);n.class?n.class=lo(n.class):(r||n[go])&&(n.class=null),n[mo]&&(n.style??(n.style=null));var u=Mo(t);for(const g in n){let c=n[g];if(a&&"value"===g&&null==c)t.value=t.__value="",s[g]=c;else if("class"!==g)if("style"!==g){var d=s[g];if(c!==d||void 0===c&&t.hasAttribute(g)){s[g]=c;var f=g[0]+g[1];if("$$"!==f)if("on"===f){const e={},n="$$"+g;let r=g.slice(2);var v=wr(r);if(gr(r)&&(r=r.slice(0,-7),e.capture=!0),!v&&d){if(null!=c)continue;t.removeEventListener(r,s[n],e),s[n]=null}if(null!=c)if(v)t[`__${r}`]=c,Cr([r]);else{let o=function(t){s[g].call(this,t)};s[n]=Mr(r,t,o,e)}else v&&(t[`__${r}`]=void 0)}else if("style"===g)xo(t,g,c);else if("autofocus"===g)vn(t,Boolean(c));else if(i||"__value"!==g&&("value"!==g||null==c))if("selected"===g&&a)bo(t,c);else{var h=g;l||(h=br(h));var p="defaultValue"===h||"defaultChecked"===h;if(null!=c||i||p)p||u.includes(h)&&(i||"string"!=typeof c)?(t[h]=c,h in o&&(o[h]=ee)):"function"!=typeof c&&xo(t,h,c);else if(o[g]=null,"value"===h||"checked"===h){let n=t;const r=void 0===e;if("value"===h){let t=n.defaultValue;n.removeAttribute(h),n.defaultValue=t,n.value=n.__value=r?t:null}else{let t=n.defaultChecked;n.removeAttribute(h),n.defaultChecked=t,n.checked=!!r&&t}}else t.removeAttribute(g)}else t.value=t.__value=c}}else vo(t,c,null==e?void 0:e[mo],n[mo]),s[g]=c,s[mo]=n[mo];else uo(t,"http://www.w3.org/1999/xhtml"===t.namespaceURI,c,r,null==e?void 0:e[go],n[go]),s[g]=c,s[go]=n[go]}return s}(t,r,u,o,i,l);c&&a&&"value"in u&&ho(t,u.value);for(let t of Object.getOwnPropertySymbols(s))u[t]||ar(s[t]);for(let e of Object.getOwnPropertySymbols(u)){var f=u[e];"@attach"!==e.description||r&&f===r[e]||(s[e]&&ar(s[e]),s[e]=ir(()=>oo(t,()=>f))),d[e]=f}r=d}),a){var u=t;er(()=>{var t,e;ho(u,r.value,!0),t=u,(e=new MutationObserver(()=>{ho(t,t.__value)})).observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Zn(()=>{e.disconnect()})})}c=!0})}function ko(t){return t.__attributes??(t.__attributes={[wo]:t.nodeName.includes("-"),[yo]:"http://www.w3.org/1999/xhtml"===t.namespaceURI})}var _o=new Map;function Mo(t){var e,n=t.getAttribute("is")||t.nodeName,r=_o.get(n);if(r)return r;_o.set(n,r=[]);for(var o=t,i=Element.prototype;i!==o;){for(var l in e=kt(o))e[l].set&&r.push(l);o=St(o)}return r}const So={tick:t=>requestAnimationFrame(t),now:()=>performance.now(),tasks:new Set};function Eo(){const t=So.now();So.tasks.forEach(e=>{e.c(t)||(So.tasks.delete(e),e.f())}),0!==So.tasks.size&&So.tick(Eo)}function Co(t,e){pn(()=>{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 Oo(t){const e={},n=t.split(";");for(const r of n){const[t,n]=r.split(":");if(!t||void 0===n)break;e[Io(t.trim())]=n.trim()}return e}const Wo=t=>t;function Po(t,e,n,r){var o,i,l,s=!!(1&t),a=!!(2&t),c=!!(4&t),u=s&&a?"both":s?"in":"out",d=e.inert,f=e.style.overflow;function v(){return pn(()=>o??(o=n()(e,(null==r?void 0:r())??{},{direction:u})))}var h={is_global:c,in(){var t;if(e.inert=d,!s)return null==l||l.abort(),void(null==(t=null==l?void 0:l.reset)||t.call(l));a||null==i||i.abort(),Co(e,"introstart"),i=jo(e,v(),l,1,()=>{Co(e,"introend"),null==i||i.abort(),i=o=void 0,e.style.overflow=f})},out(t){if(!a)return null==t||t(),void(o=void 0);e.inert=!0,Co(e,"outrostart"),l=jo(e,v(),i,0,()=>{Co(e,"outroend"),null==t||t()})},stop:()=>{null==i||i.abort(),null==l||l.abort()}},p=kn;if((p.transitions??(p.transitions=[])).push(h),s&&zr){var g=c;if(!g){for(var m=p.parent;m&&0!==(m.f&Dt);)for(;(m=m.parent)&&0===(m.f&Tt););g=!m||0!==(m.f&Bt)}g&&er(()=>{Yn(()=>h.in())})}}function jo(t,e,n,r,o){var i=1===r;if(Ct(e)){var l,s=!1;return de(()=>{if(!s){var a=e({direction:i?"in":"out"});l=jo(t,a,n,r,o)}}),{abort:()=>{s=!0,null==l||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(null==n||n.deactivate(),!(null==e?void 0:e.duration))return o(),{abort:It,deactivate:It,reset:It,t:()=>r};const{delay:a=0,css:c,tick:u,easing:d=Wo}=e;var f=[];if(i&&void 0===n&&(u&&u(0,1),c)){var v=Oo(c(0,1));f.push(v,v)}var h=()=>1-r,p=t.animate(f,{duration:a,fill:"forwards"});return p.onfinish=()=>{p.cancel();var i=(null==n?void 0:n.t())??1-r;null==n||n.abort();var l=r-i,s=e.duration*Math.abs(l),a=[];if(s>0){var f=!1;if(c)for(var v=Math.ceil(s/(1e3/60)),g=0;g<=v;g+=1){var m=i+l*d(g/v),w=Oo(c(m,1-m));a.push(w),f||(f="hidden"===w.overflow)}f&&(t.style.overflow="hidden"),h=()=>{var t=p.currentTime;return i+l*d(t/s)},u&&function(t){let e;0===So.tasks.size&&So.tick(Eo),new Promise(n=>{So.tasks.add(e={c:t,f:n})})}(()=>{if("running"!==p.playState)return!1;var t=h();return u(t,1-t),!0})}(p=t.animate(a,{duration:s,fill:"forwards"})).onfinish=()=>{h=()=>r,null==u||u(r,1-r),o()}},{abort:()=>{p&&(p.cancel(),p.effect=null,p.onfinish=It)},deactivate:()=>{o=It},reset:()=>{0===r&&(null==u||u(1,0))},t:()=>h()}}function To(t){var e=t.type;return"number"===e||"range"===e}function Lo(t){return""===t?null:+t}const Ao=class{constructor(t){ut(this,q),ut(this,R,new WeakMap),ut(this,B),ut(this,D),dt(this,D,t)}observe(t,e){var n=ct(this,R).get(t)||new Set;return n.add(e),ct(this,R).set(t,n),ft(this,q,F).call(this).observe(t,ct(this,D)),()=>{var n=ct(this,R).get(t);n.delete(e),0===n.size&&(ct(this,R).delete(t),ct(this,B).unobserve(t))}}};R=new WeakMap,B=new WeakMap,D=new WeakMap,q=new WeakSet,F=function(){return ct(this,B)??dt(this,B,new ResizeObserver(t=>{for(var e of t)for(var n of(Ao.entries.set(e.target,e),ct(this,R).get(e.target)||[]))n(e)}))},st(Ao,"entries",new WeakMap);var No=new Ao({box:"border-box"});function zo(t,e){return t===e||(null==t?void 0:t[Ht])===e}function Ro(t={},e,n,r){return er(()=>{var r,o;return nr(()=>{r=o,o=[],Yn(()=>{t!==n(...o)&&(e(t,...o),r&&zo(n(...r),t)&&e(null,...r))})}),()=>{de(()=>{o&&zo(n(...o),t)&&e(null,...o)})}}),t}function Bo(t=!1){const e=ne,n=e.l.u;if(!n)return;let r=()=>Un(e.s);if(t){let t=0,n={};const o=Ze(()=>{let r=!1;const o=e.s;for(const t in o)o[t]!==n[t]&&(n[t]=o[t],r=!0);return r&&t++,t});r=()=>qn(o)}n.b.length&&tr(()=>{Do(e,r),Wt(n.b)}),Jn(()=>{const t=Yn(()=>n.m.map(Ot));return()=>{for(const e of t)"function"==typeof e&&e()}}),n.a.length&&Jn(()=>{Do(e,r),Wt(n.a)})}function Do(t,e){if(t.l.s)for(const n of t.l.s)qn(n);e()}let qo=!1,Fo=Symbol();function Yo(t,e,n){const r=n[e]??(n[e]={store:null,source:sn(void 0),unsubscribe:It});if(r.store!==t&&!(Fo in n))if(r.unsubscribe(),r.store=t??null,null==t)r.source.v=void 0,r.unsubscribe=It;else{var o=!0;r.unsubscribe=ti(t,t=>{o?r.source.v=t:an(r.source,t)}),o=!1}return t&&Fo in n?ri(t):qn(r.source)}function Go(t,e){return t.set(e),e}function Ho(){const t={};return[t,function(){Zn(()=>{for(var e in t)t[e].unsubscribe();xt(t,Fo,{enumerable:!1,value:!0})})}]}const Uo={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set:(t,e)=>!1,getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e))return e in t.props?{enumerable:!0,configurable:!0,value:t.props[e]}:void 0},has:(t,e)=>!t.exclude.includes(e)&&e in t.props,ownKeys:t=>Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))},Vo={get(t,e){if(!t.exclude.includes(e))return qn(t.version),e in t.special?t.special[e]():t.props[e]},set(t,e,n){if(!(e in t.special)){var r=kn;try{_n(t.parent_effect),t.special[e]=Jo({get[e](){return t.props[e]}},e,4)}finally{_n(r)}}return t.special[e](n),un(t.version),!0},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e))return e in t.props?{enumerable:!0,configurable:!0,value:t.props[e]}:void 0},deleteProperty:(t,e)=>(t.exclude.includes(e)||(t.exclude.push(e),un(t.version)),!0),has:(t,e)=>!t.exclude.includes(e)&&e in t.props,ownKeys:t=>Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))};function Ko(t,e){return new Proxy({props:t,exclude:e,special:{},version:on(0),parent_effect:kn},Vo)}const Xo={get(t,e){let n=t.props.length;for(;n--;){let r=t.props[n];if(Ct(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];Ct(o)&&(o=o());const i=$t(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(Ct(r)&&(r=r()),"object"==typeof r&&null!==r&&e in r){const t=$t(r,e);return t&&!t.configurable&&(t.configurable=!0),t}}},has(t,e){if(e===Ht||e===Ut)return!1;for(let n of t.props)if(Ct(n)&&(n=n()),null!=n&&e in n)return!0;return!1},ownKeys(t){const e=[];for(let n of t.props)if(Ct(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 Zo(...t){return new Proxy({props:t},Xo)}function Jo(t,e,n,r){var o,i,l,s=!te||!!(2&n),a=!!(8&n),c=!!(16&n),u=r,d=!0,f=()=>(d&&(d=!1,u=c?Yn(r):r),u);if(a){var v=Ht in t||Ut in t;i=(null==(o=$t(t,e))?void 0:o.set)??(v&&e in t?n=>t[e]=n:void 0)}var h,p=!1;if(a?[l,p]=function(t){var e=qo;try{return qo=!1,[t(),qo]}finally{qo=e}}(()=>t[e]):l=t[e],void 0===l&&void 0!==r&&(l=f(),i&&(s&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),i(l))),h=s?()=>{var n=t[e];return void 0===n?f():(d=!0,n)}:()=>{var n=t[e];return void 0!==n&&(u=void 0),void 0===n?u:n},s&&!(4&n))return h;if(i){var g=t.$$legacy;return function(t,e){return arguments.length>0?(s&&e&&!g&&!p||i(e?h():t),t):h()}}var m=!1,w=(1&n?Ze:Qe)(()=>(m=!1,h()));a&&qn(w);var y=kn;return function(t,e){if(arguments.length>0){const n=e?qn(w):s&&a?ve(t):t;return an(w,n),m=!0,void 0!==u&&(u=n),t}return wn&&m||0!==(y.f&Rt)?w.v:qn(w)}}function Qo(t){var e,n;null===ne&&Qt(),te&&null!==ne.l?(e=ne,n=e.l,n.u??(n.u={a:[],b:[],m:[]})).m.push(t):Jn(()=>{const e=Yn(t);if("function"==typeof e)return e})}function ti(t,e,n){if(null==t)return e(void 0),It;const r=Yn(()=>t.subscribe(e,n));return r.unsubscribe?()=>r.unsubscribe():r}const ei=[];function ni(t,e=It){let n=null;const r=new Set;function o(e){if(Zt(t,e)&&(t=e,n)){const e=!ei.length;for(const n of r)n[1](),ei.push(n,t);if(e){for(let t=0;t<ei.length;t+=2)ei[t][0](ei[t+1]);ei.length=0}}}function i(e){o(e(t))}return{set:o,update:i,subscribe:function(l,s=It){const a=[l,s];return r.add(a),1===r.size&&(n=e(o,i)||It),l(t),()=>{r.delete(a),0===r.size&&n&&(n(),n=null)}}}}function ri(t){let e;return ti(t,t=>e=t)(),e}"undefined"!=typeof window&&((Y=window.__svelte??(window.__svelte={})).v??(Y.v=new Set)).add("5");const oi=Array(12).fill(0);var ii=jr('<div class="sonner-loading-bar"></div>'),li=jr('<div><div class="sonner-spinner"></div></div>');function si(...t){return t.filter(Boolean).join(" ")}const ai="undefined"!=typeof document,ci="undefined"!=typeof window?window:void 0;new(U=class{constructor(t={}){ut(this,G),ut(this,H);const{window:e=ci,document:n=(null==e?void 0:e.document)}=t;void 0!==e&&(dt(this,G,n),dt(this,H,Ue(t=>{const n=Sr(e,"focusin",t),r=Sr(e,"focusout",t);return()=>{n(),r()}})))}get current(){var t;return null==(t=ct(this,H))||t.call(this),ct(this,G)?function(t){let e=t.activeElement;for(;null==e?void 0:e.shadowRoot;){const t=e.shadowRoot.activeElement;if(t===e)break;e=t}return e}(ct(this,G)):null}},G=new WeakMap,H=new WeakMap,U);const ui=new(X=class{constructor(t){ut(this,V),ut(this,K),dt(this,V,t),dt(this,K,Symbol(t))}get key(){return ct(this,K)}exists(){return t=ct(this,K),ae().has(t);var t}get(){const t=oe(ct(this,K));if(void 0===t)throw new Error(`Context "${ct(this,V)}" not found`);return t}getOr(t){const e=oe(ct(this,K));return void 0===e?t:e}set(t){return e=ct(this,K),n=t,ae().set(e,n),n;var e,n}},V=new WeakMap,K=new WeakMap,X)("<Toaster/>");let di=0;const fi=new(tt=class{constructor(){ut(this,Z,ln(ve([]))),ut(this,J,ln(ve([]))),ut(this,Q,t=>{const e=this.toasts.findIndex(e=>e.id===t);return-1===e?null:e}),st(this,"addToast",t=>{ai&&this.toasts.unshift(t)}),st(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}}),st(this,"create",t=>{var e;const{message:n,...r}=t,o="number"==typeof(null==t?void 0:t.id)||t.id&&(null==(e=t.id)?void 0:e.length)>0?t.id:di++,i=void 0===t.dismissable||t.dismissable,l=void 0===t.type?"default":t.type;return Yn(()=>{this.toasts.find(t=>t.id===o)?this.updateToast({id:o,data:t,type:l,message:n,dismissable:i}):this.addToast({...r,id:o,title:n,dismissable:i,type:l})}),o}),st(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)),st(this,"remove",t=>{if(void 0===t)return void(this.toasts=[]);const e=ct(this,Q).call(this,t);return null!==e?(this.toasts.splice(e,1),t):void 0}),st(this,"message",(t,e)=>this.create({...e,type:"default",message:t})),st(this,"error",(t,e)=>this.create({...e,type:"error",message:t})),st(this,"success",(t,e)=>this.create({...e,type:"success",message:t})),st(this,"info",(t,e)=>this.create({...e,type:"info",message:t})),st(this,"warning",(t,e)=>this.create({...e,type:"warning",message:t})),st(this,"loading",(t,e)=>this.create({...e,type:"loading",message:t})),st(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(()=>{var t;o&&(this.dismiss(n),n=void 0),null==(t=e.finally)||t.call(e)}),n}),st(this,"custom",(t,e)=>{const n=(null==e?void 0:e.id)||di++;return this.create({component:t,id:n,...e}),n}),st(this,"removeHeight",t=>{this.heights=this.heights.filter(e=>e.toastId!==t)}),st(this,"setHeight",t=>{const e=ct(this,Q).call(this,t.toastId);null!==e?this.heights[e]=t:this.heights.push(t)}),st(this,"reset",()=>{this.toasts=[],this.heights=[]})}get toasts(){return qn(ct(this,Z))}set toasts(t){an(ct(this,Z),t,!0)}get heights(){return qn(ct(this,J))}set heights(t){an(ct(this,J),t,!0)}},Z=new WeakMap,J=new WeakMap,Q=new WeakMap,tt);class vi{constructor(){ut(this,et,Je(()=>fi.toasts.filter(t=>!t.dismiss)))}get toasts(){return qn(ct(this,et))}}et=new WeakMap;const hi=Object.assign(function(t,e){return fi.create({message:t,...e})},{success:fi.success,info:fi.info,warning:fi.warning,error:fi.error,custom:fi.custom,message:fi.message,promise:fi.promise,dismiss:fi.dismiss,loading:fi.loading,getActiveToasts:()=>fi.toasts.filter(t=>!t.dismiss)});function pi(t){return void 0!==t.label}const gi={toast:"",title:"",description:"",loader:"",closeButton:"",cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function mi(t){return 1/(1.5+Math.abs(t)/20)}var wi=jr("<div><!></div>"),yi=(t,e,n,r,o)=>{var i,l;!qn(e)&&qn(n)&&(r(),null==(l=(i=o.toast).onDismiss)||l.call(i,o.toast))},bi=jr('<button data-close-button=""><!></button>'),xi=jr('<div data-icon=""><!> <!></div>'),$i=jr('<div data-description=""><!></div>'),ki=(t,e,n,r)=>{var o,i;pi(e.toast.cancel)&&qn(n)&&(null==(i=null==(o=e.toast.cancel)?void 0:o.onClick)||i.call(o,t),r())},_i=jr('<button data-button="" data-cancel=""> </button>'),Mi=(t,e,n)=>{var r;pi(e.toast.action)&&(null==(r=e.toast.action)||r.onClick(t),t.defaultPrevented||n())},Si=jr('<button data-button=""> </button>'),Ei=jr('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),Ci=jr('<li data-sonner-toast=""><!> <!></li>');function Ii(t,e){ie(e,!0);let n=Jo(e,"cancelButtonStyle",3,""),r=Jo(e,"actionButtonStyle",3,""),o=Jo(e,"descriptionClass",3,""),i=Jo(e,"unstyled",3,!1),l=Jo(e,"defaultRichColors",3,!1);const s={...gi};let a=ln(!1),c=ln(!1),u=ln(!1),d=ln(!1),f=ln(!1),v=ln(0),h=ln(0),p=e.toast.duration||e.duration||4e3,g=ln(void 0),m=ln(null),w=ln(null);const y=Je(()=>0===e.index),b=Je(()=>e.index+1<=e.visibleToasts),x=Je(()=>e.toast.type),$=Je(()=>!1!==e.toast.dismissable),k=Je(()=>e.toast.class||""),_=Je(()=>e.toast.descriptionClass||""),M=Je(()=>fi.heights.findIndex(t=>t.toastId===e.toast.id)||0),S=Je(()=>e.toast.closeButton??e.closeButton),E=Je(()=>e.toast.duration??e.duration??4e3);let C=null;const I=Je(()=>e.position.split("-")),O=Je(()=>fi.heights.reduce((t,e,n)=>n>=qn(M)?t:t+e.height,0)),W=function(){let t=ln(ve("undefined"!=typeof document&&document.hidden));return Jn(()=>Sr(document,"visibilitychange",()=>{an(t,document.hidden,!0)})),{get current(){return qn(t)}}}(),P=Je(()=>e.toast.invert||e.invert),j=Je(()=>"loading"===qn(x)),T=Je(()=>({...s,...e.classes})),L=Je(()=>e.toast.title),A=Je(()=>e.toast.description);let N=ln(0),z=ln(0);const R=Je(()=>Math.round(14*qn(M)+qn(O)));function B(){an(c,!0),an(v,qn(R),!0),fi.removeHeight(e.toast.id),setTimeout(()=>{fi.remove(e.toast.id)},200)}let D;Jn(()=>{let t;qn(L),qn(A),t=e.expanded||e.expandByDefault?1:1-.05*e.index;const n=Yn(()=>qn(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 l;n.style.removeProperty("height"),l=Math.abs(i-r)<1?i:r,an(h,l,!0),Yn(()=>{fi.setHeight({toastId:e.toast.id,height:l})})});const q=Je(()=>e.toast.promise&&"loading"===qn(x)||e.toast.duration===Number.POSITIVE_INFINITY);function F(){an(N,(new Date).getTime(),!0),D=setTimeout(()=>{var t,n;null==(n=(t=e.toast).onAutoClose)||n.call(t,e.toast),B()},p)}Jn(()=>{e.toast.updated&&(clearTimeout(D),p=qn(E),F())}),Jn(()=>(qn(q)||(e.expanded||e.interacting||W.current?function(){if(qn(z)<qn(N)){const t=(new Date).getTime()-qn(N);p-=t}an(z,(new Date).getTime(),!0)}():F()),()=>clearTimeout(D))),Qo(()=>{var t;an(a,!0);const n=null==(t=qn(g))?void 0:t.getBoundingClientRect().height;return an(h,n,!0),fi.setHeight({toastId:e.toast.id,height:n}),()=>{fi.removeHeight(e.toast.id)}}),Jn(()=>{e.toast.delete&&Yn(()=>{var t,n;B(),null==(n=(t=e.toast).onDismiss)||n.call(t,e.toast)})});const Y=Je(()=>e.toast.icon?e.toast.icon:"success"===qn(x)?e.successIcon:"error"===qn(x)?e.errorIcon:"warning"===qn(x)?e.warningIcon:"info"===qn(x)?e.infoIcon:"loading"===qn(x)?e.loadingIcon:null);var G=Ci();let H;xo(G,"tabindex",0),G.__pointermove=t=>{var n,r,o;if(!C||!qn($))return;if(((null==(n=window.getSelection())?void 0:n.toString().length)??-1)>0)return;const i=t.clientY-C.y,l=t.clientX-C.x,s=e.swipeDirections??function(t){const[e,n]=t.split("-"),r=[];return e&&r.push(e),n&&r.push(n),r}(e.position);!qn(m)&&(Math.abs(l)>1||Math.abs(i)>1)&&an(m,Math.abs(l)>Math.abs(i)?"x":"y",!0);let a={x:0,y:0};if("y"===qn(m)){if(s.includes("top")||s.includes("bottom"))if(s.includes("top")&&i<0||s.includes("bottom")&&i>0)a.y=i;else{const t=i*mi(i);a.y=Math.abs(t)<Math.abs(i)?t:i}}else if("x"===qn(m)&&(s.includes("left")||s.includes("right")))if(s.includes("left")&&l<0||s.includes("right")&&l>0)a.x=l;else{const t=l*mi(l);a.x=Math.abs(t)<Math.abs(l)?t:l}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&an(f,!0),null==(r=qn(g))||r.style.setProperty("--swipe-amount-x",`${a.x}px`),null==(o=qn(g))||o.style.setProperty("--swipe-amount-y",`${a.y}px`)},G.__pointerup=()=>{var t,n,r,o,i,l;if(qn(d)||!qn($))return;C=null;const s=Number((null==(t=qn(g))?void 0:t.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),a=Number((null==(n=qn(g))?void 0:n.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),c=(new Date).getTime()-0,h="x"===qn(m)?s:a,p=Math.abs(h)/c;if(Math.abs(h)>=45||p>.11)return an(v,qn(R),!0),null==(o=(r=e.toast).onDismiss)||o.call(r,e.toast),"x"===qn(m)?an(w,s>0?"right":"left",!0):an(w,a>0?"down":"up",!0),B(),void an(d,!0);null==(i=qn(g))||i.style.setProperty("--swipe-amount-x","0px"),null==(l=qn(g))||l.style.setProperty("--swipe-amount-y","0px"),an(f,!1),an(u,!1),an(m,null)},G.__pointerdown=t=>{if(qn(j))return;an(v,qn(R),!0);const e=t.target;e.setPointerCapture(t.pointerId),"BUTTON"!==e.tagName&&(an(u,!0),C={x:t.clientX,y:t.clientY})};var U=ke(G),V=t=>{var n=bi();n.__click=[yi,j,$,B,e],no(ke(n),()=>e.closeIcon??It),rr(t=>{xo(n,"aria-label",e.closeButtonAriaLabel),xo(n,"data-disabled",qn(j)),uo(n,1,t)},[()=>{var t,n,r;return lo(si(null==(t=qn(T))?void 0:t.closeButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.closeButton))}]),Nr(t,n)};Hr(U,t=>{qn(S)&&!e.toast.component&&"loading"!==qn(x)&&null!==e.closeIcon&&t(V)});var K=Me(U,2),X=t=>{const n=Je(()=>e.toast.component);var r=Ar();ro(_e(r),()=>qn(n),(t,n)=>{n(t,Zo(()=>e.toast.componentProps,{closeToast:B}))}),Nr(t,r)},Z=t=>{var i=Ei(),l=_e(i),s=t=>{var n=xi(),r=ke(n),o=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();ro(_e(n),()=>e.toast.icon,(t,e)=>{e(t,{})}),Nr(t,n)},i=t=>{(t=>{var n=Ar(),r=_e(n),o=t=>{var n=wi();no(ke(n),()=>e.loadingIcon),rr(t=>{uo(n,1,t),xo(n,"data-visible","loading"===qn(x))},[()=>{var t,n,r;return lo(si(null==(t=qn(T))?void 0:t.loader,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.loader,"sonner-loader"))}]),Nr(t,n)},i=t=>{{let n=Je(()=>{var t,n;return si(null==(t=qn(T))?void 0:t.loader,null==(n=e.toast.classes)?void 0:n.loader)}),r=Je(()=>"loading"===qn(x));!function(t,e){ie(e,!0);var n=li();Xr(ke(n),23,()=>oi,(t,e)=>`spinner-bar-${e}`,(t,e)=>{Nr(t,ii())}),rr(t=>{uo(n,1,t),xo(n,"data-visible",e.visible)},[()=>lo(["sonner-loading-wrapper",e.class].filter(Boolean).join(" "))]),Nr(t,n),le()}(t,{get class(){return qn(n)},get visible(){return qn(r)}})}};Hr(r,t=>{e.loadingIcon?t(o):t(i,!1)}),Nr(t,n)})(t)};Hr(r,t=>{e.toast.icon?t(o):t(i,!1)}),Nr(t,n)};Hr(r,t=>{(e.toast.promise||"loading"===qn(x))&&t(o)});var i=Me(r,2),l=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();ro(_e(n),()=>e.toast.icon,(t,e)=>{e(t,{})}),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.successIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.errorIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.warningIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.infoIcon??It),Nr(t,n)};Hr(r,t=>{"info"===qn(x)&&t(o)},!0),Nr(t,n)};Hr(r,t=>{"warning"===qn(x)?t(o):t(i,!1)},!0),Nr(t,n)};Hr(r,t=>{"error"===qn(x)?t(o):t(i,!1)},!0),Nr(t,n)};Hr(r,t=>{"success"===qn(x)?t(o):t(i,!1)},!0),Nr(t,n)};Hr(r,t=>{e.toast.icon?t(o):t(i,!1)}),Nr(t,n)};Hr(i,t=>{"loading"!==e.toast.type&&t(l)}),rr(t=>uo(n,1,t),[()=>{var t,n,r;return lo(si(null==(t=qn(T))?void 0:t.icon,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.icon))}]),Nr(t,n)};Hr(l,t=>{(qn(x)||e.toast.icon||e.toast.promise)&&null!==e.toast.icon&&(null!==qn(Y)||e.toast.icon)&&t(s)});var a=Me(l,2),c=ke(a),u=ke(c),d=t=>{var n=Ar(),r=_e(n),o=t=>{const n=Je(()=>e.toast.title);var r=Ar();ro(_e(r),()=>qn(n),(t,n)=>{n(t,Zo(()=>e.toast.componentProps))}),Nr(t,r)},i=t=>{var n=Lr();rr(()=>Br(n,e.toast.title)),Nr(t,n)};Hr(r,t=>{"string"!=typeof e.toast.title?t(o):t(i,!1)}),Nr(t,n)};Hr(u,t=>{e.toast.title&&t(d)});var f=Me(c,2),v=t=>{var n=$i(),r=ke(n),i=t=>{const n=Je(()=>e.toast.description);var r=Ar();ro(_e(r),()=>qn(n),(t,n)=>{n(t,Zo(()=>e.toast.componentProps))}),Nr(t,r)},l=t=>{var n=Lr();rr(()=>Br(n,e.toast.description)),Nr(t,n)};Hr(r,t=>{"string"!=typeof e.toast.description?t(i):t(l,!1)}),rr(t=>uo(n,1,t),[()=>{var t,n;return lo(si(o(),qn(_),null==(t=qn(T))?void 0:t.description,null==(n=e.toast.classes)?void 0:n.description))}]),Nr(t,n)};Hr(f,t=>{e.toast.description&&t(v)});var h=Me(a,2),p=t=>{var r=Ar(),o=_e(r),i=t=>{var n=Ar();ro(_e(n),()=>e.toast.cancel,(t,e)=>{e(t,{})}),Nr(t,n)},l=t=>{var r=Ar(),o=_e(r),i=t=>{var r=_i();r.__click=[ki,e,$,B];var o=ke(r);rr(t=>{vo(r,e.toast.cancelButtonStyle??n()),uo(r,1,t),Br(o,e.toast.cancel.label)},[()=>{var t,n,r;return lo(si(null==(t=qn(T))?void 0:t.cancelButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.cancelButton))}]),Nr(t,r)};Hr(o,t=>{pi(e.toast.cancel)&&t(i)},!0),Nr(t,r)};Hr(o,t=>{"function"==typeof e.toast.cancel?t(i):t(l,!1)}),Nr(t,r)};Hr(h,t=>{e.toast.cancel&&t(p)});var g=Me(h,2),m=t=>{var n=Ar(),o=_e(n),i=t=>{var n=Ar();ro(_e(n),()=>e.toast.action,(t,e)=>{e(t,{})}),Nr(t,n)},l=t=>{var n=Ar(),o=_e(n),i=t=>{var n=Si();n.__click=[Mi,e,B];var o=ke(n);rr(t=>{vo(n,e.toast.actionButtonStyle??r()),uo(n,1,t),Br(o,e.toast.action.label)},[()=>{var t,n,r;return lo(si(null==(t=qn(T))?void 0:t.actionButton,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.actionButton))}]),Nr(t,n)};Hr(o,t=>{pi(e.toast.action)&&t(i)},!0),Nr(t,n)};Hr(o,t=>{"function"==typeof e.toast.action?t(i):t(l,!1)}),Nr(t,n)};Hr(g,t=>{e.toast.action&&t(m)}),rr(t=>uo(c,1,t),[()=>{var t,n,r;return lo(si(null==(t=qn(T))?void 0:t.title,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.title))}]),Nr(t,i)};Hr(K,t=>{e.toast.component?t(X):t(Z,!1)}),Ro(G,t=>an(g,t),()=>qn(g)),rr((t,n,r,o)=>{uo(G,1,t),xo(G,"data-rich-colors",e.toast.richColors??l()),xo(G,"data-styled",!(e.toast.component||e.toast.unstyled||i())),xo(G,"data-mounted",qn(a)),xo(G,"data-promise",n),xo(G,"data-swiped",qn(f)),xo(G,"data-removed",qn(c)),xo(G,"data-visible",qn(b)),xo(G,"data-y-position",qn(I)[0]),xo(G,"data-x-position",qn(I)[1]),xo(G,"data-index",e.index),xo(G,"data-front",qn(y)),xo(G,"data-swiping",qn(u)),xo(G,"data-dismissable",qn($)),xo(G,"data-type",qn(x)),xo(G,"data-invert",qn(P)),xo(G,"data-swipe-out",qn(d)),xo(G,"data-swipe-direction",qn(w)),xo(G,"data-expanded",r),H=vo(G,`${e.style} ${e.toast.style}`,H,o)},[()=>{var t,n,r,o,i,l;return lo(si(e.class,qn(k),null==(t=qn(T))?void 0:t.toast,null==(r=null==(n=e.toast)?void 0:n.classes)?void 0:r.toast,null==(o=qn(T))?void 0:o[qn(x)],null==(l=null==(i=e.toast)?void 0:i.classes)?void 0:l[qn(x)]))},()=>Boolean(e.toast.promise),()=>Boolean(e.expanded||e.expandByDefault&&qn(a)),()=>({"--index":e.index,"--toasts-before":e.index,"--z-index":fi.toasts.length-e.index,"--offset":`${qn(c)?qn(v):qn(R)}px`,"--initial-height":e.expandByDefault?"auto":`${qn(h)}px`})]),Er("dragend",G,()=>{an(u,!1),an(m,null),C=null}),Nr(t,G),le()}Cr(["pointermove","pointerup","pointerdown","click"]),te=!0;var Oi=Tr('<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>'),Wi=Tr('<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>'),Pi=Tr('<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>'),ji=Tr('<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>'),Ti=Tr('<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 Li="24px",Ai="16px",Ni="dark",zi="light";var Ri=jr("<ol></ol>"),Bi=jr('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');const Di=new(ot=class{constructor(){ut(this,nt),this.baseUrl="https://api.playlight.dev/platform",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=`${this.baseUrl}${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((null==t?void 0:t.error)||(null==t?void 0:t.message)||n.status)}}return await n.json()}catch(e){hi.error("Request failed: "+e.message),console.error("Playlight API request error:",e)}};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="+ft(this,nt,rt).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/"+ft(this,nt,rt).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(){const t=ft(this,nt,rt).call(this);await this.request("/event/open",{method:"POST",body:JSON.stringify({domain:t})})}async trackClick(t){const e=ft(this,nt,rt).call(this);await this.request("/event/click",{method:"POST",body:JSON.stringify({sourceDomain:e,gameId:t})})}async toggleLike(t,e=!0){const n=e?"like":"unlike",r=await this.request(`/rating/${t}/${n}`,{method:"POST"});return(null==r?void 0:r.success)||!1}},nt=new WeakSet,rt=function(){const t=window.location.hostname;return t.startsWith("www.")?t.substring(4):t},ot),qi=new Map;async function Fi(t,...e){const n=qi.get(t);if(n)for(const o of n)try{await o(...e)}catch(r){console.error(`Playlight ${t} callback error:`,r)}}const Yi=t=>t;function Gi(t){const e=t-1;return e*e*e+1}function Hi(t){return t<.5?4*t*t*t:.5*Math.pow(2*t-2,3)+1}function Ui(t){const e="string"==typeof t&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Vi(t,{delay:e=0,duration:n=400,easing:r=Hi,amount:o=5,opacity:i=0}={}){const l=getComputedStyle(t),s=+l.opacity,a="none"===l.filter?"":l.filter,c=s*(1-i),[u,d]=Ui(o);return{delay:e,duration:n,easing:r,css:(t,e)=>`opacity: ${s-c*e}; filter: ${a} blur(${e*u}${d});`}}function Ki(t,{delay:e=0,duration:n=400,easing:r=Yi}={}){const o=+getComputedStyle(t).opacity;return{delay:e,duration:n,easing:r,css:t=>"opacity: "+t*o}}function Xi(t,{delay:e=0,duration:n=400,easing:r=Gi,x:o=0,y:i=0,opacity:l=0}={}){const s=getComputedStyle(t),a=+s.opacity,c="none"===s.transform?"":s.transform,u=a*(1-l),[d,f]=Ui(o),[v,h]=Ui(i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${c} translate(${(1-t)*d}${f}, ${(1-t)*v}${h});\n\t\t\topacity: ${a-u*e}`}}function Zi(t,{delay:e=0,duration:n=400,easing:r=Gi,axis:o="y"}={}){const i=getComputedStyle(t),l=+i.opacity,s="y"===o?"height":"width",a=parseFloat(i[s]),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]}`]),v=parseFloat(i[`margin${u[0]}`]),h=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)*l};${s}: ${t*a}px;padding-${c[0]}: ${t*d}px;padding-${c[1]}: ${t*f}px;margin-${c[0]}: ${t*v}px;margin-${c[1]}: ${t*h}px;border-${c[0]}-width: ${t*p}px;border-${c[1]}-width: ${t*g}px;min-${s}: 0`}}function Ji(t,{delay:e=0,duration:n=400,easing:r=Gi,start:o=0,opacity:i=0}={}){const l=getComputedStyle(t),s=+l.opacity,a="none"===l.transform?"":l.transform,c=1-o,u=s*(1-i);return{delay:e,duration:n,easing:r,css:(t,e)=>`\n\t\t\ttransform: ${a} scale(${1-c*e});\n\t\t\topacity: ${s-u*e}\n\t\t`}}
|
|
2
2
|
/**
|
|
3
3
|
* @license lucide-svelte v0.476.0 - ISC
|
|
4
4
|
*
|
|
@@ -18,7 +18,7 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m
|
|
|
18
18
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
19
19
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
20
20
|
*
|
|
21
|
-
*/const
|
|
21
|
+
*/const Qi={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 tl=Tr("<svg><!><!></svg>");function el(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=Ko(n,["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"]);ie(e,!1);let o=Jo(e,"name",8,void 0),i=Jo(e,"color",8,"currentColor"),l=Jo(e,"size",8,24),s=Jo(e,"strokeWidth",8,2),a=Jo(e,"absoluteStrokeWidth",8,!1),c=Jo(e,"iconNode",24,()=>[]);Bo();var u=tl();$o(u,(t,e)=>({...Qi,...r,width:l(),height:l(),stroke:i(),"stroke-width":t,class:e}),[()=>(Un(a()),Un(s()),Un(l()),Yn(()=>a()?24*Number(s())/Number(l()):s())),()=>(Un(o()),Un(n),Yn(()=>((...t)=>t.filter((t,e,n)=>Boolean(t)&&n.indexOf(t)===e).join(" "))("lucide-icon","lucide",o()?`lucide-${o()}`:"",n.class)))]);var d=ke(u);Xr(d,1,c,Kr,(t,e)=>{var n,r,o,i,l,s,a=Je(()=>jt(qn(e),2)),c=Ar();n=_e(c),r=()=>qn(a)[0],o=(t,e)=>{$o(t,()=>({...qn(a)[1]}))},i=null,l=Ur,s=new Gr(n,!1),or(()=>{const t=r()||null;return null===t?(s.ensure(null,null),void Rr(!0)):(s.ensure(t,e=>{var n=Ur;if(Vr(l),t){if(Pr(i=document.createElementNS("http://www.w3.org/2000/svg",t),i),o){var r=i.appendChild(be());o(i,r)}kn.nodes_end=i,e.before(i)}Vr(n)}),Rr(!0),()=>{t&&Rr(!1)})},Dt),Zn(()=>{Rr(!0)}),Nr(t,c)}),eo(Me(d),e,"default",{}),Nr(t,u),le()}function nl(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];
|
|
22
22
|
/**
|
|
23
23
|
* @license lucide-svelte v0.476.0 - ISC
|
|
24
24
|
*
|
|
@@ -38,7 +38,7 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m
|
|
|
38
38
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
39
39
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
40
40
|
*
|
|
41
|
-
*/
|
|
41
|
+
*/el(t,Zo({name:"loader-circle"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}function rl(t,e){if(!t||null==e)return console.error("Domain or Game ID are not provided!");Di.trackClick(e),window.open("https://"+t+"?utm_source=playlight","_blank","noopener")}const ol=(t,e=It,n=It)=>{var r=il();let o;var i=ke(r),l=ke(i);rr(t=>{o=uo(r,1,"bg-background absolute top-4 right-4 z-3 px-2 py-0.5 transition-opacity select-none",null,o,t),Br(l,n())},[()=>({"opacity-0":e()})]),Nr(t,r)};var il=jr('<div><p class="font-bold text-white uppercase"> </p></div>'),ll=(t,e,n,r,o,i)=>{!qn(e)||qn(n)||r()?rl(i.game.domain,i.game.id):o()},sl=jr('<video playsinline="" loop fetchpriority="low"></video>',2),al=jr('<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>'),cl=jr('<div class="bg-background/75 absolute right-0 bottom-0 left-0 flex max-h-1/3 z-2 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>'),ul=jr('<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),dl=jr('<div role="button" tabindex="0"><!> <!> <img alt="cover" fetchpriority="high"/> <!> <!></div>');function fl(t,e){ie(e,!0);const[n,r]=Ho();let o,i=Jo(e,"compact",3,!1),l=Jo(e,"small",3,!1),s=ln(!1),a=ln(!1),c=ln(!1),u=ln(!1),d=ln(!1),f=ln(void 0),v=ln(!1),h=ln(void 0);function p(){qn(s)||qn(c)||function(t,e=1){try{const n=new Audio(t);n.volume=e,n.play()}catch(n){console.error("Error playing sound:",n)}}(Yo(ea,"$projectUrl",n)+"/assets/sounds/hover-selection.ogg",.25),an(s,!0),clearTimeout(o),o=setTimeout(()=>an(a,!0),300),qn(f)&&e.game.cover_video_url&&qn(f).play().catch(t=>console.error("Video error:",t))}function g(){qn(f)&&qn(v)&&qn(f).pause(),an(s,!1),clearTimeout(o),an(a,!1)}var m=dl();Er("touchstart",ge,t=>{qn(h)&&!qn(h).contains(t.target)&&g()},void 0,!0),Er("pointerdown",ge,t=>an(c,"touch"===t.pointerType)),Er("pointermove",ge,t=>an(c,"touch"===t.pointerType)),m.__click=[ll,c,a,l,p,e];var w=ke(m),y=t=>{ol(t,()=>qn(s),()=>"Featured")},b=t=>{var n=Ar(),r=_e(n),o=t=>{ol(t,()=>qn(s),()=>"New")};Hr(r,t=>{var n;(function(t){const e=new Date;return e.setDate(e.getDate()-7),new Date(t)>e})(null==(n=e.game)?void 0:n.created_at)&&t(o)},!0),Nr(t,n)};Hr(w,t=>{var n;(null==(n=e.game)?void 0:n.featured)?t(y):t(b,!1)});var x=Me(w,2),$=t=>{var n=sl();let r;n.muted=!0,Ro(n,t=>an(f,t),()=>qn(f)),rr(t=>{xo(n,"src",e.game.cover_video_url),r=uo(n,1,"absolute top-0 left-0 aspect-[2/3] w-full object-cover opacity-0 z-1",null,r,t)},[()=>({"opacity-100":qn(s)&&qn(v)&&e.game.cover_video_url})]),Er("loadeddata",n,()=>{an(v,!0)}),Nr(t,n)};Hr(x,t=>{e.game.cover_video_url&&t($)});var k=Me(x,2);let _;var M=Me(k,2),S=t=>{var n=cl(),r=ke(n),o=ke(r),i=ke(o),l=ke(Me(o,2)),s=Me(r,2),a=t=>{var e=al();!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];
|
|
42
42
|
/**
|
|
43
43
|
* @license lucide-svelte v0.476.0 - ISC
|
|
44
44
|
*
|
|
@@ -58,7 +58,7 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m
|
|
|
58
58
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
59
59
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
60
60
|
*
|
|
61
|
-
*/
|
|
61
|
+
*/el(t,Zo({name:"info"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(ke(e),{size:15}),Nr(t,e)};Hr(s,t=>{qn(c)&&t(a)});var u=Me(s,2);rr(()=>{Br(i,e.game.name),Br(l,e.game.description||"No description."),uo(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`)}),Po(3,n,()=>Zi),Nr(t,n)};Hr(M,t=>{qn(s)&&!l()&&t(S)});var E=Me(M,2),C=t=>{var n=ul(),r=Me(_e(n),2);let o;rr(t=>{xo(r,"src",e.game.logo_url),o=uo(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":qn(d)})]),Er("load",r,()=>{an(d,!0)}),Nr(t,n)};Hr(E,t=>{l()||t(C)}),Ro(m,t=>an(h,t),()=>qn(h)),rr(t=>{uo(m,1,`highlight-border group relative flex aspect-[2/3] cursor-pointer flex-col shadow-xl transition hover:outline-2 ${qn(u)?"":"animate-pulse"} ${l()?"h-42":i()?"h-62":"h-92"} ${l()?"bg-muted":"bg-background mt-5 mb-[calc(3dvh+1.5vw)]"}`,"svelte-n3ft5o"),xo(k,"src",e.game.cover_image_url),_=uo(k,1,"prevent-image-select absolute top-0 left-0 aspect-[2/3] w-full object-cover opacity-0 transition svelte-n3ft5o",null,_,t)},[()=>({"opacity-100":qn(u)&&(!qn(s)||!qn(v)||!e.game.cover_video_url)})]),Er("mouseenter",m,p),Er("mouseleave",m,g),Er("load",k,()=>{an(u,!0)}),Nr(t,m),le(),r()}function vl(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 hl(t){const e=1.70158;return--t*t*((e+1)*t+e)+1}function pl(t){const e=t-1;return e*e*e+1}function gl(t){return Math.sin(t*Math.PI/2)}function ml(t,{from:e,to:n},r={}){var{delay:o=0,duration:i=t=>120*Math.sqrt(t),easing:l=pl}=r,s=getComputedStyle(t),a="none"===s.transform?"":s.transform,[c,u]=s.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,v=t.clientHeight/n.height/d,h=e.left+e.width*c,p=e.top+e.height*u,g=n.left+n.width*c,m=n.top+n.height*u,w=(h-g)*f,y=(p-m)*v,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:l,css:(t,e)=>`transform: ${a} translate(${e*w}px, ${e*y}px) scale(${t+e*b}, ${t+e*x});`}}Cr(["click"]);var wl=(t,e,n)=>{an(e,""),an(n,!qn(n))},yl=jr('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'),bl=jr('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'),xl=(t,e,n,r,o)=>{var i;e(n),an(r,!1),null==(i=o.onCategoryChange)||i.call(o)},$l=jr("<button> </button>"),kl=jr('<div class="space-y-1 p-1"></div>'),_l=jr('<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 p-1 pl-10 text-white focus:ring-0 focus:outline-none"/></div></div> <div class="max-h-60 overflow-y-auto"><!></div></div>'),Ml=jr('<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 Sl(t,e){ie(e,!0);let n,r=Jo(e,"categories",19,()=>[]),o=Jo(e,"selectedCategory",15),i=ln(!1),l=Je(()=>o()||(r().length>0?r()[0]:"...")),s=ln(""),a=ln(void 0),c=Je(()=>qn(s)?r().filter(t=>t.toLowerCase().includes(qn(s).toLowerCase())):r());const u=["Looking for","Interested in","Searching for","Fancy some","What about these"];let d=ln(ve(u[0]));Qo(()=>{an(d,u[Math.floor(Math.random()*(null==u?void 0:u.length))],!0)});var f=Ml();Er("click",ge,t=>{var e;!qn(a)||(null==(e=qn(a))?void 0:e.contains(t.target))||(null==n?void 0:n.contains(t.target))||an(i,!1)});var v=ke(f),h=ke(v),p=ke(h),g=Me(h,2);g.__click=[wl,s,i];var m=ke(g),w=ke(m),y=Me(m,2);{let t=Je(()=>qn(i)?"rotate-180 transform":"");!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"m6 9 6 6 6-6"}]];
|
|
62
62
|
/**
|
|
63
63
|
* @license lucide-svelte v0.476.0 - ISC
|
|
64
64
|
*
|
|
@@ -78,7 +78,7 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m
|
|
|
78
78
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
79
79
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
80
80
|
*
|
|
81
|
-
*/
|
|
81
|
+
*/el(t,Zo({name:"chevron-down"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(y,{size:25,strokeWidth:3,get class(){return`mt-1 ml-1 text-black ${qn(t)??""} transition-transform duration-200`}})}Ro(g,t=>n=t,()=>n);var b=Me(v,2),x=t=>{var n=_l(),l=ke(n),u=ke(l),d=ke(u);!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]];
|
|
82
82
|
/**
|
|
83
83
|
* @license lucide-svelte v0.476.0 - ISC
|
|
84
84
|
*
|
|
@@ -98,7 +98,7 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m
|
|
|
98
98
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
99
99
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
100
100
|
*
|
|
101
|
-
*/
|
|
101
|
+
*/el(t,Zo({name:"search"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(ke(d),{size:18,strokeWidth:2.5,class:"text-muted-foreground"});var f=Me(d,2),v=ke(Me(l,2)),h=t=>{Nr(t,yl())},p=t=>{var n=Ar(),r=_e(n),l=t=>{Nr(t,bl())},s=t=>{var n=kl();Xr(n,28,()=>qn(c),t=>t,(t,n)=>{var r=$l();r.__click=[xl,o,n,i,e];var l,s,a,c,u,d,f,v,h=ke(r);rr(()=>{uo(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"}`),Br(h,n)}),l=r,s=()=>ml,a=()=>({duration:150}),v=null,(f=Ur).a??(f.a={element:l,measure(){c=this.element.getBoundingClientRect()},apply(){if(null==d||d.abort(),u=this.element.getBoundingClientRect(),c.left!==u.left||c.right!==u.right||c.top!==u.top||c.bottom!==u.bottom){const t=s()(this.element,{from:c,to:u},null==a?void 0:a());d=jo(this.element,t,void 0,1,()=>{null==d||d.abort(),d=void 0})}},fix(){if(!l.getAnimations().length){var{position:t,width:e,height:n}=getComputedStyle(l);if("absolute"!==t&&"fixed"!==t){var r=l.style;v={position:r.position,width:r.width,height:r.height,transform:r.transform},r.position="absolute",r.width=e,r.height=n;var o=l.getBoundingClientRect();if(c.left!==o.left||c.top!==o.top){var i=`translate(${c.left-o.left}px, ${c.top-o.top}px)`;r.transform=r.transform?`${r.transform} ${i}`:i}}}},unfix(){if(v){var t=l.style;t.position=v.position,t.width=v.width,t.height=v.height,t.transform=v.transform}}}),f.a.element=l,Nr(t,r)}),Nr(t,n)};Hr(r,t=>{0===qn(c).length?t(l):t(s,!1)},!0),Nr(t,n)};Hr(v,t=>{0===r().length?t(h):t(p,!1)}),Ro(n,t=>an(a,t),()=>qn(a)),function(t,e,n=e){var r=new WeakSet;(function(t,e,n,r=n){t.addEventListener(e,()=>pn(n));const o=t.__on_r;t.__on_r=o?()=>{o(),r(!0)}:()=>r(!0),hn||(hn=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const n of t.target.elements)null==(e=n.__on_r)||e.call(n)})},{capture:!0}))})(t,"input",async o=>{var i=o?t.defaultValue:t.value;if(i=To(t)?Lo(i):i,n(i),null!==We&&r.add(We),await async function(){await Promise.resolve(),function(){var t=ze;ze=!0;try{for(;;){if(fe(),0===Le.length&&(null==We||We.flush(),0===Le.length))return void(Ae=null);Be()}}finally{ze=t}}()}(),i!==(i=e())){var l=t.selectionStart,s=t.selectionEnd,a=t.value.length;if(t.value=i??"",null!==s){var c=t.value.length;l===s&&s===a&&c>a?(t.selectionStart=c,t.selectionEnd=c):(t.selectionStart=l,t.selectionEnd=Math.min(s,c))}}}),null==Yn(e)&&t.value&&(n(To(t)?Lo(t.value):t.value),null!==We&&r.add(We)),nr(()=>{var n=e();if(t===document.activeElement){var o=Pe??We;if(r.has(o))return}To(t)&&n===Lo(t.value)||("date"!==t.type||n||t.value)&&n!==t.value&&(t.value=n??"")})}(f,()=>qn(s),t=>an(s,t)),Po(1,n,()=>Ki,()=>({duration:150,easing:gl})),Po(2,n,()=>Ki,()=>({duration:200,easing:gl})),Nr(t,n)};Hr(b,t=>{qn(i)&&t(x)}),rr(()=>{Br(p,qn(d)),Br(w,qn(l))}),Po(3,f,()=>Ji,()=>({easing:vl,start:.95})),Nr(t,f),le()}async function El(t,e,n,r){var o;(null==(o=e.currentGame)?void 0:o.id)&&(Go(Zs,!n()),Go(Js,r()+(n()?1:-1)),n()?localStorage.setItem(`playlight_${e.currentGame.id}_liked`,"true"):localStorage.removeItem(`playlight_${e.currentGame.id}_liked`),await Di.toggleLike(e.currentGame.id,n())||Go(Js,r()+(n()?-1:1)))}Cr(["click"]);var Cl=jr('<img alt="logo"/>'),Il=jr('<div class="bg-muted size-5"></div>'),Ol=jr('<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 Wl(t,e){ie(e,!0);const n=()=>Yo(Zs,"$currentGameIsLiked",o),r=()=>Yo(Js,"$currentGameLikeCount",o),[o,i]=Ho();let l=ln(!1);Jn(()=>{var t,n;null!=(null==(t=e.currentGame)?void 0:t.id)&&(Go(Zs,null!==localStorage.getItem(`playlight_${e.currentGame.id}_liked`)),Go(Js,(null==(n=e.currentGame)?void 0:n.likes)||0))});var s=Ol(),a=Me(ke(s),2),c=ke(a),u=t=>{var n=Cl();let r;rr(t=>{var o;xo(n,"src",null==(o=e.currentGame)?void 0:o.logo_url),r=uo(n,1,"bg-muted-foreground/50 size-5 text-[0px]! select-none",null,r,t)},[()=>({"animate-pulse":!qn(l)})]),Er("load",n,()=>{an(l,!0)}),Nr(t,n)},d=t=>{Nr(t,Il())};Hr(c,t=>{var n;(null==(n=e.currentGame)?void 0:n.logo_url)?t(u):t(d,!1)});var f=Me(c,2);let v;var h=ke(f),p=ke(Me(f,2)),g=ke(p),m=Me(p,2);m.__click=[El,e,n,r];var w=ke(m);{let t=Je(()=>n()?"currentColor":"none");!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),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"}]];
|
|
102
102
|
/**
|
|
103
103
|
* @license lucide-svelte v0.476.0 - ISC
|
|
104
104
|
*
|
|
@@ -118,7 +118,7 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m
|
|
|
118
118
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
119
119
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
120
120
|
*
|
|
121
|
-
*/
|
|
121
|
+
*/el(t,Zo({name:"thumbs-up"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(w,{size:18,strokeWidth:2.5,get fill(){return qn(t)},style:"margin-top: -5px;"})}rr(t=>{var o;v=uo(f,1,"max-w-35 truncate text-lg font-bold text-white",null,v,t),Br(h,(null==(o=e.currentGame)?void 0:o.name)||"Unavailable"),Br(g,r()),vo(m,`color: ${n()?"white !important":""};`),xo(m,"aria-label",n()?"Unlike game":"Like game")},[()=>{var t;return{"opacity-50":!(null==(t=e.currentGame)?void 0:t.name)}}]),Nr(t,s),le(),i()}function Pl(t,e,n,r,o){an(e,!1),an(n,250),an(r,0),o(250,t=>{an(n,250*(1-t)),an(r,t,!0)})}Cr(["click"]);var jl=jr('<div class="bg-background/85 fixed bottom-4 left-4 z-2 touch-none border-1 p-4 shadow-lg backdrop-blur-xl max-sm:right-4 sm:w-72" role="button" tabindex="0"><!></div>'),Tl=jr('<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 px-4 py-1.5 backdrop-blur-sm transition" aria-label="Show game display"><div class="bg-muted-foreground mx-auto h-px w-16"></div></button></div>'),Ll=jr("<!> <!>",1);function Al(t,e){t.target===t.currentTarget&&"touch"!==t.pointerType&&Go(Xs,!1)}Cr(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend"]);var Nl=jr('<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>'),zl=(t,e)=>Go(Xs,!1),Rl=jr('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'),Bl=jr('<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>'),Dl=jr("<!> <!>",1),ql=jr('<div class="flex h-30 items-center"><!></div>'),Fl=jr('<div class="pointer-events-none mx-auto flex h-fit flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="pointer-events-none flex min-h-10 w-full justify-center"><!></div></div>'),Yl=jr('<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">Game dev? Join Playlight <!></a></div>');function Gl(t,e){ie(e,!0);const n=()=>Yo(Xs,"$discoveryOpen",r),[r,o]=Ho();let i,l=ln(!0),s=ln(!1),a=ln(void 0),c=ln(ve([])),u=ln(void 0),d=ln(ve([])),f=ln(1),v=ln(!0),h=ln(!1),p=ln(void 0),g=ln(void 0);async function m(){var t,e;an(d,[],!0),an(f,1),an(v,!0),an(h,!1),(null==(t=qn(a))?void 0:t.featured_game)&&qn(u)==(null==(e=qn(a))?void 0:e.category)&&qn(d).push({...qn(a).featured_game,featured:!0}),await w()}async function w(){if(qn(l)||qn(s))return;1===qn(f)?an(l,!0):an(s,!0);const t=qn(h)?null:qn(u),e=await Di.getSuggestions(t,qn(f)),n=(null==e?void 0:e.games)||[],r=(null==e?void 0:e.pageSize)||15,o=n.filter(t=>!qn(d).some(e=>e.id===t.id));an(d,[...qn(d),...o],!0),n.length<r?!qn(h)&&qn(u)?(an(h,!0),an(f,1)):an(v,!1):an(f,qn(f)+1),an(l,!1),an(s,!1),qn(v)&&qn(p)&&qn(p).getBoundingClientRect().bottom<=window.innerHeight+300&&w()}Qo(()=>(i=new IntersectionObserver(t=>{t[0].isIntersecting&&qn(v)&&w()},{rootMargin:"300px",root:qn(g)}),()=>null==i?void 0:i.disconnect())),Jn(()=>{qn(p)&&i&&i.observe(qn(p))}),Qo(async()=>{var t,e,n;await(async t=>{var e=jt(t,2);an(a,e[0],!0),an(c,e[1],!0)})(await Promise.all([Di.getCurrentGameInfo(),Di.getCategories()])),an(u,(null==(t=qn(a))?void 0:t.category)||(null==(n=qn(c))?void 0:n[(null==(e=qn(c))?void 0:e.length)-1]),!0),an(l,!1),await m()});var y=Yl();Er("keydown",ge,t=>{"Escape"==t.key&&Go(Xs,!1)}),y.__pointerup=[Al,n];var b=ke(y),x=ke(b),$=ke(Me(x,2));$.__click=[zl,n],function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];
|
|
122
122
|
/**
|
|
123
123
|
* @license lucide-svelte v0.476.0 - ISC
|
|
124
124
|
*
|
|
@@ -138,7 +138,7 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m
|
|
|
138
138
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
139
139
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
140
140
|
*
|
|
141
|
-
*/
|
|
141
|
+
*/el(t,Zo({name:"x"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(ke($),{size:24,strokeWidth:2.5});var k=Me(b,2);Sl(ke(k),{get categories(){return qn(c)},onCategoryChange:m,get selectedCategory(){return qn(u)},set selectedCategory(t){an(u,t,!0)}});var _=Me(k,2),M=t=>{!function(t,e){ie(e,!0);let n=ln(!1),r=ln(0),o=ln(1),i=ln(!1),l=0;function s(t,e){const n=Date.now();!function r(){const o=Math.min((Date.now()-n)/t,1);e(o),o<1&&requestAnimationFrame(r)}()}function a(t){an(i,!0),l=t.type.includes("touch")?t.touches[0].clientY:t.clientY}function c(t){if(!qn(i))return;const e=Math.max(0,(t.type.includes("touch")?t.touches[0].clientY:t.clientY)-l);an(r,e,!0),an(o,Math.max(0,1-e/150),!0),e>40&&function(){an(i,!1);const t=qn(r);s(250,e=>{an(r,t+(250-t)*e),an(o,Math.max(0,1-1.5*e),!0),1===e&&an(n,!0)})}()}function u(){if(qn(i)&&(an(i,!1),qn(r)<40)){const t=qn(r);s(250,e=>{an(r,t*(1-e)),an(o,1)})}}Qo(()=>s(250,t=>an(o,t,!0)));var d=Ll(),f=_e(d),v=t=>{var n=jl();n.__mousedown=a,n.__mousemove=c,n.__mouseup=u,n.__touchstart=a,n.__touchmove=c,n.__touchend=u,Wl(ke(n),{get currentGame(){return e.currentGame}}),rr(()=>vo(n,`transform: translateY(${qn(r)??""}px); opacity: ${qn(o)??""}; cursor: grab;`)),Er("mouseleave",n,u),Nr(t,n)};Hr(f,t=>{e.currentGame&&!qn(n)&&t(v)});var h=Me(f,2),p=t=>{var e=Tl(),i=ke(e);i.__mousedown=[Pl,n,r,o,s],i.__touchstart=[Pl,n,r,o,s],Po(3,i,()=>Xi,()=>({delay:150,y:30})),Nr(t,e)};Hr(h,t=>{e.currentGame&&qn(n)&&t(p)}),Nr(t,d),le()}(t,{get currentGame(){return qn(a)}})};Hr(_,t=>{Yo(Qs,"$sidebarEnabled",r)&&!Yo(ta,"$sidebarCollapsed",r)||t(M)});var S=Me(_,2);S.__pointerup=[Al,n];var E=ke(S),C=t=>{var e=Rl();nl(ke(e),{class:"animate-spin opacity-75",size:50,strokeWidth:2.25}),Nr(t,e)},I=t=>{var e=Ar(),n=_e(e),r=t=>{Nr(t,Bl())},o=t=>{var e=Fl(),n=ke(e);Xr(n,17,()=>qn(d),Kr,(t,e,n)=>{const r=Je(()=>qn(d).findIndex(t=>t.category!==qn(u)&&!t.featured));var o=Dl(),i=_e(o),l=t=>{Nr(t,Nl())};Hr(i,t=>{n==qn(r)&&t(l)}),fl(Me(i,2),{get game(){return qn(e)}}),Nr(t,o)});var r=Me(n,2),o=ke(r),i=t=>{var e=ql();nl(ke(e),{class:"animate-spin opacity-75",size:40,strokeWidth:2.5}),Nr(t,e)};Hr(o,t=>{qn(s)&&t(i)}),Ro(r,t=>an(p,t),()=>qn(p)),Nr(t,e)};Hr(n,t=>{0!==qn(d).length||qn(l)?t(o,!1):t(r)},!0),Nr(t,e)};Hr(E,t=>{qn(l)&&0===qn(d).length?t(C):t(I,!1)}),Ro(S,t=>an(g,t),()=>qn(g));var O=Me(S,2);!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),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"}]];
|
|
142
142
|
/**
|
|
143
143
|
* @license lucide-svelte v0.476.0 - ISC
|
|
144
144
|
*
|
|
@@ -158,7 +158,7 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m
|
|
|
158
158
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
159
159
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
160
160
|
*
|
|
161
|
-
*/tl(t,Xo({name:"external-link"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(_e($e(I)),{size:14}),nr(()=>bo(x,"src",Fo(Qs,"$projectUrl",r)+"/static/images/logo-white-small.png")),Wo(3,y,()=>Vi,()=>({duration:250})),Ar(t,y),ie(),o()}Er(["pointerup","click"]);var Gl=Pr("<button><!></button>");function Hl(t,e){let n=Zo(e,"disabled",3,!1),r=Zo(e,"variant",3,"primary");var o=Gl();o.__click=function(...t){var n;null==(n=e.onclick)||n.apply(this,t)},eo($e(o),()=>e.children??Ct),nr(()=>{o.disabled=n(),co(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??""}`)}),Ar(t,o)}async function Vl(t=10,e=!1){const[n,r]=await Promise.all([Di.getCategories(),Di.getCurrentGameInfo()]),o=(null==r?void 0:r.category)||(null==n?void 0:n[(null==n?void 0:n.length)-1]),i=await Di.getSuggestions(o,1);(null==i?void 0:i.pageSize)<t&&console.error("Threshold must be <= than page size to avoid always triggering a re-fetch!");let l=(null==i?void 0:i.games)||[];if(e&&(l=l.slice(0,Math.ceil(t/2))),l.length<t||e){const t=await Di.getSuggestions(null,1),e=((null==t?void 0:t.games)||[]).filter(t=>!l.some(e=>e.id===t.id));l=[...l,...e]}return l.slice(0,t)}Er(["click"]);var Kl=(t,e)=>{"touch"!==t.pointerType&&e()},Ul=Pr('<div class="fixed top-0 right-0 left-0 h-4 max-lg:hidden"></div>'),Xl=Pr('<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>'),Zl=Pr('<div class="ml-3 flex items-center -space-x-2"></div>'),Jl=Pr("More games <!>",1),Ql=Pr('<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>'),ts=Pr("<!> <!>",1);Er(["pointerover"]);var es=Pr("<!> <!> <!>",1);function ns(t,e){oe(e,!1);const n=()=>Fo(Ks,"$discoveryOpen",o),r=()=>Fo(Hs,"$config",o),[o,i]=Go();Bo();var l=es(),s=ke(l),a=t=>{Yl(t,{})};Gr(s,t=>{n()&&t(a)});var c=_e(s,2);{let t=Je(()=>{var t,e;return null==(e=null==(t=r())?void 0:t.exitIntent)?void 0:e.enabled}),e=Je(()=>{var t,e;return null==(e=null==(t=r())?void 0:t.exitIntent)?void 0:e.immediate});!function(t,e){oe(e,!0);let n,r=Zo(e,"enabled",3,!0),o=Zo(e,"immediate",3,!1),i=on(void 0),l=on(void 0),s=on(fe([])),a=on(!1),c=on(void 0);function u(){setTimeout(async()=>{var t,r;n<Date.now()-50&&(clearTimeout(Rn(c)),sn(c,null),o()?(qi("exitIntent"),null==(t=e.onIntent)||t.call(e)):(qi("exitIntent"),sn(a,!0),(null==(r=Rn(s))?void 0:r.length)||sn(s,await Vl(3),!0)))},150)}let d=["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 f=ts();Sr("mousemove",pe,function(t){var e,o;!r()||(null==(e=Rn(i))?void 0:e.contains(t.target))||(null==(o=Rn(l))?void 0:o.contains(t.target))||(!Rn(c)&&Rn(a)&&sn(c,setTimeout(()=>sn(a,!1),1500),!0),n=Date.now())});var v=ke(f),h=t=>{var e=Ul();e.__pointerover=[Kl,u],zo(e,t=>sn(i,t),()=>Rn(i)),Ar(t,e)};Gr(v,t=>{r()&&t(h)});var p=_e(v,2),g=t=>{var n=Ql(),r=$e(n),o=$e(r);Hl(_e(r,2),{class:"group",onclick:()=>{var t;null==(t=e.onIntent)||t.call(e),setTimeout(()=>sn(a,!1),150)},children:(t,e)=>{var n=Jl(),r=_e(ke(n)),o=t=>{var e=Zl();Ur(e,21,()=>Rn(s),Kr,(t,e,n)=>{var r=Xl();let o;var i=$e(r);nr(t=>{o=fo(r,"",o,t),bo(i,"src",Rn(e).logo_url)},[()=>({"z-index":Rn(s).length-n})]),Ar(t,r)}),Wo(3,e,()=>Xi,()=>({axis:"x",duration:150})),Ar(t,e)};Gr(r,t=>{var e;(null==(e=Rn(s))?void 0:e.length)>=3&&t(o)}),Ar(t,n)},$$slots:{default:!0}}),zo(n,t=>sn(l,t),()=>Rn(l)),nr(t=>Br(o,t),[()=>d[Math.floor(Math.random()*d.length)]]),Sr("mouseenter",n,()=>{clearTimeout(Rn(c)),sn(c,null)}),Wo(3,n,()=>Ui,()=>({y:-100,easing:vl,duration:500})),Ar(t,n)};Gr(p,t=>{Rn(a)&&t(g)}),Ar(t,f),ie()}(c,{get enabled(){return Rn(t)},get immediate(){return Rn(e)},onIntent:()=>{n()||Yo(Ks,!0)}})}var u=_e(c,2),d=t=>{!function(t,e){oe(e,!0);let n=Zo(e,"invert",3,!1),r=Zo(e,"position",3,"bottom-right"),o=Zo(e,"hotkey",19,()=>["altKey","KeyT"]),i=Zo(e,"expand",3,!1),l=Zo(e,"closeButton",3,!1),s=Zo(e,"offset",3,Ti),a=Zo(e,"mobileOffset",3,Li),c=Zo(e,"theme",3,"light"),u=Zo(e,"richColors",3,!1),d=Zo(e,"duration",3,4e3),f=Zo(e,"visibleToasts",3,3),v=Zo(e,"toastOptions",19,()=>({})),h=Zo(e,"dir",7,"auto"),p=Zo(e,"gap",3,14),g=Zo(e,"containerAriaLabel",3,"Notifications"),m=Zo(e,"closeButtonAriaLabel",3,"Close toast"),w=new Proxy({props:e,exclude:["$$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"]},Ho);function y(){if("auto"!==h())return h();if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const t=document.documentElement.getAttribute("dir");return"auto"!==t&&t?(Fn(()=>h(t)),t):(Fn(()=>h(window.getComputedStyle(document.documentElement).direction??"ltr")),h())}const b=Ze(()=>Array.from(new Set([r(),...di.toasts.filter(t=>t.position).map(t=>t.position)].filter(Boolean))));let x=on(!1),$=on(!1),k=on(fe(function(t){return"system"!==t?t:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ai:Ni}(c()))),_=on(void 0),M=on(null),S=on(!1);const E=Ze(()=>o().join("+").replace(/Key/g,"").replace(/Digit/g,""));Zn(()=>{di.toasts.length<=1&&sn(x,!1)}),Zn(()=>{const t=di.toasts.filter(t=>t.dismiss&&!t.delete);if(t.length>0){const e=di.toasts.map(e=>t.find(t=>t.id===e.id)?{...e,delete:!0}:e);di.toasts=e}}),Zn(()=>()=>{Rn(_)&&Rn(M)&&(Rn(M).focus({preventScroll:!0}),sn(M,null),sn(S,!1))}),Jo(()=>(di.reset(),Mr(document,"keydown",t=>{var e,n;o().every(e=>t[e]||t.code===e)&&(sn(x,!0),null==(e=Rn(_))||e.focus()),"Escape"!==t.code||document.activeElement!==Rn(_)&&!(null==(n=Rn(_))?void 0:n.contains(document.activeElement))||sn(x,!1)}))),Zn(()=>{if("system"!==c()&&sn(k,c()),"undefined"!=typeof window){"system"===c()&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?sn(k,Ai):sn(k,Ni));const t=window.matchMedia("(prefers-color-scheme: dark)"),e=({matches:t})=>{sn(k,t?Ai:Ni,!0)};"addEventListener"in t?t.addEventListener("change",e):t.addListener(e)}});const C=t=>{var n;null==(n=e.onblur)||n.call(e,t),Rn(S)&&!t.currentTarget.contains(t.relatedTarget)&&(sn(S,!1),Rn(M)&&(Rn(M).focus({preventScroll:!0}),sn(M,null)))},O=t=>{var n;null==(n=e.onfocus)||n.call(e,t),t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissable||Rn(S)||(sn(S,!0),sn(M,t.relatedTarget,!0))},I=t=>{var n;null==(n=e.onpointerdown)||n.call(e,t),t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissable||sn($,!0)},W=t=>{var n;null==(n=e.onmouseenter)||n.call(e,t),sn(x,!0)},P=t=>{var n;null==(n=e.onmouseleave)||n.call(e,t),Rn($)||sn(x,!1)},j=t=>{var n;null==(n=e.onmousemove)||n.call(e,t),sn(x,!0)},T=t=>{var n;null==(n=e.ondragend)||n.call(e,t),sn(x,!1)},L=t=>{var n;null==(n=e.onpointerup)||n.call(e,t),sn($,!1)};ci.set(new fi);var A=Bi();bo(A,"tabindex",-1);var N=$e(A),z=t=>{var r=Lr();Ur(ke(r),18,()=>Rn(b),t=>t,(t,r,o,c)=>{const h=Ze(()=>{const[t,e]=r.split("-");return{y:t,x:e}}),g=Ze(()=>function(t,e){const n={};return[t,e].forEach((t,e)=>{const r=1===e,o=r?"--mobile-offset":"--offset",i=r?Li:Ti;function l(t){["top","right","bottom","left"].forEach(e=>{n[`${o}-${e}`]="number"==typeof t?`${t}px`:t})}"number"==typeof t||"string"==typeof t?l(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}):l(i)}),n}(s(),a()));var b=zi();xo(b,(t,n)=>({tabindex:-1,dir:t,class:e.class,"data-sonner-toaster":!0,"data-sonner-theme":Rn(k),"data-y-position":Rn(h).y,"data-x-position":Rn(h).x,style:e.style,onblur:C,onfocus:O,onmouseenter:W,onmousemove:j,onmouseleave:P,ondragend:T,onpointerdown:I,onpointerup:L,...w,[go]:n}),[y,()=>{var t;return{"--front-toast-height":`${null==(t=di.heights[0])?void 0:t.height}px`,"--width":"356px","--gap":`${p()}px`,"--offset-top":Rn(g)["--offset-top"],"--offset-right":Rn(g)["--offset-right"],"--offset-bottom":Rn(g)["--offset-bottom"],"--offset-left":Rn(g)["--offset-left"],"--mobile-offset-top":Rn(g)["--mobile-offset-top"],"--mobile-offset-right":Rn(g)["--mobile-offset-right"],"--mobile-offset-bottom":Rn(g)["--mobile-offset-bottom"],"--mobile-offset-left":Rn(g)["--mobile-offset-left"]}}],void 0,"svelte-nbs0zk"),Ur(b,23,()=>di.toasts.filter(t=>!t.position&&0===Rn(o)||t.position===r),t=>t.id,(t,o,s,a)=>{{const a=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.successIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,Oi())};Gr(r,t=>{null!==e.successIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.successIcon?t(o):t(i,!1)}),Ar(t,n)},c=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.errorIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,Ii())};Gr(r,t=>{null!==e.errorIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.errorIcon?t(o):t(i,!1)}),Ar(t,n)},h=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.warningIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,Wi())};Gr(r,t=>{null!==e.warningIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.warningIcon?t(o):t(i,!1)}),Ar(t,n)},p=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.infoIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,Pi())};Gr(r,t=>{null!==e.infoIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.infoIcon?t(o):t(i,!1)}),Ar(t,n)},g=t=>{var n=Lr(),r=ke(n),o=t=>{var n=Lr();eo(ke(n),()=>e.closeIcon??Ct),Ar(t,n)},i=t=>{var n=Lr(),r=ke(n),o=t=>{Ar(t,ji())};Gr(r,t=>{null!==e.closeIcon&&t(o)},!0),Ar(t,n)};Gr(r,t=>{e.closeIcon?t(o):t(i,!1)}),Ar(t,n)};let w=Ze(()=>{var t;return(null==(t=v())?void 0:t.duration)??d()}),y=Ze(()=>{var t;return(null==(t=v())?void 0:t.class)??""}),b=Ze(()=>{var t;return(null==(t=v())?void 0:t.descriptionClass)||""}),k=Ze(()=>{var t;return(null==(t=v())?void 0:t.style)??""}),_=Ze(()=>v().classes||{}),M=Ze(()=>v().unstyled??!1),S=Ze(()=>{var t;return(null==(t=v())?void 0:t.cancelButtonStyle)??""}),E=Ze(()=>{var t;return(null==(t=v())?void 0:t.actionButtonStyle)??""}),C=Ze(()=>{var t;return(null==(t=v())?void 0:t.closeButtonAriaLabel)??m()});Ci(t,{get index(){return Rn(s)},get toast(){return Rn(o)},get defaultRichColors(){return u()},get duration(){return Rn(w)},get class(){return Rn(y)},get descriptionClass(){return Rn(b)},get invert(){return n()},get visibleToasts(){return f()},get closeButton(){return l()},get interacting(){return Rn($)},get position(){return r},get style(){return Rn(k)},get classes(){return Rn(_)},get unstyled(){return Rn(M)},get cancelButtonStyle(){return Rn(S)},get actionButtonStyle(){return Rn(E)},get closeButtonAriaLabel(){return Rn(C)},get expandByDefault(){return i()},get expanded(){return Rn(x)},get loadingIcon(){return e.loadingIcon},successIcon:a,errorIcon:c,warningIcon:h,infoIcon:p,closeIcon:g,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),zo(b,t=>sn(_,t),()=>Rn(_)),nr(()=>b.dir=b.dir),Ar(t,b)}),Ar(t,r)};Gr(N,t=>{di.toasts.length>0&&t(z)}),nr(()=>bo(A,"aria-label",`${g()??""} ${Rn(E)??""}`)),Ar(t,A),ie()}(t,{})};Gr(u,t=>{(n()||Fo(Zs,"$sidebarEnabled",o))&&t(d)}),Ar(t,l),ie(),i()}var rs=Pr('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><!></div>'),os=Pr('<div class="scroll-container grid grid-cols-2 gap-6 svelte-129hoe0"><div class="flex flex-col gap-6 svelte-129hoe0"><div class="animate-scroll-column flex flex-col gap-6 svelte-129hoe0"></div></div> <div class="mt-15 flex flex-col gap-6 svelte-129hoe0"><div class="animate-scroll-column-offset flex flex-col gap-6 svelte-129hoe0"></div></div></div>'),is=Pr('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><p class="text-muted-foreground svelte-129hoe0">Error – See console</p></div>'),ls=Pr("View all games <!>",1),ss=Pr("Random game <!>",1),as=(t,e)=>e(t.clientY),cs=(t,e)=>e(t.touches[0].clientY),us=Pr('<img alt="icon" class="pointer-events-none aspect-square w-8 svelte-129hoe0"/>'),ds=Pr('<div role="button" tabindex="0"><!> <!></div>'),fs=Pr('<div><img alt="logo" class="pointer-events-none mx-auto mt-4 -mb-1 w-50 select-none svelte-129hoe0"/> <div class="grow-1 overflow-hidden mask-y-from-90% mask-y-to-100% p-6 py-12 transition-opacity not-hover:opacity-75 svelte-129hoe0"><!></div> <div class="flex w-full flex-col items-center gap-4 px-4 svelte-129hoe0"><!> <!></div> <div class="w-full svelte-129hoe0"><div class="mt-auto border-y p-6 py-4 svelte-129hoe0"><!></div> <div class="flex justify-end p-0 svelte-129hoe0"><!></div></div></div> <!>',1);function vs(t,e){oe(e,!0);const n=()=>Fo(Js,"$sidebarCollapsed",i),r=()=>Fo(Qs,"$projectUrl",i),o=()=>Fo(Ks,"$discoveryOpen",i),[i,l]=Go();let s=on(!1),a=on(void 0),c=on(0),u=on(null),d=on(fe([])),f=Ze(()=>{var t;return(null==(t=Rn(d))?void 0:t.filter((t,e)=>e%2==0))||[]}),v=Ze(()=>{var t;return(null==(t=Rn(d))?void 0:t.filter((t,e)=>e%2==1))||[]});function h(){sessionStorage.setItem("playlightSidebarState",JSON.stringify({collapsed:n(),buttonY:Rn(m)}))}function p(){try{return JSON.parse(sessionStorage.getItem("playlightSidebarState")||"{}")}catch{}}Qn(()=>{var t;const e=document.documentElement.clientWidth<=768;Yo(Js,e||Boolean(null==(t=p())?void 0:t.collapsed))}),Jo(async()=>{var t;return sn(m,(null==(t=p())?void 0:t.buttonY)??Rn(m),!0),sn(s,!0),sn(d,await Vl(14,!0),!0),sn(a,await Di.getCurrentGameInfo(),!0),sn(s,!1),Mr(window,"touchmove",k,{passive:!1})});let g,m=on(100),w=on(!1),y=on(0),b=on(0),x=on(null);function $(t){sn(w,!0),sn(y,t,!0),sn(b,Rn(m),!0)}function k(t){Rn(w)&&(t.preventDefault(),_(t.touches[0].clientY))}function _(t){var e;if(!Rn(w))return;const n=t-Rn(y),r=Rn(b)+n,o=null==(e=Rn(x))?void 0:e.offsetHeight;sn(m,Math.max(0,Math.min(window.innerHeight-o,r)),!0),cancelAnimationFrame(g),g=requestAnimationFrame(h)}function M(t){if(t.preventDefault(),sn(c,Rn(c)-t.deltaY),Rn(u)){const t=Rn(u).offsetHeight/3;sn(c,(Rn(c)%t+t)%t)}}var S=fs();Sr("mousemove",pe,function(t){Rn(w)&&_(t.clientY)}),Sr("mouseup",pe,()=>sn(w,!1)),Sr("touchend",pe,()=>sn(w,!1)),Sr("resize",pe,()=>{document.documentElement.clientWidth<=768&&Yo(Js,!0)});var E=ke(S),C=$e(E),O=_e(C,2),I=$e(O),W=t=>{var e=rs();el($e(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),Ar(t,e)},P=t=>{var e=Lr(),n=ke(e),r=t=>{var e=os(),n=$e(e),r=$e(n);let o;Ur(r,21,()=>[...Rn(f),...Rn(f),...Rn(f)],Kr,(t,e)=>{dl(t,{get game(){return Rn(e)},small:!0})}),zo(r,t=>sn(u,t),()=>Rn(u));var i=$e(_e(n,2));let l;Ur(i,21,()=>[...Rn(v),...Rn(v),...Rn(v)],Kr,(t,e)=>{dl(t,{get game(){return Rn(e)},small:!0})}),nr((t,e)=>{o=fo(r,"",o,t),l=fo(i,"",l,e)},[()=>({transform:`translateY(calc(-33.333% + ${Rn(c)??""}px))`}),()=>({transform:`translateY(calc(-33.333% + ${Rn(c)??""}px))`})]),Sr("wheel",e,M),Ar(t,e)},o=t=>{Ar(t,is())};Gr(n,t=>{var e;(null==(e=Rn(d))?void 0:e.length)?t(r):t(o,!1)},!0),Ar(t,e)};Gr(I,t=>{Rn(s)?t(W):t(P,!1)});var j=_e(O,2),T=$e(j);Hl(T,{class:"w-full",onclick:()=>Yo(Ks,!0),get disabled(){return o()},children:(t,e)=>{var n=ls();!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),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"}]];
|
|
161
|
+
*/el(t,Zo({name:"external-link"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(Me(ke(O)),{size:14}),rr(()=>xo(x,"src",Yo(ea,"$projectUrl",r)+"/assets/images/logo-white-small.png")),Po(3,y,()=>Vi,()=>({duration:250})),Nr(t,y),le(),o()}Cr(["pointerup","click"]);var Hl=jr("<button><!></button>");function Ul(t,e){let n=Jo(e,"disabled",3,!1),r=Jo(e,"variant",3,"primary");var o=Hl();o.__click=function(...t){var n;null==(n=e.onclick)||n.apply(this,t)},no(ke(o),()=>e.children??It),rr(()=>{o.disabled=n(),uo(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??""}`)}),Nr(t,o)}async function Vl(t=10,e=!1){const[n,r]=await Promise.all([Di.getCategories(),Di.getCurrentGameInfo()]),o=(null==r?void 0:r.category)||(null==n?void 0:n[(null==n?void 0:n.length)-1]),i=await Di.getSuggestions(o,1);(null==i?void 0:i.pageSize)<t&&console.error("Threshold must be <= than page size to avoid always triggering a re-fetch!");let l=(null==i?void 0:i.games)||[];if(e&&(l=l.slice(0,Math.ceil(t/2))),l.length<t||e){const t=await Di.getSuggestions(null,1),e=((null==t?void 0:t.games)||[]).filter(t=>!l.some(e=>e.id===t.id));l=[...l,...e]}return l.slice(0,t)}Cr(["click"]);var Kl=(t,e)=>{"touch"!==t.pointerType&&e()},Xl=jr('<div class="fixed top-0 right-0 left-0 h-4 max-lg:hidden"></div>'),Zl=jr('<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>'),Jl=jr('<div class="ml-3 flex items-center -space-x-2"></div>'),Ql=jr("More games <!>",1),ts=jr('<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>'),es=jr("<!> <!>",1);Cr(["pointerover"]);var ns=jr("<!> <!> <!>",1);function rs(t,e){ie(e,!1);const n=()=>Yo(Xs,"$discoveryOpen",o),r=()=>Yo(Vs,"$config",o),[o,i]=Ho();Bo();var l=ns(),s=_e(l),a=t=>{Gl(t,{})};Hr(s,t=>{n()&&t(a)});var c=Me(s,2);{let t=Qe(()=>{var t,e;return null==(e=null==(t=r())?void 0:t.exitIntent)?void 0:e.enabled}),e=Qe(()=>{var t,e;return null==(e=null==(t=r())?void 0:t.exitIntent)?void 0:e.immediate});!function(t,e){ie(e,!0);let n,r=Jo(e,"enabled",3,!0),o=Jo(e,"immediate",3,!1),i=ln(void 0),l=ln(void 0),s=ln(ve([])),a=ln(!1),c=ln(void 0);function u(){setTimeout(async()=>{var t,r;n<Date.now()-50&&(clearTimeout(qn(c)),an(c,null),o()?(Fi("exitIntent"),null==(t=e.onIntent)||t.call(e)):(Fi("exitIntent"),an(a,!0),(null==(r=qn(s))?void 0:r.length)||an(s,await Vl(3),!0)))},150)}let d=["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 f=es();Er("mousemove",ge,function(t){var e,o;!r()||(null==(e=qn(i))?void 0:e.contains(t.target))||(null==(o=qn(l))?void 0:o.contains(t.target))||(!qn(c)&&qn(a)&&an(c,setTimeout(()=>an(a,!1),1500),!0),n=Date.now())});var v=_e(f),h=t=>{var e=Xl();e.__pointerover=[Kl,u],Ro(e,t=>an(i,t),()=>qn(i)),Nr(t,e)};Hr(v,t=>{r()&&t(h)});var p=Me(v,2),g=t=>{var n=ts(),r=ke(n),o=ke(r);Ul(Me(r,2),{class:"group",onclick:()=>{var t;null==(t=e.onIntent)||t.call(e),setTimeout(()=>an(a,!1),150)},children:(t,e)=>{var n=Ql(),r=Me(_e(n)),o=t=>{var e=Jl();Xr(e,21,()=>qn(s),Kr,(t,e,n)=>{var r=Zl();let o;var i=ke(r);rr(t=>{o=vo(r,"",o,t),xo(i,"src",qn(e).logo_url)},[()=>({"z-index":qn(s).length-n})]),Nr(t,r)}),Po(3,e,()=>Zi,()=>({axis:"x",duration:150})),Nr(t,e)};Hr(r,t=>{var e;(null==(e=qn(s))?void 0:e.length)>=3&&t(o)}),Nr(t,n)},$$slots:{default:!0}}),Ro(n,t=>an(l,t),()=>qn(l)),rr(t=>Br(o,t),[()=>d[Math.floor(Math.random()*d.length)]]),Er("mouseenter",n,()=>{clearTimeout(qn(c)),an(c,null)}),Po(3,n,()=>Xi,()=>({y:-100,easing:hl,duration:500})),Nr(t,n)};Hr(p,t=>{qn(a)&&t(g)}),Nr(t,f),le()}(c,{get enabled(){return qn(t)},get immediate(){return qn(e)},onIntent:()=>{n()||Go(Xs,!0)}})}var u=Me(c,2),d=t=>{!function(t,e){ie(e,!0);let n=Jo(e,"invert",3,!1),r=Jo(e,"position",3,"bottom-right"),o=Jo(e,"hotkey",19,()=>["altKey","KeyT"]),i=Jo(e,"expand",3,!1),l=Jo(e,"closeButton",3,!1),s=Jo(e,"offset",3,Li),a=Jo(e,"mobileOffset",3,Ai),c=Jo(e,"theme",3,"light"),u=Jo(e,"richColors",3,!1),d=Jo(e,"duration",3,4e3),f=Jo(e,"visibleToasts",3,3),v=Jo(e,"toastOptions",19,()=>({})),h=Jo(e,"dir",7,"auto"),p=Jo(e,"gap",3,14),g=Jo(e,"containerAriaLabel",3,"Notifications"),m=Jo(e,"closeButtonAriaLabel",3,"Close toast"),w=new Proxy({props:e,exclude:["$$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"]},Uo);function y(){if("auto"!==h())return h();if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const t=document.documentElement.getAttribute("dir");return"auto"!==t&&t?(Yn(()=>h(t)),t):(Yn(()=>h(window.getComputedStyle(document.documentElement).direction??"ltr")),h())}const b=Je(()=>Array.from(new Set([r(),...fi.toasts.filter(t=>t.position).map(t=>t.position)].filter(Boolean))));let x=ln(!1),$=ln(!1),k=ln(ve(function(t){return"system"!==t?t:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?Ni:zi}(c()))),_=ln(void 0),M=ln(null),S=ln(!1);const E=Je(()=>o().join("+").replace(/Key/g,"").replace(/Digit/g,""));Jn(()=>{fi.toasts.length<=1&&an(x,!1)}),Jn(()=>{const t=fi.toasts.filter(t=>t.dismiss&&!t.delete);if(t.length>0){const e=fi.toasts.map(e=>t.find(t=>t.id===e.id)?{...e,delete:!0}:e);fi.toasts=e}}),Jn(()=>()=>{qn(_)&&qn(M)&&(qn(M).focus({preventScroll:!0}),an(M,null),an(S,!1))}),Qo(()=>(fi.reset(),Sr(document,"keydown",t=>{var e,n;o().every(e=>t[e]||t.code===e)&&(an(x,!0),null==(e=qn(_))||e.focus()),"Escape"!==t.code||document.activeElement!==qn(_)&&!(null==(n=qn(_))?void 0:n.contains(document.activeElement))||an(x,!1)}))),Jn(()=>{if("system"!==c()&&an(k,c()),"undefined"!=typeof window){"system"===c()&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?an(k,Ni):an(k,zi));const t=window.matchMedia("(prefers-color-scheme: dark)"),e=({matches:t})=>{an(k,t?Ni:zi,!0)};"addEventListener"in t?t.addEventListener("change",e):t.addListener(e)}});const C=t=>{var n;null==(n=e.onblur)||n.call(e,t),qn(S)&&!t.currentTarget.contains(t.relatedTarget)&&(an(S,!1),qn(M)&&(qn(M).focus({preventScroll:!0}),an(M,null)))},I=t=>{var n;null==(n=e.onfocus)||n.call(e,t),t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissable||qn(S)||(an(S,!0),an(M,t.relatedTarget,!0))},O=t=>{var n;null==(n=e.onpointerdown)||n.call(e,t),t.target instanceof HTMLElement&&"false"===t.target.dataset.dismissable||an($,!0)},W=t=>{var n;null==(n=e.onmouseenter)||n.call(e,t),an(x,!0)},P=t=>{var n;null==(n=e.onmouseleave)||n.call(e,t),qn($)||an(x,!1)},j=t=>{var n;null==(n=e.onmousemove)||n.call(e,t),an(x,!0)},T=t=>{var n;null==(n=e.ondragend)||n.call(e,t),an(x,!1)},L=t=>{var n;null==(n=e.onpointerup)||n.call(e,t),an($,!1)};ui.set(new vi);var A=Bi();xo(A,"tabindex",-1);var N=ke(A),z=t=>{var r=Ar();Xr(_e(r),18,()=>qn(b),t=>t,(t,r,o,c)=>{const h=Je(()=>{const[t,e]=r.split("-");return{y:t,x:e}}),g=Je(()=>function(t,e){const n={};return[t,e].forEach((t,e)=>{const r=1===e,o=r?"--mobile-offset":"--offset",i=r?Ai:Li;function l(t){["top","right","bottom","left"].forEach(e=>{n[`${o}-${e}`]="number"==typeof t?`${t}px`:t})}"number"==typeof t||"string"==typeof t?l(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}):l(i)}),n}(s(),a()));var b=Ri();$o(b,(t,n)=>({tabindex:-1,dir:t,class:e.class,"data-sonner-toaster":!0,"data-sonner-theme":qn(k),"data-y-position":qn(h).y,"data-x-position":qn(h).x,style:e.style,onblur:C,onfocus:I,onmouseenter:W,onmousemove:j,onmouseleave:P,ondragend:T,onpointerdown:O,onpointerup:L,...w,[mo]:n}),[y,()=>{var t;return{"--front-toast-height":`${null==(t=fi.heights[0])?void 0:t.height}px`,"--width":"356px","--gap":`${p()}px`,"--offset-top":qn(g)["--offset-top"],"--offset-right":qn(g)["--offset-right"],"--offset-bottom":qn(g)["--offset-bottom"],"--offset-left":qn(g)["--offset-left"],"--mobile-offset-top":qn(g)["--mobile-offset-top"],"--mobile-offset-right":qn(g)["--mobile-offset-right"],"--mobile-offset-bottom":qn(g)["--mobile-offset-bottom"],"--mobile-offset-left":qn(g)["--mobile-offset-left"]}}],void 0,"svelte-nbs0zk"),Xr(b,23,()=>fi.toasts.filter(t=>!t.position&&0===qn(o)||t.position===r),t=>t.id,(t,o,s,a)=>{{const a=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.successIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{Nr(t,Oi())};Hr(r,t=>{null!==e.successIcon&&t(o)},!0),Nr(t,n)};Hr(r,t=>{e.successIcon?t(o):t(i,!1)}),Nr(t,n)},c=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.errorIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{Nr(t,Wi())};Hr(r,t=>{null!==e.errorIcon&&t(o)},!0),Nr(t,n)};Hr(r,t=>{e.errorIcon?t(o):t(i,!1)}),Nr(t,n)},h=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.warningIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{Nr(t,Pi())};Hr(r,t=>{null!==e.warningIcon&&t(o)},!0),Nr(t,n)};Hr(r,t=>{e.warningIcon?t(o):t(i,!1)}),Nr(t,n)},p=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.infoIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{Nr(t,ji())};Hr(r,t=>{null!==e.infoIcon&&t(o)},!0),Nr(t,n)};Hr(r,t=>{e.infoIcon?t(o):t(i,!1)}),Nr(t,n)},g=t=>{var n=Ar(),r=_e(n),o=t=>{var n=Ar();no(_e(n),()=>e.closeIcon??It),Nr(t,n)},i=t=>{var n=Ar(),r=_e(n),o=t=>{Nr(t,Ti())};Hr(r,t=>{null!==e.closeIcon&&t(o)},!0),Nr(t,n)};Hr(r,t=>{e.closeIcon?t(o):t(i,!1)}),Nr(t,n)};let w=Je(()=>{var t;return(null==(t=v())?void 0:t.duration)??d()}),y=Je(()=>{var t;return(null==(t=v())?void 0:t.class)??""}),b=Je(()=>{var t;return(null==(t=v())?void 0:t.descriptionClass)||""}),k=Je(()=>{var t;return(null==(t=v())?void 0:t.style)??""}),_=Je(()=>v().classes||{}),M=Je(()=>v().unstyled??!1),S=Je(()=>{var t;return(null==(t=v())?void 0:t.cancelButtonStyle)??""}),E=Je(()=>{var t;return(null==(t=v())?void 0:t.actionButtonStyle)??""}),C=Je(()=>{var t;return(null==(t=v())?void 0:t.closeButtonAriaLabel)??m()});Ii(t,{get index(){return qn(s)},get toast(){return qn(o)},get defaultRichColors(){return u()},get duration(){return qn(w)},get class(){return qn(y)},get descriptionClass(){return qn(b)},get invert(){return n()},get visibleToasts(){return f()},get closeButton(){return l()},get interacting(){return qn($)},get position(){return r},get style(){return qn(k)},get classes(){return qn(_)},get unstyled(){return qn(M)},get cancelButtonStyle(){return qn(S)},get actionButtonStyle(){return qn(E)},get closeButtonAriaLabel(){return qn(C)},get expandByDefault(){return i()},get expanded(){return qn(x)},get loadingIcon(){return e.loadingIcon},successIcon:a,errorIcon:c,warningIcon:h,infoIcon:p,closeIcon:g,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,infoIcon:!0,closeIcon:!0}})}}),Ro(b,t=>an(_,t),()=>qn(_)),rr(()=>b.dir=b.dir),Nr(t,b)}),Nr(t,r)};Hr(N,t=>{fi.toasts.length>0&&t(z)}),rr(()=>xo(A,"aria-label",`${g()??""} ${qn(E)??""}`)),Nr(t,A),le()}(t,{})};Hr(u,t=>{(n()||Yo(Qs,"$sidebarEnabled",o))&&t(d)}),Nr(t,l),le(),i()}var os=jr('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><!></div>'),is=jr('<div class="scroll-container grid grid-cols-2 gap-6 svelte-129hoe0"><div class="flex flex-col gap-6 svelte-129hoe0"><div class="animate-scroll-column flex flex-col gap-6 svelte-129hoe0"></div></div> <div class="mt-15 flex flex-col gap-6 svelte-129hoe0"><div class="animate-scroll-column-offset flex flex-col gap-6 svelte-129hoe0"></div></div></div>'),ls=jr('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><p class="text-muted-foreground svelte-129hoe0">Error – See console</p></div>'),ss=jr("View all games <!>",1),as=jr("Random game <!>",1),cs=(t,e)=>e(t.clientY),us=(t,e)=>e(t.touches[0].clientY),ds=jr('<img alt="icon" class="pointer-events-none aspect-square w-8 svelte-129hoe0"/>'),fs=jr('<div role="button" tabindex="0"><!> <!></div>'),vs=jr('<div><img alt="logo" class="pointer-events-none mx-auto mt-4 -mb-1 w-50 select-none svelte-129hoe0"/> <div class="grow-1 overflow-hidden mask-y-from-90% mask-y-to-100% p-6 py-12 transition-opacity not-hover:opacity-75 svelte-129hoe0"><!></div> <div class="flex w-full flex-col items-center gap-4 px-4 svelte-129hoe0"><!> <!></div> <div class="w-full svelte-129hoe0"><div class="mt-auto border-y p-6 py-4 svelte-129hoe0"><!></div> <div class="flex justify-end p-0 svelte-129hoe0"><!></div></div></div> <!>',1);function hs(t,e){ie(e,!0);const n=()=>Yo(ta,"$sidebarCollapsed",i),r=()=>Yo(ea,"$projectUrl",i),o=()=>Yo(Xs,"$discoveryOpen",i),[i,l]=Ho();let s=ln(!1),a=ln(void 0),c=ln(0),u=ln(null),d=ln(ve([])),f=Je(()=>{var t;return(null==(t=qn(d))?void 0:t.filter((t,e)=>e%2==0))||[]}),v=Je(()=>{var t;return(null==(t=qn(d))?void 0:t.filter((t,e)=>e%2==1))||[]});function h(){sessionStorage.setItem("playlightSidebarState",JSON.stringify({collapsed:n(),buttonY:qn(m)}))}function p(){try{return JSON.parse(sessionStorage.getItem("playlightSidebarState")||"{}")}catch{}}tr(()=>{var t;const e=document.documentElement.clientWidth<=768;Go(ta,e||Boolean(null==(t=p())?void 0:t.collapsed))}),Qo(async()=>{var t;return an(m,(null==(t=p())?void 0:t.buttonY)??qn(m),!0),an(s,!0),an(d,await Vl(14,!0),!0),an(a,await Di.getCurrentGameInfo(),!0),an(s,!1),Sr(window,"touchmove",k,{passive:!1})});let g,m=ln(100),w=ln(!1),y=ln(0),b=ln(0),x=ln(null);function $(t){an(w,!0),an(y,t,!0),an(b,qn(m),!0)}function k(t){qn(w)&&(t.preventDefault(),_(t.touches[0].clientY))}function _(t){var e;if(!qn(w))return;const n=t-qn(y),r=qn(b)+n,o=null==(e=qn(x))?void 0:e.offsetHeight;an(m,Math.max(0,Math.min(window.innerHeight-o,r)),!0),cancelAnimationFrame(g),g=requestAnimationFrame(h)}function M(t){if(t.preventDefault(),an(c,qn(c)-t.deltaY),qn(u)){const t=qn(u).offsetHeight/3;an(c,(qn(c)%t+t)%t)}}var S=vs();Er("mousemove",ge,function(t){qn(w)&&_(t.clientY)}),Er("mouseup",ge,()=>an(w,!1)),Er("touchend",ge,()=>an(w,!1)),Er("resize",ge,()=>{document.documentElement.clientWidth<=768&&Go(ta,!0)});var E=_e(S),C=ke(E),I=Me(C,2),O=ke(I),W=t=>{var e=os();nl(ke(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),Nr(t,e)},P=t=>{var e=Ar(),n=_e(e),r=t=>{var e=is(),n=ke(e),r=ke(n);let o;Xr(r,21,()=>[...qn(f),...qn(f),...qn(f)],Kr,(t,e)=>{fl(t,{get game(){return qn(e)},small:!0})}),Ro(r,t=>an(u,t),()=>qn(u));var i=ke(Me(n,2));let l;Xr(i,21,()=>[...qn(v),...qn(v),...qn(v)],Kr,(t,e)=>{fl(t,{get game(){return qn(e)},small:!0})}),rr((t,e)=>{o=vo(r,"",o,t),l=vo(i,"",l,e)},[()=>({transform:`translateY(calc(-33.333% + ${qn(c)??""}px))`}),()=>({transform:`translateY(calc(-33.333% + ${qn(c)??""}px))`})]),Er("wheel",e,M),Nr(t,e)},o=t=>{Nr(t,ls())};Hr(n,t=>{var e;(null==(e=qn(d))?void 0:e.length)?t(r):t(o,!1)},!0),Nr(t,e)};Hr(O,t=>{qn(s)?t(W):t(P,!1)});var j=Me(I,2),T=ke(j);Ul(T,{class:"w-full",onclick:()=>Go(Xs,!0),get disabled(){return o()},children:(t,e)=>{var n=ss();!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),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"}]];
|
|
162
162
|
/**
|
|
163
163
|
* @license lucide-svelte v0.476.0 - ISC
|
|
164
164
|
*
|
|
@@ -178,7 +178,7 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m
|
|
|
178
178
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
179
179
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
180
180
|
*
|
|
181
|
-
*/
|
|
181
|
+
*/el(t,Zo({name:"gamepad-2"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(Me(_e(n)),{style:"margin-top: -1px;"}),Nr(t,n)},$$slots:{default:!0}}),Ul(Me(T,2),{class:"w-full",variant:"secondary",onclick:()=>{var t,e;const n=Math.floor(Math.random()*(null==(t=qn(d))?void 0:t.length)),r=null==(e=qn(d))?void 0:e[n];rl(null==r?void 0:r.domain,null==r?void 0:r.id)},children:(t,e)=>{var n=as();!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["rect",{width:"12",height:"12",x:"2",y:"10",rx:"2",ry:"2"}],["path",{d:"m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6"}],["path",{d:"M6 18h.01"}],["path",{d:"M10 14h.01"}],["path",{d:"M15 6h.01"}],["path",{d:"M18 9h.01"}]];
|
|
182
182
|
/**
|
|
183
183
|
* @license lucide-svelte v0.476.0 - ISC
|
|
184
184
|
*
|
|
@@ -198,7 +198,7 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m
|
|
|
198
198
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
199
199
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
200
200
|
*
|
|
201
|
-
*/
|
|
201
|
+
*/el(t,Zo({name:"dices"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(Me(_e(n)),{style:"margin-top: -2px;"}),Nr(t,n)},$$slots:{default:!0}});var L=ke(Me(j,2));Wl(ke(L),{get currentGame(){return qn(a)}}),Ul(ke(Me(L,2)),{variant:"secondary",class:"text-muted-foreground border-l outline-none!",onclick:()=>{Go(ta,!0),h()},children:(t,e)=>{!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"m6 17 5-5-5-5"}],["path",{d:"m13 17 5-5-5-5"}]];
|
|
202
202
|
/**
|
|
203
203
|
* @license lucide-svelte v0.476.0 - ISC
|
|
204
204
|
*
|
|
@@ -218,7 +218,7 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m
|
|
|
218
218
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
219
219
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
220
220
|
*
|
|
221
|
-
*/
|
|
221
|
+
*/el(t,Zo({name:"chevrons-right"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(t,{})},$$slots:{default:!0}});var A=Me(E,2),N=t=>{var e=fs();let n;e.__mousedown=[cs,$],e.__touchstart=[us,$];var o=ke(e);!function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),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"}]];
|
|
222
222
|
/**
|
|
223
223
|
* @license lucide-svelte v0.476.0 - ISC
|
|
224
224
|
*
|
|
@@ -238,7 +238,7 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m
|
|
|
238
238
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
239
239
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
240
240
|
*
|
|
241
|
-
*/tl(t,Xo({name:"grip-vertical"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Lr();to(ke(r),e,"default",{}),Ar(t,r)},$$slots:{default:!0}}))}(o,{class:"text-muted-foreground aspect-square"}),Hl(_e(o,2),{variant:"ghost",onclick:()=>{document.documentElement.clientWidth>768?(Yo(Js,!1),h()):Yo(Ks,!0)},children:(t,e)=>{var n=us();nr(()=>bo(n,"src",r()+"/static/images/icon-white-small.png")),Ar(t,n)},$$slots:{default:!0}}),zo(e,t=>sn(x,t),()=>Rn(x)),nr(t=>{co(e,1,"bg-background/85 fixed right-0 flex items-center gap-2 border p-2 shadow-xl backdrop-blur-xl "+(Rn(w)?"cursor-grabbing":"cursor-grab"),"svelte-129hoe0"),n=fo(e,"",n,t)},[()=>({top:Rn(m)+"px"})]),Wo(3,e,()=>Vi),Ar(t,e)};Gr(A,t=>{n()&&!o()&&t(N)}),nr(()=>{co(E,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-8 text-white transition-[width] duration-150 ease-out`,"svelte-129hoe0"),bo(C,"src",r()+"/static/images/logo-white-small.png")}),Ar(t,S),ie(),l()}Er(["mousedown","touchstart"]);let hs=null,ps=null,gs=!1,ms=null,ws=new Map,ys=null;function bs(t,e,n,r,o){const i=t.getAttribute("data-playlight-original-href");let l=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;l=xs(l,n,r,o),t.textContent=l,t.setAttribute("data-playlight-modified","true")}function xs(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 l=t.substring(0,i),s=l.lastIndexOf("{"),a=l.lastIndexOf("}");if(s>a){const t=l.substring(a+1,s).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 $s,ks=null,_s=null,Ms=null,Ss=null,Es=null,Cs=null,Os=null,Is=null,Ws=null,Ps=null,js=new Map,Ts=null,Ls=null,As=null,Ns=!1,zs=!1,Bs=[],Ds=null,Rs=null,qs=null;function Fs(){try{const t=document.createElement("div");t.id="playlight-sdk-container",t.className="playlight-sdk playlight-sdk-container",document.body.appendChild(t);const e=Dr(ns,{target:t}),n=new MutationObserver(()=>{document.body.contains(t)||(clearTimeout(qs),qs=setTimeout(()=>{document.body.contains(t)||(console.warn("Re-mounting Playlight's main container as it was removed!"),n.disconnect(),Fr(e),Fs())},0))});n.observe(document.body,{childList:!0})}catch(t){console.error("Error during Playlight mount:",t)}}function Ys(){var t,e,n,r;if(!Ns)try{const o=document.body,i=document.documentElement,l=["DIV","MAIN","ARTICLE","SECTION","HEADER","FOOTER","NAV","ASIDE","FORM"],s=Array.from(o.children).filter(t=>{var e;return l.includes(t.tagName)&&!(null==(e=t.id)?void 0:e.includes("playlight"))&&t.children.length>0}),a=()=>{const t=document.createElement("div");return t.id="playlight-sdk-inner-wrapper",Array.from(o.children).filter(t=>{var e;return!["SCRIPT","STYLE"].includes(t.tagName)&&!(null==(e=t.id)?void 0:e.includes("playlight"))}).forEach(e=>t.appendChild(e)),o.appendChild(t),zs=!0,t};if(!1!==(null==(e=null==(t=ni(Hs))?void 0:t.sidebar)?void 0:e.hasFrameworkRoot)&&s.length>0)if(1===s.length)Ls=s[0],zs=!1;else if(!0===(null==(r=null==(n=ni(Hs))?void 0:n.sidebar)?void 0:r.hasFrameworkRoot)){const t=s.map(t=>t.querySelectorAll("*").length),e=Math.max(...t);Ls=s[t.indexOf(e)],zs=!1}Ls||(Ls=a()),i.classList.add("playlight-sdk-html"),o.classList.add("playlight-sdk-body"),Ls.classList.add("playlight-sdk-inner-wrapper"),function(t,e){try{ks=Object.getOwnPropertyDescriptor(window,"innerWidth"),Object.defineProperty(window,"innerWidth",{get:()=>t.clientWidth,configurable:!0}),Ms=Object.getOwnPropertyDescriptor(window,"scrollY")||Object.getOwnPropertyDescriptor(Window.prototype,"scrollY"),Object.defineProperty(window,"scrollY",{get:()=>e.scrollTop,configurable:!0}),Ss=Object.getOwnPropertyDescriptor(window,"pageYOffset")||Object.getOwnPropertyDescriptor(Window.prototype,"pageYOffset"),Object.defineProperty(window,"pageYOffset",{get:()=>e.scrollTop,configurable:!0}),Es=Object.getOwnPropertyDescriptor(window,"scrollX")||Object.getOwnPropertyDescriptor(Window.prototype,"scrollX"),Object.defineProperty(window,"scrollX",{get:()=>e.scrollLeft,configurable:!0}),Cs=Object.getOwnPropertyDescriptor(window,"pageXOffset")||Object.getOwnPropertyDescriptor(Window.prototype,"pageXOffset"),Object.defineProperty(window,"pageXOffset",{get:()=>e.scrollLeft,configurable:!0}),Os=window.scrollTo,Is=window.scroll,Ws=window.scrollBy,window.scrollTo=(...t)=>e.scrollTo(...t),window.scroll=(...t)=>e.scrollTo(...t),window.scrollBy=(...t)=>e.scrollBy(...t),Ps=()=>{window.dispatchEvent(new Event("scroll"))},e.addEventListener("scroll",Ps),_s=window.matchMedia,window.matchMedia=function(e){const n=()=>{const n=_s||window.matchMedia,r=t.clientWidth,o=document.documentElement.clientWidth-r,i=xs(e,r,window.innerHeight,o);return n.call(window,i)},r=n();js.has(e)||js.set(e,{listeners:new Set,lastMatches:r.matches});const o=js.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}})},$s||($s=window.addEventListener("resize",()=>{for(const[t,{listeners:e,lastMatches:n}]of js.entries()){const r=window.matchMedia(t);if(r.matches!==n){js.get(t).lastMatches=r.matches;const n=new MediaQueryListEvent("change",{matches:r.matches,media:r.media});e.forEach(t=>t(n))}}}))}catch(n){console.warn("Could not polyfill window properties:",n)}}(o,Ls),function(t){const e=()=>{const e=t.clientWidth,n=document.documentElement.clientWidth-e;Array.from(document.styleSheets).forEach(t=>function(t,e,n,r){var o;const i=t.ownerNode;if(!(!i||t.href&&/playlight/i.test(t.href)))try{if(ws.has(i))bs(i,ws.get(i).originalCSS,e,n,r);else{if(!(null==(o=t.cssRules)?void 0:o.length))return;const l=Array.from(t.cssRules).map(t=>t.cssText).join("\n");if("LINK"===i.tagName){const t=document.createElement("style");t.setAttribute("data-playlight-original-href",i.href),ws.set(t,{originalCSS:l,originalElement:i}),i.replaceWith(t),bs(t,l,e,n,r)}else ws.set(i,{originalCSS:l,originalElement:null}),bs(i,l,e,n,r)}}catch(l){console.warn(`Playlight cannot process stylesheet ${t.href||"inline"} due to CORS restrictions.`)}}(t,e,window.innerHeight,n))},n=()=>{gs||(gs=!0,requestAnimationFrame(()=>{gs=!1,e()}))};hs=new ResizeObserver(()=>{const e=document.documentElement.clientWidth-t.clientWidth;ys!==e&&(ys=e,window.dispatchEvent(new Event("resize")),clearTimeout(ms),ms=setTimeout(n,50))}),hs.observe(t),ps=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}))}}}),ps.observe(document.head,{childList:!0,attributes:!0,attributeFilter:["rel"]}),e()}(o),Bs=Array.from(o.classList).filter(t=>!t.startsWith("playlight")),Bs.forEach(t=>{Ls.classList.add(t),o.classList.remove(t)});const c=window.getComputedStyle(Ls);"contents"===c.display&&Ls.style.setProperty("display","block","important"),"visible"===c.overflow&&Ls.style.setProperty("overflow","auto","important"),Ts=document.createElement("div"),Ts.className="playlight-sdk playlight-sdk-container-sidebar",i.appendChild(Ts),As=Dr(vs,{target:Ts}),Ds=new MutationObserver(()=>{const t=!document.documentElement.classList.contains("playlight-sdk-html"),e=!document.body.classList.contains("playlight-sdk-body"),n=Ls&&!document.body.contains(Ls),r=Ts&&!document.documentElement.contains(Ts);(t||e||n||r)&&(clearTimeout(Rs),Rs=setTimeout(()=>{console.warn("Re-mounting Playlight's sidebar container as it was removed!"),Gs(),Ys()},0))}),Ds.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),Ds.observe(document.body,{childList:!0}),Ns=!0}catch(o){console.error("Error during sidebar setup:",o)}}function Gs(){if(Ns)try{const t=document.body,e=document.documentElement;null==Ds||Ds.disconnect(),clearTimeout(Rs),As&&Fr(As),(null==Ts?void 0:Ts.parentNode)&&e.removeChild(Ts),zs?(Ls.parentNode===t&&Array.from(Ls.children).forEach(e=>{e.parentNode===Ls&&t.insertBefore(e,Ls)}),Ls.remove()):Ls.classList.remove("playlight-sdk-inner-wrapper"),e.classList.remove("playlight-sdk-html"),t.classList.remove("playlight-sdk-body"),Bs.forEach(e=>{t.classList.add(e),Ls.classList.remove(e)}),function(t){try{Object.defineProperty(window,"innerWidth",ks),Object.defineProperty(window,"scrollY",Ms),Object.defineProperty(window,"pageYOffset",Ss),Object.defineProperty(window,"scrollX",Es),Object.defineProperty(window,"pageXOffset",Cs),window.scrollTo=Os,window.scroll=Is,window.scrollBy=Ws,t.removeEventListener("scroll",Ps),window.matchMedia=_s,ks=null,Ms=null,Ss=null,Es=null,Cs=null,Os=null,Is=null,Ws=null,Ps=null,_s=null}catch(e){console.warn("Could not restore window polyfills:",e)}}(Ls),function(){null==hs||hs.disconnect(),window.dispatchEvent(new Event("resize")),null==ps||ps.disconnect(),clearTimeout(ms),hs=ps=ms=ys=null;for(const[t,{originalCSS:e,originalElement:n}]of ws.entries())n?t.replaceWith(n):(t.textContent=e,t.removeAttribute("data-playlight-modified"));ws.clear()}(),Ds=null,Rs=null,Ts=null,As=null,Ls=null,Bs=[],zs=!1,Ns=!1}catch(t){console.error("Error during sidebar removal:",t)}}const Hs=ei(null),Vs=ei(!1),Ks=ei(!1),Us=ei(!1),Xs=ei(0),Zs=ei(!1),Js=ei(!1),Qs=ei("https://sdk.playlight.dev");let ta;Ks.subscribe(t=>{try{t?(Di.trackOpen(),qi("discoveryOpen"),ta=document.body.style.overflow,document.body.style.setProperty("overflow","hidden","important")):(qi("discoveryClose"),document.body.style.overflow=ta)}catch(e){console.error("Error in discoveryOpen store subscription:",e)}}),Hs.subscribe(t=>{var e;(null==(e=null==t?void 0:t.sidebar)?void 0:e.forceVisible)||ni(Vs)?Zs.set(!0):Zs.set(!1)}),Vs.subscribe(t=>{t&&Zs.set(!0)}),Zs.subscribe(t=>{t?(Ys(),qi("sidebarEnable")):(Gs(),qi("sidebarDisable"))});var ea=Pr('<div class="flex h-62 w-full items-center justify-center"><!></div>'),na=Pr('<div class="snap-center px-2"><!></div>'),ra=Pr('<!> <div class="bg-background/85 my-auto mr-3 mb-30 ml-2 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),oa=(t,e,n)=>Rn(e).scrollBy({left:2*-Rn(n),behavior:"smooth"}),ia=Pr('<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>'),la=(t,e,n)=>Rn(e).scrollBy({left:2*Rn(n),behavior:"smooth"}),sa=Pr('<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>'),aa=Pr("<!> <!>",1),ca=Pr('<div class="playlight-sdk playlight-sdk-widget"><div class="relative flex h-full w-full snap-x gap-2 overflow-x-auto"><!></div> <!></div>');function ua(t,e){oe(e,!0);const[n,r]=Go();let o=on(!0),i=on(fe([])),l=on(void 0),s=on(0),a=on(!1),c=on(!0),u=on("");function d(t,e){const n=Math.min(t/50,1),r=Math.min(e/50,1);sn(u,`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)`)}Jo(async()=>{sn(o,!0),sn(i,await Vl(10,!0),!0),sn(o,!1),requestAnimationFrame(()=>{if(Rn(l)){const t=Rn(l).scrollWidth-Rn(l).clientWidth;d(Rn(l).scrollLeft,t-Rn(l).scrollLeft)}})});var f=ca(),v=$e(f),h=$e(v),p=t=>{var e=ea();el($e(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),Ar(t,e)},g=t=>{var e=ra(),n=ke(e);Ur(n,17,()=>Rn(i),Kr,(t,e)=>{var n,r,o,i,l=na();dl($e(l),{get game(){return Rn(e)},compact:!0}),n=l,r="clientWidth",o=t=>sn(s,t),i=Ao.observe(n,()=>o(n[r])),tr(()=>(Fn(()=>o(n[r])),i)),Ar(t,l)});var r=_e(n,2);Hl(_e($e(r),2),{onclick:()=>Yo(Ks,!0),children:(t,e)=>{Ar(t,Tr("See all"))},$$slots:{default:!0}}),Ar(t,e)};Gr(h,t=>{Rn(o)?t(p):t(g,!1)}),zo(v,t=>sn(l,t),()=>Rn(l));var m=_e(v,2),w=t=>{var e=aa(),n=ke(e),r=t=>{var e=ia();e.__click=[oa,l,s],function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"m15 18-6-6 6-6"}]];
|
|
241
|
+
*/el(t,Zo({name:"grip-vertical"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(o,{class:"text-muted-foreground aspect-square"}),Ul(Me(o,2),{variant:"ghost",onclick:()=>{document.documentElement.clientWidth>768?(Go(ta,!1),h()):Go(Xs,!0)},children:(t,e)=>{var n=ds();rr(()=>xo(n,"src",r()+"/assets/images/icon-white-small.png")),Nr(t,n)},$$slots:{default:!0}}),Ro(e,t=>an(x,t),()=>qn(x)),rr(t=>{uo(e,1,"bg-background/85 fixed right-0 flex items-center gap-2 border p-2 shadow-xl backdrop-blur-xl "+(qn(w)?"cursor-grabbing":"cursor-grab"),"svelte-129hoe0"),n=vo(e,"",n,t)},[()=>({top:qn(m)+"px"})]),Po(3,e,()=>Vi),Nr(t,e)};Hr(A,t=>{n()&&!o()&&t(N)}),rr(()=>{uo(E,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-8 text-white transition-[width] duration-150 ease-out`,"svelte-129hoe0"),xo(C,"src",r()+"/assets/images/logo-white-small.png")}),Nr(t,S),le(),l()}Cr(["mousedown","touchstart"]);let ps=null,gs=null,ms=!1,ws=null,ys=new Map,bs=null;function xs(t,e,n,r,o){const i=t.getAttribute("data-playlight-original-href");let l=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;l=$s(l,n,r,o),t.textContent=l,t.setAttribute("data-playlight-modified","true")}function $s(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 l=t.substring(0,i),s=l.lastIndexOf("{"),a=l.lastIndexOf("}");if(s>a){const t=l.substring(a+1,s).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 ks,_s=null,Ms=null,Ss=null,Es=null,Cs=null,Is=null,Os=null,Ws=null,Ps=null,js=null,Ts=new Map,Ls=null,As=null,Ns=null,zs=!1,Rs=!1,Bs=[],Ds=null,qs=null,Fs=null;function Ys(){try{const t=document.createElement("div");t.id="playlight-sdk-container",t.className="playlight-sdk playlight-sdk-container",document.body.appendChild(t);const e=Dr(rs,{target:t}),n=new MutationObserver(()=>{document.body.contains(t)||(clearTimeout(Fs),Fs=setTimeout(()=>{document.body.contains(t)||(console.warn("Re-mounting Playlight's main container as it was removed!"),n.disconnect(),Yr(e),Ys())},0))});n.observe(document.body,{childList:!0})}catch(t){console.error("Error during Playlight mount:",t)}}function Gs(){var t,e,n,r;if(!zs)try{const o=document.body,i=document.documentElement,l=["DIV","MAIN","ARTICLE","SECTION","HEADER","FOOTER","NAV","ASIDE","FORM"],s=Array.from(o.children).filter(t=>{var e;return l.includes(t.tagName)&&!(null==(e=t.id)?void 0:e.includes("playlight"))&&t.children.length>0}),a=()=>{const t=document.createElement("div");return t.id="playlight-sdk-inner-wrapper",Array.from(o.children).filter(t=>{var e;return!["SCRIPT","STYLE"].includes(t.tagName)&&!(null==(e=t.id)?void 0:e.includes("playlight"))}).forEach(e=>t.appendChild(e)),o.appendChild(t),Rs=!0,t};if(!1!==(null==(e=null==(t=ri(Vs))?void 0:t.sidebar)?void 0:e.hasFrameworkRoot)&&s.length>0)if(1===s.length)As=s[0],Rs=!1;else if(!0===(null==(r=null==(n=ri(Vs))?void 0:n.sidebar)?void 0:r.hasFrameworkRoot)){const t=s.map(t=>t.querySelectorAll("*").length),e=Math.max(...t);As=s[t.indexOf(e)],Rs=!1}As||(As=a()),i.classList.add("playlight-sdk-html"),o.classList.add("playlight-sdk-body"),As.classList.add("playlight-sdk-inner-wrapper"),function(t,e){try{_s=Object.getOwnPropertyDescriptor(window,"innerWidth"),Object.defineProperty(window,"innerWidth",{get:()=>t.clientWidth,configurable:!0}),Ss=Object.getOwnPropertyDescriptor(window,"scrollY")||Object.getOwnPropertyDescriptor(Window.prototype,"scrollY"),Object.defineProperty(window,"scrollY",{get:()=>e.scrollTop,configurable:!0}),Es=Object.getOwnPropertyDescriptor(window,"pageYOffset")||Object.getOwnPropertyDescriptor(Window.prototype,"pageYOffset"),Object.defineProperty(window,"pageYOffset",{get:()=>e.scrollTop,configurable:!0}),Cs=Object.getOwnPropertyDescriptor(window,"scrollX")||Object.getOwnPropertyDescriptor(Window.prototype,"scrollX"),Object.defineProperty(window,"scrollX",{get:()=>e.scrollLeft,configurable:!0}),Is=Object.getOwnPropertyDescriptor(window,"pageXOffset")||Object.getOwnPropertyDescriptor(Window.prototype,"pageXOffset"),Object.defineProperty(window,"pageXOffset",{get:()=>e.scrollLeft,configurable:!0}),Os=window.scrollTo,Ws=window.scroll,Ps=window.scrollBy,window.scrollTo=(...t)=>e.scrollTo(...t),window.scroll=(...t)=>e.scrollTo(...t),window.scrollBy=(...t)=>e.scrollBy(...t),js=()=>{window.dispatchEvent(new Event("scroll"))},e.addEventListener("scroll",js),Ms=window.matchMedia,window.matchMedia=function(e){const n=()=>{const n=Ms||window.matchMedia,r=t.clientWidth,o=document.documentElement.clientWidth-r,i=$s(e,r,window.innerHeight,o);return n.call(window,i)},r=n();Ts.has(e)||Ts.set(e,{listeners:new Set,lastMatches:r.matches});const o=Ts.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}})},ks||(ks=window.addEventListener("resize",()=>{for(const[t,{listeners:e,lastMatches:n}]of Ts.entries()){const r=window.matchMedia(t);if(r.matches!==n){Ts.get(t).lastMatches=r.matches;const n=new MediaQueryListEvent("change",{matches:r.matches,media:r.media});e.forEach(t=>t(n))}}}))}catch(n){console.warn("Could not polyfill window properties:",n)}}(o,As),function(t){const e=()=>{const e=t.clientWidth,n=document.documentElement.clientWidth-e;Array.from(document.styleSheets).forEach(t=>function(t,e,n,r){var o;const i=t.ownerNode;if(!(!i||t.href&&/playlight/i.test(t.href)))try{if(ys.has(i))xs(i,ys.get(i).originalCSS,e,n,r);else{if(!(null==(o=t.cssRules)?void 0:o.length))return;const l=Array.from(t.cssRules).map(t=>t.cssText).join("\n");if("LINK"===i.tagName){const t=document.createElement("style");t.setAttribute("data-playlight-original-href",i.href),ys.set(t,{originalCSS:l,originalElement:i}),i.replaceWith(t),xs(t,l,e,n,r)}else ys.set(i,{originalCSS:l,originalElement:null}),xs(i,l,e,n,r)}}catch(l){console.warn(`Playlight cannot process stylesheet ${t.href||"inline"} due to CORS restrictions.`)}}(t,e,window.innerHeight,n))},n=()=>{ms||(ms=!0,requestAnimationFrame(()=>{ms=!1,e()}))};ps=new ResizeObserver(()=>{const e=document.documentElement.clientWidth-t.clientWidth;bs!==e&&(bs=e,window.dispatchEvent(new Event("resize")),clearTimeout(ws),ws=setTimeout(n,50))}),ps.observe(t),gs=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}))}}}),gs.observe(document.head,{childList:!0,attributes:!0,attributeFilter:["rel"]}),e()}(o),Bs=Array.from(o.classList).filter(t=>!t.startsWith("playlight")),Bs.forEach(t=>{As.classList.add(t),o.classList.remove(t)});const c=window.getComputedStyle(As);"contents"===c.display&&As.style.setProperty("display","block","important"),"visible"===c.overflow&&As.style.setProperty("overflow","auto","important"),Ls=document.createElement("div"),Ls.className="playlight-sdk playlight-sdk-container-sidebar",i.appendChild(Ls),Ns=Dr(hs,{target:Ls}),Ds=new MutationObserver(()=>{const t=!document.documentElement.classList.contains("playlight-sdk-html"),e=!document.body.classList.contains("playlight-sdk-body"),n=As&&!document.body.contains(As),r=Ls&&!document.documentElement.contains(Ls);(t||e||n||r)&&(clearTimeout(qs),qs=setTimeout(()=>{console.warn("Re-mounting Playlight's sidebar container as it was removed!"),Hs(),Gs()},0))}),Ds.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),Ds.observe(document.body,{childList:!0}),zs=!0}catch(o){console.error("Error during sidebar setup:",o)}}function Hs(){if(zs)try{const t=document.body,e=document.documentElement;null==Ds||Ds.disconnect(),clearTimeout(qs),Ns&&Yr(Ns),(null==Ls?void 0:Ls.parentNode)&&e.removeChild(Ls),Rs?(As.parentNode===t&&Array.from(As.children).forEach(e=>{e.parentNode===As&&t.insertBefore(e,As)}),As.remove()):As.classList.remove("playlight-sdk-inner-wrapper"),e.classList.remove("playlight-sdk-html"),t.classList.remove("playlight-sdk-body"),Bs.forEach(e=>{t.classList.add(e),As.classList.remove(e)}),function(t){try{Object.defineProperty(window,"innerWidth",_s),Object.defineProperty(window,"scrollY",Ss),Object.defineProperty(window,"pageYOffset",Es),Object.defineProperty(window,"scrollX",Cs),Object.defineProperty(window,"pageXOffset",Is),window.scrollTo=Os,window.scroll=Ws,window.scrollBy=Ps,t.removeEventListener("scroll",js),window.matchMedia=Ms,_s=null,Ss=null,Es=null,Cs=null,Is=null,Os=null,Ws=null,Ps=null,js=null,Ms=null}catch(e){console.warn("Could not restore window polyfills:",e)}}(As),function(){null==ps||ps.disconnect(),window.dispatchEvent(new Event("resize")),null==gs||gs.disconnect(),clearTimeout(ws),ps=gs=ws=bs=null;for(const[t,{originalCSS:e,originalElement:n}]of ys.entries())n?t.replaceWith(n):(t.textContent=e,t.removeAttribute("data-playlight-modified"));ys.clear()}(),Ds=null,qs=null,Ls=null,Ns=null,As=null,Bs=[],Rs=!1,zs=!1}catch(t){console.error("Error during sidebar removal:",t)}}const Us="sdk.playlight.dev",Vs=ni(null),Ks=ni(!1),Xs=ni(!1),Zs=ni(!1),Js=ni(0),Qs=ni(!1),ta=ni(!1),ea=ni(function(){const t=vt&&"SCRIPT"===vt.tagName.toUpperCase()&&vt.src||new URL("playlight-sdk.iife.js",document.baseURI).href;if(t.includes(Us)||t.startsWith("file://"))return"https://"+Us;const e=new URL(t);return e.origin+e.pathname.substring(0,e.pathname.lastIndexOf("/"))}());let na;Xs.subscribe(t=>{try{t?(Di.trackOpen(),Fi("discoveryOpen"),na=document.body.style.overflow,document.body.style.setProperty("overflow","hidden","important")):(Fi("discoveryClose"),document.body.style.overflow=na)}catch(e){console.error("Error in discoveryOpen store subscription:",e)}}),Vs.subscribe(t=>{var e;(null==(e=null==t?void 0:t.sidebar)?void 0:e.forceVisible)||ri(Ks)?Qs.set(!0):Qs.set(!1)}),Ks.subscribe(t=>{t&&Qs.set(!0)}),Qs.subscribe(t=>{t?(Gs(),Fi("sidebarEnable")):(Hs(),Fi("sidebarDisable"))});var ra=jr('<div class="flex h-62 w-full items-center justify-center"><!></div>'),oa=jr('<div class="snap-center px-2"><!></div>'),ia=jr('<!> <div class="bg-background/85 my-auto mr-3 mb-30 ml-2 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),la=(t,e,n)=>qn(e).scrollBy({left:2*-qn(n),behavior:"smooth"}),sa=jr('<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>'),aa=(t,e,n)=>qn(e).scrollBy({left:2*qn(n),behavior:"smooth"}),ca=jr('<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>'),ua=jr("<!> <!>",1),da=jr('<div class="playlight-sdk playlight-sdk-widget"><div class="relative flex h-full w-full snap-x gap-2 overflow-x-auto"><!></div> <!></div>');function fa(t,e){ie(e,!0);const[n,r]=Ho();let o=ln(!0),i=ln(ve([])),l=ln(void 0),s=ln(0),a=ln(!1),c=ln(!0),u=ln("");function d(t,e){const n=Math.min(t/50,1),r=Math.min(e/50,1);an(u,`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)`)}Qo(async()=>{an(o,!0),an(i,await Vl(10,!0),!0),an(o,!1),requestAnimationFrame(()=>{if(qn(l)){const t=qn(l).scrollWidth-qn(l).clientWidth;d(qn(l).scrollLeft,t-qn(l).scrollLeft)}})});var f=da(),v=ke(f),h=ke(v),p=t=>{var e=ra();nl(ke(e),{class:"animate-spin opacity-75",size:30,strokeWidth:2.5}),Nr(t,e)},g=t=>{var e=ia(),n=_e(e);Xr(n,17,()=>qn(i),Kr,(t,e)=>{var n,r,o,i,l=oa();fl(ke(l),{get game(){return qn(e)},compact:!0}),n=l,r="clientWidth",o=t=>an(s,t),i=No.observe(n,()=>o(n[r])),er(()=>(Yn(()=>o(n[r])),i)),Nr(t,l)});var r=Me(n,2);Ul(Me(ke(r),2),{onclick:()=>Go(Xs,!0),children:(t,e)=>{Nr(t,Lr("See all"))},$$slots:{default:!0}}),Nr(t,e)};Hr(h,t=>{qn(o)?t(p):t(g,!1)}),Ro(v,t=>an(l,t),()=>qn(l));var m=Me(v,2),w=t=>{var e=ua(),n=_e(e),r=t=>{var e=sa();e.__click=[la,l,s],function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"m15 18-6-6 6-6"}]];
|
|
242
242
|
/**
|
|
243
243
|
* @license lucide-svelte v0.476.0 - ISC
|
|
244
244
|
*
|
|
@@ -258,7 +258,7 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m
|
|
|
258
258
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
259
259
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
260
260
|
*
|
|
261
|
-
*/
|
|
261
|
+
*/el(t,Zo({name:"chevron-left"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(ke(e),{size:22,strokeWidth:2.75}),Po(3,e,()=>Vi),Nr(t,e)};Hr(n,t=>{qn(a)&&t(r)});var o=Me(n,2),i=t=>{var e=ca();e.__click=[aa,l,s],function(t,e){const n=Ko(e,["children","$$slots","$$events","$$legacy"]),r=[["path",{d:"m9 18 6-6-6-6"}]];
|
|
262
262
|
/**
|
|
263
263
|
* @license lucide-svelte v0.476.0 - ISC
|
|
264
264
|
*
|
|
@@ -278,5 +278,5 @@ var PlaylightSDK=function(){"use strict";var t,e,n,r,o,i,l,s,a,c,u,d,f,v,h,p,g,m
|
|
|
278
278
|
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
279
279
|
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
280
280
|
*
|
|
281
|
-
*/
|
|
281
|
+
*/el(t,Zo({name:"chevron-right"},()=>n,{get iconNode(){return r},children:(t,n)=>{var r=Ar();eo(_e(r),e,"default",{}),Nr(t,r)},$$slots:{default:!0}}))}(ke(e),{size:22,strokeWidth:2.75}),Po(3,e,()=>Vi),Nr(t,e)};Hr(o,t=>{qn(c)&&t(i)}),Nr(t,e)};Hr(m,t=>{qn(i).length>0&&t(w)}),rr(()=>vo(v,qn(u))),Er("scroll",v,t=>{const e=t.target;an(a,e.scrollLeft>20),an(c,e.scrollLeft<e.scrollWidth-e.clientWidth-20),d(e.scrollLeft,e.scrollWidth-e.clientWidth-e.scrollLeft)}),Nr(t,f),le(),r()}function va(){try{const t=document.querySelectorAll(".playlight-widget-carousel");t.length>0&&t.forEach(t=>{t.dataset.playlightInitialized||(t.dataset.playlightInitialized="true",Dr(fa,{target:t}))})}catch(t){console.error("Error occurred initializing and mounting carousel widget:",t)}}Cr(["click"]);const ha=new class{init(t={}){if("undefined"==typeof window)return console.error("Playlight cannot run on the server.");if(window.playlightInitialized)return console.warn("Playlight SDK is already initialized!");this.setConfig(t),Ys(),va(),function(){try{new MutationObserver(()=>{va()}).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"),Ks.set(e||n),window.playlightInitialized=!0}setDiscovery(t=!0){Xs.set(t)}onEvent(t,e){if(!["discoveryOpen","discoveryClose","exitIntent","sidebarEnable","sidebarDisable"].includes(t))return console.warn(`Invalid event type "${t}!"`);qi.has(t)||qi.set(t,[]),qi.get(t).push(e)}setConfig(t={}){Vs.set(pt(t))}};return"undefined"!=typeof window&&(window.playlightSDK=ha),ha}();
|
|
282
282
|
//# sourceMappingURL=playlight-sdk.iife.js.map
|