import{Fn as e,In as t,Qn as n,Sn as r,Yn as i,_n as a,mn as o,nr as s,on as c,rr as l,wn as u}from"./game-logic-BBFCPVtv.js";import{a as d,c as f,d as p,i as m,o as h,s as g,u as _}from"./vendor-others-Bce0hM6h.js";var v=d?window:void 0,y=d?window.document:void 0;d&&window.navigator,d&&window.location;function b(e){let t=s(e);return t?.$el??t}function x(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=c(()=>{let t=_(s(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return p(()=>[n.value?.map(e=>b(e))??[v].filter(e=>e!=null),_(s(n.value?e[1]:e[0])),_(l(n.value?e[2]:e[1])),s(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=g(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function S(){let e=n(!1),t=o();return t&&u(()=>{e.value=!0},t),e}function C(e){let t=S();return c(()=>(t.value,!!e()))}var w=Symbol(`vueuse-ssr-width`);function T(){let e=a()?m(w,null):null;return typeof e==`number`?e:void 0}function E(e,r={}){let{window:i=v,ssrWidth:a=T()}=r,o=C(()=>i&&`matchMedia`in i&&typeof i.matchMedia==`function`),l=n(typeof a==`number`),u=n(),d=n(!1);return t(()=>{if(l.value){l.value=!o.value,d.value=s(e).split(`,`).some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),r=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=!!(n||r);return n&&i&&(i=a>=f(n[1])),r&&i&&(i=a<=f(r[1])),t?!i:i});return}o.value&&(u.value=i.matchMedia(s(e)),d.value=u.value.matches)}),x(u,`change`,e=>{d.value=e.matches},{passive:!0}),c(()=>d.value)}function D(e){return JSON.parse(JSON.stringify(e))}function O(t,n,a,s={}){var l,u;let{clone:d=!1,passive:f=!1,eventName:p,deep:m=!1,defaultValue:g,shouldEmit:_}=s,v=o(),y=a||v?.emit||(v==null||(l=v.$emit)==null?void 0:l.bind(v))||(v==null||(u=v.proxy)==null||(u=u.$emit)==null?void 0:u.bind(v?.proxy)),b=p;n||=`modelValue`,b||=`update:${n.toString()}`;let x=e=>d?typeof d==`function`?d(e):D(e):e,S=()=>h(t[n])?x(t[n]):g,C=e=>{_?_(e)&&y(b,e):y(b,e)};if(f){let a=i(S()),o=!1;return e(()=>t[n],e=>{o||(o=!0,a.value=x(e),r(()=>o=!1))}),e(a,e=>{!o&&(e!==t[n]||m)&&C(e)},{deep:m}),a}else return c({get(){return S()},set(e){C(e)}})}export{O as i,x as n,E as r,y as t};