gear-second 3.0.1 → 3.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +5 -5
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(rt,he){typeof exports=="object"&&typeof module<"u"?module.exports=he():typeof define=="function"&&define.amd?define(he):(rt=typeof globalThis<"u"?globalThis:rt||self,rt._gearSecond_=he())})(this,function(){"use strict";var Dm=Object.defineProperty;var Am=(rt,he,bt)=>he in rt?Dm(rt,he,{enumerable:!0,configurable:!0,writable:!0,value:bt}):rt[he]=bt;var ke=(rt,he,bt)=>Am(rt,typeof he!="symbol"?he+"":he,bt);/**
1
+ (function(rt,he){typeof exports=="object"&&typeof module<"u"?module.exports=he():typeof define=="function"&&define.amd?define(he):(rt=typeof globalThis<"u"?globalThis:rt||self,rt._gearSecond_=he())})(this,function(){"use strict";var Am=Object.defineProperty;var jm=(rt,he,bt)=>he in rt?Am(rt,he,{enumerable:!0,configurable:!0,writable:!0,value:bt}):rt[he]=bt;var ke=(rt,he,bt)=>jm(rt,typeof he!="symbol"?he+"":he,bt);/**
2
2
  * @vue/shared v3.5.24
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
@@ -6,15 +6,15 @@
6
6
  * @vue/reactivity v3.5.24
7
7
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
8
  * @license MIT
9
- **/let Fe;class Ga{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Fe,!t&&Fe&&(this.index=(Fe.scopes||(Fe.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Fe;try{return Fe=this,t()}finally{Fe=n}}}on(){++this._on===1&&(this.prevScope=Fe,Fe=this)}off(){this._on>0&&--this._on===0&&(Fe=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(this.effects.length=0,n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function di(){return Fe}function Ja(e,t=!1){Fe&&Fe.cleanups.push(e)}let Me;const fi=new WeakSet;class zr{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Fe&&Fe.active&&Fe.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,fi.has(this)&&(fi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ar(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Nr(this),jr(this);const t=Me,n=wt;Me=this,wt=!0;try{return this.fn()}finally{Lr(this),Me=t,wt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)mi(t);this.deps=this.depsTail=void 0,Nr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?fi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){gi(this)&&this.run()}get dirty(){return gi(this)}}let Dr=0,En,In;function Ar(e,t=!1){if(e.flags|=8,t){e.next=In,In=e;return}e.next=En,En=e}function pi(){Dr++}function hi(){if(--Dr>0)return;if(In){let t=In;for(In=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;En;){let t=En;for(En=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function jr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Lr(e){let t,n=e.depsTail,o=n;for(;o;){const i=o.prevDep;o.version===-1?(o===n&&(n=i),mi(o),Qa(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=i}e.deps=t,e.depsTail=n}function gi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Br(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Br(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===On)||(e.globalVersion=On,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!gi(e))))return;e.flags|=2;const t=e.dep,n=Me,o=wt;Me=e,wt=!0;try{jr(e);const i=e.fn(e._value);(t.version===0||tt(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Me=n,wt=o,Lr(e),e.flags&=-3}}function mi(e,t=!1){const{dep:n,prevSub:o,nextSub:i}=e;if(o&&(o.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)mi(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Qa(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let wt=!0;const Vr=[];function Ct(){Vr.push(wt),wt=!1}function Tt(){const e=Vr.pop();wt=e===void 0?!0:e}function Nr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Me;Me=void 0;try{t()}finally{Me=n}}}let On=0;class ec{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class uo{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Me||!wt||Me===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Me)n=this.activeLink=new ec(Me,this),Me.deps?(n.prevDep=Me.depsTail,Me.depsTail.nextDep=n,Me.depsTail=n):Me.deps=Me.depsTail=n,Rr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=Me.depsTail,n.nextDep=void 0,Me.depsTail.nextDep=n,Me.depsTail=n,Me.deps===n&&(Me.deps=o)}return n}trigger(t){this.version++,On++,this.notify(t)}notify(t){pi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{hi()}}}function Rr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)Rr(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const fo=new WeakMap,nn=Symbol(""),vi=Symbol(""),$n=Symbol("");function We(e,t,n){if(wt&&Me){let o=fo.get(e);o||fo.set(e,o=new Map);let i=o.get(n);i||(o.set(n,i=new uo),i.map=o,i.key=n),i.track()}}function Bt(e,t,n,o,i,r){const s=fo.get(e);if(!s){On++;return}const l=a=>{a&&a.trigger()};if(pi(),t==="clear")s.forEach(l);else{const a=ie(e),u=a&&si(n);if(a&&n==="length"){const c=Number(o);s.forEach((d,f)=>{(f==="length"||f===$n||!yt(f)&&f>=c)&&l(d)})}else switch((n!==void 0||s.has(void 0))&&l(s.get(n)),u&&l(s.get($n)),t){case"add":a?u&&l(s.get("length")):(l(s.get(nn)),vn(e)&&l(s.get(vi)));break;case"delete":a||(l(s.get(nn)),vn(e)&&l(s.get(vi)));break;case"set":vn(e)&&l(s.get(nn));break}}hi()}function tc(e,t){const n=fo.get(e);return n&&n.get(t)}function bn(e){const t=ye(e);return t===e?t:(We(t,"iterate",$n),ft(e)?t:t.map(Be))}function po(e){return We(e=ye(e),"iterate",$n),e}const nc={__proto__:null,[Symbol.iterator](){return bi(this,Symbol.iterator,Be)},concat(...e){return bn(this).concat(...e.map(t=>ie(t)?bn(t):t))},entries(){return bi(this,"entries",e=>(e[1]=Be(e[1]),e))},every(e,t){return Vt(this,"every",e,t,void 0,arguments)},filter(e,t){return Vt(this,"filter",e,t,n=>n.map(Be),arguments)},find(e,t){return Vt(this,"find",e,t,Be,arguments)},findIndex(e,t){return Vt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Vt(this,"findLast",e,t,Be,arguments)},findLastIndex(e,t){return Vt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Vt(this,"forEach",e,t,void 0,arguments)},includes(...e){return yi(this,"includes",e)},indexOf(...e){return yi(this,"indexOf",e)},join(e){return bn(this).join(e)},lastIndexOf(...e){return yi(this,"lastIndexOf",e)},map(e,t){return Vt(this,"map",e,t,void 0,arguments)},pop(){return zn(this,"pop")},push(...e){return zn(this,"push",e)},reduce(e,...t){return Hr(this,"reduce",e,t)},reduceRight(e,...t){return Hr(this,"reduceRight",e,t)},shift(){return zn(this,"shift")},some(e,t){return Vt(this,"some",e,t,void 0,arguments)},splice(...e){return zn(this,"splice",e)},toReversed(){return bn(this).toReversed()},toSorted(e){return bn(this).toSorted(e)},toSpliced(...e){return bn(this).toSpliced(...e)},unshift(...e){return zn(this,"unshift",e)},values(){return bi(this,"values",Be)}};function bi(e,t,n){const o=po(e),i=o[t]();return o!==e&&!ft(e)&&(i._next=i.next,i.next=()=>{const r=i._next();return r.done||(r.value=n(r.value)),r}),i}const oc=Array.prototype;function Vt(e,t,n,o,i,r){const s=po(e),l=s!==e&&!ft(e),a=s[t];if(a!==oc[t]){const d=a.apply(e,r);return l?Be(d):d}let u=n;s!==e&&(l?u=function(d,f){return n.call(this,Be(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=a.call(s,u,o);return l&&i?i(c):c}function Hr(e,t,n,o){const i=po(e);let r=n;return i!==e&&(ft(e)?n.length>3&&(r=function(s,l,a){return n.call(this,s,l,a,e)}):r=function(s,l,a){return n.call(this,s,Be(l),a,e)}),i[t](r,...o)}function yi(e,t,n){const o=ye(e);We(o,"iterate",$n);const i=o[t](...n);return(i===-1||i===!1)&&xi(n[0])?(n[0]=ye(n[0]),o[t](...n)):i}function zn(e,t,n=[]){Ct(),pi();const o=ye(e)[t].apply(e,n);return hi(),Tt(),o}const ic=rt("__proto__,__v_isRef,__isVue"),Fr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(yt));function rc(e){yt(e)||(e=String(e));const t=ye(this);return We(t,"has",e),t.hasOwnProperty(e)}class Wr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return r;if(n==="__v_raw")return o===(i?r?Xr:Yr:r?Zr:Kr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const s=ie(t);if(!i){let a;if(s&&(a=nc[n]))return a;if(n==="hasOwnProperty")return rc}const l=Reflect.get(t,n,$e(t)?t:o);if((yt(n)?Fr.has(n):ic(n))||(i||We(t,"get",n),r))return l;if($e(l)){const a=s&&si(n)?l:l.value;return i&&Ce(a)?Dn(a):a}return Ce(l)?i?Dn(l):vo(l):l}}class qr extends Wr{constructor(t=!1){super(!1,t)}set(t,n,o,i){let r=t[n];if(!this._isShallow){const a=Kt(r);if(!ft(o)&&!Kt(o)&&(r=ye(r),o=ye(o)),!ie(t)&&$e(r)&&!$e(o))return a||(r.value=o),!0}const s=ie(t)&&si(n)?Number(n)<t.length:_e(t,n),l=Reflect.set(t,n,o,$e(t)?t:i);return t===ye(i)&&(s?tt(o,r)&&Bt(t,"set",n,o):Bt(t,"add",n,o)),l}deleteProperty(t,n){const o=_e(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&o&&Bt(t,"delete",n,void 0),i}has(t,n){const o=Reflect.has(t,n);return(!yt(n)||!Fr.has(n))&&We(t,"has",n),o}ownKeys(t){return We(t,"iterate",ie(t)?"length":nn),Reflect.ownKeys(t)}}class Ur extends Wr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const sc=new qr,lc=new Ur,ac=new qr(!0),cc=new Ur(!0),wi=e=>e,ho=e=>Reflect.getPrototypeOf(e);function uc(e,t,n){return function(...o){const i=this.__v_raw,r=ye(i),s=vn(r),l=e==="entries"||e===Symbol.iterator&&s,a=e==="keys"&&s,u=i[e](...o),c=n?wi:t?yo:Be;return!t&&We(r,"iterate",a?vi:nn),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function go(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function dc(e,t){const n={get(i){const r=this.__v_raw,s=ye(r),l=ye(i);e||(tt(i,l)&&We(s,"get",i),We(s,"get",l));const{has:a}=ho(s),u=t?wi:e?yo:Be;if(a.call(s,i))return u(r.get(i));if(a.call(s,l))return u(r.get(l));r!==s&&r.get(i)},get size(){const i=this.__v_raw;return!e&&We(ye(i),"iterate",nn),i.size},has(i){const r=this.__v_raw,s=ye(r),l=ye(i);return e||(tt(i,l)&&We(s,"has",i),We(s,"has",l)),i===l?r.has(i):r.has(i)||r.has(l)},forEach(i,r){const s=this,l=s.__v_raw,a=ye(l),u=t?wi:e?yo:Be;return!e&&We(a,"iterate",nn),l.forEach((c,d)=>i.call(r,u(c),u(d),s))}};return Ie(n,e?{add:go("add"),set:go("set"),delete:go("delete"),clear:go("clear")}:{add(i){!t&&!ft(i)&&!Kt(i)&&(i=ye(i));const r=ye(this);return ho(r).has.call(r,i)||(r.add(i),Bt(r,"add",i,i)),this},set(i,r){!t&&!ft(r)&&!Kt(r)&&(r=ye(r));const s=ye(this),{has:l,get:a}=ho(s);let u=l.call(s,i);u||(i=ye(i),u=l.call(s,i));const c=a.call(s,i);return s.set(i,r),u?tt(r,c)&&Bt(s,"set",i,r):Bt(s,"add",i,r),this},delete(i){const r=ye(this),{has:s,get:l}=ho(r);let a=s.call(r,i);a||(i=ye(i),a=s.call(r,i)),l&&l.call(r,i);const u=r.delete(i);return a&&Bt(r,"delete",i,void 0),u},clear(){const i=ye(this),r=i.size!==0,s=i.clear();return r&&Bt(i,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=uc(i,e,t)}),n}function mo(e,t){const n=dc(e,t);return(o,i,r)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?o:Reflect.get(_e(n,i)&&i in o?n:o,i,r)}const fc={get:mo(!1,!1)},pc={get:mo(!1,!0)},hc={get:mo(!0,!1)},gc={get:mo(!0,!0)},Kr=new WeakMap,Zr=new WeakMap,Yr=new WeakMap,Xr=new WeakMap;function mc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function vc(e){return e.__v_skip||!Object.isExtensible(e)?0:mc(Ha(e))}function vo(e){return Kt(e)?e:bo(e,!1,sc,fc,Kr)}function bc(e){return bo(e,!1,ac,pc,Zr)}function Dn(e){return bo(e,!0,lc,hc,Yr)}function Lm(e){return bo(e,!0,cc,gc,Xr)}function bo(e,t,n,o,i){if(!Ce(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=vc(e);if(r===0)return e;const s=i.get(e);if(s)return s;const l=new Proxy(e,r===2?o:n);return i.set(e,l),l}function yn(e){return Kt(e)?yn(e.__v_raw):!!(e&&e.__v_isReactive)}function Kt(e){return!!(e&&e.__v_isReadonly)}function ft(e){return!!(e&&e.__v_isShallow)}function xi(e){return e?!!e.__v_raw:!1}function ye(e){const t=e&&e.__v_raw;return t?ye(t):e}function yc(e){return!_e(e,"__v_skip")&&Object.isExtensible(e)&&Pr(e,"__v_skip",!0),e}const Be=e=>Ce(e)?vo(e):e,yo=e=>Ce(e)?Dn(e):e;function $e(e){return e?e.__v_isRef===!0:!1}function ee(e){return Gr(e,!1)}function pt(e){return Gr(e,!0)}function Gr(e,t){return $e(e)?e:new wc(e,t)}class wc{constructor(t,n){this.dep=new uo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ye(t),this._value=n?t:Be(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||ft(t)||Kt(t);t=o?t:ye(t),tt(t,n)&&(this._rawValue=t,this._value=o?t:Be(t),this.dep.trigger())}}function Z(e){return $e(e)?e.value:e}function ht(e){return de(e)?e():Z(e)}const xc={get:(e,t,n)=>t==="__v_raw"?e:Z(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return $e(i)&&!$e(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function Jr(e){return yn(e)?e:new Proxy(e,xc)}class _c{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new uo,{get:o,set:i}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=i}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Qr(e){return new _c(e)}class Sc{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return tc(ye(this._object),this._key)}}class kc{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Cc(e,t,n){return $e(e)?e:de(e)?new kc(e):Ce(e)&&arguments.length>1?Tc(e,t,n):ee(e)}function Tc(e,t,n){const o=e[t];return $e(o)?o:new Sc(e,t,n)}class Pc{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new uo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=On-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Me!==this)return Ar(this,!0),!0}get value(){const t=this.dep.track();return Br(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Mc(e,t,n=!1){let o,i;return de(e)?o=e:(o=e.get,i=e.set),new Pc(o,i,n)}const wo={},xo=new WeakMap;let on;function Ec(e,t=!1,n=on){if(n){let o=xo.get(n);o||xo.set(n,o=[]),o.push(e)}}function Ic(e,t,n=he){const{immediate:o,deep:i,once:r,scheduler:s,augmentJob:l,call:a}=n,u=w=>i?w:ft(w)||i===!1||i===0?Nt(w,1):Nt(w);let c,d,f,p,x=!1,_=!1;if($e(e)?(d=()=>e.value,x=ft(e)):yn(e)?(d=()=>u(e),x=!0):ie(e)?(_=!0,x=e.some(w=>yn(w)||ft(w)),d=()=>e.map(w=>{if($e(w))return w.value;if(yn(w))return u(w);if(de(w))return a?a(w,2):w()})):de(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){Ct();try{f()}finally{Tt()}}const w=on;on=c;try{return a?a(e,3,[p]):e(p)}finally{on=w}}:d=kt,t&&i){const w=d,g=i===!0?1/0:i;d=()=>Nt(w(),g)}const D=di(),b=()=>{c.stop(),D&&D.active&&ri(D.effects,c)};if(r&&t){const w=t;t=(...g)=>{w(...g),b()}}let P=_?new Array(e.length).fill(wo):wo;const A=w=>{if(!(!(c.flags&1)||!c.dirty&&!w))if(t){const g=c.run();if(i||x||(_?g.some((I,q)=>tt(I,P[q])):tt(g,P))){f&&f();const I=on;on=c;try{const q=[g,P===wo?void 0:_&&P[0]===wo?[]:P,p];P=g,a?a(t,3,q):t(...q)}finally{on=I}}}else c.run()};return l&&l(A),c=new zr(d),c.scheduler=s?()=>s(A,!1):A,p=w=>Ec(w,!1,c),f=c.onStop=()=>{const w=xo.get(c);if(w){if(a)a(w,4);else for(const g of w)g();xo.delete(c)}},t?o?A(!0):P=c.run():s?s(A.bind(null,!0),!0):c.run(),b.pause=c.pause.bind(c),b.resume=c.resume.bind(c),b.stop=b,b}function Nt(e,t=1/0,n){if(t<=0||!Ce(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,$e(e))Nt(e.value,t,n);else if(ie(e))for(let o=0;o<e.length;o++)Nt(e[o],t,n);else if(oo(e)||vn(e))e.forEach(o=>{Nt(o,t,n)});else if(io(e)){for(const o in e)Nt(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Nt(e[o],t,n)}return e}/**
9
+ **/let Fe;class Ga{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Fe,!t&&Fe&&(this.index=(Fe.scopes||(Fe.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].pause();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].resume();for(t=0,n=this.effects.length;t<n;t++)this.effects[t].resume()}}run(t){if(this._active){const n=Fe;try{return Fe=this,t()}finally{Fe=n}}}on(){++this._on===1&&(this.prevScope=Fe,Fe=this)}off(){this._on>0&&--this._on===0&&(Fe=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n<o;n++)this.effects[n].stop();for(this.effects.length=0,n=0,o=this.cleanups.length;n<o;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,o=this.scopes.length;n<o;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function di(){return Fe}function Ja(e,t=!1){Fe&&Fe.cleanups.push(e)}let Me;const fi=new WeakSet;class zr{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Fe&&Fe.active&&Fe.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,fi.has(this)&&(fi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Ar(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Nr(this),jr(this);const t=Me,n=wt;Me=this,wt=!0;try{return this.fn()}finally{Lr(this),Me=t,wt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)mi(t);this.deps=this.depsTail=void 0,Nr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?fi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){gi(this)&&this.run()}get dirty(){return gi(this)}}let Dr=0,En,In;function Ar(e,t=!1){if(e.flags|=8,t){e.next=In,In=e;return}e.next=En,En=e}function pi(){Dr++}function hi(){if(--Dr>0)return;if(In){let t=In;for(In=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;En;){let t=En;for(En=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function jr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Lr(e){let t,n=e.depsTail,o=n;for(;o;){const i=o.prevDep;o.version===-1?(o===n&&(n=i),mi(o),Qa(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=i}e.deps=t,e.depsTail=n}function gi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Br(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Br(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===On)||(e.globalVersion=On,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!gi(e))))return;e.flags|=2;const t=e.dep,n=Me,o=wt;Me=e,wt=!0;try{jr(e);const i=e.fn(e._value);(t.version===0||tt(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Me=n,wt=o,Lr(e),e.flags&=-3}}function mi(e,t=!1){const{dep:n,prevSub:o,nextSub:i}=e;if(o&&(o.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)mi(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Qa(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let wt=!0;const Vr=[];function Ct(){Vr.push(wt),wt=!1}function Tt(){const e=Vr.pop();wt=e===void 0?!0:e}function Nr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Me;Me=void 0;try{t()}finally{Me=n}}}let On=0;class ec{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class uo{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Me||!wt||Me===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Me)n=this.activeLink=new ec(Me,this),Me.deps?(n.prevDep=Me.depsTail,Me.depsTail.nextDep=n,Me.depsTail=n):Me.deps=Me.depsTail=n,Rr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=Me.depsTail,n.nextDep=void 0,Me.depsTail.nextDep=n,Me.depsTail=n,Me.deps===n&&(Me.deps=o)}return n}trigger(t){this.version++,On++,this.notify(t)}notify(t){pi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{hi()}}}function Rr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)Rr(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const fo=new WeakMap,nn=Symbol(""),vi=Symbol(""),$n=Symbol("");function We(e,t,n){if(wt&&Me){let o=fo.get(e);o||fo.set(e,o=new Map);let i=o.get(n);i||(o.set(n,i=new uo),i.map=o,i.key=n),i.track()}}function Bt(e,t,n,o,i,r){const s=fo.get(e);if(!s){On++;return}const l=a=>{a&&a.trigger()};if(pi(),t==="clear")s.forEach(l);else{const a=ie(e),u=a&&si(n);if(a&&n==="length"){const c=Number(o);s.forEach((d,f)=>{(f==="length"||f===$n||!yt(f)&&f>=c)&&l(d)})}else switch((n!==void 0||s.has(void 0))&&l(s.get(n)),u&&l(s.get($n)),t){case"add":a?u&&l(s.get("length")):(l(s.get(nn)),vn(e)&&l(s.get(vi)));break;case"delete":a||(l(s.get(nn)),vn(e)&&l(s.get(vi)));break;case"set":vn(e)&&l(s.get(nn));break}}hi()}function tc(e,t){const n=fo.get(e);return n&&n.get(t)}function bn(e){const t=ye(e);return t===e?t:(We(t,"iterate",$n),ft(e)?t:t.map(Be))}function po(e){return We(e=ye(e),"iterate",$n),e}const nc={__proto__:null,[Symbol.iterator](){return bi(this,Symbol.iterator,Be)},concat(...e){return bn(this).concat(...e.map(t=>ie(t)?bn(t):t))},entries(){return bi(this,"entries",e=>(e[1]=Be(e[1]),e))},every(e,t){return Vt(this,"every",e,t,void 0,arguments)},filter(e,t){return Vt(this,"filter",e,t,n=>n.map(Be),arguments)},find(e,t){return Vt(this,"find",e,t,Be,arguments)},findIndex(e,t){return Vt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Vt(this,"findLast",e,t,Be,arguments)},findLastIndex(e,t){return Vt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Vt(this,"forEach",e,t,void 0,arguments)},includes(...e){return yi(this,"includes",e)},indexOf(...e){return yi(this,"indexOf",e)},join(e){return bn(this).join(e)},lastIndexOf(...e){return yi(this,"lastIndexOf",e)},map(e,t){return Vt(this,"map",e,t,void 0,arguments)},pop(){return zn(this,"pop")},push(...e){return zn(this,"push",e)},reduce(e,...t){return Hr(this,"reduce",e,t)},reduceRight(e,...t){return Hr(this,"reduceRight",e,t)},shift(){return zn(this,"shift")},some(e,t){return Vt(this,"some",e,t,void 0,arguments)},splice(...e){return zn(this,"splice",e)},toReversed(){return bn(this).toReversed()},toSorted(e){return bn(this).toSorted(e)},toSpliced(...e){return bn(this).toSpliced(...e)},unshift(...e){return zn(this,"unshift",e)},values(){return bi(this,"values",Be)}};function bi(e,t,n){const o=po(e),i=o[t]();return o!==e&&!ft(e)&&(i._next=i.next,i.next=()=>{const r=i._next();return r.done||(r.value=n(r.value)),r}),i}const oc=Array.prototype;function Vt(e,t,n,o,i,r){const s=po(e),l=s!==e&&!ft(e),a=s[t];if(a!==oc[t]){const d=a.apply(e,r);return l?Be(d):d}let u=n;s!==e&&(l?u=function(d,f){return n.call(this,Be(d),f,e)}:n.length>2&&(u=function(d,f){return n.call(this,d,f,e)}));const c=a.call(s,u,o);return l&&i?i(c):c}function Hr(e,t,n,o){const i=po(e);let r=n;return i!==e&&(ft(e)?n.length>3&&(r=function(s,l,a){return n.call(this,s,l,a,e)}):r=function(s,l,a){return n.call(this,s,Be(l),a,e)}),i[t](r,...o)}function yi(e,t,n){const o=ye(e);We(o,"iterate",$n);const i=o[t](...n);return(i===-1||i===!1)&&xi(n[0])?(n[0]=ye(n[0]),o[t](...n)):i}function zn(e,t,n=[]){Ct(),pi();const o=ye(e)[t].apply(e,n);return hi(),Tt(),o}const ic=rt("__proto__,__v_isRef,__isVue"),Fr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(yt));function rc(e){yt(e)||(e=String(e));const t=ye(this);return We(t,"has",e),t.hasOwnProperty(e)}class Wr{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return r;if(n==="__v_raw")return o===(i?r?Xr:Yr:r?Zr:Kr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const s=ie(t);if(!i){let a;if(s&&(a=nc[n]))return a;if(n==="hasOwnProperty")return rc}const l=Reflect.get(t,n,$e(t)?t:o);if((yt(n)?Fr.has(n):ic(n))||(i||We(t,"get",n),r))return l;if($e(l)){const a=s&&si(n)?l:l.value;return i&&Ce(a)?Dn(a):a}return Ce(l)?i?Dn(l):vo(l):l}}class qr extends Wr{constructor(t=!1){super(!1,t)}set(t,n,o,i){let r=t[n];if(!this._isShallow){const a=Kt(r);if(!ft(o)&&!Kt(o)&&(r=ye(r),o=ye(o)),!ie(t)&&$e(r)&&!$e(o))return a||(r.value=o),!0}const s=ie(t)&&si(n)?Number(n)<t.length:_e(t,n),l=Reflect.set(t,n,o,$e(t)?t:i);return t===ye(i)&&(s?tt(o,r)&&Bt(t,"set",n,o):Bt(t,"add",n,o)),l}deleteProperty(t,n){const o=_e(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&o&&Bt(t,"delete",n,void 0),i}has(t,n){const o=Reflect.has(t,n);return(!yt(n)||!Fr.has(n))&&We(t,"has",n),o}ownKeys(t){return We(t,"iterate",ie(t)?"length":nn),Reflect.ownKeys(t)}}class Ur extends Wr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const sc=new qr,lc=new Ur,ac=new qr(!0),cc=new Ur(!0),wi=e=>e,ho=e=>Reflect.getPrototypeOf(e);function uc(e,t,n){return function(...o){const i=this.__v_raw,r=ye(i),s=vn(r),l=e==="entries"||e===Symbol.iterator&&s,a=e==="keys"&&s,u=i[e](...o),c=n?wi:t?yo:Be;return!t&&We(r,"iterate",a?vi:nn),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:l?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function go(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function dc(e,t){const n={get(i){const r=this.__v_raw,s=ye(r),l=ye(i);e||(tt(i,l)&&We(s,"get",i),We(s,"get",l));const{has:a}=ho(s),u=t?wi:e?yo:Be;if(a.call(s,i))return u(r.get(i));if(a.call(s,l))return u(r.get(l));r!==s&&r.get(i)},get size(){const i=this.__v_raw;return!e&&We(ye(i),"iterate",nn),i.size},has(i){const r=this.__v_raw,s=ye(r),l=ye(i);return e||(tt(i,l)&&We(s,"has",i),We(s,"has",l)),i===l?r.has(i):r.has(i)||r.has(l)},forEach(i,r){const s=this,l=s.__v_raw,a=ye(l),u=t?wi:e?yo:Be;return!e&&We(a,"iterate",nn),l.forEach((c,d)=>i.call(r,u(c),u(d),s))}};return Ie(n,e?{add:go("add"),set:go("set"),delete:go("delete"),clear:go("clear")}:{add(i){!t&&!ft(i)&&!Kt(i)&&(i=ye(i));const r=ye(this);return ho(r).has.call(r,i)||(r.add(i),Bt(r,"add",i,i)),this},set(i,r){!t&&!ft(r)&&!Kt(r)&&(r=ye(r));const s=ye(this),{has:l,get:a}=ho(s);let u=l.call(s,i);u||(i=ye(i),u=l.call(s,i));const c=a.call(s,i);return s.set(i,r),u?tt(r,c)&&Bt(s,"set",i,r):Bt(s,"add",i,r),this},delete(i){const r=ye(this),{has:s,get:l}=ho(r);let a=s.call(r,i);a||(i=ye(i),a=s.call(r,i)),l&&l.call(r,i);const u=r.delete(i);return a&&Bt(r,"delete",i,void 0),u},clear(){const i=ye(this),r=i.size!==0,s=i.clear();return r&&Bt(i,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=uc(i,e,t)}),n}function mo(e,t){const n=dc(e,t);return(o,i,r)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?o:Reflect.get(_e(n,i)&&i in o?n:o,i,r)}const fc={get:mo(!1,!1)},pc={get:mo(!1,!0)},hc={get:mo(!0,!1)},gc={get:mo(!0,!0)},Kr=new WeakMap,Zr=new WeakMap,Yr=new WeakMap,Xr=new WeakMap;function mc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function vc(e){return e.__v_skip||!Object.isExtensible(e)?0:mc(Ha(e))}function vo(e){return Kt(e)?e:bo(e,!1,sc,fc,Kr)}function bc(e){return bo(e,!1,ac,pc,Zr)}function Dn(e){return bo(e,!0,lc,hc,Yr)}function Bm(e){return bo(e,!0,cc,gc,Xr)}function bo(e,t,n,o,i){if(!Ce(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=vc(e);if(r===0)return e;const s=i.get(e);if(s)return s;const l=new Proxy(e,r===2?o:n);return i.set(e,l),l}function yn(e){return Kt(e)?yn(e.__v_raw):!!(e&&e.__v_isReactive)}function Kt(e){return!!(e&&e.__v_isReadonly)}function ft(e){return!!(e&&e.__v_isShallow)}function xi(e){return e?!!e.__v_raw:!1}function ye(e){const t=e&&e.__v_raw;return t?ye(t):e}function yc(e){return!_e(e,"__v_skip")&&Object.isExtensible(e)&&Pr(e,"__v_skip",!0),e}const Be=e=>Ce(e)?vo(e):e,yo=e=>Ce(e)?Dn(e):e;function $e(e){return e?e.__v_isRef===!0:!1}function ee(e){return Gr(e,!1)}function pt(e){return Gr(e,!0)}function Gr(e,t){return $e(e)?e:new wc(e,t)}class wc{constructor(t,n){this.dep=new uo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:ye(t),this._value=n?t:Be(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||ft(t)||Kt(t);t=o?t:ye(t),tt(t,n)&&(this._rawValue=t,this._value=o?t:Be(t),this.dep.trigger())}}function Z(e){return $e(e)?e.value:e}function ht(e){return de(e)?e():Z(e)}const xc={get:(e,t,n)=>t==="__v_raw"?e:Z(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return $e(i)&&!$e(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function Jr(e){return yn(e)?e:new Proxy(e,xc)}class _c{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new uo,{get:o,set:i}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=i}get value(){return this._value=this._get()}set value(t){this._set(t)}}function Qr(e){return new _c(e)}class Sc{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return tc(ye(this._object),this._key)}}class kc{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Cc(e,t,n){return $e(e)?e:de(e)?new kc(e):Ce(e)&&arguments.length>1?Tc(e,t,n):ee(e)}function Tc(e,t,n){const o=e[t];return $e(o)?o:new Sc(e,t,n)}class Pc{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new uo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=On-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Me!==this)return Ar(this,!0),!0}get value(){const t=this.dep.track();return Br(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Mc(e,t,n=!1){let o,i;return de(e)?o=e:(o=e.get,i=e.set),new Pc(o,i,n)}const wo={},xo=new WeakMap;let on;function Ec(e,t=!1,n=on){if(n){let o=xo.get(n);o||xo.set(n,o=[]),o.push(e)}}function Ic(e,t,n=he){const{immediate:o,deep:i,once:r,scheduler:s,augmentJob:l,call:a}=n,u=w=>i?w:ft(w)||i===!1||i===0?Nt(w,1):Nt(w);let c,d,f,p,x=!1,_=!1;if($e(e)?(d=()=>e.value,x=ft(e)):yn(e)?(d=()=>u(e),x=!0):ie(e)?(_=!0,x=e.some(w=>yn(w)||ft(w)),d=()=>e.map(w=>{if($e(w))return w.value;if(yn(w))return u(w);if(de(w))return a?a(w,2):w()})):de(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){Ct();try{f()}finally{Tt()}}const w=on;on=c;try{return a?a(e,3,[p]):e(p)}finally{on=w}}:d=kt,t&&i){const w=d,g=i===!0?1/0:i;d=()=>Nt(w(),g)}const D=di(),b=()=>{c.stop(),D&&D.active&&ri(D.effects,c)};if(r&&t){const w=t;t=(...g)=>{w(...g),b()}}let P=_?new Array(e.length).fill(wo):wo;const A=w=>{if(!(!(c.flags&1)||!c.dirty&&!w))if(t){const g=c.run();if(i||x||(_?g.some((I,q)=>tt(I,P[q])):tt(g,P))){f&&f();const I=on;on=c;try{const q=[g,P===wo?void 0:_&&P[0]===wo?[]:P,p];P=g,a?a(t,3,q):t(...q)}finally{on=I}}}else c.run()};return l&&l(A),c=new zr(d),c.scheduler=s?()=>s(A,!1):A,p=w=>Ec(w,!1,c),f=c.onStop=()=>{const w=xo.get(c);if(w){if(a)a(w,4);else for(const g of w)g();xo.delete(c)}},t?o?A(!0):P=c.run():s?s(A.bind(null,!0),!0):c.run(),b.pause=c.pause.bind(c),b.resume=c.resume.bind(c),b.stop=b,b}function Nt(e,t=1/0,n){if(t<=0||!Ce(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,$e(e))Nt(e.value,t,n);else if(ie(e))for(let o=0;o<e.length;o++)Nt(e[o],t,n);else if(oo(e)||vn(e))e.forEach(o=>{Nt(o,t,n)});else if(io(e)){for(const o in e)Nt(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Nt(e[o],t,n)}return e}/**
10
10
  * @vue/runtime-core v3.5.24
11
11
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
12
  * @license MIT
13
- **/const An=[];let _i=!1;function Bm(e,...t){if(_i)return;_i=!0,Ct();const n=An.length?An[An.length-1].component:null,o=n&&n.appContext.config.warnHandler,i=Oc();if(o)wn(o,n,11,[e+t.map(r=>{var s,l;return(l=(s=r.toString)==null?void 0:s.call(r))!=null?l:JSON.stringify(r)}).join(""),n&&n.proxy,i.map(({vnode:r})=>`at <${el(n,r.type)}>`).join(`
13
+ **/const An=[];let _i=!1;function Vm(e,...t){if(_i)return;_i=!0,Ct();const n=An.length?An[An.length-1].component:null,o=n&&n.appContext.config.warnHandler,i=Oc();if(o)wn(o,n,11,[e+t.map(r=>{var s,l;return(l=(s=r.toString)==null?void 0:s.call(r))!=null?l:JSON.stringify(r)}).join(""),n&&n.proxy,i.map(({vnode:r})=>`at <${el(n,r.type)}>`).join(`
14
14
  `),i]);else{const r=[`[Vue warn]: ${e}`,...t];i.length&&r.push(`
15
15
  `,...$c(i)),console.warn(...r)}Tt(),_i=!1}function Oc(){let e=An[An.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const o=e.component&&e.component.parent;e=o&&o.vnode}return t}function $c(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
16
- `],...zc(n))}),t}function zc({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,i=` at <${el(e.component,e.type,o)}`,r=">"+n;return e.props?[i,...Dc(e.props),r]:[i+r]}function Dc(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...es(o,e[o]))}),n.length>3&&t.push(" ..."),t}function es(e,t,n){return Oe(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:$e(t)?(t=es(e,ye(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):de(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ye(t),n?t:[`${e}=`,t])}function wn(e,t,n,o){try{return o?e(...o):e()}catch(i){_o(i,t,n)}}function xt(e,t,n,o){if(de(e)){const i=wn(e,t,n,o);return i&&Cr(i)&&i.catch(r=>{_o(r,t,n)}),i}if(ie(e)){const i=[];for(let r=0;r<e.length;r++)i.push(xt(e[r],t,n,o));return i}}function _o(e,t,n,o=!0){const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||he;if(t){let l=t.parent;const a=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const c=l.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,a,u)===!1)return}l=l.parent}if(r){Ct(),wn(r,null,10,[e,a,u]),Tt();return}}Ac(e,n,i,o,s)}function Ac(e,t,n,o=!0,i=!1){if(i)throw e;console.error(e)}const Ze=[];let Pt=-1;const xn=[];let Zt=null,_n=0;const ts=Promise.resolve();let So=null;function gt(e){const t=So||ts;return e?t.then(this?e.bind(this):e):t}function jc(e){let t=Pt+1,n=Ze.length;for(;t<n;){const o=t+n>>>1,i=Ze[o],r=jn(i);r<e||r===e&&i.flags&2?t=o+1:n=o}return t}function Si(e){if(!(e.flags&1)){const t=jn(e),n=Ze[Ze.length-1];!n||!(e.flags&2)&&t>=jn(n)?Ze.push(e):Ze.splice(jc(t),0,e),e.flags|=1,ns()}}function ns(){So||(So=ts.then(rs))}function Lc(e){ie(e)?xn.push(...e):Zt&&e.id===-1?Zt.splice(_n+1,0,e):e.flags&1||(xn.push(e),e.flags|=1),ns()}function os(e,t,n=Pt+1){for(;n<Ze.length;n++){const o=Ze[n];if(o&&o.flags&2){if(e&&o.id!==e.uid)continue;Ze.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function is(e){if(xn.length){const t=[...new Set(xn)].sort((n,o)=>jn(n)-jn(o));if(xn.length=0,Zt){Zt.push(...t);return}for(Zt=t,_n=0;_n<Zt.length;_n++){const n=Zt[_n];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Zt=null,_n=0}}const jn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function rs(e){try{for(Pt=0;Pt<Ze.length;Pt++){const t=Ze[Pt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),wn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Pt<Ze.length;Pt++){const t=Ze[Pt];t&&(t.flags&=-2)}Pt=-1,Ze.length=0,is(),So=null,(Ze.length||xn.length)&&rs()}}let Ve=null,ss=null;function ko(e){const t=Ve;return Ve=e,ss=e&&e.type.__scopeId||null,t}function ne(e,t=Ve,n){if(!t||e._n)return e;const o=(...i)=>{o._d&&Ao(-1);const r=ko(t);let s;try{s=e(...i)}finally{ko(r),o._d&&Ao(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Ne(e,t){if(Ve===null)return e;const n=Bo(Ve),o=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[r,s,l,a=he]=t[i];r&&(de(r)&&(r={mounted:r,updated:r}),r.deep&&Nt(s),o.push({dir:r,instance:n,value:s,oldValue:void 0,arg:l,modifiers:a}))}return e}function rn(e,t,n,o){const i=e.dirs,r=t&&t.dirs;for(let s=0;s<i.length;s++){const l=i[s];r&&(l.oldValue=r[s].value);let a=l.dir[o];a&&(Ct(),xt(a,n,8,[e.el,l,e,t]),Tt())}}const Bc=Symbol("_vte"),ls=e=>e.__isTeleport,Rt=Symbol("_leaveCb"),Co=Symbol("_enterCb");function Vc(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return je(()=>{e.isMounted=!0}),Ti(()=>{e.isUnmounting=!0}),e}const mt=[Function,Array],as={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:mt,onEnter:mt,onAfterEnter:mt,onEnterCancelled:mt,onBeforeLeave:mt,onLeave:mt,onAfterLeave:mt,onLeaveCancelled:mt,onBeforeAppear:mt,onAppear:mt,onAfterAppear:mt,onAppearCancelled:mt},cs=e=>{const t=e.subTree;return t.component?cs(t.component):t},Nc={name:"BaseTransition",props:as,setup(e,{slots:t}){const n=un(),o=Vc();return()=>{const i=t.default&&ps(t.default(),!0);if(!i||!i.length)return;const r=us(i),s=ye(e),{mode:l}=s;if(o.isLeaving)return Ci(r);const a=fs(r);if(!a)return Ci(r);let u=ki(a,s,o,n,d=>u=d);a.type!==qe&&Ln(a,u);let c=n.subTree&&fs(n.subTree);if(c&&c.type!==qe&&!an(c,a)&&cs(n).type!==qe){let d=ki(c,s,o,n);if(Ln(c,d),l==="out-in"&&a.type!==qe)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Ci(r);l==="in-out"&&a.type!==qe?d.delayLeave=(f,p,x)=>{const _=ds(o,c);_[String(c.key)]=c,f[Rt]=()=>{p(),f[Rt]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{x(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return r}}};function us(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==qe){t=n;break}}return t}const Rc=Nc;function ds(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function ki(e,t,n,o,i){const{appear:r,mode:s,persisted:l=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:x,onLeaveCancelled:_,onBeforeAppear:D,onAppear:b,onAfterAppear:P,onAppearCancelled:A}=t,w=String(e.key),g=ds(n,e),I=(R,Q)=>{R&&xt(R,o,9,Q)},q=(R,Q)=>{const H=Q[1];I(R,Q),ie(R)?R.every(T=>T.length<=1)&&H():R.length<=1&&H()},K={mode:s,persisted:l,beforeEnter(R){let Q=a;if(!n.isMounted)if(r)Q=D||a;else return;R[Rt]&&R[Rt](!0);const H=g[w];H&&an(e,H)&&H.el[Rt]&&H.el[Rt](),I(Q,[R])},enter(R){let Q=u,H=c,T=d;if(!n.isMounted)if(r)Q=b||u,H=P||c,T=A||d;else return;let Y=!1;const S=R[Co]=J=>{Y||(Y=!0,J?I(T,[R]):I(H,[R]),K.delayedLeave&&K.delayedLeave(),R[Co]=void 0)};Q?q(Q,[R,S]):S()},leave(R,Q){const H=String(e.key);if(R[Co]&&R[Co](!0),n.isUnmounting)return Q();I(f,[R]);let T=!1;const Y=R[Rt]=S=>{T||(T=!0,Q(),S?I(_,[R]):I(x,[R]),R[Rt]=void 0,g[H]===e&&delete g[H])};g[H]=e,p?q(p,[R,Y]):Y()},clone(R){const Q=ki(R,t,n,o,i);return i&&i(Q),Q}};return K}function Ci(e){if(Po(e))return e=Xt(e),e.children=null,e}function fs(e){if(!Po(e))return ls(e.type)&&e.children?us(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&de(n.default))return n.default()}}function Ln(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ln(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ps(e,t=!1,n){let o=[],i=0;for(let r=0;r<e.length;r++){let s=e[r];const l=n==null?s.key:String(n)+String(s.key!=null?s.key:r);s.type===be?(s.patchFlag&128&&i++,o=o.concat(ps(s.children,t,l))):(t||s.type!==qe)&&o.push(l!=null?Xt(s,{key:l}):s)}if(i>1)for(let r=0;r<o.length;r++)o[r].patchFlag=-2;return o}function pe(e,t){return de(e)?Ie({name:e.name},t,{setup:e}):e}function hs(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const To=new WeakMap;function Bn(e,t,n,o,i=!1){if(ie(e)){e.forEach((x,_)=>Bn(x,t&&(ie(t)?t[_]:t),n,o,i));return}if(Sn(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Bn(e,t,n,o.component.subTree);return}const r=o.shapeFlag&4?Bo(o.component):o.el,s=i?null:r,{i:l,r:a}=e,u=t&&t.r,c=l.refs===he?l.refs={}:l.refs,d=l.setupState,f=ye(d),p=d===he?Sr:x=>_e(f,x);if(u!=null&&u!==a){if(gs(t),Oe(u))c[u]=null,p(u)&&(d[u]=null);else if($e(u)){u.value=null;const x=t;x.k&&(c[x.k]=null)}}if(de(a))wn(a,l,12,[s,c]);else{const x=Oe(a),_=$e(a);if(x||_){const D=()=>{if(e.f){const b=x?p(a)?d[a]:c[a]:a.value;if(i)ie(b)&&ri(b,r);else if(ie(b))b.includes(r)||b.push(r);else if(x)c[a]=[r],p(a)&&(d[a]=c[a]);else{const P=[r];a.value=P,e.k&&(c[e.k]=P)}}else x?(c[a]=s,p(a)&&(d[a]=s)):_&&(a.value=s,e.k&&(c[e.k]=s))};if(s){const b=()=>{D(),To.delete(e)};b.id=-1,To.set(e,b),st(b,n)}else gs(e),D()}}}function gs(e){const t=To.get(e);t&&(t.flags|=8,To.delete(e))}ao().requestIdleCallback,ao().cancelIdleCallback;const Sn=e=>!!e.type.__asyncLoader,Po=e=>e.type.__isKeepAlive;function Hc(e,t){ms(e,"a",t)}function Fc(e,t){ms(e,"da",t)}function ms(e,t,n=Ue){const o=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Mo(t,o,n),n){let i=n.parent;for(;i&&i.parent;)Po(i.parent.vnode)&&Wc(o,t,n,i),i=i.parent}}function Wc(e,t,n,o){const i=Mo(t,e,o,!0);Mt(()=>{ri(o[t],i)},n)}function Mo(e,t,n=Ue,o=!1){if(n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{Ct();const l=qn(n),a=xt(t,n,e,s);return l(),Tt(),a});return o?i.unshift(r):i.push(r),r}}const Ht=e=>(t,n=Ue)=>{(!Un||e==="sp")&&Mo(e,(...o)=>t(...o),n)},qc=Ht("bm"),je=Ht("m"),Uc=Ht("bu"),Kc=Ht("u"),Ti=Ht("bum"),Mt=Ht("um"),Zc=Ht("sp"),Yc=Ht("rtg"),Xc=Ht("rtc");function vs(e,t=Ue){Mo("ec",e,t)}const Gc="components",bs=Symbol.for("v-ndc");function Pi(e){return Oe(e)?Jc(Gc,e,!1)||e:e||bs}function Jc(e,t,n=!0,o=!1){const i=Ve||Ue;if(i){const r=i.type;{const l=Qs(r,!1);if(l&&(l===t||l===Re(t)||l===so(Re(t))))return r}const s=ys(i[e]||r[e],t)||ys(i.appContext[e],t);return!s&&o?r:s}}function ys(e,t){return e&&(e[t]||e[Re(t)]||e[so(Re(t))])}function Yt(e,t,n,o){let i;const r=n,s=ie(e);if(s||Oe(e)){const l=s&&yn(e);let a=!1,u=!1;l&&(a=!ft(e),u=Kt(e),e=po(e)),i=new Array(e.length);for(let c=0,d=e.length;c<d;c++)i[c]=t(a?u?yo(Be(e[c])):Be(e[c]):e[c],c,void 0,r)}else if(typeof e=="number"){i=new Array(e);for(let l=0;l<e;l++)i[l]=t(l+1,l,void 0,r)}else if(Ce(e))if(e[Symbol.iterator])i=Array.from(e,(l,a)=>t(l,a,void 0,r));else{const l=Object.keys(e);i=new Array(l.length);for(let a=0,u=l.length;a<u;a++){const c=l[a];i[a]=t(e[c],c,a,r)}}else i=[];return i}function Mi(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(ie(o))for(let i=0;i<o.length;i++)e[o[i].name]=o[i].fn;else o&&(e[o.name]=o.key?(...i)=>{const r=o.fn(...i);return r&&(r.key=o.key),r}:o.fn)}return e}function xe(e,t,n={},o,i){if(Ve.ce||Ve.parent&&Sn(Ve.parent)&&Ve.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),v(),oe(be,null,[B("slot",n,o&&o())],u?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),v();const s=r&&ws(r(n)),l=n.key||s&&s.key,a=oe(be,{key:(l&&!yt(l)?l:`_${t}`)+(!s&&o?"_fb":"")},s||(o?o():[]),s&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),r&&r._c&&(r._d=!0),a}function ws(e){return e.some(t=>Wn(t)?!(t.type===qe||t.type===be&&!ws(t.children)):!0)?e:null}const Ei=e=>e?Xs(e)?Bo(e):Ei(e.parent):null,Vn=Ie(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ei(e.parent),$root:e=>Ei(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ss(e),$forceUpdate:e=>e.f||(e.f=()=>{Si(e.update)}),$nextTick:e=>e.n||(e.n=gt.bind(e.proxy)),$watch:e=>wu.bind(e)}),Ii=(e,t)=>e!==he&&!e.__isScriptSetup&&_e(e,t),Qc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:i,props:r,accessCache:s,type:l,appContext:a}=e;let u;if(t[0]!=="$"){const p=s[t];if(p!==void 0)switch(p){case 1:return o[t];case 2:return i[t];case 4:return n[t];case 3:return r[t]}else{if(Ii(o,t))return s[t]=1,o[t];if(i!==he&&_e(i,t))return s[t]=2,i[t];if((u=e.propsOptions[0])&&_e(u,t))return s[t]=3,r[t];if(n!==he&&_e(n,t))return s[t]=4,n[t];Oi&&(s[t]=0)}}const c=Vn[t];let d,f;if(c)return t==="$attrs"&&We(e.attrs,"get",""),c(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==he&&_e(n,t))return s[t]=4,n[t];if(f=a.config.globalProperties,_e(f,t))return f[t]},set({_:e},t,n){const{data:o,setupState:i,ctx:r}=e;return Ii(i,t)?(i[t]=n,!0):o!==he&&_e(o,t)?(o[t]=n,!0):_e(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:i,propsOptions:r,type:s}},l){let a,u;return!!(n[l]||e!==he&&l[0]!=="$"&&_e(e,l)||Ii(t,l)||(a=r[0])&&_e(a,l)||_e(o,l)||_e(Vn,l)||_e(i.config.globalProperties,l)||(u=s.__cssModules)&&u[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:_e(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Eo(e){return ie(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Ye(e,t){return!e||!t?e||t:ie(e)&&ie(t)?e.concat(t):Ie({},Eo(e),Eo(t))}let Oi=!0;function eu(e){const t=Ss(e),n=e.proxy,o=e.ctx;Oi=!1,t.beforeCreate&&xs(t.beforeCreate,e,"bc");const{data:i,computed:r,methods:s,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:x,activated:_,deactivated:D,beforeDestroy:b,beforeUnmount:P,destroyed:A,unmounted:w,render:g,renderTracked:I,renderTriggered:q,errorCaptured:K,serverPrefetch:R,expose:Q,inheritAttrs:H,components:T,directives:Y,filters:S}=t;if(u&&tu(u,o,null),s)for(const k in s){const y=s[k];de(y)&&(o[k]=y.bind(n))}if(i){const k=i.call(n,n);Ce(k)&&(e.data=vo(k))}if(Oi=!0,r)for(const k in r){const y=r[k],O=de(y)?y.bind(n,n):de(y.get)?y.get.bind(n,n):kt,$=!de(y)&&de(y.set)?y.set.bind(n):kt,le=G({get:O,set:$});Object.defineProperty(o,k,{enumerable:!0,configurable:!0,get:()=>le.value,set:ae=>le.value=ae})}if(l)for(const k in l)_s(l[k],o,n,k);if(a){const k=de(a)?a.call(n):a;Reflect.ownKeys(k).forEach(y=>{Rn(y,k[y])})}c&&xs(c,e,"c");function F(k,y){ie(y)?y.forEach(O=>k(O.bind(n))):y&&k(y.bind(n))}if(F(qc,d),F(je,f),F(Uc,p),F(Kc,x),F(Hc,_),F(Fc,D),F(vs,K),F(Xc,I),F(Yc,q),F(Ti,P),F(Mt,w),F(Zc,R),ie(Q))if(Q.length){const k=e.exposed||(e.exposed={});Q.forEach(y=>{Object.defineProperty(k,y,{get:()=>n[y],set:O=>n[y]=O,enumerable:!0})})}else e.exposed||(e.exposed={});g&&e.render===kt&&(e.render=g),H!=null&&(e.inheritAttrs=H),T&&(e.components=T),Y&&(e.directives=Y),R&&hs(e)}function tu(e,t,n=kt){ie(e)&&(e=$i(e));for(const o in e){const i=e[o];let r;Ce(i)?"default"in i?r=Ft(i.from||o,i.default,!0):r=Ft(i.from||o):r=Ft(i),$e(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):t[o]=r}}function xs(e,t,n){xt(ie(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function _s(e,t,n,o){let i=o.includes(".")?Rs(n,o):()=>n[o];if(Oe(e)){const r=t[e];de(r)&&ue(i,r)}else if(de(e))ue(i,e.bind(n));else if(Ce(e))if(ie(e))e.forEach(r=>_s(r,t,n,o));else{const r=de(e.handler)?e.handler.bind(n):t[e.handler];de(r)&&ue(i,r,e)}}function Ss(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:r,config:{optionMergeStrategies:s}}=e.appContext,l=r.get(t);let a;return l?a=l:!i.length&&!n&&!o?a=t:(a={},i.length&&i.forEach(u=>Io(a,u,s,!0)),Io(a,t,s)),Ce(t)&&r.set(t,a),a}function Io(e,t,n,o=!1){const{mixins:i,extends:r}=t;r&&Io(e,r,n,!0),i&&i.forEach(s=>Io(e,s,n,!0));for(const s in t)if(!(o&&s==="expose")){const l=nu[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const nu={data:ks,props:Cs,emits:Cs,methods:Nn,computed:Nn,beforeCreate:Xe,created:Xe,beforeMount:Xe,mounted:Xe,beforeUpdate:Xe,updated:Xe,beforeDestroy:Xe,beforeUnmount:Xe,destroyed:Xe,unmounted:Xe,activated:Xe,deactivated:Xe,errorCaptured:Xe,serverPrefetch:Xe,components:Nn,directives:Nn,watch:iu,provide:ks,inject:ou};function ks(e,t){return t?e?function(){return Ie(de(e)?e.call(this,this):e,de(t)?t.call(this,this):t)}:t:e}function ou(e,t){return Nn($i(e),$i(t))}function $i(e){if(ie(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Xe(e,t){return e?[...new Set([].concat(e,t))]:t}function Nn(e,t){return e?Ie(Object.create(null),e,t):t}function Cs(e,t){return e?ie(e)&&ie(t)?[...new Set([...e,...t])]:Ie(Object.create(null),Eo(e),Eo(t??{})):t}function iu(e,t){if(!e)return t;if(!t)return e;const n=Ie(Object.create(null),e);for(const o in t)n[o]=Xe(e[o],t[o]);return n}function Ts(){return{app:null,config:{isNativeTag:Sr,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let ru=0;function su(e,t){return function(o,i=null){de(o)||(o=Ie({},o)),i!=null&&!Ce(i)&&(i=null);const r=Ts(),s=new WeakSet,l=[];let a=!1;const u=r.app={_uid:ru++,_component:o,_props:i,_container:null,_context:r,_instance:null,version:Hu,get config(){return r.config},set config(c){},use(c,...d){return s.has(c)||(c&&de(c.install)?(s.add(c),c.install(u,...d)):de(c)&&(s.add(c),c(u,...d))),u},mixin(c){return r.mixins.includes(c)||r.mixins.push(c),u},component(c,d){return d?(r.components[c]=d,u):r.components[c]},directive(c,d){return d?(r.directives[c]=d,u):r.directives[c]},mount(c,d,f){if(!a){const p=u._ceVNode||B(o,i);return p.appContext=r,f===!0?f="svg":f===!1&&(f=void 0),e(p,c,f),a=!0,u._container=c,c.__vue_app__=u,Bo(p.component)}},onUnmount(c){l.push(c)},unmount(){a&&(xt(l,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return r.provides[c]=d,u},runWithContext(c){const d=sn;sn=u;try{return c()}finally{sn=d}}};return u}}let sn=null;function Rn(e,t){if(Ue){let n=Ue.provides;const o=Ue.parent&&Ue.parent.provides;o===n&&(n=Ue.provides=Object.create(o)),n[e]=t}}function Ft(e,t,n=!1){const o=un();if(o||sn){let i=sn?sn._context.provides:o?o.parent==null||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&de(t)?t.call(o&&o.proxy):t}}function Ps(){return!!(un()||sn)}const Ms={},Es=()=>Object.create(Ms),Is=e=>Object.getPrototypeOf(e)===Ms;function lu(e,t,n,o=!1){const i={},r=Es();e.propsDefaults=Object.create(null),Os(e,t,i,r);for(const s in e.propsOptions[0])s in i||(i[s]=void 0);n?e.props=o?i:bc(i):e.type.props?e.props=i:e.props=r,e.attrs=r}function au(e,t,n,o){const{props:i,attrs:r,vnode:{patchFlag:s}}=e,l=ye(i),[a]=e.propsOptions;let u=!1;if((o||s>0)&&!(s&16)){if(s&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if($o(e.emitsOptions,f))continue;const p=t[f];if(a)if(_e(r,f))p!==r[f]&&(r[f]=p,u=!0);else{const x=Re(f);i[x]=zi(a,l,x,p,e,!1)}else p!==r[f]&&(r[f]=p,u=!0)}}}else{Os(e,t,i,r)&&(u=!0);let c;for(const d in l)(!t||!_e(t,d)&&((c=et(d))===d||!_e(t,c)))&&(a?n&&(n[d]!==void 0||n[c]!==void 0)&&(i[d]=zi(a,l,d,void 0,e,!0)):delete i[d]);if(r!==l)for(const d in r)(!t||!_e(t,d))&&(delete r[d],u=!0)}u&&Bt(e.attrs,"set","")}function Os(e,t,n,o){const[i,r]=e.propsOptions;let s=!1,l;if(t)for(let a in t){if(Mn(a))continue;const u=t[a];let c;i&&_e(i,c=Re(a))?!r||!r.includes(c)?n[c]=u:(l||(l={}))[c]=u:$o(e.emitsOptions,a)||(!(a in o)||u!==o[a])&&(o[a]=u,s=!0)}if(r){const a=ye(n),u=l||he;for(let c=0;c<r.length;c++){const d=r[c];n[d]=zi(i,a,d,u[d],e,!_e(u,d))}}return s}function zi(e,t,n,o,i,r){const s=e[n];if(s!=null){const l=_e(s,"default");if(l&&o===void 0){const a=s.default;if(s.type!==Function&&!s.skipFactory&&de(a)){const{propsDefaults:u}=i;if(n in u)o=u[n];else{const c=qn(i);o=u[n]=a.call(null,t),c()}}else o=a;i.ce&&i.ce._setProp(n,o)}s[0]&&(r&&!l?o=!1:s[1]&&(o===""||o===et(n))&&(o=!0))}return o}const cu=new WeakMap;function $s(e,t,n=!1){const o=n?cu:t.propsCache,i=o.get(e);if(i)return i;const r=e.props,s={},l=[];let a=!1;if(!de(e)){const c=d=>{a=!0;const[f,p]=$s(d,t,!0);Ie(s,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!r&&!a)return Ce(e)&&o.set(e,bt),bt;if(ie(r))for(let c=0;c<r.length;c++){const d=Re(r[c]);zs(d)&&(s[d]=he)}else if(r)for(const c in r){const d=Re(c);if(zs(d)){const f=r[c],p=s[d]=ie(f)||de(f)?{type:f}:Ie({},f),x=p.type;let _=!1,D=!0;if(ie(x))for(let b=0;b<x.length;++b){const P=x[b],A=de(P)&&P.name;if(A==="Boolean"){_=!0;break}else A==="String"&&(D=!1)}else _=de(x)&&x.name==="Boolean";p[0]=_,p[1]=D,(_||_e(p,"default"))&&l.push(d)}}const u=[s,l];return Ce(e)&&o.set(e,u),u}function zs(e){return e[0]!=="$"&&!Mn(e)}const Di=e=>e==="_"||e==="_ctx"||e==="$stable",Ai=e=>ie(e)?e.map(Et):[Et(e)],uu=(e,t,n)=>{if(t._n)return t;const o=ne((...i)=>Ai(t(...i)),n);return o._c=!1,o},Ds=(e,t,n)=>{const o=e._ctx;for(const i in e){if(Di(i))continue;const r=e[i];if(de(r))t[i]=uu(i,r,o);else if(r!=null){const s=Ai(r);t[i]=()=>s}}},As=(e,t)=>{const n=Ai(t);e.slots.default=()=>n},js=(e,t,n)=>{for(const o in t)(n||!Di(o))&&(e[o]=t[o])},du=(e,t,n)=>{const o=e.slots=Es();if(e.vnode.shapeFlag&32){const i=t._;i?(js(o,t,n),n&&Pr(o,"_",i,!0)):Ds(t,o)}else t&&As(e,t)},fu=(e,t,n)=>{const{vnode:o,slots:i}=e;let r=!0,s=he;if(o.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:js(i,t,n):(r=!t.$stable,Ds(t,i)),s=t}else t&&(As(e,t),s={default:1});if(r)for(const l in i)!Di(l)&&s[l]==null&&delete i[l]},st=Pu;function pu(e){return hu(e)}function hu(e,t){const n=ao();n.__VUE__=!0;const{insert:o,remove:i,patchProp:r,createElement:s,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=kt,insertStaticContent:x}=e,_=(h,m,M,W=null,V=null,N=null,E=void 0,C=null,L=!!m.dynamicChildren)=>{if(h===m)return;h&&!an(h,m)&&(W=Ke(h),ae(h,V,N,!0),h=null),m.patchFlag===-2&&(L=!1,m.dynamicChildren=null);const{type:j,ref:re,shapeFlag:te}=m;switch(j){case zo:D(h,m,M,W);break;case qe:b(h,m,M,W);break;case Do:h==null&&P(m,M,W,E);break;case be:T(h,m,M,W,V,N,E,C,L);break;default:te&1?g(h,m,M,W,V,N,E,C,L):te&6?Y(h,m,M,W,V,N,E,C,L):(te&64||te&128)&&j.process(h,m,M,W,V,N,E,C,L,ze)}re!=null&&V?Bn(re,h&&h.ref,N,m||h,!m):re==null&&h&&h.ref!=null&&Bn(h.ref,null,N,h,!0)},D=(h,m,M,W)=>{if(h==null)o(m.el=l(m.children),M,W);else{const V=m.el=h.el;m.children!==h.children&&u(V,m.children)}},b=(h,m,M,W)=>{h==null?o(m.el=a(m.children||""),M,W):m.el=h.el},P=(h,m,M,W)=>{[h.el,h.anchor]=x(h.children,m,M,W,h.el,h.anchor)},A=({el:h,anchor:m},M,W)=>{let V;for(;h&&h!==m;)V=f(h),o(h,M,W),h=V;o(m,M,W)},w=({el:h,anchor:m})=>{let M;for(;h&&h!==m;)M=f(h),i(h),h=M;i(m)},g=(h,m,M,W,V,N,E,C,L)=>{if(m.type==="svg"?E="svg":m.type==="math"&&(E="mathml"),h==null)I(m,M,W,V,N,E,C,L);else{const j=h.el&&h.el._isVueCE?h.el:null;try{j&&j._beginPatch(),R(h,m,V,N,E,C,L)}finally{j&&j._endPatch()}}},I=(h,m,M,W,V,N,E,C)=>{let L,j;const{props:re,shapeFlag:te,transition:X,dirs:ce}=h;if(L=h.el=s(h.type,N,re&&re.is,re),te&8?c(L,h.children):te&16&&K(h.children,L,null,W,V,ji(h,N),E,C),ce&&rn(h,null,W,"created"),q(L,h,h.scopeId,E,W),re){for(const Ee in re)Ee!=="value"&&!Mn(Ee)&&r(L,Ee,null,re[Ee],N,W);"value"in re&&r(L,"value",null,re.value,N),(j=re.onVnodeBeforeMount)&&It(j,W,h)}ce&&rn(h,null,W,"beforeMount");const we=gu(V,X);we&&X.beforeEnter(L),o(L,m,M),((j=re&&re.onVnodeMounted)||we||ce)&&st(()=>{j&&It(j,W,h),we&&X.enter(L),ce&&rn(h,null,W,"mounted")},V)},q=(h,m,M,W,V)=>{if(M&&p(h,M),W)for(let N=0;N<W.length;N++)p(h,W[N]);if(V){let N=V.subTree;if(m===N||Us(N.type)&&(N.ssContent===m||N.ssFallback===m)){const E=V.vnode;q(h,E,E.scopeId,E.slotScopeIds,V.parent)}}},K=(h,m,M,W,V,N,E,C,L=0)=>{for(let j=L;j<h.length;j++){const re=h[j]=C?Gt(h[j]):Et(h[j]);_(null,re,m,M,W,V,N,E,C)}},R=(h,m,M,W,V,N,E)=>{const C=m.el=h.el;let{patchFlag:L,dynamicChildren:j,dirs:re}=m;L|=h.patchFlag&16;const te=h.props||he,X=m.props||he;let ce;if(M&&ln(M,!1),(ce=X.onVnodeBeforeUpdate)&&It(ce,M,m,h),re&&rn(m,h,M,"beforeUpdate"),M&&ln(M,!0),(te.innerHTML&&X.innerHTML==null||te.textContent&&X.textContent==null)&&c(C,""),j?Q(h.dynamicChildren,j,C,M,W,ji(m,V),N):E||y(h,m,C,null,M,W,ji(m,V),N,!1),L>0){if(L&16)H(C,te,X,M,V);else if(L&2&&te.class!==X.class&&r(C,"class",null,X.class,V),L&4&&r(C,"style",te.style,X.style,V),L&8){const we=m.dynamicProps;for(let Ee=0;Ee<we.length;Ee++){const Te=we[Ee],ot=te[Te],it=X[Te];(it!==ot||Te==="value")&&r(C,Te,ot,it,V,M)}}L&1&&h.children!==m.children&&c(C,m.children)}else!E&&j==null&&H(C,te,X,M,V);((ce=X.onVnodeUpdated)||re)&&st(()=>{ce&&It(ce,M,m,h),re&&rn(m,h,M,"updated")},W)},Q=(h,m,M,W,V,N,E)=>{for(let C=0;C<m.length;C++){const L=h[C],j=m[C],re=L.el&&(L.type===be||!an(L,j)||L.shapeFlag&198)?d(L.el):M;_(L,j,re,null,W,V,N,E,!0)}},H=(h,m,M,W,V)=>{if(m!==M){if(m!==he)for(const N in m)!Mn(N)&&!(N in M)&&r(h,N,m[N],null,V,W);for(const N in M){if(Mn(N))continue;const E=M[N],C=m[N];E!==C&&N!=="value"&&r(h,N,C,E,V,W)}"value"in M&&r(h,"value",m.value,M.value,V)}},T=(h,m,M,W,V,N,E,C,L)=>{const j=m.el=h?h.el:l(""),re=m.anchor=h?h.anchor:l("");let{patchFlag:te,dynamicChildren:X,slotScopeIds:ce}=m;ce&&(C=C?C.concat(ce):ce),h==null?(o(j,M,W),o(re,M,W),K(m.children||[],M,re,V,N,E,C,L)):te>0&&te&64&&X&&h.dynamicChildren?(Q(h.dynamicChildren,X,M,V,N,E,C),(m.key!=null||V&&m===V.subTree)&&Ls(h,m,!0)):y(h,m,M,re,V,N,E,C,L)},Y=(h,m,M,W,V,N,E,C,L)=>{m.slotScopeIds=C,h==null?m.shapeFlag&512?V.ctx.activate(m,M,W,E,L):S(m,M,W,V,N,E,L):J(h,m,L)},S=(h,m,M,W,V,N,E)=>{const C=h.component=Du(h,W,V);if(Po(h)&&(C.ctx.renderer=ze),Au(C,!1,E),C.asyncDep){if(V&&V.registerDep(C,F,E),!h.el){const L=C.subTree=B(qe);b(null,L,m,M),h.placeholder=L.el}}else F(C,h,m,M,V,N,E)},J=(h,m,M)=>{const W=m.component=h.component;if(Cu(h,m,M))if(W.asyncDep&&!W.asyncResolved){k(W,m,M);return}else W.next=m,W.update();else m.el=h.el,W.vnode=m},F=(h,m,M,W,V,N,E)=>{const C=()=>{if(h.isMounted){let{next:te,bu:X,u:ce,parent:we,vnode:Ee}=h;{const jt=Bs(h);if(jt){te&&(te.el=Ee.el,k(h,te,E)),jt.asyncDep.then(()=>{h.isUnmounted||C()});return}}let Te=te,ot;ln(h,!1),te?(te.el=Ee.el,k(h,te,E)):te=Ee,X&&lo(X),(ot=te.props&&te.props.onVnodeBeforeUpdate)&&It(ot,we,te,Ee),ln(h,!0);const it=Ws(h),At=h.subTree;h.subTree=it,_(At,it,d(At.el),Ke(At),h,V,N),te.el=it.el,Te===null&&Tu(h,it.el),ce&&st(ce,V),(ot=te.props&&te.props.onVnodeUpdated)&&st(()=>It(ot,we,te,Ee),V)}else{let te;const{el:X,props:ce}=m,{bm:we,m:Ee,parent:Te,root:ot,type:it}=h,At=Sn(m);ln(h,!1),we&&lo(we),!At&&(te=ce&&ce.onVnodeBeforeMount)&&It(te,Te,m),ln(h,!0);{ot.ce&&ot.ce._def.shadowRoot!==!1&&ot.ce._injectChildStyle(it);const jt=h.subTree=Ws(h);_(null,jt,M,W,h,V,N),m.el=jt.el}if(Ee&&st(Ee,V),!At&&(te=ce&&ce.onVnodeMounted)){const jt=m;st(()=>It(te,Te,jt),V)}(m.shapeFlag&256||Te&&Sn(Te.vnode)&&Te.vnode.shapeFlag&256)&&h.a&&st(h.a,V),h.isMounted=!0,m=M=W=null}};h.scope.on();const L=h.effect=new zr(C);h.scope.off();const j=h.update=L.run.bind(L),re=h.job=L.runIfDirty.bind(L);re.i=h,re.id=h.uid,L.scheduler=()=>Si(re),ln(h,!0),j()},k=(h,m,M)=>{m.component=h;const W=h.vnode.props;h.vnode=m,h.next=null,au(h,m.props,W,M),fu(h,m.children,M),Ct(),os(h),Tt()},y=(h,m,M,W,V,N,E,C,L=!1)=>{const j=h&&h.children,re=h?h.shapeFlag:0,te=m.children,{patchFlag:X,shapeFlag:ce}=m;if(X>0){if(X&128){$(j,te,M,W,V,N,E,C,L);return}else if(X&256){O(j,te,M,W,V,N,E,C,L);return}}ce&8?(re&16&&De(j,V,N),te!==j&&c(M,te)):re&16?ce&16?$(j,te,M,W,V,N,E,C,L):De(j,V,N,!0):(re&8&&c(M,""),ce&16&&K(te,M,W,V,N,E,C,L))},O=(h,m,M,W,V,N,E,C,L)=>{h=h||bt,m=m||bt;const j=h.length,re=m.length,te=Math.min(j,re);let X;for(X=0;X<te;X++){const ce=m[X]=L?Gt(m[X]):Et(m[X]);_(h[X],ce,M,null,V,N,E,C,L)}j>re?De(h,V,N,!0,!1,te):K(m,M,W,V,N,E,C,L,te)},$=(h,m,M,W,V,N,E,C,L)=>{let j=0;const re=m.length;let te=h.length-1,X=re-1;for(;j<=te&&j<=X;){const ce=h[j],we=m[j]=L?Gt(m[j]):Et(m[j]);if(an(ce,we))_(ce,we,M,null,V,N,E,C,L);else break;j++}for(;j<=te&&j<=X;){const ce=h[te],we=m[X]=L?Gt(m[X]):Et(m[X]);if(an(ce,we))_(ce,we,M,null,V,N,E,C,L);else break;te--,X--}if(j>te){if(j<=X){const ce=X+1,we=ce<re?m[ce].el:W;for(;j<=X;)_(null,m[j]=L?Gt(m[j]):Et(m[j]),M,we,V,N,E,C,L),j++}}else if(j>X)for(;j<=te;)ae(h[j],V,N,!0),j++;else{const ce=j,we=j,Ee=new Map;for(j=we;j<=X;j++){const dt=m[j]=L?Gt(m[j]):Et(m[j]);dt.key!=null&&Ee.set(dt.key,j)}let Te,ot=0;const it=X-we+1;let At=!1,jt=0;const to=new Array(it);for(j=0;j<it;j++)to[j]=0;for(j=ce;j<=te;j++){const dt=h[j];if(ot>=it){ae(dt,V,N,!0);continue}let Lt;if(dt.key!=null)Lt=Ee.get(dt.key);else for(Te=we;Te<=X;Te++)if(to[Te-we]===0&&an(dt,m[Te])){Lt=Te;break}Lt===void 0?ae(dt,V,N,!0):(to[Lt-we]=j+1,Lt>=jt?jt=Lt:At=!0,_(dt,m[Lt],M,null,V,N,E,C,L),ot++)}const Ba=At?mu(to):bt;for(Te=Ba.length-1,j=it-1;j>=0;j--){const dt=we+j,Lt=m[dt],Va=m[dt+1],Na=dt+1<re?Va.el||Va.placeholder:W;to[j]===0?_(null,Lt,M,Na,V,N,E,C,L):At&&(Te<0||j!==Ba[Te]?le(Lt,M,Na,2):Te--)}}},le=(h,m,M,W,V=null)=>{const{el:N,type:E,transition:C,children:L,shapeFlag:j}=h;if(j&6){le(h.component.subTree,m,M,W);return}if(j&128){h.suspense.move(m,M,W);return}if(j&64){E.move(h,m,M,ze);return}if(E===be){o(N,m,M);for(let te=0;te<L.length;te++)le(L[te],m,M,W);o(h.anchor,m,M);return}if(E===Do){A(h,m,M);return}if(W!==2&&j&1&&C)if(W===0)C.beforeEnter(N),o(N,m,M),st(()=>C.enter(N),V);else{const{leave:te,delayLeave:X,afterLeave:ce}=C,we=()=>{h.ctx.isUnmounted?i(N):o(N,m,M)},Ee=()=>{N._isLeaving&&N[Rt](!0),te(N,()=>{we(),ce&&ce()})};X?X(N,we,Ee):Ee()}else o(N,m,M)},ae=(h,m,M,W=!1,V=!1)=>{const{type:N,props:E,ref:C,children:L,dynamicChildren:j,shapeFlag:re,patchFlag:te,dirs:X,cacheIndex:ce}=h;if(te===-2&&(V=!1),C!=null&&(Ct(),Bn(C,null,M,h,!0),Tt()),ce!=null&&(m.renderCache[ce]=void 0),re&256){m.ctx.deactivate(h);return}const we=re&1&&X,Ee=!Sn(h);let Te;if(Ee&&(Te=E&&E.onVnodeBeforeUnmount)&&It(Te,m,h),re&6)Se(h.component,M,W);else{if(re&128){h.suspense.unmount(M,W);return}we&&rn(h,null,m,"beforeUnmount"),re&64?h.type.remove(h,m,M,ze,W):j&&!j.hasOnce&&(N!==be||te>0&&te&64)?De(j,m,M,!1,!0):(N===be&&te&384||!V&&re&16)&&De(L,m,M),W&&me(h)}(Ee&&(Te=E&&E.onVnodeUnmounted)||we)&&st(()=>{Te&&It(Te,m,h),we&&rn(h,null,m,"unmounted")},M)},me=h=>{const{type:m,el:M,anchor:W,transition:V}=h;if(m===be){ge(M,W);return}if(m===Do){w(h);return}const N=()=>{i(M),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(h.shapeFlag&1&&V&&!V.persisted){const{leave:E,delayLeave:C}=V,L=()=>E(M,N);C?C(h.el,N,L):L()}else N()},ge=(h,m)=>{let M;for(;h!==m;)M=f(h),i(h),h=M;i(m)},Se=(h,m,M)=>{const{bum:W,scope:V,job:N,subTree:E,um:C,m:L,a:j}=h;Vs(L),Vs(j),W&&lo(W),V.stop(),N&&(N.flags|=8,ae(E,h,m,M)),C&&st(C,m),st(()=>{h.isUnmounted=!0},m)},De=(h,m,M,W=!1,V=!1,N=0)=>{for(let E=N;E<h.length;E++)ae(h[E],m,M,W,V)},Ke=h=>{if(h.shapeFlag&6)return Ke(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const m=f(h.anchor||h.el),M=m&&m[Bc];return M?f(M):m};let ut=!1;const Qe=(h,m,M)=>{h==null?m._vnode&&ae(m._vnode,null,null,!0):_(m._vnode||null,h,m,null,null,null,M),m._vnode=h,ut||(ut=!0,os(),is(),ut=!1)},ze={p:_,um:ae,m:le,r:me,mt:S,mc:K,pc:y,pbc:Q,n:Ke,o:e};return{render:Qe,hydrate:void 0,createApp:su(Qe)}}function ji({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ln({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function gu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ls(e,t,n=!1){const o=e.children,i=t.children;if(ie(o)&&ie(i))for(let r=0;r<o.length;r++){const s=o[r];let l=i[r];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=i[r]=Gt(i[r]),l.el=s.el),!n&&l.patchFlag!==-2&&Ls(s,l)),l.type===zo&&l.patchFlag!==-1&&(l.el=s.el),l.type===qe&&!l.el&&(l.el=s.el)}}function mu(e){const t=e.slice(),n=[0];let o,i,r,s,l;const a=e.length;for(o=0;o<a;o++){const u=e[o];if(u!==0){if(i=n[n.length-1],e[i]<u){t[o]=i,n.push(o);continue}for(r=0,s=n.length-1;r<s;)l=r+s>>1,e[n[l]]<u?r=l+1:s=l;u<e[n[r]]&&(r>0&&(t[o]=n[r-1]),n[r]=o)}}for(r=n.length,s=n[r-1];r-- >0;)n[r]=s,s=t[s];return n}function Bs(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Bs(t)}function Vs(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const vu=Symbol.for("v-scx"),bu=()=>Ft(vu);function Ns(e,t){return Oo(e,null,t)}function yu(e,t){return Oo(e,null,{flush:"sync"})}function ue(e,t,n){return Oo(e,t,n)}function Oo(e,t,n=he){const{immediate:o,deep:i,flush:r,once:s}=n,l=Ie({},n),a=t&&o||!t&&r!=="post";let u;if(Un){if(r==="sync"){const p=bu();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=kt,p.resume=kt,p.pause=kt,p}}const c=Ue;l.call=(p,x,_)=>xt(p,c,x,_);let d=!1;r==="post"?l.scheduler=p=>{st(p,c&&c.suspense)}:r!=="sync"&&(d=!0,l.scheduler=(p,x)=>{x?p():Si(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=Ic(e,t,l);return Un&&(u?u.push(f):a&&f()),f}function wu(e,t,n){const o=this.proxy,i=Oe(e)?e.includes(".")?Rs(o,e):()=>o[e]:e.bind(o,o);let r;de(t)?r=t:(r=t.handler,n=t);const s=qn(this),l=Oo(i,r.bind(o),n);return s(),l}function Rs(e,t){const n=t.split(".");return()=>{let o=e;for(let i=0;i<n.length&&o;i++)o=o[n[i]];return o}}function lt(e,t,n=he){const o=un(),i=Re(t),r=et(t),s=Hs(e,i),l=Qr((a,u)=>{let c,d=he,f;return yu(()=>{const p=e[i];tt(c,p)&&(c=p,u())}),{get(){return a(),n.get?n.get(c):c},set(p){const x=n.set?n.set(p):p;if(!tt(x,c)&&!(d!==he&&tt(p,d)))return;const _=o.vnode.props;_&&(t in _||i in _||r in _)&&(`onUpdate:${t}`in _||`onUpdate:${i}`in _||`onUpdate:${r}`in _)||(c=p,u()),o.emit(`update:${t}`,x),tt(p,x)&&tt(p,d)&&!tt(x,f)&&u(),d=p,f=x}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?s||he:l,done:!1}:{done:!0}}}},l}const Hs=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Re(t)}Modifiers`]||e[`${et(t)}Modifiers`];function xu(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||he;let i=n;const r=t.startsWith("update:"),s=r&&Hs(o,t.slice(7));s&&(s.trim&&(i=n.map(c=>Oe(c)?c.trim():c)),s.number&&(i=n.map(ai)));let l,a=o[l=li(t)]||o[l=li(Re(t))];!a&&r&&(a=o[l=li(et(t))]),a&&xt(a,e,6,i);const u=o[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,xt(u,e,6,i)}}const _u=new WeakMap;function Fs(e,t,n=!1){const o=n?_u:t.emitsCache,i=o.get(e);if(i!==void 0)return i;const r=e.emits;let s={},l=!1;if(!de(e)){const a=u=>{const c=Fs(u,t,!0);c&&(l=!0,Ie(s,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!l?(Ce(e)&&o.set(e,null),null):(ie(r)?r.forEach(a=>s[a]=null):Ie(s,r),Ce(e)&&o.set(e,s),s)}function $o(e,t){return!e||!no(t)?!1:(t=t.slice(2).replace(/Once$/,""),_e(e,t[0].toLowerCase()+t.slice(1))||_e(e,et(t))||_e(e,t))}function Vm(){}function Ws(e){const{type:t,vnode:n,proxy:o,withProxy:i,propsOptions:[r],slots:s,attrs:l,emit:a,render:u,renderCache:c,props:d,data:f,setupState:p,ctx:x,inheritAttrs:_}=e,D=ko(e);let b,P;try{if(n.shapeFlag&4){const w=i||o,g=w;b=Et(u.call(g,w,c,d,p,f,x)),P=l}else{const w=t;b=Et(w.length>1?w(d,{attrs:l,slots:s,emit:a}):w(d,null)),P=t.props?l:Su(l)}}catch(w){Hn.length=0,_o(w,e,1),b=B(qe)}let A=b;if(P&&_!==!1){const w=Object.keys(P),{shapeFlag:g}=A;w.length&&g&7&&(r&&w.some(ii)&&(P=ku(P,r)),A=Xt(A,P,!1,!0))}return n.dirs&&(A=Xt(A,null,!1,!0),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&Ln(A,n.transition),b=A,ko(D),b}const Su=e=>{let t;for(const n in e)(n==="class"||n==="style"||no(n))&&((t||(t={}))[n]=e[n]);return t},ku=(e,t)=>{const n={};for(const o in e)(!ii(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Cu(e,t,n){const{props:o,children:i,component:r}=e,{props:s,children:l,patchFlag:a}=t,u=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?qs(o,s,u):!!s;if(a&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(s[f]!==o[f]&&!$o(u,f))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:o===s?!1:o?s?qs(o,s,u):!0:!!s;return!1}function qs(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i<o.length;i++){const r=o[i];if(t[r]!==e[r]&&!$o(n,r))return!0}return!1}function Tu({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o===e)(e=t.vnode).el=n,t=t.parent;else break}}const Us=e=>e.__isSuspense;function Pu(e,t){t&&t.pendingBranch?ie(e)?t.effects.push(...e):t.effects.push(e):Lc(e)}const be=Symbol.for("v-fgt"),zo=Symbol.for("v-txt"),qe=Symbol.for("v-cmt"),Do=Symbol.for("v-stc"),Hn=[];let at=null;function v(e=!1){Hn.push(at=e?null:[])}function Mu(){Hn.pop(),at=Hn[Hn.length-1]||null}let Fn=1;function Ao(e,t=!1){Fn+=e,e<0&&at&&t&&(at.hasOnce=!0)}function Ks(e){return e.dynamicChildren=Fn>0?at||bt:null,Mu(),Fn>0&&at&&at.push(e),e}function z(e,t,n,o,i,r){return Ks(U(e,t,n,o,i,r,!0))}function oe(e,t,n,o,i){return Ks(B(e,t,n,o,i,!0))}function Wn(e){return e?e.__v_isVNode===!0:!1}function an(e,t){return e.type===t.type&&e.key===t.key}const Zs=({key:e})=>e??null,jo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Oe(e)||$e(e)||de(e)?{i:Ve,r:e,k:t,f:!!n}:e:null);function U(e,t=null,n=null,o=0,i=null,r=e===be?0:1,s=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Zs(t),ref:t&&jo(t),scopeId:ss,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ve};return l?(Li(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=Oe(n)?8:16),Fn>0&&!s&&at&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&at.push(a),a}const B=Eu;function Eu(e,t=null,n=null,o=0,i=null,r=!1){if((!e||e===bs)&&(e=qe),Wn(e)){const l=Xt(e,t,!0);return n&&Li(l,n),Fn>0&&!r&&at&&(l.shapeFlag&6?at[at.indexOf(e)]=l:at.push(l)),l.patchFlag=-2,l}if(Ru(e)&&(e=e.__vccOpts),t){t=Iu(t);let{class:l,style:a}=t;l&&!Oe(l)&&(t.class=fe(l)),Ce(a)&&(xi(a)&&!ie(a)&&(a=Ie({},a)),t.style=Pe(a))}const s=Oe(e)?1:Us(e)?128:ls(e)?64:Ce(e)?4:de(e)?2:0;return U(e,t,n,o,i,s,r,!0)}function Iu(e){return e?xi(e)||Is(e)?Ie({},e):e:null}function Xt(e,t,n=!1,o=!1){const{props:i,ref:r,patchFlag:s,children:l,transition:a}=e,u=t?cn(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Zs(u),ref:t&&t.ref?n&&r?ie(r)?r.concat(jo(t)):[r,jo(t)]:jo(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==be?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Xt(e.ssContent),ssFallback:e.ssFallback&&Xt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&Ln(c,a.clone(c)),c}function Wt(e=" ",t=0){return B(zo,null,e,t)}function Ou(e,t){const n=B(Do,null,e);return n.staticCount=t,n}function se(e="",t=!1){return t?(v(),oe(qe,null,e)):B(qe,null,e)}function Et(e){return e==null||typeof e=="boolean"?B(qe):ie(e)?B(be,null,e.slice()):Wn(e)?Gt(e):B(zo,null,String(e))}function Gt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Xt(e)}function Li(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(ie(t))n=16;else if(typeof t=="object")if(o&65){const i=t.default;i&&(i._c&&(i._d=!1),Li(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Is(t)?t._ctx=Ve:i===3&&Ve&&(Ve.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else de(t)?(t={default:t,_ctx:Ve},n=32):(t=String(t),o&64?(n=16,t=[Wt(t)]):n=8);e.children=t,e.shapeFlag|=n}function cn(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const i in o)if(i==="class")t.class!==o.class&&(t.class=fe([t.class,o.class]));else if(i==="style")t.style=Pe([t.style,o.style]);else if(no(i)){const r=t[i],s=o[i];s&&r!==s&&!(ie(r)&&r.includes(s))&&(t[i]=r?[].concat(r,s):s)}else i!==""&&(t[i]=o[i])}return t}function It(e,t,n,o=null){xt(e,t,7,[n,o])}const $u=Ts();let zu=0;function Du(e,t,n){const o=e.type,i=(t?t.appContext:e.appContext)||$u,r={uid:zu++,vnode:e,type:o,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ga(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:$s(o,i),emitsOptions:Fs(o,i),emit:null,emitted:null,propsDefaults:he,inheritAttrs:o.inheritAttrs,ctx:he,data:he,props:he,attrs:he,slots:he,refs:he,setupState:he,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=xu.bind(null,r),e.ce&&e.ce(r),r}let Ue=null;const un=()=>Ue||Ve;let Lo,Bi;{const e=ao(),t=(n,o)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(o),r=>{i.length>1?i.forEach(s=>s(r)):i[0](r)}};Lo=t("__VUE_INSTANCE_SETTERS__",n=>Ue=n),Bi=t("__VUE_SSR_SETTERS__",n=>Un=n)}const qn=e=>{const t=Ue;return Lo(e),e.scope.on(),()=>{e.scope.off(),Lo(t)}},Ys=()=>{Ue&&Ue.scope.off(),Lo(null)};function Xs(e){return e.vnode.shapeFlag&4}let Un=!1;function Au(e,t=!1,n=!1){t&&Bi(t);const{props:o,children:i}=e.vnode,r=Xs(e);lu(e,o,r,t),du(e,i,n||t);const s=r?ju(e,t):void 0;return t&&Bi(!1),s}function ju(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Qc);const{setup:o}=n;if(o){Ct();const i=e.setupContext=o.length>1?Bu(e):null,r=qn(e),s=wn(o,e,0,[e.props,i]),l=Cr(s);if(Tt(),r(),(l||e.sp)&&!Sn(e)&&hs(e),l){if(s.then(Ys,Ys),t)return s.then(a=>{Gs(e,a)}).catch(a=>{_o(a,e,0)});e.asyncDep=s}else Gs(e,s)}else Js(e)}function Gs(e,t,n){de(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ce(t)&&(e.setupState=Jr(t)),Js(e)}function Js(e,t,n){const o=e.type;e.render||(e.render=o.render||kt);{const i=qn(e);Ct();try{eu(e)}finally{Tt(),i()}}}const Lu={get(e,t){return We(e,"get",""),e[t]}};function Bu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Lu),slots:e.slots,emit:e.emit,expose:t}}function Bo(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Jr(yc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Vn)return Vn[n](e)},has(t,n){return n in t||n in Vn}})):e.proxy}const Vu=/(?:^|[-_])\w/g,Nu=e=>e.replace(Vu,t=>t.toUpperCase()).replace(/[-_]/g,"");function Qs(e,t=!0){return de(e)?e.displayName||e.name:e.name||t&&e.__name}function el(e,t,n=!1){let o=Qs(t);if(!o&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(o=i[1])}if(!o&&e&&e.parent){const i=r=>{for(const s in r)if(r[s]===t)return s};o=i(e.components||e.parent.type.components)||i(e.appContext.components)}return o?Nu(o):n?"App":"Anonymous"}function Ru(e){return de(e)&&"__vccOpts"in e}const G=(e,t)=>Mc(e,t,Un);function tl(e,t,n){try{Ao(-1);const o=arguments.length;return o===2?Ce(t)&&!ie(t)?Wn(t)?B(e,null,[t]):B(e,t):B(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Wn(n)&&(n=[n]),B(e,t,n))}finally{Ao(1)}}const Hu="3.5.24";/**
16
+ `],...zc(n))}),t}function zc({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,i=` at <${el(e.component,e.type,o)}`,r=">"+n;return e.props?[i,...Dc(e.props),r]:[i+r]}function Dc(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...es(o,e[o]))}),n.length>3&&t.push(" ..."),t}function es(e,t,n){return Oe(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:$e(t)?(t=es(e,ye(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):de(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=ye(t),n?t:[`${e}=`,t])}function wn(e,t,n,o){try{return o?e(...o):e()}catch(i){_o(i,t,n)}}function xt(e,t,n,o){if(de(e)){const i=wn(e,t,n,o);return i&&Cr(i)&&i.catch(r=>{_o(r,t,n)}),i}if(ie(e)){const i=[];for(let r=0;r<e.length;r++)i.push(xt(e[r],t,n,o));return i}}function _o(e,t,n,o=!0){const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||he;if(t){let l=t.parent;const a=t.proxy,u=`https://vuejs.org/error-reference/#runtime-${n}`;for(;l;){const c=l.ec;if(c){for(let d=0;d<c.length;d++)if(c[d](e,a,u)===!1)return}l=l.parent}if(r){Ct(),wn(r,null,10,[e,a,u]),Tt();return}}Ac(e,n,i,o,s)}function Ac(e,t,n,o=!0,i=!1){if(i)throw e;console.error(e)}const Ze=[];let Pt=-1;const xn=[];let Zt=null,_n=0;const ts=Promise.resolve();let So=null;function gt(e){const t=So||ts;return e?t.then(this?e.bind(this):e):t}function jc(e){let t=Pt+1,n=Ze.length;for(;t<n;){const o=t+n>>>1,i=Ze[o],r=jn(i);r<e||r===e&&i.flags&2?t=o+1:n=o}return t}function Si(e){if(!(e.flags&1)){const t=jn(e),n=Ze[Ze.length-1];!n||!(e.flags&2)&&t>=jn(n)?Ze.push(e):Ze.splice(jc(t),0,e),e.flags|=1,ns()}}function ns(){So||(So=ts.then(rs))}function Lc(e){ie(e)?xn.push(...e):Zt&&e.id===-1?Zt.splice(_n+1,0,e):e.flags&1||(xn.push(e),e.flags|=1),ns()}function os(e,t,n=Pt+1){for(;n<Ze.length;n++){const o=Ze[n];if(o&&o.flags&2){if(e&&o.id!==e.uid)continue;Ze.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function is(e){if(xn.length){const t=[...new Set(xn)].sort((n,o)=>jn(n)-jn(o));if(xn.length=0,Zt){Zt.push(...t);return}for(Zt=t,_n=0;_n<Zt.length;_n++){const n=Zt[_n];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Zt=null,_n=0}}const jn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function rs(e){try{for(Pt=0;Pt<Ze.length;Pt++){const t=Ze[Pt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),wn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Pt<Ze.length;Pt++){const t=Ze[Pt];t&&(t.flags&=-2)}Pt=-1,Ze.length=0,is(),So=null,(Ze.length||xn.length)&&rs()}}let Ve=null,ss=null;function ko(e){const t=Ve;return Ve=e,ss=e&&e.type.__scopeId||null,t}function ne(e,t=Ve,n){if(!t||e._n)return e;const o=(...i)=>{o._d&&Ao(-1);const r=ko(t);let s;try{s=e(...i)}finally{ko(r),o._d&&Ao(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Ne(e,t){if(Ve===null)return e;const n=Bo(Ve),o=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[r,s,l,a=he]=t[i];r&&(de(r)&&(r={mounted:r,updated:r}),r.deep&&Nt(s),o.push({dir:r,instance:n,value:s,oldValue:void 0,arg:l,modifiers:a}))}return e}function rn(e,t,n,o){const i=e.dirs,r=t&&t.dirs;for(let s=0;s<i.length;s++){const l=i[s];r&&(l.oldValue=r[s].value);let a=l.dir[o];a&&(Ct(),xt(a,n,8,[e.el,l,e,t]),Tt())}}const Bc=Symbol("_vte"),ls=e=>e.__isTeleport,Rt=Symbol("_leaveCb"),Co=Symbol("_enterCb");function Vc(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return je(()=>{e.isMounted=!0}),Ti(()=>{e.isUnmounting=!0}),e}const mt=[Function,Array],as={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:mt,onEnter:mt,onAfterEnter:mt,onEnterCancelled:mt,onBeforeLeave:mt,onLeave:mt,onAfterLeave:mt,onLeaveCancelled:mt,onBeforeAppear:mt,onAppear:mt,onAfterAppear:mt,onAppearCancelled:mt},cs=e=>{const t=e.subTree;return t.component?cs(t.component):t},Nc={name:"BaseTransition",props:as,setup(e,{slots:t}){const n=un(),o=Vc();return()=>{const i=t.default&&ps(t.default(),!0);if(!i||!i.length)return;const r=us(i),s=ye(e),{mode:l}=s;if(o.isLeaving)return Ci(r);const a=fs(r);if(!a)return Ci(r);let u=ki(a,s,o,n,d=>u=d);a.type!==qe&&Ln(a,u);let c=n.subTree&&fs(n.subTree);if(c&&c.type!==qe&&!an(c,a)&&cs(n).type!==qe){let d=ki(c,s,o,n);if(Ln(c,d),l==="out-in"&&a.type!==qe)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Ci(r);l==="in-out"&&a.type!==qe?d.delayLeave=(f,p,x)=>{const _=ds(o,c);_[String(c.key)]=c,f[Rt]=()=>{p(),f[Rt]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{x(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return r}}};function us(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==qe){t=n;break}}return t}const Rc=Nc;function ds(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function ki(e,t,n,o,i){const{appear:r,mode:s,persisted:l=!1,onBeforeEnter:a,onEnter:u,onAfterEnter:c,onEnterCancelled:d,onBeforeLeave:f,onLeave:p,onAfterLeave:x,onLeaveCancelled:_,onBeforeAppear:D,onAppear:b,onAfterAppear:P,onAppearCancelled:A}=t,w=String(e.key),g=ds(n,e),I=(R,Q)=>{R&&xt(R,o,9,Q)},q=(R,Q)=>{const H=Q[1];I(R,Q),ie(R)?R.every(T=>T.length<=1)&&H():R.length<=1&&H()},K={mode:s,persisted:l,beforeEnter(R){let Q=a;if(!n.isMounted)if(r)Q=D||a;else return;R[Rt]&&R[Rt](!0);const H=g[w];H&&an(e,H)&&H.el[Rt]&&H.el[Rt](),I(Q,[R])},enter(R){let Q=u,H=c,T=d;if(!n.isMounted)if(r)Q=b||u,H=P||c,T=A||d;else return;let Y=!1;const S=R[Co]=J=>{Y||(Y=!0,J?I(T,[R]):I(H,[R]),K.delayedLeave&&K.delayedLeave(),R[Co]=void 0)};Q?q(Q,[R,S]):S()},leave(R,Q){const H=String(e.key);if(R[Co]&&R[Co](!0),n.isUnmounting)return Q();I(f,[R]);let T=!1;const Y=R[Rt]=S=>{T||(T=!0,Q(),S?I(_,[R]):I(x,[R]),R[Rt]=void 0,g[H]===e&&delete g[H])};g[H]=e,p?q(p,[R,Y]):Y()},clone(R){const Q=ki(R,t,n,o,i);return i&&i(Q),Q}};return K}function Ci(e){if(Po(e))return e=Xt(e),e.children=null,e}function fs(e){if(!Po(e))return ls(e.type)&&e.children?us(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&de(n.default))return n.default()}}function Ln(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Ln(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ps(e,t=!1,n){let o=[],i=0;for(let r=0;r<e.length;r++){let s=e[r];const l=n==null?s.key:String(n)+String(s.key!=null?s.key:r);s.type===be?(s.patchFlag&128&&i++,o=o.concat(ps(s.children,t,l))):(t||s.type!==qe)&&o.push(l!=null?Xt(s,{key:l}):s)}if(i>1)for(let r=0;r<o.length;r++)o[r].patchFlag=-2;return o}function pe(e,t){return de(e)?Ie({name:e.name},t,{setup:e}):e}function hs(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const To=new WeakMap;function Bn(e,t,n,o,i=!1){if(ie(e)){e.forEach((x,_)=>Bn(x,t&&(ie(t)?t[_]:t),n,o,i));return}if(Sn(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Bn(e,t,n,o.component.subTree);return}const r=o.shapeFlag&4?Bo(o.component):o.el,s=i?null:r,{i:l,r:a}=e,u=t&&t.r,c=l.refs===he?l.refs={}:l.refs,d=l.setupState,f=ye(d),p=d===he?Sr:x=>_e(f,x);if(u!=null&&u!==a){if(gs(t),Oe(u))c[u]=null,p(u)&&(d[u]=null);else if($e(u)){u.value=null;const x=t;x.k&&(c[x.k]=null)}}if(de(a))wn(a,l,12,[s,c]);else{const x=Oe(a),_=$e(a);if(x||_){const D=()=>{if(e.f){const b=x?p(a)?d[a]:c[a]:a.value;if(i)ie(b)&&ri(b,r);else if(ie(b))b.includes(r)||b.push(r);else if(x)c[a]=[r],p(a)&&(d[a]=c[a]);else{const P=[r];a.value=P,e.k&&(c[e.k]=P)}}else x?(c[a]=s,p(a)&&(d[a]=s)):_&&(a.value=s,e.k&&(c[e.k]=s))};if(s){const b=()=>{D(),To.delete(e)};b.id=-1,To.set(e,b),st(b,n)}else gs(e),D()}}}function gs(e){const t=To.get(e);t&&(t.flags|=8,To.delete(e))}ao().requestIdleCallback,ao().cancelIdleCallback;const Sn=e=>!!e.type.__asyncLoader,Po=e=>e.type.__isKeepAlive;function Hc(e,t){ms(e,"a",t)}function Fc(e,t){ms(e,"da",t)}function ms(e,t,n=Ue){const o=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Mo(t,o,n),n){let i=n.parent;for(;i&&i.parent;)Po(i.parent.vnode)&&Wc(o,t,n,i),i=i.parent}}function Wc(e,t,n,o){const i=Mo(t,e,o,!0);Mt(()=>{ri(o[t],i)},n)}function Mo(e,t,n=Ue,o=!1){if(n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{Ct();const l=qn(n),a=xt(t,n,e,s);return l(),Tt(),a});return o?i.unshift(r):i.push(r),r}}const Ht=e=>(t,n=Ue)=>{(!Un||e==="sp")&&Mo(e,(...o)=>t(...o),n)},qc=Ht("bm"),je=Ht("m"),Uc=Ht("bu"),Kc=Ht("u"),Ti=Ht("bum"),Mt=Ht("um"),Zc=Ht("sp"),Yc=Ht("rtg"),Xc=Ht("rtc");function vs(e,t=Ue){Mo("ec",e,t)}const Gc="components",bs=Symbol.for("v-ndc");function Pi(e){return Oe(e)?Jc(Gc,e,!1)||e:e||bs}function Jc(e,t,n=!0,o=!1){const i=Ve||Ue;if(i){const r=i.type;{const l=Qs(r,!1);if(l&&(l===t||l===Re(t)||l===so(Re(t))))return r}const s=ys(i[e]||r[e],t)||ys(i.appContext[e],t);return!s&&o?r:s}}function ys(e,t){return e&&(e[t]||e[Re(t)]||e[so(Re(t))])}function Yt(e,t,n,o){let i;const r=n,s=ie(e);if(s||Oe(e)){const l=s&&yn(e);let a=!1,u=!1;l&&(a=!ft(e),u=Kt(e),e=po(e)),i=new Array(e.length);for(let c=0,d=e.length;c<d;c++)i[c]=t(a?u?yo(Be(e[c])):Be(e[c]):e[c],c,void 0,r)}else if(typeof e=="number"){i=new Array(e);for(let l=0;l<e;l++)i[l]=t(l+1,l,void 0,r)}else if(Ce(e))if(e[Symbol.iterator])i=Array.from(e,(l,a)=>t(l,a,void 0,r));else{const l=Object.keys(e);i=new Array(l.length);for(let a=0,u=l.length;a<u;a++){const c=l[a];i[a]=t(e[c],c,a,r)}}else i=[];return i}function Mi(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(ie(o))for(let i=0;i<o.length;i++)e[o[i].name]=o[i].fn;else o&&(e[o.name]=o.key?(...i)=>{const r=o.fn(...i);return r&&(r.key=o.key),r}:o.fn)}return e}function xe(e,t,n={},o,i){if(Ve.ce||Ve.parent&&Sn(Ve.parent)&&Ve.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),v(),oe(be,null,[B("slot",n,o&&o())],u?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),v();const s=r&&ws(r(n)),l=n.key||s&&s.key,a=oe(be,{key:(l&&!yt(l)?l:`_${t}`)+(!s&&o?"_fb":"")},s||(o?o():[]),s&&e._===1?64:-2);return a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),r&&r._c&&(r._d=!0),a}function ws(e){return e.some(t=>Wn(t)?!(t.type===qe||t.type===be&&!ws(t.children)):!0)?e:null}const Ei=e=>e?Xs(e)?Bo(e):Ei(e.parent):null,Vn=Ie(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ei(e.parent),$root:e=>Ei(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ss(e),$forceUpdate:e=>e.f||(e.f=()=>{Si(e.update)}),$nextTick:e=>e.n||(e.n=gt.bind(e.proxy)),$watch:e=>wu.bind(e)}),Ii=(e,t)=>e!==he&&!e.__isScriptSetup&&_e(e,t),Qc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:i,props:r,accessCache:s,type:l,appContext:a}=e;let u;if(t[0]!=="$"){const p=s[t];if(p!==void 0)switch(p){case 1:return o[t];case 2:return i[t];case 4:return n[t];case 3:return r[t]}else{if(Ii(o,t))return s[t]=1,o[t];if(i!==he&&_e(i,t))return s[t]=2,i[t];if((u=e.propsOptions[0])&&_e(u,t))return s[t]=3,r[t];if(n!==he&&_e(n,t))return s[t]=4,n[t];Oi&&(s[t]=0)}}const c=Vn[t];let d,f;if(c)return t==="$attrs"&&We(e.attrs,"get",""),c(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==he&&_e(n,t))return s[t]=4,n[t];if(f=a.config.globalProperties,_e(f,t))return f[t]},set({_:e},t,n){const{data:o,setupState:i,ctx:r}=e;return Ii(i,t)?(i[t]=n,!0):o!==he&&_e(o,t)?(o[t]=n,!0):_e(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:i,propsOptions:r,type:s}},l){let a,u;return!!(n[l]||e!==he&&l[0]!=="$"&&_e(e,l)||Ii(t,l)||(a=r[0])&&_e(a,l)||_e(o,l)||_e(Vn,l)||_e(i.config.globalProperties,l)||(u=s.__cssModules)&&u[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:_e(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Eo(e){return ie(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Ye(e,t){return!e||!t?e||t:ie(e)&&ie(t)?e.concat(t):Ie({},Eo(e),Eo(t))}let Oi=!0;function eu(e){const t=Ss(e),n=e.proxy,o=e.ctx;Oi=!1,t.beforeCreate&&xs(t.beforeCreate,e,"bc");const{data:i,computed:r,methods:s,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:p,updated:x,activated:_,deactivated:D,beforeDestroy:b,beforeUnmount:P,destroyed:A,unmounted:w,render:g,renderTracked:I,renderTriggered:q,errorCaptured:K,serverPrefetch:R,expose:Q,inheritAttrs:H,components:T,directives:Y,filters:S}=t;if(u&&tu(u,o,null),s)for(const k in s){const y=s[k];de(y)&&(o[k]=y.bind(n))}if(i){const k=i.call(n,n);Ce(k)&&(e.data=vo(k))}if(Oi=!0,r)for(const k in r){const y=r[k],O=de(y)?y.bind(n,n):de(y.get)?y.get.bind(n,n):kt,z=!de(y)&&de(y.set)?y.set.bind(n):kt,le=G({get:O,set:z});Object.defineProperty(o,k,{enumerable:!0,configurable:!0,get:()=>le.value,set:ae=>le.value=ae})}if(l)for(const k in l)_s(l[k],o,n,k);if(a){const k=de(a)?a.call(n):a;Reflect.ownKeys(k).forEach(y=>{Rn(y,k[y])})}c&&xs(c,e,"c");function F(k,y){ie(y)?y.forEach(O=>k(O.bind(n))):y&&k(y.bind(n))}if(F(qc,d),F(je,f),F(Uc,p),F(Kc,x),F(Hc,_),F(Fc,D),F(vs,K),F(Xc,I),F(Yc,q),F(Ti,P),F(Mt,w),F(Zc,R),ie(Q))if(Q.length){const k=e.exposed||(e.exposed={});Q.forEach(y=>{Object.defineProperty(k,y,{get:()=>n[y],set:O=>n[y]=O,enumerable:!0})})}else e.exposed||(e.exposed={});g&&e.render===kt&&(e.render=g),H!=null&&(e.inheritAttrs=H),T&&(e.components=T),Y&&(e.directives=Y),R&&hs(e)}function tu(e,t,n=kt){ie(e)&&(e=$i(e));for(const o in e){const i=e[o];let r;Ce(i)?"default"in i?r=Ft(i.from||o,i.default,!0):r=Ft(i.from||o):r=Ft(i),$e(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):t[o]=r}}function xs(e,t,n){xt(ie(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function _s(e,t,n,o){let i=o.includes(".")?Rs(n,o):()=>n[o];if(Oe(e)){const r=t[e];de(r)&&ue(i,r)}else if(de(e))ue(i,e.bind(n));else if(Ce(e))if(ie(e))e.forEach(r=>_s(r,t,n,o));else{const r=de(e.handler)?e.handler.bind(n):t[e.handler];de(r)&&ue(i,r,e)}}function Ss(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:r,config:{optionMergeStrategies:s}}=e.appContext,l=r.get(t);let a;return l?a=l:!i.length&&!n&&!o?a=t:(a={},i.length&&i.forEach(u=>Io(a,u,s,!0)),Io(a,t,s)),Ce(t)&&r.set(t,a),a}function Io(e,t,n,o=!1){const{mixins:i,extends:r}=t;r&&Io(e,r,n,!0),i&&i.forEach(s=>Io(e,s,n,!0));for(const s in t)if(!(o&&s==="expose")){const l=nu[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const nu={data:ks,props:Cs,emits:Cs,methods:Nn,computed:Nn,beforeCreate:Xe,created:Xe,beforeMount:Xe,mounted:Xe,beforeUpdate:Xe,updated:Xe,beforeDestroy:Xe,beforeUnmount:Xe,destroyed:Xe,unmounted:Xe,activated:Xe,deactivated:Xe,errorCaptured:Xe,serverPrefetch:Xe,components:Nn,directives:Nn,watch:iu,provide:ks,inject:ou};function ks(e,t){return t?e?function(){return Ie(de(e)?e.call(this,this):e,de(t)?t.call(this,this):t)}:t:e}function ou(e,t){return Nn($i(e),$i(t))}function $i(e){if(ie(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Xe(e,t){return e?[...new Set([].concat(e,t))]:t}function Nn(e,t){return e?Ie(Object.create(null),e,t):t}function Cs(e,t){return e?ie(e)&&ie(t)?[...new Set([...e,...t])]:Ie(Object.create(null),Eo(e),Eo(t??{})):t}function iu(e,t){if(!e)return t;if(!t)return e;const n=Ie(Object.create(null),e);for(const o in t)n[o]=Xe(e[o],t[o]);return n}function Ts(){return{app:null,config:{isNativeTag:Sr,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let ru=0;function su(e,t){return function(o,i=null){de(o)||(o=Ie({},o)),i!=null&&!Ce(i)&&(i=null);const r=Ts(),s=new WeakSet,l=[];let a=!1;const u=r.app={_uid:ru++,_component:o,_props:i,_container:null,_context:r,_instance:null,version:Hu,get config(){return r.config},set config(c){},use(c,...d){return s.has(c)||(c&&de(c.install)?(s.add(c),c.install(u,...d)):de(c)&&(s.add(c),c(u,...d))),u},mixin(c){return r.mixins.includes(c)||r.mixins.push(c),u},component(c,d){return d?(r.components[c]=d,u):r.components[c]},directive(c,d){return d?(r.directives[c]=d,u):r.directives[c]},mount(c,d,f){if(!a){const p=u._ceVNode||B(o,i);return p.appContext=r,f===!0?f="svg":f===!1&&(f=void 0),e(p,c,f),a=!0,u._container=c,c.__vue_app__=u,Bo(p.component)}},onUnmount(c){l.push(c)},unmount(){a&&(xt(l,u._instance,16),e(null,u._container),delete u._container.__vue_app__)},provide(c,d){return r.provides[c]=d,u},runWithContext(c){const d=sn;sn=u;try{return c()}finally{sn=d}}};return u}}let sn=null;function Rn(e,t){if(Ue){let n=Ue.provides;const o=Ue.parent&&Ue.parent.provides;o===n&&(n=Ue.provides=Object.create(o)),n[e]=t}}function Ft(e,t,n=!1){const o=un();if(o||sn){let i=sn?sn._context.provides:o?o.parent==null||o.ce?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&de(t)?t.call(o&&o.proxy):t}}function Ps(){return!!(un()||sn)}const Ms={},Es=()=>Object.create(Ms),Is=e=>Object.getPrototypeOf(e)===Ms;function lu(e,t,n,o=!1){const i={},r=Es();e.propsDefaults=Object.create(null),Os(e,t,i,r);for(const s in e.propsOptions[0])s in i||(i[s]=void 0);n?e.props=o?i:bc(i):e.type.props?e.props=i:e.props=r,e.attrs=r}function au(e,t,n,o){const{props:i,attrs:r,vnode:{patchFlag:s}}=e,l=ye(i),[a]=e.propsOptions;let u=!1;if((o||s>0)&&!(s&16)){if(s&8){const c=e.vnode.dynamicProps;for(let d=0;d<c.length;d++){let f=c[d];if($o(e.emitsOptions,f))continue;const p=t[f];if(a)if(_e(r,f))p!==r[f]&&(r[f]=p,u=!0);else{const x=Re(f);i[x]=zi(a,l,x,p,e,!1)}else p!==r[f]&&(r[f]=p,u=!0)}}}else{Os(e,t,i,r)&&(u=!0);let c;for(const d in l)(!t||!_e(t,d)&&((c=et(d))===d||!_e(t,c)))&&(a?n&&(n[d]!==void 0||n[c]!==void 0)&&(i[d]=zi(a,l,d,void 0,e,!0)):delete i[d]);if(r!==l)for(const d in r)(!t||!_e(t,d))&&(delete r[d],u=!0)}u&&Bt(e.attrs,"set","")}function Os(e,t,n,o){const[i,r]=e.propsOptions;let s=!1,l;if(t)for(let a in t){if(Mn(a))continue;const u=t[a];let c;i&&_e(i,c=Re(a))?!r||!r.includes(c)?n[c]=u:(l||(l={}))[c]=u:$o(e.emitsOptions,a)||(!(a in o)||u!==o[a])&&(o[a]=u,s=!0)}if(r){const a=ye(n),u=l||he;for(let c=0;c<r.length;c++){const d=r[c];n[d]=zi(i,a,d,u[d],e,!_e(u,d))}}return s}function zi(e,t,n,o,i,r){const s=e[n];if(s!=null){const l=_e(s,"default");if(l&&o===void 0){const a=s.default;if(s.type!==Function&&!s.skipFactory&&de(a)){const{propsDefaults:u}=i;if(n in u)o=u[n];else{const c=qn(i);o=u[n]=a.call(null,t),c()}}else o=a;i.ce&&i.ce._setProp(n,o)}s[0]&&(r&&!l?o=!1:s[1]&&(o===""||o===et(n))&&(o=!0))}return o}const cu=new WeakMap;function $s(e,t,n=!1){const o=n?cu:t.propsCache,i=o.get(e);if(i)return i;const r=e.props,s={},l=[];let a=!1;if(!de(e)){const c=d=>{a=!0;const[f,p]=$s(d,t,!0);Ie(s,f),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!r&&!a)return Ce(e)&&o.set(e,bt),bt;if(ie(r))for(let c=0;c<r.length;c++){const d=Re(r[c]);zs(d)&&(s[d]=he)}else if(r)for(const c in r){const d=Re(c);if(zs(d)){const f=r[c],p=s[d]=ie(f)||de(f)?{type:f}:Ie({},f),x=p.type;let _=!1,D=!0;if(ie(x))for(let b=0;b<x.length;++b){const P=x[b],A=de(P)&&P.name;if(A==="Boolean"){_=!0;break}else A==="String"&&(D=!1)}else _=de(x)&&x.name==="Boolean";p[0]=_,p[1]=D,(_||_e(p,"default"))&&l.push(d)}}const u=[s,l];return Ce(e)&&o.set(e,u),u}function zs(e){return e[0]!=="$"&&!Mn(e)}const Di=e=>e==="_"||e==="_ctx"||e==="$stable",Ai=e=>ie(e)?e.map(Et):[Et(e)],uu=(e,t,n)=>{if(t._n)return t;const o=ne((...i)=>Ai(t(...i)),n);return o._c=!1,o},Ds=(e,t,n)=>{const o=e._ctx;for(const i in e){if(Di(i))continue;const r=e[i];if(de(r))t[i]=uu(i,r,o);else if(r!=null){const s=Ai(r);t[i]=()=>s}}},As=(e,t)=>{const n=Ai(t);e.slots.default=()=>n},js=(e,t,n)=>{for(const o in t)(n||!Di(o))&&(e[o]=t[o])},du=(e,t,n)=>{const o=e.slots=Es();if(e.vnode.shapeFlag&32){const i=t._;i?(js(o,t,n),n&&Pr(o,"_",i,!0)):Ds(t,o)}else t&&As(e,t)},fu=(e,t,n)=>{const{vnode:o,slots:i}=e;let r=!0,s=he;if(o.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:js(i,t,n):(r=!t.$stable,Ds(t,i)),s=t}else t&&(As(e,t),s={default:1});if(r)for(const l in i)!Di(l)&&s[l]==null&&delete i[l]},st=Pu;function pu(e){return hu(e)}function hu(e,t){const n=ao();n.__VUE__=!0;const{insert:o,remove:i,patchProp:r,createElement:s,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:p=kt,insertStaticContent:x}=e,_=(h,m,M,W=null,V=null,N=null,E=void 0,C=null,L=!!m.dynamicChildren)=>{if(h===m)return;h&&!an(h,m)&&(W=Ke(h),ae(h,V,N,!0),h=null),m.patchFlag===-2&&(L=!1,m.dynamicChildren=null);const{type:j,ref:re,shapeFlag:te}=m;switch(j){case zo:D(h,m,M,W);break;case qe:b(h,m,M,W);break;case Do:h==null&&P(m,M,W,E);break;case be:T(h,m,M,W,V,N,E,C,L);break;default:te&1?g(h,m,M,W,V,N,E,C,L):te&6?Y(h,m,M,W,V,N,E,C,L):(te&64||te&128)&&j.process(h,m,M,W,V,N,E,C,L,ze)}re!=null&&V?Bn(re,h&&h.ref,N,m||h,!m):re==null&&h&&h.ref!=null&&Bn(h.ref,null,N,h,!0)},D=(h,m,M,W)=>{if(h==null)o(m.el=l(m.children),M,W);else{const V=m.el=h.el;m.children!==h.children&&u(V,m.children)}},b=(h,m,M,W)=>{h==null?o(m.el=a(m.children||""),M,W):m.el=h.el},P=(h,m,M,W)=>{[h.el,h.anchor]=x(h.children,m,M,W,h.el,h.anchor)},A=({el:h,anchor:m},M,W)=>{let V;for(;h&&h!==m;)V=f(h),o(h,M,W),h=V;o(m,M,W)},w=({el:h,anchor:m})=>{let M;for(;h&&h!==m;)M=f(h),i(h),h=M;i(m)},g=(h,m,M,W,V,N,E,C,L)=>{if(m.type==="svg"?E="svg":m.type==="math"&&(E="mathml"),h==null)I(m,M,W,V,N,E,C,L);else{const j=h.el&&h.el._isVueCE?h.el:null;try{j&&j._beginPatch(),R(h,m,V,N,E,C,L)}finally{j&&j._endPatch()}}},I=(h,m,M,W,V,N,E,C)=>{let L,j;const{props:re,shapeFlag:te,transition:X,dirs:ce}=h;if(L=h.el=s(h.type,N,re&&re.is,re),te&8?c(L,h.children):te&16&&K(h.children,L,null,W,V,ji(h,N),E,C),ce&&rn(h,null,W,"created"),q(L,h,h.scopeId,E,W),re){for(const Ee in re)Ee!=="value"&&!Mn(Ee)&&r(L,Ee,null,re[Ee],N,W);"value"in re&&r(L,"value",null,re.value,N),(j=re.onVnodeBeforeMount)&&It(j,W,h)}ce&&rn(h,null,W,"beforeMount");const we=gu(V,X);we&&X.beforeEnter(L),o(L,m,M),((j=re&&re.onVnodeMounted)||we||ce)&&st(()=>{j&&It(j,W,h),we&&X.enter(L),ce&&rn(h,null,W,"mounted")},V)},q=(h,m,M,W,V)=>{if(M&&p(h,M),W)for(let N=0;N<W.length;N++)p(h,W[N]);if(V){let N=V.subTree;if(m===N||Us(N.type)&&(N.ssContent===m||N.ssFallback===m)){const E=V.vnode;q(h,E,E.scopeId,E.slotScopeIds,V.parent)}}},K=(h,m,M,W,V,N,E,C,L=0)=>{for(let j=L;j<h.length;j++){const re=h[j]=C?Gt(h[j]):Et(h[j]);_(null,re,m,M,W,V,N,E,C)}},R=(h,m,M,W,V,N,E)=>{const C=m.el=h.el;let{patchFlag:L,dynamicChildren:j,dirs:re}=m;L|=h.patchFlag&16;const te=h.props||he,X=m.props||he;let ce;if(M&&ln(M,!1),(ce=X.onVnodeBeforeUpdate)&&It(ce,M,m,h),re&&rn(m,h,M,"beforeUpdate"),M&&ln(M,!0),(te.innerHTML&&X.innerHTML==null||te.textContent&&X.textContent==null)&&c(C,""),j?Q(h.dynamicChildren,j,C,M,W,ji(m,V),N):E||y(h,m,C,null,M,W,ji(m,V),N,!1),L>0){if(L&16)H(C,te,X,M,V);else if(L&2&&te.class!==X.class&&r(C,"class",null,X.class,V),L&4&&r(C,"style",te.style,X.style,V),L&8){const we=m.dynamicProps;for(let Ee=0;Ee<we.length;Ee++){const Te=we[Ee],ot=te[Te],it=X[Te];(it!==ot||Te==="value")&&r(C,Te,ot,it,V,M)}}L&1&&h.children!==m.children&&c(C,m.children)}else!E&&j==null&&H(C,te,X,M,V);((ce=X.onVnodeUpdated)||re)&&st(()=>{ce&&It(ce,M,m,h),re&&rn(m,h,M,"updated")},W)},Q=(h,m,M,W,V,N,E)=>{for(let C=0;C<m.length;C++){const L=h[C],j=m[C],re=L.el&&(L.type===be||!an(L,j)||L.shapeFlag&198)?d(L.el):M;_(L,j,re,null,W,V,N,E,!0)}},H=(h,m,M,W,V)=>{if(m!==M){if(m!==he)for(const N in m)!Mn(N)&&!(N in M)&&r(h,N,m[N],null,V,W);for(const N in M){if(Mn(N))continue;const E=M[N],C=m[N];E!==C&&N!=="value"&&r(h,N,C,E,V,W)}"value"in M&&r(h,"value",m.value,M.value,V)}},T=(h,m,M,W,V,N,E,C,L)=>{const j=m.el=h?h.el:l(""),re=m.anchor=h?h.anchor:l("");let{patchFlag:te,dynamicChildren:X,slotScopeIds:ce}=m;ce&&(C=C?C.concat(ce):ce),h==null?(o(j,M,W),o(re,M,W),K(m.children||[],M,re,V,N,E,C,L)):te>0&&te&64&&X&&h.dynamicChildren?(Q(h.dynamicChildren,X,M,V,N,E,C),(m.key!=null||V&&m===V.subTree)&&Ls(h,m,!0)):y(h,m,M,re,V,N,E,C,L)},Y=(h,m,M,W,V,N,E,C,L)=>{m.slotScopeIds=C,h==null?m.shapeFlag&512?V.ctx.activate(m,M,W,E,L):S(m,M,W,V,N,E,L):J(h,m,L)},S=(h,m,M,W,V,N,E)=>{const C=h.component=Du(h,W,V);if(Po(h)&&(C.ctx.renderer=ze),Au(C,!1,E),C.asyncDep){if(V&&V.registerDep(C,F,E),!h.el){const L=C.subTree=B(qe);b(null,L,m,M),h.placeholder=L.el}}else F(C,h,m,M,V,N,E)},J=(h,m,M)=>{const W=m.component=h.component;if(Cu(h,m,M))if(W.asyncDep&&!W.asyncResolved){k(W,m,M);return}else W.next=m,W.update();else m.el=h.el,W.vnode=m},F=(h,m,M,W,V,N,E)=>{const C=()=>{if(h.isMounted){let{next:te,bu:X,u:ce,parent:we,vnode:Ee}=h;{const jt=Bs(h);if(jt){te&&(te.el=Ee.el,k(h,te,E)),jt.asyncDep.then(()=>{h.isUnmounted||C()});return}}let Te=te,ot;ln(h,!1),te?(te.el=Ee.el,k(h,te,E)):te=Ee,X&&lo(X),(ot=te.props&&te.props.onVnodeBeforeUpdate)&&It(ot,we,te,Ee),ln(h,!0);const it=Ws(h),At=h.subTree;h.subTree=it,_(At,it,d(At.el),Ke(At),h,V,N),te.el=it.el,Te===null&&Tu(h,it.el),ce&&st(ce,V),(ot=te.props&&te.props.onVnodeUpdated)&&st(()=>It(ot,we,te,Ee),V)}else{let te;const{el:X,props:ce}=m,{bm:we,m:Ee,parent:Te,root:ot,type:it}=h,At=Sn(m);ln(h,!1),we&&lo(we),!At&&(te=ce&&ce.onVnodeBeforeMount)&&It(te,Te,m),ln(h,!0);{ot.ce&&ot.ce._def.shadowRoot!==!1&&ot.ce._injectChildStyle(it);const jt=h.subTree=Ws(h);_(null,jt,M,W,h,V,N),m.el=jt.el}if(Ee&&st(Ee,V),!At&&(te=ce&&ce.onVnodeMounted)){const jt=m;st(()=>It(te,Te,jt),V)}(m.shapeFlag&256||Te&&Sn(Te.vnode)&&Te.vnode.shapeFlag&256)&&h.a&&st(h.a,V),h.isMounted=!0,m=M=W=null}};h.scope.on();const L=h.effect=new zr(C);h.scope.off();const j=h.update=L.run.bind(L),re=h.job=L.runIfDirty.bind(L);re.i=h,re.id=h.uid,L.scheduler=()=>Si(re),ln(h,!0),j()},k=(h,m,M)=>{m.component=h;const W=h.vnode.props;h.vnode=m,h.next=null,au(h,m.props,W,M),fu(h,m.children,M),Ct(),os(h),Tt()},y=(h,m,M,W,V,N,E,C,L=!1)=>{const j=h&&h.children,re=h?h.shapeFlag:0,te=m.children,{patchFlag:X,shapeFlag:ce}=m;if(X>0){if(X&128){z(j,te,M,W,V,N,E,C,L);return}else if(X&256){O(j,te,M,W,V,N,E,C,L);return}}ce&8?(re&16&&De(j,V,N),te!==j&&c(M,te)):re&16?ce&16?z(j,te,M,W,V,N,E,C,L):De(j,V,N,!0):(re&8&&c(M,""),ce&16&&K(te,M,W,V,N,E,C,L))},O=(h,m,M,W,V,N,E,C,L)=>{h=h||bt,m=m||bt;const j=h.length,re=m.length,te=Math.min(j,re);let X;for(X=0;X<te;X++){const ce=m[X]=L?Gt(m[X]):Et(m[X]);_(h[X],ce,M,null,V,N,E,C,L)}j>re?De(h,V,N,!0,!1,te):K(m,M,W,V,N,E,C,L,te)},z=(h,m,M,W,V,N,E,C,L)=>{let j=0;const re=m.length;let te=h.length-1,X=re-1;for(;j<=te&&j<=X;){const ce=h[j],we=m[j]=L?Gt(m[j]):Et(m[j]);if(an(ce,we))_(ce,we,M,null,V,N,E,C,L);else break;j++}for(;j<=te&&j<=X;){const ce=h[te],we=m[X]=L?Gt(m[X]):Et(m[X]);if(an(ce,we))_(ce,we,M,null,V,N,E,C,L);else break;te--,X--}if(j>te){if(j<=X){const ce=X+1,we=ce<re?m[ce].el:W;for(;j<=X;)_(null,m[j]=L?Gt(m[j]):Et(m[j]),M,we,V,N,E,C,L),j++}}else if(j>X)for(;j<=te;)ae(h[j],V,N,!0),j++;else{const ce=j,we=j,Ee=new Map;for(j=we;j<=X;j++){const dt=m[j]=L?Gt(m[j]):Et(m[j]);dt.key!=null&&Ee.set(dt.key,j)}let Te,ot=0;const it=X-we+1;let At=!1,jt=0;const to=new Array(it);for(j=0;j<it;j++)to[j]=0;for(j=ce;j<=te;j++){const dt=h[j];if(ot>=it){ae(dt,V,N,!0);continue}let Lt;if(dt.key!=null)Lt=Ee.get(dt.key);else for(Te=we;Te<=X;Te++)if(to[Te-we]===0&&an(dt,m[Te])){Lt=Te;break}Lt===void 0?ae(dt,V,N,!0):(to[Lt-we]=j+1,Lt>=jt?jt=Lt:At=!0,_(dt,m[Lt],M,null,V,N,E,C,L),ot++)}const Ba=At?mu(to):bt;for(Te=Ba.length-1,j=it-1;j>=0;j--){const dt=we+j,Lt=m[dt],Va=m[dt+1],Na=dt+1<re?Va.el||Va.placeholder:W;to[j]===0?_(null,Lt,M,Na,V,N,E,C,L):At&&(Te<0||j!==Ba[Te]?le(Lt,M,Na,2):Te--)}}},le=(h,m,M,W,V=null)=>{const{el:N,type:E,transition:C,children:L,shapeFlag:j}=h;if(j&6){le(h.component.subTree,m,M,W);return}if(j&128){h.suspense.move(m,M,W);return}if(j&64){E.move(h,m,M,ze);return}if(E===be){o(N,m,M);for(let te=0;te<L.length;te++)le(L[te],m,M,W);o(h.anchor,m,M);return}if(E===Do){A(h,m,M);return}if(W!==2&&j&1&&C)if(W===0)C.beforeEnter(N),o(N,m,M),st(()=>C.enter(N),V);else{const{leave:te,delayLeave:X,afterLeave:ce}=C,we=()=>{h.ctx.isUnmounted?i(N):o(N,m,M)},Ee=()=>{N._isLeaving&&N[Rt](!0),te(N,()=>{we(),ce&&ce()})};X?X(N,we,Ee):Ee()}else o(N,m,M)},ae=(h,m,M,W=!1,V=!1)=>{const{type:N,props:E,ref:C,children:L,dynamicChildren:j,shapeFlag:re,patchFlag:te,dirs:X,cacheIndex:ce}=h;if(te===-2&&(V=!1),C!=null&&(Ct(),Bn(C,null,M,h,!0),Tt()),ce!=null&&(m.renderCache[ce]=void 0),re&256){m.ctx.deactivate(h);return}const we=re&1&&X,Ee=!Sn(h);let Te;if(Ee&&(Te=E&&E.onVnodeBeforeUnmount)&&It(Te,m,h),re&6)Se(h.component,M,W);else{if(re&128){h.suspense.unmount(M,W);return}we&&rn(h,null,m,"beforeUnmount"),re&64?h.type.remove(h,m,M,ze,W):j&&!j.hasOnce&&(N!==be||te>0&&te&64)?De(j,m,M,!1,!0):(N===be&&te&384||!V&&re&16)&&De(L,m,M),W&&me(h)}(Ee&&(Te=E&&E.onVnodeUnmounted)||we)&&st(()=>{Te&&It(Te,m,h),we&&rn(h,null,m,"unmounted")},M)},me=h=>{const{type:m,el:M,anchor:W,transition:V}=h;if(m===be){ge(M,W);return}if(m===Do){w(h);return}const N=()=>{i(M),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(h.shapeFlag&1&&V&&!V.persisted){const{leave:E,delayLeave:C}=V,L=()=>E(M,N);C?C(h.el,N,L):L()}else N()},ge=(h,m)=>{let M;for(;h!==m;)M=f(h),i(h),h=M;i(m)},Se=(h,m,M)=>{const{bum:W,scope:V,job:N,subTree:E,um:C,m:L,a:j}=h;Vs(L),Vs(j),W&&lo(W),V.stop(),N&&(N.flags|=8,ae(E,h,m,M)),C&&st(C,m),st(()=>{h.isUnmounted=!0},m)},De=(h,m,M,W=!1,V=!1,N=0)=>{for(let E=N;E<h.length;E++)ae(h[E],m,M,W,V)},Ke=h=>{if(h.shapeFlag&6)return Ke(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const m=f(h.anchor||h.el),M=m&&m[Bc];return M?f(M):m};let ut=!1;const Qe=(h,m,M)=>{h==null?m._vnode&&ae(m._vnode,null,null,!0):_(m._vnode||null,h,m,null,null,null,M),m._vnode=h,ut||(ut=!0,os(),is(),ut=!1)},ze={p:_,um:ae,m:le,r:me,mt:S,mc:K,pc:y,pbc:Q,n:Ke,o:e};return{render:Qe,hydrate:void 0,createApp:su(Qe)}}function ji({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function ln({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function gu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ls(e,t,n=!1){const o=e.children,i=t.children;if(ie(o)&&ie(i))for(let r=0;r<o.length;r++){const s=o[r];let l=i[r];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=i[r]=Gt(i[r]),l.el=s.el),!n&&l.patchFlag!==-2&&Ls(s,l)),l.type===zo&&l.patchFlag!==-1&&(l.el=s.el),l.type===qe&&!l.el&&(l.el=s.el)}}function mu(e){const t=e.slice(),n=[0];let o,i,r,s,l;const a=e.length;for(o=0;o<a;o++){const u=e[o];if(u!==0){if(i=n[n.length-1],e[i]<u){t[o]=i,n.push(o);continue}for(r=0,s=n.length-1;r<s;)l=r+s>>1,e[n[l]]<u?r=l+1:s=l;u<e[n[r]]&&(r>0&&(t[o]=n[r-1]),n[r]=o)}}for(r=n.length,s=n[r-1];r-- >0;)n[r]=s,s=t[s];return n}function Bs(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Bs(t)}function Vs(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const vu=Symbol.for("v-scx"),bu=()=>Ft(vu);function Ns(e,t){return Oo(e,null,t)}function yu(e,t){return Oo(e,null,{flush:"sync"})}function ue(e,t,n){return Oo(e,t,n)}function Oo(e,t,n=he){const{immediate:o,deep:i,flush:r,once:s}=n,l=Ie({},n),a=t&&o||!t&&r!=="post";let u;if(Un){if(r==="sync"){const p=bu();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=kt,p.resume=kt,p.pause=kt,p}}const c=Ue;l.call=(p,x,_)=>xt(p,c,x,_);let d=!1;r==="post"?l.scheduler=p=>{st(p,c&&c.suspense)}:r!=="sync"&&(d=!0,l.scheduler=(p,x)=>{x?p():Si(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=Ic(e,t,l);return Un&&(u?u.push(f):a&&f()),f}function wu(e,t,n){const o=this.proxy,i=Oe(e)?e.includes(".")?Rs(o,e):()=>o[e]:e.bind(o,o);let r;de(t)?r=t:(r=t.handler,n=t);const s=qn(this),l=Oo(i,r.bind(o),n);return s(),l}function Rs(e,t){const n=t.split(".");return()=>{let o=e;for(let i=0;i<n.length&&o;i++)o=o[n[i]];return o}}function lt(e,t,n=he){const o=un(),i=Re(t),r=et(t),s=Hs(e,i),l=Qr((a,u)=>{let c,d=he,f;return yu(()=>{const p=e[i];tt(c,p)&&(c=p,u())}),{get(){return a(),n.get?n.get(c):c},set(p){const x=n.set?n.set(p):p;if(!tt(x,c)&&!(d!==he&&tt(p,d)))return;const _=o.vnode.props;_&&(t in _||i in _||r in _)&&(`onUpdate:${t}`in _||`onUpdate:${i}`in _||`onUpdate:${r}`in _)||(c=p,u()),o.emit(`update:${t}`,x),tt(p,x)&&tt(p,d)&&!tt(x,f)&&u(),d=p,f=x}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?s||he:l,done:!1}:{done:!0}}}},l}const Hs=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Re(t)}Modifiers`]||e[`${et(t)}Modifiers`];function xu(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||he;let i=n;const r=t.startsWith("update:"),s=r&&Hs(o,t.slice(7));s&&(s.trim&&(i=n.map(c=>Oe(c)?c.trim():c)),s.number&&(i=n.map(ai)));let l,a=o[l=li(t)]||o[l=li(Re(t))];!a&&r&&(a=o[l=li(et(t))]),a&&xt(a,e,6,i);const u=o[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,xt(u,e,6,i)}}const _u=new WeakMap;function Fs(e,t,n=!1){const o=n?_u:t.emitsCache,i=o.get(e);if(i!==void 0)return i;const r=e.emits;let s={},l=!1;if(!de(e)){const a=u=>{const c=Fs(u,t,!0);c&&(l=!0,Ie(s,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!l?(Ce(e)&&o.set(e,null),null):(ie(r)?r.forEach(a=>s[a]=null):Ie(s,r),Ce(e)&&o.set(e,s),s)}function $o(e,t){return!e||!no(t)?!1:(t=t.slice(2).replace(/Once$/,""),_e(e,t[0].toLowerCase()+t.slice(1))||_e(e,et(t))||_e(e,t))}function Nm(){}function Ws(e){const{type:t,vnode:n,proxy:o,withProxy:i,propsOptions:[r],slots:s,attrs:l,emit:a,render:u,renderCache:c,props:d,data:f,setupState:p,ctx:x,inheritAttrs:_}=e,D=ko(e);let b,P;try{if(n.shapeFlag&4){const w=i||o,g=w;b=Et(u.call(g,w,c,d,p,f,x)),P=l}else{const w=t;b=Et(w.length>1?w(d,{attrs:l,slots:s,emit:a}):w(d,null)),P=t.props?l:Su(l)}}catch(w){Hn.length=0,_o(w,e,1),b=B(qe)}let A=b;if(P&&_!==!1){const w=Object.keys(P),{shapeFlag:g}=A;w.length&&g&7&&(r&&w.some(ii)&&(P=ku(P,r)),A=Xt(A,P,!1,!0))}return n.dirs&&(A=Xt(A,null,!1,!0),A.dirs=A.dirs?A.dirs.concat(n.dirs):n.dirs),n.transition&&Ln(A,n.transition),b=A,ko(D),b}const Su=e=>{let t;for(const n in e)(n==="class"||n==="style"||no(n))&&((t||(t={}))[n]=e[n]);return t},ku=(e,t)=>{const n={};for(const o in e)(!ii(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Cu(e,t,n){const{props:o,children:i,component:r}=e,{props:s,children:l,patchFlag:a}=t,u=r.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?qs(o,s,u):!!s;if(a&8){const c=t.dynamicProps;for(let d=0;d<c.length;d++){const f=c[d];if(s[f]!==o[f]&&!$o(u,f))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:o===s?!1:o?s?qs(o,s,u):!0:!!s;return!1}function qs(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let i=0;i<o.length;i++){const r=o[i];if(t[r]!==e[r]&&!$o(n,r))return!0}return!1}function Tu({vnode:e,parent:t},n){for(;t;){const o=t.subTree;if(o.suspense&&o.suspense.activeBranch===e&&(o.el=e.el),o===e)(e=t.vnode).el=n,t=t.parent;else break}}const Us=e=>e.__isSuspense;function Pu(e,t){t&&t.pendingBranch?ie(e)?t.effects.push(...e):t.effects.push(e):Lc(e)}const be=Symbol.for("v-fgt"),zo=Symbol.for("v-txt"),qe=Symbol.for("v-cmt"),Do=Symbol.for("v-stc"),Hn=[];let at=null;function v(e=!1){Hn.push(at=e?null:[])}function Mu(){Hn.pop(),at=Hn[Hn.length-1]||null}let Fn=1;function Ao(e,t=!1){Fn+=e,e<0&&at&&t&&(at.hasOnce=!0)}function Ks(e){return e.dynamicChildren=Fn>0?at||bt:null,Mu(),Fn>0&&at&&at.push(e),e}function $(e,t,n,o,i,r){return Ks(U(e,t,n,o,i,r,!0))}function oe(e,t,n,o,i){return Ks(B(e,t,n,o,i,!0))}function Wn(e){return e?e.__v_isVNode===!0:!1}function an(e,t){return e.type===t.type&&e.key===t.key}const Zs=({key:e})=>e??null,jo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Oe(e)||$e(e)||de(e)?{i:Ve,r:e,k:t,f:!!n}:e:null);function U(e,t=null,n=null,o=0,i=null,r=e===be?0:1,s=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Zs(t),ref:t&&jo(t),scopeId:ss,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ve};return l?(Li(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=Oe(n)?8:16),Fn>0&&!s&&at&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&at.push(a),a}const B=Eu;function Eu(e,t=null,n=null,o=0,i=null,r=!1){if((!e||e===bs)&&(e=qe),Wn(e)){const l=Xt(e,t,!0);return n&&Li(l,n),Fn>0&&!r&&at&&(l.shapeFlag&6?at[at.indexOf(e)]=l:at.push(l)),l.patchFlag=-2,l}if(Ru(e)&&(e=e.__vccOpts),t){t=Iu(t);let{class:l,style:a}=t;l&&!Oe(l)&&(t.class=fe(l)),Ce(a)&&(xi(a)&&!ie(a)&&(a=Ie({},a)),t.style=Pe(a))}const s=Oe(e)?1:Us(e)?128:ls(e)?64:Ce(e)?4:de(e)?2:0;return U(e,t,n,o,i,s,r,!0)}function Iu(e){return e?xi(e)||Is(e)?Ie({},e):e:null}function Xt(e,t,n=!1,o=!1){const{props:i,ref:r,patchFlag:s,children:l,transition:a}=e,u=t?cn(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&Zs(u),ref:t&&t.ref?n&&r?ie(r)?r.concat(jo(t)):[r,jo(t)]:jo(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==be?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Xt(e.ssContent),ssFallback:e.ssFallback&&Xt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&Ln(c,a.clone(c)),c}function Wt(e=" ",t=0){return B(zo,null,e,t)}function Ou(e,t){const n=B(Do,null,e);return n.staticCount=t,n}function se(e="",t=!1){return t?(v(),oe(qe,null,e)):B(qe,null,e)}function Et(e){return e==null||typeof e=="boolean"?B(qe):ie(e)?B(be,null,e.slice()):Wn(e)?Gt(e):B(zo,null,String(e))}function Gt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Xt(e)}function Li(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(ie(t))n=16;else if(typeof t=="object")if(o&65){const i=t.default;i&&(i._c&&(i._d=!1),Li(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Is(t)?t._ctx=Ve:i===3&&Ve&&(Ve.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else de(t)?(t={default:t,_ctx:Ve},n=32):(t=String(t),o&64?(n=16,t=[Wt(t)]):n=8);e.children=t,e.shapeFlag|=n}function cn(...e){const t={};for(let n=0;n<e.length;n++){const o=e[n];for(const i in o)if(i==="class")t.class!==o.class&&(t.class=fe([t.class,o.class]));else if(i==="style")t.style=Pe([t.style,o.style]);else if(no(i)){const r=t[i],s=o[i];s&&r!==s&&!(ie(r)&&r.includes(s))&&(t[i]=r?[].concat(r,s):s)}else i!==""&&(t[i]=o[i])}return t}function It(e,t,n,o=null){xt(e,t,7,[n,o])}const $u=Ts();let zu=0;function Du(e,t,n){const o=e.type,i=(t?t.appContext:e.appContext)||$u,r={uid:zu++,vnode:e,type:o,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ga(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:$s(o,i),emitsOptions:Fs(o,i),emit:null,emitted:null,propsDefaults:he,inheritAttrs:o.inheritAttrs,ctx:he,data:he,props:he,attrs:he,slots:he,refs:he,setupState:he,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return r.ctx={_:r},r.root=t?t.root:r,r.emit=xu.bind(null,r),e.ce&&e.ce(r),r}let Ue=null;const un=()=>Ue||Ve;let Lo,Bi;{const e=ao(),t=(n,o)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(o),r=>{i.length>1?i.forEach(s=>s(r)):i[0](r)}};Lo=t("__VUE_INSTANCE_SETTERS__",n=>Ue=n),Bi=t("__VUE_SSR_SETTERS__",n=>Un=n)}const qn=e=>{const t=Ue;return Lo(e),e.scope.on(),()=>{e.scope.off(),Lo(t)}},Ys=()=>{Ue&&Ue.scope.off(),Lo(null)};function Xs(e){return e.vnode.shapeFlag&4}let Un=!1;function Au(e,t=!1,n=!1){t&&Bi(t);const{props:o,children:i}=e.vnode,r=Xs(e);lu(e,o,r,t),du(e,i,n||t);const s=r?ju(e,t):void 0;return t&&Bi(!1),s}function ju(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Qc);const{setup:o}=n;if(o){Ct();const i=e.setupContext=o.length>1?Bu(e):null,r=qn(e),s=wn(o,e,0,[e.props,i]),l=Cr(s);if(Tt(),r(),(l||e.sp)&&!Sn(e)&&hs(e),l){if(s.then(Ys,Ys),t)return s.then(a=>{Gs(e,a)}).catch(a=>{_o(a,e,0)});e.asyncDep=s}else Gs(e,s)}else Js(e)}function Gs(e,t,n){de(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Ce(t)&&(e.setupState=Jr(t)),Js(e)}function Js(e,t,n){const o=e.type;e.render||(e.render=o.render||kt);{const i=qn(e);Ct();try{eu(e)}finally{Tt(),i()}}}const Lu={get(e,t){return We(e,"get",""),e[t]}};function Bu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Lu),slots:e.slots,emit:e.emit,expose:t}}function Bo(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Jr(yc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Vn)return Vn[n](e)},has(t,n){return n in t||n in Vn}})):e.proxy}const Vu=/(?:^|[-_])\w/g,Nu=e=>e.replace(Vu,t=>t.toUpperCase()).replace(/[-_]/g,"");function Qs(e,t=!0){return de(e)?e.displayName||e.name:e.name||t&&e.__name}function el(e,t,n=!1){let o=Qs(t);if(!o&&t.__file){const i=t.__file.match(/([^/\\]+)\.\w+$/);i&&(o=i[1])}if(!o&&e&&e.parent){const i=r=>{for(const s in r)if(r[s]===t)return s};o=i(e.components||e.parent.type.components)||i(e.appContext.components)}return o?Nu(o):n?"App":"Anonymous"}function Ru(e){return de(e)&&"__vccOpts"in e}const G=(e,t)=>Mc(e,t,Un);function tl(e,t,n){try{Ao(-1);const o=arguments.length;return o===2?Ce(t)&&!ie(t)?Wn(t)?B(e,null,[t]):B(e,t):B(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Wn(n)&&(n=[n]),B(e,t,n))}finally{Ao(1)}}const Hu="3.5.24";/**
17
17
  * @vue/runtime-dom v3.5.24
18
18
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
19
19
  * @license MIT
20
- **/let Vi;const nl=typeof window<"u"&&window.trustedTypes;if(nl)try{Vi=nl.createPolicy("vue",{createHTML:e=>e})}catch{}const ol=Vi?e=>Vi.createHTML(e):e=>e,Fu="http://www.w3.org/2000/svg",Wu="http://www.w3.org/1998/Math/MathML",qt=typeof document<"u"?document:null,il=qt&&qt.createElement("template"),qu={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i=t==="svg"?qt.createElementNS(Fu,e):t==="mathml"?qt.createElementNS(Wu,e):n?qt.createElement(e,{is:n}):qt.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>qt.createTextNode(e),createComment:e=>qt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>qt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,r){const s=n?n.previousSibling:t.lastChild;if(i&&(i===r||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===r||!(i=i.nextSibling)););else{il.innerHTML=ol(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const l=il.content;if(o==="svg"||o==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Jt="transition",Kn="animation",Zn=Symbol("_vtc"),rl={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Uu=Ie({},as,rl),Vo=(e=>(e.displayName="Transition",e.props=Uu,e))((e,{slots:t})=>tl(Rc,Ku(e),t)),dn=(e,t=[])=>{ie(e)?e.forEach(n=>n(...t)):e&&e(...t)},sl=e=>e?ie(e)?e.some(t=>t.length>1):e.length>1:!1;function Ku(e){const t={};for(const T in e)T in rl||(t[T]=e[T]);if(e.css===!1)return t;const{name:n="v",type:o,duration:i,enterFromClass:r=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=r,appearActiveClass:u=s,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,x=Zu(i),_=x&&x[0],D=x&&x[1],{onBeforeEnter:b,onEnter:P,onEnterCancelled:A,onLeave:w,onLeaveCancelled:g,onBeforeAppear:I=b,onAppear:q=P,onAppearCancelled:K=A}=t,R=(T,Y,S,J)=>{T._enterCancelled=J,fn(T,Y?c:l),fn(T,Y?u:s),S&&S()},Q=(T,Y)=>{T._isLeaving=!1,fn(T,d),fn(T,p),fn(T,f),Y&&Y()},H=T=>(Y,S)=>{const J=T?q:P,F=()=>R(Y,T,S);dn(J,[Y,F]),ll(()=>{fn(Y,T?a:r),Ut(Y,T?c:l),sl(J)||al(Y,o,_,F)})};return Ie(t,{onBeforeEnter(T){dn(b,[T]),Ut(T,r),Ut(T,s)},onBeforeAppear(T){dn(I,[T]),Ut(T,a),Ut(T,u)},onEnter:H(!1),onAppear:H(!0),onLeave(T,Y){T._isLeaving=!0;const S=()=>Q(T,Y);Ut(T,d),T._enterCancelled?(Ut(T,f),dl(T)):(dl(T),Ut(T,f)),ll(()=>{T._isLeaving&&(fn(T,d),Ut(T,p),sl(w)||al(T,o,D,S))}),dn(w,[T,S])},onEnterCancelled(T){R(T,!1,void 0,!0),dn(A,[T])},onAppearCancelled(T){R(T,!0,void 0,!0),dn(K,[T])},onLeaveCancelled(T){Q(T),dn(g,[T])}})}function Zu(e){if(e==null)return null;if(Ce(e))return[Ni(e.enter),Ni(e.leave)];{const t=Ni(e);return[t,t]}}function Ni(e){return ci(e)}function Ut(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Zn]||(e[Zn]=new Set)).add(t)}function fn(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Zn];n&&(n.delete(t),n.size||(e[Zn]=void 0))}function ll(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Yu=0;function al(e,t,n,o){const i=e._endId=++Yu,r=()=>{i===e._endId&&o()};if(n!=null)return setTimeout(r,n);const{type:s,timeout:l,propCount:a}=Xu(e,t);if(!s)return o();const u=s+"end";let c=0;const d=()=>{e.removeEventListener(u,f),r()},f=p=>{p.target===e&&++c>=a&&d()};setTimeout(()=>{c<a&&d()},l+1),e.addEventListener(u,f)}function Xu(e,t){const n=window.getComputedStyle(e),o=x=>(n[x]||"").split(", "),i=o(`${Jt}Delay`),r=o(`${Jt}Duration`),s=cl(i,r),l=o(`${Kn}Delay`),a=o(`${Kn}Duration`),u=cl(l,a);let c=null,d=0,f=0;t===Jt?s>0&&(c=Jt,d=s,f=r.length):t===Kn?u>0&&(c=Kn,d=u,f=a.length):(d=Math.max(s,u),c=d>0?s>u?Jt:Kn:null,f=c?c===Jt?r.length:a.length:0);const p=c===Jt&&/\b(?:transform|all)(?:,|$)/.test(o(`${Jt}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function cl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>ul(n)+ul(e[o])))}function ul(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function dl(e){return(e?e.ownerDocument:document).body.offsetHeight}function Gu(e,t,n){const o=e[Zn];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const No=Symbol("_vod"),fl=Symbol("_vsh"),pl={name:"show",beforeMount(e,{value:t},{transition:n}){e[No]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Yn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Yn(e,!0),o.enter(e)):o.leave(e,()=>{Yn(e,!1)}):Yn(e,t))},beforeUnmount(e,{value:t}){Yn(e,t)}};function Yn(e,t){e.style.display=t?e[No]:"none",e[fl]=!t}const Ju=Symbol(""),Qu=/(?:^|;)\s*display\s*:/;function ed(e,t,n){const o=e.style,i=Oe(n);let r=!1;if(n&&!i){if(t)if(Oe(t))for(const s of t.split(";")){const l=s.slice(0,s.indexOf(":")).trim();n[l]==null&&Ro(o,l,"")}else for(const s in t)n[s]==null&&Ro(o,s,"");for(const s in n)s==="display"&&(r=!0),Ro(o,s,n[s])}else if(i){if(t!==n){const s=o[Ju];s&&(n+=";"+s),o.cssText=n,r=Qu.test(n)}}else t&&e.removeAttribute("style");No in e&&(e[No]=r?o.display:"",e[fl]&&(o.display="none"))}const hl=/\s*!important$/;function Ro(e,t,n){if(ie(n))n.forEach(o=>Ro(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=td(e,t);hl.test(n)?e.setProperty(et(o),n.replace(hl,""),"important"):e[o]=n}}const gl=["Webkit","Moz","ms"],Ri={};function td(e,t){const n=Ri[t];if(n)return n;let o=Re(t);if(o!=="filter"&&o in e)return Ri[t]=o;o=so(o);for(let i=0;i<gl.length;i++){const r=gl[i]+o;if(r in e)return Ri[t]=r}return t}const ml="http://www.w3.org/1999/xlink";function vl(e,t,n,o,i,r=Ya(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ml,t.slice(6,t.length)):e.setAttributeNS(ml,t,n):n==null||r&&!Er(n)?e.removeAttribute(t):e.setAttribute(t,r?"":yt(n)?String(n):n)}function bl(e,t,n,o,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?ol(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=Er(n):n==null&&l==="string"?(n="",s=!0):l==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(i||t)}function pn(e,t,n,o){e.addEventListener(t,n,o)}function nd(e,t,n,o){e.removeEventListener(t,n,o)}const yl=Symbol("_vei");function od(e,t,n,o,i=null){const r=e[yl]||(e[yl]={}),s=r[t];if(o&&s)s.value=o;else{const[l,a]=id(t);if(o){const u=r[t]=ld(o,i);pn(e,l,u,a)}else s&&(nd(e,l,s,a),r[t]=void 0)}}const wl=/(?:Once|Passive|Capture)$/;function id(e){let t;if(wl.test(e)){t={};let o;for(;o=e.match(wl);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):et(e.slice(2)),t]}let Hi=0;const rd=Promise.resolve(),sd=()=>Hi||(rd.then(()=>Hi=0),Hi=Date.now());function ld(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;xt(ad(o,n.value),t,5,[o])};return n.value=e,n.attached=sd(),n}function ad(e,t){if(ie(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>i=>!i._stopped&&o&&o(i))}else return t}const xl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,cd=(e,t,n,o,i,r)=>{const s=i==="svg";t==="class"?Gu(e,o,s):t==="style"?ed(e,n,o):no(t)?ii(t)||od(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ud(e,t,o,s))?(bl(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&vl(e,t,o,s,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Oe(o))?bl(e,Re(t),o,r,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),vl(e,t,o,s))};function ud(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&xl(t)&&de(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return xl(t)&&Oe(n)?!1:t in e}const _l={};function dd(e,t,n){let o=pe(e,t);io(o)&&(o=Ie({},o,t));class i extends Fi{constructor(s){super(o,s,n)}}return i.def=o,i}const fd=typeof HTMLElement<"u"?HTMLElement:class{};class Fi extends fd{constructor(t,n={},o=El){super(),this._def=t,this._props=n,this._createApp=o,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&o!==El?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Ie({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Fi){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,gt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let o=0;o<this.attributes.length;o++)this._setAttr(this.attributes[o].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(o,i=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:r,styles:s}=o;let l;if(r&&!ie(r))for(const a in r){const u=r[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=ci(this._props[a])),(l||(l=Object.create(null)))[Re(a)]=!0)}this._numberProps=l,this._resolveProps(o),this.shadowRoot&&this._applyStyles(s),this._mount(o)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(o=>{o.configureApp=this._def.configureApp,t(this._def=o,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const o in n)_e(this,o)||Object.defineProperty(this,o,{get:()=>Z(n[o])})}_resolveProps(t){const{props:n}=t,o=ie(n)?n:Object.keys(n||{});for(const i of Object.keys(this))i[0]!=="_"&&o.includes(i)&&this._setProp(i,this[i]);for(const i of o.map(Re))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(r){this._setProp(i,r,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):_l;const i=Re(t);n&&this._numberProps&&this._numberProps[i]&&(o=ci(o)),this._setProp(i,o,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,i=!1){if(n!==this._props[t]&&(this._dirty=!0,n===_l?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),i&&this._instance&&this._update(),o)){const r=this._ob;r&&(this._processMutations(r.takeRecords()),r.disconnect()),n===!0?this.setAttribute(et(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(et(t),n+""):n||this.removeAttribute(et(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),xd(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=B(this._def,Ie(t,this._props));return this._instance||(n.ce=o=>{this._instance=o,o.ce=this,o.isCE=!0;const i=(r,s)=>{this.dispatchEvent(new CustomEvent(r,io(s[0])?Ie({detail:s},s[0]):{detail:s}))};o.emit=(r,...s)=>{i(r,s),et(r)!==r&&i(et(r),s)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const o=this._nonce;for(let i=t.length-1;i>=0;i--){const r=document.createElement("style");o&&r.setAttribute("nonce",o),r.textContent=t[i],this.shadowRoot.prepend(r)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const o=n.nodeType===1&&n.getAttribute("slot")||"default";(t[o]||(t[o]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=this._getSlots(),n=this._instance.type.__scopeId;for(let o=0;o<t.length;o++){const i=t[o],r=i.getAttribute("name")||"default",s=this._slots[r],l=i.parentNode;if(s)for(const a of s){if(n&&a.nodeType===1){const u=n+"-s",c=document.createTreeWalker(a,1);a.setAttribute(u,"");let d;for(;d=c.nextNode();)d.setAttribute(u,"")}l.insertBefore(a,i)}else for(;i.firstChild;)l.insertBefore(i.firstChild,i);l.removeChild(i)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const n=new Set;for(const o of t){const i=o.querySelectorAll("slot");for(let r=0;r<i.length;r++)n.add(i[r])}return Array.from(n)}_injectChildStyle(t){this._applyStyles(t.styles,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_removeChildStyle(t){}}const Ho=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ie(t)?n=>lo(t,n):t};function pd(e){e.target.composing=!0}function Sl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const kn=Symbol("_assign");function kl(e,t,n){return t&&(e=e.trim()),n&&(e=ai(e)),e}const hd={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[kn]=Ho(i);const r=o||i.props&&i.props.type==="number";pn(e,t?"change":"input",s=>{s.target.composing||e[kn](kl(e.value,n,r))}),(n||r)&&pn(e,"change",()=>{e.value=kl(e.value,n,r)}),t||(pn(e,"compositionstart",pd),pn(e,"compositionend",Sl),pn(e,"change",Sl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:i,number:r}},s){if(e[kn]=Ho(s),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?ai(e.value):e.value,a=t??"";l!==a&&(document.activeElement===e&&e.type!=="range"&&(o&&t===n||i&&e.value.trim()===a)||(e.value=a))}},gd={deep:!0,created(e,t,n){e[kn]=Ho(n),pn(e,"change",()=>{const o=e._modelValue,i=md(e),r=e.checked,s=e[kn];if(ie(o)){const l=Ir(o,i),a=l!==-1;if(r&&!a)s(o.concat(i));else if(!r&&a){const u=[...o];u.splice(l,1),s(u)}}else if(oo(o)){const l=new Set(o);r?l.add(i):l.delete(i),s(l)}else s(Tl(e,r))})},mounted:Cl,beforeUpdate(e,t,n){e[kn]=Ho(n),Cl(e,t,n)}};function Cl(e,{value:t,oldValue:n},o){e._modelValue=t;let i;if(ie(t))i=Ir(t,o.props.value)>-1;else if(oo(t))i=t.has(o.props.value);else{if(t===n)return;i=co(t,Tl(e,!0))}e.checked!==i&&(e.checked=i)}function md(e){return"_value"in e?e._value:e.value}function Tl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const vd=["ctrl","shift","alt","meta"],bd={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>vd.some(n=>e[`${n}Key`]&&!t.includes(n))},Le=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(i,...r)=>{for(let s=0;s<t.length;s++){const l=bd[t[s]];if(l&&l(i,t))return}return e(i,...r)})},yd={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Fo=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=i=>{if(!("key"in i))return;const r=et(i.key);if(t.some(s=>s===r||yd[s]===r))return e(i)})},wd=Ie({patchProp:cd},qu);let Pl;function Ml(){return Pl||(Pl=pu(wd))}const xd=(...e)=>{Ml().render(...e)},El=(...e)=>{const t=Ml().createApp(...e),{mount:n}=t;return t.mount=o=>{const i=Sd(o);if(!i)return;const r=t._component;!de(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const s=n(i,!1,_d(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function _d(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Sd(e){return Oe(e)?document.querySelector(e):e}function Wi(e,t){return di()?(Ja(e,t),!0):!1}const qi=new WeakMap,kd=(...e)=>{var t;const n=e[0],o=(t=un())===null||t===void 0?void 0:t.proxy,i=o??di();if(i==null&&!Ps())throw new Error("injectLocal must be called in setup");return i&&qi.has(i)&&n in qi.get(i)?qi.get(i)[n]:Ft(...e)},Il=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Cd=e=>e!=null,Td=Object.prototype.toString,Pd=e=>Td.call(e)==="[object Object]",Cn=()=>{};function Md(...e){if(e.length!==1)return Cc(...e);const t=e[0];return typeof t=="function"?Dn(Qr(()=>({get:t,set:Cn}))):ee(t)}function Ol(e,t){function n(...o){return new Promise((i,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(r)})}return n}const $l=e=>e();function Ed(e,t={}){let n,o,i=Cn;const r=a=>{clearTimeout(a),i(),i=Cn};let s;return a=>{const u=ht(e),c=ht(t.maxWait);return n&&r(n),u<=0||c!==void 0&&c<=0?(o&&(r(o),o=void 0),Promise.resolve(a())):new Promise((d,f)=>{i=t.rejectOnCancel?f:d,s=a,c&&!o&&(o=setTimeout(()=>{n&&r(n),o=void 0,d(s())},c)),n=setTimeout(()=>{o&&r(o),o=void 0,d(a())},u)})}}function Id(e=$l,t={}){const{initialState:n="active"}=t,o=Md(n==="active");function i(){o.value=!1}function r(){o.value=!0}const s=(...l)=>{o.value&&e(...l)};return{isActive:Dn(o),pause:i,resume:r,eventFilter:s}}function zl(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function Xn(e){return Array.isArray(e)?e:[e]}function Od(e){return un()}function ct(e,t=200,n={}){return Ol(Ed(t,n),e)}function $d(e,t,n={}){const{eventFilter:o=$l,...i}=n;return ue(e,Ol(o,t),i)}function zd(e,t,n={}){const{eventFilter:o,initialState:i="active",...r}=n,{eventFilter:s,pause:l,resume:a,isActive:u}=Id(o,{initialState:i});return{stop:$d(e,t,{...r,eventFilter:s}),pause:l,resume:a,isActive:u}}const Dd=zd;function Ui(e,t=!0,n){Od()?je(e,n):t?e():gt(e)}function Ad(e,t,n){return ue(e,t,{...n,immediate:!0})}const _t=Il?window:void 0,jd=Il?window.document:void 0;function Ot(e){var t;const n=ht(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function St(...e){const t=[],n=()=>{t.forEach(l=>l()),t.length=0},o=(l,a,u,c)=>(l.addEventListener(a,u,c),()=>l.removeEventListener(a,u,c)),i=G(()=>{const l=Xn(ht(e[0])).filter(a=>a!=null);return l.every(a=>typeof a!="string")?l:void 0}),r=Ad(()=>{var l,a;return[(l=(a=i.value)===null||a===void 0?void 0:a.map(u=>Ot(u)))!==null&&l!==void 0?l:[_t].filter(u=>u!=null),Xn(ht(i.value?e[1]:e[0])),Xn(Z(i.value?e[2]:e[1])),ht(i.value?e[3]:e[2])]},([l,a,u,c])=>{if(n(),!(l!=null&&l.length)||!(a!=null&&a.length)||!(u!=null&&u.length))return;const d=Pd(c)?{...c}:c;t.push(...l.flatMap(f=>a.flatMap(p=>u.map(x=>o(f,p,x,d)))))},{flush:"post"}),s=()=>{r(),n()};return Wi(n),s}function Ld(){const e=pt(!1),t=un();return t&&je(()=>{e.value=!0},t),e}function Ki(e){const t=Ld();return G(()=>(t.value,!!e()))}const Bd=Symbol("vueuse-ssr-width");function Vd(){const e=Ps()?kd(Bd,null):null;return typeof e=="number"?e:void 0}function Nd(e,t={}){const{window:n=_t,ssrWidth:o=Vd()}=t,i=Ki(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),r=pt(typeof o=="number"),s=pt(),l=pt(!1),a=u=>{l.value=u.matches};return Ns(()=>{if(r.value){r.value=!i.value,l.value=ht(e).split(",").some(u=>{const c=u.includes("not all"),d=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),f=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let p=!!(d||f);return d&&p&&(p=o>=zl(d[1])),f&&p&&(p=o<=zl(f[1])),c?!p:p});return}i.value&&(s.value=n.matchMedia(ht(e)),l.value=s.value.matches)}),St(s,"change",a,{passive:!0}),G(()=>l.value)}const Wo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qo="__vueuse_ssr_handlers__",Rd=Hd();function Hd(){return qo in Wo||(Wo[qo]=Wo[qo]||{}),Wo[qo]}function Fd(e,t){return Rd[e]||t}function Wd(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const qd={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Dl="vueuse-storage";function Ud(e,t,n,o={}){var i;const{flush:r="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:a=!0,mergeDefaults:u=!1,shallow:c,window:d=_t,eventFilter:f,onError:p=S=>{console.error(S)},initOnMounted:x}=o,_=(c?pt:ee)(typeof t=="function"?t():t),D=G(()=>ht(e));if(!n)try{n=Fd("getDefaultStorage",()=>_t==null?void 0:_t.localStorage)()}catch(S){p(S)}if(!n)return _;const b=ht(t),P=Wd(b),A=(i=o.serializer)!==null&&i!==void 0?i:qd[P],{pause:w,resume:g}=Dd(_,S=>Q(S),{flush:r,deep:s,eventFilter:f});ue(D,()=>T(),{flush:r});let I=!1;const q=S=>{x&&!I||T(S)},K=S=>{x&&!I||Y(S)};d&&l&&(n instanceof Storage?St(d,"storage",q,{passive:!0}):St(d,Dl,K)),x?Ui(()=>{I=!0,T()}):T();function R(S,J){if(d){const F={key:D.value,oldValue:S,newValue:J,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",F):new CustomEvent(Dl,{detail:F}))}}function Q(S){try{const J=n.getItem(D.value);if(S==null)R(J,null),n.removeItem(D.value);else{const F=A.write(S);J!==F&&(n.setItem(D.value,F),R(J,F))}}catch(J){p(J)}}function H(S){const J=S?S.newValue:n.getItem(D.value);if(J==null)return a&&b!=null&&n.setItem(D.value,A.write(b)),b;if(!S&&u){const F=A.read(J);return typeof u=="function"?u(F,b):P==="object"&&!Array.isArray(F)?{...b,...F}:F}else return typeof J!="string"?J:A.read(J)}function T(S){if(!(S&&S.storageArea!==n)){if(S&&S.key==null){_.value=b;return}if(!(S&&S.key!==D.value)){w();try{const J=A.write(_.value);(S===void 0||(S==null?void 0:S.newValue)!==J)&&(_.value=H(S))}catch(J){p(J)}finally{S?gt(g):g()}}}}function Y(S){T(S.detail)}return _}function Zi(e={}){const{document:t=jd}=e;if(!t)return pt("visible");const n=pt(t.visibilityState);return St(t,"visibilitychange",()=>{n.value=t.visibilityState},{passive:!0}),n}function Kd(e,t,n={}){const{window:o=_t,...i}=n;let r;const s=Ki(()=>o&&"ResizeObserver"in o),l=()=>{r&&(r.disconnect(),r=void 0)},a=ue(G(()=>{const c=ht(e);return Array.isArray(c)?c.map(d=>Ot(d)):[Ot(c)]}),c=>{if(l(),s.value&&o){r=new ResizeObserver(t);for(const d of c)d&&r.observe(d,i)}},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return Wi(u),{isSupported:s,stop:u}}function Al(e,t={width:0,height:0},n={}){const{window:o=_t,box:i="content-box"}=n,r=G(()=>{var d;return(d=Ot(e))===null||d===void 0||(d=d.namespaceURI)===null||d===void 0?void 0:d.includes("svg")}),s=pt(t.width),l=pt(t.height),{stop:a}=Kd(e,([d])=>{const f=i==="border-box"?d.borderBoxSize:i==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(o&&r.value){const p=Ot(e);if(p){const x=p.getBoundingClientRect();s.value=x.width,l.value=x.height}}else if(f){const p=Xn(f);s.value=p.reduce((x,{inlineSize:_})=>x+_,0),l.value=p.reduce((x,{blockSize:_})=>x+_,0)}else s.value=d.contentRect.width,l.value=d.contentRect.height},n);Ui(()=>{const d=Ot(e);d&&(s.value="offsetWidth"in d?d.offsetWidth:t.width,l.value="offsetHeight"in d?d.offsetHeight:t.height)});const u=ue(()=>Ot(e),d=>{s.value=d?t.width:0,l.value=d?t.height:0});function c(){a(),u()}return{width:s,height:l,stop:c}}function jl(e,t,n={}){const{root:o,rootMargin:i="0px",threshold:r=0,window:s=_t,immediate:l=!0}=n,a=Ki(()=>s&&"IntersectionObserver"in s),u=G(()=>Xn(ht(e)).map(Ot).filter(Cd));let c=Cn;const d=pt(l),f=a.value?ue(()=>[u.value,Ot(o),d.value],([x,_])=>{if(c(),!d.value||!x.length)return;const D=new IntersectionObserver(t,{root:Ot(_),rootMargin:i,threshold:r});x.forEach(b=>b&&D.observe(b)),c=()=>{D.disconnect(),c=Cn}},{immediate:l,flush:"post"}):Cn,p=()=>{c(),f(),d.value=!1};return Wi(p),{isSupported:a,isActive:d,pause(){c(),d.value=!1},resume(){d.value=!0},stop:p}}function Zd(e,t,n={}){const{window:o=_t}=n;return Ud(e,t,o==null?void 0:o.localStorage,n)}function hn(e={}){const{window:t=_t,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:r=!0,type:s="inner"}=e,l=pt(n),a=pt(o),u=()=>{if(t)if(s==="outer")l.value=t.outerWidth,a.value=t.outerHeight;else if(s==="visual"&&t.visualViewport){const{width:d,height:f,scale:p}=t.visualViewport;l.value=Math.round(d*p),a.value=Math.round(f*p)}else r?(l.value=t.innerWidth,a.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,a.value=t.document.documentElement.clientHeight)};u(),Ui(u);const c={passive:!0};return St("resize",u,c),t&&s==="visual"&&t.visualViewport&&St(t.visualViewport,"resize",u,c),i&&ue(Nd("(orientation: portrait)"),()=>u()),{width:l,height:a}}class Gn{static register(t){this.handlers.push(t)}static unregister(t){const n=this.handlers.indexOf(t);n!==-1&&this.handlers.splice(n,1)}static trigger(){for(const t of this.handlers)if(t())return!0;return!1}static clear(){this.handlers=[]}}ke(Gn,"handlers",[]);function Yi(e){je(()=>Gn.register(e)),Mt(()=>Gn.unregister(e))}const Ll=pe({__name:"HelpScreen",props:{touchDevice:{type:Boolean}},emits:["hide"],setup(e,{emit:t}){const n=e,o=t,i=ee(null),r=ee([]);Yi(()=>(o("hide"),!0)),je(async()=>{const u=Al(i),c=ct(()=>{s({width:u.width.value,height:u.height.value})},50);c(),ue(u.width,c),ue(u.height,c)});function s(u){var f;const c=(f=i.value)==null?void 0:f.parentElement;if(!c)return;const d=Array.from(c.querySelectorAll("#controls [title], #top-controls [title], #bottom-controls [title]"));d.length&&(r.value=l(d,u))}function l(u,c){const d=[],f=[];let p=0,x=0;const _=50,D=25;u.forEach(g=>{var Q;const I=(Q=g.getAttribute("title"))==null?void 0:Q.trim(),q=g.getBoundingClientRect();if(!I||!q.height||!q.width)return;const K=Math.ceil((q.top-10)/_),R=Math.ceil((q.left-10)/_);f.push({isTour:!1,title:I,rect:q,fromX:R,toX:Math.max(R+1,Math.ceil((q.right+10)/_)),fromY:K,toY:Math.max(K+1,Math.ceil((q.bottom+10)/_))})}),f.forEach(g=>{for(let I=g.fromY;I<g.toY;I++){d[I]??(d[I]=[]);for(let q=g.fromX;q<g.toX;q++)d[I][q]=g;g.toY>p+1&&(p=g.toY-1),g.toX>x+1&&(x=g.toX-1)}});let b=x/2;f.forEach(g=>{g.isAlignRight=g.fromX>b});const P=(g,I)=>{d[I]??(d[I]=[]);const q=I>=g.toY;if(g.isTour)for(let K=g.fromX;K<g.toX;K++)delete d[g.fromY][K],g.fromY=I,g.toY=I+(q?1:-1),d[I][K]=g;else{const K=g.isAlignRight?g.fromX-3:g.fromX,R=K+3;g.helpItem={fromX:K,toX:R,fromY:I,toY:I+1,isTour:!0,isAlignRight:g.isAlignRight};for(let Q=K;Q<R;Q++)d[I][Q]=g.helpItem}},A=(g,I)=>{if(I>p||I<0)return!1;const q=I>=g.toY,K=d[I];if(!K)return P(g,I),!0;const R=K[g.fromX];if(R&&!R.isTour)return!1;if(R&&R.isTour)return A(R,q?I+1:I-1)?(P(g,I),!0):!1;if(!R){const Q=g.isAlignRight?-1:1;return K[g.fromX+Q]||K[g.fromX+Q*2]?A(g,q?I+1:I-1):(P(g,I),!0)}return!1};f.forEach(g=>{if(!A(g,g.toY)){if(g.isAlignRight){const I=d[g.fromY]??[];if(!I.slice(g.fromX-3,g.fromX).filter(Boolean).length){const K=g.fromX-3,R=g.fromX;g.helpItem={isTour:!0,isAlignRight:!0,fromX:K,toX:R,fromY:g.fromY,toY:g.toY};for(let Q=g.fromX-3;Q<g.fromX;Q++)I[Q]=g.helpItem;return}}A(g,g.fromY-1)}});const w=[];return f.forEach(g=>{const{title:I,helpItem:q,rect:K,isAlignRight:R,fromX:Q,fromY:H,toY:T}=g;if(!I||!q||!K)return;const Y=q.fromY>=T,S=q.toY<=H;w.push({title:a(I),style:{top:Y?`${K.bottom+(q.fromY-T)*_+D}px`:S?void 0:`${K.top+8}px`,bottom:S?`${c.height-K.top+(q.toY-H)*_+D}px`:void 0,left:R?void 0:`${K.left}px`,right:R?Y?`${c.width-K.right}px`:`${c.width-K.right+K.width+D}px`:void 0},arrowStyle:{width:S||Y?"2px":`${Math.abs(q.toX-Q)*_+D-5}px`,height:S||Y?`${(Y?q.fromY-T:H-q.toY)*_+D}px`:"2px",top:Y?`${K.bottom}px`:S?void 0:`${K.top+20}px`,bottom:S?`${c.height-K.top}px`:void 0,left:R?void 0:`${K.left+K.width/2}px`,right:R?Y?`${c.width-K.right+K.width/2}px`:`${c.width-K.right+K.width}px`:void 0}})}),w}function a(u){return n.touchDevice?u.split("(")[0].trim():u}return(u,c)=>(v(),z(be,null,[c[1]||(c[1]=U("div",{class:"fixed inset-0 bg-black bg-opacity-90"},null,-1)),U("div",{ref_key:"root",ref:i,class:"fixed inset-0 z-20 overscroll-contain select-none",onClick:c[0]||(c[0]=Le(d=>o("hide"),["stop"]))},[(v(!0),z(be,null,Yt(r.value,d=>(v(),z(be,{key:d.title},[U("div",{class:"absolute",style:Pe(d.style)},He(d.title),5),U("div",{class:"absolute bg-stone-300 rounded-lg",style:Pe(d.arrowStyle)},null,4)],64))),128))],512)],64))}}),Yd=Object.freeze(Object.defineProperty({__proto__:null,default:Ll},Symbol.toStringTag,{value:"Module"}));function Uo(e,t){let n=null;return(...o)=>{n===null&&(n=setTimeout(()=>{n=null,e(...o)},t))}}const Xd=pe({__name:"ReaderTour",emits:["hide"],setup(e,{emit:t}){const n=t,o=ee(null),i=ee(0),r=ee([]),s=G(()=>r.value[i.value]),l=Uo(a,500);je(()=>{const d=Al(o),f=ct(()=>u({width:d.width.value,height:d.height.value}),50);f(),ue(d.width,f),ue(d.height,f)});function a(){i.value>=r.value.length-1?n("hide"):i.value++}function u(d){const f=c();r.value=f.map(({rect:p,text:x})=>{const _=p.top<d.height-p.bottom,D=p.left<d.width-p.right;return{text:x,style:{left:`${p.left}px`,top:`${p.top}px`,width:`${p.width}px`,height:`${p.height}px`},textStyle:{left:D?`${p.left-12}px`:void 0,right:D?void 0:`${d.width-p.left}px`,top:_?`${p.bottom+12}px`:`${p.top+20}px`,textAlign:_?void 0:"right",transform:_?void 0:"translateY(-50%)"}}}),i.value>=r.value.length&&(i.value=r.value.length-1)}function c(){var p;const d=(p=o.value)==null?void 0:p.parentElement;if(!d)return[];const f=[];return d.querySelectorAll("[data-tour]").forEach(x=>{var b;const _=(b=x.getAttribute("data-tour"))==null?void 0:b.trim();if(!(_!=null&&_.length))return;const D=x.getBoundingClientRect();f.push({rect:D,text:_})}),f}return(d,f)=>{var p,x;return v(),z(be,null,[U("div",{class:fe(["fixed inset-0 bg-black bg-opacity-50 duration-500",{"opacity-0":!s.value,"opacity-100":!!s.value}])},null,2),U("div",{ref_key:"root",ref:o,class:"tour",onClick:f[0]||(f[0]=Le((..._)=>Z(l)&&Z(l)(..._),["stop"]))},[s.value?(v(),z("div",{key:i.value,class:"tour__target",style:Pe(s.value.style)},null,4)):se("",!0),(v(),z("div",{key:i.value,class:"tour__text",style:Pe((p=s.value)==null?void 0:p.textStyle)},He(((x=s.value)==null?void 0:x.text)??""),5))],512)],64)}}}),Gd=".tour{height:100%;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:20}.tour__target{border-radius:9999px;border-width:2px;--tw-border-opacity:1;animation:tour-target-anim .5s forwards;border-color:rgb(120 113 108/var(--tw-border-opacity,1));box-shadow:0 0 0 99999px #000000e6}.tour__target,.tour__text{position:absolute}.tour__text{animation:tour-text-anim 1s forwards,tour-text-bounce .75s ease-in-out infinite alternate;max-width:320px;padding-left:12px;padding-right:12px;transition-duration:1s}@keyframes tour-target-anim{0%{transform:scale(3);--tw-border-opacity:0;opacity:0}to{transform:scale(1);--tw-border-opacity:1;opacity:.9}}@keyframes tour-text-anim{0%{opacity:0}to{opacity:1}}@keyframes tour-text-bounce{0%{margin-top:0}to{margin-top:.625}}",ve=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Bl=ve(Xd,[["styles",[Gd]]]),Jd=Object.freeze(Object.defineProperty({__proto__:null,default:Bl},Symbol.toStringTag,{value:"Module"}));function Qd({touchDevice:e}){const t=ee(!1);let n=0;return Rn("busy:touchDevice",e),Rn("setBusyState",o=>{n+=o?1:-1;const i=n>0;t.value!=i&&(t.value=i)}),G(()=>t.value)}function Ko(){const e=Ft("busy:touchDevice"),t=Ft("setBusyState");let n=!1;return Mt(()=>{n&&(t==null||t(!1))}),(o,{desktopOnly:i=!1}={})=>{i&&e||(n=o,t==null||t(o))}}function ef(e){Rn("hapticFeedback",e)}function Zo(){return Ft("hapticFeedback")}class tf{constructor(){ke(this,"listeners");this.listeners=[],this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.init()}init(){window.addEventListener("keydown",this.onKeyDown,{capture:!0}),window.addEventListener("keyup",this.onKeyUp,{capture:!0}),window.addEventListener("keypress",this.onKeyPress,{capture:!0})}dispose(){window.removeEventListener("keydown",this.onKeyDown,{capture:!0}),window.removeEventListener("keyup",this.onKeyUp,{capture:!0}),window.removeEventListener("keypress",this.onKeyPress,{capture:!0})}onKeyPress(t){t.stopImmediatePropagation(),t.stopPropagation()}onKeyDown(t){var n,o;t.stopImmediatePropagation(),t.stopPropagation();for(let i=0;i<this.listeners.length&&((o=(n=this.listeners[i]).onKeyDown)==null?void 0:o.call(n,t))!==!0;i++);}onKeyUp(t){var n,o;t.stopImmediatePropagation(),t.stopPropagation();for(let i=0;i<this.listeners.length&&((o=(n=this.listeners[i]).onKeyUp)==null?void 0:o.call(n,t))!==!0;i++);}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);n!==-1&&this.listeners.splice(n,1)}}function nf(){const e=new tf;return Mt(()=>e.dispose()),Rn("keyController",e),e}function $t(e){const t=Ft("keyController");je(()=>t.addListener(e)),Mt(()=>t.removeListener(e))}function of(e,t){const n=sessionStorage.getItem("tk:page:path");n!==location.pathname&&(sessionStorage.setItem("tk:page:path",location.pathname),n&&sessionStorage.removeItem("tk:page"));const o=ee(t&&e>0?Math.max(0,e):+(sessionStorage.getItem("tk:page")??"0")||e);return G({get:()=>o.value,set:i=>{o.value=i,sessionStorage.setItem("tk:page",i+"")}})}function rf(){sessionStorage.removeItem("tk:page"),sessionStorage.removeItem("tk:page:path")}const sf=(e,t)=>{const n=+(e.getAttribute("data-ripple")??0);if(!n)return;const o=document.createElement("span");let i=1,r=.65;const s=setInterval(a,20);l();function l(){o.style.position="absolute",o.style.height="5px",o.style.width="5px",o.style.borderRadius="100%",o.style.backgroundColor="#f2f2f2",o.style.left=`${t.currentTarget.clientWidth/2}px`,o.style.top=`${t.currentTarget.clientHeight/2}px`,t.currentTarget.appendChild(o)}function a(){const u=+n||50;i<=u?(i++,r-=.65/u,o.style.transform=`scale(${i})`,o.style.opacity=`${r}`):(o.remove(),clearInterval(s))}},zt={mounted:(e,t)=>{e.style.position="relative",e.style.overflow="hidden",e.setAttribute("data-ripple",t.value),e.addEventListener("click",n=>sf(e,n))},updated:(e,t)=>{e.setAttribute("data-ripple",t.value)}},lf={class:"group-hover:bg-stone-100 group-hover:bg-opacity-20 transition-bg duration-200 rounđe-full p-2 w-full h-full inline-flex justify-center items-center gap-2 text-base"},Xi=pe({inheritAttrs:!1,__name:"BaseButton",props:{disabled:{type:Boolean},href:{type:String},transparent:{type:Boolean},title:{type:String},enableHapticFeedback:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,i=Ko(),r=Zo();let s=!1;function l(){s||(s=!0,i(!0,{desktopOnly:!0}))}function a(){s&&(s=!1,i(!1,{desktopOnly:!0}))}function u(c){n.disabled?c.preventDefault():(o("click",c),n.enableHapticFeedback&&r())}return(c,d)=>Ne((v(),oe(Pi(e.href?"a":"button"),cn({href:e.href,title:e.title},{class:["h-10 max-w-full max-h-full rounded-full flex-shrink-0 focus:outline-none outline-none",{"cursor-default opacity-60":e.disabled,"hover:text-stone-100 group duration-200":!e.disabled,"bg-black bg-opacity-50":!e.transparent,[`${c.$attrs.class??""}`]:!0}],onClick:Le(u,["stop"]),onMouseenter:l,onMouseleave:a}),{default:ne(()=>[U("div",lf,[xe(c.$slots,"default")])]),_:3},16,["class"])),[[Z(zt),e.disabled?0:15]])}}),af=Object.freeze(Object.defineProperty({__proto__:null,default:Xi},Symbol.toStringTag,{value:"Module"})),cf={},uf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function df(e,t){return v(),z("svg",uf,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M19 12.998h-6v6h-2v-6H5v-2h6v-6h2v6h6z"},null,-1)])])}const Vl=ve(cf,[["render",df]]),ff=Object.freeze(Object.defineProperty({__proto__:null,default:Vl},Symbol.toStringTag,{value:"Module"})),pf={class:"inline-flex p-6 gap-6 text-base text-stone-300 select-none"},hf={key:0,class:"inline-block rounded-full relative w-28 h-12 overflow-hidden"},gf={key:0,class:"absolute bottom-0 left-0 right-0 flex justify-center pb-7 md:pb-6 lg:pb-4"},mf={class:"flex justify-center items-center gap-1 pl-1 pr-2 h-full"},Gi=ve(pe({__name:"AutoNext",props:{hasNext:{type:Boolean},offlineMode:{type:Boolean},seconds:{type:Number},showAddButton:{type:Boolean}},emits:["next","hide","add-to-library","visibility-changed"],setup(e,{emit:t}){const n=e,o=t,i=ee(null),r=ee(null),s=ee(!1),l=ee(!1),a=ee(n.seconds),u=ee(n.seconds<=0),c=ee(n.seconds),d=Zo();je(()=>{let x;jl(r,_=>{const D=_.some(b=>b.isIntersecting);D!==l.value&&(l.value=D,o("visibility-changed",D),u.value=n.seconds<=0,a.value=n.seconds,c.value=n.seconds,x&&(clearInterval(x),x=void 0),!(!l.value||u.value)&&(x=setInterval(()=>{a.value-=1,a.value<=0&&(clearInterval(x),x=void 0,o("next"))},1e3)))}),jl(i,_=>{s.value=_.some(D=>D.isIntersecting)}),Mt(()=>x&&clearInterval(x))});function f(){o("next"),d()}function p(){o("hide")}return(x,_)=>(v(),z("div",{ref_key:"root",ref:i,class:"h-full w-full flex justify-center items-center relative"},[Ne(U("div",pf,[e.hasNext?(v(),z("div",hf,[l.value?(v(),z("div",{key:0,class:"absolute left-0 top-0 bottom-0 h-full bg-stone-600 bg-opacity-50",style:Pe(u.value?{}:{animation:`auto-next ${c.value}s linear forwards`})},null,4)):se("",!0),Ne((v(),z("button",{ref_key:"nextButton",ref:r,class:"bg-transparent rounded-full h-full w-full border-solid border-stone-600 border-2 hover:bg-stone-300 hover:bg-opacity-10 totalDuration-200",onClick:Le(f,["stop"])},[Wt(He(u.value?"Next":`Next in ${a.value}`),1)])),[[Z(zt)]])])):se("",!0),Ne((v(),z("button",{class:"rounded-full px-6 h-12 bg-transparent border-solid border-stone-600 border-2 hover:bg-stone-300 hover:bg-opacity-10 totalDuration-200",onClick:Le(p,["stop"])},[Wt(He(e.offlineMode?"Close":"Hide"),1)])),[[Z(zt)]])],512),[[pl,s.value||!e.hasNext]]),e.showAddButton?(v(),z("div",gf,[B(Xi,{class:"bg-primary w-min !h-9 !bg-opacity-100",onClick:_[0]||(_[0]=()=>o("add-to-library"))},{default:ne(()=>[U("div",mf,[B(Vl,{class:"flex-shrink-0 w-auto"}),_[1]||(_[1]=U("span",{class:"text-sm text-stone-50"},"Add to library",-1))])]),_:1})])):se("",!0)],512))}}),[["styles",[".animate-auto-next{animation:auto-next 5s linear forwards}@keyframes auto-next{0%{width:0}to{width:100%}}"]]]),vf=Object.freeze(Object.defineProperty({__proto__:null,default:Gi},Symbol.toStringTag,{value:"Module"})),Ge=pe({inheritAttrs:!1,__name:"ButtonIcon",props:{disabled:{type:Boolean},href:{type:String},title:{type:String},transparent:{type:Boolean},enableHapticFeedback:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return(o,i)=>(v(),oe(Xi,{class:fe(["w-10",o.$attrs.class]),disabled:e.disabled,href:e.href,title:e.title,transparent:e.transparent,"enable-haptic-feedback":e.enableHapticFeedback,onClick:i[0]||(i[0]=r=>n("click",r))},{default:ne(()=>[xe(o.$slots,"default")]),_:3},8,["class","disabled","href","title","transparent","enable-haptic-feedback"]))}}),bf=Object.freeze(Object.defineProperty({__proto__:null,default:Ge},Symbol.toStringTag,{value:"Module"})),yf={},wf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function xf(e,t){return v(),z("svg",wf,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"m10.875 19.3l-6.6-6.6q-.15-.15-.213-.325T4 12q0-.2.063-.375t.212-.325l6.6-6.6q.275-.275.688-.287t.712.287q.3.275.313.688T12.3 6.1L7.4 11h11.175q.425 0 .713.288t.287.712q0 .425-.287.713t-.713.287H7.4l4.9 4.9q.275.275.288.7t-.288.7q-.275.3-.7.3t-.725-.3Z"},null,-1)])])}const Nl=ve(yf,[["render",xf]]),_f=Object.freeze(Object.defineProperty({__proto__:null,default:Nl},Symbol.toStringTag,{value:"Module"}));var Qt=(e=>(e[e.manga=1]="manga",e[e.novel=2]="novel",e[e.anime=3]="anime",e))(Qt||{});const Ji=pe({__name:"ButtonBack",props:{offlineMode:{type:Boolean},raw:{type:null},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t;function i(r){n.offlineMode&&(r.preventDefault(),o("click"))}return(r,s)=>{var l;return v(),oe(Ge,{href:e.offlineMode||!e.raw?"#":e.raw.title.url,title:`Back to ${((l=e.raw)==null?void 0:l.contentType)===Z(Qt).novel?"novel":"manga"}`,transparent:e.transparent,"enable-haptic-feedback":"",onClick:i},{default:ne(()=>[B(Nl)]),_:1},8,["href","title","transparent"])}}}),Sf=Object.freeze(Object.defineProperty({__proto__:null,default:Ji},Symbol.toStringTag,{value:"Module"})),kf={},Cf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Tf(e,t){return v(),z("svg",Cf,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M17.825 8.575q-.2 0-.375-.062t-.325-.213L15.7 6.875q-.3-.3-.3-.712t.3-.688q.275-.3.7-.3t.7.275l.725.725l2.825-2.85q.3-.3.7-.3t.725.3q.275.3.275.725t-.275.7l-3.55 3.55q-.15.15-.325.213t-.375.062ZM6.4 20.4q-.5.2-.95-.087T5 19.475V5q0-.825.588-1.413T7 3h7q-.5.75-.75 1.438T13 6q0 1.8 1.137 3.175T17 10.9q.575.075 1 .075t1-.075v8.575q0 .55-.45.838t-.95.087L12 18l-5.6 2.4Z"},null,-1)])])}const Rl=ve(kf,[["render",Tf]]),Pf=Object.freeze(Object.defineProperty({__proto__:null,default:Rl},Symbol.toStringTag,{value:"Module"})),Mf={},Ef={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function If(e,t){return v(),z("svg",Ef,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M6.4 20.4q-.5.2-.95-.087T5 19.475V5q0-.825.588-1.413T7 3h6v2H7v12.95l5-2.15l5 2.15V11h2v8.475q0 .55-.45.838t-.95.087L12 18l-5.6 2.4ZM7 5h6h-6Zm11 4q-.425 0-.713-.287T17 8V7h-1q-.425 0-.713-.288T15 6q0-.425.288-.713T16 5h1V4q0-.425.288-.713T18 3q.425 0 .713.288T19 4v1h1q.425 0 .713.288T21 6q0 .425-.288.713T20 7h-1v1q0 .425-.288.713T18 9Z"},null,-1)])])}const Hl=ve(Mf,[["render",If]]),Of=Object.freeze(Object.defineProperty({__proto__:null,default:Hl},Symbol.toStringTag,{value:"Module"})),Qi=pe({__name:"ButtonEntry",props:{entryId:{type:null},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;$t({onKeyUp:i=>{i.key==="t"&&!i.metaKey&&!i.ctrlKey&&n("click")}});function o(){n("click")}return(i,r)=>(v(),oe(Ge,{transparent:e.transparent,title:e.entryId?"View entry (T)":"Add to library (T)","data-tour":"Prress here to add to your library",onClick:o},{default:ne(()=>[e.entryId?(v(),oe(Rl,{key:0})):(v(),oe(Hl,{key:1}))]),_:1},8,["transparent","title"]))}}),$f=Object.freeze(Object.defineProperty({__proto__:null,default:Qi},Symbol.toStringTag,{value:"Module"})),zf={},Df={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function Af(e,t){return v(),z("svg",Df,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M16.5 16V8l-4 4l4 4ZM5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.588 1.413T19 21H5Zm3-2V5H5v14h3Zm2 0h9V5h-9v14Zm-2 0H5h3Z"},null,-1)])])}const Fl=ve(zf,[["render",Af]]),jf=Object.freeze(Object.defineProperty({__proto__:null,default:Fl},Symbol.toStringTag,{value:"Module"})),Yo=pe({inheritAttrs:!1,__name:"ButtonHide",props:{transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return(o,i)=>(v(),oe(Ge,{title:"Hide reader","data-tour":"You have entered reader mode, press here to return to the original page",class:fe(o.$attrs.class),transparent:e.transparent,onClick:i[0]||(i[0]=()=>n("click"))},{default:ne(()=>[B(Fl)]),_:1},8,["class","transparent"]))}}),Lf=Object.freeze(Object.defineProperty({__proto__:null,default:Yo},Symbol.toStringTag,{value:"Module"})),Bf={},Vf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Nf(e,t){return v(),z("svg",Vf,[...t[0]||(t[0]=[U("path",{d:"M199.9 416h-63.8c-4.5 0-8.1-3.6-8.1-8V104c0-4.4 3.6-8 8.1-8h63.8c4.5 0 8.1 3.6 8.1 8v304c0 4.4-3.6 8-8.1 8z",fill:"currentColor"},null,-1),U("path",{d:"M375.9 416h-63.8c-4.5 0-8.1-3.6-8.1-8V104c0-4.4 3.6-8 8.1-8h63.8c4.5 0 8.1 3.6 8.1 8v304c0 4.4-3.6 8-8.1 8z",fill:"currentColor"},null,-1)])])}const er=ve(Bf,[["render",Nf]]),Rf=Object.freeze(Object.defineProperty({__proto__:null,default:er},Symbol.toStringTag,{value:"Module"})),Hf={},Ff={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Wf(e,t){return v(),z("svg",Ff,[...t[0]||(t[0]=[U("path",{d:"M128 104.3v303.4c0 6.4 6.5 10.4 11.7 7.2l240.5-151.7c5.1-3.2 5.1-11.1 0-14.3L139.7 97.2c-5.2-3.3-11.7.7-11.7 7.1z",fill:"currentColor"},null,-1)])])}const tr=ve(Hf,[["render",Wf]]),qf=Object.freeze(Object.defineProperty({__proto__:null,default:tr},Symbol.toStringTag,{value:"Module"})),nr=pe({inheritAttrs:!1,__name:"ButtonPlay",props:{tourMessage:{type:String},playing:{type:Boolean},disabled:{type:Boolean},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t;return $t({onKeyDown(i){!n.disabled&&i.key===" "&&(i.preventDefault(),o("click"))}}),(i,r)=>(v(),oe(Ge,{transparent:e.transparent,class:fe(i.$attrs.class),"data-tour":e.tourMessage,title:`${e.playing?"Pause":"Play"} (Space)`,disabled:e.disabled,onClick:r[0]||(r[0]=()=>o("click"))},{default:ne(()=>[e.playing?(v(),oe(er,{key:0})):(v(),oe(tr,{key:1}))]),_:1},8,["transparent","class","data-tour","title","disabled"]))}}),Uf=Object.freeze(Object.defineProperty({__proto__:null,default:nr},Symbol.toStringTag,{value:"Module"})),Kf={},Zf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"};function Yf(e,t){return v(),z("svg",Zf,[...t[0]||(t[0]=[U("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[U("circle",{cx:"14",cy:"14",r:"12"}),U("path",{d:"m23 23l7 7M9 12V9h3m4 0h3v3M9 16v3h3m7-3v3h-3"})],-1)])])}const Wl=ve(Kf,[["render",Yf]]),Xf=Object.freeze(Object.defineProperty({__proto__:null,default:Wl},Symbol.toStringTag,{value:"Module"})),Gf={class:"block w-4 h-4"},Jf={class:"w-12"},ql=pe({__name:"ButtonResetZoom",props:{zoom:{type:Number}},emits:["click"],setup(e,{emit:t}){const n=t;function o(i){n("click",i)}return(i,r)=>(v(),z("button",{class:"h-9 rounded-full inline-flex justify-between items-center bg-black bg-opacity-50 gap-1 py-2 px-3 pointer-events-auto hover:bg-stone-900 hover:bg-opacity-50 duration-200",title:"Reset zoom",onClick:Le(o,["stop"])},[U("div",Gf,[B(Wl)]),U("div",Jf,He(Math.ceil(e.zoom*100))+"%",1)]))}}),Qf=Object.freeze(Object.defineProperty({__proto__:null,default:ql},Symbol.toStringTag,{value:"Module"})),ep={},tp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 36 36"};function np(e,t){return v(),z("svg",tp,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"m32.57 15.72l-3.35-1a11.65 11.65 0 0 0-.95-2.33l1.64-3.07a.61.61 0 0 0-.11-.72l-2.39-2.4a.61.61 0 0 0-.72-.11l-3.05 1.63a11.62 11.62 0 0 0-2.36-1l-1-3.31a.61.61 0 0 0-.59-.41h-3.38a.61.61 0 0 0-.58.43l-1 3.3a11.63 11.63 0 0 0-2.38 1l-3-1.62a.61.61 0 0 0-.72.11L6.2 8.59a.61.61 0 0 0-.11.72l1.62 3a11.63 11.63 0 0 0-1 2.37l-3.31 1a.61.61 0 0 0-.43.58v3.38a.61.61 0 0 0 .43.58l3.33 1a11.62 11.62 0 0 0 1 2.33l-1.64 3.14a.61.61 0 0 0 .11.72l2.39 2.39a.61.61 0 0 0 .72.11l3.09-1.65a11.65 11.65 0 0 0 2.3.94l1 3.37a.61.61 0 0 0 .58.43h3.38a.61.61 0 0 0 .58-.43l1-3.38a11.63 11.63 0 0 0 2.28-.94l3.11 1.66a.61.61 0 0 0 .72-.11l2.39-2.39a.61.61 0 0 0 .11-.72l-1.66-3.1a11.63 11.63 0 0 0 .95-2.29l3.37-1a.61.61 0 0 0 .43-.58v-3.41a.61.61 0 0 0-.37-.59ZM18 23.5a5.5 5.5 0 1 1 5.5-5.5a5.5 5.5 0 0 1-5.5 5.5Z",class:"clr-i-solid clr-i-solid-path-1"},null,-1),U("path",{fill:"none",d:"M0 0h36v36H0z"},null,-1)])])}const Ul=ve(ep,[["render",np]]),op=Object.freeze(Object.defineProperty({__proto__:null,default:Ul},Symbol.toStringTag,{value:"Module"})),or=pe({__name:"ButtonSettings",props:{disabled:{type:Boolean},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return $t({onKeyUp:o=>{o.key==="s"&&!o.metaKey&&!o.ctrlKey&&n("click")}}),(o,i)=>(v(),oe(Ge,{transparent:e.transparent,title:"Reader preferences (S)",disabled:e.disabled,onClick:i[0]||(i[0]=()=>n("click"))},{default:ne(()=>[B(Ul)]),_:1},8,["transparent","disabled"]))}}),ip=Object.freeze(Object.defineProperty({__proto__:null,default:or},Symbol.toStringTag,{value:"Module"})),rp={},sp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function lp(e,t){return v(),z("svg",sp,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M4 4h6v2H6v4H4V4Zm10 0h6v6h-2V6h-4V4ZM6 14v4h4v2H4v-6h2Zm14 0v6h-6v-2h4v-4h2Z"},null,-1)])])}const Kl=ve(rp,[["render",lp]]),ap=Object.freeze(Object.defineProperty({__proto__:null,default:Kl},Symbol.toStringTag,{value:"Module"})),cp={},up={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function dp(e,t){return v(),z("svg",up,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M14 20v-6h6v2h-4v4h-2Zm-6 0v-4H4v-2h6v6H8Zm12-10h-6V4h2v4h4v2Zm-10 0H4V8h4V4h2v6Z"},null,-1)])])}const Zl=ve(cp,[["render",dp]]),fp=Object.freeze(Object.defineProperty({__proto__:null,default:Zl},Symbol.toStringTag,{value:"Module"})),ir=pe({__name:"ButtonWebFullScreen",props:{transparent:{type:Boolean}},emits:["request-full-screen"],setup(e,{emit:t}){const n=t,o=ee(!1);$t({onKeyUp:r=>{r.key==="f"&&!r.metaKey&&!r.ctrlKey&&i()}}),St("fullscreenchange",()=>{o.value=!!document.fullscreenElement});function i(){document.fullscreenElement?document.exitFullscreen():n("request-full-screen")}return(r,s)=>(v(),oe(Ge,{transparent:e.transparent,title:`${o.value?"Exit":"Enter"} fullscreen (F)`,onClick:i},{default:ne(()=>[o.value?(v(),oe(Zl,{key:0})):(v(),oe(Kl,{key:1}))]),_:1},8,["transparent","title"]))}}),pp=Object.freeze(Object.defineProperty({__proto__:null,default:ir},Symbol.toStringTag,{value:"Module"}));async function gn(e,t,n){const o=await n(()=>{e=0});if(o!==void 0)return o;if(!(e<=0))return await new Promise(i=>{setTimeout(async()=>{const r=await gn(e-1,t,n);i(r)},t)})}const hp=["aria-hidden"],gp=["onClick"],Yl=pe({__name:"DropdownMenu",props:Ye({items:{type:Array},enableHapticFeedback:{type:Boolean}},{modelValue:{type:Number,required:!1},modelModifiers:{}}),emits:Ye(["select"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=lt(e,"modelValue"),r=ee(null),s=ee(!1),l=ee(!1),a=ee(!1),u=ee(!1),c={mounted:w=>{var g;i.value&&((g=w.children[i.value])==null||g.scrollIntoView({behavior:"auto",block:"center",inline:"center"}))}};$t({onKeyDown:D}),Yi(()=>{const w=s.value;return w&&(s.value=!1),w});const d=Ko(),f=Zo();async function p(w){s.value=w??!s.value,d(s.value),s.value?(x(),P(r.value)):setTimeout(A,250)}function x(){const w=r.value;if(w){const g=w.getBoundingClientRect(),I=g.x+g.width/2;l.value=g.y>window.innerHeight/2,a.value=I<window.innerWidth/3,u.value=I>window.innerWidth/3*2}}function _(w,g){p(),w!=i.value&&(i.value=w,o("select",w,g),n.enableHapticFeedback&&f())}function D(w){s.value&&w.key==="Escape"&&(p(),w.preventDefault())}let b=[];function P(w){const g=window.getComputedStyle(w).zIndex,I=w.style.zIndex;(!g||!(+g>0))&&((!w.parentElement||w.parentElement.childElementCount>1)&&(w.style.zIndex="1",b.push({el:w,zIndex:I})),w.parentElement&&P(w.parentElement))}function A(){b.forEach(({el:w,zIndex:g})=>{w.style.zIndex=g??""}),b=[]}return(w,g)=>(v(),z("div",{ref_key:"root",ref:r,class:"select-none relative inline-flex"},[s.value?(v(),z("div",{key:0,class:"fixed inset-0 bg-transparent",onClick:g[0]||(g[0]=()=>p())})):se("",!0),e.items.length?(v(),oe(Vo,{key:1,name:"slide-fade","enter-from-class":"scale-y-90 opacity-0 pointer-events-none","leave-to-class":"scale-y-90 opacity-0 pointer-events-none"},{default:ne(()=>[s.value?Ne((v(),z("ul",{key:0,ref:"list","aria-hidden":!s.value,class:fe(["scrollbar-sm duration-150 delay-50 absolute w-40 max-h-[70vh] list-none bg-stone-800 bg-opacity-80 backdrop-blur-md rounded-lg overflow-auto",{"origin-bottom bottom-full -translate-y-1.5":l.value,"origin-top top-full translate-y-1.5":!l.value,"left-1/2 -ml-20 text-center":!a.value&&!u.value,"right-0 text-right":u.value}]),onWheelPassive:g[1]||(g[1]=Le(()=>{},["stop"])),onTouchmove:g[2]||(g[2]=Le(()=>{},["stop"]))},[(v(!0),z(be,null,Yt(e.items,(I,q)=>Ne((v(),z("li",{key:q,tabindex:"-1",class:fe(["h-10 px-4 last:border-b-transparent cursor-pointer hover:bg-stone-100 hover:bg-opacity-10 duration-100",{"text-textPrimary":q===i.value}]),onClick:K=>_(q,K)},[U("div",{class:fe(["h-full py-2",{"border-t-[1px] border-solid border-stone-400 border-opacity-30":q>0}])},[xe(w.$slots,"item",{item:I},()=>[Wt(He(I),1)])],2)],10,gp)),[[Z(zt),30]])),128))],42,hp)),[[c]]):se("",!0)]),_:3})):se("",!0),xe(w.$slots,"default",{toggle:p,isOpen:s.value,isAlignTop:l.value})],512))}}),mp=Object.freeze(Object.defineProperty({__proto__:null,default:Yl},Symbol.toStringTag,{value:"Module"})),vp={},bp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function yp(e,t){return v(),z("svg",bp,[...t[0]||(t[0]=[Ou('<circle cx="18" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".67" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".33" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="6" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin="0" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle>',3)])])}const Xl=ve(vp,[["render",yp]]),wp=Object.freeze(Object.defineProperty({__proto__:null,default:Xl},Symbol.toStringTag,{value:"Module"})),xp={},_p={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Sp(e,t){return v(),z("svg",_p,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"},null,-1)])])}const Gl=ve(xp,[["render",Sp]]),kp=Object.freeze(Object.defineProperty({__proto__:null,default:Gl},Symbol.toStringTag,{value:"Module"})),Cp=["onClick"],Tp={class:"inline-flex items-center justify-center w-full h-full px-4 rounded-full group-hover:bg-stone-100 group-hover:bg-opacity-20 duration-200"},Pp={class:"whitespace-nowrap"},rr=pe({__name:"ButtonDropdown",props:Ye({label:{type:String},title:{type:String},items:{type:Array},disabled:{type:Boolean},canLoadItems:{type:Boolean},loadItems:{type:Function},enableHapticFeedback:{type:Boolean},transparent:{type:Boolean}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:Ye(["select"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=lt(e,"modelValue"),r=ee(!1),s=Ko();async function l(f,p){if(!n.items.length&&(f||await a(),!n.items.length)){p(!1);return}p()}async function a(){r.value||n.items.length||!n.canLoadItems||!n.loadItems||(r.value=!0,await n.loadItems(),r.value=!1)}let u=!1;function c(){u||(u=!0,s(!0,{desktopOnly:!0}))}function d(){u&&(u=!1,s(!1,{desktopOnly:!0}))}return(f,p)=>(v(),oe(Yl,{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=x=>i.value=x),items:e.items,"enable-haptic-feedback":e.enableHapticFeedback,onSelect:p[1]||(p[1]=(x,_)=>o("select",x,_))},Mi({default:ne(({toggle:x,isOpen:_,isAlignTop:D})=>[Ne((v(),z("button",cn({type:"button",tabindex:"-1",class:["w-full h-10 max-h-full rounded-full group duration-100 transition-bg",{"pointer-events-none opacity-60":e.disabled||r.value,"bg-black bg-opacity-50":!e.transparent,"bg-transparent":e.transparent}]},e.title?{title:e.title}:{},{onClick:Le(()=>l(_,x),["stop"]),onMouseenter:c,onMouseleave:d}),[U("div",Tp,[U("span",Pp,He(e.label),1),e.items.length||e.canLoadItems?(v(),z("span",{key:0,class:fe(["w-4 h-4 flex ml-1 -mr-3 flex-shrink-0",{"rotate-180":D}]),"aria-hidden":"true"},[r.value?(v(),oe(Xl,{key:0})):(v(),oe(Gl,{key:1}))],2)):se("",!0)])],16,Cp)),[[Z(zt),30]])]),_:2},[f.$slots.item?{name:"item",fn:ne(({item:x})=>[xe(f.$slots,"item",{item:x})]),key:"0"}:void 0]),1032,["modelValue","items","enable-haptic-feedback"]))}}),Mp=Object.freeze(Object.defineProperty({__proto__:null,default:rr},Symbol.toStringTag,{value:"Module"})),Ep={},Ip={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Op(e,t){return v(),z("svg",Ip,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z"},null,-1)])])}const Jl=ve(Ep,[["render",Op]]),$p=Object.freeze(Object.defineProperty({__proto__:null,default:Jl},Symbol.toStringTag,{value:"Module"})),zp={},Dp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Ap(e,t){return v(),z("svg",Dp,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z"},null,-1)])])}const Ql=ve(zp,[["render",Ap]]),jp=Object.freeze(Object.defineProperty({__proto__:null,default:Ql},Symbol.toStringTag,{value:"Module"})),Lp={key:0,class:"ml-auto inline-flex gap-[1px] scale-95 origin-right"},sr=pe({__name:"ChapterNav",props:{data:{type:Object},chapterSpec:{type:Object},touchDevice:{type:Boolean},rtl:{type:Boolean},transparent:{type:Boolean}},emits:["getHiddenChapters","prev","next"],setup(e,{emit:t}){const n=e,o=t;async function i(){const c=n.chapterSpec;if(!c)return;const{trigger:d,sel:f,label:p}=c;if(d&&(!f||!p)){await r(d);return}o("getHiddenChapters"),await gn(50,50,()=>n.data.chapters.length?!0:void 0)}async function r(c){const d=document.querySelector(c);d&&(d instanceof HTMLDialogElement?d.showModal():d.click())}function s(c,d){var f,p,x;(x=(p=(f=n.data)==null?void 0:f.chapters)==null?void 0:p[c])==null||x.select(u(d))}function l(c){n.rtl?o("next",u(c)):o("prev",u(c))}function a(c){n.rtl?o("prev",u(c)):o("next",u(c))}function u(c){return!n.touchDevice&&(c.ctrlKey||c.metaKey)}return(c,d)=>{var f;return v(),z(be,null,[B(rr,{modelValue:e.data.activeIndex,label:e.data.activeLabel,title:"Select chapter",transparent:e.transparent,items:e.data.chapters,"can-load-items":!!((f=e.chapterSpec)!=null&&f.trigger),"load-items":i,"enable-haptic-feedback":"",onSelect:s},{item:ne(({item:p})=>[Wt(He(p.label),1)]),_:1},8,["modelValue","label","transparent","items","can-load-items"]),e.data.next||e.data.prev?(v(),z("div",Lp,[B(Ge,{title:`${e.rtl?"Next":"Prev"} chapter (←)`,disabled:e.rtl?!e.data.next:!e.data.prev,transparent:e.transparent,class:"!rounded-r-none","enable-haptic-feedback":"",onClick:l},{default:ne(()=>[B(Jl)]),_:1},8,["title","disabled","transparent"]),B(Ge,{title:`${e.rtl?"Prev":"Next"} chapter (→)`,disabled:e.rtl?!e.data.prev:!e.data.next,transparent:e.transparent,class:"!rounded-l-none","enable-haptic-feedback":"",onClick:a},{default:ne(()=>[B(Ql)]),_:1},8,["title","disabled","transparent"])])):se("",!0)],64)}}}),Bp=Object.freeze(Object.defineProperty({__proto__:null,default:sr},Symbol.toStringTag,{value:"Module"})),Vp=["min","max","step"],Np={class:"flex-shrink-0 w-12 inline-block text-right"},en=ve(pe({__name:"InputPercentage",props:Ye({min:{type:Number},max:{type:Number},step:{type:Number},format:{type:Function}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue"),n=G({get(){return t.value},set(o){t.value=+o}});return(o,i)=>{var r;return v(),z("div",{class:"flex items-center gap-3 pl-1",style:Pe({"--percentage":`${(n.value-e.min)/(e.max-e.min)*100}%`})},[Ne(U("input",{"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s),type:"range",min:e.min,max:e.max,step:e.step??1,class:"flex-grow",onTouchmove:i[1]||(i[1]=Le(()=>{},["stop"]))},null,40,Vp),[[hd,n.value]]),U("span",Np,He(((r=e.format)==null?void 0:r.call(e,t.value))??t.value),1)],4)}}}),[["styles",["input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:linear-gradient(to right,#fb8252 var(--percentage),#5a5552 var(--percentage));border-radius:9999px;border-style:none;cursor:pointer;height:4px;opacity:.9;pointer-events:none;--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1));outline:2px solid transparent;outline-offset:2px}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none!important;border-radius:9999px;border-style:solid;border-width:2px;cursor:pointer;height:24px;pointer-events:auto;width:24px;--tw-border-opacity:1;border-color:rgb(251 130 82/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1));transition-duration:.2s}input[type=range]:hover{opacity:1}"]]]),Rp=Object.freeze(Object.defineProperty({__proto__:null,default:en},Symbol.toStringTag,{value:"Module"})),Hp={ref:"root",class:"flex text-sm flex-wrap gap-2 leading-none"},Fp=["onClick","onKeyup"],vt=pe({__name:"InputSelect",props:Ye({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=lt(e,"modelValue");function o(i){i!==n.value&&(n.value=i)}return(i,r)=>(v(),z("div",Hp,[(v(!0),z(be,null,Yt(t.items,(s,l)=>Ne((v(),z("div",{key:l,tabindex:"0",class:fe(["inline-flex justify-center items-center rounded-full px-3 py-1.5 cursor-pointer z-10 whitespace-nowrap flex-shrink-0 focus:outline-primary hover:bg-opacity-80 duration-200",{"bg-primary":l==n.value,"bg-stone-600 bg-opacity-50":l!=n.value}]),onClick:()=>o(l),onKeyup:[Fo(()=>o(l),["enter"]),Fo(()=>o(l),["space"])]},[Wt(He(s),1)],42,Fp)),[[Z(zt),30]])),128))],512))}}),Wp=Object.freeze(Object.defineProperty({__proto__:null,default:vt},Symbol.toStringTag,{value:"Module"})),qp={class:"flex w-full items-center justify-between cursor-pointer mb-5 last:mb-0"},Up={class:"text-sm py-1"},Kp={class:"switcher p-1"},lr=ve(pe({__name:"InputSwitcher",props:Ye({label:{type:String}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue");return(n,o)=>(v(),z("label",qp,[U("span",Up,He(e.label),1),U("div",Kp,[Ne(U("input",{"onUpdate:modelValue":o[0]||(o[0]=i=>t.value=i),type:"checkbox"},null,512),[[gd,t.value]]),o[1]||(o[1]=U("span",null,null,-1))])]))}}),[["styles",['.switcher{height:24px;position:relative;width:40px}.switcher input{height:0;opacity:0;width:0}.switcher input:checked+span{border-width:1px;--tw-border-opacity:1;border-color:rgb(184 92 56/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(184 92 56/var(--tw-bg-opacity,1))}.switcher input:checked+span:before{bottom:2px;height:18px;left:17.2px;width:18px}.switcher span{border-radius:9999px;border-width:2px;top:0;right:0;bottom:0;left:0;--tw-border-opacity:1;background-color:transparent;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.switcher span,.switcher span:before{position:absolute;transition-duration:.3s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.switcher span:before{border-radius:9999px;bottom:4px;content:"";height:12px;left:4px;width:12px;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}']]]),Zp=Object.freeze(Object.defineProperty({__proto__:null,default:lr},Symbol.toStringTag,{value:"Module"})),Yp={class:"flex-grow mb-5 last:mb-0"},Ae=pe({__name:"TableField",props:{label:{type:String},disabled:{type:Boolean}},setup(e){return(t,n)=>(v(),z(be,null,[U("div",{class:fe(["flex-shrink-0 mb-2 whitespace-nowrap text-sm",{"opacity-50":e.disabled}])},He(e.label),3),U("div",Yp,[xe(t.$slots,"default")])],64))}}),Xp=Object.freeze(Object.defineProperty({__proto__:null,default:Ae},Symbol.toStringTag,{value:"Module"})),ea=pe({__name:"FieldContrast",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue"),n=G({get(){return Math.round(t.value*100)},set(o){t.value=Math.round(o)/100}});return(o,i)=>(v(),oe(Ae,{label:"Contrast"},{default:ne(()=>[B(en,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),min:20,max:100,format:r=>`${r}%`},null,8,["modelValue","format"])]),_:1}))}}),Gp=Object.freeze(Object.defineProperty({__proto__:null,default:ea},Symbol.toStringTag,{value:"Module"})),Jp={},Qp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function eh(e,t){return v(),z("svg",Qp,[...t[0]||(t[0]=[U("path",{d:"M480 358.856V153.143C480 130.512 461.674 112 439.272 112H72.728C50.326 112 32 130.512 32 153.143v205.713C32 381.488 50.326 400 72.728 400h366.545C461.674 400 480 381.488 480 358.856zM112 364V148h288v216H112z",fill:"currentColor"},null,-1)])])}const ta=ve(Jp,[["render",eh]]),th=Object.freeze(Object.defineProperty({__proto__:null,default:ta},Symbol.toStringTag,{value:"Module"})),nh={},oh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function ih(e,t){return v(),z("svg",oh,[...t[0]||(t[0]=[U("path",{d:"M358.856 32H153.143C130.512 32 112 50.326 112 72.728v366.545C112 461.674 130.512 480 153.143 480h205.713C381.488 480 400 461.674 400 439.272V72.728C400 50.326 381.488 32 358.856 32zM364 400H148V112h216v288z",fill:"currentColor"},null,-1)])])}const na=ve(nh,[["render",ih]]),rh=Object.freeze(Object.defineProperty({__proto__:null,default:na},Symbol.toStringTag,{value:"Module"})),ar=pe({inheritAttrs:!1,__name:"ButtonOutline",emits:["click"],setup(e,{emit:t}){const n=t,o=Zo();function i(){o(),n("click")}return(r,s)=>Ne((v(),z("button",{class:fe([r.$attrs.class??"","flex focus:outline-none outline-none rounded-full h-10 justify-center items-center border border-solid border-stone-600 text-stone-200 hover:bg-stone-500 hover:bg-opacity-10 duration-200"]),onClick:i},[xe(r.$slots,"default")],2)),[[Z(zt),24]])}}),sh=Object.freeze(Object.defineProperty({__proto__:null,default:ar},Symbol.toStringTag,{value:"Module"}));var tn=(e=>(e[e.never=0]="never",e[e.move=1]="move",e[e.firstMove=2]="firstMove",e[e.onLoad=3]="onLoad",e))(tn||{}),nt=(e=>(e[e.vertical=0]="vertical",e[e.ltr=1]="ltr",e[e.rtl=2]="rtl",e))(nt||{});const cr=[{name:"System",value:"system-ui, sans-serif"},{name:"Charter",value:'Charter, "Times New Roman", serif'},{name:"Georgia",value:"Georgia, serif"}],oa=pe({__name:"FieldFontFamily",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue"),n=G({get(){const o=cr.findIndex(i=>i.value===t.value);return o===-1?0:o},set(o){t.value=cr[o].value}});return(o,i)=>(v(),oe(Ae,{label:"Font family"},{default:ne(()=>[B(vt,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),items:Z(cr).map(r=>r.name)},null,8,["modelValue","items"])]),_:1}))}}),lh=Object.freeze(Object.defineProperty({__proto__:null,default:oa},Symbol.toStringTag,{value:"Module"}));function ah(e){if(e)try{return JSON.parse(e)}catch{return}}function ch(){const{width:e,height:t}=hn();return G(()=>e.value>t.value)}function ia(e){return String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}var Dt=(e=>(e[e.longStrip=0]="longStrip",e[e.single=1]="single",e[e.double=2]="double",e))(Dt||{});const Xo=.25,Go=5,ur=.25,Jo=.2,Qo=5,uh=.05,dh=0,fh=5;function ph(e){var g,I,q,K,R,Q;const n=e.touchDevice&&(window.innerHeight<=600||window.innerWidth<=600)?ch():void 0,{titleName:o,isWebtoon:i}=e,r=o?ia(o):location.hostname,s=ee(hh(`tkr:${r}`)),l=H=>{s.value=H;const T=`tkr:${r}`;!H||!Object.keys(H).length?localStorage.removeItem(T):localStorage.setItem(T,JSON.stringify(H))},a=H=>{if(!s.value){l(H);return}const T={...s.value};Object.entries(H).forEach(([Y,S])=>{S===void 0?delete T[Y]:T[Y]=S}),l(T)},u=ee((g=s.value)==null?void 0:g.style),c=ee((I=s.value)==null?void 0:I.direction),d=ee((q=s.value)==null?void 0:q.gap),f=ee((K=s.value)==null?void 0:K.speed),p=ee((R=s.value)==null?void 0:R.zoom),x=ee(((Q=s.value)==null?void 0:Q.breakFirst)??!1),_=G({get(){if(i.value)return Dt.longStrip;if(u.value!==void 0)return u.value;const{landscapeStyle:H,readerStyle:T}=e.defaultPreferences.value;return n!=null&&n.value?H??T:T},set:H=>{if(u.value===H)return;const T=_.value===Dt.longStrip,Y=H===Dt.longStrip;u.value=H,a({style:H}),T!==Y&&(D.value=Y?nt.vertical:nt.rtl)}}),D=G({get(){if(i.value)return nt.vertical;if(c.value!==void 0)return c.value;const{direction:H,landscapeDirection:T}=e.defaultPreferences.value;return n!=null&&n.value?T??H:H},set:H=>{c.value=H,a({direction:H})}}),b=G({get:()=>d.value??e.defaultPreferences.value.gap,set(H){d.value=H,a({gap:H})}}),P=G({get:()=>f.value??e.defaultPreferences.value.speed,set(H){f.value=H,a({speed:H===1?void 0:H})}}),A=G({get:()=>p.value??1,set(H){p.value=H,a({zoom:H===1?void 0:H})}}),w=G({get:()=>x.value,set(H){x.value=H,a({breakFirst:H?!0:void 0})}});return{direction:D,style:_,gap:b,speed:P,zoom:A,isLongStrip:G(()=>_.value===Dt.longStrip),isDouble:G(()=>_.value===Dt.double),isRTL:G(()=>D.value===nt.rtl),isVertical:G(()=>D.value===nt.vertical),breakFirst:w}}function hh(e){const t=localStorage.getItem(e),n=ah(t||void 0),o={};return n?(n.style!==void 0&&Object.values(Dt).includes(n.style)&&(o.style=n.style),n.direction!==void 0&&Object.values(nt).includes(n.direction)&&(o.direction=n.direction),n.gap!==void 0&&n.gap>=dh&&n.gap<=fh&&(o.gap=n.gap),n.speed!==void 0&&n.speed>=Xo&&n.speed<=Go&&(o.speed=n.speed),n.zoom!==void 0&&n.zoom>=Jo&&n.zoom<=Qo&&(o.zoom=n.zoom),n.breakFirst===!0&&(o.breakFirst=!0),Object.keys(o).length?o:void 0):o}const dr=pe({__name:"NovelPreferencesForm",props:Ye({enableReset:{type:Boolean},defaultPreferences:{type:Object}},{modelValue:{required:!0},modelModifiers:{}}),emits:Ye(["reset"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=lt(e,"modelValue"),r=G(()=>Object.keys(i.value).some(l=>{var a;return i.value[l]!==((a=n.defaultPreferences)==null?void 0:a[l])}));function s(l){i.value={...i.value,...l}}return(l,a)=>(v(),z(be,null,[B(oa,{"model-value":i.value.fontFamily,"onUpdate:modelValue":a[0]||(a[0]=u=>s({fontFamily:u}))},null,8,["model-value"]),B(Ae,{label:"Text size"},{default:ne(()=>[B(en,{"model-value":i.value.fontSize,min:10,max:48,"onUpdate:modelValue":a[1]||(a[1]=u=>s({fontSize:u,lineHeight:Math.max(i.value.lineHeight,u)}))},null,8,["model-value"])]),_:1}),B(Ae,{label:"Line height"},{default:ne(()=>[B(en,{"model-value":i.value.lineHeight,min:10,max:96,step:1,"onUpdate:modelValue":a[2]||(a[2]=u=>s({lineHeight:u,fontSize:Math.min(i.value.fontSize,u)}))},null,8,["model-value"])]),_:1}),B(Ae,{label:"Play speed"},{default:ne(()=>[B(en,{"model-value":i.value.speed,min:Z(Xo),max:Z(Go),step:Z(ur),format:u=>`${u.toFixed(2)}x`,"onUpdate:modelValue":a[3]||(a[3]=u=>s({speed:u}))},null,8,["model-value","min","max","step","format"])]),_:1}),e.enableReset?(v(),z("div",{key:0,class:fe(["w-full flex justify-center pt-1 duration-200",{"pointer-events-none opacity-0":!r.value,"opacity-90":r.value}])},[B(ar,{class:"w-2/3",onClick:a[4]||(a[4]=()=>o("reset"))},{default:ne(()=>[...a[5]||(a[5]=[Wt(" Reset to default ",-1)])]),_:1})],2)):se("",!0)],64))}}),gh=Object.freeze(Object.defineProperty({__proto__:null,default:dr},Symbol.toStringTag,{value:"Module"})),mh={key:1,class:"mb-3 border-stone-500 border-opacity-70"},vh={key:2,class:"flex justify-end"},bh={class:"h-6 border border-stone-500 rounded-md cursor-pointer flex items-center"},yh={key:3,class:"mt-5 mb-3 border-stone-500 border-opacity-70"},fr=pe({__name:"DefaultPreferencesForm",props:Ye({touchDevice:{type:Boolean},isNovel:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=lt(e,"modelValue"),o=ee(!1),i=ee(!1);je(()=>{o.value=t.touchDevice&&(window.innerHeight<=600||window.innerWidth<=600)});function r(l){const a=i.value,c=(a?n.value.landscapeStyle??n.value.readerStyle:n.value.readerStyle)!==Dt.longStrip,d=l!==Dt.longStrip;if(c===d)s(a?{landscapeStyle:l}:{readerStyle:l});else{const f=d?nt.rtl:nt.vertical;s(a?{landscapeStyle:l,landscapeDirection:f}:{readerStyle:l,direction:f})}}function s(l){n.value={...n.value,...l}}return(l,a)=>(v(),z(be,null,[e.isNovel?(v(),z(be,{key:0},[B(dr,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=u=>n.value=u)},null,8,["modelValue"]),B(ea,{"model-value":n.value.contrast,"onUpdate:modelValue":a[1]||(a[1]=u=>s({contrast:u}))},null,8,["model-value"])],64)):(v(),z(be,{key:1},[B(lr,{"model-value":n.value.autoPlay===!0,label:"Auto play in long strip","onUpdate:modelValue":a[2]||(a[2]=u=>s({autoPlay:u}))},null,8,["model-value"]),e.touchDevice?(v(),oe(lr,{key:0,"model-value":n.value.pinchToZoom!==!1,label:"Pinch to zoom","onUpdate:modelValue":a[3]||(a[3]=u=>s({pinchToZoom:u}))},null,8,["model-value"])):se("",!0),o.value?(v(),z("hr",mh)):se("",!0),o.value?(v(),z("div",vh,[U("div",bh,[Ne((v(),z("button",{class:fe(["focus:outline-none outline-none h-full flex justify-center items-center px-3 py-0.5 rounded-l-sm",{"bg-stone-500 text-stone-50":!i.value,"text-stone-400":i.value}]),onClick:a[4]||(a[4]=()=>i.value=!1)},[B(na)],2)),[[Z(zt),24]]),Ne((v(),z("button",{class:fe(["focus:outline-none outline-none h-full flex justify-center items-center px-3 py-0.5 rounded-r-sm",{"bg-stone-500 text-stone-50":i.value,"text-stone-400":!i.value}]),onClick:a[5]||(a[5]=()=>i.value=!0)},[B(ta)],2)),[[Z(zt),24]])])])):se("",!0),B(Ae,{label:"Style"},{default:ne(()=>[B(vt,{"model-value":i.value?n.value.landscapeStyle??n.value.readerStyle:n.value.readerStyle,items:["Long strip","Single page","Double page"],"onUpdate:modelValue":r},null,8,["model-value"])]),_:1}),B(Ae,{label:"Direction"},{default:ne(()=>[B(vt,{"model-value":i.value?n.value.landscapeDirection??n.value.direction:n.value.direction,items:["Vertical","Left to right","Right to left"],"onUpdate:modelValue":a[6]||(a[6]=u=>s(i.value?{landscapeDirection:u}:{direction:u}))},null,8,["model-value"])]),_:1}),o.value?(v(),z("hr",yh)):se("",!0),B(Ae,{label:"Gap size"},{default:ne(()=>[B(vt,{"model-value":n.value.gap,items:["None","1px","2px","3px","4px","5px"],"onUpdate:modelValue":a[7]||(a[7]=u=>s({gap:u}))},null,8,["model-value"])]),_:1})],64)),B(Ae,{label:"Progress size"},{default:ne(()=>[B(vt,{"model-value":n.value.progressSize/2,items:["None","2px","4px","6px","8px","10px"],"onUpdate:modelValue":a[8]||(a[8]=u=>s({progressSize:u*2}))},null,8,["model-value"])]),_:1}),B(Ae,{label:"Auto next"},{default:ne(()=>[B(vt,{"model-value":n.value.autoNextSeconds,items:["None","1 sec","2 sec","3 sec","4 sec","5 sec"],"onUpdate:modelValue":a[9]||(a[9]=u=>s({autoNextSeconds:u}))},null,8,["model-value"])]),_:1}),B(Ae,{label:"Hide controls"},{default:ne(()=>[B(vt,{"model-value":n.value.hideControlsEvent,items:["Never","On move","On first move","On load"],"onUpdate:modelValue":a[10]||(a[10]=u=>s({hideControlsEvent:u}))},null,8,["model-value"])]),_:1}),e.isNovel?se("",!0):(v(),z(be,{key:2},[B(Ae,{label:"Play speed"},{default:ne(()=>[B(en,{"model-value":n.value.speed,min:Z(Xo),max:Z(Go),step:Z(ur),format:u=>`${u.toFixed(2)}x`,"onUpdate:modelValue":a[11]||(a[11]=u=>s({speed:u}))},null,8,["model-value","min","max","step","format"])]),_:1}),B(Ae,{label:e.touchDevice?"Tap zones":"Click zones"},{default:ne(()=>[B(vt,{"model-value":(n.value.tapZone??-1)+1,items:["Default","None","L shaped","Kindle-ish","Edge","Right and left"],"onUpdate:modelValue":a[12]||(a[12]=u=>s({tapZone:u===0?void 0:u-1}))},null,8,["model-value"])]),_:1},8,["label"])],64))],64))}}),wh=Object.freeze(Object.defineProperty({__proto__:null,default:fr},Symbol.toStringTag,{value:"Module"})),xh={},_h={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Sh(e,t){return v(),z("svg",_h,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M11.3 19.3q-.275-.275-.288-.7t.263-.7l4.9-4.9H5q-.425 0-.713-.288T4 12q0-.425.288-.713T5 11h11.175l-4.9-4.9q-.275-.275-.263-.7t.288-.7q.275-.275.7-.275t.7.275l6.6 6.6q.15.125.213.313t.062.387q0 .2-.062.375t-.213.325l-6.6 6.6q-.275.275-.7.275t-.7-.275Z"},null,-1)])])}const Jn=ve(xh,[["render",Sh]]),kh=Object.freeze(Object.defineProperty({__proto__:null,default:Jn},Symbol.toStringTag,{value:"Module"}));var pr=(e=>(e[e.none=0]="none",e[e.lShape=1]="lShape",e[e.kindleIsh=2]="kindleIsh",e[e.edge=3]="edge",e[e.rightAndLeft=4]="rightAndLeft",e))(pr||{});const ra={0:{prevZones:[],nextZones:[]},1:{prevZones:[0,1,2,3],nextZones:[8,7,6,5]},2:{prevZones:[6,3],nextZones:[8,7,5,4]},3:{prevZones:[7],nextZones:[5,0,2,3,6,8]},4:{prevZones:[3,0,6],nextZones:[5,2,8]}},sa=pe({__name:"TapZonePreview",props:{tapZone:{type:Number},direction:{type:Number}},setup(e){const t=e,{width:n,height:o}=hn(),i=G(()=>Math.min(1.25,Math.max(.75,Math.round(n.value/o.value*100)/100))),r=G(()=>i.value>=1),s=G(()=>t.direction===nt.vertical),l=G(()=>t.direction===nt.rtl),a=G(()=>{if(!t.tapZone)return;const{prevZones:u,nextZones:c}=ra[t.tapZone];return Array.from({length:9},(d,f)=>{const p=u.includes(f),x=!p&&c.includes(f);return{isPrev:p,isNext:x,hasArrow:f===u[0]||f===c[0]}})});return(u,c)=>(v(),z("div",{class:fe(["p-2 bg-black bg-opacity-40 rounded-2xl",{"w-28":r.value,"h-28":!r.value}]),style:Pe({"aspect-ratio":i.value})},[e.tapZone===Z(pr).none?(v(),z("div",{key:0,class:fe(["inline-block absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-14 h-14",{"rotate-90":e.direction===Z(nt).vertical,"rotate-180":e.direction===Z(nt).rtl}])},[B(Jn)],2)):a.value?(v(),z("div",{key:2,class:fe(["w-full h-full overflow-hidden rounded-xl flex flex-wrap",{"flex-row-reverse":l.value}])},[(v(!0),z(be,null,Yt(a.value,(d,f)=>(v(),z("div",{key:`zone-${f}`,class:fe(["w-1/3 h-1/3 flex justify-center items-center p-0.5",{"bg-stone-100":d.isPrev||d.isNext,"bg-opacity-50":d.isPrev}])},[d.hasArrow?(v(),z("span",{key:0,class:"w-5 h-5 max-w-full max-h-full inline-block transform text-stone-800",style:Pe({transform:`rotate(${s.value?d.isNext?90:-90:(l.value?d.isPrev:d.isNext)?0:180}deg)`})},[B(Jn)],4)):se("",!0)],2))),128))],2)):(v(),z("div",{key:1,class:fe(["w-full h-full overflow-hidden rounded-xl flex flex-nowrap",{"flex-col":s.value}])},[U("div",{class:fe(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":!l.value}])},[U("span",{class:fe(["w-5 h-5 inline-block transform text-stone-800",{"-rotate-90":s.value,"rotate-180":!s.value}])},[B(Jn)],2)],2),c[0]||(c[0]=U("div",{class:"flex-grow w-full h-full"},null,-1)),c[1]||(c[1]=U("div",{class:"flex-grow w-full h-full"},null,-1)),U("div",{class:fe(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":l.value}])},[U("span",{class:fe(["w-5 h-5 inline-block text-stone-800",{"transform rotate-90":s.value}])},[B(Jn)],2)],2)],2))],6))}}),Ch=Object.freeze(Object.defineProperty({__proto__:null,default:sa},Symbol.toStringTag,{value:"Module"})),Th={key:0,class:"inline-block fixed z-50 left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none"},la=pe({__name:"DirectionToast",props:{direction:{type:Number},tapZone:{type:Number}},setup(e){const t=e,n=sessionStorage.getItem("tk:dir"),o=ee(typeof n!="string"||+n!==t.direction),i=ct(()=>o.value=!1,1500);ue(()=>[t.direction,t.tapZone],()=>{r(),o.value=!0,i()}),je(()=>{r(),i();let s;ue(Zi(),a=>{a!=="visible"?s=Date.now():Date.now()-s>7e3&&(o.value=!0,i())})});function r(){sessionStorage.setItem("tk:dir",t.direction+"")}return(s,l)=>(v(),oe(Vo,{name:"slow-fade","enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ne(()=>[o.value?(v(),z("div",Th,[B(sa,{direction:e.direction,"tap-zone":e.tapZone},null,8,["direction","tap-zone"])])):se("",!0)]),_:1}))}}),Ph=Object.freeze(Object.defineProperty({__proto__:null,default:la},Symbol.toStringTag,{value:"Module"})),Mh={class:"flex justify-between items-end"},Eh={class:"fixed pointer-events-none left-0 right-0 bottom-0"},aa=pe({__name:"GearControlsLayout",props:{visible:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(v(),z("div",{id:"controls",class:fe(["fixed pointer-events-none cursor-auto left-0 top-0 w-full h-full flex flex-col justify-between p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3 z-20",{"opacity-100 z-20":e.visible,"opacity-0 -z-10":!e.visible}])},[xe(t.$slots,"default"),U("div",{class:fe(["flex gap-1 items-center relative z-30 flex-shrink-0 2xs:gap-3",{"children-pointer-events-auto":e.visible}]),style:Pe({paddingTop:`${e.spaceTop||0}px`})},[xe(t.$slots,"top")],6),U("div",Mh,[U("div",{class:fe(["inline-block",{"children-pointer-events-auto":e.visible}])},[xe(t.$slots,"bottom-left")],2),U("div",{class:fe(["inline-flex flex-col items-end gap-4",{"children-pointer-events-auto":e.visible}])},[xe(t.$slots,"bottom-right")],2)]),U("div",Eh,[xe(t.$slots,"progress")])],2))}}),Ih=Object.freeze(Object.defineProperty({__proto__:null,default:aa},Symbol.toStringTag,{value:"Module"})),Oh='.loading-indicator{display:inline-block;height:80px;position:relative;width:80px}.loading-indicator:after,.loading-indicator:before{border-radius:9999px;border-style:solid;border-width:4px;box-sizing:border-box;display:block;position:absolute;--tw-border-opacity:1;animation:lds-ripple 1s cubic-bezier(0,.2,.8,1) infinite;border-color:rgb(184 92 56/var(--tw-border-opacity,1));content:"";opacity:1}.loading-indicator:after{animation-delay:-.5s}@keyframes lds-ripple{0%{height:0;left:40px;opacity:0;top:40px;width:0}4.9%{height:8px;left:36px;opacity:0;top:36px;width:8px}5%{height:8px;left:36px;opacity:1;top:36px;width:8px}to{height:80px;left:0;opacity:0;top:0;width:80px}}',$h={},zh={class:"loading-indicator"};function Dh(e,t){return v(),z("div",zh)}const ei=ve($h,[["render",Dh],["styles",[Oh]]]),Ah=Object.freeze(Object.defineProperty({__proto__:null,default:ei},Symbol.toStringTag,{value:"Module"})),jh={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},Lh={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},hr=ve(pe({inheritAttrs:!1,__name:"GearLayout",props:{loading:{type:Boolean},immediate:{type:Boolean},idle:{type:Boolean},style:{type:Object}},setup(e,{expose:t}){const n={mounted:i=>i.isConnected&&!i.open&&i.showModal(),beforeUnmount:i=>i.isConnected&&i.open&&i.close()},o=ee(null);return t({rootEl:o}),(i,r)=>Ne((v(),z("dialog",jh,[U("div",{ref_key:"rootEl",ref:o,id:"gear-layout",class:fe({"cursor-none":e.idle,"cursor-default":!e.idle,"bg-black":e.immediate||!e.loading,"opacity-0":!e.immediate&&e.loading,"duration-200 transition-colors":!e.immediate,[`${i.$attrs.class??""}`]:!0}),style:Pe(e.style??{})},[e.loading&&e.immediate?(v(),z("div",Lh,[B(ei)])):se("",!0),xe(i.$slots,"default")],6)])),[[n]])}}),[["styles",["#gear-layout{direction:ltr;font-family:Helvetica,sans-serif;font-size:16px;font-weight:400;height:100%;line-height:24px;overflow:hidden;overscroll-behavior:contain;pointer-events:auto;text-align:left;width:100%}"]]]),Bh=Object.freeze(Object.defineProperty({__proto__:null,default:hr},Symbol.toStringTag,{value:"Module"})),Vh={},Nh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 56"};function Rh(e,t){return v(),z("svg",Nh,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M29.84 49.574h12.398c4.899 0 7.336-2.437 7.336-7.265V13.69c0-4.828-2.437-7.265-7.336-7.265H29.84Zm-16.055 0h12.398V6.426H13.785c-4.875 0-7.36 2.414-7.36 7.265V42.31c0 4.851 2.485 7.265 7.36 7.265"},null,-1)])])}const ca=ve(Vh,[["render",Rh]]),Hh=Object.freeze(Object.defineProperty({__proto__:null,default:ca},Symbol.toStringTag,{value:"Module"})),Fh={},Wh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function qh(e,t){return v(),z("svg",Wh,[...t[0]||(t[0]=[U("g",{fill:"none"},[U("path",{d:"M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),U("path",{fill:"currentColor",d:"M8 3v18H5a2 2 0 0 1-1.995-1.85L3 19V5a2 2 0 0 1 1.85-1.995L5 3zm11 0a2 2 0 0 1 1.995 1.85L21 5v14a2 2 0 0 1-1.85 1.995L19 21h-9V3z"})],-1)])])}const ua=ve(Fh,[["render",qh]]),Uh=Object.freeze(Object.defineProperty({__proto__:null,default:ua},Symbol.toStringTag,{value:"Module"})),da=pe({__name:"MangaPreferencesForm",props:{direction:{type:Number},readerStyle:{type:Number},gap:{type:Number},speed:{type:Number},zoom:{type:Number},webtoon:{type:Boolean},defaultPreferences:{type:Object},enableReset:{type:Boolean}},emits:["update:reader-style","update:direction","update:gap","update:speed","update:zoom"],setup(e,{emit:t}){const n=e,o=t,i=G(()=>["Long strip",n.webtoon?void 0:"Single page",n.webtoon?void 0:"Double page"].filter(Boolean)),r=G(()=>{const a=n.defaultPreferences;return!n.webtoon&&n.readerStyle!==a.readerStyle||!n.webtoon&&n.direction!==a.direction||n.gap!==a.gap||n.speed!==a.speed});function s(a){o("update:zoom",Math.round(a)/100)}function l(){o("update:reader-style",void 0),o("update:direction",void 0),o("update:gap",void 0),o("update:speed",void 0)}return(a,u)=>(v(),z(be,null,[B(Ae,{label:"Style"},{default:ne(()=>[B(vt,{"model-value":e.readerStyle,items:i.value,"onUpdate:modelValue":u[0]||(u[0]=c=>o("update:reader-style",c))},null,8,["model-value","items"])]),_:1}),B(Ae,{label:"Direction"},{default:ne(()=>[B(vt,{"model-value":e.direction,items:e.webtoon?["Vertical"]:["Vertical","Left to right","Right to left"],"onUpdate:modelValue":u[1]||(u[1]=c=>o("update:direction",c))},null,8,["model-value","items"])]),_:1}),B(Ae,{label:"Gap size"},{default:ne(()=>[B(vt,{"model-value":e.gap,items:["None","1px","2px","3px","4px","5px"],"onUpdate:modelValue":u[2]||(u[2]=c=>o("update:gap",c))},null,8,["model-value"])]),_:1}),B(Ae,{label:"Play speed"},{default:ne(()=>[B(en,{"model-value":e.speed,min:Z(Xo),max:Z(Go),step:Z(ur),format:c=>`${c.toFixed(2)}x`,"onUpdate:modelValue":u[3]||(u[3]=c=>o("update:speed",c))},null,8,["model-value","min","max","step","format"])]),_:1}),B(Ae,{label:"Zoom"},{default:ne(()=>[B(en,{"model-value":Math.ceil(e.zoom*100),min:Z(Jo)*100,max:Z(Qo)*100,step:Z(uh)*100,format:c=>`${Math.ceil(c)}%`,"onUpdate:modelValue":s},null,8,["model-value","min","max","step","format"])]),_:1}),e.enableReset?(v(),z("div",{key:0,class:fe(["w-full flex justify-center pt-1 duration-200",{"pointer-events-none opacity-0":!r.value,"opacity-90":r.value}])},[B(ar,{class:"w-2/3",onClick:l},{default:ne(()=>[...u[4]||(u[4]=[Wt(" Reset to default ",-1)])]),_:1})],2)):se("",!0)],64))}}),Kh=Object.freeze(Object.defineProperty({__proto__:null,default:da},Symbol.toStringTag,{value:"Module"})),fa=pe({__name:"PageNav",props:Ye({disabled:{type:Boolean},pages:{type:Array},totalImgs:{type:Number}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=lt(e,"modelValue"),o=G(()=>t.pages.map(a=>a.map(({index:u})=>`${u+1}`).join("-"))),i=G(()=>{const a=n.value,u=t.pages.findIndex(c=>c.some(({index:d})=>d===a));return u===-1?t.pages.length-1:u}),r=G(()=>t.pages.length?`${o.value[i.value]}/${t.totalImgs}`:"--");function s(a){const u=t.pages[a][0].index;l(u)}function l(a){n.value=a}return(a,u)=>(v(),oe(rr,{"model-value":i.value,label:r.value,title:"Current page",items:o.value,disabled:e.disabled,"onUpdate:modelValue":s},null,8,["model-value","label","items","disabled"]))}}),Zh=Object.freeze(Object.defineProperty({__proto__:null,default:fa},Symbol.toStringTag,{value:"Module"})),gr=ve(pe({__name:"PauseToast",props:{playing:{type:Boolean}},setup(e){const t=e,n=ee(0);return ue(()=>t.playing,()=>{n.value=Date.now()}),(o,i)=>n.value?(v(),z("div",{key:n.value,class:"animate-pause-fade fixed left-1/2 top-1/2 -mx-12 -my-12 pointer-events-none w-24 h-24 p-4 bg-black bg-opacity-40 rounded-full duration-500"},[e.playing?(v(),oe(tr,{key:0})):(v(),oe(er,{key:1}))])):se("",!0)}}),[["styles",[".animate-pause-fade{animation:pause-fade .4s linear forwards;transform-origin:center}@keyframes pause-fade{0%{opacity:0;transform:scale(.3)}10%{opacity:1;transform:scale(.35)}55%{opacity:1;transform:scale(.65)}to{opacity:0;transform:scale(1)}}"]]]),Yh=Object.freeze(Object.defineProperty({__proto__:null,default:gr},Symbol.toStringTag,{value:"Module"})),Xh=30,mr=ve(pe({__name:"ProgressBar",props:{value:{type:Number},total:{type:Number},longStrip:{type:Boolean},height:{type:Number},rtl:{type:Boolean},opacity:{type:Number}},setup(e){const t=e,n=G(()=>Math.floor(t.value)+1),o=G(()=>`${Math.max(2,Math.min(10,t.height))}px`),i=hn().width,r=G(()=>t.total!==void 0&&i.value/t.total>=Xh);return(s,l)=>(v(),z("div",{class:fe(["rprog",{"rprog--rtl":e.rtl}]),style:Pe({height:o.value,opacity:e.opacity??.8})},[r.value?(v(!0),z(be,{key:0},Yt(e.total,a=>(v(),z("span",{key:a,class:fe(["rprog__item",{"rprog__item--active":n.value===a}]),style:Pe(!e.longStrip||n.value!==a?{}:{"--portion":`${e.value%1*100}%`})},null,6))),128)):(v(),z("div",{key:1,style:Pe({width:`${e.value/(e.total??1)*100}%`}),class:"h-full bg-textPrimary"},null,4))],6))}}),[["styles",['.rprog{--portion:100%;display:flex;width:100%}.rprog--rtl,.rprog--rtl .rprog__item{flex-direction:row-reverse}.rprog__item{display:inline-flex;flex-grow:1;flex-shrink:0;height:100%}.rprog__item:first-child:before{display:none}.rprog__item--active:before,.rprog__item:has(~.rprog__item--active):before{background-color:rgb(0 0 0/var(--tw-bg-opacity,1));content:"";display:block;flex-shrink:0;height:100%;width:1px;--tw-bg-opacity:.25}.rprog__item--active:after,.rprog__item:has(~.rprog__item--active):after{content:"";display:block;height:100%;--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1));width:var(--portion)}']]]),Gh=Object.freeze(Object.defineProperty({__proto__:null,default:mr},Symbol.toStringTag,{value:"Module"})),pa=pe({__name:"GesturesContainer",props:{spaceTop:{type:Number},controlsVisible:{type:Boolean},zoom:{type:Number},zooming:{type:Boolean},pinchToZoome:{type:Boolean},tapZone:{type:Number},pageIndex:{type:Number},playController:{type:Object},rtl:{type:Boolean},horizontal:{type:Boolean},longStrip:{type:Boolean},touchDevice:{type:Boolean},busy:{type:Boolean}},emits:["update:zoom","update:zooming","dragEnd","click","prev","next"],setup(e,{expose:t,emit:n}){const o=e,i=n,r=ee(null),s=ee(Math.min(Qo,Math.max(Jo,o.zoom))),l=ee(!1),a=ee(!1),u={isZoomIn:!1,isZoomOut:!1,initial:void 0};t({rootEl:r}),ue(()=>o.zoom,k=>F(k)),je(()=>{o.touchDevice?St(r,"touchstart",b):(St(r,"mousedown",p),St(window,"wheel",q))}),$t({onKeyDown:k=>{var y;if(!o.busy&&((y=r.value)==null||y.focus(),!(k.key==="Meta"||k.key==="Control")&&(k.ctrlKey||k.metaKey)))switch(k.key){case"0":F(1);break;case"-":F(s.value-.2),k.preventDefault();break;case"=":case"+":F(s.value+.2),k.preventDefault();break}},onKeyUp:k=>{o.zooming&&!(k.ctrlKey||k.metaKey)&&Y()}});function c(k){a.value!==k&&(a.value=k,k?o.playController.pause():(i("dragEnd"),o.playController.resume()))}let d={x:0,y:0},f={x:0,y:0};function p(k){if(k.button!==0)return;const y=r.value;y&&(d={x:k.clientX,y:k.clientY},f={x:y.scrollLeft,y:y.scrollTop},window.addEventListener("mousemove",x),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",x),setTimeout(()=>c(!1))},{once:!0}),k.preventDefault(),k.stopPropagation())}function x(k){const y=k.clientX-d.x,O=k.clientY-d.y;if(!a.value&&Math.abs(y)<.5&&Math.abs(O)<.5)return;c(!0);const $=r.value;$&&($.scrollLeft=f.x-y,$.scrollTop=f.y-O)}let _={distance:0,zoom:s.value,x:0,y:0},D=!1;function b(k){o.busy||(D=o.pinchToZoome&&k.touches.length===2,D&&(i("update:zooming",!0),c(!0),k.stopPropagation(),k.preventDefault(),_={distance:K(k),zoom:s.value,x:(k.touches[0].clientX+k.touches[1].clientX)/2,y:(k.touches[0].clientY+k.touches[1].clientY)/2}),(D||o.longStrip&&o.playController.isPlaying.value)&&window.addEventListener("touchend",P,{once:!0}))}function P(){var $;if(D=!1,o.zooming){c(!1),Y();return}if(!a.value)return;const k=ct(()=>{var le;c(!1),(le=r.value)==null||le.removeEventListener("scroll",O)},200),y=setTimeout(k,200);($=r.value)==null||$.addEventListener("scroll",O);function O(){clearTimeout(y),k()}}function A(k){if(!D&&!(o.longStrip&&o.playController.isPlaying.value)||(c(!0),!o.zooming)||(k.stopPropagation(),k.preventDefault(),k.touches.length<2))return;const O=K(k)/_.distance;J(Math.ceil(O*_.zoom*100)/100,_)}const w=ct(()=>l.value=!1,100);let g=!1;const I=ct(()=>{g=!1},30);function q(k){if(o.busy)return;let y=o.zooming;if(g||(g=!0,y=k.ctrlKey||k.metaKey,y&&i("update:zooming",!0)),I(),y){k.stopPropagation(),k.preventDefault();const O=Math.ceil((s.value+k.deltaY*-.01)*100)/100;J(O,{x:k.clientX,y:k.clientY});return}o.horizontal&&(l.value||(l.value=!0),w(),k.deltaY&&(r.value&&(r.value.scrollLeft+=k.deltaY*(o.rtl?-1:1)),k.stopPropagation()))}function K(k){return Math.hypot(k.touches[0].clientX-k.touches[1].clientX,k.touches[0].clientY-k.touches[1].clientY)}const R={x:0,y:0,ts:0};function Q(k){if(a.value||o.zooming)return;const y=r.value;if(!y||H(y,k)||(i("click"),o.playController.isPlaying.value))return;const{clientX:O,clientY:$}=k,{x:le,y:ae,ts:me}=R;R.x=O,R.y=$,R.ts=new Date().getTime();const ge=R.ts-me;ge>250||ge<10||Math.abs(le-O)>40||Math.abs(ae-$)>40||(R.ts=0,R.x=0,R.y=0,T(O,$))}function H(k,y){if(o.playController.isPlaying.value)return!1;const O=o.tapZone;if(O===pr.none)return!1;const $=o.controlsVisible?o.spaceTop:0,le=k.clientHeight-$,ae=Math.max(0,y.clientY-$),me=o.horizontal?k.clientWidth:le;let ge=!1,Se=!1;if(O){const{prevZones:De,nextZones:Ke}=ra[o.tapZone],ut=Math.floor(ae/le*3);let Qe=Math.floor(y.clientX/k.clientWidth*3);o.rtl&&(Qe=2-Qe);const ze=ut*3+Qe;ge=De.includes(ze),Se=!ge&&Ke.includes(ze)}else{const Ke=(o.horizontal?o.rtl?me-y.clientX:y.clientX:ae)/me,ut=o.horizontal?.2:.15;ge=Ke<=ut&&o.pageIndex>0,Se=!ge&&Ke>=1-ut}if(!ge&&!Se)return!1;if(o.longStrip){const De=(ge?-1:1)*.75*me;o.horizontal?k.scrollLeft=k.scrollLeft+(o.rtl?-1:1)*De:k.scrollTop=Math.max(0,k.scrollTop+De)}else ge?i("prev"):Se&&i("next");return!0}async function T(k,y){const O=s.value===1?2:1;await F(O,{x:k,y}),Y()}function Y(){i("update:zooming",!1),u.initial=void 0,u.isZoomIn=!1,u.isZoomOut=!1}function S(){if(u.initial)return;const k=r.value;if(!k)return;const y=k.querySelector(`[data-index="${o.pageIndex}"],[data-index2="${o.pageIndex}"]`)??void 0;y&&(u.initial={el:y,rect:y.getBoundingClientRect()})}function J(k,y){if(u.isZoomIn=u.isZoomIn||!u.isZoomOut&&k>1,u.isZoomIn&&k<1){F(1,y);return}if(u.isZoomOut=u.isZoomOut||!u.isZoomIn&&k<1,u.isZoomOut&&k>1){F(1,y);return}F(k,y)}async function F(k,y){const O=r.value,$=Math.min(Qo,Math.max(Jo,k));if(!O||s.value===$)return;S();const{initial:le}=u;if(!le)return;const ae=(y==null?void 0:y.x)??O.clientWidth/2,me=(y==null?void 0:y.y)??O.clientHeight/2;s.value=$,i("update:zoom",$),await gt();const{el:ge,rect:Se}=le,De=ge.offsetWidth/Se.width,Ke=ge.offsetHeight/Se.height;O.scrollLeft=ge.offsetLeft-Se.left*De+ae*(De-1),O.scrollTop=ge.offsetTop-Se.top*Ke+me*(Ke-1)}return(k,y)=>(v(),z("div",{ref_key:"rootEl",ref:r,tabindex:"0",class:fe(["w-full h-full overflow-auto scrollbar-none overscroll-contain scrollbar-none focus:outline-none touch-pan-x touch-pan-y",{"!snap-none":!e.longStrip&&(a.value||l.value||e.zooming),"cursor-grabbing":!e.touchDevice&&a.value,"overflow-hidden":e.zooming}]),style:Pe({"font-size":`${s.value}px`}),onClick:Le(Q,["stop"]),onTouchmoveCapture:Le(A,["stop"])},[xe(k.$slots,"default")],38))}}),Jh=Object.freeze(Object.defineProperty({__proto__:null,default:pa},Symbol.toStringTag,{value:"Module"}));function vr(e,t){return(e==null?void 0:e.querySelector(`[data-index="${t}"],[data-index2="${t}"]`))??void 0}const Qh=["data-index"],eg={key:0,class:"img img--loading"},tg=["src"],ng=["data-index"],ha=ve(pe({__name:"ReaderBody",props:{page:{type:Number},pageIndex:{type:Number},direction:{type:Number},isLongStrip:{type:Boolean},isVertical:{type:Boolean},isDouble:{type:Boolean},isRTL:{type:Boolean},pages:{type:Array},totalImgs:{type:Number},gap:{type:Number},zoom:{type:Number},zooming:{type:Boolean},pinchToZoome:{type:Boolean},tapZone:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},playController:{type:Object},busy:{type:Boolean},controlsVisible:{type:Boolean}},emits:["ready","update:zoom","update:zooming","update:playing","dragEnd","click","end","prev","next"],setup(e,{expose:t,emit:n}){const o=e,i=n,r=ee(null),s=G(()=>{var A;return(A=r.value)==null?void 0:A.rootEl});t({rootEl:s});const l=hn(),a=G(()=>{const{width:A,height:w}=l,g=o.isLongStrip?o.isVertical?A.value:w.value:Math.min(A.value,w.value);return Math.min(4,Math.max(1,Math.ceil(g/400-1)))*o.gap}),u=ee(o.isLongStrip?{min:o.pageIndex-1,max:o.pageIndex}:_()),c=G(()=>{const{min:A,max:w}=u.value,g={};for(let I=A;I<=w;I++)g[I]=!0;return g}),d=ee(p()),f=P(()=>{d.value=p()},100);ue(l.width,f),ue(l.height,f),ue(()=>o.pages,f),ue(()=>o.isLongStrip,f),ue(()=>o.isVertical,f);function p(){const A=l.width.value,w=l.height.value,{pages:g,isLongStrip:I,isVertical:q}=o;return g.map(K=>{var k;const R=K.some(y=>{var O;return(O=y.img)==null?void 0:O.isLoading}),Q=K.map(y=>y.index),H={isLoading:R,indexes:Q,visible:!1};if(R)return H;const T=K.map(({img:y})=>y).filter(Boolean);if(!T.length||(H.srcs=T.map(({src:y})=>y),T.every(y=>y.hasError)))return H;const S=(k=T.find(y=>!y.hasError))==null?void 0:k.size;if(!S)return H;const J=T.reduce((y,O)=>{var $;return y+((($=O.size)==null?void 0:$.width)??S.width)},0),F=T.reduce((y,O)=>{var $;return y+((($=O.size)==null?void 0:$.height)??S.height)},0)/T.length;return I&&q||!I&&A/J<w/F?(H.width=Math.min(A,J),H.height=F*(H.width/J)):(H.height=Math.min(w,F),H.width=J*(H.height/F)),H})}const x=G(()=>{const A=o.isVertical?"width":"height";return d.value.map(w=>w[A]).filter(Boolean).sort((w,g)=>g-w)[0]});je(()=>{const A=vr(s.value,o.pageIndex);A==null||A.scrollIntoView({behavior:"instant",block:"start"});let w,g=!1;Ns(()=>{w!==o.pageIndex&&(w=o.pageIndex,I(),g||(g=!0,gt(()=>i("ready"))))});async function I(){if(!o.isLongStrip){u.value=_();return}const q=Math.floor(o.page),K=vr(s.value,q);if(!K)return;const R=+D(K).getAttribute("data-index"),Q=+b(K).getAttribute("data-index");(R!==u.value.min||Q!==u.value.max)&&(u.value={min:R,max:Q})}});function _(){const{pageIndex:A}=o;return{min:A-(o.isDouble?5:3),max:A+(o.isDouble?6:3)}}function D(A,w=0){const g=A.previousElementSibling;if(!g)return A;const I=w+(o.isVertical?g.clientHeight:g.clientWidth);return(o.isVertical?I>l.height.value*1.5:o.isRTL?I>l.width.value*2.5:I>l.width.value*1.5)?g:D(g,I)}function b(A,w=0){const g=A.nextElementSibling;if(!g)return A;const I=w+(o.isVertical?g.clientHeight:g.clientWidth);return(o.isVertical?I>l.height.value*3.5:o.isRTL?I>l.width.value*1.5:I>l.width.value*2.5)?g:b(g,I)}function P(A,w){let g;return()=>{g||(g??(g=setTimeout(()=>{g=void 0,A()},w)))}}return(A,w)=>(v(),oe(pa,{ref_key:"gestureContainer",ref:r,"space-top":e.spaceTop,"controls-visible":e.controlsVisible,zoom:e.zoom,zooming:e.zooming,"pinch-to-zoome":e.pinchToZoome,"tap-zone":e.tapZone,"page-index":e.pageIndex,class:fe(["rbod",{"rbod--long-strip":e.isLongStrip,"rbod--paging":!e.isLongStrip,"rbod--vertical":e.isVertical,"rbod--rtl":e.isRTL,"rbod--1page":d.value.length===1}]),"play-controller":e.playController,horizontal:!e.isVertical,rtl:e.isRTL,"touch-device":e.touchDevice,busy:e.busy,"long-strip":e.isLongStrip,style:Pe({"--gap":`${a.value}em`,"--space-top":`${e.spaceTop}px`,"--screen-width-em":Z(l).width.value+"em","--screen-height-em":Z(l).height.value+"em",...e.isLongStrip?{"--max-size-em":x.value+"em"}:{}}),"onUpdate:zoom":w[0]||(w[0]=g=>i("update:zoom",g)),"onUpdate:zooming":w[1]||(w[1]=g=>i("update:zooming",g)),onDragEnd:w[2]||(w[2]=()=>i("dragEnd")),onClick:w[3]||(w[3]=()=>i("click")),onPrev:w[4]||(w[4]=()=>i("prev")),onNext:w[5]||(w[5]=()=>i("next"))},{default:ne(()=>[(v(!0),z(be,null,Yt(d.value,g=>{var I;return v(),z("div",cn({key:e.direction+"_"+g.indexes[0],"data-index":g.indexes[0]},{ref_for:!0},g.indexes.length>1?{"data-index2":g.indexes[1]}:{}),[!((I=g.srcs)!=null&&I.length)||g.isLoading?(v(),z("div",eg,[c.value[g.indexes[0]]?(v(),oe(ei,{key:0})):se("",!0)])):g.srcs.length==1?(v(),oe(Pi(c.value[g.indexes[0]]?"img":"div"),cn({key:1,class:"img"},{ref_for:!0},c.value[g.indexes[0]]?{src:g.srcs[0]}:{},{style:{width:g.width!==void 0?g.width+"em":"",height:g.height!==void 0?g.height+"em":""}}),null,16,["style"])):(v(),z("div",{key:2,class:fe(["img img--double",{"flex-row-reverse":e.isRTL}]),style:Pe({width:g.width!==void 0?g.width+a.value+"em":"",height:g.height!==void 0?g.height+"em":""})},[g.indexes.some(q=>c.value[q])?(v(!0),z(be,{key:0},Yt(g.srcs,q=>(v(),z("div",{key:q},[U("img",{src:q},null,8,tg)]))),128)):se("",!0)],6))],16,Qh)}),128)),U("div",{class:"last","data-index":e.totalImgs},[xe(A.$slots,"end")],8,ng)]),_:3},8,["space-top","controls-visible","zoom","zooming","pinch-to-zoome","tap-zone","page-index","play-controller","horizontal","rtl","touch-device","busy","long-strip","class","style"]))}}),[["styles",[".rbod{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:1024px){.rbod{transform:none}}.rbod--rtl{flex-direction:row-reverse}.rbod.rbod--vertical>div{padding:calc(var(--gap)/2) 0}.rbod:not(.rbod--vertical){align-items:center;display:flex;height:100%;justify-content:flex-start}.rbod:not(.rbod--vertical)>div{padding:0 calc(var(--gap)/2)}.rbod--long-strip.rbod--vertical.rbod--1page>div:first-child{min-height:100vh}.rbod--long-strip.rbod--vertical>div:first-child{margin-top:var(--space-top);padding-top:0}.rbod--long-strip.rbod--vertical>div:last-child{padding-bottom:0}.rbod--long-strip.rbod--vertical>div{width:var(--max-size-em)}.rbod--long-strip.rbod--vertical .img--loading{height:75vh;width:100%}.rbod--long-strip.rbod--vertical .last{height:100vh}.rbod--long-strip:not(.rbod--vertical).rbod--1page>div:first-child{min-width:100vw}.rbod--long-strip:not(.rbod--vertical)>div{align-items:center;display:flex;height:var(--max-size-em)}.rbod--long-strip:not(.rbod--vertical) .img--loading{height:100%;max-width:100vw;width:680px}.rbod--long-strip:not(.rbod--vertical) .last{width:100vw}.rbod--long-strip>div>img{flex-shrink:0;margin:auto}.rbod--paging>div{align-items:center;display:grid;justify-content:center;min-height:100vh;min-width:100vw;scroll-snap-align:center;scroll-snap-stop:always}.rbod--paging.rbod--vertical{scroll-snap-type:y var(--tw-scroll-snap-strictness);--tw-scroll-snap-strictness:mandatory}.rbod--paging.rbod--vertical>div{width:var(--screen-width-em)}.rbod--paging:not(.rbod--vertical){scroll-snap-type:x var(--tw-scroll-snap-strictness);--tw-scroll-snap-strictness:mandatory}.rbod--paging:not(.rbod--vertical)>div{height:var(--screen-height-em)}.rbod--paging .img--loading{height:100%;width:100%}.rbod--paging .img.img--double{align-items:center;background-color:transparent;display:flex;gap:var(--gap);justify-content:center}.rbod--paging .img.img--double div{display:flex;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rbod--paging .img.img--double div img{flex-shrink:0;max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain}.rbod>div{flex-shrink:0}.rbod .img,.rbod>div{margin:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none}.rbod .img{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));-o-object-fit:contain;object-fit:contain}.rbod .img--loading{align-items:center;background-color:transparent;display:flex;justify-content:center}"]]]),og=Object.freeze(Object.defineProperty({__proto__:null,default:ha},Symbol.toStringTag,{value:"Module"})),ig={},rg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function sg(e,t){return v(),z("svg",rg,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"},null,-1)])])}const ga=ve(ig,[["render",sg]]),lg=Object.freeze(Object.defineProperty({__proto__:null,default:ga},Symbol.toStringTag,{value:"Module"})),ag={class:"flex w-full flex-shrink-0 justify-between items-center h-16 px-3"},ma=pe({__name:"BottomSheet",props:Ye({spaceTop:{type:Number}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue"),n=ee(null),o=ee(!1),i=ee(0);$t({onKeyDown:s});const r=Ko();ue(t,c=>r(c)),Yi(()=>{const c=t.value;return c&&(t.value=!1),c});function s(c){t.value&&c.key==="Escape"&&(t.value=!1,c.preventDefault())}const l={y:-1};function a(c){const d=n.value;if(!d)return;if(d.scrollTop>0){l.y=-1;return}if(l.y===-1){l.y=Math.max(0,c.touches[0].clientY);return}const p=c.touches[0].clientY-l.y,x=p>0?p:0;x!=i.value&&(i.value=x);const _=x>0;_!==o.value&&(o.value=_)}async function u(){o.value=!1,l.y=-1,await gt();const c=n.value;c&&c.offsetHeight-i.value<window.innerHeight/2&&i.value>c.offsetHeight*.3&&(t.value=!1),i.value=0}return(c,d)=>(v(),z("div",{class:fe(["fixed inset-0 flex flex-col items-center justify-end select-none z-40 text-stone-100",{"!pointer-events-none":!t.value}]),style:Pe({"padding-top":(e.spaceTop??0)+60+"px"}),onClick:d[3]||(d[3]=()=>t.value=!1)},[B(Vo,{name:"slide","enter-from-class":"!translate-y-full","leave-to-class":"!translate-y-full"},{default:ne(()=>[t.value?(v(),z("div",{key:0,class:fe(["w-full sm:w-[31rem] bg-stone-900 bg-opacity-90 backdrop-blur-md rounded-t-xl max-w-full overflow-hidden shadow-lg shadow-neutral-950",{"duration-0":o.value,"duration-200":!o.value}]),style:Pe(i.value?{transform:`translateY(${i.value}px)`}:{}),onClick:d[1]||(d[1]=Le(()=>{},["stop"])),onWheelPassive:d[2]||(d[2]=Le(()=>{},["stop"])),onTouchmove:Le(a,["stop"]),onTouchend:u},[U("div",ag,[B(Ge,{transparent:"",onClick:d[0]||(d[0]=()=>t.value=!1)},{default:ne(()=>[B(ga)]),_:1}),xe(c.$slots,"name"),xe(c.$slots,"actions")]),U("div",{ref_key:"scrollEl",ref:n,class:"overflow-auto px-6 md:px-8 lg:px-10 xl:px-12 pt-1.5 pb-8 md:pb-6 flex-grow scrollbar-sm",style:{"max-height":"calc(100% - 4rem)"}},[xe(c.$slots,"default")],512)],38)):se("",!0)]),_:3})],6))}}),cg=Object.freeze(Object.defineProperty({__proto__:null,default:ma},Symbol.toStringTag,{value:"Module"})),ug=["onClick","onKeyup"],va=ve(pe({__name:"TabBar",props:Ye({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=lt(e,"modelValue"),o=ee(null),i=ee({width:"",left:""}),r=ee(!1);je(()=>{const l=Date.now();ue(n,async a=>{var c;await gt();const u=(c=o.value)==null?void 0:c.children[a+1];u&&(i.value={width:u.offsetWidth+"px",left:u.offsetLeft+"px"},!r.value&&Date.now()-l>500&&(r.value=!0),u.scrollIntoView({behavior:r.value?"smooth":"auto",block:"center",inline:"center"}))},{immediate:!0})});function s(l){n.value=l}return(l,a)=>(v(),z("div",{ref_key:"root",ref:o,class:"relative h-8 rounded-[2.5rem] inline-flex bg-black bg-opacity-50 p-1 font-medium max-w-full leading-none overflow-auto scrollbar-none",style:{}},[U("div",{class:fe(["bg-stone-300 h-6 rounded-2xl absolute top-1 pointer-events-none",{"duration-200":r.value}]),style:Pe(i.value)},null,6),(v(!0),z(be,null,Yt(t.items,(u,c)=>Ne((v(),z("div",{key:c,tabindex:"0",class:fe(["text-sm inline-flex justify-center items-center h-6 rounded-2xl px-4 cursor-pointer relative z-10 whitespace-nowrap flex-shrink-0 focus:outline-primary hover:bg-stone-50 hover:bg-opacity-10 duration-200",{"text-stone-900":c==n.value,"text-stone-400":c!=n.value}]),onClick:Le(()=>s(c),["stop"]),onKeyup:[Fo(()=>s(c),["enter"]),Fo(()=>s(c),["space"])]},[Wt(He(u),1)],42,ug)),[[Z(zt),30]])),128))],512))}}),[["styles",[".scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}"]]]),dg=Object.freeze(Object.defineProperty({__proto__:null,default:va},Symbol.toStringTag,{value:"Module"})),fg={},pg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function hg(e,t){return v(),z("svg",pg,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5c0-2.21-1.79-4-4-4z"},null,-1)])])}const ba=ve(fg,[["render",hg]]),gg=Object.freeze(Object.defineProperty({__proto__:null,default:ba},Symbol.toStringTag,{value:"Module"})),mg={},vg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"};function bg(e,t){return v(),z("svg",vg,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M14 8.25a2.25 2.25 0 1 1 0-4.5a2.25 2.25 0 0 1 0 4.5m0 8a2.25 2.25 0 1 1 0-4.5a2.25 2.25 0 0 1 0 4.5M11.75 22a2.25 2.25 0 1 0 4.5 0a2.25 2.25 0 0 0-4.5 0"},null,-1)])])}const ya=ve(mg,[["render",bg]]),yg=Object.freeze(Object.defineProperty({__proto__:null,default:ya},Symbol.toStringTag,{value:"Module"})),wg={key:1,class:"w-full text-center text-xl whitespace-nowrap text-ellipsis flex-shrink overflow-hidden px-5 select-text"},xg={class:"opacity-90"},_g={key:0,class:"w-full text-center text-sm text-stone-400 whitespace-nowrap text-ellipsis flex-shrink overflow-hidden mb-3 -mt-2 select-text"},br=pe({__name:"SettingsBottomSheet",props:Ye({name:{type:String},spaceTop:{type:Number},enableHelp:{type:Boolean},enableDefaultPreferences:{type:Boolean}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:Ye(["help","more"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=lt(e,"modelValue"),r=ee(0),s=G(()=>n.name??location.hostname);$t({onKeyUp:a=>{a.key==="s"&&!a.metaKey&&!a.ctrlKey&&(i.value=!0)}}),je(()=>{ue(i,a=>{a||setTimeout(()=>{r.value!==0&&(r.value=0)},300)})});function l(){o("help"),i.value=!1}return(a,u)=>(v(),oe(ma,{modelValue:i.value,"onUpdate:modelValue":u[2]||(u[2]=c=>i.value=c),"space-top":e.spaceTop},{name:ne(()=>[e.enableDefaultPreferences?(v(),oe(va,{key:0,modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=c=>r.value=c),items:["Preferences","Default"]},null,8,["modelValue"])):(v(),z("h3",wg,He(s.value),1))]),actions:ne(()=>[e.enableDefaultPreferences?(v(),oe(Ge,{key:0,transparent:"",class:fe(e.enableHelp?"":"opacity-0 pointer-events-none"),onClick:l},{default:ne(()=>[U("span",xg,[B(ba)])]),_:1},8,["class"])):(v(),oe(Ge,{key:1,transparent:"",onClick:u[1]||(u[1]=()=>o("more"))},{default:ne(()=>[B(ya)]),_:1}))]),default:ne(()=>[r.value===0?(v(),z(be,{key:0},[e.enableDefaultPreferences?(v(),z("h3",_g,He(s.value),1)):se("",!0),xe(a.$slots,"tab-preferences")],64)):(v(),z(be,{key:1},[xe(a.$slots,"tab-default"),u[3]||(u[3]=U("div",{class:"h-6"},null,-1))],64))]),_:3},8,["modelValue","space-top"]))}}),Sg=Object.freeze(Object.defineProperty({__proto__:null,default:br},Symbol.toStringTag,{value:"Module"}));function Qn(e=0){return new Promise(t=>setTimeout(t,e))}function wa(e){const t=async(n,o)=>{var i;if(!n.toBlob){if(o)return;const r=n.cloneNode(),s=(i=r.getContext)==null?void 0:i.call(r,"2d");if(!s)return;try{s.drawImage(e,0,0)}catch{return}return t(r,!0)}return await new Promise(r=>{const s=l=>{if(!l)return r(void 0);const a=URL.createObjectURL(l);r(a)};try{n.toBlob(s,"image/jpeg",1)}catch{r(void 0)}})};return t(e,!1)}let ti;async function kg(e,t){if(ti||!t.startsWith("blob:"))return t;if(ti===void 0){try{if((await fetch(t)).ok)return ti=!0,t}catch{}ti=!1}e.complete||await new Promise(a=>{let u=0;const c=setInterval(()=>{e.complete?(a(),clearInterval(c)):++u>=30&&a()},100)});const o=e.naturalWidth,i=e.naturalHeight;if(!o||!i)return;const r=document.createElement("canvas"),s=r.getContext("2d");return r.width=o,r.height=i,s==null||s.drawImage(e,0,0,o,i),await wa(r)}function Cg(e){const t=new Set,n=e.getAttributeNames(),o=n.indexOf("src"),i=o!==-1;i&&(n.splice(o,1),n.push("src"));for(const r of n){if(r==="srcset"||i&&r===":src"||r!=="data-url"&&r!=="data-original"&&!r.includes("src"))continue;const s=e.getAttribute(r);s&&(r==="src"&&e.naturalWidth&&e.naturalWidth<200||t.add(s.replace(/(\n|\t)/g," ").trim()))}return Array.from(t)}function ni(e,t){return e>=75&&t>=50&&(e>=200||t>=200)}class Tg{constructor({onChanged:t}){ke(this,"isMounted",!0);ke(this,"elsDisposeCallbacksMap",new Map);ke(this,"onChanged");this.onChanged=t}dispose(){this.isMounted=!1,this.elsDisposeCallbacksMap.forEach(t=>t()),this.elsDisposeCallbacksMap=new Map,this.onChanged=()=>{}}async download(t){if(!this.isMounted)return;const n=t.el,o=!!n&&n instanceof HTMLImageElement,i=n?o?Cg(n):[await wa(n)].filter(Boolean):[t.src].filter(Boolean);if(!(!n&&!i.length||!this.isMounted)){if(n&&!this.elsDisposeCallbacksMap.has(n))if(o){let r=i.slice(-1)[0];const s=new MutationObserver(l=>{l.some(u=>{if(u.attributeName!=="src")return!1;const c=r;return r=n.getAttribute("src"),!!r&&c!==r})&&this.download(t)});s.observe(n,{attributes:!0}),this.elsDisposeCallbacksMap.set(n,()=>s.disconnect())}else{const r=n.getContext("2d");if(r){const s=r.drawImage.bind(r),l=r.putImageData.bind(r),a=(u,c,d)=>(setTimeout(()=>this.download(t),100),u.apply(c,d));try{r.drawImage=new Proxy(s,{apply:a}),r.putImageData=new Proxy(l,{apply:a})}catch{}this.elsDisposeCallbacksMap.set(n,()=>{try{r.drawImage=s,r.putImageData=l}catch{}})}}i.length&&(this.onChanged(t,{src:i[0],isLoading:!0,hasError:!1}),await this.downloadRawImage(t,i))}}async downloadRawImage(t,n){const o=t.el instanceof HTMLImageElement?t.el:void 0;for(let i=0;i<n.length;i++){const r=n[i],s=o?await kg(o,r):r;if(!s||!this.isMounted)return;const l=await Pg(s,o,a=>{this.isMounted&&this.onChanged(t,{src:s,size:a,isLoading:!1,hasError:!1})});if(l.ok||!this.isMounted)return;i===n.length-1&&this.onChanged(t,{src:s,isLoading:!1,hasError:!!l.error,invalid:!!l.invalid,size:l.size})}}}async function Pg(e,t,n){return(t==null?void 0:t.src)===e&&t.naturalWidth&&t.naturalHeight?(n({width:t.naturalWidth,height:t.naturalHeight}),t.complete?{ok:!0}:new Promise(o=>{t.addEventListener("load",()=>o({ok:!0}),{once:!0})})):await new Promise(o=>{const i=new Image,r=setInterval(()=>{const{naturalWidth:s,naturalHeight:l}=i;if(l&&s){const a={width:s,height:l};ni(s,l)?n(a):o({invalid:!0,size:a}),clearInterval(r)}},20);i.onerror=()=>{o({error:!0}),clearInterval(r)},i.onload=()=>setTimeout(()=>o({ok:!0}),25),i.src=e})}const Mg=3;class Eg{constructor(t){ke(this,"download");ke(this,"threads");ke(this,"completedItems");ke(this,"promisesMap",new Map);this.download=t.download}dispose(){var t;(t=this.threads)==null||t.dispose(),this.threads=void 0,this.completedItems=void 0}run({activeIndex:t,items:n}){var r;if(this.completedItems===n)return;this.completedItems=void 0,(r=this.threads)==null||r.dispose();let o=Math.max(0,t-1),i=!0;this.threads=new Ig(Mg,()=>{const s=n[o];if(!s){this.completedItems=n;return}i&&o===n.length-1?(i=!1,o=t-2):i?o++:o--;const l=s.src??s.el;if(l){const u=this.promisesMap.get(l);if(u)return u}const a=this.download(s);return l&&this.promisesMap.set(l,a),a}),this.threads.exec()}}class Ig{constructor(t,n){ke(this,"isDisposed",!1);this.limit=t,this.getNext=n}dispose(){this.isDisposed=!0}exec(){for(let t=0;t<this.limit;t++)this.next()}async next(){if(this.isDisposed)return;const t=this.getNext();t&&(await t,await Qn(20),this.next())}}class xa{constructor(){ke(this,"elsPool",new Map)}check(t){if(!t||t===document.body)return!0;const n=this.elsPool.get(t);if(n!==void 0)return n;const o=getComputedStyle(t);if(!(o.display!=="none"&&+(o.opacity??"1")>.1))return this.elsPool.set(t,!1),!1;const r=this.check(t.parentElement);return this.elsPool.set(t,r),r}}function Og(e,t){let n=[t??document.documentElement];const o=e.split("->");for(let i=0;i<o.length;i++){const r=o[i];n=n.map(s=>Array.from((s.shadowRoot??s).querySelectorAll(r))).flat()}return n}function eo(e,t){if(e instanceof HTMLOptionElement){const n=e.parentElement instanceof HTMLOptGroupElement?e.parentElement.parentElement:e.parentElement;if(!n||!(n instanceof HTMLSelectElement))return;const o=e.getAttribute("value")||"";if(n.value===o)return;n.value=o,n.dispatchEvent(new Event("change"));return}e instanceof HTMLAnchorElement&&(t==null?void 0:t.preventDefault)!==!1&&e.addEventListener("click",n=>n.preventDefault(),{once:!0}),e.click(),e.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0,pointerType:"mouse",button:0})),e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0}))}async function $g(e){const{lstrip:t,lstripBtn:n}=e||{};if(!t||!n||!!document.querySelector(t))return!1;const i=n.split(";");for(const r of i)if(!await zg(r.trim()))return!1;return!0}async function zg(e){const t=await gn(50,30,()=>document.querySelector(e));return t?(eo(t),await Qn(),!0):!1}class Dg{constructor({spec:t,onChanged:n}){ke(this,"spec");ke(this,"onChanged");ke(this,"rawImages",[]);ke(this,"isMounted",!0);ke(this,"loadRawImagesTs");ke(this,"imgListenersMap",new Map);ke(this,"disconnectObservers");ke(this,"contentEl");ke(this,"reloadRawImages",ct(()=>{this.contentEl&&this.loadRawImages(this.contentEl)},100));this.spec=t,this.onChanged=n,this.init()}dispose(){var t;this.isMounted=!1,(t=this.disconnectObservers)==null||t.call(this),this.disconnectObservers=void 0,this.onChanged=()=>{}}init(){var i;const t=new MutationObserver(this.reloadRawImages),n=(i=this.spec)!=null&&i.imgDivs?void 0:(()=>{let r=window.innerWidth;return new ResizeObserver(ct(()=>{const s=window.innerWidth;if(s!==r){r=s;return}this.reloadRawImages()},50))})();this.disconnectObservers=async()=>{t.disconnect(),n==null||n.disconnect()};let o=!1;this.loadContentEl(r=>{this.contentEl!==r&&(this.contentEl=r,t.disconnect(),n==null||n.disconnect(),t.observe(this.contentEl,{childList:!0,subtree:!0}),n==null||n.observe(this.contentEl),o?this.reloadRawImages():(o=!0,this.loadRawImages(this.contentEl)))})}setRawImages(t){let n=!1;const o=t.map((i,r)=>{const s=this.rawImages[r];return s&&s.el===i.el&&s.parentEl===i.parentEl&&s.src===i.src?s:(n=!0,i)});(n||!o.length)&&(this.rawImages=o,this.onChanged(t))}async loadContentEl(t){var l;const n=await $g(this.spec),o=(l=this.spec)==null?void 0:l.content;if(!o){t(document.body);return}let i=await gn(n?100:1,10,()=>{for(const a of o.split(",")){const u=document.querySelector(a);if(u)return u}});if(!i)return;t(i);let r=0;const s=async()=>{if(this.isMounted&&!(i!=null&&i.isConnected)){if(r=0,i=await gn(50,20,()=>{const a=document.querySelector(o);return a!=null&&a.isConnected&&a!==i?a:void 0}),!i)return;t(i)}!this.isMounted||++r>=10||setTimeout(s,200)};setTimeout(s,200)}async loadRawImages(t){var r;if(!this.isMounted||!t.isConnected)return;const n=Date.now();this.loadRawImagesTs=n;const o=(r=this.spec)==null?void 0:r.imgDivs,i=o?await this.loadFromImgDivs(t,o):this.loadFromContentEl(t);this.loadRawImagesTs!==n||!t.isConnected||!this.isMounted||this.setRawImages(i)}async loadFromImgDivs(t,n){const o=Og(n,t);if(!o.length)return this.loadFromContentEl(t);const i=new xa;return o.map(s=>{const l=Array.from(s.querySelectorAll("img,canvas"));for(const a of l){if(!i.check(a)){this.observeInvalidImgEl(a);continue}if(a instanceof HTMLCanvasElement){if(_a(a))return{el:a,parentEl:s}}else if(a instanceof HTMLImageElement){if(Sa(a))return{el:a,parentEl:s};this.observeInvalidImgEl(a)}}return{parentEl:s}})}loadFromContentEl(t){const n=[],o={},i=new xa;return Array.from(t.querySelectorAll("img,canvas")).forEach(s=>{if(!i.check(s)){this.observeInvalidImgEl(s);return}if(s instanceof HTMLCanvasElement)_a(s)&&n.push({el:s});else if(s instanceof HTMLImageElement)if(Sa(s)){const l=s.getAttribute("src");if(l){const a=o[l];if(a!==void 0&&a!==-1){n.splice(a,1);return}o[l]=n.length}n.push({el:s})}else this.observeInvalidImgEl(s)}),n}observeInvalidImgEl(t){if(!(t instanceof HTMLImageElement)||this.imgListenersMap.has(t))return;const n=()=>{t.removeEventListener("load",n),this.imgListenersMap.delete(t),this.reloadRawImages()};this.imgListenersMap.set(t,n),t.addEventListener("load",n)}}function _a(e){return e.isConnected&&ni(e.width,e.height)}function Sa(e){if(!e.isConnected)return!1;const t=e.getBoundingClientRect();return!t.width||!t.height||ni(t.width,t.height)}const oi="mp-scroll-container";class yr{constructor(){ke(this,"scrollEl")}dispose(){var t;(t=this.scrollEl)==null||t.classList.remove(oi)}scrollTo({rawImages:t,page:n,skipIfVisible:o,isScrollDown:i,isScrollExact:r,fallbackScrollEl:s}){var D;const l=Math.floor(n),a=t[Math.min(t.length-1,l)];if(!a)return;const u=a.el??a.parentEl??(a.src?document.querySelector(`img[src^="${a.src}"]`):void 0);if(!u)return;const c=u.getBoundingClientRect();if(o&&c.top<=0&&c.top+c.height>0)return;const d=yr.getScrollable(u,s);if(!d)return;const{el:f,top:p}=d;s!==document.documentElement&&!f.classList.contains(oi)&&(f!==this.scrollEl&&((D=this.scrollEl)==null||D.classList.remove(oi),this.scrollEl=f),f.classList.add(oi));const x=n>=t.length?c.height:r?n%1*c.height:i?Math.max(0,c.height-window.innerHeight/2):-window.innerHeight/2,_={top:p+x,behavior:"instant"};f.scrollTo(_),f!==document.documentElement&&document.documentElement.scrollTo(_)}static getScrollable(t,n){const o=(i,r)=>{if(!i)return;const{offsetTop:s,offsetParent:l}=i;if(l&&s&&r.set(l,Math.max(r.get(l)??0,s)),!(i===n||i.scrollHeight-i.clientHeight>=10&&window.getComputedStyle(i).overflow!=="visible"))return o(i.parentElement,r);let u=0;return r.forEach((c,d)=>{u+=d===l?c-s:c}),{el:i,top:u}};return o(t,new Map)}}function ka(e){var t,n;for(let o=0;o<e.length;o++){const i=((t=e[o])==null?void 0:t.el)??((n=e[o])==null?void 0:n.parentEl),r=i==null?void 0:i.getBoundingClientRect();if(!r||r.bottom<=0)continue;const s=r.top;return o+(s>=0?0:-s/r.height)}return 0}function Ag(e){if(document.documentElement.scrollTop<700)return 0;const n=Array.from(document.querySelectorAll("img[src]")).filter(o=>e.includes(o.src)).map(o=>({el:o}));return ka(n)}function jg(e){var R,Q,H;const t=(R=e.raw.value)==null?void 0:R.isWebtoon,n=ee(t===!1),o=ee(t);let i=!1;const r=e.touchDevice&&!navigator.userAgent.toLowerCase().includes("android"),s=((H=(Q=e.raw.value)==null?void 0:Q.imgs)==null?void 0:H.filter(Boolean))??[];let l=e.isAutoShow!==!1?e.page.value:s.length?Ag(s):void 0,a=s.map(T=>({src:T})),u,c;const d=new Map,f=({src:T,el:Y})=>{const S=Y??T;return S?d.get(S):void 0},p=ee(s.map(T=>({src:T,isLoading:!0,hasError:!1}))),x=()=>{const T=[];a.forEach(Y=>{const{src:S,el:J}=Y,F=J??S,k=F?d.get(F):void 0;(F&&!(k!=null&&k.invalid)||Y.parentEl)&&T.push(k)}),p.value=T};let _=setTimeout(e.onTimeout,2e4);const D=()=>{_&&(clearTimeout(_),_=void 0)};let b=0,P=0;const A=4,w=new Tg({onChanged(T,Y){const S=T.el??T.src;if(!S||(d.set(S,Y),x(),Y.isLoading))return;if(Y.hasError){if(c||o.value!==void 0)return;c=setTimeout(()=>{c=void 0,o.value===void 0&&e.onError("Failed to load images")},3e3);return}const{size:J,invalid:F}=Y;if(!(!J||F)){if(!o.value&&P<A){const k=i?a:a.filter(({el:me,src:ge})=>ge||!(me&&me instanceof HTMLImageElement&&!d.has(me)));let y=k.indexOf(T);if(i&&y>4||y===-1&&(T.el&&(y=k.findIndex(me=>me.el===T.el)),y===-1))return;const O=y>Math.min(1,k.length-3)&&y<Math.max(k.length-2,3),$=J.width/J.height;$>2&&b++;const le=$<.5||b>=A,ae=!le&&.65<$&&$<.75;ae&&P++,o.value!==le&&(O||le)&&(o.value=le),O&&n.value!=ae&&(n.value=!0),o.value===void 0&&ae&&P===A&&(o.value=!1)}K()}}}),g=new Eg({download:async T=>{!(T.el&&d.has(T.el))&&!(T.src&&d.has(T.src))&&await w.download(T)}}),I=()=>{g.run({items:a,activeIndex:Math.min(a.length-1,Math.floor(e.page.value))})},q=new yr;if(s.length)I();else{let T=!1;u=new Dg({spec:e.spec,async onChanged(Y){var S;if(a=Y,x(),!e.raw.value&&!Y.length){e.onError("no_img");return}(S=e.spec)!=null&&S.imgDivs&&!T&&e.isAutoShow!==!1&&e.page.value&&(T=!0,q.scrollTo({rawImages:Y,page:e.page.value,skipIfVisible:!0,fallbackScrollEl:r?document.body:document.documentElement,isScrollDown:!0}),await Qn(1)),l===void 0&&e.isAutoShow===!1&&(l=ka(Y)),I()}})}Ti(()=>{w.dispose(),g.dispose(),u==null||u.dispose(),c&&clearTimeout(c),q.dispose(),i&&q.scrollTo({rawImages:a,page:e.page.value,fallbackScrollEl:document.documentElement,isScrollExact:!0})});function K(){if(i||o.value===void 0||l===void 0)return;const T=Math.max(0,Math.min(l,a.length)),Y=Math.min(Math.floor(T),a.length-1);if(Y>=1){const J=a[Y];if(!J||!f(J)){e.isAutoShow&&q.scrollTo({rawImages:a,page:Y,fallbackScrollEl:r?document.body:document.documentElement,isScrollDown:!0});return}for(let F=Y;F<a.length;F++){const k=f(a[F]);if(!k)return;if(!k.invalid){if(!k.size&&!k.hasError)return;break}}for(let F=Y-1;F>=0;F--){const{src:k,el:y}=a[F],O=y??k;if(!O)break;const $=d.get(O);if(!$)return;if(!$.invalid){if(!$.size&&!$.hasError)return;break}}}if(i)return;i=!0,D(),e.onReady(T);let S=!0;ue(()=>Math.floor(e.page.value),(J,F)=>{J===F&&!S||(q.scrollTo({rawImages:a,page:J,isScrollDown:F===void 0||J>F||a.length===1,skipIfVisible:S&&a.length>1,fallbackScrollEl:r?document.body:document.documentElement}),S=!1,F??(F=-1),I())},{immediate:!0})}return{asyncImgs:G(()=>p.value),isWebtoon:G(()=>o.value??!1),isManga:G(()=>n.value)}}function Ca({touchDevice:e,isBusy:t,isPlaying:n,isIdle:o,hideControlsEvent:i,scrollEl:r,moveThreshold:s}){const l=ee(!0);let a=!1,u=!1;const c={x:0,y:0};let d;function f(b){if(i.value===tn.never||t.value&&l.value)return;const P=typeof b=="boolean"?b:!l.value;P!==l.value&&(l.value=P,!a&&!P&&(a=!0))}function p(){r.value&&(c.x=r.value.scrollLeft,c.y=r.value.scrollTop)}function x(){const b=i.value===tn.firstMove,P=r.value;if(!P)return;const A=Uo(()=>{if(!l.value){Lg(P)&&f(!0);return}if(b&&a)return;const w=Math.abs(P.scrollTop-c.y)||Math.abs(P.scrollLeft-c.x),g=s??(b?c.y===0?300:200:150);w>g&&f(!1)},100);P.addEventListener("scroll",A),d=()=>{P.removeEventListener("scroll",A)}}function _(){switch(d==null||d(),d=void 0,i.value){case tn.onLoad:a||f(!1);break;case tn.firstMove:x();break;case tn.move:x();break;case tn.never:l.value||(l.value=!0);break}}function D(){u||(u=!0,p(),_(),e&&ue(Zi(),P=>{P==="hidden"&&!n.value&&!l.value&&f(!0)}),ue(t,b=>{b&&!l.value&&f()}),ue(n,b=>{b||f(!0)}),ue(o,b=>{n.value&&f(!b)}),ue(l,b=>{b&&p()}),ue(i,()=>_()),ue(r,()=>_()),Mt(()=>{d==null||d(),d=void 0}))}return{visible:G(()=>l.value),toggle:f,activate:D}}function Lg(e){const t=Math.max(0,e.scrollTop),n=Math.abs(e.scrollLeft);if(n<10&&t<10)return!0;const{scrollHeight:o,clientHeight:i}=e;if(o>i)return t>o-i-10;const{scrollWidth:s,clientWidth:l}=e;return s>l&&n>s-l-10}function Bg(e,t,n){return G(()=>t.value?Ta(e.value,n.value):e.value.map((o,i)=>[{img:o,index:i}]))}function Ta(e,t,n=0){if(e.length===0)return[];const o=e.slice(0,2),i=o.some(s=>(s==null?void 0:s.size)&&s.size.width>s.size.height),r=i||t?[o[0]]:o;return[r.map((s,l)=>({img:s,index:n+l})),...Ta(e.slice(r.length),t&&i,n+r.length)]}const wr=40;function Vg({page:e,totalImgs:t,direction:n,style:o,isLongStrip:i,isVertical:r,isRTL:s,spaceTop:l,scrollEl:a,isWebtoon:u,interferePlayer:c,onChangedPage:d,onFinished:f}){let p=!1,x=!1,_,D=!1,b;const P=ct(Q,300),A=Uo(()=>{Q(),P()},300),w=y=>(q(y),ct(q,50)(y));function g(){const y=new Promise(O=>{_=()=>{_=void 0,O()}});return K(e.value,{smooth:!1,ensureLastImgVisibility:!0}),y}function I(){var y;x=!0,_==null||_(),H(),(y=a.value)==null||y.addEventListener("scroll",A),setTimeout(()=>{const{width:O,height:$}=hn();ue(O,()=>{r.value&&w(e.value)}),ue($,()=>{r.value||w(e.value)}),ue(o,()=>w(e.value)),ue(n,()=>w(e.value)),/iPad|iPhone|iPod/.test(navigator.userAgent)&&ue(t,()=>{s.value&&w(e.value)})},300)}async function q(y){if(!(!x||p)){if(p=!0,await gt(),Y()===y){p=!1;return}K(y)}}function K(y,{smooth:O,ensureLastImgVisibility:$=!1}={smooth:!1}){const le=a.value;if(!le)return;p=!0;const ae=async()=>{await gt(),p=!1,x||I()},me=Math.floor(y),ge=vr(le,me);if(!ge){ae();return}c(async()=>{await R(le,!i.value&&O,async()=>{await k(le,ge,{smooth:O,page:y,ensureLastImgVisibility:$})}),await ae()})}async function R(y,O,$){O&&y.style.setProperty("scroll-snap-type","none"),await $(),O&&y.style.removeProperty("scroll-snap-type")}function Q(){if(p)return;const y=Y();y!==void 0&&y!==e.value&&d(y),H()}function H(){D||!D&&T()&&(D=!0,f())}function T(){const y=a.value;if(!y)return!1;const O=i.value?u.value?3:!r.value&&y.clientWidth>y.clientHeight?2.25:2.5:2;return r.value?y.scrollHeight-y.scrollTop<y.clientHeight*O:y.scrollWidth-(s.value?-y.scrollLeft:y.scrollLeft)<y.clientWidth*O}function Y(){const y=S();return y?(+y.getAttribute("data-index")||0)+(i.value?J(y):0):void 0}function S(){var O;if(b??(b=a.value.getRootNode()),!b)return;const y=(O=b.elementsFromPoint)==null?void 0:O.call(b,r.value||!i.value?window.innerWidth/2:s.value?window.innerWidth-wr:wr,r.value&&i.value?l.value||wr:window.innerHeight/2);if(y)for(let $=0;$<y.length;$++){const le=y[$];if(le.hasAttribute("data-index"))return le;if(le===a.value)break}}function J(y){const O=y.getBoundingClientRect();return r.value?Math.abs(O.top-l.value)/O.height:s.value?Math.max(0,O.right-a.value.clientWidth)/O.width:Math.abs(O.left)/O.width}let F=!1;async function k(y,O,$){if(F)return;const le=O.getBoundingClientRect();if(!i.value){if(r.value){if(le.top<=0&&le.bottom>=y.clientHeight)return}else if(le.left<=0&&le.right>=y.clientWidth)return}F=!0;const ae=r.value?y.scrollTop:y.scrollLeft,me=$.page,ge=i.value?me%1:0,Se=await gn(30,10,async()=>{await Qn();let ze;if(!(O.offsetHeight<10))return i.value?r.value?ze=O.offsetTop+ge*O.offsetHeight-l.value:s.value?ze=O.offsetLeft-y.clientWidth+O.offsetWidth-ge*O.offsetWidth:ze=O.offsetLeft+ge*O.offsetWidth:r.value?ze=O.offsetTop+(le.top>0?0:le.height-y.clientHeight):ze=O.offsetLeft+(le.left>0?0:le.width-y.clientWidth),me>.5&&Math.abs(ze)<100?void 0:ze})??0,De=$.ensureLastImgVisibility?r.value?Math.min(Se,y.scrollHeight-y.clientHeight*2):s.value?Math.max(Se,-(y.scrollWidth-y.clientWidth*2)):Math.min(Se,y.scrollWidth-y.clientWidth*2):Se;if(!$.smooth){r.value?y.scrollTop=De:y.scrollLeft=De,F=!1;return}const Ke=De-ae,ut=30;let Qe=0;return new Promise(ze=>{(function Tn(){const h=Ng(Qe,ae,Ke,ut);r.value?y.scrollTop=h:y.scrollLeft=h,Qe++,Qe<=ut?requestAnimationFrame(Tn):(ze(),F=!1)})()})}return{init:g,goToPage:K}}function Ng(e,t,n,o){return n*(Math.pow(e/o-1,3)+1)+t}class Rg{constructor(t){ke(this,"player");ke(this,"debounceStartPlayer");ke(this,"isPlaying");ke(this,"isIdle",ee(!1));ke(this,"onIdle");this.player=t.player,this.debounceStartPlayer=ct(()=>this.player.start(),100);const n=ee(t.autoPlay||sessionStorage.getItem("mp:playing")==="true");this.isPlaying=G({get:()=>n.value,set:o=>{n.value=o,sessionStorage.setItem("mp:playing",o?"true":"false")}}),this.onIdle=ct(()=>{this.isIdle.value=!0},t.touchDevice?2e3:1e3),this.awake(),t.touchDevice||St(window,"mousemove",()=>this.awake()),je(()=>{t.touchDevice||ue(Zi(),i=>{this.isPlaying.value&&(i==="visible"?this.player.start():this.player.stop())}),ue(t.speed,()=>this.interfere()),ue(t.isBusy,o=>{!o&&this.isIdle.value&&this.awake()})}),Mt(()=>this.stop())}activate(){this.isPlaying.value&&this.player.start()}toggle(){this.isPlaying.value?this.stop():this.start()}async interfere(t){this.isPlaying.value&&this.player.stop(),t&&(await gt(),await t()),this.isPlaying.value&&this.debounceStartPlayer()}stop(){this.isPlaying.value&&(this.isPlaying.value=!1,this.player.stop(),this.awake())}start(){this.isPlaying.value||(this.isPlaying.value=!0,this.player.start(),this.awake())}pause(){this.player.stop()}resume(){this.player.start()}awake(){setTimeout(()=>{this.isIdle.value=!1,this.onIdle()},30)}}class Pa extends Rg{getMaxOffset(t){return t.scrollHeight-t.clientHeight}getScrollOffset(t){return t.scrollTop}setScrollOffset(t,n){t.scrollTop+=n}constructor(t){let n,o;const{scrollEl:i,speed:r}=t;super({...t,player:{stop:()=>o==null?void 0:o(),start:()=>{const s=i.value;if(!this.isPlaying.value||!s)return;const l=this.getMaxOffset(s),a=this.getScrollOffset(s);if(l<=a){this.stop();return}o=()=>{n=Date.now(),o=void 0};const u=Date.now();n=u;const c=.1*r.value;let d=Date.now(),f=0;const p=()=>{if(n!==u)return;const x=Date.now(),_=x-d;d=x;const D=c*_+f;D>=1?(f=D%1,this.setScrollOffset(s,D-f)):f=D,setTimeout(p,1)};p()}}})}}class Hg extends Pa{constructor(n){super(n);ke(this,"isLongStrip");ke(this,"isVertical");ke(this,"isRTL");const{isLongStrip:o,isVertical:i,isRTL:r}=n;this.isLongStrip=o,this.isVertical=i,this.isRTL=r,o!==void 0&&je(()=>{ue(o,s=>{s||stop()})})}getMaxOffset(n){return this.isVertical.value?n.scrollHeight-n.clientHeight:n.scrollWidth-n.clientWidth}getScrollOffset(n){return this.isVertical.value?n.scrollTop:this.isRTL.value?-n.scrollLeft:n.scrollLeft}setScrollOffset(n,o){n[this.isVertical.value?"scrollTop":"scrollLeft"]+=o*(this.isRTL.value?-1:1)}start(){var n;((n=this.isLongStrip)==null?void 0:n.value)!==!1&&super.start()}}function Fg(e){return new Hg(e)}function Wg({speed:e,fontSize:t,lineHeight:n,...o}){const i=hn().width;return new Pa({...o,speed:G(()=>{const r=900/Math.min(900,i.value)/3.5,s=t.value/48*1.75,l=n.value/96*1.75,a=r*s*l;return e.value*a})})}const qg={key:3,class:"fixed inline-block left-1/2 -translate-x-1/2 bottom-0 p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3"},Ma=pe({inheritAttrs:!1,__name:"GearSecond",props:{chapterNavData:{type:Object},busy:{type:Boolean},defaultPreferences:{type:Object},immediate:{type:Boolean},appVersion:{type:String},raw:{type:Object},spec:{type:Object},siteMeta:{type:null},page:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},entryId:{type:String},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean},offlineMode:{type:Boolean}},emits:["clickEntryButton","hideReader","openHelpScreen","error","crash","ready","pageChanged","playingChanged","tourEnabledChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","timeout","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var V,N;const n=e,o=t,i=ee(!1),r=ee(!1),s=G(()=>n.busy),l=G(()=>n.page),a=G(()=>n.immediate||i.value?n.spaceTop??0:0),u=G(()=>!n.touchDevice&&S.isIdle.value&&!n.busy&&!I.value),{asyncImgs:c,isWebtoon:d}=jg({raw:G(()=>n.raw),spec:n.spec,page:l,touchDevice:n.touchDevice,isAutoShow:n.isAutoShow,async onReady(E){me(E),i.value=!0},onError:()=>o("error"),onTimeout:()=>o("timeout")}),{direction:f,style:p,isRTL:x,isDouble:_,isVertical:D,isLongStrip:b,gap:P,speed:A,zoom:w,breakFirst:g}=ph({touchDevice:n.touchDevice,isWebtoon:d,titleName:(V=n.raw)==null?void 0:V.title.name,defaultPreferences:G(()=>n.defaultPreferences)}),I=ee(!1),q=Bg(c,_,g),K=G(()=>c.value.length),R=G(()=>l.value>=K.value),Q=ee(null),H=ee(null),T=G(()=>{var E;return(E=H.value)==null?void 0:E.rootEl}),Y=ee(!1),S=Fg({autoPlay:!n.tourEnabled&&(((N=n.defaultPreferences)==null?void 0:N.autoPlay)??!1),touchDevice:n.touchDevice,scrollEl:T,speed:A,isRTL:x,isVertical:D,isLongStrip:b,isBusy:s}),J=G({get(){return w.value},set(E){S.interfere(()=>{w.value=E})}}),F=Ca({touchDevice:n.touchDevice,isBusy:s,isPlaying:G(()=>S.isPlaying.value),isIdle:G(()=>S.isIdle.value),hideControlsEvent:G(()=>n.defaultPreferences.hideControlsEvent),scrollEl:T}),k=F.visible,y=Vg({page:l,totalImgs:K,style:p,direction:f,isLongStrip:b,isVertical:D,isRTL:x,spaceTop:a,isWebtoon:d,scrollEl:G(()=>{var E;return(E=H.value)==null?void 0:E.rootEl}),interferePlayer:E=>S.interfere(E),onChangedPage:me,onFinished:()=>o("finished")}),O=G(()=>Math.floor(l.value)),$=G(()=>b.value?l.value:_.value?Tn():Math.floor(l.value)),le=()=>S.interfere(()=>Qn(100));$t({onKeyDown:E=>{if(n.tourEnabled)return!0;const C=b.value&&D.value,L=b.value&&!D.value,j=!b.value&&D.value,re=!b.value&&!D.value;switch(E.key){case" ":E.preventDefault(),b.value||h();break;case"ArrowUp":case"PageUp":C?le():j&&O.value!==0&&(E.preventDefault(),Qe());break;case"ArrowDown":case"PageDown":C?le():j&&!R.value&&(E.preventDefault(),ze());break;case"ArrowLeft":L?le():re?(E.preventDefault(),Ke()):D.value&&De();break;case"ArrowRight":L?le():re?(E.preventDefault(),ut()):D.value&&Se();break;case"Escape":E.preventDefault();break}},onKeyUp:E=>{switch(E.key){case"b":g.value=!g.value;break}}}),ue(S.isPlaying,E=>{o("playingChanged",E)}),ue(k,E=>{o("controlsVisibilityChanged",E)});async function ae(){await y.init(),o("ready"),r.value=!0,F.activate(),S.activate()}function me(E){if(l.value===E)return;const C=c.value.length;if(E<0||E>=C+1)return;const L=Math.floor(E*100)/100;if(L===l.value)return;const j=l.value;if(o("pageChanged",L),E<.01&&j>E){S.awake();return}}function ge(){!n.touchDevice&&!b.value&&y.goToPage(O.value,{smooth:!0})}function Se(E=!1){var C,L;(L=(C=n.chapterNavData)==null?void 0:C.next)==null||L.call(C,E)}function De(E=!1){var C,L;(L=(C=n.chapterNavData)==null?void 0:C.prev)==null||L.call(C,E)}function Ke(){x.value?ze():Qe()}function ut(){x.value?Qe():ze()}function Qe(){var L;const E=q.value,C=R.value?E[E.length-1][0].index:(L=E[Tn()-1])==null?void 0:L[0].index;C!==void 0?y.goToPage(C):De()}function ze(){var E,C;if(R.value)Se();else{const L=((C=(E=q.value[Tn()+1])==null?void 0:E[0])==null?void 0:C.index)??c.value.length;y.goToPage(L)}}function Tn(){const E=O.value,C=q.value.findIndex(L=>L.some(({index:j})=>j===E));return C===-1?q.value.length-1:C}function h(E){F.toggle(E)}function m(){if(S.isPlaying.value){k.value||!n.touchDevice?S.stop():(S.awake(),F.toggle(!0));return}F.toggle()}function M(){S.stop(),o("clickEntryButton")}function W(){F.toggle(!1),S.isPlaying.value&&S.stop(),o("openHelpScreen")}return(E,C)=>e.immediate||i.value?(v(),oe(hr,{key:0,ref_key:"gearLayout",ref:Q,loading:!r.value,immediate:!!e.immediate,idle:u.value,class:"text-stone-100",onClick:C[20]||(C[20]=Le(()=>{},["stop"]))},{default:ne(()=>{var L,j,re,te;return[i.value?(v(),oe(ha,{key:0,ref_key:"body",ref:H,zoom:J.value,"onUpdate:zoom":C[1]||(C[1]=X=>J.value=X),zooming:I.value,"onUpdate:zooming":C[2]||(C[2]=X=>I.value=X),page:l.value,"page-index":O.value,pages:Z(q),"total-imgs":Z(c).length,direction:Z(f),gap:Z(P),"is-long-strip":Z(b),isRTL:Z(x),"is-double":Z(_),"is-vertical":Z(D),"space-top":a.value||0,busy:s.value,"play-controller":Z(S),"touch-device":e.touchDevice,"pinch-to-zoome":((L=e.defaultPreferences)==null?void 0:L.pinchToZoom)??!0,"tap-zone":(j=e.defaultPreferences)==null?void 0:j.tapZone,"controls-visible":Z(k),onReady:ae,onPrev:Qe,onNext:ze,onClick:m,onDragEnd:ge,onWheelPassive:C[3]||(C[3]=()=>Z(S).interfere())},Mi({_:2},[i.value&&Z(c).length?{name:"end",fn:ne(()=>{var X,ce;return[B(Gi,{"has-next":!!((X=e.chapterNavData)!=null&&X.next),"offline-mode":!!e.offlineMode,seconds:((ce=e.defaultPreferences)==null?void 0:ce.autoNextSeconds)??5,"show-add-button":Z(w)===1&&!e.entryId&&!!e.raw&&!e.offlineMode,onNext:Se,onAddToLibrary:M,onHide:C[0]||(C[0]=()=>o("hideReader"))},null,8,["has-next","offline-mode","seconds","show-add-button"])]}),key:"0"}:void 0]),1032,["zoom","zooming","page","page-index","pages","total-imgs","direction","gap","is-long-strip","isRTL","is-double","is-vertical","space-top","busy","play-controller","touch-device","pinch-to-zoome","tap-zone","controls-visible"])):se("",!0),B(br,{modelValue:Y.value,"onUpdate:modelValue":C[10]||(C[10]=X=>Y.value=X),"enable-help":"",name:(re=e.raw)==null?void 0:re.title.name,"space-top":a.value,"enable-default-preferences":!e.touchDevice||!!e.appVersion,onHelp:W,onMore:C[11]||(C[11]=()=>o("openDefaultPreferences"))},{"tab-preferences":ne(()=>[B(da,{"enable-reset":!e.touchDevice||!!e.appVersion,webtoon:Z(d),"reader-style":Z(p),"onUpdate:readerStyle":C[4]||(C[4]=X=>$e(p)?p.value=X:null),direction:Z(f),"onUpdate:direction":C[5]||(C[5]=X=>$e(f)?f.value=X:null),gap:Z(P),"onUpdate:gap":C[6]||(C[6]=X=>$e(P)?P.value=X:null),speed:Z(A),"onUpdate:speed":C[7]||(C[7]=X=>$e(A)?A.value=X:null),zoom:J.value,"onUpdate:zoom":C[8]||(C[8]=X=>J.value=X),"default-preferences":e.defaultPreferences},null,8,["enable-reset","webtoon","reader-style","direction","gap","speed","zoom","default-preferences"])]),"tab-default":ne(()=>[B(fr,{"model-value":e.defaultPreferences,"onUpdate:modelValue":C[9]||(C[9]=X=>o("defaultPreferencesChanged",X))},null,8,["model-value"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),r.value&&!R.value&&!e.tourEnabled?(v(),oe(la,{key:1,direction:Z(f),"tap-zone":(te=e.defaultPreferences)==null?void 0:te.tapZone},null,8,["direction","tap-zone"])):se("",!0),r.value&&!R.value?(v(),oe(gr,{key:2,playing:Z(S).isPlaying.value},null,8,["playing"])):se("",!0),B(aa,{visible:Z(k),"space-top":a.value},Mi({top:ne(()=>{var X;return[e.raw||e.offlineMode?(v(),oe(Ji,{key:0,"offline-mode":e.offlineMode,raw:e.raw,onClick:C[12]||(C[12]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):se("",!0),!e.touchDevice&&!e.offlineMode?(v(),oe(Yo,{key:1,onClick:C[13]||(C[13]=()=>o("hideReader"))})):se("",!0),e.chapterNavData?(v(),oe(sr,{key:2,"touch-device":e.touchDevice,"chapter-spec":(X=e.spec)==null?void 0:X.chapter,data:e.chapterNavData,rtl:Z(x),onGetHiddenChapters:C[14]||(C[14]=()=>o("getHiddenChapters")),onPrev:De,onNext:Se},null,8,["touch-device","chapter-spec","data","rtl"])):se("",!0)]}),"bottom-right":ne(()=>[!e.offlineMode&&e.raw?(v(),oe(Qi,{key:0,"entry-id":e.entryId,onClick:M},null,8,["entry-id"])):se("",!0),B(or,{disabled:!i.value,onClick:C[15]||(C[15]=()=>Y.value=!0)},null,8,["disabled"]),e.touchDevice?se("",!0):(v(),oe(ir,{key:1,onRequestFullScreen:C[16]||(C[16]=()=>{var X,ce;return(ce=(X=Q.value)==null?void 0:X.rootEl)==null?void 0:ce.requestFullscreen()})})),Z(b)?(v(),oe(nr,{key:2,"tour-message":"Press here to play like a video",playing:Z(S).isPlaying.value,disabled:!r.value,onClick:C[17]||(C[17]=()=>Z(S).toggle())},null,8,["playing","disabled"])):se("",!0),Z(_)?(v(),oe(Ge,{key:3,title:"Break 1st page (B)","data-tour":"Press here to separate the first page from double-page mode",disabled:!r.value,onClick:C[18]||(C[18]=()=>g.value=!Z(g))},{default:ne(()=>[Z(g)?(v(),oe(ua,{key:0})):(v(),oe(ca,{key:1}))]),_:1},8,["disabled"])):se("",!0)]),progress:ne(()=>{var X,ce;return[((X=e.defaultPreferences)==null?void 0:X.progressSize)!==0&&!R.value?(v(),oe(mr,{key:0,value:$.value,total:Z(q).length,"long-strip":Z(b),height:((ce=e.defaultPreferences)==null?void 0:ce.progressSize)??2,rtl:Z(x)},null,8,["value","total","long-strip","height","rtl"])):se("",!0)]}),default:ne(()=>[e.appVersion&&a.value&&!e.offlineMode?(v(),z("div",{key:0,class:"fixed top-0 left-0 right-0 bg-black bg-opacity-70 pointer-events-auto",style:Pe({height:`${a.value}px`})},null,4)):se("",!0)]),_:2},[Z(q).length?{name:"bottom-left",fn:ne(()=>[B(fa,{"model-value":O.value,disabled:!r.value,pages:Z(q),"total-imgs":Z(c).length,"onUpdate:modelValue":Z(y).goToPage},null,8,["model-value","disabled","pages","total-imgs","onUpdate:modelValue"])]),key:"0"}:void 0]),1032,["visible","space-top"]),Z(k)||I.value?(v(),z("div",qg,[B(Vo,{name:"fade","enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ne(()=>[I.value||Z(w)!==1?(v(),oe(ql,{key:0,zoom:J.value,onClick:C[19]||(C[19]=Le(()=>J.value=1,["stop"])),class:"duration-200"},null,8,["zoom"])):se("",!0)]),_:1})])):se("",!0),xe(E.$slots,"default")]}),_:3},8,["loading","immediate","idle"])):se("",!0)}}),Ug=Object.freeze(Object.defineProperty({__proto__:null,default:Ma},Symbol.toStringTag,{value:"Module"}));function Kg({sel:e,heading:t}){const o="h1, h2, h3, h4, h5, h6, p, blockquote, pre, code, strong, b, em, i, small, sub, sup, mark, time, abbr, br, hr".split(",").map(d=>d.trim()),i=["br","hr"],r=["button","figure","img","script","select","input","form","iframe","nav","footer","aside","table"],s=Zg(e),l=Yg(s),a=u(s);if(!a)return;if(t){const d=document.createElement("h1");d.innerText=t,a.prepend(d)}return{el:a,isRTL:l};function u(d){let f=0,p=!1,x=0,_=!1;const D=b(d);if(!D)return;Xg(D),c(D);function b(P,A=!1){var Y;if(_)return;if(P.nodeType===Node.TEXT_NODE)return A||(Y=P.textContent)!=null&&Y.trim()?P.cloneNode():void 0;if(P.nodeType!==Node.ELEMENT_NODE)return;const g=P.tagName.toLocaleLowerCase();if(r.includes(g)||g==="a"&&!A||P.getAttribute("aria-hidden")==="true")return;const I=window.getComputedStyle(P);if(!(I.display!=="none"&&+(I.opacity??"1")>.1&&I.position!=="fixed"))return;const K=Array.from(P.childNodes);if(!K.length)return i.includes(g)?document.createElement(P.tagName):void 0;const R=A||o.includes(g),Q=[];if(K.forEach(S=>{if(_)return;const J=b(S,R);J?(Q.push(J),p?x=0:++f>30&&(p=!0)):p&&++x>30&&(_=!0)}),!Q.length)return;const H=document.createElement(g==="body"?"div":g==="a"?"span":g),T=P.getAttribute("dir");return T&&T!=="auto"&&H.setAttribute("dir",T),Q.forEach(S=>H.appendChild(S)),H}return D}function c(d){Ea(d,f=>{if(f===d||o.includes(f.tagName.toLowerCase()))return;const p=f.parentElement;if((p==null?void 0:p.childNodes.length)===1){Array.from(f.childNodes).forEach(D=>{p.appendChild(D)}),p.removeChild(f);return}f.childNodes.length===1&&f.replaceWith(f.childNodes[0])})}}function Zg(e){const t=(e??"main,article").split(",").filter(Boolean);for(const o of t){const i=document.querySelector(o);if(i)return i}const n=document.querySelector("p:has(+ p), h1, h2");if(n){let o=n;for(;o!==document.body;)o=o.parentElement;return o}return document.body}function Yg(e){if(e.getAttribute("dir")==="rtl")return!0;const t=e.querySelector("p")||e.querySelector("div:not(:empty)")||e;return t.getAttribute("dir")==="rtl"?!0:window.getComputedStyle(t).direction==="rtl"}function Xg(e){xr(e,t=>Array.from(t.children),t=>!t.textContent.trim()),xr(e,t=>Array.from(t.children).reverse(),t=>{if(!t.textContent.trim())return!0;const n=t.tagName;return n.length===2&&n.startsWith("H")})}function Ea(e,t){Array.from(e.children).forEach(o=>{Ea(o,t)}),t(e)}function xr(e,t,n){const o=t(e);for(let i=0;i<o.length;i++){const r=o[i];if(!xr(r,t,n))return!1;Gg(r)}return n(e)}function Gg(e){var t;(t=e.parentNode)==null||t.removeChild(e)}const Jg={key:1,class:"h-14 sm:h-16 px-2 2xs:px-3 flex gap-1 2xs:gap-3 items-center"},Qg={class:"md:fixed left-0 right-0 bottom-0"},em={class:"p-2 2xs:px-3 sm:py-3 pb-6 md:pb-5 lg:pb-3 flex md:flex-col gap-4 justify-between items-center"},Ia=pe({__name:"GearThirdControlsLayout",props:{visible:{type:Boolean},hideTopControls:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(v(),z(be,null,[U("div",{class:fe(["fixed left-0 right-0 top-0 bg-inherit z-30",{"opacity-0 pointer-events-none":!e.visible}])},[e.spaceTop?(v(),z("div",{key:0,style:Pe({height:`${e.spaceTop}px`}),class:"bg-gradient-to-b from-black to-transparent"},null,4)):se("",!0),e.hideTopControls?se("",!0):(v(),z("div",Jg,[xe(t.$slots,"top-controls")]))],2),U("div",{class:fe(["fixed left-0 right-0 bottom-0 md:left-auto z-30 bg-inherit md:bg-transparent",{"opacity-0 pointer-events-none":!e.visible}])},[U("div",Qg,[xe(t.$slots,"progress")]),U("div",em,[xe(t.$slots,"bottom-controls")])],2),xe(t.$slots,"default")],64))}}),tm=Object.freeze(Object.defineProperty({__proto__:null,default:Ia},Symbol.toStringTag,{value:"Module"})),nm={},om={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function im(e,t){return v(),z("svg",om,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M16 13q-.425 0-.712-.288T15 12t.288-.712T16 11h6q.425 0 .713.288T23 12t-.288.713T22 13zM4.675 15.425l-1.025 2.85q-.125.35-.4.538T2.625 19q-.575 0-.913-.487t-.137-1.038l4.4-11.725Q6.1 5.4 6.4 5.2t.65-.2h.9q.375 0 .663.2t.412.55L13.45 17.5q.2.55-.137 1.025T12.4 19q-.35 0-.65-.2t-.425-.55l-1-2.825zM5.4 13.4h4.2L7.55 7.6h-.1z"},null,-1)])])}const Oa=ve(nm,[["render",im]]),rm=Object.freeze(Object.defineProperty({__proto__:null,default:Oa},Symbol.toStringTag,{value:"Module"})),sm={},lm={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function am(e,t){return v(),z("svg",lm,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"m4.675 15.425l-1.025 2.85q-.125.35-.4.538T2.625 19q-.575 0-.913-.487t-.137-1.038l4.4-11.725Q6.1 5.4 6.4 5.2t.65-.2h.9q.375 0 .663.2t.412.55L13.45 17.5q.2.55-.137 1.025T12.4 19q-.35 0-.65-.2t-.425-.55l-1-2.825zM5.4 13.4h4.2L7.55 7.6h-.1zM18 13h-2q-.425 0-.712-.288T15 12t.288-.712T16 11h2V9q0-.425.288-.712T19 8t.713.288T20 9v2h2q.425 0 .713.288T23 12t-.288.713T22 13h-2v2q0 .425-.288.713T19 16t-.712-.288T18 15z"},null,-1)])])}const $a=ve(sm,[["render",am]]),cm=Object.freeze(Object.defineProperty({__proto__:null,default:$a},Symbol.toStringTag,{value:"Module"})),za=ve(pe({__name:"NovelBody",props:{hideTopControls:{type:Boolean},progress:{type:Number},touchDevice:{type:Boolean},busy:{type:Boolean},spaceTop:{type:null},content:{type:null},rtl:{type:Boolean},titlePreferences:{type:Object},defaultPreferences:{type:Object}},emits:["ready","click","progressChanged","finished"],setup(e,{expose:t,emit:n}){const o=e,i=n,r=ee(!1),s=ee(),l=ee(),a=Uo(()=>{const c=s.value;if(!c)return;const{clientHeight:d,scrollHeight:f,scrollTop:p}=c,x=f-2*d,_=p/x;i("progressChanged",Math.min(1,Math.round(_*100)/100))},30);t({scrollEl:s}),$t({onKeyDown(){var c;o.busy||(c=s.value)==null||c.focus()}}),je(()=>{ue(()=>o.content,d=>{const f=l.value;f&&(Array.from(f.children).forEach(p=>{f.removeChild(p)}),f.appendChild(d),setTimeout(()=>{const p=s.value;if(p){f.offsetHeight<=p.clientHeight&&i("finished");const{progress:x}=o;x&&u(x)}r.value=!0,i("ready")}))},{immediate:!0});const c=hn();ue(()=>{const{fontFamily:d,fontSize:f,lineHeight:p}=o.titlePreferences;return`${d}-${f}-${p}-${c.width.value}`},async()=>{const d=o.progress;await gt(),u(d)})});function u(c){const d=s.value;d&&(d.scrollTop=c*(d.scrollHeight-2*d.clientHeight))}return(c,d)=>(v(),z("div",{ref_key:"scrollContainer",ref:s,tabindex:"0",class:fe(["novel-body",{"scrollbar-sm":!e.touchDevice,"scrollbar-none":e.touchDevice,"opacity-0":!r.value,"pt-16 sm:pt-18 md:pt-20":!e.hideTopControls,"pt-5 sm:pt-9 md:pt-12":e.hideTopControls}]),style:Pe({fontFamily:e.titlePreferences.fontFamily,"--font-size":`${e.titlePreferences.fontSize}px`,"--line-height":`${e.titlePreferences.lineHeight}px`,"--space-top":e.spaceTop?`${e.spaceTop}px`:void 0}),onClick:d[0]||(d[0]=()=>i("click")),onScroll:d[1]||(d[1]=(...f)=>Z(a)&&Z(a)(...f))},[U("div",cn({ref_key:"contentContainer",ref:l,class:"novel-body__content"},e.rtl?{dir:"rtl"}:{}),null,16),xe(c.$slots,"end")],38))}}),[["styles",['.novel-body{top:0;right:0;bottom:0;left:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding-left:32px;padding-right:32px;position:fixed}.novel-body:focus{outline:2px solid transparent;outline-offset:2px}@media (min-width:640px){.novel-body{padding-left:48px;padding-right:48px}}@media (min-width:768px){.novel-body{padding-left:56px;padding-right:56px}}@media (min-width:1024px){.novel-body{padding-left:64px;padding-right:64px}}@media (min-width:1280px){.novel-body{padding-left:80px;padding-right:80px}}.novel-body{font-size:var(--font-size);letter-spacing:.01em;line-height:var(--line-height)}.novel-body:before{content:"";display:block;height:var(--space-top,0)}.novel-body__content{margin-left:auto;margin-right:auto;max-width:1040px;min-height:100%}.novel-body hr{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1));margin:calc(var(--line-height)*.5) 0}.novel-body h1,.novel-body h2,.novel-body h3,.novel-body h4,.novel-body h5,.novel-body h6{font-weight:500}.novel-body h1{font-size:calc(var(--font-size)*1.5);line-height:calc(var(--font-size)*.5 + var(--line-height))}.novel-body h2{font-size:calc(var(--font-size)*1.25);line-height:calc(var(--font-size)*.25 + var(--line-height))}.novel-body h3{font-size:calc(var(--font-size)*1.125);line-height:calc(var(--font-size)*.125 + var(--line-height))}.novel-body h5,.novel-body h6,.novel-body p{font-size:inherit;line-height:inherit}.novel-body blockquote,.novel-body figure,.novel-body h1,.novel-body h2,.novel-body h3,.novel-body h4,.novel-body h5,.novel-body h6,.novel-body img,.novel-body ol,.novel-body p,.novel-body ul{margin-bottom:calc(var(--line-height)*.5)}.novel-body pre{background-color:transparent;border-style:none;display:block;font-family:inherit;margin:0;padding:0;white-space:normal}']]]),um=Object.freeze(Object.defineProperty({__proto__:null,default:za},Symbol.toStringTag,{value:"Module"})),Da=pe({inheritAttrs:!1,__name:"GearThird",props:{chapterNavData:{type:Object},busy:{type:Boolean},defaultPreferences:{type:Object},immediate:{type:Boolean},appVersion:{type:String},raw:{type:Object},spec:{type:Object},siteMeta:{type:null},page:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},entryId:{type:String},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean},offlineMode:{type:Boolean}},emits:["clickEntryButton","hideReader","openHelpScreen","error","crash","ready","pageChanged","playingChanged","tourEnabledChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","timeout","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var Y,S,J,F,k,y;const n=e,o=t,i=ee(null),r=((Y=n.raw)==null?void 0:Y.novel)??Kg({sel:(S=n.spec)==null?void 0:S.content,heading:(J=n.raw)==null?void 0:J.name});r===void 0&&o("error");const s=ee(r==null?void 0:r.el),l=ee(!!(r!=null&&r.isRTL)),a=ee(!1),u=ee(!1),c=G(()=>n.page),d=G(()=>n.busy),f=ee(null),p=G(()=>{var O;return(O=f.value)==null?void 0:O.scrollEl}),x=(k=(F=n.raw)==null?void 0:F.title)==null?void 0:k.name,_=x?ia(x):location.hostname,D=Zd(`mpr:${_}`,{}),b=G({get(){var ae,me;const O=n.defaultPreferences,$=((ae=D.value)==null?void 0:ae.fontSize)??O.fontSize,le=Math.max($,((me=D.value)==null?void 0:me.lineHeight)??O.lineHeight);return{fontFamily:O.fontFamily,speed:O.speed,...D.value,contrast:O.contrast,fontSize:$,lineHeight:le}},set(O){const $={...O},le=n.defaultPreferences;Object.keys($).forEach(ae=>{$[ae]===le[ae]&&delete $[ae]}),D.value=$}}),P=Wg({isBusy:d,speed:G(()=>b.value.speed),fontSize:G(()=>b.value.fontSize),lineHeight:G(()=>b.value.lineHeight),autoPlay:!!((y=n.defaultPreferences)!=null&&y.autoPlay),touchDevice:n.touchDevice,scrollEl:p}),A=G(()=>!n.touchDevice&&P.isIdle.value&&!d.value),w=Ca({touchDevice:n.touchDevice,moveThreshold:50,isBusy:d,isPlaying:G(()=>P.isPlaying.value),isIdle:G(()=>P.isIdle.value),hideControlsEvent:G(()=>n.defaultPreferences.hideControlsEvent),scrollEl:p}),g=w.visible;ue(P.isPlaying,O=>{o("playingChanged",O)}),ue(g,O=>{o("controlsVisibilityChanged",O)}),I(document.documentElement),I(document.body);function I(O){const $=O.style.getPropertyValue("overflow");$!=="hidden"&&(O.style.setProperty("overflow","hidden","important"),Mt(()=>{$?O.style.setProperty("overflow",$):O.style.removeProperty("overflow")}))}function q(){o("ready"),w.activate(),P.activate()}function K(){P.stop(),o("clickEntryButton")}function R(O){u.value=O}function Q(){if(P.isPlaying.value){g.value||!n.touchDevice?P.stop():(P.awake(),w.toggle(!0));return}w.toggle()}function H(O){O!==n.page&&(o("pageChanged",Math.min(1,O)),O===1&&o("finished"))}function T(O){const $=b.value.fontSize+O;$>48||$<10||(b.value={...b.value,fontSize:$,lineHeight:Math.max(10,Math.min(96,Math.round(b.value.lineHeight/b.value.fontSize*$)))})}return(O,$)=>s.value?(v(),oe(hr,{key:0,ref_key:"gearLayout",ref:i,immediate:"",idle:A.value,class:"bg-stone-900",style:Pe({color:`rgba(255, 255, 255, ${e.defaultPreferences.contrast})`})},{default:ne(()=>{var le;return[B(za,{ref_key:"body",ref:f,progress:c.value,"touch-device":e.touchDevice,busy:d.value,"space-top":e.spaceTop,content:s.value,rtl:l.value,"title-preferences":b.value,"default-preferences":e.defaultPreferences,"hide-top-controls":!e.raw,onClick:Q,onProgressChanged:H,onReady:q},{end:ne(()=>{var ae,me;return[B(Gi,{"has-next":!!((ae=e.chapterNavData)!=null&&ae.next),"offline-mode":!!e.offlineMode,seconds:((me=e.defaultPreferences)==null?void 0:me.autoNextSeconds)??5,onNext:$[0]||($[0]=()=>{var ge,Se;return(Se=(ge=e.chapterNavData)==null?void 0:ge.next)==null?void 0:Se.call(ge,!1)}),onVisibilityChanged:R,onHide:$[1]||($[1]=()=>o("hideReader")),onFinished:$[2]||($[2]=()=>o("finished"))},null,8,["has-next","offline-mode","seconds"])]}),_:1},8,["progress","touch-device","busy","space-top","content","rtl","title-preferences","default-preferences","hide-top-controls"]),!e.touchDevice&&!e.raw&&!e.offlineMode?Ne((v(),oe(Yo,{key:0,class:"hidden md:inline-block fixed left-3 top-2",transparent:"",onClick:$[3]||($[3]=()=>o("hideReader"))},null,512)),[[pl,Z(g)]]):se("",!0),B(Ia,{visible:Z(g),"hide-top-controls":!e.raw,"space-top":e.spaceTop},{"top-controls":ne(()=>{var ae;return[e.raw||e.offlineMode?(v(),oe(Ji,{key:0,"offline-mode":e.offlineMode,raw:e.raw,transparent:"",onClick:$[4]||($[4]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):se("",!0),e.raw&&!e.touchDevice&&!e.offlineMode?(v(),oe(Yo,{key:1,transparent:"",onClick:$[5]||($[5]=()=>o("hideReader"))})):se("",!0),e.chapterNavData?(v(),oe(sr,{key:2,transparent:"","touch-device":e.touchDevice,"chapter-spec":(ae=e.spec)==null?void 0:ae.chapter,data:e.chapterNavData,rtl:l.value,onGetHiddenChapters:$[6]||($[6]=()=>o("getHiddenChapters")),onPrev:$[7]||($[7]=me=>{var ge,Se;return(Se=(ge=e.chapterNavData)==null?void 0:ge.prev)==null?void 0:Se.call(ge,me)}),onNext:$[8]||($[8]=me=>{var ge,Se;return(Se=(ge=e.chapterNavData)==null?void 0:ge.next)==null?void 0:Se.call(ge,me)})},null,8,["touch-device","chapter-spec","data","rtl"])):se("",!0)]}),"bottom-controls":ne(()=>[!e.offlineMode&&e.raw?(v(),z(be,{key:0},[B(Qi,{"entry-id":e.entryId,transparent:"",onClick:K},null,8,["entry-id"]),$[19]||($[19]=U("div",{class:"hidden 2xs:inline-block md:hidden flex-grow"},null,-1))],64)):se("",!0),B(Ge,{transparent:"",onClick:$[9]||($[9]=()=>T(-1))},{default:ne(()=>[B(Oa)]),_:1}),B(Ge,{transparent:"",onClick:$[10]||($[10]=()=>T(1))},{default:ne(()=>[B($a)]),_:1}),B(or,{transparent:"",onClick:$[11]||($[11]=()=>a.value=!0)}),e.touchDevice?se("",!0):(v(),oe(ir,{key:1,transparent:"",onRequestFullScreen:$[12]||($[12]=()=>{var ae,me;return(me=(ae=i.value)==null?void 0:ae.rootEl)==null?void 0:me.requestFullscreen()})})),B(nr,{transparent:"","tour-message":"Press here to start listening",playing:Z(P).isPlaying.value,class:"order-2 md:order-4",onClick:$[13]||($[13]=()=>Z(P).toggle())},null,8,["playing"])]),progress:ne(()=>{var ae,me;return[((ae=e.defaultPreferences)==null?void 0:ae.progressSize)!==0?(v(),oe(mr,{key:0,value:c.value,height:((me=e.defaultPreferences)==null?void 0:me.progressSize)??2,rtl:l.value,opacity:e.defaultPreferences.contrast},null,8,["value","height","rtl","opacity"])):se("",!0)]}),_:1},8,["visible","hide-top-controls","space-top"]),u.value?se("",!0):(v(),oe(gr,{key:1,playing:Z(P).isPlaying.value},null,8,["playing"])),B(br,{modelValue:a.value,"onUpdate:modelValue":$[17]||($[17]=ae=>a.value=ae),name:(le=e.raw)==null?void 0:le.title.name,"space-top":(e.spaceTop??0)+80,"enable-default-preferences":!e.touchDevice||!!e.appVersion,onMore:$[18]||($[18]=()=>o("openDefaultPreferences"))},{"tab-preferences":ne(()=>[B(dr,{modelValue:b.value,"onUpdate:modelValue":$[14]||($[14]=ae=>b.value=ae),"default-preferences":e.defaultPreferences,"enable-reset":!e.touchDevice||!!e.appVersion,onReset:$[15]||($[15]=()=>D.value=null)},null,8,["modelValue","default-preferences","enable-reset"])]),"tab-default":ne(()=>[B(fr,{"is-novel":"","model-value":e.defaultPreferences,"onUpdate:modelValue":$[16]||($[16]=ae=>o("defaultPreferencesChanged",ae))},null,8,["model-value"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),xe(O.$slots,"default")]}),_:3},8,["idle","style"])):se("",!0)}}),dm=Object.freeze(Object.defineProperty({__proto__:null,default:Da},Symbol.toStringTag,{value:"Module"}));async function fm({siteMeta:e,spec:t}){var l;const n=e==null?void 0:e.contentTypes,o=!e||(n==null?void 0:n.includes(Qt.novel)),i=!n||n.includes(Qt.manga);if(!i&&!o)return;const r=(t==null?void 0:t.content)??"main,article,body",s=i?((l=t==null?void 0:t.content)==null?void 0:l.split(",").map(a=>a.trim()).filter(Boolean).map(a=>`${a} img:not(figure > img), ${a} canvas`).join(","))??r:void 0;return await gn(200,50,async()=>{const a=document.querySelector(r);if(a){if(o){const u=Array.from(a.querySelectorAll("p"));if(u.length){let c=!1,d=0;for(let f=0;f<u.length;f++)if(u[f].textContent.split(" ").length>20&&(d+=1,d===2)){c=!0;break}if(c)return Qt.novel}}if(s&&Array.from(a.querySelectorAll(s)).some(d=>pm(d)))return Qt.manga}})}function pm(e){const t=e.getBoundingClientRect();return ni(t.width,t.height)}function hm({raw:e,spec:t,siteMeta:n,offlineMode:o,onSelect:i}){var H,T,Y;const{vol:r,inferVol:s,chap:l,title:a,slug:u,basePath:c}=e,d=t==null?void 0:t.chapter;let f=-1;async function p(S,J){if(o){i({...S});return}if(S.slug){x(S.slug,J);return}if(S.elIndex===void 0||!(d!=null&&d.sel))return;let F=null;document.querySelector(d.sel)||(d!=null&&d.trigger&&(F=document.querySelector(d.trigger)),F&&(eo(F),await new Promise(y=>setTimeout(()=>y(),50))));const k=d&&d.sel&&!d.url?document.querySelectorAll(d.sel):void 0;k!=null&&k[S.elIndex]&&(eo(k[S.elIndex]),F&&document.querySelector(d.sel)&&eo(F))}function x(S,J){const F=gm(c,S,(n==null?void 0:n.trailing)??!0);J?window.open(F,"_blank","noopener"):location.href=F}function _(S){const J=w[S];return J?F=>p(J,F):void 0}function D(S,J,F){if(J)x(J,F);else if(S){const k=document.querySelector(S);k&&eo(k,{preventDefault:!1})}}const b=r??s,P=d==null?void 0:d.url,A=((H=a.chapters)==null?void 0:H.filter(S=>S.slug||!P&&S.elIndex!==void 0))??[],w=A.length>1?A:[],g=(T=e.prev)==null?void 0:T.slug,I=(Y=e.next)==null?void 0:Y.slug,q=t!=null&&t.prev&&typeof t.prev!="string"?t.prev.sel??t.prevBtn:t==null?void 0:t.prevBtn,K=t!=null&&t.next&&typeof t.next!="string"?t.next.sel??t.nextBtn:t==null?void 0:t.nextBtn;let R=g||q&&!w.length&&document.body.querySelector(q)?S=>D(q,g,S):void 0,Q=I||K&&!w.length&&document.body.querySelector(K)?S=>D(K,I,S):void 0;if(w.length){if(P&&(f=w.findIndex(S=>S.slug===e.slug)),f===-1&&(f=w.findIndex(S=>(S.vol??S.inferVol)===b&&S.chap===l)),P&&f===-1&&(f=w.findIndex(S=>S.slug&&u.startsWith(`${S.slug}-`)&&u.length-S.slug.length>3)),f!==-1)R??(R=_(f+1)),Q??(Q=_(f-1));else if(!g&&!I){const S=w.findIndex(J=>{const F=J.vol??J.inferVol;return b===void 0||F===void 0||b===F?J.chap<l:F<b});S!==-1?(R=_(S),Q=_(S-1)):Q=_(w.length-1)}}return{activeIndex:f,activeLabel:Aa({vol:r,chap:l}),prev:R,next:Q,chapters:w.map(S=>({label:Aa(S),select:J=>p(S,J)}))}}function Aa({vol:e,chap:t}){return e==null?`Ch.${t}`:`Vol.${e} ch.${t}`}function gm(e,t,n){const o=!t||t.includes("//")||t.startsWith("/")?t:"/"+[...e.split("/"),...t.split("/")].filter(Boolean).join("/"),[i,r]=(o.includes("//")?o:location.origin+o).split("?");return[i.endsWith("/")===n?i:n?i+"/":i.substring(0,-1),r].filter(Boolean).join("?")}function mm(e){return e instanceof Error?JSON.stringify(e,Object.getOwnPropertyNames(e)):e}const ja=ve(pe({inheritAttrs:!1,__name:"App",props:{immediate:{type:Boolean},appVersion:{type:String},raw:{type:Object},spec:{type:Object},siteMeta:{type:null},page:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},entryId:{type:String},defaultPreferences:{type:Object},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean},offlineMode:{type:Boolean}},emits:["error","crash","ready","pageChanged","playingChanged","tourEnabledChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","timeout","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){const n=e,o=t;let i=!1;vs((b,P,A)=>{if(!i){i=!0;const g=`(3.0.1) ${(P==null?void 0:P.$options.name)??(P==null?void 0:P.$options.__name)??(P==null?void 0:P.$options.__file)}.${A}: ${mm(b)}`;o("crash",g)}return!1});const r=ee(n.raw?n.raw.contentType??Qt.manga:void 0);r.value===void 0&&fm({siteMeta:n.siteMeta,spec:n.spec}).then(b=>{b?r.value=b:o("error")});const s=ee(!1),l=Qd({touchDevice:n.touchDevice}),a=of(n.page,n.isAutoShow),u=G(()=>n.raw?hm({raw:n.raw,spec:n.spec,siteMeta:n.siteMeta,offlineMode:n.offlineMode,onSelect:b=>o("selectChapter",b)}):void 0);nf().addListener({onKeyUp:b=>{switch(b.key){case"h":_();break}}}),ef(()=>o("hapticFeedback"));const d=G(()=>{var w,g;const b=n.defaultPreferences,P=((w=n.defaultPreferences)==null?void 0:w.fontSize)??16,A=Math.max(P,((g=n.defaultPreferences)==null?void 0:g.lineHeight)??28);return{...b,speed:(b==null?void 0:b.speed)??1,progressSize:(b==null?void 0:b.progressSize)??2,autoNextSeconds:(b==null?void 0:b.autoNextSeconds)??5,hideControlsEvent:(b==null?void 0:b.hideControlsEvent)??tn.firstMove,autoPlay:(b==null?void 0:b.autoPlay)??!1,pinchToZoom:(b==null?void 0:b.pinchToZoom)??!0,readerStyle:(b==null?void 0:b.readerStyle)??Dt.longStrip,direction:(b==null?void 0:b.direction)??nt.vertical,gap:(b==null?void 0:b.gap)??0,fontFamily:"system-ui, sans-serif",contrast:.8,fontSize:P,lineHeight:A}});function f(){if(n.offlineMode){o("pressedBack");return}rf(),o("dispose")}function p(b){a.value=b,o("pageChanged",b)}function x(){n.entryId?o("openEntry",n.entryId):o("addEntry")}function _(b){s.value!==b&&(s.value=b??!s.value)}function D(){o("error"),f()}return(b,P)=>r.value!==void 0?(v(),oe(Pi(r.value===Z(Qt).novel?Da:Ma),cn({key:0,ref:"root"},n,{page:Z(a),busy:Z(l),"chapter-nav-data":u.value,"default-preferences":d.value,onOpenDefaultPreferences:P[1]||(P[1]=()=>o("openDefaultPreferences")),onDefaultPreferencesChanged:P[2]||(P[2]=A=>o("defaultPreferencesChanged",A)),onTimeout:P[3]||(P[3]=()=>o("timeout")),onReady:P[4]||(P[4]=()=>o("ready")),onFinished:P[5]||(P[5]=()=>o("finished")),onPlayingChanged:P[6]||(P[6]=A=>o("playingChanged",A)),onControlsVisibilityChanged:P[7]||(P[7]=A=>o("controlsVisibilityChanged",A)),onPressedBack:P[8]||(P[8]=()=>o("pressedBack")),onGetHiddenChapters:P[9]||(P[9]=()=>o("getHiddenChapters")),onError:D,onHideReader:f,onPageChanged:p,onClickEntryButton:x,onOpenHelpScreen:P[10]||(P[10]=()=>_(!0))}),{default:ne(()=>[s.value?(v(),oe(Ll,{key:0,"touch-device":e.touchDevice,onHide:_},null,8,["touch-device"])):se("",!0),e.tourEnabled?(v(),oe(Bl,{key:1,onHide:P[0]||(P[0]=()=>o("tourEnabledChanged",!1))})):se("",!0)]),_:1},16,["page","busy","chapter-nav-data","default-preferences"])):se("",!0)}}),[["styles",['*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:Helvetica,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}*{-webkit-tap-highlight-color:rgba(0,0,0,0)!important}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:none;border-style:none;cursor:pointer;outline:2px solid transparent;outline-offset:2px;white-space:nowrap}button[disabled]{cursor:default!important}svg{height:100%}.container,svg{width:100%}@media (min-width:300px){.container{max-width:300px}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}.scrollbar-sm{scrollbar-color:#777 transparent;scrollbar-width:thin}.scrollbar-sm::-webkit-scrollbar{background-color:transparent;height:4px;width:4px}.scrollbar-sm::-webkit-scrollbar-track{background:transparent}.scrollbar-sm::-webkit-scrollbar-thumb{background-color:#777;border-radius:2px}.\\!pointer-events-none{pointer-events:none!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\\!visible{visibility:visible!important}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-1{bottom:4px}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:4px}.left-1\\/2{left:50%}.left-10{left:40px}.left-3{left:12px}.left-9{left:36px}.right-0{right:0}.top-0{top:0}.top-1{top:4px}.top-1\\/2{top:50%}.top-10{top:40px}.top-2{top:8px}.top-9{top:36px}.top-full{top:100%}.-z-10{z-index:-10}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.order-2{order:2}.m-0{margin:0}.m-auto{margin:auto}.-mx-12{margin-left:-48px;margin-right:-48px}.-my-12{margin-bottom:-48px;margin-top:-48px}.-ml-20{margin-left:-80px}.-mr-3{margin-right:-12px}.-mt-2{margin-top:-8px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-5{margin-bottom:20px}.ml-1{margin-left:4px}.ml-auto{margin-left:auto}.mt-5{margin-top:20px}.box-border{box-sizing:border-box}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.\\!h-9{height:36px!important}.h-0{height:0}.h-1{height:4px}.h-1\\/3{height:33.333333%}.h-10{height:40px}.h-12{height:48px}.h-14{height:56px}.h-16{height:64px}.h-2{height:8px}.h-20{height:80px}.h-24{height:96px}.h-28{height:112px}.h-3{height:12px}.h-4{height:16px}.h-5{height:20px}.h-6{height:24px}.h-8{height:32px}.h-9{height:36px}.h-\\[101\\%\\]{height:101%}.h-full{height:100%}.max-h-\\[70vh\\]{max-height:70vh}.max-h-full{max-height:100%}.max-h-none{max-height:none}.min-h-full{min-height:100%}.w-0{width:0}.w-1{width:4px}.w-1\\/3{width:33.333333%}.w-10{width:40px}.w-12{width:48px}.w-14{width:56px}.w-2{width:8px}.w-2\\/3{width:66.666667%}.w-20{width:80px}.w-24{width:96px}.w-28{width:112px}.w-3{width:12px}.w-4{width:16px}.w-40{width:160px}.w-5{width:20px}.w-6{width:24px}.w-auto{width:auto}.w-full{width:100%}.w-min{width:-moz-min-content;width:min-content}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-xs{max-width:320px}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.origin-bottom{transform-origin:bottom}.origin-right{transform-origin:right}.origin-top{transform-origin:top}.\\!translate-y-full{--tw-translate-y:100%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\.5{--tw-translate-y:-6px}.-translate-y-1\\/2{--tw-translate-y:-50%}.-translate-y-1\\/2,.translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.translate-y-1\\.5{--tw-translate-y:6px}.-rotate-90,.translate-y-1\\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate:-90deg}.rotate-180{--tw-rotate:180deg}.rotate-180,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.scale-95,.scale-y-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-y-90{--tw-scale-y:.9}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-auto{cursor:auto}.cursor-default{cursor:default}.cursor-grabbing{cursor:grabbing}.cursor-none{cursor:none}.cursor-pointer{cursor:pointer}.touch-pan-x{--tw-pan-x:pan-x}.touch-pan-x,.touch-pan-y{touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y:pan-y}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.resize{resize:both}.\\!snap-none{scroll-snap-type:none!important}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-center{scroll-snap-align:center}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:4px}.gap-2{gap:8px}.gap-3{gap:12px}.gap-4{gap:16px}.gap-6{gap:24px}.gap-\\[1px\\]{gap:1px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:4px}.rounded-2xl{border-radius:16px}.rounded-\\[2\\.5rem\\]{border-radius:40px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:6px}.rounded-xl{border-radius:12px}.\\!rounded-l-none{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.\\!rounded-r-none{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.rounded-l-sm{border-bottom-left-radius:2px;border-top-left-radius:2px}.rounded-r-sm{border-bottom-right-radius:2px;border-top-right-radius:2px}.rounded-t-xl{border-top-left-radius:12px;border-top-right-radius:12px}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-t-\\[1px\\]{border-top-width:1px}.border-solid{border-style:solid}.border-none{border-style:none}.border-primary{--tw-border-opacity:1;border-color:rgb(184 92 56/var(--tw-border-opacity,1))}.border-stone-200{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.border-stone-400{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}.border-stone-500{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}.border-stone-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.border-textPrimary{--tw-border-opacity:1;border-color:rgb(251 130 82/var(--tw-border-opacity,1))}.border-opacity-30{--tw-border-opacity:.3}.border-opacity-70{--tw-border-opacity:.7}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-inherit{background-color:inherit}.bg-primary{--tw-bg-opacity:1;background-color:rgb(184 92 56/var(--tw-bg-opacity,1))}.bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.bg-stone-300{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.bg-stone-500{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.bg-stone-600{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}.bg-stone-800{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}.bg-stone-900{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.bg-textPrimary{--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\\!bg-opacity-100{--tw-bg-opacity:1!important}.bg-opacity-40{--tw-bg-opacity:.4}.bg-opacity-50{--tw-bg-opacity:.5}.bg-opacity-70{--tw-bg-opacity:.7}.bg-opacity-80{--tw-bg-opacity:.8}.bg-opacity-90{--tw-bg-opacity:.9}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-none{background-image:none}.from-black{--tw-gradient-from:#000 var(--tw-gradient-from-position);--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-0\\.5{padding:2px}.p-1{padding:4px}.p-2{padding:8px}.p-4{padding:16px}.p-6{padding:24px}.px-2{padding-left:8px;padding-right:8px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-5{padding-left:20px;padding-right:20px}.px-6{padding-left:24px;padding-right:24px}.px-8{padding-left:32px;padding-right:32px}.py-0\\.5{padding-bottom:2px;padding-top:2px}.py-1{padding-bottom:4px;padding-top:4px}.py-1\\.5{padding-bottom:6px;padding-top:6px}.py-2{padding-bottom:8px;padding-top:8px}.pb-6{padding-bottom:24px}.pb-7{padding-bottom:28px}.pb-8{padding-bottom:32px}.pl-1{padding-left:4px}.pr-2{padding-right:8px}.pt-1{padding-top:4px}.pt-1\\.5{padding-top:6px}.pt-12{padding-top:48px}.pt-16{padding-top:64px}.pt-20{padding-top:80px}.pt-5{padding-top:20px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-sans{font-family:Helvetica,sans-serif}.text-base{font-size:16px;line-height:24px}.text-sm{font-size:14px;line-height:20px}.text-xl{font-size:20px;line-height:28px}.font-medium{font-weight:500}.font-normal{font-weight:400}.lowercase{text-transform:lowercase}.leading-none{line-height:1}.text-stone-100{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.text-stone-200{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}.text-stone-300{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}.text-stone-400{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}.text-stone-50{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}.text-stone-800{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}.text-stone-900{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}.text-textPrimary{--tw-text-opacity:1;color:rgb(251 130 82/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-neutral-950{--tw-shadow-color:#0a0a0a;--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-bg{transition-duration:.15s;transition-property:background-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-0{transition-duration:0s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.children-pointer-events-auto>*{pointer-events:auto}.last\\:mb-0:last-child{margin-bottom:0}.last\\:border-b-transparent:last-child{border-bottom-color:transparent}@media (hover:hover) and (pointer:fine){.hover\\:bg-stone-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.hover\\:bg-stone-300:hover{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.hover\\:bg-stone-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}.hover\\:bg-stone-500:hover{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.hover\\:bg-stone-900:hover{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.hover\\:bg-opacity-10:hover{--tw-bg-opacity:.1}.hover\\:bg-opacity-50:hover{--tw-bg-opacity:.5}.hover\\:bg-opacity-80:hover{--tw-bg-opacity:.8}.hover\\:text-stone-100:hover{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-primary:focus{outline-color:#b85c38}@media (hover:hover) and (pointer:fine){.group:hover .group-hover\\:bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.group:hover .group-hover\\:bg-opacity-20{--tw-bg-opacity:.2}}@media (min-width:300px){.\\32xs\\:inline-block{display:inline-block}.\\32xs\\:gap-3{gap:12px}.\\32xs\\:px-3{padding-left:12px;padding-right:12px}}@media (min-width:640px){.sm\\:h-16{height:64px}.sm\\:w-\\[31rem\\]{width:496px}.sm\\:p-3{padding:12px}.sm\\:px-12{padding-left:48px;padding-right:48px}.sm\\:py-3{padding-bottom:12px;padding-top:12px}.sm\\:pt-18{padding-top:72px}.sm\\:pt-9{padding-top:36px}}@media (min-width:768px){.md\\:fixed{position:fixed}.md\\:left-auto{left:auto}.md\\:order-4{order:4}.md\\:inline-block{display:inline-block}.md\\:hidden{display:none}.md\\:flex-col{flex-direction:column}.md\\:bg-transparent{background-color:transparent}.md\\:px-14{padding-left:56px;padding-right:56px}.md\\:px-8{padding-left:32px;padding-right:32px}.md\\:pb-5{padding-bottom:20px}.md\\:pb-6{padding-bottom:24px}.md\\:pt-12{padding-top:48px}.md\\:pt-20{padding-top:80px}}@media (min-width:1024px){.lg\\:px-10{padding-left:40px;padding-right:40px}.lg\\:px-16{padding-left:64px;padding-right:64px}.lg\\:pb-3{padding-bottom:12px}.lg\\:pb-4{padding-bottom:16px}}@media (min-width:1280px){.xl\\:px-12{padding-left:48px;padding-right:48px}}']]]),vm=Object.freeze(Object.defineProperty({__proto__:null,default:ja},Symbol.toStringTag,{value:"Module"})),bm={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},ym={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},wm={class:"flex justify-between items-end"},xm={class:"inline-block children-pointer-events-auto"},_m={class:"inline-flex flex-col items-end gap-4 children-pointer-events-auto"},Sm={class:"fixed pointer-events-none left-0 right-0 bottom-0"},km={key:1,class:"fixed inline-block left-1/2 -translate-x-1/2 bottom-0 p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3"},Cm=Object.freeze(Object.defineProperty({__proto__:null,default:ve(pe({__name:"ReaderLayout",props:{loading:{type:Boolean},immediate:{type:Boolean},idle:{type:Boolean},controlsVisible:{type:Boolean},zooming:{type:Boolean},spaceTop:{type:null}},setup(e,{expose:t}){const n={mounted:i=>i.showModal(),beforeUnmount:i=>i.close()},o=ee(null);return t({rootEl:o}),(i,r)=>Ne((v(),z("dialog",bm,[U("div",{ref_key:"rootEl",ref:o,id:"reader-layout",class:fe({"cursor-none":e.idle,"cursor-default":!e.idle,"bg-black":e.immediate||!e.loading,"opacity-0":!e.immediate&&e.loading,"duration-200 transition-colors":!e.immediate})},[e.loading&&e.immediate?(v(),z("div",ym,[B(ei)])):se("",!0),xe(i.$slots,"default"),U("div",{id:"controls",class:fe(["fixed pointer-events-none cursor-auto left-0 top-0 w-full h-full flex flex-col justify-between p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3",{"opacity-100 z-20":e.controlsVisible,"opacity-0 -z-10":!e.controlsVisible}])},[U("div",{class:"flex gap-1 items-center children-pointer-events-auto relative z-30 flex-shrink-0 2xs:gap-3",style:Pe({paddingTop:`${e.spaceTop||0}px`})},[xe(i.$slots,"top-controls")],4),U("div",wm,[U("div",xm,[xe(i.$slots,"bottom-left-controls")]),U("div",_m,[xe(i.$slots,"bottom-right-controls")])]),U("div",Sm,[xe(i.$slots,"progress")])],2),e.controlsVisible||e.zooming?(v(),z("div",km,[xe(i.$slots,"reset-zoom")])):se("",!0)],2)])),[[n]])}}),[["styles",["#reader-layout{direction:ltr;font-family:Helvetica,sans-serif;font-size:16px;font-weight:400;height:100%;line-height:24px;overflow:hidden;overscroll-behavior:contain;pointer-events:auto;text-align:left;width:100%;--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}"]]])},Symbol.toStringTag,{value:"Module"})),Tm={},Pm={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Mm(e,t){return v(),z("svg",Pm,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46s46-20.595 46-46s-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)])])}const Em=Object.freeze(Object.defineProperty({__proto__:null,default:ve(Tm,[["render",Mm]])},Symbol.toStringTag,{value:"Module"})),Im="gear-second{height:0!important;opacity:0!important;pointer-events:none!important;width:0!important;z-index:-10!important}html.gear-second,html.gear-second *{scroll-behavior:auto!important;scrollbar-width:none!important}html.gear-second ::-webkit-scrollbar,html.gear-second::-webkit-scrollbar{display:none!important}html.gear-second body{touch-action:pan-x pan-y!important}html.gear-second body .m-content #progress-bar{display:none!important}html.gear-second body>:not(dialog[open]),html.gear-second>body~*{visibility:hidden!important}html.gear-second>body~*{display:none!important;height:0!important;left:100%!important;max-height:0!important;max-width:0!important;opacity:0!important;pointer-events:none!important;top:100%!important;width:0!important}.mp-scroll-container{max-height:100vh!important;overflow:hidden!important}html:has(body.mp-scroll-container){overflow:auto!important}",mn="gear-second",_r={appVersion:void 0,immediate:void 0,raw:void 0,spec:void 0,siteMeta:void 0,page:0,spaceTop:void 0,touchDevice:void 0,entryId:void 0,isAutoShow:void 0,tourEnabled:void 0,offlineMode:void 0,defaultPreferences:void 0,onError:void 0,onCrash:void 0,onDispose:void 0,onFullScreenChanged:void 0,onControlsVisibilityChanged:void 0,onPageChanged:void 0,onOpenEntry:void 0,onAddEntry:void 0,onFinished:void 0,onHapticFeedback:void 0,onPressedBack:void 0,onSelectChapter:void 0,onTimeout:void 0,onDefaultPreferencesChanged:void 0,onOpenDefaultPreferences:void 0},Je={promise:void 0,data:vo({..._r})};async function Om(e){return Je.promise?(Je.data.raw=e.raw,await Je.promise):(Je.promise=new Promise(t=>{let n=!1,o=!1,i,r,s=0;const l=!!e.spaceTop||!!e.isAutoShow&&!!e.page,a=()=>{n||(n=!0,clearInterval(i),i=void 0,r!=null&&r.isConnected&&document.body.removeChild(r),document.documentElement.classList.remove(mn),Je.data.touchDevice||Object.assign(Je.data,_r),Je.promise=void 0,Gn.clear())},u=ct(f=>{var p;return!n&&((p=e.onPageChanged)==null?void 0:p.call(e,f))},300);Object.assign(Je.data,_r,e.appVersion?e:La(e),{immediate:l,onReady(){l||(c(),document.documentElement.classList.add(mn))},onError(){var f,p;a(),o?((f=e.onDispose)==null||f.call(e),(p=e.onError)==null||p.call(e)):d()},onDispose:()=>{var f;a(),(f=e==null?void 0:e.onDispose)==null||f.call(e)},onControlsVisibilityChanged(f){var p,x;(p=e.onFullScreenChanged)==null||p.call(e,!f),(x=e.onControlsVisibilityChanged)==null||x.call(e,f)},onPageChanged:f=>{Je.data.page=f,!(s>=f)&&(s=f,u(f))},onTourEnabledChanged:f=>{Je.data.tourEnabled=f},onDefaultPreferencesChanged:f=>{var p;Je.data.defaultPreferences=f,(p=e.onDefaultPreferencesChanged)==null||p.call(e,f)}}),$m().then(()=>{if(n){d();return}r=document.createElement(mn),l?(document.documentElement.classList.add(mn),document.body.appendChild(r),setTimeout(c)):document.body.appendChild(r);let f=0;i=setInterval(()=>{if(++f===30||n){clearInterval(i),i=void 0;return}r.isConnected||(document.documentElement.classList.add(mn),document.body.appendChild(r))},100)});function c(){o||(o=!0,t({updateArgs(f){Object.assign(Je.data,Je.data.appVersion?f:La(f))},dispose:a,back:()=>Gn.trigger()}))}function d(){o||t(void 0)}}),await Je.promise)}function La(e){if(!["autoPlay","readerStyle","direction","autoNextSeconds","defaultSpeed","defaultGap","hideControlsEvent","progressSize","pinchToZoom","tapZone"].some(p=>p in e))return e;const{autoPlay:n,readerStyle:o,direction:i,autoNextSeconds:r,defaultSpeed:s,defaultGap:l,hideControlsEvent:a,progressSize:u,pinchToZoom:c,tapZone:d,...f}=e;return{...f,defaultPreferences:{autoPlay:n,readerStyle:o,direction:i,autoNextSeconds:r,speed:s,gap:l,hideControlsEvent:a,progressSize:u,pinchToZoom:c,tapZone:d}}}async function $m(){if(window.customElements.get(mn))return;const e=document.createElement("style"),t=Im;e.appendChild(document.createTextNode(t)),document.head.appendChild(e);const n=dd({styles:[await zm()],data:()=>({readerData:Je.data}),render(){return tl(ja,this.readerData)}});window.customElements.define(mn,n)}async function zm(){const e=Object.assign({"./App.vue":vm,"./GearSecond.vue":Ug,"./GearThird.vue":dm,"./components/AutoNext.vue":vf,"./components/ButtonWebFullScreen.vue":pp,"./components/ChapterNav.vue":Bp,"./components/DefaultPreferencesForm.vue":wh,"./components/DirectionToast.vue":Ph,"./components/GearControlsLayout.vue":Ih,"./components/GearLayout.vue":Bh,"./components/GearThirdControlsLayout.vue":tm,"./components/GesturesContainer.vue":Jh,"./components/HelpScreen.vue":Yd,"./components/MangaPreferencesForm.vue":Kh,"./components/NovelBody.vue":um,"./components/NovelPreferencesForm.vue":gh,"./components/PageNav.vue":Zh,"./components/PauseToast.vue":Yh,"./components/ProgressBar.vue":Gh,"./components/ReaderBody.vue":og,"./components/ReaderLayout.vue":Cm,"./components/ReaderTour.vue":Jd,"./components/SettingsBottomSheet.vue":Sg,"./components/TapZonePreview.vue":Ch,"./components/base/BaseButton.vue":af,"./components/base/BottomSheet.vue":cg,"./components/base/ButtonDropdown.vue":Mp,"./components/base/ButtonIcon.vue":bf,"./components/base/ButtonOutline.vue":sh,"./components/base/DropdownMenu.vue":mp,"./components/base/InputPercentage.vue":Rp,"./components/base/InputSelect.vue":Wp,"./components/base/InputSwitcher.vue":Zp,"./components/base/LoadingIndicator.vue":Ah,"./components/base/TabBar.vue":dg,"./components/base/TableField.vue":Xp,"./components/buttons/ButtonBack.vue":Sf,"./components/buttons/ButtonEntry.vue":$f,"./components/buttons/ButtonHide.vue":Lf,"./components/buttons/ButtonPlay.vue":Uf,"./components/buttons/ButtonResetZoom.vue":Qf,"./components/buttons/ButtonSettings.vue":ip,"./components/fields/FieldContrast.vue":Gp,"./components/fields/FieldFontFamily.vue":lh,"./components/icons/IconBack.vue":_f,"./components/icons/IconBookmarkNew.vue":Of,"./components/icons/IconBookmarked.vue":Pf,"./components/icons/IconChevronLeft.vue":$p,"./components/icons/IconChevronRight.vue":jp,"./components/icons/IconClose.vue":lg,"./components/icons/IconDouble.vue":Hh,"./components/icons/IconDoubleSkip.vue":Uh,"./components/icons/IconExclamationCircle.vue":Em,"./components/icons/IconFullscreen.vue":ap,"./components/icons/IconFullscreenExit.vue":fp,"./components/icons/IconHelp.vue":gg,"./components/icons/IconLandscape.vue":th,"./components/icons/IconLoading.vue":wp,"./components/icons/IconMoreVert.vue":yg,"./components/icons/IconNext.vue":kh,"./components/icons/IconPause.vue":Rf,"./components/icons/IconPlay.vue":qf,"./components/icons/IconPlus.vue":ff,"./components/icons/IconPortrait.vue":rh,"./components/icons/IconReaderExit.vue":jf,"./components/icons/IconSettings.vue":op,"./components/icons/IconTextDecre.vue":rm,"./components/icons/IconTextIncre.vue":cm,"./components/icons/IconTriangle.vue":kp,"./components/icons/IconZoom.vue":Xf}),t=[];for(const n in e){const o=e[n];t.push(o.default.styles)}return t.join("")}return Om});
20
+ **/let Vi;const nl=typeof window<"u"&&window.trustedTypes;if(nl)try{Vi=nl.createPolicy("vue",{createHTML:e=>e})}catch{}const ol=Vi?e=>Vi.createHTML(e):e=>e,Fu="http://www.w3.org/2000/svg",Wu="http://www.w3.org/1998/Math/MathML",qt=typeof document<"u"?document:null,il=qt&&qt.createElement("template"),qu={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i=t==="svg"?qt.createElementNS(Fu,e):t==="mathml"?qt.createElementNS(Wu,e):n?qt.createElement(e,{is:n}):qt.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>qt.createTextNode(e),createComment:e=>qt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>qt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,r){const s=n?n.previousSibling:t.lastChild;if(i&&(i===r||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===r||!(i=i.nextSibling)););else{il.innerHTML=ol(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const l=il.content;if(o==="svg"||o==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Jt="transition",Kn="animation",Zn=Symbol("_vtc"),rl={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Uu=Ie({},as,rl),Vo=(e=>(e.displayName="Transition",e.props=Uu,e))((e,{slots:t})=>tl(Rc,Ku(e),t)),dn=(e,t=[])=>{ie(e)?e.forEach(n=>n(...t)):e&&e(...t)},sl=e=>e?ie(e)?e.some(t=>t.length>1):e.length>1:!1;function Ku(e){const t={};for(const T in e)T in rl||(t[T]=e[T]);if(e.css===!1)return t;const{name:n="v",type:o,duration:i,enterFromClass:r=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:a=r,appearActiveClass:u=s,appearToClass:c=l,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,x=Zu(i),_=x&&x[0],D=x&&x[1],{onBeforeEnter:b,onEnter:P,onEnterCancelled:A,onLeave:w,onLeaveCancelled:g,onBeforeAppear:I=b,onAppear:q=P,onAppearCancelled:K=A}=t,R=(T,Y,S,J)=>{T._enterCancelled=J,fn(T,Y?c:l),fn(T,Y?u:s),S&&S()},Q=(T,Y)=>{T._isLeaving=!1,fn(T,d),fn(T,p),fn(T,f),Y&&Y()},H=T=>(Y,S)=>{const J=T?q:P,F=()=>R(Y,T,S);dn(J,[Y,F]),ll(()=>{fn(Y,T?a:r),Ut(Y,T?c:l),sl(J)||al(Y,o,_,F)})};return Ie(t,{onBeforeEnter(T){dn(b,[T]),Ut(T,r),Ut(T,s)},onBeforeAppear(T){dn(I,[T]),Ut(T,a),Ut(T,u)},onEnter:H(!1),onAppear:H(!0),onLeave(T,Y){T._isLeaving=!0;const S=()=>Q(T,Y);Ut(T,d),T._enterCancelled?(Ut(T,f),dl(T)):(dl(T),Ut(T,f)),ll(()=>{T._isLeaving&&(fn(T,d),Ut(T,p),sl(w)||al(T,o,D,S))}),dn(w,[T,S])},onEnterCancelled(T){R(T,!1,void 0,!0),dn(A,[T])},onAppearCancelled(T){R(T,!0,void 0,!0),dn(K,[T])},onLeaveCancelled(T){Q(T),dn(g,[T])}})}function Zu(e){if(e==null)return null;if(Ce(e))return[Ni(e.enter),Ni(e.leave)];{const t=Ni(e);return[t,t]}}function Ni(e){return ci(e)}function Ut(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Zn]||(e[Zn]=new Set)).add(t)}function fn(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Zn];n&&(n.delete(t),n.size||(e[Zn]=void 0))}function ll(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Yu=0;function al(e,t,n,o){const i=e._endId=++Yu,r=()=>{i===e._endId&&o()};if(n!=null)return setTimeout(r,n);const{type:s,timeout:l,propCount:a}=Xu(e,t);if(!s)return o();const u=s+"end";let c=0;const d=()=>{e.removeEventListener(u,f),r()},f=p=>{p.target===e&&++c>=a&&d()};setTimeout(()=>{c<a&&d()},l+1),e.addEventListener(u,f)}function Xu(e,t){const n=window.getComputedStyle(e),o=x=>(n[x]||"").split(", "),i=o(`${Jt}Delay`),r=o(`${Jt}Duration`),s=cl(i,r),l=o(`${Kn}Delay`),a=o(`${Kn}Duration`),u=cl(l,a);let c=null,d=0,f=0;t===Jt?s>0&&(c=Jt,d=s,f=r.length):t===Kn?u>0&&(c=Kn,d=u,f=a.length):(d=Math.max(s,u),c=d>0?s>u?Jt:Kn:null,f=c?c===Jt?r.length:a.length:0);const p=c===Jt&&/\b(?:transform|all)(?:,|$)/.test(o(`${Jt}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function cl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>ul(n)+ul(e[o])))}function ul(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function dl(e){return(e?e.ownerDocument:document).body.offsetHeight}function Gu(e,t,n){const o=e[Zn];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const No=Symbol("_vod"),fl=Symbol("_vsh"),pl={name:"show",beforeMount(e,{value:t},{transition:n}){e[No]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Yn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Yn(e,!0),o.enter(e)):o.leave(e,()=>{Yn(e,!1)}):Yn(e,t))},beforeUnmount(e,{value:t}){Yn(e,t)}};function Yn(e,t){e.style.display=t?e[No]:"none",e[fl]=!t}const Ju=Symbol(""),Qu=/(?:^|;)\s*display\s*:/;function ed(e,t,n){const o=e.style,i=Oe(n);let r=!1;if(n&&!i){if(t)if(Oe(t))for(const s of t.split(";")){const l=s.slice(0,s.indexOf(":")).trim();n[l]==null&&Ro(o,l,"")}else for(const s in t)n[s]==null&&Ro(o,s,"");for(const s in n)s==="display"&&(r=!0),Ro(o,s,n[s])}else if(i){if(t!==n){const s=o[Ju];s&&(n+=";"+s),o.cssText=n,r=Qu.test(n)}}else t&&e.removeAttribute("style");No in e&&(e[No]=r?o.display:"",e[fl]&&(o.display="none"))}const hl=/\s*!important$/;function Ro(e,t,n){if(ie(n))n.forEach(o=>Ro(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=td(e,t);hl.test(n)?e.setProperty(et(o),n.replace(hl,""),"important"):e[o]=n}}const gl=["Webkit","Moz","ms"],Ri={};function td(e,t){const n=Ri[t];if(n)return n;let o=Re(t);if(o!=="filter"&&o in e)return Ri[t]=o;o=so(o);for(let i=0;i<gl.length;i++){const r=gl[i]+o;if(r in e)return Ri[t]=r}return t}const ml="http://www.w3.org/1999/xlink";function vl(e,t,n,o,i,r=Ya(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(ml,t.slice(6,t.length)):e.setAttributeNS(ml,t,n):n==null||r&&!Er(n)?e.removeAttribute(t):e.setAttribute(t,r?"":yt(n)?String(n):n)}function bl(e,t,n,o,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?ol(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,a=n==null?e.type==="checkbox"?"on":"":String(n);(l!==a||!("_value"in e))&&(e.value=a),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const l=typeof e[t];l==="boolean"?n=Er(n):n==null&&l==="string"?(n="",s=!0):l==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(i||t)}function pn(e,t,n,o){e.addEventListener(t,n,o)}function nd(e,t,n,o){e.removeEventListener(t,n,o)}const yl=Symbol("_vei");function od(e,t,n,o,i=null){const r=e[yl]||(e[yl]={}),s=r[t];if(o&&s)s.value=o;else{const[l,a]=id(t);if(o){const u=r[t]=ld(o,i);pn(e,l,u,a)}else s&&(nd(e,l,s,a),r[t]=void 0)}}const wl=/(?:Once|Passive|Capture)$/;function id(e){let t;if(wl.test(e)){t={};let o;for(;o=e.match(wl);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):et(e.slice(2)),t]}let Hi=0;const rd=Promise.resolve(),sd=()=>Hi||(rd.then(()=>Hi=0),Hi=Date.now());function ld(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;xt(ad(o,n.value),t,5,[o])};return n.value=e,n.attached=sd(),n}function ad(e,t){if(ie(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>i=>!i._stopped&&o&&o(i))}else return t}const xl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,cd=(e,t,n,o,i,r)=>{const s=i==="svg";t==="class"?Gu(e,o,s):t==="style"?ed(e,n,o):no(t)?ii(t)||od(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):ud(e,t,o,s))?(bl(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&vl(e,t,o,s,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Oe(o))?bl(e,Re(t),o,r,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),vl(e,t,o,s))};function ud(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&xl(t)&&de(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return xl(t)&&Oe(n)?!1:t in e}const _l={};function dd(e,t,n){let o=pe(e,t);io(o)&&(o=Ie({},o,t));class i extends Fi{constructor(s){super(o,s,n)}}return i.def=o,i}const fd=typeof HTMLElement<"u"?HTMLElement:class{};class Fi extends fd{constructor(t,n={},o=El){super(),this._def=t,this._props=n,this._createApp=o,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&o!==El?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Ie({},t.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t=t&&(t.parentNode||t.host);)if(t instanceof Fi){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(t=this._parent){t&&(this._instance.parent=t._instance,this._inheritParentContext(t))}_inheritParentContext(t=this._parent){t&&this._app&&Object.setPrototypeOf(this._app._context.provides,t._instance.provides)}disconnectedCallback(){this._connected=!1,gt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(t){for(const n of t)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let o=0;o<this.attributes.length;o++)this._setAttr(this.attributes[o].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const t=(o,i=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:r,styles:s}=o;let l;if(r&&!ie(r))for(const a in r){const u=r[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=ci(this._props[a])),(l||(l=Object.create(null)))[Re(a)]=!0)}this._numberProps=l,this._resolveProps(o),this.shadowRoot&&this._applyStyles(s),this._mount(o)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(o=>{o.configureApp=this._def.configureApp,t(this._def=o,!0)}):t(this._def)}_mount(t){this._app=this._createApp(t),this._inheritParentContext(),t.configureApp&&t.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const o in n)_e(this,o)||Object.defineProperty(this,o,{get:()=>Z(n[o])})}_resolveProps(t){const{props:n}=t,o=ie(n)?n:Object.keys(n||{});for(const i of Object.keys(this))i[0]!=="_"&&o.includes(i)&&this._setProp(i,this[i]);for(const i of o.map(Re))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(r){this._setProp(i,r,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):_l;const i=Re(t);n&&this._numberProps&&this._numberProps[i]&&(o=ci(o)),this._setProp(i,o,!1,!0)}_getProp(t){return this._props[t]}_setProp(t,n,o=!0,i=!1){if(n!==this._props[t]&&(this._dirty=!0,n===_l?delete this._props[t]:(this._props[t]=n,t==="key"&&this._app&&(this._app._ceVNode.key=n)),i&&this._instance&&this._update(),o)){const r=this._ob;r&&(this._processMutations(r.takeRecords()),r.disconnect()),n===!0?this.setAttribute(et(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(et(t),n+""):n||this.removeAttribute(et(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),xd(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=B(this._def,Ie(t,this._props));return this._instance||(n.ce=o=>{this._instance=o,o.ce=this,o.isCE=!0;const i=(r,s)=>{this.dispatchEvent(new CustomEvent(r,io(s[0])?Ie({detail:s},s[0]):{detail:s}))};o.emit=(r,...s)=>{i(r,s),et(r)!==r&&i(et(r),s)},this._setParent()}),n}_applyStyles(t,n){if(!t)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const o=this._nonce;for(let i=t.length-1;i>=0;i--){const r=document.createElement("style");o&&r.setAttribute("nonce",o),r.textContent=t[i],this.shadowRoot.prepend(r)}}_parseSlots(){const t=this._slots={};let n;for(;n=this.firstChild;){const o=n.nodeType===1&&n.getAttribute("slot")||"default";(t[o]||(t[o]=[])).push(n),this.removeChild(n)}}_renderSlots(){const t=this._getSlots(),n=this._instance.type.__scopeId;for(let o=0;o<t.length;o++){const i=t[o],r=i.getAttribute("name")||"default",s=this._slots[r],l=i.parentNode;if(s)for(const a of s){if(n&&a.nodeType===1){const u=n+"-s",c=document.createTreeWalker(a,1);a.setAttribute(u,"");let d;for(;d=c.nextNode();)d.setAttribute(u,"")}l.insertBefore(a,i)}else for(;i.firstChild;)l.insertBefore(i.firstChild,i);l.removeChild(i)}}_getSlots(){const t=[this];this._teleportTargets&&t.push(...this._teleportTargets);const n=new Set;for(const o of t){const i=o.querySelectorAll("slot");for(let r=0;r<i.length;r++)n.add(i[r])}return Array.from(n)}_injectChildStyle(t){this._applyStyles(t.styles,t)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_removeChildStyle(t){}}const Ho=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ie(t)?n=>lo(t,n):t};function pd(e){e.target.composing=!0}function Sl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const kn=Symbol("_assign");function kl(e,t,n){return t&&(e=e.trim()),n&&(e=ai(e)),e}const hd={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[kn]=Ho(i);const r=o||i.props&&i.props.type==="number";pn(e,t?"change":"input",s=>{s.target.composing||e[kn](kl(e.value,n,r))}),(n||r)&&pn(e,"change",()=>{e.value=kl(e.value,n,r)}),t||(pn(e,"compositionstart",pd),pn(e,"compositionend",Sl),pn(e,"change",Sl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:i,number:r}},s){if(e[kn]=Ho(s),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?ai(e.value):e.value,a=t??"";l!==a&&(document.activeElement===e&&e.type!=="range"&&(o&&t===n||i&&e.value.trim()===a)||(e.value=a))}},gd={deep:!0,created(e,t,n){e[kn]=Ho(n),pn(e,"change",()=>{const o=e._modelValue,i=md(e),r=e.checked,s=e[kn];if(ie(o)){const l=Ir(o,i),a=l!==-1;if(r&&!a)s(o.concat(i));else if(!r&&a){const u=[...o];u.splice(l,1),s(u)}}else if(oo(o)){const l=new Set(o);r?l.add(i):l.delete(i),s(l)}else s(Tl(e,r))})},mounted:Cl,beforeUpdate(e,t,n){e[kn]=Ho(n),Cl(e,t,n)}};function Cl(e,{value:t,oldValue:n},o){e._modelValue=t;let i;if(ie(t))i=Ir(t,o.props.value)>-1;else if(oo(t))i=t.has(o.props.value);else{if(t===n)return;i=co(t,Tl(e,!0))}e.checked!==i&&(e.checked=i)}function md(e){return"_value"in e?e._value:e.value}function Tl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const vd=["ctrl","shift","alt","meta"],bd={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>vd.some(n=>e[`${n}Key`]&&!t.includes(n))},Le=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(i,...r)=>{for(let s=0;s<t.length;s++){const l=bd[t[s]];if(l&&l(i,t))return}return e(i,...r)})},yd={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Fo=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=i=>{if(!("key"in i))return;const r=et(i.key);if(t.some(s=>s===r||yd[s]===r))return e(i)})},wd=Ie({patchProp:cd},qu);let Pl;function Ml(){return Pl||(Pl=pu(wd))}const xd=(...e)=>{Ml().render(...e)},El=(...e)=>{const t=Ml().createApp(...e),{mount:n}=t;return t.mount=o=>{const i=Sd(o);if(!i)return;const r=t._component;!de(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const s=n(i,!1,_d(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function _d(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Sd(e){return Oe(e)?document.querySelector(e):e}function Wi(e,t){return di()?(Ja(e,t),!0):!1}const qi=new WeakMap,kd=(...e)=>{var t;const n=e[0],o=(t=un())===null||t===void 0?void 0:t.proxy,i=o??di();if(i==null&&!Ps())throw new Error("injectLocal must be called in setup");return i&&qi.has(i)&&n in qi.get(i)?qi.get(i)[n]:Ft(...e)},Il=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Cd=e=>e!=null,Td=Object.prototype.toString,Pd=e=>Td.call(e)==="[object Object]",Cn=()=>{};function Md(...e){if(e.length!==1)return Cc(...e);const t=e[0];return typeof t=="function"?Dn(Qr(()=>({get:t,set:Cn}))):ee(t)}function Ol(e,t){function n(...o){return new Promise((i,r)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(r)})}return n}const $l=e=>e();function Ed(e,t={}){let n,o,i=Cn;const r=a=>{clearTimeout(a),i(),i=Cn};let s;return a=>{const u=ht(e),c=ht(t.maxWait);return n&&r(n),u<=0||c!==void 0&&c<=0?(o&&(r(o),o=void 0),Promise.resolve(a())):new Promise((d,f)=>{i=t.rejectOnCancel?f:d,s=a,c&&!o&&(o=setTimeout(()=>{n&&r(n),o=void 0,d(s())},c)),n=setTimeout(()=>{o&&r(o),o=void 0,d(a())},u)})}}function Id(e=$l,t={}){const{initialState:n="active"}=t,o=Md(n==="active");function i(){o.value=!1}function r(){o.value=!0}const s=(...l)=>{o.value&&e(...l)};return{isActive:Dn(o),pause:i,resume:r,eventFilter:s}}function zl(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function Xn(e){return Array.isArray(e)?e:[e]}function Od(e){return un()}function ct(e,t=200,n={}){return Ol(Ed(t,n),e)}function $d(e,t,n={}){const{eventFilter:o=$l,...i}=n;return ue(e,Ol(o,t),i)}function zd(e,t,n={}){const{eventFilter:o,initialState:i="active",...r}=n,{eventFilter:s,pause:l,resume:a,isActive:u}=Id(o,{initialState:i});return{stop:$d(e,t,{...r,eventFilter:s}),pause:l,resume:a,isActive:u}}const Dd=zd;function Ui(e,t=!0,n){Od()?je(e,n):t?e():gt(e)}function Ad(e,t,n){return ue(e,t,{...n,immediate:!0})}const _t=Il?window:void 0,jd=Il?window.document:void 0;function Ot(e){var t;const n=ht(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function St(...e){const t=[],n=()=>{t.forEach(l=>l()),t.length=0},o=(l,a,u,c)=>(l.addEventListener(a,u,c),()=>l.removeEventListener(a,u,c)),i=G(()=>{const l=Xn(ht(e[0])).filter(a=>a!=null);return l.every(a=>typeof a!="string")?l:void 0}),r=Ad(()=>{var l,a;return[(l=(a=i.value)===null||a===void 0?void 0:a.map(u=>Ot(u)))!==null&&l!==void 0?l:[_t].filter(u=>u!=null),Xn(ht(i.value?e[1]:e[0])),Xn(Z(i.value?e[2]:e[1])),ht(i.value?e[3]:e[2])]},([l,a,u,c])=>{if(n(),!(l!=null&&l.length)||!(a!=null&&a.length)||!(u!=null&&u.length))return;const d=Pd(c)?{...c}:c;t.push(...l.flatMap(f=>a.flatMap(p=>u.map(x=>o(f,p,x,d)))))},{flush:"post"}),s=()=>{r(),n()};return Wi(n),s}function Ld(){const e=pt(!1),t=un();return t&&je(()=>{e.value=!0},t),e}function Ki(e){const t=Ld();return G(()=>(t.value,!!e()))}const Bd=Symbol("vueuse-ssr-width");function Vd(){const e=Ps()?kd(Bd,null):null;return typeof e=="number"?e:void 0}function Nd(e,t={}){const{window:n=_t,ssrWidth:o=Vd()}=t,i=Ki(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),r=pt(typeof o=="number"),s=pt(),l=pt(!1),a=u=>{l.value=u.matches};return Ns(()=>{if(r.value){r.value=!i.value,l.value=ht(e).split(",").some(u=>{const c=u.includes("not all"),d=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),f=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let p=!!(d||f);return d&&p&&(p=o>=zl(d[1])),f&&p&&(p=o<=zl(f[1])),c?!p:p});return}i.value&&(s.value=n.matchMedia(ht(e)),l.value=s.value.matches)}),St(s,"change",a,{passive:!0}),G(()=>l.value)}const Wo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qo="__vueuse_ssr_handlers__",Rd=Hd();function Hd(){return qo in Wo||(Wo[qo]=Wo[qo]||{}),Wo[qo]}function Fd(e,t){return Rd[e]||t}function Wd(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"?"object":Number.isNaN(e)?"any":"number"}const qd={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},Dl="vueuse-storage";function Ud(e,t,n,o={}){var i;const{flush:r="pre",deep:s=!0,listenToStorageChanges:l=!0,writeDefaults:a=!0,mergeDefaults:u=!1,shallow:c,window:d=_t,eventFilter:f,onError:p=S=>{console.error(S)},initOnMounted:x}=o,_=(c?pt:ee)(typeof t=="function"?t():t),D=G(()=>ht(e));if(!n)try{n=Fd("getDefaultStorage",()=>_t==null?void 0:_t.localStorage)()}catch(S){p(S)}if(!n)return _;const b=ht(t),P=Wd(b),A=(i=o.serializer)!==null&&i!==void 0?i:qd[P],{pause:w,resume:g}=Dd(_,S=>Q(S),{flush:r,deep:s,eventFilter:f});ue(D,()=>T(),{flush:r});let I=!1;const q=S=>{x&&!I||T(S)},K=S=>{x&&!I||Y(S)};d&&l&&(n instanceof Storage?St(d,"storage",q,{passive:!0}):St(d,Dl,K)),x?Ui(()=>{I=!0,T()}):T();function R(S,J){if(d){const F={key:D.value,oldValue:S,newValue:J,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",F):new CustomEvent(Dl,{detail:F}))}}function Q(S){try{const J=n.getItem(D.value);if(S==null)R(J,null),n.removeItem(D.value);else{const F=A.write(S);J!==F&&(n.setItem(D.value,F),R(J,F))}}catch(J){p(J)}}function H(S){const J=S?S.newValue:n.getItem(D.value);if(J==null)return a&&b!=null&&n.setItem(D.value,A.write(b)),b;if(!S&&u){const F=A.read(J);return typeof u=="function"?u(F,b):P==="object"&&!Array.isArray(F)?{...b,...F}:F}else return typeof J!="string"?J:A.read(J)}function T(S){if(!(S&&S.storageArea!==n)){if(S&&S.key==null){_.value=b;return}if(!(S&&S.key!==D.value)){w();try{const J=A.write(_.value);(S===void 0||(S==null?void 0:S.newValue)!==J)&&(_.value=H(S))}catch(J){p(J)}finally{S?gt(g):g()}}}}function Y(S){T(S.detail)}return _}function Zi(e={}){const{document:t=jd}=e;if(!t)return pt("visible");const n=pt(t.visibilityState);return St(t,"visibilitychange",()=>{n.value=t.visibilityState},{passive:!0}),n}function Kd(e,t,n={}){const{window:o=_t,...i}=n;let r;const s=Ki(()=>o&&"ResizeObserver"in o),l=()=>{r&&(r.disconnect(),r=void 0)},a=ue(G(()=>{const c=ht(e);return Array.isArray(c)?c.map(d=>Ot(d)):[Ot(c)]}),c=>{if(l(),s.value&&o){r=new ResizeObserver(t);for(const d of c)d&&r.observe(d,i)}},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return Wi(u),{isSupported:s,stop:u}}function Al(e,t={width:0,height:0},n={}){const{window:o=_t,box:i="content-box"}=n,r=G(()=>{var d;return(d=Ot(e))===null||d===void 0||(d=d.namespaceURI)===null||d===void 0?void 0:d.includes("svg")}),s=pt(t.width),l=pt(t.height),{stop:a}=Kd(e,([d])=>{const f=i==="border-box"?d.borderBoxSize:i==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(o&&r.value){const p=Ot(e);if(p){const x=p.getBoundingClientRect();s.value=x.width,l.value=x.height}}else if(f){const p=Xn(f);s.value=p.reduce((x,{inlineSize:_})=>x+_,0),l.value=p.reduce((x,{blockSize:_})=>x+_,0)}else s.value=d.contentRect.width,l.value=d.contentRect.height},n);Ui(()=>{const d=Ot(e);d&&(s.value="offsetWidth"in d?d.offsetWidth:t.width,l.value="offsetHeight"in d?d.offsetHeight:t.height)});const u=ue(()=>Ot(e),d=>{s.value=d?t.width:0,l.value=d?t.height:0});function c(){a(),u()}return{width:s,height:l,stop:c}}function jl(e,t,n={}){const{root:o,rootMargin:i="0px",threshold:r=0,window:s=_t,immediate:l=!0}=n,a=Ki(()=>s&&"IntersectionObserver"in s),u=G(()=>Xn(ht(e)).map(Ot).filter(Cd));let c=Cn;const d=pt(l),f=a.value?ue(()=>[u.value,Ot(o),d.value],([x,_])=>{if(c(),!d.value||!x.length)return;const D=new IntersectionObserver(t,{root:Ot(_),rootMargin:i,threshold:r});x.forEach(b=>b&&D.observe(b)),c=()=>{D.disconnect(),c=Cn}},{immediate:l,flush:"post"}):Cn,p=()=>{c(),f(),d.value=!1};return Wi(p),{isSupported:a,isActive:d,pause(){c(),d.value=!1},resume(){d.value=!0},stop:p}}function Zd(e,t,n={}){const{window:o=_t}=n;return Ud(e,t,o==null?void 0:o.localStorage,n)}function hn(e={}){const{window:t=_t,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:r=!0,type:s="inner"}=e,l=pt(n),a=pt(o),u=()=>{if(t)if(s==="outer")l.value=t.outerWidth,a.value=t.outerHeight;else if(s==="visual"&&t.visualViewport){const{width:d,height:f,scale:p}=t.visualViewport;l.value=Math.round(d*p),a.value=Math.round(f*p)}else r?(l.value=t.innerWidth,a.value=t.innerHeight):(l.value=t.document.documentElement.clientWidth,a.value=t.document.documentElement.clientHeight)};u(),Ui(u);const c={passive:!0};return St("resize",u,c),t&&s==="visual"&&t.visualViewport&&St(t.visualViewport,"resize",u,c),i&&ue(Nd("(orientation: portrait)"),()=>u()),{width:l,height:a}}class Gn{static register(t){this.handlers.push(t)}static unregister(t){const n=this.handlers.indexOf(t);n!==-1&&this.handlers.splice(n,1)}static trigger(){for(const t of this.handlers)if(t())return!0;return!1}static clear(){this.handlers=[]}}ke(Gn,"handlers",[]);function Yi(e){je(()=>Gn.register(e)),Mt(()=>Gn.unregister(e))}const Ll=pe({__name:"HelpScreen",props:{touchDevice:{type:Boolean}},emits:["hide"],setup(e,{emit:t}){const n=e,o=t,i=ee(null),r=ee([]);Yi(()=>(o("hide"),!0)),je(async()=>{const u=Al(i),c=ct(()=>{s({width:u.width.value,height:u.height.value})},50);c(),ue(u.width,c),ue(u.height,c)});function s(u){var f;const c=(f=i.value)==null?void 0:f.parentElement;if(!c)return;const d=Array.from(c.querySelectorAll("#controls [title], #top-controls [title], #bottom-controls [title]"));d.length&&(r.value=l(d,u))}function l(u,c){const d=[],f=[];let p=0,x=0;const _=50,D=25;u.forEach(g=>{var Q;const I=(Q=g.getAttribute("title"))==null?void 0:Q.trim(),q=g.getBoundingClientRect();if(!I||!q.height||!q.width)return;const K=Math.ceil((q.top-10)/_),R=Math.ceil((q.left-10)/_);f.push({isTour:!1,title:I,rect:q,fromX:R,toX:Math.max(R+1,Math.ceil((q.right+10)/_)),fromY:K,toY:Math.max(K+1,Math.ceil((q.bottom+10)/_))})}),f.forEach(g=>{for(let I=g.fromY;I<g.toY;I++){d[I]??(d[I]=[]);for(let q=g.fromX;q<g.toX;q++)d[I][q]=g;g.toY>p+1&&(p=g.toY-1),g.toX>x+1&&(x=g.toX-1)}});let b=x/2;f.forEach(g=>{g.isAlignRight=g.fromX>b});const P=(g,I)=>{d[I]??(d[I]=[]);const q=I>=g.toY;if(g.isTour)for(let K=g.fromX;K<g.toX;K++)delete d[g.fromY][K],g.fromY=I,g.toY=I+(q?1:-1),d[I][K]=g;else{const K=g.isAlignRight?g.fromX-3:g.fromX,R=K+3;g.helpItem={fromX:K,toX:R,fromY:I,toY:I+1,isTour:!0,isAlignRight:g.isAlignRight};for(let Q=K;Q<R;Q++)d[I][Q]=g.helpItem}},A=(g,I)=>{if(I>p||I<0)return!1;const q=I>=g.toY,K=d[I];if(!K)return P(g,I),!0;const R=K[g.fromX];if(R&&!R.isTour)return!1;if(R&&R.isTour)return A(R,q?I+1:I-1)?(P(g,I),!0):!1;if(!R){const Q=g.isAlignRight?-1:1;return K[g.fromX+Q]||K[g.fromX+Q*2]?A(g,q?I+1:I-1):(P(g,I),!0)}return!1};f.forEach(g=>{if(!A(g,g.toY)){if(g.isAlignRight){const I=d[g.fromY]??[];if(!I.slice(g.fromX-3,g.fromX).filter(Boolean).length){const K=g.fromX-3,R=g.fromX;g.helpItem={isTour:!0,isAlignRight:!0,fromX:K,toX:R,fromY:g.fromY,toY:g.toY};for(let Q=g.fromX-3;Q<g.fromX;Q++)I[Q]=g.helpItem;return}}A(g,g.fromY-1)}});const w=[];return f.forEach(g=>{const{title:I,helpItem:q,rect:K,isAlignRight:R,fromX:Q,fromY:H,toY:T}=g;if(!I||!q||!K)return;const Y=q.fromY>=T,S=q.toY<=H;w.push({title:a(I),style:{top:Y?`${K.bottom+(q.fromY-T)*_+D}px`:S?void 0:`${K.top+8}px`,bottom:S?`${c.height-K.top+(q.toY-H)*_+D}px`:void 0,left:R?void 0:`${K.left}px`,right:R?Y?`${c.width-K.right}px`:`${c.width-K.right+K.width+D}px`:void 0},arrowStyle:{width:S||Y?"2px":`${Math.abs(q.toX-Q)*_+D-5}px`,height:S||Y?`${(Y?q.fromY-T:H-q.toY)*_+D}px`:"2px",top:Y?`${K.bottom}px`:S?void 0:`${K.top+20}px`,bottom:S?`${c.height-K.top}px`:void 0,left:R?void 0:`${K.left+K.width/2}px`,right:R?Y?`${c.width-K.right+K.width/2}px`:`${c.width-K.right+K.width}px`:void 0}})}),w}function a(u){return n.touchDevice?u.split("(")[0].trim():u}return(u,c)=>(v(),$(be,null,[c[1]||(c[1]=U("div",{class:"fixed inset-0 bg-black bg-opacity-90"},null,-1)),U("div",{ref_key:"root",ref:i,class:"fixed inset-0 z-20 overscroll-contain select-none",onClick:c[0]||(c[0]=Le(d=>o("hide"),["stop"]))},[(v(!0),$(be,null,Yt(r.value,d=>(v(),$(be,{key:d.title},[U("div",{class:"absolute",style:Pe(d.style)},He(d.title),5),U("div",{class:"absolute bg-stone-300 rounded-lg",style:Pe(d.arrowStyle)},null,4)],64))),128))],512)],64))}}),Yd=Object.freeze(Object.defineProperty({__proto__:null,default:Ll},Symbol.toStringTag,{value:"Module"}));function Uo(e,t){let n=null;return(...o)=>{n===null&&(n=setTimeout(()=>{n=null,e(...o)},t))}}const Xd=pe({__name:"ReaderTour",emits:["hide"],setup(e,{emit:t}){const n=t,o=ee(null),i=ee(0),r=ee([]),s=G(()=>r.value[i.value]),l=Uo(a,500);je(()=>{const d=Al(o),f=ct(()=>u({width:d.width.value,height:d.height.value}),50);f(),ue(d.width,f),ue(d.height,f)});function a(){i.value>=r.value.length-1?n("hide"):i.value++}function u(d){const f=c();r.value=f.map(({rect:p,text:x})=>{const _=p.top<d.height-p.bottom,D=p.left<d.width-p.right;return{text:x,style:{left:`${p.left}px`,top:`${p.top}px`,width:`${p.width}px`,height:`${p.height}px`},textStyle:{left:D?`${p.left-12}px`:void 0,right:D?void 0:`${d.width-p.left}px`,top:_?`${p.bottom+12}px`:`${p.top+20}px`,textAlign:_?void 0:"right",transform:_?void 0:"translateY(-50%)"}}}),i.value>=r.value.length&&(i.value=r.value.length-1)}function c(){var p;const d=(p=o.value)==null?void 0:p.parentElement;if(!d)return[];const f=[];return d.querySelectorAll("[data-tour]").forEach(x=>{var b;const _=(b=x.getAttribute("data-tour"))==null?void 0:b.trim();if(!(_!=null&&_.length))return;const D=x.getBoundingClientRect();f.push({rect:D,text:_})}),f}return(d,f)=>{var p,x;return v(),$(be,null,[U("div",{class:fe(["fixed inset-0 bg-black bg-opacity-50 duration-500",{"opacity-0":!s.value,"opacity-100":!!s.value}])},null,2),U("div",{ref_key:"root",ref:o,class:"tour",onClick:f[0]||(f[0]=Le((..._)=>Z(l)&&Z(l)(..._),["stop"]))},[s.value?(v(),$("div",{key:i.value,class:"tour__target",style:Pe(s.value.style)},null,4)):se("",!0),(v(),$("div",{key:i.value,class:"tour__text",style:Pe((p=s.value)==null?void 0:p.textStyle)},He(((x=s.value)==null?void 0:x.text)??""),5))],512)],64)}}}),Gd=".tour{height:100%;left:0;overflow:hidden;position:fixed;top:0;width:100%;z-index:20}.tour__target{border-radius:9999px;border-width:2px;--tw-border-opacity:1;animation:tour-target-anim .5s forwards;border-color:rgb(120 113 108/var(--tw-border-opacity,1));box-shadow:0 0 0 99999px #000000e6}.tour__target,.tour__text{position:absolute}.tour__text{animation:tour-text-anim 1s forwards,tour-text-bounce .75s ease-in-out infinite alternate;max-width:320px;padding-left:12px;padding-right:12px;transition-duration:1s}@keyframes tour-target-anim{0%{transform:scale(3);--tw-border-opacity:0;opacity:0}to{transform:scale(1);--tw-border-opacity:1;opacity:.9}}@keyframes tour-text-anim{0%{opacity:0}to{opacity:1}}@keyframes tour-text-bounce{0%{margin-top:0}to{margin-top:.625}}",ve=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Bl=ve(Xd,[["styles",[Gd]]]),Jd=Object.freeze(Object.defineProperty({__proto__:null,default:Bl},Symbol.toStringTag,{value:"Module"}));function Qd({touchDevice:e}){const t=ee(!1);let n=0;return Rn("busy:touchDevice",e),Rn("setBusyState",o=>{n+=o?1:-1;const i=n>0;t.value!=i&&(t.value=i)}),G(()=>t.value)}function Ko(){const e=Ft("busy:touchDevice"),t=Ft("setBusyState");let n=!1;return Mt(()=>{n&&(t==null||t(!1))}),(o,{desktopOnly:i=!1}={})=>{i&&e||(n=o,t==null||t(o))}}function ef(e){Rn("hapticFeedback",e)}function Zo(){return Ft("hapticFeedback")}class tf{constructor(){ke(this,"listeners");this.listeners=[],this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.init()}init(){window.addEventListener("keydown",this.onKeyDown,{capture:!0}),window.addEventListener("keyup",this.onKeyUp,{capture:!0}),window.addEventListener("keypress",this.onKeyPress,{capture:!0})}dispose(){window.removeEventListener("keydown",this.onKeyDown,{capture:!0}),window.removeEventListener("keyup",this.onKeyUp,{capture:!0}),window.removeEventListener("keypress",this.onKeyPress,{capture:!0})}onKeyPress(t){t.stopImmediatePropagation(),t.stopPropagation()}onKeyDown(t){var n,o;t.stopImmediatePropagation(),t.stopPropagation();for(let i=0;i<this.listeners.length&&((o=(n=this.listeners[i]).onKeyDown)==null?void 0:o.call(n,t))!==!0;i++);}onKeyUp(t){var n,o;t.stopImmediatePropagation(),t.stopPropagation();for(let i=0;i<this.listeners.length&&((o=(n=this.listeners[i]).onKeyUp)==null?void 0:o.call(n,t))!==!0;i++);}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);n!==-1&&this.listeners.splice(n,1)}}function nf(){const e=new tf;return Mt(()=>e.dispose()),Rn("keyController",e),e}function $t(e){const t=Ft("keyController");je(()=>t.addListener(e)),Mt(()=>t.removeListener(e))}function of(e,t){const n=sessionStorage.getItem("tk:page:path");n!==location.pathname&&(sessionStorage.setItem("tk:page:path",location.pathname),n&&sessionStorage.removeItem("tk:page"));const o=ee(t&&e>0?Math.max(0,e):+(sessionStorage.getItem("tk:page")??"0")||e);return G({get:()=>o.value,set:i=>{o.value=i,sessionStorage.setItem("tk:page",i+"")}})}function rf(){sessionStorage.removeItem("tk:page"),sessionStorage.removeItem("tk:page:path")}const sf=(e,t)=>{const n=+(e.getAttribute("data-ripple")??0);if(!n)return;const o=document.createElement("span");let i=1,r=.65;const s=setInterval(a,20);l();function l(){o.style.position="absolute",o.style.height="5px",o.style.width="5px",o.style.borderRadius="100%",o.style.backgroundColor="#f2f2f2",o.style.left=`${t.currentTarget.clientWidth/2}px`,o.style.top=`${t.currentTarget.clientHeight/2}px`,t.currentTarget.appendChild(o)}function a(){const u=+n||50;i<=u?(i++,r-=.65/u,o.style.transform=`scale(${i})`,o.style.opacity=`${r}`):(o.remove(),clearInterval(s))}},zt={mounted:(e,t)=>{e.style.position="relative",e.style.overflow="hidden",e.setAttribute("data-ripple",t.value),e.addEventListener("click",n=>sf(e,n))},updated:(e,t)=>{e.setAttribute("data-ripple",t.value)}},lf={class:"group-hover:bg-stone-100 group-hover:bg-opacity-20 transition-bg duration-200 rounđe-full p-2 w-full h-full inline-flex justify-center items-center gap-2 text-base"},Xi=pe({inheritAttrs:!1,__name:"BaseButton",props:{disabled:{type:Boolean},href:{type:String},transparent:{type:Boolean},title:{type:String},enableHapticFeedback:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,i=Ko(),r=Zo();let s=!1;function l(){s||(s=!0,i(!0,{desktopOnly:!0}))}function a(){s&&(s=!1,i(!1,{desktopOnly:!0}))}function u(c){n.disabled?c.preventDefault():(o("click",c),n.enableHapticFeedback&&r())}return(c,d)=>Ne((v(),oe(Pi(e.href?"a":"button"),cn({href:e.href,title:e.title},{class:["h-10 max-w-full max-h-full rounded-full flex-shrink-0 focus:outline-none outline-none",{"cursor-default opacity-60":e.disabled,"hover:text-stone-100 group duration-200":!e.disabled,"bg-black bg-opacity-50":!e.transparent,[`${c.$attrs.class??""}`]:!0}],onClick:Le(u,["stop"]),onMouseenter:l,onMouseleave:a}),{default:ne(()=>[U("div",lf,[xe(c.$slots,"default")])]),_:3},16,["class"])),[[Z(zt),e.disabled?0:15]])}}),af=Object.freeze(Object.defineProperty({__proto__:null,default:Xi},Symbol.toStringTag,{value:"Module"})),cf={},uf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function df(e,t){return v(),$("svg",uf,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M19 12.998h-6v6h-2v-6H5v-2h6v-6h2v6h6z"},null,-1)])])}const Vl=ve(cf,[["render",df]]),ff=Object.freeze(Object.defineProperty({__proto__:null,default:Vl},Symbol.toStringTag,{value:"Module"})),pf={class:"inline-flex p-6 gap-6 text-base text-stone-300 select-none"},hf={key:0,class:"inline-block rounded-full relative w-28 h-12 overflow-hidden"},gf={key:0,class:"absolute bottom-0 left-0 right-0 flex justify-center pb-7 md:pb-6 lg:pb-4"},mf={class:"flex justify-center items-center gap-1 pl-1 pr-2 h-full"},Gi=ve(pe({__name:"AutoNext",props:{hasNext:{type:Boolean},offlineMode:{type:Boolean},seconds:{type:Number},showAddButton:{type:Boolean}},emits:["next","hide","add-to-library","visibility-changed"],setup(e,{emit:t}){const n=e,o=t,i=ee(null),r=ee(null),s=ee(!1),l=ee(!1),a=ee(n.seconds),u=ee(n.seconds<=0),c=ee(n.seconds),d=Zo();je(()=>{let x;jl(r,_=>{const D=_.some(b=>b.isIntersecting);D!==l.value&&(l.value=D,o("visibility-changed",D),u.value=n.seconds<=0,a.value=n.seconds,c.value=n.seconds,x&&(clearInterval(x),x=void 0),!(!l.value||u.value)&&(x=setInterval(()=>{a.value-=1,a.value<=0&&(clearInterval(x),x=void 0,o("next"))},1e3)))}),jl(i,_=>{s.value=_.some(D=>D.isIntersecting)}),Mt(()=>x&&clearInterval(x))});function f(){o("next"),d()}function p(){o("hide")}return(x,_)=>(v(),$("div",{ref_key:"root",ref:i,class:"h-full w-full flex justify-center items-center relative"},[Ne(U("div",pf,[e.hasNext?(v(),$("div",hf,[l.value?(v(),$("div",{key:0,class:"absolute left-0 top-0 bottom-0 h-full bg-stone-600 bg-opacity-50",style:Pe(u.value?{}:{animation:`auto-next ${c.value}s linear forwards`})},null,4)):se("",!0),Ne((v(),$("button",{ref_key:"nextButton",ref:r,class:"bg-transparent rounded-full h-full w-full border-solid border-stone-600 border-2 hover:bg-stone-300 hover:bg-opacity-10 totalDuration-200",onClick:Le(f,["stop"])},[Wt(He(u.value?"Next":`Next in ${a.value}`),1)])),[[Z(zt)]])])):se("",!0),Ne((v(),$("button",{class:"rounded-full px-6 h-12 bg-transparent border-solid border-stone-600 border-2 hover:bg-stone-300 hover:bg-opacity-10 totalDuration-200",onClick:Le(p,["stop"])},[Wt(He(e.offlineMode?"Close":"Hide"),1)])),[[Z(zt)]])],512),[[pl,s.value||!e.hasNext]]),e.showAddButton?(v(),$("div",gf,[B(Xi,{class:"bg-primary w-min !h-9 !bg-opacity-100",onClick:_[0]||(_[0]=()=>o("add-to-library"))},{default:ne(()=>[U("div",mf,[B(Vl,{class:"flex-shrink-0 w-auto"}),_[1]||(_[1]=U("span",{class:"text-sm text-stone-50"},"Add to library",-1))])]),_:1})])):se("",!0)],512))}}),[["styles",[".animate-auto-next{animation:auto-next 5s linear forwards}@keyframes auto-next{0%{width:0}to{width:100%}}"]]]),vf=Object.freeze(Object.defineProperty({__proto__:null,default:Gi},Symbol.toStringTag,{value:"Module"})),Ge=pe({inheritAttrs:!1,__name:"ButtonIcon",props:{disabled:{type:Boolean},href:{type:String},title:{type:String},transparent:{type:Boolean},enableHapticFeedback:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return(o,i)=>(v(),oe(Xi,{class:fe(["w-10",o.$attrs.class]),disabled:e.disabled,href:e.href,title:e.title,transparent:e.transparent,"enable-haptic-feedback":e.enableHapticFeedback,onClick:i[0]||(i[0]=r=>n("click",r))},{default:ne(()=>[xe(o.$slots,"default")]),_:3},8,["class","disabled","href","title","transparent","enable-haptic-feedback"]))}}),bf=Object.freeze(Object.defineProperty({__proto__:null,default:Ge},Symbol.toStringTag,{value:"Module"})),yf={},wf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function xf(e,t){return v(),$("svg",wf,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"m10.875 19.3l-6.6-6.6q-.15-.15-.213-.325T4 12q0-.2.063-.375t.212-.325l6.6-6.6q.275-.275.688-.287t.712.287q.3.275.313.688T12.3 6.1L7.4 11h11.175q.425 0 .713.288t.287.712q0 .425-.287.713t-.713.287H7.4l4.9 4.9q.275.275.288.7t-.288.7q-.275.3-.7.3t-.725-.3Z"},null,-1)])])}const Nl=ve(yf,[["render",xf]]),_f=Object.freeze(Object.defineProperty({__proto__:null,default:Nl},Symbol.toStringTag,{value:"Module"}));var Qt=(e=>(e[e.manga=1]="manga",e[e.novel=2]="novel",e[e.anime=3]="anime",e))(Qt||{});const Ji=pe({__name:"ButtonBack",props:{offlineMode:{type:Boolean},raw:{type:null},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t;function i(r){n.offlineMode&&(r.preventDefault(),o("click"))}return(r,s)=>{var l;return v(),oe(Ge,{href:e.offlineMode||!e.raw?"#":e.raw.title.url,title:`Back to ${((l=e.raw)==null?void 0:l.contentType)===Z(Qt).novel?"novel":"manga"}`,transparent:e.transparent,"enable-haptic-feedback":"",onClick:i},{default:ne(()=>[B(Nl)]),_:1},8,["href","title","transparent"])}}}),Sf=Object.freeze(Object.defineProperty({__proto__:null,default:Ji},Symbol.toStringTag,{value:"Module"})),kf={},Cf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Tf(e,t){return v(),$("svg",Cf,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M17.825 8.575q-.2 0-.375-.062t-.325-.213L15.7 6.875q-.3-.3-.3-.712t.3-.688q.275-.3.7-.3t.7.275l.725.725l2.825-2.85q.3-.3.7-.3t.725.3q.275.3.275.725t-.275.7l-3.55 3.55q-.15.15-.325.213t-.375.062ZM6.4 20.4q-.5.2-.95-.087T5 19.475V5q0-.825.588-1.413T7 3h7q-.5.75-.75 1.438T13 6q0 1.8 1.137 3.175T17 10.9q.575.075 1 .075t1-.075v8.575q0 .55-.45.838t-.95.087L12 18l-5.6 2.4Z"},null,-1)])])}const Rl=ve(kf,[["render",Tf]]),Pf=Object.freeze(Object.defineProperty({__proto__:null,default:Rl},Symbol.toStringTag,{value:"Module"})),Mf={},Ef={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function If(e,t){return v(),$("svg",Ef,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M6.4 20.4q-.5.2-.95-.087T5 19.475V5q0-.825.588-1.413T7 3h6v2H7v12.95l5-2.15l5 2.15V11h2v8.475q0 .55-.45.838t-.95.087L12 18l-5.6 2.4ZM7 5h6h-6Zm11 4q-.425 0-.713-.287T17 8V7h-1q-.425 0-.713-.288T15 6q0-.425.288-.713T16 5h1V4q0-.425.288-.713T18 3q.425 0 .713.288T19 4v1h1q.425 0 .713.288T21 6q0 .425-.288.713T20 7h-1v1q0 .425-.288.713T18 9Z"},null,-1)])])}const Hl=ve(Mf,[["render",If]]),Of=Object.freeze(Object.defineProperty({__proto__:null,default:Hl},Symbol.toStringTag,{value:"Module"})),Qi=pe({__name:"ButtonEntry",props:{entryId:{type:null},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;$t({onKeyUp:i=>{i.key==="t"&&!i.metaKey&&!i.ctrlKey&&n("click")}});function o(){n("click")}return(i,r)=>(v(),oe(Ge,{transparent:e.transparent,title:e.entryId?"View entry (T)":"Add to library (T)","data-tour":"Prress here to add to your library",onClick:o},{default:ne(()=>[e.entryId?(v(),oe(Rl,{key:0})):(v(),oe(Hl,{key:1}))]),_:1},8,["transparent","title"]))}}),$f=Object.freeze(Object.defineProperty({__proto__:null,default:Qi},Symbol.toStringTag,{value:"Module"})),zf={},Df={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function Af(e,t){return v(),$("svg",Df,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M16.5 16V8l-4 4l4 4ZM5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.588 1.413T19 21H5Zm3-2V5H5v14h3Zm2 0h9V5h-9v14Zm-2 0H5h3Z"},null,-1)])])}const Fl=ve(zf,[["render",Af]]),jf=Object.freeze(Object.defineProperty({__proto__:null,default:Fl},Symbol.toStringTag,{value:"Module"})),Yo=pe({inheritAttrs:!1,__name:"ButtonHide",props:{transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return(o,i)=>(v(),oe(Ge,{title:"Hide reader","data-tour":"You have entered reader mode, press here to return to the original page",class:fe(o.$attrs.class),transparent:e.transparent,onClick:i[0]||(i[0]=()=>n("click"))},{default:ne(()=>[B(Fl)]),_:1},8,["class","transparent"]))}}),Lf=Object.freeze(Object.defineProperty({__proto__:null,default:Yo},Symbol.toStringTag,{value:"Module"})),Bf={},Vf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Nf(e,t){return v(),$("svg",Vf,[...t[0]||(t[0]=[U("path",{d:"M199.9 416h-63.8c-4.5 0-8.1-3.6-8.1-8V104c0-4.4 3.6-8 8.1-8h63.8c4.5 0 8.1 3.6 8.1 8v304c0 4.4-3.6 8-8.1 8z",fill:"currentColor"},null,-1),U("path",{d:"M375.9 416h-63.8c-4.5 0-8.1-3.6-8.1-8V104c0-4.4 3.6-8 8.1-8h63.8c4.5 0 8.1 3.6 8.1 8v304c0 4.4-3.6 8-8.1 8z",fill:"currentColor"},null,-1)])])}const er=ve(Bf,[["render",Nf]]),Rf=Object.freeze(Object.defineProperty({__proto__:null,default:er},Symbol.toStringTag,{value:"Module"})),Hf={},Ff={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Wf(e,t){return v(),$("svg",Ff,[...t[0]||(t[0]=[U("path",{d:"M128 104.3v303.4c0 6.4 6.5 10.4 11.7 7.2l240.5-151.7c5.1-3.2 5.1-11.1 0-14.3L139.7 97.2c-5.2-3.3-11.7.7-11.7 7.1z",fill:"currentColor"},null,-1)])])}const tr=ve(Hf,[["render",Wf]]),qf=Object.freeze(Object.defineProperty({__proto__:null,default:tr},Symbol.toStringTag,{value:"Module"})),nr=pe({inheritAttrs:!1,__name:"ButtonPlay",props:{tourMessage:{type:String},playing:{type:Boolean},disabled:{type:Boolean},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t;return $t({onKeyDown(i){!n.disabled&&i.key===" "&&(i.preventDefault(),o("click"))}}),(i,r)=>(v(),oe(Ge,{transparent:e.transparent,class:fe(i.$attrs.class),"data-tour":e.tourMessage,title:`${e.playing?"Pause":"Play"} (Space)`,disabled:e.disabled,onClick:r[0]||(r[0]=()=>o("click"))},{default:ne(()=>[e.playing?(v(),oe(er,{key:0})):(v(),oe(tr,{key:1}))]),_:1},8,["transparent","class","data-tour","title","disabled"]))}}),Uf=Object.freeze(Object.defineProperty({__proto__:null,default:nr},Symbol.toStringTag,{value:"Module"})),Kf={},Zf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"};function Yf(e,t){return v(),$("svg",Zf,[...t[0]||(t[0]=[U("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[U("circle",{cx:"14",cy:"14",r:"12"}),U("path",{d:"m23 23l7 7M9 12V9h3m4 0h3v3M9 16v3h3m7-3v3h-3"})],-1)])])}const Wl=ve(Kf,[["render",Yf]]),Xf=Object.freeze(Object.defineProperty({__proto__:null,default:Wl},Symbol.toStringTag,{value:"Module"})),Gf={class:"block w-4 h-4"},Jf={class:"w-12"},ql=pe({__name:"ButtonResetZoom",props:{zoom:{type:Number}},emits:["click"],setup(e,{emit:t}){const n=t;function o(i){n("click",i)}return(i,r)=>(v(),$("button",{class:"h-9 rounded-full inline-flex justify-between items-center bg-black bg-opacity-50 gap-1 py-2 px-3 pointer-events-auto hover:bg-stone-900 hover:bg-opacity-50 duration-200",title:"Reset zoom",onClick:Le(o,["stop"])},[U("div",Gf,[B(Wl)]),U("div",Jf,He(Math.ceil(e.zoom*100))+"%",1)]))}}),Qf=Object.freeze(Object.defineProperty({__proto__:null,default:ql},Symbol.toStringTag,{value:"Module"})),ep={},tp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 36 36"};function np(e,t){return v(),$("svg",tp,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"m32.57 15.72l-3.35-1a11.65 11.65 0 0 0-.95-2.33l1.64-3.07a.61.61 0 0 0-.11-.72l-2.39-2.4a.61.61 0 0 0-.72-.11l-3.05 1.63a11.62 11.62 0 0 0-2.36-1l-1-3.31a.61.61 0 0 0-.59-.41h-3.38a.61.61 0 0 0-.58.43l-1 3.3a11.63 11.63 0 0 0-2.38 1l-3-1.62a.61.61 0 0 0-.72.11L6.2 8.59a.61.61 0 0 0-.11.72l1.62 3a11.63 11.63 0 0 0-1 2.37l-3.31 1a.61.61 0 0 0-.43.58v3.38a.61.61 0 0 0 .43.58l3.33 1a11.62 11.62 0 0 0 1 2.33l-1.64 3.14a.61.61 0 0 0 .11.72l2.39 2.39a.61.61 0 0 0 .72.11l3.09-1.65a11.65 11.65 0 0 0 2.3.94l1 3.37a.61.61 0 0 0 .58.43h3.38a.61.61 0 0 0 .58-.43l1-3.38a11.63 11.63 0 0 0 2.28-.94l3.11 1.66a.61.61 0 0 0 .72-.11l2.39-2.39a.61.61 0 0 0 .11-.72l-1.66-3.1a11.63 11.63 0 0 0 .95-2.29l3.37-1a.61.61 0 0 0 .43-.58v-3.41a.61.61 0 0 0-.37-.59ZM18 23.5a5.5 5.5 0 1 1 5.5-5.5a5.5 5.5 0 0 1-5.5 5.5Z",class:"clr-i-solid clr-i-solid-path-1"},null,-1),U("path",{fill:"none",d:"M0 0h36v36H0z"},null,-1)])])}const Ul=ve(ep,[["render",np]]),op=Object.freeze(Object.defineProperty({__proto__:null,default:Ul},Symbol.toStringTag,{value:"Module"})),or=pe({__name:"ButtonSettings",props:{disabled:{type:Boolean},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return $t({onKeyUp:o=>{o.key==="s"&&!o.metaKey&&!o.ctrlKey&&n("click")}}),(o,i)=>(v(),oe(Ge,{transparent:e.transparent,title:"Reader preferences (S)",disabled:e.disabled,onClick:i[0]||(i[0]=()=>n("click"))},{default:ne(()=>[B(Ul)]),_:1},8,["transparent","disabled"]))}}),ip=Object.freeze(Object.defineProperty({__proto__:null,default:or},Symbol.toStringTag,{value:"Module"})),rp={},sp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function lp(e,t){return v(),$("svg",sp,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M4 4h6v2H6v4H4V4Zm10 0h6v6h-2V6h-4V4ZM6 14v4h4v2H4v-6h2Zm14 0v6h-6v-2h4v-4h2Z"},null,-1)])])}const Kl=ve(rp,[["render",lp]]),ap=Object.freeze(Object.defineProperty({__proto__:null,default:Kl},Symbol.toStringTag,{value:"Module"})),cp={},up={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function dp(e,t){return v(),$("svg",up,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M14 20v-6h6v2h-4v4h-2Zm-6 0v-4H4v-2h6v6H8Zm12-10h-6V4h2v4h4v2Zm-10 0H4V8h4V4h2v6Z"},null,-1)])])}const Zl=ve(cp,[["render",dp]]),fp=Object.freeze(Object.defineProperty({__proto__:null,default:Zl},Symbol.toStringTag,{value:"Module"})),ir=pe({__name:"ButtonWebFullScreen",props:{transparent:{type:Boolean}},emits:["request-full-screen"],setup(e,{emit:t}){const n=t,o=ee(!1);$t({onKeyUp:r=>{r.key==="f"&&!r.metaKey&&!r.ctrlKey&&i()}}),St("fullscreenchange",()=>{o.value=!!document.fullscreenElement});function i(){document.fullscreenElement?document.exitFullscreen():n("request-full-screen")}return(r,s)=>(v(),oe(Ge,{transparent:e.transparent,title:`${o.value?"Exit":"Enter"} fullscreen (F)`,onClick:i},{default:ne(()=>[o.value?(v(),oe(Zl,{key:0})):(v(),oe(Kl,{key:1}))]),_:1},8,["transparent","title"]))}}),pp=Object.freeze(Object.defineProperty({__proto__:null,default:ir},Symbol.toStringTag,{value:"Module"}));async function gn(e,t,n){const o=await n(()=>{e=0});if(o!==void 0)return o;if(!(e<=0))return await new Promise(i=>{setTimeout(async()=>{const r=await gn(e-1,t,n);i(r)},t)})}const hp=["aria-hidden"],gp=["onClick"],Yl=pe({__name:"DropdownMenu",props:Ye({items:{type:Array},enableHapticFeedback:{type:Boolean}},{modelValue:{type:Number,required:!1},modelModifiers:{}}),emits:Ye(["select"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=lt(e,"modelValue"),r=ee(null),s=ee(!1),l=ee(!1),a=ee(!1),u=ee(!1),c={mounted:w=>{var g;i.value&&((g=w.children[i.value])==null||g.scrollIntoView({behavior:"auto",block:"center",inline:"center"}))}};$t({onKeyDown:D}),Yi(()=>{const w=s.value;return w&&(s.value=!1),w});const d=Ko(),f=Zo();async function p(w){s.value=w??!s.value,d(s.value),s.value?(x(),P(r.value)):setTimeout(A,250)}function x(){const w=r.value;if(w){const g=w.getBoundingClientRect(),I=g.x+g.width/2;l.value=g.y>window.innerHeight/2,a.value=I<window.innerWidth/3,u.value=I>window.innerWidth/3*2}}function _(w,g){p(),w!=i.value&&(i.value=w,o("select",w,g),n.enableHapticFeedback&&f())}function D(w){s.value&&w.key==="Escape"&&(p(),w.preventDefault())}let b=[];function P(w){const g=window.getComputedStyle(w).zIndex,I=w.style.zIndex;(!g||!(+g>0))&&((!w.parentElement||w.parentElement.childElementCount>1)&&(w.style.zIndex="1",b.push({el:w,zIndex:I})),w.parentElement&&P(w.parentElement))}function A(){b.forEach(({el:w,zIndex:g})=>{w.style.zIndex=g??""}),b=[]}return(w,g)=>(v(),$("div",{ref_key:"root",ref:r,class:"select-none relative inline-flex"},[s.value?(v(),$("div",{key:0,class:"fixed inset-0 bg-transparent",onClick:g[0]||(g[0]=()=>p())})):se("",!0),e.items.length?(v(),oe(Vo,{key:1,name:"slide-fade","enter-from-class":"scale-y-90 opacity-0 pointer-events-none","leave-to-class":"scale-y-90 opacity-0 pointer-events-none"},{default:ne(()=>[s.value?Ne((v(),$("ul",{key:0,ref:"list","aria-hidden":!s.value,class:fe(["scrollbar-sm duration-150 delay-50 absolute w-40 max-h-[70vh] list-none bg-stone-800 bg-opacity-80 backdrop-blur-md rounded-lg overflow-auto",{"origin-bottom bottom-full -translate-y-1.5":l.value,"origin-top top-full translate-y-1.5":!l.value,"left-1/2 -ml-20 text-center":!a.value&&!u.value,"right-0 text-right":u.value}]),onWheelPassive:g[1]||(g[1]=Le(()=>{},["stop"])),onTouchmove:g[2]||(g[2]=Le(()=>{},["stop"]))},[(v(!0),$(be,null,Yt(e.items,(I,q)=>Ne((v(),$("li",{key:q,tabindex:"-1",class:fe(["h-10 px-4 last:border-b-transparent cursor-pointer hover:bg-stone-100 hover:bg-opacity-10 duration-100",{"text-textPrimary":q===i.value}]),onClick:K=>_(q,K)},[U("div",{class:fe(["h-full py-2",{"border-t-[1px] border-solid border-stone-400 border-opacity-30":q>0}])},[xe(w.$slots,"item",{item:I},()=>[Wt(He(I),1)])],2)],10,gp)),[[Z(zt),30]])),128))],42,hp)),[[c]]):se("",!0)]),_:3})):se("",!0),xe(w.$slots,"default",{toggle:p,isOpen:s.value,isAlignTop:l.value})],512))}}),mp=Object.freeze(Object.defineProperty({__proto__:null,default:Yl},Symbol.toStringTag,{value:"Module"})),vp={},bp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function yp(e,t){return v(),$("svg",bp,[...t[0]||(t[0]=[Ou('<circle cx="18" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".67" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="12" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin=".33" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle><circle cx="6" cy="12" r="0" fill="currentColor"><animate attributeName="r" begin="0" calcMode="spline" dur="1.5s" keySplines="0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8;0.2 0.2 0.4 0.8" repeatCount="indefinite" values="0;2;0;0"></animate></circle>',3)])])}const Xl=ve(vp,[["render",yp]]),wp=Object.freeze(Object.defineProperty({__proto__:null,default:Xl},Symbol.toStringTag,{value:"Module"})),xp={},_p={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Sp(e,t){return v(),$("svg",_p,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"},null,-1)])])}const Gl=ve(xp,[["render",Sp]]),kp=Object.freeze(Object.defineProperty({__proto__:null,default:Gl},Symbol.toStringTag,{value:"Module"})),Cp=["onClick"],Tp={class:"inline-flex items-center justify-center w-full h-full px-4 rounded-full group-hover:bg-stone-100 group-hover:bg-opacity-20 duration-200"},Pp={class:"whitespace-nowrap"},rr=pe({__name:"ButtonDropdown",props:Ye({label:{type:String},title:{type:String},items:{type:Array},disabled:{type:Boolean},canLoadItems:{type:Boolean},loadItems:{type:Function},enableHapticFeedback:{type:Boolean},transparent:{type:Boolean}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:Ye(["select"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=lt(e,"modelValue"),r=ee(!1),s=Ko();async function l(f,p){if(!n.items.length&&(f||await a(),!n.items.length)){p(!1);return}p()}async function a(){r.value||n.items.length||!n.canLoadItems||!n.loadItems||(r.value=!0,await n.loadItems(),r.value=!1)}let u=!1;function c(){u||(u=!0,s(!0,{desktopOnly:!0}))}function d(){u&&(u=!1,s(!1,{desktopOnly:!0}))}return(f,p)=>(v(),oe(Yl,{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=x=>i.value=x),items:e.items,"enable-haptic-feedback":e.enableHapticFeedback,onSelect:p[1]||(p[1]=(x,_)=>o("select",x,_))},Mi({default:ne(({toggle:x,isOpen:_,isAlignTop:D})=>[Ne((v(),$("button",cn({type:"button",tabindex:"-1",class:["w-full h-10 max-h-full rounded-full group duration-100 transition-bg",{"pointer-events-none opacity-60":e.disabled||r.value,"bg-black bg-opacity-50":!e.transparent,"bg-transparent":e.transparent}]},e.title?{title:e.title}:{},{onClick:Le(()=>l(_,x),["stop"]),onMouseenter:c,onMouseleave:d}),[U("div",Tp,[U("span",Pp,He(e.label),1),e.items.length||e.canLoadItems?(v(),$("span",{key:0,class:fe(["w-4 h-4 flex ml-1 -mr-3 flex-shrink-0",{"rotate-180":D}]),"aria-hidden":"true"},[r.value?(v(),oe(Xl,{key:0})):(v(),oe(Gl,{key:1}))],2)):se("",!0)])],16,Cp)),[[Z(zt),30]])]),_:2},[f.$slots.item?{name:"item",fn:ne(({item:x})=>[xe(f.$slots,"item",{item:x})]),key:"0"}:void 0]),1032,["modelValue","items","enable-haptic-feedback"]))}}),Mp=Object.freeze(Object.defineProperty({__proto__:null,default:rr},Symbol.toStringTag,{value:"Module"})),Ep={},Ip={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Op(e,t){return v(),$("svg",Ip,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z"},null,-1)])])}const Jl=ve(Ep,[["render",Op]]),$p=Object.freeze(Object.defineProperty({__proto__:null,default:Jl},Symbol.toStringTag,{value:"Module"})),zp={},Dp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Ap(e,t){return v(),$("svg",Dp,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z"},null,-1)])])}const Ql=ve(zp,[["render",Ap]]),jp=Object.freeze(Object.defineProperty({__proto__:null,default:Ql},Symbol.toStringTag,{value:"Module"})),Lp={key:0,class:"ml-auto inline-flex gap-[1px] scale-95 origin-right"},sr=pe({__name:"ChapterNav",props:{data:{type:Object},chapterSpec:{type:Object},touchDevice:{type:Boolean},rtl:{type:Boolean},transparent:{type:Boolean}},emits:["getHiddenChapters","prev","next"],setup(e,{emit:t}){const n=e,o=t;async function i(){const c=n.chapterSpec;if(!c)return;const{trigger:d,sel:f,label:p}=c;if(d&&(!f||!p)){await r(d);return}o("getHiddenChapters"),await gn(50,50,()=>n.data.chapters.length?!0:void 0)}async function r(c){const d=document.querySelector(c);d&&(d instanceof HTMLDialogElement?d.showModal():d.click())}function s(c,d){var f,p,x;(x=(p=(f=n.data)==null?void 0:f.chapters)==null?void 0:p[c])==null||x.select(u(d))}function l(c){n.rtl?o("next",u(c)):o("prev",u(c))}function a(c){n.rtl?o("prev",u(c)):o("next",u(c))}function u(c){return!n.touchDevice&&(c.ctrlKey||c.metaKey)}return(c,d)=>{var f;return v(),$(be,null,[B(rr,{modelValue:e.data.activeIndex,label:e.data.activeLabel,title:"Select chapter",transparent:e.transparent,items:e.data.chapters,"can-load-items":!!((f=e.chapterSpec)!=null&&f.trigger),"load-items":i,"enable-haptic-feedback":"",onSelect:s},{item:ne(({item:p})=>[Wt(He(p.label),1)]),_:1},8,["modelValue","label","transparent","items","can-load-items"]),e.data.next||e.data.prev?(v(),$("div",Lp,[B(Ge,{title:`${e.rtl?"Next":"Prev"} chapter (←)`,disabled:e.rtl?!e.data.next:!e.data.prev,transparent:e.transparent,class:"!rounded-r-none","enable-haptic-feedback":"",onClick:l},{default:ne(()=>[B(Jl)]),_:1},8,["title","disabled","transparent"]),B(Ge,{title:`${e.rtl?"Prev":"Next"} chapter (→)`,disabled:e.rtl?!e.data.prev:!e.data.next,transparent:e.transparent,class:"!rounded-l-none","enable-haptic-feedback":"",onClick:a},{default:ne(()=>[B(Ql)]),_:1},8,["title","disabled","transparent"])])):se("",!0)],64)}}}),Bp=Object.freeze(Object.defineProperty({__proto__:null,default:sr},Symbol.toStringTag,{value:"Module"})),Vp=["min","max","step"],Np={class:"flex-shrink-0 w-12 inline-block text-right"},en=ve(pe({__name:"InputPercentage",props:Ye({min:{type:Number},max:{type:Number},step:{type:Number},format:{type:Function}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue"),n=G({get(){return t.value},set(o){t.value=+o}});return(o,i)=>{var r;return v(),$("div",{class:"flex items-center gap-3 pl-1",style:Pe({"--percentage":`${(n.value-e.min)/(e.max-e.min)*100}%`})},[Ne(U("input",{"onUpdate:modelValue":i[0]||(i[0]=s=>n.value=s),type:"range",min:e.min,max:e.max,step:e.step??1,class:"flex-grow",onTouchmove:i[1]||(i[1]=Le(()=>{},["stop"]))},null,40,Vp),[[hd,n.value]]),U("span",Np,He(((r=e.format)==null?void 0:r.call(e,t.value))??t.value),1)],4)}}}),[["styles",["input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:linear-gradient(to right,#fb8252 var(--percentage),#5a5552 var(--percentage));border-radius:9999px;border-style:none;cursor:pointer;height:4px;opacity:.9;pointer-events:none;--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1));outline:2px solid transparent;outline-offset:2px}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none!important;border-radius:9999px;border-style:solid;border-width:2px;cursor:pointer;height:24px;pointer-events:auto;width:24px;--tw-border-opacity:1;border-color:rgb(251 130 82/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1));transition-duration:.2s}input[type=range]:hover{opacity:1}"]]]),Rp=Object.freeze(Object.defineProperty({__proto__:null,default:en},Symbol.toStringTag,{value:"Module"})),Hp={ref:"root",class:"flex text-sm flex-wrap gap-2 leading-none"},Fp=["onClick","onKeyup"],vt=pe({__name:"InputSelect",props:Ye({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=lt(e,"modelValue");function o(i){i!==n.value&&(n.value=i)}return(i,r)=>(v(),$("div",Hp,[(v(!0),$(be,null,Yt(t.items,(s,l)=>Ne((v(),$("div",{key:l,tabindex:"0",class:fe(["inline-flex justify-center items-center rounded-full px-3 py-1.5 cursor-pointer z-10 whitespace-nowrap flex-shrink-0 focus:outline-primary hover:bg-opacity-80 duration-200",{"bg-primary":l==n.value,"bg-stone-600 bg-opacity-50":l!=n.value}]),onClick:()=>o(l),onKeyup:[Fo(()=>o(l),["enter"]),Fo(()=>o(l),["space"])]},[Wt(He(s),1)],42,Fp)),[[Z(zt),30]])),128))],512))}}),Wp=Object.freeze(Object.defineProperty({__proto__:null,default:vt},Symbol.toStringTag,{value:"Module"})),qp={class:"flex w-full items-center justify-between cursor-pointer mb-5 last:mb-0"},Up={class:"text-sm py-1"},Kp={class:"switcher p-1"},lr=ve(pe({__name:"InputSwitcher",props:Ye({label:{type:String}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue");return(n,o)=>(v(),$("label",qp,[U("span",Up,He(e.label),1),U("div",Kp,[Ne(U("input",{"onUpdate:modelValue":o[0]||(o[0]=i=>t.value=i),type:"checkbox"},null,512),[[gd,t.value]]),o[1]||(o[1]=U("span",null,null,-1))])]))}}),[["styles",['.switcher{height:24px;position:relative;width:40px}.switcher input{height:0;opacity:0;width:0}.switcher input:checked+span{border-width:1px;--tw-border-opacity:1;border-color:rgb(184 92 56/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(184 92 56/var(--tw-bg-opacity,1))}.switcher input:checked+span:before{bottom:2px;height:18px;left:17.2px;width:18px}.switcher span{border-radius:9999px;border-width:2px;top:0;right:0;bottom:0;left:0;--tw-border-opacity:1;background-color:transparent;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.switcher span,.switcher span:before{position:absolute;transition-duration:.3s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.switcher span:before{border-radius:9999px;bottom:4px;content:"";height:12px;left:4px;width:12px;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}']]]),Zp=Object.freeze(Object.defineProperty({__proto__:null,default:lr},Symbol.toStringTag,{value:"Module"})),Yp={class:"flex-grow mb-5 last:mb-0"},Ae=pe({__name:"TableField",props:{label:{type:String},disabled:{type:Boolean}},setup(e){return(t,n)=>(v(),$(be,null,[U("div",{class:fe(["flex-shrink-0 mb-2 whitespace-nowrap text-sm",{"opacity-50":e.disabled}])},He(e.label),3),U("div",Yp,[xe(t.$slots,"default")])],64))}}),Xp=Object.freeze(Object.defineProperty({__proto__:null,default:Ae},Symbol.toStringTag,{value:"Module"})),ea=pe({__name:"FieldContrast",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue"),n=G({get(){return Math.round(t.value*100)},set(o){t.value=Math.round(o)/100}});return(o,i)=>(v(),oe(Ae,{label:"Contrast"},{default:ne(()=>[B(en,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),min:20,max:100,format:r=>`${r}%`},null,8,["modelValue","format"])]),_:1}))}}),Gp=Object.freeze(Object.defineProperty({__proto__:null,default:ea},Symbol.toStringTag,{value:"Module"})),Jp={},Qp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function eh(e,t){return v(),$("svg",Qp,[...t[0]||(t[0]=[U("path",{d:"M480 358.856V153.143C480 130.512 461.674 112 439.272 112H72.728C50.326 112 32 130.512 32 153.143v205.713C32 381.488 50.326 400 72.728 400h366.545C461.674 400 480 381.488 480 358.856zM112 364V148h288v216H112z",fill:"currentColor"},null,-1)])])}const ta=ve(Jp,[["render",eh]]),th=Object.freeze(Object.defineProperty({__proto__:null,default:ta},Symbol.toStringTag,{value:"Module"})),nh={},oh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function ih(e,t){return v(),$("svg",oh,[...t[0]||(t[0]=[U("path",{d:"M358.856 32H153.143C130.512 32 112 50.326 112 72.728v366.545C112 461.674 130.512 480 153.143 480h205.713C381.488 480 400 461.674 400 439.272V72.728C400 50.326 381.488 32 358.856 32zM364 400H148V112h216v288z",fill:"currentColor"},null,-1)])])}const na=ve(nh,[["render",ih]]),rh=Object.freeze(Object.defineProperty({__proto__:null,default:na},Symbol.toStringTag,{value:"Module"})),ar=pe({inheritAttrs:!1,__name:"ButtonOutline",emits:["click"],setup(e,{emit:t}){const n=t,o=Zo();function i(){o(),n("click")}return(r,s)=>Ne((v(),$("button",{class:fe([r.$attrs.class??"","flex focus:outline-none outline-none rounded-full h-10 justify-center items-center border border-solid border-stone-600 text-stone-200 hover:bg-stone-500 hover:bg-opacity-10 duration-200"]),onClick:i},[xe(r.$slots,"default")],2)),[[Z(zt),24]])}}),sh=Object.freeze(Object.defineProperty({__proto__:null,default:ar},Symbol.toStringTag,{value:"Module"}));var tn=(e=>(e[e.never=0]="never",e[e.move=1]="move",e[e.firstMove=2]="firstMove",e[e.onLoad=3]="onLoad",e))(tn||{}),nt=(e=>(e[e.vertical=0]="vertical",e[e.ltr=1]="ltr",e[e.rtl=2]="rtl",e))(nt||{});const cr=[{name:"System",value:"system-ui, sans-serif"},{name:"Charter",value:'Charter, "Times New Roman", serif'},{name:"Georgia",value:"Georgia, serif"}],oa=pe({__name:"FieldFontFamily",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue"),n=G({get(){const o=cr.findIndex(i=>i.value===t.value);return o===-1?0:o},set(o){t.value=cr[o].value}});return(o,i)=>(v(),oe(Ae,{label:"Font family"},{default:ne(()=>[B(vt,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),items:Z(cr).map(r=>r.name)},null,8,["modelValue","items"])]),_:1}))}}),lh=Object.freeze(Object.defineProperty({__proto__:null,default:oa},Symbol.toStringTag,{value:"Module"}));function ah(e){if(e)try{return JSON.parse(e)}catch{return}}function ch(){const{width:e,height:t}=hn();return G(()=>e.value>t.value)}function ia(e){return String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}var Dt=(e=>(e[e.longStrip=0]="longStrip",e[e.single=1]="single",e[e.double=2]="double",e))(Dt||{});const Xo=.25,Go=5,ur=.25,Jo=.2,Qo=5,uh=.05,dh=0,fh=5;function ph(e){var g,I,q,K,R,Q;const n=e.touchDevice&&(window.innerHeight<=600||window.innerWidth<=600)?ch():void 0,{titleName:o,isWebtoon:i}=e,r=o?ia(o):location.hostname,s=ee(hh(`tkr:${r}`)),l=H=>{s.value=H;const T=`tkr:${r}`;!H||!Object.keys(H).length?localStorage.removeItem(T):localStorage.setItem(T,JSON.stringify(H))},a=H=>{if(!s.value){l(H);return}const T={...s.value};Object.entries(H).forEach(([Y,S])=>{S===void 0?delete T[Y]:T[Y]=S}),l(T)},u=ee((g=s.value)==null?void 0:g.style),c=ee((I=s.value)==null?void 0:I.direction),d=ee((q=s.value)==null?void 0:q.gap),f=ee((K=s.value)==null?void 0:K.speed),p=ee((R=s.value)==null?void 0:R.zoom),x=ee(((Q=s.value)==null?void 0:Q.breakFirst)??!1),_=G({get(){if(i.value)return Dt.longStrip;if(u.value!==void 0)return u.value;const{landscapeStyle:H,readerStyle:T}=e.defaultPreferences.value;return n!=null&&n.value?H??T:T},set:H=>{if(u.value===H)return;const T=_.value===Dt.longStrip,Y=H===Dt.longStrip;u.value=H,a({style:H}),T!==Y&&(D.value=Y?nt.vertical:nt.rtl)}}),D=G({get(){if(i.value)return nt.vertical;if(c.value!==void 0)return c.value;const{direction:H,landscapeDirection:T}=e.defaultPreferences.value;return n!=null&&n.value?T??H:H},set:H=>{c.value=H,a({direction:H})}}),b=G({get:()=>d.value??e.defaultPreferences.value.gap,set(H){d.value=H,a({gap:H})}}),P=G({get:()=>f.value??e.defaultPreferences.value.speed,set(H){f.value=H,a({speed:H===1?void 0:H})}}),A=G({get:()=>p.value??1,set(H){p.value=H,a({zoom:H===1?void 0:H})}}),w=G({get:()=>x.value,set(H){x.value=H,a({breakFirst:H?!0:void 0})}});return{direction:D,style:_,gap:b,speed:P,zoom:A,isLongStrip:G(()=>_.value===Dt.longStrip),isDouble:G(()=>_.value===Dt.double),isRTL:G(()=>D.value===nt.rtl),isVertical:G(()=>D.value===nt.vertical),breakFirst:w}}function hh(e){const t=localStorage.getItem(e),n=ah(t||void 0),o={};return n?(n.style!==void 0&&Object.values(Dt).includes(n.style)&&(o.style=n.style),n.direction!==void 0&&Object.values(nt).includes(n.direction)&&(o.direction=n.direction),n.gap!==void 0&&n.gap>=dh&&n.gap<=fh&&(o.gap=n.gap),n.speed!==void 0&&n.speed>=Xo&&n.speed<=Go&&(o.speed=n.speed),n.zoom!==void 0&&n.zoom>=Jo&&n.zoom<=Qo&&(o.zoom=n.zoom),n.breakFirst===!0&&(o.breakFirst=!0),Object.keys(o).length?o:void 0):o}const dr=pe({__name:"NovelPreferencesForm",props:Ye({enableReset:{type:Boolean},defaultPreferences:{type:Object}},{modelValue:{required:!0},modelModifiers:{}}),emits:Ye(["reset"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=lt(e,"modelValue"),r=G(()=>Object.keys(i.value).some(l=>{var a;return i.value[l]!==((a=n.defaultPreferences)==null?void 0:a[l])}));function s(l){i.value={...i.value,...l}}return(l,a)=>(v(),$(be,null,[B(oa,{"model-value":i.value.fontFamily,"onUpdate:modelValue":a[0]||(a[0]=u=>s({fontFamily:u}))},null,8,["model-value"]),B(Ae,{label:"Text size"},{default:ne(()=>[B(en,{"model-value":i.value.fontSize,min:10,max:48,"onUpdate:modelValue":a[1]||(a[1]=u=>s({fontSize:u,lineHeight:Math.max(i.value.lineHeight,u)}))},null,8,["model-value"])]),_:1}),B(Ae,{label:"Line height"},{default:ne(()=>[B(en,{"model-value":i.value.lineHeight,min:10,max:96,step:1,"onUpdate:modelValue":a[2]||(a[2]=u=>s({lineHeight:u,fontSize:Math.min(i.value.fontSize,u)}))},null,8,["model-value"])]),_:1}),B(Ae,{label:"Play speed"},{default:ne(()=>[B(en,{"model-value":i.value.speed,min:Z(Xo),max:Z(Go),step:Z(ur),format:u=>`${u.toFixed(2)}x`,"onUpdate:modelValue":a[3]||(a[3]=u=>s({speed:u}))},null,8,["model-value","min","max","step","format"])]),_:1}),e.enableReset?(v(),$("div",{key:0,class:fe(["w-full flex justify-center pt-1 duration-200",{"pointer-events-none opacity-0":!r.value,"opacity-90":r.value}])},[B(ar,{class:"w-2/3",onClick:a[4]||(a[4]=()=>o("reset"))},{default:ne(()=>[...a[5]||(a[5]=[Wt(" Reset to default ",-1)])]),_:1})],2)):se("",!0)],64))}}),gh=Object.freeze(Object.defineProperty({__proto__:null,default:dr},Symbol.toStringTag,{value:"Module"})),mh={key:1,class:"mb-3 border-stone-500 border-opacity-70"},vh={key:2,class:"flex justify-end"},bh={class:"h-6 border border-stone-500 rounded-md cursor-pointer flex items-center"},yh={key:3,class:"mt-5 mb-3 border-stone-500 border-opacity-70"},fr=pe({__name:"DefaultPreferencesForm",props:Ye({touchDevice:{type:Boolean},isNovel:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=lt(e,"modelValue"),o=ee(!1),i=ee(!1);je(()=>{o.value=t.touchDevice&&(window.innerHeight<=600||window.innerWidth<=600)});function r(l){const a=i.value,c=(a?n.value.landscapeStyle??n.value.readerStyle:n.value.readerStyle)!==Dt.longStrip,d=l!==Dt.longStrip;if(c===d)s(a?{landscapeStyle:l}:{readerStyle:l});else{const f=d?nt.rtl:nt.vertical;s(a?{landscapeStyle:l,landscapeDirection:f}:{readerStyle:l,direction:f})}}function s(l){n.value={...n.value,...l}}return(l,a)=>(v(),$(be,null,[e.isNovel?(v(),$(be,{key:0},[B(dr,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=u=>n.value=u)},null,8,["modelValue"]),B(ea,{"model-value":n.value.contrast,"onUpdate:modelValue":a[1]||(a[1]=u=>s({contrast:u}))},null,8,["model-value"])],64)):(v(),$(be,{key:1},[B(lr,{"model-value":n.value.autoPlay===!0,label:"Auto play in long strip","onUpdate:modelValue":a[2]||(a[2]=u=>s({autoPlay:u}))},null,8,["model-value"]),e.touchDevice?(v(),oe(lr,{key:0,"model-value":n.value.pinchToZoom!==!1,label:"Pinch to zoom","onUpdate:modelValue":a[3]||(a[3]=u=>s({pinchToZoom:u}))},null,8,["model-value"])):se("",!0),o.value?(v(),$("hr",mh)):se("",!0),o.value?(v(),$("div",vh,[U("div",bh,[Ne((v(),$("button",{class:fe(["focus:outline-none outline-none h-full flex justify-center items-center px-3 py-0.5 rounded-l-sm",{"bg-stone-500 text-stone-50":!i.value,"text-stone-400":i.value}]),onClick:a[4]||(a[4]=()=>i.value=!1)},[B(na)],2)),[[Z(zt),24]]),Ne((v(),$("button",{class:fe(["focus:outline-none outline-none h-full flex justify-center items-center px-3 py-0.5 rounded-r-sm",{"bg-stone-500 text-stone-50":i.value,"text-stone-400":!i.value}]),onClick:a[5]||(a[5]=()=>i.value=!0)},[B(ta)],2)),[[Z(zt),24]])])])):se("",!0),B(Ae,{label:"Style"},{default:ne(()=>[B(vt,{"model-value":i.value?n.value.landscapeStyle??n.value.readerStyle:n.value.readerStyle,items:["Long strip","Single page","Double page"],"onUpdate:modelValue":r},null,8,["model-value"])]),_:1}),B(Ae,{label:"Direction"},{default:ne(()=>[B(vt,{"model-value":i.value?n.value.landscapeDirection??n.value.direction:n.value.direction,items:["Vertical","Left to right","Right to left"],"onUpdate:modelValue":a[6]||(a[6]=u=>s(i.value?{landscapeDirection:u}:{direction:u}))},null,8,["model-value"])]),_:1}),o.value?(v(),$("hr",yh)):se("",!0),B(Ae,{label:"Gap size"},{default:ne(()=>[B(vt,{"model-value":n.value.gap,items:["None","1px","2px","3px","4px","5px"],"onUpdate:modelValue":a[7]||(a[7]=u=>s({gap:u}))},null,8,["model-value"])]),_:1})],64)),B(Ae,{label:"Progress size"},{default:ne(()=>[B(vt,{"model-value":n.value.progressSize/2,items:["None","2px","4px","6px","8px","10px"],"onUpdate:modelValue":a[8]||(a[8]=u=>s({progressSize:u*2}))},null,8,["model-value"])]),_:1}),B(Ae,{label:"Auto next"},{default:ne(()=>[B(vt,{"model-value":n.value.autoNextSeconds,items:["None","1 sec","2 sec","3 sec","4 sec","5 sec"],"onUpdate:modelValue":a[9]||(a[9]=u=>s({autoNextSeconds:u}))},null,8,["model-value"])]),_:1}),B(Ae,{label:"Hide controls"},{default:ne(()=>[B(vt,{"model-value":n.value.hideControlsEvent,items:["Never","On move","On first move","On load"],"onUpdate:modelValue":a[10]||(a[10]=u=>s({hideControlsEvent:u}))},null,8,["model-value"])]),_:1}),e.isNovel?se("",!0):(v(),$(be,{key:2},[B(Ae,{label:"Play speed"},{default:ne(()=>[B(en,{"model-value":n.value.speed,min:Z(Xo),max:Z(Go),step:Z(ur),format:u=>`${u.toFixed(2)}x`,"onUpdate:modelValue":a[11]||(a[11]=u=>s({speed:u}))},null,8,["model-value","min","max","step","format"])]),_:1}),B(Ae,{label:e.touchDevice?"Tap zones":"Click zones"},{default:ne(()=>[B(vt,{"model-value":(n.value.tapZone??-1)+1,items:["Default","None","L shaped","Kindle-ish","Edge","Right and left"],"onUpdate:modelValue":a[12]||(a[12]=u=>s({tapZone:u===0?void 0:u-1}))},null,8,["model-value"])]),_:1},8,["label"])],64))],64))}}),wh=Object.freeze(Object.defineProperty({__proto__:null,default:fr},Symbol.toStringTag,{value:"Module"})),xh={},_h={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Sh(e,t){return v(),$("svg",_h,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M11.3 19.3q-.275-.275-.288-.7t.263-.7l4.9-4.9H5q-.425 0-.713-.288T4 12q0-.425.288-.713T5 11h11.175l-4.9-4.9q-.275-.275-.263-.7t.288-.7q.275-.275.7-.275t.7.275l6.6 6.6q.15.125.213.313t.062.387q0 .2-.062.375t-.213.325l-6.6 6.6q-.275.275-.7.275t-.7-.275Z"},null,-1)])])}const Jn=ve(xh,[["render",Sh]]),kh=Object.freeze(Object.defineProperty({__proto__:null,default:Jn},Symbol.toStringTag,{value:"Module"}));var pr=(e=>(e[e.none=0]="none",e[e.lShape=1]="lShape",e[e.kindleIsh=2]="kindleIsh",e[e.edge=3]="edge",e[e.rightAndLeft=4]="rightAndLeft",e))(pr||{});const ra={0:{prevZones:[],nextZones:[]},1:{prevZones:[0,1,2,3],nextZones:[8,7,6,5]},2:{prevZones:[6,3],nextZones:[8,7,5,4]},3:{prevZones:[7],nextZones:[5,0,2,3,6,8]},4:{prevZones:[3,0,6],nextZones:[5,2,8]}},sa=pe({__name:"TapZonePreview",props:{tapZone:{type:Number},direction:{type:Number}},setup(e){const t=e,{width:n,height:o}=hn(),i=G(()=>Math.min(1.25,Math.max(.75,Math.round(n.value/o.value*100)/100))),r=G(()=>i.value>=1),s=G(()=>t.direction===nt.vertical),l=G(()=>t.direction===nt.rtl),a=G(()=>{if(!t.tapZone)return;const{prevZones:u,nextZones:c}=ra[t.tapZone];return Array.from({length:9},(d,f)=>{const p=u.includes(f),x=!p&&c.includes(f);return{isPrev:p,isNext:x,hasArrow:f===u[0]||f===c[0]}})});return(u,c)=>(v(),$("div",{class:fe(["p-2 bg-black bg-opacity-40 rounded-2xl",{"w-28":r.value,"h-28":!r.value}]),style:Pe({"aspect-ratio":i.value})},[e.tapZone===Z(pr).none?(v(),$("div",{key:0,class:fe(["inline-block absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-14 h-14",{"rotate-90":e.direction===Z(nt).vertical,"rotate-180":e.direction===Z(nt).rtl}])},[B(Jn)],2)):a.value?(v(),$("div",{key:2,class:fe(["w-full h-full overflow-hidden rounded-xl flex flex-wrap",{"flex-row-reverse":l.value}])},[(v(!0),$(be,null,Yt(a.value,(d,f)=>(v(),$("div",{key:`zone-${f}`,class:fe(["w-1/3 h-1/3 flex justify-center items-center p-0.5",{"bg-stone-100":d.isPrev||d.isNext,"bg-opacity-50":d.isPrev}])},[d.hasArrow?(v(),$("span",{key:0,class:"w-5 h-5 max-w-full max-h-full inline-block transform text-stone-800",style:Pe({transform:`rotate(${s.value?d.isNext?90:-90:(l.value?d.isPrev:d.isNext)?0:180}deg)`})},[B(Jn)],4)):se("",!0)],2))),128))],2)):(v(),$("div",{key:1,class:fe(["w-full h-full overflow-hidden rounded-xl flex flex-nowrap",{"flex-col":s.value}])},[U("div",{class:fe(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":!l.value}])},[U("span",{class:fe(["w-5 h-5 inline-block transform text-stone-800",{"-rotate-90":s.value,"rotate-180":!s.value}])},[B(Jn)],2)],2),c[0]||(c[0]=U("div",{class:"flex-grow w-full h-full"},null,-1)),c[1]||(c[1]=U("div",{class:"flex-grow w-full h-full"},null,-1)),U("div",{class:fe(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":l.value}])},[U("span",{class:fe(["w-5 h-5 inline-block text-stone-800",{"transform rotate-90":s.value}])},[B(Jn)],2)],2)],2))],6))}}),Ch=Object.freeze(Object.defineProperty({__proto__:null,default:sa},Symbol.toStringTag,{value:"Module"})),Th={key:0,class:"inline-block fixed z-50 left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none"},la=pe({__name:"DirectionToast",props:{direction:{type:Number},tapZone:{type:Number}},setup(e){const t=e,n=sessionStorage.getItem("tk:dir"),o=ee(typeof n!="string"||+n!==t.direction),i=ct(()=>o.value=!1,1500);ue(()=>[t.direction,t.tapZone],()=>{r(),o.value=!0,i()}),je(()=>{r(),i();let s;ue(Zi(),a=>{a!=="visible"?s=Date.now():Date.now()-s>7e3&&(o.value=!0,i())})});function r(){sessionStorage.setItem("tk:dir",t.direction+"")}return(s,l)=>(v(),oe(Vo,{name:"slow-fade","enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ne(()=>[o.value?(v(),$("div",Th,[B(sa,{direction:e.direction,"tap-zone":e.tapZone},null,8,["direction","tap-zone"])])):se("",!0)]),_:1}))}}),Ph=Object.freeze(Object.defineProperty({__proto__:null,default:la},Symbol.toStringTag,{value:"Module"})),Mh={class:"flex justify-between items-end"},Eh={class:"fixed pointer-events-none left-0 right-0 bottom-0"},aa=pe({__name:"GearControlsLayout",props:{visible:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(v(),$("div",{id:"controls",class:fe(["fixed pointer-events-none cursor-auto left-0 top-0 w-full h-full flex flex-col justify-between p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3 z-20",{"opacity-100 z-20":e.visible,"opacity-0 -z-10":!e.visible}])},[xe(t.$slots,"default"),U("div",{class:fe(["flex gap-1 items-center relative z-30 flex-shrink-0 2xs:gap-3",{"children-pointer-events-auto":e.visible}]),style:Pe({paddingTop:`${e.spaceTop||0}px`})},[xe(t.$slots,"top")],6),U("div",Mh,[U("div",{class:fe(["inline-block",{"children-pointer-events-auto":e.visible}])},[xe(t.$slots,"bottom-left")],2),U("div",{class:fe(["inline-flex flex-col items-end gap-4",{"children-pointer-events-auto":e.visible}])},[xe(t.$slots,"bottom-right")],2)]),U("div",Eh,[xe(t.$slots,"progress")])],2))}}),Ih=Object.freeze(Object.defineProperty({__proto__:null,default:aa},Symbol.toStringTag,{value:"Module"})),Oh='.loading-indicator{display:inline-block;height:80px;position:relative;width:80px}.loading-indicator:after,.loading-indicator:before{border-radius:9999px;border-style:solid;border-width:4px;box-sizing:border-box;display:block;position:absolute;--tw-border-opacity:1;animation:lds-ripple 1s cubic-bezier(0,.2,.8,1) infinite;border-color:rgb(184 92 56/var(--tw-border-opacity,1));content:"";opacity:1}.loading-indicator:after{animation-delay:-.5s}@keyframes lds-ripple{0%{height:0;left:40px;opacity:0;top:40px;width:0}4.9%{height:8px;left:36px;opacity:0;top:36px;width:8px}5%{height:8px;left:36px;opacity:1;top:36px;width:8px}to{height:80px;left:0;opacity:0;top:0;width:80px}}',$h={},zh={class:"loading-indicator"};function Dh(e,t){return v(),$("div",zh)}const ei=ve($h,[["render",Dh],["styles",[Oh]]]),Ah=Object.freeze(Object.defineProperty({__proto__:null,default:ei},Symbol.toStringTag,{value:"Module"})),jh={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},Lh={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},hr=ve(pe({inheritAttrs:!1,__name:"GearLayout",props:{loading:{type:Boolean},immediate:{type:Boolean},idle:{type:Boolean},style:{type:Object}},setup(e,{expose:t}){const n={mounted:i=>i.isConnected&&!i.open&&i.showModal(),beforeUnmount:i=>i.isConnected&&i.open&&i.close()},o=ee(null);return t({rootEl:o}),(i,r)=>Ne((v(),$("dialog",jh,[U("div",{ref_key:"rootEl",ref:o,id:"gear-layout",class:fe({"cursor-none":e.idle,"cursor-default":!e.idle,"bg-black":e.immediate||!e.loading,"opacity-0":!e.immediate&&e.loading,"duration-200 transition-colors":!e.immediate,[`${i.$attrs.class??""}`]:!0}),style:Pe(e.style??{})},[e.loading&&e.immediate?(v(),$("div",Lh,[B(ei)])):se("",!0),xe(i.$slots,"default")],6)])),[[n]])}}),[["styles",["#gear-layout{direction:ltr;font-family:Helvetica,sans-serif;font-size:16px;font-weight:400;height:100%;line-height:24px;overflow:hidden;overscroll-behavior:contain;pointer-events:auto;text-align:left;width:100%}"]]]),Bh=Object.freeze(Object.defineProperty({__proto__:null,default:hr},Symbol.toStringTag,{value:"Module"})),Vh={},Nh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 56"};function Rh(e,t){return v(),$("svg",Nh,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M29.84 49.574h12.398c4.899 0 7.336-2.437 7.336-7.265V13.69c0-4.828-2.437-7.265-7.336-7.265H29.84Zm-16.055 0h12.398V6.426H13.785c-4.875 0-7.36 2.414-7.36 7.265V42.31c0 4.851 2.485 7.265 7.36 7.265"},null,-1)])])}const ca=ve(Vh,[["render",Rh]]),Hh=Object.freeze(Object.defineProperty({__proto__:null,default:ca},Symbol.toStringTag,{value:"Module"})),Fh={},Wh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function qh(e,t){return v(),$("svg",Wh,[...t[0]||(t[0]=[U("g",{fill:"none"},[U("path",{d:"M24 0v24H0V0zM12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035c-.01-.004-.019-.001-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427c-.002-.01-.009-.017-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093c.012.004.023 0 .029-.008l.004-.014l-.034-.614c-.003-.012-.01-.02-.02-.022m-.715.002a.023.023 0 0 0-.027.006l-.006.014l-.034.614c0 .012.007.02.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),U("path",{fill:"currentColor",d:"M8 3v18H5a2 2 0 0 1-1.995-1.85L3 19V5a2 2 0 0 1 1.85-1.995L5 3zm11 0a2 2 0 0 1 1.995 1.85L21 5v14a2 2 0 0 1-1.85 1.995L19 21h-9V3z"})],-1)])])}const ua=ve(Fh,[["render",qh]]),Uh=Object.freeze(Object.defineProperty({__proto__:null,default:ua},Symbol.toStringTag,{value:"Module"})),Kh={key:1,class:"h-5"},da=pe({__name:"MangaPreferencesForm",props:{direction:{type:Number},readerStyle:{type:Number},gap:{type:Number},speed:{type:Number},zoom:{type:Number},webtoon:{type:Boolean},defaultPreferences:{type:Object},enableReset:{type:Boolean}},emits:["update:reader-style","update:direction","update:gap","update:speed","update:zoom"],setup(e,{emit:t}){const n=e,o=t,i=G(()=>["Long strip",n.webtoon?void 0:"Single page",n.webtoon?void 0:"Double page"].filter(Boolean)),r=G(()=>{const a=n.defaultPreferences;return!n.webtoon&&n.readerStyle!==a.readerStyle||!n.webtoon&&n.direction!==a.direction||n.gap!==a.gap||n.speed!==a.speed});function s(a){o("update:zoom",Math.round(a)/100)}function l(){o("update:reader-style",void 0),o("update:direction",void 0),o("update:gap",void 0),o("update:speed",void 0)}return(a,u)=>(v(),$(be,null,[B(Ae,{label:"Style"},{default:ne(()=>[B(vt,{"model-value":e.readerStyle,items:i.value,"onUpdate:modelValue":u[0]||(u[0]=c=>o("update:reader-style",c))},null,8,["model-value","items"])]),_:1}),B(Ae,{label:"Direction"},{default:ne(()=>[B(vt,{"model-value":e.direction,items:e.webtoon?["Vertical"]:["Vertical","Left to right","Right to left"],"onUpdate:modelValue":u[1]||(u[1]=c=>o("update:direction",c))},null,8,["model-value","items"])]),_:1}),B(Ae,{label:"Gap size"},{default:ne(()=>[B(vt,{"model-value":e.gap,items:["None","1px","2px","3px","4px","5px"],"onUpdate:modelValue":u[2]||(u[2]=c=>o("update:gap",c))},null,8,["model-value"])]),_:1}),B(Ae,{label:"Play speed"},{default:ne(()=>[B(en,{"model-value":e.speed,min:Z(Xo),max:Z(Go),step:Z(ur),format:c=>`${c.toFixed(2)}x`,"onUpdate:modelValue":u[3]||(u[3]=c=>o("update:speed",c))},null,8,["model-value","min","max","step","format"])]),_:1}),B(Ae,{label:"Zoom"},{default:ne(()=>[B(en,{"model-value":Math.ceil(e.zoom*100),min:Z(Jo)*100,max:Z(Qo)*100,step:Z(uh)*100,format:c=>`${Math.ceil(c)}%`,"onUpdate:modelValue":s},null,8,["model-value","min","max","step","format"])]),_:1}),e.enableReset?(v(),$("div",{key:0,class:fe(["w-full flex justify-center pt-1 duration-200",{"pointer-events-none opacity-0":!r.value,"opacity-90":r.value}])},[B(ar,{class:"w-2/3",onClick:l},{default:ne(()=>[...u[4]||(u[4]=[Wt(" Reset to default ",-1)])]),_:1})],2)):(v(),$("div",Kh))],64))}}),Zh=Object.freeze(Object.defineProperty({__proto__:null,default:da},Symbol.toStringTag,{value:"Module"})),fa=pe({__name:"PageNav",props:Ye({disabled:{type:Boolean},pages:{type:Array},totalImgs:{type:Number}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=lt(e,"modelValue"),o=G(()=>t.pages.map(a=>a.map(({index:u})=>`${u+1}`).join("-"))),i=G(()=>{const a=n.value,u=t.pages.findIndex(c=>c.some(({index:d})=>d===a));return u===-1?t.pages.length-1:u}),r=G(()=>t.pages.length?`${o.value[i.value]}/${t.totalImgs}`:"--");function s(a){const u=t.pages[a][0].index;l(u)}function l(a){n.value=a}return(a,u)=>(v(),oe(rr,{"model-value":i.value,label:r.value,title:"Current page",items:o.value,disabled:e.disabled,"onUpdate:modelValue":s},null,8,["model-value","label","items","disabled"]))}}),Yh=Object.freeze(Object.defineProperty({__proto__:null,default:fa},Symbol.toStringTag,{value:"Module"})),gr=ve(pe({__name:"PauseToast",props:{playing:{type:Boolean}},setup(e){const t=e,n=ee(0);return ue(()=>t.playing,()=>{n.value=Date.now()}),(o,i)=>n.value?(v(),$("div",{key:n.value,class:"animate-pause-fade fixed left-1/2 top-1/2 -mx-12 -my-12 pointer-events-none w-24 h-24 p-4 bg-black bg-opacity-40 rounded-full duration-500"},[e.playing?(v(),oe(tr,{key:0})):(v(),oe(er,{key:1}))])):se("",!0)}}),[["styles",[".animate-pause-fade{animation:pause-fade .4s linear forwards;transform-origin:center}@keyframes pause-fade{0%{opacity:0;transform:scale(.3)}10%{opacity:1;transform:scale(.35)}55%{opacity:1;transform:scale(.65)}to{opacity:0;transform:scale(1)}}"]]]),Xh=Object.freeze(Object.defineProperty({__proto__:null,default:gr},Symbol.toStringTag,{value:"Module"})),Gh=30,mr=ve(pe({__name:"ProgressBar",props:{value:{type:Number},total:{type:Number},longStrip:{type:Boolean},height:{type:Number},rtl:{type:Boolean},opacity:{type:Number}},setup(e){const t=e,n=G(()=>Math.floor(t.value)+1),o=G(()=>`${Math.max(2,Math.min(10,t.height))}px`),i=hn().width,r=G(()=>t.total!==void 0&&i.value/t.total>=Gh);return(s,l)=>(v(),$("div",{class:fe(["rprog",{"rprog--rtl":e.rtl}]),style:Pe({height:o.value,opacity:e.opacity??.8})},[r.value?(v(!0),$(be,{key:0},Yt(e.total,a=>(v(),$("span",{key:a,class:fe(["rprog__item",{"rprog__item--active":n.value===a}]),style:Pe(!e.longStrip||n.value!==a?{}:{"--portion":`${e.value%1*100}%`})},null,6))),128)):(v(),$("div",{key:1,style:Pe({width:`${e.value/(e.total??1)*100}%`}),class:"h-full bg-textPrimary"},null,4))],6))}}),[["styles",['.rprog{--portion:100%;display:flex;width:100%}.rprog--rtl,.rprog--rtl .rprog__item{flex-direction:row-reverse}.rprog__item{display:inline-flex;flex-grow:1;flex-shrink:0;height:100%}.rprog__item:first-child:before{display:none}.rprog__item--active:before,.rprog__item:has(~.rprog__item--active):before{background-color:rgb(0 0 0/var(--tw-bg-opacity,1));content:"";display:block;flex-shrink:0;height:100%;width:1px;--tw-bg-opacity:.25}.rprog__item--active:after,.rprog__item:has(~.rprog__item--active):after{content:"";display:block;height:100%;--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1));width:var(--portion)}']]]),Jh=Object.freeze(Object.defineProperty({__proto__:null,default:mr},Symbol.toStringTag,{value:"Module"})),pa=pe({__name:"GesturesContainer",props:{spaceTop:{type:Number},controlsVisible:{type:Boolean},zoom:{type:Number},zooming:{type:Boolean},pinchToZoome:{type:Boolean},tapZone:{type:Number},pageIndex:{type:Number},playController:{type:Object},rtl:{type:Boolean},horizontal:{type:Boolean},longStrip:{type:Boolean},touchDevice:{type:Boolean},busy:{type:Boolean}},emits:["update:zoom","update:zooming","dragEnd","click","prev","next"],setup(e,{expose:t,emit:n}){const o=e,i=n,r=ee(null),s=ee(Math.min(Qo,Math.max(Jo,o.zoom))),l=ee(!1),a=ee(!1),u={isZoomIn:!1,isZoomOut:!1,initial:void 0};t({rootEl:r}),ue(()=>o.zoom,k=>F(k)),je(()=>{o.touchDevice?St(r,"touchstart",b):(St(r,"mousedown",p),St(window,"wheel",q))}),$t({onKeyDown:k=>{var y;if(!o.busy&&((y=r.value)==null||y.focus(),!(k.key==="Meta"||k.key==="Control")&&(k.ctrlKey||k.metaKey)))switch(k.key){case"0":F(1);break;case"-":F(s.value-.2),k.preventDefault();break;case"=":case"+":F(s.value+.2),k.preventDefault();break}},onKeyUp:k=>{o.zooming&&!(k.ctrlKey||k.metaKey)&&Y()}});function c(k){a.value!==k&&(a.value=k,k?o.playController.pause():(i("dragEnd"),o.playController.resume()))}let d={x:0,y:0},f={x:0,y:0};function p(k){if(k.button!==0)return;const y=r.value;y&&(d={x:k.clientX,y:k.clientY},f={x:y.scrollLeft,y:y.scrollTop},window.addEventListener("mousemove",x),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",x),setTimeout(()=>c(!1))},{once:!0}),k.preventDefault(),k.stopPropagation())}function x(k){const y=k.clientX-d.x,O=k.clientY-d.y;if(!a.value&&Math.abs(y)<.5&&Math.abs(O)<.5)return;c(!0);const z=r.value;z&&(z.scrollLeft=f.x-y,z.scrollTop=f.y-O)}let _={distance:0,zoom:s.value,x:0,y:0},D=!1;function b(k){o.busy||(D=o.pinchToZoome&&k.touches.length===2,D&&(i("update:zooming",!0),c(!0),k.stopPropagation(),k.preventDefault(),_={distance:K(k),zoom:s.value,x:(k.touches[0].clientX+k.touches[1].clientX)/2,y:(k.touches[0].clientY+k.touches[1].clientY)/2}),(D||o.longStrip&&o.playController.isPlaying.value)&&window.addEventListener("touchend",P,{once:!0}))}function P(){var z;if(D=!1,o.zooming){c(!1),Y();return}if(!a.value)return;const k=ct(()=>{var le;c(!1),(le=r.value)==null||le.removeEventListener("scroll",O)},200),y=setTimeout(k,200);(z=r.value)==null||z.addEventListener("scroll",O);function O(){clearTimeout(y),k()}}function A(k){if(!D&&!(o.longStrip&&o.playController.isPlaying.value)||(c(!0),!o.zooming)||(k.stopPropagation(),k.preventDefault(),k.touches.length<2))return;const O=K(k)/_.distance;J(Math.ceil(O*_.zoom*100)/100,_)}const w=ct(()=>l.value=!1,100);let g=!1;const I=ct(()=>{g=!1},30);function q(k){if(o.busy)return;let y=o.zooming;if(g||(g=!0,y=k.ctrlKey||k.metaKey,y&&i("update:zooming",!0)),I(),y){k.stopPropagation(),k.preventDefault();const O=Math.ceil((s.value+k.deltaY*-.01)*100)/100;J(O,{x:k.clientX,y:k.clientY});return}o.horizontal&&(l.value||(l.value=!0),w(),k.deltaY&&(r.value&&(r.value.scrollLeft+=k.deltaY*(o.rtl?-1:1)),k.stopPropagation()))}function K(k){return Math.hypot(k.touches[0].clientX-k.touches[1].clientX,k.touches[0].clientY-k.touches[1].clientY)}const R={x:0,y:0,ts:0};function Q(k){if(a.value||o.zooming)return;const y=r.value;if(!y||H(y,k)||(i("click"),o.playController.isPlaying.value))return;const{clientX:O,clientY:z}=k,{x:le,y:ae,ts:me}=R;R.x=O,R.y=z,R.ts=new Date().getTime();const ge=R.ts-me;ge>250||ge<10||Math.abs(le-O)>40||Math.abs(ae-z)>40||(R.ts=0,R.x=0,R.y=0,T(O,z))}function H(k,y){if(o.playController.isPlaying.value)return!1;const O=o.tapZone;if(O===pr.none)return!1;const z=o.controlsVisible?o.spaceTop:0,le=k.clientHeight-z,ae=Math.max(0,y.clientY-z),me=o.horizontal?k.clientWidth:le;let ge=!1,Se=!1;if(O){const{prevZones:De,nextZones:Ke}=ra[o.tapZone],ut=Math.floor(ae/le*3);let Qe=Math.floor(y.clientX/k.clientWidth*3);o.rtl&&(Qe=2-Qe);const ze=ut*3+Qe;ge=De.includes(ze),Se=!ge&&Ke.includes(ze)}else{const Ke=(o.horizontal?o.rtl?me-y.clientX:y.clientX:ae)/me,ut=o.horizontal?.2:.15;ge=Ke<=ut&&o.pageIndex>0,Se=!ge&&Ke>=1-ut}if(!ge&&!Se)return!1;if(o.longStrip){const De=(ge?-1:1)*.75*me;o.horizontal?k.scrollLeft=k.scrollLeft+(o.rtl?-1:1)*De:k.scrollTop=Math.max(0,k.scrollTop+De)}else ge?i("prev"):Se&&i("next");return!0}async function T(k,y){const O=s.value===1?2:1;await F(O,{x:k,y}),Y()}function Y(){i("update:zooming",!1),u.initial=void 0,u.isZoomIn=!1,u.isZoomOut=!1}function S(){if(u.initial)return;const k=r.value;if(!k)return;const y=k.querySelector(`[data-index="${o.pageIndex}"],[data-index2="${o.pageIndex}"]`)??void 0;y&&(u.initial={el:y,rect:y.getBoundingClientRect()})}function J(k,y){if(u.isZoomIn=u.isZoomIn||!u.isZoomOut&&k>1,u.isZoomIn&&k<1){F(1,y);return}if(u.isZoomOut=u.isZoomOut||!u.isZoomIn&&k<1,u.isZoomOut&&k>1){F(1,y);return}F(k,y)}async function F(k,y){const O=r.value,z=Math.min(Qo,Math.max(Jo,k));if(!O||s.value===z)return;S();const{initial:le}=u;if(!le)return;const ae=(y==null?void 0:y.x)??O.clientWidth/2,me=(y==null?void 0:y.y)??O.clientHeight/2;s.value=z,i("update:zoom",z),await gt();const{el:ge,rect:Se}=le,De=ge.offsetWidth/Se.width,Ke=ge.offsetHeight/Se.height;O.scrollLeft=ge.offsetLeft-Se.left*De+ae*(De-1),O.scrollTop=ge.offsetTop-Se.top*Ke+me*(Ke-1)}return(k,y)=>(v(),$("div",{ref_key:"rootEl",ref:r,tabindex:"0",class:fe(["w-full h-full overflow-auto scrollbar-none overscroll-contain scrollbar-none focus:outline-none touch-pan-x touch-pan-y",{"!snap-none":!e.longStrip&&(a.value||l.value||e.zooming),"cursor-grabbing":!e.touchDevice&&a.value,"overflow-hidden":e.zooming}]),style:Pe({"font-size":`${s.value}px`}),onClick:Le(Q,["stop"]),onTouchmoveCapture:Le(A,["stop"])},[xe(k.$slots,"default")],38))}}),Qh=Object.freeze(Object.defineProperty({__proto__:null,default:pa},Symbol.toStringTag,{value:"Module"}));function vr(e,t){return(e==null?void 0:e.querySelector(`[data-index="${t}"],[data-index2="${t}"]`))??void 0}const eg=["data-index"],tg={key:0,class:"img img--loading"},ng=["src"],og=["data-index"],ha=ve(pe({__name:"ReaderBody",props:{page:{type:Number},pageIndex:{type:Number},direction:{type:Number},isLongStrip:{type:Boolean},isVertical:{type:Boolean},isDouble:{type:Boolean},isRTL:{type:Boolean},pages:{type:Array},totalImgs:{type:Number},gap:{type:Number},zoom:{type:Number},zooming:{type:Boolean},pinchToZoome:{type:Boolean},tapZone:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},playController:{type:Object},busy:{type:Boolean},controlsVisible:{type:Boolean}},emits:["ready","update:zoom","update:zooming","update:playing","dragEnd","click","end","prev","next"],setup(e,{expose:t,emit:n}){const o=e,i=n,r=ee(null),s=G(()=>{var A;return(A=r.value)==null?void 0:A.rootEl});t({rootEl:s});const l=hn(),a=G(()=>{const{width:A,height:w}=l,g=o.isLongStrip?o.isVertical?A.value:w.value:Math.min(A.value,w.value);return Math.min(4,Math.max(1,Math.ceil(g/400-1)))*o.gap}),u=ee(o.isLongStrip?{min:o.pageIndex-1,max:o.pageIndex}:_()),c=G(()=>{const{min:A,max:w}=u.value,g={};for(let I=A;I<=w;I++)g[I]=!0;return g}),d=ee(p()),f=P(()=>{d.value=p()},100);ue(l.width,f),ue(l.height,f),ue(()=>o.pages,f),ue(()=>o.isLongStrip,f),ue(()=>o.isVertical,f);function p(){const A=l.width.value,w=l.height.value,{pages:g,isLongStrip:I,isVertical:q}=o;return g.map(K=>{var k;const R=K.some(y=>{var O;return(O=y.img)==null?void 0:O.isLoading}),Q=K.map(y=>y.index),H={isLoading:R,indexes:Q,visible:!1};if(R)return H;const T=K.map(({img:y})=>y).filter(Boolean);if(!T.length||(H.srcs=T.map(({src:y})=>y),T.every(y=>y.hasError)))return H;const S=(k=T.find(y=>!y.hasError))==null?void 0:k.size;if(!S)return H;const J=T.reduce((y,O)=>{var z;return y+(((z=O.size)==null?void 0:z.width)??S.width)},0),F=T.reduce((y,O)=>{var z;return y+(((z=O.size)==null?void 0:z.height)??S.height)},0)/T.length;return I&&q||!I&&A/J<w/F?(H.width=Math.min(A,J),H.height=F*(H.width/J)):(H.height=Math.min(w,F),H.width=J*(H.height/F)),H})}const x=G(()=>{const A=o.isVertical?"width":"height";return d.value.map(w=>w[A]).filter(Boolean).sort((w,g)=>g-w)[0]});je(()=>{const A=vr(s.value,o.pageIndex);A==null||A.scrollIntoView({behavior:"instant",block:"start"});let w,g=!1;Ns(()=>{w!==o.pageIndex&&(w=o.pageIndex,I(),g||(g=!0,gt(()=>i("ready"))))});async function I(){if(!o.isLongStrip){u.value=_();return}const q=Math.floor(o.page),K=vr(s.value,q);if(!K)return;const R=+D(K).getAttribute("data-index"),Q=+b(K).getAttribute("data-index");(R!==u.value.min||Q!==u.value.max)&&(u.value={min:R,max:Q})}});function _(){const{pageIndex:A}=o;return{min:A-(o.isDouble?5:3),max:A+(o.isDouble?6:3)}}function D(A,w=0){const g=A.previousElementSibling;if(!g)return A;const I=w+(o.isVertical?g.clientHeight:g.clientWidth);return(o.isVertical?I>l.height.value*1.5:o.isRTL?I>l.width.value*2.5:I>l.width.value*1.5)?g:D(g,I)}function b(A,w=0){const g=A.nextElementSibling;if(!g)return A;const I=w+(o.isVertical?g.clientHeight:g.clientWidth);return(o.isVertical?I>l.height.value*3.5:o.isRTL?I>l.width.value*1.5:I>l.width.value*2.5)?g:b(g,I)}function P(A,w){let g;return()=>{g||(g??(g=setTimeout(()=>{g=void 0,A()},w)))}}return(A,w)=>(v(),oe(pa,{ref_key:"gestureContainer",ref:r,"space-top":e.spaceTop,"controls-visible":e.controlsVisible,zoom:e.zoom,zooming:e.zooming,"pinch-to-zoome":e.pinchToZoome,"tap-zone":e.tapZone,"page-index":e.pageIndex,class:fe(["rbod",{"rbod--long-strip":e.isLongStrip,"rbod--paging":!e.isLongStrip,"rbod--vertical":e.isVertical,"rbod--rtl":e.isRTL,"rbod--1page":d.value.length===1}]),"play-controller":e.playController,horizontal:!e.isVertical,rtl:e.isRTL,"touch-device":e.touchDevice,busy:e.busy,"long-strip":e.isLongStrip,style:Pe({"--gap":`${a.value}em`,"--space-top":`${e.spaceTop}px`,"--screen-width-em":Z(l).width.value+"em","--screen-height-em":Z(l).height.value+"em",...e.isLongStrip?{"--max-size-em":x.value+"em"}:{}}),"onUpdate:zoom":w[0]||(w[0]=g=>i("update:zoom",g)),"onUpdate:zooming":w[1]||(w[1]=g=>i("update:zooming",g)),onDragEnd:w[2]||(w[2]=()=>i("dragEnd")),onClick:w[3]||(w[3]=()=>i("click")),onPrev:w[4]||(w[4]=()=>i("prev")),onNext:w[5]||(w[5]=()=>i("next"))},{default:ne(()=>[(v(!0),$(be,null,Yt(d.value,g=>{var I;return v(),$("div",cn({key:e.direction+"_"+g.indexes[0],"data-index":g.indexes[0]},{ref_for:!0},g.indexes.length>1?{"data-index2":g.indexes[1]}:{}),[!((I=g.srcs)!=null&&I.length)||g.isLoading?(v(),$("div",tg,[c.value[g.indexes[0]]?(v(),oe(ei,{key:0})):se("",!0)])):g.srcs.length==1?(v(),oe(Pi(c.value[g.indexes[0]]?"img":"div"),cn({key:1,class:"img"},{ref_for:!0},c.value[g.indexes[0]]?{src:g.srcs[0]}:{},{style:{width:g.width!==void 0?g.width+"em":"",height:g.height!==void 0?g.height+"em":""}}),null,16,["style"])):(v(),$("div",{key:2,class:fe(["img img--double",{"flex-row-reverse":e.isRTL}]),style:Pe({width:g.width!==void 0?g.width+a.value+"em":"",height:g.height!==void 0?g.height+"em":""})},[g.indexes.some(q=>c.value[q])?(v(!0),$(be,{key:0},Yt(g.srcs,q=>(v(),$("div",{key:q},[U("img",{src:q},null,8,ng)]))),128)):se("",!0)],6))],16,eg)}),128)),U("div",{class:"last","data-index":e.totalImgs},[xe(A.$slots,"end")],8,og)]),_:3},8,["space-top","controls-visible","zoom","zooming","pinch-to-zoome","tap-zone","page-index","play-controller","horizontal","rtl","touch-device","busy","long-strip","class","style"]))}}),[["styles",[".rbod{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:1024px){.rbod{transform:none}}.rbod--rtl{flex-direction:row-reverse}.rbod.rbod--vertical>div{padding:calc(var(--gap)/2) 0}.rbod:not(.rbod--vertical){align-items:center;display:flex;height:100%;justify-content:flex-start}.rbod:not(.rbod--vertical)>div{padding:0 calc(var(--gap)/2)}.rbod--long-strip.rbod--vertical.rbod--1page>div:first-child{min-height:100vh}.rbod--long-strip.rbod--vertical>div:first-child{margin-top:var(--space-top);padding-top:0}.rbod--long-strip.rbod--vertical>div:last-child{padding-bottom:0}.rbod--long-strip.rbod--vertical>div{width:var(--max-size-em)}.rbod--long-strip.rbod--vertical .img--loading{height:75vh;width:100%}.rbod--long-strip.rbod--vertical .last{height:100vh}.rbod--long-strip:not(.rbod--vertical).rbod--1page>div:first-child{min-width:100vw}.rbod--long-strip:not(.rbod--vertical)>div{align-items:center;display:flex;height:var(--max-size-em)}.rbod--long-strip:not(.rbod--vertical) .img--loading{height:100%;max-width:100vw;width:680px}.rbod--long-strip:not(.rbod--vertical) .last{width:100vw}.rbod--long-strip>div>img{flex-shrink:0;margin:auto}.rbod--paging>div{align-items:center;display:grid;justify-content:center;min-height:100vh;min-width:100vw;scroll-snap-align:center;scroll-snap-stop:always}.rbod--paging.rbod--vertical{scroll-snap-type:y var(--tw-scroll-snap-strictness);--tw-scroll-snap-strictness:mandatory}.rbod--paging.rbod--vertical>div{width:var(--screen-width-em)}.rbod--paging:not(.rbod--vertical){scroll-snap-type:x var(--tw-scroll-snap-strictness);--tw-scroll-snap-strictness:mandatory}.rbod--paging:not(.rbod--vertical)>div{height:var(--screen-height-em)}.rbod--paging .img--loading{height:100%;width:100%}.rbod--paging .img.img--double{align-items:center;background-color:transparent;display:flex;gap:var(--gap);justify-content:center}.rbod--paging .img.img--double div{display:flex;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rbod--paging .img.img--double div img{flex-shrink:0;max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain}.rbod>div{flex-shrink:0}.rbod .img,.rbod>div{margin:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none}.rbod .img{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));-o-object-fit:contain;object-fit:contain}.rbod .img--loading{align-items:center;background-color:transparent;display:flex;justify-content:center}"]]]),ig=Object.freeze(Object.defineProperty({__proto__:null,default:ha},Symbol.toStringTag,{value:"Module"})),rg={},sg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function lg(e,t){return v(),$("svg",sg,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"},null,-1)])])}const ga=ve(rg,[["render",lg]]),ag=Object.freeze(Object.defineProperty({__proto__:null,default:ga},Symbol.toStringTag,{value:"Module"})),cg={class:"flex w-full flex-shrink-0 justify-between items-center h-16 px-3"},ma=pe({__name:"BottomSheet",props:Ye({spaceTop:{type:Number}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=lt(e,"modelValue"),n=ee(null),o=ee(!1),i=ee(0);$t({onKeyDown:s});const r=Ko();ue(t,c=>r(c)),Yi(()=>{const c=t.value;return c&&(t.value=!1),c});function s(c){t.value&&c.key==="Escape"&&(t.value=!1,c.preventDefault())}const l={y:-1};function a(c){const d=n.value;if(!d)return;if(d.scrollTop>0){l.y=-1;return}if(l.y===-1){l.y=Math.max(0,c.touches[0].clientY);return}const p=c.touches[0].clientY-l.y,x=p>0?p:0;x!=i.value&&(i.value=x);const _=x>0;_!==o.value&&(o.value=_)}async function u(){o.value=!1,l.y=-1,await gt();const c=n.value;c&&c.offsetHeight-i.value<window.innerHeight/2&&i.value>c.offsetHeight*.3&&(t.value=!1),i.value=0}return(c,d)=>(v(),$("div",{class:fe(["fixed inset-0 flex flex-col items-center justify-end select-none z-40 text-stone-100",{"!pointer-events-none":!t.value}]),style:Pe({"padding-top":(e.spaceTop??0)+60+"px"}),onClick:d[3]||(d[3]=()=>t.value=!1)},[B(Vo,{name:"slide","enter-from-class":"!translate-y-full","leave-to-class":"!translate-y-full"},{default:ne(()=>[t.value?(v(),$("div",{key:0,class:fe(["w-full sm:w-[31rem] bg-stone-900 bg-opacity-90 backdrop-blur-md rounded-t-xl max-w-full overflow-hidden shadow-lg shadow-neutral-950",{"duration-0":o.value,"duration-200":!o.value}]),style:Pe(i.value?{transform:`translateY(${i.value}px)`}:{}),onClick:d[1]||(d[1]=Le(()=>{},["stop"])),onWheelPassive:d[2]||(d[2]=Le(()=>{},["stop"])),onTouchmove:Le(a,["stop"]),onTouchend:u},[U("div",cg,[B(Ge,{transparent:"",onClick:d[0]||(d[0]=()=>t.value=!1)},{default:ne(()=>[B(ga)]),_:1}),xe(c.$slots,"name"),xe(c.$slots,"actions")]),U("div",{ref_key:"scrollEl",ref:n,class:"overflow-auto px-6 md:px-8 lg:px-10 xl:px-12 pt-1.5 pb-8 md:pb-6 flex-grow scrollbar-sm",style:{"max-height":"calc(100% - 4rem)"}},[xe(c.$slots,"default")],512)],38)):se("",!0)]),_:3})],6))}}),ug=Object.freeze(Object.defineProperty({__proto__:null,default:ma},Symbol.toStringTag,{value:"Module"})),dg=["onClick","onKeyup"],va=ve(pe({__name:"TabBar",props:Ye({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=lt(e,"modelValue"),o=ee(null),i=ee({width:"",left:""}),r=ee(!1);je(()=>{const l=Date.now();ue(n,async a=>{var c;await gt();const u=(c=o.value)==null?void 0:c.children[a+1];u&&(i.value={width:u.offsetWidth+"px",left:u.offsetLeft+"px"},!r.value&&Date.now()-l>500&&(r.value=!0),u.scrollIntoView({behavior:r.value?"smooth":"auto",block:"center",inline:"center"}))},{immediate:!0})});function s(l){n.value=l}return(l,a)=>(v(),$("div",{ref_key:"root",ref:o,class:"relative h-8 rounded-[2.5rem] inline-flex bg-black bg-opacity-50 p-1 font-medium max-w-full leading-none overflow-auto scrollbar-none",style:{}},[U("div",{class:fe(["bg-stone-300 h-6 rounded-2xl absolute top-1 pointer-events-none",{"duration-200":r.value}]),style:Pe(i.value)},null,6),(v(!0),$(be,null,Yt(t.items,(u,c)=>Ne((v(),$("div",{key:c,tabindex:"0",class:fe(["text-sm inline-flex justify-center items-center h-6 rounded-2xl px-4 cursor-pointer relative z-10 whitespace-nowrap flex-shrink-0 focus:outline-primary hover:bg-stone-50 hover:bg-opacity-10 duration-200",{"text-stone-900":c==n.value,"text-stone-400":c!=n.value}]),onClick:Le(()=>s(c),["stop"]),onKeyup:[Fo(()=>s(c),["enter"]),Fo(()=>s(c),["space"])]},[Wt(He(u),1)],42,dg)),[[Z(zt),30]])),128))],512))}}),[["styles",[".scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}"]]]),fg=Object.freeze(Object.defineProperty({__proto__:null,default:va},Symbol.toStringTag,{value:"Module"})),pg={},hg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function gg(e,t){return v(),$("svg",hg,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10s10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8s8 3.59 8 8s-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5c0-2.21-1.79-4-4-4z"},null,-1)])])}const ba=ve(pg,[["render",gg]]),mg=Object.freeze(Object.defineProperty({__proto__:null,default:ba},Symbol.toStringTag,{value:"Module"})),vg={},bg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"};function yg(e,t){return v(),$("svg",bg,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M14 8.25a2.25 2.25 0 1 1 0-4.5a2.25 2.25 0 0 1 0 4.5m0 8a2.25 2.25 0 1 1 0-4.5a2.25 2.25 0 0 1 0 4.5M11.75 22a2.25 2.25 0 1 0 4.5 0a2.25 2.25 0 0 0-4.5 0"},null,-1)])])}const ya=ve(vg,[["render",yg]]),wg=Object.freeze(Object.defineProperty({__proto__:null,default:ya},Symbol.toStringTag,{value:"Module"})),xg={key:1,class:"w-full text-center text-xl whitespace-nowrap text-ellipsis flex-shrink overflow-hidden px-5 select-text"},_g={class:"opacity-90"},Sg={key:0,class:"w-full text-center text-sm text-stone-400 whitespace-nowrap text-ellipsis flex-shrink overflow-hidden mb-3 -mt-2 select-text"},br=pe({__name:"SettingsBottomSheet",props:Ye({name:{type:String},spaceTop:{type:Number},enableHelp:{type:Boolean},enableDefaultPreferences:{type:Boolean}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:Ye(["help","more"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=lt(e,"modelValue"),r=ee(0),s=G(()=>n.name??location.hostname);$t({onKeyUp:a=>{a.key==="s"&&!a.metaKey&&!a.ctrlKey&&(i.value=!0)}}),je(()=>{ue(i,a=>{a||setTimeout(()=>{r.value!==0&&(r.value=0)},300)})});function l(){o("help"),i.value=!1}return(a,u)=>(v(),oe(ma,{modelValue:i.value,"onUpdate:modelValue":u[2]||(u[2]=c=>i.value=c),"space-top":e.spaceTop},{name:ne(()=>[e.enableDefaultPreferences?(v(),oe(va,{key:0,modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=c=>r.value=c),items:["Preferences","Default"]},null,8,["modelValue"])):(v(),$("h3",xg,He(s.value),1))]),actions:ne(()=>[e.enableDefaultPreferences?(v(),oe(Ge,{key:0,transparent:"",class:fe(e.enableHelp?"":"opacity-0 pointer-events-none"),onClick:l},{default:ne(()=>[U("span",_g,[B(ba)])]),_:1},8,["class"])):(v(),oe(Ge,{key:1,transparent:"",onClick:u[1]||(u[1]=()=>o("more"))},{default:ne(()=>[B(ya)]),_:1}))]),default:ne(()=>[r.value===0?(v(),$(be,{key:0},[e.enableDefaultPreferences?(v(),$("h3",Sg,He(s.value),1)):se("",!0),xe(a.$slots,"tab-preferences")],64)):(v(),$(be,{key:1},[xe(a.$slots,"tab-default"),u[3]||(u[3]=U("div",{class:"h-6"},null,-1))],64))]),_:3},8,["modelValue","space-top"]))}}),kg=Object.freeze(Object.defineProperty({__proto__:null,default:br},Symbol.toStringTag,{value:"Module"}));function Qn(e=0){return new Promise(t=>setTimeout(t,e))}function wa(e){const t=async(n,o)=>{var i;if(!n.toBlob){if(o)return;const r=n.cloneNode(),s=(i=r.getContext)==null?void 0:i.call(r,"2d");if(!s)return;try{s.drawImage(e,0,0)}catch{return}return t(r,!0)}return await new Promise(r=>{const s=l=>{if(!l)return r(void 0);const a=URL.createObjectURL(l);r(a)};try{n.toBlob(s,"image/jpeg",1)}catch{r(void 0)}})};return t(e,!1)}let ti;async function Cg(e,t){if(ti||!t.startsWith("blob:"))return t;if(ti===void 0){try{if((await fetch(t)).ok)return ti=!0,t}catch{}ti=!1}e.complete||await new Promise(a=>{let u=0;const c=setInterval(()=>{e.complete?(a(),clearInterval(c)):++u>=30&&a()},100)});const o=e.naturalWidth,i=e.naturalHeight;if(!o||!i)return;const r=document.createElement("canvas"),s=r.getContext("2d");return r.width=o,r.height=i,s==null||s.drawImage(e,0,0,o,i),await wa(r)}function Tg(e){const t=new Set,n=e.getAttributeNames(),o=n.indexOf("src"),i=o!==-1;i&&(n.splice(o,1),n.push("src"));for(const r of n){if(r==="srcset"||i&&r===":src"||r!=="data-url"&&r!=="data-original"&&!r.includes("src"))continue;const s=e.getAttribute(r);s&&(r==="src"&&e.naturalWidth&&e.naturalWidth<200||t.add(s.replace(/(\n|\t)/g," ").trim()))}return Array.from(t)}function ni(e,t){return e>=75&&t>=50&&(e>=200||t>=200)}class Pg{constructor({onChanged:t}){ke(this,"isMounted",!0);ke(this,"elsDisposeCallbacksMap",new Map);ke(this,"onChanged");this.onChanged=t}dispose(){this.isMounted=!1,this.elsDisposeCallbacksMap.forEach(t=>t()),this.elsDisposeCallbacksMap=new Map,this.onChanged=()=>{}}async download(t){if(!this.isMounted)return;const n=t.el,o=!!n&&n instanceof HTMLImageElement,i=n?o?Tg(n):[await wa(n)].filter(Boolean):[t.src].filter(Boolean);if(!(!n&&!i.length||!this.isMounted)){if(n&&!this.elsDisposeCallbacksMap.has(n))if(o){let r=i.slice(-1)[0];const s=new MutationObserver(l=>{l.some(u=>{if(u.attributeName!=="src")return!1;const c=r;return r=n.getAttribute("src"),!!r&&c!==r})&&this.download(t)});s.observe(n,{attributes:!0}),this.elsDisposeCallbacksMap.set(n,()=>s.disconnect())}else{const r=n.getContext("2d");if(r){const s=r.drawImage.bind(r),l=r.putImageData.bind(r),a=(u,c,d)=>(setTimeout(()=>this.download(t),100),u.apply(c,d));try{r.drawImage=new Proxy(s,{apply:a}),r.putImageData=new Proxy(l,{apply:a})}catch{}this.elsDisposeCallbacksMap.set(n,()=>{try{r.drawImage=s,r.putImageData=l}catch{}})}}i.length&&(this.onChanged(t,{src:i[0],isLoading:!0,hasError:!1}),await this.downloadRawImage(t,i))}}async downloadRawImage(t,n){const o=t.el instanceof HTMLImageElement?t.el:void 0;for(let i=0;i<n.length;i++){const r=n[i],s=o?await Cg(o,r):r;if(!s||!this.isMounted)return;const l=await Mg(s,o,a=>{this.isMounted&&this.onChanged(t,{src:s,size:a,isLoading:!1,hasError:!1})});if(l.ok||!this.isMounted)return;i===n.length-1&&this.onChanged(t,{src:s,isLoading:!1,hasError:!!l.error,invalid:!!l.invalid,size:l.size})}}}async function Mg(e,t,n){return(t==null?void 0:t.src)===e&&t.naturalWidth&&t.naturalHeight?(n({width:t.naturalWidth,height:t.naturalHeight}),t.complete?{ok:!0}:new Promise(o=>{t.addEventListener("load",()=>o({ok:!0}),{once:!0})})):await new Promise(o=>{const i=new Image,r=setInterval(()=>{const{naturalWidth:s,naturalHeight:l}=i;if(l&&s){const a={width:s,height:l};ni(s,l)?n(a):o({invalid:!0,size:a}),clearInterval(r)}},20);i.onerror=()=>{o({error:!0}),clearInterval(r)},i.onload=()=>setTimeout(()=>o({ok:!0}),25),i.src=e})}const Eg=3;class Ig{constructor(t){ke(this,"download");ke(this,"threads");ke(this,"completedItems");ke(this,"promisesMap",new Map);this.download=t.download}dispose(){var t;(t=this.threads)==null||t.dispose(),this.threads=void 0,this.completedItems=void 0}run({activeIndex:t,items:n}){var r;if(this.completedItems===n)return;this.completedItems=void 0,(r=this.threads)==null||r.dispose();let o=Math.max(0,t-1),i=!0;this.threads=new Og(Eg,()=>{const s=n[o];if(!s){this.completedItems=n;return}i&&o===n.length-1?(i=!1,o=t-2):i?o++:o--;const l=s.src??s.el;if(l){const u=this.promisesMap.get(l);if(u)return u}const a=this.download(s);return l&&this.promisesMap.set(l,a),a}),this.threads.exec()}}class Og{constructor(t,n){ke(this,"isDisposed",!1);this.limit=t,this.getNext=n}dispose(){this.isDisposed=!0}exec(){for(let t=0;t<this.limit;t++)this.next()}async next(){if(this.isDisposed)return;const t=this.getNext();t&&(await t,await Qn(20),this.next())}}class xa{constructor(){ke(this,"elsPool",new Map)}check(t){if(!t||t===document.body)return!0;const n=this.elsPool.get(t);if(n!==void 0)return n;const o=getComputedStyle(t);if(!(o.display!=="none"&&+(o.opacity??"1")>.1))return this.elsPool.set(t,!1),!1;const r=this.check(t.parentElement);return this.elsPool.set(t,r),r}}function $g(e,t){let n=[t??document.documentElement];const o=e.split("->");for(let i=0;i<o.length;i++){const r=o[i];n=n.map(s=>Array.from((s.shadowRoot??s).querySelectorAll(r))).flat()}return n}function eo(e,t){if(e instanceof HTMLOptionElement){const n=e.parentElement instanceof HTMLOptGroupElement?e.parentElement.parentElement:e.parentElement;if(!n||!(n instanceof HTMLSelectElement))return;const o=e.getAttribute("value")||"";if(n.value===o)return;n.value=o,n.dispatchEvent(new Event("change"));return}e instanceof HTMLAnchorElement&&(t==null?void 0:t.preventDefault)!==!1&&e.addEventListener("click",n=>n.preventDefault(),{once:!0}),e.click(),e.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0,pointerType:"mouse",button:0})),e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0}))}async function zg(e){const{lstrip:t,lstripBtn:n}=e||{};if(!t||!n||!!document.querySelector(t))return!1;const i=n.split(";");for(const r of i)if(!await Dg(r.trim()))return!1;return!0}async function Dg(e){const t=await gn(50,30,()=>document.querySelector(e));return t?(eo(t),await Qn(),!0):!1}class Ag{constructor({spec:t,onChanged:n}){ke(this,"spec");ke(this,"onChanged");ke(this,"rawImages",[]);ke(this,"isMounted",!0);ke(this,"loadRawImagesTs");ke(this,"imgListenersMap",new Map);ke(this,"disconnectObservers");ke(this,"contentEl");ke(this,"reloadRawImages",ct(()=>{this.contentEl&&this.loadRawImages(this.contentEl)},100));this.spec=t,this.onChanged=n,this.init()}dispose(){var t;this.isMounted=!1,(t=this.disconnectObservers)==null||t.call(this),this.disconnectObservers=void 0,this.onChanged=()=>{}}init(){var i;const t=new MutationObserver(this.reloadRawImages),n=(i=this.spec)!=null&&i.imgDivs?void 0:(()=>{let r=window.innerWidth;return new ResizeObserver(ct(()=>{const s=window.innerWidth;if(s!==r){r=s;return}this.reloadRawImages()},50))})();this.disconnectObservers=async()=>{t.disconnect(),n==null||n.disconnect()};let o=!1;this.loadContentEl(r=>{this.contentEl!==r&&(this.contentEl=r,t.disconnect(),n==null||n.disconnect(),t.observe(this.contentEl,{childList:!0,subtree:!0}),n==null||n.observe(this.contentEl),o?this.reloadRawImages():(o=!0,this.loadRawImages(this.contentEl)))})}setRawImages(t){let n=!1;const o=t.map((i,r)=>{const s=this.rawImages[r];return s&&s.el===i.el&&s.parentEl===i.parentEl&&s.src===i.src?s:(n=!0,i)});(n||!o.length)&&(this.rawImages=o,this.onChanged(t))}async loadContentEl(t){var l;const n=await zg(this.spec),o=(l=this.spec)==null?void 0:l.content;if(!o){t(document.body);return}let i=await gn(n?100:1,10,()=>{for(const a of o.split(",")){const u=document.querySelector(a);if(u)return u}});if(!i)return;t(i);let r=0;const s=async()=>{if(this.isMounted&&!(i!=null&&i.isConnected)){if(r=0,i=await gn(50,20,()=>{const a=document.querySelector(o);return a!=null&&a.isConnected&&a!==i?a:void 0}),!i)return;t(i)}!this.isMounted||++r>=10||setTimeout(s,200)};setTimeout(s,200)}async loadRawImages(t){var r;if(!this.isMounted||!t.isConnected)return;const n=Date.now();this.loadRawImagesTs=n;const o=(r=this.spec)==null?void 0:r.imgDivs,i=o?await this.loadFromImgDivs(t,o):this.loadFromContentEl(t);this.loadRawImagesTs!==n||!t.isConnected||!this.isMounted||this.setRawImages(i)}async loadFromImgDivs(t,n){const o=$g(n,t);if(!o.length)return this.loadFromContentEl(t);const i=new xa;return o.map(s=>{const l=Array.from(s.querySelectorAll("img,canvas"));for(const a of l){if(!i.check(a)){this.observeInvalidImgEl(a);continue}if(a instanceof HTMLCanvasElement){if(_a(a))return{el:a,parentEl:s}}else if(a instanceof HTMLImageElement){if(Sa(a))return{el:a,parentEl:s};this.observeInvalidImgEl(a)}}return{parentEl:s}})}loadFromContentEl(t){const n=[],o={},i=new xa;return Array.from(t.querySelectorAll("img,canvas")).forEach(s=>{if(!i.check(s)){this.observeInvalidImgEl(s);return}if(s instanceof HTMLCanvasElement)_a(s)&&n.push({el:s});else if(s instanceof HTMLImageElement)if(Sa(s)){const l=s.getAttribute("src");if(l){const a=o[l];if(a!==void 0&&a!==-1){n.splice(a,1);return}o[l]=n.length}n.push({el:s})}else this.observeInvalidImgEl(s)}),n}observeInvalidImgEl(t){if(!(t instanceof HTMLImageElement)||this.imgListenersMap.has(t))return;const n=()=>{t.removeEventListener("load",n),this.imgListenersMap.delete(t),this.reloadRawImages()};this.imgListenersMap.set(t,n),t.addEventListener("load",n)}}function _a(e){return e.isConnected&&ni(e.width,e.height)}function Sa(e){if(!e.isConnected)return!1;const t=e.getBoundingClientRect();return!t.width||!t.height||ni(t.width,t.height)}const oi="mp-scroll-container";class yr{constructor(){ke(this,"scrollEl")}dispose(){var t;(t=this.scrollEl)==null||t.classList.remove(oi)}scrollTo({rawImages:t,page:n,skipIfVisible:o,isScrollDown:i,isScrollExact:r,fallbackScrollEl:s}){var D;const l=Math.floor(n),a=t[Math.min(t.length-1,l)];if(!a)return;const u=a.el??a.parentEl??(a.src?document.querySelector(`img[src^="${a.src}"]`):void 0);if(!u)return;const c=u.getBoundingClientRect();if(o&&c.top<=0&&c.top+c.height>0)return;const d=yr.getScrollable(u,s);if(!d)return;const{el:f,top:p}=d;s!==document.documentElement&&!f.classList.contains(oi)&&(f!==this.scrollEl&&((D=this.scrollEl)==null||D.classList.remove(oi),this.scrollEl=f),f.classList.add(oi));const x=n>=t.length?c.height:r?n%1*c.height:i?Math.max(0,c.height-window.innerHeight/2):-window.innerHeight/2,_={top:p+x,behavior:"instant"};f.scrollTo(_),f!==document.documentElement&&document.documentElement.scrollTo(_)}static getScrollable(t,n){const o=(i,r)=>{if(!i)return;const{offsetTop:s,offsetParent:l}=i;if(l&&s&&r.set(l,Math.max(r.get(l)??0,s)),!(i===n||i.scrollHeight-i.clientHeight>=10&&window.getComputedStyle(i).overflow!=="visible"))return o(i.parentElement,r);let u=0;return r.forEach((c,d)=>{u+=d===l?c-s:c}),{el:i,top:u}};return o(t,new Map)}}function ka(e){var t,n;for(let o=0;o<e.length;o++){const i=((t=e[o])==null?void 0:t.el)??((n=e[o])==null?void 0:n.parentEl),r=i==null?void 0:i.getBoundingClientRect();if(!r||r.bottom<=0)continue;const s=r.top;return o+(s>=0?0:-s/r.height)}return 0}function jg(e){if(document.documentElement.scrollTop<700)return 0;const n=Array.from(document.querySelectorAll("img[src]")).filter(o=>e.includes(o.src)).map(o=>({el:o}));return ka(n)}function Lg(e){var R,Q,H;const t=(R=e.raw.value)==null?void 0:R.isWebtoon,n=ee(t===!1),o=ee(t);let i=!1;const r=e.touchDevice&&!navigator.userAgent.toLowerCase().includes("android"),s=((H=(Q=e.raw.value)==null?void 0:Q.imgs)==null?void 0:H.filter(Boolean))??[];let l=e.isAutoShow!==!1?e.page.value:s.length?jg(s):void 0,a=s.map(T=>({src:T})),u,c;const d=new Map,f=({src:T,el:Y})=>{const S=Y??T;return S?d.get(S):void 0},p=ee(s.map(T=>({src:T,isLoading:!0,hasError:!1}))),x=()=>{const T=[];a.forEach(Y=>{const{src:S,el:J}=Y,F=J??S,k=F?d.get(F):void 0;(F&&!(k!=null&&k.invalid)||Y.parentEl)&&T.push(k)}),p.value=T};let _=setTimeout(e.onTimeout,2e4);const D=()=>{_&&(clearTimeout(_),_=void 0)};let b=0,P=0;const A=4,w=new Pg({onChanged(T,Y){const S=T.el??T.src;if(!S||(d.set(S,Y),x(),Y.isLoading))return;if(Y.hasError){if(c||o.value!==void 0)return;c=setTimeout(()=>{c=void 0,o.value===void 0&&e.onError("Failed to load images")},3e3);return}const{size:J,invalid:F}=Y;if(!(!J||F)){if(!o.value&&P<A){const k=i?a:a.filter(({el:me,src:ge})=>ge||!(me&&me instanceof HTMLImageElement&&!d.has(me)));let y=k.indexOf(T);if(i&&y>4||y===-1&&(T.el&&(y=k.findIndex(me=>me.el===T.el)),y===-1))return;const O=y>Math.min(1,k.length-3)&&y<Math.max(k.length-2,3),z=J.width/J.height;z>2&&b++;const le=z<.5||b>=A,ae=!le&&.65<z&&z<.75;ae&&P++,o.value!==le&&(O||le)&&(o.value=le),O&&n.value!=ae&&(n.value=!0),o.value===void 0&&ae&&P===A&&(o.value=!1)}K()}}}),g=new Ig({download:async T=>{!(T.el&&d.has(T.el))&&!(T.src&&d.has(T.src))&&await w.download(T)}}),I=()=>{g.run({items:a,activeIndex:Math.min(a.length-1,Math.floor(e.page.value))})},q=new yr;if(s.length)I();else{let T=!1;u=new Ag({spec:e.spec,async onChanged(Y){var S;if(a=Y,x(),!e.raw.value&&!Y.length){e.onError("no_img");return}(S=e.spec)!=null&&S.imgDivs&&!T&&e.isAutoShow!==!1&&e.page.value&&(T=!0,q.scrollTo({rawImages:Y,page:e.page.value,skipIfVisible:!0,fallbackScrollEl:r?document.body:document.documentElement,isScrollDown:!0}),await Qn(1)),l===void 0&&e.isAutoShow===!1&&(l=ka(Y)),I()}})}Ti(()=>{w.dispose(),g.dispose(),u==null||u.dispose(),c&&clearTimeout(c),q.dispose(),i&&q.scrollTo({rawImages:a,page:e.page.value,fallbackScrollEl:document.documentElement,isScrollExact:!0})});function K(){if(i||o.value===void 0||l===void 0)return;const T=Math.max(0,Math.min(l,a.length)),Y=Math.min(Math.floor(T),a.length-1);if(Y>=1){const J=a[Y];if(!J||!f(J)){e.isAutoShow&&q.scrollTo({rawImages:a,page:Y,fallbackScrollEl:r?document.body:document.documentElement,isScrollDown:!0});return}for(let F=Y;F<a.length;F++){const k=f(a[F]);if(!k)return;if(!k.invalid){if(!k.size&&!k.hasError)return;break}}for(let F=Y-1;F>=0;F--){const{src:k,el:y}=a[F],O=y??k;if(!O)break;const z=d.get(O);if(!z)return;if(!z.invalid){if(!z.size&&!z.hasError)return;break}}}if(i)return;i=!0,D(),e.onReady(T);let S=!0;ue(()=>Math.floor(e.page.value),(J,F)=>{J===F&&!S||(q.scrollTo({rawImages:a,page:J,isScrollDown:F===void 0||J>F||a.length===1,skipIfVisible:S&&a.length>1,fallbackScrollEl:r?document.body:document.documentElement}),S=!1,F??(F=-1),I())},{immediate:!0})}return{asyncImgs:G(()=>p.value),isWebtoon:G(()=>o.value??!1),isManga:G(()=>n.value)}}function Ca({touchDevice:e,isBusy:t,isPlaying:n,isIdle:o,hideControlsEvent:i,scrollEl:r,moveThreshold:s}){const l=ee(!0);let a=!1,u=!1;const c={x:0,y:0};let d;function f(b){if(i.value===tn.never||t.value&&l.value)return;const P=typeof b=="boolean"?b:!l.value;P!==l.value&&(l.value=P,!a&&!P&&(a=!0))}function p(){r.value&&(c.x=r.value.scrollLeft,c.y=r.value.scrollTop)}function x(){const b=i.value===tn.firstMove,P=r.value;if(!P)return;const A=Uo(()=>{if(!l.value){Bg(P)&&f(!0);return}if(b&&a)return;const w=Math.abs(P.scrollTop-c.y)||Math.abs(P.scrollLeft-c.x),g=s??(b?c.y===0?300:200:150);w>g&&f(!1)},100);P.addEventListener("scroll",A),d=()=>{P.removeEventListener("scroll",A)}}function _(){switch(d==null||d(),d=void 0,i.value){case tn.onLoad:a||f(!1);break;case tn.firstMove:x();break;case tn.move:x();break;case tn.never:l.value||(l.value=!0);break}}function D(){u||(u=!0,p(),_(),e&&ue(Zi(),P=>{P==="hidden"&&!n.value&&!l.value&&f(!0)}),ue(t,b=>{b&&!l.value&&f()}),ue(n,b=>{b||f(!0)}),ue(o,b=>{n.value&&f(!b)}),ue(l,b=>{b&&p()}),ue(i,()=>_()),ue(r,()=>_()),Mt(()=>{d==null||d(),d=void 0}))}return{visible:G(()=>l.value),toggle:f,activate:D}}function Bg(e){const t=Math.max(0,e.scrollTop),n=Math.abs(e.scrollLeft);if(n<10&&t<10)return!0;const{scrollHeight:o,clientHeight:i}=e;if(o>i)return t>o-i-10;const{scrollWidth:s,clientWidth:l}=e;return s>l&&n>s-l-10}function Vg(e,t,n){return G(()=>t.value?Ta(e.value,n.value):e.value.map((o,i)=>[{img:o,index:i}]))}function Ta(e,t,n=0){if(e.length===0)return[];const o=e.slice(0,2),i=o.some(s=>(s==null?void 0:s.size)&&s.size.width>s.size.height),r=i||t?[o[0]]:o;return[r.map((s,l)=>({img:s,index:n+l})),...Ta(e.slice(r.length),t&&i,n+r.length)]}const wr=40;function Ng({page:e,totalImgs:t,direction:n,style:o,isLongStrip:i,isVertical:r,isRTL:s,spaceTop:l,scrollEl:a,isWebtoon:u,interferePlayer:c,onChangedPage:d,onFinished:f}){let p=!1,x=!1,_,D=!1,b;const P=ct(Q,300),A=Uo(()=>{Q(),P()},300),w=y=>(q(y),ct(q,50)(y));function g(){const y=new Promise(O=>{_=()=>{_=void 0,O()}});return K(e.value,{smooth:!1,ensureLastImgVisibility:!0}),y}function I(){var y;x=!0,_==null||_(),H(),(y=a.value)==null||y.addEventListener("scroll",A),setTimeout(()=>{const{width:O,height:z}=hn();ue(O,()=>{r.value&&w(e.value)}),ue(z,()=>{r.value||w(e.value)}),ue(o,()=>w(e.value)),ue(n,()=>w(e.value)),/iPad|iPhone|iPod/.test(navigator.userAgent)&&ue(t,()=>{s.value&&w(e.value)})},300)}async function q(y){if(!(!x||p)){if(p=!0,await gt(),Y()===y){p=!1;return}K(y)}}function K(y,{smooth:O,ensureLastImgVisibility:z=!1}={smooth:!1}){const le=a.value;if(!le)return;p=!0;const ae=async()=>{await gt(),p=!1,x||I()},me=Math.floor(y),ge=vr(le,me);if(!ge){ae();return}c(async()=>{await R(le,!i.value&&O,async()=>{await k(le,ge,{smooth:O,page:y,ensureLastImgVisibility:z})}),await ae()})}async function R(y,O,z){O&&y.style.setProperty("scroll-snap-type","none"),await z(),O&&y.style.removeProperty("scroll-snap-type")}function Q(){if(p)return;const y=Y();y!==void 0&&y!==e.value&&d(y),H()}function H(){D||!D&&T()&&(D=!0,f())}function T(){const y=a.value;if(!y)return!1;const O=i.value?u.value?3:!r.value&&y.clientWidth>y.clientHeight?2.25:2.5:2;return r.value?y.scrollHeight-y.scrollTop<y.clientHeight*O:y.scrollWidth-(s.value?-y.scrollLeft:y.scrollLeft)<y.clientWidth*O}function Y(){const y=S();return y?(+y.getAttribute("data-index")||0)+(i.value?J(y):0):void 0}function S(){var O;if(b??(b=a.value.getRootNode()),!b)return;const y=(O=b.elementsFromPoint)==null?void 0:O.call(b,r.value||!i.value?window.innerWidth/2:s.value?window.innerWidth-wr:wr,r.value&&i.value?l.value||wr:window.innerHeight/2);if(y)for(let z=0;z<y.length;z++){const le=y[z];if(le.hasAttribute("data-index"))return le;if(le===a.value)break}}function J(y){const O=y.getBoundingClientRect();return r.value?Math.abs(O.top-l.value)/O.height:s.value?Math.max(0,O.right-a.value.clientWidth)/O.width:Math.abs(O.left)/O.width}let F=!1;async function k(y,O,z){if(F)return;const le=O.getBoundingClientRect();if(!i.value){if(r.value){if(le.top<=0&&le.bottom>=y.clientHeight)return}else if(le.left<=0&&le.right>=y.clientWidth)return}F=!0;const ae=r.value?y.scrollTop:y.scrollLeft,me=z.page,ge=i.value?me%1:0,Se=await gn(30,10,async()=>{await Qn();let ze;if(!(O.offsetHeight<10))return i.value?r.value?ze=O.offsetTop+ge*O.offsetHeight-l.value:s.value?ze=O.offsetLeft-y.clientWidth+O.offsetWidth-ge*O.offsetWidth:ze=O.offsetLeft+ge*O.offsetWidth:r.value?ze=O.offsetTop+(le.top>0?0:le.height-y.clientHeight):ze=O.offsetLeft+(le.left>0?0:le.width-y.clientWidth),me>.5&&Math.abs(ze)<100?void 0:ze})??0,De=z.ensureLastImgVisibility?r.value?Math.min(Se,y.scrollHeight-y.clientHeight*2):s.value?Math.max(Se,-(y.scrollWidth-y.clientWidth*2)):Math.min(Se,y.scrollWidth-y.clientWidth*2):Se;if(!z.smooth){r.value?y.scrollTop=De:y.scrollLeft=De,F=!1;return}const Ke=De-ae,ut=30;let Qe=0;return new Promise(ze=>{(function Tn(){const h=Rg(Qe,ae,Ke,ut);r.value?y.scrollTop=h:y.scrollLeft=h,Qe++,Qe<=ut?requestAnimationFrame(Tn):(ze(),F=!1)})()})}return{init:g,goToPage:K}}function Rg(e,t,n,o){return n*(Math.pow(e/o-1,3)+1)+t}class Hg{constructor(t){ke(this,"player");ke(this,"debounceStartPlayer");ke(this,"isPlaying");ke(this,"isIdle",ee(!1));ke(this,"onIdle");this.player=t.player,this.debounceStartPlayer=ct(()=>this.player.start(),100);const n=ee(t.autoPlay||sessionStorage.getItem("mp:playing")==="true");this.isPlaying=G({get:()=>n.value,set:o=>{n.value=o,sessionStorage.setItem("mp:playing",o?"true":"false")}}),this.onIdle=ct(()=>{this.isIdle.value=!0},t.touchDevice?2e3:1e3),this.awake(),t.touchDevice||St(window,"mousemove",()=>this.awake()),je(()=>{t.touchDevice||ue(Zi(),i=>{this.isPlaying.value&&(i==="visible"?this.player.start():this.player.stop())}),ue(t.speed,()=>this.interfere()),ue(t.isBusy,o=>{!o&&this.isIdle.value&&this.awake()})}),Mt(()=>this.stop())}activate(){this.isPlaying.value&&this.player.start()}toggle(){this.isPlaying.value?this.stop():this.start()}async interfere(t){this.isPlaying.value&&this.player.stop(),t&&(await gt(),await t()),this.isPlaying.value&&this.debounceStartPlayer()}stop(){this.isPlaying.value&&(this.isPlaying.value=!1,this.player.stop(),this.awake())}start(){this.isPlaying.value||(this.isPlaying.value=!0,this.player.start(),this.awake())}pause(){this.player.stop()}resume(){this.player.start()}awake(){setTimeout(()=>{this.isIdle.value=!1,this.onIdle()},30)}}class Pa extends Hg{getMaxOffset(t){return t.scrollHeight-t.clientHeight}getScrollOffset(t){return t.scrollTop}setScrollOffset(t,n){t.scrollTop+=n}constructor(t){let n,o;const{scrollEl:i,speed:r}=t;super({...t,player:{stop:()=>o==null?void 0:o(),start:()=>{const s=i.value;if(!this.isPlaying.value||!s)return;const l=this.getMaxOffset(s),a=this.getScrollOffset(s);if(l<=a){this.stop();return}o=()=>{n=Date.now(),o=void 0};const u=Date.now();n=u;const c=.1*r.value;let d=Date.now(),f=0;const p=()=>{if(n!==u)return;const x=Date.now(),_=x-d;d=x;const D=c*_+f;D>=1?(f=D%1,this.setScrollOffset(s,D-f)):f=D,setTimeout(p,1)};p()}}})}}class Fg extends Pa{constructor(n){super(n);ke(this,"isLongStrip");ke(this,"isVertical");ke(this,"isRTL");const{isLongStrip:o,isVertical:i,isRTL:r}=n;this.isLongStrip=o,this.isVertical=i,this.isRTL=r,o!==void 0&&je(()=>{ue(o,s=>{s||stop()})})}getMaxOffset(n){return this.isVertical.value?n.scrollHeight-n.clientHeight:n.scrollWidth-n.clientWidth}getScrollOffset(n){return this.isVertical.value?n.scrollTop:this.isRTL.value?-n.scrollLeft:n.scrollLeft}setScrollOffset(n,o){n[this.isVertical.value?"scrollTop":"scrollLeft"]+=o*(this.isRTL.value?-1:1)}start(){var n;((n=this.isLongStrip)==null?void 0:n.value)!==!1&&super.start()}}function Wg(e){return new Fg(e)}function qg({speed:e,fontSize:t,lineHeight:n,...o}){const i=hn().width;return new Pa({...o,speed:G(()=>{const r=900/Math.min(900,i.value)/3.5,s=t.value/48*1.75,l=n.value/96*1.75,a=r*s*l;return e.value*a})})}const Ug={key:3,class:"fixed inline-block left-1/2 -translate-x-1/2 bottom-0 p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3"},Ma=pe({inheritAttrs:!1,__name:"GearSecond",props:{chapterNavData:{type:Object},busy:{type:Boolean},defaultPreferences:{type:Object},immediate:{type:Boolean},appVersion:{type:String},raw:{type:Object},spec:{type:Object},siteMeta:{type:null},page:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},entryId:{type:String},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean},offlineMode:{type:Boolean}},emits:["clickEntryButton","hideReader","openHelpScreen","error","crash","ready","pageChanged","playingChanged","tourEnabledChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","timeout","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var V,N;const n=e,o=t,i=ee(!1),r=ee(!1),s=G(()=>n.busy),l=G(()=>n.page),a=G(()=>n.immediate||i.value?n.spaceTop??0:0),u=G(()=>!n.touchDevice&&S.isIdle.value&&!n.busy&&!I.value),{asyncImgs:c,isWebtoon:d}=Lg({raw:G(()=>n.raw),spec:n.spec,page:l,touchDevice:n.touchDevice,isAutoShow:n.isAutoShow,async onReady(E){me(E),i.value=!0},onError:()=>o("error"),onTimeout:()=>o("timeout")}),{direction:f,style:p,isRTL:x,isDouble:_,isVertical:D,isLongStrip:b,gap:P,speed:A,zoom:w,breakFirst:g}=ph({touchDevice:n.touchDevice,isWebtoon:d,titleName:(V=n.raw)==null?void 0:V.title.name,defaultPreferences:G(()=>n.defaultPreferences)}),I=ee(!1),q=Vg(c,_,g),K=G(()=>c.value.length),R=G(()=>l.value>=K.value),Q=ee(null),H=ee(null),T=G(()=>{var E;return(E=H.value)==null?void 0:E.rootEl}),Y=ee(!1),S=Wg({autoPlay:!n.tourEnabled&&(((N=n.defaultPreferences)==null?void 0:N.autoPlay)??!1),touchDevice:n.touchDevice,scrollEl:T,speed:A,isRTL:x,isVertical:D,isLongStrip:b,isBusy:s}),J=G({get(){return w.value},set(E){S.interfere(()=>{w.value=E})}}),F=Ca({touchDevice:n.touchDevice,isBusy:s,isPlaying:G(()=>S.isPlaying.value),isIdle:G(()=>S.isIdle.value),hideControlsEvent:G(()=>n.defaultPreferences.hideControlsEvent),scrollEl:T}),k=F.visible,y=Ng({page:l,totalImgs:K,style:p,direction:f,isLongStrip:b,isVertical:D,isRTL:x,spaceTop:a,isWebtoon:d,scrollEl:G(()=>{var E;return(E=H.value)==null?void 0:E.rootEl}),interferePlayer:E=>S.interfere(E),onChangedPage:me,onFinished:()=>o("finished")}),O=G(()=>Math.floor(l.value)),z=G(()=>b.value?l.value:_.value?Tn():Math.floor(l.value)),le=()=>S.interfere(()=>Qn(100));$t({onKeyDown:E=>{if(n.tourEnabled)return!0;const C=b.value&&D.value,L=b.value&&!D.value,j=!b.value&&D.value,re=!b.value&&!D.value;switch(E.key){case" ":E.preventDefault(),b.value||h();break;case"ArrowUp":case"PageUp":C?le():j&&O.value!==0&&(E.preventDefault(),Qe());break;case"ArrowDown":case"PageDown":C?le():j&&!R.value&&(E.preventDefault(),ze());break;case"ArrowLeft":L?le():re?(E.preventDefault(),Ke()):D.value&&De();break;case"ArrowRight":L?le():re?(E.preventDefault(),ut()):D.value&&Se();break;case"Escape":E.preventDefault();break}},onKeyUp:E=>{switch(E.key){case"b":g.value=!g.value;break}}}),ue(S.isPlaying,E=>{o("playingChanged",E)}),ue(k,E=>{o("controlsVisibilityChanged",E)});async function ae(){await y.init(),o("ready"),r.value=!0,F.activate(),S.activate()}function me(E){if(l.value===E)return;const C=c.value.length;if(E<0||E>=C+1)return;const L=Math.floor(E*100)/100;if(L===l.value)return;const j=l.value;if(o("pageChanged",L),E<.01&&j>E){S.awake();return}}function ge(){!n.touchDevice&&!b.value&&y.goToPage(O.value,{smooth:!0})}function Se(E=!1){var C,L;(L=(C=n.chapterNavData)==null?void 0:C.next)==null||L.call(C,E)}function De(E=!1){var C,L;(L=(C=n.chapterNavData)==null?void 0:C.prev)==null||L.call(C,E)}function Ke(){x.value?ze():Qe()}function ut(){x.value?Qe():ze()}function Qe(){var L;const E=q.value,C=R.value?E[E.length-1][0].index:(L=E[Tn()-1])==null?void 0:L[0].index;C!==void 0?y.goToPage(C):De()}function ze(){var E,C;if(R.value)Se();else{const L=((C=(E=q.value[Tn()+1])==null?void 0:E[0])==null?void 0:C.index)??c.value.length;y.goToPage(L)}}function Tn(){const E=O.value,C=q.value.findIndex(L=>L.some(({index:j})=>j===E));return C===-1?q.value.length-1:C}function h(E){F.toggle(E)}function m(){if(S.isPlaying.value){k.value||!n.touchDevice?S.stop():(S.awake(),F.toggle(!0));return}F.toggle()}function M(){S.stop(),o("clickEntryButton")}function W(){F.toggle(!1),S.isPlaying.value&&S.stop(),o("openHelpScreen")}return(E,C)=>e.immediate||i.value?(v(),oe(hr,{key:0,ref_key:"gearLayout",ref:Q,loading:!r.value,immediate:!!e.immediate,idle:u.value,class:"text-stone-100",onClick:C[20]||(C[20]=Le(()=>{},["stop"]))},{default:ne(()=>{var L,j,re,te;return[i.value?(v(),oe(ha,{key:0,ref_key:"body",ref:H,zoom:J.value,"onUpdate:zoom":C[1]||(C[1]=X=>J.value=X),zooming:I.value,"onUpdate:zooming":C[2]||(C[2]=X=>I.value=X),page:l.value,"page-index":O.value,pages:Z(q),"total-imgs":Z(c).length,direction:Z(f),gap:Z(P),"is-long-strip":Z(b),isRTL:Z(x),"is-double":Z(_),"is-vertical":Z(D),"space-top":a.value||0,busy:s.value,"play-controller":Z(S),"touch-device":e.touchDevice,"pinch-to-zoome":((L=e.defaultPreferences)==null?void 0:L.pinchToZoom)??!0,"tap-zone":(j=e.defaultPreferences)==null?void 0:j.tapZone,"controls-visible":Z(k),onReady:ae,onPrev:Qe,onNext:ze,onClick:m,onDragEnd:ge,onWheelPassive:C[3]||(C[3]=()=>Z(S).interfere())},Mi({_:2},[i.value&&Z(c).length?{name:"end",fn:ne(()=>{var X,ce;return[B(Gi,{"has-next":!!((X=e.chapterNavData)!=null&&X.next),"offline-mode":!!e.offlineMode,seconds:((ce=e.defaultPreferences)==null?void 0:ce.autoNextSeconds)??5,"show-add-button":Z(w)===1&&!e.entryId&&!!e.raw&&!e.offlineMode,onNext:Se,onAddToLibrary:M,onHide:C[0]||(C[0]=()=>o("hideReader"))},null,8,["has-next","offline-mode","seconds","show-add-button"])]}),key:"0"}:void 0]),1032,["zoom","zooming","page","page-index","pages","total-imgs","direction","gap","is-long-strip","isRTL","is-double","is-vertical","space-top","busy","play-controller","touch-device","pinch-to-zoome","tap-zone","controls-visible"])):se("",!0),B(br,{modelValue:Y.value,"onUpdate:modelValue":C[10]||(C[10]=X=>Y.value=X),"enable-help":"",name:(re=e.raw)==null?void 0:re.title.name,"space-top":a.value,"enable-default-preferences":!e.touchDevice||!!e.appVersion,onHelp:W,onMore:C[11]||(C[11]=()=>o("openDefaultPreferences"))},{"tab-preferences":ne(()=>[B(da,{"enable-reset":!e.touchDevice||!!e.appVersion,webtoon:Z(d),"reader-style":Z(p),"onUpdate:readerStyle":C[4]||(C[4]=X=>$e(p)?p.value=X:null),direction:Z(f),"onUpdate:direction":C[5]||(C[5]=X=>$e(f)?f.value=X:null),gap:Z(P),"onUpdate:gap":C[6]||(C[6]=X=>$e(P)?P.value=X:null),speed:Z(A),"onUpdate:speed":C[7]||(C[7]=X=>$e(A)?A.value=X:null),zoom:J.value,"onUpdate:zoom":C[8]||(C[8]=X=>J.value=X),"default-preferences":e.defaultPreferences},null,8,["enable-reset","webtoon","reader-style","direction","gap","speed","zoom","default-preferences"])]),"tab-default":ne(()=>[B(fr,{"model-value":e.defaultPreferences,"onUpdate:modelValue":C[9]||(C[9]=X=>o("defaultPreferencesChanged",X))},null,8,["model-value"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),r.value&&!R.value&&!e.tourEnabled?(v(),oe(la,{key:1,direction:Z(f),"tap-zone":(te=e.defaultPreferences)==null?void 0:te.tapZone},null,8,["direction","tap-zone"])):se("",!0),r.value&&!R.value?(v(),oe(gr,{key:2,playing:Z(S).isPlaying.value},null,8,["playing"])):se("",!0),B(aa,{visible:Z(k),"space-top":a.value},Mi({top:ne(()=>{var X;return[e.raw||e.offlineMode?(v(),oe(Ji,{key:0,"offline-mode":e.offlineMode,raw:e.raw,onClick:C[12]||(C[12]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):se("",!0),!e.touchDevice&&!e.offlineMode?(v(),oe(Yo,{key:1,onClick:C[13]||(C[13]=()=>o("hideReader"))})):se("",!0),e.chapterNavData?(v(),oe(sr,{key:2,"touch-device":e.touchDevice,"chapter-spec":(X=e.spec)==null?void 0:X.chapter,data:e.chapterNavData,rtl:Z(x),onGetHiddenChapters:C[14]||(C[14]=()=>o("getHiddenChapters")),onPrev:De,onNext:Se},null,8,["touch-device","chapter-spec","data","rtl"])):se("",!0)]}),"bottom-right":ne(()=>[!e.offlineMode&&e.raw?(v(),oe(Qi,{key:0,"entry-id":e.entryId,onClick:M},null,8,["entry-id"])):se("",!0),B(or,{disabled:!i.value,onClick:C[15]||(C[15]=()=>Y.value=!0)},null,8,["disabled"]),e.touchDevice?se("",!0):(v(),oe(ir,{key:1,onRequestFullScreen:C[16]||(C[16]=()=>{var X,ce;return(ce=(X=Q.value)==null?void 0:X.rootEl)==null?void 0:ce.requestFullscreen()})})),Z(b)?(v(),oe(nr,{key:2,"tour-message":"Press here to play like a video",playing:Z(S).isPlaying.value,disabled:!r.value,onClick:C[17]||(C[17]=()=>Z(S).toggle())},null,8,["playing","disabled"])):se("",!0),Z(_)?(v(),oe(Ge,{key:3,title:"Break 1st page (B)","data-tour":"Press here to separate the first page from double-page mode",disabled:!r.value,onClick:C[18]||(C[18]=()=>g.value=!Z(g))},{default:ne(()=>[Z(g)?(v(),oe(ua,{key:0})):(v(),oe(ca,{key:1}))]),_:1},8,["disabled"])):se("",!0)]),progress:ne(()=>{var X,ce;return[((X=e.defaultPreferences)==null?void 0:X.progressSize)!==0&&!R.value?(v(),oe(mr,{key:0,value:z.value,total:Z(q).length,"long-strip":Z(b),height:((ce=e.defaultPreferences)==null?void 0:ce.progressSize)??2,rtl:Z(x)},null,8,["value","total","long-strip","height","rtl"])):se("",!0)]}),default:ne(()=>[e.appVersion&&a.value&&!e.offlineMode?(v(),$("div",{key:0,class:"fixed top-0 left-0 right-0 bg-black bg-opacity-70 pointer-events-auto",style:Pe({height:`${a.value}px`})},null,4)):se("",!0)]),_:2},[Z(q).length?{name:"bottom-left",fn:ne(()=>[B(fa,{"model-value":O.value,disabled:!r.value,pages:Z(q),"total-imgs":Z(c).length,"onUpdate:modelValue":Z(y).goToPage},null,8,["model-value","disabled","pages","total-imgs","onUpdate:modelValue"])]),key:"0"}:void 0]),1032,["visible","space-top"]),Z(k)||I.value?(v(),$("div",Ug,[B(Vo,{name:"fade","enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ne(()=>[I.value||Z(w)!==1?(v(),oe(ql,{key:0,zoom:J.value,onClick:C[19]||(C[19]=Le(()=>J.value=1,["stop"])),class:"duration-200"},null,8,["zoom"])):se("",!0)]),_:1})])):se("",!0),xe(E.$slots,"default")]}),_:3},8,["loading","immediate","idle"])):se("",!0)}}),Kg=Object.freeze(Object.defineProperty({__proto__:null,default:Ma},Symbol.toStringTag,{value:"Module"}));function Zg({sel:e,heading:t}){const o="h1, h2, h3, h4, h5, h6, p, blockquote, pre, code, strong, b, em, i, small, sub, sup, mark, time, abbr, br, hr".split(",").map(d=>d.trim()),i=["br","hr"],r=["button","figure","img","script","select","input","form","iframe","nav","footer","aside","table"],s=Yg(e),l=Xg(s),a=u(s);if(!a)return;if(t){const d=document.createElement("h1");d.innerText=t,a.prepend(d)}return{el:a,isRTL:l};function u(d){let f=0,p=!1,x=0,_=!1;const D=b(d);if(!D)return;Gg(D),c(D);function b(P,A=!1){var Y;if(_)return;if(P.nodeType===Node.TEXT_NODE)return A||(Y=P.textContent)!=null&&Y.trim()?P.cloneNode():void 0;if(P.nodeType!==Node.ELEMENT_NODE)return;const g=P.tagName.toLocaleLowerCase();if(r.includes(g)||g==="a"&&!A||P.getAttribute("aria-hidden")==="true")return;const I=window.getComputedStyle(P);if(!(I.display!=="none"&&+(I.opacity??"1")>.1&&I.position!=="fixed"))return;const K=Array.from(P.childNodes);if(!K.length)return i.includes(g)?document.createElement(P.tagName):void 0;const R=A||o.includes(g),Q=[];if(K.forEach(S=>{if(_)return;const J=b(S,R);J?(Q.push(J),p?x=0:++f>30&&(p=!0)):p&&++x>30&&(_=!0)}),!Q.length)return;const H=document.createElement(g==="body"?"div":g==="a"?"span":g),T=P.getAttribute("dir");return T&&T!=="auto"&&H.setAttribute("dir",T),Q.forEach(S=>H.appendChild(S)),H}return D}function c(d){Ea(d,f=>{if(f===d||o.includes(f.tagName.toLowerCase()))return;const p=f.parentElement;if((p==null?void 0:p.childNodes.length)===1){Array.from(f.childNodes).forEach(D=>{p.appendChild(D)}),p.removeChild(f);return}f.childNodes.length===1&&f.replaceWith(f.childNodes[0])})}}function Yg(e){const t=(e??"main,article").split(",").filter(Boolean);for(const o of t){const i=document.querySelector(o);if(i)return i}const n=document.querySelector("p:has(+ p), h1, h2");if(n){let o=n;for(;o!==document.body;)o=o.parentElement;return o}return document.body}function Xg(e){if(e.getAttribute("dir")==="rtl")return!0;const t=e.querySelector("p")||e.querySelector("div:not(:empty)")||e;return t.getAttribute("dir")==="rtl"?!0:window.getComputedStyle(t).direction==="rtl"}function Gg(e){xr(e,t=>Array.from(t.children),t=>!t.textContent.trim()),xr(e,t=>Array.from(t.children).reverse(),t=>{if(!t.textContent.trim())return!0;const n=t.tagName;return n.length===2&&n.startsWith("H")})}function Ea(e,t){Array.from(e.children).forEach(o=>{Ea(o,t)}),t(e)}function xr(e,t,n){const o=t(e);for(let i=0;i<o.length;i++){const r=o[i];if(!xr(r,t,n))return!1;Jg(r)}return n(e)}function Jg(e){var t;(t=e.parentNode)==null||t.removeChild(e)}const Qg={key:1,class:"h-14 sm:h-16 px-2 2xs:px-3 flex gap-1 2xs:gap-3 items-center"},em={class:"md:fixed left-0 right-0 bottom-0"},tm={class:"p-2 2xs:px-3 sm:py-3 pb-6 md:pb-5 lg:pb-3 flex md:flex-col gap-4 justify-between items-center"},Ia=pe({__name:"GearThirdControlsLayout",props:{visible:{type:Boolean},hideTopControls:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(v(),$(be,null,[U("div",{class:fe(["fixed left-0 right-0 top-0 bg-inherit z-30",{"opacity-0 pointer-events-none":!e.visible}])},[e.spaceTop?(v(),$("div",{key:0,style:Pe({height:`${e.spaceTop}px`}),class:"bg-gradient-to-b from-black to-transparent"},null,4)):se("",!0),e.hideTopControls?se("",!0):(v(),$("div",Qg,[xe(t.$slots,"top-controls")]))],2),U("div",{class:fe(["fixed left-0 right-0 bottom-0 md:left-auto z-30 bg-inherit md:bg-transparent",{"opacity-0 pointer-events-none":!e.visible}])},[U("div",em,[xe(t.$slots,"progress")]),U("div",tm,[xe(t.$slots,"bottom-controls")])],2),xe(t.$slots,"default")],64))}}),nm=Object.freeze(Object.defineProperty({__proto__:null,default:Ia},Symbol.toStringTag,{value:"Module"})),om={},im={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function rm(e,t){return v(),$("svg",im,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M16 13q-.425 0-.712-.288T15 12t.288-.712T16 11h6q.425 0 .713.288T23 12t-.288.713T22 13zM4.675 15.425l-1.025 2.85q-.125.35-.4.538T2.625 19q-.575 0-.913-.487t-.137-1.038l4.4-11.725Q6.1 5.4 6.4 5.2t.65-.2h.9q.375 0 .663.2t.412.55L13.45 17.5q.2.55-.137 1.025T12.4 19q-.35 0-.65-.2t-.425-.55l-1-2.825zM5.4 13.4h4.2L7.55 7.6h-.1z"},null,-1)])])}const Oa=ve(om,[["render",rm]]),sm=Object.freeze(Object.defineProperty({__proto__:null,default:Oa},Symbol.toStringTag,{value:"Module"})),lm={},am={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function cm(e,t){return v(),$("svg",am,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"m4.675 15.425l-1.025 2.85q-.125.35-.4.538T2.625 19q-.575 0-.913-.487t-.137-1.038l4.4-11.725Q6.1 5.4 6.4 5.2t.65-.2h.9q.375 0 .663.2t.412.55L13.45 17.5q.2.55-.137 1.025T12.4 19q-.35 0-.65-.2t-.425-.55l-1-2.825zM5.4 13.4h4.2L7.55 7.6h-.1zM18 13h-2q-.425 0-.712-.288T15 12t.288-.712T16 11h2V9q0-.425.288-.712T19 8t.713.288T20 9v2h2q.425 0 .713.288T23 12t-.288.713T22 13h-2v2q0 .425-.288.713T19 16t-.712-.288T18 15z"},null,-1)])])}const $a=ve(lm,[["render",cm]]),um=Object.freeze(Object.defineProperty({__proto__:null,default:$a},Symbol.toStringTag,{value:"Module"})),za=ve(pe({__name:"NovelBody",props:{hideTopControls:{type:Boolean},progress:{type:Number},touchDevice:{type:Boolean},busy:{type:Boolean},spaceTop:{type:null},content:{type:null},rtl:{type:Boolean},titlePreferences:{type:Object},defaultPreferences:{type:Object}},emits:["ready","click","progressChanged","finished"],setup(e,{expose:t,emit:n}){const o=e,i=n,r=ee(!1),s=ee(),l=ee(),a=Uo(()=>{const c=s.value;if(!c)return;const{clientHeight:d,scrollHeight:f,scrollTop:p}=c,x=f-2*d,_=p/x;i("progressChanged",Math.min(1,Math.round(_*100)/100))},30);t({scrollEl:s}),$t({onKeyDown(){var c;o.busy||(c=s.value)==null||c.focus()}}),je(()=>{ue(()=>o.content,d=>{const f=l.value;f&&(Array.from(f.children).forEach(p=>{f.removeChild(p)}),f.appendChild(d),setTimeout(()=>{const p=s.value;if(p){f.offsetHeight<=p.clientHeight&&i("finished");const{progress:x}=o;x&&u(x)}r.value=!0,i("ready")}))},{immediate:!0});const c=hn();ue(()=>{const{fontFamily:d,fontSize:f,lineHeight:p}=o.titlePreferences;return`${d}-${f}-${p}-${c.width.value}`},async()=>{const d=o.progress;await gt(),u(d)})});function u(c){const d=s.value;d&&(d.scrollTop=c*(d.scrollHeight-2*d.clientHeight))}return(c,d)=>(v(),$("div",{ref_key:"scrollContainer",ref:s,tabindex:"0",class:fe(["novel-body",{"scrollbar-sm":!e.touchDevice,"scrollbar-none":e.touchDevice,"opacity-0":!r.value,"pt-16 sm:pt-18 md:pt-20":!e.hideTopControls,"pt-5 sm:pt-9 md:pt-12":e.hideTopControls}]),style:Pe({fontFamily:e.titlePreferences.fontFamily,"--font-size":`${e.titlePreferences.fontSize}px`,"--line-height":`${e.titlePreferences.lineHeight}px`,"--space-top":e.spaceTop?`${e.spaceTop}px`:void 0}),onClick:d[0]||(d[0]=()=>i("click")),onScroll:d[1]||(d[1]=(...f)=>Z(a)&&Z(a)(...f))},[U("div",cn({ref_key:"contentContainer",ref:l,class:"novel-body__content"},e.rtl?{dir:"rtl"}:{}),null,16),xe(c.$slots,"end")],38))}}),[["styles",['.novel-body{top:0;right:0;bottom:0;left:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding-left:32px;padding-right:32px;position:fixed}.novel-body:focus{outline:2px solid transparent;outline-offset:2px}@media (min-width:640px){.novel-body{padding-left:48px;padding-right:48px}}@media (min-width:768px){.novel-body{padding-left:56px;padding-right:56px}}@media (min-width:1024px){.novel-body{padding-left:64px;padding-right:64px}}@media (min-width:1280px){.novel-body{padding-left:80px;padding-right:80px}}.novel-body{font-size:var(--font-size);letter-spacing:.01em;line-height:var(--line-height)}.novel-body:before{content:"";display:block;height:var(--space-top,0)}.novel-body__content{margin-left:auto;margin-right:auto;max-width:1040px;min-height:100%}.novel-body hr{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1));margin:calc(var(--line-height)*.5) 0}.novel-body h1,.novel-body h2,.novel-body h3,.novel-body h4,.novel-body h5,.novel-body h6{font-weight:500}.novel-body h1{font-size:calc(var(--font-size)*1.5);line-height:calc(var(--font-size)*.5 + var(--line-height))}.novel-body h2{font-size:calc(var(--font-size)*1.25);line-height:calc(var(--font-size)*.25 + var(--line-height))}.novel-body h3{font-size:calc(var(--font-size)*1.125);line-height:calc(var(--font-size)*.125 + var(--line-height))}.novel-body h5,.novel-body h6,.novel-body p{font-size:inherit;line-height:inherit}.novel-body blockquote,.novel-body figure,.novel-body h1,.novel-body h2,.novel-body h3,.novel-body h4,.novel-body h5,.novel-body h6,.novel-body img,.novel-body ol,.novel-body p,.novel-body ul{margin-bottom:calc(var(--line-height)*.5)}.novel-body pre{background-color:transparent;border-style:none;display:block;font-family:inherit;margin:0;padding:0;white-space:normal}']]]),dm=Object.freeze(Object.defineProperty({__proto__:null,default:za},Symbol.toStringTag,{value:"Module"})),Da=pe({inheritAttrs:!1,__name:"GearThird",props:{chapterNavData:{type:Object},busy:{type:Boolean},defaultPreferences:{type:Object},immediate:{type:Boolean},appVersion:{type:String},raw:{type:Object},spec:{type:Object},siteMeta:{type:null},page:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},entryId:{type:String},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean},offlineMode:{type:Boolean}},emits:["clickEntryButton","hideReader","openHelpScreen","error","crash","ready","pageChanged","playingChanged","tourEnabledChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","timeout","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var Y,S,J,F,k,y;const n=e,o=t,i=ee(null),r=((Y=n.raw)==null?void 0:Y.novel)??Zg({sel:(S=n.spec)==null?void 0:S.content,heading:(J=n.raw)==null?void 0:J.name});r===void 0&&o("error");const s=ee(r==null?void 0:r.el),l=ee(!!(r!=null&&r.isRTL)),a=ee(!1),u=ee(!1),c=G(()=>n.page),d=G(()=>n.busy),f=ee(null),p=G(()=>{var O;return(O=f.value)==null?void 0:O.scrollEl}),x=(k=(F=n.raw)==null?void 0:F.title)==null?void 0:k.name,_=x?ia(x):location.hostname,D=Zd(`mpr:${_}`,{}),b=G({get(){var ae,me;const O=n.defaultPreferences,z=((ae=D.value)==null?void 0:ae.fontSize)??O.fontSize,le=Math.max(z,((me=D.value)==null?void 0:me.lineHeight)??O.lineHeight);return{fontFamily:O.fontFamily,speed:O.speed,...D.value,contrast:O.contrast,fontSize:z,lineHeight:le}},set(O){const z={...O},le=n.defaultPreferences;Object.keys(z).forEach(ae=>{z[ae]===le[ae]&&delete z[ae]}),D.value=z}}),P=qg({isBusy:d,speed:G(()=>b.value.speed),fontSize:G(()=>b.value.fontSize),lineHeight:G(()=>b.value.lineHeight),autoPlay:!!((y=n.defaultPreferences)!=null&&y.autoPlay),touchDevice:n.touchDevice,scrollEl:p}),A=G(()=>!n.touchDevice&&P.isIdle.value&&!d.value),w=Ca({touchDevice:n.touchDevice,moveThreshold:50,isBusy:d,isPlaying:G(()=>P.isPlaying.value),isIdle:G(()=>P.isIdle.value),hideControlsEvent:G(()=>n.defaultPreferences.hideControlsEvent),scrollEl:p}),g=w.visible;ue(P.isPlaying,O=>{o("playingChanged",O)}),ue(g,O=>{o("controlsVisibilityChanged",O)}),I(document.documentElement),I(document.body);function I(O){const z=O.style.getPropertyValue("overflow");z!=="hidden"&&(O.style.setProperty("overflow","hidden","important"),Mt(()=>{z?O.style.setProperty("overflow",z):O.style.removeProperty("overflow")}))}function q(){o("ready"),w.activate(),P.activate()}function K(){P.stop(),o("clickEntryButton")}function R(O){u.value=O}function Q(){if(P.isPlaying.value){g.value||!n.touchDevice?P.stop():(P.awake(),w.toggle(!0));return}w.toggle()}function H(O){O!==n.page&&(o("pageChanged",Math.min(1,O)),O===1&&o("finished"))}function T(O){const z=b.value.fontSize+O;z>48||z<10||(b.value={...b.value,fontSize:z,lineHeight:Math.max(10,Math.min(96,Math.round(b.value.lineHeight/b.value.fontSize*z)))})}return(O,z)=>s.value?(v(),oe(hr,{key:0,ref_key:"gearLayout",ref:i,immediate:"",idle:A.value,class:"bg-stone-900",style:Pe({color:`rgba(255, 255, 255, ${e.defaultPreferences.contrast})`})},{default:ne(()=>{var le;return[B(za,{ref_key:"body",ref:f,progress:c.value,"touch-device":e.touchDevice,busy:d.value,"space-top":e.spaceTop,content:s.value,rtl:l.value,"title-preferences":b.value,"default-preferences":e.defaultPreferences,"hide-top-controls":!e.raw,onClick:Q,onProgressChanged:H,onReady:q},{end:ne(()=>{var ae,me;return[B(Gi,{"has-next":!!((ae=e.chapterNavData)!=null&&ae.next),"offline-mode":!!e.offlineMode,seconds:((me=e.defaultPreferences)==null?void 0:me.autoNextSeconds)??5,onNext:z[0]||(z[0]=()=>{var ge,Se;return(Se=(ge=e.chapterNavData)==null?void 0:ge.next)==null?void 0:Se.call(ge,!1)}),onVisibilityChanged:R,onHide:z[1]||(z[1]=()=>o("hideReader")),onFinished:z[2]||(z[2]=()=>o("finished"))},null,8,["has-next","offline-mode","seconds"])]}),_:1},8,["progress","touch-device","busy","space-top","content","rtl","title-preferences","default-preferences","hide-top-controls"]),!e.touchDevice&&!e.raw&&!e.offlineMode?Ne((v(),oe(Yo,{key:0,class:"hidden md:inline-block fixed left-3 top-2",transparent:"",onClick:z[3]||(z[3]=()=>o("hideReader"))},null,512)),[[pl,Z(g)]]):se("",!0),B(Ia,{visible:Z(g),"hide-top-controls":!e.raw,"space-top":e.spaceTop},{"top-controls":ne(()=>{var ae;return[e.raw||e.offlineMode?(v(),oe(Ji,{key:0,"offline-mode":e.offlineMode,raw:e.raw,transparent:"",onClick:z[4]||(z[4]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):se("",!0),e.raw&&!e.touchDevice&&!e.offlineMode?(v(),oe(Yo,{key:1,transparent:"",onClick:z[5]||(z[5]=()=>o("hideReader"))})):se("",!0),e.chapterNavData?(v(),oe(sr,{key:2,transparent:"","touch-device":e.touchDevice,"chapter-spec":(ae=e.spec)==null?void 0:ae.chapter,data:e.chapterNavData,rtl:l.value,onGetHiddenChapters:z[6]||(z[6]=()=>o("getHiddenChapters")),onPrev:z[7]||(z[7]=me=>{var ge,Se;return(Se=(ge=e.chapterNavData)==null?void 0:ge.prev)==null?void 0:Se.call(ge,me)}),onNext:z[8]||(z[8]=me=>{var ge,Se;return(Se=(ge=e.chapterNavData)==null?void 0:ge.next)==null?void 0:Se.call(ge,me)})},null,8,["touch-device","chapter-spec","data","rtl"])):se("",!0)]}),"bottom-controls":ne(()=>[!e.offlineMode&&e.raw?(v(),$(be,{key:0},[B(Qi,{"entry-id":e.entryId,transparent:"",onClick:K},null,8,["entry-id"]),z[19]||(z[19]=U("div",{class:"hidden 2xs:inline-block md:hidden flex-grow"},null,-1))],64)):se("",!0),B(Ge,{transparent:"",onClick:z[9]||(z[9]=()=>T(-1))},{default:ne(()=>[B(Oa)]),_:1}),B(Ge,{transparent:"",onClick:z[10]||(z[10]=()=>T(1))},{default:ne(()=>[B($a)]),_:1}),B(or,{transparent:"",onClick:z[11]||(z[11]=()=>a.value=!0)}),e.touchDevice?se("",!0):(v(),oe(ir,{key:1,transparent:"",onRequestFullScreen:z[12]||(z[12]=()=>{var ae,me;return(me=(ae=i.value)==null?void 0:ae.rootEl)==null?void 0:me.requestFullscreen()})})),B(nr,{transparent:"","tour-message":"Press here to start listening",playing:Z(P).isPlaying.value,class:"order-2 md:order-4",onClick:z[13]||(z[13]=()=>Z(P).toggle())},null,8,["playing"])]),progress:ne(()=>{var ae,me;return[((ae=e.defaultPreferences)==null?void 0:ae.progressSize)!==0?(v(),oe(mr,{key:0,value:c.value,height:((me=e.defaultPreferences)==null?void 0:me.progressSize)??2,rtl:l.value,opacity:e.defaultPreferences.contrast},null,8,["value","height","rtl","opacity"])):se("",!0)]}),_:1},8,["visible","hide-top-controls","space-top"]),u.value?se("",!0):(v(),oe(gr,{key:1,playing:Z(P).isPlaying.value},null,8,["playing"])),B(br,{modelValue:a.value,"onUpdate:modelValue":z[17]||(z[17]=ae=>a.value=ae),name:(le=e.raw)==null?void 0:le.title.name,"space-top":(e.spaceTop??0)+80,"enable-default-preferences":!e.touchDevice||!!e.appVersion,onMore:z[18]||(z[18]=()=>o("openDefaultPreferences"))},{"tab-preferences":ne(()=>[B(dr,{modelValue:b.value,"onUpdate:modelValue":z[14]||(z[14]=ae=>b.value=ae),"default-preferences":e.defaultPreferences,"enable-reset":!e.touchDevice||!!e.appVersion,onReset:z[15]||(z[15]=()=>D.value=null)},null,8,["modelValue","default-preferences","enable-reset"])]),"tab-default":ne(()=>[B(fr,{"is-novel":"","model-value":e.defaultPreferences,"onUpdate:modelValue":z[16]||(z[16]=ae=>o("defaultPreferencesChanged",ae))},null,8,["model-value"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),xe(O.$slots,"default")]}),_:3},8,["idle","style"])):se("",!0)}}),fm=Object.freeze(Object.defineProperty({__proto__:null,default:Da},Symbol.toStringTag,{value:"Module"}));async function pm({siteMeta:e,spec:t}){const n=e==null?void 0:e.contentTypes,o=!e||(n==null?void 0:n.includes(Qt.novel)),i=!n||n.includes(Qt.manga);if(!i&&!o)return;const r=(t==null?void 0:t.content)??"body",s=i?(r==null?void 0:r.split(",").map(l=>l.trim()).filter(Boolean).map(l=>`${l} img:not(figure > img), ${l} canvas`).join(","))??r:void 0;return await gn(200,50,async()=>{const l=document.querySelector(r);if(l){if(o){const a=Array.from(l.querySelectorAll("p"));if(a.length){let u=!1,c=0;for(let d=0;d<a.length;d++)if(a[d].textContent.split(" ").length>20&&(c+=1,c===5)){u=!0;break}if(u)return Qt.novel}}if(s&&Array.from(l.querySelectorAll(s)).some(c=>hm(c)))return Qt.manga}})}function hm(e){const t=e.getBoundingClientRect();return ni(t.width,t.height)}function gm({raw:e,spec:t,siteMeta:n,offlineMode:o,onSelect:i}){var H,T,Y;const{vol:r,inferVol:s,chap:l,title:a,slug:u,basePath:c}=e,d=t==null?void 0:t.chapter;let f=-1;async function p(S,J){if(o){i({...S});return}if(S.slug){x(S.slug,J);return}if(S.elIndex===void 0||!(d!=null&&d.sel))return;let F=null;document.querySelector(d.sel)||(d!=null&&d.trigger&&(F=document.querySelector(d.trigger)),F&&(eo(F),await new Promise(y=>setTimeout(()=>y(),50))));const k=d&&d.sel&&!d.url?document.querySelectorAll(d.sel):void 0;k!=null&&k[S.elIndex]&&(eo(k[S.elIndex]),F&&document.querySelector(d.sel)&&eo(F))}function x(S,J){const F=mm(c,S,(n==null?void 0:n.trailing)??!0);J?window.open(F,"_blank","noopener"):location.href=F}function _(S){const J=w[S];return J?F=>p(J,F):void 0}function D(S,J,F){if(J)x(J,F);else if(S){const k=document.querySelector(S);k&&eo(k,{preventDefault:!1})}}const b=r??s,P=d==null?void 0:d.url,A=((H=a.chapters)==null?void 0:H.filter(S=>S.slug||!P&&S.elIndex!==void 0))??[],w=A.length>1?A:[],g=(T=e.prev)==null?void 0:T.slug,I=(Y=e.next)==null?void 0:Y.slug,q=t!=null&&t.prev&&typeof t.prev!="string"?t.prev.sel??t.prevBtn:t==null?void 0:t.prevBtn,K=t!=null&&t.next&&typeof t.next!="string"?t.next.sel??t.nextBtn:t==null?void 0:t.nextBtn;let R=g||q&&!w.length&&document.body.querySelector(q)?S=>D(q,g,S):void 0,Q=I||K&&!w.length&&document.body.querySelector(K)?S=>D(K,I,S):void 0;if(w.length){if(P&&(f=w.findIndex(S=>S.slug===e.slug)),f===-1&&(f=w.findIndex(S=>(S.vol??S.inferVol)===b&&S.chap===l)),P&&f===-1&&(f=w.findIndex(S=>S.slug&&u.startsWith(`${S.slug}-`)&&u.length-S.slug.length>3)),f!==-1)R??(R=_(f+1)),Q??(Q=_(f-1));else if(!g&&!I){const S=w.findIndex(J=>{const F=J.vol??J.inferVol;return b===void 0||F===void 0||b===F?J.chap<l:F<b});S!==-1?(R=_(S),Q=_(S-1)):Q=_(w.length-1)}}return{activeIndex:f,activeLabel:Aa({vol:r,chap:l}),prev:R,next:Q,chapters:w.map(S=>({label:Aa(S),select:J=>p(S,J)}))}}function Aa({vol:e,chap:t}){return e==null?`Ch.${t}`:`Vol.${e} ch.${t}`}function mm(e,t,n){const o=!t||t.includes("//")||t.startsWith("/")?t:"/"+[...e.split("/"),...t.split("/")].filter(Boolean).join("/"),[i,r]=(o.includes("//")?o:location.origin+o).split("?");return[i.endsWith("/")===n?i:n?i+"/":i.substring(0,-1),r].filter(Boolean).join("?")}function vm(e){return e instanceof Error?JSON.stringify(e,Object.getOwnPropertyNames(e)):e}const ja=ve(pe({inheritAttrs:!1,__name:"App",props:{immediate:{type:Boolean},appVersion:{type:String},raw:{type:Object},spec:{type:Object},siteMeta:{type:null},page:{type:Number},spaceTop:{type:Number},touchDevice:{type:Boolean},entryId:{type:String},defaultPreferences:{type:Object},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean},offlineMode:{type:Boolean}},emits:["error","crash","ready","pageChanged","playingChanged","tourEnabledChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","timeout","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){const n=e,o=t;let i=!1;vs((b,P,A)=>{if(!i){i=!0;const g=`(3.0.1) ${(P==null?void 0:P.$options.name)??(P==null?void 0:P.$options.__name)??(P==null?void 0:P.$options.__file)}.${A}: ${vm(b)}`;o("crash",g)}return!1});const r=ee(n.raw?n.raw.contentType??Qt.manga:void 0);r.value===void 0&&pm({siteMeta:n.siteMeta,spec:n.spec}).then(b=>{b?r.value=b:o("error")});const s=ee(!1),l=Qd({touchDevice:n.touchDevice}),a=of(n.page,n.isAutoShow),u=G(()=>n.raw?gm({raw:n.raw,spec:n.spec,siteMeta:n.siteMeta,offlineMode:n.offlineMode,onSelect:b=>o("selectChapter",b)}):void 0);nf().addListener({onKeyUp:b=>{switch(b.key){case"h":_();break}}}),ef(()=>o("hapticFeedback"));const d=G(()=>{var w,g;const b=n.defaultPreferences,P=((w=n.defaultPreferences)==null?void 0:w.fontSize)??16,A=Math.max(P,((g=n.defaultPreferences)==null?void 0:g.lineHeight)??28);return{...b,speed:(b==null?void 0:b.speed)??1,progressSize:(b==null?void 0:b.progressSize)??2,autoNextSeconds:(b==null?void 0:b.autoNextSeconds)??5,hideControlsEvent:(b==null?void 0:b.hideControlsEvent)??tn.firstMove,autoPlay:(b==null?void 0:b.autoPlay)??!1,pinchToZoom:(b==null?void 0:b.pinchToZoom)??!0,readerStyle:(b==null?void 0:b.readerStyle)??Dt.longStrip,direction:(b==null?void 0:b.direction)??nt.vertical,gap:(b==null?void 0:b.gap)??0,fontFamily:"system-ui, sans-serif",contrast:.8,fontSize:P,lineHeight:A}});function f(){if(n.offlineMode){o("pressedBack");return}rf(),o("dispose")}function p(b){a.value=b,o("pageChanged",b)}function x(){n.entryId?o("openEntry",n.entryId):o("addEntry")}function _(b){s.value!==b&&(s.value=b??!s.value)}function D(){o("error"),f()}return(b,P)=>r.value!==void 0?(v(),oe(Pi(r.value===Z(Qt).novel?Da:Ma),cn({key:0,ref:"root"},n,{page:Z(a),busy:Z(l),"chapter-nav-data":u.value,"default-preferences":d.value,onOpenDefaultPreferences:P[1]||(P[1]=()=>o("openDefaultPreferences")),onDefaultPreferencesChanged:P[2]||(P[2]=A=>o("defaultPreferencesChanged",A)),onTimeout:P[3]||(P[3]=()=>o("timeout")),onReady:P[4]||(P[4]=()=>o("ready")),onFinished:P[5]||(P[5]=()=>o("finished")),onPlayingChanged:P[6]||(P[6]=A=>o("playingChanged",A)),onControlsVisibilityChanged:P[7]||(P[7]=A=>o("controlsVisibilityChanged",A)),onPressedBack:P[8]||(P[8]=()=>o("pressedBack")),onGetHiddenChapters:P[9]||(P[9]=()=>o("getHiddenChapters")),onError:D,onHideReader:f,onPageChanged:p,onClickEntryButton:x,onOpenHelpScreen:P[10]||(P[10]=()=>_(!0))}),{default:ne(()=>[s.value?(v(),oe(Ll,{key:0,"touch-device":e.touchDevice,onHide:_},null,8,["touch-device"])):se("",!0),e.tourEnabled?(v(),oe(Bl,{key:1,onHide:P[0]||(P[0]=()=>o("tourEnabledChanged",!1))})):se("",!0)]),_:1},16,["page","busy","chapter-nav-data","default-preferences"])):se("",!0)}}),[["styles",['*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.18 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:Helvetica,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}*{-webkit-tap-highlight-color:rgba(0,0,0,0)!important}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:none;border-style:none;cursor:pointer;outline:2px solid transparent;outline-offset:2px;white-space:nowrap}button[disabled]{cursor:default!important}svg{height:100%}.container,svg{width:100%}@media (min-width:300px){.container{max-width:300px}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}.scrollbar-sm{scrollbar-color:#777 transparent;scrollbar-width:thin}.scrollbar-sm::-webkit-scrollbar{background-color:transparent;height:4px;width:4px}.scrollbar-sm::-webkit-scrollbar-track{background:transparent}.scrollbar-sm::-webkit-scrollbar-thumb{background-color:#777;border-radius:2px}.\\!pointer-events-none{pointer-events:none!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.\\!visible{visibility:visible!important}.visible{visibility:visible}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-0{bottom:0}.bottom-1{bottom:4px}.bottom-full{bottom:100%}.left-0{left:0}.left-1{left:4px}.left-1\\/2{left:50%}.left-10{left:40px}.left-3{left:12px}.left-9{left:36px}.right-0{right:0}.top-0{top:0}.top-1{top:4px}.top-1\\/2{top:50%}.top-10{top:40px}.top-2{top:8px}.top-9{top:36px}.top-full{top:100%}.-z-10{z-index:-10}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.order-2{order:2}.m-0{margin:0}.m-auto{margin:auto}.-mx-12{margin-left:-48px;margin-right:-48px}.-my-12{margin-bottom:-48px;margin-top:-48px}.-ml-20{margin-left:-80px}.-mr-3{margin-right:-12px}.-mt-2{margin-top:-8px}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:12px}.mb-5{margin-bottom:20px}.ml-1{margin-left:4px}.ml-auto{margin-left:auto}.mt-5{margin-top:20px}.box-border{box-sizing:border-box}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.hidden{display:none}.\\!h-9{height:36px!important}.h-0{height:0}.h-1{height:4px}.h-1\\/3{height:33.333333%}.h-10{height:40px}.h-12{height:48px}.h-14{height:56px}.h-16{height:64px}.h-2{height:8px}.h-20{height:80px}.h-24{height:96px}.h-28{height:112px}.h-3{height:12px}.h-4{height:16px}.h-5{height:20px}.h-6{height:24px}.h-8{height:32px}.h-9{height:36px}.h-\\[101\\%\\]{height:101%}.h-full{height:100%}.max-h-\\[70vh\\]{max-height:70vh}.max-h-full{max-height:100%}.max-h-none{max-height:none}.min-h-full{min-height:100%}.w-0{width:0}.w-1{width:4px}.w-1\\/3{width:33.333333%}.w-10{width:40px}.w-12{width:48px}.w-14{width:56px}.w-2{width:8px}.w-2\\/3{width:66.666667%}.w-20{width:80px}.w-24{width:96px}.w-28{width:112px}.w-3{width:12px}.w-4{width:16px}.w-40{width:160px}.w-5{width:20px}.w-6{width:24px}.w-auto{width:auto}.w-full{width:100%}.w-min{width:-moz-min-content;width:min-content}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-xs{max-width:320px}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.flex-grow{flex-grow:1}.origin-bottom{transform-origin:bottom}.origin-right{transform-origin:right}.origin-top{transform-origin:top}.\\!translate-y-full{--tw-translate-y:100%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\.5{--tw-translate-y:-6px}.-translate-y-1\\/2{--tw-translate-y:-50%}.-translate-y-1\\/2,.translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.translate-y-1\\.5{--tw-translate-y:6px}.-rotate-90,.translate-y-1\\.5{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-90{--tw-rotate:-90deg}.rotate-180{--tw-rotate:180deg}.rotate-180,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-90{--tw-rotate:90deg}.scale-95{--tw-scale-x:.95;--tw-scale-y:.95}.scale-95,.scale-y-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-y-90{--tw-scale-y:.9}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-auto{cursor:auto}.cursor-default{cursor:default}.cursor-grabbing{cursor:grabbing}.cursor-none{cursor:none}.cursor-pointer{cursor:pointer}.touch-pan-x{--tw-pan-x:pan-x}.touch-pan-x,.touch-pan-y{touch-action:var(--tw-pan-x) var(--tw-pan-y) var(--tw-pinch-zoom)}.touch-pan-y{--tw-pan-y:pan-y}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}.resize{resize:both}.\\!snap-none{scroll-snap-type:none!important}.snap-x{scroll-snap-type:x var(--tw-scroll-snap-strictness)}.snap-y{scroll-snap-type:y var(--tw-scroll-snap-strictness)}.snap-center{scroll-snap-align:center}.list-none{list-style-type:none}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-nowrap{flex-wrap:nowrap}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:4px}.gap-2{gap:8px}.gap-3{gap:12px}.gap-4{gap:16px}.gap-6{gap:24px}.gap-\\[1px\\]{gap:1px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overscroll-contain{overscroll-behavior:contain}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.rounded{border-radius:4px}.rounded-2xl{border-radius:16px}.rounded-\\[2\\.5rem\\]{border-radius:40px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:8px}.rounded-md{border-radius:6px}.rounded-xl{border-radius:12px}.\\!rounded-l-none{border-bottom-left-radius:0!important;border-top-left-radius:0!important}.\\!rounded-r-none{border-bottom-right-radius:0!important;border-top-right-radius:0!important}.rounded-l-sm{border-bottom-left-radius:2px;border-top-left-radius:2px}.rounded-r-sm{border-bottom-right-radius:2px;border-top-right-radius:2px}.rounded-t-xl{border-top-left-radius:12px;border-top-right-radius:12px}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-t-\\[1px\\]{border-top-width:1px}.border-solid{border-style:solid}.border-none{border-style:none}.border-primary{--tw-border-opacity:1;border-color:rgb(184 92 56/var(--tw-border-opacity,1))}.border-stone-200{--tw-border-opacity:1;border-color:rgb(231 229 228/var(--tw-border-opacity,1))}.border-stone-400{--tw-border-opacity:1;border-color:rgb(168 162 158/var(--tw-border-opacity,1))}.border-stone-500{--tw-border-opacity:1;border-color:rgb(120 113 108/var(--tw-border-opacity,1))}.border-stone-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.border-textPrimary{--tw-border-opacity:1;border-color:rgb(251 130 82/var(--tw-border-opacity,1))}.border-opacity-30{--tw-border-opacity:.3}.border-opacity-70{--tw-border-opacity:.7}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-inherit{background-color:inherit}.bg-primary{--tw-bg-opacity:1;background-color:rgb(184 92 56/var(--tw-bg-opacity,1))}.bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.bg-stone-300{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.bg-stone-500{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.bg-stone-600{--tw-bg-opacity:1;background-color:rgb(87 83 78/var(--tw-bg-opacity,1))}.bg-stone-800{--tw-bg-opacity:1;background-color:rgb(41 37 36/var(--tw-bg-opacity,1))}.bg-stone-900{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.bg-textPrimary{--tw-bg-opacity:1;background-color:rgb(251 130 82/var(--tw-bg-opacity,1))}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.\\!bg-opacity-100{--tw-bg-opacity:1!important}.bg-opacity-40{--tw-bg-opacity:.4}.bg-opacity-50{--tw-bg-opacity:.5}.bg-opacity-70{--tw-bg-opacity:.7}.bg-opacity-80{--tw-bg-opacity:.8}.bg-opacity-90{--tw-bg-opacity:.9}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-none{background-image:none}.from-black{--tw-gradient-from:#000 var(--tw-gradient-from-position);--tw-gradient-to:transparent var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0{padding:0}.p-0\\.5{padding:2px}.p-1{padding:4px}.p-2{padding:8px}.p-4{padding:16px}.p-6{padding:24px}.px-2{padding-left:8px;padding-right:8px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-5{padding-left:20px;padding-right:20px}.px-6{padding-left:24px;padding-right:24px}.px-8{padding-left:32px;padding-right:32px}.py-0\\.5{padding-bottom:2px;padding-top:2px}.py-1{padding-bottom:4px;padding-top:4px}.py-1\\.5{padding-bottom:6px;padding-top:6px}.py-2{padding-bottom:8px;padding-top:8px}.pb-6{padding-bottom:24px}.pb-7{padding-bottom:28px}.pb-8{padding-bottom:32px}.pl-1{padding-left:4px}.pr-2{padding-right:8px}.pt-1{padding-top:4px}.pt-1\\.5{padding-top:6px}.pt-12{padding-top:48px}.pt-16{padding-top:64px}.pt-20{padding-top:80px}.pt-5{padding-top:20px}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.font-sans{font-family:Helvetica,sans-serif}.text-base{font-size:16px;line-height:24px}.text-sm{font-size:14px;line-height:20px}.text-xl{font-size:20px;line-height:28px}.font-medium{font-weight:500}.font-normal{font-weight:400}.lowercase{text-transform:lowercase}.leading-none{line-height:1}.text-stone-100{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.text-stone-200{--tw-text-opacity:1;color:rgb(231 229 228/var(--tw-text-opacity,1))}.text-stone-300{--tw-text-opacity:1;color:rgb(214 211 209/var(--tw-text-opacity,1))}.text-stone-400{--tw-text-opacity:1;color:rgb(168 162 158/var(--tw-text-opacity,1))}.text-stone-50{--tw-text-opacity:1;color:rgb(250 250 249/var(--tw-text-opacity,1))}.text-stone-800{--tw-text-opacity:1;color:rgb(41 37 36/var(--tw-text-opacity,1))}.text-stone-900{--tw-text-opacity:1;color:rgb(28 25 23/var(--tw-text-opacity,1))}.text-textPrimary{--tw-text-opacity:1;color:rgb(251 130 82/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-neutral-950{--tw-shadow-color:#0a0a0a;--tw-shadow:var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-md{--tw-backdrop-blur:blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-bg{transition-duration:.15s;transition-property:background-color;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-0{transition-duration:0s}.duration-100{transition-duration:.1s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.children-pointer-events-auto>*{pointer-events:auto}.last\\:mb-0:last-child{margin-bottom:0}.last\\:border-b-transparent:last-child{border-bottom-color:transparent}@media (hover:hover) and (pointer:fine){.hover\\:bg-stone-100:hover{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.hover\\:bg-stone-300:hover{--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1))}.hover\\:bg-stone-50:hover{--tw-bg-opacity:1;background-color:rgb(250 250 249/var(--tw-bg-opacity,1))}.hover\\:bg-stone-500:hover{--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1))}.hover\\:bg-stone-900:hover{--tw-bg-opacity:1;background-color:rgb(28 25 23/var(--tw-bg-opacity,1))}.hover\\:bg-opacity-10:hover{--tw-bg-opacity:.1}.hover\\:bg-opacity-50:hover{--tw-bg-opacity:.5}.hover\\:bg-opacity-80:hover{--tw-bg-opacity:.8}.hover\\:text-stone-100:hover{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-primary:focus{outline-color:#b85c38}@media (hover:hover) and (pointer:fine){.group:hover .group-hover\\:bg-stone-100{--tw-bg-opacity:1;background-color:rgb(245 245 244/var(--tw-bg-opacity,1))}.group:hover .group-hover\\:bg-opacity-20{--tw-bg-opacity:.2}}@media (min-width:300px){.\\32xs\\:inline-block{display:inline-block}.\\32xs\\:gap-3{gap:12px}.\\32xs\\:px-3{padding-left:12px;padding-right:12px}}@media (min-width:640px){.sm\\:h-16{height:64px}.sm\\:w-\\[31rem\\]{width:496px}.sm\\:p-3{padding:12px}.sm\\:px-12{padding-left:48px;padding-right:48px}.sm\\:py-3{padding-bottom:12px;padding-top:12px}.sm\\:pt-18{padding-top:72px}.sm\\:pt-9{padding-top:36px}}@media (min-width:768px){.md\\:fixed{position:fixed}.md\\:left-auto{left:auto}.md\\:order-4{order:4}.md\\:inline-block{display:inline-block}.md\\:hidden{display:none}.md\\:flex-col{flex-direction:column}.md\\:bg-transparent{background-color:transparent}.md\\:px-14{padding-left:56px;padding-right:56px}.md\\:px-8{padding-left:32px;padding-right:32px}.md\\:pb-5{padding-bottom:20px}.md\\:pb-6{padding-bottom:24px}.md\\:pt-12{padding-top:48px}.md\\:pt-20{padding-top:80px}}@media (min-width:1024px){.lg\\:px-10{padding-left:40px;padding-right:40px}.lg\\:px-16{padding-left:64px;padding-right:64px}.lg\\:pb-3{padding-bottom:12px}.lg\\:pb-4{padding-bottom:16px}}@media (min-width:1280px){.xl\\:px-12{padding-left:48px;padding-right:48px}}']]]),bm=Object.freeze(Object.defineProperty({__proto__:null,default:ja},Symbol.toStringTag,{value:"Module"})),ym={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},wm={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},xm={class:"flex justify-between items-end"},_m={class:"inline-block children-pointer-events-auto"},Sm={class:"inline-flex flex-col items-end gap-4 children-pointer-events-auto"},km={class:"fixed pointer-events-none left-0 right-0 bottom-0"},Cm={key:1,class:"fixed inline-block left-1/2 -translate-x-1/2 bottom-0 p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3"},Tm=Object.freeze(Object.defineProperty({__proto__:null,default:ve(pe({__name:"ReaderLayout",props:{loading:{type:Boolean},immediate:{type:Boolean},idle:{type:Boolean},controlsVisible:{type:Boolean},zooming:{type:Boolean},spaceTop:{type:null}},setup(e,{expose:t}){const n={mounted:i=>i.showModal(),beforeUnmount:i=>i.close()},o=ee(null);return t({rootEl:o}),(i,r)=>Ne((v(),$("dialog",ym,[U("div",{ref_key:"rootEl",ref:o,id:"reader-layout",class:fe({"cursor-none":e.idle,"cursor-default":!e.idle,"bg-black":e.immediate||!e.loading,"opacity-0":!e.immediate&&e.loading,"duration-200 transition-colors":!e.immediate})},[e.loading&&e.immediate?(v(),$("div",wm,[B(ei)])):se("",!0),xe(i.$slots,"default"),U("div",{id:"controls",class:fe(["fixed pointer-events-none cursor-auto left-0 top-0 w-full h-full flex flex-col justify-between p-2 sm:p-3 pb-6 md:pb-5 lg:pb-3",{"opacity-100 z-20":e.controlsVisible,"opacity-0 -z-10":!e.controlsVisible}])},[U("div",{class:"flex gap-1 items-center children-pointer-events-auto relative z-30 flex-shrink-0 2xs:gap-3",style:Pe({paddingTop:`${e.spaceTop||0}px`})},[xe(i.$slots,"top-controls")],4),U("div",xm,[U("div",_m,[xe(i.$slots,"bottom-left-controls")]),U("div",Sm,[xe(i.$slots,"bottom-right-controls")])]),U("div",km,[xe(i.$slots,"progress")])],2),e.controlsVisible||e.zooming?(v(),$("div",Cm,[xe(i.$slots,"reset-zoom")])):se("",!0)],2)])),[[n]])}}),[["styles",["#reader-layout{direction:ltr;font-family:Helvetica,sans-serif;font-size:16px;font-weight:400;height:100%;line-height:24px;overflow:hidden;overscroll-behavior:contain;pointer-events:auto;text-align:left;width:100%;--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}"]]])},Symbol.toStringTag,{value:"Module"})),Pm={},Mm={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Em(e,t){return v(),$("svg",Mm,[...t[0]||(t[0]=[U("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46s46-20.595 46-46s-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)])])}const Im=Object.freeze(Object.defineProperty({__proto__:null,default:ve(Pm,[["render",Em]])},Symbol.toStringTag,{value:"Module"})),Om="gear-second{height:0!important;opacity:0!important;pointer-events:none!important;width:0!important;z-index:-10!important}html.gear-second,html.gear-second *{scroll-behavior:auto!important;scrollbar-width:none!important}html.gear-second ::-webkit-scrollbar,html.gear-second::-webkit-scrollbar{display:none!important}html.gear-second body{touch-action:pan-x pan-y!important}html.gear-second body .m-content #progress-bar{display:none!important}html.gear-second body>:not(dialog[open]),html.gear-second>body~*{visibility:hidden!important}html.gear-second>body~*{display:none!important;height:0!important;left:100%!important;max-height:0!important;max-width:0!important;opacity:0!important;pointer-events:none!important;top:100%!important;width:0!important}.mp-scroll-container{max-height:100vh!important;overflow:hidden!important}html:has(body.mp-scroll-container){overflow:auto!important}",mn="gear-second",_r={appVersion:void 0,immediate:void 0,raw:void 0,spec:void 0,siteMeta:void 0,page:0,spaceTop:void 0,touchDevice:void 0,entryId:void 0,isAutoShow:void 0,tourEnabled:void 0,offlineMode:void 0,defaultPreferences:void 0,onError:void 0,onCrash:void 0,onDispose:void 0,onFullScreenChanged:void 0,onControlsVisibilityChanged:void 0,onPageChanged:void 0,onOpenEntry:void 0,onAddEntry:void 0,onFinished:void 0,onHapticFeedback:void 0,onPressedBack:void 0,onSelectChapter:void 0,onTimeout:void 0,onDefaultPreferencesChanged:void 0,onOpenDefaultPreferences:void 0},Je={promise:void 0,data:vo({..._r})};async function $m(e){return Je.promise?(Je.data.raw=e.raw,await Je.promise):(Je.promise=new Promise(t=>{let n=!1,o=!1,i,r,s=0;const l=!!e.spaceTop||!!e.isAutoShow&&!!e.page,a=()=>{n||(n=!0,clearInterval(i),i=void 0,r!=null&&r.isConnected&&document.body.removeChild(r),document.documentElement.classList.remove(mn),Je.data.touchDevice||Object.assign(Je.data,_r),Je.promise=void 0,Gn.clear())},u=ct(f=>{var p;return!n&&((p=e.onPageChanged)==null?void 0:p.call(e,f))},300);Object.assign(Je.data,_r,e.appVersion?e:La(e),{immediate:l,onReady(){l||(c(),document.documentElement.classList.add(mn))},onError(){var f,p;a(),o?((f=e.onDispose)==null||f.call(e),(p=e.onError)==null||p.call(e)):d()},onDispose:()=>{var f;a(),(f=e==null?void 0:e.onDispose)==null||f.call(e)},onControlsVisibilityChanged(f){var p,x;(p=e.onFullScreenChanged)==null||p.call(e,!f),(x=e.onControlsVisibilityChanged)==null||x.call(e,f)},onPageChanged:f=>{Je.data.page=f,!(s>=f)&&(s=f,u(f))},onTourEnabledChanged:f=>{Je.data.tourEnabled=f},onDefaultPreferencesChanged:f=>{var p;Je.data.defaultPreferences=f,(p=e.onDefaultPreferencesChanged)==null||p.call(e,f)}}),zm().then(()=>{if(n){d();return}r=document.createElement(mn),l?(document.documentElement.classList.add(mn),document.body.appendChild(r),setTimeout(c)):document.body.appendChild(r);let f=0;i=setInterval(()=>{if(++f===30||n){clearInterval(i),i=void 0;return}r.isConnected||(document.documentElement.classList.add(mn),document.body.appendChild(r))},100)});function c(){o||(o=!0,t({updateArgs(f){Object.assign(Je.data,Je.data.appVersion?f:La(f))},dispose:a,back:()=>Gn.trigger()}))}function d(){o||t(void 0)}}),await Je.promise)}function La(e){if(!["autoPlay","readerStyle","direction","autoNextSeconds","defaultSpeed","defaultGap","hideControlsEvent","progressSize","pinchToZoom","tapZone"].some(p=>p in e))return e;const{autoPlay:n,readerStyle:o,direction:i,autoNextSeconds:r,defaultSpeed:s,defaultGap:l,hideControlsEvent:a,progressSize:u,pinchToZoom:c,tapZone:d,...f}=e;return{...f,defaultPreferences:{autoPlay:n,readerStyle:o,direction:i,autoNextSeconds:r,speed:s,gap:l,hideControlsEvent:a,progressSize:u,pinchToZoom:c,tapZone:d}}}async function zm(){if(window.customElements.get(mn))return;const e=document.createElement("style"),t=Om;e.appendChild(document.createTextNode(t)),document.head.appendChild(e);const n=dd({styles:[await Dm()],data:()=>({readerData:Je.data}),render(){return tl(ja,this.readerData)}});window.customElements.define(mn,n)}async function Dm(){const e=Object.assign({"./App.vue":bm,"./GearSecond.vue":Kg,"./GearThird.vue":fm,"./components/AutoNext.vue":vf,"./components/ButtonWebFullScreen.vue":pp,"./components/ChapterNav.vue":Bp,"./components/DefaultPreferencesForm.vue":wh,"./components/DirectionToast.vue":Ph,"./components/GearControlsLayout.vue":Ih,"./components/GearLayout.vue":Bh,"./components/GearThirdControlsLayout.vue":nm,"./components/GesturesContainer.vue":Qh,"./components/HelpScreen.vue":Yd,"./components/MangaPreferencesForm.vue":Zh,"./components/NovelBody.vue":dm,"./components/NovelPreferencesForm.vue":gh,"./components/PageNav.vue":Yh,"./components/PauseToast.vue":Xh,"./components/ProgressBar.vue":Jh,"./components/ReaderBody.vue":ig,"./components/ReaderLayout.vue":Tm,"./components/ReaderTour.vue":Jd,"./components/SettingsBottomSheet.vue":kg,"./components/TapZonePreview.vue":Ch,"./components/base/BaseButton.vue":af,"./components/base/BottomSheet.vue":ug,"./components/base/ButtonDropdown.vue":Mp,"./components/base/ButtonIcon.vue":bf,"./components/base/ButtonOutline.vue":sh,"./components/base/DropdownMenu.vue":mp,"./components/base/InputPercentage.vue":Rp,"./components/base/InputSelect.vue":Wp,"./components/base/InputSwitcher.vue":Zp,"./components/base/LoadingIndicator.vue":Ah,"./components/base/TabBar.vue":fg,"./components/base/TableField.vue":Xp,"./components/buttons/ButtonBack.vue":Sf,"./components/buttons/ButtonEntry.vue":$f,"./components/buttons/ButtonHide.vue":Lf,"./components/buttons/ButtonPlay.vue":Uf,"./components/buttons/ButtonResetZoom.vue":Qf,"./components/buttons/ButtonSettings.vue":ip,"./components/fields/FieldContrast.vue":Gp,"./components/fields/FieldFontFamily.vue":lh,"./components/icons/IconBack.vue":_f,"./components/icons/IconBookmarkNew.vue":Of,"./components/icons/IconBookmarked.vue":Pf,"./components/icons/IconChevronLeft.vue":$p,"./components/icons/IconChevronRight.vue":jp,"./components/icons/IconClose.vue":ag,"./components/icons/IconDouble.vue":Hh,"./components/icons/IconDoubleSkip.vue":Uh,"./components/icons/IconExclamationCircle.vue":Im,"./components/icons/IconFullscreen.vue":ap,"./components/icons/IconFullscreenExit.vue":fp,"./components/icons/IconHelp.vue":mg,"./components/icons/IconLandscape.vue":th,"./components/icons/IconLoading.vue":wp,"./components/icons/IconMoreVert.vue":wg,"./components/icons/IconNext.vue":kh,"./components/icons/IconPause.vue":Rf,"./components/icons/IconPlay.vue":qf,"./components/icons/IconPlus.vue":ff,"./components/icons/IconPortrait.vue":rh,"./components/icons/IconReaderExit.vue":jf,"./components/icons/IconSettings.vue":op,"./components/icons/IconTextDecre.vue":sm,"./components/icons/IconTextIncre.vue":um,"./components/icons/IconTriangle.vue":kp,"./components/icons/IconZoom.vue":Xf}),t=[];for(const n in e){const o=e[n];t.push(o.default.styles)}return t.join("")}return $m});