gear-second 3.7.0 → 3.7.1

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 +7 -7
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1,20 +1,20 @@
1
- (function(it,me){typeof exports=="object"&&typeof module<"u"?module.exports=me():typeof define=="function"&&define.amd?define(me):(it=typeof globalThis<"u"?globalThis:it||self,it._gearSecond_=me())})(this,function(){"use strict";var M0=Object.defineProperty;var O0=(it,me,yt)=>me in it?M0(it,me,{enumerable:!0,configurable:!0,writable:!0,value:yt}):it[me]=yt;var re=(it,me,yt)=>O0(it,typeof me!="symbol"?me+"":me,yt);/**
1
+ (function(it,me){typeof exports=="object"&&typeof module<"u"?module.exports=me():typeof define=="function"&&define.amd?define(me):(it=typeof globalThis<"u"?globalThis:it||self,it._gearSecond_=me())})(this,function(){"use strict";var O0=Object.defineProperty;var $0=(it,me,yt)=>me in it?O0(it,me,{enumerable:!0,configurable:!0,writable:!0,value:yt}):it[me]=yt;var re=(it,me,yt)=>$0(it,typeof me!="symbol"?me+"":me,yt);/**
2
2
  * @vue/shared v3.5.24
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
- **/function it(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const me={},yt=[],Tt=()=>{},$r=()=>!1,lo=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),ui=e=>e.startsWith("onUpdate:"),De=Object.assign,di=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},rc=Object.prototype.hasOwnProperty,Ce=(e,t)=>rc.call(e,t),le=Array.isArray,_n=e=>Dn(e)==="[object Map]",ao=e=>Dn(e)==="[object Set]",Dr=e=>Dn(e)==="[object Date]",pe=e=>typeof e=="function",ze=e=>typeof e=="string",wt=e=>typeof e=="symbol",Pe=e=>e!==null&&typeof e=="object",zr=e=>(Pe(e)||pe(e))&&pe(e.then)&&pe(e.catch),Ar=Object.prototype.toString,Dn=e=>Ar.call(e),sc=e=>Dn(e).slice(8,-1),co=e=>Dn(e)==="[object Object]",fi=e=>ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,zn=it(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),uo=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},lc=/-\w/g,Fe=uo(e=>e.replace(lc,t=>t.slice(1).toUpperCase())),ac=/\B([A-Z])/g,Qe=uo(e=>e.replace(ac,"-$1").toLowerCase()),fo=uo(e=>e.charAt(0).toUpperCase()+e.slice(1)),pi=uo(e=>e?`on${fo(e)}`:""),et=(e,t)=>!Object.is(e,t),po=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Br=(e,t,n,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},hi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},gi=e=>{const t=ze(e)?Number(e):NaN;return isNaN(t)?e:t};let Lr;const ho=()=>Lr||(Lr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Te(e){if(le(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=ze(o)?fc(o):Te(o);if(i)for(const r in i)t[r]=i[r]}return t}else if(ze(e)||Pe(e))return e}const cc=/;(?![^(]*\))/g,uc=/:([^]+)/,dc=/\/\*[^]*?\*\//g;function fc(e){const t={};return e.replace(dc,"").split(cc).forEach(n=>{if(n){const o=n.split(uc);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function ue(e){let t="";if(ze(e))t=e;else if(le(e))for(let n=0;n<e.length;n++){const o=ue(e[n]);o&&(t+=o+" ")}else if(Pe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const pc=it("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function jr(e){return!!e||e===""}function hc(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=go(e[o],t[o]);return n}function go(e,t){if(e===t)return!0;let n=Dr(e),o=Dr(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=wt(e),o=wt(t),n||o)return e===t;if(n=le(e),o=le(t),n||o)return n&&o?hc(e,t):!1;if(n=Pe(e),o=Pe(t),n||o){if(!n||!o)return!1;const i=Object.keys(e).length,r=Object.keys(t).length;if(i!==r)return!1;for(const s in e){const l=e.hasOwnProperty(s),a=t.hasOwnProperty(s);if(l&&!a||!l&&a||!go(e[s],t[s]))return!1}}return String(e)===String(t)}function Nr(e,t){return e.findIndex(n=>go(n,t))}const Vr=e=>!!(e&&e.__v_isRef===!0),We=e=>ze(e)?e:e==null?"":le(e)||Pe(e)&&(e.toString===Ar||!pe(e.toString))?Vr(e)?We(e.value):JSON.stringify(e,Rr,2):String(e),Rr=(e,t)=>Vr(t)?Rr(e,t.value):_n(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,i],r)=>(n[mi(o,r)+" =>"]=i,n),{})}:ao(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>mi(n))}:wt(t)?mi(t):Pe(t)&&!le(t)&&!co(t)?String(t):t,mi=(e,t="")=>{var n;return wt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
5
+ **/function it(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const me={},yt=[],Tt=()=>{},Dr=()=>!1,ao=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),di=e=>e.startsWith("onUpdate:"),De=Object.assign,fi=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},sc=Object.prototype.hasOwnProperty,Ce=(e,t)=>sc.call(e,t),le=Array.isArray,Sn=e=>zn(e)==="[object Map]",co=e=>zn(e)==="[object Set]",zr=e=>zn(e)==="[object Date]",pe=e=>typeof e=="function",ze=e=>typeof e=="string",wt=e=>typeof e=="symbol",Pe=e=>e!==null&&typeof e=="object",Ar=e=>(Pe(e)||pe(e))&&pe(e.then)&&pe(e.catch),Br=Object.prototype.toString,zn=e=>Br.call(e),lc=e=>zn(e).slice(8,-1),uo=e=>zn(e)==="[object Object]",pi=e=>ze(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,An=it(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fo=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},ac=/-\w/g,Fe=fo(e=>e.replace(ac,t=>t.slice(1).toUpperCase())),cc=/\B([A-Z])/g,Qe=fo(e=>e.replace(cc,"-$1").toLowerCase()),po=fo(e=>e.charAt(0).toUpperCase()+e.slice(1)),hi=fo(e=>e?`on${po(e)}`:""),et=(e,t)=>!Object.is(e,t),ho=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},Lr=(e,t,n,o=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},gi=e=>{const t=parseFloat(e);return isNaN(t)?e:t},mi=e=>{const t=ze(e)?Number(e):NaN;return isNaN(t)?e:t};let jr;const go=()=>jr||(jr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Te(e){if(le(e)){const t={};for(let n=0;n<e.length;n++){const o=e[n],i=ze(o)?pc(o):Te(o);if(i)for(const r in i)t[r]=i[r]}return t}else if(ze(e)||Pe(e))return e}const uc=/;(?![^(]*\))/g,dc=/:([^]+)/,fc=/\/\*[^]*?\*\//g;function pc(e){const t={};return e.replace(fc,"").split(uc).forEach(n=>{if(n){const o=n.split(dc);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function ue(e){let t="";if(ze(e))t=e;else if(le(e))for(let n=0;n<e.length;n++){const o=ue(e[n]);o&&(t+=o+" ")}else if(Pe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const hc=it("itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly");function Nr(e){return!!e||e===""}function gc(e,t){if(e.length!==t.length)return!1;let n=!0;for(let o=0;n&&o<e.length;o++)n=mo(e[o],t[o]);return n}function mo(e,t){if(e===t)return!0;let n=zr(e),o=zr(t);if(n||o)return n&&o?e.getTime()===t.getTime():!1;if(n=wt(e),o=wt(t),n||o)return e===t;if(n=le(e),o=le(t),n||o)return n&&o?gc(e,t):!1;if(n=Pe(e),o=Pe(t),n||o){if(!n||!o)return!1;const i=Object.keys(e).length,r=Object.keys(t).length;if(i!==r)return!1;for(const s in e){const l=e.hasOwnProperty(s),a=t.hasOwnProperty(s);if(l&&!a||!l&&a||!mo(e[s],t[s]))return!1}}return String(e)===String(t)}function Vr(e,t){return e.findIndex(n=>mo(n,t))}const Rr=e=>!!(e&&e.__v_isRef===!0),We=e=>ze(e)?e:e==null?"":le(e)||Pe(e)&&(e.toString===Br||!pe(e.toString))?Rr(e)?We(e.value):JSON.stringify(e,Hr,2):String(e),Hr=(e,t)=>Rr(t)?Hr(e,t.value):Sn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,i],r)=>(n[vi(o,r)+" =>"]=i,n),{})}:co(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>vi(n))}:wt(t)?vi(t):Pe(t)&&!le(t)&&!uo(t)?String(t):t,vi=(e,t="")=>{var n;return wt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/**
6
6
  * @vue/reactivity v3.5.24
7
7
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
8
  * @license MIT
9
- **/let qe;class gc{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=qe,!t&&qe&&(this.index=(qe.scopes||(qe.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=qe;try{return qe=this,t()}finally{qe=n}}}on(){++this._on===1&&(this.prevScope=qe,qe=this)}off(){this._on>0&&--this._on===0&&(qe=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 vi(){return qe}function mc(e,t=!1){qe&&qe.cleanups.push(e)}let Me;const bi=new WeakSet;class Hr{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,qe&&qe.active&&qe.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,bi.has(this)&&(bi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Wr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Yr(this),qr(this);const t=Me,n=xt;Me=this,xt=!0;try{return this.fn()}finally{Ur(this),Me=t,xt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)_i(t);this.deps=this.depsTail=void 0,Yr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?bi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){xi(this)&&this.run()}get dirty(){return xi(this)}}let Fr=0,An,Bn;function Wr(e,t=!1){if(e.flags|=8,t){e.next=Bn,Bn=e;return}e.next=An,An=e}function yi(){Fr++}function wi(){if(--Fr>0)return;if(Bn){let t=Bn;for(Bn=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;An;){let t=An;for(An=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 qr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ur(e){let t,n=e.depsTail,o=n;for(;o;){const i=o.prevDep;o.version===-1?(o===n&&(n=i),_i(o),vc(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=i}e.deps=t,e.depsTail=n}function xi(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Kr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Kr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ln)||(e.globalVersion=Ln,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!xi(e))))return;e.flags|=2;const t=e.dep,n=Me,o=xt;Me=e,xt=!0;try{qr(e);const i=e.fn(e._value);(t.version===0||et(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Me=n,xt=o,Ur(e),e.flags&=-3}}function _i(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)_i(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function vc(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let xt=!0;const Zr=[];function Pt(){Zr.push(xt),xt=!1}function It(){const e=Zr.pop();xt=e===void 0?!0:e}function Yr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Me;Me=void 0;try{t()}finally{Me=n}}}let Ln=0;class bc{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 mo{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||!xt||Me===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Me)n=this.activeLink=new bc(Me,this),Me.deps?(n.prevDep=Me.depsTail,Me.depsTail.nextDep=n,Me.depsTail=n):Me.deps=Me.depsTail=n,Xr(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++,Ln++,this.notify(t)}notify(t){yi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{wi()}}}function Xr(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)Xr(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const vo=new WeakMap,ln=Symbol(""),Si=Symbol(""),jn=Symbol("");function Ue(e,t,n){if(xt&&Me){let o=vo.get(e);o||vo.set(e,o=new Map);let i=o.get(n);i||(o.set(n,i=new mo),i.map=o,i.key=n),i.track()}}function Vt(e,t,n,o,i,r){const s=vo.get(e);if(!s){Ln++;return}const l=a=>{a&&a.trigger()};if(yi(),t==="clear")s.forEach(l);else{const a=le(e),u=a&&fi(n);if(a&&n==="length"){const c=Number(o);s.forEach((d,f)=>{(f==="length"||f===jn||!wt(f)&&f>=c)&&l(d)})}else switch((n!==void 0||s.has(void 0))&&l(s.get(n)),u&&l(s.get(jn)),t){case"add":a?u&&l(s.get("length")):(l(s.get(ln)),_n(e)&&l(s.get(Si)));break;case"delete":a||(l(s.get(ln)),_n(e)&&l(s.get(Si)));break;case"set":_n(e)&&l(s.get(ln));break}}wi()}function yc(e,t){const n=vo.get(e);return n&&n.get(t)}function Sn(e){const t=_e(e);return t===e?t:(Ue(t,"iterate",jn),ut(e)?t:t.map(Ve))}function bo(e){return Ue(e=_e(e),"iterate",jn),e}const wc={__proto__:null,[Symbol.iterator](){return ki(this,Symbol.iterator,Ve)},concat(...e){return Sn(this).concat(...e.map(t=>le(t)?Sn(t):t))},entries(){return ki(this,"entries",e=>(e[1]=Ve(e[1]),e))},every(e,t){return Rt(this,"every",e,t,void 0,arguments)},filter(e,t){return Rt(this,"filter",e,t,n=>n.map(Ve),arguments)},find(e,t){return Rt(this,"find",e,t,Ve,arguments)},findIndex(e,t){return Rt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Rt(this,"findLast",e,t,Ve,arguments)},findLastIndex(e,t){return Rt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Rt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ci(this,"includes",e)},indexOf(...e){return Ci(this,"indexOf",e)},join(e){return Sn(this).join(e)},lastIndexOf(...e){return Ci(this,"lastIndexOf",e)},map(e,t){return Rt(this,"map",e,t,void 0,arguments)},pop(){return Nn(this,"pop")},push(...e){return Nn(this,"push",e)},reduce(e,...t){return Gr(this,"reduce",e,t)},reduceRight(e,...t){return Gr(this,"reduceRight",e,t)},shift(){return Nn(this,"shift")},some(e,t){return Rt(this,"some",e,t,void 0,arguments)},splice(...e){return Nn(this,"splice",e)},toReversed(){return Sn(this).toReversed()},toSorted(e){return Sn(this).toSorted(e)},toSpliced(...e){return Sn(this).toSpliced(...e)},unshift(...e){return Nn(this,"unshift",e)},values(){return ki(this,"values",Ve)}};function ki(e,t,n){const o=bo(e),i=o[t]();return o!==e&&!ut(e)&&(i._next=i.next,i.next=()=>{const r=i._next();return r.done||(r.value=n(r.value)),r}),i}const xc=Array.prototype;function Rt(e,t,n,o,i,r){const s=bo(e),l=s!==e&&!ut(e),a=s[t];if(a!==xc[t]){const d=a.apply(e,r);return l?Ve(d):d}let u=n;s!==e&&(l?u=function(d,f){return n.call(this,Ve(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 Gr(e,t,n,o){const i=bo(e);let r=n;return i!==e&&(ut(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,Ve(l),a,e)}),i[t](r,...o)}function Ci(e,t,n){const o=_e(e);Ue(o,"iterate",jn);const i=o[t](...n);return(i===-1||i===!1)&&Pi(n[0])?(n[0]=_e(n[0]),o[t](...n)):i}function Nn(e,t,n=[]){Pt(),yi();const o=_e(e)[t].apply(e,n);return wi(),It(),o}const _c=it("__proto__,__v_isRef,__isVue"),Jr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(wt));function Sc(e){wt(e)||(e=String(e));const t=_e(this);return Ue(t,"has",e),t.hasOwnProperty(e)}class Qr{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?rs:is:r?os:ns).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const s=le(t);if(!i){let a;if(s&&(a=wc[n]))return a;if(n==="hasOwnProperty")return Sc}const l=Reflect.get(t,n,Ae(t)?t:o);if((wt(n)?Jr.has(n):_c(n))||(i||Ue(t,"get",n),r))return l;if(Ae(l)){const a=s&&fi(n)?l:l.value;return i&&Pe(a)?Vn(a):a}return Pe(l)?i?Vn(l):_o(l):l}}class es extends Qr{constructor(t=!1){super(!1,t)}set(t,n,o,i){let r=t[n];if(!this._isShallow){const a=Xt(r);if(!ut(o)&&!Xt(o)&&(r=_e(r),o=_e(o)),!le(t)&&Ae(r)&&!Ae(o))return a||(r.value=o),!0}const s=le(t)&&fi(n)?Number(n)<t.length:Ce(t,n),l=Reflect.set(t,n,o,Ae(t)?t:i);return t===_e(i)&&(s?et(o,r)&&Vt(t,"set",n,o):Vt(t,"add",n,o)),l}deleteProperty(t,n){const o=Ce(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&o&&Vt(t,"delete",n,void 0),i}has(t,n){const o=Reflect.has(t,n);return(!wt(n)||!Jr.has(n))&&Ue(t,"has",n),o}ownKeys(t){return Ue(t,"iterate",le(t)?"length":ln),Reflect.ownKeys(t)}}class ts extends Qr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const kc=new es,Cc=new ts,Tc=new es(!0),Pc=new ts(!0),Ti=e=>e,yo=e=>Reflect.getPrototypeOf(e);function Ic(e,t,n){return function(...o){const i=this.__v_raw,r=_e(i),s=_n(r),l=e==="entries"||e===Symbol.iterator&&s,a=e==="keys"&&s,u=i[e](...o),c=n?Ti:t?ko:Ve;return!t&&Ue(r,"iterate",a?Si:ln),{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 wo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ec(e,t){const n={get(i){const r=this.__v_raw,s=_e(r),l=_e(i);e||(et(i,l)&&Ue(s,"get",i),Ue(s,"get",l));const{has:a}=yo(s),u=t?Ti:e?ko:Ve;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&&Ue(_e(i),"iterate",ln),i.size},has(i){const r=this.__v_raw,s=_e(r),l=_e(i);return e||(et(i,l)&&Ue(s,"has",i),Ue(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=_e(l),u=t?Ti:e?ko:Ve;return!e&&Ue(a,"iterate",ln),l.forEach((c,d)=>i.call(r,u(c),u(d),s))}};return De(n,e?{add:wo("add"),set:wo("set"),delete:wo("delete"),clear:wo("clear")}:{add(i){!t&&!ut(i)&&!Xt(i)&&(i=_e(i));const r=_e(this);return yo(r).has.call(r,i)||(r.add(i),Vt(r,"add",i,i)),this},set(i,r){!t&&!ut(r)&&!Xt(r)&&(r=_e(r));const s=_e(this),{has:l,get:a}=yo(s);let u=l.call(s,i);u||(i=_e(i),u=l.call(s,i));const c=a.call(s,i);return s.set(i,r),u?et(r,c)&&Vt(s,"set",i,r):Vt(s,"add",i,r),this},delete(i){const r=_e(this),{has:s,get:l}=yo(r);let a=s.call(r,i);a||(i=_e(i),a=s.call(r,i)),l&&l.call(r,i);const u=r.delete(i);return a&&Vt(r,"delete",i,void 0),u},clear(){const i=_e(this),r=i.size!==0,s=i.clear();return r&&Vt(i,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=Ic(i,e,t)}),n}function xo(e,t){const n=Ec(e,t);return(o,i,r)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?o:Reflect.get(Ce(n,i)&&i in o?n:o,i,r)}const Mc={get:xo(!1,!1)},Oc={get:xo(!1,!0)},$c={get:xo(!0,!1)},Dc={get:xo(!0,!0)},ns=new WeakMap,os=new WeakMap,is=new WeakMap,rs=new WeakMap;function zc(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ac(e){return e.__v_skip||!Object.isExtensible(e)?0:zc(sc(e))}function _o(e){return Xt(e)?e:So(e,!1,kc,Mc,ns)}function Bc(e){return So(e,!1,Tc,Oc,os)}function Vn(e){return So(e,!0,Cc,$c,is)}function D0(e){return So(e,!0,Pc,Dc,rs)}function So(e,t,n,o,i){if(!Pe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=Ac(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 kn(e){return Xt(e)?kn(e.__v_raw):!!(e&&e.__v_isReactive)}function Xt(e){return!!(e&&e.__v_isReadonly)}function ut(e){return!!(e&&e.__v_isShallow)}function Pi(e){return e?!!e.__v_raw:!1}function _e(e){const t=e&&e.__v_raw;return t?_e(t):e}function Lc(e){return!Ce(e,"__v_skip")&&Object.isExtensible(e)&&Br(e,"__v_skip",!0),e}const Ve=e=>Pe(e)?_o(e):e,ko=e=>Pe(e)?Vn(e):e;function Ae(e){return e?e.__v_isRef===!0:!1}function ne(e){return ss(e,!1)}function dt(e){return ss(e,!0)}function ss(e,t){return Ae(e)?e:new jc(e,t)}class jc{constructor(t,n){this.dep=new mo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:_e(t),this._value=n?t:Ve(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||ut(t)||Xt(t);t=o?t:_e(t),et(t,n)&&(this._rawValue=t,this._value=o?t:Ve(t),this.dep.trigger())}}function U(e){return Ae(e)?e.value:e}function ft(e){return pe(e)?e():U(e)}const Nc={get:(e,t,n)=>t==="__v_raw"?e:U(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return Ae(i)&&!Ae(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function ls(e){return kn(e)?e:new Proxy(e,Nc)}class Vc{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new mo,{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 as(e){return new Vc(e)}class Rc{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 yc(_e(this._object),this._key)}}class Hc{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 Fc(e,t,n){return Ae(e)?e:pe(e)?new Hc(e):Pe(e)&&arguments.length>1?Wc(e,t,n):ne(e)}function Wc(e,t,n){const o=e[t];return Ae(o)?o:new Rc(e,t,n)}class qc{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new mo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ln-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 Wr(this,!0),!0}get value(){const t=this.dep.track();return Kr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Uc(e,t,n=!1){let o,i;return pe(e)?o=e:(o=e.get,i=e.set),new qc(o,i,n)}const Co={},To=new WeakMap;let an;function Kc(e,t=!1,n=an){if(n){let o=To.get(n);o||To.set(n,o=[]),o.push(e)}}function Zc(e,t,n=me){const{immediate:o,deep:i,once:r,scheduler:s,augmentJob:l,call:a}=n,u=k=>i?k:ut(k)||i===!1||i===0?Ht(k,1):Ht(k);let c,d,f,p,w=!1,g=!1;if(Ae(e)?(d=()=>e.value,w=ut(e)):kn(e)?(d=()=>u(e),w=!0):le(e)?(g=!0,w=e.some(k=>kn(k)||ut(k)),d=()=>e.map(k=>{if(Ae(k))return k.value;if(kn(k))return u(k);if(pe(k))return a?a(k,2):k()})):pe(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){Pt();try{f()}finally{It()}}const k=an;an=c;try{return a?a(e,3,[p]):e(p)}finally{an=k}}:d=Tt,t&&i){const k=d,m=i===!0?1/0:i;d=()=>Ht(k(),m)}const O=vi(),S=()=>{c.stop(),O&&O.active&&di(O.effects,c)};if(r&&t){const k=t;t=(...m)=>{k(...m),S()}}let A=g?new Array(e.length).fill(Co):Co;const F=k=>{if(!(!(c.flags&1)||!c.dirty&&!k))if(t){const m=c.run();if(i||w||(g?m.some((P,C)=>et(P,A[C])):et(m,A))){f&&f();const P=an;an=c;try{const C=[m,A===Co?void 0:g&&A[0]===Co?[]:A,p];A=m,a?a(t,3,C):t(...C)}finally{an=P}}}else c.run()};return l&&l(F),c=new Hr(d),c.scheduler=s?()=>s(F,!1):F,p=k=>Kc(k,!1,c),f=c.onStop=()=>{const k=To.get(c);if(k){if(a)a(k,4);else for(const m of k)m();To.delete(c)}},t?o?F(!0):A=c.run():s?s(F.bind(null,!0),!0):c.run(),S.pause=c.pause.bind(c),S.resume=c.resume.bind(c),S.stop=S,S}function Ht(e,t=1/0,n){if(t<=0||!Pe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ae(e))Ht(e.value,t,n);else if(le(e))for(let o=0;o<e.length;o++)Ht(e[o],t,n);else if(ao(e)||_n(e))e.forEach(o=>{Ht(o,t,n)});else if(co(e)){for(const o in e)Ht(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Ht(e[o],t,n)}return e}/**
9
+ **/let qe;class mc{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=qe,!t&&qe&&(this.index=(qe.scopes||(qe.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=qe;try{return qe=this,t()}finally{qe=n}}}on(){++this._on===1&&(this.prevScope=qe,qe=this)}off(){this._on>0&&--this._on===0&&(qe=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 bi(){return qe}function vc(e,t=!1){qe&&qe.cleanups.push(e)}let Me;const yi=new WeakSet;class Fr{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,qe&&qe.active&&qe.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,yi.has(this)&&(yi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||qr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Xr(this),Ur(this);const t=Me,n=xt;Me=this,xt=!0;try{return this.fn()}finally{Kr(this),Me=t,xt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Si(t);this.deps=this.depsTail=void 0,Xr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?yi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){_i(this)&&this.run()}get dirty(){return _i(this)}}let Wr=0,Bn,Ln;function qr(e,t=!1){if(e.flags|=8,t){e.next=Ln,Ln=e;return}e.next=Bn,Bn=e}function wi(){Wr++}function xi(){if(--Wr>0)return;if(Ln){let t=Ln;for(Ln=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Bn;){let t=Bn;for(Bn=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 Ur(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Kr(e){let t,n=e.depsTail,o=n;for(;o;){const i=o.prevDep;o.version===-1?(o===n&&(n=i),Si(o),bc(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=i}e.deps=t,e.depsTail=n}function _i(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Zr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Zr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===jn)||(e.globalVersion=jn,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!_i(e))))return;e.flags|=2;const t=e.dep,n=Me,o=xt;Me=e,xt=!0;try{Ur(e);const i=e.fn(e._value);(t.version===0||et(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Me=n,xt=o,Kr(e),e.flags&=-3}}function Si(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)Si(r,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function bc(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let xt=!0;const Yr=[];function Pt(){Yr.push(xt),xt=!1}function It(){const e=Yr.pop();xt=e===void 0?!0:e}function Xr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Me;Me=void 0;try{t()}finally{Me=n}}}let jn=0;class yc{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 vo{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||!xt||Me===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Me)n=this.activeLink=new yc(Me,this),Me.deps?(n.prevDep=Me.depsTail,Me.depsTail.nextDep=n,Me.depsTail=n):Me.deps=Me.depsTail=n,Gr(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++,jn++,this.notify(t)}notify(t){wi();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{xi()}}}function Gr(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)Gr(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const bo=new WeakMap,an=Symbol(""),ki=Symbol(""),Nn=Symbol("");function Ue(e,t,n){if(xt&&Me){let o=bo.get(e);o||bo.set(e,o=new Map);let i=o.get(n);i||(o.set(n,i=new vo),i.map=o,i.key=n),i.track()}}function Rt(e,t,n,o,i,r){const s=bo.get(e);if(!s){jn++;return}const l=a=>{a&&a.trigger()};if(wi(),t==="clear")s.forEach(l);else{const a=le(e),u=a&&pi(n);if(a&&n==="length"){const c=Number(o);s.forEach((d,f)=>{(f==="length"||f===Nn||!wt(f)&&f>=c)&&l(d)})}else switch((n!==void 0||s.has(void 0))&&l(s.get(n)),u&&l(s.get(Nn)),t){case"add":a?u&&l(s.get("length")):(l(s.get(an)),Sn(e)&&l(s.get(ki)));break;case"delete":a||(l(s.get(an)),Sn(e)&&l(s.get(ki)));break;case"set":Sn(e)&&l(s.get(an));break}}xi()}function wc(e,t){const n=bo.get(e);return n&&n.get(t)}function kn(e){const t=_e(e);return t===e?t:(Ue(t,"iterate",Nn),ut(e)?t:t.map(Ve))}function yo(e){return Ue(e=_e(e),"iterate",Nn),e}const xc={__proto__:null,[Symbol.iterator](){return Ci(this,Symbol.iterator,Ve)},concat(...e){return kn(this).concat(...e.map(t=>le(t)?kn(t):t))},entries(){return Ci(this,"entries",e=>(e[1]=Ve(e[1]),e))},every(e,t){return Ht(this,"every",e,t,void 0,arguments)},filter(e,t){return Ht(this,"filter",e,t,n=>n.map(Ve),arguments)},find(e,t){return Ht(this,"find",e,t,Ve,arguments)},findIndex(e,t){return Ht(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ht(this,"findLast",e,t,Ve,arguments)},findLastIndex(e,t){return Ht(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ht(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ti(this,"includes",e)},indexOf(...e){return Ti(this,"indexOf",e)},join(e){return kn(this).join(e)},lastIndexOf(...e){return Ti(this,"lastIndexOf",e)},map(e,t){return Ht(this,"map",e,t,void 0,arguments)},pop(){return Vn(this,"pop")},push(...e){return Vn(this,"push",e)},reduce(e,...t){return Jr(this,"reduce",e,t)},reduceRight(e,...t){return Jr(this,"reduceRight",e,t)},shift(){return Vn(this,"shift")},some(e,t){return Ht(this,"some",e,t,void 0,arguments)},splice(...e){return Vn(this,"splice",e)},toReversed(){return kn(this).toReversed()},toSorted(e){return kn(this).toSorted(e)},toSpliced(...e){return kn(this).toSpliced(...e)},unshift(...e){return Vn(this,"unshift",e)},values(){return Ci(this,"values",Ve)}};function Ci(e,t,n){const o=yo(e),i=o[t]();return o!==e&&!ut(e)&&(i._next=i.next,i.next=()=>{const r=i._next();return r.done||(r.value=n(r.value)),r}),i}const _c=Array.prototype;function Ht(e,t,n,o,i,r){const s=yo(e),l=s!==e&&!ut(e),a=s[t];if(a!==_c[t]){const d=a.apply(e,r);return l?Ve(d):d}let u=n;s!==e&&(l?u=function(d,f){return n.call(this,Ve(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 Jr(e,t,n,o){const i=yo(e);let r=n;return i!==e&&(ut(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,Ve(l),a,e)}),i[t](r,...o)}function Ti(e,t,n){const o=_e(e);Ue(o,"iterate",Nn);const i=o[t](...n);return(i===-1||i===!1)&&Ii(n[0])?(n[0]=_e(n[0]),o[t](...n)):i}function Vn(e,t,n=[]){Pt(),wi();const o=_e(e)[t].apply(e,n);return xi(),It(),o}const Sc=it("__proto__,__v_isRef,__isVue"),Qr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(wt));function kc(e){wt(e)||(e=String(e));const t=_e(this);return Ue(t,"has",e),t.hasOwnProperty(e)}class es{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?ss:rs:r?is:os).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const s=le(t);if(!i){let a;if(s&&(a=xc[n]))return a;if(n==="hasOwnProperty")return kc}const l=Reflect.get(t,n,Ae(t)?t:o);if((wt(n)?Qr.has(n):Sc(n))||(i||Ue(t,"get",n),r))return l;if(Ae(l)){const a=s&&pi(n)?l:l.value;return i&&Pe(a)?Rn(a):a}return Pe(l)?i?Rn(l):So(l):l}}class ts extends es{constructor(t=!1){super(!1,t)}set(t,n,o,i){let r=t[n];if(!this._isShallow){const a=Gt(r);if(!ut(o)&&!Gt(o)&&(r=_e(r),o=_e(o)),!le(t)&&Ae(r)&&!Ae(o))return a||(r.value=o),!0}const s=le(t)&&pi(n)?Number(n)<t.length:Ce(t,n),l=Reflect.set(t,n,o,Ae(t)?t:i);return t===_e(i)&&(s?et(o,r)&&Rt(t,"set",n,o):Rt(t,"add",n,o)),l}deleteProperty(t,n){const o=Ce(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&o&&Rt(t,"delete",n,void 0),i}has(t,n){const o=Reflect.has(t,n);return(!wt(n)||!Qr.has(n))&&Ue(t,"has",n),o}ownKeys(t){return Ue(t,"iterate",le(t)?"length":an),Reflect.ownKeys(t)}}class ns extends es{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const Cc=new ts,Tc=new ns,Pc=new ts(!0),Ic=new ns(!0),Pi=e=>e,wo=e=>Reflect.getPrototypeOf(e);function Ec(e,t,n){return function(...o){const i=this.__v_raw,r=_e(i),s=Sn(r),l=e==="entries"||e===Symbol.iterator&&s,a=e==="keys"&&s,u=i[e](...o),c=n?Pi:t?Co:Ve;return!t&&Ue(r,"iterate",a?ki:an),{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 xo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Mc(e,t){const n={get(i){const r=this.__v_raw,s=_e(r),l=_e(i);e||(et(i,l)&&Ue(s,"get",i),Ue(s,"get",l));const{has:a}=wo(s),u=t?Pi:e?Co:Ve;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&&Ue(_e(i),"iterate",an),i.size},has(i){const r=this.__v_raw,s=_e(r),l=_e(i);return e||(et(i,l)&&Ue(s,"has",i),Ue(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=_e(l),u=t?Pi:e?Co:Ve;return!e&&Ue(a,"iterate",an),l.forEach((c,d)=>i.call(r,u(c),u(d),s))}};return De(n,e?{add:xo("add"),set:xo("set"),delete:xo("delete"),clear:xo("clear")}:{add(i){!t&&!ut(i)&&!Gt(i)&&(i=_e(i));const r=_e(this);return wo(r).has.call(r,i)||(r.add(i),Rt(r,"add",i,i)),this},set(i,r){!t&&!ut(r)&&!Gt(r)&&(r=_e(r));const s=_e(this),{has:l,get:a}=wo(s);let u=l.call(s,i);u||(i=_e(i),u=l.call(s,i));const c=a.call(s,i);return s.set(i,r),u?et(r,c)&&Rt(s,"set",i,r):Rt(s,"add",i,r),this},delete(i){const r=_e(this),{has:s,get:l}=wo(r);let a=s.call(r,i);a||(i=_e(i),a=s.call(r,i)),l&&l.call(r,i);const u=r.delete(i);return a&&Rt(r,"delete",i,void 0),u},clear(){const i=_e(this),r=i.size!==0,s=i.clear();return r&&Rt(i,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=Ec(i,e,t)}),n}function _o(e,t){const n=Mc(e,t);return(o,i,r)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?o:Reflect.get(Ce(n,i)&&i in o?n:o,i,r)}const Oc={get:_o(!1,!1)},$c={get:_o(!1,!0)},Dc={get:_o(!0,!1)},zc={get:_o(!0,!0)},os=new WeakMap,is=new WeakMap,rs=new WeakMap,ss=new WeakMap;function Ac(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Bc(e){return e.__v_skip||!Object.isExtensible(e)?0:Ac(lc(e))}function So(e){return Gt(e)?e:ko(e,!1,Cc,Oc,os)}function Lc(e){return ko(e,!1,Pc,$c,is)}function Rn(e){return ko(e,!0,Tc,Dc,rs)}function z0(e){return ko(e,!0,Ic,zc,ss)}function ko(e,t,n,o,i){if(!Pe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=Bc(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 Cn(e){return Gt(e)?Cn(e.__v_raw):!!(e&&e.__v_isReactive)}function Gt(e){return!!(e&&e.__v_isReadonly)}function ut(e){return!!(e&&e.__v_isShallow)}function Ii(e){return e?!!e.__v_raw:!1}function _e(e){const t=e&&e.__v_raw;return t?_e(t):e}function jc(e){return!Ce(e,"__v_skip")&&Object.isExtensible(e)&&Lr(e,"__v_skip",!0),e}const Ve=e=>Pe(e)?So(e):e,Co=e=>Pe(e)?Rn(e):e;function Ae(e){return e?e.__v_isRef===!0:!1}function ne(e){return ls(e,!1)}function dt(e){return ls(e,!0)}function ls(e,t){return Ae(e)?e:new Nc(e,t)}class Nc{constructor(t,n){this.dep=new vo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:_e(t),this._value=n?t:Ve(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||ut(t)||Gt(t);t=o?t:_e(t),et(t,n)&&(this._rawValue=t,this._value=o?t:Ve(t),this.dep.trigger())}}function U(e){return Ae(e)?e.value:e}function ft(e){return pe(e)?e():U(e)}const Vc={get:(e,t,n)=>t==="__v_raw"?e:U(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return Ae(i)&&!Ae(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function as(e){return Cn(e)?e:new Proxy(e,Vc)}class Rc{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new vo,{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 cs(e){return new Rc(e)}class Hc{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 wc(_e(this._object),this._key)}}class Fc{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 Wc(e,t,n){return Ae(e)?e:pe(e)?new Fc(e):Pe(e)&&arguments.length>1?qc(e,t,n):ne(e)}function qc(e,t,n){const o=e[t];return Ae(o)?o:new Hc(e,t,n)}class Uc{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new vo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=jn-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 qr(this,!0),!0}get value(){const t=this.dep.track();return Zr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Kc(e,t,n=!1){let o,i;return pe(e)?o=e:(o=e.get,i=e.set),new Uc(o,i,n)}const To={},Po=new WeakMap;let cn;function Zc(e,t=!1,n=cn){if(n){let o=Po.get(n);o||Po.set(n,o=[]),o.push(e)}}function Yc(e,t,n=me){const{immediate:o,deep:i,once:r,scheduler:s,augmentJob:l,call:a}=n,u=k=>i?k:ut(k)||i===!1||i===0?Ft(k,1):Ft(k);let c,d,f,p,w=!1,g=!1;if(Ae(e)?(d=()=>e.value,w=ut(e)):Cn(e)?(d=()=>u(e),w=!0):le(e)?(g=!0,w=e.some(k=>Cn(k)||ut(k)),d=()=>e.map(k=>{if(Ae(k))return k.value;if(Cn(k))return u(k);if(pe(k))return a?a(k,2):k()})):pe(e)?t?d=a?()=>a(e,2):e:d=()=>{if(f){Pt();try{f()}finally{It()}}const k=cn;cn=c;try{return a?a(e,3,[p]):e(p)}finally{cn=k}}:d=Tt,t&&i){const k=d,m=i===!0?1/0:i;d=()=>Ft(k(),m)}const O=bi(),S=()=>{c.stop(),O&&O.active&&fi(O.effects,c)};if(r&&t){const k=t;t=(...m)=>{k(...m),S()}}let A=g?new Array(e.length).fill(To):To;const F=k=>{if(!(!(c.flags&1)||!c.dirty&&!k))if(t){const m=c.run();if(i||w||(g?m.some((P,C)=>et(P,A[C])):et(m,A))){f&&f();const P=cn;cn=c;try{const C=[m,A===To?void 0:g&&A[0]===To?[]:A,p];A=m,a?a(t,3,C):t(...C)}finally{cn=P}}}else c.run()};return l&&l(F),c=new Fr(d),c.scheduler=s?()=>s(F,!1):F,p=k=>Zc(k,!1,c),f=c.onStop=()=>{const k=Po.get(c);if(k){if(a)a(k,4);else for(const m of k)m();Po.delete(c)}},t?o?F(!0):A=c.run():s?s(F.bind(null,!0),!0):c.run(),S.pause=c.pause.bind(c),S.resume=c.resume.bind(c),S.stop=S,S}function Ft(e,t=1/0,n){if(t<=0||!Pe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,Ae(e))Ft(e.value,t,n);else if(le(e))for(let o=0;o<e.length;o++)Ft(e[o],t,n);else if(co(e)||Sn(e))e.forEach(o=>{Ft(o,t,n)});else if(uo(e)){for(const o in e)Ft(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Ft(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 Rn=[];let Ii=!1;function z0(e,...t){if(Ii)return;Ii=!0,Pt();const n=Rn.length?Rn[Rn.length-1].component:null,o=n&&n.appContext.config.warnHandler,i=Yc();if(o)Cn(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 <${ul(n,r.type)}>`).join(`
13
+ **/const Hn=[];let Ei=!1;function A0(e,...t){if(Ei)return;Ei=!0,Pt();const n=Hn.length?Hn[Hn.length-1].component:null,o=n&&n.appContext.config.warnHandler,i=Xc();if(o)Tn(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 <${dl(n,r.type)}>`).join(`
14
14
  `),i]);else{const r=[`[Vue warn]: ${e}`,...t];i.length&&r.push(`
15
- `,...Xc(i)),console.warn(...r)}It(),Ii=!1}function Yc(){let e=Rn[Rn.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 Xc(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
16
- `],...Gc(n))}),t}function Gc({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,i=` at <${ul(e.component,e.type,o)}`,r=">"+n;return e.props?[i,...Jc(e.props),r]:[i+r]}function Jc(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...cs(o,e[o]))}),n.length>3&&t.push(" ..."),t}function cs(e,t,n){return ze(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Ae(t)?(t=cs(e,_e(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):pe(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=_e(t),n?t:[`${e}=`,t])}function Cn(e,t,n,o){try{return o?e(...o):e()}catch(i){Po(i,t,n)}}function _t(e,t,n,o){if(pe(e)){const i=Cn(e,t,n,o);return i&&zr(i)&&i.catch(r=>{Po(r,t,n)}),i}if(le(e)){const i=[];for(let r=0;r<e.length;r++)i.push(_t(e[r],t,n,o));return i}}function Po(e,t,n,o=!0){const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||me;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){Pt(),Cn(r,null,10,[e,a,u]),It();return}}Qc(e,n,i,o,s)}function Qc(e,t,n,o=!0,i=!1){if(i)throw e;console.error(e)}const Ye=[];let Et=-1;const Tn=[];let Gt=null,Pn=0;const us=Promise.resolve();let Io=null;function pt(e){const t=Io||us;return e?t.then(this?e.bind(this):e):t}function eu(e){let t=Et+1,n=Ye.length;for(;t<n;){const o=t+n>>>1,i=Ye[o],r=Hn(i);r<e||r===e&&i.flags&2?t=o+1:n=o}return t}function Ei(e){if(!(e.flags&1)){const t=Hn(e),n=Ye[Ye.length-1];!n||!(e.flags&2)&&t>=Hn(n)?Ye.push(e):Ye.splice(eu(t),0,e),e.flags|=1,ds()}}function ds(){Io||(Io=us.then(hs))}function tu(e){le(e)?Tn.push(...e):Gt&&e.id===-1?Gt.splice(Pn+1,0,e):e.flags&1||(Tn.push(e),e.flags|=1),ds()}function fs(e,t,n=Et+1){for(;n<Ye.length;n++){const o=Ye[n];if(o&&o.flags&2){if(e&&o.id!==e.uid)continue;Ye.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function ps(e){if(Tn.length){const t=[...new Set(Tn)].sort((n,o)=>Hn(n)-Hn(o));if(Tn.length=0,Gt){Gt.push(...t);return}for(Gt=t,Pn=0;Pn<Gt.length;Pn++){const n=Gt[Pn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Gt=null,Pn=0}}const Hn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function hs(e){try{for(Et=0;Et<Ye.length;Et++){const t=Ye[Et];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Cn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Et<Ye.length;Et++){const t=Ye[Et];t&&(t.flags&=-2)}Et=-1,Ye.length=0,ps(),Io=null,(Ye.length||Tn.length)&&hs()}}let Re=null,gs=null;function Eo(e){const t=Re;return Re=e,gs=e&&e.type.__scopeId||null,t}function ie(e,t=Re,n){if(!t||e._n)return e;const o=(...i)=>{o._d&&Vo(-1);const r=Eo(t);let s;try{s=e(...i)}finally{Eo(r),o._d&&Vo(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function He(e,t){if(Re===null)return e;const n=Fo(Re),o=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[r,s,l,a=me]=t[i];r&&(pe(r)&&(r={mounted:r,updated:r}),r.deep&&Ht(s),o.push({dir:r,instance:n,value:s,oldValue:void 0,arg:l,modifiers:a}))}return e}function cn(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&&(Pt(),_t(a,n,8,[e.el,l,e,t]),It())}}const nu=Symbol("_vte"),ms=e=>e.__isTeleport,Ft=Symbol("_leaveCb"),Mo=Symbol("_enterCb");function ou(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return je(()=>{e.isMounted=!0}),$i(()=>{e.isUnmounting=!0}),e}const ht=[Function,Array],vs={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ht,onEnter:ht,onAfterEnter:ht,onEnterCancelled:ht,onBeforeLeave:ht,onLeave:ht,onAfterLeave:ht,onLeaveCancelled:ht,onBeforeAppear:ht,onAppear:ht,onAfterAppear:ht,onAppearCancelled:ht},bs=e=>{const t=e.subTree;return t.component?bs(t.component):t},iu={name:"BaseTransition",props:vs,setup(e,{slots:t}){const n=pn(),o=ou();return()=>{const i=t.default&&_s(t.default(),!0);if(!i||!i.length)return;const r=ys(i),s=_e(e),{mode:l}=s;if(o.isLeaving)return Oi(r);const a=xs(r);if(!a)return Oi(r);let u=Mi(a,s,o,n,d=>u=d);a.type!==Ke&&Fn(a,u);let c=n.subTree&&xs(n.subTree);if(c&&c.type!==Ke&&!fn(c,a)&&bs(n).type!==Ke){let d=Mi(c,s,o,n);if(Fn(c,d),l==="out-in"&&a.type!==Ke)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},Oi(r);l==="in-out"&&a.type!==Ke?d.delayLeave=(f,p,w)=>{const g=ws(o,c);g[String(c.key)]=c,f[Ft]=()=>{p(),f[Ft]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{w(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return r}}};function ys(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ke){t=n;break}}return t}const ru=iu;function ws(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 Mi(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:w,onLeaveCancelled:g,onBeforeAppear:O,onAppear:S,onAfterAppear:A,onAppearCancelled:F}=t,k=String(e.key),m=ws(n,e),P=(y,I)=>{y&&_t(y,o,9,I)},C=(y,I)=>{const W=I[1];P(y,I),le(y)?y.every(L=>L.length<=1)&&W():y.length<=1&&W()},B={mode:s,persisted:l,beforeEnter(y){let I=a;if(!n.isMounted)if(r)I=O||a;else return;y[Ft]&&y[Ft](!0);const W=m[k];W&&fn(e,W)&&W.el[Ft]&&W.el[Ft](),P(I,[y])},enter(y){let I=u,W=c,L=d;if(!n.isMounted)if(r)I=S||u,W=A||c,L=F||d;else return;let Y=!1;const $=y[Mo]=X=>{Y||(Y=!0,X?P(L,[y]):P(W,[y]),B.delayedLeave&&B.delayedLeave(),y[Mo]=void 0)};I?C(I,[y,$]):$()},leave(y,I){const W=String(e.key);if(y[Mo]&&y[Mo](!0),n.isUnmounting)return I();P(f,[y]);let L=!1;const Y=y[Ft]=$=>{L||(L=!0,I(),$?P(g,[y]):P(w,[y]),y[Ft]=void 0,m[W]===e&&delete m[W])};m[W]=e,p?C(p,[y,Y]):Y()},clone(y){const I=Mi(y,t,n,o,i);return i&&i(I),I}};return B}function Oi(e){if($o(e))return e=Qt(e),e.children=null,e}function xs(e){if(!$o(e))return ms(e.type)&&e.children?ys(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&&pe(n.default))return n.default()}}function Fn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Fn(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 _s(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===we?(s.patchFlag&128&&i++,o=o.concat(_s(s.children,t,l))):(t||s.type!==Ke)&&o.push(l!=null?Qt(s,{key:l}):s)}if(i>1)for(let r=0;r<o.length;r++)o[r].patchFlag=-2;return o}function he(e,t){return pe(e)?De({name:e.name},t,{setup:e}):e}function Ss(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const Oo=new WeakMap;function Wn(e,t,n,o,i=!1){if(le(e)){e.forEach((w,g)=>Wn(w,t&&(le(t)?t[g]:t),n,o,i));return}if(In(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&Wn(e,t,n,o.component.subTree);return}const r=o.shapeFlag&4?Fo(o.component):o.el,s=i?null:r,{i:l,r:a}=e,u=t&&t.r,c=l.refs===me?l.refs={}:l.refs,d=l.setupState,f=_e(d),p=d===me?$r:w=>Ce(f,w);if(u!=null&&u!==a){if(ks(t),ze(u))c[u]=null,p(u)&&(d[u]=null);else if(Ae(u)){u.value=null;const w=t;w.k&&(c[w.k]=null)}}if(pe(a))Cn(a,l,12,[s,c]);else{const w=ze(a),g=Ae(a);if(w||g){const O=()=>{if(e.f){const S=w?p(a)?d[a]:c[a]:a.value;if(i)le(S)&&di(S,r);else if(le(S))S.includes(r)||S.push(r);else if(w)c[a]=[r],p(a)&&(d[a]=c[a]);else{const A=[r];a.value=A,e.k&&(c[e.k]=A)}}else w?(c[a]=s,p(a)&&(d[a]=s)):g&&(a.value=s,e.k&&(c[e.k]=s))};if(s){const S=()=>{O(),Oo.delete(e)};S.id=-1,Oo.set(e,S),rt(S,n)}else ks(e),O()}}}function ks(e){const t=Oo.get(e);t&&(t.flags|=8,Oo.delete(e))}ho().requestIdleCallback,ho().cancelIdleCallback;const In=e=>!!e.type.__asyncLoader,$o=e=>e.type.__isKeepAlive;function su(e,t){Cs(e,"a",t)}function lu(e,t){Cs(e,"da",t)}function Cs(e,t,n=Ze){const o=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Do(t,o,n),n){let i=n.parent;for(;i&&i.parent;)$o(i.parent.vnode)&&au(o,t,n,i),i=i.parent}}function au(e,t,n,o){const i=Do(t,e,o,!0);gt(()=>{di(o[t],i)},n)}function Do(e,t,n=Ze,o=!1){if(n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{Pt();const l=Gn(n),a=_t(t,n,e,s);return l(),It(),a});return o?i.unshift(r):i.push(r),r}}const Wt=e=>(t,n=Ze)=>{(!Jn||e==="sp")&&Do(e,(...o)=>t(...o),n)},cu=Wt("bm"),je=Wt("m"),uu=Wt("bu"),du=Wt("u"),$i=Wt("bum"),gt=Wt("um"),fu=Wt("sp"),pu=Wt("rtg"),hu=Wt("rtc");function Ts(e,t=Ze){Do("ec",e,t)}const gu="components",Ps=Symbol.for("v-ndc");function Is(e){return ze(e)?mu(gu,e,!1)||e:e||Ps}function mu(e,t,n=!0,o=!1){const i=Re||Ze;if(i){const r=i.type;{const l=cl(r,!1);if(l&&(l===t||l===Fe(t)||l===fo(Fe(t))))return r}const s=Es(i[e]||r[e],t)||Es(i.appContext[e],t);return!s&&o?r:s}}function Es(e,t){return e&&(e[t]||e[Fe(t)]||e[fo(Fe(t))])}function Jt(e,t,n,o){let i;const r=n,s=le(e);if(s||ze(e)){const l=s&&kn(e);let a=!1,u=!1;l&&(a=!ut(e),u=Xt(e),e=bo(e)),i=new Array(e.length);for(let c=0,d=e.length;c<d;c++)i[c]=t(a?u?ko(Ve(e[c])):Ve(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(Pe(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 Di(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(le(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 ke(e,t,n={},o,i){if(Re.ce||Re.parent&&In(Re.parent)&&Re.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),b(),se(we,null,[N("slot",n,o&&o())],u?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),b();const s=r&&Ms(r(n)),l=n.key||s&&s.key,a=se(we,{key:(l&&!wt(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 Ms(e){return e.some(t=>Xn(t)?!(t.type===Ke||t.type===we&&!Ms(t.children)):!0)?e:null}const zi=e=>e?sl(e)?Fo(e):zi(e.parent):null,qn=De(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=>zi(e.parent),$root:e=>zi(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ds(e),$forceUpdate:e=>e.f||(e.f=()=>{Ei(e.update)}),$nextTick:e=>e.n||(e.n=pt.bind(e.proxy)),$watch:e=>ju.bind(e)}),Ai=(e,t)=>e!==me&&!e.__isScriptSetup&&Ce(e,t),vu={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(Ai(o,t))return s[t]=1,o[t];if(i!==me&&Ce(i,t))return s[t]=2,i[t];if((u=e.propsOptions[0])&&Ce(u,t))return s[t]=3,r[t];if(n!==me&&Ce(n,t))return s[t]=4,n[t];Bi&&(s[t]=0)}}const c=qn[t];let d,f;if(c)return t==="$attrs"&&Ue(e.attrs,"get",""),c(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==me&&Ce(n,t))return s[t]=4,n[t];if(f=a.config.globalProperties,Ce(f,t))return f[t]},set({_:e},t,n){const{data:o,setupState:i,ctx:r}=e;return Ai(i,t)?(i[t]=n,!0):o!==me&&Ce(o,t)?(o[t]=n,!0):Ce(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!==me&&l[0]!=="$"&&Ce(e,l)||Ai(t,l)||(a=r[0])&&Ce(a,l)||Ce(o,l)||Ce(qn,l)||Ce(i.config.globalProperties,l)||(u=s.__cssModules)&&u[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ce(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function zo(e){return le(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Xe(e,t){return!e||!t?e||t:le(e)&&le(t)?e.concat(t):De({},zo(e),zo(t))}let Bi=!0;function bu(e){const t=Ds(e),n=e.proxy,o=e.ctx;Bi=!1,t.beforeCreate&&Os(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:w,activated:g,deactivated:O,beforeDestroy:S,beforeUnmount:A,destroyed:F,unmounted:k,render:m,renderTracked:P,renderTriggered:C,errorCaptured:B,serverPrefetch:y,expose:I,inheritAttrs:W,components:L,directives:Y,filters:$}=t;if(u&&yu(u,o,null),s)for(const T in s){const x=s[T];pe(x)&&(o[T]=x.bind(n))}if(i){const T=i.call(n,n);Pe(T)&&(e.data=_o(T))}if(Bi=!0,r)for(const T in r){const x=r[T],q=pe(x)?x.bind(n,n):pe(x.get)?x.get.bind(n,n):Tt,oe=!pe(x)&&pe(x.set)?x.set.bind(n):Tt,Z=Q({get:q,set:oe});Object.defineProperty(o,T,{enumerable:!0,configurable:!0,get:()=>Z.value,set:j=>Z.value=j})}if(l)for(const T in l)$s(l[T],o,n,T);if(a){const T=pe(a)?a.call(n):a;Reflect.ownKeys(T).forEach(x=>{Kn(x,T[x])})}c&&Os(c,e,"c");function J(T,x){le(x)?x.forEach(q=>T(q.bind(n))):x&&T(x.bind(n))}if(J(cu,d),J(je,f),J(uu,p),J(du,w),J(su,g),J(lu,O),J(Ts,B),J(hu,P),J(pu,C),J($i,A),J(gt,k),J(fu,y),le(I))if(I.length){const T=e.exposed||(e.exposed={});I.forEach(x=>{Object.defineProperty(T,x,{get:()=>n[x],set:q=>n[x]=q,enumerable:!0})})}else e.exposed||(e.exposed={});m&&e.render===Tt&&(e.render=m),W!=null&&(e.inheritAttrs=W),L&&(e.components=L),Y&&(e.directives=Y),y&&Ss(e)}function yu(e,t,n=Tt){le(e)&&(e=Li(e));for(const o in e){const i=e[o];let r;Pe(i)?"default"in i?r=qt(i.from||o,i.default,!0):r=qt(i.from||o):r=qt(i),Ae(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):t[o]=r}}function Os(e,t,n){_t(le(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function $s(e,t,n,o){let i=o.includes(".")?Gs(n,o):()=>n[o];if(ze(e)){const r=t[e];pe(r)&&de(i,r)}else if(pe(e))de(i,e.bind(n));else if(Pe(e))if(le(e))e.forEach(r=>$s(r,t,n,o));else{const r=pe(e.handler)?e.handler.bind(n):t[e.handler];pe(r)&&de(i,r,e)}}function Ds(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=>Ao(a,u,s,!0)),Ao(a,t,s)),Pe(t)&&r.set(t,a),a}function Ao(e,t,n,o=!1){const{mixins:i,extends:r}=t;r&&Ao(e,r,n,!0),i&&i.forEach(s=>Ao(e,s,n,!0));for(const s in t)if(!(o&&s==="expose")){const l=wu[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const wu={data:zs,props:As,emits:As,methods:Un,computed:Un,beforeCreate:Ge,created:Ge,beforeMount:Ge,mounted:Ge,beforeUpdate:Ge,updated:Ge,beforeDestroy:Ge,beforeUnmount:Ge,destroyed:Ge,unmounted:Ge,activated:Ge,deactivated:Ge,errorCaptured:Ge,serverPrefetch:Ge,components:Un,directives:Un,watch:_u,provide:zs,inject:xu};function zs(e,t){return t?e?function(){return De(pe(e)?e.call(this,this):e,pe(t)?t.call(this,this):t)}:t:e}function xu(e,t){return Un(Li(e),Li(t))}function Li(e){if(le(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ge(e,t){return e?[...new Set([].concat(e,t))]:t}function Un(e,t){return e?De(Object.create(null),e,t):t}function As(e,t){return e?le(e)&&le(t)?[...new Set([...e,...t])]:De(Object.create(null),zo(e),zo(t??{})):t}function _u(e,t){if(!e)return t;if(!t)return e;const n=De(Object.create(null),e);for(const o in t)n[o]=Ge(e[o],t[o]);return n}function Bs(){return{app:null,config:{isNativeTag:$r,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 Su=0;function ku(e,t){return function(o,i=null){pe(o)||(o=De({},o)),i!=null&&!Pe(i)&&(i=null);const r=Bs(),s=new WeakSet,l=[];let a=!1;const u=r.app={_uid:Su++,_component:o,_props:i,_container:null,_context:r,_instance:null,version:sd,get config(){return r.config},set config(c){},use(c,...d){return s.has(c)||(c&&pe(c.install)?(s.add(c),c.install(u,...d)):pe(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||N(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,Fo(p.component)}},onUnmount(c){l.push(c)},unmount(){a&&(_t(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=un;un=u;try{return c()}finally{un=d}}};return u}}let un=null;function Kn(e,t){if(Ze){let n=Ze.provides;const o=Ze.parent&&Ze.parent.provides;o===n&&(n=Ze.provides=Object.create(o)),n[e]=t}}function qt(e,t,n=!1){const o=pn();if(o||un){let i=un?un._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&&pe(t)?t.call(o&&o.proxy):t}}function Ls(){return!!(pn()||un)}const js={},Ns=()=>Object.create(js),Vs=e=>Object.getPrototypeOf(e)===js;function Cu(e,t,n,o=!1){const i={},r=Ns();e.propsDefaults=Object.create(null),Rs(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 Tu(e,t,n,o){const{props:i,attrs:r,vnode:{patchFlag:s}}=e,l=_e(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(Lo(e.emitsOptions,f))continue;const p=t[f];if(a)if(Ce(r,f))p!==r[f]&&(r[f]=p,u=!0);else{const w=Fe(f);i[w]=ji(a,l,w,p,e,!1)}else p!==r[f]&&(r[f]=p,u=!0)}}}else{Rs(e,t,i,r)&&(u=!0);let c;for(const d in l)(!t||!Ce(t,d)&&((c=Qe(d))===d||!Ce(t,c)))&&(a?n&&(n[d]!==void 0||n[c]!==void 0)&&(i[d]=ji(a,l,d,void 0,e,!0)):delete i[d]);if(r!==l)for(const d in r)(!t||!Ce(t,d))&&(delete r[d],u=!0)}u&&Vt(e.attrs,"set","")}function Rs(e,t,n,o){const[i,r]=e.propsOptions;let s=!1,l;if(t)for(let a in t){if(zn(a))continue;const u=t[a];let c;i&&Ce(i,c=Fe(a))?!r||!r.includes(c)?n[c]=u:(l||(l={}))[c]=u:Lo(e.emitsOptions,a)||(!(a in o)||u!==o[a])&&(o[a]=u,s=!0)}if(r){const a=_e(n),u=l||me;for(let c=0;c<r.length;c++){const d=r[c];n[d]=ji(i,a,d,u[d],e,!Ce(u,d))}}return s}function ji(e,t,n,o,i,r){const s=e[n];if(s!=null){const l=Ce(s,"default");if(l&&o===void 0){const a=s.default;if(s.type!==Function&&!s.skipFactory&&pe(a)){const{propsDefaults:u}=i;if(n in u)o=u[n];else{const c=Gn(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===Qe(n))&&(o=!0))}return o}const Pu=new WeakMap;function Hs(e,t,n=!1){const o=n?Pu:t.propsCache,i=o.get(e);if(i)return i;const r=e.props,s={},l=[];let a=!1;if(!pe(e)){const c=d=>{a=!0;const[f,p]=Hs(d,t,!0);De(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 Pe(e)&&o.set(e,yt),yt;if(le(r))for(let c=0;c<r.length;c++){const d=Fe(r[c]);Fs(d)&&(s[d]=me)}else if(r)for(const c in r){const d=Fe(c);if(Fs(d)){const f=r[c],p=s[d]=le(f)||pe(f)?{type:f}:De({},f),w=p.type;let g=!1,O=!0;if(le(w))for(let S=0;S<w.length;++S){const A=w[S],F=pe(A)&&A.name;if(F==="Boolean"){g=!0;break}else F==="String"&&(O=!1)}else g=pe(w)&&w.name==="Boolean";p[0]=g,p[1]=O,(g||Ce(p,"default"))&&l.push(d)}}const u=[s,l];return Pe(e)&&o.set(e,u),u}function Fs(e){return e[0]!=="$"&&!zn(e)}const Ni=e=>e==="_"||e==="_ctx"||e==="$stable",Vi=e=>le(e)?e.map(Mt):[Mt(e)],Iu=(e,t,n)=>{if(t._n)return t;const o=ie((...i)=>Vi(t(...i)),n);return o._c=!1,o},Ws=(e,t,n)=>{const o=e._ctx;for(const i in e){if(Ni(i))continue;const r=e[i];if(pe(r))t[i]=Iu(i,r,o);else if(r!=null){const s=Vi(r);t[i]=()=>s}}},qs=(e,t)=>{const n=Vi(t);e.slots.default=()=>n},Us=(e,t,n)=>{for(const o in t)(n||!Ni(o))&&(e[o]=t[o])},Eu=(e,t,n)=>{const o=e.slots=Ns();if(e.vnode.shapeFlag&32){const i=t._;i?(Us(o,t,n),n&&Br(o,"_",i,!0)):Ws(t,o)}else t&&qs(e,t)},Mu=(e,t,n)=>{const{vnode:o,slots:i}=e;let r=!0,s=me;if(o.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:Us(i,t,n):(r=!t.$stable,Ws(t,i)),s=t}else t&&(qs(e,t),s={default:1});if(r)for(const l in i)!Ni(l)&&s[l]==null&&delete i[l]},rt=qu;function Ou(e){return $u(e)}function $u(e,t){const n=ho();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=Tt,insertStaticContent:w}=e,g=(h,v,E,H=null,V=null,R=null,ee=void 0,M=null,_=!!v.dynamicChildren)=>{if(h===v)return;h&&!fn(h,v)&&(H=ye(h),j(h,V,R,!0),h=null),v.patchFlag===-2&&(_=!1,v.dynamicChildren=null);const{type:D,ref:G,shapeFlag:te}=v;switch(D){case jo:O(h,v,E,H);break;case Ke:S(h,v,E,H);break;case No:h==null&&A(v,E,H,ee);break;case we:L(h,v,E,H,V,R,ee,M,_);break;default:te&1?m(h,v,E,H,V,R,ee,M,_):te&6?Y(h,v,E,H,V,R,ee,M,_):(te&64||te&128)&&D.process(h,v,E,H,V,R,ee,M,_,$e)}G!=null&&V?Wn(G,h&&h.ref,R,v||h,!v):G==null&&h&&h.ref!=null&&Wn(h.ref,null,R,h,!0)},O=(h,v,E,H)=>{if(h==null)o(v.el=l(v.children),E,H);else{const V=v.el=h.el;v.children!==h.children&&u(V,v.children)}},S=(h,v,E,H)=>{h==null?o(v.el=a(v.children||""),E,H):v.el=h.el},A=(h,v,E,H)=>{[h.el,h.anchor]=w(h.children,v,E,H,h.el,h.anchor)},F=({el:h,anchor:v},E,H)=>{let V;for(;h&&h!==v;)V=f(h),o(h,E,H),h=V;o(v,E,H)},k=({el:h,anchor:v})=>{let E;for(;h&&h!==v;)E=f(h),i(h),h=E;i(v)},m=(h,v,E,H,V,R,ee,M,_)=>{if(v.type==="svg"?ee="svg":v.type==="math"&&(ee="mathml"),h==null)P(v,E,H,V,R,ee,M,_);else{const D=h.el&&h.el._isVueCE?h.el:null;try{D&&D._beginPatch(),y(h,v,V,R,ee,M,_)}finally{D&&D._endPatch()}}},P=(h,v,E,H,V,R,ee,M)=>{let _,D;const{props:G,shapeFlag:te,transition:ce,dirs:ge}=h;if(_=h.el=s(h.type,R,G&&G.is,G),te&8?c(_,h.children):te&16&&B(h.children,_,null,H,V,Ri(h,R),ee,M),ge&&cn(h,null,H,"created"),C(_,h,h.scopeId,ee,H),G){for(const Oe in G)Oe!=="value"&&!zn(Oe)&&r(_,Oe,null,G[Oe],R,H);"value"in G&&r(_,"value",null,G.value,R),(D=G.onVnodeBeforeMount)&&Ot(D,H,h)}ge&&cn(h,null,H,"beforeMount");const Se=Du(V,ce);Se&&ce.beforeEnter(_),o(_,v,E),((D=G&&G.onVnodeMounted)||Se||ge)&&rt(()=>{D&&Ot(D,H,h),Se&&ce.enter(_),ge&&cn(h,null,H,"mounted")},V)},C=(h,v,E,H,V)=>{if(E&&p(h,E),H)for(let R=0;R<H.length;R++)p(h,H[R]);if(V){let R=V.subTree;if(v===R||nl(R.type)&&(R.ssContent===v||R.ssFallback===v)){const ee=V.vnode;C(h,ee,ee.scopeId,ee.slotScopeIds,V.parent)}}},B=(h,v,E,H,V,R,ee,M,_=0)=>{for(let D=_;D<h.length;D++){const G=h[D]=M?en(h[D]):Mt(h[D]);g(null,G,v,E,H,V,R,ee,M)}},y=(h,v,E,H,V,R,ee)=>{const M=v.el=h.el;let{patchFlag:_,dynamicChildren:D,dirs:G}=v;_|=h.patchFlag&16;const te=h.props||me,ce=v.props||me;let ge;if(E&&dn(E,!1),(ge=ce.onVnodeBeforeUpdate)&&Ot(ge,E,v,h),G&&cn(v,h,E,"beforeUpdate"),E&&dn(E,!0),(te.innerHTML&&ce.innerHTML==null||te.textContent&&ce.textContent==null)&&c(M,""),D?I(h.dynamicChildren,D,M,E,H,Ri(v,V),R):ee||x(h,v,M,null,E,H,Ri(v,V),R,!1),_>0){if(_&16)W(M,te,ce,E,V);else if(_&2&&te.class!==ce.class&&r(M,"class",null,ce.class,V),_&4&&r(M,"style",te.style,ce.style,V),_&8){const Se=v.dynamicProps;for(let Oe=0;Oe<Se.length;Oe++){const Ie=Se[Oe],nt=te[Ie],ot=ce[Ie];(ot!==nt||Ie==="value")&&r(M,Ie,nt,ot,V,E)}}_&1&&h.children!==v.children&&c(M,v.children)}else!ee&&D==null&&W(M,te,ce,E,V);((ge=ce.onVnodeUpdated)||G)&&rt(()=>{ge&&Ot(ge,E,v,h),G&&cn(v,h,E,"updated")},H)},I=(h,v,E,H,V,R,ee)=>{for(let M=0;M<v.length;M++){const _=h[M],D=v[M],G=_.el&&(_.type===we||!fn(_,D)||_.shapeFlag&198)?d(_.el):E;g(_,D,G,null,H,V,R,ee,!0)}},W=(h,v,E,H,V)=>{if(v!==E){if(v!==me)for(const R in v)!zn(R)&&!(R in E)&&r(h,R,v[R],null,V,H);for(const R in E){if(zn(R))continue;const ee=E[R],M=v[R];ee!==M&&R!=="value"&&r(h,R,M,ee,V,H)}"value"in E&&r(h,"value",v.value,E.value,V)}},L=(h,v,E,H,V,R,ee,M,_)=>{const D=v.el=h?h.el:l(""),G=v.anchor=h?h.anchor:l("");let{patchFlag:te,dynamicChildren:ce,slotScopeIds:ge}=v;ge&&(M=M?M.concat(ge):ge),h==null?(o(D,E,H),o(G,E,H),B(v.children||[],E,G,V,R,ee,M,_)):te>0&&te&64&&ce&&h.dynamicChildren?(I(h.dynamicChildren,ce,E,V,R,ee,M),(v.key!=null||V&&v===V.subTree)&&Ks(h,v,!0)):x(h,v,E,G,V,R,ee,M,_)},Y=(h,v,E,H,V,R,ee,M,_)=>{v.slotScopeIds=M,h==null?v.shapeFlag&512?V.ctx.activate(v,E,H,ee,_):$(v,E,H,V,R,ee,_):X(h,v,_)},$=(h,v,E,H,V,R,ee)=>{const M=h.component=Ju(h,H,V);if($o(h)&&(M.ctx.renderer=$e),Qu(M,!1,ee),M.asyncDep){if(V&&V.registerDep(M,J,ee),!h.el){const _=M.subTree=N(Ke);S(null,_,v,E),h.placeholder=_.el}}else J(M,h,v,E,V,R,ee)},X=(h,v,E)=>{const H=v.component=h.component;if(Fu(h,v,E))if(H.asyncDep&&!H.asyncResolved){T(H,v,E);return}else H.next=v,H.update();else v.el=h.el,H.vnode=v},J=(h,v,E,H,V,R,ee)=>{const M=()=>{if(h.isMounted){let{next:te,bu:ce,u:ge,parent:Se,vnode:Oe}=h;{const jt=Zs(h);if(jt){te&&(te.el=Oe.el,T(h,te,ee)),jt.asyncDep.then(()=>{h.isUnmounted||M()});return}}let Ie=te,nt;dn(h,!1),te?(te.el=Oe.el,T(h,te,ee)):te=Oe,ce&&po(ce),(nt=te.props&&te.props.onVnodeBeforeUpdate)&&Ot(nt,Se,te,Oe),dn(h,!0);const ot=el(h),Lt=h.subTree;h.subTree=ot,g(Lt,ot,d(Lt.el),ye(Lt),h,V,R),te.el=ot.el,Ie===null&&Wu(h,ot.el),ge&&rt(ge,V),(nt=te.props&&te.props.onVnodeUpdated)&&rt(()=>Ot(nt,Se,te,Oe),V)}else{let te;const{el:ce,props:ge}=v,{bm:Se,m:Oe,parent:Ie,root:nt,type:ot}=h,Lt=In(v);dn(h,!1),Se&&po(Se),!Lt&&(te=ge&&ge.onVnodeBeforeMount)&&Ot(te,Ie,v),dn(h,!0);{nt.ce&&nt.ce._def.shadowRoot!==!1&&nt.ce._injectChildStyle(ot);const jt=h.subTree=el(h);g(null,jt,E,H,h,V,R),v.el=jt.el}if(Oe&&rt(Oe,V),!Lt&&(te=ge&&ge.onVnodeMounted)){const jt=v;rt(()=>Ot(te,Ie,jt),V)}(v.shapeFlag&256||Ie&&In(Ie.vnode)&&Ie.vnode.shapeFlag&256)&&h.a&&rt(h.a,V),h.isMounted=!0,v=E=H=null}};h.scope.on();const _=h.effect=new Hr(M);h.scope.off();const D=h.update=_.run.bind(_),G=h.job=_.runIfDirty.bind(_);G.i=h,G.id=h.uid,_.scheduler=()=>Ei(G),dn(h,!0),D()},T=(h,v,E)=>{v.component=h;const H=h.vnode.props;h.vnode=v,h.next=null,Tu(h,v.props,H,E),Mu(h,v.children,E),Pt(),fs(h),It()},x=(h,v,E,H,V,R,ee,M,_=!1)=>{const D=h&&h.children,G=h?h.shapeFlag:0,te=v.children,{patchFlag:ce,shapeFlag:ge}=v;if(ce>0){if(ce&128){oe(D,te,E,H,V,R,ee,M,_);return}else if(ce&256){q(D,te,E,H,V,R,ee,M,_);return}}ge&8?(G&16&&ve(D,V,R),te!==D&&c(E,te)):G&16?ge&16?oe(D,te,E,H,V,R,ee,M,_):ve(D,V,R,!0):(G&8&&c(E,""),ge&16&&B(te,E,H,V,R,ee,M,_))},q=(h,v,E,H,V,R,ee,M,_)=>{h=h||yt,v=v||yt;const D=h.length,G=v.length,te=Math.min(D,G);let ce;for(ce=0;ce<te;ce++){const ge=v[ce]=_?en(v[ce]):Mt(v[ce]);g(h[ce],ge,E,null,V,R,ee,M,_)}D>G?ve(h,V,R,!0,!1,te):B(v,E,H,V,R,ee,M,_,te)},oe=(h,v,E,H,V,R,ee,M,_)=>{let D=0;const G=v.length;let te=h.length-1,ce=G-1;for(;D<=te&&D<=ce;){const ge=h[D],Se=v[D]=_?en(v[D]):Mt(v[D]);if(fn(ge,Se))g(ge,Se,E,null,V,R,ee,M,_);else break;D++}for(;D<=te&&D<=ce;){const ge=h[te],Se=v[ce]=_?en(v[ce]):Mt(v[ce]);if(fn(ge,Se))g(ge,Se,E,null,V,R,ee,M,_);else break;te--,ce--}if(D>te){if(D<=ce){const ge=ce+1,Se=ge<G?v[ge].el:H;for(;D<=ce;)g(null,v[D]=_?en(v[D]):Mt(v[D]),E,Se,V,R,ee,M,_),D++}}else if(D>ce)for(;D<=te;)j(h[D],V,R,!0),D++;else{const ge=D,Se=D,Oe=new Map;for(D=Se;D<=ce;D++){const ct=v[D]=_?en(v[D]):Mt(v[D]);ct.key!=null&&Oe.set(ct.key,D)}let Ie,nt=0;const ot=ce-Se+1;let Lt=!1,jt=0;const so=new Array(ot);for(D=0;D<ot;D++)so[D]=0;for(D=ge;D<=te;D++){const ct=h[D];if(nt>=ot){j(ct,V,R,!0);continue}let Nt;if(ct.key!=null)Nt=Oe.get(ct.key);else for(Ie=Se;Ie<=ce;Ie++)if(so[Ie-Se]===0&&fn(ct,v[Ie])){Nt=Ie;break}Nt===void 0?j(ct,V,R,!0):(so[Nt-Se]=D+1,Nt>=jt?jt=Nt:Lt=!0,g(ct,v[Nt],E,null,V,R,ee,M,_),nt++)}const nc=Lt?zu(so):yt;for(Ie=nc.length-1,D=ot-1;D>=0;D--){const ct=Se+D,Nt=v[ct],oc=v[ct+1],ic=ct+1<G?oc.el||oc.placeholder:H;so[D]===0?g(null,Nt,E,ic,V,R,ee,M,_):Lt&&(Ie<0||D!==nc[Ie]?Z(Nt,E,ic,2):Ie--)}}},Z=(h,v,E,H,V=null)=>{const{el:R,type:ee,transition:M,children:_,shapeFlag:D}=h;if(D&6){Z(h.component.subTree,v,E,H);return}if(D&128){h.suspense.move(v,E,H);return}if(D&64){ee.move(h,v,E,$e);return}if(ee===we){o(R,v,E);for(let te=0;te<_.length;te++)Z(_[te],v,E,H);o(h.anchor,v,E);return}if(ee===No){F(h,v,E);return}if(H!==2&&D&1&&M)if(H===0)M.beforeEnter(R),o(R,v,E),rt(()=>M.enter(R),V);else{const{leave:te,delayLeave:ce,afterLeave:ge}=M,Se=()=>{h.ctx.isUnmounted?i(R):o(R,v,E)},Oe=()=>{R._isLeaving&&R[Ft](!0),te(R,()=>{Se(),ge&&ge()})};ce?ce(R,Se,Oe):Oe()}else o(R,v,E)},j=(h,v,E,H=!1,V=!1)=>{const{type:R,props:ee,ref:M,children:_,dynamicChildren:D,shapeFlag:G,patchFlag:te,dirs:ce,cacheIndex:ge}=h;if(te===-2&&(V=!1),M!=null&&(Pt(),Wn(M,null,E,h,!0),It()),ge!=null&&(v.renderCache[ge]=void 0),G&256){v.ctx.deactivate(h);return}const Se=G&1&&ce,Oe=!In(h);let Ie;if(Oe&&(Ie=ee&&ee.onVnodeBeforeUnmount)&&Ot(Ie,v,h),G&6)fe(h.component,E,H);else{if(G&128){h.suspense.unmount(E,H);return}Se&&cn(h,null,v,"beforeUnmount"),G&64?h.type.remove(h,v,E,$e,H):D&&!D.hasOnce&&(R!==we||te>0&&te&64)?ve(D,v,E,!1,!0):(R===we&&te&384||!V&&G&16)&&ve(_,v,E),H&&Ee(h)}(Oe&&(Ie=ee&&ee.onVnodeUnmounted)||Se)&&rt(()=>{Ie&&Ot(Ie,v,h),Se&&cn(h,null,v,"unmounted")},E)},Ee=h=>{const{type:v,el:E,anchor:H,transition:V}=h;if(v===we){xe(E,H);return}if(v===No){k(h);return}const R=()=>{i(E),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(h.shapeFlag&1&&V&&!V.persisted){const{leave:ee,delayLeave:M}=V,_=()=>ee(E,R);M?M(h.el,R,_):_()}else R()},xe=(h,v)=>{let E;for(;h!==v;)E=f(h),i(h),h=E;i(v)},fe=(h,v,E)=>{const{bum:H,scope:V,job:R,subTree:ee,um:M,m:_,a:D}=h;Ys(_),Ys(D),H&&po(H),V.stop(),R&&(R.flags|=8,j(ee,h,v,E)),M&&rt(M,v),rt(()=>{h.isUnmounted=!0},v)},ve=(h,v,E,H=!1,V=!1,R=0)=>{for(let ee=R;ee<h.length;ee++)j(h[ee],v,E,H,V)},ye=h=>{if(h.shapeFlag&6)return ye(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const v=f(h.anchor||h.el),E=v&&v[nu];return E?f(E):v};let Be=!1;const at=(h,v,E)=>{h==null?v._vnode&&j(v._vnode,null,null,!0):g(v._vnode||null,h,v,null,null,null,E),v._vnode=h,Be||(Be=!0,fs(),ps(),Be=!1)},$e={p:g,um:j,m:Z,r:Ee,mt:$,mc:B,pc:x,pbc:I,n:ye,o:e};return{render:at,hydrate:void 0,createApp:ku(at)}}function Ri({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 dn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Du(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ks(e,t,n=!1){const o=e.children,i=t.children;if(le(o)&&le(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]=en(i[r]),l.el=s.el),!n&&l.patchFlag!==-2&&Ks(s,l)),l.type===jo&&l.patchFlag!==-1&&(l.el=s.el),l.type===Ke&&!l.el&&(l.el=s.el)}}function zu(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 Zs(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Zs(t)}function Ys(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const Au=Symbol.for("v-scx"),Bu=()=>qt(Au);function Xs(e,t){return Bo(e,null,t)}function Lu(e,t){return Bo(e,null,{flush:"sync"})}function de(e,t,n){return Bo(e,t,n)}function Bo(e,t,n=me){const{immediate:o,deep:i,flush:r,once:s}=n,l=De({},n),a=t&&o||!t&&r!=="post";let u;if(Jn){if(r==="sync"){const p=Bu();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=Tt,p.resume=Tt,p.pause=Tt,p}}const c=Ze;l.call=(p,w,g)=>_t(p,c,w,g);let d=!1;r==="post"?l.scheduler=p=>{rt(p,c&&c.suspense)}:r!=="sync"&&(d=!0,l.scheduler=(p,w)=>{w?p():Ei(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=Zc(e,t,l);return Jn&&(u?u.push(f):a&&f()),f}function ju(e,t,n){const o=this.proxy,i=ze(e)?e.includes(".")?Gs(o,e):()=>o[e]:e.bind(o,o);let r;pe(t)?r=t:(r=t.handler,n=t);const s=Gn(this),l=Bo(i,r.bind(o),n);return s(),l}function Gs(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 st(e,t,n=me){const o=pn(),i=Fe(t),r=Qe(t),s=Js(e,i),l=as((a,u)=>{let c,d=me,f;return Lu(()=>{const p=e[i];et(c,p)&&(c=p,u())}),{get(){return a(),n.get?n.get(c):c},set(p){const w=n.set?n.set(p):p;if(!et(w,c)&&!(d!==me&&et(p,d)))return;const g=o.vnode.props;g&&(t in g||i in g||r in g)&&(`onUpdate:${t}`in g||`onUpdate:${i}`in g||`onUpdate:${r}`in g)||(c=p,u()),o.emit(`update:${t}`,w),et(p,w)&&et(p,d)&&!et(w,f)&&u(),d=p,f=w}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?s||me:l,done:!1}:{done:!0}}}},l}const Js=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Fe(t)}Modifiers`]||e[`${Qe(t)}Modifiers`];function Nu(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||me;let i=n;const r=t.startsWith("update:"),s=r&&Js(o,t.slice(7));s&&(s.trim&&(i=n.map(c=>ze(c)?c.trim():c)),s.number&&(i=n.map(hi)));let l,a=o[l=pi(t)]||o[l=pi(Fe(t))];!a&&r&&(a=o[l=pi(Qe(t))]),a&&_t(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,_t(u,e,6,i)}}const Vu=new WeakMap;function Qs(e,t,n=!1){const o=n?Vu:t.emitsCache,i=o.get(e);if(i!==void 0)return i;const r=e.emits;let s={},l=!1;if(!pe(e)){const a=u=>{const c=Qs(u,t,!0);c&&(l=!0,De(s,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!l?(Pe(e)&&o.set(e,null),null):(le(r)?r.forEach(a=>s[a]=null):De(s,r),Pe(e)&&o.set(e,s),s)}function Lo(e,t){return!e||!lo(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ce(e,t[0].toLowerCase()+t.slice(1))||Ce(e,Qe(t))||Ce(e,t))}function A0(){}function el(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:w,inheritAttrs:g}=e,O=Eo(e);let S,A;try{if(n.shapeFlag&4){const k=i||o,m=k;S=Mt(u.call(m,k,c,d,p,f,w)),A=l}else{const k=t;S=Mt(k.length>1?k(d,{attrs:l,slots:s,emit:a}):k(d,null)),A=t.props?l:Ru(l)}}catch(k){Zn.length=0,Po(k,e,1),S=N(Ke)}let F=S;if(A&&g!==!1){const k=Object.keys(A),{shapeFlag:m}=F;k.length&&m&7&&(r&&k.some(ui)&&(A=Hu(A,r)),F=Qt(F,A,!1,!0))}return n.dirs&&(F=Qt(F,null,!1,!0),F.dirs=F.dirs?F.dirs.concat(n.dirs):n.dirs),n.transition&&Fn(F,n.transition),S=F,Eo(O),S}const Ru=e=>{let t;for(const n in e)(n==="class"||n==="style"||lo(n))&&((t||(t={}))[n]=e[n]);return t},Hu=(e,t)=>{const n={};for(const o in e)(!ui(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Fu(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?tl(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]&&!Lo(u,f))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:o===s?!1:o?s?tl(o,s,u):!0:!!s;return!1}function tl(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]&&!Lo(n,r))return!0}return!1}function Wu({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 nl=e=>e.__isSuspense;function qu(e,t){t&&t.pendingBranch?le(e)?t.effects.push(...e):t.effects.push(e):tu(e)}const we=Symbol.for("v-fgt"),jo=Symbol.for("v-txt"),Ke=Symbol.for("v-cmt"),No=Symbol.for("v-stc"),Zn=[];let lt=null;function b(e=!1){Zn.push(lt=e?null:[])}function Uu(){Zn.pop(),lt=Zn[Zn.length-1]||null}let Yn=1;function Vo(e,t=!1){Yn+=e,e<0&&lt&&t&&(lt.hasOnce=!0)}function ol(e){return e.dynamicChildren=Yn>0?lt||yt:null,Uu(),Yn>0&&lt&&lt.push(e),e}function z(e,t,n,o,i,r){return ol(K(e,t,n,o,i,r,!0))}function se(e,t,n,o,i){return ol(N(e,t,n,o,i,!0))}function Xn(e){return e?e.__v_isVNode===!0:!1}function fn(e,t){return e.type===t.type&&e.key===t.key}const il=({key:e})=>e??null,Ro=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ze(e)||Ae(e)||pe(e)?{i:Re,r:e,k:t,f:!!n}:e:null);function K(e,t=null,n=null,o=0,i=null,r=e===we?0:1,s=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&il(t),ref:t&&Ro(t),scopeId:gs,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:Re};return l?(Hi(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=ze(n)?8:16),Yn>0&&!s&&lt&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&lt.push(a),a}const N=Ku;function Ku(e,t=null,n=null,o=0,i=null,r=!1){if((!e||e===Ps)&&(e=Ke),Xn(e)){const l=Qt(e,t,!0);return n&&Hi(l,n),Yn>0&&!r&&lt&&(l.shapeFlag&6?lt[lt.indexOf(e)]=l:lt.push(l)),l.patchFlag=-2,l}if(rd(e)&&(e=e.__vccOpts),t){t=Zu(t);let{class:l,style:a}=t;l&&!ze(l)&&(t.class=ue(l)),Pe(a)&&(Pi(a)&&!le(a)&&(a=De({},a)),t.style=Te(a))}const s=ze(e)?1:nl(e)?128:ms(e)?64:Pe(e)?4:pe(e)?2:0;return K(e,t,n,o,i,s,r,!0)}function Zu(e){return e?Pi(e)||Vs(e)?De({},e):e:null}function Qt(e,t,n=!1,o=!1){const{props:i,ref:r,patchFlag:s,children:l,transition:a}=e,u=t?En(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&il(u),ref:t&&t.ref?n&&r?le(r)?r.concat(Ro(t)):[r,Ro(t)]:Ro(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!==we?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&&Qt(e.ssContent),ssFallback:e.ssFallback&&Qt(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&Fn(c,a.clone(c)),c}function Ut(e=" ",t=0){return N(jo,null,e,t)}function Yu(e,t){const n=N(No,null,e);return n.staticCount=t,n}function ae(e="",t=!1){return t?(b(),se(Ke,null,e)):N(Ke,null,e)}function Mt(e){return e==null||typeof e=="boolean"?N(Ke):le(e)?N(we,null,e.slice()):Xn(e)?en(e):N(jo,null,String(e))}function en(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Qt(e)}function Hi(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(le(t))n=16;else if(typeof t=="object")if(o&65){const i=t.default;i&&(i._c&&(i._d=!1),Hi(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Vs(t)?t._ctx=Re:i===3&&Re&&(Re.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else pe(t)?(t={default:t,_ctx:Re},n=32):(t=String(t),o&64?(n=16,t=[Ut(t)]):n=8);e.children=t,e.shapeFlag|=n}function En(...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=ue([t.class,o.class]));else if(i==="style")t.style=Te([t.style,o.style]);else if(lo(i)){const r=t[i],s=o[i];s&&r!==s&&!(le(r)&&r.includes(s))&&(t[i]=r?[].concat(r,s):s)}else i!==""&&(t[i]=o[i])}return t}function Ot(e,t,n,o=null){_t(e,t,7,[n,o])}const Xu=Bs();let Gu=0;function Ju(e,t,n){const o=e.type,i=(t?t.appContext:e.appContext)||Xu,r={uid:Gu++,vnode:e,type:o,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new gc(!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:Hs(o,i),emitsOptions:Qs(o,i),emit:null,emitted:null,propsDefaults:me,inheritAttrs:o.inheritAttrs,ctx:me,data:me,props:me,attrs:me,slots:me,refs:me,setupState:me,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=Nu.bind(null,r),e.ce&&e.ce(r),r}let Ze=null;const pn=()=>Ze||Re;let Ho,Fi;{const e=ho(),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)}};Ho=t("__VUE_INSTANCE_SETTERS__",n=>Ze=n),Fi=t("__VUE_SSR_SETTERS__",n=>Jn=n)}const Gn=e=>{const t=Ze;return Ho(e),e.scope.on(),()=>{e.scope.off(),Ho(t)}},rl=()=>{Ze&&Ze.scope.off(),Ho(null)};function sl(e){return e.vnode.shapeFlag&4}let Jn=!1;function Qu(e,t=!1,n=!1){t&&Fi(t);const{props:o,children:i}=e.vnode,r=sl(e);Cu(e,o,r,t),Eu(e,i,n||t);const s=r?ed(e,t):void 0;return t&&Fi(!1),s}function ed(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,vu);const{setup:o}=n;if(o){Pt();const i=e.setupContext=o.length>1?nd(e):null,r=Gn(e),s=Cn(o,e,0,[e.props,i]),l=zr(s);if(It(),r(),(l||e.sp)&&!In(e)&&Ss(e),l){if(s.then(rl,rl),t)return s.then(a=>{ll(e,a)}).catch(a=>{Po(a,e,0)});e.asyncDep=s}else ll(e,s)}else al(e)}function ll(e,t,n){pe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Pe(t)&&(e.setupState=ls(t)),al(e)}function al(e,t,n){const o=e.type;e.render||(e.render=o.render||Tt);{const i=Gn(e);Pt();try{bu(e)}finally{It(),i()}}}const td={get(e,t){return Ue(e,"get",""),e[t]}};function nd(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,td),slots:e.slots,emit:e.emit,expose:t}}function Fo(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ls(Lc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in qn)return qn[n](e)},has(t,n){return n in t||n in qn}})):e.proxy}const od=/(?:^|[-_])\w/g,id=e=>e.replace(od,t=>t.toUpperCase()).replace(/[-_]/g,"");function cl(e,t=!0){return pe(e)?e.displayName||e.name:e.name||t&&e.__name}function ul(e,t,n=!1){let o=cl(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?id(o):n?"App":"Anonymous"}function rd(e){return pe(e)&&"__vccOpts"in e}const Q=(e,t)=>Uc(e,t,Jn);function dl(e,t,n){try{Vo(-1);const o=arguments.length;return o===2?Pe(t)&&!le(t)?Xn(t)?N(e,null,[t]):N(e,t):N(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Xn(n)&&(n=[n]),N(e,t,n))}finally{Vo(1)}}const sd="3.5.24";/**
15
+ `,...Gc(i)),console.warn(...r)}It(),Ei=!1}function Xc(){let e=Hn[Hn.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 Gc(e){const t=[];return e.forEach((n,o)=>{t.push(...o===0?[]:[`
16
+ `],...Jc(n))}),t}function Jc({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",o=e.component?e.component.parent==null:!1,i=` at <${dl(e.component,e.type,o)}`,r=">"+n;return e.props?[i,...Qc(e.props),r]:[i+r]}function Qc(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(o=>{t.push(...us(o,e[o]))}),n.length>3&&t.push(" ..."),t}function us(e,t,n){return ze(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:Ae(t)?(t=us(e,_e(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):pe(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=_e(t),n?t:[`${e}=`,t])}function Tn(e,t,n,o){try{return o?e(...o):e()}catch(i){Io(i,t,n)}}function _t(e,t,n,o){if(pe(e)){const i=Tn(e,t,n,o);return i&&Ar(i)&&i.catch(r=>{Io(r,t,n)}),i}if(le(e)){const i=[];for(let r=0;r<e.length;r++)i.push(_t(e[r],t,n,o));return i}}function Io(e,t,n,o=!0){const i=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:s}=t&&t.appContext.config||me;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){Pt(),Tn(r,null,10,[e,a,u]),It();return}}eu(e,n,i,o,s)}function eu(e,t,n,o=!0,i=!1){if(i)throw e;console.error(e)}const Ye=[];let Et=-1;const Pn=[];let Jt=null,In=0;const ds=Promise.resolve();let Eo=null;function pt(e){const t=Eo||ds;return e?t.then(this?e.bind(this):e):t}function tu(e){let t=Et+1,n=Ye.length;for(;t<n;){const o=t+n>>>1,i=Ye[o],r=Fn(i);r<e||r===e&&i.flags&2?t=o+1:n=o}return t}function Mi(e){if(!(e.flags&1)){const t=Fn(e),n=Ye[Ye.length-1];!n||!(e.flags&2)&&t>=Fn(n)?Ye.push(e):Ye.splice(tu(t),0,e),e.flags|=1,fs()}}function fs(){Eo||(Eo=ds.then(gs))}function nu(e){le(e)?Pn.push(...e):Jt&&e.id===-1?Jt.splice(In+1,0,e):e.flags&1||(Pn.push(e),e.flags|=1),fs()}function ps(e,t,n=Et+1){for(;n<Ye.length;n++){const o=Ye[n];if(o&&o.flags&2){if(e&&o.id!==e.uid)continue;Ye.splice(n,1),n--,o.flags&4&&(o.flags&=-2),o(),o.flags&4||(o.flags&=-2)}}}function hs(e){if(Pn.length){const t=[...new Set(Pn)].sort((n,o)=>Fn(n)-Fn(o));if(Pn.length=0,Jt){Jt.push(...t);return}for(Jt=t,In=0;In<Jt.length;In++){const n=Jt[In];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Jt=null,In=0}}const Fn=e=>e.id==null?e.flags&2?-1:1/0:e.id;function gs(e){try{for(Et=0;Et<Ye.length;Et++){const t=Ye[Et];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Tn(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Et<Ye.length;Et++){const t=Ye[Et];t&&(t.flags&=-2)}Et=-1,Ye.length=0,hs(),Eo=null,(Ye.length||Pn.length)&&gs()}}let Re=null,ms=null;function Mo(e){const t=Re;return Re=e,ms=e&&e.type.__scopeId||null,t}function ie(e,t=Re,n){if(!t||e._n)return e;const o=(...i)=>{o._d&&Ro(-1);const r=Mo(t);let s;try{s=e(...i)}finally{Mo(r),o._d&&Ro(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function He(e,t){if(Re===null)return e;const n=Wo(Re),o=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[r,s,l,a=me]=t[i];r&&(pe(r)&&(r={mounted:r,updated:r}),r.deep&&Ft(s),o.push({dir:r,instance:n,value:s,oldValue:void 0,arg:l,modifiers:a}))}return e}function un(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&&(Pt(),_t(a,n,8,[e.el,l,e,t]),It())}}const ou=Symbol("_vte"),vs=e=>e.__isTeleport,Wt=Symbol("_leaveCb"),Oo=Symbol("_enterCb");function iu(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return je(()=>{e.isMounted=!0}),Di(()=>{e.isUnmounting=!0}),e}const ht=[Function,Array],bs={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ht,onEnter:ht,onAfterEnter:ht,onEnterCancelled:ht,onBeforeLeave:ht,onLeave:ht,onAfterLeave:ht,onLeaveCancelled:ht,onBeforeAppear:ht,onAppear:ht,onAfterAppear:ht,onAppearCancelled:ht},ys=e=>{const t=e.subTree;return t.component?ys(t.component):t},ru={name:"BaseTransition",props:bs,setup(e,{slots:t}){const n=hn(),o=iu();return()=>{const i=t.default&&Ss(t.default(),!0);if(!i||!i.length)return;const r=ws(i),s=_e(e),{mode:l}=s;if(o.isLeaving)return $i(r);const a=_s(r);if(!a)return $i(r);let u=Oi(a,s,o,n,d=>u=d);a.type!==Ke&&Wn(a,u);let c=n.subTree&&_s(n.subTree);if(c&&c.type!==Ke&&!pn(c,a)&&ys(n).type!==Ke){let d=Oi(c,s,o,n);if(Wn(c,d),l==="out-in"&&a.type!==Ke)return o.isLeaving=!0,d.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,c=void 0},$i(r);l==="in-out"&&a.type!==Ke?d.delayLeave=(f,p,w)=>{const g=xs(o,c);g[String(c.key)]=c,f[Wt]=()=>{p(),f[Wt]=void 0,delete u.delayedLeave,c=void 0},u.delayedLeave=()=>{w(),delete u.delayedLeave,c=void 0}}:c=void 0}else c&&(c=void 0);return r}}};function ws(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Ke){t=n;break}}return t}const su=ru;function xs(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 Oi(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:w,onLeaveCancelled:g,onBeforeAppear:O,onAppear:S,onAfterAppear:A,onAppearCancelled:F}=t,k=String(e.key),m=xs(n,e),P=(y,I)=>{y&&_t(y,o,9,I)},C=(y,I)=>{const W=I[1];P(y,I),le(y)?y.every(L=>L.length<=1)&&W():y.length<=1&&W()},B={mode:s,persisted:l,beforeEnter(y){let I=a;if(!n.isMounted)if(r)I=O||a;else return;y[Wt]&&y[Wt](!0);const W=m[k];W&&pn(e,W)&&W.el[Wt]&&W.el[Wt](),P(I,[y])},enter(y){let I=u,W=c,L=d;if(!n.isMounted)if(r)I=S||u,W=A||c,L=F||d;else return;let Y=!1;const $=y[Oo]=X=>{Y||(Y=!0,X?P(L,[y]):P(W,[y]),B.delayedLeave&&B.delayedLeave(),y[Oo]=void 0)};I?C(I,[y,$]):$()},leave(y,I){const W=String(e.key);if(y[Oo]&&y[Oo](!0),n.isUnmounting)return I();P(f,[y]);let L=!1;const Y=y[Wt]=$=>{L||(L=!0,I(),$?P(g,[y]):P(w,[y]),y[Wt]=void 0,m[W]===e&&delete m[W])};m[W]=e,p?C(p,[y,Y]):Y()},clone(y){const I=Oi(y,t,n,o,i);return i&&i(I),I}};return B}function $i(e){if(Do(e))return e=en(e),e.children=null,e}function _s(e){if(!Do(e))return vs(e.type)&&e.children?ws(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&&pe(n.default))return n.default()}}function Wn(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Wn(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 Ss(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===we?(s.patchFlag&128&&i++,o=o.concat(Ss(s.children,t,l))):(t||s.type!==Ke)&&o.push(l!=null?en(s,{key:l}):s)}if(i>1)for(let r=0;r<o.length;r++)o[r].patchFlag=-2;return o}function he(e,t){return pe(e)?De({name:e.name},t,{setup:e}):e}function ks(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}const $o=new WeakMap;function qn(e,t,n,o,i=!1){if(le(e)){e.forEach((w,g)=>qn(w,t&&(le(t)?t[g]:t),n,o,i));return}if(En(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&qn(e,t,n,o.component.subTree);return}const r=o.shapeFlag&4?Wo(o.component):o.el,s=i?null:r,{i:l,r:a}=e,u=t&&t.r,c=l.refs===me?l.refs={}:l.refs,d=l.setupState,f=_e(d),p=d===me?Dr:w=>Ce(f,w);if(u!=null&&u!==a){if(Cs(t),ze(u))c[u]=null,p(u)&&(d[u]=null);else if(Ae(u)){u.value=null;const w=t;w.k&&(c[w.k]=null)}}if(pe(a))Tn(a,l,12,[s,c]);else{const w=ze(a),g=Ae(a);if(w||g){const O=()=>{if(e.f){const S=w?p(a)?d[a]:c[a]:a.value;if(i)le(S)&&fi(S,r);else if(le(S))S.includes(r)||S.push(r);else if(w)c[a]=[r],p(a)&&(d[a]=c[a]);else{const A=[r];a.value=A,e.k&&(c[e.k]=A)}}else w?(c[a]=s,p(a)&&(d[a]=s)):g&&(a.value=s,e.k&&(c[e.k]=s))};if(s){const S=()=>{O(),$o.delete(e)};S.id=-1,$o.set(e,S),rt(S,n)}else Cs(e),O()}}}function Cs(e){const t=$o.get(e);t&&(t.flags|=8,$o.delete(e))}go().requestIdleCallback,go().cancelIdleCallback;const En=e=>!!e.type.__asyncLoader,Do=e=>e.type.__isKeepAlive;function lu(e,t){Ts(e,"a",t)}function au(e,t){Ts(e,"da",t)}function Ts(e,t,n=Ze){const o=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(zo(t,o,n),n){let i=n.parent;for(;i&&i.parent;)Do(i.parent.vnode)&&cu(o,t,n,i),i=i.parent}}function cu(e,t,n,o){const i=zo(t,e,o,!0);gt(()=>{fi(o[t],i)},n)}function zo(e,t,n=Ze,o=!1){if(n){const i=n[e]||(n[e]=[]),r=t.__weh||(t.__weh=(...s)=>{Pt();const l=Jn(n),a=_t(t,n,e,s);return l(),It(),a});return o?i.unshift(r):i.push(r),r}}const qt=e=>(t,n=Ze)=>{(!Qn||e==="sp")&&zo(e,(...o)=>t(...o),n)},uu=qt("bm"),je=qt("m"),du=qt("bu"),fu=qt("u"),Di=qt("bum"),gt=qt("um"),pu=qt("sp"),hu=qt("rtg"),gu=qt("rtc");function Ps(e,t=Ze){zo("ec",e,t)}const mu="components",Is=Symbol.for("v-ndc");function Es(e){return ze(e)?vu(mu,e,!1)||e:e||Is}function vu(e,t,n=!0,o=!1){const i=Re||Ze;if(i){const r=i.type;{const l=ul(r,!1);if(l&&(l===t||l===Fe(t)||l===po(Fe(t))))return r}const s=Ms(i[e]||r[e],t)||Ms(i.appContext[e],t);return!s&&o?r:s}}function Ms(e,t){return e&&(e[t]||e[Fe(t)]||e[po(Fe(t))])}function Qt(e,t,n,o){let i;const r=n,s=le(e);if(s||ze(e)){const l=s&&Cn(e);let a=!1,u=!1;l&&(a=!ut(e),u=Gt(e),e=yo(e)),i=new Array(e.length);for(let c=0,d=e.length;c<d;c++)i[c]=t(a?u?Co(Ve(e[c])):Ve(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(Pe(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 zi(e,t){for(let n=0;n<t.length;n++){const o=t[n];if(le(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 ke(e,t,n={},o,i){if(Re.ce||Re.parent&&En(Re.parent)&&Re.parent.ce){const u=Object.keys(n).length>0;return t!=="default"&&(n.name=t),b(),se(we,null,[N("slot",n,o&&o())],u?-2:64)}let r=e[t];r&&r._c&&(r._d=!1),b();const s=r&&Os(r(n)),l=n.key||s&&s.key,a=se(we,{key:(l&&!wt(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 Os(e){return e.some(t=>Gn(t)?!(t.type===Ke||t.type===we&&!Os(t.children)):!0)?e:null}const Ai=e=>e?ll(e)?Wo(e):Ai(e.parent):null,Un=De(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=>Ai(e.parent),$root:e=>Ai(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>zs(e),$forceUpdate:e=>e.f||(e.f=()=>{Mi(e.update)}),$nextTick:e=>e.n||(e.n=pt.bind(e.proxy)),$watch:e=>Nu.bind(e)}),Bi=(e,t)=>e!==me&&!e.__isScriptSetup&&Ce(e,t),bu={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(Bi(o,t))return s[t]=1,o[t];if(i!==me&&Ce(i,t))return s[t]=2,i[t];if((u=e.propsOptions[0])&&Ce(u,t))return s[t]=3,r[t];if(n!==me&&Ce(n,t))return s[t]=4,n[t];Li&&(s[t]=0)}}const c=Un[t];let d,f;if(c)return t==="$attrs"&&Ue(e.attrs,"get",""),c(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==me&&Ce(n,t))return s[t]=4,n[t];if(f=a.config.globalProperties,Ce(f,t))return f[t]},set({_:e},t,n){const{data:o,setupState:i,ctx:r}=e;return Bi(i,t)?(i[t]=n,!0):o!==me&&Ce(o,t)?(o[t]=n,!0):Ce(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!==me&&l[0]!=="$"&&Ce(e,l)||Bi(t,l)||(a=r[0])&&Ce(a,l)||Ce(o,l)||Ce(Un,l)||Ce(i.config.globalProperties,l)||(u=s.__cssModules)&&u[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ce(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ao(e){return le(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Xe(e,t){return!e||!t?e||t:le(e)&&le(t)?e.concat(t):De({},Ao(e),Ao(t))}let Li=!0;function yu(e){const t=zs(e),n=e.proxy,o=e.ctx;Li=!1,t.beforeCreate&&$s(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:w,activated:g,deactivated:O,beforeDestroy:S,beforeUnmount:A,destroyed:F,unmounted:k,render:m,renderTracked:P,renderTriggered:C,errorCaptured:B,serverPrefetch:y,expose:I,inheritAttrs:W,components:L,directives:Y,filters:$}=t;if(u&&wu(u,o,null),s)for(const T in s){const x=s[T];pe(x)&&(o[T]=x.bind(n))}if(i){const T=i.call(n,n);Pe(T)&&(e.data=So(T))}if(Li=!0,r)for(const T in r){const x=r[T],q=pe(x)?x.bind(n,n):pe(x.get)?x.get.bind(n,n):Tt,oe=!pe(x)&&pe(x.set)?x.set.bind(n):Tt,Z=Q({get:q,set:oe});Object.defineProperty(o,T,{enumerable:!0,configurable:!0,get:()=>Z.value,set:j=>Z.value=j})}if(l)for(const T in l)Ds(l[T],o,n,T);if(a){const T=pe(a)?a.call(n):a;Reflect.ownKeys(T).forEach(x=>{Zn(x,T[x])})}c&&$s(c,e,"c");function J(T,x){le(x)?x.forEach(q=>T(q.bind(n))):x&&T(x.bind(n))}if(J(uu,d),J(je,f),J(du,p),J(fu,w),J(lu,g),J(au,O),J(Ps,B),J(gu,P),J(hu,C),J(Di,A),J(gt,k),J(pu,y),le(I))if(I.length){const T=e.exposed||(e.exposed={});I.forEach(x=>{Object.defineProperty(T,x,{get:()=>n[x],set:q=>n[x]=q,enumerable:!0})})}else e.exposed||(e.exposed={});m&&e.render===Tt&&(e.render=m),W!=null&&(e.inheritAttrs=W),L&&(e.components=L),Y&&(e.directives=Y),y&&ks(e)}function wu(e,t,n=Tt){le(e)&&(e=ji(e));for(const o in e){const i=e[o];let r;Pe(i)?"default"in i?r=Ut(i.from||o,i.default,!0):r=Ut(i.from||o):r=Ut(i),Ae(r)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>r.value,set:s=>r.value=s}):t[o]=r}}function $s(e,t,n){_t(le(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ds(e,t,n,o){let i=o.includes(".")?Js(n,o):()=>n[o];if(ze(e)){const r=t[e];pe(r)&&de(i,r)}else if(pe(e))de(i,e.bind(n));else if(Pe(e))if(le(e))e.forEach(r=>Ds(r,t,n,o));else{const r=pe(e.handler)?e.handler.bind(n):t[e.handler];pe(r)&&de(i,r,e)}}function zs(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=>Bo(a,u,s,!0)),Bo(a,t,s)),Pe(t)&&r.set(t,a),a}function Bo(e,t,n,o=!1){const{mixins:i,extends:r}=t;r&&Bo(e,r,n,!0),i&&i.forEach(s=>Bo(e,s,n,!0));for(const s in t)if(!(o&&s==="expose")){const l=xu[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const xu={data:As,props:Bs,emits:Bs,methods:Kn,computed:Kn,beforeCreate:Ge,created:Ge,beforeMount:Ge,mounted:Ge,beforeUpdate:Ge,updated:Ge,beforeDestroy:Ge,beforeUnmount:Ge,destroyed:Ge,unmounted:Ge,activated:Ge,deactivated:Ge,errorCaptured:Ge,serverPrefetch:Ge,components:Kn,directives:Kn,watch:Su,provide:As,inject:_u};function As(e,t){return t?e?function(){return De(pe(e)?e.call(this,this):e,pe(t)?t.call(this,this):t)}:t:e}function _u(e,t){return Kn(ji(e),ji(t))}function ji(e){if(le(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function Ge(e,t){return e?[...new Set([].concat(e,t))]:t}function Kn(e,t){return e?De(Object.create(null),e,t):t}function Bs(e,t){return e?le(e)&&le(t)?[...new Set([...e,...t])]:De(Object.create(null),Ao(e),Ao(t??{})):t}function Su(e,t){if(!e)return t;if(!t)return e;const n=De(Object.create(null),e);for(const o in t)n[o]=Ge(e[o],t[o]);return n}function Ls(){return{app:null,config:{isNativeTag:Dr,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 ku=0;function Cu(e,t){return function(o,i=null){pe(o)||(o=De({},o)),i!=null&&!Pe(i)&&(i=null);const r=Ls(),s=new WeakSet,l=[];let a=!1;const u=r.app={_uid:ku++,_component:o,_props:i,_container:null,_context:r,_instance:null,version:ld,get config(){return r.config},set config(c){},use(c,...d){return s.has(c)||(c&&pe(c.install)?(s.add(c),c.install(u,...d)):pe(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||N(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,Wo(p.component)}},onUnmount(c){l.push(c)},unmount(){a&&(_t(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=dn;dn=u;try{return c()}finally{dn=d}}};return u}}let dn=null;function Zn(e,t){if(Ze){let n=Ze.provides;const o=Ze.parent&&Ze.parent.provides;o===n&&(n=Ze.provides=Object.create(o)),n[e]=t}}function Ut(e,t,n=!1){const o=hn();if(o||dn){let i=dn?dn._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&&pe(t)?t.call(o&&o.proxy):t}}function js(){return!!(hn()||dn)}const Ns={},Vs=()=>Object.create(Ns),Rs=e=>Object.getPrototypeOf(e)===Ns;function Tu(e,t,n,o=!1){const i={},r=Vs();e.propsDefaults=Object.create(null),Hs(e,t,i,r);for(const s in e.propsOptions[0])s in i||(i[s]=void 0);n?e.props=o?i:Lc(i):e.type.props?e.props=i:e.props=r,e.attrs=r}function Pu(e,t,n,o){const{props:i,attrs:r,vnode:{patchFlag:s}}=e,l=_e(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(jo(e.emitsOptions,f))continue;const p=t[f];if(a)if(Ce(r,f))p!==r[f]&&(r[f]=p,u=!0);else{const w=Fe(f);i[w]=Ni(a,l,w,p,e,!1)}else p!==r[f]&&(r[f]=p,u=!0)}}}else{Hs(e,t,i,r)&&(u=!0);let c;for(const d in l)(!t||!Ce(t,d)&&((c=Qe(d))===d||!Ce(t,c)))&&(a?n&&(n[d]!==void 0||n[c]!==void 0)&&(i[d]=Ni(a,l,d,void 0,e,!0)):delete i[d]);if(r!==l)for(const d in r)(!t||!Ce(t,d))&&(delete r[d],u=!0)}u&&Rt(e.attrs,"set","")}function Hs(e,t,n,o){const[i,r]=e.propsOptions;let s=!1,l;if(t)for(let a in t){if(An(a))continue;const u=t[a];let c;i&&Ce(i,c=Fe(a))?!r||!r.includes(c)?n[c]=u:(l||(l={}))[c]=u:jo(e.emitsOptions,a)||(!(a in o)||u!==o[a])&&(o[a]=u,s=!0)}if(r){const a=_e(n),u=l||me;for(let c=0;c<r.length;c++){const d=r[c];n[d]=Ni(i,a,d,u[d],e,!Ce(u,d))}}return s}function Ni(e,t,n,o,i,r){const s=e[n];if(s!=null){const l=Ce(s,"default");if(l&&o===void 0){const a=s.default;if(s.type!==Function&&!s.skipFactory&&pe(a)){const{propsDefaults:u}=i;if(n in u)o=u[n];else{const c=Jn(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===Qe(n))&&(o=!0))}return o}const Iu=new WeakMap;function Fs(e,t,n=!1){const o=n?Iu:t.propsCache,i=o.get(e);if(i)return i;const r=e.props,s={},l=[];let a=!1;if(!pe(e)){const c=d=>{a=!0;const[f,p]=Fs(d,t,!0);De(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 Pe(e)&&o.set(e,yt),yt;if(le(r))for(let c=0;c<r.length;c++){const d=Fe(r[c]);Ws(d)&&(s[d]=me)}else if(r)for(const c in r){const d=Fe(c);if(Ws(d)){const f=r[c],p=s[d]=le(f)||pe(f)?{type:f}:De({},f),w=p.type;let g=!1,O=!0;if(le(w))for(let S=0;S<w.length;++S){const A=w[S],F=pe(A)&&A.name;if(F==="Boolean"){g=!0;break}else F==="String"&&(O=!1)}else g=pe(w)&&w.name==="Boolean";p[0]=g,p[1]=O,(g||Ce(p,"default"))&&l.push(d)}}const u=[s,l];return Pe(e)&&o.set(e,u),u}function Ws(e){return e[0]!=="$"&&!An(e)}const Vi=e=>e==="_"||e==="_ctx"||e==="$stable",Ri=e=>le(e)?e.map(Mt):[Mt(e)],Eu=(e,t,n)=>{if(t._n)return t;const o=ie((...i)=>Ri(t(...i)),n);return o._c=!1,o},qs=(e,t,n)=>{const o=e._ctx;for(const i in e){if(Vi(i))continue;const r=e[i];if(pe(r))t[i]=Eu(i,r,o);else if(r!=null){const s=Ri(r);t[i]=()=>s}}},Us=(e,t)=>{const n=Ri(t);e.slots.default=()=>n},Ks=(e,t,n)=>{for(const o in t)(n||!Vi(o))&&(e[o]=t[o])},Mu=(e,t,n)=>{const o=e.slots=Vs();if(e.vnode.shapeFlag&32){const i=t._;i?(Ks(o,t,n),n&&Lr(o,"_",i,!0)):qs(t,o)}else t&&Us(e,t)},Ou=(e,t,n)=>{const{vnode:o,slots:i}=e;let r=!0,s=me;if(o.shapeFlag&32){const l=t._;l?n&&l===1?r=!1:Ks(i,t,n):(r=!t.$stable,qs(t,i)),s=t}else t&&(Us(e,t),s={default:1});if(r)for(const l in i)!Vi(l)&&s[l]==null&&delete i[l]},rt=Uu;function $u(e){return Du(e)}function Du(e,t){const n=go();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=Tt,insertStaticContent:w}=e,g=(h,v,E,H=null,V=null,R=null,ee=void 0,M=null,_=!!v.dynamicChildren)=>{if(h===v)return;h&&!pn(h,v)&&(H=ye(h),j(h,V,R,!0),h=null),v.patchFlag===-2&&(_=!1,v.dynamicChildren=null);const{type:D,ref:G,shapeFlag:te}=v;switch(D){case No:O(h,v,E,H);break;case Ke:S(h,v,E,H);break;case Vo:h==null&&A(v,E,H,ee);break;case we:L(h,v,E,H,V,R,ee,M,_);break;default:te&1?m(h,v,E,H,V,R,ee,M,_):te&6?Y(h,v,E,H,V,R,ee,M,_):(te&64||te&128)&&D.process(h,v,E,H,V,R,ee,M,_,$e)}G!=null&&V?qn(G,h&&h.ref,R,v||h,!v):G==null&&h&&h.ref!=null&&qn(h.ref,null,R,h,!0)},O=(h,v,E,H)=>{if(h==null)o(v.el=l(v.children),E,H);else{const V=v.el=h.el;v.children!==h.children&&u(V,v.children)}},S=(h,v,E,H)=>{h==null?o(v.el=a(v.children||""),E,H):v.el=h.el},A=(h,v,E,H)=>{[h.el,h.anchor]=w(h.children,v,E,H,h.el,h.anchor)},F=({el:h,anchor:v},E,H)=>{let V;for(;h&&h!==v;)V=f(h),o(h,E,H),h=V;o(v,E,H)},k=({el:h,anchor:v})=>{let E;for(;h&&h!==v;)E=f(h),i(h),h=E;i(v)},m=(h,v,E,H,V,R,ee,M,_)=>{if(v.type==="svg"?ee="svg":v.type==="math"&&(ee="mathml"),h==null)P(v,E,H,V,R,ee,M,_);else{const D=h.el&&h.el._isVueCE?h.el:null;try{D&&D._beginPatch(),y(h,v,V,R,ee,M,_)}finally{D&&D._endPatch()}}},P=(h,v,E,H,V,R,ee,M)=>{let _,D;const{props:G,shapeFlag:te,transition:ce,dirs:ge}=h;if(_=h.el=s(h.type,R,G&&G.is,G),te&8?c(_,h.children):te&16&&B(h.children,_,null,H,V,Hi(h,R),ee,M),ge&&un(h,null,H,"created"),C(_,h,h.scopeId,ee,H),G){for(const Oe in G)Oe!=="value"&&!An(Oe)&&r(_,Oe,null,G[Oe],R,H);"value"in G&&r(_,"value",null,G.value,R),(D=G.onVnodeBeforeMount)&&Ot(D,H,h)}ge&&un(h,null,H,"beforeMount");const Se=zu(V,ce);Se&&ce.beforeEnter(_),o(_,v,E),((D=G&&G.onVnodeMounted)||Se||ge)&&rt(()=>{D&&Ot(D,H,h),Se&&ce.enter(_),ge&&un(h,null,H,"mounted")},V)},C=(h,v,E,H,V)=>{if(E&&p(h,E),H)for(let R=0;R<H.length;R++)p(h,H[R]);if(V){let R=V.subTree;if(v===R||ol(R.type)&&(R.ssContent===v||R.ssFallback===v)){const ee=V.vnode;C(h,ee,ee.scopeId,ee.slotScopeIds,V.parent)}}},B=(h,v,E,H,V,R,ee,M,_=0)=>{for(let D=_;D<h.length;D++){const G=h[D]=M?tn(h[D]):Mt(h[D]);g(null,G,v,E,H,V,R,ee,M)}},y=(h,v,E,H,V,R,ee)=>{const M=v.el=h.el;let{patchFlag:_,dynamicChildren:D,dirs:G}=v;_|=h.patchFlag&16;const te=h.props||me,ce=v.props||me;let ge;if(E&&fn(E,!1),(ge=ce.onVnodeBeforeUpdate)&&Ot(ge,E,v,h),G&&un(v,h,E,"beforeUpdate"),E&&fn(E,!0),(te.innerHTML&&ce.innerHTML==null||te.textContent&&ce.textContent==null)&&c(M,""),D?I(h.dynamicChildren,D,M,E,H,Hi(v,V),R):ee||x(h,v,M,null,E,H,Hi(v,V),R,!1),_>0){if(_&16)W(M,te,ce,E,V);else if(_&2&&te.class!==ce.class&&r(M,"class",null,ce.class,V),_&4&&r(M,"style",te.style,ce.style,V),_&8){const Se=v.dynamicProps;for(let Oe=0;Oe<Se.length;Oe++){const Ie=Se[Oe],nt=te[Ie],ot=ce[Ie];(ot!==nt||Ie==="value")&&r(M,Ie,nt,ot,V,E)}}_&1&&h.children!==v.children&&c(M,v.children)}else!ee&&D==null&&W(M,te,ce,E,V);((ge=ce.onVnodeUpdated)||G)&&rt(()=>{ge&&Ot(ge,E,v,h),G&&un(v,h,E,"updated")},H)},I=(h,v,E,H,V,R,ee)=>{for(let M=0;M<v.length;M++){const _=h[M],D=v[M],G=_.el&&(_.type===we||!pn(_,D)||_.shapeFlag&198)?d(_.el):E;g(_,D,G,null,H,V,R,ee,!0)}},W=(h,v,E,H,V)=>{if(v!==E){if(v!==me)for(const R in v)!An(R)&&!(R in E)&&r(h,R,v[R],null,V,H);for(const R in E){if(An(R))continue;const ee=E[R],M=v[R];ee!==M&&R!=="value"&&r(h,R,M,ee,V,H)}"value"in E&&r(h,"value",v.value,E.value,V)}},L=(h,v,E,H,V,R,ee,M,_)=>{const D=v.el=h?h.el:l(""),G=v.anchor=h?h.anchor:l("");let{patchFlag:te,dynamicChildren:ce,slotScopeIds:ge}=v;ge&&(M=M?M.concat(ge):ge),h==null?(o(D,E,H),o(G,E,H),B(v.children||[],E,G,V,R,ee,M,_)):te>0&&te&64&&ce&&h.dynamicChildren?(I(h.dynamicChildren,ce,E,V,R,ee,M),(v.key!=null||V&&v===V.subTree)&&Zs(h,v,!0)):x(h,v,E,G,V,R,ee,M,_)},Y=(h,v,E,H,V,R,ee,M,_)=>{v.slotScopeIds=M,h==null?v.shapeFlag&512?V.ctx.activate(v,E,H,ee,_):$(v,E,H,V,R,ee,_):X(h,v,_)},$=(h,v,E,H,V,R,ee)=>{const M=h.component=Qu(h,H,V);if(Do(h)&&(M.ctx.renderer=$e),ed(M,!1,ee),M.asyncDep){if(V&&V.registerDep(M,J,ee),!h.el){const _=M.subTree=N(Ke);S(null,_,v,E),h.placeholder=_.el}}else J(M,h,v,E,V,R,ee)},X=(h,v,E)=>{const H=v.component=h.component;if(Wu(h,v,E))if(H.asyncDep&&!H.asyncResolved){T(H,v,E);return}else H.next=v,H.update();else v.el=h.el,H.vnode=v},J=(h,v,E,H,V,R,ee)=>{const M=()=>{if(h.isMounted){let{next:te,bu:ce,u:ge,parent:Se,vnode:Oe}=h;{const Nt=Ys(h);if(Nt){te&&(te.el=Oe.el,T(h,te,ee)),Nt.asyncDep.then(()=>{h.isUnmounted||M()});return}}let Ie=te,nt;fn(h,!1),te?(te.el=Oe.el,T(h,te,ee)):te=Oe,ce&&ho(ce),(nt=te.props&&te.props.onVnodeBeforeUpdate)&&Ot(nt,Se,te,Oe),fn(h,!0);const ot=tl(h),jt=h.subTree;h.subTree=ot,g(jt,ot,d(jt.el),ye(jt),h,V,R),te.el=ot.el,Ie===null&&qu(h,ot.el),ge&&rt(ge,V),(nt=te.props&&te.props.onVnodeUpdated)&&rt(()=>Ot(nt,Se,te,Oe),V)}else{let te;const{el:ce,props:ge}=v,{bm:Se,m:Oe,parent:Ie,root:nt,type:ot}=h,jt=En(v);fn(h,!1),Se&&ho(Se),!jt&&(te=ge&&ge.onVnodeBeforeMount)&&Ot(te,Ie,v),fn(h,!0);{nt.ce&&nt.ce._def.shadowRoot!==!1&&nt.ce._injectChildStyle(ot);const Nt=h.subTree=tl(h);g(null,Nt,E,H,h,V,R),v.el=Nt.el}if(Oe&&rt(Oe,V),!jt&&(te=ge&&ge.onVnodeMounted)){const Nt=v;rt(()=>Ot(te,Ie,Nt),V)}(v.shapeFlag&256||Ie&&En(Ie.vnode)&&Ie.vnode.shapeFlag&256)&&h.a&&rt(h.a,V),h.isMounted=!0,v=E=H=null}};h.scope.on();const _=h.effect=new Fr(M);h.scope.off();const D=h.update=_.run.bind(_),G=h.job=_.runIfDirty.bind(_);G.i=h,G.id=h.uid,_.scheduler=()=>Mi(G),fn(h,!0),D()},T=(h,v,E)=>{v.component=h;const H=h.vnode.props;h.vnode=v,h.next=null,Pu(h,v.props,H,E),Ou(h,v.children,E),Pt(),ps(h),It()},x=(h,v,E,H,V,R,ee,M,_=!1)=>{const D=h&&h.children,G=h?h.shapeFlag:0,te=v.children,{patchFlag:ce,shapeFlag:ge}=v;if(ce>0){if(ce&128){oe(D,te,E,H,V,R,ee,M,_);return}else if(ce&256){q(D,te,E,H,V,R,ee,M,_);return}}ge&8?(G&16&&ve(D,V,R),te!==D&&c(E,te)):G&16?ge&16?oe(D,te,E,H,V,R,ee,M,_):ve(D,V,R,!0):(G&8&&c(E,""),ge&16&&B(te,E,H,V,R,ee,M,_))},q=(h,v,E,H,V,R,ee,M,_)=>{h=h||yt,v=v||yt;const D=h.length,G=v.length,te=Math.min(D,G);let ce;for(ce=0;ce<te;ce++){const ge=v[ce]=_?tn(v[ce]):Mt(v[ce]);g(h[ce],ge,E,null,V,R,ee,M,_)}D>G?ve(h,V,R,!0,!1,te):B(v,E,H,V,R,ee,M,_,te)},oe=(h,v,E,H,V,R,ee,M,_)=>{let D=0;const G=v.length;let te=h.length-1,ce=G-1;for(;D<=te&&D<=ce;){const ge=h[D],Se=v[D]=_?tn(v[D]):Mt(v[D]);if(pn(ge,Se))g(ge,Se,E,null,V,R,ee,M,_);else break;D++}for(;D<=te&&D<=ce;){const ge=h[te],Se=v[ce]=_?tn(v[ce]):Mt(v[ce]);if(pn(ge,Se))g(ge,Se,E,null,V,R,ee,M,_);else break;te--,ce--}if(D>te){if(D<=ce){const ge=ce+1,Se=ge<G?v[ge].el:H;for(;D<=ce;)g(null,v[D]=_?tn(v[D]):Mt(v[D]),E,Se,V,R,ee,M,_),D++}}else if(D>ce)for(;D<=te;)j(h[D],V,R,!0),D++;else{const ge=D,Se=D,Oe=new Map;for(D=Se;D<=ce;D++){const ct=v[D]=_?tn(v[D]):Mt(v[D]);ct.key!=null&&Oe.set(ct.key,D)}let Ie,nt=0;const ot=ce-Se+1;let jt=!1,Nt=0;const lo=new Array(ot);for(D=0;D<ot;D++)lo[D]=0;for(D=ge;D<=te;D++){const ct=h[D];if(nt>=ot){j(ct,V,R,!0);continue}let Vt;if(ct.key!=null)Vt=Oe.get(ct.key);else for(Ie=Se;Ie<=ce;Ie++)if(lo[Ie-Se]===0&&pn(ct,v[Ie])){Vt=Ie;break}Vt===void 0?j(ct,V,R,!0):(lo[Vt-Se]=D+1,Vt>=Nt?Nt=Vt:jt=!0,g(ct,v[Vt],E,null,V,R,ee,M,_),nt++)}const oc=jt?Au(lo):yt;for(Ie=oc.length-1,D=ot-1;D>=0;D--){const ct=Se+D,Vt=v[ct],ic=v[ct+1],rc=ct+1<G?ic.el||ic.placeholder:H;lo[D]===0?g(null,Vt,E,rc,V,R,ee,M,_):jt&&(Ie<0||D!==oc[Ie]?Z(Vt,E,rc,2):Ie--)}}},Z=(h,v,E,H,V=null)=>{const{el:R,type:ee,transition:M,children:_,shapeFlag:D}=h;if(D&6){Z(h.component.subTree,v,E,H);return}if(D&128){h.suspense.move(v,E,H);return}if(D&64){ee.move(h,v,E,$e);return}if(ee===we){o(R,v,E);for(let te=0;te<_.length;te++)Z(_[te],v,E,H);o(h.anchor,v,E);return}if(ee===Vo){F(h,v,E);return}if(H!==2&&D&1&&M)if(H===0)M.beforeEnter(R),o(R,v,E),rt(()=>M.enter(R),V);else{const{leave:te,delayLeave:ce,afterLeave:ge}=M,Se=()=>{h.ctx.isUnmounted?i(R):o(R,v,E)},Oe=()=>{R._isLeaving&&R[Wt](!0),te(R,()=>{Se(),ge&&ge()})};ce?ce(R,Se,Oe):Oe()}else o(R,v,E)},j=(h,v,E,H=!1,V=!1)=>{const{type:R,props:ee,ref:M,children:_,dynamicChildren:D,shapeFlag:G,patchFlag:te,dirs:ce,cacheIndex:ge}=h;if(te===-2&&(V=!1),M!=null&&(Pt(),qn(M,null,E,h,!0),It()),ge!=null&&(v.renderCache[ge]=void 0),G&256){v.ctx.deactivate(h);return}const Se=G&1&&ce,Oe=!En(h);let Ie;if(Oe&&(Ie=ee&&ee.onVnodeBeforeUnmount)&&Ot(Ie,v,h),G&6)fe(h.component,E,H);else{if(G&128){h.suspense.unmount(E,H);return}Se&&un(h,null,v,"beforeUnmount"),G&64?h.type.remove(h,v,E,$e,H):D&&!D.hasOnce&&(R!==we||te>0&&te&64)?ve(D,v,E,!1,!0):(R===we&&te&384||!V&&G&16)&&ve(_,v,E),H&&Ee(h)}(Oe&&(Ie=ee&&ee.onVnodeUnmounted)||Se)&&rt(()=>{Ie&&Ot(Ie,v,h),Se&&un(h,null,v,"unmounted")},E)},Ee=h=>{const{type:v,el:E,anchor:H,transition:V}=h;if(v===we){xe(E,H);return}if(v===Vo){k(h);return}const R=()=>{i(E),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(h.shapeFlag&1&&V&&!V.persisted){const{leave:ee,delayLeave:M}=V,_=()=>ee(E,R);M?M(h.el,R,_):_()}else R()},xe=(h,v)=>{let E;for(;h!==v;)E=f(h),i(h),h=E;i(v)},fe=(h,v,E)=>{const{bum:H,scope:V,job:R,subTree:ee,um:M,m:_,a:D}=h;Xs(_),Xs(D),H&&ho(H),V.stop(),R&&(R.flags|=8,j(ee,h,v,E)),M&&rt(M,v),rt(()=>{h.isUnmounted=!0},v)},ve=(h,v,E,H=!1,V=!1,R=0)=>{for(let ee=R;ee<h.length;ee++)j(h[ee],v,E,H,V)},ye=h=>{if(h.shapeFlag&6)return ye(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const v=f(h.anchor||h.el),E=v&&v[ou];return E?f(E):v};let Be=!1;const at=(h,v,E)=>{h==null?v._vnode&&j(v._vnode,null,null,!0):g(v._vnode||null,h,v,null,null,null,E),v._vnode=h,Be||(Be=!0,ps(),hs(),Be=!1)},$e={p:g,um:j,m:Z,r:Ee,mt:$,mc:B,pc:x,pbc:I,n:ye,o:e};return{render:at,hydrate:void 0,createApp:Cu(at)}}function Hi({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 fn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function zu(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Zs(e,t,n=!1){const o=e.children,i=t.children;if(le(o)&&le(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]=tn(i[r]),l.el=s.el),!n&&l.patchFlag!==-2&&Zs(s,l)),l.type===No&&l.patchFlag!==-1&&(l.el=s.el),l.type===Ke&&!l.el&&(l.el=s.el)}}function Au(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 Ys(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ys(t)}function Xs(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const Bu=Symbol.for("v-scx"),Lu=()=>Ut(Bu);function Gs(e,t){return Lo(e,null,t)}function ju(e,t){return Lo(e,null,{flush:"sync"})}function de(e,t,n){return Lo(e,t,n)}function Lo(e,t,n=me){const{immediate:o,deep:i,flush:r,once:s}=n,l=De({},n),a=t&&o||!t&&r!=="post";let u;if(Qn){if(r==="sync"){const p=Lu();u=p.__watcherHandles||(p.__watcherHandles=[])}else if(!a){const p=()=>{};return p.stop=Tt,p.resume=Tt,p.pause=Tt,p}}const c=Ze;l.call=(p,w,g)=>_t(p,c,w,g);let d=!1;r==="post"?l.scheduler=p=>{rt(p,c&&c.suspense)}:r!=="sync"&&(d=!0,l.scheduler=(p,w)=>{w?p():Mi(p)}),l.augmentJob=p=>{t&&(p.flags|=4),d&&(p.flags|=2,c&&(p.id=c.uid,p.i=c))};const f=Yc(e,t,l);return Qn&&(u?u.push(f):a&&f()),f}function Nu(e,t,n){const o=this.proxy,i=ze(e)?e.includes(".")?Js(o,e):()=>o[e]:e.bind(o,o);let r;pe(t)?r=t:(r=t.handler,n=t);const s=Jn(this),l=Lo(i,r.bind(o),n);return s(),l}function Js(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 st(e,t,n=me){const o=hn(),i=Fe(t),r=Qe(t),s=Qs(e,i),l=cs((a,u)=>{let c,d=me,f;return ju(()=>{const p=e[i];et(c,p)&&(c=p,u())}),{get(){return a(),n.get?n.get(c):c},set(p){const w=n.set?n.set(p):p;if(!et(w,c)&&!(d!==me&&et(p,d)))return;const g=o.vnode.props;g&&(t in g||i in g||r in g)&&(`onUpdate:${t}`in g||`onUpdate:${i}`in g||`onUpdate:${r}`in g)||(c=p,u()),o.emit(`update:${t}`,w),et(p,w)&&et(p,d)&&!et(w,f)&&u(),d=p,f=w}}});return l[Symbol.iterator]=()=>{let a=0;return{next(){return a<2?{value:a++?s||me:l,done:!1}:{done:!0}}}},l}const Qs=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${Fe(t)}Modifiers`]||e[`${Qe(t)}Modifiers`];function Vu(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||me;let i=n;const r=t.startsWith("update:"),s=r&&Qs(o,t.slice(7));s&&(s.trim&&(i=n.map(c=>ze(c)?c.trim():c)),s.number&&(i=n.map(gi)));let l,a=o[l=hi(t)]||o[l=hi(Fe(t))];!a&&r&&(a=o[l=hi(Qe(t))]),a&&_t(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,_t(u,e,6,i)}}const Ru=new WeakMap;function el(e,t,n=!1){const o=n?Ru:t.emitsCache,i=o.get(e);if(i!==void 0)return i;const r=e.emits;let s={},l=!1;if(!pe(e)){const a=u=>{const c=el(u,t,!0);c&&(l=!0,De(s,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!r&&!l?(Pe(e)&&o.set(e,null),null):(le(r)?r.forEach(a=>s[a]=null):De(s,r),Pe(e)&&o.set(e,s),s)}function jo(e,t){return!e||!ao(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ce(e,t[0].toLowerCase()+t.slice(1))||Ce(e,Qe(t))||Ce(e,t))}function B0(){}function tl(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:w,inheritAttrs:g}=e,O=Mo(e);let S,A;try{if(n.shapeFlag&4){const k=i||o,m=k;S=Mt(u.call(m,k,c,d,p,f,w)),A=l}else{const k=t;S=Mt(k.length>1?k(d,{attrs:l,slots:s,emit:a}):k(d,null)),A=t.props?l:Hu(l)}}catch(k){Yn.length=0,Io(k,e,1),S=N(Ke)}let F=S;if(A&&g!==!1){const k=Object.keys(A),{shapeFlag:m}=F;k.length&&m&7&&(r&&k.some(di)&&(A=Fu(A,r)),F=en(F,A,!1,!0))}return n.dirs&&(F=en(F,null,!1,!0),F.dirs=F.dirs?F.dirs.concat(n.dirs):n.dirs),n.transition&&Wn(F,n.transition),S=F,Mo(O),S}const Hu=e=>{let t;for(const n in e)(n==="class"||n==="style"||ao(n))&&((t||(t={}))[n]=e[n]);return t},Fu=(e,t)=>{const n={};for(const o in e)(!di(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Wu(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?nl(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]&&!jo(u,f))return!0}}}else return(i||l)&&(!l||!l.$stable)?!0:o===s?!1:o?s?nl(o,s,u):!0:!!s;return!1}function nl(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]&&!jo(n,r))return!0}return!1}function qu({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 ol=e=>e.__isSuspense;function Uu(e,t){t&&t.pendingBranch?le(e)?t.effects.push(...e):t.effects.push(e):nu(e)}const we=Symbol.for("v-fgt"),No=Symbol.for("v-txt"),Ke=Symbol.for("v-cmt"),Vo=Symbol.for("v-stc"),Yn=[];let lt=null;function b(e=!1){Yn.push(lt=e?null:[])}function Ku(){Yn.pop(),lt=Yn[Yn.length-1]||null}let Xn=1;function Ro(e,t=!1){Xn+=e,e<0&&lt&&t&&(lt.hasOnce=!0)}function il(e){return e.dynamicChildren=Xn>0?lt||yt:null,Ku(),Xn>0&&lt&&lt.push(e),e}function z(e,t,n,o,i,r){return il(K(e,t,n,o,i,r,!0))}function se(e,t,n,o,i){return il(N(e,t,n,o,i,!0))}function Gn(e){return e?e.__v_isVNode===!0:!1}function pn(e,t){return e.type===t.type&&e.key===t.key}const rl=({key:e})=>e??null,Ho=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?ze(e)||Ae(e)||pe(e)?{i:Re,r:e,k:t,f:!!n}:e:null);function K(e,t=null,n=null,o=0,i=null,r=e===we?0:1,s=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&rl(t),ref:t&&Ho(t),scopeId:ms,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:Re};return l?(Fi(a,n),r&128&&e.normalize(a)):n&&(a.shapeFlag|=ze(n)?8:16),Xn>0&&!s&&lt&&(a.patchFlag>0||r&6)&&a.patchFlag!==32&&lt.push(a),a}const N=Zu;function Zu(e,t=null,n=null,o=0,i=null,r=!1){if((!e||e===Is)&&(e=Ke),Gn(e)){const l=en(e,t,!0);return n&&Fi(l,n),Xn>0&&!r&&lt&&(l.shapeFlag&6?lt[lt.indexOf(e)]=l:lt.push(l)),l.patchFlag=-2,l}if(sd(e)&&(e=e.__vccOpts),t){t=Yu(t);let{class:l,style:a}=t;l&&!ze(l)&&(t.class=ue(l)),Pe(a)&&(Ii(a)&&!le(a)&&(a=De({},a)),t.style=Te(a))}const s=ze(e)?1:ol(e)?128:vs(e)?64:Pe(e)?4:pe(e)?2:0;return K(e,t,n,o,i,s,r,!0)}function Yu(e){return e?Ii(e)||Rs(e)?De({},e):e:null}function en(e,t,n=!1,o=!1){const{props:i,ref:r,patchFlag:s,children:l,transition:a}=e,u=t?Mn(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&rl(u),ref:t&&t.ref?n&&r?le(r)?r.concat(Ho(t)):[r,Ho(t)]:Ho(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!==we?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&&en(e.ssContent),ssFallback:e.ssFallback&&en(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&Wn(c,a.clone(c)),c}function Kt(e=" ",t=0){return N(No,null,e,t)}function Xu(e,t){const n=N(Vo,null,e);return n.staticCount=t,n}function ae(e="",t=!1){return t?(b(),se(Ke,null,e)):N(Ke,null,e)}function Mt(e){return e==null||typeof e=="boolean"?N(Ke):le(e)?N(we,null,e.slice()):Gn(e)?tn(e):N(No,null,String(e))}function tn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:en(e)}function Fi(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(le(t))n=16;else if(typeof t=="object")if(o&65){const i=t.default;i&&(i._c&&(i._d=!1),Fi(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Rs(t)?t._ctx=Re:i===3&&Re&&(Re.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else pe(t)?(t={default:t,_ctx:Re},n=32):(t=String(t),o&64?(n=16,t=[Kt(t)]):n=8);e.children=t,e.shapeFlag|=n}function Mn(...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=ue([t.class,o.class]));else if(i==="style")t.style=Te([t.style,o.style]);else if(ao(i)){const r=t[i],s=o[i];s&&r!==s&&!(le(r)&&r.includes(s))&&(t[i]=r?[].concat(r,s):s)}else i!==""&&(t[i]=o[i])}return t}function Ot(e,t,n,o=null){_t(e,t,7,[n,o])}const Gu=Ls();let Ju=0;function Qu(e,t,n){const o=e.type,i=(t?t.appContext:e.appContext)||Gu,r={uid:Ju++,vnode:e,type:o,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new mc(!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:Fs(o,i),emitsOptions:el(o,i),emit:null,emitted:null,propsDefaults:me,inheritAttrs:o.inheritAttrs,ctx:me,data:me,props:me,attrs:me,slots:me,refs:me,setupState:me,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=Vu.bind(null,r),e.ce&&e.ce(r),r}let Ze=null;const hn=()=>Ze||Re;let Fo,Wi;{const e=go(),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)}};Fo=t("__VUE_INSTANCE_SETTERS__",n=>Ze=n),Wi=t("__VUE_SSR_SETTERS__",n=>Qn=n)}const Jn=e=>{const t=Ze;return Fo(e),e.scope.on(),()=>{e.scope.off(),Fo(t)}},sl=()=>{Ze&&Ze.scope.off(),Fo(null)};function ll(e){return e.vnode.shapeFlag&4}let Qn=!1;function ed(e,t=!1,n=!1){t&&Wi(t);const{props:o,children:i}=e.vnode,r=ll(e);Tu(e,o,r,t),Mu(e,i,n||t);const s=r?td(e,t):void 0;return t&&Wi(!1),s}function td(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,bu);const{setup:o}=n;if(o){Pt();const i=e.setupContext=o.length>1?od(e):null,r=Jn(e),s=Tn(o,e,0,[e.props,i]),l=Ar(s);if(It(),r(),(l||e.sp)&&!En(e)&&ks(e),l){if(s.then(sl,sl),t)return s.then(a=>{al(e,a)}).catch(a=>{Io(a,e,0)});e.asyncDep=s}else al(e,s)}else cl(e)}function al(e,t,n){pe(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Pe(t)&&(e.setupState=as(t)),cl(e)}function cl(e,t,n){const o=e.type;e.render||(e.render=o.render||Tt);{const i=Jn(e);Pt();try{yu(e)}finally{It(),i()}}}const nd={get(e,t){return Ue(e,"get",""),e[t]}};function od(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,nd),slots:e.slots,emit:e.emit,expose:t}}function Wo(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(as(jc(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Un)return Un[n](e)},has(t,n){return n in t||n in Un}})):e.proxy}const id=/(?:^|[-_])\w/g,rd=e=>e.replace(id,t=>t.toUpperCase()).replace(/[-_]/g,"");function ul(e,t=!0){return pe(e)?e.displayName||e.name:e.name||t&&e.__name}function dl(e,t,n=!1){let o=ul(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?rd(o):n?"App":"Anonymous"}function sd(e){return pe(e)&&"__vccOpts"in e}const Q=(e,t)=>Kc(e,t,Qn);function fl(e,t,n){try{Ro(-1);const o=arguments.length;return o===2?Pe(t)&&!le(t)?Gn(t)?N(e,null,[t]):N(e,t):N(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&Gn(n)&&(n=[n]),N(e,t,n))}finally{Ro(1)}}const ld="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 Wi;const fl=typeof window<"u"&&window.trustedTypes;if(fl)try{Wi=fl.createPolicy("vue",{createHTML:e=>e})}catch{}const pl=Wi?e=>Wi.createHTML(e):e=>e,ld="http://www.w3.org/2000/svg",ad="http://www.w3.org/1998/Math/MathML",Kt=typeof document<"u"?document:null,hl=Kt&&Kt.createElement("template"),cd={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"?Kt.createElementNS(ld,e):t==="mathml"?Kt.createElementNS(ad,e):n?Kt.createElement(e,{is:n}):Kt.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>Kt.createTextNode(e),createComment:e=>Kt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Kt.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{hl.innerHTML=pl(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const l=hl.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]}},tn="transition",Qn="animation",eo=Symbol("_vtc"),gl={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},ud=De({},vs,gl),to=(e=>(e.displayName="Transition",e.props=ud,e))((e,{slots:t})=>dl(ru,dd(e),t)),hn=(e,t=[])=>{le(e)?e.forEach(n=>n(...t)):e&&e(...t)},ml=e=>e?le(e)?e.some(t=>t.length>1):e.length>1:!1;function dd(e){const t={};for(const L in e)L in gl||(t[L]=e[L]);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,w=fd(i),g=w&&w[0],O=w&&w[1],{onBeforeEnter:S,onEnter:A,onEnterCancelled:F,onLeave:k,onLeaveCancelled:m,onBeforeAppear:P=S,onAppear:C=A,onAppearCancelled:B=F}=t,y=(L,Y,$,X)=>{L._enterCancelled=X,gn(L,Y?c:l),gn(L,Y?u:s),$&&$()},I=(L,Y)=>{L._isLeaving=!1,gn(L,d),gn(L,p),gn(L,f),Y&&Y()},W=L=>(Y,$)=>{const X=L?C:A,J=()=>y(Y,L,$);hn(X,[Y,J]),vl(()=>{gn(Y,L?a:r),Zt(Y,L?c:l),ml(X)||bl(Y,o,g,J)})};return De(t,{onBeforeEnter(L){hn(S,[L]),Zt(L,r),Zt(L,s)},onBeforeAppear(L){hn(P,[L]),Zt(L,a),Zt(L,u)},onEnter:W(!1),onAppear:W(!0),onLeave(L,Y){L._isLeaving=!0;const $=()=>I(L,Y);Zt(L,d),L._enterCancelled?(Zt(L,f),xl(L)):(xl(L),Zt(L,f)),vl(()=>{L._isLeaving&&(gn(L,d),Zt(L,p),ml(k)||bl(L,o,O,$))}),hn(k,[L,$])},onEnterCancelled(L){y(L,!1,void 0,!0),hn(F,[L])},onAppearCancelled(L){y(L,!0,void 0,!0),hn(B,[L])},onLeaveCancelled(L){I(L),hn(m,[L])}})}function fd(e){if(e==null)return null;if(Pe(e))return[qi(e.enter),qi(e.leave)];{const t=qi(e);return[t,t]}}function qi(e){return gi(e)}function Zt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[eo]||(e[eo]=new Set)).add(t)}function gn(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[eo];n&&(n.delete(t),n.size||(e[eo]=void 0))}function vl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let pd=0;function bl(e,t,n,o){const i=e._endId=++pd,r=()=>{i===e._endId&&o()};if(n!=null)return setTimeout(r,n);const{type:s,timeout:l,propCount:a}=hd(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 hd(e,t){const n=window.getComputedStyle(e),o=w=>(n[w]||"").split(", "),i=o(`${tn}Delay`),r=o(`${tn}Duration`),s=yl(i,r),l=o(`${Qn}Delay`),a=o(`${Qn}Duration`),u=yl(l,a);let c=null,d=0,f=0;t===tn?s>0&&(c=tn,d=s,f=r.length):t===Qn?u>0&&(c=Qn,d=u,f=a.length):(d=Math.max(s,u),c=d>0?s>u?tn:Qn:null,f=c?c===tn?r.length:a.length:0);const p=c===tn&&/\b(?:transform|all)(?:,|$)/.test(o(`${tn}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function yl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>wl(n)+wl(e[o])))}function wl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function xl(e){return(e?e.ownerDocument:document).body.offsetHeight}function gd(e,t,n){const o=e[eo];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Wo=Symbol("_vod"),_l=Symbol("_vsh"),md={name:"show",beforeMount(e,{value:t},{transition:n}){e[Wo]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):no(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),no(e,!0),o.enter(e)):o.leave(e,()=>{no(e,!1)}):no(e,t))},beforeUnmount(e,{value:t}){no(e,t)}};function no(e,t){e.style.display=t?e[Wo]:"none",e[_l]=!t}const vd=Symbol(""),bd=/(?:^|;)\s*display\s*:/;function yd(e,t,n){const o=e.style,i=ze(n);let r=!1;if(n&&!i){if(t)if(ze(t))for(const s of t.split(";")){const l=s.slice(0,s.indexOf(":")).trim();n[l]==null&&qo(o,l,"")}else for(const s in t)n[s]==null&&qo(o,s,"");for(const s in n)s==="display"&&(r=!0),qo(o,s,n[s])}else if(i){if(t!==n){const s=o[vd];s&&(n+=";"+s),o.cssText=n,r=bd.test(n)}}else t&&e.removeAttribute("style");Wo in e&&(e[Wo]=r?o.display:"",e[_l]&&(o.display="none"))}const Sl=/\s*!important$/;function qo(e,t,n){if(le(n))n.forEach(o=>qo(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=wd(e,t);Sl.test(n)?e.setProperty(Qe(o),n.replace(Sl,""),"important"):e[o]=n}}const kl=["Webkit","Moz","ms"],Ui={};function wd(e,t){const n=Ui[t];if(n)return n;let o=Fe(t);if(o!=="filter"&&o in e)return Ui[t]=o;o=fo(o);for(let i=0;i<kl.length;i++){const r=kl[i]+o;if(r in e)return Ui[t]=r}return t}const Cl="http://www.w3.org/1999/xlink";function Tl(e,t,n,o,i,r=pc(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Cl,t.slice(6,t.length)):e.setAttributeNS(Cl,t,n):n==null||r&&!jr(n)?e.removeAttribute(t):e.setAttribute(t,r?"":wt(n)?String(n):n)}function Pl(e,t,n,o,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?pl(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=jr(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 mn(e,t,n,o){e.addEventListener(t,n,o)}function xd(e,t,n,o){e.removeEventListener(t,n,o)}const Il=Symbol("_vei");function _d(e,t,n,o,i=null){const r=e[Il]||(e[Il]={}),s=r[t];if(o&&s)s.value=o;else{const[l,a]=Sd(t);if(o){const u=r[t]=Td(o,i);mn(e,l,u,a)}else s&&(xd(e,l,s,a),r[t]=void 0)}}const El=/(?:Once|Passive|Capture)$/;function Sd(e){let t;if(El.test(e)){t={};let o;for(;o=e.match(El);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Qe(e.slice(2)),t]}let Ki=0;const kd=Promise.resolve(),Cd=()=>Ki||(kd.then(()=>Ki=0),Ki=Date.now());function Td(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;_t(Pd(o,n.value),t,5,[o])};return n.value=e,n.attached=Cd(),n}function Pd(e,t){if(le(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 Ml=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Id=(e,t,n,o,i,r)=>{const s=i==="svg";t==="class"?gd(e,o,s):t==="style"?yd(e,n,o):lo(t)?ui(t)||_d(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ed(e,t,o,s))?(Pl(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Tl(e,t,o,s,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ze(o))?Pl(e,Fe(t),o,r,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Tl(e,t,o,s))};function Ed(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ml(t)&&pe(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 Ml(t)&&ze(n)?!1:t in e}const Ol={};function Md(e,t,n){let o=he(e,t);co(o)&&(o=De({},o,t));class i extends Zi{constructor(s){super(o,s,n)}}return i.def=o,i}const Od=typeof HTMLElement<"u"?HTMLElement:class{};class Zi extends Od{constructor(t,n={},o=jl){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!==jl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(De({},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 Zi){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,pt(()=>{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&&!le(r))for(const a in r){const u=r[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=gi(this._props[a])),(l||(l=Object.create(null)))[Fe(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)Ce(this,o)||Object.defineProperty(this,o,{get:()=>U(n[o])})}_resolveProps(t){const{props:n}=t,o=le(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(Fe))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):Ol;const i=Fe(t);n&&this._numberProps&&this._numberProps[i]&&(o=gi(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===Ol?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(Qe(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Qe(t),n+""):n||this.removeAttribute(Qe(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),Vd(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=N(this._def,De(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,co(s[0])?De({detail:s},s[0]):{detail:s}))};o.emit=(r,...s)=>{i(r,s),Qe(r)!==r&&i(Qe(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 Uo=e=>{const t=e.props["onUpdate:modelValue"]||!1;return le(t)?n=>po(t,n):t};function $d(e){e.target.composing=!0}function $l(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Mn=Symbol("_assign");function Dl(e,t,n){return t&&(e=e.trim()),n&&(e=hi(e)),e}const Dd={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[Mn]=Uo(i);const r=o||i.props&&i.props.type==="number";mn(e,t?"change":"input",s=>{s.target.composing||e[Mn](Dl(e.value,n,r))}),(n||r)&&mn(e,"change",()=>{e.value=Dl(e.value,n,r)}),t||(mn(e,"compositionstart",$d),mn(e,"compositionend",$l),mn(e,"change",$l))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:i,number:r}},s){if(e[Mn]=Uo(s),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?hi(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))}},zd={deep:!0,created(e,t,n){e[Mn]=Uo(n),mn(e,"change",()=>{const o=e._modelValue,i=Ad(e),r=e.checked,s=e[Mn];if(le(o)){const l=Nr(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(ao(o)){const l=new Set(o);r?l.add(i):l.delete(i),s(l)}else s(Al(e,r))})},mounted:zl,beforeUpdate(e,t,n){e[Mn]=Uo(n),zl(e,t,n)}};function zl(e,{value:t,oldValue:n},o){e._modelValue=t;let i;if(le(t))i=Nr(t,o.props.value)>-1;else if(ao(t))i=t.has(o.props.value);else{if(t===n)return;i=go(t,Al(e,!0))}e.checked!==i&&(e.checked=i)}function Ad(e){return"_value"in e?e._value:e.value}function Al(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Bd=["ctrl","shift","alt","meta"],Ld={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)=>Bd.some(n=>e[`${n}Key`]&&!t.includes(n))},Ne=(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=Ld[t[s]];if(l&&l(i,t))return}return e(i,...r)})},jd={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Ko=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=i=>{if(!("key"in i))return;const r=Qe(i.key);if(t.some(s=>s===r||jd[s]===r))return e(i)})},Nd=De({patchProp:Id},cd);let Bl;function Ll(){return Bl||(Bl=Ou(Nd))}const Vd=(...e)=>{Ll().render(...e)},jl=(...e)=>{const t=Ll().createApp(...e),{mount:n}=t;return t.mount=o=>{const i=Hd(o);if(!i)return;const r=t._component;!pe(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const s=n(i,!1,Rd(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function Rd(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Hd(e){return ze(e)?document.querySelector(e):e}function On(e,t){if(typeof e.checkVisibility=="function")return e.checkVisibility({opacityProperty:!0,visibilityProperty:!1,contentVisibilityAuto:!1});const n=window.getComputedStyle(e);if(n.display==="none"||n.opacity&&parseFloat(n.opacity)<.1)return!1;if(!t)return!0;const o=e.parentElement;return!o||o===t?!0:On(o,t)}async function mt(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 mt(e-1,t,n);i(r)},t)})}function vn(e,t){return e>=280&&t>=50||e>=160&&t>=280}var Yt;(function(e){e[e.manga=1]="manga",e[e.novel=2]="novel",e[e.anime=3]="anime"})(Yt||(Yt={}));async function Fd(e,t){const n=["NAV","ASIDE","FOOTER","HEADER","BR","HR","BUTTON","A"],o="img:not(nav img, header img, footer img, aside img), canvas",i=t==null?void 0:t.timeoutMs,r=t==null?void 0:t.include,s=t==null?void 0:t.paraSel,l=!r||r.includes(Yt.manga),a=!r||r.includes(Yt.novel);let u=0;return await mt(i/50,50,()=>{const p=c();if(p){if(l&&f(p,t==null?void 0:t.validateImgSize))return Yt.manga;if(a&&u++%3===0&&d(p))return Yt.novel}});function c(){for(const p of e.split(",")){const w=document.querySelector(p);if(w)return w}}function d(p){const w=[`p:not(${n.map(F=>`${F} p`).join(",")})`,s].filter(Boolean).join(",");if(!p.querySelector(w)&&(!s||!p.matches(s)))return!1;let g=0,O=0,S=0;return A(p);function A(F){const k=F.tagName;if(n.includes(k)||!On(F)||window.getComputedStyle(F).position==="fixed")return!1;if(k==="P"||s&&F.matches(s))return g+=F.textContent.split(" ").filter(Boolean).length,O++,S=0,!l&&g>50||O>10&&g>120||O>5&&g>250||g>400;O>0&&++S>4&&(O=0,g=0);const P=Array.from(F.children);for(let C=0;C<P.length;C++)if(A(P[C]))return!0;return!1}}function f(p,w){const g=Array.from(p.querySelectorAll(o));if(w===!1)return g.length>0;const O=Math.min(window.innerWidth*.9,500);let S=0;for(let A=0;A<g.length;A++){const F=g[A];if(!On(F,p))continue;const{width:k,height:m}=F.getBoundingClientRect();if(vn(k,m)&&(k>=O||(S+=m,S>=O)))return!0}return!1}}function Yi(e,t){return vi()?(mc(e,t),!0):!1}const Xi=new WeakMap,Wd=(...e)=>{var t;const n=e[0],o=(t=pn())===null||t===void 0?void 0:t.proxy,i=o??vi();if(i==null&&!Ls())throw new Error("injectLocal must be called in setup");return i&&Xi.has(i)&&n in Xi.get(i)?Xi.get(i)[n]:qt(...e)},Nl=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const qd=e=>e!=null,Ud=Object.prototype.toString,Kd=e=>Ud.call(e)==="[object Object]",$n=()=>{};function Zd(...e){if(e.length!==1)return Fc(...e);const t=e[0];return typeof t=="function"?Vn(as(()=>({get:t,set:$n}))):ne(t)}function Vl(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 Rl=e=>e();function Yd(e,t={}){let n,o,i=$n;const r=a=>{clearTimeout(a),i(),i=$n};let s;return a=>{const u=ft(e),c=ft(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 Xd(e=Rl,t={}){const{initialState:n="active"}=t,o=Zd(n==="active");function i(){o.value=!1}function r(){o.value=!0}const s=(...l)=>{o.value&&e(...l)};return{isActive:Vn(o),pause:i,resume:r,eventFilter:s}}function Hl(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function oo(e){return Array.isArray(e)?e:[e]}function Gd(e){return pn()}function vt(e,t=200,n={}){return Vl(Yd(t,n),e)}function Jd(e,t,n={}){const{eventFilter:o=Rl,...i}=n;return de(e,Vl(o,t),i)}function Qd(e,t,n={}){const{eventFilter:o,initialState:i="active",...r}=n,{eventFilter:s,pause:l,resume:a,isActive:u}=Xd(o,{initialState:i});return{stop:Jd(e,t,{...r,eventFilter:s}),pause:l,resume:a,isActive:u}}const ef=Qd;function Gi(e,t=!0,n){Gd()?je(e,n):t?e():pt(e)}function tf(e,t,n){return de(e,t,{...n,immediate:!0})}const St=Nl?window:void 0,nf=Nl?window.document:void 0;function $t(e){var t;const n=ft(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function kt(...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=Q(()=>{const l=oo(ft(e[0])).filter(a=>a!=null);return l.every(a=>typeof a!="string")?l:void 0}),r=tf(()=>{var l,a;return[(l=(a=i.value)===null||a===void 0?void 0:a.map(u=>$t(u)))!==null&&l!==void 0?l:[St].filter(u=>u!=null),oo(ft(i.value?e[1]:e[0])),oo(U(i.value?e[2]:e[1])),ft(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=Kd(c)?{...c}:c;t.push(...l.flatMap(f=>a.flatMap(p=>u.map(w=>o(f,p,w,d)))))},{flush:"post"}),s=()=>{r(),n()};return Yi(n),s}function of(){const e=dt(!1),t=pn();return t&&je(()=>{e.value=!0},t),e}function Ji(e){const t=of();return Q(()=>(t.value,!!e()))}const rf=Symbol("vueuse-ssr-width");function sf(){const e=Ls()?Wd(rf,null):null;return typeof e=="number"?e:void 0}function lf(e,t={}){const{window:n=St,ssrWidth:o=sf()}=t,i=Ji(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),r=dt(typeof o=="number"),s=dt(),l=dt(!1),a=u=>{l.value=u.matches};return Xs(()=>{if(r.value){r.value=!i.value,l.value=ft(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>=Hl(d[1])),f&&p&&(p=o<=Hl(f[1])),c?!p:p});return}i.value&&(s.value=n.matchMedia(ft(e)),l.value=s.value.matches)}),kt(s,"change",a,{passive:!0}),Q(()=>l.value)}const Zo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Yo="__vueuse_ssr_handlers__",af=cf();function cf(){return Yo in Zo||(Zo[Yo]=Zo[Yo]||{}),Zo[Yo]}function uf(e,t){return af[e]||t}function df(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 ff={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()}},Fl="vueuse-storage";function pf(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=St,eventFilter:f,onError:p=$=>{console.error($)},initOnMounted:w}=o,g=(c?dt:ne)(typeof t=="function"?t():t),O=Q(()=>ft(e));if(!n)try{n=uf("getDefaultStorage",()=>St==null?void 0:St.localStorage)()}catch($){p($)}if(!n)return g;const S=ft(t),A=df(S),F=(i=o.serializer)!==null&&i!==void 0?i:ff[A],{pause:k,resume:m}=ef(g,$=>I($),{flush:r,deep:s,eventFilter:f});de(O,()=>L(),{flush:r});let P=!1;const C=$=>{w&&!P||L($)},B=$=>{w&&!P||Y($)};d&&l&&(n instanceof Storage?kt(d,"storage",C,{passive:!0}):kt(d,Fl,B)),w?Gi(()=>{P=!0,L()}):L();function y($,X){if(d){const J={key:O.value,oldValue:$,newValue:X,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",J):new CustomEvent(Fl,{detail:J}))}}function I($){try{const X=n.getItem(O.value);if($==null)y(X,null),n.removeItem(O.value);else{const J=F.write($);X!==J&&(n.setItem(O.value,J),y(X,J))}}catch(X){p(X)}}function W($){const X=$?$.newValue:n.getItem(O.value);if(X==null)return a&&S!=null&&n.setItem(O.value,F.write(S)),S;if(!$&&u){const J=F.read(X);return typeof u=="function"?u(J,S):A==="object"&&!Array.isArray(J)?{...S,...J}:J}else return typeof X!="string"?X:F.read(X)}function L($){if(!($&&$.storageArea!==n)){if($&&$.key==null){g.value=S;return}if(!($&&$.key!==O.value)){k();try{const X=F.write(g.value);($===void 0||($==null?void 0:$.newValue)!==X)&&(g.value=W($))}catch(X){p(X)}finally{$?pt(m):m()}}}}function Y($){L($.detail)}return g}function Qi(e={}){const{document:t=nf}=e;if(!t)return dt("visible");const n=dt(t.visibilityState);return kt(t,"visibilitychange",()=>{n.value=t.visibilityState},{passive:!0}),n}function hf(e,t,n={}){const{window:o=St,...i}=n;let r;const s=Ji(()=>o&&"ResizeObserver"in o),l=()=>{r&&(r.disconnect(),r=void 0)},a=de(Q(()=>{const c=ft(e);return Array.isArray(c)?c.map(d=>$t(d)):[$t(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 Yi(u),{isSupported:s,stop:u}}function Wl(e,t={width:0,height:0},n={}){const{window:o=St,box:i="content-box"}=n,r=Q(()=>{var d;return(d=$t(e))===null||d===void 0||(d=d.namespaceURI)===null||d===void 0?void 0:d.includes("svg")}),s=dt(t.width),l=dt(t.height),{stop:a}=hf(e,([d])=>{const f=i==="border-box"?d.borderBoxSize:i==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(o&&r.value){const p=$t(e);if(p){const w=p.getBoundingClientRect();s.value=w.width,l.value=w.height}}else if(f){const p=oo(f);s.value=p.reduce((w,{inlineSize:g})=>w+g,0),l.value=p.reduce((w,{blockSize:g})=>w+g,0)}else s.value=d.contentRect.width,l.value=d.contentRect.height},n);Gi(()=>{const d=$t(e);d&&(s.value="offsetWidth"in d?d.offsetWidth:t.width,l.value="offsetHeight"in d?d.offsetHeight:t.height)});const u=de(()=>$t(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 gf(e,t,n={}){const{root:o,rootMargin:i="0px",threshold:r=0,window:s=St,immediate:l=!0}=n,a=Ji(()=>s&&"IntersectionObserver"in s),u=Q(()=>oo(ft(e)).map($t).filter(qd));let c=$n;const d=dt(l),f=a.value?de(()=>[u.value,$t(o),d.value],([w,g])=>{if(c(),!d.value||!w.length)return;const O=new IntersectionObserver(t,{root:$t(g),rootMargin:i,threshold:r});w.forEach(S=>S&&O.observe(S)),c=()=>{O.disconnect(),c=$n}},{immediate:l,flush:"post"}):$n,p=()=>{c(),f(),d.value=!1};return Yi(p),{isSupported:a,isActive:d,pause(){c(),d.value=!1},resume(){d.value=!0},stop:p}}function mf(e,t,n={}){const{window:o=St}=n;return pf(e,t,o==null?void 0:o.localStorage,n)}function bn(e={}){const{window:t=St,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:r=!0,type:s="inner"}=e,l=dt(n),a=dt(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(),Gi(u);const c={passive:!0};return kt("resize",u,c),t&&s==="visual"&&t.visualViewport&&kt(t.visualViewport,"resize",u,c),i&&de(lf("(orientation: portrait)"),()=>u()),{width:l,height:a}}class io{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=[]}}re(io,"handlers",[]);function er(e){je(()=>io.register(e)),gt(()=>io.unregister(e))}const ql=he({__name:"HelpScreen",props:{touchDevice:{type:Boolean}},emits:["hide"],setup(e,{emit:t}){const n=e,o=t,i=ne(null),r=ne([]);er(()=>(o("hide"),!0)),je(async()=>{const u=Wl(i),c=vt(()=>{s({width:u.width.value,height:u.height.value})},50);c(),de(u.width,c),de(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,w=0;const g=50,O=25;u.forEach(m=>{var I;const P=(I=m.getAttribute("title"))==null?void 0:I.trim(),C=m.getBoundingClientRect();if(!P||!C.height||!C.width)return;const B=Math.ceil((C.top-10)/g),y=Math.ceil((C.left-10)/g);f.push({isTour:!1,title:P,rect:C,fromX:y,toX:Math.max(y+1,Math.ceil((C.right+10)/g)),fromY:B,toY:Math.max(B+1,Math.ceil((C.bottom+10)/g))})}),f.forEach(m=>{for(let P=m.fromY;P<m.toY;P++){d[P]??(d[P]=[]);for(let C=m.fromX;C<m.toX;C++)d[P][C]=m;m.toY>p+1&&(p=m.toY-1),m.toX>w+1&&(w=m.toX-1)}});let S=w/2;f.forEach(m=>{m.isAlignRight=m.fromX>S});const A=(m,P)=>{d[P]??(d[P]=[]);const C=P>=m.toY;if(m.isTour)for(let B=m.fromX;B<m.toX;B++)delete d[m.fromY][B],m.fromY=P,m.toY=P+(C?1:-1),d[P][B]=m;else{const B=m.isAlignRight?m.fromX-3:m.fromX,y=B+3;m.helpItem={fromX:B,toX:y,fromY:P,toY:P+1,isTour:!0,isAlignRight:m.isAlignRight};for(let I=B;I<y;I++)d[P][I]=m.helpItem}},F=(m,P)=>{if(P>p||P<0)return!1;const C=P>=m.toY,B=d[P];if(!B)return A(m,P),!0;const y=B[m.fromX];if(y&&!y.isTour)return!1;if(y&&y.isTour)return F(y,C?P+1:P-1)?(A(m,P),!0):!1;if(!y){const I=m.isAlignRight?-1:1;return B[m.fromX+I]||B[m.fromX+I*2]?F(m,C?P+1:P-1):(A(m,P),!0)}return!1};f.forEach(m=>{if(!F(m,m.toY)){if(m.isAlignRight){const P=d[m.fromY]??[];if(!P.slice(m.fromX-3,m.fromX).filter(Boolean).length){const B=m.fromX-3,y=m.fromX;m.helpItem={isTour:!0,isAlignRight:!0,fromX:B,toX:y,fromY:m.fromY,toY:m.toY};for(let I=m.fromX-3;I<m.fromX;I++)P[I]=m.helpItem;return}}F(m,m.fromY-1)}});const k=[];return f.forEach(m=>{const{title:P,helpItem:C,rect:B,isAlignRight:y,fromX:I,fromY:W,toY:L}=m;if(!P||!C||!B)return;const Y=C.fromY>=L,$=C.toY<=W;k.push({title:a(P),style:{top:Y?`${B.bottom+(C.fromY-L)*g+O}px`:$?void 0:`${B.top+8}px`,bottom:$?`${c.height-B.top+(C.toY-W)*g+O}px`:void 0,left:y?void 0:`${B.left}px`,right:y?Y?`${c.width-B.right}px`:`${c.width-B.right+B.width+O}px`:void 0},arrowStyle:{width:$||Y?"2px":`${Math.abs(C.toX-I)*g+O-5}px`,height:$||Y?`${(Y?C.fromY-L:W-C.toY)*g+O}px`:"2px",top:Y?`${B.bottom}px`:$?void 0:`${B.top+20}px`,bottom:$?`${c.height-B.top}px`:void 0,left:y?void 0:`${B.left+B.width/2}px`,right:y?Y?`${c.width-B.right+B.width/2}px`:`${c.width-B.right+B.width}px`:void 0}})}),k}function a(u){return n.touchDevice?u.split("(")[0].trim():u}return(u,c)=>(b(),z(we,null,[c[1]||(c[1]=K("div",{class:"fixed inset-0 bg-black bg-opacity-90"},null,-1)),K("div",{ref_key:"root",ref:i,class:"fixed inset-0 z-20 overscroll-contain select-none",onClick:c[0]||(c[0]=Ne(d=>o("hide"),["stop"]))},[(b(!0),z(we,null,Jt(r.value,d=>(b(),z(we,{key:d.title},[K("div",{class:"absolute",style:Te(d.style)},We(d.title),5),K("div",{class:"absolute bg-stone-300 rounded-lg",style:Te(d.arrowStyle)},null,4)],64))),128))],512)],64))}}),vf=Object.freeze(Object.defineProperty({__proto__:null,default:ql},Symbol.toStringTag,{value:"Module"}));function nn(e,t){let n=null;return(...o)=>{n===null&&(n=setTimeout(()=>{n=null,e(...o)},t))}}const bf=he({__name:"ReaderTour",emits:["hide"],setup(e,{emit:t}){const n=t,o=ne(null),i=ne(0),r=ne([]),s=Q(()=>r.value[i.value]),l=nn(a,500);je(()=>{const d=Wl(o),f=vt(()=>u({width:d.width.value,height:d.height.value}),50);f(),de(d.width,f),de(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:w})=>{const g=p.top<d.height-p.bottom,O=p.left<d.width-p.right;return{text:w,style:{left:`${p.left}px`,top:`${p.top}px`,width:`${p.width}px`,height:`${p.height}px`},textStyle:{left:O?`${p.left-12}px`:void 0,right:O?void 0:`${d.width-p.left}px`,top:g?`${p.bottom+12}px`:`${p.top+20}px`,textAlign:g?void 0:"right",transform:g?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(w=>{var S;const g=(S=w.getAttribute("data-tour"))==null?void 0:S.trim();if(!(g!=null&&g.length))return;const O=w.getBoundingClientRect();f.push({rect:O,text:g})}),f}return(d,f)=>{var p,w;return b(),z(we,null,[K("div",{class:ue(["fixed inset-0 bg-black bg-opacity-50 duration-500",{"opacity-0":!s.value,"opacity-100":!!s.value}])},null,2),K("div",{ref_key:"root",ref:o,class:"tour",onClick:f[0]||(f[0]=Ne((...g)=>U(l)&&U(l)(...g),["stop"]))},[s.value?(b(),z("div",{key:i.value,class:"tour__target",style:Te(s.value.style)},null,4)):ae("",!0),(b(),z("div",{key:i.value,class:"tour__text",style:Te((p=s.value)==null?void 0:p.textStyle)},We(((w=s.value)==null?void 0:w.text)??""),5))],512)],64)}}}),yf=".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}}",be=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Ul=be(bf,[["styles",[yf]]]),wf=Object.freeze(Object.defineProperty({__proto__:null,default:Ul},Symbol.toStringTag,{value:"Module"}));function xf({touchDevice:e}){const t=ne(!1);let n=0;return Kn("busy:touchDevice",e),Kn("setBusyState",o=>{n+=o?1:-1;const i=n>0;t.value!=i&&(t.value=i)}),Q(()=>t.value)}function Xo(){const e=qt("busy:touchDevice"),t=qt("setBusyState");let n=!1;return gt(()=>{n&&(t==null||t(!1))}),(o,{desktopOnly:i=!1}={})=>{i&&e||(n=o,t==null||t(o))}}function _f(){const e=EventTarget.prototype.addEventListener,t=["click"];EventTarget.prototype.addEventListener=function(o,i,r){return e.call(this,o,i,t.includes(o)?n(r):r)},gt(()=>{EventTarget.prototype.addEventListener=e});function n(o){return o&&(typeof o=="boolean"?!1:(o.capture,{...o,capture:!1}))}}function Sf(e){Kn("hapticFeedback",e)}function Go(){return qt("hapticFeedback")}class kf{constructor(){re(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 Cf(){const e=new kf;return gt(()=>e.dispose()),Kn("keyController",e),e}function Dt(e){const t=qt("keyController");je(()=>t.addListener(e)),gt(()=>t.removeListener(e))}function Tf(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=ne(t&&e>0?e:+(sessionStorage.getItem("tk:page")??"0")||e);return Q({get:()=>o.value,set:i=>{o.value=i,sessionStorage.setItem("tk:page",i+"")}})}function Pf(){sessionStorage.removeItem("tk:page"),sessionStorage.removeItem("tk:page:path")}function If(e,t){if(!e)return!1;const n=e.split(".").slice(0,3),o=t.split(".");for(let i=0;i<n.length;i++){const r=+n[i],s=+o[i];if(r!==s)return r>s}return!1}const Ef=(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=>Ef(e,n))},updated:(e,t)=>{e.setAttribute("data-ripple",t.value)}},Mf={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"},tr=he({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=Xo(),r=Go();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)=>He((b(),se(Is(e.href?"a":"button"),En({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:Ne(u,["stop"]),onMouseenter:l,onMouseleave:a}),{default:ie(()=>[K("div",Mf,[ke(c.$slots,"default")])]),_:3},16,["class"])),[[U(zt),e.disabled?0:15]])}}),Of=Object.freeze(Object.defineProperty({__proto__:null,default:tr},Symbol.toStringTag,{value:"Module"})),$f={},Df={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function zf(e,t){return b(),z("svg",Df,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M19 12.998h-6v6h-2v-6H5v-2h6v-6h2v6h6z"},null,-1)])])}const Kl=be($f,[["render",zf]]),Af=Object.freeze(Object.defineProperty({__proto__:null,default:Kl},Symbol.toStringTag,{value:"Module"})),Bf={class:"h-screen w-full flex justify-center items-center relative"},Lf={key:0,class:"flex gap-6 p-6 duration-200"},jf={key:0,class:"inline-block rounded-full relative w-28 h-12 overflow-hidden"},Nf={key:0,class:"absolute bottom-0 left-0 right-0 flex justify-center pb-7 md:pb-6 lg:pb-4"},Vf={class:"flex justify-center items-center gap-1 pl-1 pr-2 h-full"},nr=be(he({__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=ne(null),r=ne(!1),s=ne(n.seconds),l=ne(n.seconds<=0),a=ne(n.seconds),u=Go();je(()=>{let f;gf(i,p=>{const w=p.some(g=>g.isIntersecting);w!==r.value&&(r.value=w,o("visibility-changed",w),l.value=n.seconds<=0,s.value=n.seconds,a.value=n.seconds,f&&(clearInterval(f),f=void 0),!(!r.value||l.value)&&(f=setInterval(()=>{s.value-=1,s.value<=0&&(clearInterval(f),f=void 0,o("next"))},1e3)))},{rootMargin:"-108px 0px"}),gt(()=>f&&clearInterval(f))});function c(){o("next"),u()}function d(){o("hide")}return(f,p)=>(b(),z("div",Bf,[K("div",{ref_key:"main",ref:i,class:"inline-flex text-base text-stone-300 select-none"},[N(to,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ie(()=>[r.value?(b(),z("div",Lf,[e.hasNext?(b(),z("div",jf,[r.value?(b(),z("div",{key:0,class:"absolute left-0 top-0 bottom-0 h-full bg-stone-600 bg-opacity-50",style:Te(l.value?{}:{animation:`auto-next ${a.value}s linear forwards`})},null,4)):ae("",!0),He((b(),z("button",{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:Ne(c,["stop"])},[Ut(We(l.value?"Next":`Next in ${s.value}`),1)])),[[U(zt)]])])):ae("",!0),He((b(),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:Ne(d,["stop"])},[Ut(We(e.offlineMode?"Close":"Hide"),1)])),[[U(zt)]])])):ae("",!0)]),_:1})],512),e.showAddButton?(b(),z("div",Nf,[N(tr,{class:"bg-primary w-min !h-9 !bg-opacity-100",onClick:p[0]||(p[0]=()=>o("add-to-library"))},{default:ie(()=>[K("div",Vf,[N(Kl,{class:"flex-shrink-0 w-auto"}),p[1]||(p[1]=K("span",{class:"text-sm text-stone-50"},"Add to library",-1))])]),_:1})])):ae("",!0)]))}}),[["styles",[".animate-auto-next{animation:auto-next 5s linear forwards}@keyframes auto-next{0%{width:0}to{width:100%}}"]]]),Rf=Object.freeze(Object.defineProperty({__proto__:null,default:nr},Symbol.toStringTag,{value:"Module"})),Je=he({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)=>(b(),se(tr,{class:ue(["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:ie(()=>[ke(o.$slots,"default")]),_:3},8,["class","disabled","href","title","transparent","enable-haptic-feedback"]))}}),Hf=Object.freeze(Object.defineProperty({__proto__:null,default:Je},Symbol.toStringTag,{value:"Module"})),Ff={},Wf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function qf(e,t){return b(),z("svg",Wf,[...t[0]||(t[0]=[K("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 Zl=be(Ff,[["render",qf]]),Uf=Object.freeze(Object.defineProperty({__proto__:null,default:Zl},Symbol.toStringTag,{value:"Module"})),or=he({__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 b(),se(Je,{href:e.offlineMode||!e.raw?"#":e.raw.title.url,title:`Back to ${((l=e.raw)==null?void 0:l.contentType)===U(Yt).novel?"novel":"manga"}`,transparent:e.transparent,"enable-haptic-feedback":"",onClick:i},{default:ie(()=>[N(Zl)]),_:1},8,["href","title","transparent"])}}}),Kf=Object.freeze(Object.defineProperty({__proto__:null,default:or},Symbol.toStringTag,{value:"Module"})),Zf={},Yf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Xf(e,t){return b(),z("svg",Yf,[...t[0]||(t[0]=[K("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 Yl=be(Zf,[["render",Xf]]),Gf=Object.freeze(Object.defineProperty({__proto__:null,default:Yl},Symbol.toStringTag,{value:"Module"})),Jf={},Qf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function ep(e,t){return b(),z("svg",Qf,[...t[0]||(t[0]=[K("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 Xl=be(Jf,[["render",ep]]),tp=Object.freeze(Object.defineProperty({__proto__:null,default:Xl},Symbol.toStringTag,{value:"Module"})),ir=he({__name:"ButtonEntry",props:{entryId:{type:null},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;Dt({onKeyUp:i=>{i.key==="t"&&!i.metaKey&&!i.ctrlKey&&n("click")}});function o(){n("click")}return(i,r)=>(b(),se(Je,{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:ie(()=>[e.entryId?(b(),se(Yl,{key:0})):(b(),se(Xl,{key:1}))]),_:1},8,["transparent","title"]))}}),np=Object.freeze(Object.defineProperty({__proto__:null,default:ir},Symbol.toStringTag,{value:"Module"})),op={},ip={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function rp(e,t){return b(),z("svg",ip,[...t[0]||(t[0]=[K("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 Gl=be(op,[["render",rp]]),sp=Object.freeze(Object.defineProperty({__proto__:null,default:Gl},Symbol.toStringTag,{value:"Module"})),Jo=he({inheritAttrs:!1,__name:"ButtonHide",props:{transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return(o,i)=>(b(),se(Je,{title:"Hide reader","data-tour":"You have entered reader mode, press here to return to the original page",class:ue(o.$attrs.class),transparent:e.transparent,onClick:i[0]||(i[0]=()=>n("click"))},{default:ie(()=>[N(Gl)]),_:1},8,["class","transparent"]))}}),lp=Object.freeze(Object.defineProperty({__proto__:null,default:Jo},Symbol.toStringTag,{value:"Module"})),ap={},cp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function up(e,t){return b(),z("svg",cp,[...t[0]||(t[0]=[K("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),K("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 rr=be(ap,[["render",up]]),dp=Object.freeze(Object.defineProperty({__proto__:null,default:rr},Symbol.toStringTag,{value:"Module"})),fp={},pp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function hp(e,t){return b(),z("svg",pp,[...t[0]||(t[0]=[K("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 sr=be(fp,[["render",hp]]),gp=Object.freeze(Object.defineProperty({__proto__:null,default:sr},Symbol.toStringTag,{value:"Module"})),lr=he({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 Dt({onKeyDown(i){!n.disabled&&i.key===" "&&(i.preventDefault(),o("click"))}}),(i,r)=>(b(),se(Je,{transparent:e.transparent,class:ue(i.$attrs.class),"data-tour":e.tourMessage,title:`${e.playing?"Pause":"Play"} (Space)`,disabled:e.disabled,onClick:r[0]||(r[0]=()=>o("click"))},{default:ie(()=>[e.playing?(b(),se(rr,{key:0})):(b(),se(sr,{key:1}))]),_:1},8,["transparent","class","data-tour","title","disabled"]))}}),mp=Object.freeze(Object.defineProperty({__proto__:null,default:lr},Symbol.toStringTag,{value:"Module"})),vp={},bp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"};function yp(e,t){return b(),z("svg",bp,[...t[0]||(t[0]=[K("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[K("circle",{cx:"14",cy:"14",r:"12"}),K("path",{d:"m23 23l7 7M9 12V9h3m4 0h3v3M9 16v3h3m7-3v3h-3"})],-1)])])}const Jl=be(vp,[["render",yp]]),wp=Object.freeze(Object.defineProperty({__proto__:null,default:Jl},Symbol.toStringTag,{value:"Module"})),xp={class:"block w-4 h-4"},_p={class:"w-12"},Ql=he({__name:"ButtonResetZoom",props:{zoom:{type:Number}},emits:["click"],setup(e,{emit:t}){const n=t;function o(i){n("click",i)}return(i,r)=>(b(),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:Ne(o,["stop"])},[K("div",xp,[N(Jl)]),K("div",_p,We(Math.ceil(e.zoom*100))+"%",1)]))}}),Sp=Object.freeze(Object.defineProperty({__proto__:null,default:Ql},Symbol.toStringTag,{value:"Module"})),kp={},Cp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 36 36"};function Tp(e,t){return b(),z("svg",Cp,[...t[0]||(t[0]=[K("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),K("path",{fill:"none",d:"M0 0h36v36H0z"},null,-1)])])}const ea=be(kp,[["render",Tp]]),Pp=Object.freeze(Object.defineProperty({__proto__:null,default:ea},Symbol.toStringTag,{value:"Module"})),ar=he({__name:"ButtonSettings",props:{disabled:{type:Boolean},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return Dt({onKeyUp:o=>{o.key==="s"&&!o.metaKey&&!o.ctrlKey&&n("click")}}),(o,i)=>(b(),se(Je,{transparent:e.transparent,title:"Reader preferences (S)",disabled:e.disabled,onClick:i[0]||(i[0]=()=>n("click"))},{default:ie(()=>[N(ea)]),_:1},8,["transparent","disabled"]))}}),Ip=Object.freeze(Object.defineProperty({__proto__:null,default:ar},Symbol.toStringTag,{value:"Module"})),Ep={},Mp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function Op(e,t){return b(),z("svg",Mp,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M4 4h6v2H6v4H4V4Zm10 0h6v6h-2V6h-4V4ZM6 14v4h4v2H4v-6h2Zm14 0v6h-6v-2h4v-4h2Z"},null,-1)])])}const ta=be(Ep,[["render",Op]]),$p=Object.freeze(Object.defineProperty({__proto__:null,default:ta},Symbol.toStringTag,{value:"Module"})),Dp={},zp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function Ap(e,t){return b(),z("svg",zp,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M14 20v-6h6v2h-4v4h-2Zm-6 0v-4H4v-2h6v6H8Zm12-10h-6V4h2v4h4v2Zm-10 0H4V8h4V4h2v6Z"},null,-1)])])}const na=be(Dp,[["render",Ap]]),Bp=Object.freeze(Object.defineProperty({__proto__:null,default:na},Symbol.toStringTag,{value:"Module"})),cr=he({__name:"ButtonWebFullScreen",props:{transparent:{type:Boolean}},emits:["request-full-screen"],setup(e,{emit:t}){const n=t,o=ne(!1);Dt({onKeyUp:r=>{r.key==="f"&&!r.metaKey&&!r.ctrlKey&&i()}}),kt("fullscreenchange",()=>{o.value=!!document.fullscreenElement});function i(){document.fullscreenElement?document.exitFullscreen():n("request-full-screen")}return(r,s)=>(b(),se(Je,{transparent:e.transparent,title:`${o.value?"Exit":"Enter"} fullscreen (F)`,onClick:i},{default:ie(()=>[o.value?(b(),se(na,{key:0})):(b(),se(ta,{key:1}))]),_:1},8,["transparent","title"]))}}),Lp=Object.freeze(Object.defineProperty({__proto__:null,default:cr},Symbol.toStringTag,{value:"Module"})),jp=["aria-hidden"],Np=["onClick"],oa=he({__name:"DropdownMenu",props:Xe({items:{type:Array},enableHapticFeedback:{type:Boolean}},{modelValue:{type:Number,required:!1},modelModifiers:{}}),emits:Xe(["select"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=st(e,"modelValue"),r=ne(null),s=ne(!1),l=ne(!1),a=ne(!1),u=ne(!1),c={mounted:k=>{var m;i.value&&((m=k.children[i.value])==null||m.scrollIntoView({behavior:"auto",block:"center",inline:"center"}))}};Dt({onKeyDown:O}),er(()=>{const k=s.value;return k&&(s.value=!1),k});const d=Xo(),f=Go();async function p(k){s.value=k??!s.value,d(s.value),s.value?(w(),A(r.value)):setTimeout(F,250)}function w(){const k=r.value;if(k){const m=k.getBoundingClientRect(),P=m.x+m.width/2;l.value=m.y>window.innerHeight/2,a.value=P<window.innerWidth/3,u.value=P>window.innerWidth/3*2}}function g(k,m){p(),k!=i.value&&(i.value=k,o("select",k,m),n.enableHapticFeedback&&f())}function O(k){s.value&&k.key==="Escape"&&(p(),k.preventDefault())}let S=[];function A(k){const m=window.getComputedStyle(k).zIndex,P=k.style.zIndex;(!m||!(+m>0))&&((!k.parentElement||k.parentElement.childElementCount>1)&&(k.style.zIndex="1",S.push({el:k,zIndex:P})),k.parentElement&&A(k.parentElement))}function F(){S.forEach(({el:k,zIndex:m})=>{k.style.zIndex=m??""}),S=[]}return(k,m)=>(b(),z("div",{ref_key:"root",ref:r,class:"select-none relative inline-flex"},[s.value?(b(),z("div",{key:0,class:"fixed inset-0 bg-transparent",onClick:m[0]||(m[0]=()=>p())})):ae("",!0),e.items.length?(b(),se(to,{key:1,"enter-from-class":"scale-y-90 opacity-0 pointer-events-none","leave-to-class":"scale-y-90 opacity-0 pointer-events-none"},{default:ie(()=>[s.value?He((b(),z("ul",{key:0,ref:"list","aria-hidden":!s.value,class:ue(["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:m[1]||(m[1]=Ne(()=>{},["stop"])),onTouchmove:m[2]||(m[2]=Ne(()=>{},["stop"]))},[(b(!0),z(we,null,Jt(e.items,(P,C)=>He((b(),z("li",{key:C,tabindex:"-1",class:ue(["h-10 px-4 last:border-b-transparent cursor-pointer hover:bg-stone-100 hover:bg-opacity-10 duration-100",{"text-textPrimary":C===i.value}]),onClick:B=>g(C,B)},[K("div",{class:ue(["h-full py-2",{"border-t-[1px] border-solid border-stone-400 border-opacity-30":C>0}])},[ke(k.$slots,"item",{item:P},()=>[Ut(We(P),1)])],2)],10,Np)),[[U(zt),30]])),128))],42,jp)),[[c]]):ae("",!0)]),_:3})):ae("",!0),ke(k.$slots,"default",{toggle:p,isOpen:s.value,isAlignTop:l.value})],512))}}),Vp=Object.freeze(Object.defineProperty({__proto__:null,default:oa},Symbol.toStringTag,{value:"Module"})),Rp={},Hp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Fp(e,t){return b(),z("svg",Hp,[...t[0]||(t[0]=[Yu('<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 ia=be(Rp,[["render",Fp]]),Wp=Object.freeze(Object.defineProperty({__proto__:null,default:ia},Symbol.toStringTag,{value:"Module"})),qp={},Up={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Kp(e,t){return b(),z("svg",Up,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"},null,-1)])])}const ra=be(qp,[["render",Kp]]),Zp=Object.freeze(Object.defineProperty({__proto__:null,default:ra},Symbol.toStringTag,{value:"Module"})),Yp=["onClick"],Xp={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"},Gp={class:"whitespace-nowrap"},ur=he({inheritAttrs:!1,__name:"ButtonDropdown",props:Xe({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:Xe(["select"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=st(e,"modelValue"),r=ne(!1),s=Xo();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)=>(b(),se(oa,{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=w=>i.value=w),items:e.items,class:ue(f.$attrs.class),"enable-haptic-feedback":e.enableHapticFeedback,onSelect:p[1]||(p[1]=(w,g)=>o("select",w,g))},Di({default:ie(({toggle:w,isOpen:g,isAlignTop:O})=>[He((b(),z("button",En({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:Ne(()=>l(g,w),["stop"]),onMouseenter:c,onMouseleave:d}),[K("div",Xp,[K("span",Gp,We(e.label),1),e.items.length||e.canLoadItems?(b(),z("span",{key:0,class:ue(["w-4 h-4 flex ml-1 -mr-3 flex-shrink-0",{"rotate-180":O}]),"aria-hidden":"true"},[r.value?(b(),se(ia,{key:0})):(b(),se(ra,{key:1}))],2)):ae("",!0)])],16,Yp)),[[U(zt),30]])]),_:2},[f.$slots.item?{name:"item",fn:ie(({item:w})=>[ke(f.$slots,"item",{item:w})]),key:"0"}:void 0]),1032,["modelValue","items","class","enable-haptic-feedback"]))}}),Jp=Object.freeze(Object.defineProperty({__proto__:null,default:ur},Symbol.toStringTag,{value:"Module"})),Qp={},eh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function th(e,t){return b(),z("svg",eh,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z"},null,-1)])])}const sa=be(Qp,[["render",th]]),nh=Object.freeze(Object.defineProperty({__proto__:null,default:sa},Symbol.toStringTag,{value:"Module"})),oh={},ih={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function rh(e,t){return b(),z("svg",ih,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z"},null,-1)])])}const la=be(oh,[["render",rh]]),sh=Object.freeze(Object.defineProperty({__proto__:null,default:la},Symbol.toStringTag,{value:"Module"})),lh={key:0,class:"ml-auto inline-flex gap-[1px] scale-95 origin-right"},dr=he({__name:"ChapterNav",props:{data:{type:Object},chapterSpec:{type:[Object,String]},touchDevice:{type:Boolean},rtl:{type:Boolean},transparent:{type:Boolean}},emits:["getHiddenChapters","prev","next","dialogOpened"],setup(e,{emit:t}){const n=e,o=t,i=Q(()=>{var d;return typeof n.chapterSpec!="string"&&!!((d=n.chapterSpec)!=null&&d.trigger)});async function r(){const d=typeof n.chapterSpec=="string"?{sel:n.chapterSpec}:n.chapterSpec;if(d){if(d.dialog){await s(d.dialog);return}o("getHiddenChapters"),await mt(50,50,()=>n.data.chapters.length?!0:void 0)}}async function s(d){const f=document.querySelector(d);f&&(f instanceof HTMLDialogElement?f.showModal():f.click(),o("dialogOpened"))}function l(d,f){var p,w,g;(g=(w=(p=n.data)==null?void 0:p.chapters)==null?void 0:w[d])==null||g.select(c(f))}function a(d){n.rtl?o("next",c(d)):o("prev",c(d))}function u(d){n.rtl?o("prev",c(d)):o("next",c(d))}function c(d){return!n.touchDevice&&(d.ctrlKey||d.metaKey)}return(d,f)=>(b(),z(we,null,[N(ur,{modelValue:e.data.activeIndex,label:e.data.activeLabel,title:"Select chapter",transparent:e.transparent,items:e.data.chapters,"can-load-items":i.value,"load-items":r,"enable-haptic-feedback":"",onSelect:l},{item:ie(({item:p})=>[Ut(We(p.label),1)]),_:1},8,["modelValue","label","transparent","items","can-load-items"]),e.data.next||e.data.prev?(b(),z("div",lh,[N(Je,{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:a},{default:ie(()=>[N(sa)]),_:1},8,["title","disabled","transparent"]),N(Je,{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:u},{default:ie(()=>[N(la)]),_:1},8,["title","disabled","transparent"])])):ae("",!0)],64))}}),ah=Object.freeze(Object.defineProperty({__proto__:null,default:dr},Symbol.toStringTag,{value:"Module"})),ch=["min","max","step"],uh={class:"flex-shrink-0 w-12 inline-block text-right"},on=be(he({__name:"InputPercentage",props:Xe({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=st(e,"modelValue"),n=Q({get(){return t.value},set(o){t.value=+o}});return(o,i)=>{var r;return b(),z("div",{class:"flex items-center gap-3 pl-1",style:Te({"--percentage":`${(n.value-e.min)/(e.max-e.min)*100}%`})},[He(K("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]=Ne(()=>{},["stop"]))},null,40,ch),[[Dd,n.value]]),K("span",uh,We(((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}"]]]),dh=Object.freeze(Object.defineProperty({__proto__:null,default:on},Symbol.toStringTag,{value:"Module"})),fh={ref:"root",class:"flex text-sm flex-wrap gap-2 leading-none"},ph=["onClick","onKeyup"],bt=he({__name:"InputSelect",props:Xe({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=st(e,"modelValue");function o(i){i!==n.value&&(n.value=i)}return(i,r)=>(b(),z("div",fh,[(b(!0),z(we,null,Jt(t.items,(s,l)=>He((b(),z("div",{key:l,tabindex:"0",class:ue(["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:[Ko(()=>o(l),["enter"]),Ko(()=>o(l),["space"])]},[Ut(We(s),1)],42,ph)),[[U(zt),30]])),128))],512))}}),hh=Object.freeze(Object.defineProperty({__proto__:null,default:bt},Symbol.toStringTag,{value:"Module"})),gh={class:"flex w-full items-center justify-between cursor-pointer mb-5 last:mb-0"},mh={class:"text-sm py-1"},vh={class:"switcher p-1"},Qo=be(he({__name:"InputSwitcher",props:Xe({label:{type:String}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=st(e,"modelValue");return(n,o)=>(b(),z("label",gh,[K("span",mh,We(e.label),1),K("div",vh,[He(K("input",{"onUpdate:modelValue":o[0]||(o[0]=i=>t.value=i),type:"checkbox"},null,512),[[zd,t.value]]),o[1]||(o[1]=K("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))}']]]),bh=Object.freeze(Object.defineProperty({__proto__:null,default:Qo},Symbol.toStringTag,{value:"Module"})),yh={class:"flex-grow mb-5 last:mb-0"},Le=he({__name:"TableField",props:{label:{type:String},disabled:{type:Boolean}},setup(e){return(t,n)=>(b(),z(we,null,[K("div",{class:ue(["flex-shrink-0 mb-2 whitespace-nowrap text-sm",{"opacity-50":e.disabled}])},We(e.label),3),K("div",yh,[ke(t.$slots,"default")])],64))}}),wh=Object.freeze(Object.defineProperty({__proto__:null,default:Le},Symbol.toStringTag,{value:"Module"})),aa=he({__name:"FieldContrast",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=st(e,"modelValue"),n=Q({get(){return Math.round(t.value*100)},set(o){t.value=Math.round(o)/100}});return(o,i)=>(b(),se(Le,{label:"Contrast"},{default:ie(()=>[N(on,{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}))}}),xh=Object.freeze(Object.defineProperty({__proto__:null,default:aa},Symbol.toStringTag,{value:"Module"})),_h={},Sh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function kh(e,t){return b(),z("svg",Sh,[...t[0]||(t[0]=[K("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 ca=be(_h,[["render",kh]]),Ch=Object.freeze(Object.defineProperty({__proto__:null,default:ca},Symbol.toStringTag,{value:"Module"})),Th={},Ph={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Ih(e,t){return b(),z("svg",Ph,[...t[0]||(t[0]=[K("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 ua=be(Th,[["render",Ih]]),Eh=Object.freeze(Object.defineProperty({__proto__:null,default:ua},Symbol.toStringTag,{value:"Module"})),fr=he({inheritAttrs:!1,__name:"ButtonOutline",emits:["click"],setup(e,{emit:t}){const n=t,o=Go();function i(){o(),n("click")}return(r,s)=>He((b(),z("button",{class:ue([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},[ke(r.$slots,"default")],2)),[[U(zt),24]])}}),Mh=Object.freeze(Object.defineProperty({__proto__:null,default:fr},Symbol.toStringTag,{value:"Module"}));var rn=(e=>(e[e.never=0]="never",e[e.move=1]="move",e[e.firstMove=2]="firstMove",e[e.onLoad=3]="onLoad",e))(rn||{}),tt=(e=>(e[e.vertical=0]="vertical",e[e.ltr=1]="ltr",e[e.rtl=2]="rtl",e))(tt||{});const ei=[{name:"System",value:"system-ui, sans-serif"},{name:"Charter",value:'Charter, "Times New Roman", serif'},{name:"Georgia",value:"Georgia, serif"}],da=he({__name:"FieldFontFamily",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=st(e,"modelValue"),n=Q({get(){const o=ei.findIndex(i=>i.value===t.value);return o===-1?0:o},set(o){t.value=ei[o].value}});return(o,i)=>(b(),se(Le,{label:"Font family"},{default:ie(()=>[N(bt,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),items:U(ei).map(r=>r.name)},null,8,["modelValue","items"])]),_:1}))}}),Oh=Object.freeze(Object.defineProperty({__proto__:null,default:da},Symbol.toStringTag,{value:"Module"}));function fa(e){if(e)try{return JSON.parse(e)}catch{return}}function $h(){const{width:e,height:t}=bn();return Q(()=>e.value>t.value)}function pa(e){return String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}var At=(e=>(e[e.longStrip=0]="longStrip",e[e.single=1]="single",e[e.double=2]="double",e))(At||{});const ti=.25,ni=5,pr=.25,oi=.2,ii=5,Dh=.05,zh=0,Ah=5;function Bh(e){var m,P,C,B,y,I;const n=e.touchDevice&&(window.innerHeight<=600||window.innerWidth<=600)?$h():void 0,{titleName:o,isWebtoon:i}=e,r=o?pa(o):location.hostname,s=ne(Lh(`tkr:${r}`)),l=W=>{s.value=W;const L=`tkr:${r}`;!W||!Object.keys(W).length?localStorage.removeItem(L):localStorage.setItem(L,JSON.stringify(W))},a=W=>{if(!s.value){l(W);return}const L={...s.value};Object.entries(W).forEach(([Y,$])=>{$===void 0?delete L[Y]:L[Y]=$}),l(L)},u=ne((m=s.value)==null?void 0:m.style),c=ne((P=s.value)==null?void 0:P.direction),d=ne((C=s.value)==null?void 0:C.gap),f=ne((B=s.value)==null?void 0:B.speed),p=ne((y=s.value)==null?void 0:y.zoom),w=ne(((I=s.value)==null?void 0:I.breakFirst)??!1),g=Q({get(){if(i.value)return At.longStrip;if(u.value!==void 0)return u.value;const{landscapeStyle:W,readerStyle:L}=e.defaultPreferences.value;return n!=null&&n.value?W??L:L},set:W=>{if(u.value===W)return;const L=g.value===At.longStrip,Y=W===At.longStrip;u.value=W,a({style:W}),L!==Y&&(O.value=Y?tt.vertical:tt.rtl)}}),O=Q({get(){if(i.value)return tt.vertical;if(c.value!==void 0)return c.value;const{direction:W,landscapeDirection:L}=e.defaultPreferences.value;return n!=null&&n.value?L??W:W},set:W=>{c.value=W,a({direction:W})}}),S=Q({get:()=>d.value??e.defaultPreferences.value.gap,set(W){d.value=W,a({gap:W})}}),A=Q({get:()=>f.value??e.defaultPreferences.value.speed,set(W){f.value=W,a({speed:W===1?void 0:W})}}),F=Q({get:()=>p.value??1,set(W){p.value=W,a({zoom:W===1?void 0:W})}}),k=Q({get:()=>w.value,set(W){w.value=W,a({breakFirst:W?!0:void 0})}});return{direction:O,style:g,gap:S,speed:A,zoom:F,isLongStrip:Q(()=>g.value===At.longStrip),isDouble:Q(()=>g.value===At.double),isRTL:Q(()=>O.value===tt.rtl),isVertical:Q(()=>O.value===tt.vertical),breakFirst:k}}function Lh(e){const t=localStorage.getItem(e),n=fa(t||void 0),o={};return n?(n.style!==void 0&&Object.values(At).includes(n.style)&&(o.style=n.style),n.direction!==void 0&&Object.values(tt).includes(n.direction)&&(o.direction=n.direction),n.gap!==void 0&&n.gap>=zh&&n.gap<=Ah&&(o.gap=n.gap),n.speed!==void 0&&n.speed>=ti&&n.speed<=ni&&(o.speed=n.speed),n.zoom!==void 0&&n.zoom>=oi&&n.zoom<=ii&&(o.zoom=n.zoom),n.breakFirst===!0&&(o.breakFirst=!0),Object.keys(o).length?o:void 0):o}const hr=he({__name:"NovelPreferencesForm",props:Xe({enableReset:{type:Boolean},defaultPreferences:{type:Object},forceFontFamily:{type:String}},{modelValue:{required:!0},modelModifiers:{}}),emits:Xe(["reset"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=st(e,"modelValue"),r=Q(()=>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)=>(b(),z(we,null,[e.forceFontFamily?ae("",!0):(b(),se(da,{key:0,"model-value":i.value.fontFamily,"onUpdate:modelValue":a[0]||(a[0]=u=>s({fontFamily:u}))},null,8,["model-value"])),N(Le,{label:"Text size"},{default:ie(()=>[N(on,{"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}),N(Le,{label:"Line height"},{default:ie(()=>[N(on,{"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}),N(Le,{label:"Play speed"},{default:ie(()=>[N(on,{"model-value":i.value.speed,min:U(ti),max:U(ni),step:U(pr),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?(b(),z("div",{key:1,class:ue(["w-full flex justify-center pt-1 duration-200",{"pointer-events-none opacity-0":!r.value,"opacity-90":r.value}])},[N(fr,{class:"w-2/3",onClick:a[4]||(a[4]=()=>o("reset"))},{default:ie(()=>[...a[5]||(a[5]=[Ut(" Reset to default ",-1)])]),_:1})],2)):ae("",!0)],64))}}),jh=Object.freeze(Object.defineProperty({__proto__:null,default:hr},Symbol.toStringTag,{value:"Module"})),Nh={key:2,class:"mb-3 border-stone-500 border-opacity-70"},Vh={key:3,class:"flex justify-end"},Rh={class:"h-6 border border-stone-500 rounded-md cursor-pointer ml-auto inline-flex items-center"},Hh={key:4,class:"mt-5 mb-3 border-stone-500 border-opacity-70"},gr=he({__name:"DefaultPreferencesForm",props:Xe({touchDevice:{type:Boolean},doubleTapZoomAvailable:{type:Boolean},isNovel:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=st(e,"modelValue"),o=ne(!1),i=ne(!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)!==At.longStrip,d=l!==At.longStrip;if(c===d)s(a?{landscapeStyle:l}:{readerStyle:l});else{const f=d?tt.rtl:tt.vertical;s(a?{landscapeStyle:l,landscapeDirection:f}:{readerStyle:l,direction:f})}}function s(l){n.value={...n.value,...l}}return(l,a)=>(b(),z(we,null,[e.isNovel?(b(),z(we,{key:0},[N(hr,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=u=>n.value=u)},null,8,["modelValue"]),N(aa,{"model-value":n.value.contrast,"onUpdate:modelValue":a[1]||(a[1]=u=>s({contrast:u}))},null,8,["model-value"])],64)):(b(),z(we,{key:1},[N(Qo,{"model-value":n.value.autoPlay,label:"Auto play in long strip","onUpdate:modelValue":a[2]||(a[2]=u=>s({autoPlay:u}))},null,8,["model-value"]),e.touchDevice?(b(),se(Qo,{key:0,"model-value":n.value.pinchToZoom,label:"Pinch to zoom","onUpdate:modelValue":a[3]||(a[3]=u=>s({pinchToZoom:u}))},null,8,["model-value"])):ae("",!0),e.doubleTapZoomAvailable?(b(),se(Qo,{key:1,"model-value":n.value.doubleTapZoom,label:"Double tap to zoom","onUpdate:modelValue":a[4]||(a[4]=u=>s({doubleTapZoom:u}))},null,8,["model-value"])):ae("",!0),o.value?(b(),z("hr",Nh)):ae("",!0),o.value?(b(),z("div",Vh,[K("div",Rh,[He((b(),z("button",{class:ue(["focus:outline-none outline-none h-full inline-flex justify-center items-center w-14 px-3 py-0.5 rounded-l-sm",{"bg-stone-500 text-stone-50":!i.value,"text-stone-400":i.value}]),onClick:a[5]||(a[5]=()=>i.value=!1)},[N(ua)],2)),[[U(zt),24]]),He((b(),z("button",{class:ue(["focus:outline-none outline-none h-full inline-flex justify-center items-center w-14 px-3 py-0.5 rounded-r-sm",{"bg-stone-500 text-stone-50":i.value,"text-stone-400":!i.value}]),onClick:a[6]||(a[6]=()=>i.value=!0)},[N(ca)],2)),[[U(zt),24]])])])):ae("",!0),N(Le,{label:"Style"},{default:ie(()=>[N(bt,{"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}),N(Le,{label:"Direction"},{default:ie(()=>[N(bt,{"model-value":i.value?n.value.landscapeDirection??n.value.direction:n.value.direction,items:["Vertical","Left to right","Right to left"],"onUpdate:modelValue":a[7]||(a[7]=u=>s(i.value?{landscapeDirection:u}:{direction:u}))},null,8,["model-value"])]),_:1}),o.value?(b(),z("hr",Hh)):ae("",!0),N(Le,{label:"Gap size"},{default:ie(()=>[N(bt,{"model-value":n.value.gap,items:["None","1px","2px","3px","4px","5px"],"onUpdate:modelValue":a[8]||(a[8]=u=>s({gap:u}))},null,8,["model-value"])]),_:1})],64)),N(Le,{label:"Progress size"},{default:ie(()=>[N(bt,{"model-value":n.value.progressSize/2,items:["None","2px","4px","6px","8px","10px"],"onUpdate:modelValue":a[9]||(a[9]=u=>s({progressSize:u*2}))},null,8,["model-value"])]),_:1}),N(Le,{label:"Auto next"},{default:ie(()=>[N(bt,{"model-value":n.value.autoNextSeconds,items:["None","1 sec","2 sec","3 sec","4 sec","5 sec"],"onUpdate:modelValue":a[10]||(a[10]=u=>s({autoNextSeconds:u}))},null,8,["model-value"])]),_:1}),N(Le,{label:"Hide controls"},{default:ie(()=>[N(bt,{"model-value":n.value.hideControlsEvent,items:["Never","On move","On first move","On load"],"onUpdate:modelValue":a[11]||(a[11]=u=>s({hideControlsEvent:u}))},null,8,["model-value"])]),_:1}),e.isNovel?ae("",!0):(b(),z(we,{key:2},[N(Le,{label:"Play speed"},{default:ie(()=>[N(on,{"model-value":n.value.speed,min:U(ti),max:U(ni),step:U(pr),format:u=>`${u.toFixed(2)}x`,"onUpdate:modelValue":a[12]||(a[12]=u=>s({speed:u}))},null,8,["model-value","min","max","step","format"])]),_:1}),N(Le,{label:e.touchDevice?"Tap zones":"Click zones"},{default:ie(()=>[N(bt,{"model-value":(n.value.tapZone??-1)+1,items:["Default","None","L shaped","Kindle-ish","Edge","Right and left"],"onUpdate:modelValue":a[13]||(a[13]=u=>s({tapZone:u===0?void 0:u-1}))},null,8,["model-value"])]),_:1},8,["label"])],64))],64))}}),Fh=Object.freeze(Object.defineProperty({__proto__:null,default:gr},Symbol.toStringTag,{value:"Module"})),Wh={},qh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Uh(e,t){return b(),z("svg",qh,[...t[0]||(t[0]=[K("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 ro=be(Wh,[["render",Uh]]),Kh=Object.freeze(Object.defineProperty({__proto__:null,default:ro},Symbol.toStringTag,{value:"Module"}));var mr=(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))(mr||{});const ha={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]}},ga=he({__name:"TapZonePreview",props:{tapZone:{type:Number},direction:{type:Number}},setup(e){const t=e,{width:n,height:o}=bn(),i=Q(()=>Math.min(1.25,Math.max(.75,Math.round(n.value/o.value*100)/100))),r=Q(()=>i.value>=1),s=Q(()=>t.direction===tt.vertical),l=Q(()=>t.direction===tt.rtl),a=Q(()=>{if(!t.tapZone)return;const{prevZones:u,nextZones:c}=ha[t.tapZone];return Array.from({length:9},(d,f)=>{const p=u.includes(f),w=!p&&c.includes(f);return{isPrev:p,isNext:w,hasArrow:f===u[0]||f===c[0]}})});return(u,c)=>(b(),z("div",{class:ue(["p-2 bg-black bg-opacity-40 rounded-2xl",{"w-28":r.value,"h-28":!r.value}]),style:Te({"aspect-ratio":i.value})},[e.tapZone===U(mr).none?(b(),z("div",{key:0,class:ue(["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===U(tt).vertical,"rotate-180":e.direction===U(tt).rtl}])},[N(ro)],2)):a.value?(b(),z("div",{key:2,class:ue(["w-full h-full overflow-hidden rounded-xl flex flex-wrap",{"flex-row-reverse":l.value}])},[(b(!0),z(we,null,Jt(a.value,(d,f)=>(b(),z("div",{key:`zone-${f}`,class:ue(["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?(b(),z("span",{key:0,class:"w-5 h-5 max-w-full max-h-full inline-block transform text-stone-800",style:Te({transform:`rotate(${s.value?d.isNext?90:-90:(l.value?d.isPrev:d.isNext)?0:180}deg)`})},[N(ro)],4)):ae("",!0)],2))),128))],2)):(b(),z("div",{key:1,class:ue(["w-full h-full overflow-hidden rounded-xl flex flex-nowrap",{"flex-col":s.value}])},[K("div",{class:ue(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":!l.value}])},[K("span",{class:ue(["w-5 h-5 inline-block transform text-stone-800",{"-rotate-90":s.value,"rotate-180":!s.value}])},[N(ro)],2)],2),c[0]||(c[0]=K("div",{class:"flex-grow w-full h-full"},null,-1)),c[1]||(c[1]=K("div",{class:"flex-grow w-full h-full"},null,-1)),K("div",{class:ue(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":l.value}])},[K("span",{class:ue(["w-5 h-5 inline-block text-stone-800",{"transform rotate-90":s.value}])},[N(ro)],2)],2)],2))],6))}}),Zh=Object.freeze(Object.defineProperty({__proto__:null,default:ga},Symbol.toStringTag,{value:"Module"})),Yh={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 duration-200"},ma=he({__name:"DirectionToast",props:{direction:{type:Number},tapZone:{type:Number}},setup(e){const t=e,n=sessionStorage.getItem("tk:dir"),o=ne(typeof n!="string"||+n!==t.direction),i=vt(()=>o.value=!1,1500);de(()=>[t.direction,t.tapZone],()=>{r(),o.value=!0,i()}),je(()=>{r(),i();let s;de(Qi(),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)=>(b(),se(to,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ie(()=>[o.value?(b(),z("div",Yh,[N(ga,{direction:e.direction,"tap-zone":e.tapZone},null,8,["direction","tap-zone"])])):ae("",!0)]),_:1}))}}),Xh=Object.freeze(Object.defineProperty({__proto__:null,default:ma},Symbol.toStringTag,{value:"Module"})),Gh={class:"flex justify-between items-end"},Jh={class:"fixed pointer-events-none left-0 right-0 bottom-0"},va=he({__name:"GearControlsLayout",props:{visible:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(b(),z("div",{id:"controls",class:ue(["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}])},[ke(t.$slots,"default"),K("div",{class:ue(["flex gap-1 items-center relative z-30 flex-shrink-0 2xs:gap-3",{"children-pointer-events-auto":e.visible}]),style:Te({paddingTop:`${e.spaceTop||0}px`})},[ke(t.$slots,"top")],6),K("div",Gh,[K("div",{class:ue(["inline-block",{"children-pointer-events-auto":e.visible}])},[ke(t.$slots,"bottom-left")],2),K("div",{class:ue(["inline-flex flex-col items-end gap-4",{"children-pointer-events-auto":e.visible}])},[ke(t.$slots,"bottom-right")],2)]),K("div",Jh,[ke(t.$slots,"progress")])],2))}}),Qh=Object.freeze(Object.defineProperty({__proto__:null,default:va},Symbol.toStringTag,{value:"Module"})),eg='.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}}',tg={},ng={class:"loading-indicator"};function og(e,t){return b(),z("div",ng)}const ri=be(tg,[["render",og],["styles",[eg]]]),ig=Object.freeze(Object.defineProperty({__proto__:null,default:ri},Symbol.toStringTag,{value:"Module"})),rg={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},sg={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},vr=be(he({inheritAttrs:!1,__name:"GearLayout",props:{loading:{type:Boolean},immediate:{type:Boolean},hideCursor:{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=ne(null);return t({rootEl:o}),(i,r)=>He((b(),z("dialog",rg,[K("div",{ref_key:"rootEl",ref:o,id:"gear-layout",class:ue({"cursor-none":e.hideCursor,"cursor-default":!e.hideCursor,"bg-black":e.immediate||!e.loading,"opacity-0":!e.immediate&&e.loading,"duration-200 transition-colors":!e.immediate,[`${i.$attrs.class??""}`]:!0}),style:Te(e.style??{})},[e.loading&&e.immediate?(b(),z("div",sg,[N(ri)])):ae("",!0),ke(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%}"]]]),lg=Object.freeze(Object.defineProperty({__proto__:null,default:vr},Symbol.toStringTag,{value:"Module"})),ag={},cg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 56"};function ug(e,t){return b(),z("svg",cg,[...t[0]||(t[0]=[K("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 ba=be(ag,[["render",ug]]),dg=Object.freeze(Object.defineProperty({__proto__:null,default:ba},Symbol.toStringTag,{value:"Module"})),fg={},pg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function hg(e,t){return b(),z("svg",pg,[...t[0]||(t[0]=[K("g",{fill:"none"},[K("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"}),K("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 ya=be(fg,[["render",hg]]),gg=Object.freeze(Object.defineProperty({__proto__:null,default:ya},Symbol.toStringTag,{value:"Module"})),mg={key:1,class:"h-5"},wa=he({__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=Q(()=>["Long strip",n.webtoon?void 0:"Single page",n.webtoon?void 0:"Double page"].filter(Boolean)),r=Q(()=>{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)=>(b(),z(we,null,[N(Le,{label:"Style"},{default:ie(()=>[N(bt,{"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}),N(Le,{label:"Direction"},{default:ie(()=>[N(bt,{"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}),N(Le,{label:"Gap size"},{default:ie(()=>[N(bt,{"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}),N(Le,{label:"Play speed"},{default:ie(()=>[N(on,{"model-value":e.speed,min:U(ti),max:U(ni),step:U(pr),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}),N(Le,{label:"Zoom"},{default:ie(()=>[N(on,{"model-value":Math.ceil(e.zoom*100),min:U(oi)*100,max:U(ii)*100,step:U(Dh)*100,format:c=>`${Math.ceil(c)}%`,"onUpdate:modelValue":s},null,8,["model-value","min","max","step","format"])]),_:1}),e.enableReset?(b(),z("div",{key:0,class:ue(["w-full flex justify-center pt-1 duration-200",{"pointer-events-none opacity-0":!r.value,"opacity-90":r.value}])},[N(fr,{class:"w-2/3",onClick:l},{default:ie(()=>[...u[4]||(u[4]=[Ut(" Reset to default ",-1)])]),_:1})],2)):(b(),z("div",mg))],64))}}),vg=Object.freeze(Object.defineProperty({__proto__:null,default:wa},Symbol.toStringTag,{value:"Module"})),xa=he({__name:"PageNav",props:Xe({disabled:{type:Boolean},pages:{type:Array},totalImgs:{type:Number}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=st(e,"modelValue"),o=Q(()=>t.pages.map(a=>a.map(({index:u})=>`${u+1}`).join("-"))),i=Q(()=>{const a=n.value,u=t.pages.findIndex(c=>c.some(({index:d})=>d===a));return u===-1?t.pages.length-1:u}),r=Q(()=>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)=>(b(),se(ur,{"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"]))}}),bg=Object.freeze(Object.defineProperty({__proto__:null,default:xa},Symbol.toStringTag,{value:"Module"})),br=be(he({__name:"PauseToast",props:{playing:{type:Boolean}},setup(e){const t=e,n=ne(0);return de(()=>t.playing,()=>{n.value=Date.now()}),(o,i)=>n.value?(b(),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?(b(),se(sr,{key:0})):(b(),se(rr,{key:1}))])):ae("",!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)}}"]]]),yg=Object.freeze(Object.defineProperty({__proto__:null,default:br},Symbol.toStringTag,{value:"Module"})),wg=30,yr=be(he({__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=Q(()=>Math.floor(t.value)+1),o=Q(()=>`${Math.max(2,Math.min(10,t.height))}px`),i=bn().width,r=Q(()=>t.total!==void 0&&i.value/t.total>=wg);return(s,l)=>(b(),z("div",{class:ue(["rprog",{"rprog--rtl":e.rtl}]),style:Te({height:o.value,opacity:e.opacity??.8})},[r.value?(b(!0),z(we,{key:0},Jt(e.total,a=>(b(),z("span",{key:a,class:ue(["rprog__item",{"rprog__item--active":n.value===a}]),style:Te(!e.longStrip||n.value!==a?{}:{"--portion":`${e.value%1*100}%`})},null,6))),128)):(b(),z("div",{key:1,style:Te({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)}']]]),xg=Object.freeze(Object.defineProperty({__proto__:null,default:yr},Symbol.toStringTag,{value:"Module"})),si=[];function _g(e){si.push(e),gt(()=>{const t=si.indexOf(e);t!==-1&&si.splice(t,1)})}function Sg(e,t){const{innerWidth:n,innerHeight:o}=window,i=e*n,r=t*o;si.forEach(s=>s(i,r))}const _a=he({__name:"GesturesContainer",props:{spaceTop:{type:Number},controlsVisible:{type:Boolean},zoom:{type:Number},zooming:{type:Boolean},pinchToZoome:{type:Boolean},doubleTapZoom:{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=ne(null),s=ne(Math.min(ii,Math.max(oi,o.zoom))),l=ne(!1),a=ne(!1),u={isZoomIn:!1,isZoomOut:!1,initial:void 0};t({rootEl:r}),de(()=>o.zoom,T=>J(T)),je(()=>{if(o.touchDevice?kt(r,"touchstart",S):(kt(r,"mousedown",p),kt(window,"wheel",C)),!navigator.userAgent.toLowerCase().includes("android")){_g((x,q)=>{if(o.busy)return;const oe=r.value;!oe||W(oe,x,q)||!o.doubleTapZoom||L(x,q)});return}}),Dt({onKeyDown:T=>{var x;if(!o.busy&&((x=r.value)==null||x.focus(),!(T.key==="Meta"||T.key==="Control")&&(T.ctrlKey||T.metaKey)))switch(T.key){case"0":J(1);break;case"-":J(s.value-.2),T.preventDefault();break;case"=":case"+":J(s.value+.2),T.preventDefault();break}},onKeyUp:T=>{o.zooming&&!(T.ctrlKey||T.metaKey)&&Y()}});function c(T){a.value!==T&&(a.value=T,T?o.playController.pause():(i("dragEnd"),o.playController.resume()))}let d={x:0,y:0},f={x:0,y:0};function p(T){if(T.button!==0)return;const x=r.value;x&&(d={x:T.clientX,y:T.clientY},f={x:x.scrollLeft,y:x.scrollTop},window.addEventListener("mousemove",w),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",w),setTimeout(()=>c(!1))},{once:!0}),T.preventDefault(),T.stopPropagation())}function w(T){const x=T.clientX-d.x,q=T.clientY-d.y;if(!a.value&&Math.abs(x)<.5&&Math.abs(q)<.5)return;c(!0);const oe=r.value;oe&&(oe.scrollLeft=f.x-x,oe.scrollTop=f.y-q)}let g={distance:0,zoom:s.value,x:0,y:0},O=!1;function S(T){o.busy||(O=o.pinchToZoome&&T.touches.length===2,O&&(i("update:zooming",!0),c(!0),T.stopPropagation(),T.preventDefault(),g={distance:B(T),zoom:s.value,x:(T.touches[0].clientX+T.touches[1].clientX)/2,y:(T.touches[0].clientY+T.touches[1].clientY)/2}),(O||o.longStrip&&o.playController.isPlaying.value)&&window.addEventListener("touchend",A,{once:!0}))}function A(){var oe;if(O=!1,o.zooming){c(!1),Y();return}if(!a.value)return;const T=vt(()=>{var Z;c(!1),(Z=r.value)==null||Z.removeEventListener("scroll",q)},200),x=setTimeout(T,200);(oe=r.value)==null||oe.addEventListener("scroll",q);function q(){clearTimeout(x),T()}}function F(T){if(!O&&!(o.longStrip&&o.playController.isPlaying.value)||(c(!0),!o.zooming)||(T.stopPropagation(),T.preventDefault(),T.touches.length<2))return;const q=B(T)/g.distance;X(Math.ceil(q*g.zoom*100)/100,g)}const k=vt(()=>l.value=!1,100);let m=!1;const P=vt(()=>{m=!1},30);function C(T){if(o.busy)return;let x=o.zooming;if(m||(m=!0,x=T.ctrlKey||T.metaKey,x&&i("update:zooming",!0)),P(),x){T.stopPropagation(),T.preventDefault();const q=Math.ceil((s.value+T.deltaY*-.01)*100)/100;X(q,{x:T.clientX,y:T.clientY});return}o.horizontal&&(l.value||(l.value=!0),k(),T.deltaY&&(r.value&&(r.value.scrollLeft+=T.deltaY*(o.rtl?-1:1)),T.stopPropagation()))}function B(T){return Math.hypot(T.touches[0].clientX-T.touches[1].clientX,T.touches[0].clientY-T.touches[1].clientY)}const y={x:0,y:0,ts:0};function I(T){if(a.value||o.zooming)return;const x=r.value;if(!x||W(x,T.clientX,T.clientY)||(i("click"),o.playController.isPlaying.value))return;const{clientX:q,clientY:oe}=T,{x:Z,y:j,ts:Ee}=y;y.x=q,y.y=oe,y.ts=new Date().getTime();const xe=y.ts-Ee;xe>250||xe<10||Math.abs(Z-q)>40||Math.abs(j-oe)>40||(y.ts=0,y.x=0,y.y=0,L(q,oe))}function W(T,x,q){if(o.playController.isPlaying.value)return!1;const oe=o.tapZone;if(oe===mr.none)return!1;const Z=o.controlsVisible?o.spaceTop:0,j=T.clientHeight-Z,Ee=Math.max(0,q-Z),xe=o.horizontal?T.clientWidth:j;let fe=!1,ve=!1;if(oe){const{prevZones:ye,nextZones:Be}=ha[o.tapZone],at=Math.floor(Ee/j*3);let $e=Math.floor(x/T.clientWidth*3);o.rtl&&($e=2-$e);const Bt=at*3+$e;fe=ye.includes(Bt),ve=!fe&&Be.includes(Bt)}else{const Be=(o.horizontal?o.rtl?xe-x:x:Ee)/xe,at=o.horizontal?.2:.15;fe=Be<=at&&o.pageIndex>0,ve=!fe&&Be>=1-at}if(!fe&&!ve)return!1;if(o.longStrip){const ye=(fe?-1:1)*.75*xe;o.horizontal?T.scrollLeft=T.scrollLeft+(o.rtl?-1:1)*ye:T.scrollTop=Math.max(0,T.scrollTop+ye)}else fe?i("prev"):ve&&i("next");return!0}async function L(T,x){const q=s.value===1?2:1;await J(q,{x:T,y:x}),Y()}function Y(){i("update:zooming",!1),u.initial=void 0,u.isZoomIn=!1,u.isZoomOut=!1}function $(){if(u.initial)return;const T=r.value;if(!T)return;const x=T.querySelector(`[data-index="${o.pageIndex}"],[data-index2="${o.pageIndex}"]`)??void 0;x&&(u.initial={el:x,rect:x.getBoundingClientRect()})}function X(T,x){if(u.isZoomIn=u.isZoomIn||!u.isZoomOut&&T>1,u.isZoomIn&&T<1){J(1,x);return}if(u.isZoomOut=u.isZoomOut||!u.isZoomIn&&T<1,u.isZoomOut&&T>1){J(1,x);return}J(T,x)}async function J(T,x){const q=r.value,oe=Math.min(ii,Math.max(oi,T));if(!q||s.value===oe)return;$();const{initial:Z}=u;if(!Z)return;const j=(x==null?void 0:x.x)??q.clientWidth/2,Ee=(x==null?void 0:x.y)??q.clientHeight/2;s.value=oe,i("update:zoom",oe),await pt();const{el:xe,rect:fe}=Z,ve=xe.offsetWidth/fe.width,ye=xe.offsetHeight/fe.height;q.scrollLeft=xe.offsetLeft-fe.left*ve+j*(ve-1),q.scrollTop=xe.offsetTop-fe.top*ye+Ee*(ye-1)}return(T,x)=>(b(),z("div",{ref_key:"rootEl",ref:r,tabindex:"0",class:ue(["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:Te({"font-size":`${s.value}px`}),onClick:Ne(I,["stop"]),onTouchmoveCapture:Ne(F,["stop"])},[ke(T.$slots,"default")],38))}}),kg=Object.freeze(Object.defineProperty({__proto__:null,default:_a},Symbol.toStringTag,{value:"Module"})),Cg=["src"],wr=he({inheritAttrs:!1,__name:"ReaderImg",props:{src:{type:null},style:{type:Object}},setup(e){const t=e;let n;const o={mounted:i=>{if(t.src instanceof HTMLElement){const r=t.src.getBoundingClientRect();n=document.createElement("div"),n.style.setProperty("width",`${r.width}px`),n.style.setProperty("height",`${r.height}px`),t.src.replaceWith(n),i.appendChild(t.src)}},beforeUnmount:i=>{const r=i.children[0];n&&r&&(n.replaceWith(r),n=void 0)}};return(i,r)=>typeof e.src=="string"?(b(),z("img",{key:0,src:e.src,class:ue(i.$attrs.class??""),style:Te(e.style)},null,14,Cg)):He((b(),z("div",{key:1,class:ue(i.$attrs.class??""),style:Te(e.style)},null,6)),[[o]])}}),Tg=Object.freeze(Object.defineProperty({__proto__:null,default:wr},Symbol.toStringTag,{value:"Module"}));function xr(e,t){return(e==null?void 0:e.querySelector(`[data-index="${t}"],[data-index2="${t}"]`))??void 0}const Pg=["data-index"],Ig={key:0,class:"rbod__page rbod__page--loading"},Eg=["data-index"],Sa=be(he({__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},doubleTapZoom:{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=ne(null),s=Q(()=>{var m;return(m=r.value)==null?void 0:m.rootEl});t({rootEl:s});const l=bn(),a=Q(()=>{const{width:m,height:P}=l,C=o.isLongStrip?o.isVertical?m.value:P.value:Math.min(m.value,P.value);return Math.min(4,Math.max(1,Math.ceil(C/400-1)))*o.gap}),u=ne(o.isLongStrip?{min:o.pageIndex-1,max:o.pageIndex}:A()),c=ne(o.pageIndex-1),d=Q(()=>{const{min:m,max:P}=u.value,C={};for(let B=m;B<=P;B++)C[B]=!0;return C}),f=ne(w()),p=nn(()=>{f.value=w(),pt(()=>O())},100);de(l.width,p),de(l.height,p),de(()=>o.pages,p),de(()=>o.isLongStrip,p),de(()=>o.isVertical,p);function w(){const m=l.width.value,P=l.height.value,{pages:C,isLongStrip:B,isVertical:y}=o;return C.map(I=>{var q;const W=I.some(oe=>!oe.img),L=I.map(oe=>oe.index),Y={isLoading:W,indexes:L,visible:!1};if(W)return Y;const $=I.map(({img:oe})=>oe).filter(Boolean);if(!$.length||(Y.srcs=$.map(({src:oe})=>oe),$.every(oe=>oe.hasError)))return Y;const J=(q=$.find(oe=>!oe.hasError))==null?void 0:q.size;if(!J)return Y;const T=$.reduce((oe,Z)=>{var j;return oe+(((j=Z.size)==null?void 0:j.width)??J.width)},0),x=$.reduce((oe,Z)=>{var j;return oe+(((j=Z.size)==null?void 0:j.height)??J.height)},0)/$.length;return B&&y||!B&&m/T<P/x?(Y.width=Math.min(m,T),Y.height=x*(Y.width/T)):(Y.height=Math.min(P,x),Y.width=T*(Y.height/x)),Y.width&&Y.height&&(Y.style={width:`${Y.width}em`,height:`${Y.height}em`}),Y})}const g=Q(()=>{const m=o.isVertical?"width":"height";return f.value.map(P=>P[m]).filter(Boolean).sort((P,C)=>C-P)[0]});je(()=>{const m=xr(s.value,o.pageIndex);m==null||m.scrollIntoView({behavior:"instant",block:"start"});let P,C=!1;Xs(()=>{P!==o.pageIndex&&(P=o.pageIndex,O(),C||(C=!0,pt(()=>i("ready"))))})});async function O(){const m=o.isLongStrip?S():A();m&&(m.min!==u.value.min||m.max!==u.value.max)&&(u.value=m,m.min<c.value&&(c.value=m.min))}function S(){var y,I;const m=Math.floor(o.page),P=xr(s.value,m);if(!P)return;const C=(y=F(P))==null?void 0:y.getAttribute("data-index"),B=(I=k(P))==null?void 0:I.getAttribute("data-index");return{min:C?parseInt(C):Math.max(0,m-2),max:B?parseInt(B):f.value.length-1}}function A(){const{pageIndex:m}=o;return{min:Math.max(0,m-(o.isDouble?5:3)),max:m+(o.isDouble?6:3)}}function F(m,P=0){const C=m.previousElementSibling;if(!C)return;const B=P+(o.isVertical?C.clientHeight:C.clientWidth);return(o.isVertical?B>l.height.value*1.5:o.isRTL?B>l.width.value*2.5:B>l.width.value*1.5)?C:F(C,B)}function k(m,P=0){const C=m.nextElementSibling;if(!C)return;const B=P+(o.isVertical?C.clientHeight:C.clientWidth);return(o.isVertical?B>l.height.value*3.5:o.isRTL?B>l.width.value*1.5:B>l.width.value*2.5)?C:k(C,B)}return(m,P)=>(b(),se(_a,{ref_key:"gestureContainer",ref:r,"space-top":e.spaceTop,"controls-visible":e.controlsVisible,zoom:e.zoom,zooming:e.zooming,"pinch-to-zoome":e.pinchToZoome,"double-tap-zoom":e.doubleTapZoom,"tap-zone":e.tapZone,"page-index":e.pageIndex,"play-controller":e.playController,horizontal:!e.isVertical,rtl:e.isRTL,"touch-device":e.touchDevice,busy:e.busy,"long-strip":e.isLongStrip,class:ue(["rbod",{"rbod--long-strip":e.isLongStrip,"rbod--paging":!e.isLongStrip,"rbod--vertical":e.isVertical,"rbod--rtl":e.isRTL,"rbod--1page":f.value.length===1}]),style:Te({"--gap":`${a.value}em`,"--space-top":`${e.spaceTop}px`,"--screen-width-em":U(l).width.value+"em","--screen-height-em":U(l).height.value+"em",...e.isLongStrip?{"--max-size-em":g.value+"em"}:{}}),"onUpdate:zoom":P[0]||(P[0]=C=>i("update:zoom",C)),"onUpdate:zooming":P[1]||(P[1]=C=>i("update:zooming",C)),onDragEnd:P[2]||(P[2]=()=>i("dragEnd")),onClick:P[3]||(P[3]=()=>i("click")),onPrev:P[4]||(P[4]=()=>i("prev")),onNext:P[5]||(P[5]=()=>i("next"))},{default:ie(()=>[(b(!0),z(we,null,Jt(f.value,C=>{var B;return b(),z("div",En({key:e.direction+"_"+C.indexes[0],"data-index":C.indexes[0]},{ref_for:!0},C.indexes.length>1?{"data-index2":C.indexes[1]}:{}),[!((B=C.srcs)!=null&&B.length)||C.isLoading||c.value>C.indexes[0]?(b(),z("div",Ig,[d.value[C.indexes[0]]?(b(),se(ri,{key:0})):ae("",!0)])):C.srcs.length==1?(b(),z(we,{key:1},[d.value[C.indexes[0]]?(b(),se(wr,{key:1,class:"rbod__page img",src:C.srcs[0],style:Te(C.style)},null,8,["src","style"])):(b(),z("div",{key:0,class:"rbod__page",style:Te(C.style)},null,4))],64)):(b(),z("div",{key:2,class:ue(["rbod__page rbod__page--double",{"flex-row-reverse":e.isRTL}]),style:Te(C.style)},[C.indexes.some(y=>d.value[y])?(b(!0),z(we,{key:0},Jt(C.srcs,(y,I)=>(b(),z("div",{key:typeof y=="string"?y:`${I}-${C.height}`},[N(wr,{src:y,class:"img"},null,8,["src"])]))),128)):ae("",!0)],6))],16,Pg)}),128)),K("div",{class:"last","data-index":e.totalImgs},[ke(m.$slots,"end")],8,Eg)]),_:3},8,["space-top","controls-visible","zoom","zooming","pinch-to-zoome","double-tap-zoom","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 .rbod__page--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) .rbod__page--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 .rbod__page--loading{height:100%;width:100%}.rbod--paging .rbod__page.rbod__page--double{align-items:center;background-color:transparent;display:flex;gap:var(--gap);justify-content:center}.rbod--paging .rbod__page.rbod__page--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 .rbod__page.rbod__page--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 .rbod__page,.rbod>div{margin:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none}.rbod .rbod__page{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));-o-object-fit:contain;object-fit:contain}.rbod .rbod__page--loading{align-items:center;background-color:transparent;display:flex;justify-content:center}.rbod .img canvas,.rbod .img img{height:100%;max-height:100%;max-width:100%;width:100%}"]]]),Mg=Object.freeze(Object.defineProperty({__proto__:null,default:Sa},Symbol.toStringTag,{value:"Module"})),Og={},$g={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Dg(e,t){return b(),z("svg",$g,[...t[0]||(t[0]=[K("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 ka=be(Og,[["render",Dg]]),zg=Object.freeze(Object.defineProperty({__proto__:null,default:ka},Symbol.toStringTag,{value:"Module"})),Ag={class:"flex w-full flex-shrink-0 justify-between items-center h-16 px-3"},Ca=he({__name:"BottomSheet",props:Xe({spaceTop:{type:Number}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=st(e,"modelValue"),n=ne(null),o=ne(!1),i=ne(0);Dt({onKeyDown:s});const r=Xo();de(t,c=>r(c)),er(()=>{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,w=p>0?p:0;w!=i.value&&(i.value=w);const g=w>0;g!==o.value&&(o.value=g)}async function u(){o.value=!1,l.y=-1,await pt();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)=>(b(),z("div",{class:ue(["fixed inset-0 flex flex-col items-center justify-end select-none z-40 text-stone-100",{"!pointer-events-none":!t.value}]),style:Te({"padding-top":(e.spaceTop??0)+60+"px"}),onClick:d[3]||(d[3]=()=>t.value=!1)},[N(to,{"enter-from-class":"!translate-y-full","leave-to-class":"!translate-y-full"},{default:ie(()=>[t.value?(b(),z("div",{key:0,class:ue(["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:Te(i.value?{transform:`translateY(${i.value}px)`}:{}),onClick:d[1]||(d[1]=Ne(()=>{},["stop"])),onWheelPassive:d[2]||(d[2]=Ne(()=>{},["stop"])),onTouchmove:Ne(a,["stop"]),onTouchend:u},[K("div",Ag,[N(Je,{transparent:"",onClick:d[0]||(d[0]=()=>t.value=!1)},{default:ie(()=>[N(ka)]),_:1}),ke(c.$slots,"name"),ke(c.$slots,"actions")]),K("div",{ref_key:"scrollEl",ref:n,class:ue(["overflow-auto overscroll-none px-6 md:px-8 lg:px-10 xl:px-12 pt-1.5 pb-8 md:pb-6 flex-grow scrollbar-sm",{"overflow-hidden":o.value}]),style:{"max-height":"calc(100% - 4rem)"}},[ke(c.$slots,"default")],2)],38)):ae("",!0)]),_:3})],6))}}),Bg=Object.freeze(Object.defineProperty({__proto__:null,default:Ca},Symbol.toStringTag,{value:"Module"})),Lg=["onClick","onKeyup"],Ta=be(he({__name:"TabBar",props:Xe({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=st(e,"modelValue"),o=ne(null),i=ne({width:"",left:""}),r=ne(!1);je(()=>{const l=Date.now();de(n,async a=>{var c;await pt();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)=>(b(),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:{}},[K("div",{class:ue(["bg-stone-300 h-6 rounded-2xl absolute top-1 pointer-events-none",{"duration-200":r.value}]),style:Te(i.value)},null,6),(b(!0),z(we,null,Jt(t.items,(u,c)=>He((b(),z("div",{key:c,tabindex:"0",class:ue(["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:Ne(()=>s(c),["stop"]),onKeyup:[Ko(()=>s(c),["enter"]),Ko(()=>s(c),["space"])]},[Ut(We(u),1)],42,Lg)),[[U(zt),30]])),128))],512))}}),[["styles",[".scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}"]]]),jg=Object.freeze(Object.defineProperty({__proto__:null,default:Ta},Symbol.toStringTag,{value:"Module"})),Ng={},Vg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Rg(e,t){return b(),z("svg",Vg,[...t[0]||(t[0]=[K("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 Pa=be(Ng,[["render",Rg]]),Hg=Object.freeze(Object.defineProperty({__proto__:null,default:Pa},Symbol.toStringTag,{value:"Module"})),Fg={},Wg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"};function qg(e,t){return b(),z("svg",Wg,[...t[0]||(t[0]=[K("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 Ia=be(Fg,[["render",qg]]),Ug=Object.freeze(Object.defineProperty({__proto__:null,default:Ia},Symbol.toStringTag,{value:"Module"})),Kg={key:1,class:"w-full text-center text-xl whitespace-nowrap text-ellipsis flex-shrink overflow-hidden px-5 select-text"},Zg={class:"opacity-90"},Yg={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 px-4"},_r=he({__name:"SettingsBottomSheet",props:Xe({name:{type:String},spaceTop:{type:Number},enableHelp:{type:Boolean},enableDefaultPreferences:{type:Boolean}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:Xe(["help","more"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=st(e,"modelValue"),r=ne(0),s=Q(()=>n.name??location.hostname);Dt({onKeyUp:a=>{a.key==="s"&&!a.metaKey&&!a.ctrlKey&&(i.value=!0)}}),je(()=>{de(i,a=>{a||setTimeout(()=>{r.value!==0&&(r.value=0)},300)})});function l(){o("help"),i.value=!1}return(a,u)=>(b(),se(Ca,{modelValue:i.value,"onUpdate:modelValue":u[2]||(u[2]=c=>i.value=c),"space-top":e.spaceTop},{name:ie(()=>[e.enableDefaultPreferences?(b(),se(Ta,{key:0,modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=c=>r.value=c),items:["Preferences","Default"]},null,8,["modelValue"])):(b(),z("h3",Kg,We(s.value),1))]),actions:ie(()=>[e.enableDefaultPreferences?(b(),se(Je,{key:0,transparent:"",class:ue(e.enableHelp?"":"opacity-0 pointer-events-none"),onClick:l},{default:ie(()=>[K("span",Zg,[N(Pa)])]),_:1},8,["class"])):(b(),se(Je,{key:1,transparent:"",onClick:u[1]||(u[1]=()=>o("more"))},{default:ie(()=>[N(Ia)]),_:1}))]),default:ie(()=>[r.value===0?(b(),z(we,{key:0},[e.enableDefaultPreferences?(b(),z("h3",Yg,We(s.value),1)):ae("",!0),ke(a.$slots,"tab-preferences")],64)):(b(),z(we,{key:1},[ke(a.$slots,"tab-default"),u[3]||(u[3]=K("div",{class:"h-6"},null,-1))],64))]),_:3},8,["modelValue","space-top"]))}}),Xg=Object.freeze(Object.defineProperty({__proto__:null,default:_r},Symbol.toStringTag,{value:"Module"}));function yn(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}))}const Gg={text:$a,attr:om,"attr-contain":im,value:rm,row:sm,"bg-image":lm,json:am},Jg={pattern:cm,remove:um,atob:dm,json:Da};function Ea(e,t){if(e)return Qg(e,t,tm)}function Qg(e,t,n){if(!e)return;const o=e.split("||").map(i=>i.trim()).filter(Boolean);for(const i of o){const r=em(i);if(!r)continue;const s=n(document.documentElement,r);if(s)return s}}function em(e){const[t,n,...o]=e.split("|");if(!n)return;const i=n!=null&&n.startsWith("[")&&n.endsWith("]")?n.substring(1,n.length-1).split(","):[n];return{selector:t||void 0,extractors:i.map(Ma),transformers:o.map(Ma)}}function Ma(e){const t=e.indexOf(":"),n=t!==-1;return{fn:n?e.substring(0,t):e,param:n?e.substring(t+1):""}}function tm(e,t){if(!t.selector)return Oa(e,t);const n=fm(t.selector);for(const o of n){const i=Array.from(e.querySelectorAll(o));for(const r of i){const s=Oa(r,t);if(s)return s}}}function Oa(e,t){for(const n of t.extractors){const o=Gg[n.fn],i=o(e,n.param);if(i)return nm(i,t.transformers)}}function nm(e,t){var o;let n=e;for(const i of t){if(!n)return;const r=Jg[i.fn];r&&(n=(o=r(n,i.param))==null?void 0:o.trim())}return n}function $a(e){return Array.from(e.childNodes).filter(n=>n.nodeType===3).map(n=>wn(n.textContent)).filter(Boolean).join(" ").trim()||wn(e.textContent)}function om(e,t){return wn(e.getAttribute(t))}function im(e,t){let n=e.getAttribute(t);if(!n){const o=e.getAttributeNames().find(i=>i.includes(t));o&&(n=e.getAttribute(o))}return wn(n)}function rm(e){return e.value}function sm(e,t){var i,r,s;if(!t)return;const n=(i=wn(e.textContent))==null?void 0:i.toLowerCase(),o=t.toLowerCase();if(!(n!==o&&n!==`${o}:`))return wn(((r=e.nextElementSibling)==null?void 0:r.textContent)??((s=e.nextSibling)==null?void 0:s.textContent))}function lm(e){const t=getComputedStyle(e).backgroundImage;if(!(!t||!t.startsWith("url(")))return t.slice(5,-2)||void 0}function am(e,t){const n=$a(e);if(n)return Da(n,t)}function Da(e,t){const n=za(fa(e),t),o=typeof n;if(o==="string")return wn(n)||e;if(o==="number"||o==="boolean")return n+""}function za(e,t){if(!e||!t)return;const n=t.indexOf("."),o=n!==-1,i=o?t.substring(0,n):t,r=o?t.substring(n+1):void 0;try{const s=e[i];return r?za(s,r):s}catch{return}}function wn(e){if(e)return(e==null?void 0:e.replace(/(\n|\t)/g," ").trim())||void 0}function cm(e,t){if(t)try{return e.replace(new RegExp(t,"i"),"$1")}catch{}return e}function um(e,t){if(t)try{return e.replaceAll(new RegExp(t,"gi"),"")}catch{}return e}function dm(e){try{return window.atob(e)}catch{return e}}function fm(e){const t=[];let n="",o=!1;for(let r=0;r<e.length;r++){const s=e[r];if(s==="["?o=!0:s==="]"&&(o=!1),s===","&&!o){const l=n.trim();l.length>0&&t.push(l),n=""}else n+=s}const i=n.trim();return i.length>0&&t.push(i),t}function Sr(e,t){const n=t??document;if(e.startsWith("//")){const i=document.evaluate(e,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;return i instanceof HTMLElement?i:void 0}return n.querySelector(e)??void 0}function xn(e=0){return new Promise(t=>setTimeout(t,e))}const kr={};async function Cr(e){pm();const t=(()=>{const r=e.width,s=e.height;if(r&&s)return{width:r,height:s};const l=e.getBoundingClientRect();return{width:l.width,height:l.height}})(),n=await Aa(e);if(n)return{size:t,src:n};const o=hm(e);if(!o)return;const i=await Aa(o);if(i)return{size:t,src:i}}function pm(){var o,i;if(kr.toBlob)return;const e=document.createElement("template");e.innerHTML="<iframe></iframe>";const t=e.content.querySelector("iframe");t&&(t==null||t.style.setProperty("style","none"),document.body.appendChild(t));const n=(i=(o=t==null?void 0:t.contentWindow)==null?void 0:o.HTMLCanvasElement)==null?void 0:i.prototype;kr.toBlob=(n==null?void 0:n.toBlob)??HTMLCanvasElement.prototype.toBlob,t&&document.body.removeChild(t)}function hm(e){var o;const t=e.cloneNode(),n=(o=t.getContext)==null?void 0:o.call(t,"2d");if(n){try{n.drawImage(e,0,0)}catch{return}return t}}function Aa(e){return new Promise(t=>{const n=o=>{if(!o)return t(void 0);const i=URL.createObjectURL(o);t(i)};try{kr.toBlob.call(e,n,"image/jpeg",1)}catch{t(void 0)}})}async function Ba({src:e,onSize:t,resolveOnSizeDetected:n}){return new Promise(o=>{const i=new Image;let r=!1,s;const l=setInterval(()=>{const{naturalWidth:a,naturalHeight:u}=i;if(u&&a)if(clearInterval(l),vn(a,u)){s={width:a,height:u};const c={src:e,size:s};t==null||t(c),n&&o(c)}else i.onload=()=>{},r=!0,o(void 0)},20);i.onerror=()=>{clearInterval(l),o({src:e,hasError:!0})},i.onload=()=>setTimeout(()=>!r&&o(s?{src:e,size:s}:void 0),30),i.src=e})}let li;async function La({el:e,src:t,onSize:n,resolveOnSizeDetected:o}){if(t.startsWith("blob:")){const r=await gm(e,t);return r&&(n==null||n(r)),r}if((e==null?void 0:e.src)===t&&e.naturalWidth&&e.naturalHeight){const r={width:e.naturalWidth,height:e.naturalHeight};if(vn(r.width,r.height)){const s={src:t,size:r};return n==null||n(s),o||e.complete||await mt(150,100,()=>e.complete||void 0),s}return}return await Ba({src:t,onSize:n,resolveOnSizeDetected:o})}async function gm(e,t){const n=e.naturalWidth,o=e.naturalHeight;if(!vn(n,o))return;if(li===void 0)try{(await fetch(t)).ok&&(li=!0)}catch{}if(!li)li=!1;else return{src:t,size:{width:n,height:o}};const i=document.createElement("canvas"),r=i.getContext("2d");return i.width=n,i.height=o,r==null||r.drawImage(e,0,0,n,o),await Cr(i)}async function ja(e){const{lstrip:t,lstripBtn:n}=e||{};if(!t||!n||!!Sr(t))return!1;const i=n.split(";");for(const r of i)if(!await mm(r.trim()))return!1;return!0}async function mm(e){const t=await mt(50,30,()=>Sr(e));return t?(yn(t),await xn(),!0):!1}function Tr(e){return Array.from(e.querySelectorAll("img:not(nav img, header img, footer img, aside img),canvas"))}class Na{constructor(){re(this,"id",0)}dispose(){this.id++}async run(t){const n=++this.id;await t(()=>n!==this.id)}}class Pr{constructor(t){re(this,"initialPage");re(this,"onInitialPageChanged");re(this,"onAsyncImgsChanged");this.initialPage=t.initialPage,this.onInitialPageChanged=t.onInitialPageChanged,this.onAsyncImgsChanged=t.onAsyncImgsChanged}}class vm extends Pr{constructor(n){super(n);re(this,"asyncImgs",[]);re(this,"contentSel");re(this,"contentEl");re(this,"pagingSpec");re(this,"currentPageIndex",0);re(this,"isDisposed",!1);re(this,"allDownloaded",!1);re(this,"downloadingIndex");re(this,"onError");re(this,"imgsCache",new Map);re(this,"canvasCache",new Map);re(this,"onPageChangedSingleThread",new Na);re(this,"onAsyncImgsChangedThrottled");this.contentSel=n.contentSel,this.pagingSpec=n.pagingSpec,this.onError=n.onError,this.onAsyncImgsChangedThrottled=nn(o=>o.length&&n.onAsyncImgsChanged(o),50),(async()=>{if(await ja(n.spec),this.isDisposed)return;const o=await mt(200,50,()=>{const r=ai(n.pagingSpec.current);return r&&r>0?r-1:void 0});if(o===void 0){n.onError();return}if(this.isDisposed||(this.currentPageIndex=o,await this.observeTotal(),this.isDisposed))return;const i=n.initialPage!==void 0?Math.min(this.asyncImgs.length-1,n.initialPage):o;n.initialPage!==i&&n.onInitialPageChanged(i),await this.downloadCurrentPages(Math.floor(i))})()}dispose(n){if(this.isDisposed=!0,this.onPageChangedSingleThread.dispose(),n!==void 0){const o=this.findPageBtn(Math.floor(n));o&&yn(o)}}onPageIndexChanged(n,o){this.downloadCurrentPages(o)}setAsyncImgs(n){this.asyncImgs=Array.from({length:n}).map((o,i)=>o??this.asyncImgs[i]),this.allDownloaded=this.asyncImgs.every(Boolean)}async observeTotal(){let n=await mt(100,50,()=>{const r=ai(this.pagingSpec.total);return r&&r<2e3?r:void 0});if(!n){this.onError();return}this.setAsyncImgs(n);let o=0;const i=setInterval(()=>{if(this.isDisposed){clearInterval(i);return}const r=ai(this.pagingSpec.total);if(!r||n===r){o=0;return}n=r,this.onTotalChanged(r),++o===50&&clearInterval(i)},200)}onTotalChanged(n){this.setAsyncImgs(n),this.onAsyncImgsChangedThrottled(this.asyncImgs),this.downloadCurrentPages(this.currentPageIndex)}async downloadCurrentPages(n){this.allDownloaded||this.downloadingIndex!==n&&(this.downloadingIndex=n,await this.onPageChangedSingleThread.run(async o=>{const i=[n-1,n+3,n+2,n+1,n];for(const r of i)if(!(r<0||r>=this.asyncImgs.length)&&(await this.navigateToPage(r,o),o()||r!==this.currentPageIndex||(await this.downloadPageImg(this.currentPageIndex,o),o())))return;this.downloadingIndex=void 0}))}async navigateToPage(n,o){if(n===this.currentPageIndex)return;const i=this.findPageBtn(n);if(i&&(await this.clickNavigateBtn(i,n,o),o()||this.currentPageIndex===n))return;const{prevBtn:r,nextBtn:s}=this.pagingSpec;if(!r||!s)return;const l=n-this.currentPageIndex>0,a=l?s:r,u=document.querySelector(a);if(!u)return;const c=this.currentPageIndex+(l?1:-1);await this.clickNavigateBtn(u,c,o),!(o()||this.currentPageIndex!==c)&&await this.navigateToPage(n,o)}async clickNavigateBtn(n,o,i){for(let r=0;r<20;r++){yn(n);for(let s=0;s<6;s++){await xn(50);const l=ai(this.pagingSpec.current);if(l&&(this.currentPageIndex=l-1,this.currentPageIndex===o)||i())return}}}async downloadPageImg(n,o){var r;const i=await this.findContentEl();if(!(o()||!i))for(let s=0;s<400;s++){const l=(r=this.pagingSpec)==null?void 0:r.img,a=l?i.querySelector(l):Tr(i).find(c=>On(c,i)&&vn(c.width,c.height));if(!a){if(await xn(50),o())return;continue}const u=await this.downloadImageEl(a,n,o);if(o())return;(u!=null&&u.size||u!=null&&u.hasError)&&this.setAsyncImg(n,u);break}}async findContentEl(){if(this.contentEl&&this.contentEl.isConnected)return this.contentEl;const n=this.contentSel;if(n)return await mt(100,10,()=>{for(const o of n.split(",")){const i=document.querySelector(o);if(i)return this.contentEl=i,i}})}setAsyncImg(n,o){n>=0&&n<this.asyncImgs.length&&o!==this.asyncImgs[n]&&(this.asyncImgs.splice(n,1,o),this.onAsyncImgsChangedThrottled([...this.asyncImgs]))}async downloadImageEl(n,o,i){if(n instanceof HTMLCanvasElement){const l=this.canvasCache.get(n);if(l)return l;const a=await Cr(n);return a&&this.canvasCache.set(n,a),a}let r,s=0;for(let l=0;l<300;l++){const a=n.src,u=await(async()=>{const c=this.imgsCache.get(a);if(c){if(r!==a&&(r=a,s=0),(c==null?void 0:c.index)!==o){if(++s<10)return;this.imgsCache.set(a,{...c,index:o})}return c.asyncImg}const d=await La({el:n,src:a,resolveOnSizeDetected:!0});return this.imgsCache.set(a,{index:o,asyncImg:d}),d})();if(!u){if(await xn(100),i())return;continue}return u}}findPageBtn(n,o){const{pageBtn:i}=this.pagingSpec;if(i)return o!=null&&o.isConnected?o:Sr(i.replaceAll("{page}",`${n+1}`),document.body)}}function ai(e,t){return bm(Ea(e,t))}function bm(e){if(e)return parseInt(e.replace(/\D*/,""))||void 0}function ym(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}const wm=3;class Va{constructor(t){re(this,"download");re(this,"key");re(this,"threads");re(this,"runningItems",[]);re(this,"completedItems");re(this,"promisesMap",new Map);this.download=t.download,this.key=t.key}dispose(){var t;(t=this.threads)==null||t.dispose(),this.threads=void 0,this.completedItems=void 0}run(t){var s;const{activeIndex:n}=t;t.items&&(this.runningItems=t.items);const o=this.runningItems;if(this.completedItems===o)return;this.completedItems=void 0,(s=this.threads)==null||s.dispose();let i=Math.max(0,n-1),r=!0;this.threads=new xm(wm,()=>{const l=o[i];if(!l){this.completedItems=o;return}r&&i===o.length-1?(r=!1,i=n-2):r?i++:i--;const a=this.key?this.key(l):l;if(a){const u=this.promisesMap.get(a);if(u)return u;const c=this.download(l,a);return this.promisesMap.set(a,c),c}}),this.threads.exec()}}class xm{constructor(t,n){re(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 xn(20),this.next())}}function _m(e,t){let n;return()=>{n&&clearTimeout(n),n=setTimeout(()=>{e(),n=void 0},t)}}class Ir{constructor(t){re(this,"callback");re(this,"isDisposed",!1);re(this,"unobserveMap",new Map);this.callback=t}dispose(){this.isDisposed=!0,this.clear()}clear(){for(const t of this.unobserveMap.values())t()}observe(t){if(this.unobserveMap.has(t.el))return;const n=this.observeInternal(t,()=>{!this.isDisposed&&this.unobserveMap.has(t.el)&&this.callback(t)});this.unobserveMap.set(t.el,n)}unobserve(t){var n;(n=this.unobserveMap.get(t.el))==null||n(),this.unobserveMap.delete(t.el)}}class Sm extends Ir{observeInternal({el:t},n){const o=t.getContext("2d");if(!o)return()=>{};const i=o.drawImage.bind(o),r=o.putImageData.bind(o),s=_m(()=>{n()},120),l=(a,u,c)=>(s(),Reflect.apply(a,u,c));try{o.drawImage=new Proxy(i,{apply:l}),o.putImageData=new Proxy(r,{apply:l})}catch{}return()=>{try{o.drawImage=i,o.putImageData=r}catch{}}}}class km{constructor(t,n){re(this,"contentEl",document.body);re(this,"contentSel");re(this,"cb");re(this,"isDisposed",!1);this.contentSel=t,this.cb=n}dispose(){this.isDisposed=!0}async load(t){const n=this.contentSel;if(!n){this.cb(document.body);return}let o=await mt(t?100:1,10,()=>{for(const s of n.split(",")){const l=document.querySelector(s);if(l)return l}});if(!o)return;this.contentEl=o,this.cb(o);let i=0;const r=async()=>{if(!this.isDisposed&&!(o!=null&&o.isConnected)){if(i=0,o=await mt(50,20,()=>{const s=document.querySelector(n);return s!=null&&s.isConnected&&s!==o?s:void 0}),!o||o===this.contentEl)return;this.contentEl=o,this.cb(o)}!this.isDisposed||++i>=10||setTimeout(r,200)};setTimeout(r,200)}}class Cm extends Ir{observeInternal(t,n){const o=()=>{n(),this.unobserve(t)};return t.el.addEventListener("load",o),()=>t.el.removeEventListener("load",n)}}class Tm extends Ir{observeInternal({el:t},n){let o=t.getAttribute("src");const i=new MutationObserver(r=>{r.some(l=>{if(l.attributeName!=="src")return!1;const a=o;return o=t.getAttribute("src"),!!o&&a!==o})&&n()});return i.observe(t,{attributes:!0}),()=>i.disconnect()}}function Ra(e,t){const n=(o,i)=>{if(!o)return;const{offsetTop:r,offsetParent:s}=o;if(s&&r&&i.set(s,Math.max(i.get(s)??0,r)),!(o===t||o.scrollHeight-o.clientHeight>=10&&window.getComputedStyle(o).overflow!=="visible"))return n(o.parentElement,i);let a=0;return i.forEach((u,c)=>{a+=c===s?u-r:u}),{el:o,top:a}};return n(e,new Map)}const ci="mp-scroll-container";class Pm{constructor(){re(this,"scrollEl")}dispose(){var t;(t=this.scrollEl)==null||t.classList.remove(ci)}scrollTo({rawImages:t,page:n,skipIfVisible:o,isScrollDown:i,isScrollExact:r,fallbackScrollEl:s}){var O;const l=Math.floor(n),a=t[Math.min(t.length-1,l)];if(!a)return;const u=a.el??a.parentEl;if(!u)return;const c=u.getBoundingClientRect();if(o&&c.top<=0&&c.top+c.height>0)return;const d=Ra(u,s);if(!d)return;const{el:f,top:p}=d;s!==document.documentElement&&!f.classList.contains(ci)&&(f!==this.scrollEl&&((O=this.scrollEl)==null||O.classList.remove(ci),this.scrollEl=f),f.classList.add(ci));const w=n>=t.length?c.height:r?n%1*c.height:i?Math.max(0,c.height-window.innerHeight/2):-window.innerHeight/2,g={top:p+w,behavior:"instant"};f.scrollTo(g),f!==document.documentElement&&document.documentElement.scrollTo(g)}}function Im(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)}class Em extends Pr{constructor(n){var s,l;super(n);re(this,"spec");re(this,"rawImages",[]);re(this,"validRawImages",[]);re(this,"isDisposed",!1);re(this,"loadRawImagesThread",new Na);re(this,"isRawImagesLoadedOnce",!1);re(this,"isScrolledOnce",!1);re(this,"currentPageIndex");re(this,"isIOS");re(this,"asyncImgsMap",new Map);re(this,"disconnectObservers");re(this,"submitAsyncImgsThrottled");re(this,"contentElLoader");re(this,"imgLoadOnceObserver",new Cm(()=>this.reloadRawImages()));re(this,"autoDownloadQueue",new Va({download:(n,o)=>this.downloadImageEl({el:o,parentEl:n.parentEl}),key:n=>n.el}));re(this,"scroller",new Pm);re(this,"canvasObserver",new Sm(n=>{this.downloadImageEl(n)}));re(this,"imgSrcObserver",new Tm(n=>{this.downloadImageEl(n)}));re(this,"reloadRawImages",vt(()=>{this.loadRawImages(this.contentElLoader.contentEl)},100));this.spec=n.spec,this.isIOS=n.isIOS,this.submitAsyncImgsThrottled=nn(a=>{this.submitAsyncImgs(),a==null||a()},50);const o=new MutationObserver(this.reloadRawImages),i=(s=this.spec)!=null&&s.imgDivs?void 0:(()=>{let a=window.innerWidth;return new ResizeObserver(vt(()=>{const u=window.innerWidth;if(u!==a){a=u;return}this.reloadRawImages()},50))})();this.disconnectObservers=async()=>{o.disconnect(),i==null||i.disconnect()};let r=!1;this.contentElLoader=new km((l=this.spec)==null?void 0:l.content,a=>{o.disconnect(),i==null||i.disconnect(),o.observe(a,{childList:!0,subtree:!0}),i==null||i.observe(a),r?this.reloadRawImages():(r=!0,this.loadRawImages(a))}),this.loadContentEl()}dispose(n){var o;this.isDisposed=!0,(o=this.disconnectObservers)==null||o.call(this),this.disconnectObservers=void 0,this.contentElLoader.dispose(),this.loadRawImagesThread.dispose(),this.imgLoadOnceObserver.dispose(),this.autoDownloadQueue.dispose(),this.canvasObserver.dispose(),this.imgSrcObserver.dispose(),n!==void 0&&this.scroller.scrollTo({rawImages:this.validRawImages,page:n,fallbackScrollEl:document.documentElement,isScrollExact:!0}),this.scroller.dispose()}onPageIndexChanged(n,o){this.currentPageIndex=o,this.scroller.scrollTo({rawImages:this.validRawImages,page:o,isScrollDown:!this.isScrolledOnce||n===void 0||o>n||this.validRawImages.length===1,fallbackScrollEl:this.isIOS?document.body:document.documentElement}),this.isScrolledOnce=!0,this.autoDownloadQueue.run({activeIndex:this.currentPageIndex})}onRawImagesLoaded(n){var o,i,r;if(this.rawImages=n,!this.isRawImagesLoadedOnce){this.isRawImagesLoadedOnce=!0;const s=this.initialPage!==void 0?Math.min(n.length-1,this.initialPage):$m(n);if(this.currentPageIndex=Math.floor(s),this.initialPage!==s&&this.onInitialPageChanged(s),(o=this.spec)!=null&&o.imgDivs){const l=this.currentPageIndex>0&&!((i=n[this.currentPageIndex-1])!=null&&i.el),a=(r=n[this.currentPageIndex])==null?void 0:r.el;(l||!a)&&this.scroller.scrollTo({rawImages:n,page:l?s-1:s,isScrollDown:!0,skipIfVisible:!0,fallbackScrollEl:this.isIOS?document.body:document.documentElement})}}this.submitAsyncImgsThrottled(()=>{this.currentPageIndex!==void 0&&this.autoDownloadQueue.run({activeIndex:this.currentPageIndex,items:this.validRawImages})})}submitAsyncImgs(){const n=[],o=[];this.rawImages.forEach(i=>{let r=i.el?this.asyncImgsMap.get(i.el):void 0;!r&&i.parentEl&&(r=this.asyncImgsMap.get(i.parentEl)),(r||i.parentEl||i.el&&!this.asyncImgsMap.has(i.el))&&(n.push(r),o.push(i))}),this.validRawImages=o,this.onAsyncImgsChanged(n)}onImageElDownloaded(n,o,i){this.asyncImgsMap.set(n,i),o&&this.asyncImgsMap.set(o,i),this.submitAsyncImgsThrottled()}async downloadImageEl({el:n,parentEl:o}){if(n instanceof HTMLCanvasElement){this.canvasObserver.observe({el:n,parentEl:o});const r=await Cr(n);if(!r||this.isDisposed)return;this.onImageElDownloaded(n,o,r);return}this.imgSrcObserver.observe({el:n,parentEl:o});const i=Im(n);for(let r=0;r<i.length;r++){const s=i[r],l=await La({el:n,src:s,onSize:a=>{this.onImageElDownloaded(n,o,a)}});if(l!=null&&l.size)break;l!=null&&l.hasError&&r===i.length-1&&this.onImageElDownloaded(n,o,l)}}setRawImages(n){let o=!1;const i=n.map((r,s)=>{const l=this.rawImages[s];return l&&l.parentEl===r.parentEl&&(l.el===r.el||l.parentEl&&l.el&&!r.el)?l:(o=!0,r)});(o||i.length!==this.rawImages.length)&&this.onRawImagesLoaded(i)}async loadContentEl(){const n=await ja(this.spec);this.isDisposed||this.contentElLoader.load(n)}async loadRawImages(n){this.isDisposed||!n.isConnected||await this.loadRawImagesThread.run(async o=>{var s;const i=(s=this.spec)==null?void 0:s.imgDivs,r=i?this.loadFromImgDivs(n,i):this.loadFromContentEl(n);o()||this.isDisposed||!n.isConnected||this.setRawImages(r)})}loadFromImgDivs(n,o){const i=ym(o,n);return i.length?i.map(s=>{const l=Tr(s).find(a=>this.validateImageEl(a,s));return{parentEl:s,el:l}}):this.loadFromContentEl(n)}loadFromContentEl(n){const o=[];return Tr(n).forEach(r=>{this.validateImageEl(r,n)&&o.push({el:r})}),o}validateImageEl(n,o){const i=On(n,o);return n instanceof HTMLImageElement?!i||!Om(n)?(this.imgLoadOnceObserver.observe({el:n}),!1):!0:i&&Mm(n)}}function Mm(e){return e.isConnected&&vn(e.width,e.height)}function Om(e){if(!e.isConnected)return!1;const t=e.getBoundingClientRect();return!t.width&&!e.naturalWidth||!t.height&&!e.naturalHeight||vn(t.width,t.height)}function $m(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}class Dm extends Pr{constructor(n){super(n);re(this,"srcs");re(this,"queue");re(this,"isDisposed",!1);this.srcs=n.srcs;const o=n.initialPage!==void 0?Math.min(n.srcs.length-1,n.initialPage):this.getInitialPage();n.initialPage!==o&&this.onInitialPageChanged(o);const i=new Map,r=nn(()=>{if(!this.isDisposed){const s=[];n.srcs.forEach(l=>{const a=i.get(l);(a||!i.has(l))&&s.push(a)}),this.onAsyncImgsChanged(s)}},50);r(),this.queue=new Va({download:async s=>Ba({src:s,onSize:l=>{i.set(s,l),r()}}).then(l=>{l!=null&&l.size||(i.set(s,l),r())})}),this.queue.run({items:n.srcs,activeIndex:Math.floor(o)})}dispose(n){this.isDisposed=!0,this.queue.dispose(),n!==void 0&&this.restoreScroll(n)}onPageIndexChanged(n,o){this.queue.run({items:this.srcs,activeIndex:o})}restoreScroll(n){const o=this.srcs[Math.min(this.srcs.length-1,Math.floor(n))];if(!o)return;const i=this.findImgElBySrc(o);if(!i)return;const r=Ra(i,document.documentElement);if(!r)return;const{el:s,top:l}=r,a=n>=this.srcs.length?i.height:n%1*i.height;s.scrollTo({top:l+a,behavior:"instant"})}getInitialPage(){for(let n=0;n<this.srcs.length;n++){const o=this.findImgElBySrc(this.srcs[n]);if(!o)continue;const i=o==null?void 0:o.getBoundingClientRect();if(!i||i.bottom<=0)continue;const r=i.top;return n+(r>=0?0:-r/i.height)}return 0}findImgElBySrc(n){return document.querySelector(`img[src="${n}"],img[data-src="${n}"]`)}}function zm(e){var g,O,S,A;const t=(g=e.raw.value)==null?void 0:g.isWebtoon,n=ne(t),o=((S=(O=e.raw.value)==null?void 0:O.imgs)==null?void 0:S.filter(Boolean))??[],i=ne([]);let r=e.isAutoShow!==!1&&e.page.value?e.page.value:void 0,s=!1,l=!1,a,u=setTimeout(e.onTimeout,2e4);const c=()=>{u&&(clearTimeout(u),u=void 0)},d=o.length?new Dm({srcs:o,initialPage:r,onInitialPageChanged:f,onAsyncImgsChanged:p}):(A=e.spec)!=null&&A.paging?new vm({spec:e.spec,contentSel:e.spec.content,pagingSpec:e.spec.paging,initialPage:r,onAsyncImgsChanged:p,onInitialPageChanged:f,onError:()=>e.onError("SPEC_ERR")}):new Em({isIOS:e.touchDevice&&!navigator.userAgent.toLowerCase().includes("android"),spec:e.spec,initialPage:r,onInitialPageChanged:f,onAsyncImgsChanged:p});function f(F){r=F}function p(F){if(i.value=F,r&&r>F.length&&(r=F.length-1),n.value!==void 0){w();return}let k=0,m=!1,P=0,C=0,B=0;const y=F.length<3?F:F.slice(F.length<5?1:2,-1),I=Math.min(2,y.length);for(let W=0;W<y.length;W++){const L=y[W];if(!L)continue;B++;const{size:Y,hasError:$}=L;if($){m||k++;continue}if(!Y)continue;m=!0,k=0,a&&(a=void 0,clearTimeout(a));const X=Y.width/Y.height;X>2&&P++;const J=X<.5||P>=I,T=!J&&.65<X&&X<.75;if(T&&C++,J&&n.value!==J&&(n.value=J),n.value===void 0&&T&&C>=I&&(n.value=!1),n.value===void 0&&B>=I&&(n.value=!1),n.value!==void 0){w();return}}k>1&&!a&&(a=setTimeout(()=>{a=void 0,n.value===void 0&&!l&&e.onTimeout()},7e3))}$i(()=>{l=!0,d.dispose(s?e.page.value:void 0),a&&clearTimeout(a)});function w(){if(s||n.value===void 0||r===void 0)return;const F=Math.max(0,Math.min(r,i.value.length)),k=Math.min(Math.floor(F),i.value.length-1);!i.value[k]||k>0&&!i.value[k-1]||s||(s=!0,c(),e.onReady(F),de(()=>Math.floor(e.page.value),(m,P)=>{m!==P&&d.onPageIndexChanged(P,m)},{immediate:!0}))}return{asyncImgs:Q(()=>i.value),isWebtoon:Q(()=>n.value??!1)}}function Ha({touchDevice:e,isBusy:t,isPlaying:n,isIdle:o,hideControlsEvent:i,scrollEl:r,moveThreshold:s}){const l=ne(!0);let a=!1,u=!1;const c={x:0,y:0};let d;gt(()=>{d==null||d(),d=void 0});function f(S){if(i.value===rn.never||t.value&&l.value)return;const A=typeof S=="boolean"?S:!l.value;A!==l.value&&(l.value=A,!a&&!A&&(a=!0))}function p(){r.value&&(c.x=r.value.scrollLeft,c.y=r.value.scrollTop)}function w(){const S=i.value===rn.firstMove,A=r.value;if(!A)return;const F=nn(()=>{if(!l.value){Am(A)&&f(!0);return}if(S&&a)return;const k=Math.abs(A.scrollTop-c.y)||Math.abs(A.scrollLeft-c.x),m=s??(S?c.y===0?300:200:150);k>m&&f(!1)},100);A.addEventListener("scroll",F),d=()=>{A.removeEventListener("scroll",F)}}function g(){switch(d==null||d(),d=void 0,i.value){case rn.onLoad:a||f(!1);break;case rn.firstMove:w();break;case rn.move:w();break;case rn.never:l.value||(l.value=!0);break}}function O(){u||(u=!0,p(),g(),e&&de(Qi(),A=>{A==="hidden"&&!n.value&&!l.value&&f(!0)}),de(t,S=>{S&&!l.value&&f()}),de(n,S=>{S||f(!0)}),de(o,S=>{n.value&&f(!S)}),de(l,S=>{S&&p()}),de(i,()=>g()),de(r,()=>g()))}return{visible:Q(()=>l.value),toggle:f,activate:O}}function Am(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 Bm(e,t,n){return Q(()=>t.value?Fa(e.value,n.value):e.value.map((o,i)=>[{img:o,index:i}]))}function Fa(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})),...Fa(e.slice(r.length),t&&i,n+r.length)]}const Er=40;function Lm({page:e,asyncImgs: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,w=!1,g,O=!1,S,A;const F=vt(I,300),k=nn(()=>{I(),F()},300);function m(){const x=new Promise(q=>{g=()=>{g=void 0,q()}});return B(e.value,{smooth:!1,ensureLastImgVisibility:!0}),x}function P(){var x;w=!0,g==null||g(),W(),(x=a.value)==null||x.addEventListener("scroll",k),setTimeout(()=>{const{width:q,height:oe}=bn();de(()=>`${oe.value}-${q.value}`,C),de(o,C),de(n,C),de(()=>t.value,(Z,j)=>{!j||Z.length===j.length||s.value&&C()})},300)}function C(){const x=a.value;if(!x)return;const q=Date.now();A=q;const{scrollWidth:oe,scrollHeight:Z}=x,j=e.value,Ee=Math.floor(j),xe=t.value[Ee];mt(20,10,async()=>{if(A!==q)return!0;if(x.scrollWidth===oe&&x.scrollHeight===Z)return;let fe=j;if(xe){const ve=t.value.findIndex(ye=>ye===xe||(ye==null?void 0:ye.src)===xe.src);ve!==-1&&Ee!==ve&&(fe=ve+j-Ee)}return await B(fe),!0})}async function B(x,{smooth:q,ensureLastImgVisibility:oe=!1}={smooth:!1}){return new Promise(Z=>{const j=a.value;if(!j){Z();return}p=!0;const Ee=async()=>{await pt(),p=!1,w||P(),Z()},xe=Math.floor(x),fe=xr(j,xe);if(!fe){Ee();return}c(async()=>{await y(j,!i.value&&q,async()=>{await T(j,fe,{smooth:q,page:x,ensureLastImgVisibility:oe})}),await Ee()})})}async function y(x,q,oe){q&&x.style.setProperty("scroll-snap-type","none"),await oe(),q&&x.style.removeProperty("scroll-snap-type")}function I(){if(p)return;const x=Y();x!==void 0&&x!==e.value&&d(x),W()}function W(){O||!O&&L()&&(O=!0,f())}function L(){const x=a.value;if(!x)return!1;const q=!i.value||u.value?3:!r.value&&x.clientWidth>x.clientHeight?2.25:2.5;return r.value?x.scrollHeight-x.scrollTop<x.clientHeight*q:x.scrollWidth-(s.value?-x.scrollLeft:x.scrollLeft)<x.clientWidth*q}function Y(){const x=$();return x?(+x.getAttribute("data-index")||0)+(i.value?X(x):0):void 0}function $(){var q;if(S??(S=a.value.getRootNode()),!S)return;const x=(q=S.elementsFromPoint)==null?void 0:q.call(S,r.value||!i.value?window.innerWidth/2:s.value?window.innerWidth-Er:Er,r.value&&i.value?l.value||Er:window.innerHeight/2);if(x)for(let oe=0;oe<x.length;oe++){const Z=x[oe];if(Z.hasAttribute("data-index"))return Z;if(Z===a.value)break}}function X(x){const q=x.getBoundingClientRect();return r.value?Math.abs(q.top-l.value)/q.height:s.value?Math.max(0,q.right-a.value.clientWidth)/q.width:Math.abs(q.left)/q.width}let J=!1;async function T(x,q,oe){if(J)return;const Z=q.getBoundingClientRect();if(!i.value){if(r.value){if(Z.top<=0&&Z.bottom>=x.clientHeight)return}else if(Z.left<=0&&Z.right>=x.clientWidth)return}J=!0;const j=r.value?x.scrollTop:x.scrollLeft,Ee=oe.page,xe=i.value?Ee%1:0,fe=await mt(30,10,async()=>{await xn();let $e;if(!(q.offsetHeight<10))return i.value?r.value?$e=q.offsetTop+xe*q.offsetHeight-l.value:s.value?$e=q.offsetLeft-x.clientWidth+q.offsetWidth-xe*q.offsetWidth:$e=q.offsetLeft+xe*q.offsetWidth:r.value?$e=q.offsetTop+(Z.top>0?0:Z.height-x.clientHeight):$e=q.offsetLeft+(Z.left>0?0:Z.width-x.clientWidth),Ee>.5&&Math.abs($e)<100?void 0:$e})??0,ve=oe.ensureLastImgVisibility?r.value?Math.min(fe,x.scrollHeight-x.clientHeight*2):s.value?Math.max(fe,-(x.scrollWidth-x.clientWidth*2)):Math.min(fe,x.scrollWidth-x.clientWidth*2):fe;if(!oe.smooth){r.value?x.scrollTop=ve:x.scrollLeft=ve,J=!1;return}const ye=ve-j,Be=30;let at=0;return new Promise($e=>{(function Bt(){const h=jm(at,j,ye,Be);r.value?x.scrollTop=h:x.scrollLeft=h,at++,at<=Be?requestAnimationFrame(Bt):($e(),J=!1)})()})}return{init:m,goToPage:B}}function jm(e,t,n,o){return n*(Math.pow(e/o-1,3)+1)+t}class Nm{constructor(t){re(this,"player");re(this,"debounceStartPlayer");re(this,"isPlaying");re(this,"isIdle",ne(!1));re(this,"onIdle");this.player=t.player,this.debounceStartPlayer=vt(()=>this.player.start(),100);const n=ne(t.autoPlay||sessionStorage.getItem("mp:playing")==="true");this.isPlaying=Q({get:()=>n.value,set:o=>{n.value=o,sessionStorage.setItem("mp:playing",o?"true":"false")}}),this.onIdle=vt(()=>{this.isIdle.value=!0},t.touchDevice?2e3:1e3),this.awake(),t.touchDevice||kt(window,"mousemove",()=>this.awake()),je(()=>{t.touchDevice||de(Qi(),i=>{this.isPlaying.value&&(i==="visible"?this.player.start():this.player.stop())}),de(t.speed,()=>this.interfere()),de(t.isBusy,o=>{!o&&this.isIdle.value&&this.awake()})}),gt(()=>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 pt(),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 Wa extends Nm{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 w=Date.now(),g=w-d;d=w;const O=c*g+f;O>=1?(f=O%1,this.setScrollOffset(s,O-f)):f=O,setTimeout(p,1)};p()}}})}}class Vm extends Wa{constructor(n){super(n);re(this,"isLongStrip");re(this,"isVertical");re(this,"isRTL");const{isLongStrip:o,isVertical:i,isRTL:r}=n;this.isLongStrip=o,this.isVertical=i,this.isRTL=r,o!==void 0&&je(()=>{de(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 Rm(e){return new Vm(e)}function Hm({speed:e,fontSize:t,lineHeight:n,...o}){const i=bn().width;return new Wa({...o,speed:Q(()=>{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 Fm={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"},qa=he({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","timeout","ready","pageChanged","playingChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var R,ee;const n=e,o=t,i=!n.touchDevice||navigator.userAgent.toLowerCase().includes("android")||If(n.appVersion,"6.7.0"),r=ne(!1),s=ne(!1),l=Q(()=>n.busy),a=Q(()=>n.page),u=Q(()=>n.immediate||r.value?n.spaceTop??0:0),c=Q(()=>!n.touchDevice&&X.isIdle.value&&!n.busy&&!C.value),{asyncImgs:d,isWebtoon:f}=zm({raw:Q(()=>n.raw),spec:n.spec,page:a,touchDevice:n.touchDevice,isAutoShow:n.isAutoShow,async onReady(M){xe(M),r.value=!0},onError:()=>o("error"),onTimeout:()=>o("timeout")}),{direction:p,style:w,isRTL:g,isDouble:O,isVertical:S,isLongStrip:A,gap:F,speed:k,zoom:m,breakFirst:P}=Bh({touchDevice:n.touchDevice,isWebtoon:f,titleName:(R=n.raw)==null?void 0:R.title.name,defaultPreferences:Q(()=>n.defaultPreferences)}),C=ne(!1),B=Bm(d,O,P),y=Q(()=>d.value.length),I=Q(()=>a.value>=y.value),W=ne(null),L=ne(null),Y=Q(()=>{var M;return(M=L.value)==null?void 0:M.rootEl}),$=ne(!1),X=Rm({autoPlay:!n.tourEnabled&&(((ee=n.defaultPreferences)==null?void 0:ee.autoPlay)??!1),touchDevice:n.touchDevice,scrollEl:Y,speed:k,isRTL:g,isVertical:S,isLongStrip:A,isBusy:l}),J=Q({get(){return m.value},set(M){X.interfere(()=>{m.value=M})}}),T=Ha({touchDevice:n.touchDevice,isBusy:l,isPlaying:Q(()=>X.isPlaying.value),isIdle:Q(()=>X.isIdle.value),hideControlsEvent:Q(()=>n.defaultPreferences.hideControlsEvent),scrollEl:Y}),x=T.visible,q=Lm({page:a,asyncImgs:d,style:w,direction:p,isLongStrip:A,isVertical:S,isRTL:g,spaceTop:u,isWebtoon:f,scrollEl:Q(()=>{var M;return(M=L.value)==null?void 0:M.rootEl}),interferePlayer:M=>X.interfere(M),onChangedPage:xe,onFinished:()=>o("finished")}),oe=Q(()=>Math.floor(a.value)),Z=Q(()=>A.value?a.value:O.value?h():Math.floor(a.value)),j=()=>X.interfere(()=>xn(100));Dt({onKeyDown:M=>{if(n.tourEnabled)return!0;const _=A.value&&S.value,D=A.value&&!S.value,G=!A.value&&S.value,te=!A.value&&!S.value;switch(M.key){case" ":M.preventDefault(),A.value||v();break;case"ArrowUp":case"PageUp":_?j():G&&oe.value!==0&&(M.preventDefault(),$e());break;case"ArrowDown":case"PageDown":_?j():G&&!I.value&&(M.preventDefault(),Bt());break;case"ArrowLeft":D?j():te?(M.preventDefault(),Be()):S.value&&ye();break;case"ArrowRight":D?j():te?(M.preventDefault(),at()):S.value&&ve();break}},onKeyUp:M=>{switch(M.key){case"b":P.value=!P.value;break}}}),de(X.isPlaying,M=>{o("playingChanged",M)}),de(x,M=>{o("controlsVisibilityChanged",M)});async function Ee(){await q.init(),o("ready"),s.value=!0,T.activate(),X.activate()}function xe(M){if(a.value===M)return;const _=d.value.length;if(M<0||M>=_+1)return;const D=a.value;if(o("pageChanged",M),M<.01&&D>M){X.awake();return}}function fe(){!n.touchDevice&&!A.value&&q.goToPage(oe.value,{smooth:!0})}function ve(M=!1){var _,D;(D=(_=n.chapterNavData)==null?void 0:_.next)==null||D.call(_,M)}function ye(M=!1){var _,D;(D=(_=n.chapterNavData)==null?void 0:_.prev)==null||D.call(_,M)}function Be(){g.value?Bt():$e()}function at(){g.value?$e():Bt()}function $e(){var D;const M=B.value,_=I.value?M[M.length-1][0].index:(D=M[h()-1])==null?void 0:D[0].index;_!==void 0?q.goToPage(_):ye()}function Bt(){var M,_;if(I.value)ve();else{const D=((_=(M=B.value[h()+1])==null?void 0:M[0])==null?void 0:_.index)??d.value.length;q.goToPage(D)}}function h(){const M=oe.value,_=B.value.findIndex(D=>D.some(({index:G})=>G===M));return _===-1?B.value.length-1:_}function v(M){T.toggle(M)}function E(){if(X.isPlaying.value){x.value||!n.touchDevice?X.stop():(X.awake(),T.toggle(!0));return}T.toggle()}function H(){X.stop(),o("clickEntryButton")}function V(){T.toggle(!1),X.isPlaying.value&&X.stop(),o("openHelpScreen")}return(M,_)=>e.immediate||r.value?(b(),se(vr,{key:0,ref_key:"gearLayout",ref:W,loading:!s.value,immediate:!!e.immediate,"hide-cursor":c.value,class:"text-stone-100",onClick:_[21]||(_[21]=Ne(()=>{},["stop"]))},{default:ie(()=>{var D;return[r.value?(b(),se(Sa,{key:0,ref_key:"body",ref:L,zoom:J.value,"onUpdate:zoom":_[1]||(_[1]=G=>J.value=G),zooming:C.value,"onUpdate:zooming":_[2]||(_[2]=G=>C.value=G),page:a.value,"page-index":oe.value,pages:U(B),"total-imgs":U(d).length,direction:U(p),gap:U(F),"is-long-strip":U(A),isRTL:U(g),"is-double":U(O),"is-vertical":U(S),"space-top":u.value||0,busy:l.value,"play-controller":U(X),"touch-device":e.touchDevice,"pinch-to-zoome":e.defaultPreferences.pinchToZoom,"double-tap-zoom":e.defaultPreferences.doubleTapZoom,"tap-zone":e.defaultPreferences.tapZone,"controls-visible":U(x),onReady:Ee,onPrev:$e,onNext:Bt,onClick:E,onDragEnd:fe,onWheelPassive:_[3]||(_[3]=()=>U(X).interfere())},Di({_:2},[r.value&&U(d).length?{name:"end",fn:ie(()=>{var G;return[N(nr,{"has-next":!!((G=e.chapterNavData)!=null&&G.next),"offline-mode":!!e.offlineMode,seconds:e.defaultPreferences.autoNextSeconds,"show-add-button":U(m)===1&&!e.entryId&&!!e.raw&&!e.offlineMode,onNext:ve,onAddToLibrary:H,onHide:_[0]||(_[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","double-tap-zoom","tap-zone","controls-visible"])):ae("",!0),N(_r,{modelValue:$.value,"onUpdate:modelValue":_[10]||(_[10]=G=>$.value=G),"enable-help":"",name:(D=e.raw)==null?void 0:D.title.name,"space-top":u.value,"enable-default-preferences":!e.touchDevice||!!e.appVersion,onHelp:V,onMore:_[11]||(_[11]=()=>o("openDefaultPreferences"))},{"tab-preferences":ie(()=>[N(wa,{"enable-reset":!e.touchDevice||!!e.appVersion,webtoon:U(f),"reader-style":U(w),"onUpdate:readerStyle":_[4]||(_[4]=G=>Ae(w)?w.value=G:null),direction:U(p),"onUpdate:direction":_[5]||(_[5]=G=>Ae(p)?p.value=G:null),gap:U(F),"onUpdate:gap":_[6]||(_[6]=G=>Ae(F)?F.value=G:null),speed:U(k),"onUpdate:speed":_[7]||(_[7]=G=>Ae(k)?k.value=G:null),zoom:J.value,"onUpdate:zoom":_[8]||(_[8]=G=>J.value=G),"default-preferences":e.defaultPreferences},null,8,["enable-reset","webtoon","reader-style","direction","gap","speed","zoom","default-preferences"])]),"tab-default":ie(()=>[N(gr,{"touch-device":e.touchDevice,"model-value":e.defaultPreferences,"double-tap-zoom-available":U(i),"onUpdate:modelValue":_[9]||(_[9]=G=>o("defaultPreferencesChanged",G))},null,8,["touch-device","model-value","double-tap-zoom-available"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),s.value&&!I.value&&!e.tourEnabled?(b(),se(ma,{key:1,direction:U(p),"tap-zone":e.defaultPreferences.tapZone},null,8,["direction","tap-zone"])):ae("",!0),s.value&&!I.value?(b(),se(br,{key:2,playing:U(X).isPlaying.value},null,8,["playing"])):ae("",!0),N(va,{visible:U(x),"space-top":u.value},Di({top:ie(()=>{var G;return[e.raw||e.offlineMode?(b(),se(or,{key:0,"offline-mode":e.offlineMode,raw:e.raw,onClick:_[12]||(_[12]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):ae("",!0),!e.touchDevice&&!e.offlineMode?(b(),se(Jo,{key:1,onClick:_[13]||(_[13]=()=>o("hideReader"))})):ae("",!0),e.chapterNavData?(b(),se(dr,{key:2,"touch-device":e.touchDevice,"chapter-spec":(G=e.spec)==null?void 0:G.chapter,data:e.chapterNavData,rtl:U(g),onGetHiddenChapters:_[14]||(_[14]=()=>o("getHiddenChapters")),onPrev:ye,onNext:ve,onDialogOpened:_[15]||(_[15]=()=>U(T).toggle(!1))},null,8,["touch-device","chapter-spec","data","rtl"])):ae("",!0)]}),"bottom-right":ie(()=>[!e.offlineMode&&e.raw?(b(),se(ir,{key:0,"entry-id":e.entryId,onClick:H},null,8,["entry-id"])):ae("",!0),N(ar,{disabled:!r.value,onClick:_[16]||(_[16]=()=>$.value=!0)},null,8,["disabled"]),e.touchDevice?ae("",!0):(b(),se(cr,{key:1,onRequestFullScreen:_[17]||(_[17]=()=>{var G,te;return(te=(G=W.value)==null?void 0:G.rootEl)==null?void 0:te.requestFullscreen()})})),U(A)?(b(),se(lr,{key:2,"tour-message":"Press here to play like a video",playing:U(X).isPlaying.value,disabled:!s.value,onClick:_[18]||(_[18]=()=>U(X).toggle())},null,8,["playing","disabled"])):ae("",!0),U(O)?(b(),se(Je,{key:3,title:"Break 1st page (B)","data-tour":"Press here to separate the first page from double-page mode",disabled:!s.value,onClick:_[19]||(_[19]=()=>P.value=!U(P))},{default:ie(()=>[U(P)?(b(),se(ya,{key:0})):(b(),se(ba,{key:1}))]),_:1},8,["disabled"])):ae("",!0)]),progress:ie(()=>[e.defaultPreferences.progressSize!==0&&!I.value?(b(),se(yr,{key:0,value:Z.value,total:U(B).length,"long-strip":U(A),height:e.defaultPreferences.progressSize,rtl:U(g)},null,8,["value","total","long-strip","height","rtl"])):ae("",!0)]),default:ie(()=>[e.appVersion&&u.value&&!e.offlineMode?(b(),z("div",{key:0,class:"fixed top-0 left-0 right-0 bg-black bg-opacity-70 pointer-events-auto",style:Te({height:`${u.value}px`})},null,4)):ae("",!0)]),_:2},[U(B).length?{name:"bottom-left",fn:ie(()=>[N(xa,{"model-value":oe.value,disabled:!s.value,pages:U(B),"total-imgs":U(d).length,"onUpdate:modelValue":U(q).goToPage},null,8,["model-value","disabled","pages","total-imgs","onUpdate:modelValue"])]),key:"0"}:void 0]),1032,["visible","space-top"]),U(x)||C.value?(b(),z("div",Fm,[N(to,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ie(()=>[C.value||U(m)!==1?(b(),se(Ql,{key:0,zoom:J.value,onClick:_[20]||(_[20]=Ne(()=>J.value=1,["stop"])),class:"duration-200"},null,8,["zoom"])):ae("",!0)]),_:1})])):ae("",!0),ke(M.$slots,"default")]}),_:3},8,["loading","immediate","hide-cursor"])):ae("",!0)}}),Wm=Object.freeze(Object.defineProperty({__proto__:null,default:qa},Symbol.toStringTag,{value:"Module"}));function qm({sel:e,heading:t,paraSel:n,useObfFont:o}){const i=["H1","H2","H3","H4","H5","H6","P","BLOCKQUOTE","PRE","CODE"],r=["BR","HR"],s=["BUTTON","FIGURE","IMG","SCRIPT","SELECT","INPUT","FORM","IFRAME","NAV","FOOTER","ASIDE","TABLE"],l=Um(e),a=Km(l),u=o?Zm(l):void 0,c=d(l);if(!c)return;return{el:c,isRTL:a,fontFamily:u};function d(w){var P;let g=0,O=!1,S=0,A=0,F=!1;const k=(P=m(w,i.includes(w.tagName)||!!n&&w.matches(n)))==null?void 0:P.node;if(!k)return;if(t){const C=document.createElement("h1");C.innerText=t,k.prepend(C)}return p(k),f(k),k;function m(C,B){var q;if(F)return;if(C.nodeType===Node.TEXT_NODE)return B&&((q=C.textContent)!=null&&q.trim())?{node:C.cloneNode()}:void 0;if(C.nodeType!==Node.ELEMENT_NODE)return;const I=C.tagName;if(s.includes(I)||I==="A"&&(O||!B))return;if(r.includes(I))return B?{node:document.createElement(I),isEmpty:!0}:{aborted:!0};if(C.getAttribute("aria-hidden")==="true"||!On(C)||window.getComputedStyle(C).position==="fixed")return;const L=!!n&&C.matches(n),Y=L||i.includes(I),$=B||Y,X=[];if(Array.from(C.childNodes).forEach(oe=>{if(F)return;const Z=m(oe,$);if(Z!=null&&Z.aborted)return;const j=Z==null?void 0:Z.node;if(j){if(A=Z!=null&&Z.isEmpty?A+1:0,A>2)return;X.push(j),O?S=0:++g>30&&(O=!0)}else O&&++S>30&&(F=!0)}),!X.length)return Y?{node:document.createElement("p"),isEmpty:!0}:void 0;const T=document.createElement(L?"p":I==="BODY"?"div":I==="a"?"span":I),x=C.getAttribute("dir");return x&&x!=="auto"&&T.setAttribute("dir",x),X.forEach(oe=>T.appendChild(oe)),{node:T}}}function f(w){Ka(w,g=>{if(g===w)return;const O=g.tagName;if(r.includes(O)||i.includes(O))return;const S=g.parentElement;if((S==null?void 0:S.childNodes.length)===1){Array.from(g.childNodes).forEach(k=>{S.appendChild(k)}),S.removeChild(g);return}g.childNodes.length===1&&g.replaceWith(g.childNodes[0])})}function p(w){let g=!1;const O=[];Mr(w,S=>i.includes(S.tagName)?[]:Array.from(S.children),S=>{const A=S.textContent.trim();if(!A)return!0;if(g)return!1;if(g=!Ua(S),O.includes(A))return!0;if(g)return!1;O.push(A)}),Mr(w,S=>i.includes(S.tagName)?[]:Array.from(S.children).reverse(),S=>!S.textContent.trim()||Ua(S))}}function Ua(e){const t=e.nodeName;return t.length===2&&t.startsWith("H")}function Um(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 Km(e,t){if(e.getAttribute("dir")==="rtl")return!0;const n=e.querySelector("p")||e.querySelector("div:not(:empty)")||e;return n.getAttribute("dir")==="rtl"?!0:window.getComputedStyle(n).direction==="rtl"}function Zm(e,t){const n=e.querySelector("p")||e.querySelector("div:not(:empty)")||e;return window.getComputedStyle(n).fontFamily}function Ka(e,t){Array.from(e.children).forEach(o=>{Ka(o,t)}),t(e)}function Mr(e,t,n){const o=t(e);let i=!1;for(let r=0;r<o.length;r++){const s=o[r],l=Mr(s,t,n);if(l!==void 0){if(!l)return!1;Ym(s)}else i=!0}if(!i)return n(e)}function Ym(e){var t;(t=e.parentNode)==null||t.removeChild(e)}const Xm={key:1,class:"h-14 sm:h-16 px-2 2xs:px-3 flex gap-1 2xs:gap-3 items-center"},Gm={class:"md:fixed left-0 right-0 bottom-0"},Jm={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"},Za=he({__name:"GearThirdControlsLayout",props:{visible:{type:Boolean},hideTopControls:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(b(),z(we,null,[K("div",{class:ue(["fixed left-0 right-0 top-0 bg-inherit z-30",{"opacity-0 pointer-events-none":!e.visible}])},[e.spaceTop?(b(),z("div",{key:0,style:Te({height:`${e.spaceTop}px`})},null,4)):ae("",!0),e.hideTopControls?ae("",!0):(b(),z("div",Xm,[ke(t.$slots,"top-controls")]))],2),K("div",{class:ue(["fixed left-0 right-0 bottom-0 md:left-auto z-30 bg-inherit md:bg-transparent",{"opacity-0 pointer-events-none":!e.visible}])},[K("div",Gm,[ke(t.$slots,"progress")]),K("div",Jm,[ke(t.$slots,"bottom-controls")])],2),ke(t.$slots,"default")],64))}}),Qm=Object.freeze(Object.defineProperty({__proto__:null,default:Za},Symbol.toStringTag,{value:"Module"})),e0={},t0={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function n0(e,t){return b(),z("svg",t0,[...t[0]||(t[0]=[K("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 Ya=be(e0,[["render",n0]]),o0=Object.freeze(Object.defineProperty({__proto__:null,default:Ya},Symbol.toStringTag,{value:"Module"})),i0={},r0={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function s0(e,t){return b(),z("svg",r0,[...t[0]||(t[0]=[K("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 Xa=be(i0,[["render",s0]]),l0=Object.freeze(Object.defineProperty({__proto__:null,default:Xa},Symbol.toStringTag,{value:"Module"})),Ga=be(he({__name:"NovelBody",props:{hideTopControls:{type:Boolean},progress:{type:Number},touchDevice:{type:Boolean},busy:{type:Boolean},spaceTop:{type:null},content:{type:null},rtl:{type:Boolean},fontFamily:{type:String},titlePreferences:{type:Object},defaultPreferences:{type:Object}},emits:["ready","click","progressChanged","finished"],setup(e,{expose:t,emit:n}){const o=e,i=n,r=ne(!1),s=ne(),l=ne(),a=nn(()=>{const c=s.value;if(!c)return;const{clientHeight:d,scrollHeight:f,scrollTop:p}=c,w=Math.max(p,f-2*d);if(w<=0)i("progressChanged",1);else{const g=p/w;i("progressChanged",Math.max(0,Math.min(1,g)))}},30);t({scrollEl:s}),Dt({onKeyDown(){var c;o.busy||(c=s.value)==null||c.focus()}}),je(()=>{de(()=>o.content,d=>{const f=l.value;f&&(Array.from(f.children).forEach(p=>{f.removeChild(p)}),f.appendChild(d),setTimeout(()=>{if(s.value){const{progress:w}=o;w&&u(w)}r.value=!0,i("ready")}))},{immediate:!0});const c=bn();de(()=>{const{fontFamily:d,fontSize:f,lineHeight:p}=o.titlePreferences;return`${d}-${f}-${p}-${c.width.value}`},async()=>{const d=o.progress;await pt(),u(d)})});function u(c){const d=s.value;d&&(d.scrollTop=c*(d.scrollHeight-2*d.clientHeight))}return(c,d)=>(b(),z("div",{ref_key:"scrollContainer",ref:s,tabindex:"0",class:ue(["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:Te({fontFamily:e.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)=>U(a)&&U(a)(...f))},[K("div",En({ref_key:"contentContainer",ref:l,class:"novel-body__content"},e.rtl?{dir:"rtl"}:{}),null,16),ke(c.$slots,"end")],38))}}),[["styles",['.novel-body{top:0;right:0;bottom:0;left:0;overflow-wrap:break-word;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:768px;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}']]]),a0=Object.freeze(Object.defineProperty({__proto__:null,default:Ga},Symbol.toStringTag,{value:"Module"})),Ja=he({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","timeout","ready","pageChanged","playingChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var Y,$,X,J,T,x,q,oe;const n=e,o=t,i=ne(null),r=((Y=n.raw)==null?void 0:Y.novel)??qm({sel:($=n.spec)==null?void 0:$.content,heading:(X=n.raw)==null?void 0:X.name,paraSel:(J=n.spec)==null?void 0:J.para,useObfFont:!!((T=n.spec)!=null&&T.obfFont)});r===void 0&&o("error");const s=ne(r==null?void 0:r.el),l=!!(r!=null&&r.isRTL),a=ne(!1),u=ne(!1),c=Q(()=>n.page),d=Q(()=>n.busy),f=ne(null),p=Q(()=>{var Z;return(Z=f.value)==null?void 0:Z.scrollEl}),w=(q=(x=n.raw)==null?void 0:x.title)==null?void 0:q.name,g=w?pa(w):location.hostname,O=mf(`mpr:${g}`,{}),S=Q({get(){var xe,fe;const Z=n.defaultPreferences,j=((xe=O.value)==null?void 0:xe.fontSize)??Z.fontSize,Ee=Math.max(j,((fe=O.value)==null?void 0:fe.lineHeight)??Z.lineHeight);return{fontFamily:Z.fontFamily,speed:Z.speed,...O.value,contrast:Z.contrast,fontSize:j,lineHeight:Ee}},set(Z){const j={...Z},Ee=n.defaultPreferences;Object.keys(j).forEach(xe=>{j[xe]===Ee[xe]&&delete j[xe]}),O.value=j}}),A=Hm({isBusy:d,speed:Q(()=>S.value.speed),fontSize:Q(()=>S.value.fontSize),lineHeight:Q(()=>S.value.lineHeight),autoPlay:!!((oe=n.defaultPreferences)!=null&&oe.autoPlay),touchDevice:n.touchDevice,scrollEl:p}),F=Q(()=>!n.touchDevice&&A.isIdle.value&&!d.value),k=Ha({touchDevice:n.touchDevice,moveThreshold:50,isBusy:d,isPlaying:Q(()=>A.isPlaying.value),isIdle:Q(()=>A.isIdle.value),hideControlsEvent:Q(()=>n.defaultPreferences.hideControlsEvent),scrollEl:p}),m=k.visible;de(A.isPlaying,Z=>{o("playingChanged",Z)}),de(m,Z=>{o("controlsVisibilityChanged",Z)}),P(document.documentElement),P(document.body);function P(Z){const j=Z.style.getPropertyValue("overflow");j!=="hidden"&&(Z.style.setProperty("overflow","hidden","important"),gt(()=>{j?Z.style.setProperty("overflow",j):Z.style.removeProperty("overflow")}))}function C(){o("ready"),k.activate(),A.activate()}function B(){A.stop(),o("clickEntryButton")}function y(Z){u.value=Z}function I(){if(A.isPlaying.value){m.value||!n.touchDevice?A.stop():(A.awake(),k.toggle(!0));return}k.toggle()}function W(Z){Z!==n.page&&(o("pageChanged",Math.min(1,Z)),Z>=1&&o("finished"))}function L(Z){const j=S.value.fontSize+Z;j>48||j<10||(S.value={...S.value,fontSize:j,lineHeight:Math.max(10,Math.min(96,Math.round(S.value.lineHeight/S.value.fontSize*j)))})}return(Z,j)=>s.value?(b(),se(vr,{key:0,ref_key:"gearLayout",ref:i,immediate:"","hide-cursor":F.value,class:"bg-stone-900",style:Te({color:`rgba(255, 255, 255, ${e.defaultPreferences.contrast})`})},{default:ie(()=>{var Ee,xe;return[N(Ga,{ref_key:"body",ref:f,progress:c.value,"touch-device":e.touchDevice,busy:d.value,"space-top":e.spaceTop,content:s.value,rtl:l,"font-family":(Ee=U(r))==null?void 0:Ee.fontFamily,"title-preferences":S.value,"default-preferences":e.defaultPreferences,"hide-top-controls":!e.raw,onClick:I,onProgressChanged:W,onReady:C},{end:ie(()=>{var fe,ve;return[N(nr,{"has-next":!!((fe=e.chapterNavData)!=null&&fe.next),"offline-mode":!!e.offlineMode,seconds:((ve=e.defaultPreferences)==null?void 0:ve.autoNextSeconds)??5,onNext:j[0]||(j[0]=()=>{var ye,Be;return(Be=(ye=e.chapterNavData)==null?void 0:ye.next)==null?void 0:Be.call(ye,!1)}),onVisibilityChanged:y,onHide:j[1]||(j[1]=()=>o("hideReader")),onFinished:j[2]||(j[2]=()=>o("finished"))},null,8,["has-next","offline-mode","seconds"])]}),_:1},8,["progress","touch-device","busy","space-top","content","font-family","title-preferences","default-preferences","hide-top-controls"]),!e.touchDevice&&!e.raw&&!e.offlineMode?He((b(),se(Jo,{key:0,class:"hidden md:inline-block fixed left-3 top-2",transparent:"",onClick:j[3]||(j[3]=()=>o("hideReader"))},null,512)),[[md,U(m)]]):ae("",!0),N(Za,{visible:U(m),"hide-top-controls":!e.raw,"space-top":e.spaceTop},{"top-controls":ie(()=>{var fe;return[e.raw||e.offlineMode?(b(),se(or,{key:0,"offline-mode":e.offlineMode,raw:e.raw,transparent:"",onClick:j[4]||(j[4]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):ae("",!0),e.raw&&!e.touchDevice&&!e.offlineMode?(b(),se(Jo,{key:1,transparent:"",onClick:j[5]||(j[5]=()=>o("hideReader"))})):ae("",!0),e.chapterNavData?(b(),se(dr,{key:2,transparent:"","touch-device":e.touchDevice,"chapter-spec":(fe=e.spec)==null?void 0:fe.chapter,data:e.chapterNavData,rtl:l,onGetHiddenChapters:j[6]||(j[6]=()=>o("getHiddenChapters")),onPrev:j[7]||(j[7]=ve=>{var ye,Be;return(Be=(ye=e.chapterNavData)==null?void 0:ye.prev)==null?void 0:Be.call(ye,ve)}),onNext:j[8]||(j[8]=ve=>{var ye,Be;return(Be=(ye=e.chapterNavData)==null?void 0:ye.next)==null?void 0:Be.call(ye,ve)}),onDialogOpened:j[9]||(j[9]=()=>U(k).toggle(!1))},null,8,["touch-device","chapter-spec","data"])):ae("",!0)]}),"bottom-controls":ie(()=>[!e.offlineMode&&e.raw?(b(),se(ir,{key:0,"entry-id":e.entryId,transparent:"",onClick:B},null,8,["entry-id"])):ae("",!0),N(Je,{transparent:"",onClick:j[10]||(j[10]=()=>L(-1))},{default:ie(()=>[N(Ya)]),_:1}),N(Je,{transparent:"",onClick:j[11]||(j[11]=()=>L(1))},{default:ie(()=>[N(Xa)]),_:1}),N(ar,{transparent:"",onClick:j[12]||(j[12]=()=>a.value=!0)}),e.touchDevice?ae("",!0):(b(),se(cr,{key:1,transparent:"",onRequestFullScreen:j[13]||(j[13]=()=>{var fe,ve;return(ve=(fe=i.value)==null?void 0:fe.rootEl)==null?void 0:ve.requestFullscreen()})})),N(lr,{transparent:"","tour-message":"Press here to start listening",playing:U(A).isPlaying.value,class:"order-2 md:order-4",onClick:j[14]||(j[14]=()=>U(A).toggle())},null,8,["playing"])]),progress:ie(()=>{var fe,ve;return[((fe=e.defaultPreferences)==null?void 0:fe.progressSize)!==0?(b(),se(yr,{key:0,value:c.value,height:((ve=e.defaultPreferences)==null?void 0:ve.progressSize)??2,rtl:l,opacity:e.defaultPreferences.contrast},null,8,["value","height","opacity"])):ae("",!0)]}),_:1},8,["visible","hide-top-controls","space-top"]),u.value?ae("",!0):(b(),se(br,{key:1,playing:U(A).isPlaying.value},null,8,["playing"])),N(_r,{modelValue:a.value,"onUpdate:modelValue":j[18]||(j[18]=fe=>a.value=fe),name:(xe=e.raw)==null?void 0:xe.title.name,"space-top":(e.spaceTop??0)+80,"enable-default-preferences":!e.touchDevice||!!e.appVersion,onMore:j[19]||(j[19]=()=>o("openDefaultPreferences"))},{"tab-preferences":ie(()=>{var fe;return[N(hr,{modelValue:S.value,"onUpdate:modelValue":j[15]||(j[15]=ve=>S.value=ve),"default-preferences":e.defaultPreferences,"enable-reset":!e.touchDevice||!!e.appVersion,"force-font-family":(fe=U(r))==null?void 0:fe.fontFamily,onReset:j[16]||(j[16]=()=>O.value=null)},null,8,["modelValue","default-preferences","enable-reset","force-font-family"])]}),"tab-default":ie(()=>[N(gr,{"is-novel":"","model-value":e.defaultPreferences,"onUpdate:modelValue":j[17]||(j[17]=fe=>o("defaultPreferencesChanged",fe))},null,8,["model-value"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),ke(Z.$slots,"default")]}),_:3},8,["hide-cursor","style"])):ae("",!0)}}),c0=Object.freeze(Object.defineProperty({__proto__:null,default:Ja},Symbol.toStringTag,{value:"Module"}));function u0({raw:e,spec:t,siteMeta:n,offlineMode:o,onSelect:i}){var W,L,Y;const{vol:r,inferVol:s,chap:l,title:a,slug:u,basePath:c}=e,d=typeof(t==null?void 0:t.chapter)=="string"?{sel:t.chapter}:t==null?void 0:t.chapter;let f=-1;async function p($,X){if(o){i({...$});return}if($.slug){w($.slug,X);return}if($.elIndex===void 0||!(d!=null&&d.sel))return;let J=null;document.querySelector(d.sel)||(d!=null&&d.trigger&&(J=document.querySelector(d.trigger)),J&&(yn(J),await new Promise(x=>setTimeout(()=>x(),50))));const T=d&&d.sel&&!d.url?document.querySelectorAll(d.sel):void 0;T!=null&&T[$.elIndex]&&(yn(T[$.elIndex]),J&&document.querySelector(d.sel)&&yn(J))}function w($,X){const J=d0(c,$,(n==null?void 0:n.trailing)??!0);X?window.open(J,"_blank","noopener"):location.href=J}function g($){const X=k[$];return X?J=>p(X,J):void 0}function O($,X,J){if(X)w(X,J);else if($){const T=document.querySelector($);T&&yn(T,{preventDefault:!1})}}const S=r??s,A=d==null?void 0:d.url,F=((W=a.chapters)==null?void 0:W.filter($=>$.slug||!A&&$.elIndex!==void 0))??[],k=F.length>1?F:[],m=(L=e.prev)==null?void 0:L.slug,P=(Y=e.next)==null?void 0:Y.slug,C=t!=null&&t.prev&&typeof t.prev!="string"?t.prev.btn??t.prev.sel:void 0,B=t!=null&&t.next&&typeof t.next!="string"?t.next.btn??t.next.sel:void 0;let y=m||C&&!k.length&&document.body.querySelector(C)?$=>O(C,m,$):void 0,I=P||B&&!k.length&&document.body.querySelector(B)?$=>O(B,P,$):void 0;if(k.length){if(A&&(f=k.findIndex($=>$.slug===e.slug)),f===-1&&(f=k.findIndex($=>($.vol??$.inferVol)===S&&$.chap===l)),A&&f===-1&&(f=k.findIndex($=>$.slug&&u.startsWith(`${$.slug}-`)&&u.length-$.slug.length>3)),f!==-1)y??(y=g(f+1)),I??(I=g(f-1));else if(!m&&!P){const $=k.findIndex(X=>{const J=X.vol??X.inferVol;return S===void 0||J===void 0||S===J?X.chap<l:J<S});$!==-1?(y=g($),I=g($-1)):I=g(k.length-1)}}return{activeIndex:f,activeLabel:Qa({vol:r,chap:l}),prev:y,next:I,chapters:k.map($=>({label:Qa($),select:X=>p($,X)}))}}function Qa({vol:e,chap:t}){return e==null?`Ch.${t}`:`Vol.${e} ch.${t}`}function d0(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 f0(e){return e instanceof Error?JSON.stringify(e,Object.getOwnPropertyNames(e)):e}const ec=be(he({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","timeout","ready","pageChanged","playingChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var P,C,B;const n=e,o=t;let i=!1,r=0;Ts((y,I,W)=>{if(!i){i=!0;const Y=`(3.6.0) ${(I==null?void 0:I.$options.name)??(I==null?void 0:I.$options.__name)??(I==null?void 0:I.$options.__file)}.${W}: ${f0(y)}`;o("crash",Y)}return!1});const s=ne(n.raw?n.raw.contentType??Yt.manga:void 0);s.value===void 0&&Fd(((P=n.spec)==null?void 0:P.content)??"body",{paraSel:(C=n.spec)==null?void 0:C.para,include:(B=n.siteMeta)==null?void 0:B.contentTypes,timeoutMs:3e3}).then(y=>{y?s.value=y:o("error")});const l=ne(!1),a=ne(n.tourEnabled),u=xf({touchDevice:n.touchDevice}),c=Tf(n.page,n.isAutoShow),d=Q(()=>n.raw?u0({raw:n.raw,spec:n.spec,siteMeta:n.siteMeta,offlineMode:n.offlineMode,onSelect:y=>o("selectChapter",y)}):void 0);Cf().addListener({onKeyDown:y=>{switch(y.key){case"Escape":y.preventDefault();break}},onKeyUp:y=>{switch(y.key){case"h":k();break}}}),Sf(()=>o("hapticFeedback")),_f();const p=vt(y=>o("pageChanged",y),300),w=ne(g(n.defaultPreferences));de(()=>n.defaultPreferences,y=>w.value=g(y));function g(y){const I=(y==null?void 0:y.fontSize)??16,W=Math.max(I,(y==null?void 0:y.lineHeight)??28);return{...y,speed:(y==null?void 0:y.speed)??1,progressSize:(y==null?void 0:y.progressSize)??2,autoNextSeconds:(y==null?void 0:y.autoNextSeconds)??5,hideControlsEvent:(y==null?void 0:y.hideControlsEvent)??rn.firstMove,autoPlay:(y==null?void 0:y.autoPlay)??!1,pinchToZoom:(y==null?void 0:y.pinchToZoom)??!0,doubleTapZoom:(y==null?void 0:y.doubleTapZoom)??!0,readerStyle:(y==null?void 0:y.readerStyle)??At.longStrip,direction:(y==null?void 0:y.direction)??tt.vertical,gap:(y==null?void 0:y.gap)??0,fontFamily:(y==null?void 0:y.fontFamily)??ei[0].value,contrast:(y==null?void 0:y.contrast)??.8,fontSize:I,lineHeight:W}}function O(y){w.value=g(y),o("defaultPreferencesChanged",y)}function S(){if(n.offlineMode){o("pressedBack");return}Pf(),o("dispose")}function A(y){const I=Math.floor(y*100)/100;I!==Math.floor(c.value*100)/100&&(c.value=y,!(r>=I)&&(r=I,p(I)))}function F(){n.entryId?o("openEntry",n.entryId):o("addEntry")}function k(y){l.value!==y&&(l.value=y??!l.value)}function m(){o("error"),S()}return(y,I)=>s.value!==void 0?(b(),se(Is(s.value===U(Yt).novel?Ja:qa),En({key:0,ref:"root"},n,{page:U(c),busy:U(u),"chapter-nav-data":d.value,"default-preferences":w.value,onOpenDefaultPreferences:I[1]||(I[1]=()=>o("openDefaultPreferences")),onTimeout:I[2]||(I[2]=()=>o("timeout")),onReady:I[3]||(I[3]=()=>o("ready")),onFinished:I[4]||(I[4]=()=>o("finished")),onPlayingChanged:I[5]||(I[5]=W=>o("playingChanged",W)),onControlsVisibilityChanged:I[6]||(I[6]=W=>o("controlsVisibilityChanged",W)),onPressedBack:I[7]||(I[7]=()=>o("pressedBack")),onGetHiddenChapters:I[8]||(I[8]=()=>o("getHiddenChapters")),onError:m,onHideReader:S,onPageChanged:A,onClickEntryButton:F,onDefaultPreferencesChanged:O,onOpenHelpScreen:I[9]||(I[9]=()=>k(!0))}),{default:ie(()=>[l.value?(b(),se(ql,{key:0,"touch-device":e.touchDevice,onHide:k},null,8,["touch-device"])):ae("",!0),a.value?(b(),se(Ul,{key:1,onHide:I[0]||(I[0]=()=>a.value=!1)})):ae("",!0)]),_:1},16,["page","busy","chapter-nav-data","default-preferences"])):ae("",!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%}.h-screen{height:100vh}.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}.overscroll-none{overscroll-behavior:none}.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-none{background-image:none}.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\\: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\\: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}.xl\\:px-20{padding-left:80px;padding-right:80px}}']]]),p0=Object.freeze(Object.defineProperty({__proto__:null,default:ec},Symbol.toStringTag,{value:"Module"})),h0={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},g0={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},m0={class:"flex justify-between items-end"},v0={class:"inline-block children-pointer-events-auto"},b0={class:"inline-flex flex-col items-end gap-4 children-pointer-events-auto"},y0={class:"fixed pointer-events-none left-0 right-0 bottom-0"},w0={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"},x0=Object.freeze(Object.defineProperty({__proto__:null,default:be(he({__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=ne(null);return t({rootEl:o}),(i,r)=>He((b(),z("dialog",h0,[K("div",{ref_key:"rootEl",ref:o,id:"reader-layout",class:ue({"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?(b(),z("div",g0,[N(ri)])):ae("",!0),ke(i.$slots,"default"),K("div",{id:"controls",class:ue(["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}])},[K("div",{class:"flex gap-1 items-center children-pointer-events-auto relative z-30 flex-shrink-0 2xs:gap-3",style:Te({paddingTop:`${e.spaceTop||0}px`})},[ke(i.$slots,"top-controls")],4),K("div",m0,[K("div",v0,[ke(i.$slots,"bottom-left-controls")]),K("div",b0,[ke(i.$slots,"bottom-right-controls")])]),K("div",y0,[ke(i.$slots,"progress")])],2),e.controlsVisible||e.zooming?(b(),z("div",w0,[ke(i.$slots,"reset-zoom")])):ae("",!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"})),_0={},S0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function k0(e,t){return b(),z("svg",S0,[...t[0]||(t[0]=[K("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 C0=Object.freeze(Object.defineProperty({__proto__:null,default:be(_0,[["render",k0]])},Symbol.toStringTag,{value:"Module"})),T0="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}",sn="gear-second",Or={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},Ct={promise:void 0,data:_o({...Or})};async function P0(e){var c,d,f,p,w;let t=!1,n=!1,o,i,r,s;const l=!!e.spaceTop||!!e.isAutoShow&&!!e.page||!!(!((d=(c=e.raw)==null?void 0:c.imgs)!=null&&d.length)&&((p=(f=e.spec)==null?void 0:f.paging)!=null&&p.total)&&Ea(e.spec.paging.total));(w=e.spec)!=null&&w.paging&&!l&&(e.spec={...e.spec,paging:void 0});const a=()=>{t||(t=!0,clearInterval(o),o=void 0,i!=null&&i.isConnected&&document.body.removeChild(i),document.documentElement.classList.remove(sn),Ct.data.touchDevice||Object.assign(Ct.data,Or),Ct.promise=void 0,io.clear())};if(Object.assign(Ct.data,Or,e.appVersion?e:tc(e),{immediate:l,onReady(){l||(r==null||r(),document.documentElement.classList.add(sn))},onError(){var g,O;a(),n?((g=e.onDispose)==null||g.call(e),(O=e.onError)==null||O.call(e)):s==null||s()},onDispose:()=>{var g;a(),(g=e==null?void 0:e.onDispose)==null||g.call(e)},onControlsVisibilityChanged(g){var O,S;(O=e.onFullScreenChanged)==null||O.call(e,!g),(S=e.onControlsVisibilityChanged)==null||S.call(e,g)}}),Ct.promise)return await Ct.promise;const u=g=>{Object.assign(Ct.data,Ct.data.appVersion?g:tc(g))};return Ct.promise=new Promise(g=>{r=()=>{n||(n=!0,g({updateArgs:u,dispose:a,back:()=>io.trigger(),triggerDoubleTap:Sg}))},s=()=>{n||g(void 0)},I0().then(()=>{if(t){s==null||s();return}i=document.createElement(sn),l?(document.documentElement.classList.add(sn),document.body.appendChild(i),setTimeout(()=>r==null?void 0:r())):document.body.appendChild(i);let O=0;o=setInterval(()=>{if(++O===30||t){clearInterval(o),o=void 0;return}i.isConnected||(document.documentElement.classList.add(sn),document.body.appendChild(i))},100)})}),await Ct.promise}function tc(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 I0(){if(window.customElements.get(sn))return;const e=await E0();if(window.customElements.get(sn))return;const t=document.createElement("style"),n=T0;t.appendChild(document.createTextNode(n)),document.head.appendChild(t);const o=Md({styles:[e],data:()=>({readerData:Ct.data}),render(){return dl(ec,this.readerData)}});window.customElements.define(sn,o)}async function E0(){const e=Object.assign({"./App.vue":p0,"./GearSecond.vue":Wm,"./GearThird.vue":c0,"./components/AutoNext.vue":Rf,"./components/ButtonWebFullScreen.vue":Lp,"./components/ChapterNav.vue":ah,"./components/DefaultPreferencesForm.vue":Fh,"./components/DirectionToast.vue":Xh,"./components/GearControlsLayout.vue":Qh,"./components/GearLayout.vue":lg,"./components/GearThirdControlsLayout.vue":Qm,"./components/GesturesContainer.vue":kg,"./components/HelpScreen.vue":vf,"./components/MangaPreferencesForm.vue":vg,"./components/NovelBody.vue":a0,"./components/NovelPreferencesForm.vue":jh,"./components/PageNav.vue":bg,"./components/PauseToast.vue":yg,"./components/ProgressBar.vue":xg,"./components/ReaderBody.vue":Mg,"./components/ReaderImg.vue":Tg,"./components/ReaderLayout.vue":x0,"./components/ReaderTour.vue":wf,"./components/SettingsBottomSheet.vue":Xg,"./components/TapZonePreview.vue":Zh,"./components/base/BaseButton.vue":Of,"./components/base/BottomSheet.vue":Bg,"./components/base/ButtonDropdown.vue":Jp,"./components/base/ButtonIcon.vue":Hf,"./components/base/ButtonOutline.vue":Mh,"./components/base/DropdownMenu.vue":Vp,"./components/base/InputPercentage.vue":dh,"./components/base/InputSelect.vue":hh,"./components/base/InputSwitcher.vue":bh,"./components/base/LoadingIndicator.vue":ig,"./components/base/TabBar.vue":jg,"./components/base/TableField.vue":wh,"./components/buttons/ButtonBack.vue":Kf,"./components/buttons/ButtonEntry.vue":np,"./components/buttons/ButtonHide.vue":lp,"./components/buttons/ButtonPlay.vue":mp,"./components/buttons/ButtonResetZoom.vue":Sp,"./components/buttons/ButtonSettings.vue":Ip,"./components/fields/FieldContrast.vue":xh,"./components/fields/FieldFontFamily.vue":Oh,"./components/icons/IconBack.vue":Uf,"./components/icons/IconBookmarkNew.vue":tp,"./components/icons/IconBookmarked.vue":Gf,"./components/icons/IconChevronLeft.vue":nh,"./components/icons/IconChevronRight.vue":sh,"./components/icons/IconClose.vue":zg,"./components/icons/IconDouble.vue":dg,"./components/icons/IconDoubleSkip.vue":gg,"./components/icons/IconExclamationCircle.vue":C0,"./components/icons/IconFullscreen.vue":$p,"./components/icons/IconFullscreenExit.vue":Bp,"./components/icons/IconHelp.vue":Hg,"./components/icons/IconLandscape.vue":Ch,"./components/icons/IconLoading.vue":Wp,"./components/icons/IconMoreVert.vue":Ug,"./components/icons/IconNext.vue":Kh,"./components/icons/IconPause.vue":dp,"./components/icons/IconPlay.vue":gp,"./components/icons/IconPlus.vue":Af,"./components/icons/IconPortrait.vue":Eh,"./components/icons/IconReaderExit.vue":sp,"./components/icons/IconSettings.vue":Pp,"./components/icons/IconTextDecre.vue":o0,"./components/icons/IconTextIncre.vue":l0,"./components/icons/IconTriangle.vue":Zp,"./components/icons/IconZoom.vue":wp}),t=[];for(const n in e){const o=e[n];t.push(o.default.styles)}return t.join("")}return P0});
20
+ **/let qi;const pl=typeof window<"u"&&window.trustedTypes;if(pl)try{qi=pl.createPolicy("vue",{createHTML:e=>e})}catch{}const hl=qi?e=>qi.createHTML(e):e=>e,ad="http://www.w3.org/2000/svg",cd="http://www.w3.org/1998/Math/MathML",Zt=typeof document<"u"?document:null,gl=Zt&&Zt.createElement("template"),ud={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"?Zt.createElementNS(ad,e):t==="mathml"?Zt.createElementNS(cd,e):n?Zt.createElement(e,{is:n}):Zt.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>Zt.createTextNode(e),createComment:e=>Zt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Zt.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{gl.innerHTML=hl(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const l=gl.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]}},nn="transition",eo="animation",to=Symbol("_vtc"),ml={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},dd=De({},bs,ml),no=(e=>(e.displayName="Transition",e.props=dd,e))((e,{slots:t})=>fl(su,fd(e),t)),gn=(e,t=[])=>{le(e)?e.forEach(n=>n(...t)):e&&e(...t)},vl=e=>e?le(e)?e.some(t=>t.length>1):e.length>1:!1;function fd(e){const t={};for(const L in e)L in ml||(t[L]=e[L]);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,w=pd(i),g=w&&w[0],O=w&&w[1],{onBeforeEnter:S,onEnter:A,onEnterCancelled:F,onLeave:k,onLeaveCancelled:m,onBeforeAppear:P=S,onAppear:C=A,onAppearCancelled:B=F}=t,y=(L,Y,$,X)=>{L._enterCancelled=X,mn(L,Y?c:l),mn(L,Y?u:s),$&&$()},I=(L,Y)=>{L._isLeaving=!1,mn(L,d),mn(L,p),mn(L,f),Y&&Y()},W=L=>(Y,$)=>{const X=L?C:A,J=()=>y(Y,L,$);gn(X,[Y,J]),bl(()=>{mn(Y,L?a:r),Yt(Y,L?c:l),vl(X)||yl(Y,o,g,J)})};return De(t,{onBeforeEnter(L){gn(S,[L]),Yt(L,r),Yt(L,s)},onBeforeAppear(L){gn(P,[L]),Yt(L,a),Yt(L,u)},onEnter:W(!1),onAppear:W(!0),onLeave(L,Y){L._isLeaving=!0;const $=()=>I(L,Y);Yt(L,d),L._enterCancelled?(Yt(L,f),_l(L)):(_l(L),Yt(L,f)),bl(()=>{L._isLeaving&&(mn(L,d),Yt(L,p),vl(k)||yl(L,o,O,$))}),gn(k,[L,$])},onEnterCancelled(L){y(L,!1,void 0,!0),gn(F,[L])},onAppearCancelled(L){y(L,!0,void 0,!0),gn(B,[L])},onLeaveCancelled(L){I(L),gn(m,[L])}})}function pd(e){if(e==null)return null;if(Pe(e))return[Ui(e.enter),Ui(e.leave)];{const t=Ui(e);return[t,t]}}function Ui(e){return mi(e)}function Yt(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[to]||(e[to]=new Set)).add(t)}function mn(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[to];n&&(n.delete(t),n.size||(e[to]=void 0))}function bl(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let hd=0;function yl(e,t,n,o){const i=e._endId=++hd,r=()=>{i===e._endId&&o()};if(n!=null)return setTimeout(r,n);const{type:s,timeout:l,propCount:a}=gd(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 gd(e,t){const n=window.getComputedStyle(e),o=w=>(n[w]||"").split(", "),i=o(`${nn}Delay`),r=o(`${nn}Duration`),s=wl(i,r),l=o(`${eo}Delay`),a=o(`${eo}Duration`),u=wl(l,a);let c=null,d=0,f=0;t===nn?s>0&&(c=nn,d=s,f=r.length):t===eo?u>0&&(c=eo,d=u,f=a.length):(d=Math.max(s,u),c=d>0?s>u?nn:eo:null,f=c?c===nn?r.length:a.length:0);const p=c===nn&&/\b(?:transform|all)(?:,|$)/.test(o(`${nn}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:p}}function wl(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>xl(n)+xl(e[o])))}function xl(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function _l(e){return(e?e.ownerDocument:document).body.offsetHeight}function md(e,t,n){const o=e[to];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const qo=Symbol("_vod"),Sl=Symbol("_vsh"),vd={name:"show",beforeMount(e,{value:t},{transition:n}){e[qo]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):oo(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),oo(e,!0),o.enter(e)):o.leave(e,()=>{oo(e,!1)}):oo(e,t))},beforeUnmount(e,{value:t}){oo(e,t)}};function oo(e,t){e.style.display=t?e[qo]:"none",e[Sl]=!t}const bd=Symbol(""),yd=/(?:^|;)\s*display\s*:/;function wd(e,t,n){const o=e.style,i=ze(n);let r=!1;if(n&&!i){if(t)if(ze(t))for(const s of t.split(";")){const l=s.slice(0,s.indexOf(":")).trim();n[l]==null&&Uo(o,l,"")}else for(const s in t)n[s]==null&&Uo(o,s,"");for(const s in n)s==="display"&&(r=!0),Uo(o,s,n[s])}else if(i){if(t!==n){const s=o[bd];s&&(n+=";"+s),o.cssText=n,r=yd.test(n)}}else t&&e.removeAttribute("style");qo in e&&(e[qo]=r?o.display:"",e[Sl]&&(o.display="none"))}const kl=/\s*!important$/;function Uo(e,t,n){if(le(n))n.forEach(o=>Uo(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=xd(e,t);kl.test(n)?e.setProperty(Qe(o),n.replace(kl,""),"important"):e[o]=n}}const Cl=["Webkit","Moz","ms"],Ki={};function xd(e,t){const n=Ki[t];if(n)return n;let o=Fe(t);if(o!=="filter"&&o in e)return Ki[t]=o;o=po(o);for(let i=0;i<Cl.length;i++){const r=Cl[i]+o;if(r in e)return Ki[t]=r}return t}const Tl="http://www.w3.org/1999/xlink";function Pl(e,t,n,o,i,r=hc(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(Tl,t.slice(6,t.length)):e.setAttributeNS(Tl,t,n):n==null||r&&!Nr(n)?e.removeAttribute(t):e.setAttribute(t,r?"":wt(n)?String(n):n)}function Il(e,t,n,o,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?hl(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=Nr(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 vn(e,t,n,o){e.addEventListener(t,n,o)}function _d(e,t,n,o){e.removeEventListener(t,n,o)}const El=Symbol("_vei");function Sd(e,t,n,o,i=null){const r=e[El]||(e[El]={}),s=r[t];if(o&&s)s.value=o;else{const[l,a]=kd(t);if(o){const u=r[t]=Pd(o,i);vn(e,l,u,a)}else s&&(_d(e,l,s,a),r[t]=void 0)}}const Ml=/(?:Once|Passive|Capture)$/;function kd(e){let t;if(Ml.test(e)){t={};let o;for(;o=e.match(Ml);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Qe(e.slice(2)),t]}let Zi=0;const Cd=Promise.resolve(),Td=()=>Zi||(Cd.then(()=>Zi=0),Zi=Date.now());function Pd(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;_t(Id(o,n.value),t,5,[o])};return n.value=e,n.attached=Td(),n}function Id(e,t){if(le(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 Ol=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ed=(e,t,n,o,i,r)=>{const s=i==="svg";t==="class"?md(e,o,s):t==="style"?wd(e,n,o):ao(t)?di(t)||Sd(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Md(e,t,o,s))?(Il(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Pl(e,t,o,s,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ze(o))?Il(e,Fe(t),o,r,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Pl(e,t,o,s))};function Md(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Ol(t)&&pe(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 Ol(t)&&ze(n)?!1:t in e}const $l={};function Od(e,t,n){let o=he(e,t);uo(o)&&(o=De({},o,t));class i extends Yi{constructor(s){super(o,s,n)}}return i.def=o,i}const $d=typeof HTMLElement<"u"?HTMLElement:class{};class Yi extends $d{constructor(t,n={},o=Nl){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!==Nl?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(De({},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 Yi){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,pt(()=>{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&&!le(r))for(const a in r){const u=r[a];(u===Number||u&&u.type===Number)&&(a in this._props&&(this._props[a]=mi(this._props[a])),(l||(l=Object.create(null)))[Fe(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)Ce(this,o)||Object.defineProperty(this,o,{get:()=>U(n[o])})}_resolveProps(t){const{props:n}=t,o=le(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(Fe))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=Fe(t);n&&this._numberProps&&this._numberProps[i]&&(o=mi(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(Qe(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Qe(t),n+""):n||this.removeAttribute(Qe(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),Rd(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=N(this._def,De(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,uo(s[0])?De({detail:s},s[0]):{detail:s}))};o.emit=(r,...s)=>{i(r,s),Qe(r)!==r&&i(Qe(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 Ko=e=>{const t=e.props["onUpdate:modelValue"]||!1;return le(t)?n=>ho(t,n):t};function Dd(e){e.target.composing=!0}function Dl(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const On=Symbol("_assign");function zl(e,t,n){return t&&(e=e.trim()),n&&(e=gi(e)),e}const zd={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[On]=Ko(i);const r=o||i.props&&i.props.type==="number";vn(e,t?"change":"input",s=>{s.target.composing||e[On](zl(e.value,n,r))}),(n||r)&&vn(e,"change",()=>{e.value=zl(e.value,n,r)}),t||(vn(e,"compositionstart",Dd),vn(e,"compositionend",Dl),vn(e,"change",Dl))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:i,number:r}},s){if(e[On]=Ko(s),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?gi(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))}},Ad={deep:!0,created(e,t,n){e[On]=Ko(n),vn(e,"change",()=>{const o=e._modelValue,i=Bd(e),r=e.checked,s=e[On];if(le(o)){const l=Vr(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(co(o)){const l=new Set(o);r?l.add(i):l.delete(i),s(l)}else s(Bl(e,r))})},mounted:Al,beforeUpdate(e,t,n){e[On]=Ko(n),Al(e,t,n)}};function Al(e,{value:t,oldValue:n},o){e._modelValue=t;let i;if(le(t))i=Vr(t,o.props.value)>-1;else if(co(t))i=t.has(o.props.value);else{if(t===n)return;i=mo(t,Bl(e,!0))}e.checked!==i&&(e.checked=i)}function Bd(e){return"_value"in e?e._value:e.value}function Bl(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Ld=["ctrl","shift","alt","meta"],jd={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)=>Ld.some(n=>e[`${n}Key`]&&!t.includes(n))},Ne=(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=jd[t[s]];if(l&&l(i,t))return}return e(i,...r)})},Nd={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Zo=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=i=>{if(!("key"in i))return;const r=Qe(i.key);if(t.some(s=>s===r||Nd[s]===r))return e(i)})},Vd=De({patchProp:Ed},ud);let Ll;function jl(){return Ll||(Ll=$u(Vd))}const Rd=(...e)=>{jl().render(...e)},Nl=(...e)=>{const t=jl().createApp(...e),{mount:n}=t;return t.mount=o=>{const i=Fd(o);if(!i)return;const r=t._component;!pe(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const s=n(i,!1,Hd(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function Hd(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Fd(e){return ze(e)?document.querySelector(e):e}function $n(e,t){if(typeof e.checkVisibility=="function")return e.checkVisibility({opacityProperty:!0,visibilityProperty:!1,contentVisibilityAuto:!1});const n=window.getComputedStyle(e);if(n.display==="none"||n.opacity&&parseFloat(n.opacity)<.1)return!1;if(!t)return!0;const o=e.parentElement;return!o||o===t?!0:$n(o,t)}async function mt(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 mt(e-1,t,n);i(r)},t)})}function bn(e,t){return e>=280&&t>=50||e>=160&&t>=280}var Xt;(function(e){e[e.manga=1]="manga",e[e.novel=2]="novel",e[e.anime=3]="anime"})(Xt||(Xt={}));async function Wd(e,t){const n=["NAV","ASIDE","FOOTER","HEADER","BR","HR","BUTTON","A"],o="img:not(nav img, header img, footer img, aside img), canvas",i=t==null?void 0:t.timeoutMs,r=t==null?void 0:t.include,s=t==null?void 0:t.paraSel,l=!r||r.includes(Xt.manga),a=!r||r.includes(Xt.novel);let u=0;return await mt(i/50,50,()=>{const p=c();if(p){if(l&&f(p,t==null?void 0:t.validateImgSize))return Xt.manga;if(a&&u++%3===0&&d(p))return Xt.novel}});function c(){for(const p of e.split(",")){const w=document.querySelector(p);if(w)return w}}function d(p){const w=[`p:not(${n.map(F=>`${F} p`).join(",")})`,s].filter(Boolean).join(",");if(!p.querySelector(w)&&(!s||!p.matches(s)))return!1;let g=0,O=0,S=0;return A(p);function A(F){const k=F.tagName;if(n.includes(k)||!$n(F)||window.getComputedStyle(F).position==="fixed")return!1;if(k==="P"||s&&F.matches(s))return g+=F.textContent.split(" ").filter(Boolean).length,O++,S=0,!l&&g>50||O>10&&g>120||O>5&&g>250||g>400;O>0&&++S>4&&(O=0,g=0);const P=Array.from(F.children);for(let C=0;C<P.length;C++)if(A(P[C]))return!0;return!1}}function f(p,w){const g=Array.from(p.querySelectorAll(o));if(w===!1)return g.length>0;const O=Math.min(window.innerWidth*.9,500);let S=0;for(let A=0;A<g.length;A++){const F=g[A];if(!$n(F,p))continue;const{width:k,height:m}=F.getBoundingClientRect();if(bn(k,m)&&(k>=O||(S+=m,S>=O)))return!0}return!1}}function Xi(e,t){return bi()?(vc(e,t),!0):!1}const Gi=new WeakMap,qd=(...e)=>{var t;const n=e[0],o=(t=hn())===null||t===void 0?void 0:t.proxy,i=o??bi();if(i==null&&!js())throw new Error("injectLocal must be called in setup");return i&&Gi.has(i)&&n in Gi.get(i)?Gi.get(i)[n]:Ut(...e)},Vl=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Ud=e=>e!=null,Kd=Object.prototype.toString,Zd=e=>Kd.call(e)==="[object Object]",Dn=()=>{};function Yd(...e){if(e.length!==1)return Wc(...e);const t=e[0];return typeof t=="function"?Rn(cs(()=>({get:t,set:Dn}))):ne(t)}function Rl(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 Hl=e=>e();function Xd(e,t={}){let n,o,i=Dn;const r=a=>{clearTimeout(a),i(),i=Dn};let s;return a=>{const u=ft(e),c=ft(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 Gd(e=Hl,t={}){const{initialState:n="active"}=t,o=Yd(n==="active");function i(){o.value=!1}function r(){o.value=!0}const s=(...l)=>{o.value&&e(...l)};return{isActive:Rn(o),pause:i,resume:r,eventFilter:s}}function Fl(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function io(e){return Array.isArray(e)?e:[e]}function Jd(e){return hn()}function vt(e,t=200,n={}){return Rl(Xd(t,n),e)}function Qd(e,t,n={}){const{eventFilter:o=Hl,...i}=n;return de(e,Rl(o,t),i)}function ef(e,t,n={}){const{eventFilter:o,initialState:i="active",...r}=n,{eventFilter:s,pause:l,resume:a,isActive:u}=Gd(o,{initialState:i});return{stop:Qd(e,t,{...r,eventFilter:s}),pause:l,resume:a,isActive:u}}const tf=ef;function Ji(e,t=!0,n){Jd()?je(e,n):t?e():pt(e)}function nf(e,t,n){return de(e,t,{...n,immediate:!0})}const St=Vl?window:void 0,of=Vl?window.document:void 0;function $t(e){var t;const n=ft(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function kt(...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=Q(()=>{const l=io(ft(e[0])).filter(a=>a!=null);return l.every(a=>typeof a!="string")?l:void 0}),r=nf(()=>{var l,a;return[(l=(a=i.value)===null||a===void 0?void 0:a.map(u=>$t(u)))!==null&&l!==void 0?l:[St].filter(u=>u!=null),io(ft(i.value?e[1]:e[0])),io(U(i.value?e[2]:e[1])),ft(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=Zd(c)?{...c}:c;t.push(...l.flatMap(f=>a.flatMap(p=>u.map(w=>o(f,p,w,d)))))},{flush:"post"}),s=()=>{r(),n()};return Xi(n),s}function rf(){const e=dt(!1),t=hn();return t&&je(()=>{e.value=!0},t),e}function Qi(e){const t=rf();return Q(()=>(t.value,!!e()))}const sf=Symbol("vueuse-ssr-width");function lf(){const e=js()?qd(sf,null):null;return typeof e=="number"?e:void 0}function af(e,t={}){const{window:n=St,ssrWidth:o=lf()}=t,i=Qi(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),r=dt(typeof o=="number"),s=dt(),l=dt(!1),a=u=>{l.value=u.matches};return Gs(()=>{if(r.value){r.value=!i.value,l.value=ft(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>=Fl(d[1])),f&&p&&(p=o<=Fl(f[1])),c?!p:p});return}i.value&&(s.value=n.matchMedia(ft(e)),l.value=s.value.matches)}),kt(s,"change",a,{passive:!0}),Q(()=>l.value)}const Yo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Xo="__vueuse_ssr_handlers__",cf=uf();function uf(){return Xo in Yo||(Yo[Xo]=Yo[Xo]||{}),Yo[Xo]}function df(e,t){return cf[e]||t}function ff(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 pf={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()}},Wl="vueuse-storage";function hf(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=St,eventFilter:f,onError:p=$=>{console.error($)},initOnMounted:w}=o,g=(c?dt:ne)(typeof t=="function"?t():t),O=Q(()=>ft(e));if(!n)try{n=df("getDefaultStorage",()=>St==null?void 0:St.localStorage)()}catch($){p($)}if(!n)return g;const S=ft(t),A=ff(S),F=(i=o.serializer)!==null&&i!==void 0?i:pf[A],{pause:k,resume:m}=tf(g,$=>I($),{flush:r,deep:s,eventFilter:f});de(O,()=>L(),{flush:r});let P=!1;const C=$=>{w&&!P||L($)},B=$=>{w&&!P||Y($)};d&&l&&(n instanceof Storage?kt(d,"storage",C,{passive:!0}):kt(d,Wl,B)),w?Ji(()=>{P=!0,L()}):L();function y($,X){if(d){const J={key:O.value,oldValue:$,newValue:X,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",J):new CustomEvent(Wl,{detail:J}))}}function I($){try{const X=n.getItem(O.value);if($==null)y(X,null),n.removeItem(O.value);else{const J=F.write($);X!==J&&(n.setItem(O.value,J),y(X,J))}}catch(X){p(X)}}function W($){const X=$?$.newValue:n.getItem(O.value);if(X==null)return a&&S!=null&&n.setItem(O.value,F.write(S)),S;if(!$&&u){const J=F.read(X);return typeof u=="function"?u(J,S):A==="object"&&!Array.isArray(J)?{...S,...J}:J}else return typeof X!="string"?X:F.read(X)}function L($){if(!($&&$.storageArea!==n)){if($&&$.key==null){g.value=S;return}if(!($&&$.key!==O.value)){k();try{const X=F.write(g.value);($===void 0||($==null?void 0:$.newValue)!==X)&&(g.value=W($))}catch(X){p(X)}finally{$?pt(m):m()}}}}function Y($){L($.detail)}return g}function er(e={}){const{document:t=of}=e;if(!t)return dt("visible");const n=dt(t.visibilityState);return kt(t,"visibilitychange",()=>{n.value=t.visibilityState},{passive:!0}),n}function gf(e,t,n={}){const{window:o=St,...i}=n;let r;const s=Qi(()=>o&&"ResizeObserver"in o),l=()=>{r&&(r.disconnect(),r=void 0)},a=de(Q(()=>{const c=ft(e);return Array.isArray(c)?c.map(d=>$t(d)):[$t(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 Xi(u),{isSupported:s,stop:u}}function ql(e,t={width:0,height:0},n={}){const{window:o=St,box:i="content-box"}=n,r=Q(()=>{var d;return(d=$t(e))===null||d===void 0||(d=d.namespaceURI)===null||d===void 0?void 0:d.includes("svg")}),s=dt(t.width),l=dt(t.height),{stop:a}=gf(e,([d])=>{const f=i==="border-box"?d.borderBoxSize:i==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(o&&r.value){const p=$t(e);if(p){const w=p.getBoundingClientRect();s.value=w.width,l.value=w.height}}else if(f){const p=io(f);s.value=p.reduce((w,{inlineSize:g})=>w+g,0),l.value=p.reduce((w,{blockSize:g})=>w+g,0)}else s.value=d.contentRect.width,l.value=d.contentRect.height},n);Ji(()=>{const d=$t(e);d&&(s.value="offsetWidth"in d?d.offsetWidth:t.width,l.value="offsetHeight"in d?d.offsetHeight:t.height)});const u=de(()=>$t(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 mf(e,t,n={}){const{root:o,rootMargin:i="0px",threshold:r=0,window:s=St,immediate:l=!0}=n,a=Qi(()=>s&&"IntersectionObserver"in s),u=Q(()=>io(ft(e)).map($t).filter(Ud));let c=Dn;const d=dt(l),f=a.value?de(()=>[u.value,$t(o),d.value],([w,g])=>{if(c(),!d.value||!w.length)return;const O=new IntersectionObserver(t,{root:$t(g),rootMargin:i,threshold:r});w.forEach(S=>S&&O.observe(S)),c=()=>{O.disconnect(),c=Dn}},{immediate:l,flush:"post"}):Dn,p=()=>{c(),f(),d.value=!1};return Xi(p),{isSupported:a,isActive:d,pause(){c(),d.value=!1},resume(){d.value=!0},stop:p}}function vf(e,t,n={}){const{window:o=St}=n;return hf(e,t,o==null?void 0:o.localStorage,n)}function yn(e={}){const{window:t=St,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:r=!0,type:s="inner"}=e,l=dt(n),a=dt(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(),Ji(u);const c={passive:!0};return kt("resize",u,c),t&&s==="visual"&&t.visualViewport&&kt(t.visualViewport,"resize",u,c),i&&de(af("(orientation: portrait)"),()=>u()),{width:l,height:a}}class ro{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=[]}}re(ro,"handlers",[]);function tr(e){je(()=>ro.register(e)),gt(()=>ro.unregister(e))}const Ul=he({__name:"HelpScreen",props:{touchDevice:{type:Boolean}},emits:["hide"],setup(e,{emit:t}){const n=e,o=t,i=ne(null),r=ne([]);tr(()=>(o("hide"),!0)),je(async()=>{const u=ql(i),c=vt(()=>{s({width:u.width.value,height:u.height.value})},50);c(),de(u.width,c),de(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,w=0;const g=50,O=25;u.forEach(m=>{var I;const P=(I=m.getAttribute("title"))==null?void 0:I.trim(),C=m.getBoundingClientRect();if(!P||!C.height||!C.width)return;const B=Math.ceil((C.top-10)/g),y=Math.ceil((C.left-10)/g);f.push({isTour:!1,title:P,rect:C,fromX:y,toX:Math.max(y+1,Math.ceil((C.right+10)/g)),fromY:B,toY:Math.max(B+1,Math.ceil((C.bottom+10)/g))})}),f.forEach(m=>{for(let P=m.fromY;P<m.toY;P++){d[P]??(d[P]=[]);for(let C=m.fromX;C<m.toX;C++)d[P][C]=m;m.toY>p+1&&(p=m.toY-1),m.toX>w+1&&(w=m.toX-1)}});let S=w/2;f.forEach(m=>{m.isAlignRight=m.fromX>S});const A=(m,P)=>{d[P]??(d[P]=[]);const C=P>=m.toY;if(m.isTour)for(let B=m.fromX;B<m.toX;B++)delete d[m.fromY][B],m.fromY=P,m.toY=P+(C?1:-1),d[P][B]=m;else{const B=m.isAlignRight?m.fromX-3:m.fromX,y=B+3;m.helpItem={fromX:B,toX:y,fromY:P,toY:P+1,isTour:!0,isAlignRight:m.isAlignRight};for(let I=B;I<y;I++)d[P][I]=m.helpItem}},F=(m,P)=>{if(P>p||P<0)return!1;const C=P>=m.toY,B=d[P];if(!B)return A(m,P),!0;const y=B[m.fromX];if(y&&!y.isTour)return!1;if(y&&y.isTour)return F(y,C?P+1:P-1)?(A(m,P),!0):!1;if(!y){const I=m.isAlignRight?-1:1;return B[m.fromX+I]||B[m.fromX+I*2]?F(m,C?P+1:P-1):(A(m,P),!0)}return!1};f.forEach(m=>{if(!F(m,m.toY)){if(m.isAlignRight){const P=d[m.fromY]??[];if(!P.slice(m.fromX-3,m.fromX).filter(Boolean).length){const B=m.fromX-3,y=m.fromX;m.helpItem={isTour:!0,isAlignRight:!0,fromX:B,toX:y,fromY:m.fromY,toY:m.toY};for(let I=m.fromX-3;I<m.fromX;I++)P[I]=m.helpItem;return}}F(m,m.fromY-1)}});const k=[];return f.forEach(m=>{const{title:P,helpItem:C,rect:B,isAlignRight:y,fromX:I,fromY:W,toY:L}=m;if(!P||!C||!B)return;const Y=C.fromY>=L,$=C.toY<=W;k.push({title:a(P),style:{top:Y?`${B.bottom+(C.fromY-L)*g+O}px`:$?void 0:`${B.top+8}px`,bottom:$?`${c.height-B.top+(C.toY-W)*g+O}px`:void 0,left:y?void 0:`${B.left}px`,right:y?Y?`${c.width-B.right}px`:`${c.width-B.right+B.width+O}px`:void 0},arrowStyle:{width:$||Y?"2px":`${Math.abs(C.toX-I)*g+O-5}px`,height:$||Y?`${(Y?C.fromY-L:W-C.toY)*g+O}px`:"2px",top:Y?`${B.bottom}px`:$?void 0:`${B.top+20}px`,bottom:$?`${c.height-B.top}px`:void 0,left:y?void 0:`${B.left+B.width/2}px`,right:y?Y?`${c.width-B.right+B.width/2}px`:`${c.width-B.right+B.width}px`:void 0}})}),k}function a(u){return n.touchDevice?u.split("(")[0].trim():u}return(u,c)=>(b(),z(we,null,[c[1]||(c[1]=K("div",{class:"fixed inset-0 bg-black bg-opacity-90"},null,-1)),K("div",{ref_key:"root",ref:i,class:"fixed inset-0 z-20 overscroll-contain select-none",onClick:c[0]||(c[0]=Ne(d=>o("hide"),["stop"]))},[(b(!0),z(we,null,Qt(r.value,d=>(b(),z(we,{key:d.title},[K("div",{class:"absolute",style:Te(d.style)},We(d.title),5),K("div",{class:"absolute bg-stone-300 rounded-lg",style:Te(d.arrowStyle)},null,4)],64))),128))],512)],64))}}),bf=Object.freeze(Object.defineProperty({__proto__:null,default:Ul},Symbol.toStringTag,{value:"Module"}));function on(e,t){let n=null;return(...o)=>{n===null&&(n=setTimeout(()=>{n=null,e(...o)},t))}}const yf=he({__name:"ReaderTour",emits:["hide"],setup(e,{emit:t}){const n=t,o=ne(null),i=ne(0),r=ne([]),s=Q(()=>r.value[i.value]),l=on(a,500);je(()=>{const d=ql(o),f=vt(()=>u({width:d.width.value,height:d.height.value}),50);f(),de(d.width,f),de(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:w})=>{const g=p.top<d.height-p.bottom,O=p.left<d.width-p.right;return{text:w,style:{left:`${p.left}px`,top:`${p.top}px`,width:`${p.width}px`,height:`${p.height}px`},textStyle:{left:O?`${p.left-12}px`:void 0,right:O?void 0:`${d.width-p.left}px`,top:g?`${p.bottom+12}px`:`${p.top+20}px`,textAlign:g?void 0:"right",transform:g?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(w=>{var S;const g=(S=w.getAttribute("data-tour"))==null?void 0:S.trim();if(!(g!=null&&g.length))return;const O=w.getBoundingClientRect();f.push({rect:O,text:g})}),f}return(d,f)=>{var p,w;return b(),z(we,null,[K("div",{class:ue(["fixed inset-0 bg-black bg-opacity-50 duration-500",{"opacity-0":!s.value,"opacity-100":!!s.value}])},null,2),K("div",{ref_key:"root",ref:o,class:"tour",onClick:f[0]||(f[0]=Ne((...g)=>U(l)&&U(l)(...g),["stop"]))},[s.value?(b(),z("div",{key:i.value,class:"tour__target",style:Te(s.value.style)},null,4)):ae("",!0),(b(),z("div",{key:i.value,class:"tour__text",style:Te((p=s.value)==null?void 0:p.textStyle)},We(((w=s.value)==null?void 0:w.text)??""),5))],512)],64)}}}),wf=".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}}",be=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},Kl=be(yf,[["styles",[wf]]]),xf=Object.freeze(Object.defineProperty({__proto__:null,default:Kl},Symbol.toStringTag,{value:"Module"}));function _f({touchDevice:e}){const t=ne(!1);let n=0;return Zn("busy:touchDevice",e),Zn("setBusyState",o=>{n+=o?1:-1;const i=n>0;t.value!=i&&(t.value=i)}),Q(()=>t.value)}function Go(){const e=Ut("busy:touchDevice"),t=Ut("setBusyState");let n=!1;return gt(()=>{n&&(t==null||t(!1))}),(o,{desktopOnly:i=!1}={})=>{i&&e||(n=o,t==null||t(o))}}function Sf(){const e=EventTarget.prototype.addEventListener,t=["click"];EventTarget.prototype.addEventListener=function(o,i,r){return e.call(this,o,i,t.includes(o)?n(r):r)},gt(()=>{EventTarget.prototype.addEventListener=e});function n(o){return o&&(typeof o=="boolean"?!1:(o.capture,{...o,capture:!1}))}}function kf(e){Zn("hapticFeedback",e)}function Jo(){return Ut("hapticFeedback")}class Cf{constructor(){re(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 Tf(){const e=new Cf;return gt(()=>e.dispose()),Zn("keyController",e),e}function Dt(e){const t=Ut("keyController");je(()=>t.addListener(e)),gt(()=>t.removeListener(e))}function zt(e,t){try{return e()}catch{return}}function Pf(e,t){zt(()=>{const o=sessionStorage.getItem("tk:page:path");o!==location.pathname&&(sessionStorage.setItem("tk:page:path",location.pathname),o&&sessionStorage.removeItem("tk:page"))});const n=ne(t&&e>0?e:+(zt(()=>sessionStorage.getItem("tk:page"))??"0")||e);return Q({get:()=>n.value,set:o=>{n.value=o,zt(()=>{sessionStorage.setItem("tk:page",o+"")})}})}function If(){zt(()=>{sessionStorage.removeItem("tk:page"),sessionStorage.removeItem("tk:page:path")})}function Ef(e,t){if(!e)return!1;const n=e.split(".").slice(0,3),o=t.split(".");for(let i=0;i<n.length;i++){const r=+n[i],s=+o[i];if(r!==s)return r>s}return!1}const Mf=(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))}},At={mounted:(e,t)=>{e.style.position="relative",e.style.overflow="hidden",e.setAttribute("data-ripple",t.value),e.addEventListener("click",n=>Mf(e,n))},updated:(e,t)=>{e.setAttribute("data-ripple",t.value)}},Of={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"},nr=he({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=Go(),r=Jo();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)=>He((b(),se(Es(e.href?"a":"button"),Mn({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:Ne(u,["stop"]),onMouseenter:l,onMouseleave:a}),{default:ie(()=>[K("div",Of,[ke(c.$slots,"default")])]),_:3},16,["class"])),[[U(At),e.disabled?0:15]])}}),$f=Object.freeze(Object.defineProperty({__proto__:null,default:nr},Symbol.toStringTag,{value:"Module"})),Df={},zf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Af(e,t){return b(),z("svg",zf,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M19 12.998h-6v6h-2v-6H5v-2h6v-6h2v6h6z"},null,-1)])])}const Zl=be(Df,[["render",Af]]),Bf=Object.freeze(Object.defineProperty({__proto__:null,default:Zl},Symbol.toStringTag,{value:"Module"})),Lf={class:"h-screen w-full flex justify-center items-center relative"},jf={key:0,class:"flex gap-6 p-6 duration-200"},Nf={key:0,class:"inline-block rounded-full relative w-28 h-12 overflow-hidden"},Vf={key:0,class:"absolute bottom-0 left-0 right-0 flex justify-center pb-7 md:pb-6 lg:pb-4"},Rf={class:"flex justify-center items-center gap-1 pl-1 pr-2 h-full"},or=be(he({__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=ne(null),r=ne(!1),s=ne(n.seconds),l=ne(n.seconds<=0),a=ne(n.seconds),u=Jo();je(()=>{let f;mf(i,p=>{const w=p.some(g=>g.isIntersecting);w!==r.value&&(r.value=w,o("visibility-changed",w),l.value=n.seconds<=0,s.value=n.seconds,a.value=n.seconds,f&&(clearInterval(f),f=void 0),!(!r.value||l.value)&&(f=setInterval(()=>{s.value-=1,s.value<=0&&(clearInterval(f),f=void 0,o("next"))},1e3)))},{rootMargin:"-108px 0px"}),gt(()=>f&&clearInterval(f))});function c(){o("next"),u()}function d(){o("hide")}return(f,p)=>(b(),z("div",Lf,[K("div",{ref_key:"main",ref:i,class:"inline-flex text-base text-stone-300 select-none"},[N(no,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ie(()=>[r.value?(b(),z("div",jf,[e.hasNext?(b(),z("div",Nf,[r.value?(b(),z("div",{key:0,class:"absolute left-0 top-0 bottom-0 h-full bg-stone-600 bg-opacity-50",style:Te(l.value?{}:{animation:`auto-next ${a.value}s linear forwards`})},null,4)):ae("",!0),He((b(),z("button",{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:Ne(c,["stop"])},[Kt(We(l.value?"Next":`Next in ${s.value}`),1)])),[[U(At)]])])):ae("",!0),He((b(),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:Ne(d,["stop"])},[Kt(We(e.offlineMode?"Close":"Hide"),1)])),[[U(At)]])])):ae("",!0)]),_:1})],512),e.showAddButton?(b(),z("div",Vf,[N(nr,{class:"bg-primary w-min !h-9 !bg-opacity-100",onClick:p[0]||(p[0]=()=>o("add-to-library"))},{default:ie(()=>[K("div",Rf,[N(Zl,{class:"flex-shrink-0 w-auto"}),p[1]||(p[1]=K("span",{class:"text-sm text-stone-50"},"Add to library",-1))])]),_:1})])):ae("",!0)]))}}),[["styles",[".animate-auto-next{animation:auto-next 5s linear forwards}@keyframes auto-next{0%{width:0}to{width:100%}}"]]]),Hf=Object.freeze(Object.defineProperty({__proto__:null,default:or},Symbol.toStringTag,{value:"Module"})),Je=he({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)=>(b(),se(nr,{class:ue(["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:ie(()=>[ke(o.$slots,"default")]),_:3},8,["class","disabled","href","title","transparent","enable-haptic-feedback"]))}}),Ff=Object.freeze(Object.defineProperty({__proto__:null,default:Je},Symbol.toStringTag,{value:"Module"})),Wf={},qf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Uf(e,t){return b(),z("svg",qf,[...t[0]||(t[0]=[K("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 Yl=be(Wf,[["render",Uf]]),Kf=Object.freeze(Object.defineProperty({__proto__:null,default:Yl},Symbol.toStringTag,{value:"Module"})),ir=he({__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 b(),se(Je,{href:e.offlineMode||!e.raw?"#":e.raw.title.url,title:`Back to ${((l=e.raw)==null?void 0:l.contentType)===U(Xt).novel?"novel":"manga"}`,transparent:e.transparent,"enable-haptic-feedback":"",onClick:i},{default:ie(()=>[N(Yl)]),_:1},8,["href","title","transparent"])}}}),Zf=Object.freeze(Object.defineProperty({__proto__:null,default:ir},Symbol.toStringTag,{value:"Module"})),Yf={},Xf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Gf(e,t){return b(),z("svg",Xf,[...t[0]||(t[0]=[K("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 Xl=be(Yf,[["render",Gf]]),Jf=Object.freeze(Object.defineProperty({__proto__:null,default:Xl},Symbol.toStringTag,{value:"Module"})),Qf={},ep={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function tp(e,t){return b(),z("svg",ep,[...t[0]||(t[0]=[K("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 Gl=be(Qf,[["render",tp]]),np=Object.freeze(Object.defineProperty({__proto__:null,default:Gl},Symbol.toStringTag,{value:"Module"})),rr=he({__name:"ButtonEntry",props:{entryId:{type:null},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;Dt({onKeyUp:i=>{i.key==="t"&&!i.metaKey&&!i.ctrlKey&&n("click")}});function o(){n("click")}return(i,r)=>(b(),se(Je,{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:ie(()=>[e.entryId?(b(),se(Xl,{key:0})):(b(),se(Gl,{key:1}))]),_:1},8,["transparent","title"]))}}),op=Object.freeze(Object.defineProperty({__proto__:null,default:rr},Symbol.toStringTag,{value:"Module"})),ip={},rp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function sp(e,t){return b(),z("svg",rp,[...t[0]||(t[0]=[K("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 Jl=be(ip,[["render",sp]]),lp=Object.freeze(Object.defineProperty({__proto__:null,default:Jl},Symbol.toStringTag,{value:"Module"})),Qo=he({inheritAttrs:!1,__name:"ButtonHide",props:{transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return(o,i)=>(b(),se(Je,{title:"Hide reader","data-tour":"You have entered reader mode, press here to return to the original page",class:ue(o.$attrs.class),transparent:e.transparent,onClick:i[0]||(i[0]=()=>n("click"))},{default:ie(()=>[N(Jl)]),_:1},8,["class","transparent"]))}}),ap=Object.freeze(Object.defineProperty({__proto__:null,default:Qo},Symbol.toStringTag,{value:"Module"})),cp={},up={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function dp(e,t){return b(),z("svg",up,[...t[0]||(t[0]=[K("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),K("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 sr=be(cp,[["render",dp]]),fp=Object.freeze(Object.defineProperty({__proto__:null,default:sr},Symbol.toStringTag,{value:"Module"})),pp={},hp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function gp(e,t){return b(),z("svg",hp,[...t[0]||(t[0]=[K("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 lr=be(pp,[["render",gp]]),mp=Object.freeze(Object.defineProperty({__proto__:null,default:lr},Symbol.toStringTag,{value:"Module"})),ar=he({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 Dt({onKeyDown(i){!n.disabled&&i.key===" "&&(i.preventDefault(),o("click"))}}),(i,r)=>(b(),se(Je,{transparent:e.transparent,class:ue(i.$attrs.class),"data-tour":e.tourMessage,title:`${e.playing?"Pause":"Play"} (Space)`,disabled:e.disabled,onClick:r[0]||(r[0]=()=>o("click"))},{default:ie(()=>[e.playing?(b(),se(sr,{key:0})):(b(),se(lr,{key:1}))]),_:1},8,["transparent","class","data-tour","title","disabled"]))}}),vp=Object.freeze(Object.defineProperty({__proto__:null,default:ar},Symbol.toStringTag,{value:"Module"})),bp={},yp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"};function wp(e,t){return b(),z("svg",yp,[...t[0]||(t[0]=[K("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[K("circle",{cx:"14",cy:"14",r:"12"}),K("path",{d:"m23 23l7 7M9 12V9h3m4 0h3v3M9 16v3h3m7-3v3h-3"})],-1)])])}const Ql=be(bp,[["render",wp]]),xp=Object.freeze(Object.defineProperty({__proto__:null,default:Ql},Symbol.toStringTag,{value:"Module"})),_p={class:"block w-4 h-4"},Sp={class:"w-12"},ea=he({__name:"ButtonResetZoom",props:{zoom:{type:Number}},emits:["click"],setup(e,{emit:t}){const n=t;function o(i){n("click",i)}return(i,r)=>(b(),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:Ne(o,["stop"])},[K("div",_p,[N(Ql)]),K("div",Sp,We(Math.ceil(e.zoom*100))+"%",1)]))}}),kp=Object.freeze(Object.defineProperty({__proto__:null,default:ea},Symbol.toStringTag,{value:"Module"})),Cp={},Tp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 36 36"};function Pp(e,t){return b(),z("svg",Tp,[...t[0]||(t[0]=[K("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),K("path",{fill:"none",d:"M0 0h36v36H0z"},null,-1)])])}const ta=be(Cp,[["render",Pp]]),Ip=Object.freeze(Object.defineProperty({__proto__:null,default:ta},Symbol.toStringTag,{value:"Module"})),cr=he({__name:"ButtonSettings",props:{disabled:{type:Boolean},transparent:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return Dt({onKeyUp:o=>{o.key==="s"&&!o.metaKey&&!o.ctrlKey&&n("click")}}),(o,i)=>(b(),se(Je,{transparent:e.transparent,title:"Reader preferences (S)",disabled:e.disabled,onClick:i[0]||(i[0]=()=>n("click"))},{default:ie(()=>[N(ta)]),_:1},8,["transparent","disabled"]))}}),Ep=Object.freeze(Object.defineProperty({__proto__:null,default:cr},Symbol.toStringTag,{value:"Module"})),Mp={},Op={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function $p(e,t){return b(),z("svg",Op,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M4 4h6v2H6v4H4V4Zm10 0h6v6h-2V6h-4V4ZM6 14v4h4v2H4v-6h2Zm14 0v6h-6v-2h4v-4h2Z"},null,-1)])])}const na=be(Mp,[["render",$p]]),Dp=Object.freeze(Object.defineProperty({__proto__:null,default:na},Symbol.toStringTag,{value:"Module"})),zp={},Ap={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function Bp(e,t){return b(),z("svg",Ap,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M14 20v-6h6v2h-4v4h-2Zm-6 0v-4H4v-2h6v6H8Zm12-10h-6V4h2v4h4v2Zm-10 0H4V8h4V4h2v6Z"},null,-1)])])}const oa=be(zp,[["render",Bp]]),Lp=Object.freeze(Object.defineProperty({__proto__:null,default:oa},Symbol.toStringTag,{value:"Module"})),ur=he({__name:"ButtonWebFullScreen",props:{transparent:{type:Boolean}},emits:["request-full-screen"],setup(e,{emit:t}){const n=t,o=ne(!1);Dt({onKeyUp:r=>{r.key==="f"&&!r.metaKey&&!r.ctrlKey&&i()}}),kt("fullscreenchange",()=>{o.value=!!document.fullscreenElement});function i(){document.fullscreenElement?document.exitFullscreen():n("request-full-screen")}return(r,s)=>(b(),se(Je,{transparent:e.transparent,title:`${o.value?"Exit":"Enter"} fullscreen (F)`,onClick:i},{default:ie(()=>[o.value?(b(),se(oa,{key:0})):(b(),se(na,{key:1}))]),_:1},8,["transparent","title"]))}}),jp=Object.freeze(Object.defineProperty({__proto__:null,default:ur},Symbol.toStringTag,{value:"Module"})),Np=["aria-hidden"],Vp=["onClick"],ia=he({__name:"DropdownMenu",props:Xe({items:{type:Array},enableHapticFeedback:{type:Boolean}},{modelValue:{type:Number,required:!1},modelModifiers:{}}),emits:Xe(["select"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=st(e,"modelValue"),r=ne(null),s=ne(!1),l=ne(!1),a=ne(!1),u=ne(!1),c={mounted:k=>{var m;i.value&&((m=k.children[i.value])==null||m.scrollIntoView({behavior:"auto",block:"center",inline:"center"}))}};Dt({onKeyDown:O}),tr(()=>{const k=s.value;return k&&(s.value=!1),k});const d=Go(),f=Jo();async function p(k){s.value=k??!s.value,d(s.value),s.value?(w(),A(r.value)):setTimeout(F,250)}function w(){const k=r.value;if(k){const m=k.getBoundingClientRect(),P=m.x+m.width/2;l.value=m.y>window.innerHeight/2,a.value=P<window.innerWidth/3,u.value=P>window.innerWidth/3*2}}function g(k,m){p(),k!=i.value&&(i.value=k,o("select",k,m),n.enableHapticFeedback&&f())}function O(k){s.value&&k.key==="Escape"&&(p(),k.preventDefault())}let S=[];function A(k){const m=window.getComputedStyle(k).zIndex,P=k.style.zIndex;(!m||!(+m>0))&&((!k.parentElement||k.parentElement.childElementCount>1)&&(k.style.zIndex="1",S.push({el:k,zIndex:P})),k.parentElement&&A(k.parentElement))}function F(){S.forEach(({el:k,zIndex:m})=>{k.style.zIndex=m??""}),S=[]}return(k,m)=>(b(),z("div",{ref_key:"root",ref:r,class:"select-none relative inline-flex"},[s.value?(b(),z("div",{key:0,class:"fixed inset-0 bg-transparent",onClick:m[0]||(m[0]=()=>p())})):ae("",!0),e.items.length?(b(),se(no,{key:1,"enter-from-class":"scale-y-90 opacity-0 pointer-events-none","leave-to-class":"scale-y-90 opacity-0 pointer-events-none"},{default:ie(()=>[s.value?He((b(),z("ul",{key:0,ref:"list","aria-hidden":!s.value,class:ue(["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:m[1]||(m[1]=Ne(()=>{},["stop"])),onTouchmove:m[2]||(m[2]=Ne(()=>{},["stop"]))},[(b(!0),z(we,null,Qt(e.items,(P,C)=>He((b(),z("li",{key:C,tabindex:"-1",class:ue(["h-10 px-4 last:border-b-transparent cursor-pointer hover:bg-stone-100 hover:bg-opacity-10 duration-100",{"text-textPrimary":C===i.value}]),onClick:B=>g(C,B)},[K("div",{class:ue(["h-full py-2",{"border-t-[1px] border-solid border-stone-400 border-opacity-30":C>0}])},[ke(k.$slots,"item",{item:P},()=>[Kt(We(P),1)])],2)],10,Vp)),[[U(At),30]])),128))],42,Np)),[[c]]):ae("",!0)]),_:3})):ae("",!0),ke(k.$slots,"default",{toggle:p,isOpen:s.value,isAlignTop:l.value})],512))}}),Rp=Object.freeze(Object.defineProperty({__proto__:null,default:ia},Symbol.toStringTag,{value:"Module"})),Hp={},Fp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Wp(e,t){return b(),z("svg",Fp,[...t[0]||(t[0]=[Xu('<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 ra=be(Hp,[["render",Wp]]),qp=Object.freeze(Object.defineProperty({__proto__:null,default:ra},Symbol.toStringTag,{value:"Module"})),Up={},Kp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Zp(e,t){return b(),z("svg",Kp,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"},null,-1)])])}const sa=be(Up,[["render",Zp]]),Yp=Object.freeze(Object.defineProperty({__proto__:null,default:sa},Symbol.toStringTag,{value:"Module"})),Xp=["onClick"],Gp={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"},Jp={class:"whitespace-nowrap"},dr=he({inheritAttrs:!1,__name:"ButtonDropdown",props:Xe({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:Xe(["select"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=st(e,"modelValue"),r=ne(!1),s=Go();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)=>(b(),se(ia,{modelValue:i.value,"onUpdate:modelValue":p[0]||(p[0]=w=>i.value=w),items:e.items,class:ue(f.$attrs.class),"enable-haptic-feedback":e.enableHapticFeedback,onSelect:p[1]||(p[1]=(w,g)=>o("select",w,g))},zi({default:ie(({toggle:w,isOpen:g,isAlignTop:O})=>[He((b(),z("button",Mn({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:Ne(()=>l(g,w),["stop"]),onMouseenter:c,onMouseleave:d}),[K("div",Gp,[K("span",Jp,We(e.label),1),e.items.length||e.canLoadItems?(b(),z("span",{key:0,class:ue(["w-4 h-4 flex ml-1 -mr-3 flex-shrink-0",{"rotate-180":O}]),"aria-hidden":"true"},[r.value?(b(),se(ra,{key:0})):(b(),se(sa,{key:1}))],2)):ae("",!0)])],16,Xp)),[[U(At),30]])]),_:2},[f.$slots.item?{name:"item",fn:ie(({item:w})=>[ke(f.$slots,"item",{item:w})]),key:"0"}:void 0]),1032,["modelValue","items","class","enable-haptic-feedback"]))}}),Qp=Object.freeze(Object.defineProperty({__proto__:null,default:dr},Symbol.toStringTag,{value:"Module"})),eh={},th={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function nh(e,t){return b(),z("svg",th,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z"},null,-1)])])}const la=be(eh,[["render",nh]]),oh=Object.freeze(Object.defineProperty({__proto__:null,default:la},Symbol.toStringTag,{value:"Module"})),ih={},rh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function sh(e,t){return b(),z("svg",rh,[...t[0]||(t[0]=[K("path",{fill:"currentColor",d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z"},null,-1)])])}const aa=be(ih,[["render",sh]]),lh=Object.freeze(Object.defineProperty({__proto__:null,default:aa},Symbol.toStringTag,{value:"Module"})),ah={key:0,class:"ml-auto inline-flex gap-[1px] scale-95 origin-right"},fr=he({__name:"ChapterNav",props:{data:{type:Object},chapterSpec:{type:[Object,String]},touchDevice:{type:Boolean},rtl:{type:Boolean},transparent:{type:Boolean}},emits:["getHiddenChapters","prev","next","dialogOpened"],setup(e,{emit:t}){const n=e,o=t,i=Q(()=>{var d;return typeof n.chapterSpec!="string"&&!!((d=n.chapterSpec)!=null&&d.trigger)});async function r(){const d=typeof n.chapterSpec=="string"?{sel:n.chapterSpec}:n.chapterSpec;if(d){if(d.dialog){await s(d.dialog);return}o("getHiddenChapters"),await mt(50,50,()=>n.data.chapters.length?!0:void 0)}}async function s(d){const f=document.querySelector(d);f&&(f instanceof HTMLDialogElement?f.showModal():f.click(),o("dialogOpened"))}function l(d,f){var p,w,g;(g=(w=(p=n.data)==null?void 0:p.chapters)==null?void 0:w[d])==null||g.select(c(f))}function a(d){n.rtl?o("next",c(d)):o("prev",c(d))}function u(d){n.rtl?o("prev",c(d)):o("next",c(d))}function c(d){return!n.touchDevice&&(d.ctrlKey||d.metaKey)}return(d,f)=>(b(),z(we,null,[N(dr,{modelValue:e.data.activeIndex,label:e.data.activeLabel,title:"Select chapter",transparent:e.transparent,items:e.data.chapters,"can-load-items":i.value,"load-items":r,"enable-haptic-feedback":"",onSelect:l},{item:ie(({item:p})=>[Kt(We(p.label),1)]),_:1},8,["modelValue","label","transparent","items","can-load-items"]),e.data.next||e.data.prev?(b(),z("div",ah,[N(Je,{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:a},{default:ie(()=>[N(la)]),_:1},8,["title","disabled","transparent"]),N(Je,{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:u},{default:ie(()=>[N(aa)]),_:1},8,["title","disabled","transparent"])])):ae("",!0)],64))}}),ch=Object.freeze(Object.defineProperty({__proto__:null,default:fr},Symbol.toStringTag,{value:"Module"})),uh=["min","max","step"],dh={class:"flex-shrink-0 w-12 inline-block text-right"},rn=be(he({__name:"InputPercentage",props:Xe({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=st(e,"modelValue"),n=Q({get(){return t.value},set(o){t.value=+o}});return(o,i)=>{var r;return b(),z("div",{class:"flex items-center gap-3 pl-1",style:Te({"--percentage":`${(n.value-e.min)/(e.max-e.min)*100}%`})},[He(K("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]=Ne(()=>{},["stop"]))},null,40,uh),[[zd,n.value]]),K("span",dh,We(((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}"]]]),fh=Object.freeze(Object.defineProperty({__proto__:null,default:rn},Symbol.toStringTag,{value:"Module"})),ph={ref:"root",class:"flex text-sm flex-wrap gap-2 leading-none"},hh=["onClick","onKeyup"],bt=he({__name:"InputSelect",props:Xe({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=st(e,"modelValue");function o(i){i!==n.value&&(n.value=i)}return(i,r)=>(b(),z("div",ph,[(b(!0),z(we,null,Qt(t.items,(s,l)=>He((b(),z("div",{key:l,tabindex:"0",class:ue(["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:[Zo(()=>o(l),["enter"]),Zo(()=>o(l),["space"])]},[Kt(We(s),1)],42,hh)),[[U(At),30]])),128))],512))}}),gh=Object.freeze(Object.defineProperty({__proto__:null,default:bt},Symbol.toStringTag,{value:"Module"})),mh={class:"flex w-full items-center justify-between cursor-pointer mb-5 last:mb-0"},vh={class:"text-sm py-1"},bh={class:"switcher p-1"},ei=be(he({__name:"InputSwitcher",props:Xe({label:{type:String}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=st(e,"modelValue");return(n,o)=>(b(),z("label",mh,[K("span",vh,We(e.label),1),K("div",bh,[He(K("input",{"onUpdate:modelValue":o[0]||(o[0]=i=>t.value=i),type:"checkbox"},null,512),[[Ad,t.value]]),o[1]||(o[1]=K("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))}']]]),yh=Object.freeze(Object.defineProperty({__proto__:null,default:ei},Symbol.toStringTag,{value:"Module"})),wh={class:"flex-grow mb-5 last:mb-0"},Le=he({__name:"TableField",props:{label:{type:String},disabled:{type:Boolean}},setup(e){return(t,n)=>(b(),z(we,null,[K("div",{class:ue(["flex-shrink-0 mb-2 whitespace-nowrap text-sm",{"opacity-50":e.disabled}])},We(e.label),3),K("div",wh,[ke(t.$slots,"default")])],64))}}),xh=Object.freeze(Object.defineProperty({__proto__:null,default:Le},Symbol.toStringTag,{value:"Module"})),ca=he({__name:"FieldContrast",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=st(e,"modelValue"),n=Q({get(){return Math.round(t.value*100)},set(o){t.value=Math.round(o)/100}});return(o,i)=>(b(),se(Le,{label:"Contrast"},{default:ie(()=>[N(rn,{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}))}}),_h=Object.freeze(Object.defineProperty({__proto__:null,default:ca},Symbol.toStringTag,{value:"Module"})),Sh={},kh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Ch(e,t){return b(),z("svg",kh,[...t[0]||(t[0]=[K("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 ua=be(Sh,[["render",Ch]]),Th=Object.freeze(Object.defineProperty({__proto__:null,default:ua},Symbol.toStringTag,{value:"Module"})),Ph={},Ih={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Eh(e,t){return b(),z("svg",Ih,[...t[0]||(t[0]=[K("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 da=be(Ph,[["render",Eh]]),Mh=Object.freeze(Object.defineProperty({__proto__:null,default:da},Symbol.toStringTag,{value:"Module"})),pr=he({inheritAttrs:!1,__name:"ButtonOutline",emits:["click"],setup(e,{emit:t}){const n=t,o=Jo();function i(){o(),n("click")}return(r,s)=>He((b(),z("button",{class:ue([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},[ke(r.$slots,"default")],2)),[[U(At),24]])}}),Oh=Object.freeze(Object.defineProperty({__proto__:null,default:pr},Symbol.toStringTag,{value:"Module"}));var sn=(e=>(e[e.never=0]="never",e[e.move=1]="move",e[e.firstMove=2]="firstMove",e[e.onLoad=3]="onLoad",e))(sn||{}),tt=(e=>(e[e.vertical=0]="vertical",e[e.ltr=1]="ltr",e[e.rtl=2]="rtl",e))(tt||{});const ti=[{name:"System",value:"system-ui, sans-serif"},{name:"Charter",value:'Charter, "Times New Roman", serif'},{name:"Georgia",value:"Georgia, serif"}],fa=he({__name:"FieldFontFamily",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(e){const t=st(e,"modelValue"),n=Q({get(){const o=ti.findIndex(i=>i.value===t.value);return o===-1?0:o},set(o){t.value=ti[o].value}});return(o,i)=>(b(),se(Le,{label:"Font family"},{default:ie(()=>[N(bt,{modelValue:n.value,"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),items:U(ti).map(r=>r.name)},null,8,["modelValue","items"])]),_:1}))}}),$h=Object.freeze(Object.defineProperty({__proto__:null,default:fa},Symbol.toStringTag,{value:"Module"}));function pa(e){if(e)try{return JSON.parse(e)}catch{return}}function Dh(){const{width:e,height:t}=yn();return Q(()=>e.value>t.value)}function ha(e){return String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}var Bt=(e=>(e[e.longStrip=0]="longStrip",e[e.single=1]="single",e[e.double=2]="double",e))(Bt||{});const ni=.25,oi=5,hr=.25,ii=.2,ri=5,zh=.05,Ah=0,Bh=5;function Lh(e){var m,P,C,B,y,I;const n=e.touchDevice&&(window.innerHeight<=600||window.innerWidth<=600)?Dh():void 0,{titleName:o,isWebtoon:i}=e,r=o?ha(o):location.hostname,s=ne(jh(`tkr:${r}`)),l=W=>{s.value=W;const L=`tkr:${r}`;zt(()=>{!W||!Object.keys(W).length?localStorage.removeItem(L):localStorage.setItem(L,JSON.stringify(W))})},a=W=>{if(!s.value){l(W);return}const L={...s.value};Object.entries(W).forEach(([Y,$])=>{$===void 0?delete L[Y]:L[Y]=$}),l(L)},u=ne((m=s.value)==null?void 0:m.style),c=ne((P=s.value)==null?void 0:P.direction),d=ne((C=s.value)==null?void 0:C.gap),f=ne((B=s.value)==null?void 0:B.speed),p=ne((y=s.value)==null?void 0:y.zoom),w=ne(((I=s.value)==null?void 0:I.breakFirst)??!1),g=Q({get(){if(i.value)return Bt.longStrip;if(u.value!==void 0)return u.value;const{landscapeStyle:W,readerStyle:L}=e.defaultPreferences.value;return n!=null&&n.value?W??L:L},set:W=>{if(u.value===W)return;const L=g.value===Bt.longStrip,Y=W===Bt.longStrip;u.value=W,a({style:W}),L!==Y&&(O.value=Y?tt.vertical:tt.rtl)}}),O=Q({get(){if(i.value)return tt.vertical;if(c.value!==void 0)return c.value;const{direction:W,landscapeDirection:L}=e.defaultPreferences.value;return n!=null&&n.value?L??W:W},set:W=>{c.value=W,a({direction:W})}}),S=Q({get:()=>d.value??e.defaultPreferences.value.gap,set(W){d.value=W,a({gap:W})}}),A=Q({get:()=>f.value??e.defaultPreferences.value.speed,set(W){f.value=W,a({speed:W===1?void 0:W})}}),F=Q({get:()=>p.value??1,set(W){p.value=W,a({zoom:W===1?void 0:W})}}),k=Q({get:()=>w.value,set(W){w.value=W,a({breakFirst:W?!0:void 0})}});return{direction:O,style:g,gap:S,speed:A,zoom:F,isLongStrip:Q(()=>g.value===Bt.longStrip),isDouble:Q(()=>g.value===Bt.double),isRTL:Q(()=>O.value===tt.rtl),isVertical:Q(()=>O.value===tt.vertical),breakFirst:k}}function jh(e){const t=zt(()=>localStorage.getItem(e)),n=pa(t||void 0),o={};return n?(n.style!==void 0&&Object.values(Bt).includes(n.style)&&(o.style=n.style),n.direction!==void 0&&Object.values(tt).includes(n.direction)&&(o.direction=n.direction),n.gap!==void 0&&n.gap>=Ah&&n.gap<=Bh&&(o.gap=n.gap),n.speed!==void 0&&n.speed>=ni&&n.speed<=oi&&(o.speed=n.speed),n.zoom!==void 0&&n.zoom>=ii&&n.zoom<=ri&&(o.zoom=n.zoom),n.breakFirst===!0&&(o.breakFirst=!0),Object.keys(o).length?o:void 0):o}const gr=he({__name:"NovelPreferencesForm",props:Xe({enableReset:{type:Boolean},defaultPreferences:{type:Object},forceFontFamily:{type:String}},{modelValue:{required:!0},modelModifiers:{}}),emits:Xe(["reset"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=st(e,"modelValue"),r=Q(()=>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)=>(b(),z(we,null,[e.forceFontFamily?ae("",!0):(b(),se(fa,{key:0,"model-value":i.value.fontFamily,"onUpdate:modelValue":a[0]||(a[0]=u=>s({fontFamily:u}))},null,8,["model-value"])),N(Le,{label:"Text size"},{default:ie(()=>[N(rn,{"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}),N(Le,{label:"Line height"},{default:ie(()=>[N(rn,{"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}),N(Le,{label:"Play speed"},{default:ie(()=>[N(rn,{"model-value":i.value.speed,min:U(ni),max:U(oi),step:U(hr),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?(b(),z("div",{key:1,class:ue(["w-full flex justify-center pt-1 duration-200",{"pointer-events-none opacity-0":!r.value,"opacity-90":r.value}])},[N(pr,{class:"w-2/3",onClick:a[4]||(a[4]=()=>o("reset"))},{default:ie(()=>[...a[5]||(a[5]=[Kt(" Reset to default ",-1)])]),_:1})],2)):ae("",!0)],64))}}),Nh=Object.freeze(Object.defineProperty({__proto__:null,default:gr},Symbol.toStringTag,{value:"Module"})),Vh={key:2,class:"mb-3 border-stone-500 border-opacity-70"},Rh={key:3,class:"flex justify-end"},Hh={class:"h-6 border border-stone-500 rounded-md cursor-pointer ml-auto inline-flex items-center"},Fh={key:4,class:"mt-5 mb-3 border-stone-500 border-opacity-70"},mr=he({__name:"DefaultPreferencesForm",props:Xe({touchDevice:{type:Boolean},doubleTapZoomAvailable:{type:Boolean},isNovel:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=st(e,"modelValue"),o=ne(!1),i=ne(!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)!==Bt.longStrip,d=l!==Bt.longStrip;if(c===d)s(a?{landscapeStyle:l}:{readerStyle:l});else{const f=d?tt.rtl:tt.vertical;s(a?{landscapeStyle:l,landscapeDirection:f}:{readerStyle:l,direction:f})}}function s(l){n.value={...n.value,...l}}return(l,a)=>(b(),z(we,null,[e.isNovel?(b(),z(we,{key:0},[N(gr,{modelValue:n.value,"onUpdate:modelValue":a[0]||(a[0]=u=>n.value=u)},null,8,["modelValue"]),N(ca,{"model-value":n.value.contrast,"onUpdate:modelValue":a[1]||(a[1]=u=>s({contrast:u}))},null,8,["model-value"])],64)):(b(),z(we,{key:1},[N(ei,{"model-value":n.value.autoPlay,label:"Auto play in long strip","onUpdate:modelValue":a[2]||(a[2]=u=>s({autoPlay:u}))},null,8,["model-value"]),e.touchDevice?(b(),se(ei,{key:0,"model-value":n.value.pinchToZoom,label:"Pinch to zoom","onUpdate:modelValue":a[3]||(a[3]=u=>s({pinchToZoom:u}))},null,8,["model-value"])):ae("",!0),e.doubleTapZoomAvailable?(b(),se(ei,{key:1,"model-value":n.value.doubleTapZoom,label:"Double tap to zoom","onUpdate:modelValue":a[4]||(a[4]=u=>s({doubleTapZoom:u}))},null,8,["model-value"])):ae("",!0),o.value?(b(),z("hr",Vh)):ae("",!0),o.value?(b(),z("div",Rh,[K("div",Hh,[He((b(),z("button",{class:ue(["focus:outline-none outline-none h-full inline-flex justify-center items-center w-14 px-3 py-0.5 rounded-l-sm",{"bg-stone-500 text-stone-50":!i.value,"text-stone-400":i.value}]),onClick:a[5]||(a[5]=()=>i.value=!1)},[N(da)],2)),[[U(At),24]]),He((b(),z("button",{class:ue(["focus:outline-none outline-none h-full inline-flex justify-center items-center w-14 px-3 py-0.5 rounded-r-sm",{"bg-stone-500 text-stone-50":i.value,"text-stone-400":!i.value}]),onClick:a[6]||(a[6]=()=>i.value=!0)},[N(ua)],2)),[[U(At),24]])])])):ae("",!0),N(Le,{label:"Style"},{default:ie(()=>[N(bt,{"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}),N(Le,{label:"Direction"},{default:ie(()=>[N(bt,{"model-value":i.value?n.value.landscapeDirection??n.value.direction:n.value.direction,items:["Vertical","Left to right","Right to left"],"onUpdate:modelValue":a[7]||(a[7]=u=>s(i.value?{landscapeDirection:u}:{direction:u}))},null,8,["model-value"])]),_:1}),o.value?(b(),z("hr",Fh)):ae("",!0),N(Le,{label:"Gap size"},{default:ie(()=>[N(bt,{"model-value":n.value.gap,items:["None","1px","2px","3px","4px","5px"],"onUpdate:modelValue":a[8]||(a[8]=u=>s({gap:u}))},null,8,["model-value"])]),_:1})],64)),N(Le,{label:"Progress size"},{default:ie(()=>[N(bt,{"model-value":n.value.progressSize/2,items:["None","2px","4px","6px","8px","10px"],"onUpdate:modelValue":a[9]||(a[9]=u=>s({progressSize:u*2}))},null,8,["model-value"])]),_:1}),N(Le,{label:"Auto next"},{default:ie(()=>[N(bt,{"model-value":n.value.autoNextSeconds,items:["None","1 sec","2 sec","3 sec","4 sec","5 sec"],"onUpdate:modelValue":a[10]||(a[10]=u=>s({autoNextSeconds:u}))},null,8,["model-value"])]),_:1}),N(Le,{label:"Hide controls"},{default:ie(()=>[N(bt,{"model-value":n.value.hideControlsEvent,items:["Never","On move","On first move","On load"],"onUpdate:modelValue":a[11]||(a[11]=u=>s({hideControlsEvent:u}))},null,8,["model-value"])]),_:1}),e.isNovel?ae("",!0):(b(),z(we,{key:2},[N(Le,{label:"Play speed"},{default:ie(()=>[N(rn,{"model-value":n.value.speed,min:U(ni),max:U(oi),step:U(hr),format:u=>`${u.toFixed(2)}x`,"onUpdate:modelValue":a[12]||(a[12]=u=>s({speed:u}))},null,8,["model-value","min","max","step","format"])]),_:1}),N(Le,{label:e.touchDevice?"Tap zones":"Click zones"},{default:ie(()=>[N(bt,{"model-value":(n.value.tapZone??-1)+1,items:["Default","None","L shaped","Kindle-ish","Edge","Right and left"],"onUpdate:modelValue":a[13]||(a[13]=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:mr},Symbol.toStringTag,{value:"Module"})),qh={},Uh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Kh(e,t){return b(),z("svg",Uh,[...t[0]||(t[0]=[K("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 so=be(qh,[["render",Kh]]),Zh=Object.freeze(Object.defineProperty({__proto__:null,default:so},Symbol.toStringTag,{value:"Module"}));var vr=(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))(vr||{});const ga={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]}},ma=he({__name:"TapZonePreview",props:{tapZone:{type:Number},direction:{type:Number}},setup(e){const t=e,{width:n,height:o}=yn(),i=Q(()=>Math.min(1.25,Math.max(.75,Math.round(n.value/o.value*100)/100))),r=Q(()=>i.value>=1),s=Q(()=>t.direction===tt.vertical),l=Q(()=>t.direction===tt.rtl),a=Q(()=>{if(!t.tapZone)return;const{prevZones:u,nextZones:c}=ga[t.tapZone];return Array.from({length:9},(d,f)=>{const p=u.includes(f),w=!p&&c.includes(f);return{isPrev:p,isNext:w,hasArrow:f===u[0]||f===c[0]}})});return(u,c)=>(b(),z("div",{class:ue(["p-2 bg-black bg-opacity-40 rounded-2xl",{"w-28":r.value,"h-28":!r.value}]),style:Te({"aspect-ratio":i.value})},[e.tapZone===U(vr).none?(b(),z("div",{key:0,class:ue(["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===U(tt).vertical,"rotate-180":e.direction===U(tt).rtl}])},[N(so)],2)):a.value?(b(),z("div",{key:2,class:ue(["w-full h-full overflow-hidden rounded-xl flex flex-wrap",{"flex-row-reverse":l.value}])},[(b(!0),z(we,null,Qt(a.value,(d,f)=>(b(),z("div",{key:`zone-${f}`,class:ue(["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?(b(),z("span",{key:0,class:"w-5 h-5 max-w-full max-h-full inline-block transform text-stone-800",style:Te({transform:`rotate(${s.value?d.isNext?90:-90:(l.value?d.isPrev:d.isNext)?0:180}deg)`})},[N(so)],4)):ae("",!0)],2))),128))],2)):(b(),z("div",{key:1,class:ue(["w-full h-full overflow-hidden rounded-xl flex flex-nowrap",{"flex-col":s.value}])},[K("div",{class:ue(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":!l.value}])},[K("span",{class:ue(["w-5 h-5 inline-block transform text-stone-800",{"-rotate-90":s.value,"rotate-180":!s.value}])},[N(so)],2)],2),c[0]||(c[0]=K("div",{class:"flex-grow w-full h-full"},null,-1)),c[1]||(c[1]=K("div",{class:"flex-grow w-full h-full"},null,-1)),K("div",{class:ue(["flex-grow w-full h-full flex justify-center items-center bg-stone-100",{"bg-opacity-50":l.value}])},[K("span",{class:ue(["w-5 h-5 inline-block text-stone-800",{"transform rotate-90":s.value}])},[N(so)],2)],2)],2))],6))}}),Yh=Object.freeze(Object.defineProperty({__proto__:null,default:ma},Symbol.toStringTag,{value:"Module"})),Xh={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 duration-200"},va=he({__name:"DirectionToast",props:{direction:{type:Number},tapZone:{type:Number}},setup(e){const t=e,n=zt(()=>sessionStorage.getItem("tk:dir")),o=ne(typeof n!="string"||+n!==t.direction),i=vt(()=>o.value=!1,1500);de(()=>[t.direction,t.tapZone],()=>{r(),o.value=!0,i()}),je(()=>{r(),i();let s;de(er(),a=>{a!=="visible"?s=Date.now():Date.now()-s>7e3&&(o.value=!0,i())})});function r(){zt(()=>{sessionStorage.setItem("tk:dir",t.direction+"")})}return(s,l)=>(b(),se(no,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ie(()=>[o.value?(b(),z("div",Xh,[N(ma,{direction:e.direction,"tap-zone":e.tapZone},null,8,["direction","tap-zone"])])):ae("",!0)]),_:1}))}}),Gh=Object.freeze(Object.defineProperty({__proto__:null,default:va},Symbol.toStringTag,{value:"Module"})),Jh={class:"flex justify-between items-end"},Qh={class:"fixed pointer-events-none left-0 right-0 bottom-0"},ba=he({__name:"GearControlsLayout",props:{visible:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(b(),z("div",{id:"controls",class:ue(["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}])},[ke(t.$slots,"default"),K("div",{class:ue(["flex gap-1 items-center relative z-30 flex-shrink-0 2xs:gap-3",{"children-pointer-events-auto":e.visible}]),style:Te({paddingTop:`${e.spaceTop||0}px`})},[ke(t.$slots,"top")],6),K("div",Jh,[K("div",{class:ue(["inline-block",{"children-pointer-events-auto":e.visible}])},[ke(t.$slots,"bottom-left")],2),K("div",{class:ue(["inline-flex flex-col items-end gap-4",{"children-pointer-events-auto":e.visible}])},[ke(t.$slots,"bottom-right")],2)]),K("div",Qh,[ke(t.$slots,"progress")])],2))}}),eg=Object.freeze(Object.defineProperty({__proto__:null,default:ba},Symbol.toStringTag,{value:"Module"})),tg='.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}}',ng={},og={class:"loading-indicator"};function ig(e,t){return b(),z("div",og)}const si=be(ng,[["render",ig],["styles",[tg]]]),rg=Object.freeze(Object.defineProperty({__proto__:null,default:si},Symbol.toStringTag,{value:"Module"})),sg={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},lg={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},br=be(he({inheritAttrs:!1,__name:"GearLayout",props:{loading:{type:Boolean},immediate:{type:Boolean},hideCursor:{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=ne(null);return t({rootEl:o}),(i,r)=>He((b(),z("dialog",sg,[K("div",{ref_key:"rootEl",ref:o,id:"gear-layout",class:ue({"cursor-none":e.hideCursor,"cursor-default":!e.hideCursor,"bg-black":e.immediate||!e.loading,"opacity-0":!e.immediate&&e.loading,"duration-200 transition-colors":!e.immediate,[`${i.$attrs.class??""}`]:!0}),style:Te(e.style??{})},[e.loading&&e.immediate?(b(),z("div",lg,[N(si)])):ae("",!0),ke(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%}"]]]),ag=Object.freeze(Object.defineProperty({__proto__:null,default:br},Symbol.toStringTag,{value:"Module"})),cg={},ug={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 56"};function dg(e,t){return b(),z("svg",ug,[...t[0]||(t[0]=[K("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 ya=be(cg,[["render",dg]]),fg=Object.freeze(Object.defineProperty({__proto__:null,default:ya},Symbol.toStringTag,{value:"Module"})),pg={},hg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function gg(e,t){return b(),z("svg",hg,[...t[0]||(t[0]=[K("g",{fill:"none"},[K("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"}),K("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 wa=be(pg,[["render",gg]]),mg=Object.freeze(Object.defineProperty({__proto__:null,default:wa},Symbol.toStringTag,{value:"Module"})),vg={key:1,class:"h-5"},xa=he({__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=Q(()=>["Long strip",n.webtoon?void 0:"Single page",n.webtoon?void 0:"Double page"].filter(Boolean)),r=Q(()=>{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)=>(b(),z(we,null,[N(Le,{label:"Style"},{default:ie(()=>[N(bt,{"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}),N(Le,{label:"Direction"},{default:ie(()=>[N(bt,{"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}),N(Le,{label:"Gap size"},{default:ie(()=>[N(bt,{"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}),N(Le,{label:"Play speed"},{default:ie(()=>[N(rn,{"model-value":e.speed,min:U(ni),max:U(oi),step:U(hr),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}),N(Le,{label:"Zoom"},{default:ie(()=>[N(rn,{"model-value":Math.ceil(e.zoom*100),min:U(ii)*100,max:U(ri)*100,step:U(zh)*100,format:c=>`${Math.ceil(c)}%`,"onUpdate:modelValue":s},null,8,["model-value","min","max","step","format"])]),_:1}),e.enableReset?(b(),z("div",{key:0,class:ue(["w-full flex justify-center pt-1 duration-200",{"pointer-events-none opacity-0":!r.value,"opacity-90":r.value}])},[N(pr,{class:"w-2/3",onClick:l},{default:ie(()=>[...u[4]||(u[4]=[Kt(" Reset to default ",-1)])]),_:1})],2)):(b(),z("div",vg))],64))}}),bg=Object.freeze(Object.defineProperty({__proto__:null,default:xa},Symbol.toStringTag,{value:"Module"})),_a=he({__name:"PageNav",props:Xe({disabled:{type:Boolean},pages:{type:Array},totalImgs:{type:Number}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=st(e,"modelValue"),o=Q(()=>t.pages.map(a=>a.map(({index:u})=>`${u+1}`).join("-"))),i=Q(()=>{const a=n.value,u=t.pages.findIndex(c=>c.some(({index:d})=>d===a));return u===-1?t.pages.length-1:u}),r=Q(()=>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)=>(b(),se(dr,{"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"]))}}),yg=Object.freeze(Object.defineProperty({__proto__:null,default:_a},Symbol.toStringTag,{value:"Module"})),yr=be(he({__name:"PauseToast",props:{playing:{type:Boolean}},setup(e){const t=e,n=ne(0);return de(()=>t.playing,()=>{n.value=Date.now()}),(o,i)=>n.value?(b(),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?(b(),se(lr,{key:0})):(b(),se(sr,{key:1}))])):ae("",!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)}}"]]]),wg=Object.freeze(Object.defineProperty({__proto__:null,default:yr},Symbol.toStringTag,{value:"Module"})),xg=30,wr=be(he({__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=Q(()=>Math.floor(t.value)+1),o=Q(()=>`${Math.max(2,Math.min(10,t.height))}px`),i=yn().width,r=Q(()=>t.total!==void 0&&i.value/t.total>=xg);return(s,l)=>(b(),z("div",{class:ue(["rprog",{"rprog--rtl":e.rtl}]),style:Te({height:o.value,opacity:e.opacity??.8})},[r.value?(b(!0),z(we,{key:0},Qt(e.total,a=>(b(),z("span",{key:a,class:ue(["rprog__item",{"rprog__item--active":n.value===a}]),style:Te(!e.longStrip||n.value!==a?{}:{"--portion":`${e.value%1*100}%`})},null,6))),128)):(b(),z("div",{key:1,style:Te({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)}']]]),_g=Object.freeze(Object.defineProperty({__proto__:null,default:wr},Symbol.toStringTag,{value:"Module"})),li=[];function Sg(e){li.push(e),gt(()=>{const t=li.indexOf(e);t!==-1&&li.splice(t,1)})}function kg(e,t){const{innerWidth:n,innerHeight:o}=window,i=e*n,r=t*o;li.forEach(s=>s(i,r))}const Sa=he({__name:"GesturesContainer",props:{spaceTop:{type:Number},controlsVisible:{type:Boolean},zoom:{type:Number},zooming:{type:Boolean},pinchToZoome:{type:Boolean},doubleTapZoom:{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=ne(null),s=ne(Math.min(ri,Math.max(ii,o.zoom))),l=ne(!1),a=ne(!1),u={isZoomIn:!1,isZoomOut:!1,initial:void 0};t({rootEl:r}),de(()=>o.zoom,T=>J(T)),je(()=>{if(o.touchDevice?kt(r,"touchstart",S):(kt(r,"mousedown",p),kt(window,"wheel",C)),!navigator.userAgent.toLowerCase().includes("android")){Sg((x,q)=>{if(o.busy)return;const oe=r.value;!oe||W(oe,x,q)||!o.doubleTapZoom||L(x,q)});return}}),Dt({onKeyDown:T=>{var x;if(!o.busy&&((x=r.value)==null||x.focus(),!(T.key==="Meta"||T.key==="Control")&&(T.ctrlKey||T.metaKey)))switch(T.key){case"0":J(1);break;case"-":J(s.value-.2),T.preventDefault();break;case"=":case"+":J(s.value+.2),T.preventDefault();break}},onKeyUp:T=>{o.zooming&&!(T.ctrlKey||T.metaKey)&&Y()}});function c(T){a.value!==T&&(a.value=T,T?o.playController.pause():(i("dragEnd"),o.playController.resume()))}let d={x:0,y:0},f={x:0,y:0};function p(T){if(T.button!==0)return;const x=r.value;x&&(d={x:T.clientX,y:T.clientY},f={x:x.scrollLeft,y:x.scrollTop},window.addEventListener("mousemove",w),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",w),setTimeout(()=>c(!1))},{once:!0}),T.preventDefault(),T.stopPropagation())}function w(T){const x=T.clientX-d.x,q=T.clientY-d.y;if(!a.value&&Math.abs(x)<.5&&Math.abs(q)<.5)return;c(!0);const oe=r.value;oe&&(oe.scrollLeft=f.x-x,oe.scrollTop=f.y-q)}let g={distance:0,zoom:s.value,x:0,y:0},O=!1;function S(T){o.busy||(O=o.pinchToZoome&&T.touches.length===2,O&&(i("update:zooming",!0),c(!0),T.stopPropagation(),T.preventDefault(),g={distance:B(T),zoom:s.value,x:(T.touches[0].clientX+T.touches[1].clientX)/2,y:(T.touches[0].clientY+T.touches[1].clientY)/2}),(O||o.longStrip&&o.playController.isPlaying.value)&&window.addEventListener("touchend",A,{once:!0}))}function A(){var oe;if(O=!1,o.zooming){c(!1),Y();return}if(!a.value)return;const T=vt(()=>{var Z;c(!1),(Z=r.value)==null||Z.removeEventListener("scroll",q)},200),x=setTimeout(T,200);(oe=r.value)==null||oe.addEventListener("scroll",q);function q(){clearTimeout(x),T()}}function F(T){if(!O&&!(o.longStrip&&o.playController.isPlaying.value)||(c(!0),!o.zooming)||(T.stopPropagation(),T.preventDefault(),T.touches.length<2))return;const q=B(T)/g.distance;X(Math.ceil(q*g.zoom*100)/100,g)}const k=vt(()=>l.value=!1,100);let m=!1;const P=vt(()=>{m=!1},30);function C(T){if(o.busy)return;let x=o.zooming;if(m||(m=!0,x=T.ctrlKey||T.metaKey,x&&i("update:zooming",!0)),P(),x){T.stopPropagation(),T.preventDefault();const q=Math.ceil((s.value+T.deltaY*-.01)*100)/100;X(q,{x:T.clientX,y:T.clientY});return}o.horizontal&&(l.value||(l.value=!0),k(),T.deltaY&&(r.value&&(r.value.scrollLeft+=T.deltaY*(o.rtl?-1:1)),T.stopPropagation()))}function B(T){return Math.hypot(T.touches[0].clientX-T.touches[1].clientX,T.touches[0].clientY-T.touches[1].clientY)}const y={x:0,y:0,ts:0};function I(T){if(a.value||o.zooming)return;const x=r.value;if(!x||W(x,T.clientX,T.clientY)||(i("click"),o.playController.isPlaying.value))return;const{clientX:q,clientY:oe}=T,{x:Z,y:j,ts:Ee}=y;y.x=q,y.y=oe,y.ts=new Date().getTime();const xe=y.ts-Ee;xe>250||xe<10||Math.abs(Z-q)>40||Math.abs(j-oe)>40||(y.ts=0,y.x=0,y.y=0,L(q,oe))}function W(T,x,q){if(o.playController.isPlaying.value)return!1;const oe=o.tapZone;if(oe===vr.none)return!1;const Z=o.controlsVisible?o.spaceTop:0,j=T.clientHeight-Z,Ee=Math.max(0,q-Z),xe=o.horizontal?T.clientWidth:j;let fe=!1,ve=!1;if(oe){const{prevZones:ye,nextZones:Be}=ga[o.tapZone],at=Math.floor(Ee/j*3);let $e=Math.floor(x/T.clientWidth*3);o.rtl&&($e=2-$e);const Lt=at*3+$e;fe=ye.includes(Lt),ve=!fe&&Be.includes(Lt)}else{const Be=(o.horizontal?o.rtl?xe-x:x:Ee)/xe,at=o.horizontal?.2:.15;fe=Be<=at&&o.pageIndex>0,ve=!fe&&Be>=1-at}if(!fe&&!ve)return!1;if(o.longStrip){const ye=(fe?-1:1)*.75*xe;o.horizontal?T.scrollLeft=T.scrollLeft+(o.rtl?-1:1)*ye:T.scrollTop=Math.max(0,T.scrollTop+ye)}else fe?i("prev"):ve&&i("next");return!0}async function L(T,x){const q=s.value===1?2:1;await J(q,{x:T,y:x}),Y()}function Y(){i("update:zooming",!1),u.initial=void 0,u.isZoomIn=!1,u.isZoomOut=!1}function $(){if(u.initial)return;const T=r.value;if(!T)return;const x=T.querySelector(`[data-index="${o.pageIndex}"],[data-index2="${o.pageIndex}"]`)??void 0;x&&(u.initial={el:x,rect:x.getBoundingClientRect()})}function X(T,x){if(u.isZoomIn=u.isZoomIn||!u.isZoomOut&&T>1,u.isZoomIn&&T<1){J(1,x);return}if(u.isZoomOut=u.isZoomOut||!u.isZoomIn&&T<1,u.isZoomOut&&T>1){J(1,x);return}J(T,x)}async function J(T,x){const q=r.value,oe=Math.min(ri,Math.max(ii,T));if(!q||s.value===oe)return;$();const{initial:Z}=u;if(!Z)return;const j=(x==null?void 0:x.x)??q.clientWidth/2,Ee=(x==null?void 0:x.y)??q.clientHeight/2;s.value=oe,i("update:zoom",oe),await pt();const{el:xe,rect:fe}=Z,ve=xe.offsetWidth/fe.width,ye=xe.offsetHeight/fe.height;q.scrollLeft=xe.offsetLeft-fe.left*ve+j*(ve-1),q.scrollTop=xe.offsetTop-fe.top*ye+Ee*(ye-1)}return(T,x)=>(b(),z("div",{ref_key:"rootEl",ref:r,tabindex:"0",class:ue(["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:Te({"font-size":`${s.value}px`}),onClick:Ne(I,["stop"]),onTouchmoveCapture:Ne(F,["stop"])},[ke(T.$slots,"default")],38))}}),Cg=Object.freeze(Object.defineProperty({__proto__:null,default:Sa},Symbol.toStringTag,{value:"Module"})),Tg=["src"],xr=he({inheritAttrs:!1,__name:"ReaderImg",props:{src:{type:null},style:{type:Object}},setup(e){const t=e;let n;const o={mounted:i=>{if(t.src instanceof HTMLElement){const r=t.src.getBoundingClientRect();n=document.createElement("div"),n.style.setProperty("width",`${r.width}px`),n.style.setProperty("height",`${r.height}px`),t.src.replaceWith(n),i.appendChild(t.src)}},beforeUnmount:i=>{const r=i.children[0];n&&r&&(n.replaceWith(r),n=void 0)}};return(i,r)=>typeof e.src=="string"?(b(),z("img",{key:0,src:e.src,class:ue(i.$attrs.class??""),style:Te(e.style)},null,14,Tg)):He((b(),z("div",{key:1,class:ue(i.$attrs.class??""),style:Te(e.style)},null,6)),[[o]])}}),Pg=Object.freeze(Object.defineProperty({__proto__:null,default:xr},Symbol.toStringTag,{value:"Module"}));function _r(e,t){return(e==null?void 0:e.querySelector(`[data-index="${t}"],[data-index2="${t}"]`))??void 0}const Ig=["data-index"],Eg={key:0,class:"rbod__page rbod__page--loading"},Mg=["data-index"],ka=be(he({__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},doubleTapZoom:{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=ne(null),s=Q(()=>{var m;return(m=r.value)==null?void 0:m.rootEl});t({rootEl:s});const l=yn(),a=Q(()=>{const{width:m,height:P}=l,C=o.isLongStrip?o.isVertical?m.value:P.value:Math.min(m.value,P.value);return Math.min(4,Math.max(1,Math.ceil(C/400-1)))*o.gap}),u=ne(o.isLongStrip?{min:o.pageIndex-1,max:o.pageIndex}:A()),c=ne(o.pageIndex-1),d=Q(()=>{const{min:m,max:P}=u.value,C={};for(let B=m;B<=P;B++)C[B]=!0;return C}),f=ne(w()),p=on(()=>{f.value=w(),pt(()=>O())},100);de(l.width,p),de(l.height,p),de(()=>o.pages,p),de(()=>o.isLongStrip,p),de(()=>o.isVertical,p);function w(){const m=l.width.value,P=l.height.value,{pages:C,isLongStrip:B,isVertical:y}=o;return C.map(I=>{var q;const W=I.some(oe=>!oe.img),L=I.map(oe=>oe.index),Y={isLoading:W,indexes:L,visible:!1};if(W)return Y;const $=I.map(({img:oe})=>oe).filter(Boolean);if(!$.length||(Y.srcs=$.map(({src:oe})=>oe),$.every(oe=>oe.hasError)))return Y;const J=(q=$.find(oe=>!oe.hasError))==null?void 0:q.size;if(!J)return Y;const T=$.reduce((oe,Z)=>{var j;return oe+(((j=Z.size)==null?void 0:j.width)??J.width)},0),x=$.reduce((oe,Z)=>{var j;return oe+(((j=Z.size)==null?void 0:j.height)??J.height)},0)/$.length;return B&&y||!B&&m/T<P/x?(Y.width=Math.min(m,T),Y.height=x*(Y.width/T)):(Y.height=Math.min(P,x),Y.width=T*(Y.height/x)),Y.width&&Y.height&&(Y.style={width:`${Y.width}em`,height:`${Y.height}em`}),Y})}const g=Q(()=>{const m=o.isVertical?"width":"height";return f.value.map(P=>P[m]).filter(Boolean).sort((P,C)=>C-P)[0]});je(()=>{const m=_r(s.value,o.pageIndex);m==null||m.scrollIntoView({behavior:"instant",block:"start"});let P,C=!1;Gs(()=>{P!==o.pageIndex&&(P=o.pageIndex,O(),C||(C=!0,pt(()=>i("ready"))))})});async function O(){const m=o.isLongStrip?S():A();m&&(m.min!==u.value.min||m.max!==u.value.max)&&(u.value=m,m.min<c.value&&(c.value=m.min))}function S(){var y,I;const m=Math.floor(o.page),P=_r(s.value,m);if(!P)return;const C=(y=F(P))==null?void 0:y.getAttribute("data-index"),B=(I=k(P))==null?void 0:I.getAttribute("data-index");return{min:C?parseInt(C):Math.max(0,m-2),max:B?parseInt(B):f.value.length-1}}function A(){const{pageIndex:m}=o;return{min:Math.max(0,m-(o.isDouble?5:3)),max:m+(o.isDouble?6:3)}}function F(m,P=0){const C=m.previousElementSibling;if(!C)return;const B=P+(o.isVertical?C.clientHeight:C.clientWidth);return(o.isVertical?B>l.height.value*1.5:o.isRTL?B>l.width.value*2.5:B>l.width.value*1.5)?C:F(C,B)}function k(m,P=0){const C=m.nextElementSibling;if(!C)return;const B=P+(o.isVertical?C.clientHeight:C.clientWidth);return(o.isVertical?B>l.height.value*3.5:o.isRTL?B>l.width.value*1.5:B>l.width.value*2.5)?C:k(C,B)}return(m,P)=>(b(),se(Sa,{ref_key:"gestureContainer",ref:r,"space-top":e.spaceTop,"controls-visible":e.controlsVisible,zoom:e.zoom,zooming:e.zooming,"pinch-to-zoome":e.pinchToZoome,"double-tap-zoom":e.doubleTapZoom,"tap-zone":e.tapZone,"page-index":e.pageIndex,"play-controller":e.playController,horizontal:!e.isVertical,rtl:e.isRTL,"touch-device":e.touchDevice,busy:e.busy,"long-strip":e.isLongStrip,class:ue(["rbod",{"rbod--long-strip":e.isLongStrip,"rbod--paging":!e.isLongStrip,"rbod--vertical":e.isVertical,"rbod--rtl":e.isRTL,"rbod--1page":f.value.length===1}]),style:Te({"--gap":`${a.value}em`,"--space-top":`${e.spaceTop}px`,"--screen-width-em":U(l).width.value+"em","--screen-height-em":U(l).height.value+"em",...e.isLongStrip?{"--max-size-em":g.value+"em"}:{}}),"onUpdate:zoom":P[0]||(P[0]=C=>i("update:zoom",C)),"onUpdate:zooming":P[1]||(P[1]=C=>i("update:zooming",C)),onDragEnd:P[2]||(P[2]=()=>i("dragEnd")),onClick:P[3]||(P[3]=()=>i("click")),onPrev:P[4]||(P[4]=()=>i("prev")),onNext:P[5]||(P[5]=()=>i("next"))},{default:ie(()=>[(b(!0),z(we,null,Qt(f.value,C=>{var B;return b(),z("div",Mn({key:e.direction+"_"+C.indexes[0],"data-index":C.indexes[0]},{ref_for:!0},C.indexes.length>1?{"data-index2":C.indexes[1]}:{}),[!((B=C.srcs)!=null&&B.length)||C.isLoading||c.value>C.indexes[0]?(b(),z("div",Eg,[d.value[C.indexes[0]]?(b(),se(si,{key:0})):ae("",!0)])):C.srcs.length==1?(b(),z(we,{key:1},[d.value[C.indexes[0]]?(b(),se(xr,{key:1,class:"rbod__page img",src:C.srcs[0],style:Te(C.style)},null,8,["src","style"])):(b(),z("div",{key:0,class:"rbod__page",style:Te(C.style)},null,4))],64)):(b(),z("div",{key:2,class:ue(["rbod__page rbod__page--double",{"flex-row-reverse":e.isRTL}]),style:Te(C.style)},[C.indexes.some(y=>d.value[y])?(b(!0),z(we,{key:0},Qt(C.srcs,(y,I)=>(b(),z("div",{key:typeof y=="string"?y:`${I}-${C.height}`},[N(xr,{src:y,class:"img"},null,8,["src"])]))),128)):ae("",!0)],6))],16,Ig)}),128)),K("div",{class:"last","data-index":e.totalImgs},[ke(m.$slots,"end")],8,Mg)]),_:3},8,["space-top","controls-visible","zoom","zooming","pinch-to-zoome","double-tap-zoom","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 .rbod__page--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) .rbod__page--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 .rbod__page--loading{height:100%;width:100%}.rbod--paging .rbod__page.rbod__page--double{align-items:center;background-color:transparent;display:flex;gap:var(--gap);justify-content:center}.rbod--paging .rbod__page.rbod__page--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 .rbod__page.rbod__page--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 .rbod__page,.rbod>div{margin:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none}.rbod .rbod__page{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));-o-object-fit:contain;object-fit:contain}.rbod .rbod__page--loading{align-items:center;background-color:transparent;display:flex;justify-content:center}.rbod .img canvas,.rbod .img img{height:100%;max-height:100%;max-width:100%;width:100%}"]]]),Og=Object.freeze(Object.defineProperty({__proto__:null,default:ka},Symbol.toStringTag,{value:"Module"})),$g={},Dg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function zg(e,t){return b(),z("svg",Dg,[...t[0]||(t[0]=[K("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 Ca=be($g,[["render",zg]]),Ag=Object.freeze(Object.defineProperty({__proto__:null,default:Ca},Symbol.toStringTag,{value:"Module"})),Bg={class:"flex w-full flex-shrink-0 justify-between items-center h-16 px-3"},Ta=he({__name:"BottomSheet",props:Xe({spaceTop:{type:Number}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=st(e,"modelValue"),n=ne(null),o=ne(!1),i=ne(0);Dt({onKeyDown:s});const r=Go();de(t,c=>r(c)),tr(()=>{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,w=p>0?p:0;w!=i.value&&(i.value=w);const g=w>0;g!==o.value&&(o.value=g)}async function u(){o.value=!1,l.y=-1,await pt();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)=>(b(),z("div",{class:ue(["fixed inset-0 flex flex-col items-center justify-end select-none z-40 text-stone-100",{"!pointer-events-none":!t.value}]),style:Te({"padding-top":(e.spaceTop??0)+60+"px"}),onClick:d[3]||(d[3]=()=>t.value=!1)},[N(no,{"enter-from-class":"!translate-y-full","leave-to-class":"!translate-y-full"},{default:ie(()=>[t.value?(b(),z("div",{key:0,class:ue(["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:Te(i.value?{transform:`translateY(${i.value}px)`}:{}),onClick:d[1]||(d[1]=Ne(()=>{},["stop"])),onWheelPassive:d[2]||(d[2]=Ne(()=>{},["stop"])),onTouchmove:Ne(a,["stop"]),onTouchend:u},[K("div",Bg,[N(Je,{transparent:"",onClick:d[0]||(d[0]=()=>t.value=!1)},{default:ie(()=>[N(Ca)]),_:1}),ke(c.$slots,"name"),ke(c.$slots,"actions")]),K("div",{ref_key:"scrollEl",ref:n,class:ue(["overflow-auto overscroll-none px-6 md:px-8 lg:px-10 xl:px-12 pt-1.5 pb-8 md:pb-6 flex-grow scrollbar-sm",{"overflow-hidden":o.value}]),style:{"max-height":"calc(100% - 4rem)"}},[ke(c.$slots,"default")],2)],38)):ae("",!0)]),_:3})],6))}}),Lg=Object.freeze(Object.defineProperty({__proto__:null,default:Ta},Symbol.toStringTag,{value:"Module"})),jg=["onClick","onKeyup"],Pa=be(he({__name:"TabBar",props:Xe({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=st(e,"modelValue"),o=ne(null),i=ne({width:"",left:""}),r=ne(!1);je(()=>{const l=Date.now();de(n,async a=>{var c;await pt();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)=>(b(),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:{}},[K("div",{class:ue(["bg-stone-300 h-6 rounded-2xl absolute top-1 pointer-events-none",{"duration-200":r.value}]),style:Te(i.value)},null,6),(b(!0),z(we,null,Qt(t.items,(u,c)=>He((b(),z("div",{key:c,tabindex:"0",class:ue(["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:Ne(()=>s(c),["stop"]),onKeyup:[Zo(()=>s(c),["enter"]),Zo(()=>s(c),["space"])]},[Kt(We(u),1)],42,jg)),[[U(At),30]])),128))],512))}}),[["styles",[".scrollbar-none{scrollbar-width:none}.scrollbar-none::-webkit-scrollbar{display:none}"]]]),Ng=Object.freeze(Object.defineProperty({__proto__:null,default:Pa},Symbol.toStringTag,{value:"Module"})),Vg={},Rg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Hg(e,t){return b(),z("svg",Rg,[...t[0]||(t[0]=[K("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 Ia=be(Vg,[["render",Hg]]),Fg=Object.freeze(Object.defineProperty({__proto__:null,default:Ia},Symbol.toStringTag,{value:"Module"})),Wg={},qg={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 28 28"};function Ug(e,t){return b(),z("svg",qg,[...t[0]||(t[0]=[K("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 Ea=be(Wg,[["render",Ug]]),Kg=Object.freeze(Object.defineProperty({__proto__:null,default:Ea},Symbol.toStringTag,{value:"Module"})),Zg={key:1,class:"w-full text-center text-xl whitespace-nowrap text-ellipsis flex-shrink overflow-hidden px-5 select-text"},Yg={class:"opacity-90"},Xg={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 px-4"},Sr=he({__name:"SettingsBottomSheet",props:Xe({name:{type:String},spaceTop:{type:Number},enableHelp:{type:Boolean},enableDefaultPreferences:{type:Boolean}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:Xe(["help","more"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=st(e,"modelValue"),r=ne(0),s=Q(()=>n.name??location.hostname);Dt({onKeyUp:a=>{a.key==="s"&&!a.metaKey&&!a.ctrlKey&&(i.value=!0)}}),je(()=>{de(i,a=>{a||setTimeout(()=>{r.value!==0&&(r.value=0)},300)})});function l(){o("help"),i.value=!1}return(a,u)=>(b(),se(Ta,{modelValue:i.value,"onUpdate:modelValue":u[2]||(u[2]=c=>i.value=c),"space-top":e.spaceTop},{name:ie(()=>[e.enableDefaultPreferences?(b(),se(Pa,{key:0,modelValue:r.value,"onUpdate:modelValue":u[0]||(u[0]=c=>r.value=c),items:["Preferences","Default"]},null,8,["modelValue"])):(b(),z("h3",Zg,We(s.value),1))]),actions:ie(()=>[e.enableDefaultPreferences?(b(),se(Je,{key:0,transparent:"",class:ue(e.enableHelp?"":"opacity-0 pointer-events-none"),onClick:l},{default:ie(()=>[K("span",Yg,[N(Ia)])]),_:1},8,["class"])):(b(),se(Je,{key:1,transparent:"",onClick:u[1]||(u[1]=()=>o("more"))},{default:ie(()=>[N(Ea)]),_:1}))]),default:ie(()=>[r.value===0?(b(),z(we,{key:0},[e.enableDefaultPreferences?(b(),z("h3",Xg,We(s.value),1)):ae("",!0),ke(a.$slots,"tab-preferences")],64)):(b(),z(we,{key:1},[ke(a.$slots,"tab-default"),u[3]||(u[3]=K("div",{class:"h-6"},null,-1))],64))]),_:3},8,["modelValue","space-top"]))}}),Gg=Object.freeze(Object.defineProperty({__proto__:null,default:Sr},Symbol.toStringTag,{value:"Module"}));function wn(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}))}const Jg={text:Da,attr:im,"attr-contain":rm,value:sm,row:lm,"bg-image":am,json:cm},Qg={pattern:um,remove:dm,atob:fm,json:za};function Ma(e,t){if(e)return em(e,t,nm)}function em(e,t,n){if(!e)return;const o=e.split("||").map(i=>i.trim()).filter(Boolean);for(const i of o){const r=tm(i);if(!r)continue;const s=n(document.documentElement,r);if(s)return s}}function tm(e){const[t,n,...o]=e.split("|");if(!n)return;const i=n!=null&&n.startsWith("[")&&n.endsWith("]")?n.substring(1,n.length-1).split(","):[n];return{selector:t||void 0,extractors:i.map(Oa),transformers:o.map(Oa)}}function Oa(e){const t=e.indexOf(":"),n=t!==-1;return{fn:n?e.substring(0,t):e,param:n?e.substring(t+1):""}}function nm(e,t){if(!t.selector)return $a(e,t);const n=pm(t.selector);for(const o of n){const i=Array.from(e.querySelectorAll(o));for(const r of i){const s=$a(r,t);if(s)return s}}}function $a(e,t){for(const n of t.extractors){const o=Jg[n.fn],i=o(e,n.param);if(i)return om(i,t.transformers)}}function om(e,t){var o;let n=e;for(const i of t){if(!n)return;const r=Qg[i.fn];r&&(n=(o=r(n,i.param))==null?void 0:o.trim())}return n}function Da(e){return Array.from(e.childNodes).filter(n=>n.nodeType===3).map(n=>xn(n.textContent)).filter(Boolean).join(" ").trim()||xn(e.textContent)}function im(e,t){return xn(e.getAttribute(t))}function rm(e,t){let n=e.getAttribute(t);if(!n){const o=e.getAttributeNames().find(i=>i.includes(t));o&&(n=e.getAttribute(o))}return xn(n)}function sm(e){return e.value}function lm(e,t){var i,r,s;if(!t)return;const n=(i=xn(e.textContent))==null?void 0:i.toLowerCase(),o=t.toLowerCase();if(!(n!==o&&n!==`${o}:`))return xn(((r=e.nextElementSibling)==null?void 0:r.textContent)??((s=e.nextSibling)==null?void 0:s.textContent))}function am(e){const t=getComputedStyle(e).backgroundImage;if(!(!t||!t.startsWith("url(")))return t.slice(5,-2)||void 0}function cm(e,t){const n=Da(e);if(n)return za(n,t)}function za(e,t){const n=Aa(pa(e),t),o=typeof n;if(o==="string")return xn(n)||e;if(o==="number"||o==="boolean")return n+""}function Aa(e,t){if(!e||!t)return;const n=t.indexOf("."),o=n!==-1,i=o?t.substring(0,n):t,r=o?t.substring(n+1):void 0;try{const s=e[i];return r?Aa(s,r):s}catch{return}}function xn(e){if(e)return(e==null?void 0:e.replace(/(\n|\t)/g," ").trim())||void 0}function um(e,t){if(t)try{return e.replace(new RegExp(t,"i"),"$1")}catch{}return e}function dm(e,t){if(t)try{return e.replaceAll(new RegExp(t,"gi"),"")}catch{}return e}function fm(e){try{return window.atob(e)}catch{return e}}function pm(e){const t=[];let n="",o=!1;for(let r=0;r<e.length;r++){const s=e[r];if(s==="["?o=!0:s==="]"&&(o=!1),s===","&&!o){const l=n.trim();l.length>0&&t.push(l),n=""}else n+=s}const i=n.trim();return i.length>0&&t.push(i),t}function kr(e,t){const n=t??document;if(e.startsWith("//")){const i=document.evaluate(e,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue;return i instanceof HTMLElement?i:void 0}return n.querySelector(e)??void 0}function _n(e=0){return new Promise(t=>setTimeout(t,e))}const Cr={};async function Tr(e){hm();const t=(()=>{const r=e.width,s=e.height;if(r&&s)return{width:r,height:s};const l=e.getBoundingClientRect();return{width:l.width,height:l.height}})(),n=await Ba(e);if(n)return{size:t,src:n};const o=gm(e);if(!o)return;const i=await Ba(o);if(i)return{size:t,src:i}}function hm(){var o,i;if(Cr.toBlob)return;const e=document.createElement("template");e.innerHTML="<iframe></iframe>";const t=e.content.querySelector("iframe");t&&(t==null||t.style.setProperty("style","none"),document.body.appendChild(t));const n=(i=(o=t==null?void 0:t.contentWindow)==null?void 0:o.HTMLCanvasElement)==null?void 0:i.prototype;Cr.toBlob=(n==null?void 0:n.toBlob)??HTMLCanvasElement.prototype.toBlob,t&&document.body.removeChild(t)}function gm(e){var o;const t=e.cloneNode(),n=(o=t.getContext)==null?void 0:o.call(t,"2d");if(n){try{n.drawImage(e,0,0)}catch{return}return t}}function Ba(e){return new Promise(t=>{const n=o=>{if(!o)return t(void 0);const i=URL.createObjectURL(o);t(i)};try{Cr.toBlob.call(e,n,"image/jpeg",1)}catch{t(void 0)}})}async function La({src:e,onSize:t,resolveOnSizeDetected:n}){return new Promise(o=>{const i=new Image;let r=!1,s;const l=setInterval(()=>{const{naturalWidth:a,naturalHeight:u}=i;if(u&&a)if(clearInterval(l),bn(a,u)){s={width:a,height:u};const c={src:e,size:s};t==null||t(c),n&&o(c)}else i.onload=()=>{},r=!0,o(void 0)},20);i.onerror=()=>{clearInterval(l),o({src:e,hasError:!0})},i.onload=()=>setTimeout(()=>!r&&o(s?{src:e,size:s}:void 0),30),i.src=e})}let ai;async function ja({el:e,src:t,onSize:n,resolveOnSizeDetected:o}){if(t.startsWith("blob:")){const r=await mm(e,t);return r&&(n==null||n(r)),r}if((e==null?void 0:e.src)===t&&e.naturalWidth&&e.naturalHeight){const r={width:e.naturalWidth,height:e.naturalHeight};if(bn(r.width,r.height)){const s={src:t,size:r};return n==null||n(s),o||e.complete||await mt(150,100,()=>e.complete||void 0),s}return}return await La({src:t,onSize:n,resolveOnSizeDetected:o})}async function mm(e,t){const n=e.complete,o=n?e.naturalWidth:e.width,i=n?e.naturalHeight:e.height;if(n&&!bn(o,i))return;if(ai===void 0)try{(await fetch(t)).ok&&(ai=!0)}catch{}if(!ai)ai=!1;else return{src:t,size:{width:o,height:i}};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 Tr(r)}async function Na(e){const{lstrip:t,lstripBtn:n}=e||{};if(!t||!n||!!kr(t))return!1;const i=n.split(";");for(const r of i)if(!await vm(r.trim()))return!1;return!0}async function vm(e){const t=await mt(50,30,()=>kr(e));return t?(wn(t),await _n(),!0):!1}function Pr(e){return Array.from(e.querySelectorAll("img:not(nav img, header img, footer img, aside img),canvas"))}class Va{constructor(){re(this,"id",0)}dispose(){this.id++}async run(t){const n=++this.id;await t(()=>n!==this.id)}}class Ir{constructor(t){re(this,"initialPage");re(this,"onInitialPageChanged");re(this,"onAsyncImgsChanged");this.initialPage=t.initialPage,this.onInitialPageChanged=t.onInitialPageChanged,this.onAsyncImgsChanged=t.onAsyncImgsChanged}}class bm extends Ir{constructor(n){super(n);re(this,"asyncImgs",[]);re(this,"contentSel");re(this,"contentEl");re(this,"pagingSpec");re(this,"currentPageIndex",0);re(this,"isDisposed",!1);re(this,"allDownloaded",!1);re(this,"downloadingIndex");re(this,"onError");re(this,"imgsCache",new Map);re(this,"canvasCache",new Map);re(this,"onPageChangedSingleThread",new Va);re(this,"onAsyncImgsChangedThrottled");this.contentSel=n.contentSel,this.pagingSpec=n.pagingSpec,this.onError=n.onError,this.onAsyncImgsChangedThrottled=on(o=>o.length&&n.onAsyncImgsChanged(o),50),(async()=>{if(await Na(n.spec),this.isDisposed)return;const o=await mt(200,50,()=>{const r=ci(n.pagingSpec.current);return r&&r>0?r-1:void 0});if(o===void 0){n.onError();return}if(this.isDisposed||(this.currentPageIndex=o,await this.observeTotal(),this.isDisposed))return;const i=n.initialPage!==void 0?Math.min(this.asyncImgs.length-1,n.initialPage):o;n.initialPage!==i&&n.onInitialPageChanged(i),await this.downloadCurrentPages(Math.floor(i))})()}dispose(n){if(this.isDisposed=!0,this.onPageChangedSingleThread.dispose(),n!==void 0){const o=this.findPageBtn(Math.floor(n));o&&wn(o)}}onPageIndexChanged(n,o){this.downloadCurrentPages(o)}setAsyncImgs(n){this.asyncImgs=Array.from({length:n}).map((o,i)=>o??this.asyncImgs[i]),this.allDownloaded=this.asyncImgs.every(Boolean)}async observeTotal(){let n=await mt(100,50,()=>{const r=ci(this.pagingSpec.total);return r&&r<2e3?r:void 0});if(!n){this.onError();return}this.setAsyncImgs(n);let o=0;const i=setInterval(()=>{if(this.isDisposed){clearInterval(i);return}const r=ci(this.pagingSpec.total);if(!r||n===r){o=0;return}n=r,this.onTotalChanged(r),++o===50&&clearInterval(i)},200)}onTotalChanged(n){this.setAsyncImgs(n),this.onAsyncImgsChangedThrottled(this.asyncImgs),this.downloadCurrentPages(this.currentPageIndex)}async downloadCurrentPages(n){this.allDownloaded||this.downloadingIndex!==n&&(this.downloadingIndex=n,await this.onPageChangedSingleThread.run(async o=>{const i=[n-1,n+3,n+2,n+1,n];for(const r of i)if(!(r<0||r>=this.asyncImgs.length)&&(await this.navigateToPage(r,o),o()||r!==this.currentPageIndex||(await this.downloadPageImg(this.currentPageIndex,o),o())))return;this.downloadingIndex=void 0}))}async navigateToPage(n,o){if(n===this.currentPageIndex)return;const i=this.findPageBtn(n);if(i&&(await this.clickNavigateBtn(i,n,o),o()||this.currentPageIndex===n))return;const{prevBtn:r,nextBtn:s}=this.pagingSpec;if(!r||!s)return;const l=n-this.currentPageIndex>0,a=l?s:r,u=document.querySelector(a);if(!u)return;const c=this.currentPageIndex+(l?1:-1);await this.clickNavigateBtn(u,c,o),!(o()||this.currentPageIndex!==c)&&await this.navigateToPage(n,o)}async clickNavigateBtn(n,o,i){for(let r=0;r<20;r++){wn(n);for(let s=0;s<6;s++){await _n(50);const l=ci(this.pagingSpec.current);if(l&&(this.currentPageIndex=l-1,this.currentPageIndex===o)||i())return}}}async downloadPageImg(n,o){var r;const i=await this.findContentEl();if(!(o()||!i))for(let s=0;s<400;s++){const l=(r=this.pagingSpec)==null?void 0:r.img,a=l?i.querySelector(l):Pr(i).find(c=>$n(c,i)&&bn(c.width,c.height));if(!a){if(await _n(50),o())return;continue}const u=await this.downloadImageEl(a,n,o);if(o())return;(u!=null&&u.size||u!=null&&u.hasError)&&this.setAsyncImg(n,u);break}}async findContentEl(){if(this.contentEl&&this.contentEl.isConnected)return this.contentEl;const n=this.contentSel;if(n)return await mt(100,10,()=>{for(const o of n.split(",")){const i=document.querySelector(o);if(i)return this.contentEl=i,i}})}setAsyncImg(n,o){n>=0&&n<this.asyncImgs.length&&o!==this.asyncImgs[n]&&(this.asyncImgs.splice(n,1,o),this.onAsyncImgsChangedThrottled([...this.asyncImgs]))}async downloadImageEl(n,o,i){if(n instanceof HTMLCanvasElement){const l=this.canvasCache.get(n);if(l)return l;const a=await Tr(n);return a&&this.canvasCache.set(n,a),a}let r,s=0;for(let l=0;l<300;l++){const a=n.src,u=await(async()=>{const c=this.imgsCache.get(a);if(c){if(r!==a&&(r=a,s=0),(c==null?void 0:c.index)!==o){if(++s<10)return;this.imgsCache.set(a,{...c,index:o})}return c.asyncImg}const d=await ja({el:n,src:a,resolveOnSizeDetected:!0});return this.imgsCache.set(a,{index:o,asyncImg:d}),d})();if(!u){if(await _n(100),i())return;continue}return u}}findPageBtn(n,o){const{pageBtn:i}=this.pagingSpec;if(i)return o!=null&&o.isConnected?o:kr(i.replaceAll("{page}",`${n+1}`),document.body)}}function ci(e,t){return ym(Ma(e,t))}function ym(e){if(e)return parseInt(e.replace(/\D*/,""))||void 0}function wm(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}const xm=3;class Ra{constructor(t){re(this,"download");re(this,"key");re(this,"threads");re(this,"runningItems",[]);re(this,"completedItems");re(this,"promisesMap",new Map);this.download=t.download,this.key=t.key}dispose(){var t;(t=this.threads)==null||t.dispose(),this.threads=void 0,this.completedItems=void 0}run(t){var s;const{activeIndex:n}=t;t.items&&(this.runningItems=t.items);const o=this.runningItems;if(this.completedItems===o)return;this.completedItems=void 0,(s=this.threads)==null||s.dispose();let i=Math.max(0,n-1),r=!0;this.threads=new _m(xm,()=>{const l=o[i];if(!l){this.completedItems=o;return}r&&i===o.length-1?(r=!1,i=n-2):r?i++:i--;const a=this.key?this.key(l):l;if(a){const u=this.promisesMap.get(a);if(u)return u;const c=this.download(l,a);return this.promisesMap.set(a,c),c}}),this.threads.exec()}}class _m{constructor(t,n){re(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 _n(20),this.next())}}function Sm(e,t){let n;return()=>{n&&clearTimeout(n),n=setTimeout(()=>{e(),n=void 0},t)}}class Er{constructor(t){re(this,"callback");re(this,"isDisposed",!1);re(this,"unobserveMap",new Map);this.callback=t}dispose(){this.isDisposed=!0,this.clear()}clear(){for(const t of this.unobserveMap.values())t()}observe(t){if(this.unobserveMap.has(t.el))return;const n=this.observeInternal(t,()=>{!this.isDisposed&&this.unobserveMap.has(t.el)&&this.callback(t)});this.unobserveMap.set(t.el,n)}unobserve(t){var n;(n=this.unobserveMap.get(t.el))==null||n(),this.unobserveMap.delete(t.el)}}class km extends Er{observeInternal({el:t},n){const o=t.getContext("2d");if(!o)return()=>{};const i=o.drawImage.bind(o),r=o.putImageData.bind(o),s=Sm(()=>{n()},120),l=(a,u,c)=>(s(),Reflect.apply(a,u,c));try{o.drawImage=new Proxy(i,{apply:l}),o.putImageData=new Proxy(r,{apply:l})}catch{}return()=>{try{o.drawImage=i,o.putImageData=r}catch{}}}}class Cm{constructor(t,n){re(this,"contentEl",document.body);re(this,"contentSel");re(this,"cb");re(this,"isDisposed",!1);this.contentSel=t,this.cb=n}dispose(){this.isDisposed=!0}async load(t){const n=this.contentSel;if(!n){this.cb(document.body);return}let o=await mt(t?100:1,10,()=>{for(const s of n.split(",")){const l=document.querySelector(s);if(l)return l}});if(!o)return;this.contentEl=o,this.cb(o);let i=0;const r=async()=>{if(!this.isDisposed&&!(o!=null&&o.isConnected)){if(i=0,o=await mt(50,20,()=>{const s=document.querySelector(n);return s!=null&&s.isConnected&&s!==o?s:void 0}),!o||o===this.contentEl)return;this.contentEl=o,this.cb(o)}!this.isDisposed||++i>=10||setTimeout(r,200)};setTimeout(r,200)}}class Tm extends Er{observeInternal(t,n){const o=()=>{n(),this.unobserve(t)};return t.el.addEventListener("load",o),()=>t.el.removeEventListener("load",n)}}class Pm extends Er{observeInternal({el:t},n){let o=t.getAttribute("src");const i=new MutationObserver(r=>{r.some(l=>{if(l.attributeName!=="src")return!1;const a=o;return o=t.getAttribute("src"),!!o&&a!==o})&&n()});return i.observe(t,{attributes:!0}),()=>i.disconnect()}}function Ha(e,t){const n=(o,i)=>{if(!o)return;const{offsetTop:r,offsetParent:s}=o;if(s&&r&&i.set(s,Math.max(i.get(s)??0,r)),!(o===t||o.scrollHeight-o.clientHeight>=10&&window.getComputedStyle(o).overflow!=="visible"))return n(o.parentElement,i);let a=0;return i.forEach((u,c)=>{a+=c===s?u-r:u}),{el:o,top:a}};return n(e,new Map)}const ui="mp-scroll-container";class Im{constructor(){re(this,"scrollEl")}dispose(){var t;(t=this.scrollEl)==null||t.classList.remove(ui)}scrollTo({rawImages:t,page:n,skipIfVisible:o,isScrollDown:i,isScrollExact:r,fallbackScrollEl:s}){var O;const l=Math.floor(n),a=t[Math.min(t.length-1,l)];if(!a)return;const u=a.el??a.parentEl;if(!u)return;const c=u.getBoundingClientRect();if(o&&c.top<=0&&c.top+c.height>0)return;const d=Ha(u,s);if(!d)return;const{el:f,top:p}=d;s!==document.documentElement&&!f.classList.contains(ui)&&(f!==this.scrollEl&&((O=this.scrollEl)==null||O.classList.remove(ui),this.scrollEl=f),f.classList.add(ui));const w=n>=t.length?c.height:r?n%1*c.height:i?Math.max(0,c.height-window.innerHeight/2):-window.innerHeight/2,g={top:p+w,behavior:"instant"};f.scrollTo(g),f!==document.documentElement&&document.documentElement.scrollTo(g)}}function Em(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)}class Mm extends Ir{constructor(n){var s,l;super(n);re(this,"spec");re(this,"rawImages",[]);re(this,"validRawImages",[]);re(this,"isDisposed",!1);re(this,"loadRawImagesThread",new Va);re(this,"isRawImagesLoadedOnce",!1);re(this,"isScrolledOnce",!1);re(this,"currentPageIndex");re(this,"isIOS");re(this,"asyncImgsMap",new Map);re(this,"disconnectObservers");re(this,"submitAsyncImgsThrottled");re(this,"contentElLoader");re(this,"imgLoadOnceObserver",new Tm(()=>this.reloadRawImages()));re(this,"autoDownloadQueue",new Ra({download:(n,o)=>this.downloadImageEl({el:o,parentEl:n.parentEl}),key:n=>n.el}));re(this,"scroller",new Im);re(this,"canvasObserver",new km(n=>{this.downloadImageEl(n)}));re(this,"imgSrcObserver",new Pm(n=>{this.downloadImageEl(n)}));re(this,"reloadRawImages",vt(()=>{this.loadRawImages(this.contentElLoader.contentEl)},100));this.spec=n.spec,this.isIOS=n.isIOS,this.submitAsyncImgsThrottled=on(a=>{this.submitAsyncImgs(),a==null||a()},50);const o=new MutationObserver(this.reloadRawImages),i=(s=this.spec)!=null&&s.imgDivs?void 0:(()=>{let a=window.innerWidth;return new ResizeObserver(vt(()=>{const u=window.innerWidth;if(u!==a){a=u;return}this.reloadRawImages()},50))})();this.disconnectObservers=async()=>{o.disconnect(),i==null||i.disconnect()};let r=!1;this.contentElLoader=new Cm((l=this.spec)==null?void 0:l.content,a=>{o.disconnect(),i==null||i.disconnect(),o.observe(a,{childList:!0,subtree:!0}),i==null||i.observe(a),r?this.reloadRawImages():(r=!0,this.loadRawImages(a))}),this.loadContentEl()}dispose(n){var o;this.isDisposed=!0,(o=this.disconnectObservers)==null||o.call(this),this.disconnectObservers=void 0,this.contentElLoader.dispose(),this.loadRawImagesThread.dispose(),this.imgLoadOnceObserver.dispose(),this.autoDownloadQueue.dispose(),this.canvasObserver.dispose(),this.imgSrcObserver.dispose(),n!==void 0&&this.scroller.scrollTo({rawImages:this.validRawImages,page:n,fallbackScrollEl:document.documentElement,isScrollExact:!0}),this.scroller.dispose()}onPageIndexChanged(n,o){this.currentPageIndex=o,this.scroller.scrollTo({rawImages:this.validRawImages,page:o,isScrollDown:!this.isScrolledOnce||n===void 0||o>n||this.validRawImages.length===1,fallbackScrollEl:this.isIOS?document.body:document.documentElement}),this.isScrolledOnce=!0,this.autoDownloadQueue.run({activeIndex:this.currentPageIndex})}onRawImagesLoaded(n){var o,i,r;if(this.rawImages=n,!this.isRawImagesLoadedOnce){this.isRawImagesLoadedOnce=!0;const s=this.initialPage!==void 0?Math.min(n.length-1,this.initialPage):Dm(n);if(this.currentPageIndex=Math.floor(s),this.initialPage!==s&&this.onInitialPageChanged(s),(o=this.spec)!=null&&o.imgDivs){const l=this.currentPageIndex>0&&!((i=n[this.currentPageIndex-1])!=null&&i.el),a=(r=n[this.currentPageIndex])==null?void 0:r.el;(l||!a)&&this.scroller.scrollTo({rawImages:n,page:l?s-1:s,isScrollDown:!0,skipIfVisible:!0,fallbackScrollEl:this.isIOS?document.body:document.documentElement})}}this.submitAsyncImgsThrottled(()=>{this.currentPageIndex!==void 0&&this.autoDownloadQueue.run({activeIndex:this.currentPageIndex,items:this.validRawImages})})}submitAsyncImgs(){const n=[],o=[];this.rawImages.forEach(i=>{let r=i.el?this.asyncImgsMap.get(i.el):void 0;!r&&i.parentEl&&(r=this.asyncImgsMap.get(i.parentEl)),(r||i.parentEl||i.el&&!this.asyncImgsMap.has(i.el))&&(n.push(r),o.push(i))}),this.validRawImages=o,this.onAsyncImgsChanged(n)}onImageElDownloaded(n,o,i){this.asyncImgsMap.set(n,i),o&&this.asyncImgsMap.set(o,i),this.submitAsyncImgsThrottled()}async downloadImageEl({el:n,parentEl:o}){if(n instanceof HTMLCanvasElement){this.canvasObserver.observe({el:n,parentEl:o});const r=await Tr(n);if(!r||this.isDisposed)return;this.onImageElDownloaded(n,o,r);return}this.imgSrcObserver.observe({el:n,parentEl:o});const i=Em(n);for(let r=0;r<i.length;r++){const s=i[r],l=await ja({el:n,src:s,onSize:a=>{this.onImageElDownloaded(n,o,a)}});if(l!=null&&l.size)break;l!=null&&l.hasError&&r===i.length-1&&this.onImageElDownloaded(n,o,l)}}setRawImages(n){let o=!1;const i=n.map((r,s)=>{const l=this.rawImages[s];return l&&l.parentEl===r.parentEl&&(l.el===r.el||l.parentEl&&l.el&&!r.el)?l:(o=!0,r)});(o||i.length!==this.rawImages.length)&&this.onRawImagesLoaded(i)}async loadContentEl(){const n=await Na(this.spec);this.isDisposed||this.contentElLoader.load(n)}async loadRawImages(n){this.isDisposed||!n.isConnected||await this.loadRawImagesThread.run(async o=>{var s;const i=(s=this.spec)==null?void 0:s.imgDivs,r=i?this.loadFromImgDivs(n,i):this.loadFromContentEl(n);o()||this.isDisposed||!n.isConnected||this.setRawImages(r)})}loadFromImgDivs(n,o){const i=wm(o,n);return i.length?i.map(s=>{const l=Pr(s).find(a=>this.validateImageEl(a,s));return{parentEl:s,el:l}}):this.loadFromContentEl(n)}loadFromContentEl(n){const o=[];return Pr(n).forEach(r=>{this.validateImageEl(r,n)&&o.push({el:r})}),o}validateImageEl(n,o){const i=$n(n,o);return n instanceof HTMLImageElement?!i||!$m(n)?(this.imgLoadOnceObserver.observe({el:n}),!1):!0:i&&Om(n)}}function Om(e){return e.isConnected&&bn(e.width,e.height)}function $m(e){if(!e.isConnected)return!1;const t=e.getBoundingClientRect();return!t.width&&!e.naturalWidth||!t.height&&!e.naturalHeight||bn(t.width,t.height)}function Dm(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}class zm extends Ir{constructor(n){super(n);re(this,"srcs");re(this,"queue");re(this,"isDisposed",!1);this.srcs=n.srcs;const o=n.initialPage!==void 0?Math.min(n.srcs.length-1,n.initialPage):this.getInitialPage();n.initialPage!==o&&this.onInitialPageChanged(o);const i=new Map,r=on(()=>{if(!this.isDisposed){const s=[];n.srcs.forEach(l=>{const a=i.get(l);(a||!i.has(l))&&s.push(a)}),this.onAsyncImgsChanged(s)}},50);r(),this.queue=new Ra({download:async s=>La({src:s,onSize:l=>{i.set(s,l),r()}}).then(l=>{l!=null&&l.size||(i.set(s,l),r())})}),this.queue.run({items:n.srcs,activeIndex:Math.floor(o)})}dispose(n){this.isDisposed=!0,this.queue.dispose(),n!==void 0&&this.restoreScroll(n)}onPageIndexChanged(n,o){this.queue.run({items:this.srcs,activeIndex:o})}restoreScroll(n){const o=this.srcs[Math.min(this.srcs.length-1,Math.floor(n))];if(!o)return;const i=this.findImgElBySrc(o);if(!i)return;const r=Ha(i,document.documentElement);if(!r)return;const{el:s,top:l}=r,a=n>=this.srcs.length?i.height:n%1*i.height;s.scrollTo({top:l+a,behavior:"instant"})}getInitialPage(){for(let n=0;n<this.srcs.length;n++){const o=this.findImgElBySrc(this.srcs[n]);if(!o)continue;const i=o==null?void 0:o.getBoundingClientRect();if(!i||i.bottom<=0)continue;const r=i.top;return n+(r>=0?0:-r/i.height)}return 0}findImgElBySrc(n){return document.querySelector(`img[src="${n}"],img[data-src="${n}"]`)}}function Am(e){var g,O,S,A;const t=(g=e.raw.value)==null?void 0:g.isWebtoon,n=ne(t),o=((S=(O=e.raw.value)==null?void 0:O.imgs)==null?void 0:S.filter(Boolean))??[],i=ne([]);let r=e.isAutoShow!==!1&&e.page.value?e.page.value:void 0,s=!1,l=!1,a,u=setTimeout(e.onTimeout,2e4);const c=()=>{u&&(clearTimeout(u),u=void 0)},d=o.length?new zm({srcs:o,initialPage:r,onInitialPageChanged:f,onAsyncImgsChanged:p}):(A=e.spec)!=null&&A.paging?new bm({spec:e.spec,contentSel:e.spec.content,pagingSpec:e.spec.paging,initialPage:r,onAsyncImgsChanged:p,onInitialPageChanged:f,onError:()=>e.onError("SPEC_ERR")}):new Mm({isIOS:e.touchDevice&&!navigator.userAgent.toLowerCase().includes("android"),spec:e.spec,initialPage:r,onInitialPageChanged:f,onAsyncImgsChanged:p});function f(F){r=F}function p(F){if(i.value=F,r&&r>F.length&&(r=F.length-1),n.value!==void 0){w();return}let k=0,m=!1,P=0,C=0,B=0;const y=F.length<3?F:F.slice(F.length<5?1:2,-1),I=Math.min(2,y.length);for(let W=0;W<y.length;W++){const L=y[W];if(!L)continue;B++;const{size:Y,hasError:$}=L;if($){m||k++;continue}if(!Y)continue;m=!0,k=0,a&&(a=void 0,clearTimeout(a));const X=Y.width/Y.height;X>2&&P++;const J=X<.5||P>=I,T=!J&&.65<X&&X<.75;if(T&&C++,J&&n.value!==J&&(n.value=J),n.value===void 0&&T&&C>=I&&(n.value=!1),n.value===void 0&&B>=I&&(n.value=!1),n.value!==void 0){w();return}}k>1&&!a&&(a=setTimeout(()=>{a=void 0,n.value===void 0&&!l&&e.onTimeout()},7e3))}Di(()=>{l=!0,d.dispose(s?e.page.value:void 0),a&&clearTimeout(a)});function w(){if(s||n.value===void 0||r===void 0)return;const F=Math.max(0,Math.min(r,i.value.length)),k=Math.min(Math.floor(F),i.value.length-1);!i.value[k]||k>0&&!i.value[k-1]||s||(s=!0,c(),e.onReady(F),de(()=>Math.floor(e.page.value),(m,P)=>{m!==P&&d.onPageIndexChanged(P,m)},{immediate:!0}))}return{asyncImgs:Q(()=>i.value),isWebtoon:Q(()=>n.value??!1)}}function Fa({touchDevice:e,isBusy:t,isPlaying:n,isIdle:o,hideControlsEvent:i,scrollEl:r,moveThreshold:s}){const l=ne(!0);let a=!1,u=!1;const c={x:0,y:0};let d;gt(()=>{d==null||d(),d=void 0});function f(S){if(i.value===sn.never||t.value&&l.value)return;const A=typeof S=="boolean"?S:!l.value;A!==l.value&&(l.value=A,!a&&!A&&(a=!0))}function p(){r.value&&(c.x=r.value.scrollLeft,c.y=r.value.scrollTop)}function w(){const S=i.value===sn.firstMove,A=r.value;if(!A)return;const F=on(()=>{if(!l.value){Bm(A)&&f(!0);return}if(S&&a)return;const k=Math.abs(A.scrollTop-c.y)||Math.abs(A.scrollLeft-c.x),m=s??(S?c.y===0?300:200:150);k>m&&f(!1)},100);A.addEventListener("scroll",F),d=()=>{A.removeEventListener("scroll",F)}}function g(){switch(d==null||d(),d=void 0,i.value){case sn.onLoad:a||f(!1);break;case sn.firstMove:w();break;case sn.move:w();break;case sn.never:l.value||(l.value=!0);break}}function O(){u||(u=!0,p(),g(),e&&de(er(),A=>{A==="hidden"&&!n.value&&!l.value&&f(!0)}),de(t,S=>{S&&!l.value&&f()}),de(n,S=>{S||f(!0)}),de(o,S=>{n.value&&f(!S)}),de(l,S=>{S&&p()}),de(i,()=>g()),de(r,()=>g()))}return{visible:Q(()=>l.value),toggle:f,activate:O}}function Bm(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 Lm(e,t,n){return Q(()=>t.value?Wa(e.value,n.value):e.value.map((o,i)=>[{img:o,index:i}]))}function Wa(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})),...Wa(e.slice(r.length),t&&i,n+r.length)]}const Mr=40;function jm({page:e,asyncImgs: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,w=!1,g,O=!1,S,A;const F=vt(I,300),k=on(()=>{I(),F()},300);function m(){const x=new Promise(q=>{g=()=>{g=void 0,q()}});return B(e.value,{smooth:!1,ensureLastImgVisibility:!0}),x}function P(){var x;w=!0,g==null||g(),W(),(x=a.value)==null||x.addEventListener("scroll",k),setTimeout(()=>{const{width:q,height:oe}=yn();de(()=>`${oe.value}-${q.value}`,C),de(o,C),de(n,C),de(()=>t.value,(Z,j)=>{!j||Z.length===j.length||s.value&&C()})},300)}function C(){const x=a.value;if(!x)return;const q=Date.now();A=q;const{scrollWidth:oe,scrollHeight:Z}=x,j=e.value,Ee=Math.floor(j),xe=t.value[Ee];mt(20,10,async()=>{if(A!==q)return!0;if(x.scrollWidth===oe&&x.scrollHeight===Z)return;let fe=j;if(xe){const ve=t.value.findIndex(ye=>ye===xe||(ye==null?void 0:ye.src)===xe.src);ve!==-1&&Ee!==ve&&(fe=ve+j-Ee)}return await B(fe),!0})}async function B(x,{smooth:q,ensureLastImgVisibility:oe=!1}={smooth:!1}){return new Promise(Z=>{const j=a.value;if(!j){Z();return}p=!0;const Ee=async()=>{await pt(),p=!1,w||P(),Z()},xe=Math.floor(x),fe=_r(j,xe);if(!fe){Ee();return}c(async()=>{await y(j,!i.value&&q,async()=>{await T(j,fe,{smooth:q,page:x,ensureLastImgVisibility:oe})}),await Ee()})})}async function y(x,q,oe){q&&x.style.setProperty("scroll-snap-type","none"),await oe(),q&&x.style.removeProperty("scroll-snap-type")}function I(){if(p)return;const x=Y();x!==void 0&&x!==e.value&&d(x),W()}function W(){O||!O&&L()&&(O=!0,f())}function L(){const x=a.value;if(!x)return!1;const q=!i.value||u.value?3:!r.value&&x.clientWidth>x.clientHeight?2.25:2.5;return r.value?x.scrollHeight-x.scrollTop<x.clientHeight*q:x.scrollWidth-(s.value?-x.scrollLeft:x.scrollLeft)<x.clientWidth*q}function Y(){const x=$();return x?(+x.getAttribute("data-index")||0)+(i.value?X(x):0):void 0}function $(){var q;if(S??(S=a.value.getRootNode()),!S)return;const x=(q=S.elementsFromPoint)==null?void 0:q.call(S,r.value||!i.value?window.innerWidth/2:s.value?window.innerWidth-Mr:Mr,r.value&&i.value?l.value||Mr:window.innerHeight/2);if(x)for(let oe=0;oe<x.length;oe++){const Z=x[oe];if(Z.hasAttribute("data-index"))return Z;if(Z===a.value)break}}function X(x){const q=x.getBoundingClientRect();return r.value?Math.abs(q.top-l.value)/q.height:s.value?Math.max(0,q.right-a.value.clientWidth)/q.width:Math.abs(q.left)/q.width}let J=!1;async function T(x,q,oe){if(J)return;const Z=q.getBoundingClientRect();if(!i.value){if(r.value){if(Z.top<=0&&Z.bottom>=x.clientHeight)return}else if(Z.left<=0&&Z.right>=x.clientWidth)return}J=!0;const j=r.value?x.scrollTop:x.scrollLeft,Ee=oe.page,xe=i.value?Ee%1:0,fe=await mt(30,10,async()=>{await _n();let $e;if(!(q.offsetHeight<10))return i.value?r.value?$e=q.offsetTop+xe*q.offsetHeight-l.value:s.value?$e=q.offsetLeft-x.clientWidth+q.offsetWidth-xe*q.offsetWidth:$e=q.offsetLeft+xe*q.offsetWidth:r.value?$e=q.offsetTop+(Z.top>0?0:Z.height-x.clientHeight):$e=q.offsetLeft+(Z.left>0?0:Z.width-x.clientWidth),Ee>.5&&Math.abs($e)<100?void 0:$e})??0,ve=oe.ensureLastImgVisibility?r.value?Math.min(fe,x.scrollHeight-x.clientHeight*2):s.value?Math.max(fe,-(x.scrollWidth-x.clientWidth*2)):Math.min(fe,x.scrollWidth-x.clientWidth*2):fe;if(!oe.smooth){r.value?x.scrollTop=ve:x.scrollLeft=ve,J=!1;return}const ye=ve-j,Be=30;let at=0;return new Promise($e=>{(function Lt(){const h=Nm(at,j,ye,Be);r.value?x.scrollTop=h:x.scrollLeft=h,at++,at<=Be?requestAnimationFrame(Lt):($e(),J=!1)})()})}return{init:m,goToPage:B}}function Nm(e,t,n,o){return n*(Math.pow(e/o-1,3)+1)+t}class Vm{constructor(t){re(this,"player");re(this,"debounceStartPlayer");re(this,"isPlaying");re(this,"isIdle",ne(!1));re(this,"onIdle");this.player=t.player,this.debounceStartPlayer=vt(()=>this.player.start(),100);const n=ne(t.autoPlay||zt(()=>sessionStorage.getItem("mp:playing"))==="true");this.isPlaying=Q({get:()=>n.value,set:o=>{n.value=o,zt(()=>{sessionStorage.setItem("mp:playing",o?"true":"false")})}}),this.onIdle=vt(()=>{this.isIdle.value=!0},t.touchDevice?2e3:1e3),this.awake(),t.touchDevice||kt(window,"mousemove",()=>this.awake()),je(()=>{t.touchDevice||de(er(),i=>{this.isPlaying.value&&(i==="visible"?this.player.start():this.player.stop())}),de(t.speed,()=>this.interfere()),de(t.isBusy,o=>{!o&&this.isIdle.value&&this.awake()})}),gt(()=>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 pt(),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 qa extends Vm{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 w=Date.now(),g=w-d;d=w;const O=c*g+f;O>=1?(f=O%1,this.setScrollOffset(s,O-f)):f=O,setTimeout(p,1)};p()}}})}}class Rm extends qa{constructor(n){super(n);re(this,"isLongStrip");re(this,"isVertical");re(this,"isRTL");const{isLongStrip:o,isVertical:i,isRTL:r}=n;this.isLongStrip=o,this.isVertical=i,this.isRTL=r,o!==void 0&&je(()=>{de(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 Hm(e){return new Rm(e)}function Fm({speed:e,fontSize:t,lineHeight:n,...o}){const i=yn().width;return new qa({...o,speed:Q(()=>{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 Wm={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"},Ua=he({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","timeout","ready","pageChanged","playingChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var R,ee;const n=e,o=t,i=!n.touchDevice||navigator.userAgent.toLowerCase().includes("android")||Ef(n.appVersion,"6.7.0"),r=ne(!1),s=ne(!1),l=Q(()=>n.busy),a=Q(()=>n.page),u=Q(()=>n.immediate||r.value?n.spaceTop??0:0),c=Q(()=>!n.touchDevice&&X.isIdle.value&&!n.busy&&!C.value),{asyncImgs:d,isWebtoon:f}=Am({raw:Q(()=>n.raw),spec:n.spec,page:a,touchDevice:n.touchDevice,isAutoShow:n.isAutoShow,async onReady(M){xe(M),r.value=!0},onError:()=>o("error"),onTimeout:()=>o("timeout")}),{direction:p,style:w,isRTL:g,isDouble:O,isVertical:S,isLongStrip:A,gap:F,speed:k,zoom:m,breakFirst:P}=Lh({touchDevice:n.touchDevice,isWebtoon:f,titleName:(R=n.raw)==null?void 0:R.title.name,defaultPreferences:Q(()=>n.defaultPreferences)}),C=ne(!1),B=Lm(d,O,P),y=Q(()=>d.value.length),I=Q(()=>a.value>=y.value),W=ne(null),L=ne(null),Y=Q(()=>{var M;return(M=L.value)==null?void 0:M.rootEl}),$=ne(!1),X=Hm({autoPlay:!n.tourEnabled&&(((ee=n.defaultPreferences)==null?void 0:ee.autoPlay)??!1),touchDevice:n.touchDevice,scrollEl:Y,speed:k,isRTL:g,isVertical:S,isLongStrip:A,isBusy:l}),J=Q({get(){return m.value},set(M){X.interfere(()=>{m.value=M})}}),T=Fa({touchDevice:n.touchDevice,isBusy:l,isPlaying:Q(()=>X.isPlaying.value),isIdle:Q(()=>X.isIdle.value),hideControlsEvent:Q(()=>n.defaultPreferences.hideControlsEvent),scrollEl:Y}),x=T.visible,q=jm({page:a,asyncImgs:d,style:w,direction:p,isLongStrip:A,isVertical:S,isRTL:g,spaceTop:u,isWebtoon:f,scrollEl:Q(()=>{var M;return(M=L.value)==null?void 0:M.rootEl}),interferePlayer:M=>X.interfere(M),onChangedPage:xe,onFinished:()=>o("finished")}),oe=Q(()=>Math.floor(a.value)),Z=Q(()=>A.value?a.value:O.value?h():Math.floor(a.value)),j=()=>X.interfere(()=>_n(100));Dt({onKeyDown:M=>{if(n.tourEnabled)return!0;const _=A.value&&S.value,D=A.value&&!S.value,G=!A.value&&S.value,te=!A.value&&!S.value;switch(M.key){case" ":M.preventDefault(),A.value||v();break;case"ArrowUp":case"PageUp":_?j():G&&oe.value!==0&&(M.preventDefault(),$e());break;case"ArrowDown":case"PageDown":_?j():G&&!I.value&&(M.preventDefault(),Lt());break;case"ArrowLeft":D?j():te?(M.preventDefault(),Be()):S.value&&ye();break;case"ArrowRight":D?j():te?(M.preventDefault(),at()):S.value&&ve();break}},onKeyUp:M=>{switch(M.key){case"b":P.value=!P.value;break}}}),de(X.isPlaying,M=>{o("playingChanged",M)}),de(x,M=>{o("controlsVisibilityChanged",M)});async function Ee(){await q.init(),o("ready"),s.value=!0,T.activate(),X.activate()}function xe(M){if(a.value===M)return;const _=d.value.length;if(M<0||M>=_+1)return;const D=a.value;if(o("pageChanged",M),M<.01&&D>M){X.awake();return}}function fe(){!n.touchDevice&&!A.value&&q.goToPage(oe.value,{smooth:!0})}function ve(M=!1){var _,D;(D=(_=n.chapterNavData)==null?void 0:_.next)==null||D.call(_,M)}function ye(M=!1){var _,D;(D=(_=n.chapterNavData)==null?void 0:_.prev)==null||D.call(_,M)}function Be(){g.value?Lt():$e()}function at(){g.value?$e():Lt()}function $e(){var D;const M=B.value,_=I.value?M[M.length-1][0].index:(D=M[h()-1])==null?void 0:D[0].index;_!==void 0?q.goToPage(_):ye()}function Lt(){var M,_;if(I.value)ve();else{const D=((_=(M=B.value[h()+1])==null?void 0:M[0])==null?void 0:_.index)??d.value.length;q.goToPage(D)}}function h(){const M=oe.value,_=B.value.findIndex(D=>D.some(({index:G})=>G===M));return _===-1?B.value.length-1:_}function v(M){T.toggle(M)}function E(){if(X.isPlaying.value){x.value||!n.touchDevice?X.stop():(X.awake(),T.toggle(!0));return}T.toggle()}function H(){X.stop(),o("clickEntryButton")}function V(){T.toggle(!1),X.isPlaying.value&&X.stop(),o("openHelpScreen")}return(M,_)=>e.immediate||r.value?(b(),se(br,{key:0,ref_key:"gearLayout",ref:W,loading:!s.value,immediate:!!e.immediate,"hide-cursor":c.value,class:"text-stone-100",onClick:_[21]||(_[21]=Ne(()=>{},["stop"]))},{default:ie(()=>{var D;return[r.value?(b(),se(ka,{key:0,ref_key:"body",ref:L,zoom:J.value,"onUpdate:zoom":_[1]||(_[1]=G=>J.value=G),zooming:C.value,"onUpdate:zooming":_[2]||(_[2]=G=>C.value=G),page:a.value,"page-index":oe.value,pages:U(B),"total-imgs":U(d).length,direction:U(p),gap:U(F),"is-long-strip":U(A),isRTL:U(g),"is-double":U(O),"is-vertical":U(S),"space-top":u.value||0,busy:l.value,"play-controller":U(X),"touch-device":e.touchDevice,"pinch-to-zoome":e.defaultPreferences.pinchToZoom,"double-tap-zoom":e.defaultPreferences.doubleTapZoom,"tap-zone":e.defaultPreferences.tapZone,"controls-visible":U(x),onReady:Ee,onPrev:$e,onNext:Lt,onClick:E,onDragEnd:fe,onWheelPassive:_[3]||(_[3]=()=>U(X).interfere())},zi({_:2},[r.value&&U(d).length?{name:"end",fn:ie(()=>{var G;return[N(or,{"has-next":!!((G=e.chapterNavData)!=null&&G.next),"offline-mode":!!e.offlineMode,seconds:e.defaultPreferences.autoNextSeconds,"show-add-button":U(m)===1&&!e.entryId&&!!e.raw&&!e.offlineMode,onNext:ve,onAddToLibrary:H,onHide:_[0]||(_[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","double-tap-zoom","tap-zone","controls-visible"])):ae("",!0),N(Sr,{modelValue:$.value,"onUpdate:modelValue":_[10]||(_[10]=G=>$.value=G),"enable-help":"",name:(D=e.raw)==null?void 0:D.title.name,"space-top":u.value,"enable-default-preferences":!e.touchDevice||!!e.appVersion,onHelp:V,onMore:_[11]||(_[11]=()=>o("openDefaultPreferences"))},{"tab-preferences":ie(()=>[N(xa,{"enable-reset":!e.touchDevice||!!e.appVersion,webtoon:U(f),"reader-style":U(w),"onUpdate:readerStyle":_[4]||(_[4]=G=>Ae(w)?w.value=G:null),direction:U(p),"onUpdate:direction":_[5]||(_[5]=G=>Ae(p)?p.value=G:null),gap:U(F),"onUpdate:gap":_[6]||(_[6]=G=>Ae(F)?F.value=G:null),speed:U(k),"onUpdate:speed":_[7]||(_[7]=G=>Ae(k)?k.value=G:null),zoom:J.value,"onUpdate:zoom":_[8]||(_[8]=G=>J.value=G),"default-preferences":e.defaultPreferences},null,8,["enable-reset","webtoon","reader-style","direction","gap","speed","zoom","default-preferences"])]),"tab-default":ie(()=>[N(mr,{"touch-device":e.touchDevice,"model-value":e.defaultPreferences,"double-tap-zoom-available":U(i),"onUpdate:modelValue":_[9]||(_[9]=G=>o("defaultPreferencesChanged",G))},null,8,["touch-device","model-value","double-tap-zoom-available"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),s.value&&!I.value&&!e.tourEnabled?(b(),se(va,{key:1,direction:U(p),"tap-zone":e.defaultPreferences.tapZone},null,8,["direction","tap-zone"])):ae("",!0),s.value&&!I.value?(b(),se(yr,{key:2,playing:U(X).isPlaying.value},null,8,["playing"])):ae("",!0),N(ba,{visible:U(x),"space-top":u.value},zi({top:ie(()=>{var G;return[e.raw||e.offlineMode?(b(),se(ir,{key:0,"offline-mode":e.offlineMode,raw:e.raw,onClick:_[12]||(_[12]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):ae("",!0),!e.touchDevice&&!e.offlineMode?(b(),se(Qo,{key:1,onClick:_[13]||(_[13]=()=>o("hideReader"))})):ae("",!0),e.chapterNavData?(b(),se(fr,{key:2,"touch-device":e.touchDevice,"chapter-spec":(G=e.spec)==null?void 0:G.chapter,data:e.chapterNavData,rtl:U(g),onGetHiddenChapters:_[14]||(_[14]=()=>o("getHiddenChapters")),onPrev:ye,onNext:ve,onDialogOpened:_[15]||(_[15]=()=>U(T).toggle(!1))},null,8,["touch-device","chapter-spec","data","rtl"])):ae("",!0)]}),"bottom-right":ie(()=>[!e.offlineMode&&e.raw?(b(),se(rr,{key:0,"entry-id":e.entryId,onClick:H},null,8,["entry-id"])):ae("",!0),N(cr,{disabled:!r.value,onClick:_[16]||(_[16]=()=>$.value=!0)},null,8,["disabled"]),e.touchDevice?ae("",!0):(b(),se(ur,{key:1,onRequestFullScreen:_[17]||(_[17]=()=>{var G,te;return(te=(G=W.value)==null?void 0:G.rootEl)==null?void 0:te.requestFullscreen()})})),U(A)?(b(),se(ar,{key:2,"tour-message":"Press here to play like a video",playing:U(X).isPlaying.value,disabled:!s.value,onClick:_[18]||(_[18]=()=>U(X).toggle())},null,8,["playing","disabled"])):ae("",!0),U(O)?(b(),se(Je,{key:3,title:"Break 1st page (B)","data-tour":"Press here to separate the first page from double-page mode",disabled:!s.value,onClick:_[19]||(_[19]=()=>P.value=!U(P))},{default:ie(()=>[U(P)?(b(),se(wa,{key:0})):(b(),se(ya,{key:1}))]),_:1},8,["disabled"])):ae("",!0)]),progress:ie(()=>[e.defaultPreferences.progressSize!==0&&!I.value?(b(),se(wr,{key:0,value:Z.value,total:U(B).length,"long-strip":U(A),height:e.defaultPreferences.progressSize,rtl:U(g)},null,8,["value","total","long-strip","height","rtl"])):ae("",!0)]),default:ie(()=>[e.appVersion&&u.value&&!e.offlineMode?(b(),z("div",{key:0,class:"fixed top-0 left-0 right-0 bg-black bg-opacity-70 pointer-events-auto",style:Te({height:`${u.value}px`})},null,4)):ae("",!0)]),_:2},[U(B).length?{name:"bottom-left",fn:ie(()=>[N(_a,{"model-value":oe.value,disabled:!s.value,pages:U(B),"total-imgs":U(d).length,"onUpdate:modelValue":U(q).goToPage},null,8,["model-value","disabled","pages","total-imgs","onUpdate:modelValue"])]),key:"0"}:void 0]),1032,["visible","space-top"]),U(x)||C.value?(b(),z("div",Wm,[N(no,{"enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ie(()=>[C.value||U(m)!==1?(b(),se(ea,{key:0,zoom:J.value,onClick:_[20]||(_[20]=Ne(()=>J.value=1,["stop"])),class:"duration-200"},null,8,["zoom"])):ae("",!0)]),_:1})])):ae("",!0),ke(M.$slots,"default")]}),_:3},8,["loading","immediate","hide-cursor"])):ae("",!0)}}),qm=Object.freeze(Object.defineProperty({__proto__:null,default:Ua},Symbol.toStringTag,{value:"Module"}));function Um({sel:e,heading:t,paraSel:n,useObfFont:o}){const i=["H1","H2","H3","H4","H5","H6","P","BLOCKQUOTE","PRE","CODE"],r=["BR","HR"],s=["BUTTON","FIGURE","IMG","SCRIPT","SELECT","INPUT","FORM","IFRAME","NAV","FOOTER","ASIDE","TABLE"],l=Km(e),a=Zm(l),u=o?Ym(l):void 0,c=d(l);if(!c)return;return{el:c,isRTL:a,fontFamily:u};function d(w){var P;let g=0,O=!1,S=0,A=0,F=!1;const k=(P=m(w,i.includes(w.tagName)||!!n&&w.matches(n)))==null?void 0:P.node;if(!k)return;if(t){const C=document.createElement("h1");C.innerText=t,k.prepend(C)}return p(k),f(k),k;function m(C,B){var q;if(F)return;if(C.nodeType===Node.TEXT_NODE)return B&&((q=C.textContent)!=null&&q.trim())?{node:C.cloneNode()}:void 0;if(C.nodeType!==Node.ELEMENT_NODE)return;const I=C.tagName;if(s.includes(I)||I==="A"&&(O||!B))return;if(r.includes(I))return B?{node:document.createElement(I),isEmpty:!0}:{aborted:!0};if(C.getAttribute("aria-hidden")==="true"||!$n(C)||window.getComputedStyle(C).position==="fixed")return;const L=!!n&&C.matches(n),Y=L||i.includes(I),$=B||Y,X=[];if(Array.from(C.childNodes).forEach(oe=>{if(F)return;const Z=m(oe,$);if(Z!=null&&Z.aborted)return;const j=Z==null?void 0:Z.node;if(j){if(A=Z!=null&&Z.isEmpty?A+1:0,A>2)return;X.push(j),O?S=0:++g>30&&(O=!0)}else O&&++S>30&&(F=!0)}),!X.length)return Y?{node:document.createElement("p"),isEmpty:!0}:void 0;const T=document.createElement(L?"p":I==="BODY"?"div":I==="a"?"span":I),x=C.getAttribute("dir");return x&&x!=="auto"&&T.setAttribute("dir",x),X.forEach(oe=>T.appendChild(oe)),{node:T}}}function f(w){Za(w,g=>{if(g===w)return;const O=g.tagName;if(r.includes(O)||i.includes(O))return;const S=g.parentElement;if((S==null?void 0:S.childNodes.length)===1){Array.from(g.childNodes).forEach(k=>{S.appendChild(k)}),S.removeChild(g);return}g.childNodes.length===1&&g.replaceWith(g.childNodes[0])})}function p(w){let g=!1;const O=[];Or(w,S=>i.includes(S.tagName)?[]:Array.from(S.children),S=>{const A=S.textContent.trim();if(!A)return!0;if(g)return!1;if(g=!Ka(S),O.includes(A))return!0;if(g)return!1;O.push(A)}),Or(w,S=>i.includes(S.tagName)?[]:Array.from(S.children).reverse(),S=>!S.textContent.trim()||Ka(S))}}function Ka(e){const t=e.nodeName;return t.length===2&&t.startsWith("H")}function Km(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 Zm(e,t){if(e.getAttribute("dir")==="rtl")return!0;const n=e.querySelector("p")||e.querySelector("div:not(:empty)")||e;return n.getAttribute("dir")==="rtl"?!0:window.getComputedStyle(n).direction==="rtl"}function Ym(e,t){const n=e.querySelector("p")||e.querySelector("div:not(:empty)")||e;return window.getComputedStyle(n).fontFamily}function Za(e,t){Array.from(e.children).forEach(o=>{Za(o,t)}),t(e)}function Or(e,t,n){const o=t(e);let i=!1;for(let r=0;r<o.length;r++){const s=o[r],l=Or(s,t,n);if(l!==void 0){if(!l)return!1;Xm(s)}else i=!0}if(!i)return n(e)}function Xm(e){var t;(t=e.parentNode)==null||t.removeChild(e)}const Gm={key:1,class:"h-14 sm:h-16 px-2 2xs:px-3 flex gap-1 2xs:gap-3 items-center"},Jm={class:"md:fixed left-0 right-0 bottom-0"},Qm={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"},Ya=he({__name:"GearThirdControlsLayout",props:{visible:{type:Boolean},hideTopControls:{type:Boolean},spaceTop:{type:null}},setup(e){return(t,n)=>(b(),z(we,null,[K("div",{class:ue(["fixed left-0 right-0 top-0 bg-inherit z-30",{"opacity-0 pointer-events-none":!e.visible}])},[e.spaceTop?(b(),z("div",{key:0,style:Te({height:`${e.spaceTop}px`})},null,4)):ae("",!0),e.hideTopControls?ae("",!0):(b(),z("div",Gm,[ke(t.$slots,"top-controls")]))],2),K("div",{class:ue(["fixed left-0 right-0 bottom-0 md:left-auto z-30 bg-inherit md:bg-transparent",{"opacity-0 pointer-events-none":!e.visible}])},[K("div",Jm,[ke(t.$slots,"progress")]),K("div",Qm,[ke(t.$slots,"bottom-controls")])],2),ke(t.$slots,"default")],64))}}),e0=Object.freeze(Object.defineProperty({__proto__:null,default:Ya},Symbol.toStringTag,{value:"Module"})),t0={},n0={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function o0(e,t){return b(),z("svg",n0,[...t[0]||(t[0]=[K("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 Xa=be(t0,[["render",o0]]),i0=Object.freeze(Object.defineProperty({__proto__:null,default:Xa},Symbol.toStringTag,{value:"Module"})),r0={},s0={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function l0(e,t){return b(),z("svg",s0,[...t[0]||(t[0]=[K("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 Ga=be(r0,[["render",l0]]),a0=Object.freeze(Object.defineProperty({__proto__:null,default:Ga},Symbol.toStringTag,{value:"Module"})),Ja=be(he({__name:"NovelBody",props:{hideTopControls:{type:Boolean},progress:{type:Number},touchDevice:{type:Boolean},busy:{type:Boolean},spaceTop:{type:null},content:{type:null},rtl:{type:Boolean},fontFamily:{type:String},titlePreferences:{type:Object},defaultPreferences:{type:Object}},emits:["ready","click","progressChanged","finished"],setup(e,{expose:t,emit:n}){const o=e,i=n,r=ne(!1),s=ne(),l=ne(),a=on(()=>{const c=s.value;if(!c)return;const{clientHeight:d,scrollHeight:f,scrollTop:p}=c,w=Math.max(p,f-2*d);if(w<=0)i("progressChanged",1);else{const g=p/w;i("progressChanged",Math.max(0,Math.min(1,g)))}},30);t({scrollEl:s}),Dt({onKeyDown(){var c;o.busy||(c=s.value)==null||c.focus()}}),je(()=>{de(()=>o.content,d=>{const f=l.value;f&&(Array.from(f.children).forEach(p=>{f.removeChild(p)}),f.appendChild(d),setTimeout(()=>{if(s.value){const{progress:w}=o;w&&u(w)}r.value=!0,i("ready")}))},{immediate:!0});const c=yn();de(()=>{const{fontFamily:d,fontSize:f,lineHeight:p}=o.titlePreferences;return`${d}-${f}-${p}-${c.width.value}`},async()=>{const d=o.progress;await pt(),u(d)})});function u(c){const d=s.value;d&&(d.scrollTop=c*(d.scrollHeight-2*d.clientHeight))}return(c,d)=>(b(),z("div",{ref_key:"scrollContainer",ref:s,tabindex:"0",class:ue(["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:Te({fontFamily:e.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)=>U(a)&&U(a)(...f))},[K("div",Mn({ref_key:"contentContainer",ref:l,class:"novel-body__content"},e.rtl?{dir:"rtl"}:{}),null,16),ke(c.$slots,"end")],38))}}),[["styles",['.novel-body{top:0;right:0;bottom:0;left:0;overflow-wrap:break-word;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:768px;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}']]]),c0=Object.freeze(Object.defineProperty({__proto__:null,default:Ja},Symbol.toStringTag,{value:"Module"})),Qa=he({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","timeout","ready","pageChanged","playingChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var Y,$,X,J,T,x,q,oe;const n=e,o=t,i=ne(null),r=((Y=n.raw)==null?void 0:Y.novel)??Um({sel:($=n.spec)==null?void 0:$.content,heading:(X=n.raw)==null?void 0:X.name,paraSel:(J=n.spec)==null?void 0:J.para,useObfFont:!!((T=n.spec)!=null&&T.obfFont)});r===void 0&&o("error");const s=ne(r==null?void 0:r.el),l=!!(r!=null&&r.isRTL),a=ne(!1),u=ne(!1),c=Q(()=>n.page),d=Q(()=>n.busy),f=ne(null),p=Q(()=>{var Z;return(Z=f.value)==null?void 0:Z.scrollEl}),w=(q=(x=n.raw)==null?void 0:x.title)==null?void 0:q.name,g=w?ha(w):location.hostname,O=vf(`mpr:${g}`,{}),S=Q({get(){var xe,fe;const Z=n.defaultPreferences,j=((xe=O.value)==null?void 0:xe.fontSize)??Z.fontSize,Ee=Math.max(j,((fe=O.value)==null?void 0:fe.lineHeight)??Z.lineHeight);return{fontFamily:Z.fontFamily,speed:Z.speed,...O.value,contrast:Z.contrast,fontSize:j,lineHeight:Ee}},set(Z){const j={...Z},Ee=n.defaultPreferences;Object.keys(j).forEach(xe=>{j[xe]===Ee[xe]&&delete j[xe]}),O.value=j}}),A=Fm({isBusy:d,speed:Q(()=>S.value.speed),fontSize:Q(()=>S.value.fontSize),lineHeight:Q(()=>S.value.lineHeight),autoPlay:!!((oe=n.defaultPreferences)!=null&&oe.autoPlay),touchDevice:n.touchDevice,scrollEl:p}),F=Q(()=>!n.touchDevice&&A.isIdle.value&&!d.value),k=Fa({touchDevice:n.touchDevice,moveThreshold:50,isBusy:d,isPlaying:Q(()=>A.isPlaying.value),isIdle:Q(()=>A.isIdle.value),hideControlsEvent:Q(()=>n.defaultPreferences.hideControlsEvent),scrollEl:p}),m=k.visible;de(A.isPlaying,Z=>{o("playingChanged",Z)}),de(m,Z=>{o("controlsVisibilityChanged",Z)}),P(document.documentElement),P(document.body);function P(Z){const j=Z.style.getPropertyValue("overflow");j!=="hidden"&&(Z.style.setProperty("overflow","hidden","important"),gt(()=>{j?Z.style.setProperty("overflow",j):Z.style.removeProperty("overflow")}))}function C(){o("ready"),k.activate(),A.activate()}function B(){A.stop(),o("clickEntryButton")}function y(Z){u.value=Z}function I(){if(A.isPlaying.value){m.value||!n.touchDevice?A.stop():(A.awake(),k.toggle(!0));return}k.toggle()}function W(Z){Z!==n.page&&(o("pageChanged",Math.min(1,Z)),Z>=1&&o("finished"))}function L(Z){const j=S.value.fontSize+Z;j>48||j<10||(S.value={...S.value,fontSize:j,lineHeight:Math.max(10,Math.min(96,Math.round(S.value.lineHeight/S.value.fontSize*j)))})}return(Z,j)=>s.value?(b(),se(br,{key:0,ref_key:"gearLayout",ref:i,immediate:"","hide-cursor":F.value,class:"bg-stone-900",style:Te({color:`rgba(255, 255, 255, ${e.defaultPreferences.contrast})`})},{default:ie(()=>{var Ee,xe;return[N(Ja,{ref_key:"body",ref:f,progress:c.value,"touch-device":e.touchDevice,busy:d.value,"space-top":e.spaceTop,content:s.value,rtl:l,"font-family":(Ee=U(r))==null?void 0:Ee.fontFamily,"title-preferences":S.value,"default-preferences":e.defaultPreferences,"hide-top-controls":!e.raw,onClick:I,onProgressChanged:W,onReady:C},{end:ie(()=>{var fe,ve;return[N(or,{"has-next":!!((fe=e.chapterNavData)!=null&&fe.next),"offline-mode":!!e.offlineMode,seconds:((ve=e.defaultPreferences)==null?void 0:ve.autoNextSeconds)??5,onNext:j[0]||(j[0]=()=>{var ye,Be;return(Be=(ye=e.chapterNavData)==null?void 0:ye.next)==null?void 0:Be.call(ye,!1)}),onVisibilityChanged:y,onHide:j[1]||(j[1]=()=>o("hideReader")),onFinished:j[2]||(j[2]=()=>o("finished"))},null,8,["has-next","offline-mode","seconds"])]}),_:1},8,["progress","touch-device","busy","space-top","content","font-family","title-preferences","default-preferences","hide-top-controls"]),!e.touchDevice&&!e.raw&&!e.offlineMode?He((b(),se(Qo,{key:0,class:"hidden md:inline-block fixed left-3 top-2",transparent:"",onClick:j[3]||(j[3]=()=>o("hideReader"))},null,512)),[[vd,U(m)]]):ae("",!0),N(Ya,{visible:U(m),"hide-top-controls":!e.raw,"space-top":e.spaceTop},{"top-controls":ie(()=>{var fe;return[e.raw||e.offlineMode?(b(),se(ir,{key:0,"offline-mode":e.offlineMode,raw:e.raw,transparent:"",onClick:j[4]||(j[4]=()=>o("pressedBack"))},null,8,["offline-mode","raw"])):ae("",!0),e.raw&&!e.touchDevice&&!e.offlineMode?(b(),se(Qo,{key:1,transparent:"",onClick:j[5]||(j[5]=()=>o("hideReader"))})):ae("",!0),e.chapterNavData?(b(),se(fr,{key:2,transparent:"","touch-device":e.touchDevice,"chapter-spec":(fe=e.spec)==null?void 0:fe.chapter,data:e.chapterNavData,rtl:l,onGetHiddenChapters:j[6]||(j[6]=()=>o("getHiddenChapters")),onPrev:j[7]||(j[7]=ve=>{var ye,Be;return(Be=(ye=e.chapterNavData)==null?void 0:ye.prev)==null?void 0:Be.call(ye,ve)}),onNext:j[8]||(j[8]=ve=>{var ye,Be;return(Be=(ye=e.chapterNavData)==null?void 0:ye.next)==null?void 0:Be.call(ye,ve)}),onDialogOpened:j[9]||(j[9]=()=>U(k).toggle(!1))},null,8,["touch-device","chapter-spec","data"])):ae("",!0)]}),"bottom-controls":ie(()=>[!e.offlineMode&&e.raw?(b(),se(rr,{key:0,"entry-id":e.entryId,transparent:"",onClick:B},null,8,["entry-id"])):ae("",!0),N(Je,{transparent:"",onClick:j[10]||(j[10]=()=>L(-1))},{default:ie(()=>[N(Xa)]),_:1}),N(Je,{transparent:"",onClick:j[11]||(j[11]=()=>L(1))},{default:ie(()=>[N(Ga)]),_:1}),N(cr,{transparent:"",onClick:j[12]||(j[12]=()=>a.value=!0)}),e.touchDevice?ae("",!0):(b(),se(ur,{key:1,transparent:"",onRequestFullScreen:j[13]||(j[13]=()=>{var fe,ve;return(ve=(fe=i.value)==null?void 0:fe.rootEl)==null?void 0:ve.requestFullscreen()})})),N(ar,{transparent:"","tour-message":"Press here to start listening",playing:U(A).isPlaying.value,class:"order-2 md:order-4",onClick:j[14]||(j[14]=()=>U(A).toggle())},null,8,["playing"])]),progress:ie(()=>{var fe,ve;return[((fe=e.defaultPreferences)==null?void 0:fe.progressSize)!==0?(b(),se(wr,{key:0,value:c.value,height:((ve=e.defaultPreferences)==null?void 0:ve.progressSize)??2,rtl:l,opacity:e.defaultPreferences.contrast},null,8,["value","height","opacity"])):ae("",!0)]}),_:1},8,["visible","hide-top-controls","space-top"]),u.value?ae("",!0):(b(),se(yr,{key:1,playing:U(A).isPlaying.value},null,8,["playing"])),N(Sr,{modelValue:a.value,"onUpdate:modelValue":j[18]||(j[18]=fe=>a.value=fe),name:(xe=e.raw)==null?void 0:xe.title.name,"space-top":(e.spaceTop??0)+80,"enable-default-preferences":!e.touchDevice||!!e.appVersion,onMore:j[19]||(j[19]=()=>o("openDefaultPreferences"))},{"tab-preferences":ie(()=>{var fe;return[N(gr,{modelValue:S.value,"onUpdate:modelValue":j[15]||(j[15]=ve=>S.value=ve),"default-preferences":e.defaultPreferences,"enable-reset":!e.touchDevice||!!e.appVersion,"force-font-family":(fe=U(r))==null?void 0:fe.fontFamily,onReset:j[16]||(j[16]=()=>O.value=null)},null,8,["modelValue","default-preferences","enable-reset","force-font-family"])]}),"tab-default":ie(()=>[N(mr,{"is-novel":"","model-value":e.defaultPreferences,"onUpdate:modelValue":j[17]||(j[17]=fe=>o("defaultPreferencesChanged",fe))},null,8,["model-value"])]),_:1},8,["modelValue","name","space-top","enable-default-preferences"]),ke(Z.$slots,"default")]}),_:3},8,["hide-cursor","style"])):ae("",!0)}}),u0=Object.freeze(Object.defineProperty({__proto__:null,default:Qa},Symbol.toStringTag,{value:"Module"}));function d0({raw:e,spec:t,siteMeta:n,offlineMode:o,onSelect:i}){var W,L,Y;const{vol:r,inferVol:s,chap:l,title:a,slug:u,basePath:c}=e,d=typeof(t==null?void 0:t.chapter)=="string"?{sel:t.chapter}:t==null?void 0:t.chapter;let f=-1;async function p($,X){if(o){i({...$});return}if($.slug){w($.slug,X);return}if($.elIndex===void 0||!(d!=null&&d.sel))return;let J=null;document.querySelector(d.sel)||(d!=null&&d.trigger&&(J=document.querySelector(d.trigger)),J&&(wn(J),await new Promise(x=>setTimeout(()=>x(),50))));const T=d&&d.sel&&!d.url?document.querySelectorAll(d.sel):void 0;T!=null&&T[$.elIndex]&&(wn(T[$.elIndex]),J&&document.querySelector(d.sel)&&wn(J))}function w($,X){const J=f0(c,$,(n==null?void 0:n.trailing)??!0);X?window.open(J,"_blank","noopener"):location.href=J}function g($){const X=k[$];return X?J=>p(X,J):void 0}function O($,X,J){if(X)w(X,J);else if($){const T=document.querySelector($);T&&wn(T,{preventDefault:!1})}}const S=r??s,A=d==null?void 0:d.url,F=((W=a.chapters)==null?void 0:W.filter($=>$.slug||!A&&$.elIndex!==void 0))??[],k=F.length>1?F:[],m=(L=e.prev)==null?void 0:L.slug,P=(Y=e.next)==null?void 0:Y.slug,C=t!=null&&t.prev&&typeof t.prev!="string"?t.prev.btn??t.prev.sel:void 0,B=t!=null&&t.next&&typeof t.next!="string"?t.next.btn??t.next.sel:void 0;let y=m||C&&!k.length&&document.body.querySelector(C)?$=>O(C,m,$):void 0,I=P||B&&!k.length&&document.body.querySelector(B)?$=>O(B,P,$):void 0;if(k.length){if(A&&(f=k.findIndex($=>$.slug===e.slug)),f===-1&&(f=k.findIndex($=>($.vol??$.inferVol)===S&&$.chap===l)),A&&f===-1&&(f=k.findIndex($=>$.slug&&u.startsWith(`${$.slug}-`)&&u.length-$.slug.length>3)),f!==-1)y??(y=g(f+1)),I??(I=g(f-1));else if(!m&&!P){const $=k.findIndex(X=>{const J=X.vol??X.inferVol;return S===void 0||J===void 0||S===J?X.chap<l:J<S});$!==-1?(y=g($),I=g($-1)):I=g(k.length-1)}}return{activeIndex:f,activeLabel:ec({vol:r,chap:l}),prev:y,next:I,chapters:k.map($=>({label:ec($),select:X=>p($,X)}))}}function ec({vol:e,chap:t}){return e==null?`Ch.${t}`:`Vol.${e} ch.${t}`}function f0(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 p0(e){return e instanceof Error?JSON.stringify(e,Object.getOwnPropertyNames(e)):e}const tc=be(he({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","timeout","ready","pageChanged","playingChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","openDefaultPreferences","defaultPreferencesChanged","controlsVisibilityChanged"],setup(e,{emit:t}){var P,C,B;const n=e,o=t;let i=!1,r=0;Ps((y,I,W)=>{if(!i){i=!0;const Y=`(3.7.0) ${(I==null?void 0:I.$options.name)??(I==null?void 0:I.$options.__name)??(I==null?void 0:I.$options.__file)}.${W}: ${p0(y)}`;o("crash",Y)}return!1});const s=ne(n.raw?n.raw.contentType??Xt.manga:void 0);s.value===void 0&&Wd(((P=n.spec)==null?void 0:P.content)??"body",{paraSel:(C=n.spec)==null?void 0:C.para,include:(B=n.siteMeta)==null?void 0:B.contentTypes,timeoutMs:3e3}).then(y=>{y?s.value=y:o("error")});const l=ne(!1),a=ne(n.tourEnabled),u=_f({touchDevice:n.touchDevice}),c=Pf(n.page,n.isAutoShow),d=Q(()=>n.raw?d0({raw:n.raw,spec:n.spec,siteMeta:n.siteMeta,offlineMode:n.offlineMode,onSelect:y=>o("selectChapter",y)}):void 0);Tf().addListener({onKeyDown:y=>{switch(y.key){case"Escape":y.preventDefault();break}},onKeyUp:y=>{switch(y.key){case"h":k();break}}}),kf(()=>o("hapticFeedback")),Sf();const p=vt(y=>o("pageChanged",y),300),w=ne(g(n.defaultPreferences));de(()=>n.defaultPreferences,y=>w.value=g(y));function g(y){const I=(y==null?void 0:y.fontSize)??16,W=Math.max(I,(y==null?void 0:y.lineHeight)??28);return{...y,speed:(y==null?void 0:y.speed)??1,progressSize:(y==null?void 0:y.progressSize)??2,autoNextSeconds:(y==null?void 0:y.autoNextSeconds)??5,hideControlsEvent:(y==null?void 0:y.hideControlsEvent)??sn.firstMove,autoPlay:(y==null?void 0:y.autoPlay)??!1,pinchToZoom:(y==null?void 0:y.pinchToZoom)??!0,doubleTapZoom:(y==null?void 0:y.doubleTapZoom)??!0,readerStyle:(y==null?void 0:y.readerStyle)??Bt.longStrip,direction:(y==null?void 0:y.direction)??tt.vertical,gap:(y==null?void 0:y.gap)??0,fontFamily:(y==null?void 0:y.fontFamily)??ti[0].value,contrast:(y==null?void 0:y.contrast)??.8,fontSize:I,lineHeight:W}}function O(y){w.value=g(y),o("defaultPreferencesChanged",y)}function S(){if(n.offlineMode){o("pressedBack");return}If(),o("dispose")}function A(y){const I=Math.floor(y*100)/100;I!==Math.floor(c.value*100)/100&&(c.value=y,!(r>=I)&&(r=I,p(I)))}function F(){n.entryId?o("openEntry",n.entryId):o("addEntry")}function k(y){l.value!==y&&(l.value=y??!l.value)}function m(){o("error"),S()}return(y,I)=>s.value!==void 0?(b(),se(Es(s.value===U(Xt).novel?Qa:Ua),Mn({key:0,ref:"root"},n,{page:U(c),busy:U(u),"chapter-nav-data":d.value,"default-preferences":w.value,onOpenDefaultPreferences:I[1]||(I[1]=()=>o("openDefaultPreferences")),onTimeout:I[2]||(I[2]=()=>o("timeout")),onReady:I[3]||(I[3]=()=>o("ready")),onFinished:I[4]||(I[4]=()=>o("finished")),onPlayingChanged:I[5]||(I[5]=W=>o("playingChanged",W)),onControlsVisibilityChanged:I[6]||(I[6]=W=>o("controlsVisibilityChanged",W)),onPressedBack:I[7]||(I[7]=()=>o("pressedBack")),onGetHiddenChapters:I[8]||(I[8]=()=>o("getHiddenChapters")),onError:m,onHideReader:S,onPageChanged:A,onClickEntryButton:F,onDefaultPreferencesChanged:O,onOpenHelpScreen:I[9]||(I[9]=()=>k(!0))}),{default:ie(()=>[l.value?(b(),se(Ul,{key:0,"touch-device":e.touchDevice,onHide:k},null,8,["touch-device"])):ae("",!0),a.value?(b(),se(Kl,{key:1,onHide:I[0]||(I[0]=()=>a.value=!1)})):ae("",!0)]),_:1},16,["page","busy","chapter-nav-data","default-preferences"])):ae("",!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%}.h-screen{height:100vh}.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}.overscroll-none{overscroll-behavior:none}.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-none{background-image:none}.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\\: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\\: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}.xl\\:px-20{padding-left:80px;padding-right:80px}}']]]),h0=Object.freeze(Object.defineProperty({__proto__:null,default:tc},Symbol.toStringTag,{value:"Module"})),g0={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},m0={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},v0={class:"flex justify-between items-end"},b0={class:"inline-block children-pointer-events-auto"},y0={class:"inline-flex flex-col items-end gap-4 children-pointer-events-auto"},w0={class:"fixed pointer-events-none left-0 right-0 bottom-0"},x0={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"},_0=Object.freeze(Object.defineProperty({__proto__:null,default:be(he({__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=ne(null);return t({rootEl:o}),(i,r)=>He((b(),z("dialog",g0,[K("div",{ref_key:"rootEl",ref:o,id:"reader-layout",class:ue({"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?(b(),z("div",m0,[N(si)])):ae("",!0),ke(i.$slots,"default"),K("div",{id:"controls",class:ue(["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}])},[K("div",{class:"flex gap-1 items-center children-pointer-events-auto relative z-30 flex-shrink-0 2xs:gap-3",style:Te({paddingTop:`${e.spaceTop||0}px`})},[ke(i.$slots,"top-controls")],4),K("div",v0,[K("div",b0,[ke(i.$slots,"bottom-left-controls")]),K("div",y0,[ke(i.$slots,"bottom-right-controls")])]),K("div",w0,[ke(i.$slots,"progress")])],2),e.controlsVisible||e.zooming?(b(),z("div",x0,[ke(i.$slots,"reset-zoom")])):ae("",!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"})),S0={},k0={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function C0(e,t){return b(),z("svg",k0,[...t[0]||(t[0]=[K("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 T0=Object.freeze(Object.defineProperty({__proto__:null,default:be(S0,[["render",C0]])},Symbol.toStringTag,{value:"Module"})),P0="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}",ln="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},Ct={promise:void 0,data:So({...$r})};async function I0(e){var c,d,f,p,w;let t=!1,n=!1,o,i,r,s;const l=!!e.spaceTop||!!e.isAutoShow&&!!e.page||!!(!((d=(c=e.raw)==null?void 0:c.imgs)!=null&&d.length)&&((p=(f=e.spec)==null?void 0:f.paging)!=null&&p.total)&&Ma(e.spec.paging.total));(w=e.spec)!=null&&w.paging&&!l&&(e.spec={...e.spec,paging:void 0});const a=()=>{t||(t=!0,clearInterval(o),o=void 0,i!=null&&i.isConnected&&document.body.removeChild(i),document.documentElement.classList.remove(ln),Ct.data.touchDevice||Object.assign(Ct.data,$r),Ct.promise=void 0,ro.clear())};if(Object.assign(Ct.data,$r,e.appVersion?e:nc(e),{immediate:l,onReady(){l||(r==null||r(),document.documentElement.classList.add(ln))},onError(){var g,O;a(),n?((g=e.onDispose)==null||g.call(e),(O=e.onError)==null||O.call(e)):s==null||s()},onDispose:()=>{var g;a(),(g=e==null?void 0:e.onDispose)==null||g.call(e)},onControlsVisibilityChanged(g){var O,S;(O=e.onFullScreenChanged)==null||O.call(e,!g),(S=e.onControlsVisibilityChanged)==null||S.call(e,g)}}),Ct.promise)return await Ct.promise;const u=g=>{Object.assign(Ct.data,Ct.data.appVersion?g:nc(g))};return Ct.promise=new Promise(g=>{r=()=>{n||(n=!0,g({updateArgs:u,dispose:a,back:()=>ro.trigger(),triggerDoubleTap:kg}))},s=()=>{n||g(void 0)},E0().then(()=>{if(t){s==null||s();return}i=document.createElement(ln),l?(document.documentElement.classList.add(ln),document.body.appendChild(i),setTimeout(()=>r==null?void 0:r())):document.body.appendChild(i);let O=0;o=setInterval(()=>{if(++O===30||t){clearInterval(o),o=void 0;return}i.isConnected||(document.documentElement.classList.add(ln),document.body.appendChild(i))},100)})}),await Ct.promise}function nc(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 E0(){if(window.customElements.get(ln))return;const e=await M0();if(window.customElements.get(ln))return;const t=document.createElement("style"),n=P0;t.appendChild(document.createTextNode(n)),document.head.appendChild(t);const o=Od({styles:[e],data:()=>({readerData:Ct.data}),render(){return fl(tc,this.readerData)}});window.customElements.define(ln,o)}async function M0(){const e=Object.assign({"./App.vue":h0,"./GearSecond.vue":qm,"./GearThird.vue":u0,"./components/AutoNext.vue":Hf,"./components/ButtonWebFullScreen.vue":jp,"./components/ChapterNav.vue":ch,"./components/DefaultPreferencesForm.vue":Wh,"./components/DirectionToast.vue":Gh,"./components/GearControlsLayout.vue":eg,"./components/GearLayout.vue":ag,"./components/GearThirdControlsLayout.vue":e0,"./components/GesturesContainer.vue":Cg,"./components/HelpScreen.vue":bf,"./components/MangaPreferencesForm.vue":bg,"./components/NovelBody.vue":c0,"./components/NovelPreferencesForm.vue":Nh,"./components/PageNav.vue":yg,"./components/PauseToast.vue":wg,"./components/ProgressBar.vue":_g,"./components/ReaderBody.vue":Og,"./components/ReaderImg.vue":Pg,"./components/ReaderLayout.vue":_0,"./components/ReaderTour.vue":xf,"./components/SettingsBottomSheet.vue":Gg,"./components/TapZonePreview.vue":Yh,"./components/base/BaseButton.vue":$f,"./components/base/BottomSheet.vue":Lg,"./components/base/ButtonDropdown.vue":Qp,"./components/base/ButtonIcon.vue":Ff,"./components/base/ButtonOutline.vue":Oh,"./components/base/DropdownMenu.vue":Rp,"./components/base/InputPercentage.vue":fh,"./components/base/InputSelect.vue":gh,"./components/base/InputSwitcher.vue":yh,"./components/base/LoadingIndicator.vue":rg,"./components/base/TabBar.vue":Ng,"./components/base/TableField.vue":xh,"./components/buttons/ButtonBack.vue":Zf,"./components/buttons/ButtonEntry.vue":op,"./components/buttons/ButtonHide.vue":ap,"./components/buttons/ButtonPlay.vue":vp,"./components/buttons/ButtonResetZoom.vue":kp,"./components/buttons/ButtonSettings.vue":Ep,"./components/fields/FieldContrast.vue":_h,"./components/fields/FieldFontFamily.vue":$h,"./components/icons/IconBack.vue":Kf,"./components/icons/IconBookmarkNew.vue":np,"./components/icons/IconBookmarked.vue":Jf,"./components/icons/IconChevronLeft.vue":oh,"./components/icons/IconChevronRight.vue":lh,"./components/icons/IconClose.vue":Ag,"./components/icons/IconDouble.vue":fg,"./components/icons/IconDoubleSkip.vue":mg,"./components/icons/IconExclamationCircle.vue":T0,"./components/icons/IconFullscreen.vue":Dp,"./components/icons/IconFullscreenExit.vue":Lp,"./components/icons/IconHelp.vue":Fg,"./components/icons/IconLandscape.vue":Th,"./components/icons/IconLoading.vue":qp,"./components/icons/IconMoreVert.vue":Kg,"./components/icons/IconNext.vue":Zh,"./components/icons/IconPause.vue":fp,"./components/icons/IconPlay.vue":mp,"./components/icons/IconPlus.vue":Bf,"./components/icons/IconPortrait.vue":Mh,"./components/icons/IconReaderExit.vue":lp,"./components/icons/IconSettings.vue":Ip,"./components/icons/IconTextDecre.vue":i0,"./components/icons/IconTextIncre.vue":a0,"./components/icons/IconTriangle.vue":Yp,"./components/icons/IconZoom.vue":xp}),t=[];for(const n in e){const o=e[n];t.push(o.default.styles)}return t.join("")}return I0});