"use strict";(("undefined"!=typeof self?self:this).wpChessCom_dvZK=("undefined"!=typeof self?self:this).wpChessCom_dvZK||[]).push([[1655],{66262:function(e,t){t.A=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n}},97786:function(e,t,n){n.d(t,{Ll8:function(){return useScroll},MLh:function(){return useEventListener},Ubj:function(){return useMediaQuery},X2F:function(){return onClickOutside},hR7:function(){return useCurrentElement},lWr:function(){return useWindowSize}});var r=n(22720),o=n(7118);let l=r.oc?window:void 0;r.oc&&window.document;r.oc&&window.navigator;r.oc&&window.location;function unrefElement(e){var t;let n=(0,r.BA)(e);return null!=(t=null==n?void 0:n.$el)?t:n}function useEventListener(...e){let t,n,u,i;if("string"==typeof e[0]||Array.isArray(e[0])){[n,u,i]=e;t=l}else[t,n,u,i]=e;if(!t)return r.lQ;Array.isArray(n)||(n=[n]);Array.isArray(u)||(u=[u]);let c=[],cleanup=()=>{c.forEach(e=>e());c.length=0},register=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),a=(0,o.watch)(()=>[unrefElement(t),(0,r.BA)(i)],([e,t])=>{cleanup();if(!e)return;let o=(0,r.Gv)(t)?{...t}:t;c.push(...n.flatMap(t=>u.map(n=>register(e,t,n,o))))},{immediate:!0,flush:"post"}),stop=()=>{a();cleanup()};return(0,r.Uo)(stop),stop}let u=!1;function onClickOutside(e,t,n={}){let{window:o=l,ignore:i=[],capture:c=!0,detectIframe:a=!1}=n;if(!o)return r.lQ;if(r.un&&!u){u=!0;Array.from(o.document.body.children).forEach(e=>e.addEventListener("click",r.lQ));o.document.documentElement.addEventListener("click",r.lQ)}let s=!0,shouldIgnore=e=>(0,r.BA)(i).some(t=>{if("string"==typeof t)return Array.from(o.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{let n=unrefElement(t);return n&&(e.target===n||e.composedPath().includes(n))}});function hasMultipleRoots(e){let t=(0,r.BA)(e);return t&&16===t.$.subTree.shapeFlag}function checkMultipleRoots(e,t){let n=(0,r.BA)(e),o=n.$.subTree&&n.$.subTree.children;return!!(null!=o&&Array.isArray(o))&&o.some(e=>e.el===t.target||t.composedPath().includes(e.el))}let listener=n=>{let r=unrefElement(e);if(!(null==n.target||!(r instanceof Element)&&hasMultipleRoots(e)&&checkMultipleRoots(e,n))&&!(!r||r===n.target||n.composedPath().includes(r))){0===n.detail&&(s=!shouldIgnore(n));if(!s){s=!0;return}t(n)}},d=!1,f=[useEventListener(o,"click",e=>{if(!d){d=!0;setTimeout(()=>{d=!1},0);listener(e)}},{passive:!0,capture:c}),useEventListener(o,"pointerdown",t=>{let n=unrefElement(e);s=!shouldIgnore(t)&&!!(n&&!t.composedPath().includes(n))},{passive:!0}),a&&useEventListener(o,"blur",n=>{setTimeout(()=>{var r;let l=unrefElement(e);(null==(r=o.document.activeElement)?void 0:r.tagName)!=="IFRAME"||(null==l?void 0:l.contains(o.document.activeElement))||t(n)},0)})].filter(Boolean);return()=>f.forEach(e=>e())}function useMounted(){let e=(0,o.ref)(!1),t=(0,o.getCurrentInstance)();return t&&(0,o.onMounted)(()=>{e.value=!0},t),e}function useSupported(e){let t=useMounted();return(0,o.computed)(()=>(t.value,!!e()))}function useMediaQuery(e,t={}){let n;let{window:u=l}=t,i=useSupported(()=>u&&"matchMedia"in u&&"function"==typeof u.matchMedia),c=(0,o.ref)(!1),handler=e=>{c.value=e.matches},cleanup=()=>{n&&("removeEventListener"in n?n.removeEventListener("change",handler):n.removeListener(handler))},a=(0,o.watchEffect)(()=>{if(i.value){cleanup();"addEventListener"in(n=u.matchMedia((0,r.BA)(e)))?n.addEventListener("change",handler):n.addListener(handler);c.value=n.matches}});return(0,r.Uo)(()=>{a();cleanup();n=void 0}),c}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function useCurrentElement(e){let t=(0,o.getCurrentInstance)(),n=(0,r.bW)(()=>null,()=>e?unrefElement(e):t.proxy.$el);return(0,o.onUpdated)(n.trigger),(0,o.onMounted)(n.trigger),n}let i=1;function useScroll(e,t={}){let{throttle:n=0,idle:u=200,onStop:c=r.lQ,onScroll:a=r.lQ,offset:s={left:0,right:0,top:0,bottom:0},eventListenerOptions:d={capture:!1,passive:!0},behavior:f="auto",window:p=l,onError:m=e=>{console.error(e)}}=t,v=(0,o.ref)(0),h=(0,o.ref)(0),g=(0,o.computed)({get:()=>v.value,set(e){scrollTo(e,void 0)}}),y=(0,o.computed)({get:()=>h.value,set(e){scrollTo(void 0,e)}});function scrollTo(t,n){var o,l,u,i;if(!p)return;let c=(0,r.BA)(e);if(!c)return;null==(u=c instanceof Document?p.document.body:c)||u.scrollTo({top:null!=(o=(0,r.BA)(n))?o:y.value,left:null!=(l=(0,r.BA)(t))?l:g.value,behavior:(0,r.BA)(f)});let a=(null==(i=null==c?void 0:c.document)?void 0:i.documentElement)||(null==c?void 0:c.documentElement)||c;null!=g&&(v.value=a.scrollLeft);null!=y&&(h.value=a.scrollTop)}let w=(0,o.ref)(!1),E=(0,o.reactive)({left:!0,right:!1,top:!0,bottom:!1}),b=(0,o.reactive)({left:!1,right:!1,top:!1,bottom:!1}),onScrollEnd=e=>{if(w.value){w.value=!1;b.left=!1;b.right=!1;b.top=!1;b.bottom=!1;c(e)}},T=(0,r.Q0)(onScrollEnd,n+u),setArrivedState=e=>{var t;if(!p)return;let n=(null==(t=null==e?void 0:e.document)?void 0:t.documentElement)||(null==e?void 0:e.documentElement)||unrefElement(e),{display:r,flexDirection:o}=getComputedStyle(n),l=n.scrollLeft;b.left=lv.value;let u=Math.abs(l)<=(s.left||0),c=Math.abs(l)+n.clientWidth>=n.scrollWidth-(s.right||0)-i;if("flex"===r&&"row-reverse"===o){E.left=c;E.right=u}else{E.left=u;E.right=c}v.value=l;let a=n.scrollTop;e!==p.document||a||(a=p.document.body.scrollTop);b.top=ah.value;let d=Math.abs(a)<=(s.top||0),f=Math.abs(a)+n.clientHeight>=n.scrollHeight-(s.bottom||0)-i;if("flex"===r&&"column-reverse"===o){E.top=f;E.bottom=d}else{E.top=d;E.bottom=f}h.value=a},onScrollHandler=e=>{var t;if(p){setArrivedState(null!=(t=e.target.documentElement)?t:e.target);w.value=!0;T(e);a(e)}};return useEventListener(e,"scroll",n?(0,r.k3)(onScrollHandler,n,!0,!1):onScrollHandler,d),(0,r.rd)(()=>{try{let t=(0,r.BA)(e);if(!t)return;setArrivedState(t)}catch(e){m(e)}}),useEventListener(e,"scrollend",onScrollEnd,d),{x:g,y,isScrolling:w,arrivedState:E,directions:b,measure(){let t=(0,r.BA)(e);p&&t&&setArrivedState(t)}}}/* @__PURE__ */r.D_;function useWindowSize(e={}){let{window:t=l,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:u=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:c=!0,type:a="inner"}=e,s=(0,o.ref)(n),d=(0,o.ref)(u),update=()=>{if(t){if("outer"===a){s.value=t.outerWidth;d.value=t.outerHeight}else if(c){s.value=t.innerWidth;d.value=t.innerHeight}else{s.value=t.document.documentElement.clientWidth;d.value=t.document.documentElement.clientHeight}}};update();(0,r.rd)(update);useEventListener("resize",update,{passive:!0});if(i){let e=useMediaQuery("(orientation: portrait)");(0,o.watch)(e,()=>update())}return{width:s,height:d}}},22720:function(e,t,n){n.d(t,{BA:function(){return toValue},D_:function(){return identity},Gv:function(){return isObject},Q0:function(){return useDebounceFn},TO:function(){return useTimeoutFn},Uo:function(){return tryOnScopeDispose},bW:function(){return computedWithControl},k3:function(){return useThrottleFn},lQ:function(){return noop},oc:function(){return o},rd:function(){return tryOnMounted},un:function(){return u}});var r=n(7118);function computedWithControl(e,t){let n,o,l;let u=(0,r.ref)(!0),update=()=>{u.value=!0;o()};(0,r.watch)(e,update,{flush:"sync"});let i="function"==typeof t?t:t.get,c="function"==typeof t?void 0:t.set,a=(0,r.customRef)((e,t)=>(n=e,o=t,{get(){if(u.value){l=i(l);u.value=!1}return n(),l},set(e){null==c||c(e)}}));return Object.isExtensible(a)&&(a.trigger=update),a}function tryOnScopeDispose(e){return!!(0,r.getCurrentScope)()&&((0,r.onScopeDispose)(e),!0)}function toValue(e){return"function"==typeof e?e():(0,r.unref)(e)}let o="undefined"!=typeof window&&"undefined"!=typeof document;"undefined"!=typeof WorkerGlobalScope&&WorkerGlobalScope;let l=Object.prototype.toString,isObject=e=>"[object Object]"===l.call(e),noop=()=>{},u=/* @__PURE__ */getIsIOS();function getIsIOS(){var e,t;return o&&(null==(e=null==window?void 0:window.navigator)?void 0:e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||(null==(t=null==window?void 0:window.navigator)?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(null==window?void 0:window.navigator.userAgent))}function createFilterWrapper(e,t){return function wrapper(...n){return new Promise((r,o)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(o)})}}function debounceFilter(e,t={}){let n,r;let o=noop,_clearTimeout=e=>{clearTimeout(e);o();o=noop};return l=>{let u=toValue(e),i=toValue(t.maxWait);n&&_clearTimeout(n);if(u<=0||void 0!==i&&i<=0){if(r){_clearTimeout(r);r=null}return Promise.resolve(l())}return new Promise((e,c)=>{o=t.rejectOnCancel?c:e;i&&!r&&(r=setTimeout(()=>{n&&_clearTimeout(n);r=null;e(l())},i));n=setTimeout(()=>{r&&_clearTimeout(r);r=null;e(l())},u)})}}function throttleFilter(...e){let t,n,o,l,u,i,c=0,a=!0,s=noop;(0,r.isRef)(e[0])||"object"!=typeof e[0]?[o,l=!0,u=!0,i=!1]=e:{delay:o,trailing:l=!0,leading:u=!0,rejectOnCancel:i=!1}=e[0];let clear=()=>{if(t){clearTimeout(t);t=void 0;s();s=noop}};return e=>{let r=toValue(o),d=Date.now()-c,invoke=()=>n=e();clear();if(r<=0)return c=Date.now(),invoke();if(d>r&&(u||!a)){c=Date.now();invoke()}else l&&(n=new Promise((e,n)=>{s=i?n:e;t=setTimeout(()=>{c=Date.now();a=!0;e(invoke());clear()},Math.max(0,r-d))}));return u||t||(t=setTimeout(()=>a=!0,r)),a=!1,n}}function cacheStringFunction(e){let t=/* @__PURE__ */Object.create(null);return n=>t[n]||(t[n]=e(n))}let i=/\B([A-Z])/g;cacheStringFunction(e=>e.replace(i,"-$1").toLowerCase());let c=/-(\w)/g;cacheStringFunction(e=>e.replace(c,(e,t)=>t?t.toUpperCase():""));function identity(e){return e}function getLifeCycleTarget(e){return e||(0,r.getCurrentInstance)()}function useDebounceFn(e,t=200,n={}){return createFilterWrapper(debounceFilter(t,n),e)}function useThrottleFn(e,t=200,n=!1,r=!0,o=!1){return createFilterWrapper(throttleFilter(t,n,r,o),e)}function tryOnMounted(e,t=!0,n){getLifeCycleTarget()?(0,r.onMounted)(e,n):t?e():(0,r.nextTick)(e)}function useTimeoutFn(e,t,n={}){let{immediate:l=!0}=n,u=(0,r.ref)(!1),i=null;function clear(){if(i){clearTimeout(i);i=null}}function stop(){u.value=!1;clear()}function start(...n){clear();u.value=!0;i=setTimeout(()=>{u.value=!1;i=null;e(...n)},toValue(t))}if(l){u.value=!0;o&&start()}return tryOnScopeDispose(stop),{isPending:(0,r.readonly)(u),start,stop}}}}]);