import{t as x,a as A}from"./index.sSacEXvw.js";import{L as J}from"./scheduler.GzrM6dJQ.js";import{r as N,w as m}from"./paths.Tws_In4f.js";function F(e){return(e==null?void 0:e.length)!==void 0?e:Array.from(e)}function G(e,l){x(e,1,1,()=>{l.delete(e.key)})}function H(e,l,i,u,h,w,c,g,f,p,v,d){let t=e.length,n=w.length,o=t;const L={};for(;o--;)L[e[o].key]=o;const b=[],S=new Map,_=new Map,z=[];for(o=n;o--;){const s=d(h,w,o),a=i(s);let r=c.get(a);r?u&&z.push(()=>r.p(s,l)):(r=p(a,s),r.c()),S.set(a,b[o]=r),a in L&&_.set(a,Math.abs(o-L[a]))}const I=new Set,j=new Set;function E(s){A(s,1),s.m(g,v),c.set(s.key,s),v=s.first,n--}for(;t&&n;){const s=b[n-1],a=e[t-1],r=s.key,y=a.key;s===a?(v=s.first,t--,n--):S.has(y)?!c.has(r)||I.has(r)?E(s):j.has(y)?t--:_.get(r)>_.get(y)?(j.add(r),E(s)):(I.add(y),t--):(f(a,c),t--)}for(;t--;){const s=e[t];S.has(s.key)||f(s,c)}for(;n;)E(b[n-1]);return J(z),b}const O=e=>N(window.matchMedia(e).matches,l=>{const i=window.matchMedia(e),u=h=>l(h.matches);return i.addEventListener("change",u),()=>i.removeEventListener("change",u)}),K=m(!1),Q=m(!1),P=m(!1);Q.subscribe(e=>{e?document.documentElement.style.overflow="hidden":document.documentElement.style.overflow=""});const R=O("(prefers-reduced-motion: reduce)");var M={};function T(e){return e==="local"?localStorage:sessionStorage}function q(e,l,i){const u=(i==null?void 0:i.serializer)??JSON,h=(i==null?void 0:i.storage)??"local",w=typeof window<"u"&&typeof document<"u",c=w?T(h):null;function g(f,p){c==null||c.setItem(f,u.stringify(p))}if(!M[e]){const f=m(l,d=>{const t=c==null?void 0:c.getItem(e);if(t?d(u.parse(t)):g(e,l),w){const n=o=>{o.key===e&&d(o.newValue?u.parse(o.newValue):null)};return window.addEventListener("storage",n),()=>window.removeEventListener("storage",n)}}),{subscribe:p,set:v}=f;M[e]={set(d){g(e,d),v(d)},update(d){return f.update(t=>{const n=d(t);return g(e,n),n})},subscribe:p}}return M[e]}const U=m(!1),W=m(""),X=q("svelte:recent-searches",[]),V=q("svelte:theme",{preference:"system",current:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"});V.subscribe(e=>{document.body.classList.remove("light","dark"),document.body.classList.add(e.current)});export{P as a,W as b,X as c,G as d,F as e,O as m,K as n,Q as o,q as p,R as r,U as s,V as t,H as u};
