@playpilot/tpi 8.14.0-beta.2 → 8.14.0-beta.3
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/editorial.mount.js
CHANGED
|
@@ -2,11 +2,11 @@ var fm=Object.defineProperty;var Os=De=>{throw TypeError(De)};var hm=(De,Ne,Ge)=
|
|
|
2
2
|
/*$vite$:1*/`,document.head.appendChild(De);const Ne=!1;var Ge=Array.isArray,sn=Array.prototype.indexOf,nr=Array.from,Ws=Object.defineProperty,bi=Object.getOwnPropertyDescriptor,hl=Object.getOwnPropertyDescriptors,Gs=Object.prototype,Ks=Array.prototype,rr=Object.getPrototypeOf,gl=Object.isExtensible;function ea(t){return typeof t=="function"}const _t=()=>{};function Ys(t){return typeof(t==null?void 0:t.then)=="function"}function Zs(t){return t()}function lr(t){for(var e=0;e<t.length;e++)t[e]()}function ml(){var t,e,i=new Promise((a,n)=>{t=a,e=n});return{promise:i,resolve:t,reject:e}}function ja(t,e,i=!1){return t===void 0?i?e():e:t}function ta(t,e){if(Array.isArray(t))return t;if(!(Symbol.iterator in t))return Array.from(t);const i=[];for(const a of t)if(i.push(a),i.length===e)break;return i}const nt=2,or=4,cn=8,yl=1<<24,Vt=16,ni=32,Li=64,dn=128,jt=512,lt=1024,ut=2048,ri=4096,gt=8192,li=16384,un=32768,Ut=65536,bl=1<<17,sr=1<<18,ia=1<<19,_l=1<<20,za=32768,cr=1<<21,dr=1<<22,_i=1<<23,Wt=Symbol("$state"),xl=Symbol("legacy props"),Js=Symbol(""),aa=new class extends Error{constructor(){super(...arguments);Ht(this,"name","StaleReactionError");Ht(this,"message","The reaction that called `getAbortSignal()` was re-run or destroyed")}};function ur(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Qs(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Xs(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function $s(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function ec(t){throw new Error("https://svelte.dev/e/effect_orphan")}function tc(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ic(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function ac(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function nc(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function rc(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function lc(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const wl=1,kl=2,Sl=4,oc=8,sc=16,cc=1,dc=2,uc=4,vc=8,pc=16,fc=1,hc=2,gc=4,mc=1,yc=2,it=Symbol(),bc="http://www.w3.org/1999/xhtml",_c="http://www.w3.org/2000/svg",xc="@attach";function wc(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function kc(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}function Tl(t){return t===this.v}function Pl(t,e){return t!=t?e==e:t!==e||t!==null&&typeof t=="object"||typeof t=="function"}function El(t){return!Pl(t,this.v)}let na=!1,Sc=!1;function Tc(){na=!0}let Me=null;function ra(t){Me=t}function vn(t){return Cl().get(t)}function pn(t,e){return Cl().set(t,e),e}function re(t,e=!1,i){Me={p:Me,i:!1,c:null,e:null,s:t,x:null,l:na&&!e?{s:null,u:null,$:[]}:null}}function le(t){var e=Me,i=e.e;if(i!==null){e.e=null;for(var a of i)$l(a)}return t!==void 0&&(e.x=t),e.i=!0,Me=e.p,t??{}}function Mi(){return!na||Me!==null&&Me.l===null}function Cl(t){return Me===null&&ur(),Me.c??(Me.c=new Map(Pc(Me)||void 0))}function Pc(t){let e=t.p;for(;e!==null;){const i=e.c;if(i!==null)return i;e=e.p}return null}let qi=[];function Il(){var t=qi;qi=[],lr(t)}function oi(t){if(qi.length===0&&!oa){var e=qi;queueMicrotask(()=>{e===qi&&Il()})}qi.push(t)}function Ec(){for(;qi.length>0;)Il()}function jl(t){var e=je;if(e===null)return Ie.f|=_i,t;if(e.f&un)la(t,e);else{if(!(e.f&dn))throw t;e.b.error(t)}}function la(t,e){for(;e!==null;){if(e.f&dn)try{e.b.error(t);return}catch(i){t=i}e=e.parent}throw t}const fn=new Set;let Se=null,Aa=null,Ze=null,xt=[],hn=null,vr=!1,oa=!1;const Zn=class Zn{constructor(){xe(this,et);Ht(this,"committed",!1);Ht(this,"current",new Map);Ht(this,"previous",new Map);xe(this,ka,new Set);xe(this,Sa,new Set);xe(this,Ki,0);xe(this,Yi,0);xe(this,en,null);xe(this,Ta,[]);xe(this,Pa,[]);Ht(this,"skipped_effects",new Set);Ht(this,"is_fork",!1)}is_deferred(){return this.is_fork||B(this,Yi)>0}process(e){var a;xt=[],Aa=null,this.apply();var i={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of e)Be(this,et,ul).call(this,n,i);this.is_fork||Be(this,et,Bs).call(this),this.is_deferred()?(Be(this,et,$i).call(this,i.effects),Be(this,et,$i).call(this,i.render_effects),Be(this,et,$i).call(this,i.block_effects)):(Aa=this,Se=null,Ll(i.render_effects),Ll(i.effects),Aa=null,(a=B(this,en))==null||a.resolve()),Ze=null}capture(e,i){this.previous.has(e)||this.previous.set(e,i),e.f&_i||(this.current.set(e,e.v),Ze==null||Ze.set(e,e.v))}activate(){Se=this,this.apply()}deactivate(){Se===this&&(Se=null,Ze=null)}flush(){if(this.activate(),xt.length>0){if(Al(),Se!==null&&Se!==this)return}else B(this,Ki)===0&&this.process([]);this.deactivate()}discard(){for(const e of B(this,Sa))e(this);B(this,Sa).clear()}increment(e){be(this,Ki,B(this,Ki)+1),e&&be(this,Yi,B(this,Yi)+1)}decrement(e){be(this,Ki,B(this,Ki)-1),e&&be(this,Yi,B(this,Yi)-1),this.revive()}revive(){for(const e of B(this,Ta))ot(e,ut),Di(e);for(const e of B(this,Pa))ot(e,ri),Di(e);be(this,Ta,[]),be(this,Pa,[]),this.flush()}oncommit(e){B(this,ka).add(e)}ondiscard(e){B(this,Sa).add(e)}settled(){return(B(this,en)??be(this,en,ml())).promise}static ensure(){if(Se===null){const e=Se=new Zn;fn.add(Se),oa||Zn.enqueue(()=>{Se===e&&e.flush()})}return Se}static enqueue(e){oi(e)}apply(){}};ka=new WeakMap,Sa=new WeakMap,Ki=new WeakMap,Yi=new WeakMap,en=new WeakMap,Ta=new WeakMap,Pa=new WeakMap,et=new WeakSet,ul=function(e,i){var u;e.f^=lt;for(var a=e.first;a!==null;){var n=a.f,r=(n&(ni|Li))!==0,o=r&&(n<)!==0,s=o||(n>)!==0||this.skipped_effects.has(a);if(a.f&dn&&((u=a.b)!=null&&u.is_pending())&&(i={parent:i,effect:a,effects:[],render_effects:[],block_effects:[]}),!s&&a.fn!==null){r?a.f^=lt:n&or?i.effects.push(a):Oa(a)&&(a.f&Vt&&i.block_effects.push(a),Ba(a));var c=a.first;if(c!==null){a=c;continue}}var d=a.parent;for(a=a.next;a===null&&d!==null;)d===i.effect&&(Be(this,et,$i).call(this,i.effects),Be(this,et,$i).call(this,i.render_effects),Be(this,et,$i).call(this,i.block_effects),i=i.parent),a=d.next,d=d.parent}},$i=function(e){for(const i of e)(i.f&ut?B(this,Ta):B(this,Pa)).push(i),Be(this,et,vl).call(this,i.deps),ot(i,lt)},vl=function(e){if(e!==null)for(const i of e)!(i.f&nt)||!(i.f&za)||(i.f^=za,Be(this,et,vl).call(this,i.deps))},Bs=function(){if(B(this,Yi)===0){for(const e of B(this,ka))e();B(this,ka).clear()}B(this,Ki)===0&&Be(this,et,Fs).call(this)},Fs=function(){var r;if(fn.size>1){this.previous.clear();var e=Ze,i=!0,a={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const o of fn){if(o===this){i=!1;continue}const s=[];for(const[d,u]of this.current){if(o.current.has(d))if(i&&u!==o.current.get(d))o.current.set(d,u);else continue;s.push(d)}if(s.length===0)continue;const c=[...o.current.keys()].filter(d=>!this.current.has(d));if(c.length>0){var n=xt;xt=[];const d=new Set,u=new Map;for(const v of s)Ml(v,c,d,u);if(xt.length>0){Se=o,o.apply();for(const v of xt)Be(r=o,et,ul).call(r,v,a);o.deactivate()}xt=n}}Se=null,Ze=e}this.committed=!0,fn.delete(this)};let Gt=Zn;function zl(t){var e=oa;oa=!0;try{for(var i;;){if(Ec(),xt.length===0&&(Se==null||Se.flush(),xt.length===0))return hn=null,i;Al()}}finally{oa=e}}function Al(){var t=Si;vr=!0;var e=null;try{var i=0;for(yn(!0);xt.length>0;){var a=Gt.ensure();if(i++>1e3){var n,r;Cc()}a.process(xt),xi.clear()}}finally{vr=!1,yn(t),hn=null}}function Cc(){try{tc()}catch(t){la(t,hn)}}let zt=null;function Ll(t){var e=t.length;if(e!==0){for(var i=0;i<e;){var a=t[i++];if(!(a.f&(li|gt))&&Oa(a)&&(zt=new Set,Ba(a),a.deps===null&&a.first===null&&a.nodes_start===null&&(a.teardown===null&&a.ac===null?no(a):a.fn=null),(zt==null?void 0:zt.size)>0)){xi.clear();for(const n of zt){if(n.f&(li|gt))continue;const r=[n];let o=n.parent;for(;o!==null;)zt.has(o)&&(zt.delete(o),r.push(o)),o=o.parent;for(let s=r.length-1;s>=0;s--){const c=r[s];c.f&(li|gt)||Ba(c)}}zt.clear()}}zt=null}}function Ml(t,e,i,a){if(!i.has(t)&&(i.add(t),t.reactions!==null))for(const n of t.reactions){const r=n.f;r&nt?Ml(n,e,i,a):r&(dr|Vt)&&!(r&ut)&&ql(n,e,a)&&(ot(n,ut),Di(n))}}function ql(t,e,i){const a=i.get(t);if(a!==void 0)return a;if(t.deps!==null)for(const n of t.deps){if(e.includes(n))return!0;if(n.f&nt&&ql(n,e,i))return i.set(n,!0),!0}return i.set(t,!1),!1}function Di(t){for(var e=hn=t;e.parent!==null;){e=e.parent;var i=e.f;if(vr&&e===je&&i&Vt&&!(i&sr))return;if(i&(Li|ni)){if(!(i<))return;e.f^=lt}}xt.push(e)}function Dl(t){let e=0,i=Yt(0),a;return()=>{Da()&&(l(i),mn(()=>(e===0&&(a=kt(()=>t(()=>wi(i)))),e+=1,()=>{oi(()=>{e-=1,e===0&&(a==null||a(),a=void 0,wi(i))})})))}}var Ic=Ut|ia|dn;function Nl(t,e,i){new jc(t,e,i)}class jc{constructor(e,i,a){xe(this,at);Ht(this,"parent");xe(this,Et,!1);xe(this,Ct);xe(this,sl,null);xe(this,ei);xe(this,Zi);xe(this,ti);xe(this,It,null);xe(this,ht,null);xe(this,ii,null);xe(this,mi,null);xe(this,Pi,null);xe(this,Ji,0);xe(this,Ei,0);xe(this,Qi,!1);xe(this,Ci,null);xe(this,Jn,Dl(()=>(be(this,Ci,Yt(B(this,Ji))),()=>{be(this,Ci,null)})));be(this,Ct,e),be(this,ei,i),be(this,Zi,a),this.parent=je.b,be(this,Et,!!B(this,ei).pending),be(this,ti,ci(()=>{je.b=this;{var n=Be(this,at,pl).call(this);try{be(this,It,vt(()=>a(n)))}catch(r){this.error(r)}B(this,Ei)>0?Be(this,at,ar).call(this):be(this,Et,!1)}return()=>{var r;(r=B(this,Pi))==null||r.remove()}},Ic))}is_pending(){return B(this,Et)||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!B(this,ei).pending}update_pending_count(e){Be(this,at,fl).call(this,e),be(this,Ji,B(this,Ji)+e),B(this,Ci)&&si(B(this,Ci),B(this,Ji))}get_effect_pending(){return B(this,Jn).call(this),l(B(this,Ci))}error(e){var i=B(this,ei).onerror;let a=B(this,ei).failed;if(B(this,Qi)||!i&&!a)throw e;B(this,It)&&(rt(B(this,It)),be(this,It,null)),B(this,ht)&&(rt(B(this,ht)),be(this,ht,null)),B(this,ii)&&(rt(B(this,ii)),be(this,ii,null));var n=!1,r=!1;const o=()=>{if(n){kc();return}n=!0,r&&lc(),Gt.ensure(),be(this,Ji,0),B(this,ii)!==null&&sa(B(this,ii),()=>{be(this,ii,null)}),be(this,Et,this.has_pending_snippet()),be(this,It,Be(this,at,ir).call(this,()=>(be(this,Qi,!1),vt(()=>B(this,Zi).call(this,B(this,Ct)))))),B(this,Ei)>0?Be(this,at,ar).call(this):be(this,Et,!1)};var s=Ie;try{pt(null),r=!0,i==null||i(e,o),r=!1}catch(c){la(c,B(this,ti)&&B(this,ti).parent)}finally{pt(s)}a&&oi(()=>{be(this,ii,Be(this,at,ir).call(this,()=>{Gt.ensure(),be(this,Qi,!0);try{return vt(()=>{a(B(this,Ct),()=>e,()=>o)})}catch(c){return la(c,B(this,ti).parent),null}finally{be(this,Qi,!1)}}))})}}Et=new WeakMap,Ct=new WeakMap,sl=new WeakMap,ei=new WeakMap,Zi=new WeakMap,ti=new WeakMap,It=new WeakMap,ht=new WeakMap,ii=new WeakMap,mi=new WeakMap,Pi=new WeakMap,Ji=new WeakMap,Ei=new WeakMap,Qi=new WeakMap,Ci=new WeakMap,Jn=new WeakMap,at=new WeakSet,gm=function(){try{be(this,It,vt(()=>B(this,Zi).call(this,B(this,Ct))))}catch(e){this.error(e)}be(this,Et,!1)},mm=function(){const e=B(this,ei).pending;e&&(be(this,ht,vt(()=>e(B(this,Ct)))),Gt.enqueue(()=>{var i=Be(this,at,pl).call(this);be(this,It,Be(this,at,ir).call(this,()=>(Gt.ensure(),vt(()=>B(this,Zi).call(this,i))))),B(this,Ei)>0?Be(this,at,ar).call(this):(sa(B(this,ht),()=>{be(this,ht,null)}),be(this,Et,!1))}))},pl=function(){var e=B(this,Ct);return B(this,Et)&&(be(this,Pi,At()),B(this,Ct).before(B(this,Pi)),e=B(this,Pi)),e},ir=function(e){var i=je,a=Ie,n=Me;Qt(B(this,ti)),pt(B(this,ti)),ra(B(this,ti).ctx);try{return e()}catch(r){return jl(r),null}finally{Qt(i),pt(a),ra(n)}},ar=function(){const e=B(this,ei).pending;B(this,It)!==null&&(be(this,mi,document.createDocumentFragment()),B(this,mi).append(B(this,Pi)),oo(B(this,It),B(this,mi))),B(this,ht)===null&&be(this,ht,vt(()=>e(B(this,Ct))))},fl=function(e){var i;if(!this.has_pending_snippet()){this.parent&&Be(i=this.parent,at,fl).call(i,e);return}be(this,Ei,B(this,Ei)+e),B(this,Ei)===0&&(be(this,Et,!1),B(this,ht)&&sa(B(this,ht),()=>{be(this,ht,null)}),B(this,mi)&&(B(this,Ct).before(B(this,mi)),be(this,mi,null)))};let Ni=null;function Rl(t){Ni=t}function qe(t,e){return e}function zc(t,e,i){for(var a=[],n=e.length,r=0;r<n;r++)mr(e[r].e,a,!0);ro(a,()=>{var o=a.length===0&&i!==null;if(o){var s=i,c=s.parentNode;Oc(c),c.append(s),t.items.clear(),Kt(t,e[0].prev,e[n-1].next)}for(var d=0;d<n;d++){var u=e[d];o||(t.items.delete(u.k),Kt(t,u.prev,u.next)),rt(u.e,!o)}t.first===e[0]&&(t.first=e[0].prev)})}function Le(t,e,i,a,n,r=null){var o=t,s=new Map,c=null,d=(e&Sl)!==0,u=(e&wl)!==0,v=(e&kl)!==0;if(d){var p=t;o=p.appendChild(At())}var h=null,g=gn(()=>{var k=i();return Ge(k)?k:k==null?[]:nr(k)}),f,_=!0;function b(){Ac(w,f,o,e,a),h!==null&&(f.length===0?(h.fragment?(o.before(h.fragment),h.fragment=null):yr(h.effect),P.first=h.effect):sa(h.effect,()=>{h=null}))}var P=ci(()=>{f=l(g);for(var k=f.length,L=new Set,C=Se,j=null,V=Zl(),z=0;z<k;z+=1){var I=f[z],E=a(I,z),A=_?null:s.get(E);A?(u&&si(A.v,I),v?si(A.i,z):A.i=z,V&&C.skipped_effects.delete(A.e)):(A=Lc(_?o:null,j,I,E,z,n,e,i),_&&(A.o=!0,j===null?c=A:j.next=A,j=A),s.set(E,A)),L.add(E)}if(k===0&&r&&!h)if(_)h={fragment:null,effect:vt(()=>r(o))};else{var F=document.createDocumentFragment(),N=At();F.append(N),h={fragment:F,effect:vt(()=>r(N))}}if(!_)if(V){for(const[W,G]of s)L.has(W)||C.skipped_effects.add(G.e);C.oncommit(b),C.ondiscard(()=>{})}else b();l(g)}),w={effect:P,flags:e,items:s,first:c};_=!1}function Ac(t,e,i,a,n){var I,E,A,F;var r=(a&oc)!==0,o=e.length,s=t.items,c=t.first,d,u=null,v,p=[],h=[],g,f,_,b;if(r)for(b=0;b<o;b+=1)g=e[b],f=n(g,b),_=s.get(f),_.o&&((I=_.a)==null||I.measure(),(v??(v=new Set)).add(_));for(b=0;b<o;b+=1){if(g=e[b],f=n(g,b),_=s.get(f),t.first??(t.first=_),!_.o){_.o=!0;var P=u?u.next:c;Kt(t,u,_),Kt(t,_,P),pr(_,P,i),u=_,p=[],h=[],c=u.next;continue}if(_.e.f>&&(yr(_.e),r&&((E=_.a)==null||E.unfix(),(v??(v=new Set)).delete(_))),_!==c){if(d!==void 0&&d.has(_)){if(p.length<h.length){var w=h[0],k;u=w.prev;var L=p[0],C=p[p.length-1];for(k=0;k<p.length;k+=1)pr(p[k],w,i);for(k=0;k<h.length;k+=1)d.delete(h[k]);Kt(t,L.prev,C.next),Kt(t,u,L),Kt(t,C,w),c=w,u=C,b-=1,p=[],h=[]}else d.delete(_),pr(_,c,i),Kt(t,_.prev,_.next),Kt(t,_,u===null?t.first:u.next),Kt(t,u,_),u=_;continue}for(p=[],h=[];c!==null&&c.k!==f;)c.e.f>||(d??(d=new Set)).add(c),h.push(c),c=c.next;if(c===null)continue;_=c}p.push(_),u=_,c=_.next}if(c!==null||d!==void 0){for(var j=d===void 0?[]:nr(d);c!==null;)c.e.f>||j.push(c),c=c.next;var V=j.length;if(V>0){var z=a&Sl&&o===0?i:null;if(r){for(b=0;b<V;b+=1)(A=j[b].a)==null||A.measure();for(b=0;b<V;b+=1)(F=j[b].a)==null||F.fix()}zc(t,j,z)}}r&&oi(()=>{var N;if(v!==void 0)for(_ of v)(N=_.a)==null||N.apply()})}function Lc(t,e,i,a,n,r,o,s){var c=Ni,d=(o&wl)!==0,u=(o&sc)===0,v=d?u?gr(i,!1,!1):Yt(i):i,p=o&kl?Yt(n):n,h={i:p,v,k:a,a:null,e:null,o:!1,prev:e,next:null};Ni=h;try{if(t===null){var g=document.createDocumentFragment();g.append(t=At())}return h.e=vt(()=>r(t,v,p,s)),e!==null&&(e.next=h),h}finally{Ni=c}}function pr(t,e,i){for(var a=t.next?t.next.e.nodes_start:i,n=e?e.e.nodes_start:i,r=t.e.nodes_start;r!==null&&r!==a;){var o=qa(r);n.before(r),r=o}}function Kt(t,e,i){e===null?(t.first=i,t.effect.first=i&&i.e):(e.e===t.effect.last&&i!==null&&(t.effect.last=i.e),e.e.next&&(e.e.next.prev=null),e.next=i,e.e.next=i&&i.e),i===null?t.effect.last=e&&e.e:(i.e===t.effect.last&&e===null&&(t.effect.last=i.e.prev),i.e.prev&&(i.e.prev.next=null),i.prev=e,i.e.prev=e&&e.e)}function Ol(t,e,i,a){const n=Mi()?Ma:gn;if(i.length===0&&t.length===0){a(e.map(n));return}var r=Se,o=je,s=Bl();function c(){Promise.all(i.map(d=>Mc(d))).then(d=>{s();try{a([...e.map(n),...d])}catch(u){o.f&li||la(u,o)}r==null||r.deactivate(),La()}).catch(d=>{la(d,o)})}t.length>0?Promise.all(t).then(()=>{s();try{return c()}finally{r==null||r.deactivate(),La()}}):c()}function Bl(){var t=je,e=Ie,i=Me,a=Se;return function(r=!0){Qt(t),pt(e),ra(i),r&&(a==null||a.activate())}}function La(){Qt(null),pt(null),ra(null)}function Ma(t){var e=nt|ut,i=Ie!==null&&Ie.f&nt?Ie:null;return je!==null&&(je.f|=ia),{ctx:Me,deps:null,effects:null,equals:Tl,f:e,fn:t,reactions:null,rv:0,v:it,wv:0,parent:i??je,ac:null}}function Mc(t,e){let i=je;i===null&&Qs();var a=i.b,n=void 0,r=Yt(it),o=!Ie,s=new Map;return Gc(()=>{var p;var c=ml();n=c.promise;try{Promise.resolve(t()).then(c.resolve,c.reject).then(()=>{d===Se&&d.committed&&d.deactivate(),La()})}catch(h){c.reject(h),La()}var d=Se;if(o){var u=!a.is_pending();a.update_pending_count(1),d.increment(u),(p=s.get(d))==null||p.reject(aa),s.delete(d),s.set(d,c)}const v=(h,g=void 0)=>{if(d.activate(),g)g!==aa&&(r.f|=_i,si(r,g));else{r.f&_i&&(r.f^=_i),si(r,h);for(const[f,_]of s){if(s.delete(f),f===d)break;_.reject(aa)}}o&&(a.update_pending_count(-1),d.decrement(u))};c.promise.then(v,h=>v(null,h||"unknown"))}),Na(()=>{for(const c of s.values())c.reject(aa)}),new Promise(c=>{function d(u){function v(){u===n?c(r):d(n)}u.then(v,v)}d(n)})}function U(t){const e=Ma(t);return co(e),e}function gn(t){const e=Ma(t);return e.equals=El,e}function Fl(t){var e=t.effects;if(e!==null){t.effects=null;for(var i=0;i<e.length;i+=1)rt(e[i])}}function qc(t){for(var e=t.parent;e!==null;){if(!(e.f&nt))return e.f&li?null:e;e=e.parent}return null}function fr(t){var e,i=je;Qt(qc(t));try{t.f&=~za,Fl(t),e=ho(t)}finally{Qt(i)}return e}function Hl(t){var e=fr(t);if(t.equals(e)||(Se!=null&&Se.is_fork||(t.v=e),t.wv=po()),!Oi)if(Ze!==null)(Da()||Se!=null&&Se.is_fork)&&Ze.set(t,e);else{var i=t.f&jt?lt:ri;ot(t,i)}}let hr=new Set;const xi=new Map;let Vl=!1;function Yt(t,e){var i={f:0,v:t,reactions:null,equals:Tl,rv:0,wv:0};return i}function K(t,e){const i=Yt(t);return co(i),i}function gr(t,e=!1,i=!0){var n;const a=Yt(t);return e||(a.equals=El),na&&i&&Me!==null&&Me.l!==null&&((n=Me.l).s??(n.s=[])).push(a),a}function M(t,e,i=!1){Ie!==null&&(!Jt||Ie.f&bl)&&Mi()&&Ie.f&(nt|Vt|dr|bl)&&!(ct!=null&&ct.includes(t))&&rc();let a=i?Fe(e):e;return si(t,a)}function si(t,e){if(!t.equals(e)){var i=t.v;Oi?xi.set(t,e):xi.set(t,i),t.v=e;var a=Gt.ensure();a.capture(t,i),t.f&nt&&(t.f&ut&&fr(t),ot(t,t.f&jt?lt:ri)),t.wv=po(),Ul(t,ut),Mi()&&je!==null&&je.f<&&!(je.f&(ni|Li))&&(wt===null?Yc([t]):wt.push(t)),!a.is_fork&&hr.size>0&&!Vl&&Dc()}return e}function Dc(){Vl=!1;var t=Si;yn(!0);const e=Array.from(hr);try{for(const i of e)i.f<&&ot(i,ri),Oa(i)&&Ba(i)}finally{yn(t)}hr.clear()}function wi(t){M(t,t.v+1)}function Ul(t,e){var i=t.reactions;if(i!==null)for(var a=Mi(),n=i.length,r=0;r<n;r++){var o=i[r],s=o.f;if(!(!a&&o===je)){var c=(s&ut)===0;if(c&&ot(o,e),s&nt){var d=o;Ze==null||Ze.delete(d),s&za||(s&jt&&(o.f|=za),Ul(d,ri))}else c&&(s&Vt&&zt!==null&&zt.add(o),Di(o))}}}function Fe(t){if(typeof t!="object"||t===null||Wt in t)return t;const e=rr(t);if(e!==Gs&&e!==Ks)return t;var i=new Map,a=Ge(t),n=K(0),r=di,o=s=>{if(di===r)return s();var c=Ie,d=di;pt(null),vo(r);var u=s();return pt(c),vo(d),u};return a&&i.set("length",K(t.length)),new Proxy(t,{defineProperty(s,c,d){(!("value"in d)||d.configurable===!1||d.enumerable===!1||d.writable===!1)&&ac();var u=i.get(c);return u===void 0?u=o(()=>{var v=K(d.value);return i.set(c,v),v}):M(u,d.value,!0),!0},deleteProperty(s,c){var d=i.get(c);if(d===void 0){if(c in s){const u=o(()=>K(it));i.set(c,u),wi(n)}}else M(d,it),wi(n);return!0},get(s,c,d){var h;if(c===Wt)return t;var u=i.get(c),v=c in s;if(u===void 0&&(!v||(h=bi(s,c))!=null&&h.writable)&&(u=o(()=>{var g=Fe(v?s[c]:it),f=K(g);return f}),i.set(c,u)),u!==void 0){var p=l(u);return p===it?void 0:p}return Reflect.get(s,c,d)},getOwnPropertyDescriptor(s,c){var d=Reflect.getOwnPropertyDescriptor(s,c);if(d&&"value"in d){var u=i.get(c);u&&(d.value=l(u))}else if(d===void 0){var v=i.get(c),p=v==null?void 0:v.v;if(v!==void 0&&p!==it)return{enumerable:!0,configurable:!0,value:p,writable:!0}}return d},has(s,c){var p;if(c===Wt)return!0;var d=i.get(c),u=d!==void 0&&d.v!==it||Reflect.has(s,c);if(d!==void 0||je!==null&&(!u||(p=bi(s,c))!=null&&p.writable)){d===void 0&&(d=o(()=>{var h=u?Fe(s[c]):it,g=K(h);return g}),i.set(c,d));var v=l(d);if(v===it)return!1}return u},set(s,c,d,u){var w;var v=i.get(c),p=c in s;if(a&&c==="length")for(var h=d;h<v.v;h+=1){var g=i.get(h+"");g!==void 0?M(g,it):h in s&&(g=o(()=>K(it)),i.set(h+"",g))}if(v===void 0)(!p||(w=bi(s,c))!=null&&w.writable)&&(v=o(()=>K(void 0)),M(v,Fe(d)),i.set(c,v));else{p=v.v!==it;var f=o(()=>Fe(d));M(v,f)}var _=Reflect.getOwnPropertyDescriptor(s,c);if(_!=null&&_.set&&_.set.call(u,d),!p){if(a&&typeof c=="string"){var b=i.get("length"),P=Number(c);Number.isInteger(P)&&P>=b.v&&M(b,P+1)}wi(n)}return!0},ownKeys(s){l(n);var c=Reflect.ownKeys(s).filter(v=>{var p=i.get(v);return p===void 0||p.v!==it});for(var[d,u]of i)u.v!==it&&!(d in s)&&c.push(d);return c},setPrototypeOf(){nc()}})}function Wl(t){try{if(t!==null&&typeof t=="object"&&Wt in t)return t[Wt]}catch{}return t}function Nc(t,e){return Object.is(Wl(t),Wl(e))}var Ee,Gl,Kl,Yl;function Rc(){if(Ee===void 0){Ee=window,Gl=/Firefox/.test(navigator.userAgent);var t=Element.prototype,e=Node.prototype,i=Text.prototype;Kl=bi(e,"firstChild").get,Yl=bi(e,"nextSibling").get,gl(t)&&(t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0),gl(i)&&(i.__t=void 0)}}function At(t=""){return document.createTextNode(t)}function Zt(t){return Kl.call(t)}function qa(t){return Yl.call(t)}function x(t,e){return Zt(t)}function Z(t,e=!1){{var i=Zt(t);return i instanceof Comment&&i.data===""?qa(i):i}}function S(t,e=1,i=!1){let a=t;for(;e--;)a=qa(a);return a}function Oc(t){t.textContent=""}function Zl(){return!1}function Bc(t,e){if(e){const i=document.body;t.autofocus=!0,oi(()=>{document.activeElement===i&&t.focus()})}}let Jl=!1;function Fc(){Jl||(Jl=!0,document.addEventListener("reset",t=>{Promise.resolve().then(()=>{var e;if(!t.defaultPrevented)for(const i of t.target.elements)(e=i.__on_r)==null||e.call(i)})},{capture:!0}))}function Hc(t,e,i,a=!0){a&&i();for(var n of e)t.addEventListener(n,i);Na(()=>{for(var r of e)t.removeEventListener(r,i)})}function Ri(t){var e=Ie,i=je;pt(null),Qt(null);try{return t()}finally{pt(e),Qt(i)}}function Ql(t,e,i,a=i){t.addEventListener(e,()=>Ri(i));const n=t.__on_r;n?t.__on_r=()=>{n(),a(!0)}:t.__on_r=()=>a(!0),Fc()}function Xl(t){je===null&&(Ie===null&&ec(),$s()),Oi&&Xs()}function Vc(t,e){var i=e.last;i===null?e.last=e.first=t:(i.next=t,t.prev=i,e.last=t)}function Lt(t,e,i){var a=je;a!==null&&a.f>&&(t|=gt);var n={ctx:Me,deps:null,nodes_start:null,nodes_end:null,f:t|ut|jt,first:null,fn:e,last:null,next:null,parent:a,b:a&&a.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(i)try{Ba(n),n.f|=un}catch(s){throw rt(n),s}else e!==null&&Di(n);var r=n;if(i&&r.deps===null&&r.teardown===null&&r.nodes_start===null&&r.first===r.last&&!(r.f&ia)&&(r=r.first,t&Vt&&t&Ut&&r!==null&&(r.f|=Ut)),r!==null&&(r.parent=a,a!==null&&Vc(r,a),Ie!==null&&Ie.f&nt&&!(t&Li))){var o=Ie;(o.effects??(o.effects=[])).push(r)}return n}function Da(){return Ie!==null&&!Jt}function Na(t){const e=Lt(cn,null,!1);return ot(e,lt),e.teardown=t,e}function Ke(t){Xl();var e=je.f,i=!Ie&&(e&ni)!==0&&(e&un)===0;if(i){var a=Me;(a.e??(a.e=[])).push(t)}else return $l(t)}function $l(t){return Lt(or|_l,t,!1)}function Uc(t){return Xl(),Lt(cn|_l,t,!0)}function Wc(t){Gt.ensure();const e=Lt(Li|ia,t,!0);return(i={})=>new Promise(a=>{i.outro?sa(e,()=>{rt(e),a(void 0)}):(rt(e),a(void 0))})}function ki(t){return Lt(or,t,!1)}function Gc(t){return Lt(dr|ia,t,!0)}function mn(t,e=0){return Lt(cn|e,t,!0)}function H(t,e=[],i=[],a=[]){Ol(a,e,i,n=>{Lt(cn,()=>t(...n.map(l)),!0)})}function ci(t,e=0){var i=Lt(Vt|e,t,!0);return i}function eo(t,e=0){var i=Lt(yl|e,t,!0);return i}function vt(t){return Lt(ni|ia,t,!0)}function to(t){var e=t.teardown;if(e!==null){const i=Oi,a=Ie;so(!0),pt(null);try{e.call(null)}finally{so(i),pt(a)}}}function io(t,e=!1){var i=t.first;for(t.first=t.last=null;i!==null;){const n=i.ac;n!==null&&Ri(()=>{n.abort(aa)});var a=i.next;i.f&Li?i.parent=null:rt(i,e),i=a}}function Kc(t){for(var e=t.first;e!==null;){var i=e.next;e.f&ni||rt(e),e=i}}function rt(t,e=!0){var i=!1;(e||t.f&sr)&&t.nodes_start!==null&&t.nodes_end!==null&&(ao(t.nodes_start,t.nodes_end),i=!0),io(t,e&&!i),bn(t,0),ot(t,li);var a=t.transitions;if(a!==null)for(const r of a)r.stop();to(t);var n=t.parent;n!==null&&n.first!==null&&no(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=t.ac=null}function ao(t,e){for(;t!==null;){var i=t===e?null:qa(t);t.remove(),t=i}}function no(t){var e=t.parent,i=t.prev,a=t.next;i!==null&&(i.next=a),a!==null&&(a.prev=i),e!==null&&(e.first===t&&(e.first=a),e.last===t&&(e.last=i))}function sa(t,e,i=!0){var a=[];mr(t,a,!0),ro(a,()=>{i&&rt(t),e&&e()})}function ro(t,e){var i=t.length;if(i>0){var a=()=>--i||e();for(var n of t)n.out(a)}else e()}function mr(t,e,i){if(!(t.f>)){if(t.f^=gt,t.transitions!==null)for(const o of t.transitions)(o.is_global||i)&&e.push(o);for(var a=t.first;a!==null;){var n=a.next,r=(a.f&Ut)!==0||(a.f&ni)!==0&&(t.f&Vt)!==0;mr(a,e,r?i:!1),a=n}}}function yr(t){lo(t,!0)}function lo(t,e){if(t.f>){t.f^=gt,t.f<||(ot(t,ut),Di(t));for(var i=t.first;i!==null;){var a=i.next,n=(i.f&Ut)!==0||(i.f&ni)!==0;lo(i,n?e:!1),i=a}if(t.transitions!==null)for(const r of t.transitions)(r.is_global||e)&&r.in()}}function oo(t,e){for(var i=t.nodes_start,a=t.nodes_end;i!==null;){var n=i===a?null:qa(i);e.append(i),i=n}}let Si=!1;function yn(t){Si=t}let Oi=!1;function so(t){Oi=t}let Ie=null,Jt=!1;function pt(t){Ie=t}let je=null;function Qt(t){je=t}let ct=null;function co(t){Ie!==null&&(ct===null?ct=[t]:ct.push(t))}let dt=null,mt=0,wt=null;function Yc(t){wt=t}let uo=1,Ra=0,di=Ra;function vo(t){di=t}function po(){return++uo}function Oa(t){var e=t.f;if(e&ut)return!0;if(e&nt&&(t.f&=-32769),e&ri){var i=t.deps;if(i!==null)for(var a=i.length,n=0;n<a;n++){var r=i[n];if(Oa(r)&&Hl(r),r.wv>t.wv)return!0}e&jt&&Ze===null&&ot(t,lt)}return!1}function fo(t,e,i=!0){var a=t.reactions;if(a!==null&&!(ct!=null&&ct.includes(t)))for(var n=0;n<a.length;n++){var r=a[n];r.f&nt?fo(r,e,!1):e===r&&(i?ot(r,ut):r.f<&&ot(r,ri),Di(r))}}function ho(t){var g;var e=dt,i=mt,a=wt,n=Ie,r=ct,o=Me,s=Jt,c=di,d=t.f;dt=null,mt=0,wt=null,Ie=d&(ni|Li)?null:t,ct=null,ra(t.ctx),Jt=!1,di=++Ra,t.ac!==null&&(Ri(()=>{t.ac.abort(aa)}),t.ac=null);try{t.f|=cr;var u=t.fn,v=u(),p=t.deps;if(dt!==null){var h;if(bn(t,mt),p!==null&&mt>0)for(p.length=mt+dt.length,h=0;h<dt.length;h++)p[mt+h]=dt[h];else t.deps=p=dt;if(Si&&Da()&&t.f&jt)for(h=mt;h<p.length;h++)((g=p[h]).reactions??(g.reactions=[])).push(t)}else p!==null&&mt<p.length&&(bn(t,mt),p.length=mt);if(Mi()&&wt!==null&&!Jt&&p!==null&&!(t.f&(nt|ri|ut)))for(h=0;h<wt.length;h++)fo(wt[h],t);return n!==null&&n!==t&&(Ra++,wt!==null&&(a===null?a=wt:a.push(...wt))),t.f&_i&&(t.f^=_i),v}catch(f){return jl(f)}finally{t.f^=cr,dt=e,mt=i,wt=a,Ie=n,ct=r,ra(o),Jt=s,di=c}}function Zc(t,e){let i=e.reactions;if(i!==null){var a=sn.call(i,t);if(a!==-1){var n=i.length-1;n===0?i=e.reactions=null:(i[a]=i[n],i.pop())}}i===null&&e.f&nt&&(dt===null||!dt.includes(e))&&(ot(e,ri),e.f&jt&&(e.f^=jt,e.f&=-32769),Fl(e),bn(e,0))}function bn(t,e){var i=t.deps;if(i!==null)for(var a=e;a<i.length;a++)Zc(t,i[a])}function Ba(t){var e=t.f;if(!(e&li)){ot(t,lt);var i=je,a=Si;je=t,Si=!0;try{e&(Vt|yl)?Kc(t):io(t),to(t);var n=ho(t);t.teardown=typeof n=="function"?n:null,t.wv=uo;var r;Ne&&Sc&&t.f&ut&&t.deps}finally{Si=a,je=i}}}async function Fa(){await Promise.resolve(),zl()}function l(t){var e=t.f,i=(e&nt)!==0;if(Ie!==null&&!Jt){var a=je!==null&&(je.f&li)!==0;if(!a&&!(ct!=null&&ct.includes(t))){var n=Ie.deps;if(Ie.f&cr)t.rv<Ra&&(t.rv=Ra,dt===null&&n!==null&&n[mt]===t?mt++:dt===null?dt=[t]:dt.includes(t)||dt.push(t));else{(Ie.deps??(Ie.deps=[])).push(t);var r=t.reactions;r===null?t.reactions=[Ie]:r.includes(Ie)||r.push(Ie)}}}if(Oi){if(xi.has(t))return xi.get(t);if(i){var o=t,s=o.v;return(!(o.f<)&&o.reactions!==null||mo(o))&&(s=fr(o)),xi.set(o,s),s}}else i&&(!(Ze!=null&&Ze.has(t))||Se!=null&&Se.is_fork&&!Da())&&(o=t,Oa(o)&&Hl(o),Si&&Da()&&!(o.f&jt)&&go(o));if(Ze!=null&&Ze.has(t))return Ze.get(t);if(t.f&_i)throw t.v;return t.v}function go(t){if(t.deps!==null){t.f^=jt;for(const e of t.deps)(e.reactions??(e.reactions=[])).push(t),e.f&nt&&!(e.f&jt)&&go(e)}}function mo(t){if(t.v===it)return!0;if(t.deps===null)return!1;for(const e of t.deps)if(xi.has(e)||e.f&nt&&mo(e))return!0;return!1}function kt(t){var e=Jt;try{return Jt=!0,t()}finally{Jt=e}}const Jc=-7169;function ot(t,e){t.f=t.f&Jc|e}function yo(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(Wt in t)br(t);else if(!Array.isArray(t))for(let e in t){const i=t[e];typeof i=="object"&&i&&Wt in i&&br(i)}}}function br(t,e=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!e.has(t)){e.add(t),t instanceof Date&&t.getTime();for(let a in t)try{br(t[a],e)}catch{}const i=rr(t);if(i!==Object.prototype&&i!==Array.prototype&&i!==Map.prototype&&i!==Set.prototype&&i!==Date.prototype){const a=hl(i);for(let n in a){const r=a[n].get;if(r)try{r.call(t)}catch{}}}}}function Qc(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const Xc=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function $c(t){return Xc.includes(t)}const ed={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 td(t){return t=t.toLowerCase(),ed[t]??t}const id=["touchstart","touchmove"];function ad(t){return id.includes(t)}const bo=new Set,_r=new Set;function xr(t,e,i,a={}){function n(r){if(a.capture||Ha.call(e,r),!r.cancelBubble)return Ri(()=>i==null?void 0:i.call(this,r))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?oi(()=>{e.addEventListener(t,n,a)}):e.addEventListener(t,n,a),n}function nd(t,e,i,a={}){var n=xr(e,t,i,a);return()=>{t.removeEventListener(e,n,a)}}function ye(t,e,i,a,n){var r={capture:a,passive:n},o=xr(t,e,i,r);(e===document.body||e===window||e===document||e instanceof HTMLMediaElement)&&Na(()=>{e.removeEventListener(t,o,r)})}function we(t){for(var e=0;e<t.length;e++)bo.add(t[e]);for(var i of _r)i(t)}let _o=null;function Ha(t){var _;var e=this,i=e.ownerDocument,a=t.type,n=((_=t.composedPath)==null?void 0:_.call(t))||[],r=n[0]||t.target;_o=t;var o=0,s=_o===t&&t.__root;if(s){var c=n.indexOf(s);if(c!==-1&&(e===document||e===window)){t.__root=e;return}var d=n.indexOf(e);if(d===-1)return;c<=d&&(o=c)}if(r=n[o]||t.target,r!==e){Ws(t,"currentTarget",{configurable:!0,get(){return r||i}});var u=Ie,v=je;pt(null),Qt(null);try{for(var p,h=[];r!==null;){var g=r.assignedSlot||r.parentNode||r.host||null;try{var f=r["__"+a];f!=null&&(!r.disabled||t.target===r)&&f.call(r,t)}catch(b){p?h.push(b):p=b}if(t.cancelBubble||g===e||g===null)break;r=g}if(p){for(let b of h)queueMicrotask(()=>{throw b});throw p}}finally{t.__root=e,delete t.currentTarget,pt(u),Qt(v)}}}function wr(t){var e=document.createElement("template");return e.innerHTML=t.replaceAll("<!>","<!---->"),e.content}function Bi(t,e){var i=je;i.nodes_start===null&&(i.nodes_start=t,i.nodes_end=e)}function T(t,e){var i=(e&mc)!==0,a=(e&yc)!==0,n,r=!t.startsWith("<!>");return()=>{n===void 0&&(n=wr(r?t:"<!>"+t),i||(n=Zt(n)));var o=a||Gl?document.importNode(n,!0):n.cloneNode(!0);if(i){var s=Zt(o),c=o.lastChild;Bi(s,c)}else Bi(o,o);return o}}function rd(t,e,i="svg"){var a=!t.startsWith("<!>"),n=`<${i}>${a?t:"<!>"+t}</${i}>`,r;return()=>{if(!r){var o=wr(n),s=Zt(o);r=Zt(s)}var c=r.cloneNode(!0);return Bi(c,c),c}}function Re(t,e){return rd(t,e,"svg")}function Je(t=""){{var e=At(t+"");return Bi(e,e),e}}function me(){var t=document.createDocumentFragment(),e=document.createComment(""),i=At();return t.append(e,i),Bi(e,i),t}function y(t,e){t!==null&&t.before(e)}let _n=!0;function xn(t){_n=t}function J(t,e){var i=e==null?"":typeof e=="object"?e+"":e;i!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=i,t.nodeValue=i+"")}function Mt(t,e){return ld(t,e)}const ca=new Map;function ld(t,{target:e,anchor:i,props:a={},events:n,context:r,intro:o=!0}){Rc();var s=new Set,c=v=>{for(var p=0;p<v.length;p++){var h=v[p];if(!s.has(h)){s.add(h);var g=ad(h);e.addEventListener(h,Ha,{passive:g});var f=ca.get(h);f===void 0?(document.addEventListener(h,Ha,{passive:g}),ca.set(h,1)):ca.set(h,f+1)}}};c(nr(bo)),_r.add(c);var d=void 0,u=Wc(()=>{var v=i??e.appendChild(At());return Nl(v,{pending:()=>{}},p=>{if(r){re({});var h=Me;h.c=r}n&&(a.$$events=n),_n=o,d=t(p,a)||{},_n=!0,r&&le()}),()=>{var g;for(var p of s){e.removeEventListener(p,Ha);var h=ca.get(p);--h===0?(document.removeEventListener(p,Ha),ca.delete(p)):ca.set(p,h)}_r.delete(c),v!==i&&((g=v.parentNode)==null||g.removeChild(v))}});return kr.set(d,u),d}let kr=new WeakMap;function Fi(t,e){const i=kr.get(t);return i?(kr.delete(t),i(e)):Promise.resolve()}class da{constructor(e,i=!0){Ht(this,"anchor");xe(this,Rt,new Map);xe(this,ai,new Map);xe(this,yt,new Map);xe(this,Xi,new Set);xe(this,tn,!0);xe(this,an,()=>{var e=Se;if(B(this,Rt).has(e)){var i=B(this,Rt).get(e),a=B(this,ai).get(i);if(a)yr(a),B(this,Xi).delete(i);else{var n=B(this,yt).get(i);n&&(B(this,ai).set(i,n.effect),B(this,yt).delete(i),n.fragment.lastChild.remove(),this.anchor.before(n.fragment),a=n.effect)}for(const[r,o]of B(this,Rt)){if(B(this,Rt).delete(r),r===e)break;const s=B(this,yt).get(o);s&&(rt(s.effect),B(this,yt).delete(o))}for(const[r,o]of B(this,ai)){if(r===i||B(this,Xi).has(r))continue;const s=()=>{if(Array.from(B(this,Rt).values()).includes(r)){var d=document.createDocumentFragment();oo(o,d),d.append(At()),B(this,yt).set(r,{effect:o,fragment:d})}else rt(o);B(this,Xi).delete(r),B(this,ai).delete(r)};B(this,tn)||!a?(B(this,Xi).add(r),sa(o,s,!1)):s()}}});xe(this,Qn,e=>{B(this,Rt).delete(e);const i=Array.from(B(this,Rt).values());for(const[a,n]of B(this,yt))i.includes(a)||(rt(n.effect),B(this,yt).delete(a))});this.anchor=e,be(this,tn,i)}ensure(e,i){var a=Se,n=Zl();if(i&&!B(this,ai).has(e)&&!B(this,yt).has(e))if(n){var r=document.createDocumentFragment(),o=At();r.append(o),B(this,yt).set(e,{effect:vt(()=>i(o)),fragment:r})}else B(this,ai).set(e,vt(()=>i(this.anchor)));if(B(this,Rt).set(a,e),n){for(const[s,c]of B(this,ai))s===e?a.skipped_effects.delete(c):a.skipped_effects.add(c);for(const[s,c]of B(this,yt))s===e?a.skipped_effects.delete(c.effect):a.skipped_effects.add(c.effect);a.oncommit(B(this,an)),a.ondiscard(B(this,Qn))}else B(this,an).call(this)}}Rt=new WeakMap,ai=new WeakMap,yt=new WeakMap,Xi=new WeakMap,tn=new WeakMap,an=new WeakMap,Qn=new WeakMap;const od=0,Sr=1;function ua(t,e,i,a,n){var r=Mi(),o=it,s=r?Yt(o):gr(o,!1,!1),c=r?Yt(o):gr(o,!1,!1),d=new da(t);ci(()=>{var u=e(),v=!1;if(Ys(u)){var p=Bl(),h=!1;const g=f=>{if(!v){h=!0,p(!1),Gt.ensure();try{f()}finally{La(),oa||zl()}}};u.then(f=>{g(()=>{si(s,f),d.ensure(Sr,a&&(_=>a(_,s)))})},f=>{g(()=>{if(si(c,f),d.ensure(Sr,n&&(_=>n(_,c))),!n)throw c.v})}),oi(()=>{h||g(()=>{d.ensure(od,i)})})}else si(s,u),d.ensure(Sr,a&&(g=>a(g,s)));return()=>{v=!0}})}function O(t,e,i=!1){var a=new da(t),n=i?Ut:0;function r(o,s){a.ensure(o,s)}ci(()=>{var o=!1;e((s,c=!0)=>{o=!0,r(c,s)}),o||r(!1,null)},n)}function va(t,e,i){var a=new da(t),n=!Mi();ci(()=>{var r=e();n&&r!==null&&typeof r=="object"&&(r={}),a.ensure(r,i)})}function sd(t,e,i=!1,a=!1,n=!1){var r=t,o="";H(()=>{var s=je;if(o!==(o=e()??"")&&(s.nodes_start!==null&&(ao(s.nodes_start,s.nodes_end),s.nodes_start=s.nodes_end=null),o!=="")){var c=o+"";i?c=`<svg>${c}</svg>`:a&&(c=`<math>${c}</math>`);var d=wr(c);if((i||a)&&(d=Zt(d)),Bi(Zt(d),d.lastChild),i||a)for(;Zt(d);)r.before(Zt(d));else r.before(d)}})}function Ve(t,e,...i){var a=new da(t);ci(()=>{const n=e()??null;a.ensure(n,n&&(r=>n(r,...i)))},Ut)}function Tr(t,e,i){var a=new da(t);ci(()=>{var n=e()??null;a.ensure(n,n&&(r=>i(r,n)))},Ut)}function xo(t,e,i,a,n,r){var o=null,s=t,c=Ni,d=new da(s,!1);ci(()=>{const u=e()||null;var v=u==="svg"?_c:null;if(u===null){d.ensure(null,null),xn(!0);return}return d.ensure(u,p=>{var h=Ni;if(Rl(c),u){if(o=v?document.createElementNS(v,u):document.createElement(u),Bi(o,o),a){var g=o.appendChild(At());a(o,g)}je.nodes_end=o,p.before(o)}Rl(h)}),xn(!0),()=>{u&&xn(!1)}},Ut),Na(()=>{xn(!0)})}function cd(t,e){var i;i=document.head.appendChild(At());try{ci(()=>e(i),sr)}finally{}}function ft(t,e,i){ki(()=>{var a=kt(()=>e(t,i==null?void 0:i())||{});if(i&&(a!=null&&a.update)){var n=!1,r={};mn(()=>{var o=i();yo(o),n&&Pl(r,o)&&(r=o,a.update(o))}),n=!0}if(a!=null&&a.destroy)return()=>a.destroy()})}function wn(t,e){var i=void 0,a;eo(()=>{i!==(i=e())&&(a&&(rt(a),a=null),i&&(a=vt(()=>{ki(()=>i(t))})))})}function wo(t){var e,i,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t)){var n=t.length;for(e=0;e<n;e++)t[e]&&(i=wo(t[e]))&&(a&&(a+=" "),a+=i)}else for(i in t)t[i]&&(a&&(a+=" "),a+=i);return a}function dd(){for(var t,e,i=0,a="",n=arguments.length;i<n;i++)(t=arguments[i])&&(e=wo(t))&&(a&&(a+=" "),a+=e);return a}function ud(t){return typeof t=="object"?dd(t):t??""}const ko=[...`
|
|
3
3
|
\r\f \v\uFEFF`];function vd(t,e,i){var a=t==null?"":""+t;if(e&&(a=a?a+" "+e:e),i){for(var n in i)if(i[n])a=a?a+" "+n:n;else if(a.length)for(var r=n.length,o=0;(o=a.indexOf(n,o))>=0;){var s=o+r;(o===0||ko.includes(a[o-1]))&&(s===a.length||ko.includes(a[s]))?a=(o===0?"":a.substring(0,o))+a.substring(s+1):o=s}}return a===""?null:a}function So(t,e=!1){var i=e?" !important;":";",a="";for(var n in t){var r=t[n];r!=null&&r!==""&&(a+=" "+n+": "+r+i)}return a}function Pr(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function pd(t,e){if(e){var i="",a,n;if(Array.isArray(e)?(a=e[0],n=e[1]):a=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var r=!1,o=0,s=!1,c=[];a&&c.push(...Object.keys(a).map(Pr)),n&&c.push(...Object.keys(n).map(Pr));var d=0,u=-1;const f=t.length;for(var v=0;v<f;v++){var p=t[v];if(s?p==="/"&&t[v-1]==="*"&&(s=!1):r?r===p&&(r=!1):p==="/"&&t[v+1]==="*"?s=!0:p==='"'||p==="'"?r=p:p==="("?o++:p===")"&&o--,!s&&r===!1&&o===0){if(p===":"&&u===-1)u=v;else if(p===";"||v===f-1){if(u!==-1){var h=Pr(t.substring(d,u).trim());if(!c.includes(h)){p!==";"&&v++;var g=t.substring(d,v).trim();i+=" "+g+";"}}d=v+1,u=-1}}}}return a&&(i+=So(a)),n&&(i+=So(n,!0)),i=i.trim(),i===""?null:i}return t==null?null:String(t)}function _e(t,e,i,a,n,r){var o=t.__className;if(o!==i||o===void 0){var s=vd(i,a,r);s==null?t.removeAttribute("class"):e?t.className=s:t.setAttribute("class",s),t.__className=i}else if(r&&n!==r)for(var c in r){var d=!!r[c];(n==null||d!==!!n[c])&&t.classList.toggle(c,d)}return r}function Er(t,e={},i,a){for(var n in i){var r=i[n];e[n]!==r&&(i[n]==null?t.style.removeProperty(n):t.style.setProperty(n,r,a))}}function Ye(t,e,i,a){var n=t.__style;if(n!==e){var r=pd(e,a);r==null?t.removeAttribute("style"):t.style.cssText=r,t.__style=e}else a&&(Array.isArray(a)?(Er(t,i==null?void 0:i[0],a[0]),Er(t,i==null?void 0:i[1],a[1],"important")):Er(t,i,a));return a}function kn(t,e,i=!1){if(t.multiple){if(e==null)return;if(!Ge(e))return wc();for(var a of t.options)a.selected=e.includes(Va(a));return}for(a of t.options){var n=Va(a);if(Nc(n,e)){a.selected=!0;return}}(!i||e!==void 0)&&(t.selectedIndex=-1)}function To(t){var e=new MutationObserver(()=>{kn(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Na(()=>{e.disconnect()})}function fd(t,e,i=e){var a=new WeakSet,n=!0;Ql(t,"change",r=>{var o=r?"[selected]":":checked",s;if(t.multiple)s=[].map.call(t.querySelectorAll(o),Va);else{var c=t.querySelector(o)??t.querySelector("option:not([disabled])");s=c&&Va(c)}i(s),Se!==null&&a.add(Se)}),ki(()=>{var r=e();if(t===document.activeElement){var o=Aa??Se;if(a.has(o))return}if(kn(t,r,n),n&&r===void 0){var s=t.querySelector(":checked");s!==null&&(r=Va(s),i(r))}t.__value=r,n=!1}),To(t)}function Va(t){return"__value"in t?t.__value:t.value}const pa=Symbol("class"),fa=Symbol("style"),Po=Symbol("is custom element"),Eo=Symbol("is html");function hd(t,e){var i=Cr(t);i.value===(i.value=e??void 0)||t.value===e&&(e!==0||t.nodeName!=="PROGRESS")||(t.value=e??"")}function Co(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function se(t,e,i,a){var n=Cr(t);n[e]!==(n[e]=i)&&(e==="loading"&&(t[Js]=i),i==null?t.removeAttribute(e):typeof i!="string"&&zo(t).includes(e)?t[e]=i:t.setAttribute(e,i))}function gd(t,e,i,a,n=!1,r=!1){var o=Cr(t),s=o[Po],c=!o[Eo],d=e||{},u=t.tagName==="OPTION";for(var v in e)v in i||(i[v]=null);i.class?i.class=ud(i.class):(a||i[pa])&&(i.class=null),i[fa]&&(i.style??(i.style=null));var p=zo(t);for(const w in i){let k=i[w];if(u&&w==="value"&&k==null){t.value=t.__value="",d[w]=k;continue}if(w==="class"){var h=t.namespaceURI==="http://www.w3.org/1999/xhtml";_e(t,h,k,a,e==null?void 0:e[pa],i[pa]),d[w]=k,d[pa]=i[pa];continue}if(w==="style"){Ye(t,k,e==null?void 0:e[fa],i[fa]),d[w]=k,d[fa]=i[fa];continue}var g=d[w];if(!(k===g&&!(k===void 0&&t.hasAttribute(w)))){d[w]=k;var f=w[0]+w[1];if(f!=="$$")if(f==="on"){const L={},C="$$"+w;let j=w.slice(2);var _=$c(j);if(Qc(j)&&(j=j.slice(0,-7),L.capture=!0),!_&&g){if(k!=null)continue;t.removeEventListener(j,d[C],L),d[C]=null}if(k!=null)if(_)t[`__${j}`]=k,we([j]);else{let V=function(z){d[w].call(this,z)};d[C]=xr(j,t,V,L)}else _&&(t[`__${j}`]=void 0)}else if(w==="style")se(t,w,k);else if(w==="autofocus")Bc(t,!!k);else if(!s&&(w==="__value"||w==="value"&&k!=null))t.value=t.__value=k;else if(w==="selected"&&u)Co(t,k);else{var b=w;c||(b=td(b));var P=b==="defaultValue"||b==="defaultChecked";if(k==null&&!s&&!P)if(o[w]=null,b==="value"||b==="checked"){let L=t;const C=e===void 0;if(b==="value"){let j=L.defaultValue;L.removeAttribute(b),L.defaultValue=j,L.value=L.__value=C?j:null}else{let j=L.defaultChecked;L.removeAttribute(b),L.defaultChecked=j,L.checked=C?j:!1}}else t.removeAttribute(w);else P||p.includes(b)&&(s||typeof k!="string")?(t[b]=k,b in o&&(o[b]=it)):typeof k!="function"&&se(t,b,k)}}}return d}function Io(t,e,i=[],a=[],n=[],r,o=!1,s=!1){Ol(n,i,a,c=>{var d=void 0,u={},v=t.nodeName==="SELECT",p=!1;if(eo(()=>{var g=e(...c.map(l)),f=gd(t,d,g,r,o,s);p&&v&&"value"in g&&kn(t,g.value);for(let b of Object.getOwnPropertySymbols(u))g[b]||rt(u[b]);for(let b of Object.getOwnPropertySymbols(g)){var _=g[b];b.description===xc&&(!d||_!==d[b])&&(u[b]&&rt(u[b]),u[b]=vt(()=>wn(t,()=>_))),f[b]=_}d=f}),v){var h=t;ki(()=>{kn(h,d.value,!0),To(h)})}p=!0})}function Cr(t){return t.__attributes??(t.__attributes={[Po]:t.nodeName.includes("-"),[Eo]:t.namespaceURI===bc})}var jo=new Map;function zo(t){var e=t.getAttribute("is")||t.nodeName,i=jo.get(e);if(i)return i;jo.set(e,i=[]);for(var a,n=t,r=Element.prototype;r!==n;){a=hl(n);for(var o in a)a[o].set&&i.push(o);n=rr(n)}return i}const md=()=>performance.now(),ui={tick:t=>requestAnimationFrame(t),now:()=>md(),tasks:new Set};function Ao(){const t=ui.now();ui.tasks.forEach(e=>{e.c(t)||(ui.tasks.delete(e),e.f())}),ui.tasks.size!==0&&ui.tick(Ao)}function yd(t){let e;return ui.tasks.size===0&&ui.tick(Ao),{promise:new Promise(i=>{ui.tasks.add(e={c:t,f:i})}),abort(){ui.tasks.delete(e)}}}function Sn(t,e){Ri(()=>{t.dispatchEvent(new CustomEvent(e))})}function bd(t){if(t==="float")return"cssFloat";if(t==="offset")return"cssOffset";if(t.startsWith("--"))return t;const e=t.split("-");return e.length===1?e[0]:e[0]+e.slice(1).map(i=>i[0].toUpperCase()+i.slice(1)).join("")}function Lo(t){const e={},i=t.split(";");for(const a of i){const[n,r]=a.split(":");if(!n||r===void 0)break;const o=bd(n.trim());e[o]=r.trim()}return e}const _d=t=>t;function xd(t,e,i){var a=Ni,n,r,o,s=null;a.a??(a.a={element:t,measure(){n=this.element.getBoundingClientRect()},apply(){if(o==null||o.abort(),r=this.element.getBoundingClientRect(),n.left!==r.left||n.right!==r.right||n.top!==r.top||n.bottom!==r.bottom){const c=e()(this.element,{from:n,to:r},i==null?void 0:i());o=Tn(this.element,c,void 0,1,()=>{o==null||o.abort(),o=void 0})}},fix(){if(!t.getAnimations().length){var{position:c,width:d,height:u}=getComputedStyle(t);if(c!=="absolute"&&c!=="fixed"){var v=t.style;s={position:v.position,width:v.width,height:v.height,transform:v.transform},v.position="absolute",v.width=d,v.height=u;var p=t.getBoundingClientRect();if(n.left!==p.left||n.top!==p.top){var h=`translate(${n.left-p.left}px, ${n.top-p.top}px)`;v.transform=v.transform?`${v.transform} ${h}`:h}}}},unfix(){if(s){var c=t.style;c.position=s.position,c.width=s.width,c.height=s.height,c.transform=s.transform}}}),a.a.element=t}function Ae(t,e,i,a){var n=(t&fc)!==0,r=(t&hc)!==0,o=n&&r,s=(t&gc)!==0,c=o?"both":n?"in":"out",d,u=e.inert,v=e.style.overflow,p,h;function g(){return Ri(()=>d??(d=i()(e,(a==null?void 0:a())??{},{direction:c})))}var f={is_global:s,in(){var w;if(e.inert=u,!n){h==null||h.abort(),(w=h==null?void 0:h.reset)==null||w.call(h);return}r||p==null||p.abort(),Sn(e,"introstart"),p=Tn(e,g(),h,1,()=>{Sn(e,"introend"),p==null||p.abort(),p=d=void 0,e.style.overflow=v})},out(w){if(!r){w==null||w(),d=void 0;return}e.inert=!0,Sn(e,"outrostart"),h=Tn(e,g(),p,0,()=>{Sn(e,"outroend"),w==null||w()})},stop:()=>{p==null||p.abort(),h==null||h.abort()}},_=je;if((_.transitions??(_.transitions=[])).push(f),n&&_n){var b=s;if(!b){for(var P=_.parent;P&&P.f&Ut;)for(;(P=P.parent)&&!(P.f&Vt););b=!P||(P.f&un)!==0}b&&ki(()=>{kt(()=>f.in())})}}function Tn(t,e,i,a,n){var r=a===1;if(ea(e)){var o,s=!1;return oi(()=>{if(!s){var _=e({direction:r?"in":"out"});o=Tn(t,_,i,a,n)}}),{abort:()=>{s=!0,o==null||o.abort()},deactivate:()=>o.deactivate(),reset:()=>o.reset(),t:()=>o.t()}}if(i==null||i.deactivate(),!(e!=null&&e.duration))return n(),{abort:_t,deactivate:_t,reset:_t,t:()=>a};const{delay:c=0,css:d,tick:u,easing:v=_d}=e;var p=[];if(r&&i===void 0&&(u&&u(0,1),d)){var h=Lo(d(0,1));p.push(h,h)}var g=()=>1-a,f=t.animate(p,{duration:c,fill:"forwards"});return f.onfinish=()=>{f.cancel();var _=(i==null?void 0:i.t())??1-a;i==null||i.abort();var b=a-_,P=e.duration*Math.abs(b),w=[];if(P>0){var k=!1;if(d)for(var L=Math.ceil(P/16.666666666666668),C=0;C<=L;C+=1){var j=_+b*v(C/L),V=Lo(d(j,1-j));w.push(V),k||(k=V.overflow==="hidden")}k&&(t.style.overflow="hidden"),g=()=>{var z=f.currentTime;return _+b*v(z/P)},u&&yd(()=>{if(f.playState!=="running")return!1;var z=g();return u(z,1-z),!0})}f=t.animate(w,{duration:P,fill:"forwards"}),f.onfinish=()=>{g=()=>a,u==null||u(a,1-a),n()}},{abort:()=>{f&&(f.cancel(),f.effect=null,f.onfinish=_t)},deactivate:()=>{n=_t},reset:()=>{a===0&&(u==null||u(1,0))},t:()=>g()}}function ha(t,e,i=e){var a=new WeakSet;Ql(t,"input",async n=>{var r=n?t.defaultValue:t.value;if(r=Ir(t)?jr(r):r,i(r),Se!==null&&a.add(Se),await Fa(),r!==(r=e())){var o=t.selectionStart,s=t.selectionEnd,c=t.value.length;if(t.value=r??"",s!==null){var d=t.value.length;o===s&&s===c&&d>c?(t.selectionStart=d,t.selectionEnd=d):(t.selectionStart=o,t.selectionEnd=Math.min(s,d))}}}),kt(e)==null&&t.value&&(i(Ir(t)?jr(t.value):t.value),Se!==null&&a.add(Se)),mn(()=>{var n=e();if(t===document.activeElement){var r=Aa??Se;if(a.has(r))return}Ir(t)&&n===jr(t.value)||t.type==="date"&&!n&&!t.value||n!==t.value&&(t.value=n??"")})}function Ir(t){var e=t.type;return e==="number"||e==="range"}function jr(t){return t===""?null:+t}const $n=class $n{constructor(e){xe(this,Xn);xe(this,Ii,new WeakMap);xe(this,Ea);xe(this,nn);be(this,nn,e)}observe(e,i){var a=B(this,Ii).get(e)||new Set;return a.add(i),B(this,Ii).set(e,a),Be(this,Xn,Hs).call(this).observe(e,B(this,nn)),()=>{var n=B(this,Ii).get(e);n.delete(i),n.size===0&&(B(this,Ii).delete(e),B(this,Ea).unobserve(e))}}};Ii=new WeakMap,Ea=new WeakMap,nn=new WeakMap,Xn=new WeakSet,Hs=function(){return B(this,Ea)??be(this,Ea,new ResizeObserver(e=>{for(var i of e){$n.entries.set(i.target,i);for(var a of B(this,Ii).get(i.target)||[])a(i)}}))},Ht($n,"entries",new WeakMap);let zr=$n;var wd=new zr({box:"border-box"});function qt(t,e,i){var a=wd.observe(t,()=>i(t[e]));ki(()=>(kt(()=>i(t[e])),a))}function Mo(t,e){return t===e||(t==null?void 0:t[Wt])===e}function $e(t={},e,i,a){return ki(()=>{var n,r;return mn(()=>{n=r,r=[],kt(()=>{t!==i(...r)&&(e(t,...r),n&&Mo(i(...n),t)&&e(null,...n))})}),()=>{oi(()=>{r&&Mo(i(...r),t)&&e(null,...r)})}}),t}function Ua(t,e){Hc(window,["resize"],()=>Ri(()=>e(window[t])))}function Ar(t=!1){const e=Me,i=e.l.u;if(!i)return;let a=()=>yo(e.s);if(t){let n=0,r={};const o=Ma(()=>{let s=!1;const c=e.s;for(const d in c)c[d]!==r[d]&&(r[d]=c[d],s=!0);return s&&n++,n});a=()=>l(o)}i.b.length&&Uc(()=>{qo(e,a),lr(i.b)}),Ke(()=>{const n=kt(()=>i.m.map(Zs));return()=>{for(const r of n)typeof r=="function"&&r()}}),i.a.length&&Ke(()=>{qo(e,a),lr(i.a)})}function qo(t,e){if(t.l.s)for(const i of t.l.s)l(i);e()}let Pn=!1;function kd(t){var e=Pn;try{return Pn=!1,[t(),Pn]}finally{Pn=e}}const Sd={get(t,e){if(!t.exclude.includes(e))return t.props[e]},set(t,e){return!1},getOwnPropertyDescriptor(t,e){if(!t.exclude.includes(e)&&e in t.props)return{enumerable:!0,configurable:!0,value:t.props[e]}},has(t,e){return t.exclude.includes(e)?!1:e in t.props},ownKeys(t){return Reflect.ownKeys(t.props).filter(e=>!t.exclude.includes(e))}};function Do(t,e,i){return new Proxy({props:t,exclude:e},Sd)}const Td={get(t,e){let i=t.props.length;for(;i--;){let a=t.props[i];if(ea(a)&&(a=a()),typeof a=="object"&&a!==null&&e in a)return a[e]}},set(t,e,i){let a=t.props.length;for(;a--;){let n=t.props[a];ea(n)&&(n=n());const r=bi(n,e);if(r&&r.set)return r.set(i),!0}return!1},getOwnPropertyDescriptor(t,e){let i=t.props.length;for(;i--;){let a=t.props[i];if(ea(a)&&(a=a()),typeof a=="object"&&a!==null&&e in a){const n=bi(a,e);return n&&!n.configurable&&(n.configurable=!0),n}}},has(t,e){if(e===Wt||e===xl)return!1;for(let i of t.props)if(ea(i)&&(i=i()),i!=null&&e in i)return!0;return!1},ownKeys(t){const e=[];for(let i of t.props)if(ea(i)&&(i=i()),!!i){for(const a in i)e.includes(a)||e.push(a);for(const a of Object.getOwnPropertySymbols(i))e.includes(a)||e.push(a)}return e}};function En(...t){return new Proxy({props:t},Td)}function D(t,e,i,a){var w;var n=!na||(i&dc)!==0,r=(i&vc)!==0,o=(i&pc)!==0,s=a,c=!0,d=()=>(c&&(c=!1,s=o?kt(a):a),s),u;if(r){var v=Wt in t||xl in t;u=((w=bi(t,e))==null?void 0:w.set)??(v&&e in t?k=>t[e]=k:void 0)}var p,h=!1;r?[p,h]=kd(()=>t[e]):p=t[e],p===void 0&&a!==void 0&&(p=d(),u&&(n&&ic(),u(p)));var g;if(n?g=()=>{var k=t[e];return k===void 0?d():(c=!0,k)}:g=()=>{var k=t[e];return k!==void 0&&(s=void 0),k===void 0?s:k},n&&!(i&uc))return g;if(u){var f=t.$$legacy;return function(k,L){return arguments.length>0?((!n||!L||f||h)&&u(L?g():k),k):g()}}var _=!1,b=(i&cc?Ma:gn)(()=>(_=!1,g()));r&&l(b);var P=je;return function(k,L){if(arguments.length>0){const C=L?l(b):n&&r?Fe(k):k;return M(b,C),_=!0,s!==void 0&&(s=C),k}return Oi&&_||P.f&li?b.v:l(b)}}function Qe(t){Me===null&&ur(),na&&Me.l!==null?Pd(Me).m.push(t):Ke(()=>{const e=kt(t);if(typeof e=="function")return e})}function Cn(t){Me===null&&ur(),Qe(()=>()=>kt(t))}function Pd(t){var e=t.l;return e.u??(e.u={a:[],b:[],m:[]})}const Ed="5";typeof window<"u"&&((Ds=window.__svelte??(window.__svelte={})).v??(Ds.v=new Set)).add(Ed);function vi(){var t;return(t=window.PlayPilotLinkInjections)==null?void 0:t.token}const No="https://www.playpilot.com",Cd="https://partner-api.playpilot.tech/1.0",Id="https://img-external.playpilot.tech",Lr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAAB+CAMAAACNgsajAAAAb1BMVEU1Q2fI1N5YZoNVYoFndI9qd5JBT3FFU3S8yNS3xNC4xNFBTnDG0t2lscJJV3e9ytaptcWToLOOm6/BzdiZprh3hJ1aaIWJlatte5VPXHx7iJ9zgZlfbYk3RWmNmq5jcY1XZIO2wtCjsMB+i6I9S25IprTeAAABqUlEQVRo3u3W2ZKCMBCF4T5ExRmRVXBfZnn/Z5wKiU5pz1AJ7ZXV/x03HxVCB0jTNE3TNE3TNO0l2rbPNxcFdk8334AINTUD5eSaWbPoQs0qw0CVN98BzNNgE4NVv+ZHsJliuNVt7UgotATAafp/5mZiG4waAB0N5k0kUeg0wMykKDfLvRTl5pxyCFFupjQVo9ykiRTlphzl5nNQNu8C9Hv2lylDT0W2NMyUoeXdLC68KUNLuM7O9HskQ0uLLAEUR2aOQjfORE5LzHP2PMehxpl2k6otM8eh2aQGkBlieyRBYbs3y5Rk6IPZn8mT65XJR6LcROGErwaoxqLm4XvkiTVsy1FoYe5n06zcjazp1Wk0umHz3k9BT6+bXjXR6PnRtKpr755PfRjx4WPz7tXW/26gGYnOvOmrM7xtiK4qYtDOrpGZtnR7JFcSi+Z1XZt7k5d4NCZmcrWxqMzkbRgqN+nAULHpx1RiylFvftJwlxjUz2bWdpPB7NnSxZih5RFrD20Vai4izGOgeenPukMSUE6hte5denI7NMyU1xrSNE3TNE3TNE17hX4ADHsS0j0OCOoAAAAASUVORK5CYII=",pi=600,Mr={};async function Xt(t,{headers:e={},method:i="GET",body:a=null}={}){const n=!In()&&i==="GET";if(n&&t in Mr)return Mr[t];const r=i==="GET"?{}:{"Content-Type":"application/json"},o=await fetch(Cd+t,{method:i,headers:new Headers({...r,...e}),body:a?JSON.stringify(a):null});if(!(o!=null&&o.ok))throw o;const s=await o.text();let c=s;try{s&&(c=JSON.parse(s))}catch{}return n&&(Mr[t]=c),c}const qr="EncryptedToken",Ro="articleReplacementEditToken",Oo="playpilot-editorial-mode";async function Bo({href:t=window.location.href,throwError:e=!1}={}){try{const i=vi();if(!i)throw new Error("No token was provided");const a=Dr(t);if(!a)throw new Error("Could not be authenticated");return await Xt(`/external-pages/edit-authorization?api-token=${i}`,{method:"POST",body:{private_token:a}}),jd(a),!0}catch(i){if(console.error(i),e)throw i}finally{Ld()}return!1}function Dr(t=""){var a,n;const e=(a=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:a.editorial_token;if(e)return e;if(t){const r=new URL(t).searchParams.get(Ro);if(r)return decodeURI(r)}return((n=("; "+document.cookie).split(`; ${qr}=`).pop())==null?void 0:n.split(";")[0])||""}function jd(t){const e=new Date;e.setTime(e.getTime()+30*24*60*60*1e3);const a="expires="+e.toUTCString();document.cookie=qr+"="+t+";"+a+";path=/"}function zd(){document.cookie=qr+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/"}function In(){var e;const t=(e=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:e.editorial_token;return new URLSearchParams(window.location.search).get(Oo)==="true"||!!t}function Ad(){const t=new URL(window.location.href);t.searchParams.set(Oo,"true"),window.history.replaceState({},"",t)}function Ld(){const t=new URL(window.location.href);t.searchParams.delete(Ro),window.history.replaceState({},"",t)}function Md(t){let e=0;for(let i=0;i<t.length;i++){const a=t.charCodeAt(i);e=e*31+a>>>0}return e.toString(16)}function jn(t=5){const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let i="";for(;i.length<t;)i+=e[Math.floor(Math.random()*e.length)];return i}const m=Object.freeze({English:"en-US",Swedish:"sv-SE",Danish:"da-DK"});function Wa(){var a,n;const t=(a=window.PlayPilotLinkInjections)==null?void 0:a.language,e=Object.values(m);if(t){if(e.includes(t))return t;console.warn(`PlayPilot Link Injections: ${t} is not an accepted language`)}const i=(n=document.querySelector("html"))==null?void 0:n.getAttribute("lang");if(i){if(e.includes(i))return i;const r=e.find(o=>o.toLowerCase().startsWith(i+"-"));if(r)return r}return m.English}function Nr(t,e=""){const i=[],a=[t];for(;a.length>0;){const n=a.pop();if(i.includes(n)||e&&n.matches(e)||/^(A|BUTTON|SCRIPT|NOSCRIPT|STYLE|IFRAME|FIGCAPTION|TIME|LABEL|BLOCKQUOTE|H1)$/.test(n.tagName)||n.offsetWidth<=1)continue;const r=Array.from(n.childNodes).some(c=>{var d;return c.nodeType===Node.TEXT_NODE&&((d=c.nodeValue)==null?void 0:d.trim())!==""});if(r&&n.tagName==="LI"){const c=n.closest("ul, ol");c&&!i.includes(c)&&i.push(c);continue}const o=n.tagName==="P"&&!!n.textContent;if(r||o){i.push(n);continue}const s=Array.from(n.children);for(let c=s.length-1;c>=0;c--)a.push(s[c])}return i}function ga(){var e;const t=(e=window.PlayPilotLinkInjections)==null?void 0:e.selector;if(t){const i=t.replace(/(:)/g,"\\$1"),a=document.querySelector(i);if(a)return a}return document.querySelector("article")||document.querySelector("main")||document.body}function Fo(t){return t.map(e=>e.innerText).join(`
|
|
4
4
|
|
|
5
|
-
`)}function ma(t=(e=>(e=window.PlayPilotLinkInjections)==null?void 0:e.config)()||null){const i=ga(),a=Nr(i,(t==null?void 0:t.exclude_elements_selector)||""),n=Fo(a);return{parentElement:i,elements:a,pageText:n}}function Ho(){const t=ga();return{content_heading:qd(t),content_modified_time:Dd(t),content_published_time:Nd(t)}}function qd(t){const e=t.querySelector("h1")||document.querySelector("h1");return(e==null?void 0:e.innerText.trim())||null}function Dd(t){const e=document.querySelector('meta[property*="modified_time"]')||document.querySelector('meta[name*="modified_time"]')||t.querySelector('[itemprop="dateModified"]')||document.querySelector('[itemprop="dateModified"]')||null,i=Vo().dateModified||(e==null?void 0:e.getAttribute("content"))||(e==null?void 0:e.getAttribute("datetime"))||(e==null?void 0:e.innerText);return i?Rr(i):null}function Nd(t){const e=document.querySelector('meta[property*="published_time"]')||document.querySelector('meta[name*="published_time"]')||t.querySelector('[itemprop="datePublished"]')||document.querySelector('[itemprop="datePublished"]')||t.querySelector("time")||document.querySelector("time")||t.querySelector("[datetime]")||document.querySelector("[datetime]")||null,i=Vo().datePublished||(e==null?void 0:e.getAttribute("content"))||(e==null?void 0:e.getAttribute("datetime"))||(e==null?void 0:e.innerText);return i?Rr(i):null}function Rr(t){try{return new Date(t).toISOString()}catch{return null}}function Vo(){const e=Array.from(document.querySelectorAll('[type="application/ld+json"]')).find(i=>i.textContent.includes("dateModified")||i.textContent.includes("datePublished"));if(!e)return{};try{return JSON.parse(e.textContent||"")}catch{return{}}}function Hi(){const t=location.pathname.replace(/\/+/g,"/");return location.protocol+"//"+location.host+t}function Or(t){return Object.entries(t).filter(([i,a])=>a!=null&&a!=="").map(([i,a])=>`${i}=${a}`).join("&")}function Rd(t){return!!(t.exclude_urls_pattern&&Hi().match(new RegExp(t.exclude_urls_pattern)))}let Br=null;async function Vi({url:t=Hi(),params:e={},method:i="GET"}={}){const a=vi(),n=In()?await Bo():!1,r=Wa();if(!a)throw new Error("No token was provided");const o=`/external-pages/?api-token=${a}&include_title_details=true${n?"&editorial_mode_enabled=true":""}&language=${r}`;let s;if(i==="POST"){const{pageText:c}=ma();e.run_ai&&(e.hash=Md(c||""),e.page_text=c),e.url=t,e.metadata=Ho(),s=await Xt(o,{method:"POST",body:e})}else s=await Xt(o+`&url=${t}`,{method:"GET"});return window.PlayPilotLinkInjections.last_successful_fetch=s,s}async function Uo({requireCompletedResult:t=!1,runAiWhenRelevant:e=!1,pollInterval:i=3e3,maxTries:a=600,onpoll:n=()=>null}={}){let r=0;Br&&clearTimeout(Br);const o=async(s,c)=>{let d;try{try{d=await Vi()}catch(v){throw console.error(v),(v==null?void 0:v.status)===404&&(d=await Vi({method:"POST"}),d.ai_enabled&&(d=await Vi({params:{run_ai:!0},method:"POST"}))),new Error}const{pageText:u}=ma();if(d&&e&&(d=await Od(u,d)),t&&d.ai_enabled&&d.ai_running)throw new Error;d.manual_injections=Wo(d.manual_injections||[]),d.ai_injections=Wo(d.ai_injections||[]),s(d);return}catch{if(r++,r>=a){a>1&&console.error("Max poll limit exceeded. Please return later."),s();return}d&&n(d),Br=setTimeout(()=>o(s),i)}};return new Promise(o)}async function Od(t,e){if(!t||!e.ai_enabled||e.ai_running)return e;const i=Ho().content_modified_time,a=e.content_modified_time?Rr(e.content_modified_time):null,n=i&&a===i;return e.ai_last_run&&n||new Date(i||0)<=new Date(a||0)?e:await Vi({params:{run_ai:!0},method:"POST"})}async function Bd(t){var r;const e=(r=window.PlayPilotLinkInjections)==null?void 0:r.selector,a=t.filter(o=>o.manual).map(o=>({sid:o.sid,title:o.title,sentence:o.sentence,phrase_before:o.phrase_before,phrase_after:o.phrase_after,playpilot_url:o.playpilot_url,after_article:!!o.after_article,after_article_style:o.after_article_style||null,in_text:o.in_text??!0,inactive:!!o.inactive,removed:!!o.removed}));if(!await Vi({method:"POST",params:{private_token:Dr(),manual_injections:a,content_text_selector:e}}))throw new Error("saveLinkInjections response was faulty");return t}function Wo(t){return t.map(e=>({...e,key:Go(e.sid)}))}function Go(t){return t+"-"+jn()}function Fd(t,e,i){return t.filter(a=>i.every(n=>a[n]===e[n])).length}function Hd(t,e){return e.some(i=>t>=i.start&&t<i.end)}function Vd(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function Fr(t){const e=document.createElement("div");return e.innerHTML=t,e.textContent||""}function Ko(t,e,i=[]){var r,o;const a=document.createTreeWalker(e);let n;for(;(n=a.nextNode())&&!((r=n.nodeValue)!=null&&r.includes(t)&&!i.includes(((o=n.parentNode)==null?void 0:o.nodeName)||"")););return n}function Yo(t){const e=t.parentNode;return e?e.nodeName==="A"||!!e.closest("a"):!1}function Ud(t,e,i,a){const n=Vd(e),r=Fr(e),o=t.slice(0,a),s=t.slice(a),c=/[-/\\^$*+?.()|[\]{}]/g,d=new RegExp(`${r.replace(c,"\\$&")}|${n.replace(c,"\\$&")}`),u=s.replace(d,i);return o+u}function Wd(t,e,i,a){return t.substring(0,i)+e+t.substring(a)}function St(t){return Fr(t).toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").replace(/[^a-z0-9]+/g,"")}function Zo(t,e,i){const n=t.indexOf(e),r=Math.floor((i-e.length)/2);let o=Math.max(0,n-r),s=o+i;s>t.length&&(s=t.length,o=Math.max(0,s-i));let c=t.slice(o,s).trim();return o>0&&(c="…"+c),s<t.length&&(c+="…"),c}function Jo(t,e,i){const a=t.nodeType===Node.TEXT_NODE&&t.parentNode?t.parentElement:t;if(!a||!t.textContent)return{before:"",after:""};const n=Math.max(a.innerText.indexOf(t.textContent),0),r=Qo(a.innerText.slice(0,e+n)),o=a.innerText.slice(i+n),s=Qo(Xo(r,2)),c=Xo(o,2);return{before:s,after:c}}function Qo(t){return t.split("").reverse().join("")}function Xo(t,e=1){const i=t.match(/[^\s]+/g);return i?i.slice(0,e).join(" ").replace(/[.,!?;:]+$/u,""):""}function zn(t,e){let i=0,a=0;for(;(a=t.indexOf(e,a))!==-1;)i++,a+=e.length;return i}function Gd(t,e,i){const a=[];let n=0;for(;n<=t.length;){const r=e?t.indexOf(e,n):n;if(r===-1&&e)break;const o=e?r+e.length:r,s=i?t.indexOf(i,o):t.length;if(i&&s===-1)break;const c=t.slice(o,s);a.push({match:c,index:o}),n=i?s+i.length:t.length+1}return a}function Kd(t,e,i,a){const r=Gd(t,i,a).filter(({match:s})=>Fr(s).includes(e));return r.length?r.reduce((s,c)=>!s||c.match.length<s.match.length?c:s):null}function Yd(t){var e,i;return{leadingSpaces:((e=t.match(/^\s*/))==null?void 0:e[0].length)||0,trailingSpaces:((i=t.match(/\s*$/))==null?void 0:i[0].length)||0}}function Zd(t,e,i=0){const a=e.innerHTML,n=[],r=Jd(e);let o=a.indexOf(t);for(;o!==-1;)Hd(o,r)&&n.push(o),o=a.indexOf(t,o+t.length);return n[i]??-1}function Jd(t){const e=[],i=t.innerHTML;let a=!1,n=!1,r=!1,o=0;for(let s=0;s<i.length;s++){const c=i[s];if(!n&&!a&&c==="<"){a=!0,r&&(e.push({start:o,end:s}),r=!1);continue}if(a&&c==='"'&&(n=!n),a&&!n&&c===">"){a=!1;continue}!a&&!n&&!r&&(o=s,r=!0)}return!e.length&&t.textContent.length&&e.push({start:o,end:t.innerHTML.length}),e}function Qd(t,e){const i=[" ",".",",","<",">"];try{const a=i.map(s=>"\\"+s).join(""),n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`([${a}])${n}([${a}])`),o=e.match(r);return o!=null&&o.index?o.index+1:-1}catch{return-1}}function $o(t){return t.ctrlKey||t.metaKey||t.button!==0}const pe={ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",InjectionVisible:"ali_injection_visible",UserLeft:"ali_user_left",TitleModalView:"ali_title_modal_view",TitleModalClose:"ali_title_modal_close",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",ParticipantModalView:"ali_participant_modal_view",ParticipantModalClose:"ali_participant_modal_close",TitlePopoverView:"ali_title_popover_view",TitlePopoverClose:"ali_title_popover_close",TitlePopoverSaveClick:"ali_title_popover_save_click",TitlePopoverPlaylinkClick:"ali_title_popover_playlink_click",SimilarTitleClick:"ali_similar_title_click",ParticipantClick:"ali_title_participant_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed",TotalInjectionsCount:"ali_injection_count",FailedInjectionsCount:"ali_failed_injection_count",FetchingConfigFailed:"ali_fetch_config_failed",AuthFailed:"ali_auth_failed",ManualReport:"ali_manual_report",EditorError:"ali_editor_error",InjectionError:"ali_injection_error",ExploreResultsError:"venus_explore_results_error",ExploreHomeRailError:"venus_explore_home_rail_error",TopScrollView:"ali_top_scroll_view",TopScrollClick:"ali_top_scroll_click",DisplayAdView:"ali_display_ad_view",DisplayAdClick:"ali_display_ad_click",DisplayedAdPlaylickClick:"ali_display_ad_playlink_click",AdsFetchFailed:"ali_ads_fetch_failed",SplitTestView:"ali_split_test_view",SplitTestAction:"ali_split_test_action",ShareTitle:"ali_share_title",SaveTitle:"ali_save_title",NotifyTitle:"ali_notify_title",TrailerClick:"ali_trailer_button_click",ExpandTitleDescription:"ali_expand_title_description",RegionRequestFailed:"ali_region_request_failed",YouTubeAvailabilityRequestFailed:"ali_youtube_availability_request_failed",CardToExploreCta:"ali_card_to_explore_cta",ExplorePageView:"venus_page_view",ExploreTitleClick:"venus_title_click",ExploreShowMore:"venus_show_more",ExploreSetFilter:"venus_set_filter",ExploreSearch:"venus_search",ExploreFetchProvidersFailed:"venus_fetch_providers_failed",ExploreTitleRailModalView:"venus_title_rail_modal_view",ExploreTitleRailExpandClick:"venus_title_rail_expand_click",ExploreTitleRailSetIndex:"venus_title_rail_set_index",ExploreNavigate:"venus_navigate",ExploreAnyClick:"venus_any_click",ExploreScrollDistance:"venus_scroll_distance"},Dt={ProviderInterest:"ProviderInterest",ProviderClick:"ProviderClick",ParticipantInterest:"ParticipantInterest",ParticipantView:"ParticipantView",SearchQuery:"SearchQuery",GenreInterest:"GenreInterest",TitleInterest:"TitleInterest"},Ti={Card:"tpi_card",Link:"tpi_link"};function Xd(t){window.PlayPilotLinkInjections&&(window.PlayPilotLinkInjections.consents=t)}function Tt(t){var e;return window.PlayPilotLinkInjections.require_consent===!1?!0:!!((e=window.PlayPilotLinkInjections.consents)!=null&&e[t])}function An(){const t=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(t)}const Ln=[{slug:"101",name:"Action",categories:{documentary:50,kids:86,series:90,cinema:90,movie:90}},{slug:"102",name:"Animation",categories:{series:50,cinema:50,kids:90,documentary:48,movie:50}},{slug:"103",name:"Kids",categories:{kids:76}},{slug:"104",name:"Biography",categories:{series:46,documentary:88,cinema:10,movie:46}},{slug:"105",name:"Crime",categories:{series:84,documentary:86,cinema:64,movie:84}},{slug:"106",name:"Documentary",categories:{kids:50}},{slug:"107",name:"Drama",categories:{series:82,movie:82,cinema:88,documentary:44}},{slug:"108",name:"Nature",categories:{kids:48,documentary:76,series:28}},{slug:"109",name:"Adventure",categories:{kids:88,cinema:86,documentary:82,series:88,movie:88}},{slug:"110",name:"Family",categories:{series:40,cinema:40,movie:40}},{slug:"111",name:"Fantasy",categories:{kids:78,cinema:74,documentary:42,movie:38,series:38}},{slug:"112",name:"Film Noir",categories:{movie:37}},{slug:"113",name:"Game Show",categories:{series:36,kids:28}},{slug:"114",name:"History",categories:{movie:35,kids:44,cinema:10,series:80,documentary:90}},{slug:"115",name:"Comedy",categories:{cinema:84,documentary:46,series:86,kids:82,movie:86}},{slug:"116",name:"War",categories:{movie:14,documentary:68,series:14,cinema:66}},{slug:"117",name:"Musical",categories:{kids:30,movie:78,cinema:8,series:30}},{slug:"118",name:"Music",categories:{kids:72,cinema:9,documentary:78,movie:32,series:32}},{slug:"119",name:"Mystery",categories:{movie:76,cinema:70,kids:26,documentary:38,series:76}},{slug:"120",name:"News",categories:{series:26,documentary:36,kids:38}},{slug:"121",name:"Reality TV",categories:{series:24}},{slug:"122",name:"Romance",categories:{documentary:34,cinema:78,movie:74,series:74}},{slug:"123",name:"Sci-Fi",categories:{series:72,movie:72,cinema:68,kids:70,documentary:32}},{slug:"124",name:"Horror",categories:{cinema:76,documentary:40,series:78,movie:80}},{slug:"125",name:"Sport",categories:{cinema:7,kids:68,series:20,documentary:70,movie:20}},{slug:"126",name:"Talk Show",categories:{kids:34,series:16}},{slug:"127",name:"Thriller",categories:{series:70,documentary:28,cinema:80,movie:70}},{slug:"128",name:"Western",categories:{movie:12,series:12,documentary:24}},{slug:"129",name:"Anime",categories:{cinema:5,movie:48,kids:84,series:48}},{slug:"202",name:"Culture",categories:{kids:40,documentary:84,series:44}},{slug:"208",name:"Short",categories:{movie:21,documentary:30,kids:36}},{slug:"212",name:"Entertainment",categories:{kids:80,series:42,movie:42}},{slug:"222",name:"Lifestyle",categories:{documentary:80,kids:74,series:34}},{slug:"227",name:"Science",categories:{series:22,kids:46,documentary:74}},{slug:"232",name:"Stand-up",categories:{movie:18,series:18}},{slug:"240",name:"Concert",categories:{movie:45}},{slug:"900",name:"Independent",categories:{}},{slug:"901",name:"Arthouse",categories:{}},{slug:"902",name:"Bollywood",categories:{}},{slug:"903",name:"Alternate Version",categories:{}},{slug:"999",name:"Unscripted",categories:{}}];function $d(t=[]){return t.map(e=>{var i;return((i=Ln.find(a=>a.slug===e))==null?void 0:i.name)||""}).filter(Boolean)}const Hr="playpilot_user_id";function eu(){if(!es())return null;try{const t=localStorage.getItem(Hr);return t||(localStorage.setItem(Hr,jn(16)),localStorage.getItem(Hr))}catch{return null}}function es(){var t,e;return!!((e=(t=window.PlayPilotLinkInjections)==null?void 0:t.config)!=null&&e.allow_user_id_tracking)&&Tt("tracking")}const tu="https://insights.playpilot.net";async function fe(t,e=null,i={}){var n,r,o,s,c;if(An())return;if(!Tt("tracking")){au(t,e,i);return}const a=new Headers({"Content-Type":"application/json"});e&&(i={original_title:e.original_title,title:e.title,title_sid:e.sid,title_type:e.type,genres:$d(e.genres),providers:[...new Set(((n=e.providers)==null?void 0:n.map(d=>d.name))||[])],...i}),es()&&(i.user_id=eu(),i.region=window.PlayPilotLinkInjections.region),i.version="8.14.0-beta.2",i.time_since_initialize=(r=window.PlayPilotLinkInjections)!=null&&r.time_at_initialize?Date.now()-window.PlayPilotLinkInjections.time_at_initialize:0,i.url=Hi(),i.organization_sid=((o=window.PlayPilotLinkInjections)==null?void 0:o.organization_sid)||"undefined",i.domain_sid=((s=window.PlayPilotLinkInjections)==null?void 0:s.domain_sid)||"undefined",i.device={type:window.innerWidth>pi?"desktop":"mobile",width:window.innerWidth,height:window.innerHeight,touch:window.matchMedia("(pointer: coarse)").matches,orientation:((c=screen.orientation)==null?void 0:c.type)||"undefined"},fetch(tu,{headers:a,method:"POST",body:JSON.stringify({event:t,payload:i,source:"ali",keepalive:!0})}),iu({event:t,payload:i})}function iu(t){var e;window.PlayPilotLinkInjections.tracked_events||(window.PlayPilotLinkInjections.tracked_events=[]),(e=window.PlayPilotLinkInjections.tracked_events)==null||e.push(t)}function ts({organizationSid:t=null,domainSid:e=null}){window.PlayPilotLinkInjections.organization_sid=t||null,window.PlayPilotLinkInjections.domain_sid=e||null}function au(t,e=null,i={}){var a;(a=window.PlayPilotLinkInjections).queued_tracking_events||(a.queued_tracking_events=[]),window.PlayPilotLinkInjections.queued_tracking_events.push({event:t,title:e,payload:i})}function nu(){if(Tt("tracking")){for(const{event:t,title:e,payload:i}of window.PlayPilotLinkInjections.queued_tracking_events||[])fe(t,e,i);window.PlayPilotLinkInjections.queued_tracking_events=[]}}async function is(){if(!Tt("ads"))return[];const t=vi();if(!t)throw new Error("No token was provided");try{return await Xt(`/ads/browse/?api-token=${t}`)}catch(e){throw fe(pe.AdsFetchFailed,null,{status:e.status}),e}}function Ga(t){var e;return!Tt("ads")||window.PlayPilotLinkInjections.no_affiliate?null:(((e=window.PlayPilotLinkInjections)==null?void 0:e.ads)||[]).find(i=>i.campaign_format===t)||null}function ru(t){return{sid:"",name:t.content.header||"",url:t.cta.url||"",logo_url:t.cta.image||"",highlighted:!0,cta_text:t.content.subheader,action_text:t.cta.header,slug:t.campaign_name,extra_info:{category:"SVOD"}}}async function Vr(t=5e3){var i,a,n,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.region;if(e)return e;try{const s=await(await fetch("https://api.country.is/",{signal:AbortSignal.timeout(t)})).json();let c=(a=s==null?void 0:s.country)==null?void 0:a.toLowerCase();if(!c)throw new Error("No country was returned by api.country.is");return c==="gb"&&(c="uk"),lu(c),c}catch(o){return fe(pe.RegionRequestFailed,null,{message:o.message}),((r=(n=window.PlayPilotLinkInjections)==null?void 0:n.config)==null?void 0:r.fallback_region)||""}}function lu(t){window.PlayPilotLinkInjections&&(window.PlayPilotLinkInjections.region=t)}async function Mn(t={}){const e=vi();if(!e)throw new Error("No token was provided");return t={...t,language:Wa(),include_count:"false"},t.region!==null&&(t.region=t.region||await Vr()),await Xt(`/titles/browse?api-token=${e}&`+Or(t))}async function as(t){return(await Mn({related_to_sid:t.sid})).results}async function ns(t){const i=(await Mn({sids:t})).results[0];if(!i)throw new Error("No title was returned for sid: "+t);return i}const ou={"Where To Stream Online":{[m.English]:"Where to stream online",[m.Swedish]:"Var kan man streama online",[m.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[m.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[m.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[m.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"In-Text Disclaimer":{[m.English]:"We may earn a commission from purchases made through some of the links below.",[m.Swedish]:"Vi kan få en provision för köp som görs via några av länkarna nedan.",[m.Danish]:"Vi kan modtage en kommission for køb foretaget gennem nogle af nedenstående links."},"An Error Occurred":{[m.English]:"An error occurred",[m.Swedish]:"Ett fel inträffade",[m.Danish]:"Der opstod en fejl"},Loading:{[m.English]:"Loading",[m.Swedish]:"Laddar",[m.Danish]:"Indlæser"},"Title Unavailable":{[m.English]:"This title is not currently available to stream.",[m.Swedish]:"Den här titeln går inte att streama just nu.",[m.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[m.English]:"is not currently available to stream.",[m.Swedish]:"går inte att streama just nu.",[m.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[m.English]:"is available to stream on",[m.Swedish]:"finns att streama på",[m.Danish]:"kan streames på"},"Is Available To Stream":{[m.English]:"is available to stream.",[m.Swedish]:"finns att streama.",[m.Danish]:"kan streames."},"View Streaming Options":{[m.English]:"View streaming options",[m.Swedish]:"Se streamingalternativ",[m.Danish]:"Se streamingmuligheder"},"Commission Disclaimer":{[m.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[m.Swedish]:"Vi kan tjäna en provision om du gör ett köp via dessa länkar. I samarbete med",[m.Danish]:"Vi kan tjene en kommission, hvis du foretager et køb via disse links. I samarbejde med"},And:{[m.English]:"and",[m.Swedish]:"och",[m.Danish]:"og"},Minutes:{[m.English]:"minutes",[m.Swedish]:"minuter",[m.Danish]:"minutter"},"Type: movie":{[m.English]:"Movie",[m.Swedish]:"Film",[m.Danish]:"Film"},"Type: series":{[m.English]:"Series",[m.Swedish]:"Serie",[m.Danish]:"Serie"},Stream:{[m.English]:"Stream",[m.Swedish]:"Streama",[m.Danish]:"Stream"},Buy:{[m.English]:"Buy",[m.Swedish]:"Köp",[m.Danish]:"Køb"},Rent:{[m.English]:"Rent",[m.Swedish]:"Hyr",[m.Danish]:"Lej"},"Rent Or Buy":{[m.English]:"Rent or Buy",[m.Swedish]:"Hyr/köp",[m.Danish]:"Lej eller køb"},Watch:{[m.English]:"Watch",[m.Swedish]:"Titta nu",[m.Danish]:"Se nu"},"Category: AVOD":{[m.English]:"Stream for free",[m.Swedish]:"Streama gratis",[m.Danish]:"Stream gratis"},"Category: SVOD":{[m.English]:"Streaming services",[m.Swedish]:"Streamingtjänster",[m.Danish]:"Streamingtjenester"},"Category: RENT":{[m.English]:"Rent it",[m.Swedish]:"Hyr den",[m.Danish]:"Lej den"},"Category: BUY":{[m.English]:"Buy it",[m.Swedish]:"Köp den",[m.Danish]:"Køb den"},"Category: Other":{[m.English]:"Other",[m.Swedish]:"Annat",[m.Danish]:"Andet"},Share:{[m.English]:"Share",[m.Swedish]:"Dela",[m.Danish]:"Del"},"Copy URL":{[m.English]:"Copy URL",[m.Swedish]:"Kopiera URL",[m.Danish]:"Kopiér URL"},Email:{[m.English]:"Email",[m.Swedish]:"E-post",[m.Danish]:"E-mail"},"Show More":{[m.English]:"Show more",[m.Swedish]:"Visa mer",[m.Danish]:"Vis mere"},Cast:{[m.English]:"Cast",[m.Swedish]:"Rollista",[m.Danish]:"Skuespillere"},"Similar Titles":{[m.English]:"Similar movies & shows",[m.Swedish]:"Liknande filmer och serier",[m.Danish]:"Lignende film og serier"},"Watch Trailer":{[m.English]:"Watch trailer",[m.Swedish]:"Se trailer",[m.Danish]:"Se trailer"},"Streaming Guide":{[m.English]:"Streaming Guide",[m.Swedish]:"Streaming Guide",[m.Danish]:"Streaming Guide"},"Streaming Guide Subheading":{[m.English]:"Discover and search all movies and tv-shows",[m.Swedish]:"Upptäck och sök bland alla filmer och tv-serier",[m.Danish]:"Opdag og søg i alle film og tv-serier"},"Streaming Guide Description":{[m.English]:"Find where to watch movies online - the ultimate guide that helps you find the best movies and shows across streaming services.",[m.Swedish]:"Sök bland alla filmer och serier för att ta reda på var du kan streama dem",[m.Danish]:"Find ud af, hvor du kan se film online - den ultimative guide, der hjælper dig med at finde de bedste film og serier på streamingtjenester."},"Search Movies And Shows":{[m.English]:"Search movies and shows",[m.Swedish]:"Sök filmer och serier",[m.Danish]:"Søg film og serier"},Services:{[m.English]:"Services",[m.Swedish]:"Tjänster",[m.Danish]:"Tjenester"},Genres:{[m.English]:"Genres",[m.Swedish]:"Genrer",[m.Danish]:"Genrer"},IMDb:{[m.English]:"IMDb",[m.Swedish]:"IMDb",[m.Danish]:"IMDb"},Year:{[m.English]:"Year",[m.Swedish]:"År",[m.Danish]:"År"},Runtime:{[m.English]:"Runtime",[m.Swedish]:"Speltid",[m.Danish]:"Spilletid"},Countries:{[m.English]:"Countries",[m.Swedish]:"Länder",[m.Danish]:"Lande"},"All Filters":{[m.English]:"All filters",[m.Swedish]:"Alla filter",[m.Danish]:"Alle filtre"},"Sort By":{[m.English]:"Sort by",[m.Swedish]:"Sortera efter",[m.Danish]:"Sortér efter"},Popularity:{[m.English]:"Popularity",[m.Swedish]:"Popularitet",[m.Danish]:"Popularitet"},New:{[m.English]:"New",[m.Swedish]:"Nytt",[m.Danish]:"Nyt"},"Top Rated":{[m.English]:"Top Rated",[m.Swedish]:"Toppbetyg",[m.Danish]:"Højst vurderet"},"-popularity":{[m.English]:"Popularity",[m.Swedish]:"Popularitet",[m.Danish]:"Popularitet"},"-new":{[m.English]:"New",[m.Swedish]:"Nytt",[m.Danish]:"Nyt"},"-best":{[m.English]:"Top Rated",[m.Swedish]:"Toppbetyg",[m.Danish]:"Højst vurderet"},Search:{[m.English]:"Search",[m.Swedish]:"Sök",[m.Danish]:"Søg"},"Born On":{[m.English]:"Born on",[m.Swedish]:"Född den",[m.Danish]:"Født den"},"Died On":{[m.English]:"Died on",[m.Swedish]:"Död den",[m.Danish]:"Død den"},Credits:{[m.English]:"Credits",[m.Swedish]:"Medverkande",[m.Danish]:"Medvirkende"},Home:{[m.English]:"Home",[m.Swedish]:"Hem",[m.Danish]:"Hjem"},Explore:{[m.English]:"Explore",[m.Swedish]:"Utforska",[m.Danish]:"Udforsk"},"Page Not Found":{[m.English]:"Page not found",[m.Swedish]:"Sidan hittades inte",[m.Danish]:"Siden blev ikke fundet"},"List: Trending":{[m.English]:"Trending Movies & Shows",[m.Swedish]:"Trendande Titlar",[m.Danish]:"Populære film og serier"},"List: Upcoming":{[m.English]:"Upcoming Releases",[m.Swedish]:"Kommande Premiärer",[m.Danish]:"Mest ventede film"},"List: New":{[m.English]:"New Releases",[m.Swedish]:"Nya Filmer & Serier",[m.Danish]:"Nye film og serier"},"List: Demand":{[m.English]:"Always in Demand",[m.Swedish]:"Tidlösa Favoriter",[m.Danish]:"Tidløse favoritter"},"List: Cinema":{[m.English]:"Coming to Cinemas",[m.Swedish]:"Snart på Bio",[m.Danish]:"Kommende film"},All:{[m.English]:"All",[m.Swedish]:"Alla",[m.Danish]:"Alle"},Unscripted:{[m.English]:"Unscripted",[m.Swedish]:"Oscripterat",[m.Danish]:"Umanuskriptet"},Independent:{[m.English]:"Independent",[m.Swedish]:"Indie",[m.Danish]:"Indie"},"Game Show":{[m.English]:"Game Show",[m.Swedish]:"Gameshow",[m.Danish]:"Quizshow"},"Film Noir":{[m.English]:"Film Noir",[m.Swedish]:"Film noir",[m.Danish]:"Film noir"},Entertainment:{[m.English]:"Entertainment",[m.Swedish]:"Underhållning",[m.Danish]:"Underholdning"},News:{[m.English]:"News",[m.Swedish]:"Nyheter",[m.Danish]:"Nyheder"},Short:{[m.English]:"Short",[m.Swedish]:"Kortfilm",[m.Danish]:"Kortfilm"},Bollywood:{[m.English]:"Bollywood",[m.Swedish]:"Bollywood",[m.Danish]:"Bollywood"},Concert:{[m.English]:"Concert",[m.Swedish]:"Konsert",[m.Danish]:"Koncert"},Arthouse:{[m.English]:"Arthouse",[m.Swedish]:"Arthouse",[m.Danish]:"Arthouse"},"Alternate Version":{[m.English]:"Alternate Version",[m.Swedish]:"Alternativ version",[m.Danish]:"Alternativ version"},"Reality TV":{[m.English]:"Reality TV",[m.Swedish]:"Reality-TV",[m.Danish]:"Reality-TV"},Culture:{[m.English]:"Culture",[m.Swedish]:"Kultur",[m.Danish]:"Kultur"},Drama:{[m.English]:"Drama",[m.Swedish]:"Drama",[m.Danish]:"Drama"},Crime:{[m.English]:"Crime",[m.Swedish]:"Kriminal",[m.Danish]:"Krimi"},Western:{[m.English]:"Western",[m.Swedish]:"Western",[m.Danish]:"Western"},Thriller:{[m.English]:"Thriller",[m.Swedish]:"Thriller",[m.Danish]:"Thriller"},Animation:{[m.English]:"Animation",[m.Swedish]:"Animerat",[m.Danish]:"Animation"},Mystery:{[m.English]:"Mystery",[m.Swedish]:"Mysterium",[m.Danish]:"Mysterium"},Science:{[m.English]:"Science",[m.Swedish]:"Vetenskap",[m.Danish]:"Videnskab"},Nature:{[m.English]:"Nature",[m.Swedish]:"Natur",[m.Danish]:"Natur"},War:{[m.English]:"War",[m.Swedish]:"Krig",[m.Danish]:"Krig"},"Sci-Fi":{[m.English]:"Sci-Fi",[m.Swedish]:"Sci-fi",[m.Danish]:"Sci-fi"},Documentary:{[m.English]:"Documentary",[m.Swedish]:"Dokumentär",[m.Danish]:"Dokumentar"},"Stand-up":{[m.English]:"Stand-up",[m.Swedish]:"Standup",[m.Danish]:"Stand-up"},"Talk Show":{[m.English]:"Talk Show",[m.Swedish]:"Talkshow",[m.Danish]:"Talkshow"},Fantasy:{[m.English]:"Fantasy",[m.Swedish]:"Fantasy",[m.Danish]:"Fantasy"},History:{[m.English]:"History",[m.Swedish]:"Historia",[m.Danish]:"Historie"},Adventure:{[m.English]:"Adventure",[m.Swedish]:"Äventyr",[m.Danish]:"Eventyr"},Action:{[m.English]:"Action",[m.Swedish]:"Action",[m.Danish]:"Action"},Horror:{[m.English]:"Horror",[m.Swedish]:"Skräck",[m.Danish]:"Gyser"},Comedy:{[m.English]:"Comedy",[m.Swedish]:"Komedi",[m.Danish]:"Komedie"},Biography:{[m.English]:"Biography",[m.Swedish]:"Biografi",[m.Danish]:"Biografi"},Music:{[m.English]:"Music",[m.Swedish]:"Musik",[m.Danish]:"Musik"},Sport:{[m.English]:"Sport",[m.Swedish]:"Sport",[m.Danish]:"Sport"},Romance:{[m.English]:"Romance",[m.Swedish]:"Romantik",[m.Danish]:"Romantik"},Kids:{[m.English]:"Kids",[m.Swedish]:"Barn",[m.Danish]:"Børn"},Lifestyle:{[m.English]:"Lifestyle",[m.Swedish]:"Livsstil",[m.Danish]:"Livsstil"},Musical:{[m.English]:"Musical",[m.Swedish]:"Musikal",[m.Danish]:"Musical"},Anime:{[m.English]:"Anime",[m.Swedish]:"Anime",[m.Danish]:"Anime"},Family:{[m.English]:"Family",[m.Swedish]:"Familj",[m.Danish]:"Familie"}};function ve(t,e=Wa()){var i;return((i=ou[t])==null?void 0:i[e])||t}const qn=Object.freeze({Popular:"-popularity",New:"-new",Best:"-best"}),su=t=>t;function Ur(t){const e=t-1;return e*e*e+1}function rs(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Pt(t,{delay:e=0,duration:i=400,easing:a=su}={}){const n=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:a,css:r=>`opacity: ${r*n}`}}function ya(t,{delay:e=0,duration:i=400,easing:a=Ur,x:n=0,y:r=0,opacity:o=0}={}){const s=getComputedStyle(t),c=+s.opacity,d=s.transform==="none"?"":s.transform,u=c*(1-o),[v,p]=rs(n),[h,g]=rs(r);return{delay:e,duration:i,easing:a,css:(f,_)=>`
|
|
5
|
+
`)}function ma(t=(e=>(e=window.PlayPilotLinkInjections)==null?void 0:e.config)()||null){const i=ga(),a=Nr(i,(t==null?void 0:t.exclude_elements_selector)||""),n=Fo(a);return{parentElement:i,elements:a,pageText:n}}function Ho(){const t=ga();return{content_heading:qd(t),content_modified_time:Dd(t),content_published_time:Nd(t)}}function qd(t){const e=t.querySelector("h1")||document.querySelector("h1");return(e==null?void 0:e.innerText.trim())||null}function Dd(t){const e=document.querySelector('meta[property*="modified_time"]')||document.querySelector('meta[name*="modified_time"]')||t.querySelector('[itemprop="dateModified"]')||document.querySelector('[itemprop="dateModified"]')||null,i=Vo().dateModified||(e==null?void 0:e.getAttribute("content"))||(e==null?void 0:e.getAttribute("datetime"))||(e==null?void 0:e.innerText);return i?Rr(i):null}function Nd(t){const e=document.querySelector('meta[property*="published_time"]')||document.querySelector('meta[name*="published_time"]')||t.querySelector('[itemprop="datePublished"]')||document.querySelector('[itemprop="datePublished"]')||t.querySelector("time")||document.querySelector("time")||t.querySelector("[datetime]")||document.querySelector("[datetime]")||null,i=Vo().datePublished||(e==null?void 0:e.getAttribute("content"))||(e==null?void 0:e.getAttribute("datetime"))||(e==null?void 0:e.innerText);return i?Rr(i):null}function Rr(t){try{return new Date(t).toISOString()}catch{return null}}function Vo(){const e=Array.from(document.querySelectorAll('[type="application/ld+json"]')).find(i=>i.textContent.includes("dateModified")||i.textContent.includes("datePublished"));if(!e)return{};try{return JSON.parse(e.textContent||"")}catch{return{}}}function Hi(){const t=location.pathname.replace(/\/+/g,"/");return location.protocol+"//"+location.host+t}function Or(t){return Object.entries(t).filter(([i,a])=>a!=null&&a!=="").map(([i,a])=>`${i}=${a}`).join("&")}function Rd(t){return!!(t.exclude_urls_pattern&&Hi().match(new RegExp(t.exclude_urls_pattern)))}let Br=null;async function Vi({url:t=Hi(),params:e={},method:i="GET"}={}){const a=vi(),n=In()?await Bo():!1,r=Wa();if(!a)throw new Error("No token was provided");const o=`/external-pages/?api-token=${a}&include_title_details=true${n?"&editorial_mode_enabled=true":""}&language=${r}`;let s;if(i==="POST"){const{pageText:c}=ma();e.run_ai&&(e.hash=Md(c||""),e.page_text=c),e.url=t,e.metadata=Ho(),s=await Xt(o,{method:"POST",body:e})}else s=await Xt(o+`&url=${t}`,{method:"GET"});return window.PlayPilotLinkInjections.last_successful_fetch=s,s}async function Uo({requireCompletedResult:t=!1,runAiWhenRelevant:e=!1,pollInterval:i=3e3,maxTries:a=600,onpoll:n=()=>null}={}){let r=0;Br&&clearTimeout(Br);const o=async(s,c)=>{let d;try{try{d=await Vi()}catch(v){throw console.error(v),(v==null?void 0:v.status)===404&&(d=await Vi({method:"POST"}),d.ai_enabled&&(d=await Vi({params:{run_ai:!0},method:"POST"}))),new Error}const{pageText:u}=ma();if(d&&e&&(d=await Od(u,d)),t&&d.ai_enabled&&d.ai_running)throw new Error;d.manual_injections=Wo(d.manual_injections||[]),d.ai_injections=Wo(d.ai_injections||[]),s(d);return}catch{if(r++,r>=a){a>1&&console.error("Max poll limit exceeded. Please return later."),s();return}d&&n(d),Br=setTimeout(()=>o(s),i)}};return new Promise(o)}async function Od(t,e){if(!t||!e.ai_enabled||e.ai_running)return e;const i=Ho().content_modified_time,a=e.content_modified_time?Rr(e.content_modified_time):null,n=i&&a===i;return e.ai_last_run&&n||new Date(i||0)<=new Date(a||0)?e:await Vi({params:{run_ai:!0},method:"POST"})}async function Bd(t){var r;const e=(r=window.PlayPilotLinkInjections)==null?void 0:r.selector,a=t.filter(o=>o.manual).map(o=>({sid:o.sid,title:o.title,sentence:o.sentence,phrase_before:o.phrase_before,phrase_after:o.phrase_after,playpilot_url:o.playpilot_url,after_article:!!o.after_article,after_article_style:o.after_article_style||null,in_text:o.in_text??!0,inactive:!!o.inactive,removed:!!o.removed}));if(!await Vi({method:"POST",params:{private_token:Dr(),manual_injections:a,content_text_selector:e}}))throw new Error("saveLinkInjections response was faulty");return t}function Wo(t){return t.map(e=>({...e,key:Go(e.sid)}))}function Go(t){return t+"-"+jn()}function Fd(t,e,i){return t.filter(a=>i.every(n=>a[n]===e[n])).length}function Hd(t,e){return e.some(i=>t>=i.start&&t<i.end)}function Vd(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function Fr(t){const e=document.createElement("div");return e.innerHTML=t,e.textContent||""}function Ko(t,e,i=[]){var r,o;const a=document.createTreeWalker(e);let n;for(;(n=a.nextNode())&&!((r=n.nodeValue)!=null&&r.includes(t)&&!i.includes(((o=n.parentNode)==null?void 0:o.nodeName)||"")););return n}function Yo(t){const e=t.parentNode;return e?e.nodeName==="A"||!!e.closest("a"):!1}function Ud(t,e,i,a){const n=Vd(e),r=Fr(e),o=t.slice(0,a),s=t.slice(a),c=/[-/\\^$*+?.()|[\]{}]/g,d=new RegExp(`${r.replace(c,"\\$&")}|${n.replace(c,"\\$&")}`),u=s.replace(d,i);return o+u}function Wd(t,e,i,a){return t.substring(0,i)+e+t.substring(a)}function St(t){return Fr(t).toLowerCase().normalize("NFD").replace(new RegExp("\\p{Diacritic}","gu"),"").replace(/[^a-z0-9]+/g,"")}function Zo(t,e,i){const n=t.indexOf(e),r=Math.floor((i-e.length)/2);let o=Math.max(0,n-r),s=o+i;s>t.length&&(s=t.length,o=Math.max(0,s-i));let c=t.slice(o,s).trim();return o>0&&(c="…"+c),s<t.length&&(c+="…"),c}function Jo(t,e,i){const a=t.nodeType===Node.TEXT_NODE&&t.parentNode?t.parentElement:t;if(!a||!t.textContent)return{before:"",after:""};const n=Math.max(a.innerText.indexOf(t.textContent),0),r=Qo(a.innerText.slice(0,e+n)),o=a.innerText.slice(i+n),s=Qo(Xo(r,2)),c=Xo(o,2);return{before:s,after:c}}function Qo(t){return t.split("").reverse().join("")}function Xo(t,e=1){const i=t.match(/[^\s]+/g);return i?i.slice(0,e).join(" ").replace(/[.,!?;:]+$/u,""):""}function zn(t,e){let i=0,a=0;for(;(a=t.indexOf(e,a))!==-1;)i++,a+=e.length;return i}function Gd(t,e,i){const a=[];let n=0;for(;n<=t.length;){const r=e?t.indexOf(e,n):n;if(r===-1&&e)break;const o=e?r+e.length:r,s=i?t.indexOf(i,o):t.length;if(i&&s===-1)break;const c=t.slice(o,s);a.push({match:c,index:o}),n=i?s+i.length:t.length+1}return a}function Kd(t,e,i,a){const r=Gd(t,i,a).filter(({match:s})=>Fr(s).includes(e));return r.length?r.reduce((s,c)=>!s||c.match.length<s.match.length?c:s):null}function Yd(t){var e,i;return{leadingSpaces:((e=t.match(/^\s*/))==null?void 0:e[0].length)||0,trailingSpaces:((i=t.match(/\s*$/))==null?void 0:i[0].length)||0}}function Zd(t,e,i=0){const a=e.innerHTML,n=[],r=Jd(e);let o=a.indexOf(t);for(;o!==-1;)Hd(o,r)&&n.push(o),o=a.indexOf(t,o+t.length);return n[i]??-1}function Jd(t){const e=[],i=t.innerHTML;let a=!1,n=!1,r=!1,o=0;for(let s=0;s<i.length;s++){const c=i[s];if(!n&&!a&&c==="<"){a=!0,r&&(e.push({start:o,end:s}),r=!1);continue}if(a&&c==='"'&&(n=!n),a&&!n&&c===">"){a=!1;continue}!a&&!n&&!r&&(o=s,r=!0)}return!e.length&&t.textContent.length&&e.push({start:o,end:t.innerHTML.length}),e}function Qd(t,e){const i=[" ",".",",","<",">"];try{const a=i.map(s=>"\\"+s).join(""),n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=new RegExp(`([${a}])${n}([${a}])`),o=e.match(r);return o!=null&&o.index?o.index+1:-1}catch{return-1}}function $o(t){return t.ctrlKey||t.metaKey||t.button!==0}const pe={ArticlePageView:"ali_article_page_view",ArticleInjected:"ali_links_injected",InjectionVisible:"ali_injection_visible",UserLeft:"ali_user_left",TitleModalView:"ali_title_modal_view",TitleModalClose:"ali_title_modal_close",TitleModalScroll:"ali_title_modal_scroll",TitleModalPlaylinkClick:"ali_title_modal_playlink_click",TitleModalSaveClick:"ali_title_modal_save_click",ParticipantModalView:"ali_participant_modal_view",ParticipantModalClose:"ali_participant_modal_close",TitlePopoverView:"ali_title_popover_view",TitlePopoverClose:"ali_title_popover_close",TitlePopoverSaveClick:"ali_title_popover_save_click",TitlePopoverPlaylinkClick:"ali_title_popover_playlink_click",SimilarTitleClick:"ali_similar_title_click",ParticipantClick:"ali_title_participant_click",AfterArticlePlaylinkClick:"ali_after_article_playlink_click",AfterArticleModalButtonClick:"ali_after_article_modal_button_click",InjectionFailed:"ali_injection_failed",TotalInjectionsCount:"ali_injection_count",FailedInjectionsCount:"ali_failed_injection_count",FetchingConfigFailed:"ali_fetch_config_failed",AuthFailed:"ali_auth_failed",ManualReport:"ali_manual_report",EditorError:"ali_editor_error",InjectionError:"ali_injection_error",ExploreResultsError:"venus_explore_results_error",ExploreHomeRailError:"venus_explore_home_rail_error",TopScrollView:"ali_top_scroll_view",TopScrollClick:"ali_top_scroll_click",DisplayAdView:"ali_display_ad_view",DisplayAdClick:"ali_display_ad_click",DisplayedAdPlaylickClick:"ali_display_ad_playlink_click",AdsFetchFailed:"ali_ads_fetch_failed",SplitTestView:"ali_split_test_view",SplitTestAction:"ali_split_test_action",ShareTitle:"ali_share_title",SaveTitle:"ali_save_title",NotifyTitle:"ali_notify_title",TrailerClick:"ali_trailer_button_click",ExpandTitleDescription:"ali_expand_title_description",RegionRequestFailed:"ali_region_request_failed",YouTubeAvailabilityRequestFailed:"ali_youtube_availability_request_failed",CardToExploreCta:"ali_card_to_explore_cta",ExplorePageView:"venus_page_view",ExploreTitleClick:"venus_title_click",ExploreShowMore:"venus_show_more",ExploreSetFilter:"venus_set_filter",ExploreSearch:"venus_search",ExploreFetchProvidersFailed:"venus_fetch_providers_failed",ExploreTitleRailModalView:"venus_title_rail_modal_view",ExploreTitleRailExpandClick:"venus_title_rail_expand_click",ExploreTitleRailSetIndex:"venus_title_rail_set_index",ExploreNavigate:"venus_navigate",ExploreAnyClick:"venus_any_click",ExploreScrollDistance:"venus_scroll_distance"},Dt={ProviderInterest:"ProviderInterest",ProviderClick:"ProviderClick",ParticipantInterest:"ParticipantInterest",ParticipantView:"ParticipantView",SearchQuery:"SearchQuery",GenreInterest:"GenreInterest",TitleInterest:"TitleInterest"},Ti={Card:"tpi_card",Link:"tpi_link"};function Xd(t){window.PlayPilotLinkInjections&&(window.PlayPilotLinkInjections.consents=t)}function Tt(t){var e;return window.PlayPilotLinkInjections.require_consent===!1?!0:!!((e=window.PlayPilotLinkInjections.consents)!=null&&e[t])}function An(){const t=navigator.userAgent.toLowerCase();return/bot|crawl|spider|google|baidu|bing|msn|teoma|slurp|yandex|facebookexternalhit|facebot/i.test(t)}const Ln=[{slug:"101",name:"Action",categories:{documentary:50,kids:86,series:90,cinema:90,movie:90}},{slug:"102",name:"Animation",categories:{series:50,cinema:50,kids:90,documentary:48,movie:50}},{slug:"103",name:"Kids",categories:{kids:76}},{slug:"104",name:"Biography",categories:{series:46,documentary:88,cinema:10,movie:46}},{slug:"105",name:"Crime",categories:{series:84,documentary:86,cinema:64,movie:84}},{slug:"106",name:"Documentary",categories:{kids:50}},{slug:"107",name:"Drama",categories:{series:82,movie:82,cinema:88,documentary:44}},{slug:"108",name:"Nature",categories:{kids:48,documentary:76,series:28}},{slug:"109",name:"Adventure",categories:{kids:88,cinema:86,documentary:82,series:88,movie:88}},{slug:"110",name:"Family",categories:{series:40,cinema:40,movie:40}},{slug:"111",name:"Fantasy",categories:{kids:78,cinema:74,documentary:42,movie:38,series:38}},{slug:"112",name:"Film Noir",categories:{movie:37}},{slug:"113",name:"Game Show",categories:{series:36,kids:28}},{slug:"114",name:"History",categories:{movie:35,kids:44,cinema:10,series:80,documentary:90}},{slug:"115",name:"Comedy",categories:{cinema:84,documentary:46,series:86,kids:82,movie:86}},{slug:"116",name:"War",categories:{movie:14,documentary:68,series:14,cinema:66}},{slug:"117",name:"Musical",categories:{kids:30,movie:78,cinema:8,series:30}},{slug:"118",name:"Music",categories:{kids:72,cinema:9,documentary:78,movie:32,series:32}},{slug:"119",name:"Mystery",categories:{movie:76,cinema:70,kids:26,documentary:38,series:76}},{slug:"120",name:"News",categories:{series:26,documentary:36,kids:38}},{slug:"121",name:"Reality TV",categories:{series:24}},{slug:"122",name:"Romance",categories:{documentary:34,cinema:78,movie:74,series:74}},{slug:"123",name:"Sci-Fi",categories:{series:72,movie:72,cinema:68,kids:70,documentary:32}},{slug:"124",name:"Horror",categories:{cinema:76,documentary:40,series:78,movie:80}},{slug:"125",name:"Sport",categories:{cinema:7,kids:68,series:20,documentary:70,movie:20}},{slug:"126",name:"Talk Show",categories:{kids:34,series:16}},{slug:"127",name:"Thriller",categories:{series:70,documentary:28,cinema:80,movie:70}},{slug:"128",name:"Western",categories:{movie:12,series:12,documentary:24}},{slug:"129",name:"Anime",categories:{cinema:5,movie:48,kids:84,series:48}},{slug:"202",name:"Culture",categories:{kids:40,documentary:84,series:44}},{slug:"208",name:"Short",categories:{movie:21,documentary:30,kids:36}},{slug:"212",name:"Entertainment",categories:{kids:80,series:42,movie:42}},{slug:"222",name:"Lifestyle",categories:{documentary:80,kids:74,series:34}},{slug:"227",name:"Science",categories:{series:22,kids:46,documentary:74}},{slug:"232",name:"Stand-up",categories:{movie:18,series:18}},{slug:"240",name:"Concert",categories:{movie:45}},{slug:"900",name:"Independent",categories:{}},{slug:"901",name:"Arthouse",categories:{}},{slug:"902",name:"Bollywood",categories:{}},{slug:"903",name:"Alternate Version",categories:{}},{slug:"999",name:"Unscripted",categories:{}}];function $d(t=[]){return t.map(e=>{var i;return((i=Ln.find(a=>a.slug===e))==null?void 0:i.name)||""}).filter(Boolean)}const Hr="playpilot_user_id";function eu(){if(!es())return null;try{const t=localStorage.getItem(Hr);return t||(localStorage.setItem(Hr,jn(16)),localStorage.getItem(Hr))}catch{return null}}function es(){var t,e;return!!((e=(t=window.PlayPilotLinkInjections)==null?void 0:t.config)!=null&&e.allow_user_id_tracking)&&Tt("tracking")}const tu="https://insights.playpilot.net";async function fe(t,e=null,i={}){var n,r,o,s,c;if(An())return;if(!Tt("tracking")){au(t,e,i);return}const a=new Headers({"Content-Type":"application/json"});e&&(i={original_title:e.original_title,title:e.title,title_sid:e.sid,title_type:e.type,genres:$d(e.genres),providers:[...new Set(((n=e.providers)==null?void 0:n.map(d=>d.name))||[])],...i}),es()&&(i.user_id=eu(),i.region=window.PlayPilotLinkInjections.region),i.version="8.14.0-beta.3",i.time_since_initialize=(r=window.PlayPilotLinkInjections)!=null&&r.time_at_initialize?Date.now()-window.PlayPilotLinkInjections.time_at_initialize:0,i.url=Hi(),i.organization_sid=((o=window.PlayPilotLinkInjections)==null?void 0:o.organization_sid)||"undefined",i.domain_sid=((s=window.PlayPilotLinkInjections)==null?void 0:s.domain_sid)||"undefined",i.device={type:window.innerWidth>pi?"desktop":"mobile",width:window.innerWidth,height:window.innerHeight,touch:window.matchMedia("(pointer: coarse)").matches,orientation:((c=screen.orientation)==null?void 0:c.type)||"undefined"},fetch(tu,{headers:a,method:"POST",body:JSON.stringify({event:t,payload:i,source:"ali",keepalive:!0})}),iu({event:t,payload:i})}function iu(t){var e;window.PlayPilotLinkInjections.tracked_events||(window.PlayPilotLinkInjections.tracked_events=[]),(e=window.PlayPilotLinkInjections.tracked_events)==null||e.push(t)}function ts({organizationSid:t=null,domainSid:e=null}){window.PlayPilotLinkInjections.organization_sid=t||null,window.PlayPilotLinkInjections.domain_sid=e||null}function au(t,e=null,i={}){var a;(a=window.PlayPilotLinkInjections).queued_tracking_events||(a.queued_tracking_events=[]),window.PlayPilotLinkInjections.queued_tracking_events.push({event:t,title:e,payload:i})}function nu(){if(Tt("tracking")){for(const{event:t,title:e,payload:i}of window.PlayPilotLinkInjections.queued_tracking_events||[])fe(t,e,i);window.PlayPilotLinkInjections.queued_tracking_events=[]}}async function is(){if(!Tt("ads"))return[];const t=vi();if(!t)throw new Error("No token was provided");try{return await Xt(`/ads/browse/?api-token=${t}`)}catch(e){throw fe(pe.AdsFetchFailed,null,{status:e.status}),e}}function Ga(t){var e;return!Tt("ads")||window.PlayPilotLinkInjections.no_affiliate?null:(((e=window.PlayPilotLinkInjections)==null?void 0:e.ads)||[]).find(i=>i.campaign_format===t)||null}function ru(t){return{sid:"",name:t.content.header||"",url:t.cta.url||"",logo_url:t.cta.image||"",highlighted:!0,cta_text:t.content.subheader,action_text:t.cta.header,slug:t.campaign_name,extra_info:{category:"SVOD"}}}async function Vr(t=5e3){var i,a,n,r;const e=(i=window.PlayPilotLinkInjections)==null?void 0:i.region;if(e)return e;try{const s=await(await fetch("https://api.country.is/",{signal:AbortSignal.timeout(t)})).json();let c=(a=s==null?void 0:s.country)==null?void 0:a.toLowerCase();if(!c)throw new Error("No country was returned by api.country.is");return c==="gb"&&(c="uk"),lu(c),c}catch(o){return fe(pe.RegionRequestFailed,null,{message:o.message}),((r=(n=window.PlayPilotLinkInjections)==null?void 0:n.config)==null?void 0:r.fallback_region)||""}}function lu(t){window.PlayPilotLinkInjections&&(window.PlayPilotLinkInjections.region=t)}async function Mn(t={}){const e=vi();if(!e)throw new Error("No token was provided");return t={...t,language:Wa(),include_count:"false"},t.region!==null&&(t.region=t.region||await Vr()),await Xt(`/titles/browse?api-token=${e}&`+Or(t))}async function as(t){return(await Mn({related_to_sid:t.sid})).results}async function ns(t){const i=(await Mn({sids:t})).results[0];if(!i)throw new Error("No title was returned for sid: "+t);return i}const ou={"Where To Stream Online":{[m.English]:"Where to stream online",[m.Swedish]:"Var kan man streama online",[m.Danish]:"Hvor kan man streame online"},"Affiliate Disclaimer":{[m.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[m.Swedish]:"Vi kan få provision om du gör ett köp via dessa länkar. I samarbete med",[m.Danish]:"Vi kan modtage en kommission, hvis du foretager et køb via disse links. I samarbejde med"},"In-Text Disclaimer":{[m.English]:"We may earn a commission from purchases made through some of the links below.",[m.Swedish]:"Vi kan få en provision för köp som görs via några av länkarna nedan.",[m.Danish]:"Vi kan modtage en kommission for køb foretaget gennem nogle af nedenstående links."},"An Error Occurred":{[m.English]:"An error occurred",[m.Swedish]:"Ett fel inträffade",[m.Danish]:"Der opstod en fejl"},Loading:{[m.English]:"Loading",[m.Swedish]:"Laddar",[m.Danish]:"Indlæser"},"Title Unavailable":{[m.English]:"This title is not currently available to stream.",[m.Swedish]:"Den här titeln går inte att streama just nu.",[m.Danish]:"Denne titel er i øjeblikket ikke tilgængelig for streaming."},"Title Unavailable Suffix":{[m.English]:"is not currently available to stream.",[m.Swedish]:"går inte att streama just nu.",[m.Danish]:"er i øjeblikket ikke tilgængelig for streaming."},"Is Available To Stream On":{[m.English]:"is available to stream on",[m.Swedish]:"finns att streama på",[m.Danish]:"kan streames på"},"Is Available To Stream":{[m.English]:"is available to stream.",[m.Swedish]:"finns att streama.",[m.Danish]:"kan streames."},"View Streaming Options":{[m.English]:"View streaming options",[m.Swedish]:"Se streamingalternativ",[m.Danish]:"Se streamingmuligheder"},"Commission Disclaimer":{[m.English]:"We may earn a commission if you make a purchase through these links. In collaboration with",[m.Swedish]:"Vi kan tjäna en provision om du gör ett köp via dessa länkar. I samarbete med",[m.Danish]:"Vi kan tjene en kommission, hvis du foretager et køb via disse links. I samarbejde med"},And:{[m.English]:"and",[m.Swedish]:"och",[m.Danish]:"og"},Minutes:{[m.English]:"minutes",[m.Swedish]:"minuter",[m.Danish]:"minutter"},"Type: movie":{[m.English]:"Movie",[m.Swedish]:"Film",[m.Danish]:"Film"},"Type: series":{[m.English]:"Series",[m.Swedish]:"Serie",[m.Danish]:"Serie"},Stream:{[m.English]:"Stream",[m.Swedish]:"Streama",[m.Danish]:"Stream"},Buy:{[m.English]:"Buy",[m.Swedish]:"Köp",[m.Danish]:"Køb"},Rent:{[m.English]:"Rent",[m.Swedish]:"Hyr",[m.Danish]:"Lej"},"Rent Or Buy":{[m.English]:"Rent or Buy",[m.Swedish]:"Hyr/köp",[m.Danish]:"Lej eller køb"},Watch:{[m.English]:"Watch",[m.Swedish]:"Titta nu",[m.Danish]:"Se nu"},"Category: AVOD":{[m.English]:"Stream for free",[m.Swedish]:"Streama gratis",[m.Danish]:"Stream gratis"},"Category: SVOD":{[m.English]:"Streaming services",[m.Swedish]:"Streamingtjänster",[m.Danish]:"Streamingtjenester"},"Category: RENT":{[m.English]:"Rent it",[m.Swedish]:"Hyr den",[m.Danish]:"Lej den"},"Category: BUY":{[m.English]:"Buy it",[m.Swedish]:"Köp den",[m.Danish]:"Køb den"},"Category: Other":{[m.English]:"Other",[m.Swedish]:"Annat",[m.Danish]:"Andet"},Share:{[m.English]:"Share",[m.Swedish]:"Dela",[m.Danish]:"Del"},"Copy URL":{[m.English]:"Copy URL",[m.Swedish]:"Kopiera URL",[m.Danish]:"Kopiér URL"},Email:{[m.English]:"Email",[m.Swedish]:"E-post",[m.Danish]:"E-mail"},"Show More":{[m.English]:"Show more",[m.Swedish]:"Visa mer",[m.Danish]:"Vis mere"},Cast:{[m.English]:"Cast",[m.Swedish]:"Rollista",[m.Danish]:"Skuespillere"},"Similar Titles":{[m.English]:"Similar movies & shows",[m.Swedish]:"Liknande filmer och serier",[m.Danish]:"Lignende film og serier"},"Watch Trailer":{[m.English]:"Watch trailer",[m.Swedish]:"Se trailer",[m.Danish]:"Se trailer"},"Streaming Guide":{[m.English]:"Streaming Guide",[m.Swedish]:"Streaming Guide",[m.Danish]:"Streaming Guide"},"Streaming Guide Subheading":{[m.English]:"Discover and search all movies and tv-shows",[m.Swedish]:"Upptäck och sök bland alla filmer och tv-serier",[m.Danish]:"Opdag og søg i alle film og tv-serier"},"Streaming Guide Description":{[m.English]:"Find where to watch movies online - the ultimate guide that helps you find the best movies and shows across streaming services.",[m.Swedish]:"Sök bland alla filmer och serier för att ta reda på var du kan streama dem",[m.Danish]:"Find ud af, hvor du kan se film online - den ultimative guide, der hjælper dig med at finde de bedste film og serier på streamingtjenester."},"Search Movies And Shows":{[m.English]:"Search movies and shows",[m.Swedish]:"Sök filmer och serier",[m.Danish]:"Søg film og serier"},Services:{[m.English]:"Services",[m.Swedish]:"Tjänster",[m.Danish]:"Tjenester"},Genres:{[m.English]:"Genres",[m.Swedish]:"Genrer",[m.Danish]:"Genrer"},IMDb:{[m.English]:"IMDb",[m.Swedish]:"IMDb",[m.Danish]:"IMDb"},Year:{[m.English]:"Year",[m.Swedish]:"År",[m.Danish]:"År"},Runtime:{[m.English]:"Runtime",[m.Swedish]:"Speltid",[m.Danish]:"Spilletid"},Countries:{[m.English]:"Countries",[m.Swedish]:"Länder",[m.Danish]:"Lande"},"All Filters":{[m.English]:"All filters",[m.Swedish]:"Alla filter",[m.Danish]:"Alle filtre"},"Sort By":{[m.English]:"Sort by",[m.Swedish]:"Sortera efter",[m.Danish]:"Sortér efter"},Popularity:{[m.English]:"Popularity",[m.Swedish]:"Popularitet",[m.Danish]:"Popularitet"},New:{[m.English]:"New",[m.Swedish]:"Nytt",[m.Danish]:"Nyt"},"Top Rated":{[m.English]:"Top Rated",[m.Swedish]:"Toppbetyg",[m.Danish]:"Højst vurderet"},"-popularity":{[m.English]:"Popularity",[m.Swedish]:"Popularitet",[m.Danish]:"Popularitet"},"-new":{[m.English]:"New",[m.Swedish]:"Nytt",[m.Danish]:"Nyt"},"-best":{[m.English]:"Top Rated",[m.Swedish]:"Toppbetyg",[m.Danish]:"Højst vurderet"},Search:{[m.English]:"Search",[m.Swedish]:"Sök",[m.Danish]:"Søg"},"Born On":{[m.English]:"Born on",[m.Swedish]:"Född den",[m.Danish]:"Født den"},"Died On":{[m.English]:"Died on",[m.Swedish]:"Död den",[m.Danish]:"Død den"},Credits:{[m.English]:"Credits",[m.Swedish]:"Medverkande",[m.Danish]:"Medvirkende"},Home:{[m.English]:"Home",[m.Swedish]:"Hem",[m.Danish]:"Hjem"},Explore:{[m.English]:"Explore",[m.Swedish]:"Utforska",[m.Danish]:"Udforsk"},"Page Not Found":{[m.English]:"Page not found",[m.Swedish]:"Sidan hittades inte",[m.Danish]:"Siden blev ikke fundet"},"List: Trending":{[m.English]:"Trending Movies & Shows",[m.Swedish]:"Trendande Titlar",[m.Danish]:"Populære film og serier"},"List: Upcoming":{[m.English]:"Upcoming Releases",[m.Swedish]:"Kommande Premiärer",[m.Danish]:"Mest ventede film"},"List: New":{[m.English]:"New Releases",[m.Swedish]:"Nya Filmer & Serier",[m.Danish]:"Nye film og serier"},"List: Demand":{[m.English]:"Always in Demand",[m.Swedish]:"Tidlösa Favoriter",[m.Danish]:"Tidløse favoritter"},"List: Cinema":{[m.English]:"Coming to Cinemas",[m.Swedish]:"Snart på Bio",[m.Danish]:"Kommende film"},All:{[m.English]:"All",[m.Swedish]:"Alla",[m.Danish]:"Alle"},Unscripted:{[m.English]:"Unscripted",[m.Swedish]:"Oscripterat",[m.Danish]:"Umanuskriptet"},Independent:{[m.English]:"Independent",[m.Swedish]:"Indie",[m.Danish]:"Indie"},"Game Show":{[m.English]:"Game Show",[m.Swedish]:"Gameshow",[m.Danish]:"Quizshow"},"Film Noir":{[m.English]:"Film Noir",[m.Swedish]:"Film noir",[m.Danish]:"Film noir"},Entertainment:{[m.English]:"Entertainment",[m.Swedish]:"Underhållning",[m.Danish]:"Underholdning"},News:{[m.English]:"News",[m.Swedish]:"Nyheter",[m.Danish]:"Nyheder"},Short:{[m.English]:"Short",[m.Swedish]:"Kortfilm",[m.Danish]:"Kortfilm"},Bollywood:{[m.English]:"Bollywood",[m.Swedish]:"Bollywood",[m.Danish]:"Bollywood"},Concert:{[m.English]:"Concert",[m.Swedish]:"Konsert",[m.Danish]:"Koncert"},Arthouse:{[m.English]:"Arthouse",[m.Swedish]:"Arthouse",[m.Danish]:"Arthouse"},"Alternate Version":{[m.English]:"Alternate Version",[m.Swedish]:"Alternativ version",[m.Danish]:"Alternativ version"},"Reality TV":{[m.English]:"Reality TV",[m.Swedish]:"Reality-TV",[m.Danish]:"Reality-TV"},Culture:{[m.English]:"Culture",[m.Swedish]:"Kultur",[m.Danish]:"Kultur"},Drama:{[m.English]:"Drama",[m.Swedish]:"Drama",[m.Danish]:"Drama"},Crime:{[m.English]:"Crime",[m.Swedish]:"Kriminal",[m.Danish]:"Krimi"},Western:{[m.English]:"Western",[m.Swedish]:"Western",[m.Danish]:"Western"},Thriller:{[m.English]:"Thriller",[m.Swedish]:"Thriller",[m.Danish]:"Thriller"},Animation:{[m.English]:"Animation",[m.Swedish]:"Animerat",[m.Danish]:"Animation"},Mystery:{[m.English]:"Mystery",[m.Swedish]:"Mysterium",[m.Danish]:"Mysterium"},Science:{[m.English]:"Science",[m.Swedish]:"Vetenskap",[m.Danish]:"Videnskab"},Nature:{[m.English]:"Nature",[m.Swedish]:"Natur",[m.Danish]:"Natur"},War:{[m.English]:"War",[m.Swedish]:"Krig",[m.Danish]:"Krig"},"Sci-Fi":{[m.English]:"Sci-Fi",[m.Swedish]:"Sci-fi",[m.Danish]:"Sci-fi"},Documentary:{[m.English]:"Documentary",[m.Swedish]:"Dokumentär",[m.Danish]:"Dokumentar"},"Stand-up":{[m.English]:"Stand-up",[m.Swedish]:"Standup",[m.Danish]:"Stand-up"},"Talk Show":{[m.English]:"Talk Show",[m.Swedish]:"Talkshow",[m.Danish]:"Talkshow"},Fantasy:{[m.English]:"Fantasy",[m.Swedish]:"Fantasy",[m.Danish]:"Fantasy"},History:{[m.English]:"History",[m.Swedish]:"Historia",[m.Danish]:"Historie"},Adventure:{[m.English]:"Adventure",[m.Swedish]:"Äventyr",[m.Danish]:"Eventyr"},Action:{[m.English]:"Action",[m.Swedish]:"Action",[m.Danish]:"Action"},Horror:{[m.English]:"Horror",[m.Swedish]:"Skräck",[m.Danish]:"Gyser"},Comedy:{[m.English]:"Comedy",[m.Swedish]:"Komedi",[m.Danish]:"Komedie"},Biography:{[m.English]:"Biography",[m.Swedish]:"Biografi",[m.Danish]:"Biografi"},Music:{[m.English]:"Music",[m.Swedish]:"Musik",[m.Danish]:"Musik"},Sport:{[m.English]:"Sport",[m.Swedish]:"Sport",[m.Danish]:"Sport"},Romance:{[m.English]:"Romance",[m.Swedish]:"Romantik",[m.Danish]:"Romantik"},Kids:{[m.English]:"Kids",[m.Swedish]:"Barn",[m.Danish]:"Børn"},Lifestyle:{[m.English]:"Lifestyle",[m.Swedish]:"Livsstil",[m.Danish]:"Livsstil"},Musical:{[m.English]:"Musical",[m.Swedish]:"Musikal",[m.Danish]:"Musical"},Anime:{[m.English]:"Anime",[m.Swedish]:"Anime",[m.Danish]:"Anime"},Family:{[m.English]:"Family",[m.Swedish]:"Familj",[m.Danish]:"Familie"}};function ve(t,e=Wa()){var i;return((i=ou[t])==null?void 0:i[e])||t}const qn=Object.freeze({Popular:"-popularity",New:"-new",Best:"-best"}),su=t=>t;function Ur(t){const e=t-1;return e*e*e+1}function rs(t){const e=typeof t=="string"&&t.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return e?[parseFloat(e[1]),e[2]||"px"]:[t,"px"]}function Pt(t,{delay:e=0,duration:i=400,easing:a=su}={}){const n=+getComputedStyle(t).opacity;return{delay:e,duration:i,easing:a,css:r=>`opacity: ${r*n}`}}function ya(t,{delay:e=0,duration:i=400,easing:a=Ur,x:n=0,y:r=0,opacity:o=0}={}){const s=getComputedStyle(t),c=+s.opacity,d=s.transform==="none"?"":s.transform,u=c*(1-o),[v,p]=rs(n),[h,g]=rs(r);return{delay:e,duration:i,easing:a,css:(f,_)=>`
|
|
6
6
|
transform: ${d} translate(${(1-f)*v}${p}, ${(1-f)*h}${g});
|
|
7
7
|
opacity: ${c-u*_}`}}function Ka(t,{delay:e=0,duration:i=400,easing:a=Ur,axis:n="y"}={}){const r=getComputedStyle(t),o=+r.opacity,s=n==="y"?"height":"width",c=parseFloat(r[s]),d=n==="y"?["top","bottom"]:["left","right"],u=d.map(b=>`${b[0].toUpperCase()}${b.slice(1)}`),v=parseFloat(r[`padding${u[0]}`]),p=parseFloat(r[`padding${u[1]}`]),h=parseFloat(r[`margin${u[0]}`]),g=parseFloat(r[`margin${u[1]}`]),f=parseFloat(r[`border${u[0]}Width`]),_=parseFloat(r[`border${u[1]}Width`]);return{delay:e,duration:i,easing:a,css:b=>`overflow: hidden;opacity: ${Math.min(b*20,1)*o};${s}: ${b*c}px;padding-${d[0]}: ${b*v}px;padding-${d[1]}: ${b*p}px;margin-${d[0]}: ${b*h}px;margin-${d[1]}: ${b*g}px;border-${d[0]}-width: ${b*f}px;border-${d[1]}-width: ${b*_}px;min-${s}: 0`}}function ba(t,{delay:e=0,duration:i=400,easing:a=Ur,start:n=0,opacity:r=0}={}){const o=getComputedStyle(t),s=+o.opacity,c=o.transform==="none"?"":o.transform,d=1-n,u=s*(1-r);return{delay:e,duration:i,easing:a,css:(v,p)=>`
|
|
8
8
|
transform: ${c} scale(${1-d*p});
|
|
9
9
|
opacity: ${s-u*p}
|
|
10
10
|
`}}function _a(t){return t?t.replace("/src/img",""):null}function ls(t,e=null){return t!=null&&t.length?`${Id}/${t}?${e?`class=${e}&`:""}optimizer=image`:""}var cu=T('<img class="svelte-p6g2a"/>');function Dn(t,e){re(e,!0);const i=D(e,"width",3,96),a=D(e,"height",3,144),n=D(e,"lazy",3,!0),r=D(e,"onload",3,()=>null);var o=cu();H(s=>{se(o,"src",s),se(o,"alt",`Movie poster for '${e.title.title??""}'`),se(o,"width",i()),se(o,"height",a()),se(o,"loading",n()?"lazy":null)},[()=>_a(e.title.standing_poster)]),ye("error",o,({target:s})=>s.src=Lr),ye("load",o,function(...s){var c;(c=r())==null||c.apply(this,s)}),y(t,o),le()}var du=Re('<svg viewBox="0 0 16 16" fill="none"><path d="M14 2L2 14M2 2L14 14" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Ya(t,e){const i=D(e,"size",3,16);var a=du();H(()=>{se(a,"width",i()),se(a,"height",i())}),y(t,a)}var uu=T('<div class="overlay svelte-f0c4xl"><!> <div class="backdrop svelte-f0c4xl" data-testid="backdrop"></div> <button class="close svelte-f0c4xl" aria-label="Close"><!></button></div>');function vu(t,e){const i=D(e,"embeddable_url",3,"");var a=uu(),n=x(a);Gr(n,{get embeddable_url(){return i()},controls:["current-time","fullscreen","mute","play","progress"]});var r=S(n,2);r.__click=function(...c){var d;(d=e.onclose)==null||d.apply(this,c)};var o=S(r,2);o.__click=function(...c){var d;(d=e.onclose)==null||d.apply(this,c)};var s=x(o);Ya(s,{size:24}),Ae(3,a,()=>Pt,()=>({duration:100})),y(t,a)}we(["click"]);const pu="1304688689641511",fu="https://endpoint-youtube-availability.playpilot.workers.dev";async function os(t){var i,a,n,r;const e=(a=(i=window.PlayPilotLinkInjections)==null?void 0:i.region)==null?void 0:a.toUpperCase();if(!e)return!0;try{const o=await fetch(`${fu}/?video_id=${t}`);if(!o.ok)throw new Error("Response was not ok");const s=await o.json();return!((n=s.blocked)!=null&&n[e]||!s.blocked&&s.allowed&&!((r=s.allowed)!=null&&r.includes(e)))}catch{return!1}}let Nn={};function hu(t){const e=nl(),i={onclose:gu,embeddable_url:t.embeddable_url||""};Nn=Mt(vu,{target:e,props:i})}function gu(){Nn&&(Fi(Nn,{outro:!0}),Nn=null)}function Wr(t){const e=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/,i=t.match(e);return(i==null?void 0:i[7])||null}async function mu(t,e=3){let i=0,a=null;for(;i<e&&!a;){const n=t[i],r=(n==null?void 0:n.embeddable_url)&&Wr(n.embeddable_url);try{r&&await os(r)&&(a=n)}catch{}i++}return a}var yu=Re('<path fill="currentColor" d="m616-320-56-56 104-104-104-104 56-56 104 104 104-104 56 56-104 104 104 104-56 56-104-104-104 104Zm-496-40v-240h160l200-200v640L280-360H120Zm280-246-86 86H200v80h114l86 86v-252ZM300-480Z"></path>'),bu=Re('<path fill="currentColor" d="M560-131v-82q90-26 145-100t55-168q0-94-55-168T560-749v-82q124 28 202 125.5T840-481q0 127-78 224.5T560-131ZM120-360v-240h160l200-200v640L280-360H120Zm440 40v-322q47 22 73.5 66t26.5 96q0 51-26.5 94.5T560-320ZM400-606l-86 86H200v80h114l86 86v-252ZM300-480Z"></path>'),_u=Re('<svg width="32px" height="32px" viewBox="0 -960 960 960"><!></svg>');function xu(t,e){const i=D(e,"muted",3,!1);var a=_u(),n=x(a);{var r=s=>{var c=yu();y(s,c)},o=s=>{var c=bu();y(s,c)};O(n,s=>{i()?s(r):s(o,!1)})}y(t,a)}var wu=T('<button class="mute svelte-1ivh34t" aria-label="Mute"><!></button>'),ku=T('<iframe width="600" height="338" title="YouTube video player" frameborder="0" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" class="svelte-1ivh34t"></iframe> <!>',1);function Gr(t,e){var w;re(e,!0);const i=D(e,"embeddable_url",3,""),a=D(e,"controls",19,()=>[]),n=D(e,"muted",3,!1),r=D(e,"loop",3,!1),o=D(e,"captions",3,!1),s=D(e,"showMuteControls",3,!1),c=U(()=>Wr(i())),d=U(()=>{var k,L;return(((L=(k=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:k.video_playtimes)==null?void 0:L[l(c)||""])||1)-1}),u=((w=window==null?void 0:window.getComputedStyle(document.body).getPropertyValue("--playpilot-primary"))==null?void 0:w.replace("#",""))||"fa548a";let v=K(null),p=K(Fe(n()));Qe(()=>{if(!l(c))return;window.PlayPilotLinkInjections.video_playtimes||(window.PlayPilotLinkInjections.video_playtimes={});let k=l(d);const L=setInterval(()=>{k++,window.PlayPilotLinkInjections.video_playtimes[l(c)]=k},1e3);return()=>clearInterval(L)});function h(k=!l(p)){var L,C;l(p)!=k&&((C=(L=l(v))==null?void 0:L.contentWindow)==null||C.postMessage("mute","*")),M(p,k,!0)}var g={toggleMute:h},f=me(),_=Z(f);{var b=k=>{var L=ku(),C=Z(L);$e(C,z=>M(v,z),()=>l(v));var j=S(C,2);{var V=z=>{var I=wu();I.__click=()=>h();var E=x(I);xu(E,{get muted(){return l(p)}}),y(z,I)};O(j,z=>{s()&&z(V)})}H(z=>se(C,"src",`https://video.playpilot.net/?video_id=${l(c)??""}&color=${u}&muted=${n()??""}&loop=${r()??""}&captions=${o()??""}&controls=${z??""}&start_time=${l(d)??""}&autoplay=true&playsinline=true`),[()=>a().join(",")]),y(k,L)},P=k=>{var L=Je("Something went wrong");y(k,L)};O(_,k=>{l(c)?k(b):k(P,!1)})}return y(t,f),le(g)}we(["click"]);var Su=T('<div tabindex="-1"><div tabindex="0" class="slider-content svelte-1gs8ha8"><!></div></div> <!>',1);function ss(t,e){re(e,!0);let i=D(e,"gap",3,"0"),a=D(e,"fill",3,!0),n=D(e,"transitionDuration",3,300),r=D(e,"threshold",3,30),o=D(e,"moveThreshold",3,0),s=D(e,"currentIndex",15,0),c=D(e,"shown",31,()=>Fe([])),d=D(e,"sliderWidth",15,0),u=D(e,"currentScrollPosition",15,0),v=D(e,"maxWidth",15,0),p=D(e,"reachedEnd",15,!1),h=D(e,"distanceToEnd",15,0),g=D(e,"passedThreshold",15,!1),f=D(e,"passedMoveThreshold",15,!1),_=D(e,"allowWheel",3,!1),b=D(e,"end",3,()=>null),P=D(e,"change",3,ie=>null),w=D(e,"onend",19,b),k=D(e,"onchange",19,P),L=D(e,"onresize",3,()=>null),C=K(!1),j=K(!1),V=0,z=0,I=K(void 0),E=K(void 0),A=null,F=null;Ke(()=>{l(E)&&ne(),l(E)&&h(v()-u()-d())}),Qe(()=>(ue(),()=>A==null?void 0:A.disconnect()));function N(ie){const he=l(E).children.length,ge=Math.max(0,Math.min(ie,he-1));X({setIndex:ge}),ne()}function W(){M(j,!0),N(s()),requestAnimationFrame(()=>M(j,!1))}function G(ie){$(ie.target)&&(ie.preventDefault(),V=Te(ie),M(C,!0))}function q(){if(l(C)){if(!g())X({setIndex:s()});else{const ie=u()-z,he=ie>0?1:-1;ie!=0&&X({direction:he})}M(C,!1),g(!1)}}function R(ie){if(!l(C))return;const he=Te(ie),ge=z+(V-he),He=V-he;f(Math.abs(He)>o()),g(Math.abs(u()-z)>r()),f()&&(te(ge-o()*(He>0?1:-1)),ne())}function Y(ie){if(!_())return;const{deltaX:he,deltaY:ge}=ie;if(Math.abs(he)<Math.abs(ge))return;ie.preventDefault();const We=u()+he*20*.02;te(We),ne(),F&&clearTimeout(F),F=setTimeout(()=>{X({direction:he>0?1:-1})},100)}function Q(ie){$(document.activeElement)&&(ie.key=="ArrowLeft"&&N(s()-1),ie.key=="ArrowRight"&&N(s()+1))}function X({setIndex:ie=-1,direction:he=1}={}){const ge=Ce(),He=s();s(0);let We;for(We=0;We<ge.length;We++)if(ie!=-1){if(We>=ie)break}else if(he>0&&ge[We]>u()||he<0&&ge[We+1]>u())break;s(Math.min(We,ce().length-1)),te(ge[s()],!0),z=u(),k()&&s()!=He&&k()(s())}function te(ie,he=!1){u(ie);const ge=v()-d();p(u()>=ge),p()&&(w()&&w()(),a()&&he&&u(ge))}function ne(){const ie=Ce();Array.from(ie).forEach((he,ge)=>{u()+d()<he||c().includes(ge)||c([...c(),ge])})}function Te(ie){var he,ge;return ie.pageX??((ge=(he=ie.touches)==null?void 0:he[0])==null?void 0:ge.pageX)}function Ce(){return ce().map(ie=>ie.offsetLeft)}function ce(){return Array.from(l(E).children).filter(ie=>ie instanceof HTMLElement).filter(ie=>ie.src!="about:blank")}function ue(){A=new ResizeObserver(ie=>{for(const he of ie){const ge=Array.isArray(he.contentBoxSize)?he.contentBoxSize[0]:he.contentBoxSize;v(ge.inlineSize)}L()()}),A.observe(l(E))}function $(ie){return ie===l(I)||(ie==null?void 0:ie.closest(".slider"))===l(I)}var de={setIndex:N,reposition:W},ee=Su();ye("mousedown",Ee,G),ye("mouseup",Ee,q),ye("mousemove",Ee,R),ye("touchstart",Ee,G,void 0,!0),ye("touchend",Ee,q),ye("touchmove",Ee,R,void 0,!0),ye("keydown",Ee,Q),ye("resize",Ee,W);var ae=Z(ee);let ke;var oe=x(ae);let Pe;var Oe=x(oe);Ve(Oe,()=>e.children??_t,()=>({sliderWidth:d(),shown:c(),currentIndex:s(),setIndex:N,currentScrollPosition:u(),maxWidth:v(),reachedEnd:p(),distanceToEnd:h()})),$e(oe,ie=>M(E,ie),()=>l(E)),$e(ae,ie=>M(I,ie),()=>l(I));var Ue=S(ae,2);return Ve(Ue,()=>e.controls??_t,()=>({sliderWidth:d(),shown:c(),currentIndex:s(),setIndex:N,currentScrollPosition:u(),maxWidth:v(),reachedEnd:p(),distanceToEnd:h()})),H(ie=>{ke=_e(ae,1,"slider svelte-1gs8ha8",null,ke,{dragging:l(C),"passed-threshold":g()}),Pe=Ye(oe,"",Pe,ie)},[()=>({transform:`translateX(${u()*-1}px)`,"transition-duration":`${(l(C)||l(j)?0:n())??""}ms`,"--gap":parseFloat(i()||"0")?i():null})]),ye("wheel",ae,Y),qt(ae,"clientWidth",d),y(t,ee),le(de)}var Tu=Re("<title> </title>"),Pu=Re('<svg viewBox="0 -960 960 960"><!><path d="m288-96-68-68 316-316-316-316 68-68 384 384L288-96Z" fill="currentColor"></path></svg>');function Nt(t,e){const i=D(e,"direction",3,"right"),a=D(e,"title",3,""),n=D(e,"size",3,16);var r=Pu(),o=x(r);{var s=c=>{var d=Tu(),u=x(d);H(()=>J(u,a())),y(c,d)};O(o,c=>{a()&&c(s)})}H(()=>{_e(r,0,i(),"svelte-1m6nwwy"),se(r,"width",`${n()??""}px`),se(r,"height",`${n()??""}px`)}),y(t,r)}function ze(t,e=1){t.role="heading",t.ariaLevel=e.toString()}var Eu=T('<div class="heading svelte-1ayf7b5"> </div>'),Cu=T('<button class="arrow left svelte-1ayf7b5" aria-label="Previous" aria-live="polite"><!></button>'),Iu=T('<button class="arrow right svelte-1ayf7b5" aria-label="Next" aria-live="polite"><!></button>'),ju=T("<!> <!>",1),zu=T('<!> <div class="rail svelte-1ayf7b5"><!></div>',1);function Rn(t,e){re(e,!0);let i=D(e,"heading",3,""),a=D(e,"onchange",3,()=>null),n=D(e,"onresize",3,()=>null),r=D(e,"slider",15);var o=zu(),s=Z(o);{var c=v=>{var p=Eu(),h=x(p);ft(p,(g,f)=>ze==null?void 0:ze(g,f),()=>2),H(()=>J(h,i())),y(v,p)};O(s,v=>{i()&&v(c)})}var d=S(s,2),u=x(d);$e(ss(u,{get onchange(){return a()},get onresize(){return n()},allowWheel:!0,controls:(p,h)=>{let g=()=>h==null?void 0:h().setIndex,f=()=>h==null?void 0:h().currentIndex,_=()=>h==null?void 0:h().reachedEnd;var b=ju(),P=Z(b);{var w=C=>{var j=Cu();j.__click=()=>g()(f()-1);var V=x(j);Nt(V,{direction:"left",title:"Previous"}),y(C,j)};O(P,C=>{f()>0&&C(w)})}var k=S(P,2);{var L=C=>{var j=Iu();j.__click=()=>g()(f()+1);var V=x(j);Nt(V,{title:"Next"}),y(C,j)};O(k,C=>{_()||C(L)})}y(p,b)},children:(p,h)=>{var g=me(),f=Z(g);Ve(f,()=>e.children),y(p,g)},$$slots:{controls:!0,default:!0}}),p=>r(p),()=>r()),y(t,o),le()}we(["click"]);function On(t){return`${No}/${t.type}/${t.slug}/`}function Au(t){var e,i,a,n;return localStorage.getItem("tpi-open-explore-as-modal")==="true"?((i=(e=window.PlayPilotLinkInjections)==null?void 0:e.config)==null?void 0:i.explore_navigation_path)+`?route=modal&sid=${t.sid}`:((n=(a=window.PlayPilotLinkInjections)==null?void 0:a.config)==null?void 0:n.explore_navigation_path)+`?route=title&sid=${t.sid}`}var Lu=T('<img class="video-fallback svelte-12ph9f6" alt=""/>'),Mu=T('<div class="video svelte-12ph9f6"><a class="video-overlay svelte-12ph9f6" title=""></a> <!></div>'),qu=T('<a class="poster svelte-12ph9f6"><!></a>'),Du=T('<div class="aside svelte-12ph9f6" data-testid="aside"> </div>'),Nu=T('<div data-testid="title"><div class="media svelte-12ph9f6"><!></div> <a class="heading svelte-12ph9f6" data-testid="heading"> </a> <!></div>'),Ru=T('<div class="skeleton svelte-12ph9f6"> </div>'),Ou=T('<div class="aside svelte-12ph9f6"><div class="aside-skeleton svelte-12ph9f6"></div></div>'),Bu=T('<div class="title svelte-12ph9f6" data-testid="skeleton"><div class="poster svelte-12ph9f6"></div> <div class="heading svelte-12ph9f6"><span class="skeleton svelte-12ph9f6"> </span> <span class="skeleton svelte-12ph9f6"> </span></div> <!></div>'),Fu=T("<div><!></div>");function cs(t,e){re(e,!0);let i=D(e,"minimumLength",3,1),a=D(e,"heading",3,""),n=D(e,"size",3,"small"),r=D(e,"aside",3,!1),o=D(e,"expandable",3,!1),s=D(e,"expandedTitle",15,null),c=D(e,"expandedRailKey",15,null),d=D(e,"onclick",3,()=>null),u=D(e,"onexpand",3,()=>null);const v=jn(),h=vn("scope")==="popover"?vn("title"):null;let g=K(null),f=K(null),_=K(null),b=!1;Qe(()=>{o()&&L()});function P(E,A,F){var W,G,q,R,Y;E==null||E.preventDefault();const N=A[F];if(o()&&!C(N)){const Q=(W=l(g))==null?void 0:W.querySelectorAll(".title")[F],ne=(((G=l(g))==null?void 0:G.getBoundingClientRect().right)||0)-Q.getBoundingClientRect().right>Q.clientWidth*2;b=!0,setTimeout(()=>b=!1,500),n()==="flexible"&&!ne?(q=l(f))==null||q.setIndex(F-2):n()==="huge"&&!ne&&((R=l(f))==null||R.setIndex(F)),k(N),E&&u()(N);return}E&&(xa()?fi({event:E,type:"titles-rail",data:A,returnToTitle:h,props:{initialIndex:F}}):fi({event:E,data:N,returnToTitle:h}),(Y=l(_))==null||Y.toggleMute(!0),d()(N))}async function w(){const E=await e.titles,A=await mu(E);A&&(s()||c()&&c()!==v||k(A))}function k(E){c(v),s(E)}function L(){c()===v||Array.from(document.querySelectorAll('[data-role="expandable-rail"]')).filter(N=>N.getBoundingClientRect().top>=0).sort((N,W)=>N.getBoundingClientRect().top-W.getBoundingClientRect().top)[0]!==l(g)||(s(null),c(null),w())}function C(E){var A;return c()===v&&E.sid===((A=s())==null?void 0:A.sid)}function j(E,A){o()&&(b||setTimeout(()=>P(null,E,A),250))}var V=Fu();ye("scroll",Ee,L);let z;var I=x(V);ua(I,()=>e.titles,E=>{Rn(E,{get heading(){return a()},children:(A,F)=>{var N=me(),W=Z(N);Le(W,16,()=>({length:12}),qe,(G,q)=>{var R=Bu(),Y=S(x(R),4);{var Q=X=>{var te=Ou(),ne=x(te);Le(ne,20,()=>({length:3}),qe,(Te,Ce)=>{var ce=Ru();y(Te,ce)}),y(X,te)};O(Y,X=>{r()&&X(Q)})}y(G,R)}),y(A,N)},$$slots:{default:!0}})},(E,A)=>{var F=me(),N=Z(F);{var W=G=>{Rn(G,{get heading(){return a()},onchange:q=>j(l(A),q),onresize:()=>{var q;return(q=l(f))==null?void 0:q.reposition()},get slider(){return l(f)},set slider(q){M(f,q,!0)},children:(q,R)=>{var Y=me(),Q=Z(Y);Le(Q,17,()=>l(A),qe,(X,te,ne,Te)=>{const Ce=U(()=>C(l(te))),ce=U(()=>On(l(te))),ue=U(()=>he=>P(he,l(A),ne));var $=Nu();let de;var ee=x($),ae=x(ee);{var ke=he=>{var ge=Mu(),He=x(ge);He.__click=function(...bt){var Ft;(Ft=l(ue))==null||Ft.apply(this,bt)};var We=S(He,2);{var Bt=bt=>{$e(Gr(bt,{get embeddable_url(){return l(te).embeddable_url},muted:!0,loop:!0,captions:!0,showMuteControls:!0}),Ft=>M(_,Ft,!0),()=>l(_))},zi=bt=>{var Ft=Lu();H(()=>se(Ft,"src",l(te).medium_poster)),y(bt,Ft)};O(We,bt=>{l(te).embeddable_url?bt(Bt):bt(zi,!1)})}H(()=>se(He,"href",l(ce))),Ae(2,ge,()=>Pt,()=>({delay:200,duration:200})),y(he,ge)},oe=he=>{var ge=qu();ge.__click=function(...We){var Bt;(Bt=l(ue))==null||Bt.apply(this,We)};var He=x(ge);Dn(He,{get title(){return l(te)},width:96,height:144}),H(()=>se(ge,"href",l(ce))),y(he,ge)};O(ae,he=>{l(Ce)?he(ke):he(oe,!1)})}var Pe=S(ee,2);Pe.__click=function(...he){var ge;(ge=l(ue))==null||ge.apply(this,he)};var Oe=x(Pe),Ue=S(Pe,2);{var ie=he=>{var ge=Du();ge.__click=function(...We){var Bt;(Bt=l(ue))==null||Bt.apply(this,We)};var He=x(ge);H(()=>J(He,l(te).description)),y(he,ge)};O(Ue,he=>{r()&&he(ie)})}H(()=>{de=_e($,1,"title svelte-12ph9f6",null,de,{expanded:l(Ce)}),se(Pe,"href",l(ce)),J(Oe,l(te).title)}),y(X,$)}),y(q,Y)},$$slots:{default:!0}})};O(N,G=>{var q;((q=l(A))==null?void 0:q.length)>=i()&&G(W)})}y(E,F)}),$e(V,E=>M(g,E),()=>l(g)),H(()=>{z=_e(V,1,`titles ${n()??""}`,"svelte-12ph9f6",z,{"with-aside":r()}),se(V,"data-role",o()?"expandable-rail":null)}),y(t,V),le()}we(["click"]);var Hu=T('<div class="rail svelte-1b834ry"><!></div>'),Vu=T('<div data-testid="explore-home"></div> <!>',1);function Uu(t,e){re(e,!0);let i=K(null),a=K(null),n=K(Fe(window.innerWidth));const r=[{heading:"List: Trending",params:{ordering:qn.Popular},properties:{expandable:!0}},{heading:"List: New",params:{from_playlist_sid:"li42WR",include_playable_types:"SVOD,FREE"},properties:{aside:!0,size:"flexible"}},{heading:"List: Upcoming",params:{from_playlist_sid:"li42wf",region:null,no_region_filter:!0},properties:{}},{heading:"List: Cinema",params:{from_playlist_sid:"li42WS",region:null,no_region_filter:!0},properties:{expandable:!0}},{heading:"List: Demand",params:{from_playlist_sid:"licBS"},properties:{aside:!0,size:"flexible"}}];async function o(d={}){var u;try{return(u=await Mn(d))==null?void 0:u.results}catch(v){throw console.log(v),fe(pe.ExploreHomeRailError,null,{message:v.message||v.status.toString()||"",params:d}),new Error(v)}}var s=Vu();ye("scroll",Ee,onscroll);var c=S(Z(s),2);Le(c,17,()=>r,qe,(d,u)=>{let v=()=>l(u).heading,p=()=>l(u).params,h=()=>l(u).properties;var g=Hu(),f=x(g);{let _=U(()=>ve(v())),b=U(()=>o(p())),P=U(()=>l(n)>=pi?"flexible":"huge");cs(f,En({get heading(){return l(_)},get titles(){return l(b)},get size(){return l(P)},minimumLength:7},h,{onclick:()=>fe(pe.ExploreTitleRailModalView,null,{rail:v()}),onexpand:w=>fe(pe.ExploreTitleRailExpandClick,w,{rail:v()}),get expandedTitle(){return l(i)},set expandedTitle(w){M(i,w,!0)},get expandedRailKey(){return l(a)},set expandedRailKey(w){M(a,w,!0)}}))}y(d,g)}),Ua("innerWidth",d=>M(n,d,!0)),y(t,s),le()}function $t(t,e={}){const i=new Image;i.src=Wu(t,e||{})}function Wu(t,e={}){const i=Object.fromEntries(Object.entries(e).map(([r,o])=>[`cd[${r}]`,o])),a={id:pu,ev:t,...i};return`https://www.facebook.com/tr?${Object.keys(a).map(r=>r+"="+a[r]).join("&")}`}function ds(t,e={}){return()=>{Ke(()=>$t(t,e))}}function Gu(t,e={}){return i=>{const a=()=>$t(t,e);Ke(()=>(i.addEventListener("click",a),()=>i.removeEventListener("click",a)))}}var Ku=T("<button><!></button>");function Ui(t,e){const i=D(e,"variant",3,"filled"),a=D(e,"size",3,"base"),n=D(e,"label",3,null),r=D(e,"active",3,!1);var o=Ku();let s;o.__click=function(...d){var u;(u=e.onclick)==null||u.apply(this,d)};var c=x(o);Ve(c,()=>e.children??_t),H(()=>{s=_e(o,1,`button ${i()??""} ${a()??""}`,"svelte-5bqh67",s,{active:r()}),se(o,"aria-label",n())}),y(t,o)}we(["click"]);var Yu=Re('<svg viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><title>IMDb rating</title><path d="M7 0.351929L9.163 4.72803L14 5.43408L10.5 8.8385L11.326 13.648L7 11.3761L2.674 13.648L3.5 8.8385L0 5.43408L4.837 4.72803L7 0.351929Z" fill="#F6C045"></path></svg>');function Bn(t,e){const i=D(e,"size",3,14);var a=Yu();H(()=>{se(a,"width",i()),se(a,"height",i())}),y(t,a)}function us(t){const e=t.filter(a=>!!a.logo_url);let i=[];for(const a of e){let n=a;const r=i.find(c=>c.name===n.name),o=r==null?void 0:r.extra_info.category,s=n.extra_info.category;(o==="RENT"&&s==="BUY"||o==="BUY"&&s==="RENT")&&(i=i.filter(c=>c.name!==n.name),n={...n,extra_info:{...n.extra_info,category:"TVOD"}}),i.push(n)}return i}var Zu=T('<img alt="" data-playpilot-pixel="" class="svelte-16jzx4f"/>');function Kr(t,e){re(e,!0);let i=K(Fe(Math.random()));var a=me();ye("updateconsent",Ee,()=>M(i,Math.random(),!0));var n=Z(a);va(n,()=>l(i),r=>{var o=me(),s=Z(o);{var c=d=>{var u=me(),v=Z(u);Le(v,17,()=>e.pixels,qe,(p,h)=>{var g=Zu();H(()=>se(g,"src",l(h))),y(p,g)}),y(d,u)};O(s,d=>{Tt("pixels")&&d(c)})}y(r,o)}),y(t,a),le()}var Ju=T('<a target="_blank" class="playlink svelte-1tx3tz8" rel="sponsored"><img class="svelte-1tx3tz8"/> <!></a>');function Qu(t,e){re(e,!0);const i=D(e,"size",3,30),a=D(e,"onclick",3,()=>null),n=U(()=>e.playlink.name),r=U(()=>e.playlink.url),o=U(()=>e.playlink.logo_url),s=U(()=>e.playlink.pixels);var c=Ju();c.__click=function(...h){var g;(g=a())==null||g.apply(this,h)};let d;var u=x(c),v=S(u,2);{var p=h=>{Kr(h,{get pixels(){return l(s)}})};O(v,h=>{var g;(g=l(s))!=null&&g.length&&h(p)})}H(h=>{se(c,"href",l(r)),se(c,"data-playlink",l(n)),d=Ye(c,"",d,{"--size":`${i()??""}px`}),se(u,"src",h),se(u,"alt",l(n)),se(u,"height",i()),se(u,"width",i())},[()=>_a(l(o))]),y(t,c),le()}we(["click"]);var Xu=T('<span class="more svelte-1plv45z"> </span>'),$u=T('<div class="empty svelte-1plv45z" data-testid="playlinks-empty">Unavailable to stream</div>'),ev=T('<div class="playlinks svelte-1plv45z"><!> <!> <!></div>');function vs(t,e){re(e,!0);const i=D(e,"size",3,30),a=U(()=>us(e.playlinks).slice(0,3));function n(v){v.stopPropagation()}var r=ev(),o=x(r);Le(o,17,()=>l(a),qe,(v,p)=>{Qu(v,{get playlink(){return l(p)},onclick:n,get size(){return i()}})});var s=S(o,2);{var c=v=>{var p=Xu(),h=x(p);H(()=>J(h,`+${e.playlinks.length-l(a).length}`)),y(v,p)};O(s,v=>{e.playlinks.length>l(a).length&&v(c)})}var d=S(s,2);{var u=v=>{var p=$u();y(v,p)};O(d,v=>{e.playlinks.length||v(u)})}y(t,r),le()}var tv=T("<div>Series</div>"),iv=T("<div> </div>"),av=T('<button class="title svelte-12igath" data-testid="title"><div class="poster svelte-12igath"><!> <div class="meta svelte-12igath"><div class="imdb svelte-12igath"><!> </div> <!> <!></div></div> <div class="content svelte-12igath"><div class="heading svelte-12igath"> </div> <!></div></button>');function nv(t,e){re(e,!0);const i=D(e,"onclick",3,()=>null);var a=av();a.__click=function(...P){var w;(w=i())==null||w.apply(this,P)};var n=x(a),r=x(n);Dn(r,{get title(){return e.title},width:120,height:213,lazy:!0});var o=S(r,2),s=x(o),c=x(s);Bn(c,{size:12});var d=S(c),u=S(s,2);{var v=P=>{var w=tv();y(P,w)};O(u,P=>{e.title.type==="series"&&P(v)})}var p=S(u,2);{var h=P=>{var w=iv(),k=x(w);H(()=>J(k,`${e.title.length??""} min`)),y(P,w)};O(p,P=>{e.title.length&&P(h)})}var g=S(n,2),f=x(g),_=x(f),b=S(f,2);vs(b,{get playlinks(){return e.title.providers},size:20}),H(()=>{J(d,` ${e.title.imdb_score||"-"}`),J(_,e.title.title)}),y(t,a),le()}we(["click"]),Tc();var rv=T('<div class="skeleton svelte-1uz2nzg" data-testid="skeleton"><div class="poster svelte-1uz2nzg"></div> <div class="lines svelte-1uz2nzg"><div class="line svelte-1uz2nzg"></div></div></div>');function lv(t){var e=rv(),i=S(x(e),2),a=x(i);Ye(a,"",{},{width:"60%"}),y(t,e)}var ov=T('<div class="svelte-pkkpyl"> </div>'),sv=T('<button class="title svelte-pkkpyl" data-testid="title"><div class="poster svelte-pkkpyl"><!></div> <div class="content svelte-pkkpyl"><div class="heading svelte-pkkpyl"> </div> <div class="meta svelte-pkkpyl"><div class="imdb svelte-pkkpyl"><!> </div> <div class="svelte-pkkpyl"> </div> <div class="svelte-pkkpyl"> </div> <!></div> <div> </div> <!></div> <div class="action svelte-pkkpyl"><!></div></button>');function ps(t,e){var E;re(e,!0);const i=D(e,"onclick",3,()=>null),a=!!((E=window.PlayPilotLinkInjections)!=null&&E.no_affiliate);var n=sv();n.__click=function(...A){var F;(F=i())==null||F.apply(this,A)};var r=x(n),o=x(r);Dn(o,{get title(){return e.title},width:30,height:43,lazy:!0});var s=S(r,2),c=x(s),d=x(c),u=S(c,2),v=x(u),p=x(v);Bn(p,{size:11});var h=S(p),g=S(v,2),f=x(g),_=S(g,2),b=x(_),P=S(_,2);{var w=A=>{var F=ov(),N=x(F);H(()=>J(N,`${e.title.length??""} min`)),y(A,F)};O(P,A=>{e.title.length&&A(w)})}var k=S(u,2);let L;var C=x(k),j=S(k,2);{var V=A=>{vs(A,{get playlinks(){return e.title.providers}})};O(j,A=>{a||A(V)})}var z=S(s,2),I=x(z);Nt(I,{}),H(A=>{J(d,e.title.title),J(h,` ${e.title.imdb_score||"-"}`),J(f,e.title.year),J(b,A),L=_e(k,1,"description svelte-pkkpyl",null,L,{large:a}),J(C,e.title.description)},[()=>ve(`Type: ${e.title.type}`)]),y(t,n),le()}we(["click"]);var cv=T('<div class="skeleton svelte-17sb7p8" data-testid="skeleton"><div class="poster svelte-17sb7p8"></div> <div class="lines svelte-17sb7p8"><div class="line svelte-17sb7p8"></div> <div class="line svelte-17sb7p8"></div> <div class="line svelte-17sb7p8"></div></div></div>');function dv(t){var e=cv(),i=S(x(e),2),a=x(i);Ye(a,"",{},{width:"40%"});var n=S(a,2);Ye(n,"",{},{width:"60%"});var r=S(n,2);Ye(r,"",{},{width:"80%"}),y(t,e)}var uv=T(`<div class="empty svelte-4bt48"><p class="svelte-4bt48"><strong class="svelte-4bt48">No results were found</strong><br/> Sorry, we couldn't find anything matching your filter.</p></div>`);function vv(t){var e=uv();y(t,e)}var pv=T("<div><!></div>"),fv=T("<!> <!>",1),hv=T("<p>Something went wrong</p>"),gv=T('<div role="main" data-testid="explore-results"><!> <!></div> <!>',1);function mv(t,e){re(e,!0);const i=D(e,"searchQuery",3,""),a=D(e,"filter",19,()=>({}));let n=1,r=K(Fe([])),o=null,s=0,c=JSON.stringify(a())+i(),d=K(Fe(f())),u=K(0);const v=U(()=>l(u)>500),p=U(()=>l(u)>1400?8:l(u)>900?6:l(u)>600?4:3),h=U(()=>l(v)?nv:ps),g=U(()=>l(v)?lv:dv);Ke(()=>{(i()||s!=0)&&_(i())}),Ke(()=>{a()&&b()}),Cn(()=>{P()});async function f(){s+=1;const N=s,W={page_size:24,page:n};i()&&(W.search=i()),Object.entries(a()).forEach(([G,{type:q,value:R}])=>{if(q==="string")W[G]=R;else if(q==="array")W[G]=R.join(",");else if(q==="range"){const[Y,Q]=R;W[G+"_min"]=Y,W[G+"_max"]=Q}});try{const G=await Mn(W)||{next:null,previous:null,results:[]};return N===s&&M(r,[...l(r),...G.results],!0),G}catch(G){throw console.log(G.status),fe(pe.ExploreResultsError,null,{message:G.message||G.status.toString()||"",params:W}),new Error(G)}}async function _(N){C()&&(o&&clearTimeout(o),o=setTimeout(()=>{w(),M(d,f(),!0),N&&(fe(pe.ExploreSearch,null,{query:N}),Tt("pixels")&&$t(Dt.SearchQuery,{query:N}))},100))}function b(){C()&&(w(),M(d,f(),!0))}function P(){for(const N of Object.keys(a()))delete a()[N]}function w(){n=1,M(r,[],!0)}function k(){n++,M(d,f(),!0),fe(pe.ExploreShowMore,null,{page:n})}function L(N,W){fi({event:N,data:W}),fe(pe.ExploreTitleClick,W)}function C(){const N=JSON.stringify(a())+i();return N===c?!1:(c=N,!0)}var j=gv(),V=Z(j);let z,I;var E=x(V);Le(E,17,()=>l(r),qe,(N,W)=>{var G=me(),q=Z(G);va(q,()=>l(W).sid,R=>{var Y=me(),Q=Z(Y);Tr(Q,()=>l(h),(X,te)=>{te(X,{get title(){return l(W)},onclick:ne=>L(ne,l(W))})}),y(R,Y)}),y(N,G)});var A=S(E,2);ua(A,()=>l(d),N=>{var W=me(),G=Z(W);Le(G,16,()=>({length:24}),qe,(q,R)=>{var Y=me(),Q=Z(Y);Tr(Q,()=>l(g),(X,te)=>{te(X,{})}),y(q,Y)}),y(N,W)},void 0,N=>{});var F=S(V,2);ua(F,()=>l(d),null,(N,W)=>{var G=U(()=>{var{next:ne}=l(W);return{next:ne}}),q=U(()=>l(G).next),R=fv(),Y=Z(R);{var Q=ne=>{var Te=pv();let Ce;var ce=x(Te);Ui(ce,{size:"large",onclick:k,children:(ue,$)=>{var de=Je();H(ee=>J(de,ee),[()=>ve("Show More")]),y(ue,de)},$$slots:{default:!0}}),H(()=>Ce=_e(Te,1,"show-more svelte-qc99of",null,Ce,{grid:l(v)})),y(ne,Te)};O(Y,ne=>{l(q)&&ne(Q)})}var X=S(Y,2);{var te=ne=>{vv(ne)};O(X,ne=>{var Te;!((Te=l(r))!=null&&Te.length)&&n===1&&ne(te)})}y(N,R)},N=>{var W=hv();y(N,W)}),H(()=>{z=_e(V,1,"titles svelte-qc99of",null,z,{grid:l(v)}),I=Ye(V,"",I,{"--grid-columns":l(p)})}),qt(V,"clientWidth",N=>M(u,N)),y(t,j),le()}var yv=Re('<svg width="18" height="18" viewBox="0 0 19 19"><path fill="currentColor" d="M16.593,2.407a8.155,8.155,0,0,0-11.569,0A8.166,8.166,0,0,0,4.18,12.983L.38,16.8a1.3,1.3,0,0,0,0,1.837A1.372,1.372,0,0,0,1.288,19a1.3,1.3,0,0,0,.908-.38L6.017,14.8A8.172,8.172,0,0,0,16.593,2.407ZM15.327,12.688A6.4,6.4,0,1,1,17.184,8.17,6.324,6.324,0,0,1,15.327,12.688Z"></path></svg>');function bv(t){var e=yv();y(t,e)}var _v=T('<div class="search svelte-1pnrmr6" role="search"><div class="icon svelte-1pnrmr6"><!></div> <input class="input svelte-1pnrmr6" type="search"/></div>');function xv(t,e){re(e,!0);let i=K("");var a=_v(),n=x(a),r=x(n);bv(r);var o=S(n,2);o.__input=()=>e.oninput(l(i)),H(s=>se(o,"placeholder",s),[()=>ve("Search Movies And Shows")]),ha(o,()=>l(i),s=>M(i,s)),y(t,a),le()}we(["input"]);const wv=[{label:"Aruba",value:"AW"},{label:"Afghanistan",value:"AF"},{label:"Angola",value:"AO"},{label:"Anguilla",value:"AI"},{label:"Albania",value:"AL"},{label:"Andorra",value:"AD"},{label:"United Arab Emirates",value:"AE"},{label:"Argentina",value:"AR"},{label:"Armenia",value:"AM"},{label:"American Samoa",value:"AS"},{label:"Antigua and Barbuda",value:"AG"},{label:"Australia",value:"AU"},{label:"Austria",value:"AT"},{label:"Azerbaijan",value:"AZ"},{label:"Burundi",value:"BI"},{label:"Belgium",value:"BE"},{label:"Benin",value:"BJ"},{label:"Burkina Faso",value:"BF"},{label:"Bangladesh",value:"BD"},{label:"Bulgaria",value:"BG"},{label:"Bahrain",value:"BH"},{label:"Bahamas",value:"BS"},{label:"Bosnia and Herzegovina",value:"BA"},{label:"Belarus",value:"BY"},{label:"Belize",value:"BZ"},{label:"Bermuda",value:"BM"},{label:"Bolivia",value:"BO"},{label:"Brazil",value:"BR"},{label:"Barbados",value:"BB"},{label:"Brunei",value:"BN"},{label:"Bhutan",value:"BT"},{label:"Botswana",value:"BW"},{label:"Central African Republic",value:"CF"},{label:"Canada",value:"CA"},{label:"Switzerland",value:"CH"},{label:"Chile",value:"CL"},{label:"China",value:"CN"},{label:"Côte d'Ivoire",value:"CI"},{label:"Cameroon",value:"CM"},{label:"DR Congo",value:"CD"},{label:"Congo",value:"CG"},{label:"Cook Islands",value:"CK"},{label:"Colombia",value:"CO"},{label:"Comoros",value:"KM"},{label:"Cabo Verde",value:"CV"},{label:"Costa Rica",value:"CR"},{label:"Cuba",value:"CU"},{label:"Curaçao",value:"CW"},{label:"Cayman Islands",value:"KY"},{label:"Cyprus",value:"CY"},{label:"Czechia",value:"CZ"},{label:"Germany",value:"DE"},{label:"Djibouti",value:"DJ"},{label:"Dominica",value:"DM"},{label:"Denmark",value:"DK"},{label:"Dominican Republic",value:"DO"},{label:"Algeria",value:"DZ"},{label:"Ecuador",value:"EC"},{label:"Egypt",value:"EG"},{label:"Eritrea",value:"ER"},{label:"Spain",value:"ES"},{label:"Estonia",value:"EE"},{label:"Ethiopia",value:"ET"},{label:"Finland",value:"FI"},{label:"Fiji",value:"FJ"},{label:"Falkland Islands",value:"FK"},{label:"France",value:"FR"},{label:"Faroe Islands",value:"FO"},{label:"Micronesia",value:"FM"},{label:"Gabon",value:"GA"},{label:"United Kingdom",value:"GB"},{label:"Georgia",value:"GE"},{label:"Ghana",value:"GH"},{label:"Gibraltar",value:"GI"},{label:"Guinea",value:"GN"},{label:"Guadeloupe",value:"GP"},{label:"Gambia",value:"GM"},{label:"Guinea-Bissau",value:"GW"},{label:"Equatorial Guinea",value:"GQ"},{label:"Greece",value:"GR"},{label:"Grenada",value:"GD"},{label:"Greenland",value:"GL"},{label:"Guatemala",value:"GT"},{label:"Guyana",value:"GY"},{label:"Hong Kong",value:"HK"},{label:"Honduras",value:"HN"},{label:"Croatia",value:"HR"},{label:"Haiti",value:"HT"},{label:"Hungary",value:"HU"},{label:"Indonesia",value:"ID"},{label:"India",value:"IN"},{label:"Ireland",value:"IE"},{label:"Iran",value:"IR"},{label:"Iraq",value:"IQ"},{label:"Iceland",value:"IS"},{label:"Israel",value:"IL"},{label:"Italy",value:"IT"},{label:"Jamaica",value:"JM"},{label:"Jordan",value:"JO"},{label:"Japan",value:"JP"},{label:"Kazakhstan",value:"KZ"},{label:"Kenya",value:"KE"},{label:"Kyrgyzstan",value:"KG"},{label:"Cambodia",value:"KH"},{label:"Kiribati",value:"KI"},{label:"Saint Kitts and Nevis",value:"KN"},{label:"South Korea",value:"KR"},{label:"Kuwait",value:"KW"},{label:"Laos",value:"LA"},{label:"Lebanon",value:"LB"},{label:"Liberia",value:"LR"},{label:"Libya",value:"LY"},{label:"Saint Lucia",value:"LC"},{label:"Liechtenstein",value:"LI"},{label:"Sri Lanka",value:"LK"},{label:"Lesotho",value:"LS"},{label:"Lithuania",value:"LT"},{label:"Luxembourg",value:"LU"},{label:"Latvia",value:"LV"},{label:"Macao",value:"MO"},{label:"Morocco",value:"MA"},{label:"Monaco",value:"MC"},{label:"Moldova",value:"MD"},{label:"Madagascar",value:"MG"},{label:"Maldives",value:"MV"},{label:"Mexico",value:"MX"},{label:"Marshall Islands",value:"MH"},{label:"North Macedonia",value:"MK"},{label:"Mali",value:"ML"},{label:"Malta",value:"MT"},{label:"Myanmar",value:"MM"},{label:"Montenegro",value:"ME"},{label:"Mongolia",value:"MN"},{label:"Mozambique",value:"MZ"},{label:"Mauritania",value:"MR"},{label:"Martinique",value:"MQ"},{label:"Mauritius",value:"MU"},{label:"Malawi",value:"MW"},{label:"Malaysia",value:"MY"},{label:"Namibia",value:"NA"},{label:"New Caledonia",value:"NC"},{label:"Niger",value:"NE"},{label:"Nigeria",value:"NG"},{label:"Nicaragua",value:"NI"},{label:"Niue",value:"NU"},{label:"Netherlands",value:"NL"},{label:"Norway",value:"NO"},{label:"Nepal",value:"NP"},{label:"Nauru",value:"NR"},{label:"New Zealand",value:"NZ"},{label:"Oman",value:"OM"},{label:"Pakistan",value:"PK"},{label:"Panama",value:"PA"},{label:"Peru",value:"PE"},{label:"Philippines",value:"PH"},{label:"Palau",value:"PW"},{label:"Papua New Guinea",value:"PG"},{label:"Poland",value:"PL"},{label:"Puerto Rico",value:"PR"},{label:"North Korea",value:"KP"},{label:"Portugal",value:"PT"},{label:"Paraguay",value:"PY"},{label:"Palestine",value:"PS"},{label:"French Polynesia",value:"PF"},{label:"Qatar",value:"QA"},{label:"Romania",value:"RO"},{label:"Russian Federation",value:"RU"},{label:"Rwanda",value:"RW"},{label:"Saudi Arabia",value:"SA"},{label:"Sudan",value:"SD"},{label:"Senegal",value:"SN"},{label:"Singapore",value:"SG"},{label:"Solomon Islands",value:"SB"},{label:"Sierra Leone",value:"SL"},{label:"El Salvador",value:"SV"},{label:"San Marino",value:"SM"},{label:"Somalia",value:"SO"},{label:"Serbia",value:"RS"},{label:"South Sudan",value:"SS"},{label:"São Tomé and Príncipe",value:"ST"},{label:"Suriname",value:"SR"},{label:"Slovakia",value:"SK"},{label:"Slovenia",value:"SI"},{label:"Sweden",value:"SE"},{label:"Eswatini",value:"SZ"},{label:"Seychelles",value:"SC"},{label:"Syria",value:"SY"},{label:"Chad",value:"TD"},{label:"Togo",value:"TG"},{label:"Thailand",value:"TH"},{label:"Tajikistan",value:"TJ"},{label:"Turkmenistan",value:"TM"},{label:"Timor-Leste",value:"TL"},{label:"Tonga",value:"TO"},{label:"Trinidad and Tobago",value:"TT"},{label:"Tunisia",value:"TN"},{label:"Turkey",value:"TR"},{label:"Tuvalu",value:"TV"},{label:"Taiwan",value:"TW"},{label:"Tanzania",value:"TZ"},{label:"Uganda",value:"UG"},{label:"Ukraine",value:"UA"},{label:"Uruguay",value:"UY"},{label:"United States",value:"US"},{label:"Uzbekistan",value:"UZ"},{label:"Saint Vincent and the Grenadines",value:"VC"},{label:"Venezuela",value:"VE"},{label:"Vietnam",value:"VN"},{label:"Vanuatu",value:"VU"},{label:"Samoa",value:"WS"},{label:"Yemen",value:"YE"},{label:"South Africa",value:"ZA"},{label:"Zambia",value:"ZM"},{label:"Zimbabwe",value:"ZW"}];async function kv(){const t=vi();if(!t)throw new Error("No token was provided");const e={region:await Vr(),page:1,include_count:"false"};return await Xt(`/providers/?api-token=${t}&`+Or(e))}function Sv(t){const e=t-1;return e*e*e+1}function Tv(t,{from:e,to:i},a={}){var{delay:n=0,duration:r=C=>Math.sqrt(C)*120,easing:o=Sv}=a,s=getComputedStyle(t),c=s.transform==="none"?"":s.transform,[d,u]=s.transformOrigin.split(" ").map(parseFloat);d/=t.clientWidth,u/=t.clientHeight;var v=Pv(t),p=t.clientWidth/i.width/v,h=t.clientHeight/i.height/v,g=e.left+e.width*d,f=e.top+e.height*u,_=i.left+i.width*d,b=i.top+i.height*u,P=(g-_)*p,w=(f-b)*h,k=e.width/i.width,L=e.height/i.height;return{delay:n,duration:typeof r=="function"?r(Math.sqrt(P*P+w*w)):r,easing:o,css:(C,j)=>{var V=j*P,z=j*w,I=C+j*k,E=C+j*L;return`transform: ${c} translate(${V}px, ${z}px) scale(${I}, ${E});`}}}function Pv(t){if("currentCSSZoom"in t)return t.currentCSSZoom;for(var e=t,i=1;e!==null;)i*=+getComputedStyle(e).zoom,e=e.parentElement;return i}var Ev=Re('<svg width="18px" height="18px" viewBox="0 -960 960 960"><path d="M200-440v-80h560v80H200Z" fill="currentColor"></path></svg>');function Cv(t){var e=Ev();y(t,e)}var Iv=Re('<svg width="18px" height="18px" viewBox="0 -960 960 960"><path d="M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z" fill="currentColor"></path></svg>');function jv(t){var e=Iv();y(t,e)}var zv=T('<div class="icon svelte-dfwzqz"><!></div>'),Av=T('<div><button> <div class="action svelte-dfwzqz"><!></div></button></div>'),Lv=T('<div class="header svelte-dfwzqz"><input type="text" class="input svelte-dfwzqz" aria-label="Search"/></div> <div class="options" data-testid="toggles-with-search"></div>',1);function Mv(t,e){re(e,!0);let i=D(e,"options",19,()=>[{label:"Label",value:"Value"}]),a=D(e,"selected",23,()=>[]),n=D(e,"placeholder",19,()=>`${ve("Search")}...`),r=D(e,"onchange",3,()=>null),o=K("");const s=U(c);function c(){var g;return(g=i())!=null&&g.length?l(o)?i().filter(({label:f})=>f.toLowerCase().indexOf(l(o).toLowerCase())!==-1):i():[]}function d(g){const f=a().find(_=>_===g);a(f?a().filter(_=>_!==g):[...a(),g]),r()(a())}var u=Lv(),v=Z(u),p=x(v),h=S(v,2);Le(h,29,()=>l(s)||[],({label:g,value:f})=>f,(g,f)=>{let _=()=>l(f).label,b=()=>l(f).value;const P=U(()=>!!a().find(z=>z===b()));var w=Av(),k=x(w);let L;k.__click=()=>d(b());var C=x(k),j=S(C),V=x(j);va(V,()=>l(P),z=>{var I=zv(),E=x(I);{var A=N=>{Cv(N)},F=N=>{jv(N)};O(E,N=>{l(P)?N(A):N(F,!1)})}Ae(3,I,()=>ba,()=>({start:.25,duration:100})),y(z,I)}),H(()=>{L=_e(k,1,"option svelte-dfwzqz",null,L,{active:l(P)}),J(C,`${_()??""} `)}),xd(w,()=>Tv,()=>({duration:150})),y(g,w)}),H(()=>se(p,"placeholder",n())),ha(p,()=>l(o),g=>M(o,g)),y(t,u),le()}we(["click"]);var qv=T('<div class="content playpilot-styled-scrollbar svelte-fg0dzp"><!></div>'),Dv=T("<div><!> <!></div>");function fs(t,e){re(e,!0);let i=K(!1),a=K(null),n=K(null),r=K("left"),o=K(0),s=K(0);function c(f){const _=f.target;_&&_.closest(".dropdown")!==l(a)&&M(i,!1)}function d(f){M(i,!l(i)),l(i)&&(M(s,0),M(o,0),u(f.target))}async function u(f){if(await Fa(),!l(n))return;const _=16,b=200,P=window.innerHeight,w=window.innerWidth,{top:k}=l(n).getBoundingClientRect(),{left:L}=f.getBoundingClientRect();M(r,L<window.innerWidth/2?"left":"right",!0),M(o,Math.max(Math.min(window.innerHeight-k-_,P*.6),b),!0),await Fa();const{left:C,right:j}=l(n).getBoundingClientRect(),V=w-j;C-_<0?M(s,V):V-_<0&&M(s,V-_)}var v=Dv();ye("click",Ee,c);var p=x(v);Ve(p,()=>e.button,()=>({toggle:d}));var h=S(p,2);{var g=f=>{var _=qv();let b;var P=x(_);Ve(P,()=>e.content),$e(_,w=>M(n,w),()=>l(n)),H(()=>b=Ye(_,"",b,{"--max-height":l(o)?`${l(o)}px`:null,"--offset":l(s)?`${l(s)}px`:null})),Ae(3,_,()=>ba,()=>({start:.85,duration:100})),y(f,_)};O(h,f=>{l(i)&&f(g)})}$e(v,f=>M(a,f),()=>l(a)),H(()=>_e(v,1,`dropdown ${l(r)??""}`,"svelte-fg0dzp")),y(t,v),le()}var Nv=T('<span class="label svelte-1mfj6k7"> </span>'),Rv=T('<div class="active-line svelte-1mfj6k7"></div>'),Ov=T('<div class="slider svelte-1mfj6k7"><!> <span><input type="range" id="lower"/> <input type="range" id="upper"/> <div class="value-marker svelte-1mfj6k7"> </div> <div class="value-marker right svelte-1mfj6k7"> </div> <!></span></div>');function Bv(t,e){re(e,!0);const i=D(e,"range",19,()=>[0,100]),a=D(e,"value",19,i),n=D(e,"label",3,""),r=D(e,"valueAppend",3,""),o=D(e,"formatFunction",3,q=>q.toString()),s=D(e,"onchange",3,()=>null);let c=i(),d=U(()=>ta(c,2)),u=K(Fe(l(d)[0])),v=K(Fe(l(d)[1]));const p=U(()=>l(u)!==i()[0]||l(v)!==i()[1]),h=U(()=>100/(i()[1]-i()[0])*(l(u)-i()[0])),g=U(()=>100+100/(i()[1]-i()[0])*(l(v)-i()[1])-l(h)),f=U(()=>Math.abs(i()[0]-i()[1])>10&&Math.abs(l(u)-l(v))<5);Ke(()=>{_(a())}),Ke(()=>{M(v,Math.max(l(v),l(u)+1),!0),M(v,Math.min(l(v),i()[1]),!0),M(u,Math.min(l(u),l(v)-1),!0),M(u,Math.max(l(u),i()[0]),!0)});function _(q){(R=>{var Y=ta(R,2);M(u,Y[0],!0),M(v,Y[1],!0)})(q)}function b(){requestAnimationFrame(()=>s()([l(u),l(v)]))}var P=Ov(),w=x(P);{var k=q=>{var R=Nv(),Y=x(R);H((Q,X)=>J(Y,`${n()??""}: ${Q??""}—${X??""} ${r()??""}`),[()=>o()(l(u)),()=>o()(l(v))]),y(q,R)};O(w,q=>{n()&&q(k)})}var L=S(w,2);let C;var j=x(L);j.__mouseup=b,j.__touchend=b,j.__input=function(...q){};let V;var z=S(j,2);z.__mouseup=b,z.__touchend=b,z.__input=function(...q){};let I;var E=S(z,2),A=x(E),F=S(E,2),N=x(F),W=S(F,2);{var G=q=>{var R=Rv();let Y;H(()=>Y=Ye(R,"",Y,{left:l(h)+"%","--width":l(g)+"%"})),y(q,R)};O(W,q=>{l(p)&&q(G)})}H(()=>{C=_e(L,1,"range svelte-1mfj6k7",null,C,{halved:l(f)}),se(j,"min",i()[0]),se(j,"max",i()[1]),V=_e(j,1,"svelte-1mfj6k7",null,V,{active:l(p)}),se(z,"min",i()[0]),se(z,"max",i()[1]),I=_e(z,1,"svelte-1mfj6k7",null,I,{active:l(p)}),J(A,l(u)),J(N,l(v))}),ha(j,()=>l(u),q=>M(u,q)),ha(z,()=>l(v),q=>M(v,q)),y(t,P),le()}we(["mouseup","touchend","input"]);function Yr(t,e){if(!t)return!1;const{type:i,value:a}=t;return!(i==="array"&&!a.length||i==="range"&&JSON.stringify(a)===JSON.stringify(e))}var Fv=T(" <!>",1),Hv=T('<p class="loading"> </p>'),Vv=T('<p class="error"> </p>'),Uv=T('<div class="content svelte-er0ukh" data-testid="content"><!> <!></div>'),Wv=T('<div data-testid="filter-item"><!></div>');function Gv(t,e){re(e,!0);let i=D(e,"filter",7),a=D(e,"onchange",3,()=>null),n=D(e,"data",7,null),r=D(e,"fetchData",3,null),o=D(e,"range",3,null),s=D(e,"valueAppend",3,"");const c=U(()=>Yr(i()[e.param],o()));let d=K(!!r());Ke(()=>{!n()&&r()&&u()});async function u(){try{M(d,!0),n(await r()())}catch{fe(pe.ExploreFetchProvidersFailed)}finally{M(d,!1)}}function v(f,_){if(fe(pe.ExploreSetFilter,null,{key:e.param,value:f,total_filter:i()}),!f){delete i()[e.param];return}i()[e.param]={type:_,value:f},a()()}var p=Wv();let h;var g=x(p);fs(g,{button:(b,P)=>{let w=()=>P==null?void 0:P().toggle;Ui(b,{variant:"border",size:"large",get active(){return l(c)},get onclick(){return w()},children:(k,L)=>{var C=Fv(),j=Z(C),V=S(j);Nt(V,{direction:"down"}),H(()=>J(j,`${e.label??""} `)),y(k,C)},$$slots:{default:!0}})},content:b=>{var P=Uv(),w=x(P);{var k=z=>{var I=Hv(),E=x(I);H(A=>J(E,`${A??""}...`),[()=>ve("Loading")]),y(z,I)},L=z=>{var I=me(),E=Z(I);{var A=F=>{var N=Vv(),W=x(N);H(G=>J(W,G),[()=>ve("An Error Occurred")]),y(F,N)};O(E,F=>{r()&&!n()&&F(A)},!0)}y(z,I)};O(w,z=>{l(d)?z(k):z(L,!1)})}var C=S(w,2);{var j=z=>{const I=U(()=>{var E;return(E=i()[e.param])==null?void 0:E.value});Mv(z,{get options(){return n()},get selected(){return l(I)},onchange:E=>v(E,"array")})},V=z=>{var I=me(),E=Z(I);{var A=F=>{const N=U(()=>{var W;return(W=i()[e.param])==null?void 0:W.value});Bv(F,{get range(){return o()},get value(){return l(N)},get label(){return e.label},get valueAppend(){return s()},onchange:W=>v(W,"range")})};O(E,F=>{o()&&F(A)},!0)}y(z,I)};O(C,z=>{n()?z(j):z(V,!1)})}y(b,P)},$$slots:{button:!0,content:!0}}),H(()=>h=_e(p,1,"filter-item svelte-er0ukh",null,h,{active:l(c)})),y(t,p),le()}var Kv=T(" <!>",1),Yv=T("<button> </button>"),Zv=T('<div class="content svelte-1ibt2k4" data-testid="content"></div>');function Jv(t,e){re(e,!0);const i=D(e,"filter",7),a=D(e,"onchange",3,()=>null),n="ordering",r=[{label:"Popularity",value:qn.Popular},{label:"New",value:qn.New},{label:"Top Rated",value:qn.Best}],o=U(()=>{var c;return((c=r.find(({value:d})=>{var u;return d===((u=i()[n])==null?void 0:u.value)}))==null?void 0:c.label)||"Sort By"});function s(c){c?i()[n]={type:"string",value:c}:delete i()[n],a()()}fs(t,{button:(u,v)=>{let p=()=>v==null?void 0:v().toggle;Ui(u,{variant:"link",get onclick(){return p()},children:(h,g)=>{var f=Kv(),_=Z(f),b=S(_);Nt(b,{direction:"down"}),H(P=>J(_,`${P??""} `),[()=>ve(l(o))]),y(h,f)},$$slots:{default:!0}})},content:u=>{var v=Zv();Le(v,21,()=>r,qe,(p,h,g,f)=>{let _=()=>l(h).label,b=()=>l(h).value;const P=U(()=>{var C;return b()===((C=i()[n])==null?void 0:C.value)});var w=Yv();let k;w.__click=()=>s(b());var L=x(w);H(C=>{k=_e(w,1,"option svelte-1ibt2k4",null,k,{active:l(P)}),J(L,C)},[()=>ve(_())]),y(p,w)}),y(u,v)},$$slots:{button:!0,content:!0}}),le()}we(["click"]);var Qv=Re('<svg width="11" height="13" viewBox="0 0 11 13"><path d="M9.77037 6.86774C9.68778 7.21645 9.48992 7.52709 9.20883 7.74937C8.92774 7.97166 8.57987 8.09259 8.22151 8.09259C7.86315 8.09259 7.51528 7.97166 7.23419 7.74937C6.9531 7.52709 6.75525 7.21645 6.67265 6.86774L0.385491 6.86774C0.335766 6.87014 0.286069 6.86243 0.239415 6.84505C0.192761 6.82768 0.150121 6.80101 0.114079 6.76667C0.0780373 6.73233 0.0493441 6.69103 0.0297394 6.64527C0.0101337 6.5995 2.67029e-05 6.55024 2.67029e-05 6.50045C2.67029e-05 6.45067 0.0101337 6.40141 0.0297394 6.35565C0.0493441 6.30989 0.0780373 6.26858 0.114079 6.23424C0.150121 6.1999 0.192761 6.17323 0.239415 6.15586C0.286069 6.13849 0.335766 6.13077 0.385491 6.13317L6.67265 6.13317C6.75525 5.78446 6.9531 5.47382 7.23419 5.25154C7.51528 5.02925 7.86315 4.90833 8.22151 4.90833C8.57987 4.90833 8.92774 5.02925 9.20883 5.25154C9.48992 5.47382 9.68778 5.78446 9.77037 6.13317H10.1801C10.2298 6.13077 10.2795 6.13849 10.3262 6.15586C10.3728 6.17323 10.4155 6.1999 10.4515 6.23424C10.4875 6.26858 10.5162 6.30989 10.5358 6.35565C10.5554 6.40141 10.5656 6.45067 10.5656 6.50045C10.5656 6.55024 10.5554 6.5995 10.5358 6.64527C10.5162 6.69103 10.4875 6.73233 10.4515 6.76667C10.4155 6.80101 10.3728 6.82768 10.3262 6.84505C10.2795 6.86243 10.2298 6.87014 10.1801 6.86774H9.77037ZM8.22151 5.64374C8.05198 5.64374 7.88626 5.69401 7.74531 5.7882C7.60435 5.88238 7.49449 6.01625 7.42961 6.17287C7.36474 6.32949 7.34776 6.50183 7.38084 6.6681C7.41391 6.83437 7.49554 6.9871 7.61542 7.10698C7.73529 7.22685 7.88802 7.30849 8.05429 7.34156C8.22056 7.37463 8.3929 7.35766 8.54953 7.29278C8.70615 7.22791 8.84002 7.11805 8.9342 6.97709C9.02839 6.83613 9.07866 6.67041 9.07866 6.50089C9.07877 6.38825 9.05668 6.2767 9.01366 6.17261C8.97063 6.06851 8.90751 5.97392 8.82791 5.89424C8.7483 5.81455 8.65377 5.75134 8.54973 5.70821C8.44568 5.66508 8.33415 5.64288 8.22151 5.64288V5.64374Z" fill="currentColor"></path><path d="M3.8929 2.45945C3.8103 2.80816 3.61245 3.11879 3.33136 3.34108C3.05027 3.56336 2.7024 3.68429 2.34404 3.68429C1.98568 3.68429 1.63781 3.56336 1.35672 3.34108C1.07563 3.11879 0.87778 2.80816 0.795181 2.45945H0.385466C0.291124 2.45489 0.202153 2.4142 0.136997 2.34582C0.0718422 2.27744 0.0354977 2.18661 0.0354977 2.09216C0.0354977 1.99771 0.0718422 1.90688 0.136997 1.8385C0.202153 1.77012 0.291124 1.72943 0.385466 1.72488H0.795181C0.87778 1.37617 1.07563 1.06553 1.35672 0.843245C1.63781 0.620959 1.98568 0.500031 2.34404 0.500031C2.7024 0.500031 3.05027 0.620959 3.33136 0.843245C3.61245 1.06553 3.8103 1.37617 3.8929 1.72488L10.1801 1.72488C10.2744 1.72943 10.3634 1.77012 10.4285 1.8385C10.4937 1.90688 10.53 1.99771 10.53 2.09216C10.53 2.18661 10.4937 2.27744 10.4285 2.34582C10.3634 2.4142 10.2744 2.45489 10.1801 2.45945L3.8929 2.45945ZM2.34404 1.23544C2.17451 1.23544 2.00879 1.28572 1.86784 1.3799C1.72688 1.47408 1.61702 1.60795 1.55214 1.76458C1.48727 1.9212 1.47029 2.09354 1.50337 2.25981C1.53644 2.42608 1.61807 2.57881 1.73795 2.69868C1.85782 2.81856 2.01055 2.90019 2.17682 2.93327C2.34309 2.96634 2.51543 2.94936 2.67206 2.88449C2.82868 2.81961 2.96255 2.70975 3.05673 2.56879C3.15092 2.42784 3.20119 2.26212 3.20119 2.09259C3.2013 1.97996 3.17921 1.8684 3.13619 1.76431C3.09316 1.66022 3.03004 1.56563 2.95044 1.48594C2.87083 1.40626 2.77631 1.34304 2.67226 1.29992C2.56821 1.25679 2.45668 1.23459 2.34404 1.23459V1.23544Z" fill="currentColor"></path><path d="M6.0975 11.2752C6.01491 11.6239 5.81705 11.9345 5.53596 12.1568C5.25488 12.3791 4.907 12.5 4.54864 12.5C4.19028 12.5 3.84241 12.3791 3.56132 12.1568C3.28024 11.9345 3.08238 11.6239 2.99978 11.2752H0.385491C0.335766 11.2776 0.286069 11.2699 0.239415 11.2525C0.192761 11.2351 0.150121 11.2085 0.114079 11.1741C0.0780373 11.1398 0.0493441 11.0985 0.0297394 11.0527C0.0101337 11.0069 2.67029e-05 10.9577 2.67029e-05 10.9079C2.67029e-05 10.8581 0.0101337 10.8088 0.0297394 10.7631C0.0493441 10.7173 0.0780373 10.676 0.114079 10.6417C0.150121 10.6073 0.192761 10.5807 0.239415 10.5633C0.286069 10.5459 0.335766 10.5382 0.385491 10.5406H2.99978C3.08238 10.1919 3.28024 9.88126 3.56132 9.65898C3.84241 9.43669 4.19028 9.31577 4.54864 9.31577C4.907 9.31577 5.25488 9.43669 5.53596 9.65898C5.81705 9.88126 6.01491 10.1919 6.0975 10.5406H10.1801C10.2298 10.5382 10.2795 10.5459 10.3262 10.5633C10.3728 10.5807 10.4155 10.6073 10.4515 10.6417C10.4875 10.676 10.5162 10.7173 10.5358 10.7631C10.5554 10.8088 10.5656 10.8581 10.5656 10.9079C10.5656 10.9577 10.5554 11.0069 10.5358 11.0527C10.5162 11.0985 10.4875 11.1398 10.4515 11.1741C10.4155 11.2085 10.3728 11.2351 10.3262 11.2525C10.2795 11.2699 10.2298 11.2776 10.1801 11.2752H6.0975ZM4.54779 10.0503C4.37826 10.0503 4.21254 10.1006 4.07158 10.1948C3.93063 10.289 3.82077 10.4228 3.75589 10.5795C3.69101 10.7361 3.67404 10.9084 3.70711 11.0747C3.74018 11.241 3.82182 11.3937 3.94169 11.5136C4.06157 11.6334 4.2143 11.7151 4.38057 11.7481C4.54684 11.7812 4.71918 11.7642 4.8758 11.6994C5.03242 11.6345 5.16629 11.5246 5.26048 11.3837C5.35466 11.2427 5.40493 11.077 5.40493 10.9075C5.40493 10.6801 5.31463 10.4621 5.15388 10.3014C4.99313 10.1406 4.77512 10.0503 4.54779 10.0503Z" fill="currentColor"></path></svg>');function Xv(t){var e=Qv();y(t,e)}var $v=T('<button class="item svelte-cwy6fi"><!> <!></button>'),ep=T('<div class="active-filter svelte-cwy6fi"></div>');function tp(t,e){re(e,!0);function i(r){delete e.filter[r]}function a(r){let o=r.slice(0,30).trim();return r.length>o.length&&(o+="..."),o}var n=ep();Le(n,21,()=>Object.entries(e.filter),qe,(r,o)=>{var s=U(()=>ta(l(o),2));let c=()=>l(s)[0],d=()=>l(s)[1];const u=U(()=>{const{label:g,range:f,data:_,fetchData:b}=e.items.find(P=>c()===P.param)||{};return{label:g,range:f,data:_,fetchData:b}});var v=me(),p=Z(v);{var h=g=>{var f=$v();f.__click=()=>i(c());var _=x(f);{var b=k=>{var L=me(),C=Z(L);ua(C,()=>{var j,V;return((V=(j=l(u)).fetchData)==null?void 0:V.call(j))||l(u).data},null,(j,V)=>{var z=Je();H(I=>J(z,I),[()=>{var I;return a((I=l(V))==null?void 0:I.filter(E=>d().value.includes(E.value)).map(E=>E.label).join(" + "))}]),y(j,z)}),y(k,L)},P=k=>{var L=me(),C=Z(L);{var j=z=>{var I=Je();H(E=>J(I,`${l(u).label??""}: ${E??""}`),[()=>d().value.join(" - ")]),y(z,I)},V=z=>{var I=Je();H(E=>J(I,E),[()=>ve(d().value)]),y(z,I)};O(C,z=>{d().type==="range"?z(j):z(V,!1)},!0)}y(k,L)};O(_,k=>{d().type==="array"?k(b):k(P,!1)})}var w=S(_,2);Ya(w,{size:8}),y(g,f)};O(p,g=>{Yr(d(),l(u).range)&&g(h)})}y(r,v)}),y(t,n),le()}we(["click"]);var ip=T("<div><!></div>"),ap=T("<!> <!>",1),np=T('<div class="sorting svelte-11dg01g"><!></div>'),rp=T('<div role="navigation"><div class="items svelte-11dg01g"></div> <div class="actions svelte-11dg01g"><!> <!></div></div> <!>',1);function lp(t,e){re(e,!0);const i=D(e,"limit",3,!0),a=D(e,"showSorting",3,!0),n=D(e,"searchQuery",3,""),r=D(e,"onchange",3,()=>null),o=D(e,"onempty",3,()=>null),s=3,c=[{label:ve("Services"),param:"providers",fetchData:async()=>(await kv()).map(L=>({label:L.name,value:L.slug}))},{label:ve("Genres"),param:"genres",data:Ln.filter(L=>parseInt(L.slug)<900).map(L=>({label:ve(L.name),value:L.slug}))},{label:ve("IMDb"),param:"imdb_score",range:[0,10]},{label:ve("Year"),param:"year",range:[1900,new Date().getFullYear()]},{label:ve("Runtime"),param:"length",range:[0,180],valueAppend:ve("Minutes")},{label:ve("Countries"),param:"country_codes",data:wv}];let d=K(Fe(i())),u=!1;Ke(()=>{Object.keys(e.filter).some(C=>{const{range:j}=c.find(V=>C===V.param)||{};return Yr(e.filter[C],j)})||n()?u=!0:u&&(u=!1,o()())});var v=rp(),p=Z(v);let h;var g=x(p);Le(g,21,()=>l(d)?c.slice(0,s):c,qe,(L,C)=>{var j=ip(),V=x(j);Gv(V,En({get filter(){return e.filter},get onchange(){return r()}},()=>l(C))),Ae(3,j,()=>ba,()=>({start:.75,duration:100})),y(L,j)});var f=S(g,2),_=x(f);{var b=L=>{Ui(L,{variant:"link",onclick:()=>M(d,!l(d)),children:(C,j)=>{var V=ap(),z=Z(V);Xv(z);var I=S(z),E=S(I);{let A=U(()=>l(d)?"down":"up");Nt(E,{get direction(){return l(A)}})}H(A=>J(I,` ${A??""} `),[()=>ve("All Filters")]),y(C,V)},$$slots:{default:!0}})};O(_,L=>{i()&&L(b)})}var P=S(_,2);{var w=L=>{var C=np(),j=x(C);Jv(j,{get filter(){return e.filter},get onchange(){return r()}}),Ae(3,C,()=>ya,()=>({x:5,duration:100})),y(L,C)};O(P,L=>{a()&&L(w)})}var k=S(p,2);tp(k,{get filter(){return e.filter},get items(){return c}}),H(()=>h=_e(p,1,"filter svelte-11dg01g",null,h,{limit:i()})),y(t,v),le()}function op(t,e){re(e,!0);const i=D(e,"trackingEvent",19,()=>pe.ExploreAnyClick);function a(o){var w;const s=o.target,c=s.parentElement;if(s===document.body)return;const d=`${c==null?void 0:c.nodeName.toLowerCase()}${n(c)}`,u=`${s==null?void 0:s.nodeName.toLowerCase()}${n(s)}`,v=`${d} > ${u}`,p=s.closest("a, button"),h=r(s)||r(c)||p&&r(p),g=h?(w=h.textContent)==null?void 0:w.slice(0,30):"",f=s.getAttribute("aria-label")||(p==null?void 0:p.getAttribute("aria-label"))||(c==null?void 0:c.getAttribute("aria-label")),_=s.placeholder,b=s.alt,P=(g||f||_||b||"").trim();fe(i(),null,{selector:v,text:P})}function n(o){if(!o)return"";const s=Array.from(o.classList).filter(c=>!c.startsWith("s-"));return s.length?"."+s.join("."):""}function r(o){var s;return(s=o==null?void 0:o.childNodes)!=null&&s.length&&Array.from(o.childNodes).find(c=>{var d;return c.nodeName==="#text"&&!!((d=c.textContent)!=null&&d.trim())})||null}ye("click",Ee,a),le()}function sp(t,e){re(e,!0);const i=D(e,"trackingEvent",19,()=>pe.ExploreScrollDistance),a={25:!1,50:!1,75:!1,100:!1};function n(){const r=window.scrollY,o=window.innerHeight,d=100/(e.element.clientHeight+r+e.element.getBoundingClientRect().top)*(r+o);for(const u in a)a[u]||d<parseInt(u)||(a[u]=!0,fe(i(),null,{scroll_percentage:u+"%"}))}ye("scroll",Ee,n),le()}var cp=T('<p class="description svelte-l2apr8"> </p>'),dp=T('<div class="filter svelte-l2apr8"><!></div>'),up=T('<div class="explore playpilot-styled-scrollbar svelte-l2apr8"><div class="header svelte-l2apr8" role="banner"><div><div class="divider svelte-l2apr8"></div> <div class="heading svelte-l2apr8"> </div> <div class="subheading svelte-l2apr8"> </div> <!></div></div> <!> <!> <!></div> <!> <!>',1);function vp(t,e){re(e,!0);let i=D(e,"navigate",3,()=>null),a=D(e,"searchQuery",15,""),n=D(e,"filter",27,()=>Fe({})),r=null,o=K(null),s=K(Fe(window.innerWidth));Ke(()=>{var z;M(o,((z=r==null?void 0:r.closest(Jr))==null?void 0:z.style.height)||null,!0)}),Qe(async()=>{var z;fe(pe.ExplorePageView),(z=window.PlayPilotLinkInjections.ads)!=null&&z.length||(window.PlayPilotLinkInjections.ads=await is())});var c=up(),d=Z(c);let u;var v=x(d),p=x(v),h=S(x(p),2),g=x(h);ft(h,z=>ze==null?void 0:ze(z));var f=S(h,2),_=x(f);ft(f,(z,I)=>ze==null?void 0:ze(z,I),()=>2);var b=S(f,2);{var P=z=>{var I=cp(),E=x(I);H(A=>J(E,A),[()=>ve("Streaming Guide Description")]),y(z,I)};O(b,z=>{xa()||z(P)})}var w=S(v,2);xv(w,{oninput:z=>a(z)});var k=S(w,2);{var L=z=>{var I=dp(),E=x(I);{let A=U(()=>l(s)<500),F=U(()=>!a());lp(E,{get filter(){return n()},get searchQuery(){return a()},get limit(){return l(A)},get showSorting(){return l(F)},onchange:()=>i()("results"),onempty:()=>i()("home")})}y(z,I)};O(k,z=>{xa()&&z(L)})}var C=S(k,2);Ve(C,()=>e.children),$e(d,z=>r=z,()=>r);var j=S(d,2);op(j,{});var V=S(j,2);sp(V,{get element(){return r}}),H((z,I)=>{u=Ye(d,"",u,{height:l(o),"--playpilot-explore-width":`${l(s)??""}px`}),J(g,z),J(_,I)},[()=>ve("Streaming Guide"),()=>ve("Streaming Guide Subheading")]),qt(d,"clientWidth",z=>M(s,z)),y(t,c),le()}function Za(){var t;return(t=window.PlayPilotLinkInjections.config)!=null&&t.allow_retargeting_pixels?Tt("pixels"):!1}var pp=T('<div class="genre svelte-1mphbln"> </div>'),fp=T('<button class="genre expand svelte-1mphbln"> </button>'),hp=T("<!> <!>",1);function gp(t,e){re(e,!0);let i=K(!1);const a=U(()=>l(i)?e.genres:[e.genres[0]]);var n=hp(),r=Z(n);Le(r,17,()=>l(a),qe,(c,d)=>{const u=U(()=>{var g;return(g=Ln.find(f=>f.slug===l(d)))==null?void 0:g.name});var v=me(),p=Z(v);{var h=g=>{var f=pp(),_=x(f);wn(f,()=>Za()?ds(Dt.GenreInterest,{genre:l(u),source:Ti.Card}):null),H(b=>J(_,b),[()=>ve(l(u))]),y(g,f)};O(p,g=>{l(u)&&g(h)})}y(c,v)});var o=S(r,2);{var s=c=>{var d=fp();d.__click=()=>M(i,!0);var u=x(d);H(()=>J(u,`+${e.genres.length-1}`)),y(c,d)};O(o,c=>{!l(i)&&e.genres.length>1&&c(s)})}y(t,n),le()}we(["click"]);var mp=T('<div class="tooltip-content svelte-1ldthr7" role="paragraph"> </div>'),yp=T('<button class="tooltip svelte-1ldthr7" data-testid="disclaimer"><div aria-label="Disclaimer">i</div> <!></button>');function Zr(t,e){const i=D(e,"small",3,!1);let a=K(!1);function n(u){u.preventDefault(),u.stopPropagation(),M(a,!l(a))}var r=yp();r.__click=n;var o=x(r);let s;var c=S(o,2);{var d=u=>{var v=mp(),p=x(v);H(()=>J(p,e.disclaimer)),Ae(3,v,()=>Pt,()=>({duration:50})),y(u,v)};O(c,u=>{l(a)&&u(d)})}H(()=>s=_e(o,1,"disclaimer svelte-1ldthr7",null,s,{small:i()})),y(t,r)}we(["click"]);var bp=T('<span class="category svelte-13ka2ap" data-testid="category"> </span>'),_p=T('<span class="cta svelte-13ka2ap"> </span>'),xp=T('<div class="playlink-content svelte-13ka2ap"><img alt="" height="36" width="36" class="svelte-13ka2ap"/> <span class="name svelte-13ka2ap"> </span> <!> <!> <div class="action svelte-13ka2ap"> </div> <!></div> <!>',1);function hs(t,e){re(e,!0);const i=D(e,"disclaimer",3,""),a=D(e,"hideCategory",3,!1),n=D(e,"onclick",3,()=>null),r=U(()=>e.playlink.name),o=U(()=>e.playlink.url),s=U(()=>e.playlink.logo_url),c=U(()=>e.playlink.highlighted),d=U(()=>e.playlink.cta_text),u=U(()=>e.playlink.action_text),v=U(()=>e.playlink.pixels),p=U(()=>e.playlink.extra_info.category),h=U(()=>Za()&&!l(c)),g={AVOD:ve("Stream"),SVOD:ve("Stream"),BUY:ve("Buy"),RENT:ve("Rent"),TVOD:ve("Rent Or Buy")};let f=K(0);var _=me(),b=Z(_);xo(b,()=>{var P,w;return!((w=(P=window.PlayPilotLinkInjections)==null?void 0:P.config)!=null&&w.require_affiliate_consent)||Tt("affiliate")?"a":"span"},!1,(P,w)=>{wn(P,()=>l(h)?ds(Dt.ProviderInterest,{provider:e.playlink.slug,source:Ti.Card}):null),wn(P,()=>l(h)?Gu(Dt.ProviderClick,{provider:e.playlink.slug}):null),Io(P,()=>({onclick:n(),href:l(o),target:"_blank",class:"playlink","data-playlink":l(r),rel:"sponsored",[pa]:{highlighted:l(c),"no-category":a(),"no-subtext":!l(d)&&a()}}),void 0,void 0,void 0,"svelte-13ka2ap");var k=xp(),L=Z(k);let C;var j=x(L),V=S(j,2),z=x(V),I=S(V,2);{var E=Q=>{var X=bp(),te=x(X);H(ne=>J(te,ne),[()=>g[l(p)]||ve("Stream")]),y(Q,X)};O(I,Q=>{a()||Q(E)})}var A=S(I,2);{var F=Q=>{var X=_p(),te=x(X);H(()=>J(te,l(d))),y(Q,X)};O(A,Q=>{l(d)&&Q(F)})}var N=S(A,2),W=x(N),G=S(N,2);{var q=Q=>{Zr(Q,{get disclaimer(){return i()},small:!0})};O(G,Q=>{i()&&Q(q)})}var R=S(L,2);{var Y=Q=>{Kr(Q,{get pixels(){return l(v)}})};O(R,Q=>{var X;(X=l(v))!=null&&X.length&&Q(Y)})}H((Q,X)=>{C=Ye(L,"",C,{"--action-width":l(f)?`${l(f)}px`:null}),se(j,"src",Q),J(z,l(r)),J(W,X)},[()=>_a(l(s)),()=>l(u)||ve("Watch")]),qt(N,"clientWidth",Q=>M(f,Q)),y(w,k)}),y(t,_),le()}var wp=T('<div class="disclaimer svelte-1fykz2q" data-testid="commission-disclaimer"> <a href="https://playpilot.com/" target="_blank" rel="sponsored" class="svelte-1fykz2q">PlayPilot.com</a></div>'),kp=T('<div class="empty svelte-1fykz2q" data-testid="playlinks-empty"> </div>'),Sp=T('<div class="heading category svelte-1fykz2q"> </div>'),Tp=T("<!> <!>",1),Pp=T("<!> <div></div>",1),Ep=T('<div class="heading svelte-1fykz2q"> </div> <!> <!>',1);function Cp(t,e){var k,L;re(e,!0);const i=vn("scope")==="modal",a=Ga("card"),n=!!((L=(k=window.PlayPilotLinkInjections)==null?void 0:k.config)!=null&&L.categorize_playlinks);let r=K(0);const o=U(()=>us(e.playlinks)),s=U(()=>v(e.playlinks)),c=U(()=>n?p(l(s)):[["",l(o)]]),d=U(()=>l(r)<500||!!a||l(o).length===1);function u(C){fe(i?pe.TitleModalPlaylinkClick:pe.TitlePopoverPlaylinkClick,e.title,{playlink:C})}function v(C){const j={};for(const V of C){const{category:z}=V.extra_info;z in j||(j[z]=[]),j[z].push(V)}return j}function p(C){const j=["AVOD","SVOD","RENT","BUY"],V=[];for(const I of j)C[I]&&V.push([I,C[I]]);const z=[];for(const I of Object.values(C))for(const E of I)j.includes(E.extra_info.category)||z.push(E);return[...V,["Other",z]]}var h=Ep(),g=Z(h),f=x(g);ft(g,(C,j)=>ze==null?void 0:ze(C,j),()=>3);var _=S(g,2);{var b=C=>{var j=wp(),V=x(j);H(z=>J(V,`${z??""} `),[()=>{var z,I;return((I=(z=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:z.config)==null?void 0:I.playlinks_disclaimer_text)||ve("Commission Disclaimer")}]),y(C,j)},P=C=>{var j=kp(),V=x(j);H(z=>J(V,z),[()=>ve("Title Unavailable")]),y(C,j)};O(_,C=>{l(o).length?C(b):C(P,!1)})}var w=S(_,2);Le(w,17,()=>l(c),qe,(C,j,V,z)=>{var I=U(()=>ta(l(j),2));let E=()=>l(I)[0],A=()=>l(I)[1];var F=Pp(),N=Z(F);{var W=R=>{var Y=Sp(),Q=x(Y);ft(Y,(X,te)=>ze==null?void 0:ze(X,te),()=>4),H(X=>J(Q,X),[()=>ve(`Category: ${E()}`)]),y(R,Y)};O(N,R=>{E()&&A().length&&R(W)})}var G=S(N,2);let q;Le(G,21,A,qe,(R,Y,Q)=>{var X=Tp(),te=Z(X);hs(te,{get playlink(){return l(Y)},onclick:()=>u(l(Y).name)});var ne=S(te,2);{var Te=Ce=>{{let ce=U(()=>ru(a)),ue=U(()=>a.disclaimer||"");hs(Ce,{get playlink(){return l(ce)},onclick:()=>fe(pe.DisplayedAdPlaylickClick,e.title,{campaign_name:a.campaign_name}),hideCategory:!0,get disclaimer(){return l(ue)}})}};O(ne,Ce=>{a&&Q===0&&Ce(Te)})}y(R,X)}),H(()=>{q=_e(G,1,"playlinks svelte-1fykz2q",null,q,{list:l(d)}),se(G,"data-testid",`category-${E()??""}`)}),qt(G,"clientWidth",R=>M(r,R)),y(C,F)}),H(C=>J(f,C),[()=>ve("Where To Stream Online")]),y(t,h),le()}var Ip=T('<button class="show-more svelte-7itcht">Show more</button>'),jp=T('<div class="paragraph svelte-7itcht" role="paragraph"> </div>'),zp=T('<div class="description svelte-7itcht"><span class="paragraph svelte-7itcht" role="paragraph"> <!> <!></span> <!></div>');function Ap(t,e){re(e,!0);const i=D(e,"blurb",3,""),a=D(e,"limit",3,200),n=D(e,"onclick",3,()=>null);let r=K(!1);const o=U(()=>e.text.slice(0,a()));function s(){M(r,!0),n()()}var c=zp(),d=x(c),u=x(d),v=S(u);{var p=b=>{var P=Je("...");y(b,P)};O(v,b=>{!l(r)&&e.text.length>a()&&b(p)})}var h=S(v,2);{var g=b=>{var P=Ip();P.__click=()=>s(),y(b,P)};O(h,b=>{!l(r)&&(e.text.length>a()||i())&&b(g)})}var f=S(d,2);{var _=b=>{var P=jp(),w=x(P);H(()=>J(w,i())),y(b,P)};O(f,b=>{l(r)&&b(_)})}H(()=>J(u,l(r)?e.text:l(o))),y(t,c),le()}we(["click"]);async function Lp(t,{page:e=1}={}){const i={language:Wa(),region:await Vr(),include_count:"false",participant_sid:t.sid,page:e};return(await Xt(`/titles/browse?api-token=${vi()}&${Or(i)}`)).results}async function Mp(t){return(await Xt(`/participants/browse?api-token=${vi()}&title_sid=${t.sid}`)).results}var qp=T('<div class="character truncate svelte-zy7e3f"> </div>'),Dp=T('<button class="participant svelte-zy7e3f" data-testid="participant"><span class="truncate svelte-zy7e3f"> </span> <!></button>'),Np=T('<div class="participant svelte-zy7e3f"></div>');function Rp(t,e){re(e,!0);function i(o){const s=St(Fo(Nr(ga()))),c={};for(const u of o){const v=zn(s,St(u.name));c[u.sid]={participant:u,count:v}}return Object.values(c).sort((u,v)=>v.count-u.count).map(({participant:u})=>u)}function a(o,s){fi({event:o,type:"participant",data:s}),fe(pe.ParticipantClick,null,{title_source:e.title.original_title||e.title.title,participant:s.name})}var n=me(),r=Z(n);ua(r,()=>Mp(e.title),o=>{{let s=U(()=>ve("Cast"));Rn(o,{get heading(){return l(s)},children:(c,d)=>{var u=me(),v=Z(u);Le(v,16,()=>({length:5}),qe,(p,h)=>{var g=Np();y(p,g)}),y(c,u)},$$slots:{default:!0}})}},(o,s)=>{var c=me(),d=Z(c);{var u=v=>{{let p=U(()=>ve("Cast"));Rn(v,{get heading(){return l(p)},children:(h,g)=>{var f=me(),_=Z(f);Le(_,17,()=>i(l(s)).slice(0,15),qe,(b,P)=>{var w=Dp();w.__click=V=>a(V,l(P));var k=x(w),L=x(k),C=S(k,2);{var j=V=>{var z=qp(),I=x(z);H(()=>J(I,l(P).character)),y(V,z)};O(C,V=>{l(P).character&&V(j)})}H(()=>J(L,l(P).name)),y(b,w)}),y(h,f)},$$slots:{default:!0}})}};O(d,v=>{var p;(p=l(s))!=null&&p.length&&v(u)})}y(o,c)}),y(t,n),le()}we(["click"]);function Op(t,e){re(e,!0);const i=as(e.title);{let a=U(()=>ve("Similar Titles"));cs(t,{get titles(){return i},get heading(){return l(a)},onclick:n=>fe(pe.SimilarTitleClick,n,{title_source:e.title.original_title||e.title.title})})}le()}function Bp(t){const e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.left="-9999px",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}var Fp=Re('<svg width="16" height="15" viewBox="0 0 16 15"><path fill="currentColor" d="M6.70138 1.36838C6.70187 0.320494 7.75924 -0.233702 8.60177 0.0939687L8.76779 0.172094L8.82345 0.203344L8.87521 0.240453L14.4748 4.35666C15.273 4.89508 15.2742 6.06459 14.4807 6.60666L8.8879 10.8586L8.83029 10.9026L8.76779 10.9367C7.90544 11.4141 6.70148 10.8588 6.70138 9.74045V9.051C6.21939 9.09485 5.65912 9.18628 5.11056 9.37034C4.41863 9.60256 3.79163 9.96387 3.33907 10.5061C2.89934 11.0331 2.56088 11.8063 2.56075 12.9924C2.56075 13.1083 2.55351 13.2694 2.50802 13.4348C2.48558 13.5162 2.34386 14.0279 1.78439 14.1965C1.18154 14.3778 0.775385 13.9725 0.706262 13.9006C0.580913 13.7702 0.500537 13.626 0.452356 13.5305C0.257874 13.1448 0.107806 12.5395 0.0402463 11.841C-0.0994489 10.3951 0.0801391 8.23145 1.2922 5.90647C2.38232 3.81585 4.09969 2.85246 5.51095 2.42209C5.94157 2.29082 6.34701 2.20931 6.70138 2.15745V1.36838ZM8.28341 1.04709C8.02513 0.904267 7.70193 1.08266 7.70138 1.36838V3.07346C6.71677 3.09168 3.72663 3.40026 2.17892 6.36838L1.98165 6.76584C0.053228 10.8548 1.56075 14.193 1.56075 12.9924C1.56118 8.17098 6.39327 7.98172 7.70138 8.01877V9.74045C7.70147 9.9908 7.94881 10.1585 8.1838 10.1008L8.28341 10.0627L13.883 5.80686C14.1412 5.66368 14.1413 5.30543 13.883 5.16233L8.28341 1.04709Z"></path></svg>');function Hp(t){var e=Fp();y(t,e)}var Vp=Re('<svg viewBox="0 -960 960 960" width="18px" height="18px"><path fill="currentColor" d="M440-280H280q-83 0-141.5-58.5T80-480q0-83 58.5-141.5T280-680h160v80H280q-50 0-85 35t-35 85q0 50 35 85t85 35h160v80ZM320-440v-80h320v80H320Zm200 160v-80h160q50 0 85-35t35-85q0-50-35-85t-85-35H520v-80h160q83 0 141.5 58.5T880-480q0 83-58.5 141.5T680-280H520Z"></path></svg>');function Up(t){var e=Vp();y(t,e)}var Wp=Re('<svg viewBox="0 -960 960 960" width="18px" height="18px"><path fill="currentColor" d="M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-280L160-640v400h640v-400L480-440Zm0-80 320-200H160l320 200ZM160-640v-80 480-400Z"></path></svg>');function Gp(t){var e=Wp();y(t,e)}var Kp=Re('<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.99984 10.8333C10.4601 10.8333 10.8332 10.4602 10.8332 10C10.8332 9.53977 10.4601 9.16668 9.99984 9.16668C9.5396 9.16668 9.1665 9.53977 9.1665 10C9.1665 10.4602 9.5396 10.8333 9.99984 10.8333Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 5.00001C10.4601 5.00001 10.8332 4.62691 10.8332 4.16668C10.8332 3.70644 10.4601 3.33334 9.99984 3.33334C9.5396 3.33334 9.1665 3.70644 9.1665 4.16668C9.1665 4.62691 9.5396 5.00001 9.99984 5.00001Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path><path d="M9.99984 16.6667C10.4601 16.6667 10.8332 16.2936 10.8332 15.8333C10.8332 15.3731 10.4601 15 9.99984 15C9.5396 15 9.1665 15.3731 9.1665 15.8333C9.1665 16.2936 9.5396 16.6667 9.99984 16.6667Z" stroke="currentColor" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Yp(t){var e=Kp();y(t,e)}var Zp=T('<button class="svelte-827qd7"><!></button>'),Jp=T('<div class="content svelte-827qd7"><!></div>'),Qp=T("<div><!> <!></div>");function gs(t,e){const i=D(e,"label",3,""),a=D(e,"align",3,"right");let n=K(!1),r=K(null);function o(h){var f;h.currentTarget===((f=l(r))==null?void 0:f.querySelector("button"))&&h.stopPropagation(),M(n,!l(n))}var s=Qp();ye("click",Ee,()=>M(n,!1));var c=x(s);{var d=h=>{var g=me(),f=Z(g);Ve(f,()=>e.button,()=>({toggle:o})),y(h,g)},u=h=>{var g=Zp();g.__click=o;var f=x(g);Yp(f),H(()=>{se(g,"aria-label",i()),se(g,"aria-expanded",l(n))}),y(h,g)};O(c,h=>{e.button?h(d):h(u,!1)})}var v=S(c,2);{var p=h=>{var g=Jp(),f=x(g);Ve(f,()=>e.children),Ae(1,g,()=>ba,()=>({duration:50,start:.85})),y(h,g)};O(v,h=>{l(n)&&h(p)})}$e(s,h=>M(r,h),()=>l(r)),H(()=>_e(s,1,`context-menu ${a()??""}`,"svelte-827qd7")),y(t,s)}we(["click"]);var Xp=T("<!> ",1),$p=T('<button class="item svelte-npfy12"><!> </button> <button class="item svelte-npfy12"><!> </button>',1);function ef(t,e){re(e,!0);let i=D(e,"url",7);const n=window.innerWidth<pi&&typeof navigator.share<"u";Qe(()=>{i(i()+"?utm_source=tpi")});function r(c,d){if(!n){d(c);return}fe(pe.ShareTitle,null,{title:e.title,url:Hi(),method:"native"}),navigator.share({title:e.title,url:i()})}function o(){fe(pe.ShareTitle,null,{title:e.title,url:Hi(),method:"copy"}),Bp(i())}function s(){fe(pe.ShareTitle,null,{title:e.title,url:Hi(),method:"email"}),window.location.href=`mailto:?body=${i()}`}gs(t,{button:(d,u)=>{let v=()=>u==null?void 0:u().toggle;Ui(d,{onclick:p=>r(p,v()),children:(p,h)=>{var g=Xp(),f=Z(g);Hp(f);var _=S(f);H(b=>J(_,` ${b??""}`),[()=>ve("Share")]),y(p,g)},$$slots:{default:!0}})},children:(d,u)=>{var v=$p(),p=Z(v);p.__click=o;var h=x(p);Up(h);var g=S(h),f=S(p,2);f.__click=s;var _=x(f);Gp(_);var b=S(_);H((P,w)=>{J(g,` ${P??""}`),J(b,` ${w??""}`)},[()=>ve("Copy URL"),()=>ve("Email")]),y(d,v)},$$slots:{button:!0,default:!0}}),le()}we(["click"]);var tf=Re('<svg width="12" height="12" viewBox="0 0 12 12"><path stroke="currentColor" stroke-width="1.1" transform="translate(2 0)" d="M9.47461 5.37598C9.77461 5.54918 9.77461 5.98207 9.47461 6.15527L1.22461 10.9189C0.924693 11.0916 0.549804 10.8745 0.549804 10.5283L0.549805 1.00293C0.549805 0.656711 0.924691 0.439623 1.22461 0.612304L9.47461 5.37598Z"></path></svg>');function af(t){var e=tf();y(t,e)}var nf=T("<!> ",1);function rf(t,e){re(e,!0);function i(){hu(e.title),fe(pe.TrailerClick,e.title)}Ui(t,{onclick:i,children:(a,n)=>{var r=nf(),o=Z(r);af(o);var s=S(o);H(c=>J(s,` ${c??""}`),[()=>ve("Watch Trailer")]),y(a,r)},$$slots:{default:!0}}),le()}var lf=T('<div class="video-background svelte-18bbkrh" data-testid="video-background"><!></div>');function of(t,e){const i=D(e,"embeddable_url",3,"");let a=K(0),n=K(0);const r=U(()=>Math.max(l(a),l(n)));var o=lf(),s=x(o);Gr(s,{get embeddable_url(){return i()},muted:!0,loop:!0,showMuteControls:!0}),H(()=>Ye(o,`--height: ${l(r)??""}px; --width: ${l(a)??""}px;`)),qt(o,"clientWidth",c=>M(a,c)),qt(o,"clientHeight",c=>M(n,c)),y(t,o)}var sf=T("<div> </div>"),cf=T('<img alt=""/>'),df=T('<div><div class="header svelte-16ajinh"><div><!></div> <div id="title"> </div> <div class="info svelte-16ajinh"><div class="imdb svelte-16ajinh"><!> </div> <!> <div> </div> <div class="capitalize svelte-16ajinh"> </div> <!></div> <div class="actions svelte-16ajinh"><!> <!></div></div> <div class="main svelte-16ajinh"><!> <!> <!> <!></div></div> <div><!></div>',1);function Fn(t,e){var ke;re(e,!0);const i=D(e,"small",3,!1),a=D(e,"useVideoBackground",3,!0),n=!!((ke=window.PlayPilotLinkInjections)!=null&&ke.no_affiliate);pn("title",e.title);const r=vn("modal"),o=U(()=>(!i()||n)&&e.title.description);let s=K(!1),c=K(!1),d=K(!1),u=K(!1);Ke(()=>{a()&&e.title.embeddable_url&&os(Wr(e.title.embeddable_url)).then(oe=>{M(u,oe,!0)})});var v=df(),p=Z(v);let h;var g=x(p),f=x(g);let _;var b=x(f);Dn(b,{get title(){return e.title},onload:()=>M(s,!0),lazy:!1});var P=S(f,2);let w;var k=x(P);ft(P,(oe,Pe)=>ze==null?void 0:ze(oe,Pe),()=>2);var L=S(P,2),C=x(L),j=x(C);Bn(j,{});var V=S(j),z=S(C,2);gp(z,{get genres(){return e.title.genres}});var I=S(z,2),E=x(I),A=S(I,2),F=x(A),N=S(A,2);{var W=oe=>{var Pe=sf(),Oe=x(Pe);H(Ue=>J(Oe,`${e.title.length??""} ${Ue??""}`),[()=>ve("Minutes")]),y(oe,Pe)};O(N,oe=>{!i()&&e.title.length&&oe(W)})}var G=S(L,2),q=x(G);{var R=oe=>{rf(oe,{get title(){return e.title}})};O(q,oe=>{e.title.embeddable_url&&oe(R)})}var Y=S(q,2);{let oe=U(()=>On(e.title));ef(Y,{get title(){return e.title.title},get url(){return l(oe)}})}var Q=S(g,2),X=x(Q);{var te=oe=>{Ap(oe,{get text(){return e.title.description},get blurb(){return e.title.blurb},onclick:()=>fe(pe.ExpandTitleDescription,e.title)})};O(X,oe=>{l(o)&&oe(te)})}var ne=S(X,2);{var Te=oe=>{Cp(oe,{get playlinks(){return e.title.providers},get title(){return e.title}})};O(ne,oe=>{n||oe(Te)})}var Ce=S(ne,2);Rp(Ce,{get title(){return e.title}});var ce=S(Ce,2);Op(ce,{get title(){return e.title}});var ue=S(p,2);let $;var de=x(ue);{var ee=oe=>{of(oe,{get embeddable_url(){return e.title.embeddable_url}})},ae=oe=>{var Pe=me(),Oe=Z(Pe);va(Oe,()=>l(d),Ue=>{var ie=cf();let he;H(ge=>{se(ie,"src",ge),he=_e(ie,1,"svelte-16ajinh",null,he,{loaded:l(c),blur:l(d)})},[()=>_a(l(d)?e.title.standing_poster:e.title.medium_poster)]),ye("load",ie,()=>M(c,!0)),ye("error",ie,()=>M(d,!0)),y(Ue,ie)}),y(oe,Pe)};O(de,oe=>{a()&&l(u)?oe(ee):oe(ae,!1)})}H(oe=>{h=_e(p,1,"content svelte-16ajinh",null,h,{small:i()}),_=_e(f,1,"poster svelte-16ajinh",null,_,{loaded:l(s)}),w=_e(P,1,"heading svelte-16ajinh",null,w,{truncate:i()}),J(k,e.title.title),J(V,` ${e.title.imdb_score??""}`),J(E,e.title.year),J(F,oe),$=_e(ue,1,"background svelte-16ajinh",null,$,{small:i(),"offset-mute":r==="title"})},[()=>ve(`Type: ${e.title.type}`)]),y(t,v),le()}var uf=T('<!> <p class="empty svelte-1nq44zr"> </p>',1),vf=T("<!> ",1),pf=T("<div><!></div>"),ff=T('<!> <div class="title svelte-1nq44zr" data-testid="title"><!></div>',1),hf=T("<!> Loading...",1);function gf(t,e){re(e,!0);const i=p=>{var h=uf(),g=Z(h);a(g);var f=S(g,2),_=x(f);H(b=>J(_,b),[()=>ve("Page Not Found")]),y(p,h)},a=(p,h)=>{let g=gn(()=>ja(h==null?void 0:h(),!1));var f=pf();let _;var b=x(f);Ui(b,{variant:"link",onclick:()=>{n()("home")},children:(P,w)=>{var k=vf(),L=Z(k);Nt(L,{direction:"left"});var C=S(L);H(j=>J(C,` ${j??""}`),[()=>ve("Home")]),y(P,k)},$$slots:{default:!0}}),H(()=>_=_e(f,1,"back svelte-1nq44zr",null,_,{offset:l(g)})),y(p,f)},n=D(e,"navigate",3,()=>null);let r=K(Fe(window.innerWidth));const o=U(()=>l(r)<pi),s=new URL(document.location.toString()).searchParams.get("sid");var c=me(),d=Z(c);{var u=p=>{var h=me(),g=Z(h);ua(g,()=>ns(s),f=>{var _=hf(),b=Z(_);a(b),y(f,_)},(f,_)=>{var b=ff(),P=Z(b);a(P,()=>!0);var w=S(P,2),k=x(w);Fn(k,{get title(){return l(_)},get useVideoBackground(){return l(o)}}),y(f,b)},f=>{i(f)}),y(p,h)},v=p=>{i(p)};O(d,p=>{s?p(u):p(v,!1)})}Ua("innerWidth",p=>M(r,p,!0)),y(t,c),le()}function ms(t,e){re(e,!0);const i=[{key:"results",component:mv}];xa()&&(i.unshift({key:"home",component:Uu}),i.push({key:"title",component:gf}));const a=u()||i[0].key;let n=K(Fe(i.find(({key:p})=>p===a)||i[0])),r=K(""),o=K(Fe({}));const s=U(()=>l(n).component);a==="modal"&&v(),Ke(()=>{l(r)&&M(n,i.find(p=>p.key==="results"),!0)});function c(p,h=!0){M(n,i.find(f=>f.key===p)||i[0],!0);const g=new URL(document.location.toString());p!=="title"&&p!=="modal"&&g.searchParams.delete("sid"),p===i[0].key?g.searchParams.delete("route"):g.searchParams.set("route",l(n).key),h&&(history.pushState({},"",g),console.log("navigate push state")),fe(pe.ExploreNavigate,null,{route:l(n).key})}function d(){c(u(),!1)}function u(){return new URL(document.location.toString()).searchParams.get("route")||i[0].key}async function v(){const h=new URL(document.location.toString()).searchParams.get("sid");if(!h)return;const[g,f]=(await Promise.allSettled([ns(h),as({sid:h})])).map(_=>_.status==="fulfilled"?_.value:null);fi({type:"titles-rail",data:[g,...f],props:{onclose:()=>c("home")}})}ye("popstate",Ee,d),vp(t,{navigate:c,get searchQuery(){return l(r)},set searchQuery(p){M(r,p,!0)},get filter(){return l(o)},set filter(p){M(o,p,!0)},children:(p,h)=>{var g=me(),f=Z(g);Tr(f,()=>l(s),(_,b)=>{b(_,{get searchQuery(){return l(r)},get filter(){return l(o)},navigate:c})}),y(p,g)},$$slots:{default:!0}}),le()}const Jr="[data-playpilot-explore]",mf="[data-playpilot-pre-consent-explore]",ys="playpilot-explore-custom-style";let Hn=null;function Vn(){var e;const t=document.querySelector(Jr);t&&(Un(),(e=document.querySelector(mf))==null||e.remove(),t.innerHTML="",Hn=Mt(ms,{target:t}),bf())}function Un(){var t;Hn&&(Fi(Hn),Hn=null,(t=document.querySelector("#"+ys))==null||t.remove())}function yf(){var c;const t=window.PlayPilotLinkInjections.config;if(!t)return!1;const{explore_navigation_selector:e,explore_navigation_label:i,explore_navigation_path:a,explore_navigation_insert_position:n}=t;if(!e)return!1;(c=document.querySelector("[data-playpilot-explore-navigation-element]"))==null||c.remove();const r=document.querySelector(e);if(!r)return!1;const o=r.cloneNode(!0),s=o.nodeName==="A"?o:o.querySelector("a");return s.classList.remove("active"),s.innerText=i||"Streaming Guide",s.href=a,o.dataset.playpilotExploreNavigationElement="true",r.insertAdjacentElement(n||"afterend",o),!0}function bf(){var i;const t=(i=window.PlayPilotLinkInjections.config)==null?void 0:i.explore_custom_style;if(!t)return;const e=document.createElement("style");e.textContent=t,e.id=ys,document.body.appendChild(e)}function xa(){var t,e;return!!((e=(t=window.PlayPilotLinkInjections)==null?void 0:t.config)!=null&&e.explore_use_router)}function Ja(t,e){re(e,!0);const i=D(e,"size",3,"32px"),a=D(e,"onclick",3,()=>null),n=Do(e,["$$slots","$$events","$$legacy","children","size","onclick"]);var r=me(),o=Z(r);xo(o,()=>e.href?"a":"button",!1,(s,c)=>{Io(s,()=>({role:e.href?"link":"button",onclick:a(),class:"button",...n,[fa]:{"--size":i()}}),void 0,void 0,void 0,"svelte-1ch8qoj");var d=me(),u=Z(d);Ve(u,()=>e.children??_t),y(c,d)}),y(t,r),le()}var _f=T("<div></div>");function xf(t,e){re(e,!0);let i=D(e,"threshold",3,100),a=D(e,"isDragging",15,!1),n=D(e,"passedThreshold",15,!1),r=D(e,"onpassed",3,()=>null),o=K(0),s=K(0),c=K(null),d=K(!1);const u=U(()=>Math.max(l(s)-l(o),0));Ke(()=>{n(l(u)>i())});function v(b){if(b){a(!0),M(d,!0),M(o,b.touches[0].pageY,!0);for(const P of e.targets)P.style.transitionDuration="0ms"}}function p(b){if(b&&a()){b.preventDefault(),M(s,b.touches[0].pageY,!0),l(c).style.transform=`translateY(${l(u)}px)`;for(const P of e.targets)P.style.top=`${l(u)}px`}}function h(){if(a()){if(a(!1),n())r()();else{l(c).removeAttribute("style");for(const b of e.targets)b.style.removeProperty("transition"),requestAnimationFrame(()=>b.style.top="0px")}M(o,0),M(s,0)}}var g={start:v,move:p,end:h},f=_f();ye("touchmove",Ee,p,void 0,!0),ye("touchend",Ee,h);let _;return f.__touchstart=v,$e(f,b=>M(c,b),()=>l(c)),H(()=>_=_e(f,1,"handle svelte-1xqgdsn",null,_,{dragging:a(),dragged:l(d)})),y(t,f),le(g)}we(["touchstart"]);var wf=["forEach","isDisjointFrom","isSubsetOf","isSupersetOf"],kf=["difference","intersection","symmetricDifference","union"],bs=!1;const tr=class tr extends Set{constructor(i){super();xe(this,Ia);xe(this,Ca,new Map);xe(this,Ot,K(0));xe(this,ji,K(0));xe(this,er,di||-1);if(i){for(var a of i)super.add(a);B(this,ji).v=super.size}bs||Be(this,Ia,Us).call(this)}has(i){var a=super.has(i),n=B(this,Ca),r=n.get(i);if(r===void 0){if(!a)return l(B(this,Ot)),!1;r=Be(this,Ia,Vs).call(this,!0),n.set(i,r)}return l(r),a}add(i){return super.has(i)||(super.add(i),M(B(this,ji),super.size),wi(B(this,Ot))),this}delete(i){var a=super.delete(i),n=B(this,Ca),r=n.get(i);return r!==void 0&&(n.delete(i),M(r,!1)),a&&(M(B(this,ji),super.size),wi(B(this,Ot))),a}clear(){if(super.size!==0){super.clear();var i=B(this,Ca);for(var a of i.values())M(a,!1);i.clear(),M(B(this,ji),0),wi(B(this,Ot))}}keys(){return this.values()}values(){return l(B(this,Ot)),super.values()}entries(){return l(B(this,Ot)),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return l(B(this,ji))}};Ca=new WeakMap,Ot=new WeakMap,ji=new WeakMap,er=new WeakMap,Ia=new WeakSet,Vs=function(i){return di===B(this,er)?K(i):Yt(i)},Us=function(){bs=!0;var i=tr.prototype,a=Set.prototype;for(const n of wf)i[n]=function(...r){return l(B(this,Ot)),a[n].apply(this,r)};for(const n of kf)i[n]=function(...r){l(B(this,Ot));var o=a[n].apply(this,r);return new tr(o)}};let Wn=tr;class Sf{constructor(e,i){xe(this,rn);xe(this,ln);be(this,rn,e),be(this,ln,Dl(i))}get current(){return B(this,ln).call(this),B(this,rn).call(this)}}rn=new WeakMap,ln=new WeakMap;const Tf=/\(.+\)/,Pf=new Set(["all","print","screen","and","or","not","only"]);class Ef extends Sf{constructor(e,i){let a=Tf.test(e)||e.split(/[\s,]+/).some(r=>Pf.has(r.trim()))?e:`(${e})`;const n=window.matchMedia(a);super(()=>n.matches,r=>nd(n,"change",r))}}const Qr=new Ef("(prefers-reduced-motion: reduce)");function Xr(t){function e(){return Array.from(t.querySelectorAll('button:not([disabled]), [href], [tabindex]:not([tabindex="-1"])'))}function i(r){if(r.key!=="Tab")return;const o=document.activeElement;if(!o)return;const s=e();if(!s.length)return;const[c]=s,d=s[s.length-1];r.shiftKey&&o===c&&(d.focus(),r.preventDefault()),!r.shiftKey&&o===d&&(c.focus(),r.preventDefault())}const a=document.activeElement,[n]=e();return a!=null&&a.matches(":focus-visible")&&(n==null||n.focus()),window.addEventListener("keydown",i),{destroy(){window.removeEventListener("keydown",i),a==null||a.focus()}}}function Cf(){return document.scrollingElement?document.scrollingElement:document.documentElement.scrollTop?document.documentElement:document.body}var If=T("<div><!></div>"),jf=T('<div class="prepend svelte-1rbidhv" data-view-transition-new="playpilot-title-extra"><!></div>'),zf=T('<div class="bubble svelte-1rbidhv" data-view-transition-new="playpilot-title-extra"><!></div>'),Af=T('<div class="swipe-handle svelte-1rbidhv"><!></div>'),Lf=T("<div><!></div>"),Mf=T('<div class="dialog svelte-1rbidhv" role="dialog" aria-labelledby="title" data-view-transition-new="playpilot-title-content"><!> <!> <!></div> <!>',1),qf=T('<div data-testid="modal"><!> <!> <!> <!></div>');function Qa(t,e){re(e,!0);const i=R=>{var Y=If(),Q=x(Y);Ja(Q,{onclick:k,"aria-label":"Close",children:(X,te)=>{Ya(X,{})},$$slots:{default:!0}}),$e(Y,X=>M(g,X),()=>l(g)),H(()=>_e(Y,1,`close ${o()??""}`,"svelte-1rbidhv")),Ae(7,Y,()=>w),y(R,Y)},a=D(e,"tall",3,!1),n=D(e,"wide",3,!1),r=D(e,"blur",3,!1),o=D(e,"closeButtonStyle",3,"shadow"),s=D(e,"initialScrollPosition",3,0),c=D(e,"onscroll",3,()=>null),d=D(e,"onclose",3,()=>null),u="#playpilot";let v=K(0),p=K(null),h=K(null),g=K(null),f=K(0),_=K(!1);const b=U(()=>l(v)<pi);Ke(()=>{var R;l(v)&&M(f,((R=l(h))==null?void 0:R.offsetTop)||0,!0)}),Ke(()=>{setTimeout(()=>{var R;return M(f,((R=l(h))==null?void 0:R.offsetTop)||0,!0)})}),pn("scope","modal"),Qe(()=>{const R=Cf();return R.classList.add("playpilot-modal-open"),M(_,!!Ts()),l(_)||window.history.pushState({modal:!0},"",u),requestAnimationFrame(P),()=>{var Y;R.classList.remove("playpilot-modal-open"),!Ts()&&((Y=history.state)!=null&&Y.modal)&&history.back()}});function P(){const R=window.innerWidth>pi?l(p):l(h);R==null||R.scrollTo(0,s())}function w(R){return Qr.current?Pt(R,{duration:0}):l(b)?ya(R,{duration:250,y:window.innerHeight,opacity:1}):ba(R,{duration:150,start:.85})}function k(){d()(),tl()}function L(R){R.target===l(p)&&k()}var C=qf();ye("keydown",Ee,({key:R})=>{R==="Escape"&&k()}),ye("hashchange",Ee,k);let j;C.__click=L;let V;var z=x(C);{var I=R=>{var Y=jf(),Q=x(Y);Ve(Q,()=>e.prepend),Ae(7,Y,()=>w),y(R,Y)};O(z,R=>{e.prepend&&R(I)})}var E=S(z,2);{var A=R=>{var Y=zf(),Q=x(Y);Ve(Q,()=>e.bubble),Ae(7,Y,()=>w),y(R,Y)};O(E,R=>{e.bubble&&R(A)})}var F=S(E,2);{var N=R=>{var Y=Af(),Q=x(Y);{var X=te=>{{let ne=U(()=>[l(h),l(g)]);xf(te,{get targets(){return l(ne)},onpassed:k})}};O(Q,te=>{l(h)&&l(g)&&te(X)})}Ae(7,Y,()=>w),y(R,Y)};O(F,R=>{l(b)&&R(N)})}var W=S(F,2);{var G=R=>{var Y=me(),Q=Z(Y);Ve(Q,()=>e.dialog),y(R,Y)},q=R=>{var Y=Mf(),Q=Z(Y),X=x(Q);{var te=$=>{var de=Lf(),ee=x(de);Ja(ee,{onclick:()=>Hh(),"aria-label":"Back",children:(ae,ke)=>{Nt(ae,{direction:"left"})},$$slots:{default:!0}}),H(()=>_e(de,1,`close back ${o()??""}`,"svelte-1rbidhv")),y($,de)};O(X,$=>{l(_)&&$(te)})}var ne=S(X,2);Ve(ne,()=>e.children??_t);var Te=S(ne,2);{var Ce=$=>{i($)};O(Te,$=>{l(b)||$(Ce)})}$e(Q,$=>M(h,$),()=>l(h));var ce=S(Q,2);{var ue=$=>{i($)};O(ce,$=>{l(b)&&$(ue)})}ye("scroll",Q,function(...$){var de;(de=c())==null||de.apply(this,$)}),Ae(7,Q,()=>w),y(R,Y)};O(W,R=>{e.dialog?R(G):R(q,!1)})}$e(C,R=>M(p,R),()=>l(p)),ft(C,R=>Xr==null?void 0:Xr(R)),H(()=>{j=_e(C,1,"modal svelte-1rbidhv",null,j,{wide:n(),tall:a(),"background-blur":r(),"has-bubble":!!e.bubble,"has-prepend":!!e.prepend}),V=Ye(C,"",V,{"--dialog-offset":`${l(f)??""}px`})}),Ua("innerWidth",R=>M(v,R,!0)),Ae(5,C,()=>Pt,()=>({duration:150})),Ae(6,C,()=>Pt,()=>({duration:150,delay:100})),y(t,C),le()}we(["click"]);function wa(t,e){const{onclick:i}=e;function a(n){return n.button!==1?null:(i(n),n)}return t.addEventListener("mouseup",a),{destroy(){t.removeEventListener("mouseup",a)}}}const _s={TopScrollBackground:"topscrollBackgroundMobile",TopScrollContent:"8by1x23"},$r={TopScrollFormat:{key:"top_scroll_format",numberOfVariants:2,variantNames:["Separated","Inline"]}};function Df({key:t}){var a,n,r;if(!Tt("tracking"))return 0;const e=(n=(a=window.PlayPilotLinkInjections)==null?void 0:a.split_test_identifiers)==null?void 0:n[t];if(e!==void 0)return e;(r=window.PlayPilotLinkInjections)!=null&&r.split_test_identifiers||(window.PlayPilotLinkInjections.split_test_identifiers={});const i=Math.random();return window.PlayPilotLinkInjections.split_test_identifiers[t]=i,i}function xs(t){const e=Df(t);return Math.floor(e*t.numberOfVariants)}function Nf(t){var i;const e=xs(t);return((i=t.variantNames)==null?void 0:i[e])||e.toString()}function Rf(t,e=1){return Tt("tracking")?xs(t)===e:!1}function Of(t){const e=Nf(t);fe(pe.SplitTestView,null,{key:t.key,variant:e})}var Bf=T('<img class="content-image svelte-1mt6g1y" width="728" height="90"/>'),Ff=T('<img class="logo svelte-1mt6g1y" alt="" width="50" height="50"/>'),Hf=T('<button class="button svelte-1mt6g1y"> </button>'),Vf=T('<!> <p class="tagline svelte-1mt6g1y"> </p> <!>',1),Uf=T('<div class="background svelte-1mt6g1y"></div>'),Wf=T("<!> <!>",1),Gf=T('<a target="_blank" tabindex="-1" rel="sponsored"><div class="content svelte-1mt6g1y"><!></div> <!></a>');function ws(t,e){re(e,!0),fe(pe.TopScrollView,null,{campaign_name:e.campaign.campaign_name}),Of($r.TopScrollFormat);const i=U(()=>e.campaign.disclaimer),a=U(()=>e.campaign.content),n=U(()=>e.campaign.cta),r=U(()=>l(a).format),o=U(()=>l(a).header),s=U(()=>l(a).header_logo),c=U(()=>l(a).image_uuid),d=U(()=>l(n).header),u=U(()=>l(n).url),v=U(()=>l(r)==="large"),p=U(()=>ls(l(c),_s.TopScrollBackground)),h=U(()=>ls(l(c),_s.TopScrollContent));let g=K(0);function f(){fe(pe.TopScrollClick,null,{campaign_name:e.campaign.campaign_name})}var _=Gf();_.__click=f;let b,P;var w=x(_),k=x(w);{var L=z=>{var I=Bf();H(()=>{se(I,"src",l(h)),se(I,"alt",l(o))}),y(z,I)},C=z=>{var I=Vf(),E=Z(I);{var A=q=>{var R=Ff();H(()=>se(R,"src",l(s))),y(q,R)};O(E,q=>{l(s)&&q(A)})}var F=S(E,2),N=x(F),W=S(F,2);{var G=q=>{var R=Hf(),Y=x(R);H(()=>J(Y,l(d))),y(q,R)};O(W,q=>{l(d)&&q(G)})}H(()=>J(N,l(o))),y(z,I)};O(k,z=>{l(v)?z(L):z(C,!1)})}var j=S(w,2);{var V=z=>{var I=Wf(),E=Z(I);{var A=W=>{var G=Uf();let q;H(()=>q=Ye(G,"",q,{"--background":`url('${l(p)??""}')`})),y(W,G)};O(E,W=>{l(c)&&W(A)})}var F=S(E,2);{var N=W=>{Zr(W,{get disclaimer(){return l(i)}})};O(F,W=>{l(i)&&W(N)})}y(z,I)};O(j,z=>{l(v)||z(V)})}ft(_,(z,I)=>wa==null?void 0:wa(z,I),()=>({onclick:f})),ki(()=>qt(_,"clientWidth",z=>M(g,z))),H(()=>{se(_,"href",l(u)),b=_e(_,1,"top-scroll svelte-1mt6g1y",null,b,{simple:l(v)}),P=Ye(_,"",P,{"--width":`${l(g)??""}px`})}),y(t,_),le()}we(["click"]);var Kf=T('<div class="content svelte-r7ubzi"><!></div>'),Yf=T('<div class="tooltip svelte-r7ubzi" data-testid="tooltip"><!> <!></div>');function Zf(t,e){let i=K(!1);var a=Yf();a.__touchstart=()=>M(i,!l(i));var n=x(a);Ve(n,()=>e.children);var r=S(n,2);{var o=s=>{var c=Kf(),d=x(c);Ve(d,()=>e.content),Ae(1,c,()=>Pt,()=>({duration:100})),y(s,c)};O(r,s=>{l(i)&&s(o)})}ye("mouseenter",a,()=>M(i,!0)),ye("mouseleave",a,()=>M(i,!1)),y(t,a)}we(["touchstart"]);var Jf=T('<div class="info svelte-qcpiki"><!></div>'),Qf=T('<img class="logo svelte-qcpiki" alt="" height="40" width="40"/>'),Xf=T('<span class="name svelte-qcpiki"> </span>'),$f=T('<div class="subheader svelte-qcpiki"> </div>'),eh=T('<div class="action svelte-qcpiki"> </div>'),th=T('<div class="cta svelte-qcpiki"><!> <div><!> <!></div> <!></div>'),ih=T('<img class="background svelte-qcpiki" alt=""/>'),ah=T('<video class="background svelte-qcpiki" autoplay playsinline="" loop><source type="video/mp4"/> <track kind="captions"/></video>',2),nh=T('<div class="disclaimer svelte-qcpiki"><!></div>'),rh=T('<a target="_blank" rel="sponsored"><!> <!> <!> <!></a>');function ks(t,e){re(e,!0);const i=D(e,"compact",3,!1),a=U(()=>e.campaign.disclaimer),n=U(()=>e.campaign.content),r=U(()=>e.campaign.cta),o=U(()=>e.campaign.campaign_type),s=U(()=>l(n).header),c=U(()=>l(n).subheader),d=U(()=>l(n).header_logo),u=U(()=>l(n).image),v=U(()=>l(n).video),p=U(()=>l(r).header),h=U(()=>l(r).url),g=U(()=>l(r).subheader);let f=K(0);fe(pe.DisplayAdView,null,{campaign_name:e.campaign.campaign_name});function _(){fe(pe.DisplayAdClick,null,{campaign_name:e.campaign.campaign_name})}var b=rh();let P;b.__click=_;var w=x(b);{var k=A=>{var F=Jf(),N=x(F);{var W=q=>{Zf(q,{content:Y=>{var Q=Je();H(()=>J(Q,l(g))),y(Y,Q)},children:(Y,Q)=>{var X=Je("Ad");y(Y,X)},$$slots:{content:!0,default:!0}})},G=q=>{var R=Je();H(()=>J(R,l(g))),y(q,R)};O(N,q=>{i()?q(W):q(G,!1)})}y(A,F)};O(w,A=>{l(g)&&A(k)})}var L=S(w,2);{var C=A=>{var F=th(),N=x(F);{var W=ne=>{var Te=Qf();H(()=>se(Te,"src",l(d))),y(ne,Te)};O(N,ne=>{l(d)&&ne(W)})}var G=S(N,2),q=x(G);{var R=ne=>{var Te=Xf(),Ce=x(Te);H(()=>J(Ce,l(s))),y(ne,Te)};O(q,ne=>{l(s)&&ne(R)})}var Y=S(q,2);{var Q=ne=>{var Te=$f(),Ce=x(Te);H(()=>J(Ce,l(c))),y(ne,Te)};O(Y,ne=>{l(c)&&ne(Q)})}var X=S(G,2);{var te=ne=>{var Te=eh(),Ce=x(Te);H(()=>J(Ce,l(p))),y(ne,Te)};O(X,ne=>{l(p)&&ne(te)})}qt(F,"clientHeight",ne=>M(f,ne)),y(A,F)};O(L,A=>{(l(d)||l(s)||l(c)||l(p))&&A(C)})}var j=S(L,2);{var V=A=>{var F=ih();H(()=>se(F,"src",l(u))),y(A,F)},z=A=>{var F=me(),N=Z(F);{var W=G=>{var q=ah();q.muted=!0;var R=x(q);H(()=>se(R,"src",l(v))),y(G,q)};O(N,G=>{l(o)==="video"&&l(v)&&G(W)},!0)}y(A,F)};O(j,A=>{l(o)==="image"&&l(u)?A(V):A(z,!1)})}var I=S(j,2);{var E=A=>{var F=nh();let N;var W=x(F);Zr(W,{get disclaimer(){return l(a)}}),H(()=>N=Ye(F,"",N,{"--offset":`${l(f)??""}px`})),y(A,F)};O(I,A=>{l(a)&&A(E)})}ft(b,(A,F)=>wa==null?void 0:wa(A,F),()=>({onclick:_})),H(()=>{se(b,"href",l(h)),P=_e(b,1,"display svelte-qcpiki",null,P,{compact:i()})}),y(t,b),le()}we(["click"]);var lh=T('<a class="call-to-action svelte-1677ll3"><img alt="" width="70" height="57"/> <div><strong class="svelte-1677ll3">Looking for something else?</strong> <div>Use our streamingguide</div></div> <div class="arrow svelte-1677ll3"><!></div></a>');function oh(t,e){var c,d;re(e,!1);const i="https://cdn.jsdelivr.net/npm/@playpilot/tpi@latest/src/lib/images/titles-list.webp",a=(d=(c=window.PlayPilotLinkInjections)==null?void 0:c.config)==null?void 0:d.explore_navigation_path;Ar();var n=lh();n.__click=()=>fe(pe.CardToExploreCta);var r=x(n);se(r,"src",i);var o=S(r,4),s=x(o);Nt(s,{}),H(()=>se(n,"href",a)),y(t,n),le()}we(["click"]);function sh(t,e){var p,h;re(e,!0);const i=g=>{var f=me(),_=Z(f);{var b=w=>{ws(w,{get campaign(){return o}})},P=w=>{oh(w,{})};O(_,w=>{o?w(b):w(P,!1)})}y(g,f)},a=g=>{var f=me(),_=Z(f);{var b=P=>{ks(P,{get campaign(){return s}})};O(_,P=>{s&&P(b)})}y(g,f)},n=D(e,"initialScrollPosition",3,0),r=Do(e,["$$slots","$$events","$$legacy","title","initialScrollPosition"]);pn("modal","title");const o=Ga("top_scroll"),s=Ga("card"),c=(h=(p=window.PlayPilotLinkInjections)==null?void 0:p.config)==null?void 0:h.explore_insert_cta_in_tpi,d=!!o||c&&!document.querySelector(Jr);let u=!1;fe(pe.TitleModalView,e.title),Za()&&$t(Dt.TitleInterest,{title:e.title.title,source:Ti.Card}),Qe(()=>{const g=Date.now();return()=>fe(pe.TitleModalClose,e.title,{time_spent:Date.now()-g})});function v(){u||(fe(pe.TitleModalScroll,e.title),u=!0)}{let g=U(()=>d?i:null),f=U(()=>s?a:null);Qa(t,{onscroll:v,get initialScrollPosition(){return n()},get bubble(){return l(g)},get prepend(){return l(f)},tall:!0,children:(_,b)=>{Fn(_,En({get title(){return e.title}},()=>r))},$$slots:{default:!0}})}le()}var ch=T(" <strong> </strong>",1),dh=T('<p class="dates svelte-ke01cs"> <strong> </strong><!></p>'),uh=T('<div class="skeleton svelte-ke01cs" data-testid="skeleton"></div>'),vh=T('<button class="more svelte-ke01cs"> </button>'),ph=T('<div class="header svelte-ke01cs"><div class="heading svelte-ke01cs" id="name"> </div> <!></div> <div class="content svelte-ke01cs"><div class="heading small svelte-ke01cs" id="credits"> </div> <div class="list svelte-ke01cs"><!> <!></div></div>',1);function fh(t,e){re(e,!0);const i=U(()=>e.participant.name),a=U(()=>e.participant.birth_date),n=U(()=>e.participant.death_date),r=30;let o=K(Fe([])),s=K(1),c=K(!0),d=K(!0);Qe(v),Tt("pixels")&&$t(Dt.ParticipantView,{participant:e.participant.name});function u(I){return new Date(I).toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})}async function v(){M(d,!0);try{const I=await Lp(e.participant,{page:l(s)});M(o,[...l(o),...I],!0),M(c,(I==null?void 0:I.length)>=r)}catch{M(c,!1)}finally{M(d,!1),M(s,l(s)+1)}}var p=ph(),h=Z(p),g=x(h),f=x(g);ft(g,(I,E)=>ze==null?void 0:ze(I,E),()=>2);var _=S(g,2);{var b=I=>{var E=dh(),A=x(E),F=S(A),N=x(F),W=S(F);{var G=q=>{var R=ch(),Y=Z(R),Q=S(Y),X=x(Q);H((te,ne)=>{J(Y,`, ${te??""} `),J(X,ne)},[()=>ve("Died On"),()=>u(l(n))]),y(q,R)};O(W,q=>{l(n)&&q(G)})}H((q,R)=>{J(A,`${q??""} `),J(N,R)},[()=>ve("Born On"),()=>u(l(a))]),y(I,E)};O(_,I=>{l(a)&&I(b)})}var P=S(h,2),w=x(P),k=x(w);ft(w,(I,E)=>ze==null?void 0:ze(I,E),()=>3);var L=S(w,2),C=x(L);Le(C,17,()=>l(o),qe,(I,E)=>{ps(I,{get title(){return l(E)},onclick:A=>fi({event:A,data:l(E)})})});var j=S(C,2);{var V=I=>{var E=me(),A=Z(E);Le(A,16,()=>({length:6}),qe,(F,N)=>{var W=uh();y(F,W)}),y(I,E)},z=I=>{var E=me(),A=Z(E);{var F=N=>{var W=vh();W.__click=v;var G=x(W);H(q=>J(G,q),[()=>ve("Show More")]),y(N,W)};O(A,N=>{l(c)&&N(F)},!0)}y(I,E)};O(j,I=>{l(d)?I(V):I(z,!1)})}H(I=>{J(f,l(i)),J(k,I)},[()=>ve("Credits")]),y(t,p),le()}we(["click"]);function hh(t,e){re(e,!0);const i=D(e,"initialScrollPosition",3,0);let a=K(0);fe(pe.ParticipantModalView,null,{participant:e.participant.name}),Qe(()=>{const n=Date.now();return()=>fe(pe.ParticipantModalClose,null,{participant:e.participant.name,time_spent:Date.now()-n})}),Qa(t,{get initialScrollPosition(){return i()},closeButtonStyle:"flat",tall:!0,children:(n,r)=>{fh(n,{get participant(){return e.participant}})},$$slots:{default:!0}}),Ua("innerWidth",n=>M(a,n,!0)),le()}var gh=T('<div class="content svelte-16hba4m"><!></div>');function mh(t,e){const i=D(e,"initialScrollPosition",3,0);Qa(t,{get initialScrollPosition(){return i()},closeButtonStyle:"flat",wide:!0,children:(a,n)=>{var r=gh(),o=x(r);ms(o,{}),y(a,r)},$$slots:{default:!0}})}function yh(t,e=!0){if(!document.startViewTransition||!e){t();return}document.startViewTransition(()=>{const i=document.querySelectorAll("[data-view-transition-old]");if(t(),!i.length)return;document.querySelectorAll("[data-view-transition-new]").forEach(n=>{n.style.viewTransitionName=n.dataset.viewTransitionNew||""})})}var bh=Re('<svg viewBox="0 -960 960 960" width="24px" height="24px" fill="currentColor"><path d="m480-320 160-160-56-56-64 64v-168h-80v168l-64-64-56 56 160 160Zm0 240q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z"></path></svg>');function _h(t){var e=bh();y(t,e)}var xh=T('<div class="scroll-indicator svelte-wxwoko"><div class="scroll-indicator-icon svelte-wxwoko"><!></div></div>'),wh=T('<div class="bubble svelte-wxwoko" data-view-transition-old=""><!></div>'),kh=T('<div class="append svelte-wxwoko" data-view-transition-old=""><!></div>'),Sh=T('<div tabindex="-1" aria-hidden="true"><div class="dialog svelte-wxwoko" data-view-transition-old=""><!> <!></div> <!> <!></div>');function Th(t,e){re(e,!0),pn("scope","popover");const i=e.bubble&&Rf($r.TopScrollFormat,1),a=U(()=>({duration:Qr.current?0:100,y:10}));let n=K(null),r=K(!1),o=K(!0),s=K(!1),c=K(0),d=K(0),u=K(0);Qe(async()=>{await Fa(),v(),await h(),e.append&&requestAnimationFrame(()=>{p(),h()}),await Fa(),f()});function v(){if(!l(n))return;const{top:E,right:A,bottom:F,height:N}=l(n).getBoundingClientRect(),W=g();M(r,E-W<0&&window.innerHeight-F>E+N,!0);const G=window.innerWidth-A-W;A+W>window.innerWidth&&(l(n).style.left=`${G}px`)}function p(){M(o,l(c)>450)}async function h(){if(M(u,0),await new Promise(q=>requestAnimationFrame(q)),!l(n))return;const{top:E,height:A}=l(n).getBoundingClientRect(),F=g(),N=e.append?parseInt(window.getComputedStyle(l(n)).gap):0,W=l(o)?l(d)+N:0,G=l(r)?window.innerHeight-E-F-W:E+A-W-F;M(u,Math.min(G,window.innerHeight*.8),!0)}function g(){return parseFloat(getComputedStyle(document.documentElement).fontSize)}function f(){var W;if(!((W=l(n))!=null&&W.firstChild))return;const E=l(n).firstChild,{offsetHeight:A,scrollHeight:F,scrollTop:N}=E;F<=A?M(s,!1):M(s,N+A<F)}var _=Sh();let b,P;var w=x(_),k=x(w);Ve(k,()=>e.children);var L=S(k,2);{var C=E=>{var A=xh(),F=x(A),N=x(F);_h(N),Ae(3,A,()=>Pt,()=>({duration:100})),y(E,A)};O(L,E=>{l(s)&&E(C)})}var j=S(w,2);{var V=E=>{var A=wh(),F=x(A);Ve(F,()=>e.bubble),Ae(7,A,()=>ya,()=>l(a)),y(E,A)};O(j,E=>{e.bubble&&E(V)})}var z=S(j,2);{var I=E=>{var A=kh(),F=x(A);Ve(F,()=>e.append),Ae(7,A,()=>ya,()=>l(a)),qt(A,"clientHeight",N=>M(d,N)),y(E,A)};O(z,E=>{e.append&&l(o)&&E(I)})}$e(_,E=>M(n,E),()=>l(n)),H(()=>{b=_e(_,1,"popover svelte-wxwoko",null,b,{flip:l(r),inline:i,"has-bubble":!!e.bubble&&i}),P=Ye(_,"",P,{"--max-height":l(u)?l(u)+"px":null})}),ye("scroll",w,f),Ae(7,w,()=>ya,()=>l(a)),qt(_,"clientHeight",E=>M(c,E)),y(t,_),le()}var Ph=T('<div class="title-popover svelte-d1moe8" data-playpilot-title-popover="" role="region" aria-labelledby="title"><!></div>');function Eh(t,e){re(e,!0);const i=u=>{var v=me(),p=Z(v);{var h=g=>{ws(g,{get campaign(){return n}})};O(p,g=>{n&&g(h)})}y(u,v)},a=u=>{var v=me(),p=Z(v);{var h=g=>{ks(g,{get campaign(){return r},compact:!0})};O(p,g=>{r&&g(h)})}y(u,v)},n=Ga("top_scroll"),r=Ga("card");let o=K(null);fe(pe.TitlePopoverView,e.title),Za()&&$t(Dt.TitleInterest,{title:e.title.title,source:Ti.Card}),Qe(()=>{s();const u=Date.now();return()=>fe(pe.TitlePopoverClose,e.title,{time_spent:Date.now()-u})});function s(){const u=e.event.target;if(!(u!=null&&u.getClientRects))return;const v=Array.from(u.getClientRects()),h=v.map(f=>f.x).map(f=>Math.abs(f-e.event.clientX)),g=v[h.indexOf(Math.min(...h))];l(o).style.top=g.top+window.scrollY+"px",l(o).style.left=g.left+window.scrollX+"px",l(o).style.height=g.height+"px"}var c=Ph(),d=x(c);{let u=U(()=>r?a:null),v=U(()=>n?i:null);Th(d,{get append(){return l(u)},get bubble(){return l(v)},children:(p,h)=>{Fn(p,{get title(){return e.title},small:!0})},$$slots:{default:!0}})}$e(c,u=>M(o,u),()=>l(o)),y(t,c),le()}let Gn=null,Wi=null;function Ch(t,e){if(window.matchMedia("(pointer: coarse)").matches)return;Wi&&Kn();const i=t.currentTarget;Gn=i,setTimeout(()=>{Gn===i&&(Wi=Mt(Eh,{target:nl(),props:{event:t,title:e.title_details}}))},100)}async function Kn(t=!0){if(Wi){const e=Fi(Wi,{outro:t});Gn=null,Wi=null,await e}document.querySelectorAll("[data-playpilot-title-popover]").forEach(e=>e.remove())}function Ih(t){if(!Wi)return;const e=t.target;e.hasAttribute("data-playpilot-title-popover")||e.closest("[data-playpilot-title-popover]")||e.hasAttribute(hi)||e.closest(gi)||Kn()}function jh(){Gn=null}function zh(){return!!Wi}var Ah=T('<div class="content svelte-c2erhr"><!></div>'),Lh=T("<div><!></div>"),Mh=T('<button class="arrow left svelte-c2erhr" aria-label="Previous" aria-live="polite"><!></button>'),qh=T('<button class="arrow right svelte-c2erhr" aria-label="Next" aria-live="polite"><!></button>'),Dh=T("<!> <!>",1),Nh=T('<div class="rail-modal svelte-c2erhr"><!></div> <div class="close svelte-c2erhr"><!></div>',1);function Rh(t,e){re(e,!0);const i=D(e,"initialIndex",3,0),a=D(e,"onchange",3,()=>null),n=D(e,"onclose",3,()=>null),r=300;console.log({onclose:n()});let o,s=K(!1);Qe(()=>{setTimeout(()=>{o==null||o.setIndex(i()),requestAnimationFrame(()=>M(s,!0))})});function c(d){a()(d),o.setIndex(d)}Qa(t,{blur:!0,get onclose(){return n()},dialog:u=>{var v=Nh(),p=Z(v);Ye(p,"",{},{"--transition-duration":"300ms"});var h=x(p);{const _=(w,k)=>{let L=()=>k==null?void 0:k().currentIndex;var C=me(),j=Z(C);Le(j,17,()=>e.items,qe,(V,z,I)=>{var E=Lh();let A;E.__click=()=>c(I);var F=x(E);{var N=W=>{var G=Ah(),q=x(G);Ve(q,()=>e.each,()=>l(z),L),Ae(3,G,()=>Pt,()=>({duration:l(s)?r:0})),y(W,G)};O(F,W=>{(Math.abs(I-L())===1||L()===I)&&W(N)})}H(()=>A=_e(E,1,"item svelte-c2erhr",null,A,{active:I===L()})),y(V,E)}),y(w,C)},b=(w,k)=>{let L=()=>k==null?void 0:k().currentIndex,C=()=>k==null?void 0:k().reachedEnd;var j=Dh(),V=Z(j);{var z=A=>{var F=Mh();F.__click=()=>c(L()-1);var N=x(F);Nt(N,{size:21,direction:"left",title:"Previous"}),y(A,F)};O(V,A=>{L()>0&&A(z)})}var I=S(V,2);{var E=A=>{var F=qh();F.__click=()=>c(L()+1);var N=x(F);Nt(N,{size:21,title:"Next"}),y(A,F)};O(I,A=>{C()||A(E)})}y(w,j)};let P=U(()=>l(s)?r:0);$e(ss(h,{threshold:40,moveThreshold:40,get transitionDuration(){return l(P)},children:_,controls:b,$$slots:{default:!0,controls:!0}}),w=>o=w,()=>o)}var g=S(p,2),f=x(g);Ja(f,{size:"42px",onclick:()=>{n()(),tl()},"aria-label":"Close",children:(_,b)=>{Ya(_,{size:24})},$$slots:{default:!0}}),Ae(7,g,()=>ba),y(u,v)},$$slots:{dialog:!0}}),le()}we(["click"]);function Oh(t,e){re(e,!0);const i=D(e,"initialIndex",3,0);Rh(t,{get items(){return e.titles},get initialIndex(){return i()},onchange:n=>fe(pe.ExploreTitleRailSetIndex,e.titles[n],{index:n}),each:(n,r=_t,o=_t)=>{{let s=U(()=>{var c;return r().sid===((c=e.titles[o()])==null?void 0:c.sid)});Fn(n,{get title(){return r()},get useVideoBackground(){return l(s)}})}},$$slots:{each:!0}}),le()}const st=[];function fi({type:t="title",event:e=null,injection:i=null,data:a=null,scrollPosition:n=0,returnToTitle:r=null,props:o={}}={}){if(e&&$o(e))return;e==null||e.preventDefault(),st!=null&&st.length&&el();const s=nl(),c={initialScrollPosition:n,...o},d=Bh({type:t,target:s,data:a,props:c});r&&Ss({type:t,injection:i,data:r}),Ss({type:t,injection:i,data:a,scrollPosition:n,component:d})}function Bh({type:t="title",target:e,data:i,props:a={}}){return t==="participant"?Mt(hh,{target:e,props:{participant:i,...a}}):t==="explore"?Mt(mh,{target:e,props:{...a}}):t==="titles-rail"?Mt(Oh,{target:e,props:{titles:i,...a}}):Mt(sh,{target:e,props:{title:i,...a}})}function Ss({type:t="title",injection:e=null,data:i,scrollPosition:a=0,component:n}){st.push({type:t,injection:e,data:i,scrollPosition:a,component:n})}function el(t=!0){st.length&&(Vh(),Fi(st[st.length-1].component,{outro:t}))}function Fh(t=!0){el(t),st.pop()}function tl(t=!0){for(el(t);st.length>0;)st.pop()}function Ts(){return st[st.length-2]||null}function Hh(){if(st.length<2)return;Fh();const t=st.pop();t&&fi({...t})}function Vh(){const t=`[data-playpilot-link-injections] ${window.innerWidth>pi?".modal":".dialog"}`,e=document.querySelector(t);e!=null&&e.scrollTop&&(st[st.length-1].scrollPosition=e.scrollTop)}function Uh(t,e){if($o(t))return;let i=t.target;if(!i||(i.hasAttribute(hi)||(i=i.closest(gi)),!i))return;const a=i.getAttribute(hi);if(!a)return;const n=e.find(r=>a===r.key);n&&(t.preventDefault(),yh(()=>{Kn(!1),fi({event:t,injection:n,data:n.title_details})},!Qr.current&&window.innerWidth>=pi&&!window.matchMedia("(pointer: coarse)").matches))}var Wh=T(' <span class="svelte-1to4glm"><button class="svelte-1to4glm"> </button></span>',1),Gh=T('<!> <a target="_blank"> </a>',1),Kh=T(" <!>.",1),Yh=T("<!> <br/>",1),Zh=T(" <br/>",1),Jh=T('<span class="svelte-1to4glm"><!></span>'),Qh=T('<p class="svelte-1to4glm"></p>');function Xh(t,e){re(e,!0);const i=D(e,"onclickmodal",3,()=>null);function a(c,d){fe(pe.AfterArticlePlaylinkClick,c,{playlink:d})}function n(c,d,u){fe(pe.AfterArticleModalButtonClick,d),i()(c,u)}var r=me(),o=Z(r);{var s=c=>{var d=Qh();Le(d,21,()=>e.linkInjections,qe,(u,v)=>{const p=U(()=>{const{key:P,title:w,title_details:k,after_article_style:L}=l(v);return{key:P,title:w,title_details:k,after_article_style:L}}),h=U(()=>{var P;return((P=l(p).title_details)==null?void 0:P.providers)||[]});var g=Jh(),f=x(g);{var _=P=>{var w=Yh(),k=Z(w);{var L=j=>{var V=Wh(),z=Z(V),I=S(z);I.__click=F=>F.stopPropagation();var E=x(I);E.__click=F=>n(F,l(p).title_details,l(v));var A=x(E);H((F,N)=>{J(z,`"${l(p).title??""}" ${F??""} `),J(A,N)},[()=>ve("Is Available To Stream"),()=>ve("View Streaming Options")]),y(j,V)},C=j=>{var V=Kh(),z=Z(V),I=S(z);Le(I,17,()=>l(h),qe,(E,A,F)=>{let N=()=>l(A).name,W=()=>l(A).url;var G=Gh(),q=Z(G);{var R=X=>{var te=Je();H(ne=>J(te,ne),[()=>F===l(h).length-1?`, ${ve("And")}`:","]),y(X,te)};O(q,X=>{F&&X(R)})}var Y=S(q,2);Y.__click=()=>a(l(p).title_details,N());var Q=x(Y);H(()=>{se(Y,"href",W()),J(Q,N())}),y(E,G)}),H(E=>J(z,`"${l(p).title??""}" ${E??""} `),[()=>ve("Is Available To Stream On")]),y(j,V)};O(k,j=>{l(p).after_article_style==="modal_button"?j(L):j(C,!1)})}y(P,w)},b=P=>{var w=Zh(),k=Z(w);H(L=>J(k,`"${l(p).title??""}" ${L??""} `),[()=>ve("Title Unavailable Suffix")]),y(P,w)};O(f,P=>{l(h).length?P(_):P(b,!1)})}H(()=>se(g,"data-playpilot-injection-key",l(p).key)),y(u,g)}),y(c,d)};O(o,c=>{e.linkInjections.length&&c(s)})}y(t,r),le()}we(["click"]);let Xa=null;function $h(t,e){var o,s;if(Xa||!e.length)return;const i=document.createElement("div"),a=(o=window.PlayPilotLinkInjections)==null?void 0:o.after_article_selector,n=(a?document.querySelector(a):null)||t[t.length-1],r=((s=window.PlayPilotLinkInjections)==null?void 0:s.after_article_insert_position)||"afterend";i.dataset.playpilotAfterArticlePlaylinks="true",n.insertAdjacentElement(r,i),Xa=Mt(Xh,{target:i,props:{linkInjections:e,onclickmodal:(c,d)=>fi({event:c,injection:d,data:d.title_details})}})}function eg(){var t;Xa&&(Fi(Xa),(t=document.querySelector("[data-playpilot-after-article-playlinks]"))==null||t.remove(),Xa=null)}var tg=T('<p class="svelte-1epbbn0"> </p>');function ig(t,e){re(e,!1),Ar();var i=tg(),a=x(i);H(n=>J(a,n),[()=>{var n,r;return((r=(n=window==null?void 0:window.PlayPilotLinkInjections)==null?void 0:n.config)==null?void 0:r.in_text_disclaimer_text)||ve("In-Text Disclaimer")}]),y(t,i),le()}let $a=null;function ag(t){var r,o,s,c,d,u;if(!((o=(r=window.PlayPilotLinkInjections)==null?void 0:r.config)!=null&&o.in_text_disclaimer_enabled)||$a)return;const e=document.createElement("div"),i=(c=(s=window.PlayPilotLinkInjections)==null?void 0:s.config)==null?void 0:c.in_text_disclaimer_selector,a=(i?document.querySelector(i):null)||t[0],n=((u=(d=window.PlayPilotLinkInjections)==null?void 0:d.config)==null?void 0:u.in_text_disclaimer_insert_position)||"beforebegin";e.dataset.playpilotInTextDisclaimer="true",a.insertAdjacentElement(n,e),$a=Mt(ig,{target:e})}function ng(){var t;$a&&(Fi($a),(t=document.querySelector("[data-playpilot-in-text-disclaimer]"))==null||t.remove(),$a=null)}const hi="data-playpilot-injection-key",gi=`[${hi}]`;function rg(t,e={aiInjections:[],manualInjections:[]}){al(),ug();const i=vg(e);if(!i.length)return[];const a=St(t.map(d=>d.innerText).join(" ")),r=pg(i).filter(d=>a.includes(St(d.sentence))),o={};let s=-1;for(const d of hg(r)){s++;const u=t.findIndex(k=>St(k.innerText).includes(St(d.sentence))),v=t[u];if(!v)continue;const p=Ko(d.title,v,["A"]);if(!(p!=null&&p.nodeValue)||Yo(p)){const k=Ko(d.title,v);if(k&&Yo(k)){o[d.key]="Given text is already inside of a link.";continue}}const{injectionElement:h,linkElement:g}=lg(d);let f=-1,_=!1;zn(v.innerHTML,d.title)===1&&(f=v.innerHTML.indexOf(d.title));const{phrase_before:P,phrase_after:w}=og(v,d);if(f===-1&&(P||w)){const k=[P,d.title,w].filter(Boolean).join(" ");if(f=v.innerHTML.indexOf(k),f===-1){const L=Kd(v.innerHTML,d.title,P||"",w||"");if(L){const{leadingSpaces:C,trailingSpaces:j}=Yd(L.match);g.innerHTML=L.match.trim();const V=L.index+C,z=L.index+L.match.length-j;if(v.innerHTML.slice(V,z).includes("href="))continue;il(v.innerHTML,d.title,v,h,V,z)&&(f=L.index,_=!0)}}}if(f===-1&&(p!=null&&p.nodeValue)){const k=v.innerHTML.indexOf(p.nodeValue),L=v.innerHTML.indexOf(d.sentence),C=L===-1?v.innerHTML.indexOf(d.sentence.slice(0,20)):-1,j=d.sentence.split(" ")[0],z=zn(v.innerHTML,j)===1?v.innerHTML.indexOf(j):-1,I=Fd(r.slice(0,s+1),d,["title","sentence"])-1,E=Zd(p.nodeValue,v,I);f=Math.max(k,C,E,z,L,0)}if(f!==-1&&!_&&!il(v.innerHTML,d.title,v,h,f)){const k=Qd(d.title,v.innerHTML);k>-1?il(v.innerHTML,d.title,v,h,k):o[d.key]="Injection would have lead to broken HTML."}}cg(r),sg();const c=fg(i);return c.length&&$h(t,c),document.querySelector(gi)&&ag(t),i.filter(d=>d.title_details).map((d,u)=>{const v=!d.manual&&gg(d,u,i),p=d.duplicate??v;p&&(o[d.key]=v?"Injection was manually removed.":"Injection was marked as duplicate.");const h=document.querySelector(`[${hi}="${d.key}"]`),g=Yn(d)&&!d.inactive&&!d.removed&&!d.after_article&&!h,f=r.find(b=>b.key===d.key),_=g?o[d.key]||(f?"The link failed to inject for unknown reasons.":"Given sentence was not found in the article."):"";return{...d,inactive:d.inactive??!1,duplicate:p,failed:g,failed_message:_,matchingElement:h}})}function lg(t){var r,o,s;const e=document.createElement("span");e.dataset.playpilotInjectionKey=t.key;const i=!!((o=(r=window.PlayPilotLinkInjections)==null?void 0:r.config)!=null&&o.open_tpi_links_in_explore),a=i?Au(t.title_details):On(t.title_details),n=document.createElement("a");return n.dataset.playpilotPosterUrl=(s=t.title_details)==null?void 0:s.standing_poster,n.innerText=t.title,n.href=a,n.target=i?"":"_blank",n.rel="noopener nofollow noreferrer",e.insertAdjacentElement("beforeend",n),{injectionElement:e,linkElement:n}}function il(t,e,i,a,n,r=-1){const o=u=>Array.from(u.querySelectorAll(`a, ${gi}`)).filter(v=>!v.innerText).length,s=document.createElement("div");s.innerHTML=t;const c=o(s),d=s.innerText;return r>0?s.innerHTML=Wd(t,a.outerHTML,n,r):s.innerHTML=Ud(t,e,a.outerHTML,n),Math.abs(s.innerText.length-d.length)>1||c!=o(s)?!1:(i.innerHTML=s.innerHTML,!0)}function og(t,e){const{phrase_before:i,phrase_after:a}=e;if(i||a)return{phrase_before:i,phrase_after:a};if(zn(t.innerText,e.title)!==1)return{phrase_before:null,phrase_after:null};const r=t.innerText.indexOf(e.title),o=Jo(t,r,r+e.title.length);return{phrase_before:o.before,phrase_after:o.after}}function sg(){const t=Array.from(document.querySelectorAll(`${gi} a`)),e=["--playpilot-injection-text-color","--playpilot-injection-text-color-hover","--playpilot-injection-font-weight","--playpilot-injection-font-weight-headings","--playpilot-injection-text-decoration","--playpilot-injection-text-decoration-hover","--playpilot-injection-background-color","--playpilot-injection-background-color-hover"];for(const i of t){const a=getComputedStyle(i);for(const n of e)a.getPropertyValue(n)&&(i.dataset.usedCssVariables=`${i.dataset.usedCssVariables||""} ${n}`)}}function cg(t){window.addEventListener("mousemove",Ih),window.addEventListener("click",i=>{var a,n;(n=(a=window.PlayPilotLinkInjections)==null?void 0:a.config)!=null&&n.open_tpi_links_in_explore||Uh(i,t)}),document.querySelectorAll(gi).forEach(i=>{const a=i.dataset.playpilotInjectionKey,n=t.find(r=>a===r.key);n&&(i.addEventListener("mouseenter",r=>{zh()||Ch(r,n)}),i.addEventListener("mouseleave",jh))})}function al(){document.querySelectorAll(gi).forEach(e=>dg(e.getAttribute(hi)||"")),eg(),ng(),tl(!1),Kn(!1)}function dg(t){var n;const e=document.querySelector(`[${hi}="${t}"]`);if(!e)return;e.querySelectorAll("[data-playpilot-element]").forEach(r=>r.remove());const a=(n=e.querySelector("a"))==null?void 0:n.innerHTML;e.outerHTML=a||""}function ug(){document.querySelectorAll('a[href*="playpilot.com"]').forEach(e=>{e.closest(gi)||/\/movie|show\//.test(e.href)&&(e.outerHTML=e.innerHTML)})}function vg({aiInjections:t,manualInjections:e}){return[...e.map(i=>({...i,manual:!0})),...t]}function Ps(t){return{aiInjections:t.filter(e=>!e.manual),manualInjections:t.filter(e=>e.manual)}}function Es(t){return!t.inactive&&!t.removed&&!t.duplicate&&!!t.title_details&&Yn(t)}function Yn(t){return t.in_text||t.in_text===void 0?!0:!!t.after_article}function pg(t){return Cs(t).filter(e=>e.in_text!==!1&&Es(e))}function fg(t){return Cs(t).filter(e=>e.after_article===!0&&Es(e))}function Cs(t){return t.filter(e=>e.removed||e.inactive?!1:e.manual&&!e.removed&&!e.inactive?!0:!t.some(i=>i.manual&&(i.removed||i.inactive)&&Is(i,e)))}function hg(t){return t.slice().sort((e,i)=>{if(e.sentence<i.sentence)return-1;if(e.sentence>i.sentence)return 1;const a=i.title.length-e.title.length;return a!==0?a:0})}function gg(t,e,i){return i.some((a,n)=>e!==n&&a.manual&&Is(a,t))}function Is(t,e){return t.title===e.title&&St(t.sentence)===St(e.sentence)}function nl(){return document.querySelector("[data-playpilot-link-injections]")||document.body}async function mg(){const t=vi();if(!t)throw new Error("No token was provided");try{return await await Xt(`/domains/config?api-token=${t}`)||null}catch{return null}}var yg=Re('<svg width="8" height="4" viewBox="0 0 8 4" fill="none"><path d="M1 0.5L4 3.5L7 0.5" stroke="currentColor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function bg(t,e){const i=D(e,"expanded",3,!1);var a=yg();let n;H(()=>n=_e(a,0,"svelte-abbsts",null,n,{expanded:i()})),y(t,a)}var _g=Re('<svg width="24px" height="24px" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="17" r="1" fill="var(--playpilot-warning)"></circle><path d="M12 10L12 14" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M3.44722 18.1056L10.2111 4.57771C10.9482 3.10361 13.0518 3.10362 13.7889 4.57771L20.5528 18.1056C21.2177 19.4354 20.2507 21 18.7639 21H5.23607C3.7493 21 2.78231 19.4354 3.44722 18.1056Z" stroke="var(--playpilot-warning)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function xg(t){var e=_g();y(t,e)}var wg=T('<button><div class="label svelte-1201akx"><!></div> <div class="track svelte-1201akx"><div class="knob svelte-1201akx"></div></div></button>');function rl(t,e){re(e,!0);let i=D(e,"active",15),a=D(e,"fullwidth",3,!1),n=D(e,"label",3,""),r=D(e,"onclick",3,()=>null);function o(){i(!i()),r()(i())}var s=wg();let c;s.__click=o;var d=x(s),u=x(d);Ve(u,()=>e.children),H(()=>{c=_e(s,1,"switch svelte-1201akx",null,c,{active:i(),fullwidth:a()}),se(s,"aria-label",`Toggle ${n()??""} ${i()?"off":"on"}`)}),y(t,s),le()}we(["click"]);var kg=T('<input type="text" autocomplete="off" class="svelte-v3h1om"/>');function ll(t,e){re(e,!0);let i=D(e,"value",15),a=D(e,"label",3,""),n=D(e,"name",3,""),r=D(e,"readonly",3,!1),o=D(e,"oninput",3,()=>null);var s=kg();s.__input=function(...c){var d;(d=o())==null||d.apply(this,c)},H(()=>{se(s,"name",n()),se(s,"aria-label",a()),se(s,"placeholder",a()),s.readOnly=r()}),ha(s,i),y(t,s),le()}we(["input"]);var Sg=Re('<path d="M13.5833 13.6667L4.41667 13.6667M5.5 1.5H12.5C13.9001 1.5 14.6002 1.5 15.135 1.77248C15.6054 2.01217 15.9878 2.39462 16.2275 2.86502C16.5 3.3998 16.5 4.09987 16.5 5.5V12.5C16.5 13.9001 16.5 14.6002 16.2275 15.135C15.9878 15.6054 15.6054 15.9878 15.135 16.2275C14.6002 16.5 13.9001 16.5 12.5 16.5H5.5C4.09987 16.5 3.3998 16.5 2.86502 16.2275C2.39462 15.9878 2.01217 15.6054 1.77248 15.135C1.5 14.6002 1.5 13.9001 1.5 12.5V5.5C1.5 4.09987 1.5 3.3998 1.77248 2.86502C2.01217 2.39462 2.39462 2.01217 2.86502 1.77248C3.3998 1.5 4.09987 1.5 5.5 1.5Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),Tg=Re('<path d="M13.5833 8.58342H4.41667M5.5 1.50009H12.5C13.9001 1.50009 14.6002 1.50009 15.135 1.77258C15.6054 2.01226 15.9878 2.39471 16.2275 2.86512C16.5 3.39989 16.5 4.09996 16.5 5.50009V12.5001C16.5 13.9002 16.5 14.6003 16.2275 15.1351C15.9878 15.6055 15.6054 15.9879 15.135 16.2276C14.6002 16.5001 13.9001 16.5001 12.5 16.5001H5.5C4.09987 16.5001 3.3998 16.5001 2.86502 16.2276C2.39462 15.9879 2.01217 15.6055 1.77248 15.1351C1.5 14.6003 1.5 13.9002 1.5 12.5001V5.50009C1.5 4.09996 1.5 3.39989 1.77248 2.86512C2.01217 2.39471 2.39462 2.01226 2.86502 1.77258C3.3998 1.50009 4.09987 1.50009 5.5 1.50009Z" stroke="currentColor" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round"></path>'),Pg=Re('<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><!></svg>');function js(t,e){const i=D(e,"align",3,"bottom");var a=Pg(),n=x(a);{var r=s=>{var c=Sg();y(s,c)},o=s=>{var c=me(),d=Z(c);{var u=v=>{var p=Tg();y(v,p)};O(d,v=>{i()==="center"&&v(u)},!0)}y(s,c)};O(n,s=>{i()==="bottom"?s(r):s(o,!1)})}y(t,a)}var Eg=T("<div><!></div>");function Gi(t,e){const i=D(e,"type",3,"error"),a=D(e,"fixed",3,!1);var n=Eg();let r;var o=x(n);Ve(o,()=>e.children),H(()=>r=_e(n,1,`alert ${i()??""}`,"svelte-1v44877",r,{fixed:a()})),y(t,n)}var Cg=T("<!> In-text Playlink",1),Ig=T("<!> Bottom Playlink",1),jg=T('<div class="alert svelte-1fv3ko3"><!></div>'),zg=T('<div><div class="label svelte-1fv3ko3">Bottom playlinks style</div> <div class="group svelte-1fv3ko3" role="listbox" tabindex="0" aria-label="Playlink type"><button role="option" id="playlinks-in-text">Playlinks sentence</button> <button role="option" id="playlinks-after-article">Modal button</button> <div></div></div></div>'),Ag=T('<div class="switches svelte-1fv3ko3"><!> <!></div> <!> <!>',1);function Lg(t,e){re(e,!0);const i=D(e,"linkInjection",7),a=U(()=>i().after_article_style==="modal_button");var n=Ag(),r=Z(n),o=x(r);{let p=U(()=>i().in_text??!0);rl(o,{fullwidth:!0,get active(){return l(p)},onclick:h=>{i().in_text=h,i().manual=!0},label:"In-text Playlink",children:(h,g)=>{var f=Cg(),_=Z(f);js(_,{align:"center"}),y(h,f)},$$slots:{default:!0}})}var s=S(o,2);{let p=U(()=>i().after_article??!1);rl(s,{fullwidth:!0,get active(){return l(p)},onclick:h=>{i().after_article=h,i().manual=!0},label:"Bottom Playlink",children:(h,g)=>{var f=Ig(),_=Z(f);js(_,{align:"bottom"}),y(h,f)},$$slots:{default:!0}})}var c=S(r,2);{var d=p=>{var h=jg(),g=x(h);Gi(g,{type:"warning",children:(f,_)=>{var b=Je("At least one layout option must be selected for the playlink to be visible.");y(f,b)},$$slots:{default:!0}}),Ae(3,h,()=>Ka,()=>({duration:200})),y(p,h)};O(c,p=>{Yn(i())||p(d)})}var u=S(c,2);{var v=p=>{var h=zg(),g=S(x(h),2),f=x(g);f.__click=()=>i().after_article_style="playlinks";let _;var b=S(f,2);b.__click=()=>i().after_article_style="modal_button";let P;var w=S(b,2);let k;H(()=>{se(g,"aria-activedescendant",`playlinks-${l(a)?"after-article":"in-text"}`),se(f,"aria-selected",!l(a)||null),_=_e(f,1,"svelte-1fv3ko3",null,_,{active:!l(a)}),se(b,"aria-selected",l(a)||null),P=_e(b,1,"svelte-1fv3ko3",null,P,{active:l(a)}),k=_e(w,1,"active-marker svelte-1fv3ko3",null,k,{right:l(a)})}),Ae(3,h,()=>Ka,()=>({duration:100})),y(p,h)};O(u,p=>{i().after_article&&p(v)})}y(t,n),le()}we(["click"]);var Mg=T('<option class="svelte-1yg5wso"> </option>'),qg=T('<div class="sent svelte-1yg5wso">Report has been sent, thank you! Closing window...</div>'),Dg=T('<button class="submit svelte-1yg5wso">Send report</button>'),Ng=T('<div class="form svelte-1yg5wso"><div class="heading svelte-1yg5wso">Report issue</div> <div class="info svelte-1yg5wso"><div><strong class="svelte-1yg5wso">Title</strong> </div> <div><strong class="svelte-1yg5wso">Sentence</strong> </div></div> <label for="reason">What would you like to report?</label> <select id="reason" name="reason" class="svelte-1yg5wso"><option class="svelte-1yg5wso">Select an issue...</option><!></select> <div><!></div></div>');function Rg(t,e){re(e,!0);const i=[{value:"failed_injection",label:"The link failed to appear on the page."},{value:"layout_issue",label:"The link is breaking the layout or formatting of my page."},{value:"wrong_content",label:"The link points to the wrong movie or show."},{value:"inappropriate_title",label:"The link points to an inappropriate movie or show."},{value:"broken_link",label:"The link is broken or leads to an error page."},{value:"other",label:"My issue is not listed, but please have a look regardless."}];let a=K(""),n=K(!1);function r(){var o,s;l(a)&&(fe(pe.ManualReport,e.linkInjection.title_details,{report_reason:l(a),sid:e.linkInjection.sid,title:e.linkInjection.title,sentence:e.linkInjection.sentence,failed:(o=e.linkInjection.failed)==null?void 0:o.toString(),failed_message:e.linkInjection.failed_message,manual:(s=e.linkInjection.manual)==null?void 0:s.toString()}),M(n,!0),setTimeout(e.onclose,3e3))}Qa(t,{get onclose(){return e.onclose},children:(o,s)=>{var c=Ng(),d=x(c);ft(d,(C,j)=>ze==null?void 0:ze(C,j),()=>2);var u=S(d,2),v=x(u),p=S(x(v)),h=S(v,2),g=S(x(h)),f=S(u,4),_=x(f);_.value=_.__value="";var b=S(_);Le(b,17,()=>i,qe,(C,j)=>{let V=()=>l(j).value,z=()=>l(j).label;var I=Mg();I.__click=()=>M(a,V(),!0);var E=x(I),A={};H(()=>{J(E,z()),A!==(A=V())&&(I.value=(I.__value=V())??"")}),y(C,I)});var P=S(f,2),w=x(P);{var k=C=>{var j=qg();Ae(1,j,()=>Pt,()=>({duration:200})),y(C,j)},L=C=>{var j=Dg();j.__click=r,H(()=>j.disabled=!l(a)),y(C,j)};O(w,C=>{l(n)?C(k):C(L,!1)})}H(C=>{J(p,`: ${e.linkInjection.title??""}`),J(g,`:
|
|
11
11
|
${C??""}`)},[()=>Zo(e.linkInjection.sentence,e.linkInjection.title,100)]),fd(f,()=>l(a),C=>M(a,C)),y(o,c)},$$slots:{default:!0}}),le()}we(["click"]);var Og=T('<button class="expand-sentence svelte-tlh9c3"> </button>'),Bg=T('<button class="context-menu-action svelte-tlh9c3">Remove</button> <button class="context-menu-action svelte-tlh9c3">Report issue</button>',1),Fg=T('<div class="warning svelte-tlh9c3" aria-label="Invalid playlink settings"><!></div>'),Hg=T('<div class="actions svelte-tlh9c3"><button class="expand svelte-tlh9c3" aria-label="Expand"><!></button> <!> <!></div>'),Vg=T('<div class="expanded svelte-tlh9c3"><div class="label svelte-tlh9c3">Link URL</div> <!> <div class="label offset svelte-tlh9c3">Layout options</div> <div class="type-select svelte-tlh9c3"><!></div></div>'),Ug=T('<div><div class="header svelte-tlh9c3"><img class="poster svelte-tlh9c3" alt="" width="32" height="48"/> <div class="info svelte-tlh9c3"><div class="title svelte-tlh9c3"> </div> <div class="sentence svelte-tlh9c3"><!> <!></div></div> <div class="context-menu svelte-tlh9c3"><!></div></div> <div class="content svelte-tlh9c3"><!> <!></div></div>');function Wg(t,e){re(e,!0);const i=D(e,"linkInjection",15),a=D(e,"onremove",3,()=>null),n=D(e,"onhighlight",3,()=>null),r=U(()=>i()||{}),o=U(()=>l(r).key),s=U(()=>l(r).sentence),c=U(()=>l(r).title_details),d=U(()=>l(r).failed),u=U(()=>l(r).failed_message),v=U(()=>l(r).inactive),p=U(()=>l(c)),h=U(()=>Zo(i().sentence,i().title,60));let g=K(!1),f=K(!1),_=K(!1),b=K(null);Qe(()=>{l(d)&&fe(pe.InjectionFailed,l(p),{phrase:i().title,sentence:l(s)})});function P(ce=!0){L().forEach($=>{$.classList.toggle("playpilot-injection-highlight",ce)})}function w(ce){let ue=ce.target,$=ue==null?void 0:ue.dataset.playpilotInjectionKey;ue&&!$&&(ue=ue.closest(`[data-playpilot-injection-key="${l(o)}"]`),$=ue==null?void 0:ue.dataset.playpilotInjectionKey),M(_,$===l(o)),l(b)&&l(_)&&n()(l(b))}function k(ce){requestAnimationFrame(()=>P());const ue=ce.target;if(["BUTTON","INPUT"].includes(ue.nodeName)||ue.closest("button")||ue.closest("input"))return;const $=L()[0];$&&$.scrollIntoView({behavior:"smooth"})}function L(){const ce=Array.from(document.querySelectorAll(`[data-playpilot-injection-key="${l(o)}"]`));return ce.length?ce:Nr(ga()).filter(ue=>St(ue.innerText).includes(St(i().sentence)))||[]}function C(){const ce=Mt(Rg,{target:document.body,props:{linkInjection:i(),onclose:()=>Fi(ce)}})}var j=Ug();ye("mouseover",Ee,w);let V;j.__click=k;var z=x(j),I=x(z),E=S(I,2),A=x(E),F=x(A),N=S(A,2),W=x(N);sd(W,()=>(l(f)?l(s):l(h)).replace(i().title,`<em>${i().title}</em>`));var G=S(W,2);{var q=ce=>{var ue=Og();ue.__click=()=>M(f,!l(f));var $=x(ue);H(()=>J($,l(f)?"Less":"More")),y(ce,ue)};O(G,ce=>{l(h).length<l(s).length&&ce(q)})}var R=S(E,2),Y=x(R);gs(Y,{label:"More options",children:(ce,ue)=>{var $=Bg(),de=Z($);de.__click=function(...ae){var ke;(ke=a())==null||ke.apply(this,ae)};var ee=S(de,2);ee.__click=C,y(ce,$)},$$slots:{default:!0}});var Q=S(z,2),X=x(Q);{var te=ce=>{Gi(ce,{children:(ue,$)=>{var de=Je();H(()=>J(de,l(u))),y(ue,de)},$$slots:{default:!0}})},ne=ce=>{var ue=Hg(),$=x(ue);$.__click=()=>M(g,!l(g));var de=x($);bg(de,{get expanded(){return l(g)}});var ee=S($,2);{var ae=oe=>{var Pe=Fg(),Oe=x(Pe);xg(Oe),Ae(3,Pe,()=>Pt,()=>({duration:100})),y(oe,Pe)};O(ee,oe=>{Yn(i())||oe(ae)})}var ke=S(ee,2);{let oe=U(()=>l(v)?"Inactive":"Visible"),Pe=U(()=>!i().inactive);rl(ke,{get label(){return l(oe)},get active(){return l(Pe)},onclick:Oe=>{i(i().inactive=!Oe,!0),i(i().manual=!0,!0)},children:(Oe,Ue)=>{var ie=Je();H(()=>J(ie,l(v)?"Inactive":"Visible")),y(Oe,ie)},$$slots:{default:!0}})}H(()=>se($,"aria-expanded",l(g))),y(ce,ue)};O(X,ce=>{l(d)?ce(te):ce(ne,!1)})}var Te=S(X,2);{var Ce=ce=>{var ue=Vg(),$=S(x(ue),2);ll($,{oninput:()=>i(i().manual=!0,!0),label:"Playlink URL",get value(){return i().playpilot_url},set value(ae){i(i().playpilot_url=ae,!0)}});var de=S($,4),ee=x(de);Lg(ee,{get linkInjection(){return i()}}),Ae(3,ue,()=>Ka,()=>({duration:100})),y(ce,ue)};O(Te,ce=>{l(g)&&ce(Ce)})}$e(j,ce=>M(b,ce),()=>l(b)),H(ce=>{V=_e(j,1,"item svelte-tlh9c3",null,V,{highlighted:l(_),inactive:l(v)}),se(I,"src",ce),J(F,l(p).title)},[()=>_a(l(p).standing_poster)]),ye("mouseenter",j,()=>P(!0)),ye("mouseleave",j,()=>P(!1)),ye("error",I,({target:ce})=>ce.src=Lr),Ae(6,j,()=>Ka,()=>({duration:200})),y(t,j),le()}we(["click"]);var Gg=T('<button class="drag-handle svelte-1fk5ijl" aria-label="Move editor"></button>');function Kg(t,e){re(e,!0);let i=D(e,"element",7),a=D(e,"position",23,()=>({x:0,y:0})),n=D(e,"limit",19,()=>({x:0,y:0})),r=D(e,"onchange",3,()=>null),o=!1,s={x:0,y:0},c=a();Qe(()=>{d(a().x,a().y)});function d(f,_){const b=window.innerWidth,P=window.innerHeight,w=i().clientWidth,k=i().clientHeight;f=Math.min(Math.max(f,n().x),b-w-n().x),_=Math.min(Math.max(_,n().y),P-k-n().y),i().style.right=f+"px",i().style.bottom=Math.max(_,n().y)+"px",a({x:f,y:_}),r()(a())}function u(f){var _,b;return{x:f.pageX||((_=f.touches)==null?void 0:_[0].pageX)||0,y:f.pageY||((b=f.touches)==null?void 0:b[0].pageY)||0}}function v(f){o=!0,s=u(f),c=a()}function p(f){if(!o)return;const _=u(f),b=_.x-s.x,P=_.y-s.y,w=c.x-b,k=c.y-P;d(w,k)}function h(){o&&(o=!1)}var g=Gg();ye("mousemove",Ee,p),ye("touchmove",Ee,p,void 0,!0),ye("mouseup",Ee,h),ye("touchend",Ee,h),ye("resize",Ee,()=>d(a().x,a().y)),g.__mousedown=v,g.__touchstart=v,y(t,g),le()}we(["mousedown","touchstart"]);var Yg=T('<button class="resize-handle svelte-iir57j" aria-label="Move editor"></button>');function Zg(t,e){re(e,!0);let i=D(e,"element",7),a=D(e,"height",7,200),n=D(e,"onchange",3,()=>null);const r=16;let o=!1,s=0,c=a();Qe(()=>{a()&&d(a())});function d(f){const _=window.getComputedStyle(i()).minHeight||"0",b=Math.max(parseInt(_),Math.min(f,h()));i().style.height=`${b}px`,a(b),n()(b)}function u(f){var _,b;o=!0,s=f.pageY||((b=(_=f.touches)==null?void 0:_[0])==null?void 0:b.pageY)||0,c=i().clientHeight}function v(f){var w,k;if(!o)return;const _=f.pageY||((k=(w=f.touches)==null?void 0:w[0])==null?void 0:k.pageY)||0,b=s-_,P=c+b;d(P)}function p(){o=!1}function h(){const f=window.innerHeight-i().getBoundingClientRect().bottom;return Math.max(window.innerHeight-r*2-f,0)}var g=Yg();ye("mousemove",Ee,v),ye("touchmove",Ee,v,void 0,!0),ye("mouseup",Ee,p),ye("touchend",Ee,p),ye("resize",Ee,()=>{a()&&d(a())}),g.__mousedown=u,g.__touchstart=u,y(t,g),le()}we(["mousedown","touchstart"]);function Jg(t,e=t.anchorNode){if(!t.anchorNode||!e)return{start:-1,end:-1};const i=t.toString().trim(),a=t.toString().search(/\S/);if(t.anchorNode===e&&e.nodeType===Node.TEXT_NODE){const d=Math.min(t.anchorOffset,t.focusOffset)+a;return{start:d,end:d+i.length}}const n=t.getRangeAt(0),r=n.cloneRange();r.selectNodeContents(e),r.setEnd(n.startContainer,n.startOffset);const s=r.toString().length+a,c=s+i.length;return{start:s,end:c}}var Qg=Re('<svg width="4" height="8" viewBox="0 0 4 8" fill="none"><path d="M3.5 7L0.5 4L3.5 1" stroke="currentcolor" stroke-width="0.9975" stroke-linecap="round" stroke-linejoin="round"></path></svg>');function Xg(t){var e=Qg();y(t,e)}async function $g(t){const e=vi();if(!e)throw new Error("No token was provided");return await Xt(`/search/titles/?api-token=${e}&query=${t}`)}var e1=Re('<svg viewBox="0 -960 960 960" width="18" height="18"><path fill="currentColor" d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"></path></svg>');function t1(t){var e=e1();y(t,e)}var i1=T("<div> </div>"),a1=T('<button><img class="poster svelte-fntasr" alt="" width="28" height="42"/> <div class="content"><div class="name svelte-fntasr"> </div> <div class="meta svelte-fntasr"><div class="imdb svelte-fntasr"><!> </div> <div> </div> <div> </div> <!></div></div> <a target="_blank" class="open-in-new-tab svelte-fntasr"><!></a></button>');function zs(t,e){re(e,!0);const i=D(e,"hoverable",3,!0),a=D(e,"onclick",3,()=>null);var n=a1();let r;n.__click=function(...C){var j;(j=a())==null||j.apply(this,C)};var o=x(n),s=S(o,2),c=x(s),d=x(c),u=S(c,2),v=x(u),p=x(v);Bn(p,{});var h=S(p),g=S(v,2),f=x(g),_=S(g,2),b=x(_),P=S(_,2);{var w=C=>{var j=i1(),V=x(j);H(()=>J(V,`${e.title.length??""} min`)),y(C,j)};O(P,C=>{e.title.length&&C(w)})}var k=S(s,2);k.__click=C=>C.stopImmediatePropagation();var L=x(k);t1(L),H((C,j)=>{r=_e(n,1,"item svelte-fntasr",null,r,{hoverable:i()}),se(o,"src",C),J(d,e.title.title),J(h,` ${e.title.imdb_score??""}`),J(f,e.title.year),J(b,e.title.type),se(k,"href",j)},[()=>_a(e.title.standing_poster),()=>On(e.title)]),ye("error",o,({target:C})=>C.src=Lr),y(t,n),le()}we(["click"]);var n1=T('<em class="empty svelte-zmrqec">No results found</em>'),r1=T('<div class="results svelte-zmrqec" data-testid="search-results"></div>'),l1=T('<div class="selected svelte-zmrqec"><!></div>'),o1=T('<div class="search svelte-zmrqec"><!> <!> <!></div>');function s1(t,e){re(e,!0);let i=D(e,"onselect",3,()=>null),a=D(e,"query",15),n=K(Fe([])),r=K(null),o=K(!1);Ke(()=>{a()&&s(a())});async function s(f){M(o,!0);try{M(n,await $g(f),!0)}finally{M(o,!1)}}function c(f){a(f.title),M(r,f,!0),i()(f)}var d=o1(),u=x(d);ll(u,{oninput:()=>M(r,null),name:"search",label:"Search...",get value(){return a()},set value(f){a(f)}});var v=S(u,2);{var p=f=>{var _=r1();Le(_,21,()=>l(n),b=>b.sid,(b,P)=>{zs(b,{get title(){return l(P)},onclick:()=>c(l(P))})},b=>{var P=me(),w=Z(P);{var k=L=>{var C=n1();y(L,C)};O(w,L=>{l(o)||L(k)})}y(b,P)}),y(f,_)};O(v,f=>{a()&&!l(r)&&f(p)})}var h=S(v,2);{var g=f=>{var _=l1(),b=x(_);zs(b,{get title(){return l(r)},hoverable:!1}),y(f,_)};O(h,f=>{l(r)&&f(g)})}y(t,d),le()}var c1=T('<div class="error svelte-12oucrc"><!></div>'),d1=T('<label for="text" class="svelte-12oucrc">Paired title</label> <!>',1),u1=T('<section class="layout svelte-12oucrc"><div class="header svelte-12oucrc"><!> <div class="heading svelte-12oucrc">Add Playlink manually</div></div> <p class="svelte-12oucrc">Highlight the text section in your post that you want to turn into a Playlink.</p> <label for="text" class="svelte-12oucrc">Selected text</label> <!> <!> <!> <button class="save svelte-12oucrc">Add playlink</button></section>');function v1(t,e){re(e,!0);const i=D(e,"onclose",3,()=>null),{pageText:a}=ma();let n=K(""),r=K(""),o=K(null),s=K(""),c=K(""),d=K(""),u=K("");Qe(v);function v(){const I=window.getSelection();if(!(I!=null&&I.anchorNode)||I.anchorNode.parentElement&&!ga().contains(I.anchorNode.parentElement))return;const E=I.toString().trim();if(!E)return;M(d,""),M(n,E,!0);const A=I.getRangeAt(0).cloneContents();if(Array.from(A.childNodes).filter(Q=>{var X;return(X=Q.textContent)==null?void 0:X.trim()}).find(Q=>{var X;return Q.nodeName==="A"||((X=Q.querySelector)==null?void 0:X.call(Q,"a"))})){M(d,"Selection is or contains a link. Injections can not be created around already existing links.");return}M(u,l(n),!0);const{node:N,sentence:W}=p(I,E);if(!N)return;M(r,W,!0);const{start:G,end:q}=Jg(I,N);(Q=>{M(c,Q.before,!0),M(s,Q.after,!0)})(Jo(N,G,q)),W.includes(l(c))||M(c,""),W.includes(l(s))||M(s,"");const R=I.getRangeAt(0).commonAncestorContainer.textContent,Y=St(a);(!R||!Y.includes(St(R)))&&M(d,"Selection was not inside of given content")}function p(I,E){const A=I.getRangeAt(0),F=ga();let N=A.startContainer;for(;(N.textContent||"").length<=E.length*3&&N.parentNode&&N.nodeName!=="P"&&N.parentNode.textContent!==F.textContent;)N=N.parentNode;if(!N||!N.textContent)return{node:null,sentence:""};const W=N.textContent,G=h(N,A.startContainer,A.startOffset),q=h(N,A.endContainer,A.endOffset),R=W.slice(0,G).lastIndexOf("."),Y=W.slice(q).match(/[.!?\n]/),Q=Y?q+Y.index:W.length,X=R===-1?0:R+1,te=Q,ne=W.slice(X,te+1).trim();return{node:N,sentence:ne}}function h(I,E,A){let F=0;const N=I,W=G=>{var q;if(G===E)return F+=A,!0;G.nodeType===Node.TEXT_NODE&&(F+=((q=G.textContent)==null?void 0:q.length)||0);for(let R=G.firstChild;R;R=R.nextSibling)if(W(R))return!0;return!1};return W(N),F}function g(I){var E,A;M(o,I,!0),(A=(E=window.getSelection())==null?void 0:E.removeAllRanges)==null||A.call(E)}function f(){if(!l(n)||!l(o))return;const I=l(o).type==="movie"?"movie":"show",E=No+`/${I}/${l(o).slug}`,A={sid:l(o).sid,title:l(n),sentence:l(r),phrase_before:l(c),phrase_after:l(s),playpilot_url:E,key:Go(l(o).sid),title_details:l(o),manual:!0};e.onsave(A),i()()}var _=u1();ye("mouseup",Ee,v);var b=x(_),P=x(b);Ja(P,{get onclick(){return i()},size:"24px",children:(I,E)=>{Xg(I)},$$slots:{default:!0}});var w=S(P,2);ft(w,(I,E)=>ze==null?void 0:ze(I,E),()=>2);var k=S(b,6);ll(k,{get value(){return l(n)},label:"Select text on the page",name:"selected-text",readonly:!0});var L=S(k,2);{var C=I=>{var E=c1(),A=x(E);Gi(A,{children:(F,N)=>{var W=Je();H(()=>J(W,l(d))),y(F,W)},$$slots:{default:!0}}),y(I,E)};O(L,I=>{l(d)&&I(C)})}var j=S(L,2);{var V=I=>{var E=d1(),A=S(Z(E),2);va(A,()=>l(r)+l(n),F=>{s1(F,{onselect:g,get query(){return l(u)},set query(N){M(u,N,!0)}})}),y(I,E)};O(j,I=>{l(d)||I(V)})}var z=S(j,2);z.__click=f,H(()=>z.disabled=!l(n)||!l(o)),y(t,_),le()}we(["click"]);const ol="PlayPilotEditorialSessionId",As=5e3,p1=As*2;async function f1(){const{ai_enabled:t,injections_enabled:e,ai_last_run:i,session_id:a,session_last_ping:n}=await Vi(),r=Ms(a||null,n||null),o={ai_enabled:t,ai_last_run:i,injections_enabled:e,session_id:a,session_last_ping:n};return r?await Ls():o}async function Ls(){const t=qs(),e=new Date(Date.now()).toISOString(),i={session_id:t,session_last_ping:e.toString()},{ai_enabled:a,injections_enabled:n,ai_last_run:r}=await Vi({params:i});return{ai_enabled:a,ai_last_run:r,injections_enabled:n,...i}}function Ms(t,e){if(!t||!e)return!0;const i=Date.now(),a=new Date(e),n=qs();return i-a.getTime()>p1?!0:n===t}function qs(){return sessionStorage.getItem(ol)||h1()}function h1(){const t=sessionStorage.getItem(ol)||jn();return sessionStorage.setItem(ol,t),t}var g1=T('<p class="svelte-16jrr0h"><strong>Someone else is currently editing this document.</strong> Wait for them to exit the page or take over edit permissions, preventing them from making more changes.</p> <button class="button svelte-16jrr0h">Take over editing</button>',1),m1=T('<div class="alert svelte-16jrr0h"><!></div>');function y1(t,e){re(e,!0);const i=D(e,"onpoll",3,()=>null),a=D(e,"onallow",3,()=>null),n=D(e,"ondisallow",3,()=>null),r=D(e,"ontakeover",3,()=>null);let o=null,s=K(!0);Qe(()=>(c(),()=>{o&&clearInterval(o)}));function c(){d(),o=setInterval(d,As)}async function d(){const g=await f1();g&&(M(s,Ms(g.session_id||null,g.session_last_ping||null),!0),l(s)?a()():n()(),i()({injectionsEnabled:!!g.injections_enabled,aiEnabled:!!g.ai_enabled}))}function u(){Ls(),r()()}var v=me(),p=Z(v);{var h=g=>{var f=m1(),_=x(f);Gi(_,{type:"warning",children:(b,P)=>{var w=g1(),k=S(Z(w),2);k.__click=u,y(b,w)},$$slots:{default:!0}}),y(g,f)};O(p,g=>{l(s)||g(h)})}y(t,v),le()}we(["click"]);var b1=Re('<svg width="24px" height="24px" viewBox="0 0 64 64" stroke-width="3" stroke="currentColor" fill="none"><circle cx="34.52" cy="11.43" r="5.82"></circle><circle cx="53.63" cy="31.6" r="5.82"></circle><circle cx="34.52" cy="50.57" r="5.82"></circle><circle cx="15.16" cy="42.03" r="5.82"></circle><circle cx="15.16" cy="19.27" r="5.82"></circle><circle cx="34.51" cy="29.27" r="4.7"></circle><line x1="20.17" y1="16.3" x2="28.9" y2="12.93"></line><line x1="38.6" y1="15.59" x2="49.48" y2="27.52"></line><line x1="50.07" y1="36.2" x2="38.67" y2="46.49"></line><line x1="18.36" y1="24.13" x2="30.91" y2="46.01"></line><line x1="20.31" y1="44.74" x2="28.7" y2="48.63"></line><line x1="17.34" y1="36.63" x2="31.37" y2="16.32"></line><line x1="20.52" y1="21.55" x2="30.34" y2="27.1"></line><line x1="39.22" y1="29.8" x2="47.81" y2="30.45"></line><line x1="34.51" y1="33.98" x2="34.52" y2="44.74"></line></svg>');function _1(t){var e=b1();y(t,e)}var x1=T('<strong class="svelte-1q9haus">AI processing is disabled.</strong>'),w1=T('<span class="svelte-1q9haus">.</span>'),k1=T(`<strong class="svelte-1q9haus">AI links are currently processing.</strong> This can take several minutes. We'll insert all found injections once ready. <div class="message svelte-1q9haus"> <span class="ellipses svelte-1q9haus"></span></div> <div class="loading-bar svelte-1q9haus"><div class="loading-bar-progress svelte-1q9haus"><div class="loading-bar-fill svelte-1q9haus" data-testid="loading-bar"></div></div> <div class="loading-bar-label svelte-1q9haus"> </div></div>`,1),S1=T('<p class="svelte-1q9haus"><strong class="svelte-1q9haus">AI has finished processing.</strong> <br class="svelte-1q9haus"/> <!></p> <button class="dismiss svelte-1q9haus">Dismiss</button>',1),T1=T('<div class="animator svelte-1q9haus" data-test-id="animator"></div>'),P1=T('<div data-testid="ai-indicator"><div class="content svelte-1q9haus"><div class="icon svelte-1q9haus"><!></div> <div class="svelte-1q9haus"><!></div></div> <div class="border svelte-1q9haus"><!></div></div>');function E1(t,e){const i=D(e,"aiRunning",3,!1),a=D(e,"aiEnabled",3,!1),n=D(e,"message",3,""),r=D(e,"percentage",3,0),o=D(e,"aiInjectionsCount",3,0),s=o();let c=K(!1);var d=me(),u=Z(d);{var v=p=>{var h=P1();let g;var f=x(h),_=x(f),b=x(_);_1(b);var P=S(_,2),w=x(P);{var k=z=>{var I=x1();y(z,I)},L=z=>{var I=me(),E=Z(I);{var A=N=>{var W=k1(),G=S(Z(W),2),q=x(G),R=S(q);Le(R,20,()=>({length:3}),qe,(Ce,ce)=>{var ue=w1();y(Ce,ue)});var Y=S(G,2),Q=x(Y),X=x(Q);let te;var ne=S(Q,2),Te=x(ne);H((Ce,ce)=>{J(q,`${n()??""} `),te=Ye(X,"",te,Ce),J(Te,`${ce??""}%`)},[()=>({width:`${Math.max(r(),3)}%`}),()=>Math.floor(r())]),y(N,W)},F=N=>{var W=S1(),G=Z(W),q=S(x(G),4);{var R=X=>{var te=Je("No new injections where found.");y(X,te)},Y=X=>{var te=Je();H(()=>J(te,`${o()??""} Injections where found and added to the page.`)),y(X,te)};O(q,X=>{s===o()?X(R):X(Y,!1)})}var Q=S(G,2);Q.__click=()=>M(c,!0),y(N,W)};O(E,N=>{i()?N(A):N(F,!1)},!0)}y(z,I)};O(w,z=>{a()?z(L,!1):z(k)})}var C=S(f,2),j=x(C);{var V=z=>{var I=T1();y(z,I)};O(j,z=>{i()&&z(V)})}H(()=>g=_e(h,1,"ai-indicator svelte-1q9haus",null,g,{running:i()})),y(p,h)};O(u,p=>{l(c)||p(v)})}y(t,d)}we(["click"]);var C1=T('<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:400,600,700"/>'),I1=T('<div class="handles svelte-7r3240"><div class="handle svelte-7r3240"><!></div> <div class="handle svelte-7r3240"><!></div></div>'),j1=T('<div class="loading svelte-7r3240">Loading...</div>'),z1=T('<div class="bubble svelte-7r3240"> </div> <!>',1),A1=T(`<strong>Playlinks are currently not published.</strong> Visitors to this page will not see any of the injected links.
|
|
12
|
-
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal.</a>`,1),L1=T('<div class="alert svelte-7r3240"><!></div>'),M1=T('<div class="error svelte-7r3240"><!></div>'),q1=T('<div class="empty svelte-7r3240">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),D1=T('<button class="save svelte-7r3240"> </button>'),N1=T('<!> <!> <div class="items svelte-7r3240"></div> <!>',1),R1=T("<!> <!> <!>",1),O1=T('<div class="panel playpilot-styled-scrollbar svelte-7r3240"><!></div>'),B1=T('<section><!> <header class="header svelte-7r3240"><div class="heading svelte-7r3240">Playlinks</div> <!></header> <!> <!></section>');function F1(t,e){re(e,!0);let i=D(e,"linkInjections",15),a=D(e,"loading",3,!1),n=D(e,"injectionsEnabled",7,!1),r=D(e,"aiStatus",23,()=>({})),o=D(e,"onreinitialize",3,()=>null);const s="editor-position",c="editor-height",d=JSON.parse(localStorage.getItem(s)||'{ "x": 0, "y": 0 }'),u=parseInt(localStorage.getItem(c)||"0");let v=K(null),p=K(!1),h=K(!1),g=K(!1),f=K(!0),_=K(0),b=K("");const P=U(()=>ja(r().aiEnabled,!1)),w=U(()=>ja(r().aiRunning,!1)),k=U(()=>JSON.stringify(i())),L=U(()=>!l(w)&&l(f)),C=U(()=>l(b)&&l(b)!==l(k)),j=U(()=>i().filter(ee=>ee.title_details&&!ee.removed&&!ee.duplicate&&(ee.manual||!ee.manual&&!ee.failed))),V=U(()=>I(l(j))),z=U(()=>!a()&&kt(()=>r().aiRunning));Ke(()=>{a()||kt(()=>{requestAnimationFrame(()=>M(b,l(k),!0)),G()})});function I(ee){return ee.sort((ae,ke)=>ae.failed!==ke.failed?ae.failed?1:-1:ae.title_details.title.localeCompare(ke.title_details.title))}async function E(){try{M(h,!0),M(g,!1),i(await Bd(i())),M(b,l(k),!0)}catch{M(g,!0)}finally{M(h,!1)}}function A(ee,ae){localStorage.setItem(ee,ae)}function F(ee){const ae=i().findIndex(ke=>ke.key===ee);i(i()[ae].manual=!0,!0),i(i()[ae].removed=!0,!0),i([...i()])}function N(ee){if(!l(v))return;const ae=ee.offsetTop,ke=ae+ee.offsetHeight,oe=l(v).scrollTop,Pe=oe+l(v).clientHeight;ae>=oe&&ke<=Pe||l(v).scrollTo({top:ae-l(v).clientHeight/2,behavior:"smooth"})}function W(ee){const ae=ee.target;M(_,ae.scrollTop,!0)}function G(){const ee={total:i().length,failed_automatic:i().filter(ae=>ae.failed&&!ae.manual).length,failed_manual:i().filter(ae=>ae.failed&&ae.manual).length,final_injected:l(j).length};fe(pe.TotalInjectionsCount,null,ee)}var q=B1();cd("7r3240",ee=>{var ae=C1();y(ee,ae)});let R;var Y=x(q);{var Q=ee=>{var ae=I1(),ke=x(ae),oe=x(ke);Zg(oe,{get element(){return l(v)},get height(){return u},onchange:Ue=>A(c,JSON.stringify(Ue))});var Pe=S(ke,2),Oe=x(Pe);Kg(Oe,{get element(){return l(v)},get position(){return d},limit:{x:16,y:16},onchange:Ue=>A(s,JSON.stringify(Ue))}),y(ee,ae)};O(Y,ee=>{l(v)&&!a()&&ee(Q)})}var X=S(Y,2),te=x(X);ft(te,ee=>ze==null?void 0:ze(ee));var ne=S(te,2);{var Te=ee=>{var ae=j1();y(ee,ae)},Ce=ee=>{var ae=me(),ke=Z(ae);{var oe=Pe=>{var Oe=z1(),Ue=Z(Oe),ie=x(Ue),he=S(Ue,2);Ja(he,{onclick:()=>M(p,!0),size:"24px","aria-label":"Add manual injection",children:(ge,He)=>{var We=Je("+");y(ge,We)},$$slots:{default:!0}}),H(()=>{se(Ue,"aria-label",`${l(j).length??""} found playlinks`),J(ie,l(j).length)}),y(Pe,Oe)};O(ke,Pe=>{l(L)&&Pe(oe)},!0)}y(ee,ae)};O(ne,ee=>{a()?ee(Te):ee(Ce,!1)})}var ce=S(X,2);{var ue=ee=>{var ae=R1(),ke=Z(ae);y1(ke,{onallow:()=>M(f,!0),ondisallow:()=>M(f,!1),get ontakeover(){return o()},onpoll:ie=>{n(ie.injectionsEnabled),r({...r(),aiEnabled:ie.aiEnabled})}});var oe=S(ke,2);{var Pe=ie=>{{let he=U(()=>Ps(i()).aiInjections.length);E1(ie,En(r,{get aiInjectionsCount(){return l(he)}}))}};O(oe,ie=>{l(f)&&(l(z)||!l(P))&&ie(Pe)})}var Oe=S(oe,2);{var Ue=ie=>{var he=N1(),ge=Z(he);{var He=tt=>{var Xe=L1(),yi=x(Xe);Gi(yi,{type:"warning",children:(Ai,cl)=>{var on=A1();y(Ai,on)},$$slots:{default:!0}}),y(tt,Xe)};O(ge,tt=>{n()||tt(He)})}var We=S(ge,2);{var Bt=tt=>{var Xe=M1(),yi=x(Xe);Gi(yi,{children:(Ai,cl)=>{var on=Je("Something went wrong, check your links below.");y(Ai,on)},$$slots:{default:!0}}),Ae(7,Xe,()=>Ka,()=>({duration:150})),y(tt,Xe)};O(We,tt=>{l(g)&&tt(Bt)})}var zi=S(We,2);Le(zi,21,()=>l(V),tt=>tt.key,(tt,Xe)=>{const yi=U(()=>i().findIndex(Ai=>Ai.key===l(Xe).key));Wg(tt,{onremove:()=>F(l(Xe).key),onhighlight:N,get linkInjection(){return i()[l(yi)]},set linkInjection(Ai){i(i()[l(yi)]=Ai,!0)}})},tt=>{var Xe=q1();y(tt,Xe)});var bt=S(zi,2);{var Ft=tt=>{var Xe=D1();Xe.__click=E;var yi=x(Xe);H(()=>{Xe.disabled=l(h),J(yi,l(h)?"Saving...":"Save links")}),Ae(1,Xe,()=>Pt,()=>({duration:100})),y(tt,Xe)};O(bt,tt=>{l(C)&&i().length&&l(f)&&tt(Ft)})}y(ie,he)};O(Oe,ie=>{l(L)&&ie(Ue)})}y(ee,ae)};O(ce,ee=>{a()||ee(ue)})}var $=S(ce,2);{var de=ee=>{var ae=O1();let ke;var oe=x(ae);v1(oe,{onclose:()=>M(p,!1),onsave:Pe=>i().push(Pe)}),H(()=>ke=Ye(ae,"",ke,{top:`${l(_)??""}px`})),Ae(3,ae,()=>ya,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),y(ee,ae)};O($,ee=>{l(p)&&ee(de)})}$e(q,ee=>M(v,ee),()=>l(v)),H(()=>R=_e(q,1,"editor playpilot-styled-scrollbar svelte-7r3240",null,R,{"panel-open":l(p),loading:a()})),ye("scroll",q,W),y(t,q),le()}we(["click"]);var H1=Re('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 57.48 62.96"><defs><style>.playpilot-logo{fill:url(#playpilot-linear-gradient);}</style><linearGradient id="playpilot-linear-gradient" x1="-90.03" y1="-40.23" x2="-34.8" y2="-101.48" gradientTransform="translate(74.02 108.65)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#de00b9"></stop><stop offset="0.99" stop-color="#ff557b"></stop></linearGradient></defs><path class="playpilot-logo" d="M57.48,31.48C57.48,22.17,20.85,2.19,9.2.18,7.42-.12,3.78-.37,1.36,2.25-4.32,8.39,9.62,21.5,9.62,31.48S-4.32,54.57,1.36,60.72c2.42,2.61,6.06,2.37,7.84,2.06C20.85,60.78,57.48,40.79,57.48,31.48Z"></path></svg>');function V1(t){var e=H1();y(t,e)}var U1=T('<div class="trigger svelte-qpyyh0"><button type="button" class="button svelte-qpyyh0" title="Show PlayPilot TPI editor"><!></button> <button type="button" class="button close svelte-qpyyh0" title="Close PlayPilot TPI"><!></button></div>');function W1(t,e){var i=U1(),a=x(i);a.__click=function(...s){var c;(c=e.onclick)==null||c.apply(this,s)};var n=x(a);V1(n);var r=S(a,2);r.__click=function(...s){var c;(c=e.onclose)==null||c.apply(this,s)};var o=x(r);Ya(o,{}),y(t,i)}we(["click"]);function G1(t,e){re(e,!0);const i=100;let a=1;n();function n(){if(window.PlayPilotLinkInjections.require_consent===!1){r();return}if(!window.__tcfapi){a<i&&setTimeout(n,100),a++;return}window.__tcfapi("addEventListener",2,(o,s)=>{if(!s)return;const{purpose:c,eventStatus:d}=o;if(d!=="tcloaded"&&d!=="useractioncomplete")return;const u=v=>c.consents[v]===!0;Xd({ads:u(1),pixels:u(1)&&u(7),split_tests:u(9)&&u(10),tracking:u(7)&&u(8),affiliate:u(1)&&u(7)}),r()})}function r(){window.dispatchEvent(new CustomEvent("updateconsent",{bubbles:!0})),e.onchange()}le()}var K1=T('<span class="error svelte-1tp7i1s">The current URL is excluded via the config</span> <hr class="svelte-1tp7i1s"/>',1),Y1=T('<div class="item svelte-1tp7i1s"><span class="label"> </span>: <span class="data svelte-1tp7i1s"> </span></div>'),Z1=T('<details><summary class="svelte-1tp7i1s"> </summary> <!></details>'),J1=T('<button class="svelte-1tp7i1s"></button>'),Q1=T("<small>You are using the beta version of TPI</small>"),X1=T('<button class="svelte-1tp7i1s">Use beta script</button>'),$1=T('<button class="svelte-1tp7i1s">Toggle new explore</button>'),em=T("<option> </option>"),tm=T('<div class="debugger svelte-1tp7i1s"><strong>TPI Debugger</strong> <hr class="svelte-1tp7i1s"/> <!> <!> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Insert mock card ad</button> <button class="svelte-1tp7i1s">Insert mock top scroll ad</button> <hr class="svelte-1tp7i1s"/> <small>Force split test variant</small> <!> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Output elements in console</button> <button class="svelte-1tp7i1s">Output text in console</button> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Re-inject</button> <!> <!> <hr class="svelte-1tp7i1s"/> <div><small>Region</small> <input type="text" class="svelte-1tp7i1s"/></div> <div style="margin-top: 4px"><small>Language</small> <select class="svelte-1tp7i1s"></select></div> <hr class="svelte-1tp7i1s"/> <div class="form-group svelte-1tp7i1s"><small>Desktop rail size</small> <input type="range"/> <small> </small></div> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Open links as modal in explore</button> <button class="svelte-1tp7i1s">Open links as separate page in explore</button> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Close</button></div>');function im(t,e){re(e,!0);const i=["tpidebug","debugtpi"],a=[],n=!!document.querySelector('script[src*="scripts.playpilot.com/link-injection@next"]');let r=K(Fe(d())),o=K(!1),s=null,c=K(184);Cn(()=>{s&&clearInterval(s)});function d(){var L,C,j,V,z,I;const b=window.PlayPilotLinkInjections,P=((L=b.evaluated_link_injections)==null?void 0:L.filter(E=>!E.failed))||[],w=((C=b.evaluated_link_injections)==null?void 0:C.filter(E=>E.failed))||[],k=Array.from(document.querySelectorAll("[data-playpilot-pixel]"));return{Config:[{label:"Domain",data:b.domain_sid},{label:"Organization",data:b.organization_sid},{label:"HTML selector",data:b.selector}],"API Config":Object.entries(window.PlayPilotLinkInjections.config||{}).map(([E,A])=>({label:E,data:A})),[`Succesful injections (${P.length})`]:P.map(E=>({label:E.title,data:E.sentence})),[`Failed injections (${w.length})`]:w.map(E=>({label:E.title,data:`Reason: ${E.failed_message} | Sentence: ${E.sentence}`})),[`Fetched ads (${((j=b.ads)==null?void 0:j.length)||0})`]:(V=b.ads)==null?void 0:V.map(E=>({label:E.campaign_name,data:E})),[`Tracking events (${((z=b.tracked_events)==null?void 0:z.length)||0})`]:(I=b.tracked_events)==null?void 0:I.map(E=>({label:E.event,data:E.payload})),[`Visible pixels (${k.length})`]:k.map((E,A)=>({label:A+1,data:E.src}))}}function u(b){l(o)||(a.push(b.key),M(o,i.some(P=>a.slice(a.length-P.length,a.length).join("")===P),!0),s=setInterval(()=>M(r,d(),!0),200))}function v(b){window.PlayPilotLinkInjections.ads.unshift({campaign_format:b,campaign_type:"image",campaign_name:"some_campaign",content:{header:"Content header",subheader:"Content subheader"},cta:{header:"Cta header",subheader:"Cta subheader"},disclaimer:"Disclaimer"})}function p(b){window.PlayPilotLinkInjections.split_test_identifiers={},Object.values($r).forEach(({key:P,numberOfVariants:w})=>{const k=1/w;window.PlayPilotLinkInjections.split_test_identifiers[P]=Math.min(k*b,1)})}function h(){var w,k;const b=document.querySelector('script[src*="scripts.playpilot.com/link-injection"]');if(!b)return;(k=(w=window.PlayPilotLinkInjections)==null?void 0:w.destroy)==null||k.call(w);const P=document.createElement("script");for(const L of b.attributes)P.setAttribute(L.name,L.value);P.getAttribute("onload")||P.setAttribute("onload",`window.PlayPilotLinkInjections.initialize({ token: '${window.PlayPilotLinkInjections.token}' })`),P.src=b.src.replace("link-injection","link-injection@next"),b.insertAdjacentElement("afterend",P),b.remove()}var g=me();ye("keydown",Ee,u);var f=Z(g);{var _=b=>{var P=tm(),w=S(x(P),4);{var k=$=>{var de=K1();y($,de)};O(w,$=>{var de,ee,ae;(de=window.PlayPilotLinkInjections.config)!=null&&de.exclude_urls_pattern&&Hi().match((ae=(ee=window.PlayPilotLinkInjections)==null?void 0:ee.config)==null?void 0:ae.exclude_urls_pattern)&&$(k)})}var L=S(w,2);Le(L,17,()=>Object.entries(l(r)),qe,($,de)=>{var ee=U(()=>ta(l(de),2));let ae=()=>l(ee)[0],ke=()=>l(ee)[1];var oe=Z1(),Pe=x(oe),Oe=x(Pe),Ue=S(Pe,2);{var ie=ge=>{var He=me(),We=Z(He);{var Bt=zi=>{var bt=me(),Ft=Z(bt);Le(Ft,17,ke,qe,(tt,Xe,yi,Ai)=>{let cl=()=>l(Xe).label,on=()=>l(Xe).data;var Ns=Y1(),Rs=x(Ns),dm=x(Rs),um=S(Rs,2),vm=x(um);H(pm=>{J(dm,cl()),J(vm,pm)},[()=>JSON.stringify(on())]),y(tt,Ns)}),y(zi,bt)};O(We,zi=>{Array.isArray(ke())&&zi(Bt)})}y(ge,He)},he=ge=>{var He=Je("No data");y(ge,He)};O(Ue,ge=>{var He;(He=ke())!=null&&He.length?ge(ie):ge(he,!1)})}H(()=>J(Oe,ae())),y($,oe)});var C=S(L,4);C.__click=()=>v("card");var j=S(C,2);j.__click=()=>v("top_scroll");var V=S(j,6);Le(V,16,()=>({length:4}),qe,($,de,ee)=>{var ae=J1();ae.__click=()=>p(ee),ae.textContent=ee,y($,ae)});var z=S(V,4);z.__click=()=>console.log(ma(window.PlayPilotLinkInjections.config));var I=S(z,2);I.__click=()=>console.log(ma(window.PlayPilotLinkInjections.config).pageText);var E=S(I,4);E.__click=function(...$){var de;(de=e.onrerender)==null||de.apply(this,$)};var A=S(E,2);{var F=$=>{var de=Q1();y($,de)},N=$=>{var de=X1();de.__click=h,y($,de)};O(A,$=>{n?$(F):$(N,!1)})}var W=S(A,2);{var G=$=>{var de=$1();de.__click=()=>{Un(),window.PlayPilotLinkInjections.config.explore_use_router=!xa(),Vn()},y($,de)};O(W,$=>{xa()||$(G)})}var q=S(W,4),R=S(x(q),2);hd(R,window.PlayPilotLinkInjections.region),R.__change=$=>{Un(),window.PlayPilotLinkInjections.region=$.target.value,Vn()};var Y=S(q,2),Q=S(x(Y),2);Q.__change=$=>{Un(),window.PlayPilotLinkInjections.language=$.target.value,Vn()},Le(Q,21,()=>Object.entries(m),qe,($,de)=>{var ee=U(()=>ta(l(de),2));let ae=()=>l(ee)[0],ke=()=>l(ee)[1];var oe=em(),Pe=x(oe),Oe={};H(Ue=>{Co(oe,Ue),J(Pe,ae()),Oe!==(Oe=ke())&&(oe.value=(oe.__value=ke())??"")},[()=>ke()===Wa()]),y($,oe)});var X=S(Y,4),te=S(x(X),2);se(te,"min",80),se(te,"max",240),se(te,"step",8),te.__input=()=>document.body.style.setProperty("--playpilot-rail-size-flexible",`${l(c)}px`);var ne=S(te,2),Te=x(ne),Ce=S(X,4);Ce.__click=()=>localStorage.setItem("tpi-open-explore-as-modal","true");var ce=S(Ce,2);ce.__click=()=>localStorage.setItem("tpi-open-explore-as-modal","false");var ue=S(ce,4);ue.__click=()=>M(o,!1),H(()=>J(Te,l(c))),ha(te,()=>l(c),$=>M(c,$)),y(b,P)};O(f,b=>{l(o)&&b(_)})}y(t,g),le()}we(["click","change","input"]);function am(t,e){re(e,!1);const i=Array.from(document.querySelectorAll(gi)),a=[],n=Date.now();let r=!1,o=null;Qe(()=>{if(!In())return s(),()=>{var v;return(v=o==null?void 0:o.disconnect)==null?void 0:v.call(o)}});function s(){o=new IntersectionObserver(c),i.forEach(v=>{o.observe(v)})}function c(v){v.forEach(p=>{if(!p.isIntersecting)return;const h=p.target.getAttribute(hi);h&&a.push(h),o.unobserve(p.target)})}function d(){const{scrollHeight:v,scrollTop:p,clientHeight:h}=document.documentElement;return p/(v-h)*100}function u(){var p,h;if(r||document.visibilityState!=="hidden")return;r=!0;const v=Date.now();fe(pe.UserLeft,null,{time_start:n,time_end:v,time_spent:v-n,existing_injections_count:i.length,shown_injections_count:a.length,fired_events:((h=(p=window.PlayPilotLinkInjections)==null?void 0:p.tracked_events)==null?void 0:h.map(g=>g.event))||[],scroll_percentage:d()})}Ar(),ye("visibilitychange",Ee,u),le()}function nm(t,e){re(e,!0);const i=Array.from(document.querySelectorAll("[data-playpilot-poster-url]")),a=new Wn,n=.7,r="[data-playpilot-poster]";let o=K(0),s={},c=null;const d=U(()=>l(o)<pi);Cn(h);function u(){var w,k;if((k=(w=window.PlayPilotLinkInjections)==null?void 0:w.config)!=null&&k.disable_scroll_reveal_posters||!l(d))return;g();const f=window.innerHeight,_=new Wn,b=f*n,P=f-b;for(const L of i){const{top:C}=L.getBoundingClientRect();C<b&&C>P&&_.add(L)}for(const L of _){if(a.has(L))continue;const C=L.dataset.playpilotPosterUrl;C in s&&s[C]!==L||(v(L,C),a.add(L),s[C]=L)}}function v(f,_){const b=document.createElement("img");b.classList.add("playpilot-floating-poster"),b.dataset.playpilotPoster="",b.src=_,b.alt="",b.onload=()=>b.classList.add("loaded"),f.insertAdjacentElement("afterbegin",b)}function p(f){const _=f.querySelector(r);_&&(_.classList.add("animating-out"),setTimeout(()=>_.remove(),500))}function h(){for(const f of Array.from(document.querySelectorAll(r)))f.remove()}function g(){c&&clearTimeout(c),c=setTimeout(()=>{for(const f of a)p(f),a.delete(f),s={}},1e3)}ye("scroll",Ee,u),Ua("innerWidth",f=>M(o,f,!0)),le()}function rm(t,e){re(e,!0);const i=[];Qe(()=>{if(!Za())return;const n=new IntersectionObserver(r=>{r.forEach(o=>{if(!o.isIntersecting)return;n.unobserve(o.target);const s=o.target.getAttribute(hi),c=e.linkInjections.find(u=>u.key===s),d=c==null?void 0:c.title_details;!s||!c||!d||i.includes(d.sid)||a(d)})});return e.linkInjections.forEach(r=>{r.matchingElement&&n.observe(r.matchingElement)}),()=>n.disconnect()});function a({sid:n,genres:r,participants:o,providers:s,title:c}){i.push(n),$t(Dt.TitleInterest,{title:c,source:Ti.Link}),r.slice(0,3).forEach(d=>{var u;$t(Dt.GenreInterest,{genre:(u=Ln.find(v=>v.slug===d))==null?void 0:u.name,source:Ti.Link})}),o==null||o.slice(0,5).forEach(d=>{$t(Dt.ParticipantInterest,{participant:d.name,source:Ti.Link})}),s==null||s.forEach(d=>{$t(Dt.ProviderInterest,{provider:d.name,source:Ti.Link})})}le()}var lm=T("<!> <!>",1),om=T("<!> <!>",1),sm=T('<div class="playpilot-link-injections svelte-1uha8ag" data-playpilot-link-injections=""><!> <!></div> <!> <!> <!> <!>',1);function cm(t,e){re(e,!0);let i=K(null),a=K(Fe(In())),n=K(!!Dr()),r=K(!1),o=K(!0),s=K(!0),c=K(Fe([]));const d=U(()=>l(i)||{}),u=U(()=>ja(l(d).ai_injections,()=>[],!0)),v=U(()=>ja(l(d).manual_injections,()=>[],!0)),p=g();Ke(()=>{l(a)&&!l(o)&&f()}),Vn(),Cn(al);async function h(){An()||(await p,nu(),fe(pe.ArticlePageView),!(!l(u).length&&!l(v).length)&&(window.PlayPilotLinkInjections.no_affiliate||(window.PlayPilotLinkInjections.ads=await is())))}async function g(){var G;M(o,!0);try{l(a)&&M(r,await Bo({throwError:!0}),!0)}catch{fe(pe.AuthFailed)}try{const q=window.PlayPilotLinkInjections.config||await mg()||{};if(window.PlayPilotLinkInjections.config=q,q!=null&&q.custom_style&&w(q.custom_style||""),q!=null&&q.explore_navigation_selector&&yf(),q!=null&&q.no_affiliate&&(window.PlayPilotLinkInjections.no_affiliate=!0),q!=null&&q.domain_sid&&ts({organizationSid:q.organization_sid,domainSid:q.domain_sid}),M(s,Rd(q),!0),l(s))return;q!=null&&q.html_selector&&(window.PlayPilotLinkInjections.selector=q==null?void 0:q.html_selector)}catch(q){fe(pe.FetchingConfigFailed),console.error("TPI Config failed to fetch",q);return}try{if(M(i,await window.PlayPilotLinkInjections.initial_link_injections_promise||null,!0),M(i,l(i)||await Uo({maxTries:1,runAiWhenRelevant:!An()}),!0),M(o,!1),!l(i)||(G=window.PlayPilotLinkInjections.config)!=null&&G.disable_public_injections&&!(l(a)&&l(r)))return;if(ts({organizationSid:l(i).organization_sid,domainSid:l(i).domain_sid}),!l(i).ai_running||!l(i).ai_enabled){b({aiInjections:l(u),manualInjections:l(v)});return}if(!l(a)||An())return;M(i,await Uo({requireCompletedResult:!0,onpoll:q=>M(i,q,!0)}),!0),b({aiInjections:l(u),manualInjections:l(v)})}catch(q){console.error(q),fe(pe.InjectionError,null,{message:q.message})}}function f(){b(Ps(l(c)))}function _(){M(a,!1),requestAnimationFrame(()=>{M(a,!0),g()})}function b(G={aiInjections:l(u),manualInjections:l(v)}){const{elements:q}=ma(),R=rg(q,G);JSON.stringify(R)!==JSON.stringify(l(c))&&(M(c,R,!0),window.PlayPilotLinkInjections.evaluated_link_injections=R),l(a)||k(R)}function P(){M(a,!0),Ad(),g()}function w(G){const q="playpilot-custom-style",R=document.getElementById(q),Y=R||document.createElement("style");Y.textContent=`body { ${G} }`,Y.id=q,R||document.body.appendChild(Y)}function k(G){const q=G.filter(Y=>!Y.failed),R=G.filter(Y=>Y.failed);if(q.length&&fe(pe.ArticleInjected,null,{manual:q.filter(Y=>Y.manual).length,ai:q.filter(Y=>!Y.manual).length}),R.length){const Y=Q=>R.filter(({failed_message:X})=>X==null?void 0:X.includes(Q)).length;fe(pe.FailedInjectionsCount,null,{total:R.length,sentence_not_found:Y("sentence was not found"),already_linked:Y("already inside of a link"),broken_html:Y("broken HTML"),duplicate:Y("duplicate"),unknown:Y("unknown reasons")})}}var L=sm(),C=Z(L),j=x(C);{var V=G=>{var q=lm(),R=Z(q);{var Y=te=>{W1(te,{onclick:P,onclose:()=>{M(n,!1),zd()}})};O(R,te=>{!l(s)&&l(n)&&!l(a)&&te(Y)})}var Q=S(R,2);{var X=te=>{var ne=me(),Te=Z(ne);Nl(Te,{onerror:ce=>fe(pe.EditorError,null,{message:ce.message}),failed:ce=>{Gi(ce,{fixed:!0,children:(ue,$)=>{var de=Je("An error has occured in the PlayPilot Linkinjections editor view. We've been notified and will investigate!");y(ue,de)},$$slots:{default:!0}})}},ce=>{{let ue=U(()=>{var de;return(de=l(i))==null?void 0:de.injections_enabled}),$=U(()=>{var de,ee,ae,ke,oe;return{aiEnabled:(de=l(i))==null?void 0:de.ai_enabled,aiRunning:((ee=l(i))==null?void 0:ee.ai_running)&&((ae=l(i))==null?void 0:ae.ai_enabled),message:(ke=l(i))==null?void 0:ke.ai_progress_message,percentage:(oe=l(i))==null?void 0:oe.ai_progress_percentage}});F1(ce,{get loading(){return l(o)},onreinitialize:_,get injectionsEnabled(){return l(ue)},get aiStatus(){return l($)},get linkInjections(){return l(c)},set linkInjections(de){M(c,de,!0)}})}}),y(te,ne)};O(Q,te=>{!l(s)&&l(a)&&l(r)&&te(X)})}y(G,q)};O(j,G=>{G(V)})}var z=S(j,2);im(z,{onrerender:f});var I=S(C,2);{var E=G=>{Kr(G,{get pixels(){return l(i).pixels}})};O(I,G=>{var q,R;(R=(q=l(i))==null?void 0:q.pixels)!=null&&R.length&&G(E)})}var A=S(I,2);{var F=G=>{rm(G,{get linkInjections(){return l(c)}})};O(A,G=>{l(c).length&&G(F)})}var N=S(A,2);va(N,()=>l(c),G=>{var q=om(),R=Z(q);am(R,{});var Y=S(R,2);nm(Y,{}),y(G,q)});var W=S(N,2);G1(W,{onchange:h}),y(t,L),le()}window.PlayPilotMount={mount(){if(window.PlayPilotLinkInjections.app)return;const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),window.PlayPilotLinkInjections.app=Mt(cm,{target:t})},destroy(){if(!window.PlayPilotLinkInjections)return;window.PlayPilotLinkInjections.app=null;const t=document.getElementById("playpilot-link-injection");t&&t.remove(),al()}}})();
|
|
12
|
+
Publish playlinks from the <a href="https://partner.playpilot.net">Partner Portal.</a>`,1),L1=T('<div class="alert svelte-7r3240"><!></div>'),M1=T('<div class="error svelte-7r3240"><!></div>'),q1=T('<div class="empty svelte-7r3240">No links available. Add links manually by clicking the + button and select text to add a link to.</div>'),D1=T('<button class="save svelte-7r3240"> </button>'),N1=T('<!> <!> <div class="items svelte-7r3240"></div> <!>',1),R1=T("<!> <!> <!>",1),O1=T('<div class="panel playpilot-styled-scrollbar svelte-7r3240"><!></div>'),B1=T('<section><!> <header class="header svelte-7r3240"><div class="heading svelte-7r3240">Playlinks</div> <!></header> <!> <!></section>');function F1(t,e){re(e,!0);let i=D(e,"linkInjections",15),a=D(e,"loading",3,!1),n=D(e,"injectionsEnabled",7,!1),r=D(e,"aiStatus",23,()=>({})),o=D(e,"onreinitialize",3,()=>null);const s="editor-position",c="editor-height",d=JSON.parse(localStorage.getItem(s)||'{ "x": 0, "y": 0 }'),u=parseInt(localStorage.getItem(c)||"0");let v=K(null),p=K(!1),h=K(!1),g=K(!1),f=K(!0),_=K(0),b=K("");const P=U(()=>ja(r().aiEnabled,!1)),w=U(()=>ja(r().aiRunning,!1)),k=U(()=>JSON.stringify(i())),L=U(()=>!l(w)&&l(f)),C=U(()=>l(b)&&l(b)!==l(k)),j=U(()=>i().filter(ee=>ee.title_details&&!ee.removed&&!ee.duplicate&&(ee.manual||!ee.manual&&!ee.failed))),V=U(()=>I(l(j))),z=U(()=>!a()&&kt(()=>r().aiRunning));Ke(()=>{a()||kt(()=>{requestAnimationFrame(()=>M(b,l(k),!0)),G()})});function I(ee){return ee.sort((ae,ke)=>ae.failed!==ke.failed?ae.failed?1:-1:ae.title_details.title.localeCompare(ke.title_details.title))}async function E(){try{M(h,!0),M(g,!1),i(await Bd(i())),M(b,l(k),!0)}catch{M(g,!0)}finally{M(h,!1)}}function A(ee,ae){localStorage.setItem(ee,ae)}function F(ee){const ae=i().findIndex(ke=>ke.key===ee);i(i()[ae].manual=!0,!0),i(i()[ae].removed=!0,!0),i([...i()])}function N(ee){if(!l(v))return;const ae=ee.offsetTop,ke=ae+ee.offsetHeight,oe=l(v).scrollTop,Pe=oe+l(v).clientHeight;ae>=oe&&ke<=Pe||l(v).scrollTo({top:ae-l(v).clientHeight/2,behavior:"smooth"})}function W(ee){const ae=ee.target;M(_,ae.scrollTop,!0)}function G(){const ee={total:i().length,failed_automatic:i().filter(ae=>ae.failed&&!ae.manual).length,failed_manual:i().filter(ae=>ae.failed&&ae.manual).length,final_injected:l(j).length};fe(pe.TotalInjectionsCount,null,ee)}var q=B1();cd("7r3240",ee=>{var ae=C1();y(ee,ae)});let R;var Y=x(q);{var Q=ee=>{var ae=I1(),ke=x(ae),oe=x(ke);Zg(oe,{get element(){return l(v)},get height(){return u},onchange:Ue=>A(c,JSON.stringify(Ue))});var Pe=S(ke,2),Oe=x(Pe);Kg(Oe,{get element(){return l(v)},get position(){return d},limit:{x:16,y:16},onchange:Ue=>A(s,JSON.stringify(Ue))}),y(ee,ae)};O(Y,ee=>{l(v)&&!a()&&ee(Q)})}var X=S(Y,2),te=x(X);ft(te,ee=>ze==null?void 0:ze(ee));var ne=S(te,2);{var Te=ee=>{var ae=j1();y(ee,ae)},Ce=ee=>{var ae=me(),ke=Z(ae);{var oe=Pe=>{var Oe=z1(),Ue=Z(Oe),ie=x(Ue),he=S(Ue,2);Ja(he,{onclick:()=>M(p,!0),size:"24px","aria-label":"Add manual injection",children:(ge,He)=>{var We=Je("+");y(ge,We)},$$slots:{default:!0}}),H(()=>{se(Ue,"aria-label",`${l(j).length??""} found playlinks`),J(ie,l(j).length)}),y(Pe,Oe)};O(ke,Pe=>{l(L)&&Pe(oe)},!0)}y(ee,ae)};O(ne,ee=>{a()?ee(Te):ee(Ce,!1)})}var ce=S(X,2);{var ue=ee=>{var ae=R1(),ke=Z(ae);y1(ke,{onallow:()=>M(f,!0),ondisallow:()=>M(f,!1),get ontakeover(){return o()},onpoll:ie=>{n(ie.injectionsEnabled),r({...r(),aiEnabled:ie.aiEnabled})}});var oe=S(ke,2);{var Pe=ie=>{{let he=U(()=>Ps(i()).aiInjections.length);E1(ie,En(r,{get aiInjectionsCount(){return l(he)}}))}};O(oe,ie=>{l(f)&&(l(z)||!l(P))&&ie(Pe)})}var Oe=S(oe,2);{var Ue=ie=>{var he=N1(),ge=Z(he);{var He=tt=>{var Xe=L1(),yi=x(Xe);Gi(yi,{type:"warning",children:(Ai,cl)=>{var on=A1();y(Ai,on)},$$slots:{default:!0}}),y(tt,Xe)};O(ge,tt=>{n()||tt(He)})}var We=S(ge,2);{var Bt=tt=>{var Xe=M1(),yi=x(Xe);Gi(yi,{children:(Ai,cl)=>{var on=Je("Something went wrong, check your links below.");y(Ai,on)},$$slots:{default:!0}}),Ae(7,Xe,()=>Ka,()=>({duration:150})),y(tt,Xe)};O(We,tt=>{l(g)&&tt(Bt)})}var zi=S(We,2);Le(zi,21,()=>l(V),tt=>tt.key,(tt,Xe)=>{const yi=U(()=>i().findIndex(Ai=>Ai.key===l(Xe).key));Wg(tt,{onremove:()=>F(l(Xe).key),onhighlight:N,get linkInjection(){return i()[l(yi)]},set linkInjection(Ai){i(i()[l(yi)]=Ai,!0)}})},tt=>{var Xe=q1();y(tt,Xe)});var bt=S(zi,2);{var Ft=tt=>{var Xe=D1();Xe.__click=E;var yi=x(Xe);H(()=>{Xe.disabled=l(h),J(yi,l(h)?"Saving...":"Save links")}),Ae(1,Xe,()=>Pt,()=>({duration:100})),y(tt,Xe)};O(bt,tt=>{l(C)&&i().length&&l(f)&&tt(Ft)})}y(ie,he)};O(Oe,ie=>{l(L)&&ie(Ue)})}y(ee,ae)};O(ce,ee=>{a()||ee(ue)})}var $=S(ce,2);{var de=ee=>{var ae=O1();let ke;var oe=x(ae);v1(oe,{onclose:()=>M(p,!1),onsave:Pe=>i().push(Pe)}),H(()=>ke=Ye(ae,"",ke,{top:`${l(_)??""}px`})),Ae(3,ae,()=>ya,()=>({x:Math.min(window.innerWidth,320),duration:200,opacity:1})),y(ee,ae)};O($,ee=>{l(p)&&ee(de)})}$e(q,ee=>M(v,ee),()=>l(v)),H(()=>R=_e(q,1,"editor playpilot-styled-scrollbar svelte-7r3240",null,R,{"panel-open":l(p),loading:a()})),ye("scroll",q,W),y(t,q),le()}we(["click"]);var H1=Re('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 57.48 62.96"><defs><style>.playpilot-logo{fill:url(#playpilot-linear-gradient);}</style><linearGradient id="playpilot-linear-gradient" x1="-90.03" y1="-40.23" x2="-34.8" y2="-101.48" gradientTransform="translate(74.02 108.65)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#de00b9"></stop><stop offset="0.99" stop-color="#ff557b"></stop></linearGradient></defs><path class="playpilot-logo" d="M57.48,31.48C57.48,22.17,20.85,2.19,9.2.18,7.42-.12,3.78-.37,1.36,2.25-4.32,8.39,9.62,21.5,9.62,31.48S-4.32,54.57,1.36,60.72c2.42,2.61,6.06,2.37,7.84,2.06C20.85,60.78,57.48,40.79,57.48,31.48Z"></path></svg>');function V1(t){var e=H1();y(t,e)}var U1=T('<div class="trigger svelte-qpyyh0"><button type="button" class="button svelte-qpyyh0" title="Show PlayPilot TPI editor"><!></button> <button type="button" class="button close svelte-qpyyh0" title="Close PlayPilot TPI"><!></button></div>');function W1(t,e){var i=U1(),a=x(i);a.__click=function(...s){var c;(c=e.onclick)==null||c.apply(this,s)};var n=x(a);V1(n);var r=S(a,2);r.__click=function(...s){var c;(c=e.onclose)==null||c.apply(this,s)};var o=x(r);Ya(o,{}),y(t,i)}we(["click"]);function G1(t,e){re(e,!0);const i=100;let a=1;n();function n(){if(window.PlayPilotLinkInjections.require_consent===!1){r();return}if(!window.__tcfapi){a<i&&setTimeout(n,100),a++;return}window.__tcfapi("addEventListener",2,(o,s)=>{if(!s)return;const{purpose:c,eventStatus:d}=o;if(d!=="tcloaded"&&d!=="useractioncomplete")return;const u=v=>c.consents[v]===!0;Xd({ads:u(1),pixels:u(1)&&u(7),split_tests:u(9)&&u(10),tracking:u(7)&&u(8),affiliate:u(1)&&u(7)}),r()})}function r(){window.dispatchEvent(new CustomEvent("updateconsent",{bubbles:!0})),e.onchange()}le()}var K1=T('<span class="error svelte-1tp7i1s">The current URL is excluded via the config</span> <hr class="svelte-1tp7i1s"/>',1),Y1=T('<div class="item svelte-1tp7i1s"><span class="label"> </span>: <span class="data svelte-1tp7i1s"> </span></div>'),Z1=T('<details><summary class="svelte-1tp7i1s"> </summary> <!></details>'),J1=T('<button class="svelte-1tp7i1s"></button>'),Q1=T("<small>You are using the beta version of TPI</small>"),X1=T('<button class="svelte-1tp7i1s">Use beta script</button>'),$1=T('<button class="svelte-1tp7i1s">Toggle new explore</button>'),em=T("<option> </option>"),tm=T('<div class="debugger svelte-1tp7i1s"><strong>TPI Debugger</strong> <hr class="svelte-1tp7i1s"/> <!> <!> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Insert mock card ad</button> <button class="svelte-1tp7i1s">Insert mock top scroll ad</button> <hr class="svelte-1tp7i1s"/> <small>Force split test variant</small> <!> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Output elements in console</button> <button class="svelte-1tp7i1s">Output text in console</button> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Re-inject</button> <!> <!> <hr class="svelte-1tp7i1s"/> <div><small>Region</small> <input type="text" class="svelte-1tp7i1s"/></div> <div style="margin-top: 4px"><small>Language</small> <select class="svelte-1tp7i1s"></select></div> <hr class="svelte-1tp7i1s"/> <div class="form-group svelte-1tp7i1s"><small>Desktop rail size</small> <input type="range"/> <small> </small></div> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Open links as modal in explore</button> <button class="svelte-1tp7i1s">Open links as separate page in explore</button> <hr class="svelte-1tp7i1s"/> <button class="svelte-1tp7i1s">Close</button></div>');function im(t,e){re(e,!0);const i=["tpidebug","debugtpi"],a=[],n=!!document.querySelector('script[src*="scripts.playpilot.com/link-injection@next"]');let r=K(Fe(d())),o=K(!1),s=null,c=K(184);Cn(()=>{s&&clearInterval(s)});function d(){var L,C,j,V,z,I;const b=window.PlayPilotLinkInjections,P=((L=b.evaluated_link_injections)==null?void 0:L.filter(E=>!E.failed))||[],w=((C=b.evaluated_link_injections)==null?void 0:C.filter(E=>E.failed))||[],k=Array.from(document.querySelectorAll("[data-playpilot-pixel]"));return{Config:[{label:"Domain",data:b.domain_sid},{label:"Organization",data:b.organization_sid},{label:"HTML selector",data:b.selector}],"API Config":Object.entries(window.PlayPilotLinkInjections.config||{}).map(([E,A])=>({label:E,data:A})),[`Succesful injections (${P.length})`]:P.map(E=>({label:E.title,data:E.sentence})),[`Failed injections (${w.length})`]:w.map(E=>({label:E.title,data:`Reason: ${E.failed_message} | Sentence: ${E.sentence}`})),[`Fetched ads (${((j=b.ads)==null?void 0:j.length)||0})`]:(V=b.ads)==null?void 0:V.map(E=>({label:E.campaign_name,data:E})),[`Tracking events (${((z=b.tracked_events)==null?void 0:z.length)||0})`]:(I=b.tracked_events)==null?void 0:I.map(E=>({label:E.event,data:E.payload})),[`Visible pixels (${k.length})`]:k.map((E,A)=>({label:A+1,data:E.src}))}}function u(b){l(o)||(a.push(b.key),M(o,i.some(P=>a.slice(a.length-P.length,a.length).join("")===P),!0),s=setInterval(()=>M(r,d(),!0),200))}function v(b){window.PlayPilotLinkInjections.ads.unshift({campaign_format:b,campaign_type:"image",campaign_name:"some_campaign",content:{header:"Content header",subheader:"Content subheader"},cta:{header:"Cta header",subheader:"Cta subheader"},disclaimer:"Disclaimer"})}function p(b){window.PlayPilotLinkInjections.split_test_identifiers={},Object.values($r).forEach(({key:P,numberOfVariants:w})=>{const k=1/w;window.PlayPilotLinkInjections.split_test_identifiers[P]=Math.min(k*b,1)})}function h(){var w,k;const b=document.querySelector('script[src*="scripts.playpilot.com/link-injection"]');if(!b)return;(k=(w=window.PlayPilotLinkInjections)==null?void 0:w.destroy)==null||k.call(w);const P=document.createElement("script");for(const L of b.attributes)P.setAttribute(L.name,L.value);P.getAttribute("onload")||P.setAttribute("onload",`window.PlayPilotLinkInjections.initialize({ token: '${window.PlayPilotLinkInjections.token}' })`),P.src=b.src.replace("link-injection","link-injection@next"),b.insertAdjacentElement("afterend",P),b.remove()}var g=me();ye("keydown",Ee,u);var f=Z(g);{var _=b=>{var P=tm(),w=S(x(P),4);{var k=$=>{var de=K1();y($,de)};O(w,$=>{var de,ee,ae;(de=window.PlayPilotLinkInjections.config)!=null&&de.exclude_urls_pattern&&Hi().match((ae=(ee=window.PlayPilotLinkInjections)==null?void 0:ee.config)==null?void 0:ae.exclude_urls_pattern)&&$(k)})}var L=S(w,2);Le(L,17,()=>Object.entries(l(r)),qe,($,de)=>{var ee=U(()=>ta(l(de),2));let ae=()=>l(ee)[0],ke=()=>l(ee)[1];var oe=Z1(),Pe=x(oe),Oe=x(Pe),Ue=S(Pe,2);{var ie=ge=>{var He=me(),We=Z(He);{var Bt=zi=>{var bt=me(),Ft=Z(bt);Le(Ft,17,ke,qe,(tt,Xe,yi,Ai)=>{let cl=()=>l(Xe).label,on=()=>l(Xe).data;var Ns=Y1(),Rs=x(Ns),dm=x(Rs),um=S(Rs,2),vm=x(um);H(pm=>{J(dm,cl()),J(vm,pm)},[()=>JSON.stringify(on())]),y(tt,Ns)}),y(zi,bt)};O(We,zi=>{Array.isArray(ke())&&zi(Bt)})}y(ge,He)},he=ge=>{var He=Je("No data");y(ge,He)};O(Ue,ge=>{var He;(He=ke())!=null&&He.length?ge(ie):ge(he,!1)})}H(()=>J(Oe,ae())),y($,oe)});var C=S(L,4);C.__click=()=>v("card");var j=S(C,2);j.__click=()=>v("top_scroll");var V=S(j,6);Le(V,16,()=>({length:4}),qe,($,de,ee)=>{var ae=J1();ae.__click=()=>p(ee),ae.textContent=ee,y($,ae)});var z=S(V,4);z.__click=()=>console.log(ma(window.PlayPilotLinkInjections.config));var I=S(z,2);I.__click=()=>console.log(ma(window.PlayPilotLinkInjections.config).pageText);var E=S(I,4);E.__click=function(...$){var de;(de=e.onrerender)==null||de.apply(this,$)};var A=S(E,2);{var F=$=>{var de=Q1();y($,de)},N=$=>{var de=X1();de.__click=h,y($,de)};O(A,$=>{n?$(F):$(N,!1)})}var W=S(A,2);{var G=$=>{var de=$1();de.__click=()=>{Un(),window.PlayPilotLinkInjections.config.explore_use_router=!xa(),Vn()},y($,de)};O(W,$=>{xa()||$(G)})}var q=S(W,4),R=S(x(q),2);hd(R,window.PlayPilotLinkInjections.region),R.__change=$=>{Un(),window.PlayPilotLinkInjections.region=$.target.value,Vn()};var Y=S(q,2),Q=S(x(Y),2);Q.__change=$=>{Un(),window.PlayPilotLinkInjections.language=$.target.value,Vn()},Le(Q,21,()=>Object.entries(m),qe,($,de)=>{var ee=U(()=>ta(l(de),2));let ae=()=>l(ee)[0],ke=()=>l(ee)[1];var oe=em(),Pe=x(oe),Oe={};H(Ue=>{Co(oe,Ue),J(Pe,ae()),Oe!==(Oe=ke())&&(oe.value=(oe.__value=ke())??"")},[()=>ke()===Wa()]),y($,oe)});var X=S(Y,4),te=S(x(X),2);se(te,"min",80),se(te,"max",240),se(te,"step",8),te.__input=()=>document.body.style.setProperty("--playpilot-rail-size-flexible",`${l(c)}px`);var ne=S(te,2),Te=x(ne),Ce=S(X,4);Ce.__click=()=>{localStorage.setItem("tpi-open-explore-as-modal","true"),e.onrerender()};var ce=S(Ce,2);ce.__click=()=>{localStorage.setItem("tpi-open-explore-as-modal","false"),e.onrerender()};var ue=S(ce,4);ue.__click=()=>M(o,!1),H(()=>J(Te,l(c))),ha(te,()=>l(c),$=>M(c,$)),y(b,P)};O(f,b=>{l(o)&&b(_)})}y(t,g),le()}we(["click","change","input"]);function am(t,e){re(e,!1);const i=Array.from(document.querySelectorAll(gi)),a=[],n=Date.now();let r=!1,o=null;Qe(()=>{if(!In())return s(),()=>{var v;return(v=o==null?void 0:o.disconnect)==null?void 0:v.call(o)}});function s(){o=new IntersectionObserver(c),i.forEach(v=>{o.observe(v)})}function c(v){v.forEach(p=>{if(!p.isIntersecting)return;const h=p.target.getAttribute(hi);h&&a.push(h),o.unobserve(p.target)})}function d(){const{scrollHeight:v,scrollTop:p,clientHeight:h}=document.documentElement;return p/(v-h)*100}function u(){var p,h;if(r||document.visibilityState!=="hidden")return;r=!0;const v=Date.now();fe(pe.UserLeft,null,{time_start:n,time_end:v,time_spent:v-n,existing_injections_count:i.length,shown_injections_count:a.length,fired_events:((h=(p=window.PlayPilotLinkInjections)==null?void 0:p.tracked_events)==null?void 0:h.map(g=>g.event))||[],scroll_percentage:d()})}Ar(),ye("visibilitychange",Ee,u),le()}function nm(t,e){re(e,!0);const i=Array.from(document.querySelectorAll("[data-playpilot-poster-url]")),a=new Wn,n=.7,r="[data-playpilot-poster]";let o=K(0),s={},c=null;const d=U(()=>l(o)<pi);Cn(h);function u(){var w,k;if((k=(w=window.PlayPilotLinkInjections)==null?void 0:w.config)!=null&&k.disable_scroll_reveal_posters||!l(d))return;g();const f=window.innerHeight,_=new Wn,b=f*n,P=f-b;for(const L of i){const{top:C}=L.getBoundingClientRect();C<b&&C>P&&_.add(L)}for(const L of _){if(a.has(L))continue;const C=L.dataset.playpilotPosterUrl;C in s&&s[C]!==L||(v(L,C),a.add(L),s[C]=L)}}function v(f,_){const b=document.createElement("img");b.classList.add("playpilot-floating-poster"),b.dataset.playpilotPoster="",b.src=_,b.alt="",b.onload=()=>b.classList.add("loaded"),f.insertAdjacentElement("afterbegin",b)}function p(f){const _=f.querySelector(r);_&&(_.classList.add("animating-out"),setTimeout(()=>_.remove(),500))}function h(){for(const f of Array.from(document.querySelectorAll(r)))f.remove()}function g(){c&&clearTimeout(c),c=setTimeout(()=>{for(const f of a)p(f),a.delete(f),s={}},1e3)}ye("scroll",Ee,u),Ua("innerWidth",f=>M(o,f,!0)),le()}function rm(t,e){re(e,!0);const i=[];Qe(()=>{if(!Za())return;const n=new IntersectionObserver(r=>{r.forEach(o=>{if(!o.isIntersecting)return;n.unobserve(o.target);const s=o.target.getAttribute(hi),c=e.linkInjections.find(u=>u.key===s),d=c==null?void 0:c.title_details;!s||!c||!d||i.includes(d.sid)||a(d)})});return e.linkInjections.forEach(r=>{r.matchingElement&&n.observe(r.matchingElement)}),()=>n.disconnect()});function a({sid:n,genres:r,participants:o,providers:s,title:c}){i.push(n),$t(Dt.TitleInterest,{title:c,source:Ti.Link}),r.slice(0,3).forEach(d=>{var u;$t(Dt.GenreInterest,{genre:(u=Ln.find(v=>v.slug===d))==null?void 0:u.name,source:Ti.Link})}),o==null||o.slice(0,5).forEach(d=>{$t(Dt.ParticipantInterest,{participant:d.name,source:Ti.Link})}),s==null||s.forEach(d=>{$t(Dt.ProviderInterest,{provider:d.name,source:Ti.Link})})}le()}var lm=T("<!> <!>",1),om=T("<!> <!>",1),sm=T('<div class="playpilot-link-injections svelte-1uha8ag" data-playpilot-link-injections=""><!> <!></div> <!> <!> <!> <!>',1);function cm(t,e){re(e,!0);let i=K(null),a=K(Fe(In())),n=K(!!Dr()),r=K(!1),o=K(!0),s=K(!0),c=K(Fe([]));const d=U(()=>l(i)||{}),u=U(()=>ja(l(d).ai_injections,()=>[],!0)),v=U(()=>ja(l(d).manual_injections,()=>[],!0)),p=g();Ke(()=>{l(a)&&!l(o)&&f()}),Vn(),Cn(al);async function h(){An()||(await p,nu(),fe(pe.ArticlePageView),!(!l(u).length&&!l(v).length)&&(window.PlayPilotLinkInjections.no_affiliate||(window.PlayPilotLinkInjections.ads=await is())))}async function g(){var G;M(o,!0);try{l(a)&&M(r,await Bo({throwError:!0}),!0)}catch{fe(pe.AuthFailed)}try{const q=window.PlayPilotLinkInjections.config||await mg()||{};if(window.PlayPilotLinkInjections.config=q,q!=null&&q.custom_style&&w(q.custom_style||""),q!=null&&q.explore_navigation_selector&&yf(),q!=null&&q.no_affiliate&&(window.PlayPilotLinkInjections.no_affiliate=!0),q!=null&&q.domain_sid&&ts({organizationSid:q.organization_sid,domainSid:q.domain_sid}),M(s,Rd(q),!0),l(s))return;q!=null&&q.html_selector&&(window.PlayPilotLinkInjections.selector=q==null?void 0:q.html_selector)}catch(q){fe(pe.FetchingConfigFailed),console.error("TPI Config failed to fetch",q);return}try{if(M(i,await window.PlayPilotLinkInjections.initial_link_injections_promise||null,!0),M(i,l(i)||await Uo({maxTries:1,runAiWhenRelevant:!An()}),!0),M(o,!1),!l(i)||(G=window.PlayPilotLinkInjections.config)!=null&&G.disable_public_injections&&!(l(a)&&l(r)))return;if(ts({organizationSid:l(i).organization_sid,domainSid:l(i).domain_sid}),!l(i).ai_running||!l(i).ai_enabled){b({aiInjections:l(u),manualInjections:l(v)});return}if(!l(a)||An())return;M(i,await Uo({requireCompletedResult:!0,onpoll:q=>M(i,q,!0)}),!0),b({aiInjections:l(u),manualInjections:l(v)})}catch(q){console.error(q),fe(pe.InjectionError,null,{message:q.message})}}function f(){b(Ps(l(c)))}function _(){M(a,!1),requestAnimationFrame(()=>{M(a,!0),g()})}function b(G={aiInjections:l(u),manualInjections:l(v)}){const{elements:q}=ma(),R=rg(q,G);JSON.stringify(R)!==JSON.stringify(l(c))&&(M(c,R,!0),window.PlayPilotLinkInjections.evaluated_link_injections=R),l(a)||k(R)}function P(){M(a,!0),Ad(),g()}function w(G){const q="playpilot-custom-style",R=document.getElementById(q),Y=R||document.createElement("style");Y.textContent=`body { ${G} }`,Y.id=q,R||document.body.appendChild(Y)}function k(G){const q=G.filter(Y=>!Y.failed),R=G.filter(Y=>Y.failed);if(q.length&&fe(pe.ArticleInjected,null,{manual:q.filter(Y=>Y.manual).length,ai:q.filter(Y=>!Y.manual).length}),R.length){const Y=Q=>R.filter(({failed_message:X})=>X==null?void 0:X.includes(Q)).length;fe(pe.FailedInjectionsCount,null,{total:R.length,sentence_not_found:Y("sentence was not found"),already_linked:Y("already inside of a link"),broken_html:Y("broken HTML"),duplicate:Y("duplicate"),unknown:Y("unknown reasons")})}}var L=sm(),C=Z(L),j=x(C);{var V=G=>{var q=lm(),R=Z(q);{var Y=te=>{W1(te,{onclick:P,onclose:()=>{M(n,!1),zd()}})};O(R,te=>{!l(s)&&l(n)&&!l(a)&&te(Y)})}var Q=S(R,2);{var X=te=>{var ne=me(),Te=Z(ne);Nl(Te,{onerror:ce=>fe(pe.EditorError,null,{message:ce.message}),failed:ce=>{Gi(ce,{fixed:!0,children:(ue,$)=>{var de=Je("An error has occured in the PlayPilot Linkinjections editor view. We've been notified and will investigate!");y(ue,de)},$$slots:{default:!0}})}},ce=>{{let ue=U(()=>{var de;return(de=l(i))==null?void 0:de.injections_enabled}),$=U(()=>{var de,ee,ae,ke,oe;return{aiEnabled:(de=l(i))==null?void 0:de.ai_enabled,aiRunning:((ee=l(i))==null?void 0:ee.ai_running)&&((ae=l(i))==null?void 0:ae.ai_enabled),message:(ke=l(i))==null?void 0:ke.ai_progress_message,percentage:(oe=l(i))==null?void 0:oe.ai_progress_percentage}});F1(ce,{get loading(){return l(o)},onreinitialize:_,get injectionsEnabled(){return l(ue)},get aiStatus(){return l($)},get linkInjections(){return l(c)},set linkInjections(de){M(c,de,!0)}})}}),y(te,ne)};O(Q,te=>{!l(s)&&l(a)&&l(r)&&te(X)})}y(G,q)};O(j,G=>{G(V)})}var z=S(j,2);im(z,{onrerender:f});var I=S(C,2);{var E=G=>{Kr(G,{get pixels(){return l(i).pixels}})};O(I,G=>{var q,R;(R=(q=l(i))==null?void 0:q.pixels)!=null&&R.length&&G(E)})}var A=S(I,2);{var F=G=>{rm(G,{get linkInjections(){return l(c)}})};O(A,G=>{l(c).length&&G(F)})}var N=S(A,2);va(N,()=>l(c),G=>{var q=om(),R=Z(q);am(R,{});var Y=S(R,2);nm(Y,{}),y(G,q)});var W=S(N,2);G1(W,{onchange:h}),y(t,L),le()}window.PlayPilotMount={mount(){if(window.PlayPilotLinkInjections.app)return;const t=document.createElement("div");t.id="playpilot-link-injection",document.body.insertAdjacentElement("beforeend",t),window.PlayPilotLinkInjections.app=Mt(cm,{target:t})},destroy(){if(!window.PlayPilotLinkInjections)return;window.PlayPilotLinkInjections.app=null;const t=document.getElementById("playpilot-link-injection");t&&t.remove(),al()}}})();
|