···11+import * as universal from "../../../../src/routes/+layout.ts";
22+export { universal };
33+export { default as component } from "../../../../src/routes/+layout.svelte";
···11+import { match as FieldId } from "../../../src/params/FieldId.ts";
22+33+export const matchers = { FieldId };
+3
app/.svelte-kit/generated/client/nodes/0.js
···11+import * as universal from "../../../../src/routes/+layout.ts";
22+export { universal };
33+export { default as component } from "../../../../src/routes/+layout.svelte";
+1
app/.svelte-kit/generated/client/nodes/1.js
···11+export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/svelte-5/error.svelte";
+1
app/.svelte-kit/generated/client/nodes/2.js
···11+export { default as component } from "../../../../src/routes/(socket)/+layout.svelte";
+1
app/.svelte-kit/generated/client/nodes/3.js
···11+export { default as component } from "../../../../src/routes/+page.svelte";
+1
app/.svelte-kit/generated/client/nodes/4.js
···11+export { default as component } from "../../../../src/routes/(socket)/field/[fieldId=FieldId]/+page.svelte";
+1
app/.svelte-kit/generated/client/nodes/5.js
···11+export { default as component } from "../../../../src/routes/(socket)/overworld/+page.svelte";
+1
app/.svelte-kit/generated/client/nodes/6.js
···11+export { default as component } from "../../../../src/routes/cards/+page.svelte";
+1
app/.svelte-kit/generated/client/nodes/7.js
···11+export { default as component } from "../../../../src/routes/play/+page.svelte";
+3
app/.svelte-kit/generated/root.js
···11+import { asClassComponent } from 'svelte/legacy';
22+import Root from './root.svelte';
33+export default asClassComponent(Root);
···11+import{e as d,k as g,d as i,j as m,r as l,m as b,g as p,n as k,o as v}from"./Cy0nnqwK.js";function x(n=!1){const s=d,e=s.l.u;if(!e)return;let f=()=>k(s.s);if(n){let o=0,t={};const _=v(()=>{let c=!1;const a=s.s;for(const r in a)a[r]!==t[r]&&(t[r]=a[r],c=!0);return c&&o++,o});f=()=>p(_)}e.b.length&&g(()=>{u(s,f),l(e.b)}),i(()=>{const o=m(()=>e.m.map(b));return()=>{for(const t of o)typeof t=="function"&&t()}}),e.a.length&&i(()=>{u(s,f),l(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}export{x as i};
···11+import{x as _,y as o,z as c,E as d,A as y,H as E,B as T,C as b,D as f}from"./Cy0nnqwK.js";import{B as p}from"./C3Bw9t1P.js";function m(t,i,u=!1){_&&o();var e=new p(t),h=u?d:0;function n(a,r){if(_){const l=y(t)===E;if(a===l){var s=T();b(s),e.anchor=s,f(!1),e.ensure(a,r),f(!0);return}}e.ensure(a,r)}c(()=>{var a=!1;i((r,s=!0)=>{a=!0,n(s,r)}),a||n(!1,null)},h)}export{m as i};
···11+import{N as n,O as p,P as o,Q as u,R as d,T as l,x as m,U as _,V as v,W as b}from"./Cy0nnqwK.js";class w{anchor;#t=new Map;#s=new Map;#e=new Map;#i=new Set;#a=!0;constructor(e,s=!0){this.anchor=e,this.#a=s}#f=()=>{var e=n;if(this.#t.has(e)){var s=this.#t.get(e),t=this.#s.get(s);if(t)p(t),this.#i.delete(s);else{var a=this.#e.get(s);a&&(this.#s.set(s,a.effect),this.#e.delete(s),a.fragment.lastChild.remove(),this.anchor.before(a.fragment),t=a.effect)}for(const[i,f]of this.#t){if(this.#t.delete(i),i===e)break;const h=this.#e.get(f);h&&(o(h.effect),this.#e.delete(f))}for(const[i,f]of this.#s){if(i===s||this.#i.has(i))continue;const h=()=>{if(Array.from(this.#t.values()).includes(i)){var c=document.createDocumentFragment();v(f,c),c.append(d()),this.#e.set(i,{effect:f,fragment:c})}else o(f);this.#i.delete(i),this.#s.delete(i)};this.#a||!t?(this.#i.add(i),u(f,h,!1)):h()}}};#h=e=>{this.#t.delete(e);const s=Array.from(this.#t.values());for(const[t,a]of this.#e)s.includes(t)||(o(a.effect),this.#e.delete(t))};ensure(e,s){var t=n,a=b();if(s&&!this.#s.has(e)&&!this.#e.has(e))if(a){var i=document.createDocumentFragment(),f=d();i.append(f),this.#e.set(e,{effect:l(()=>s(f)),fragment:i})}else this.#s.set(e,l(()=>s(this.anchor)));if(this.#t.set(t,e),a){for(const[h,r]of this.#s)h===e?t.skipped_effects.delete(r):t.skipped_effects.add(r);for(const[h,r]of this.#e)h===e?t.skipped_effects.delete(r.effect):t.skipped_effects.add(r.effect);t.oncommit(this.#f),t.ondiscard(this.#h)}else m&&(this.anchor=_),this.#f()}}export{w as B};
···11+import{f as A,a as M}from"./DTjTDYf3.js";import{q as O,j as T,p as R,ad as S,a as Z,c as l,g as a,s as w,ah as d,Y as y,_ as B,Z as C}from"./Cy0nnqwK.js";import{d as E,e as m}from"./wnUvJIYz.js";import{s as F}from"./VCyrUZ76.js";import{s as G}from"./Ni3ygk_w.js";import{p as u}from"./IrKOPqpB.js";class b{#e=new WeakMap;#t;#o;static entries=new WeakMap;constructor(e){this.#o=e}observe(e,o){var s=this.#e.get(e)||new Set;return s.add(o),this.#e.set(e,s),this.#i().observe(e,this.#o),()=>{var n=this.#e.get(e);n.delete(o),n.size===0&&(this.#e.delete(e),this.#t.unobserve(e))}}#i(){return this.#t??(this.#t=new ResizeObserver(e=>{for(var o of e){b.entries.set(o.target,o);for(var s of this.#e.get(o.target)||[])s(o)}}))}}var I=new b({box:"border-box"});function _(f,e,o){var s=I.observe(f,()=>o(f[e]));O(()=>(T(()=>o(f[e])),s))}var J=A('<div class="window svelte-1j4berq" role="presentation"><!></div>');function V(f,e){R(e,!0);let o=u(e,"tileWidth",3,128),s=u(e,"tileHeight",3,128),n=u(e,"offsetX",15,0),c=u(e,"offsetY",15,0),x=u(e,"clientWidth",15,0),W=u(e,"clientHeight",15,0),g=w(!1);function Y(t){t.preventDefault()}function D(t){t.buttons===2&&l(g,!0)}function H(t){t.button===2&&l(g,!1)}function X(t){a(g)&&(n(n()-t.movementX),c(c()-t.movementY))}let r=w(null);function z(t){a(r)===null&&t.changedTouches.length===1&&l(r,t.changedTouches[0],!0)}function p(t){a(r)&&!Array.from(t.touches).some(h=>h.identifier===a(r).identifier)&&l(r,null)}function k(t){if(a(r)===null)return;const h=a(r),v=Array.from(t.touches).find(q=>q.identifier===h.identifier);v&&(n(n()-(v.clientX-h.clientX)),c(c()-(v.clientY-h.clientY)),l(r,v,!0))}var i=J();m("mousemove",d,X),m("mouseup",d,H),m("touchmove",d,k,void 0,!0),m("touchend",d,p),m("touchcancel",d,p),i.__mousedown=D,i.__touchstart=z,i.__contextmenu=Y;var j=y(i);F(j,()=>e.children??B),C(i),S(()=>G(i,`--offset-x: ${n()??""}px; --offset-y: ${c()??""}px; --tile-width: ${o()??""}px; --tile-height: ${s()??""}px;`)),_(i,"clientWidth",x),_(i,"clientHeight",W),M(f,i),Z()}E(["mousedown","touchstart","contextmenu"]);export{V as D,_ as b};
···11+import{l as o,d as l,e as t,h as a,j as c}from"./Cy0nnqwK.js";function f(e){t===null&&o(),a&&t.l!==null?u(t).m.push(e):l(()=>{const n=c(e);if(typeof n=="function")return n})}function u(e){var n=e.l;return n.u??={a:[],b:[],m:[]}}export{f as o};
···11+var Mt=Array.isArray,Lt=Array.prototype.indexOf,Rn=Array.from,kn=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,jt=Object.getOwnPropertyDescriptors,qt=Object.prototype,Yt=Array.prototype,nt=Object.getPrototypeOf,We=Object.isExtensible;function On(e){return typeof e=="function"}const Nn=()=>{};function Dn(e){return e()}function Ht(e){for(var t=0;t<e.length;t++)e[t]()}function rt(){var e,t,n=new Promise((r,s)=>{e=r,t=s});return{promise:n,resolve:e,reject:t}}function In(e,t){if(Array.isArray(e))return e;if(!(Symbol.iterator in e))return Array.from(e);const n=[];for(const r of e)if(n.push(r),n.length===t)break;return n}const y=2,qe=4,xe=8,Ut=1<<24,j=16,q=32,K=64,Ye=128,N=512,g=1024,A=2048,P=4096,C=8192,H=16384,He=32768,pe=65536,De=1<<17,st=1<<18,fe=1<<19,ft=1<<20,Cn=1<<25,Q=32768,Ie=1<<21,Ue=1<<22,U=1<<23,ue=Symbol("$state"),Pn=Symbol("legacy props"),Fn=Symbol(""),ne=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Be=3,it=8;function Bt(e){throw new Error("https://svelte.dev/e/experimental_async_required")}function Vt(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function Gt(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function Kt(e){throw new Error("https://svelte.dev/e/effect_in_teardown")}function zt(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function $t(e){throw new Error("https://svelte.dev/e/effect_orphan")}function Xt(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Zt(){throw new Error("https://svelte.dev/e/fork_discarded")}function Wt(){throw new Error("https://svelte.dev/e/fork_timing")}function Ln(){throw new Error("https://svelte.dev/e/hydration_failed")}function jn(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function Jt(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Qt(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function en(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function qn(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const Yn=1,Hn=2,Un=4,Bn=8,Vn=16,Gn=1,Kn=2,zn=4,$n=8,Xn=16,Zn=4,Wn=1,Jn=2,tn="[",nn="[!",rn="]",Ve={},m=Symbol(),Qn="http://www.w3.org/1999/xhtml";function Ge(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function er(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let ee=!1;function tr(e){ee=e}let S;function re(e){if(e===null)throw Ge(),Ve;return S=e}function nr(){return re(z(S))}function rr(e){if(ee){if(z(S)!==null)throw Ge(),Ve;S=e}}function sr(e=1){if(ee){for(var t=e,n=S;t--;)n=z(n);S=n}}function fr(e=!0){for(var t=0,n=S;;){if(n.nodeType===it){var r=n.data;if(r===rn){if(t===0)return n;t-=1}else(r===tn||r===nn)&&(t+=1)}var s=z(n);e&&n.remove(),n=s}}function ir(e){if(!e||e.nodeType!==it)throw Ge(),Ve;return e.data}function at(e){return e===this.v}function sn(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function lt(e){return!sn(e,this.v)}let Se=!1;function ar(){Se=!0}let w=null;function we(e){w=e}function lr(e){return ot().get(e)}function or(e,t){return ot().set(e,t),t}function ur(e,t=!1,n){w={p:w,i:!1,c:null,e:null,s:e,x:null,l:Se&&!t?{s:null,u:null,$:[]}:null}}function cr(e){var t=w,n=t.e;if(n!==null){t.e=null;for(var r of n)Tt(r)}return e!==void 0&&(t.x=e),t.i=!0,w=t.p,e??{}}function de(){return!Se||w!==null&&w.l===null}function ot(e){return w===null&&Vt(),w.c??=new Map(fn(w)||void 0)}function fn(e){let t=e.p;for(;t!==null;){const n=t.c;if(n!==null)return n;t=t.p}return null}let X=[];function ut(){var e=X;X=[],Ht(e)}function an(e){if(X.length===0&&!ce){var t=X;queueMicrotask(()=>{t===X&&ut()})}X.push(e)}function ln(){for(;X.length>0;)ut()}function on(e){var t=h;if(t===null)return _.f|=U,e;if((t.f&He)===0){if((t.f&Ye)===0)throw e;t.b.error(e)}else ye(e,t)}function ye(e,t){for(;t!==null;){if((t.f&Ye)!==0)try{t.b.error(e);return}catch(n){e=n}t=t.parent}throw e}const Z=new Set;let p=null,T=null,k=[],Re=null,Ce=!1,ce=!1;class L{committed=!1;current=new Map;previous=new Map;#r=new Set;#s=new Set;#e=0;#t=0;#a=null;#f=new Set;#i=new Set;skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#t>0}process(t){k=[],this.apply();var n={parent:null,effect:null,effects:[],render_effects:[]};for(const r of t)this.#l(r,n);this.is_fork||this.#u(),this.is_deferred()?(this.#n(n.effects),this.#n(n.render_effects)):(p=null,Je(n.render_effects),Je(n.effects),this.#a?.resolve()),T=null}#l(t,n){t.f^=g;for(var r=t.first;r!==null;){var s=r.f,f=(s&(q|K))!==0,o=f&&(s&g)!==0,l=o||(s&C)!==0||this.skipped_effects.has(r);if((r.f&Ye)!==0&&r.b?.is_pending()&&(n={parent:n,effect:r,effects:[],render_effects:[]}),!l&&r.fn!==null){f?r.f^=g:(s&qe)!==0?n.effects.push(r):he(r)&&((r.f&j)!==0&&this.#f.add(r),ve(r));var i=r.first;if(i!==null){r=i;continue}}var a=r.parent;for(r=r.next;r===null&&a!==null;)a===n.effect&&(this.#n(n.effects),this.#n(n.render_effects),n=n.parent),r=a.next,a=a.parent}}#n(t){for(const n of t)(n.f&A)!==0?this.#f.add(n):(n.f&P)!==0&&this.#i.add(n),this.#o(n.deps),E(n,g)}#o(t){if(t!==null)for(const n of t)(n.f&y)===0||(n.f&Q)===0||(n.f^=Q,this.#o(n.deps))}capture(t,n){this.previous.has(t)||this.previous.set(t,n),(t.f&U)===0&&(this.current.set(t,t.v),T?.set(t,t.v))}activate(){p=this,this.apply()}deactivate(){p===this&&(p=null,T=null)}flush(){if(this.activate(),k.length>0){if(Fe(),p!==null&&p!==this)return}else this.#e===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#s)t(this);this.#s.clear()}#u(){if(this.#t===0){for(const t of this.#r)t();this.#r.clear()}this.#e===0&&this.#c()}#c(){if(Z.size>1){this.previous.clear();var t=T,n=!0,r={parent:null,effect:null,effects:[],render_effects:[]};for(const f of Z){if(f===this){n=!1;continue}const o=[];for(const[i,a]of this.current){if(f.current.has(i))if(n&&a!==f.current.get(i))f.current.set(i,a);else continue;o.push(i)}if(o.length===0)continue;const l=[...f.current.keys()].filter(i=>!this.current.has(i));if(l.length>0){var s=k;k=[];const i=new Set,a=new Map;for(const u of o)ct(u,l,i,a);if(k.length>0){p=f,f.apply();for(const u of k)f.#l(u,r);f.deactivate()}k=s}}p=null,T=t}this.committed=!0,Z.delete(this)}increment(t){this.#e+=1,t&&(this.#t+=1)}decrement(t){this.#e-=1,t&&(this.#t-=1),this.revive()}revive(){for(const t of this.#f)this.#i.delete(t),E(t,A),te(t);for(const t of this.#i)E(t,P),te(t);this.flush()}oncommit(t){this.#r.add(t)}ondiscard(t){this.#s.add(t)}settled(){return(this.#a??=rt()).promise}static ensure(){if(p===null){const t=p=new L;Z.add(p),ce||L.enqueue(()=>{p===t&&t.flush()})}return p}static enqueue(t){an(t)}apply(){}}function Pe(e){var t=ce;ce=!0;try{var n;for(e&&(p!==null&&Fe(),n=e());;){if(ln(),k.length===0&&(p?.flush(),k.length===0))return Re=null,n;Fe()}}finally{ce=t}}function Fe(){var e=W;Ce=!0;var t=null;try{var n=0;for(Te(!0);k.length>0;){var r=L.ensure();if(n++>1e3){var s,f;un()}r.process(k),B.clear()}}finally{Ce=!1,Te(e),Re=null}}function un(){try{Xt()}catch(e){ye(e,Re)}}let F=null;function Je(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if((r.f&(H|C))===0&&he(r)&&(F=new Set,ve(r),r.deps===null&&r.first===null&&r.nodes===null&&(r.teardown===null&&r.ac===null?St(r):r.fn=null),F?.size>0)){B.clear();for(const s of F){if((s.f&(H|C))!==0)continue;const f=[s];let o=s.parent;for(;o!==null;)F.has(o)&&(F.delete(o),f.push(o)),o=o.parent;for(let l=f.length-1;l>=0;l--){const i=f[l];(i.f&(H|C))===0&&ve(i)}}F.clear()}}F=null}}function ct(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(const s of e.reactions){const f=s.f;(f&y)!==0?ct(s,t,n,r):(f&(Ue|j))!==0&&(f&A)===0&&vt(s,t,r)&&(E(s,A),te(s))}}function _t(e,t){if(e.reactions!==null)for(const n of e.reactions){const r=n.f;(r&y)!==0?_t(n,t):(r&De)!==0&&(E(n,A),t.add(n))}}function vt(e,t,n){const r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(const s of e.deps){if(t.includes(s))return!0;if((s.f&y)!==0&&vt(s,t,n))return n.set(s,!0),!0}return n.set(e,!1),!1}function te(e){for(var t=Re=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ce&&t===h&&(n&j)!==0&&(n&st)===0)return;if((n&(K|q))!==0){if((n&g)===0)return;t.f^=g}}k.push(t)}function _r(e){Bt(),p!==null&&Wt();var t=L.ensure();t.is_fork=!0,T=new Map;var n=!1,r=t.settled();Pe(e),T=null;for(var[s,f]of t.previous)s.v=f;return{commit:async()=>{if(n){await r;return}Z.has(t)||Zt(),n=!0,t.is_fork=!1;for(var[o,l]of t.current)o.v=l;Pe(()=>{var i=new Set;for(var a of t.current.keys())_t(a,i);pn(i),wt()}),t.revive(),await r},discard:()=>{!n&&Z.has(t)&&(Z.delete(t),t.discard())}}}function cn(e,t,n,r){const s=de()?Ke:dn;if(n.length===0&&e.length===0){r(t.map(s));return}var f=p,o=h,l=_n();function i(){Promise.all(n.map(a=>vn(a))).then(a=>{l();try{r([...t.map(s),...a])}catch(u){(o.f&H)===0&&ye(u,o)}f?.deactivate(),Ee()}).catch(a=>{ye(a,o)})}e.length>0?Promise.all(e).then(()=>{l();try{return i()}finally{f?.deactivate(),Ee()}}):i()}function _n(){var e=h,t=_,n=w,r=p;return function(f=!0){se(e),G(t),we(n),f&&r?.activate()}}function Ee(){se(null),G(null),we(null)}function Ke(e){var t=y|A,n=_!==null&&(_.f&y)!==0?_:null;return h!==null&&(h.f|=fe),{ctx:w,deps:null,effects:null,equals:at,f:t,fn:e,reactions:null,rv:0,v:m,wv:0,parent:n??h,ac:null}}function vn(e,t){let n=h;n===null&&Gt();var r=n.b,s=void 0,f=$e(m),o=!_,l=new Map;return mn(()=>{var i=rt();s=i.promise;try{Promise.resolve(e()).then(i.resolve,i.reject).then(()=>{a===p&&a.committed&&a.deactivate(),Ee()})}catch(c){i.reject(c),Ee()}var a=p;if(o){var u=!r.is_pending();r.update_pending_count(1),a.increment(u),l.get(a)?.reject(ne),l.delete(a),l.set(a,i)}const v=(c,d=void 0)=>{if(a.activate(),d)d!==ne&&(f.f|=U,Me(f,d));else{(f.f&U)!==0&&(f.f^=U),Me(f,c);for(const[O,ke]of l){if(l.delete(O),O===a)break;ke.reject(ne)}}o&&(r.update_pending_count(-1),a.decrement(u))};i.promise.then(v,c=>v(null,c||"unknown"))}),En(()=>{for(const i of l.values())i.reject(ne)}),new Promise(i=>{function a(u){function v(){u===s?i(f):a(s)}u.then(v,v)}a(s)})}function vr(e){const t=Ke(e);return Ot(t),t}function dn(e){const t=Ke(e);return t.equals=lt,t}function dt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)V(t[n])}}function hn(e){for(var t=e.parent;t!==null;){if((t.f&y)===0)return(t.f&H)===0?t:null;t=t.parent}return null}function ze(e){var t,n=h;se(hn(e));try{e.f&=~Q,dt(e),t=Ct(e)}finally{se(n)}return t}function ht(e){var t=ze(e);if(e.equals(t)||(p?.is_fork||(e.v=t),e.wv=Dt()),!ie)if(T!==null)(be()||p?.is_fork)&&T.set(e,t);else{var n=(e.f&N)===0?P:g;E(e,n)}}let me=new Set;const B=new Map;function pn(e){me=e}let pt=!1;function $e(e,t){var n={f:0,v:e,reactions:null,equals:at,rv:0,wv:0};return n}function Y(e,t){const n=$e(e);return Ot(n),n}function dr(e,t=!1,n=!0){const r=$e(e);return t||(r.equals=lt),Se&&n&&w!==null&&w.l!==null&&(w.l.s??=[]).push(r),r}function $(e,t,n=!1){_!==null&&(!I||(_.f&De)!==0)&&de()&&(_.f&(y|j|Ue|De))!==0&&!M?.includes(e)&&en();let r=n?ae(t):t;return Me(e,r)}function Me(e,t){if(!e.equals(t)){var n=e.v;ie?B.set(e,t):B.set(e,n),e.v=t;var r=L.ensure();r.capture(e,n),(e.f&y)!==0&&((e.f&A)!==0&&ze(e),E(e,(e.f&N)!==0?g:P)),e.wv=Dt(),yt(e,A),de()&&h!==null&&(h.f&g)!==0&&(h.f&(q|K))===0&&(R===null?An([e]):R.push(e)),!r.is_fork&&me.size>0&&!pt&&wt()}return t}function wt(){pt=!1;var e=W;Te(!0);const t=Array.from(me);try{for(const n of t)(n.f&g)!==0&&E(n,P),he(n)&&ve(n)}finally{Te(e)}me.clear()}function Ne(e){$(e,e.v+1)}function yt(e,t){var n=e.reactions;if(n!==null)for(var r=de(),s=n.length,f=0;f<s;f++){var o=n[f],l=o.f;if(!(!r&&o===h)){var i=(l&A)===0;if(i&&E(o,t),(l&y)!==0){var a=o;T?.delete(a),(l&Q)===0&&(l&N&&(o.f|=Q),yt(a,P))}else i&&((l&j)!==0&&F!==null&&F.add(o),te(o))}}}function ae(e){if(typeof e!="object"||e===null||ue in e)return e;const t=nt(e);if(t!==qt&&t!==Yt)return e;var n=new Map,r=Mt(e),s=Y(0),f=J,o=l=>{if(J===f)return l();var i=_,a=J;G(null),tt(f);var u=l();return G(i),tt(a),u};return r&&n.set("length",Y(e.length)),new Proxy(e,{defineProperty(l,i,a){(!("value"in a)||a.configurable===!1||a.enumerable===!1||a.writable===!1)&&Jt();var u=n.get(i);return u===void 0?u=o(()=>{var v=Y(a.value);return n.set(i,v),v}):$(u,a.value,!0),!0},deleteProperty(l,i){var a=n.get(i);if(a===void 0){if(i in l){const u=o(()=>Y(m));n.set(i,u),Ne(s)}}else $(a,m),Ne(s);return!0},get(l,i,a){if(i===ue)return e;var u=n.get(i),v=i in l;if(u===void 0&&(!v||oe(l,i)?.writable)&&(u=o(()=>{var d=ae(v?l[i]:m),O=Y(d);return O}),n.set(i,u)),u!==void 0){var c=le(u);return c===m?void 0:c}return Reflect.get(l,i,a)},getOwnPropertyDescriptor(l,i){var a=Reflect.getOwnPropertyDescriptor(l,i);if(a&&"value"in a){var u=n.get(i);u&&(a.value=le(u))}else if(a===void 0){var v=n.get(i),c=v?.v;if(v!==void 0&&c!==m)return{enumerable:!0,configurable:!0,value:c,writable:!0}}return a},has(l,i){if(i===ue)return!0;var a=n.get(i),u=a!==void 0&&a.v!==m||Reflect.has(l,i);if(a!==void 0||h!==null&&(!u||oe(l,i)?.writable)){a===void 0&&(a=o(()=>{var c=u?ae(l[i]):m,d=Y(c);return d}),n.set(i,a));var v=le(a);if(v===m)return!1}return u},set(l,i,a,u){var v=n.get(i),c=i in l;if(r&&i==="length")for(var d=a;d<v.v;d+=1){var O=n.get(d+"");O!==void 0?$(O,m):d in l&&(O=o(()=>Y(m)),n.set(d+"",O))}if(v===void 0)(!c||oe(l,i)?.writable)&&(v=o(()=>Y(void 0)),$(v,ae(a)),n.set(i,v));else{c=v.v!==m;var ke=o(()=>ae(a));$(v,ke)}var Xe=Reflect.getOwnPropertyDescriptor(l,i);if(Xe?.set&&Xe.set.call(u,a),!c){if(r&&typeof i=="string"){var Ze=n.get("length"),Oe=Number(i);Number.isInteger(Oe)&&Oe>=Ze.v&&$(Ze,Oe+1)}Ne(s)}return!0},ownKeys(l){le(s);var i=Reflect.ownKeys(l).filter(v=>{var c=n.get(v);return c===void 0||c.v!==m});for(var[a,u]of n)u.v!==m&&!(a in l)&&i.push(a);return i},setPrototypeOf(){Qt()}})}var Qe,wn,Et,mt;function hr(){if(Qe===void 0){Qe=window,wn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Et=oe(t,"firstChild").get,mt=oe(t,"nextSibling").get,We(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),We(n)&&(n.__t=void 0)}}function ge(e=""){return document.createTextNode(e)}function Le(e){return Et.call(e)}function z(e){return mt.call(e)}function pr(e,t){if(!ee)return Le(e);var n=Le(S);if(n===null)n=S.appendChild(ge());else if(t&&n.nodeType!==Be){var r=ge();return n?.before(r),re(r),r}return re(n),n}function wr(e,t=!1){if(!ee){var n=Le(e);return n instanceof Comment&&n.data===""?z(n):n}if(t&&S?.nodeType!==Be){var r=ge();return S?.before(r),re(r),r}return S}function yr(e,t=1,n=!1){let r=ee?S:e;for(var s;t--;)s=r,r=z(r);if(!ee)return r;if(n&&r?.nodeType!==Be){var f=ge();return r===null?s?.after(f):r.before(f),re(f),f}return re(r),r}function Er(e){e.textContent=""}function mr(){return!1}function gt(e){var t=_,n=h;G(null),se(null);try{return e()}finally{G(t),se(n)}}function bt(e){h===null&&(_===null&&$t(),zt()),ie&&Kt()}function yn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function D(e,t,n){var r=h;r!==null&&(r.f&C)!==0&&(e|=C);var s={ctx:w,deps:null,nodes:null,f:e|A|N,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,wv:0,ac:null};if(n)try{ve(s),s.f|=He}catch(l){throw V(s),l}else t!==null&&te(s);var f=s;if(n&&f.deps===null&&f.teardown===null&&f.nodes===null&&f.first===f.last&&(f.f&fe)===0&&(f=f.first,(e&j)!==0&&(e&pe)!==0&&f!==null&&(f.f|=pe)),f!==null&&(f.parent=r,r!==null&&yn(f,r),_!==null&&(_.f&y)!==0&&(e&K)===0)){var o=_;(o.effects??=[]).push(f)}return s}function be(){return _!==null&&!I}function En(e){const t=D(xe,null,!1);return E(t,g),t.teardown=e,t}function gr(e){bt();var t=h.f,n=!_&&(t&q)!==0&&(t&He)===0;if(n){var r=w;(r.e??=[]).push(e)}else return Tt(e)}function Tt(e){return D(qe|ft,e,!1)}function br(e){return bt(),D(xe|ft,e,!0)}function Tr(e){L.ensure();const t=D(K|fe,e,!0);return()=>{V(t)}}function Ar(e){L.ensure();const t=D(K|fe,e,!0);return(n={})=>new Promise(r=>{n.outro?Tn(t,()=>{V(t),r(void 0)}):(V(t),r(void 0))})}function xr(e){return D(qe,e,!1)}function mn(e){return D(Ue|fe,e,!0)}function Sr(e,t=0){return D(xe|t,e,!0)}function Rr(e,t=[],n=[],r=[]){cn(r,t,n,s=>{D(xe,()=>e(...s.map(le)),!0)})}function kr(e,t=0){var n=D(j|t,e,!0);return n}function Or(e){return D(q|fe,e,!0)}function At(e){var t=e.teardown;if(t!==null){const n=ie,r=_;et(!0),G(null);try{t.call(null)}finally{et(n),G(r)}}}function xt(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){const s=n.ac;s!==null&>(()=>{s.abort(ne)});var r=n.next;(n.f&K)!==0?n.parent=null:V(n,t),n=r}}function gn(e){for(var t=e.first;t!==null;){var n=t.next;(t.f&q)===0&&V(t),t=n}}function V(e,t=!0){var n=!1;(t||(e.f&st)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(bn(e.nodes.start,e.nodes.end),n=!0),xt(e,t&&!n),Ae(e,0),E(e,H);var r=e.nodes&&e.nodes.t;if(r!==null)for(const f of r)f.stop();At(e);var s=e.parent;s!==null&&s.first!==null&&St(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function bn(e,t){for(;e!==null;){var n=e===t?null:z(e);e.remove(),e=n}}function St(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Tn(e,t,n=!0){var r=[];Rt(e,r,!0);var s=()=>{n&&V(e),t&&t()},f=r.length;if(f>0){var o=()=>--f||s();for(var l of r)l.out(o)}else s()}function Rt(e,t,n){if((e.f&C)===0){e.f^=C;var r=e.nodes&&e.nodes.t;if(r!==null)for(const l of r)(l.is_global||n)&&t.push(l);for(var s=e.first;s!==null;){var f=s.next,o=(s.f&pe)!==0||(s.f&q)!==0&&(e.f&j)!==0;Rt(s,t,o?n:!1),s=f}}}function Nr(e){kt(e,!0)}function kt(e,t){if((e.f&C)!==0){e.f^=C,(e.f&g)===0&&(E(e,A),te(e));for(var n=e.first;n!==null;){var r=n.next,s=(n.f&pe)!==0||(n.f&q)!==0;kt(n,s?t:!1),n=r}var f=e.nodes&&e.nodes.t;if(f!==null)for(const o of f)(o.is_global||t)&&o.in()}}function Dr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var s=n===r?null:z(n);t.append(n),n=s}}let W=!1;function Te(e){W=e}let ie=!1;function et(e){ie=e}let _=null,I=!1;function G(e){_=e}let h=null;function se(e){h=e}let M=null;function Ot(e){_!==null&&(M===null?M=[e]:M.push(e))}let b=null,x=0,R=null;function An(e){R=e}let Nt=1,_e=0,J=_e;function tt(e){J=e}function Dt(){return++Nt}function he(e){var t=e.f;if((t&A)!==0)return!0;if(t&y&&(e.f&=~Q),(t&P)!==0){var n=e.deps;if(n!==null)for(var r=n.length,s=0;s<r;s++){var f=n[s];if(he(f)&&ht(f),f.wv>e.wv)return!0}(t&N)!==0&&T===null&&E(e,g)}return!1}function It(e,t,n=!0){var r=e.reactions;if(r!==null&&!M?.includes(e))for(var s=0;s<r.length;s++){var f=r[s];(f.f&y)!==0?It(f,t,!1):t===f&&(n?E(f,A):(f.f&g)!==0&&E(f,P),te(f))}}function Ct(e){var t=b,n=x,r=R,s=_,f=M,o=w,l=I,i=J,a=e.f;b=null,x=0,R=null,_=(a&(q|K))===0?e:null,M=null,we(e.ctx),I=!1,J=++_e,e.ac!==null&&(gt(()=>{e.ac.abort(ne)}),e.ac=null);try{e.f|=Ie;var u=e.fn,v=u(),c=e.deps;if(b!==null){var d;if(Ae(e,x),c!==null&&x>0)for(c.length=x+b.length,d=0;d<b.length;d++)c[x+d]=b[d];else e.deps=c=b;if(be()&&(e.f&N)!==0)for(d=x;d<c.length;d++)(c[d].reactions??=[]).push(e)}else c!==null&&x<c.length&&(Ae(e,x),c.length=x);if(de()&&R!==null&&!I&&c!==null&&(e.f&(y|P|A))===0)for(d=0;d<R.length;d++)It(R[d],e);return s!==null&&s!==e&&(_e++,R!==null&&(r===null?r=R:r.push(...R))),(e.f&U)!==0&&(e.f^=U),v}catch(O){return on(O)}finally{e.f^=Ie,b=t,x=n,R=r,_=s,M=f,we(o),I=l,J=i}}function xn(e,t){let n=t.reactions;if(n!==null){var r=Lt.call(n,e);if(r!==-1){var s=n.length-1;s===0?n=t.reactions=null:(n[r]=n[s],n.pop())}}n===null&&(t.f&y)!==0&&(b===null||!b.includes(t))&&(E(t,P),(t.f&N)!==0&&(t.f^=N,t.f&=~Q),dt(t),Ae(t,0))}function Ae(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)xn(e,n[r])}function ve(e){var t=e.f;if((t&H)===0){E(e,g);var n=h,r=W;h=e,W=!0;try{(t&(j|Ut))!==0?gn(e):xt(e),At(e);var s=Ct(e);e.teardown=typeof s=="function"?s:null,e.wv=Nt;var f}finally{W=r,h=n}}}async function Ir(){await Promise.resolve(),Pe()}function Cr(){return L.ensure().settled()}function le(e){var t=e.f,n=(t&y)!==0;if(_!==null&&!I){var r=h!==null&&(h.f&H)!==0;if(!r&&!M?.includes(e)){var s=_.deps;if((_.f&Ie)!==0)e.rv<_e&&(e.rv=_e,b===null&&s!==null&&s[x]===e?x++:b===null?b=[e]:b.includes(e)||b.push(e));else{(_.deps??=[]).push(e);var f=e.reactions;f===null?e.reactions=[_]:f.includes(_)||f.push(_)}}}if(ie){if(B.has(e))return B.get(e);if(n){var o=e,l=o.v;return((o.f&g)===0&&o.reactions!==null||Ft(o))&&(l=ze(o)),B.set(o,l),l}}else n&&(!T?.has(e)||p?.is_fork&&!be())&&(o=e,he(o)&&ht(o),W&&be()&&(o.f&N)===0&&Pt(o));if(T?.has(e))return T.get(e);if((e.f&U)!==0)throw e.v;return e.v}function Pt(e){if(e.deps!==null){e.f^=N;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&y)!==0&&(t.f&N)===0&&Pt(t)}}function Ft(e){if(e.v===m)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(B.has(t)||(t.f&y)!==0&&Ft(t))return!0;return!1}function Pr(e){var t=I;try{return I=!0,e()}finally{I=t}}const Sn=-7169;function E(e,t){e.f=e.f&Sn|t}function Fr(e){if(!(typeof e!="object"||!e||e instanceof EventTarget)){if(ue in e)je(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];typeof n=="object"&&n&&ue in n&&je(n)}}}function je(e,t=new Set){if(typeof e=="object"&&e!==null&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let r in e)try{je(e[r],t)}catch{}const n=nt(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const r=jt(n);for(let s in r){const f=r[s].get;if(f)try{f.call(e)}catch{}}}}}export{dr as $,ir as A,fr as B,re as C,tr as D,pe as E,En as F,gt as G,nn as H,kn as I,G as J,se as K,_ as L,h as M,p as N,Nr as O,V as P,Tn as Q,ge as R,ue as S,Or as T,S as U,Dr as V,mr as W,yr as X,pr as Y,rr as Z,Nn as _,cr as a,In as a$,oe as a0,jn as a1,zn as a2,ae as a3,H as a4,dn as a5,$n as a6,Kn as a7,Gn as a8,Xn as a9,jt as aA,be as aB,L as aC,we as aD,on as aE,sr as aF,ye as aG,qn as aH,fe as aI,Ye as aJ,er as aK,hr as aL,tn as aM,Ve as aN,Ln as aO,Ar as aP,Ge as aQ,wn as aR,Wn as aS,Jn as aT,He as aU,Be as aV,Pe as aW,Ir as aX,Zn as aY,On as aZ,Tr as a_,ie as aa,Pn as ab,sn as ac,Rr as ad,or as ae,lr as af,vr as ag,Qe as ah,Un as ai,Le as aj,it as ak,rn as al,Me as am,Cn as an,Rn as ao,Mt as ap,Yn as aq,Vn as ar,Hn as as,C as at,z as au,Bn as av,Er as aw,Fn as ax,Qn as ay,nt as az,$e as b,_r as b0,Cr as b1,$ as c,gr as d,w as e,wr as f,le as g,Se as h,Ne as i,Pr as j,br as k,Vt as l,Dn as m,Fr as n,Ke as o,ur as p,xr as q,Ht as r,Y as s,Sr as t,J as u,an as v,ar as w,ee as x,nr as y,kr as z};
···11+import{q as b,t as h,j as k,v as q,S as t}from"./Cy0nnqwK.js";function u(r,i){return r===i||r?.[t]===i}function c(r={},i,a,S){return b(()=>{var f,s;return h(()=>{f=s,s=S?.()||[],k(()=>{r!==a(...s)&&(i(r,...s),f&&u(a(...f),r)&&i(null,...f))})}),()=>{q(()=>{s&&u(a(...s),r)&&i(null,...s)})}}),r}export{c as b};
···11+import{R as b,z as $,ai as G,C as D,x as A,aj as J,y as Z,g as x,a5 as j,A as ee,H as re,B as y,D as z,U as H,ak as fe,al as ae,am as B,N as ne,an as N,T as F,W as ie,b as Y,$ as se,ao as q,ap as le,aq as oe,ar as ue,as as te,O as K,Q,at as k,v as ve,au as ce,av as de,aw as pe,P as ge,ax as _e,ay as he,az as Ee,aA as Ae}from"./Cy0nnqwK.js";import{t as Ne}from"./Ni3ygk_w.js";function Re(e,f){return f}function Te(e,f,a){for(var t=[],u=f.length,i,l=f.length,c=0;c<u;c++){let h=f[c];Q(h,()=>{if(i){if(i.pending.delete(h),i.done.add(h),i.pending.size===0){var d=e.outrogroups;U(q(i.done)),d.delete(i),d.size===0&&(e.outrogroups=null)}}else l-=1},!1)}if(l===0){var n=t.length===0&&a!==null;if(n){var v=a,s=v.parentNode;pe(s),s.append(v),e.items.clear()}U(f,!n)}else i={pending:new Set(f),done:new Set},(e.outrogroups??=new Set).add(i)}function U(e,f=!0){for(var a=0;a<e.length;a++)ge(e[a],f)}var P;function He(e,f,a,t,u,i=null){var l=e,c=new Map,n=(f&G)!==0;if(n){var v=e;l=A?D(J(v)):v.appendChild(b())}A&&Z();var s=null,h=j(()=>{var o=a();return le(o)?o:o==null?[]:q(o)}),d,g=!0;function S(){r.fallback=s,Se(r,d,l,f,t),s!==null&&(d.length===0?(s.f&N)===0?K(s):(s.f^=N,R(s,null,l)):Q(s,()=>{s=null}))}var w=$(()=>{d=x(h);var o=d.length;let C=!1;if(A){var M=ee(l)===re;M!==(o===0)&&(l=y(),D(l),z(!1),C=!0)}for(var E=new Set,I=ne,L=ie(),_=0;_<o;_+=1){A&&H.nodeType===fe&&H.data===ae&&(l=H,C=!0,z(!1));var m=d[_],O=t(m,_),p=g?null:c.get(O);p?(p.v&&B(p.v,m),p.i&&B(p.i,_),L&&I.skipped_effects.delete(p.e)):(p=Ie(c,g?l:P??=b(),m,O,_,u,f,a),g||(p.e.f|=N),c.set(O,p)),E.add(O)}if(o===0&&i&&!s&&(g?s=F(()=>i(l)):(s=F(()=>i(P??=b())),s.f|=N)),A&&o>0&&D(y()),!g)if(L){for(const[W,X]of c)E.has(W)||I.skipped_effects.add(X.e);I.oncommit(S),I.ondiscard(()=>{})}else S();C&&z(!0),x(h)}),r={effect:w,items:c,outrogroups:null,fallback:s};g=!1,A&&(l=H)}function Se(e,f,a,t,u){var i=(t&de)!==0,l=f.length,c=e.items,n=e.effect.first,v,s=null,h,d=[],g=[],S,w,r,o;if(i)for(o=0;o<l;o+=1)S=f[o],w=u(S,o),r=c.get(w).e,(r.f&N)===0&&(r.nodes?.a?.measure(),(h??=new Set).add(r));for(o=0;o<l;o+=1){if(S=f[o],w=u(S,o),r=c.get(w).e,e.outrogroups!==null)for(const p of e.outrogroups)p.pending.delete(r),p.done.delete(r);if((r.f&N)!==0)if(r.f^=N,r===n)R(r,null,a);else{var C=s?s.next:n;r===e.effect.last&&(e.effect.last=r.prev),r.prev&&(r.prev.next=r.next),r.next&&(r.next.prev=r.prev),T(e,s,r),T(e,r,C),R(r,C,a),s=r,d=[],g=[],n=s.next;continue}if((r.f&k)!==0&&(K(r),i&&(r.nodes?.a?.unfix(),(h??=new Set).delete(r))),r!==n){if(v!==void 0&&v.has(r)){if(d.length<g.length){var M=g[0],E;s=M.prev;var I=d[0],L=d[d.length-1];for(E=0;E<d.length;E+=1)R(d[E],M,a);for(E=0;E<g.length;E+=1)v.delete(g[E]);T(e,I.prev,L.next),T(e,s,I),T(e,L,M),n=M,s=L,o-=1,d=[],g=[]}else v.delete(r),R(r,n,a),T(e,r.prev,r.next),T(e,r,s===null?e.effect.first:s.next),T(e,s,r),s=r;continue}for(d=[],g=[];n!==null&&n!==r;)(v??=new Set).add(n),g.push(n),n=n.next;if(n===null)continue}(r.f&N)===0&&d.push(r),s=r,n=r.next}if(e.outrogroups!==null){for(const p of e.outrogroups)p.pending.size===0&&(U(q(p.done)),e.outrogroups?.delete(p));e.outrogroups.size===0&&(e.outrogroups=null)}if(n!==null||v!==void 0){var _=[];if(v!==void 0)for(r of v)(r.f&k)===0&&_.push(r);for(;n!==null;)(n.f&k)===0&&n!==e.fallback&&_.push(n),n=n.next;var m=_.length;if(m>0){var O=(t&G)!==0&&l===0?a:null;if(i){for(o=0;o<m;o+=1)_[o].nodes?.a?.measure();for(o=0;o<m;o+=1)_[o].nodes?.a?.fix()}Te(e,_,O)}}i&&ve(()=>{if(h!==void 0)for(r of h)r.nodes?.a?.apply()})}function Ie(e,f,a,t,u,i,l,c){var n=(l&oe)!==0?(l&ue)===0?se(a,!1,!1):Y(a):null,v=(l&te)!==0?Y(u):null;return{v:n,i:v,e:F(()=>(i(f,n??a,v??u,c),()=>{e.delete(t)}))}}function R(e,f,a){if(e.nodes)for(var t=e.nodes.start,u=e.nodes.end,i=f&&(f.f&N)===0?f.nodes.start:a;t!==null;){var l=ce(t);if(i.before(t),t===u)return;t=l}}function T(e,f,a){f===null?e.effect.first=a:f.next=a,a===null?e.effect.last=f:a.prev=f}function be(e,f,a,t,u,i){var l=e.__className;if(A||l!==a||l===void 0){var c=Ne(a,t,i);(!A||c!==e.getAttribute("class"))&&(c==null?e.removeAttribute("class"):f?e.className=c:e.setAttribute("class",c)),e.__className=a}else if(i&&u!==i)for(var n in i){var v=!!i[n];(u==null||v!==!!u[n])&&e.classList.toggle(n,v)}return i}const me=Symbol("is custom element"),we=Symbol("is html");function De(e,f,a,t){var u=Ce(e);A&&(u[f]=e.getAttribute(f),f==="src"||f==="srcset"||f==="href"&&e.nodeName==="LINK")||u[f]!==(u[f]=a)&&(f==="loading"&&(e[_e]=a),a==null?e.removeAttribute(f):typeof a!="string"&&Me(e).includes(f)?e[f]=a:e.setAttribute(f,a))}function Ce(e){return e.__attributes??={[me]:e.nodeName.includes("-"),[we]:e.namespaceURI===he}}var V=new Map;function Me(e){var f=e.getAttribute("is")||e.nodeName,a=V.get(f);if(a)return a;V.set(f,a=[]);for(var t,u=e,i=Element.prototype;i!==u;){t=Ae(u);for(var l in t)t[l].set&&a.push(l);u=Ee(u)}return a}export{De as a,He as e,Re as i,be as s};
···11+import{R as c,aj as d,aR as E,M as m,aS as T,aT as g,x as f,U as o,aU as N,y as w,aV as y,C}from"./Cy0nnqwK.js";function v(r){var a=document.createElement("template");return a.innerHTML=r.replaceAll("<!>","<!---->"),a.content}function n(r,a){var e=m;e.nodes===null&&(e.nodes={start:r,end:a,a:null,t:null})}function A(r,a){var e=(a&T)!==0,_=(a&g)!==0,t,i=!r.startsWith("<!>");return()=>{if(f)return n(o,null),o;t===void 0&&(t=v(i?r:"<!>"+r),e||(t=d(t)));var s=_||E?document.importNode(t,!0):t.cloneNode(!0);if(e){var l=d(s),u=s.lastChild;n(l,u)}else n(s,s);return s}}function x(r,a,e="svg"){var _=!r.startsWith("<!>"),t=`<${e}>${_?r:"<!>"+r}</${e}>`,i;return()=>{if(f)return n(o,null),o;if(!i){var s=v(t),l=d(s);for(i=document.createDocumentFragment();d(l);)i.appendChild(d(l))}var u=i.cloneNode(!0);{var p=d(u),h=u.lastChild;n(p,h)}return u}}function F(r,a){return x(r,a,"svg")}function D(r=""){if(!f){var a=c(r+"");return n(a,a),a}var e=o;return e.nodeType!==y&&(e.before(e=c()),C(e)),n(e,e),e}function L(){if(f)return n(o,null),o;var r=document.createDocumentFragment(),a=document.createComment(""),e=c();return r.append(a,e),n(a,e),r}function O(r,a){if(f){var e=m;((e.f&N)===0||e.nodes.end===null)&&(e.nodes.end=o),w();return}r!==null&&r.before(a)}const M="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(M);export{O as a,n as b,L as c,F as d,A as f,D as t};
···11+import{s as h,b as l,u as f,g as i,c as u,i as a}from"./Cy0nnqwK.js";class m extends Map{#e=new Map;#s=h(0);#r=h(0);#u=f||-1;constructor(e){if(super(),e){for(var[r,s]of e)super.set(r,s);this.#r.v=super.size}}#t(e){return f===this.#u?h(e):l(e)}has(e){var r=this.#e,s=r.get(e);if(s===void 0){var t=super.get(e);if(t!==void 0)s=this.#t(0),r.set(e,s);else return i(this.#s),!1}return i(s),!0}forEach(e,r){this.#i(),super.forEach(e,r)}get(e){var r=this.#e,s=r.get(e);if(s===void 0){var t=super.get(e);if(t!==void 0)s=this.#t(0),r.set(e,s);else{i(this.#s);return}}return i(s),super.get(e)}set(e,r){var s=this.#e,t=s.get(e),v=super.get(e),p=super.set(e,r),n=this.#s;if(t===void 0)t=this.#t(0),s.set(e,t),u(this.#r,super.size),a(n);else if(v!==r){a(t);var o=n.reactions===null?null:new Set(n.reactions),c=o===null||!t.reactions?.every(d=>o.has(d));c&&a(n)}return p}delete(e){var r=this.#e,s=r.get(e),t=super.delete(e);return s!==void 0&&(r.delete(e),u(this.#r,super.size),u(s,-1),a(this.#s)),t}clear(){if(super.size!==0){super.clear();var e=this.#e;u(this.#r,0);for(var r of e.values())u(r,-1);a(this.#s),e.clear()}}#i(){i(this.#s);var e=this.#e;if(this.#r.v!==e.size){for(var r of super.keys())if(!e.has(r)){var s=this.#t(0);e.set(r,s)}}for([,s]of this.#e)i(s)}keys(){return i(this.#s),super.keys()}values(){return this.#i(),super.values()}entries(){return this.#i(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return i(this.#r),super.size}}export{m as S};
···11+import{_ as c,j as a,ac as d}from"./Cy0nnqwK.js";function p(s,u,e){if(s==null)return u(void 0),c;const t=a(()=>s.subscribe(u,e));return t.unsubscribe?()=>t.unsubscribe():t}const i=[];function g(s,u=c){let e=null;const t=new Set;function o(r){if(d(s,r)&&(s=r,e)){const b=!i.length;for(const n of t)n[1](),i.push(n,s);if(b){for(let n=0;n<i.length;n+=2)i[n][0](i[n+1]);i.length=0}}}function f(r){o(r(s))}function l(r,b=c){const n=[r,b];return t.add(n),t.size===1&&(e=u(o,f)||c),r(s),()=>{t.delete(n),t.size===0&&e&&(e(),e=null)}}return{set:o,update:f,subscribe:l}}function h(s){let u;return p(s,e=>u=e)(),u}export{h as g,p as s,g as w};
···11+import{_ as E,$ as L,g as o,F as M,I as N,c as O,a0 as U,a1 as y,a2 as B,a3 as Y,M as $,a4 as h,o as w,a5 as x,a6 as j,j as q,h as z,a7 as C,a8 as F,a9 as G,aa as Z,S as p,ab as H}from"./Cy0nnqwK.js";import{s as J,g as K}from"./F8Rf94kU.js";let c=!1,g=Symbol();function X(e,a,i){const r=i[a]??={store:null,source:L(void 0),unsubscribe:E};if(r.store!==e&&!(g in i))if(r.unsubscribe(),r.store=e??null,e==null)r.source.v=void 0,r.unsubscribe=E;else{var t=!0;r.unsubscribe=J(e,u=>{t?r.source.v=u:O(r.source,u)}),t=!1}return e&&g in i?K(e):o(r.source)}function k(){const e={};function a(){M(()=>{for(var i in e)e[i].unsubscribe();N(e,g,{enumerable:!1,value:!0})})}return[e,a]}function Q(e){var a=c;try{return c=!1,[e(),c]}finally{c=a}}function ee(e,a,i,r){var t=!z||(i&C)!==0,u=(i&j)!==0,R=(i&G)!==0,s=r,b=!0,P=()=>(b&&(b=!1,s=R?q(r):r),s),_;if(u){var A=p in e||H in e;_=U(e,a)?.set??(A&&a in e?n=>e[a]=n:void 0)}var d,I=!1;u?[d,I]=Q(()=>e[a]):d=e[a],d===void 0&&r!==void 0&&(d=P(),_&&(t&&y(),_(d)));var f;if(t?f=()=>{var n=e[a];return n===void 0?P():(b=!0,n)}:f=()=>{var n=e[a];return n!==void 0&&(s=void 0),n===void 0?s:n},t&&(i&B)===0)return f;if(_){var T=e.$$legacy;return(function(n,v){return arguments.length>0?((!t||!v||T||I)&&_(v?f():n),n):f()})}var S=!1,l=((i&F)!==0?w:x)(()=>(S=!1,f()));u&&o(l);var D=$;return(function(n,v){if(arguments.length>0){const m=v?o(l):t&&u?Y(n):n;return O(l,m),S=!0,s!==void 0&&(s=m),n}return Z&&S||(D.f&h)!==0?l.v:o(l)})}export{k as a,ee as p,X as s};
···11+import{z as p,E as t}from"./Cy0nnqwK.js";import{B as c}from"./C3Bw9t1P.js";function E(r,s,...a){var e=new c(r);p(()=>{const n=s()??null;e.ensure(n,n&&(o=>n(o,...a)))},t)}export{E as s};
···11+import{aB as J,g as M,b as P,t as K,j as Q,i as O,v as V,U as d,x as c,M as E,z as U,y as W,ak as S,H as $,T as _,aC as g,Q as R,R as B,K as C,J as v,aD as x,aE as z,L,e as Y,V as G,am as X,P as w,C as b,aF as Z,B as tt,aG as H,aH as et,E as st,aI as it,aJ as nt,aK as rt,aL as N,aj as at,aM as ht,au as ot,aN as D,D as y,aO as ft,aw as lt,ao as ut,aP as _t,p as dt,al as ct,aQ as pt,a as gt}from"./Cy0nnqwK.js";import{a as vt,r as I,h as m}from"./wnUvJIYz.js";import{b as yt}from"./DTjTDYf3.js";function mt(i){let t=0,e=P(0),n;return()=>{J()&&(M(e),K(()=>(t===0&&(n=Q(()=>i(()=>O(e)))),t+=1,()=>{V(()=>{t-=1,t===0&&(n?.(),n=void 0,O(e))})})))}}var Et=st|it|nt;function bt(i,t,e){new Tt(i,t,e)}class Tt{parent;#s=!1;#e;#g=c?d:null;#n;#u;#r;#i=null;#t=null;#a=null;#h=null;#o=null;#_=0;#f=0;#d=!1;#l=null;#m=mt(()=>(this.#l=P(this.#_),()=>{this.#l=null}));constructor(t,e,n){this.#e=t,this.#n=e,this.#u=n,this.parent=E.b,this.#s=!!this.#n.pending,this.#r=U(()=>{if(E.b=this,c){const s=this.#g;W(),s.nodeType===S&&s.data===$?this.#b():this.#E()}else{var o=this.#v();try{this.#i=_(()=>n(o))}catch(s){this.error(s)}this.#f>0?this.#p():this.#s=!1}return()=>{this.#o?.remove()}},Et),c&&(this.#e=d)}#E(){try{this.#i=_(()=>this.#u(this.#e))}catch(t){this.error(t)}this.#s=!1}#b(){const t=this.#n.pending;t&&(this.#t=_(()=>t(this.#e)),g.enqueue(()=>{var e=this.#v();this.#i=this.#c(()=>(g.ensure(),_(()=>this.#u(e)))),this.#f>0?this.#p():(R(this.#t,()=>{this.#t=null}),this.#s=!1)}))}#v(){var t=this.#e;return this.#s&&(this.#o=B(),this.#e.before(this.#o),t=this.#o),t}is_pending(){return this.#s||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#n.pending}#c(t){var e=E,n=L,o=Y;C(this.#r),v(this.#r),x(this.#r.ctx);try{return t()}catch(s){return z(s),null}finally{C(e),v(n),x(o)}}#p(){const t=this.#n.pending;this.#i!==null&&(this.#h=document.createDocumentFragment(),this.#h.append(this.#o),G(this.#i,this.#h)),this.#t===null&&(this.#t=_(()=>t(this.#e)))}#y(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#y(t);return}this.#f+=t,this.#f===0&&(this.#s=!1,this.#t&&R(this.#t,()=>{this.#t=null}),this.#h&&(this.#e.before(this.#h),this.#h=null))}update_pending_count(t){this.#y(t),this.#_+=t,this.#l&&X(this.#l,this.#_)}get_effect_pending(){return this.#m(),M(this.#l)}error(t){var e=this.#n.onerror;let n=this.#n.failed;if(this.#d||!e&&!n)throw t;this.#i&&(w(this.#i),this.#i=null),this.#t&&(w(this.#t),this.#t=null),this.#a&&(w(this.#a),this.#a=null),c&&(b(this.#g),Z(),b(tt()));var o=!1,s=!1;const a=()=>{if(o){rt();return}o=!0,s&&et(),g.ensure(),this.#_=0,this.#a!==null&&R(this.#a,()=>{this.#a=null}),this.#s=this.has_pending_snippet(),this.#i=this.#c(()=>(this.#d=!1,_(()=>this.#u(this.#e)))),this.#f>0?this.#p():this.#s=!1};var f=L;try{v(null),s=!0,e?.(t,a),s=!1}catch(l){H(l,this.#r&&this.#r.parent)}finally{v(f)}n&&V(()=>{this.#a=this.#c(()=>{g.ensure(),this.#d=!0;try{return _(()=>{n(this.#e,()=>t,()=>a)})}catch(l){return H(l,this.#r.parent),null}finally{this.#d=!1}})})}}const Rt=["touchstart","touchmove"];function wt(i){return Rt.includes(i)}function kt(i,t){var e=t==null?"":typeof t=="object"?t+"":t;e!==(i.__t??=i.nodeValue)&&(i.__t=e,i.nodeValue=e+"")}function Nt(i,t){return j(i,t)}function Ft(i,t){N(),t.intro=t.intro??!1;const e=t.target,n=c,o=d;try{for(var s=at(e);s&&(s.nodeType!==S||s.data!==ht);)s=ot(s);if(!s)throw D;y(!0),b(s);const a=j(i,{...t,anchor:s});return y(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
22+`).some(f=>f.startsWith("https://svelte.dev/e/")))throw a;return a!==D&&console.warn("Failed to hydrate: ",a),t.recover===!1&&ft(),N(),lt(e),y(!1),Nt(i,t)}finally{y(n),b(o)}}const p=new Map;function j(i,{target:t,anchor:e,props:n={},events:o,context:s,intro:a=!0}){N();var f=new Set,l=u=>{for(var h=0;h<u.length;h++){var r=u[h];if(!f.has(r)){f.add(r);var k=wt(r);t.addEventListener(r,m,{passive:k});var F=p.get(r);F===void 0?(document.addEventListener(r,m,{passive:k}),p.set(r,1)):p.set(r,F+1)}}};l(ut(vt)),I.add(l);var T=void 0,q=_t(()=>{var u=e??t.appendChild(B());return bt(u,{pending:()=>{}},h=>{if(s){dt({});var r=Y;r.c=s}if(o&&(n.$$events=o),c&&yt(h,null),T=i(h,n)||{},c&&(E.nodes.end=d,d===null||d.nodeType!==S||d.data!==ct))throw pt(),D;s&>()}),()=>{for(var h of f){t.removeEventListener(h,m);var r=p.get(h);--r===0?(document.removeEventListener(h,m),p.delete(h)):p.set(h,r)}I.delete(l),u!==e&&u.parentNode?.removeChild(u)}});return A.set(T,q),T}let A=new WeakMap;function Ot(i,t){const e=A.get(i);return e?(A.delete(i),e(t)):Promise.resolve()}export{Ft as h,Nt as m,kt as s,Ot as u};
···11+import{F as y,v as L,G as E,I as M,J as v,K as g,L as k,M as S}from"./Cy0nnqwK.js";const T=new Set,q=new Set;function x(t,r,i,n={}){function e(a){if(n.capture||B.call(r,a),!a.cancelBubble)return E(()=>i?.call(this,a))}return t.startsWith("pointer")||t.startsWith("touch")||t==="wheel"?L(()=>{r.addEventListener(t,e,n)}):r.addEventListener(t,e,n),e}function W(t,r,i,n,e){var a={capture:n,passive:e},l=x(t,r,i,a);(r===document.body||r===window||r===document||r instanceof HTMLMediaElement)&&y(()=>{r.removeEventListener(t,l,a)})}function D(t){for(var r=0;r<t.length;r++)T.add(t[r]);for(var i of q)i(t)}let p=null;function B(t){var r=this,i=r.ownerDocument,n=t.type,e=t.composedPath?.()||[],a=e[0]||t.target;p=t;var l=0,f=p===t&&t.__root;if(f){var u=e.indexOf(f);if(u!==-1&&(r===document||r===window)){t.__root=r;return}var _=e.indexOf(r);if(_===-1)return;u<=_&&(l=u)}if(a=e[l]||t.target,a!==r){M(t,"currentTarget",{configurable:!0,get(){return a||i}});var w=k,b=S;v(null),g(null);try{for(var c,d=[];a!==null;){var s=a.assignedSlot||a.parentNode||a.host||null;try{var h=a["__"+n];h!=null&&(!a.disabled||t.target===a)&&h.call(a,t)}catch(o){c?d.push(o):c=o}if(t.cancelBubble||s===r||s===null)break;a=s}if(c){for(let o of d)queueMicrotask(()=>{throw o});throw c}}finally{t.__root=r,delete t.currentTarget,v(w),g(b)}}}export{T as a,D as d,W as e,B as h,q as r};
···11+const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.Bpyn17vy.js","../chunks/DTjTDYf3.js","../chunks/Cy0nnqwK.js","../chunks/VCyrUZ76.js","../chunks/C3Bw9t1P.js","../nodes/1.zAvY42iv.js","../chunks/Dwwks_Q7.js","../chunks/Zp7FgOxX.js","../chunks/wnUvJIYz.js","../chunks/BfVwtNtA.js","../chunks/BXN2zbQS.js","../chunks/F8Rf94kU.js","../chunks/CmPt_qt9.js","../nodes/2.B3v9Uros.js","../chunks/Disko3h9.js","../nodes/3.rm3kMfwl.js","../assets/3.DHpgJXmb.css","../nodes/4.DThprzVs.js","../chunks/IrKOPqpB.js","../chunks/CFNKoBvp.js","../chunks/Ni3ygk_w.js","../assets/DragWindow.Ct7pKWbu.css","../chunks/Du5sam5i.js","../nodes/5.QeLDNF63.js","../chunks/BxqNGrrm.js","../chunks/DTiiyNL4.js","../chunks/B5ZTdtgC.js","../assets/GridLines.Cmy_IU9Y.css","../assets/5.BH-JXrvf.css","../nodes/6.BjAi8SzL.js","../chunks/CvUAJ54q.js","../assets/CardGrid.DkTs1kla.css","../assets/6.DYvKU7Oc.css","../nodes/7.DyXTg_vC.js","../chunks/DIcbJqE8.js","../assets/7.DSn3KEp4.css"])))=>i.map(i=>d[i]);
22+import{x as tt,y as et,z as rt,E as at,c as C,ab as st,g as l,aW as nt,I as ot,$ as ct,p as it,k as ut,d as lt,s as q,aX as mt,f as b,X as dt,a as ft,Y as _t,Z as ht,ag as x,ad as vt}from"../chunks/Cy0nnqwK.js";import{h as gt,m as Et,u as yt,s as bt}from"../chunks/Zp7FgOxX.js";import{f as Y,a as f,c as O,t as Pt}from"../chunks/DTjTDYf3.js";import{o as Rt}from"../chunks/CmPt_qt9.js";import{i as N}from"../chunks/BxqNGrrm.js";import{B as pt}from"../chunks/C3Bw9t1P.js";import{b as T}from"../chunks/DIcbJqE8.js";import{p as j}from"../chunks/IrKOPqpB.js";function S(s,t,a){tt&&et();var c=new pt(s);rt(()=>{var o=t()??null;c.ensure(o,o&&(r=>a(r,o)))},at)}function Ot(s){return class extends kt{constructor(t){super({component:s,...t})}}}class kt{#e;#t;constructor(t){var a=new Map,c=(r,e)=>{var n=ct(e,!1,!1);return a.set(r,n),n};const o=new Proxy({...t.props||{},$$events:{}},{get(r,e){return l(a.get(e)??c(e,Reflect.get(r,e)))},has(r,e){return e===st?!0:(l(a.get(e)??c(e,Reflect.get(r,e))),Reflect.has(r,e))},set(r,e,n){return C(a.get(e)??c(e,n),n),Reflect.set(r,e,n)}});this.#t=(t.hydrate?gt:Et)(t.component,{target:t.target,anchor:t.anchor,props:o,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&nt(),this.#e=o.$$events;for(const r of Object.keys(this.#t))r==="$set"||r==="$destroy"||r==="$on"||ot(this,r,{get(){return this.#t[r]},set(e){this.#t[r]=e},enumerable:!0});this.#t.$set=r=>{Object.assign(o,r)},this.#t.$destroy=()=>{yt(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const c=(...o)=>a.call(this,...o);return this.#e[t].push(c),()=>{this.#e[t]=this.#e[t].filter(o=>o!==c)}}$destroy(){this.#t.$destroy()}}const wt="modulepreload",At=function(s,t){return new URL(s,t).href},X={},_=function(t,a,c){let o=Promise.resolve();if(a&&a.length>0){let D=function(i){return Promise.all(i.map(m=>Promise.resolve(m).then(h=>({status:"fulfilled",value:h}),h=>({status:"rejected",reason:h}))))};const e=document.getElementsByTagName("link"),n=document.querySelector("meta[property=csp-nonce]"),k=n?.nonce||n?.getAttribute("nonce");o=D(a.map(i=>{if(i=At(i,c),i in X)return;X[i]=!0;const m=i.endsWith(".css"),h=m?'[rel="stylesheet"]':"";if(c)for(let v=e.length-1;v>=0;v--){const P=e[v];if(P.href===i&&(!m||P.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${h}`))return;const d=document.createElement("link");if(d.rel=m?"stylesheet":wt,m||(d.as="script"),d.crossOrigin="",d.href=i,k&&d.setAttribute("nonce",k),document.head.appendChild(d),m)return new Promise((v,P)=>{d.addEventListener("load",v),d.addEventListener("error",()=>P(new Error(`Unable to preload CSS for ${i}`)))})}))}function r(e){const n=new Event("vite:preloadError",{cancelable:!0});if(n.payload=e,window.dispatchEvent(n),!n.defaultPrevented)throw e}return o.then(e=>{for(const n of e||[])n.status==="rejected"&&r(n.reason);return t().catch(r)})};function It(s){return!Number.isNaN(Number.parseInt(s))}const Wt={FieldId:It};var Lt=Y('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),xt=Y("<!> <!>",1);function Tt(s,t){it(t,!0);let a=j(t,"components",23,()=>[]),c=j(t,"data_0",3,null),o=j(t,"data_1",3,null),r=j(t,"data_2",3,null);ut(()=>t.stores.page.set(t.page)),lt(()=>{t.stores,t.page,t.constructors,a(),t.form,c(),o(),r(),t.stores.page.notify()});let e=q(!1),n=q(!1),k=q(null);Rt(()=>{const u=t.stores.page.subscribe(()=>{l(e)&&(C(n,!0),mt().then(()=>{C(k,document.title||"untitled page",!0)}))});return C(e,!0),u});const D=x(()=>t.constructors[2]);var i=xt(),m=b(i);{var h=u=>{const g=x(()=>t.constructors[0]);var E=O(),w=b(E);S(w,()=>l(g),(y,R)=>{T(R(y,{get data(){return c()},get form(){return t.form},get params(){return t.page.params},children:(A,Nt)=>{var U=O(),G=b(U);{var Z=p=>{const V=x(()=>t.constructors[1]);var I=O(),F=b(I);S(F,()=>l(V),(M,B)=>{T(B(M,{get data(){return o()},get form(){return t.form},get params(){return t.page.params},children:(L,jt)=>{var W=O(),J=b(W);S(J,()=>l(D),(K,Q)=>{T(Q(K,{get data(){return r()},get form(){return t.form},get params(){return t.page.params}}),$=>a()[2]=$,()=>a()?.[2])}),f(L,W)},$$slots:{default:!0}}),L=>a()[1]=L,()=>a()?.[1])}),f(p,I)},H=p=>{const V=x(()=>t.constructors[1]);var I=O(),F=b(I);S(F,()=>l(V),(M,B)=>{T(B(M,{get data(){return o()},get form(){return t.form},get params(){return t.page.params}}),L=>a()[1]=L,()=>a()?.[1])}),f(p,I)};N(G,p=>{t.constructors[2]?p(Z):p(H,!1)})}f(A,U)},$$slots:{default:!0}}),A=>a()[0]=A,()=>a()?.[0])}),f(u,E)},d=u=>{const g=x(()=>t.constructors[0]);var E=O(),w=b(E);S(w,()=>l(g),(y,R)=>{T(R(y,{get data(){return c()},get form(){return t.form},get params(){return t.page.params}}),A=>a()[0]=A,()=>a()?.[0])}),f(u,E)};N(m,u=>{t.constructors[1]?u(h):u(d,!1)})}var v=dt(m,2);{var P=u=>{var g=Lt(),E=_t(g);{var w=y=>{var R=Pt();vt(()=>bt(R,l(k))),f(y,R)};N(E,y=>{l(n)&&y(w)})}ht(g),f(u,g)};N(v,u=>{l(e)&&u(P)})}f(s,i),ft()}const Xt=Ot(Tt),Yt=[()=>_(()=>import("../nodes/0.Bpyn17vy.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),()=>_(()=>import("../nodes/1.zAvY42iv.js"),__vite__mapDeps([5,1,2,6,7,8,9,10,11,12]),import.meta.url),()=>_(()=>import("../nodes/2.B3v9Uros.js"),__vite__mapDeps([13,1,2,3,4,14]),import.meta.url),()=>_(()=>import("../nodes/3.rm3kMfwl.js"),__vite__mapDeps([15,1,2,6,16]),import.meta.url),()=>_(()=>import("../nodes/4.DThprzVs.js"),__vite__mapDeps([17,1,2,18,11,10,12,19,8,3,4,20,21,14,22]),import.meta.url),()=>_(()=>import("../nodes/5.QeLDNF63.js"),__vite__mapDeps([23,1,2,7,8,24,4,25,20,10,11,12,26,3,18,27,19,21,14,22,28]),import.meta.url),()=>_(()=>import("../nodes/6.BjAi8SzL.js"),__vite__mapDeps([29,1,2,6,9,30,3,4,24,7,8,25,20,18,11,31,32]),import.meta.url),()=>_(()=>import("../nodes/7.DyXTg_vC.js"),__vite__mapDeps([33,1,2,6,3,4,8,30,24,7,25,20,18,11,31,26,27,19,21,34,35]),import.meta.url)],zt=[],Gt={"/":[3],"/cards":[6],"/(socket)/field/[fieldId=FieldId]":[4,[2]],"/(socket)/overworld":[5,[2]],"/play":[7]},z={handleError:(({error:s})=>{console.error(s)}),reroute:(()=>{}),transport:{}},St=Object.fromEntries(Object.entries(z.transport).map(([s,t])=>[s,t.decode])),Zt=Object.fromEntries(Object.entries(z.transport).map(([s,t])=>[s,t.encode])),Ht=!1,Jt=(s,t)=>St[s](t);export{Jt as decode,St as decoders,Gt as dictionary,Zt as encoders,Ht as hash,z as hooks,Wt as matchers,Yt as nodes,Xt as root,zt as server_loads};
···11+import{f as u,a as h}from"../chunks/DTjTDYf3.js";import"../chunks/Dwwks_Q7.js";import{p as g,f as d,ad as l,a as v,Y as s,Z as e,X as _}from"../chunks/Cy0nnqwK.js";import{s as o}from"../chunks/Zp7FgOxX.js";import{i as x}from"../chunks/BfVwtNtA.js";import{s as $,p}from"../chunks/BXN2zbQS.js";const k={get error(){return p.error},get status(){return p.status}};$.updated.check;const m=k;var b=u("<h1> </h1> <p> </p>",1);function w(i,f){g(f,!1),x();var t=b(),r=d(t),n=s(r,!0);e(r);var a=_(r,2),c=s(a,!0);e(a),l(()=>{o(n,m.status),o(c,m.error?.message)}),h(i,t),v()}export{w as component};
···11+import{c as t,a as m}from"../chunks/DTjTDYf3.js";import{p as e,f as s,a as i}from"../chunks/Cy0nnqwK.js";import{s as n}from"../chunks/VCyrUZ76.js";import{p as f}from"../chunks/Disko3h9.js";function l(r,o){e(o,!0),f();var a=t(),p=s(a);n(p,()=>o.children),m(r,a),i()}export{l as component};
···11+import{f as s,a as r}from"../chunks/DTjTDYf3.js";import"../chunks/Dwwks_Q7.js";var t=s('<main class="svelte-1uha8ag"><h1 class="svelte-1uha8ag">This game?</h1> <a href="/cards">See the cards</a> <a href="/play">Just play</a></main>');function h(a){var e=t();r(a,e)}export{h as component};
···11+import"../chunks/DTjTDYf3.js";import{s as u,a3 as b,c as n,g as d,ae as l,p as g,a as m}from"../chunks/Cy0nnqwK.js";import{s as _,a as $}from"../chunks/IrKOPqpB.js";import{s as S}from"../chunks/BXN2zbQS.js";import{D as x}from"../chunks/CFNKoBvp.js";import{g as F}from"../chunks/Disko3h9.js";import{S as f}from"../chunks/Du5sam5i.js";const v=()=>{const e=S;return{page:{subscribe:e.page.subscribe},navigating:{subscribe:e.navigating.subscribe},updated:e.updated}},C={subscribe(e){return v().page.subscribe(e)}};function h(e){return Number.parseInt(e)}const w=Symbol("Field State");function D(e,i){const s=F();let r=u(b(i)),a=u(b(new f));s.$on("auth",()=>{const o=s.subscribe("fields"),c=s.subscribe({topic:"field_cards",field_id:e});return s.getField(e).$then(({data:t})=>{n(r,t.field,!0),n(a,new f(t.field_cards.map(p=>[p.card_id,p])),!0)}),c.$on("next",({message:t})=>{d(a).set(t.data.field_card.card_id,t.data.field_card)}),o.$on("next",({message:t})=>{n(r,t.data.field,!0)}),()=>{o.unsubscribe(),c.unsubscribe()}}),l(w,{get field(){return d(r)},get fieldCards(){return d(a)}})}function M(e,i){g(i,!0);const s=()=>_(C,"$page",r),[r,a]=$(),{fieldId:o}=s().params;D(h(o)),x(e,{}),m(),a()}export{M as component};
···11+import{f as c,a as n,t as _}from"../chunks/DTjTDYf3.js";import{s as L,a3 as P,c as R,g as t,ae as W,af as E,p as M,a as T,f as V,Y as $,X,ag as w,Z as x,ad as b}from"../chunks/Cy0nnqwK.js";import{s as h}from"../chunks/Zp7FgOxX.js";import{i as Y}from"../chunks/BxqNGrrm.js";import{e as Z}from"../chunks/DTiiyNL4.js";import{g as j}from"../chunks/BXN2zbQS.js";import{G as q,D as z}from"../chunks/B5ZTdtgC.js";import{D as A}from"../chunks/CFNKoBvp.js";import{g as B}from"../chunks/Disko3h9.js";import{S as y}from"../chunks/Du5sam5i.js";const D=Symbol("Overworld");function H(){return{...E(D)}}function I(){const e=B();let s=L(P(new y));e.$on("auth",()=>{const d=e.subscribe("fields");return e.getFields().$then(({data:r})=>{R(s,new y(r.fields.map(l=>[l.id,l])),!0)}),d.$on("next",({message:r})=>{t(s).set(r.data.field.id,r.data.field)}),()=>{d.unsubscribe()}}),W(D,{get fields(){return t(s)}})}var J=c('<div class="field-label svelte-urwvt6"><!></div>'),K=c("<!> <!>",1),N=c('<main class="void svelte-urwvt6" role="application"><!></main>');function vt(e,s){M(s,!0),I();const d=w(H),r=w(()=>t(d).fields);async function l(f){await j(`/field/${f.id}`)}var v=N(),O=$(v);A(O,{children:(f,Q)=>{var u=K(),g=V(u);q(g,{});var k=X(g,2);Z(k,17,()=>t(r).values(),m=>m.id,(m,a)=>{z(m,{get x(){return t(a).grid_x},get y(){return t(a).grid_y},onClick:()=>l(t(a)),children:(S,U)=>{var p=J(),C=$(p);{var F=o=>{var i=_();b(()=>h(i,t(a).name)),n(o,i)},G=o=>{var i=_();b(()=>h(i,`Field ${t(a).id??""}`)),n(o,i)};Y(C,o=>{t(a).name?o(F):o(G,!1)})}x(p),n(S,p)},$$slots:{default:!0}})}),n(f,u)},$$slots:{default:!0}}),x(v),n(e,v),T()}export{vt as component};
···11+import{f as v,a as p}from"../chunks/DTjTDYf3.js";import"../chunks/Dwwks_Q7.js";import{p as m,a as n,X as f,Y as e,Z as s}from"../chunks/Cy0nnqwK.js";import{i as h}from"../chunks/BfVwtNtA.js";import{c as u,C as q}from"../chunks/CvUAJ54q.js";var b=v('<div class="layout svelte-qmtet4"><div class="controls svelte-qmtet4"><a href="/" class="back-button svelte-qmtet4">← Back</a> <div class="fields svelte-qmtet4"><input type="search" placeholder="Search..." class="svelte-qmtet4"/></div></div> <div class="gridarea svelte-qmtet4"><!></div></div>');function O(r,i){m(i,!1);const o=Object.values(u).sort((l,c)=>l.type<c.type?-1:1);h();var t=b(),a=f(e(t),2),d=e(a);q(d,{get cards(){return o}}),s(a),s(t),p(r,t),n()}export{O as component};
···11+import{c as me,a as f,f as $,d as mt,t as xe}from"../chunks/DTjTDYf3.js";import"../chunks/Dwwks_Q7.js";import{p as oe,ae as He,f as Y,a as re,c as P,s as F,g as e,af as Ze,a3 as _e,k as lt,d as Xe,ah as ve,ag as g,Y as v,Z as s,ad as Q,X as r,_ as ce,a$ as ut,aF as B}from"../chunks/Cy0nnqwK.js";import{s as be}from"../chunks/VCyrUZ76.js";import{e as ie,d as Se}from"../chunks/wnUvJIYz.js";import{s as vt,c as pe,r as We,R as ue,l as tt,a as ot,b as Ue,C as _t,d as wt,S as Je,e as bt,G as kt,f as rt,T as xt}from"../chunks/CvUAJ54q.js";import{i as de}from"../chunks/BxqNGrrm.js";import{e as Pe,s as Qe,a as we,i as Pt}from"../chunks/DTiiyNL4.js";import{s as qe,c as St}from"../chunks/Ni3ygk_w.js";import{s as te}from"../chunks/Zp7FgOxX.js";import{p as pt}from"../chunks/IrKOPqpB.js";import{D as Tt,G as Mt}from"../chunks/B5ZTdtgC.js";import{b as at,D as Et}from"../chunks/CFNKoBvp.js";import{b as N}from"../chunks/DIcbJqE8.js";const ht=Symbol("APP_STATE");function Ve(){return Ze(ht)}function $t(l,t){oe(t,!0);let a=F("place");He(ht,{get mode(){return e(a)},set mode(d){P(a,d,!0)}});var p=me(),c=Y(p);be(c,()=>t.children),f(l,p),re()}class Oe extends Event{cards;constructor(t){super("cardsreceived"),this.cards=t}}function It(){return window.crypto.randomUUID()}function Ct(l,t){const{name:a}=vt[t];return{id:It(),homeCard:l,species:t,name:a}}function zt({card:l,field:t},a){return l.source.some(p=>{switch(p.type){case"terrain":if(a.terrain[t.y]?.[t.x]?.type===p.terrain)return!0;break;case"any":return!0}})}function Rt(l){return l.category==="source"||l.category==="production"}function Me(){return window.crypto.randomUUID()}function nt(l){if(l.length===0)throw new TypeError("Cannot choose from an empty array");return l[Math.floor(Math.random()*l.length)]}const ft=Symbol("GAME_STATE");function Ie(){return Ze(ft)}function Dt(l,t){oe(t,!0);const a={biome:"Coast",origin:{x:0,y:0},terrain:[[{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"}],[{type:"grass"},{type:"grass"},{type:"grass"},{type:"soil"},{type:"soil"},{type:"grass"},{type:"grass"},{type:"grass"}],[{type:"grass"},{type:"grass"},{type:"soil"},{type:"soil"},{type:"soil"},{type:"grass"},{type:"grass"},{type:"grass"}],[{type:"grass"},{type:"grass"},{type:"soil"},{type:"soil"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"}],[{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"}],[{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"}],[{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"}],[{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"},{type:"grass"}]]};let p=F(_e([])),c=F(_e([])),d=F(_e([])),h=F(_e([])),y=F(_e({packs:[]})),x=F(_e([])),m=F(0);lt(()=>{const M=window.localStorage.getItem("game_state");if(M)try{(w=>{P(c,w.field,!0),P(p,w.deck,!0),P(x,w.flow,!0),P(d,w.citizens,!0),P(h,w.employment,!0),P(y,w.shop,!0),P(m,w.money,!0)})(JSON.parse(M))}catch{}}),He(ft,{get geography(){return a},get deck(){return e(p)},get field(){return e(c)},get shop(){return e(y)},get flow(){return e(x)},get citizens(){return e(d)},get employment(){return e(h)},get money(){return e(m)},set money(M){P(m,M,!0)}}),Xe(()=>{window.localStorage.setItem("game_state",JSON.stringify({field:e(c),deck:e(p),flow:e(x),citizens:e(d),employment:e(h),shop:e(y),money:e(m)}))});function _(M){for(const{id:w,type:E}of M.cards){const k=pe[E];if(k.category==="residential")for(const o of k.population)e(d).push(...Array.from({length:o.quantity},()=>Ct(w,o.species)))}e(p).push(...M.cards)}function z(M){if(M.pack.price>e(m))return;const w=Object.values(pe),E=M.pack.contents.map(k=>{switch(k.type){case"card":return k.missing?void 0:{id:Me(),type:k.card};case"category":return{id:Me(),type:nt(w.filter(o=>o.category===k.category)).type};case"any":return{id:Me(),type:nt(w).type}}}).filter(k=>k!==void 0);P(m,e(m)-M.pack.price),window.dispatchEvent(new Oe(E))}function C(M){if(M.flow.source===M.flow.destination)return;const w=e(p).find(u=>u.id===M.flow.source);if(!w)return;const E=pe[w.type];if(!("outputs"in E)||!E.outputs.some(u=>u.resource===M.flow.resource))return;const k=e(p).find(u=>u.id===M.flow.destination);if(!k)return;const o=pe[k.type];"inputs"in o&&o.inputs.some(u=>u.resource===M.flow.resource)&&(e(x).some(u=>u.source===M.flow.source&&u.destination===M.flow.destination&&u.resource===M.flow.resource)||e(x).push(M.flow))}function T(M){const w=e(x).findIndex(E=>E.id===M.flow);w!==-1&&e(x).splice(w,1)}var R=me();ie("cardsreceived",ve,_),ie("buypack",ve,z),ie("createflow",ve,C),ie("deleteflow",ve,T);var O=Y(R);be(O,()=>t.children),f(l,R),re()}function Ft(l){return new Map(l.map(t=>[t.id,t]))}function Ot(l){return new Map(l.map(t=>[t.id,t]))}function qt(){return window.crypto.randomUUID()}function At(l){return Map.groupBy(l,t=>t.destination)}function Le(l,t){return l+t}const gt=Symbol("RESOURCE_STATE");function Ke(){return Ze(gt)}function Gt(l,t){oe(t,!0);const a=Ie(),p=g(()=>a.deck),c=g(()=>a.field),d=g(()=>a.flow),h=g(()=>a.geography),y=g(()=>Ft(e(p))),x=g(()=>Ot(e(c))),m=g(()=>At(e(d))),_=g(()=>e(c).filter(w=>!w.loose)),z=g(()=>e(_).map(w=>e(y).get(w.id)).map(w=>pe[w.type]).filter(w=>w.category==="residential").flatMap(w=>w.population).reduce((w,E)=>(w[E.species]??={quantity:0},w[E.species].quantity+=E.quantity,w),{})),C=g(()=>{const w={},E=new Map(Array.from(e(m).entries()).filter(([,o])=>o.length).map(([o,u])=>[o,[...u]])),k=e(_).filter(o=>Rt(pe[e(y).get(o.id).type])).filter(o=>!e(m).get(o.id)?.length).map(o=>o.id);e:for(;k.length;){const o=k.shift(),u=e(x).get(o),I=e(y).get(o),S=pe[I.type];for(const[D,X]of E.entries()){const j=X.filter(Z=>Z.source===o);j.length?E.set(D,j):(E.delete(D),k.push(D))}const q=[];switch(S.category){case"production":{const D=e(m).get(o),X=S.inputs.map(j=>{const Z=[];let W=j.quantity;if(D)for(const L of D){const J=w[L.source]?.outputs;if(J)for(const V of J){if(V.resource!==j.resource)continue;const le=V.quantity-V.consumedBy.map(ge=>ge.quantity).reduce(Le,0);if(W<=le){Z.push({flow:L,output:V,quantity:W}),W=0;break}else Z.push({flow:L,output:V,quantity:le}),W-=le}}return{input:j,remaining:W,consumeFrom:Z}});if(!X.every(j=>j.remaining===0))continue e;for(const j of X)for(const{flow:Z,output:W,quantity:L}of j.consumeFrom)W.consumedBy.push({id:o,quantity:L}),q.push({cardId:Z.source,resource:W.resource,quantity:L});break}case"source":{if(!zt({card:S,field:u},e(h)))continue e;break}case"residential":case"trade":continue e;default:throw new Error("Unreachable")}w[o]={inputs:q,outputs:S.outputs.map(D=>({...D,consumedBy:[]}))}}return w}),T=g(()=>{const w=Object.values(e(C)).flatMap(E=>E.outputs).reduce((E,k)=>{E[k.resource]??={produced:0,consumed:0,demand:0},E[k.resource].produced+=k.quantity;for(const{quantity:o}of k.consumedBy)E[k.resource].consumed+=o;return E},{});for(const[E,{quantity:k}]of Object.entries(e(z)))for(const o of vt[E].needs)o.type==="resource"&&(w[o.resource]??={produced:0,consumed:0,demand:0},w[o.resource].demand+=k*o.quantity);return w}),R=g(()=>Object.entries(e(T)).map(([w,{produced:E,consumed:k,demand:o}])=>{const u=We[w].value;return u*Math.max(0,E-k-o)+u*5*Math.min(o,Math.max(0,E-k))}).reduce(Le,0));He(gt,{get population(){return e(z)},get cardProduction(){return e(C)},get resourceProduction(){return e(T)},get income(){return e(R)}});var O=me(),M=Y(O);be(M,()=>t.children),f(l,O),re()}class Bt extends Event{cardId;constructor(t){super("cardfocus"),this.cardId=t}}var jt=$('<div class="card svelte-isv3d4"> </div>');function Yt(l,t){oe(t,!0);const a=pt(t,"loose",3,!1),p=Ve();function c(){window.dispatchEvent(new Bt(t.id))}const d=g(()=>pe[t.type].name.split(" ").map(h=>h[0]).join(""));{let h=g(()=>p.mode==="place"?t.onMove:void 0);Tt(l,{get onMove(){return e(h)},onClick:c,get x(){return t.x},get y(){return t.y},get loose(){return a()},children:(y,x)=>{var m=jt(),_=v(m,!0);s(m),Q(()=>te(_,e(d))),f(y,m)},$$slots:{default:!0}})}re()}function Xt(l,t){oe(t,!0);var a=me(),p=Y(a);Pe(p,17,()=>t.field,c=>c.id,(c,d)=>{const h=g(()=>t.deck.find(_=>_.id===e(d).id));var y=me(),x=Y(y);{var m=_=>{Yt(_,{get id(){return e(d).id},get x(){return e(d).x},get y(){return e(d).y},get type(){return e(h).type},onMove:(z,C)=>t.onMoveCard(e(d).id,z,C),get loose(){return e(d).loose}})};de(x,_=>{e(h)&&_(m)})}f(c,y)}),f(l,a),re()}class Nt extends Event{card;constructor(t){super("cardplaced"),this.card=t}}class Ut extends Event{flow;constructor(t){super("createflow"),this.flow=t}}class Wt extends Event{flow;constructor(t){super("deleteflow"),this.flow=t}}var Lt=mt('<path role="button" tabindex="0"></path><defs><linearGradient><stop offset="0%" style="stop-color: color-mix(in oklch shorter hue, var(--color-output) 100%, var(--color-input) 0%)"></stop><stop offset="10%" style="stop-color: color-mix(in oklch shorter hue, var(--color-output) 90%, var(--color-input) 10%)"></stop><stop offset="20%" style="stop-color: color-mix(in oklch shorter hue, var(--color-output) 80%, var(--color-input) 20%)"></stop><stop offset="30%" style="stop-color: color-mix(in oklch shorter hue, var(--color-output) 70%, var(--color-input) 30%)"></stop><stop offset="40%" style="stop-color: color-mix(in oklch shorter hue, var(--color-output) 60%, var(--color-input) 40%)"></stop><stop offset="50%" style="stop-color: color-mix(in oklch shorter hue, var(--color-output) 50%, var(--color-input) 50%)"></stop><stop offset="60%" style="stop-color: color-mix(in oklch shorter hue, var(--color-output) 40%, var(--color-input) 60%)"></stop><stop offset="70%" style="stop-color: color-mix(in oklch shorter hue, var(--color-output) 30%, var(--color-input) 70%)"></stop><stop offset="80%" style="stop-color: color-mix(in oklch shorter hue, var(--color-output) 20%, var(--color-input) 80%)"></stop><stop offset="90%" style="stop-color: color-mix(in oklch shorter hue, var(--color-output) 10%, var(--color-input) 90%)"></stop><stop offset="100%" style="stop-color: color-mix(in oklch shorter hue, var(--color-output) 0%, var(--color-input) 100%)"></stop></linearGradient></defs>',1);function st(l,t){const d=g(()=>`${t.x1}_${t.y1}_${t.x2}_${t.y2}`),h=g(()=>t.x2-t.x1),y=g(()=>t.y2-t.y1),x=g(()=>Math.sqrt(e(h)**2+e(y)**2)),m=g(()=>e(x)/2),_=g(()=>Math.atan2(e(y),e(h))),z=g(()=>Math.sign(e(h))),C=g(()=>Math.sign(e(y))),T=g(()=>Math.sign(e(h))||1),R=g(()=>t.x1+e(h)/2+e(m)*Math.sin(e(_))/2*e(T)),O=g(()=>t.y1+e(y)/2-e(m)*Math.cos(e(_))/2*e(T)),M=g(()=>t.x1+e(h)/2+(e(m)+12)*Math.sin(e(_))/2*e(T)),w=g(()=>t.y1+e(y)/2-(e(m)+12)*Math.cos(e(_))/2*e(T)),E=g(()=>1-Math.max(0,Math.min(1,(e(x)-256)/384)*.75));var k=Lt(),o=Y(k);o.__click=function(...q){t.onclick?.apply(this,q)};let u;var I=r(o),S=v(I);s(I),Q(()=>{u=Qe(o,0,"flow live svelte-da3do8",null,u,{selectable:!!t.onclick}),qe(o,`--efficacy: ${e(E)??""}; fill: url(#${e(d)??""}); stroke: url(#${e(d)??""})`),we(o,"d",`M ${t.x1??""} ${t.y1??""} Q ${e(R)??""} ${e(O)??""} ${t.x2??""} ${t.y2??""} Q ${e(M)??""} ${e(w)??""} ${t.x1??""} ${t.y1??""}`),we(S,"id",e(d)),we(S,"x1",e(z)===-1?1:0),we(S,"y1",e(C)===-1?1:0),we(S,"x2",e(z)===-1?0:1),we(S,"y2",e(C)===-1?0:1)}),f(l,k)}Se(["click"]);class it extends Event{sourceType;resource;clientX;clientY;constructor({resource:t,sourceType:a,clientX:p,clientY:c}){super("startflow"),this.sourceType=a,this.resource=t,this.clientX=p,this.clientY=c}}var Ht=$('<div class="piprow svelte-go3dgf"><div class="pip input svelte-go3dgf" role="presentation"></div> <span> <!></span></div>'),Zt=$('<div class="pips svelte-go3dgf"></div>'),Jt=$('<div class="piprow svelte-go3dgf"><span><!> </span> <div class="pip output svelte-go3dgf" role="presentation"></div></div>'),Qt=$('<div class="pips svelte-go3dgf"></div>'),Vt=$('<div class="gridspace svelte-go3dgf"><!> <!></div>');function Kt(l,t){oe(t,!0);const a=g(()=>pe[t.type]),p=_e({}),c=_e({});function d(T){return p[T]}function h(T){return c[T]}var y={findInput:d,findOutput:h},x=Vt(),m=v(x);{var _=T=>{var R=Zt();Pe(R,21,()=>e(a).inputs,O=>O.resource,(O,M)=>{var w=Ht(),E=v(w),k=g(()=>tt(ot(S=>new it({resource:e(M).resource,sourceType:"input",clientX:S.clientX,clientY:S.clientY}))));E.__mousedown=function(...S){e(k)?.apply(this,S)},N(E,(S,q)=>p[q.resource]=S,S=>p?.[S.resource],()=>[e(M)]);var o=r(E,2),u=v(o),I=r(u);ue(I,{get id(){return e(M).resource}}),s(o),s(w),Q(()=>te(u,`${e(M).quantity??""} → `)),ie("startflow",E,function(...S){t.onStartFlow?.apply(this,S)}),f(O,w)}),s(R),f(T,R)};de(m,T=>{"inputs"in e(a)&&T(_)})}var z=r(m,2);{var C=T=>{var R=Qt();Pe(R,21,()=>e(a).outputs,O=>O.resource,(O,M)=>{var w=Jt(),E=v(w),k=v(E);ue(k,{get id(){return e(M).resource}});var o=r(k);s(E);var u=r(E,2),I=g(()=>tt(ot(S=>new it({resource:e(M).resource,sourceType:"output",clientX:S.clientX,clientY:S.clientY}))));u.__mousedown=function(...S){e(I)?.apply(this,S)},N(u,(S,q)=>c[q.resource]=S,S=>c?.[S.resource],()=>[e(M)]),s(w),Q(()=>te(o,` → ${e(M).quantity??""}`)),ie("startflow",u,function(...S){t.onStartFlow?.apply(this,S)}),f(O,w)}),s(R),f(T,R)};de(z,T=>{"outputs"in e(a)&&T(C)})}return s(x),Q(()=>{qe(x,`--grid-x: ${t.x??""}; --grid-y: ${t.y??""}`),we(x,"data-cardid",t.id)}),f(l,x),re(y)}Se(["mousedown"]);var eo=$('<!> <div class="full svelte-13qno0"><svg><!><!></svg></div>',1);function to(l,t){oe(t,!0);const a=g(()=>t.flow.map(({source:o,destination:u,...I})=>{const S=t.field.find(D=>D.id===o),q=t.field.find(D=>D.id===u);if(!(!S||!q))return{...I,source:S,destination:q}}).filter(o=>o!==void 0).toSorted((o,u)=>o.priority-u.priority));let p=F(0),c=F(0),d=F(void 0),h=F(0),y=F(0);const x=_e({});function m(o,u){P(d,{resource:o.resource,sourceType:o.sourceType,anchor:o.currentTarget,card:u},!0),P(h,o.clientX,!0),P(y,o.clientY,!0)}function _(o){e(d)&&(P(h,o.clientX,!0),P(y,o.clientY,!0))}function z(o){if(o.button===0&&e(d)){const u=document.elementFromPoint(e(h),e(y))?.closest("[data-cardid]");if(u){const I=u.dataset.cardid;window.dispatchEvent(new Ut({id:qt(),priority:0,source:e(d).sourceType==="output"?e(d).card.id:I,destination:e(d).sourceType==="output"?I:e(d).card.id,resource:e(d).resource}))}P(h,0),P(y,0),P(d,void 0)}}function C(o){window.dispatchEvent(new Wt(o))}var T=eo();ie("mousemove",ve,_),ie("mouseup",ve,z);var R=Y(T);Pe(R,17,()=>t.field,o=>o.id,(o,u)=>{const I=g(()=>t.deck.find(S=>S.id===e(u).id));N(Kt(o,{get id(){return e(u).id},get type(){return e(I).type},get x(){return e(u).x},get y(){return e(u).y},onStartFlow:S=>m(S,e(u))}),(S,q)=>x[q.id]=S,S=>x?.[S.id],()=>[e(u)])});var O=r(R,2),M=v(O),w=v(M);Pe(w,17,()=>e(a),o=>o.id,(o,u,I,S)=>{const q=g(()=>x[e(u).source.id]?.findOutput(e(u).resource)?.getBoundingClientRect()),D=g(()=>x[e(u).destination.id]?.findInput(e(u).resource)?.getBoundingClientRect());var X=me(),j=Y(X);{var Z=W=>{{let L=g(()=>e(q).x+e(q).width/2),J=g(()=>e(q).y+e(q).height/2),V=g(()=>e(D).x+e(D).width/2),le=g(()=>e(D).y+e(D).height/2);st(W,{get x1(){return e(L)},get y1(){return e(J)},get x2(){return e(V)},get y2(){return e(le)},onclick:()=>C(e(u).id)})}};de(j,W=>{e(q)&&e(D)&&W(Z)})}f(o,X)});var E=r(w);{var k=o=>{const u=g(()=>e(d).anchor.getBoundingClientRect()),I=g(()=>e(u).x+e(u).width/2),S=g(()=>e(u).y+e(u).height/2);st(o,{get x1(){return e(I)},get y1(){return e(S)},get x2(){return e(h)},get y2(){return e(y)}})};de(E,o=>{e(d)&&o(k)})}s(M),s(O),Q(()=>we(M,"viewBox",`0 0 ${e(c)??""} ${e(p)??""}`)),at(O,"clientWidth",o=>P(c,o)),at(O,"clientHeight",o=>P(p,o)),f(l,T),re()}var oo=$('<div class="terrain svelte-11xczzg"></div>'),ro=$("<!> <!> <!> <!>",1);function ao(l,t){oe(t,!0);const a=128,p=Ve(),c=Ie(),d=g(()=>c.geography),h=g(()=>c.deck),y=g(()=>c.field),x=g(()=>c.flow);let m=F(0),_=F(0),z=F(0),C=F(0);function T(I,S,q){const D=e(y).find(X=>X.id===I);if(D){const X=D.loose?Math.round((D.x+S)/a):D.x+Math.round(S/a),j=D.loose?Math.round((D.y+q)/a):D.y+Math.round(q/a);if(e(y).some(Z=>Z.x===X&&Z.y===j))return;D.x=X,D.y=j,D.loose=!1,window.dispatchEvent(new Nt(D))}}const R=g(()=>Math.floor(e(z)/a)),O=g(()=>Math.floor(e(C)/a)),M=g(()=>Math.floor((e(z)+e(m))/a)+1),w=g(()=>Math.floor((e(C)+e(_))/a)+1);function E({x:I,y:S}){return e(m)===0||e(_)===0?!1:e(R)<=I&&I<e(M)&&e(O)<=S&&S<e(w)}const k=g(()=>e(d).terrain.slice(Math.max(0,e(O)-e(d).origin.y),Math.max(0,e(w)-e(d).origin.y)).flatMap((I,S)=>I.slice(Math.max(0,e(R)-e(d).origin.x),Math.max(0,e(M)-e(d).origin.x)).map((q,D)=>({x:D+Math.max(e(R)-e(d).origin.x,0),y:S+Math.max(e(O)-e(d).origin.y,0),...q})))),o=g(()=>e(y).filter(I=>I.loose||E(I))),u=g(()=>e(o).filter(I=>!I.loose));Et(l,{get offsetX(){return e(z)},set offsetX(I){P(z,I,!0)},get offsetY(){return e(C)},set offsetY(I){P(C,I,!0)},get clientWidth(){return e(m)},set clientWidth(I){P(m,I,!0)},get clientHeight(){return e(_)},set clientHeight(I){P(_,I,!0)},children:(I,S)=>{var q=ro(),D=Y(q);Pe(D,16,()=>e(k),L=>L,(L,J)=>{var V=oo();Q(()=>{we(V,"data-type",J.type),qe(V,`--grid-x: ${J.x??""}; --grid-y: ${J.y??""}`)}),f(L,V)});var X=r(D,2);Mt(X,{});var j=r(X,2);Xt(j,{get field(){return e(o)},get deck(){return e(h)},onMoveCard:T});var Z=r(j,2);{var W=L=>{to(L,{get field(){return e(u)},get deck(){return e(h)},get flow(){return e(x)}})};de(Z,L=>{p.mode==="flow"&&L(W)})}f(I,q)},$$slots:{default:!0}}),re()}class no extends Event{card;constructor(t){super("cardfielded"),this.card=t}}var so=$('<dialog class="svelte-1ylobv7"><!></dialog>');function io(l,t){oe(t,!0);let a=F(void 0),p=F(void 0);function c(_){P(p,_,!0),e(a)?.show()}function d(){e(a)?.close()}var h={show:c,close:d},y=so();ie("click",ve,d);var x=v(y);{var m=_=>{Ue(_,{get card(){return e(p)}})};de(x,_=>{e(p)&&_(m)})}return s(y),N(y,_=>P(a,_),()=>e(a)),f(l,y),re(h)}var co=$('<div class="row svelte-15gpl1s"></div>');function yt(l,t){var a=co();Pe(a,21,()=>t.items,Pt,(p,c)=>{var d=me(),h=Y(d);be(h,()=>t.item,()=>e(c)),f(p,d)}),s(a),f(l,a)}var lo=$('<dialog class="svelte-eun80g"><!></dialog>');function uo(l,t){oe(t,!0);let a=F(void 0);function p(){e(a)?.showModal()}function c(){e(a)?.close()}var d={show:p,close:c},h=lo(),y=v(h);return be(y,()=>t.children),s(h),N(h,x=>P(a,x),()=>e(a)),Q(()=>qe(h,t.style)),f(l,h),re(d)}var vo=$('<div class="card svelte-t8l7ck"><!></div>'),po=$('<article class="svelte-t8l7ck"><header class="svelte-t8l7ck"><h1>Card Received!</h1></header> <!> <button>Sweet!</button></article>');function ho(l,t){oe(t,!0);let a=F(void 0),p=F(_e([]));function c(h){P(p,h,!0),e(a)?.show()}var d={show:c};return N(uo(l,{style:"--shimmer-color: rgb(164 85 217)",children:(h,y)=>{var x=po(),m=r(v(x),2);yt(m,{get items(){return e(p)},item:(C,T=ce)=>{var R=vo(),O=v(R);Ue(O,{get card(){return T()}}),s(R),f(C,R)}});var _=r(m,2);_.__click=()=>e(a)?.close(),s(x),f(h,x)},$$slots:{default:!0}}),h=>P(a,h,!0),()=>e(a)),re(d)}Se(["click"]);var fo=$("<dialog><!></dialog>");function et(l,t){oe(t,!0);const a=pt(t,"sizing",3,"fit");let p=F(void 0);function c(){e(p)?.showModal()}function d(){e(p)?.close()}var h={show:c,close:d},y=fo(),x=v(y);return be(x,()=>t.children),s(y),N(y,m=>P(p,m),()=>e(p)),Q(()=>Qe(y,1,St(a()),"svelte-ta60gp")),f(l,y),re(h)}class go extends Event{constructor(){super("deckopened")}}var yo=$('<article><header class="svelte-rkzgio"><h1>Deck</h1> <button class="close svelte-rkzgio">×</button></header> <div class="content svelte-rkzgio"><!></div></article>');function mo(l,t){oe(t,!0);const a=Ie(),p=g(()=>a.deck),c=g(()=>a.field),d=g(()=>e(p).map(_=>({...pe[_.type],deckCard:_,isFielded:e(c).some(z=>z.id===_.id)})));let h=F(void 0);function y(){e(h)?.show(),window.dispatchEvent(new go)}function x(){e(h)?.close()}var m={show:y,close:x};return N(et(l,{sizing:"fill",children:(_,z)=>{var C=yo(),T=v(C),R=r(v(T),2);R.__click=()=>e(h).close(),s(T);var O=r(T,2),M=v(O);_t(M,{get cards(){return e(d)},card:(E,k=ce)=>{{let o=g(()=>wt(k())(t.onSelectCard));Ue(E,{get card(){return k()},get onSelect(){return e(o)},get disabled(){return k().isFielded}})}}}),s(O),s(C),f(_,C)},$$slots:{default:!0}}),_=>P(h,_,!0),()=>e(h)),re(m)}Se(["click"]);function Ee(l,t){Je(l,{style:"--shimmer-color: oklch(from var(--color-money) calc(l - 0.2) c h)",children:(a,p)=>{var c=me(),d=Y(c);{var h=x=>{var m=xe();Q(()=>te(m,`$${t.amount??""}`)),f(x,m)},y=x=>{var m=xe("Money");f(x,m)};de(d,x=>{t.amount!==void 0?x(h):x(y,!1)})}f(a,c)}})}var _o=$('<tr class="svelte-mterps"><th class="svelte-mterps"><!></th><td class="produced svelte-mterps"> </td><td class="consumed svelte-mterps"> </td><td class="svelte-mterps"><span class="produced svelte-mterps"> </span> / <span class="consumed svelte-mterps"> </span></td><td class="consumed svelte-mterps"> </td><td class="svelte-mterps"><!></td><td class="svelte-mterps"><!></td></tr>'),wo=$('<table class="svelte-mterps"><thead class="svelte-mterps"><tr class="svelte-mterps"><th class="svelte-mterps">Resource</th><th class="svelte-mterps">Produced</th><th class="svelte-mterps">Consumed</th><th class="svelte-mterps">Satisfaction</th><th class="svelte-mterps">Exported</th><th class="svelte-mterps">Value</th><th class="svelte-mterps">Profit</th></tr></thead><tbody></tbody><tfoot class="svelte-mterps"><tr class="svelte-mterps"><th class="svelte-mterps">Total</th><td class="svelte-mterps"></td><td class="svelte-mterps"></td><td class="svelte-mterps"></td><td class="svelte-mterps"></td><td class="svelte-mterps"></td><td class="svelte-mterps"><!></td></tr></tfoot></table>');function bo(l,t){oe(t,!0);const a=g(()=>Object.entries(t.resourceProduction).map(([m,{produced:_,consumed:z,demand:C}])=>{const T=We[m].value;return T*Math.max(0,_-z-C)+T*5*Math.min(C,Math.max(0,_-z))}).reduce(Le,0));var p=wo(),c=r(v(p));Pe(c,21,()=>Object.entries(t.resourceProduction),([m,_])=>m,(m,_)=>{var z=g(()=>ut(e(_),2));let C=()=>e(z)[0],T=()=>e(z)[1];const R=g(()=>Math.max(0,T().produced-T().consumed-T().demand)),O=g(()=>Math.min(T().demand,Math.max(0,T().produced-T().consumed))),M=g(()=>We[C()].value);var w=_o(),E=v(w),k=v(E);ue(k,{get id(){return C()}}),s(E);var o=r(E),u=v(o,!0);s(o);var I=r(o),S=v(I,!0);s(I);var q=r(I),D=v(q),X=v(D,!0);s(D);var j=r(D,2),Z=v(j,!0);s(j),s(q);var W=r(q),L=v(W,!0);s(W);var J=r(W),V=v(J);Ee(V,{get amount(){return e(M)}}),s(J);var le=r(J),ge=v(le);{let ye=g(()=>e(M)*e(R)+e(M)*5*e(O));Ee(ge,{get amount(){return e(ye)}})}s(le),s(w),Q(()=>{te(u,T().produced),te(S,T().consumed),te(X,e(O)),te(Z,T().demand),te(L,e(R))}),f(m,w)}),s(c);var d=r(c),h=v(d),y=r(v(h),6),x=v(y);Ee(x,{get amount(){return e(a)}}),s(y),s(h),s(d),s(p),f(l,p),re()}var ko=$('<article><header class="svelte-1dvzbw0"><h1>Production Report</h1> <button class="close svelte-1dvzbw0">×</button></header> <div class="content svelte-1dvzbw0"><!></div></article>');function xo(l,t){oe(t,!0);const a=Ke(),p=g(()=>a.resourceProduction);let c=F(void 0);function d(){e(c)?.show()}function h(){e(c)?.close()}var y={show:d,close:h};return N(et(l,{children:(x,m)=>{var _=ko(),z=v(_),C=r(v(z),2);C.__click=()=>e(c).close(),s(z);var T=r(z,2),R=v(T);bo(R,{get resourceProduction(){return e(p)}}),s(T),s(_),f(x,_)},$$slots:{default:!0}}),x=>P(c,x,!0),()=>e(c)),re(y)}Se(["click"]);class Po extends Event{constructor(){super("shopopened")}}var So=$('<div class="category svelte-legrwj"> </div>'),To=$('<div class="card-back svelte-legrwj"><!></div>');function ct(l,t){var a=To(),p=v(a);{var c=d=>{var h=So(),y=v(h,!0);s(h),Q(()=>te(y,t.category)),f(d,h)};de(p,d=>{t.category&&d(c)})}s(a),f(l,a)}function Ne(l,t){Je(l,{style:"--shimmer-color: var(--color-pack)",children:(a,p)=>{var c=me(),d=Y(c);be(d,()=>t.children),f(a,c)}})}var Mo=$('<div class="shimmer svelte-y2bo7g"><!></div>');function dt(l,t){var a=Mo(),p=v(a);be(p,()=>t.children??ce),s(a),Q(()=>qe(a,t.style)),f(l,a)}var Eo=$('<div class="info svelte-1h5lzcn"> </div>'),$o=$('<s class="price-label svelte-1h5lzcn"> </s>'),Io=$('<div class="price-tag replaced svelte-1h5lzcn"><!></div>'),Co=$('<div class="price-label svelte-1h5lzcn"> </div>'),zo=$('<div class="card svelte-1h5lzcn"><!></div>'),Ro=$('<div class="pack svelte-1h5lzcn" role="button"><div class="banner svelte-1h5lzcn"><!></div> <!> <!> <div><!></div></div> <dialog class="tooltip svelte-1h5lzcn"><header class="svelte-1h5lzcn"><!></header> <!></dialog>',1);function Do(l,t){oe(t,!0);let a=F(!1);var p=Ro(),c=Y(p);we(c,"tabindex",0),c.__click=function(...k){t.onSelect?.apply(this,k)};var d=g(()=>bt(t.onSelect));c.__keydown=function(...k){e(d)?.apply(this,k)},c.__mouseover=()=>P(a,!0),c.__mouseout=()=>P(a,!1);var h=v(c),y=v(h);Ne(y,{children:(k,o)=>{B();var u=xe();Q(()=>te(u,t.pack.name)),f(k,u)}}),s(h);var x=r(h,2);{var m=k=>{var o=Eo(),u=v(o,!0);s(o),Q(()=>te(u,t.pack.description)),f(k,o)};de(x,k=>{t.pack.description&&k(m)})}var _=r(x,2);{var z=k=>{var o=Io(),u=v(o);dt(u,{style:"--shimmer-color: oklch(from var(--color-money) l calc(c - 0.075) h); border-radius: 1rem; padding-inline: 1rem;",children:(I,S)=>{var q=$o(),D=v(q);s(q),Q(()=>te(D,`$${t.pack.originalPrice??""}`)),f(I,q)}}),s(o),f(k,o)};de(_,k=>{t.pack.originalPrice&&k(z)})}var C=r(_,2);let T;var R=v(C);dt(R,{style:"--shimmer-color: var(--color-money); border-radius: 1rem; padding-inline: 1rem;",children:(k,o)=>{var u=Co(),I=v(u);s(u),Q(()=>te(I,`$${t.pack.price??""}`)),f(k,u)}}),s(C),s(c);var O=r(c,2),M=v(O),w=v(M);Ne(w,{children:(k,o)=>{B();var u=xe();Q(()=>te(u,t.pack.name)),f(k,u)}}),s(M);var E=r(M,2);yt(E,{get items(){return t.pack.contents},item:(o,u=ce)=>{var I=zo(),S=v(I);{var q=X=>{Ue(X,{get card(){return pe[u().card]},get disabled(){return u().missing}})},D=X=>{var j=me(),Z=Y(j);{var W=J=>{ct(J,{get category(){return u().category}})},L=J=>{var V=me(),le=Y(V);{var ge=ye=>{ct(ye,{})};de(le,ye=>{u().type==="any"&&ye(ge)},!0)}f(J,V)};de(Z,J=>{u().type==="category"?J(W):J(L,!1)},!0)}f(X,j)};de(S,X=>{u().type==="card"?X(q):X(D,!1)})}s(I),f(o,I)}}),s(O),Q(()=>{T=Qe(C,1,"price-tag svelte-1h5lzcn",null,T,{replacement:!!t.pack.originalPrice}),O.open=e(a)}),ie("focus",c,()=>P(a,!0)),ie("blur",c,()=>P(a,!1)),f(l,p),re()}Se(["click","keydown","mouseover","mouseout"]);class Fo extends Event{pack;constructor(t){super("buypack"),this.pack=t}}var Oo=$('<article><header class="svelte-1w43591"><h1>Shop</h1> <button class="close svelte-1w43591">×</button></header> <div class="content svelte-1w43591"><!></div></article>');function qo(l,t){oe(t,!0);const a=Ie(),p=g(()=>a.shop);let c=F(void 0);function d(){e(c)?.show(),window.dispatchEvent(new Po)}function h(m){e(c)?.close(),window.dispatchEvent(new Fo(m))}function y(){e(c)?.close()}var x={show:d,close:y};return N(et(l,{sizing:"fill",children:(m,_)=>{var z=Oo(),C=v(z),T=r(v(C),2);T.__click=()=>e(c).close(),s(C);var R=r(C,2),O=v(R);kt(O,{get items(){return e(p).packs},item:(w,E=ce)=>{Do(w,{get pack(){return E()},onSelect:()=>h(E())})}}),s(R),s(z),f(m,z)},$$slots:{default:!0}}),m=>P(c,m,!0),()=>e(c)),re(x)}Se(["click"]);var Ao=$("<span><!> <!></span>"),Go=$('<button class="svelte-og50z2">Prod</button> <button class="svelte-og50z2">Shop</button>',1),Bo=$('<div class="area svelte-og50z2"><div class="status svelte-og50z2"><div class="title-area svelte-og50z2"><span class="title svelte-og50z2">Your Town</span> <span> </span> <span> </span></div> <div class="resource-area svelte-og50z2"></div></div> <div class="menu svelte-og50z2" role="toolbar"><a class="button svelte-og50z2" href="/">Menu</a> <button class="svelte-og50z2">Reset</button> <button class="svelte-og50z2"> </button> <!> <button class="svelte-og50z2">Deck</button></div></div> <!> <!> <!> <!> <!>',1);function jo(l,t){oe(t,!0);const a=Ve(),p=Ie(),c=g(()=>p.deck),d=g(()=>p.field),h=g(()=>p.money),y=Ke(),x=g(()=>y.resourceProduction),m=g(()=>y.income);let _=F(void 0),z=F(void 0),C=F(void 0),T=F(void 0),R=F(void 0);const O=g(()=>e(c).find(n=>n.type==="trading-centre")),M=g(()=>e(d).find(n=>n.id===e(O)?.id)),w=g(()=>e(M)&&!e(M).loose);function E(){e(_)?.show()}function k(){e(z)?.show()}function o(){a.mode=a.mode==="flow"?"place":"flow"}function u(){e(R)?.show()}function I(n){window.dispatchEvent(new no(n.deckCard)),e(d).push({id:n.deckCard.id,x:0,y:0,loose:!0}),e(_)?.close()}function S(){window.localStorage.clear(),window.location.reload()}function q(n){e(C)?.show(n.cards.map(b=>pe[b.type]))}function D(n){const b=e(c).find(H=>H.id===n.cardId);if(!b)return;const G=pe[b.type];window.setTimeout(()=>e(T)?.show(G),0)}var X=Bo();ie("cardsreceived",ve,q),ie("cardfocus",ve,D);var j=Y(X),Z=v(j),W=v(Z),L=r(v(W),2),J=v(L);s(L);var V=r(L,2),le=v(V);s(V),s(W);var ge=r(W,2);Pe(ge,21,()=>Object.entries(e(x)),([n,{produced:b,consumed:G,demand:H}])=>n,(n,b)=>{var G=g(()=>ut(e(b),2));let H=()=>e(G)[0],ne=()=>e(G)[1].produced,ae=()=>e(G)[1].consumed,se=()=>e(G)[1].demand;var ee=Ao(),he=v(ee);ue(he,{get id(){return H()}});var ke=r(he,2);{var De=Te=>{var Fe=xe();Q(()=>te(Fe,`${ne()??""}/${se()??""}`)),f(Te,Fe)},Ye=Te=>{var Fe=xe();Q(()=>te(Fe,ne()-ae())),f(Te,Fe)};de(ke,Te=>{se()?Te(De):Te(Ye,!1)})}s(ee),f(n,ee)}),s(ge),s(Z);var ye=r(Z,2),Ce=r(v(ye),2);Ce.__click=S;var $e=r(Ce,2);$e.__click=o;var Ae=v($e);s($e);var ze=r($e,2);{var Ge=n=>{var b=Go(),G=Y(b);G.__click=u;var H=r(G,2);H.__click=k,f(n,b)};de(ze,n=>{e(w)&&n(Ge)})}var Be=r(ze,2);Be.__click=E,s(ye),s(j);var Re=r(j,2);N(xo(Re,{}),n=>P(R,n,!0),()=>e(R));var je=r(Re,2);N(mo(je,{onSelectCard:I}),n=>P(_,n,!0),()=>e(_));var U=r(je,2);N(qo(U,{}),n=>P(z,n,!0),()=>e(z));var i=r(U,2);N(ho(i,{}),n=>P(C,n,!0),()=>e(C));var A=r(i,2);N(io(A,{}),n=>P(T,n,!0),()=>e(T)),Q(()=>{te(J,`$${e(h)??""}`),te(le,`$${e(m)??""} / day`),te(Ae,`Mode: ${a.mode??""}`)}),f(l,X),re()}Se(["click"]);function K(l,t){oe(t,!0);const a=g(()=>pe[t.id]);Je(l,{style:"--shimmer-color: var(--color-card)",children:(p,c)=>{B();var d=xe();Q(()=>te(d,e(a).name)),f(p,d)}}),re()}var Yo=$('<dialog class="svelte-1chcjmg"><article class="svelte-1chcjmg"><!></article> <div class="controls svelte-1chcjmg"><!></div></dialog>');function fe(l,t){oe(t,!0);let a=F(void 0);function p(){e(a)?.showModal()}function c(){e(a)?.close(),t.onDismiss?.()}var d={show:p},h=Yo(),y=v(h),x=v(y);be(x,()=>t.children),s(y);var m=r(y,2),_=v(m);return be(_,()=>t.actions,()=>c),s(m),s(h),N(h,z=>P(a,z),()=>e(a)),f(l,h),re(d)}var Xo=$("<button>Of course!</button>"),No=$(`<p>Hello mayor, and welcome to the location of our new town! All of us are just getting started
22+ here ourselves. We haven't even placed a single card yet!</p> <p>I have the card for a <!> right here, I'll put it into your deck.
33+ Since you're in charge here, I'll let you see about setting that up for us. Start by opening up the
44+ deck view.</p> <p class="info svelte-1195hbs">The button to open the deck view is at the bottom right.</p>`,1),Uo=$("<button>Got it!</button>"),Wo=$(`<p>This is the deck view; the cards you see here are yours. There are all sorts of cards to be
55+ collected, each one providing a different function. I'm sure you'll soon have a whole collection
66+ and turn this town into a great place to live!</p> <p>For now, we just need to set up that <!> for your citizens to live
77+ in.</p> <p class="info svelte-1195hbs">Click a card to drop it into the world.</p>`,1),Lo=$("<button>On it!</button>"),Ho=$(`<p>The <!> is now on the field, but it's sitting loose. Make sure to
88+ properly set into the grid to ensure that it stays put.</p> <p class="info svelte-1195hbs">Click and drag cards to relocate them.</p>`,1),Zo=$("<button>Got it!</button>"),Jo=$(`<p>Residential cards provide housing for residents in your town. The <!> in particular has room for 6 <!> residents.</p> <p>Each type of resident has different needs. When the needs of a resident are satisfied, their
99+ productivity increases and they will pay you more <!>.</p> <p>A <!> requires 1 <!> per day to be satisfied. Luckily,
1010+ I have a <!> card already, which will allow us to produce that <!> right here in town!</p> <p class="info svelte-1195hbs">Place a <!> from your deck into your town.</p>`,1),Qo=$("<button>Ok!</button>"),Vo=$(`<p>The <!> is a Production card. Production cards produce resources by consuming
1111+ the resources of other cards nearby. To produce 5 units of <!>, the <!> uses 1 unit of <!> and 4 units of <!>.</p> <p>If we want this <!> working, we'll need to get our hands on those resources.
1212+ I think I have a few more cards that might help with that, take a look and see what you can do.</p>`,1),Ko=$("<button>Makes sense to me!</button>"),er=$(`<p>The <!> and <!> cards are both Source cards, meaning
1313+ they are able to produce resources without needing to consume anything first. Instead, they allow
1414+ you to harvest resources straight from the source.</p> <p>While the <!> is able to produce water from anywhere, the <!> requires being placed on fertile <!> in order to
1515+ grow wheat.</p> <p class="info svelte-1195hbs">Make sure your new cards are both producing.</p>`,1),tr=$("<button>Wow!</button>"),or=$(`<p>The <!> is producing, but without a <!> in town,
1616+ there's nothing for us to do with the <!>.</p> <p>Luckily, I've got one last card here with me, it's a rare <!> card. You'll
1717+ probably never get your hands on another one of these. This <!> will become the backbone of our town, allowing us to sell our excess resources in exchange for <!>.</p> <p class="info svelte-1195hbs">Place the <!>.</p>`,1),rr=$("<button>I do like money...</button>"),ar=$(`<p>This is a world of production and trade, so all resources are reported in a rate of <strong>production per day</strong>. Other than <!>, there's not much point in
1818+ stockpiling any resources. Instead, at the end of each day, any excess resources we haven't used
1919+ get exported via the <!>.</p> <p>The <!> produces 4 <!> per day, but a unit of <!> is worth just <!> when exported. The <!> on the other hand isn't even worth selling. Unused resources aren't worth
2020+ much!</p> <p>Eventually most of your income will be coming from satisfied residents buying the things they
2121+ need, but for now I'll just work out a deal real quick for your first export.</p>`,1),nr=$("<button>Exciting!</button>"),sr=$(`<p>The other thing the <!> allows you to trade for is more cards. For a
2222+ little bit of <!>, you can buy a pack containing a few common cards which you can add
2323+ to your town.</p> <p class="info svelte-1195hbs">Open up the shop with the button at the bottom right.</p>`,1),ir=$("<button>That's ok...</button>"),cr=$(`<p>The shop offers new cards in <strong>Packs</strong>. The available packs are always changing,
2424+ and each one contains a different assortment of cards, so be sure to check back often and buy
2525+ any that catch your eye.</p> <p>There's one pack available right now, the <!>, but I have a
2626+ confession to make... I already opened it and gave you most of the cards. There's still one left
2727+ though, I didn't want to take away all the fun!</p> <p class="info svelte-1195hbs">Buy (the rest of) the <!>.</p>`,1),dr=$("<button>Cool!</button>"),lr=$(`<p>There's just one last step: to set up the transportation of resources from where they are
2828+ produced, to where they will be consumed. As the mayor, you're responsible for determining all
2929+ of what goes where and how it gets there.</p> <p>In general, it's hard to move things long distances by hand in one day. One or two tiles is
3030+ totally fine, but beyond that you'll be losing about 25% of the total throughput per tile. Any
3131+ more than 5 tiles is too far for things to be carried by hand in a day at all, though you might
3232+ be able find cards for useful tools to help with that type of thing later on.</p> <p class="info svelte-1195hbs">Enter Flow mode and drag connections from producers to consumers.</p>`,1),ur=$("<button>I will!</button>"),vr=$(`<p>That's it, the <!> is finally able to make its <!>!
3333+ You don't have to set up connections for residents finding and consuming their needs, or for
3434+ resources to be exported, that all happens automatically, so you'll find that already your
3535+ expected profits for tomorrow are looking quite healthy!</p> <p>You'll be on your own from here on out. I look forward to seeing where you take the town, and
3636+ meeting all the people who will eventually move in! Good luck, and I hope you have fun!</p> <p class="info svelte-1195hbs">Cards don't only come from packs. Earn powerful and rare cards by participating in certain
3737+ activities in the real world, or trade your cards online with other players to get exactly the
3838+ ones you need.</p>`,1),pr=$("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1);function hr(l,t){oe(t,!0);const a=Ie(),p=g(()=>a.deck),c=g(()=>a.field),d=g(()=>a.shop),h=Ke(),y=g(()=>h.resourceProduction);let x=F(void 0),m=F(void 0),_=F(void 0),z=F(void 0),C=F(void 0),T=F(void 0),R=F(void 0),O=F(void 0),M=F(void 0),w=F(void 0),E=F(void 0),k=F(void 0),o=F("intro");lt(()=>{const U=window.localStorage.getItem("tutorial_step");if(!U)return;const i=JSON.parse(U);typeof i=="string"&&P(o,i,!0)}),Xe(()=>{window.localStorage.setItem("tutorial_step",JSON.stringify(e(o))),e(o)==="intro"&&window.setTimeout(()=>e(x).show(),500),e(o)==="buy-pack"&&window.setTimeout(()=>e(M).show(),500)}),Xe(()=>{e(o)==="await-production"&&e(y).wheat&&e(y).wheat.produced>0&&window.setTimeout(()=>e(R).show(),500)}),Xe(()=>{e(o)==="produce-bread"&&e(y).bread&&e(y).bread.produced>0&&(window.setTimeout(()=>e(k).show(),500),P(o,"complete"))});function u(){window.setTimeout(()=>{window.dispatchEvent(new Oe([{id:Me(),type:"cat-neighbourhood"}])),P(o,"place-neighbourhood")},500)}function I(){window.setTimeout(()=>{window.dispatchEvent(new Oe([{id:Me(),type:"bakery"}])),P(o,"place-bakery")},500)}function S(){window.setTimeout(()=>{window.dispatchEvent(new Oe([{id:Me(),type:"water-well"},{id:Me(),type:"wheat-farm"}])),P(o,"place-sources")},500)}function q(){window.setTimeout(()=>{window.dispatchEvent(new Oe([{id:Me(),type:"trading-centre"}])),P(o,"place-trading-centre")},500)}function D(){a.money+=4,P(o,"buy-pack"),e(d).packs.push({id:window.crypto.randomUUID(),name:"Starter Pack?",description:`A one of a kind pack containing all you need to get started!
3939+It looks like this one has been opened already, and some of the cards are missing.`,price:4,originalPrice:20,contents:[{type:"card",card:"cat-neighbourhood",missing:!0},{type:"card",card:"water-well",missing:!0},{type:"card",card:"wheat-farm",missing:!0},{type:"card",card:"flour-mill"},{type:"card",card:"bakery",missing:!0}]})}function X(U){e(o)==="place-neighbourhood"&&window.setTimeout(()=>e(m).show(),500)}function j(U){e(o)==="buy-pack"&&window.setTimeout(()=>e(w).show(),500)}function Z({card:U}){e(o)==="place-neighbourhood"&&U.type==="cat-neighbourhood"&&window.setTimeout(()=>e(_).show(),500)}function W(U){e(o)==="buy-pack"&&P(o,"produce-bread")}function L({card:U}){e(o)==="place-neighbourhood"&&e(p).find(i=>i.id===U.id)?.type==="cat-neighbourhood"&&(window.setTimeout(()=>e(z).show(),500),P(o,"place-bakery")),e(o)==="place-bakery"&&e(p).find(i=>i.id===U.id)?.type==="bakery"&&window.setTimeout(()=>e(C).show(),500),e(o)==="place-sources"&&["wheat-farm","water-well"].every(i=>e(c).some(A=>!A.loose&&e(p).some(n=>A.id===n.id&&n.type===i)))&&window.setTimeout(()=>e(T).show(),500),e(o)==="place-trading-centre"&&e(p).find(i=>i.id===U.id)?.type==="trading-centre"&&window.setTimeout(()=>e(O).show(),500),e(o)==="produce-bread"&&e(p).find(i=>i.id===U.id)?.type==="flour-mill"&&window.setTimeout(()=>e(E).show(),500)}var J=pr();ie("deckopened",ve,X),ie("shopopened",ve,j),ie("cardfielded",ve,Z),ie("cardplaced",ve,L),ie("buypack",ve,W);var V=Y(J);N(fe(V,{onDismiss:u,actions:(i,A=ce)=>{var n=Xo();n.__click=function(...b){A()?.apply(this,b)},f(i,n)},children:(i,A)=>{var n=No(),b=r(Y(n),2),G=r(v(b));K(G,{id:"cat-neighbourhood"}),B(),s(b),B(2),f(i,n)},$$slots:{actions:!0,default:!0}}),i=>P(x,i,!0),()=>e(x));var le=r(V,2);N(fe(le,{actions:(i,A=ce)=>{var n=Uo();n.__click=function(...b){A()?.apply(this,b)},f(i,n)},children:(i,A)=>{var n=Wo(),b=r(Y(n),2),G=r(v(b));K(G,{id:"cat-neighbourhood"}),B(),s(b),B(2),f(i,n)},$$slots:{actions:!0,default:!0}}),i=>P(m,i,!0),()=>e(m));var ge=r(le,2);N(fe(ge,{actions:(i,A=ce)=>{var n=Lo();n.__click=function(...b){A()?.apply(this,b)},f(i,n)},children:(i,A)=>{var n=Ho(),b=Y(n),G=r(v(b));K(G,{id:"cat-neighbourhood"}),B(),s(b),B(2),f(i,n)},$$slots:{actions:!0,default:!0}}),i=>P(_,i,!0),()=>e(_));var ye=r(ge,2);N(fe(ye,{onDismiss:I,actions:(i,A=ce)=>{var n=Zo();n.__click=function(...b){A()?.apply(this,b)},f(i,n)},children:(i,A)=>{var n=Jo(),b=Y(n),G=r(v(b));K(G,{id:"cat-neighbourhood"});var H=r(G,2);rt(H,{id:"cat"}),B(),s(b);var ne=r(b,2),ae=r(v(ne));Ee(ae,{}),B(),s(ne);var se=r(ne,2),ee=r(v(se));rt(ee,{id:"cat"});var he=r(ee,2);ue(he,{id:"bread"});var ke=r(he,2);K(ke,{id:"bakery"});var De=r(ke,2);ue(De,{id:"bread"}),B(),s(se);var Ye=r(se,2),Te=r(v(Ye));K(Te,{id:"bakery"}),B(),s(Ye),f(i,n)},$$slots:{actions:!0,default:!0}}),i=>P(z,i,!0),()=>e(z));var Ce=r(ye,2);N(fe(Ce,{onDismiss:S,actions:(i,A=ce)=>{var n=Qo();n.__click=function(...b){A()?.apply(this,b)},f(i,n)},children:(i,A)=>{var n=Vo(),b=Y(n),G=r(v(b));K(G,{id:"bakery"});var H=r(G,2);ue(H,{id:"bread"});var ne=r(H,2);K(ne,{id:"bakery"});var ae=r(ne,2);ue(ae,{id:"water"});var se=r(ae,2);ue(se,{id:"flour"}),B(),s(b);var ee=r(b,2),he=r(v(ee));K(he,{id:"bakery"}),B(),s(ee),f(i,n)},$$slots:{actions:!0,default:!0}}),i=>P(C,i,!0),()=>e(C));var $e=r(Ce,2);N(fe($e,{onDismiss:()=>P(o,"await-production"),actions:(i,A=ce)=>{var n=Ko();n.__click=function(...b){A()?.apply(this,b)},f(i,n)},children:(i,A)=>{var n=er(),b=Y(n),G=r(v(b));K(G,{id:"water-well"});var H=r(G,2);K(H,{id:"wheat-farm"}),B(),s(b);var ne=r(b,2),ae=r(v(ne));K(ae,{id:"water-well"});var se=r(ae,2);K(se,{id:"wheat-farm"});var ee=r(se,2);xt(ee,{id:"soil"}),B(),s(ne),B(2),f(i,n)},$$slots:{actions:!0,default:!0}}),i=>P(T,i,!0),()=>e(T));var Ae=r($e,2);N(fe(Ae,{onDismiss:q,actions:(i,A=ce)=>{var n=tr();n.__click=function(...b){A()?.apply(this,b)},f(i,n)},children:(i,A)=>{var n=or(),b=Y(n),G=r(v(b));K(G,{id:"wheat-farm"});var H=r(G,2);K(H,{id:"flour-mill"});var ne=r(H,2);ue(ne,{id:"wheat"}),B(),s(b);var ae=r(b,2),se=r(v(ae));K(se,{id:"trading-centre"});var ee=r(se,2);K(ee,{id:"trading-centre"});var he=r(ee,2);Ee(he,{}),B(),s(ae);var ke=r(ae,2),De=r(v(ke));K(De,{id:"trading-centre"}),B(),s(ke),f(i,n)},$$slots:{actions:!0,default:!0}}),i=>P(R,i,!0),()=>e(R));var ze=r(Ae,2);N(fe(ze,{onDismiss:D,actions:(i,A=ce)=>{var n=rr();n.__click=function(...b){A()?.apply(this,b)},f(i,n)},children:(i,A)=>{var n=ar(),b=Y(n),G=r(v(b),3);Ee(G,{});var H=r(G,2);K(H,{id:"trading-centre"}),B(),s(b);var ne=r(b,2),ae=r(v(ne));K(ae,{id:"wheat-farm"});var se=r(ae,2);ue(se,{id:"wheat"});var ee=r(se,2);ue(ee,{id:"wheat"});var he=r(ee,2);Ee(he,{amount:1});var ke=r(he,2);ue(ke,{id:"water"}),B(),s(ne),B(2),f(i,n)},$$slots:{actions:!0,default:!0}}),i=>P(O,i,!0),()=>e(O));var Ge=r(ze,2);N(fe(Ge,{actions:(i,A=ce)=>{var n=nr();n.__click=function(...b){A()?.apply(this,b)},f(i,n)},children:(i,A)=>{var n=sr(),b=Y(n),G=r(v(b));K(G,{id:"trading-centre"});var H=r(G,2);Ee(H,{}),B(),s(b),B(2),f(i,n)},$$slots:{actions:!0,default:!0}}),i=>P(M,i,!0),()=>e(M));var Be=r(Ge,2);N(fe(Be,{actions:(i,A=ce)=>{var n=ir();n.__click=function(...b){A()?.apply(this,b)},f(i,n)},children:(i,A)=>{var n=cr(),b=r(Y(n),2),G=r(v(b));Ne(G,{children:(ae,se)=>{B();var ee=xe("Starter Pack");f(ae,ee)}}),B(),s(b);var H=r(b,2),ne=r(v(H));Ne(ne,{children:(ae,se)=>{B();var ee=xe("Starter Pack");f(ae,ee)}}),B(),s(H),f(i,n)},$$slots:{actions:!0,default:!0}}),i=>P(w,i,!0),()=>e(w));var Re=r(Be,2);N(fe(Re,{actions:(i,A=ce)=>{var n=dr();n.__click=function(...b){A()?.apply(this,b)},f(i,n)},children:(i,A)=>{var n=lr();B(4),f(i,n)},$$slots:{actions:!0,default:!0}}),i=>P(E,i,!0),()=>e(E));var je=r(Re,2);N(fe(je,{actions:(i,A=ce)=>{var n=ur();n.__click=function(...b){A()?.apply(this,b)},f(i,n)},children:(i,A)=>{var n=vr(),b=Y(n),G=r(v(b));K(G,{id:"bakery"});var H=r(G,2);ue(H,{id:"bread"}),B(),s(b),B(4),f(i,n)},$$slots:{actions:!0,default:!0}}),i=>P(k,i,!0),()=>e(k)),f(l,J),re()}Se(["click"]);var fr=$('<main class="svelte-hy9bcf"><!></main> <div class="hud svelte-hy9bcf"><!></div> <!>',1),gr=$('<div role="application" class="svelte-hy9bcf"><!></div>');function Cr(l){var t=gr(),a=v(t);$t(a,{children:(p,c)=>{Dt(p,{children:(d,h)=>{Gt(d,{children:(y,x)=>{var m=fr(),_=Y(m),z=v(_);ao(z,{}),s(_);var C=r(_,2),T=v(C);jo(T,{}),s(C);var R=r(C,2);hr(R,{}),f(y,m)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}}),s(t),f(l,t)}export{Cr as component};
···11+import { g, o, c, s, a, b } from "./chunks/internal.js";
22+import { s as s2, e, f } from "./chunks/environment.js";
33+export {
44+ g as get_hooks,
55+ o as options,
66+ s2 as set_assets,
77+ e as set_building,
88+ c as set_manifest,
99+ f as set_prerendering,
1010+ s as set_private_env,
1111+ a as set_public_env,
1212+ b as set_read_implementation
1313+};