gear-second 1.28.0 → 1.28.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.
- package/index.js +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -17,4 +17,4 @@
|
|
|
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 mi;const _s=typeof window<"u"&&window.trustedTypes;if(_s)try{mi=_s.createPolicy("vue",{createHTML:e=>e})}catch{}const Ss=mi?e=>mi.createHTML(e):e=>e,Vc="http://www.w3.org/2000/svg",Wc="http://www.w3.org/1998/Math/MathML",$t=typeof document<"u"?document:null,ks=$t&&$t.createElement("template"),Uc={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"?$t.createElementNS(Vc,e):t==="mathml"?$t.createElementNS(Wc,e):n?$t.createElement(e,{is:n}):$t.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>$t.createTextNode(e),createComment:e=>$t.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>$t.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{ks.innerHTML=Ss(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const a=ks.content;if(o==="svg"||o==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ft="transition",Rn="animation",Bn=Symbol("_vtc"),Cs={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},Kc=Se({},Ir,Cs),To=(e=>(e.displayName="Transition",e.props=Kc,e))((e,{slots:t})=>xs(Fa,qc(e),t)),en=(e,t=[])=>{ie(e)?e.forEach(n=>n(...t)):e&&e(...t)},Ts=e=>e?ie(e)?e.some(t=>t.length>1):e.length>1:!1;function qc(e){const t={};for(const m in e)m in Cs||(t[m]=e[m]);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:a=`${n}-enter-to`,appearFromClass:l=r,appearActiveClass:u=s,appearToClass:c=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=e,x=Yc(i),C=x&&x[0],B=x&&x[1],{onBeforeEnter:H,onEnter:Z,onEnterCancelled:W,onLeave:I,onLeaveCancelled:y,onBeforeAppear:v=H,onAppear:z=Z,onAppearCancelled:N=W}=t,k=(m,_,U,X)=>{m._enterCancelled=X,tn(m,_?c:a),tn(m,_?u:s),U&&U()},D=(m,_)=>{m._isLeaving=!1,tn(m,f),tn(m,g),tn(m,p),_&&_()},Q=m=>(_,U)=>{const X=m?z:Z,w=()=>k(_,m,U);en(X,[_,w]),Is(()=>{tn(_,m?l:r),At(_,m?c:a),Ts(X)||Ms(_,o,C,w)})};return Se(t,{onBeforeEnter(m){en(H,[m]),At(m,r),At(m,s)},onBeforeAppear(m){en(v,[m]),At(m,l),At(m,u)},onEnter:Q(!1),onAppear:Q(!0),onLeave(m,_){m._isLeaving=!0;const U=()=>D(m,_);At(m,f),m._enterCancelled?(At(m,p),Os(m)):(Os(m),At(m,p)),Is(()=>{m._isLeaving&&(tn(m,f),At(m,g),Ts(I)||Ms(m,o,B,U))}),en(I,[m,U])},onEnterCancelled(m){k(m,!1,void 0,!0),en(W,[m])},onAppearCancelled(m){k(m,!0,void 0,!0),en(N,[m])},onLeaveCancelled(m){D(m),en(y,[m])}})}function Yc(e){if(e==null)return null;if(xe(e))return[vi(e.enter),vi(e.leave)];{const t=vi(e);return[t,t]}}function vi(e){return Ro(e)}function At(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Bn]||(e[Bn]=new Set)).add(t)}function tn(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Bn];n&&(n.delete(t),n.size||(e[Bn]=void 0))}function Is(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Zc=0;function Ms(e,t,n,o){const i=e._endId=++Zc,r=()=>{i===e._endId&&o()};if(n!=null)return setTimeout(r,n);const{type:s,timeout:a,propCount:l}=Xc(e,t);if(!s)return o();const u=s+"end";let c=0;const f=()=>{e.removeEventListener(u,p),r()},p=g=>{g.target===e&&++c>=l&&f()};setTimeout(()=>{c<l&&f()},a+1),e.addEventListener(u,p)}function Xc(e,t){const n=window.getComputedStyle(e),o=x=>(n[x]||"").split(", "),i=o(`${Ft}Delay`),r=o(`${Ft}Duration`),s=Es(i,r),a=o(`${Rn}Delay`),l=o(`${Rn}Duration`),u=Es(a,l);let c=null,f=0,p=0;t===Ft?s>0&&(c=Ft,f=s,p=r.length):t===Rn?u>0&&(c=Rn,f=u,p=l.length):(f=Math.max(s,u),c=f>0?s>u?Ft:Rn:null,p=c?c===Ft?r.length:l.length:0);const g=c===Ft&&/\b(?:transform|all)(?:,|$)/.test(o(`${Ft}Property`).toString());return{type:c,timeout:f,propCount:p,hasTransform:g}}function Es(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>Ps(n)+Ps(e[o])))}function Ps(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Os(e){return(e?e.ownerDocument:document).body.offsetHeight}function Gc(e,t,n){const o=e[Bn];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Io=Symbol("_vod"),$s=Symbol("_vsh"),Jc={name:"show",beforeMount(e,{value:t},{transition:n}){e[Io]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Fn(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),Fn(e,!0),o.enter(e)):o.leave(e,()=>{Fn(e,!1)}):Fn(e,t))},beforeUnmount(e,{value:t}){Fn(e,t)}};function Fn(e,t){e.style.display=t?e[Io]:"none",e[$s]=!t}const Qc=Symbol(""),eu=/(?:^|;)\s*display\s*:/;function tu(e,t,n){const o=e.style,i=ke(n);let r=!1;if(n&&!i){if(t)if(ke(t))for(const s of t.split(";")){const a=s.slice(0,s.indexOf(":")).trim();n[a]==null&&Mo(o,a,"")}else for(const s in t)n[s]==null&&Mo(o,s,"");for(const s in n)s==="display"&&(r=!0),Mo(o,s,n[s])}else if(i){if(t!==n){const s=o[Qc];s&&(n+=";"+s),o.cssText=n,r=eu.test(n)}}else t&&e.removeAttribute("style");Io in e&&(e[Io]=r?o.display:"",e[$s]&&(o.display="none"))}const As=/\s*!important$/;function Mo(e,t,n){if(ie(n))n.forEach(o=>Mo(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=nu(e,t);As.test(n)?e.setProperty(Ye(o),n.replace(As,""),"important"):e[o]=n}}const Ls=["Webkit","Moz","ms"],bi={};function nu(e,t){const n=bi[t];if(n)return n;let o=Re(t);if(o!=="filter"&&o in e)return bi[t]=o;o=Zn(o);for(let i=0;i<Ls.length;i++){const r=Ls[i]+o;if(r in e)return bi[t]=r}return t}const zs="http://www.w3.org/1999/xlink";function Ds(e,t,n,o,i,r=ea(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(zs,t.slice(6,t.length)):e.setAttributeNS(zs,t,n):n==null||r&&!Xi(n)?e.removeAttribute(t):e.setAttribute(t,r?"":kt(n)?String(n):n)}function Ns(e,t,n,o,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Ss(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Xi(n):n==null&&a==="string"?(n="",s=!0):a==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(i||t)}function gn(e,t,n,o){e.addEventListener(t,n,o)}function ou(e,t,n,o){e.removeEventListener(t,n,o)}const js=Symbol("_vei");function iu(e,t,n,o,i=null){const r=e[js]||(e[js]={}),s=r[t];if(o&&s)s.value=o;else{const[a,l]=ru(t);if(o){const u=r[t]=au(o,i);gn(e,a,u,l)}else s&&(ou(e,a,s,l),r[t]=void 0)}}const Rs=/(?:Once|Passive|Capture)$/;function ru(e){let t;if(Rs.test(e)){t={};let o;for(;o=e.match(Rs);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Ye(e.slice(2)),t]}let yi=0;const su=Promise.resolve(),lu=()=>yi||(su.then(()=>yi=0),yi=Date.now());function au(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;ft(cu(o,n.value),t,5,[o])};return n.value=e,n.attached=lu(),n}function cu(e,t){if(ie(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>i=>!i._stopped&&o&&o(i))}else return t}const Bs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,uu=(e,t,n,o,i,r)=>{const s=i==="svg";t==="class"?Gc(e,o,s):t==="style"?tu(e,n,o):Un(t)?Lo(t)||iu(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):fu(e,t,o,s))?(Ns(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ds(e,t,o,s,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ke(o))?Ns(e,Re(t),o,r,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Ds(e,t,o,s))};function fu(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Bs(t)&&ae(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 Bs(t)&&ke(n)?!1:t in e}const Fs={};function du(e,t,n){let o=Te(e,t);qn(o)&&(o=Se({},o,t));class i extends wi{constructor(s){super(o,s,n)}}return i.def=o,i}const pu=typeof HTMLElement<"u"?HTMLElement:class{};class wi extends pu{constructor(t,n={},o=Ys){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!==Ys?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Se({},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 wi){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,Mt(()=>{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 a;if(r&&!ie(r))for(const l in r){const u=r[l];(u===Number||u&&u.type===Number)&&(l in this._props&&(this._props[l]=Ro(this._props[l])),(a||(a=Object.create(null)))[Re(l)]=!0)}this._numberProps=a,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)ve(this,o)||Object.defineProperty(this,o,{get:()=>Y(n[o])})}_resolveProps(t){const{props:n}=t,o=ie(n)?n:Object.keys(n||{});for(const i of Object.keys(this))i[0]!=="_"&&o.includes(i)&&this._setProp(i,this[i]);for(const i of o.map(Re))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(r){this._setProp(i,r,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):Fs;const i=Re(t);n&&this._numberProps&&this._numberProps[i]&&(o=Ro(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===Fs?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(Ye(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Ye(t),n+""):n||this.removeAttribute(Ye(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),wu(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=ee(this._def,Se(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,qn(s[0])?Se({detail:s},s[0]):{detail:s}))};o.emit=(r,...s)=>{i(r,s),Ye(r)!==r&&i(Ye(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],a=i.parentNode;if(s)for(const l of s){if(n&&l.nodeType===1){const u=n+"-s",c=document.createTreeWalker(l,1);l.setAttribute(u,"");let f;for(;f=c.nextNode();)f.setAttribute(u,"")}a.insertBefore(l,i)}else for(;i.firstChild;)a.insertBefore(i.firstChild,i);a.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 Hs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ie(t)?n=>Xn(t,n):t};function hu(e){e.target.composing=!0}function Vs(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const xi=Symbol("_assign");function Ws(e,t,n){return t&&(e=e.trim()),n&&(e=jo(e)),e}const gu={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[xi]=Hs(i);const r=o||i.props&&i.props.type==="number";gn(e,t?"change":"input",s=>{s.target.composing||e[xi](Ws(e.value,n,r))}),(n||r)&&gn(e,"change",()=>{e.value=Ws(e.value,n,r)}),t||(gn(e,"compositionstart",hu),gn(e,"compositionend",Vs),gn(e,"change",Vs))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:i,number:r}},s){if(e[xi]=Hs(s),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?jo(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(o&&t===n||i&&e.value.trim()===l)||(e.value=l))}},mu=["ctrl","shift","alt","meta"],vu={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)=>mu.some(n=>e[`${n}Key`]&&!t.includes(n))},We=(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 a=vu[t[s]];if(a&&a(i,t))return}return e(i,...r)})},bu={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Us=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=i=>{if(!("key"in i))return;const r=Ye(i.key);if(t.some(s=>s===r||bu[s]===r))return e(i)})},yu=Se({patchProp:uu},Uc);let Ks;function qs(){return Ks||(Ks=pc(yu))}const wu=(...e)=>{qs().render(...e)},Ys=(...e)=>{const t=qs().createApp(...e),{mount:n}=t;return t.mount=o=>{const i=_u(o);if(!i)return;const r=t._component;!ae(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const s=n(i,!1,xu(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function xu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function _u(e){return ke(e)?document.querySelector(e):e}function _i(e,t){return Fo()?(na(e,t),!0):!1}const Si=new WeakMap,Su=(...e)=>{var t;const n=e[0],o=(t=Qt())===null||t===void 0?void 0:t.proxy,i=o??Fo();if(i==null&&!qr())throw new Error("injectLocal must be called in setup");return i&&Si.has(i)&&n in Si.get(i)?Si.get(i)[n]:Ot(...e)},Zs=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ku=e=>e!=null,Cu=Object.prototype.toString,Tu=e=>Cu.call(e)==="[object Object]",nn=()=>{};function Xs(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}function Iu(e,t={}){let n,o,i=nn;const r=l=>{clearTimeout(l),i(),i=nn};let s;return l=>{const u=ut(e),c=ut(t.maxWait);return n&&r(n),u<=0||c!==void 0&&c<=0?(o&&(r(o),o=void 0),Promise.resolve(l())):new Promise((f,p)=>{i=t.rejectOnCancel?p:f,s=l,c&&!o&&(o=setTimeout(()=>{n&&r(n),o=void 0,f(s())},c)),n=setTimeout(()=>{o&&r(o),o=void 0,f(l())},u)})}}function Mu(...e){let t=0,n,o=!0,i=nn,r,s,a,l,u;!Ce(e[0])&&typeof e[0]=="object"?{delay:s,trailing:a=!0,leading:l=!0,rejectOnCancel:u=!1}=e[0]:[s,a=!0,l=!0,u=!1]=e;const c=()=>{n&&(clearTimeout(n),n=void 0,i(),i=nn)};return p=>{const g=ut(s),x=Date.now()-t,C=()=>r=p();return c(),g<=0?(t=Date.now(),C()):(x>g?(t=Date.now(),(l||!o)&&C()):a&&(r=new Promise((B,H)=>{i=u?H:B,n=setTimeout(()=>{t=Date.now(),o=!0,B(C()),c()},Math.max(0,g-x))})),!l&&!n&&(n=setTimeout(()=>o=!0,g)),o=!1,r)}}function Gs(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function Hn(e){return Array.isArray(e)?e:[e]}function Eu(e){return Qt()}function tt(e,t=200,n={}){return Xs(Iu(t,n),e)}function Js(e,t=200,n=!1,o=!0,i=!1){return Xs(Mu(t,n,o,i),e)}function Qs(e,t=!0,n){Eu()?Ge(e,n):t?e():Mt(e)}function Pu(e,t,n){return pe(e,t,{...n,immediate:!0})}const mn=Zs?window:void 0,Ou=Zs?window.document:void 0;function wt(e){var t;const n=ut(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function Lt(...e){const t=[],n=()=>{t.forEach(a=>a()),t.length=0},o=(a,l,u,c)=>(a.addEventListener(l,u,c),()=>a.removeEventListener(l,u,c)),i=oe(()=>{const a=Hn(ut(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),r=Pu(()=>{var a,l;return[(a=(l=i.value)===null||l===void 0?void 0:l.map(u=>wt(u)))!==null&&a!==void 0?a:[mn].filter(u=>u!=null),Hn(ut(i.value?e[1]:e[0])),Hn(Y(i.value?e[2]:e[1])),ut(i.value?e[3]:e[2])]},([a,l,u,c])=>{if(n(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(u!=null&&u.length))return;const f=Tu(c)?{...c}:c;t.push(...a.flatMap(p=>l.flatMap(g=>u.map(x=>o(p,g,x,f)))))},{flush:"post"}),s=()=>{r(),n()};return _i(n),s}function $u(){const e=ct(!1),t=Qt();return t&&Ge(()=>{e.value=!0},t),e}function ki(e){const t=$u();return oe(()=>(t.value,!!e()))}const Au=Symbol("vueuse-ssr-width");function Lu(){const e=qr()?Su(Au,null):null;return typeof e=="number"?e:void 0}function zu(e,t={}){const{window:n=mn,ssrWidth:o=Lu()}=t,i=ki(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),r=ct(typeof o=="number"),s=ct(),a=ct(!1),l=u=>{a.value=u.matches};return ss(()=>{if(r.value){r.value=!i.value,a.value=ut(e).split(",").some(u=>{const c=u.includes("not all"),f=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),p=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(f||p);return f&&g&&(g=o>=Gs(f[1])),p&&g&&(g=o<=Gs(p[1])),c?!g:g});return}i.value&&(s.value=n.matchMedia(ut(e)),a.value=s.value.matches)}),Lt(s,"change",l,{passive:!0}),oe(()=>a.value)}function Ci(e={}){const{document:t=Ou}=e;if(!t)return ct("visible");const n=ct(t.visibilityState);return Lt(t,"visibilitychange",()=>{n.value=t.visibilityState},{passive:!0}),n}function Du(e,t,n={}){const{window:o=mn,...i}=n;let r;const s=ki(()=>o&&"ResizeObserver"in o),a=()=>{r&&(r.disconnect(),r=void 0)},l=pe(oe(()=>{const c=ut(e);return Array.isArray(c)?c.map(f=>wt(f)):[wt(c)]}),c=>{if(a(),s.value&&o){r=new ResizeObserver(t);for(const f of c)f&&r.observe(f,i)}},{immediate:!0,flush:"post"}),u=()=>{a(),l()};return _i(u),{isSupported:s,stop:u}}function el(e,t={width:0,height:0},n={}){const{window:o=mn,box:i="content-box"}=n,r=oe(()=>{var f;return(f=wt(e))===null||f===void 0||(f=f.namespaceURI)===null||f===void 0?void 0:f.includes("svg")}),s=ct(t.width),a=ct(t.height),{stop:l}=Du(e,([f])=>{const p=i==="border-box"?f.borderBoxSize:i==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(o&&r.value){const g=wt(e);if(g){const x=g.getBoundingClientRect();s.value=x.width,a.value=x.height}}else if(p){const g=Hn(p);s.value=g.reduce((x,{inlineSize:C})=>x+C,0),a.value=g.reduce((x,{blockSize:C})=>x+C,0)}else s.value=f.contentRect.width,a.value=f.contentRect.height},n);Qs(()=>{const f=wt(e);f&&(s.value="offsetWidth"in f?f.offsetWidth:t.width,a.value="offsetHeight"in f?f.offsetHeight:t.height)});const u=pe(()=>wt(e),f=>{s.value=f?t.width:0,a.value=f?t.height:0});function c(){l(),u()}return{width:s,height:a,stop:c}}function Ti(e,t,n={}){const{root:o,rootMargin:i="0px",threshold:r=0,window:s=mn,immediate:a=!0}=n,l=ki(()=>s&&"IntersectionObserver"in s),u=oe(()=>Hn(ut(e)).map(wt).filter(ku));let c=nn;const f=ct(a),p=l.value?pe(()=>[u.value,wt(o),f.value],([x,C])=>{if(c(),!f.value||!x.length)return;const B=new IntersectionObserver(t,{root:wt(C),rootMargin:i,threshold:r});x.forEach(H=>H&&B.observe(H)),c=()=>{B.disconnect(),c=nn}},{immediate:a,flush:"post"}):nn,g=()=>{c(),p(),f.value=!1};return _i(g),{isSupported:l,isActive:f,pause(){c(),f.value=!1},resume(){f.value=!0},stop:g}}function Ii(e={}){const{window:t=mn,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:r=!0,type:s="inner"}=e,a=ct(n),l=ct(o),u=()=>{if(t)if(s==="outer")a.value=t.outerWidth,l.value=t.outerHeight;else if(s==="visual"&&t.visualViewport){const{width:f,height:p,scale:g}=t.visualViewport;a.value=Math.round(f*g),l.value=Math.round(p*g)}else r?(a.value=t.innerWidth,l.value=t.innerHeight):(a.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight)};u(),Qs(u);const c={passive:!0};return Lt("resize",u,c),t&&s==="visual"&&t.visualViewport&&Lt(t.visualViewport,"resize",u,c),i&&pe(zu("(orientation: portrait)"),()=>u()),{width:a,height:l}}function Nu(e){On("hapticFeedback",e)}function Mi(){return Ot("hapticFeedback")}const ju=(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(l,20);a();function a(){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 l(){const u=+n||50;i<=u?(i++,r-=.65/u,o.style.transform=`scale(${i})`,o.style.opacity=`${r}`):(o.remove(),clearInterval(s))}},vn={mounted:(e,t)=>{e.style.position="relative",e.style.overflow="hidden",e.setAttribute("data-ripple",t.value),e.addEventListener("click",n=>ju(e,n))},updated:(e,t)=>{e.setAttribute("data-ripple",t.value)}},Ru={class:"inline-flex p-6 gap-6 text-base text-stone-300 select-none"},Bu={key:0,class:"inline-block rounded-full relative w-28 h-12 overflow-hidden"},Fu={class:"absolute bottom-0 left-0 right-0 flex justify-center pb-7 md:pb-6 lg:pb-4"},Hu=Te({__name:"AutoNext",props:{hasNext:{type:Boolean},offlineMode:{type:Boolean},seconds:{type:Number}},emits:["next","hide"],setup(e,{emit:t}){const n=e,o=t,i=te(null),r=te(null),s=te(!1),a=te(!1),l=te(n.seconds),u=te(n.seconds<=0),c=te(n.seconds),f=Mi();Ge(()=>{let x;Ti(r,C=>{a.value=C.some(B=>B.isIntersecting),u.value=n.seconds<=0,l.value=n.seconds,c.value=n.seconds,x&&(clearInterval(x),x=void 0),!(!a.value||u.value)&&(x=setInterval(()=>{l.value-=1,l.value<=0&&(clearInterval(x),x=void 0,o("next"))},1e3))}),Ti(i,C=>{s.value=C.some(B=>B.isIntersecting)}),Zt(()=>x&&clearInterval(x))});function p(){o("next"),f()}function g(){o("hide")}return(x,C)=>(O(),q("div",{ref_key:"root",ref:i,class:"h-full w-full flex justify-center items-center relative"},[vt(G("div",Ru,[e.hasNext?(O(),q("div",Bu,[a.value?(O(),q("div",{key:0,class:"absolute left-0 top-0 bottom-0 h-full bg-stone-600 bg-opacity-50",style:ze(u.value?{}:{animation:`auto-next ${c.value}s linear forwards`})},null,4)):Ee("",!0),vt((O(),q("button",{ref_key:"nextButton",ref:r,class:"bg-transparent rounded-full h-full w-full border-solid border-stone-600 border-2 hover:bg-stone-300 hover:bg-opacity-10 totalDuration-200",onClick:We(p,["stop"])},[Rt(Xe(u.value?"Next":`Next in ${l.value}`),1)])),[[Y(vn)]])])):Ee("",!0),vt((O(),q("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:We(g,["stop"])},[Rt(Xe(e.offlineMode?"Close":"Hide"),1)])),[[Y(vn)]])],512),[[Jc,s.value||!e.hasNext]]),G("div",Fu,[Ie(x.$slots,"bottom-center")])],512))}}),Vu=".animate-auto-next{animation:auto-next 5s linear forwards}@keyframes auto-next{0%{width:0}to{width:100%}}",ye=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},tl=ye(Hu,[["styles",[Vu]]]),Wu=Object.freeze(Object.defineProperty({__proto__:null,default:tl},Symbol.toStringTag,{value:"Module"}));function Uu({touchDevice:e}){const t=te(!1);let n=0;return On("busy:touchDevice",e),On("setBusyState",o=>{n+=o?1:-1;const i=n>0;t.value!=i&&(t.value=i)}),t}function Ei(){const e=Ot("busy:touchDevice"),t=Ot("setBusyState");let n=!1;return Zt(()=>{n&&(t==null||t(!1))}),(o,{desktopOnly:i=!1}={})=>{i&&e||(n=o,t==null||t(o))}}const Ku={class:"group-hover:bg-stone-100 group-hover:bg-opacity-20 duration-200 rounđe-full p-2 w-full h-full inline-flex justify-center items-center gap-2 text-base"},Pi=Te({__name:"BaseButton",props:{disabled:{type:Boolean},href:{type:String},transparent:{type:Boolean},enableHapticFeedback:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,i=Ei(),r=Mi();let s=!1;function a(){s||(s=!0,i(!0,{desktopOnly:!0}))}function l(){s&&(s=!1,i(!1,{desktopOnly:!0}))}function u(c){n.disabled?c.preventDefault():(o("click",c),n.enableHapticFeedback&&r())}return(c,f)=>vt((O(),me(jr(e.href?"a":"button"),Dn(e.href?{href:e.href}:{},{class:["h-10 max-w-full max-h-full rounded-full flex-shrink-0 focus:outline-none outline-none",{"cursor-default text-stone-400 hover:text-stone-400":e.disabled,"text-stone-100 hover:text-stone-100 group duration-200":!e.disabled,"bg-black bg-opacity-50":!e.transparent}],onClick:We(u,["stop"]),onMouseenter:a,onMouseleave:l}),{default:ce(()=>[G("div",Ku,[Ie(c.$slots,"default")])]),_:3},16,["class"])),[[Y(vn),e.disabled?0:15]])}}),qu=Object.freeze(Object.defineProperty({__proto__:null,default:Pi},Symbol.toStringTag,{value:"Module"})),st=Te({__name:"ButtonIcon",props:{disabled:{type:Boolean},href:{type:String},transparent:{type:Boolean},enableHapticFeedback:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return(o,i)=>(O(),me(Pi,{class:"w-10",disabled:e.disabled,href:e.href,transparent:e.transparent,"enable-haptic-feedback":e.enableHapticFeedback,onClick:i[0]||(i[0]=r=>n("click",r))},{default:ce(()=>[Ie(o.$slots,"default")]),_:3},8,["disabled","href","transparent","enable-haptic-feedback"]))}}),Yu=Object.freeze(Object.defineProperty({__proto__:null,default:st},Symbol.toStringTag,{value:"Module"})),Zu={},Xu={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Gu(e,t){return O(),q("svg",Xu,[...t[0]||(t[0]=[G("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 nl=ye(Zu,[["render",Gu]]),Ju=Object.freeze(Object.defineProperty({__proto__:null,default:nl},Symbol.toStringTag,{value:"Module"}));class Qu{constructor(){Ae(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){t.stopImmediatePropagation(),t.stopPropagation(),this.listeners.forEach(n=>{var o;return(o=n.onKeyDown)==null?void 0:o.call(n,t)})}onKeyUp(t){t.stopImmediatePropagation(),t.stopPropagation(),this.listeners.forEach(n=>{var o;return(o=n.onKeyUp)==null?void 0:o.call(n,t)})}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);n!==-1&&this.listeners.splice(n,1)}}function ef(){const e=new Qu;return Zt(()=>e.dispose()),On("keyController",e),e}function Eo(e){const t=Ot("keyController");Ge(()=>t.addListener(e)),Zt(()=>t.removeListener(e))}const tf={class:"flex w-full flex-shrink-0 justify-between items-center h-16 px-3"},nf={class:"font-medium md:text-lg text-ellipsis overflow-hidden whitespace-nowrap px-3 select-text"},of={class:"overflow-auto px-6 md:px-8 lg:px-10 xl:px-12 pt-3 pb-12 flex-grow scrollbar-sm"},ol=Te({__name:"BottomSheet",props:hn({name:{type:String}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=$n(e,"modelValue");Eo({onKeyDown:o});const n=Ei();pe(t,i=>n(i));function o(i){t.value&&i.key==="Escape"&&(t.value=!1,i.preventDefault())}return(i,r)=>(O(),q("div",{class:$e(["fixed inset-0 flex flex-col items-center justify-end select-none",{"!pointer-events-none":!t.value}]),onClick:r[4]||(r[4]=()=>t.value=!1)},[ee(To,{name:"slide","enter-from-class":"opacity-0 translate-y-full","leave-to-class":"opacity-0 translate-y-full"},{default:ce(()=>[t.value?(O(),q("div",{key:0,class:"inline-flex flex-col h-[30rem] w-full sm:w-[32rem] max-h-[80vh] bg-stone-800 bg-opacity-90 backdrop-blur-md rounded-t-xl max-w-full overflow-hidden duration-200",onClick:r[1]||(r[1]=We(()=>{},["stop"])),onWheelPassive:r[2]||(r[2]=We(()=>{},["stop"])),onTouchmove:r[3]||(r[3]=We(()=>{},["stop"]))},[G("div",tf,[ee(st,{transparent:"",onClick:r[0]||(r[0]=()=>t.value=!1)},{default:ce(()=>[ee(nl)]),_:1}),G("div",nf,Xe(e.name),1),Ie(i.$slots,"actions")]),G("div",of,[Ie(i.$slots,"default")])],32)):Ee("",!0)]),_:3})],2))}}),rf=Object.freeze(Object.defineProperty({__proto__:null,default:ol},Symbol.toStringTag,{value:"Module"})),sf=["min","max","step"],lf={class:"flex-shrink-0"},Oi=ye(Te({__name:"InputPercentage",props:hn({min:{type:Number},max:{type:Number},step:{type:Number},disabled:{type:Boolean},suffix:{type:String}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=$n(e,"modelValue"),n=oe({get(){return t.value},set(o){t.value=+o}});return(o,i)=>(O(),q("div",{class:$e(["flex items-center gap-3 pl-1 py-1",{"pointer-events-none opacity-50":e.disabled}]),style:ze({"--percentage":`${(n.value-e.min)/(e.max-e.min)*100}%`})},[vt(G("input",{"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),type:"range",min:e.min,max:e.max,step:e.step??1,class:"flex-grow"},null,8,sf),[[gu,n.value]]),G("p",lf,[Ie(o.$slots,"suffix")])],6))}}),[["styles",["input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:linear-gradient(to right,#d6d3d1 var(--percentage),#78716c var(--percentage));border-radius:2px;border-style:none;cursor:pointer;height:6px;opacity:.9;--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1));outline:2px solid transparent;outline-offset:2px}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none!important;border-radius:2px;border-style:solid;border-width:2px;cursor:pointer;height:28px;width:16px;--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1));transition-duration:.2s}input[type=range]:hover{opacity:1}"]]]),af=Object.freeze(Object.defineProperty({__proto__:null,default:Oi},Symbol.toStringTag,{value:"Module"})),cf=["onClick","onKeyup"],Vn=Te({__name:"InputSelect",props:hn({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=$n(e,"modelValue"),o=te(null),i=te({width:"",left:""});Ge(()=>{let s=!1;pe(n,a=>{var u;const l=(u=o.value)==null?void 0:u.children[a+1];l&&(i.value={width:l.offsetWidth+"px",left:l.offsetLeft+"px"},l.scrollIntoView({behavior:s?"smooth":"auto",block:"center",inline:"center"}),s=!0)},{immediate:!0})});function r(s){s!==n.value&&(n.value=s)}return(s,a)=>(O(),q("div",{ref_key:"root",ref:o,class:"relative h-8 rounded-[2.5rem] inline-flex bg-black bg-opacity-90 p-1 text-sm overflow-auto max-w-full scrollbar-none leading-none"},[G("div",{class:"bg-stone-400 h-6 rounded-2xl absolute top-1 pointer-events-none duration-200",style:ze(i.value)},null,4),(O(!0),q(Me,null,pn(t.items,(l,u)=>vt((O(),q("div",{key:u,tabindex:"0",class:$e(["inline-flex justify-center items-center h-6 rounded-2xl px-3 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":u==n.value,"text-stone-400":u!=n.value}]),onClick:()=>r(u),onKeyup:[Us(()=>r(u),["enter"]),Us(()=>r(u),["space"])]},[Rt(Xe(l),1)],42,cf)),[[Y(vn),30]])),128))],512))}}),uf=Object.freeze(Object.defineProperty({__proto__:null,default:Vn},Symbol.toStringTag,{value:"Module"})),ff={class:"flex items-center mb-8 last:mb-0"},df={class:"flex-grow overflow-hidden"},on=Te({__name:"TableField",props:{label:{type:String},disabled:{type:Boolean}},setup(e){return(t,n)=>(O(),q("div",ff,[G("div",{class:$e(["flex-shrink-0 w-[4.8rem]",{"opacity-50":e.disabled}])},Xe(e.label),3),G("div",df,[Ie(t.$slots,"default")])]))}}),pf=Object.freeze(Object.defineProperty({__proto__:null,default:on},Symbol.toStringTag,{value:"Module"})),hf={},gf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function mf(e,t){return O(),q("svg",gf,[...t[0]||(t[0]=[G("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 il=ye(hf,[["render",mf]]),vf=Object.freeze(Object.defineProperty({__proto__:null,default:il},Symbol.toStringTag,{value:"Module"})),bf={},yf={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 36 36"};function wf(e,t){return O(),q("svg",yf,[...t[0]||(t[0]=[G("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),G("path",{fill:"none",d:"M0 0h36v36H0z"},null,-1)])])}const rl=ye(bf,[["render",wf]]),xf=Object.freeze(Object.defineProperty({__proto__:null,default:rl},Symbol.toStringTag,{value:"Module"}));function _f(e){if(e)try{return JSON.parse(e)}catch(t){console.log(t);return}}function Sf(e){return String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}var xt=(e=>(e[e.vertical=0]="vertical",e[e.ltr=1]="ltr",e[e.rtl=2]="rtl",e))(xt||{}),Ht=(e=>(e[e.longStrip=0]="longStrip",e[e.single=1]="single",e[e.double=2]="double",e))(Ht||{});const sl=.25,ll=5,kf=.25,Po=.2,Oo=5,Cf=.05,Tf=0,If=5,al=5;function Mf(e){var y,v,z,N,k,D,Q;const{titleName:t,isWebtoon:n}=e,o=oe(()=>t.value?Sf(t.value):location.hostname),i=te(Ef(`tkr:${o.value}`)),r=m=>{i.value=m;const _=`tkr:${o.value}`;!m||!Object.keys(m).length?localStorage.removeItem(_):localStorage.setItem(_,JSON.stringify(m))},s=m=>{if(!i.value){r(m);return}const _={...i.value};Object.entries(m).forEach(([U,X])=>{X===void 0?delete _[U]:_[U]=X}),r(_)},a=te((y=i.value)==null?void 0:y.style),l=te((v=i.value)==null?void 0:v.direction),u=te((z=i.value)==null?void 0:z.gap),c=te(((N=i.value)==null?void 0:N.speed)??1),f=te(((k=i.value)==null?void 0:k.zoom)??1),p=te(((D=i.value)==null?void 0:D.breakFirst)??!1),g=te(((Q=i.value)==null?void 0:Q.autoNextSeconds)??al),x=oe({get(){return n.value?Ht.longStrip:a.value??e.defaultStyle.value??Ht.longStrip},set:m=>{if(a.value===m)return;const _=x.value===Ht.longStrip,U=m===Ht.longStrip;a.value=m,s({style:m}),_!==U&&(C.value=U?xt.vertical:xt.rtl)}}),C=oe({get(){return n.value?xt.vertical:l.value??e.defaultDirection.value??xt.vertical},set:m=>{l.value=m,s({direction:m})}}),B=oe({get:()=>u.value??e.defaultGap.value??0,set(m){u.value=m,s({gap:m})}}),H=oe({get:()=>c.value,set(m){c.value=m,s({speed:m===1?void 0:m})}}),Z=oe({get:()=>f.value,set(m){f.value=m,s({zoom:m===1?void 0:m})}}),W=oe({get:()=>p.value,set(m){p.value=m,s({breakFirst:m?!0:void 0})}}),I=oe({get:()=>g.value,set(m){g.value=m,s({autoNextSeconds:m===al?void 0:m})}});return{direction:C,style:x,gap:B,speed:H,zoom:Z,isLongStrip:oe(()=>x.value===Ht.longStrip),isDouble:oe(()=>x.value===Ht.double),isRTL:oe(()=>C.value===xt.rtl),isVertical:oe(()=>C.value===xt.vertical),breakFirst:W,autoNextSeconds:I}}function Ef(e){const t=localStorage.getItem(e),n=_f(t||void 0),o={};return n?(n.style!==void 0&&Object.values(Ht).includes(n.style)&&(o.style=n.style),n.direction!==void 0&&Object.values(xt).includes(n.direction)&&(o.direction=n.direction),n.gap!==void 0&&n.gap>=Tf&&n.gap<=If&&(o.gap=n.gap),n.speed!==void 0&&n.speed>=sl&&n.speed<=ll&&(o.speed=n.speed),n.zoom!==void 0&&n.zoom>=Po&&n.zoom<=Oo&&(o.zoom=n.zoom),n.breakFirst===!0&&(o.breakFirst=!0),n.autoNextSeconds<=5&&n.autoNextSeconds>=-1&&(o.autoNextSeconds=n.autoNextSeconds),Object.keys(o).length?o:void 0):o}const cl=Te({__name:"ButtonReaderSettings",props:{name:{type:String},direction:{type:Number},readerStyle:{type:Number},gap:{type:Number},autoNextSeconds:{type:Number},speed:{type:Number},zoom:{type:Number},webtoon:{type:Boolean},disabled:{type:Boolean},hideAutoNext:{type:Boolean}},emits:["update:reader-style","update:direction","update:gap","update:autoNextSeconds","update:speed","update:zoom","help"],setup(e,{emit:t}){const n=e,o=t,i=te(!1),r=oe(()=>["Long strip",n.webtoon?void 0:"Single page",n.webtoon?void 0:"Double page"].filter(Boolean)),s=oe(()=>n.name??location.hostname);Eo({onKeyUp:u=>{u.key==="s"&&!u.metaKey&&!u.ctrlKey&&(i.value=!i.value)}});function a(u){o("update:zoom",Math.round(u)/100)}function l(){i.value=!1,o("help")}return(u,c)=>(O(),q(Me,null,[ee(st,{title:"Reader settings (S)",disabled:e.disabled,onClick:c[0]||(c[0]=()=>i.value=!0)},{default:ce(()=>[ee(rl)]),_:1},8,["disabled"]),ee(ol,{modelValue:i.value,"onUpdate:modelValue":c[6]||(c[6]=f=>i.value=f),name:s.value},{actions:ce(()=>[ee(st,{transparent:"",onClick:l},{default:ce(()=>[ee(il)]),_:1})]),default:ce(()=>[ee(on,{label:"Style"},{default:ce(()=>[ee(Vn,{"model-value":e.readerStyle,items:r.value,"onUpdate:modelValue":c[1]||(c[1]=f=>o("update:reader-style",f))},null,8,["model-value","items"])]),_:1}),ee(on,{label:"Direction"},{default:ce(()=>[ee(Vn,{"model-value":e.direction,items:e.webtoon?["Vertical"]:["Vertical","Left to right","Right to left"],"onUpdate:modelValue":c[2]||(c[2]=f=>o("update:direction",f))},null,8,["model-value","items"])]),_:1}),ee(on,{label:"Gap"},{default:ce(()=>[ee(Vn,{"model-value":e.gap,items:["None","1px","2px","3px","4px","5px"],"onUpdate:modelValue":c[3]||(c[3]=f=>o("update:gap",f))},null,8,["model-value"])]),_:1}),e.hideAutoNext?Ee("",!0):(O(),me(on,{key:0,label:"Auto Next"},{default:ce(()=>[ee(Vn,{"model-value":e.autoNextSeconds<0?0:e.autoNextSeconds,items:["None","1s","2s","3s","4s","5s"],"onUpdate:modelValue":c[4]||(c[4]=f=>o("update:autoNextSeconds",f===0?-1:f))},null,8,["model-value"])]),_:1})),ee(on,{label:"Speed"},{default:ce(()=>[ee(Oi,{"model-value":e.speed,min:Y(sl),max:Y(ll),step:Y(kf),suffix:"x","onUpdate:modelValue":c[5]||(c[5]=f=>o("update:speed",f))},{suffix:ce(()=>[Rt(Xe(e.speed.toFixed(2))+"x ",1)]),_:1},8,["model-value","min","max","step"])]),_:1}),ee(on,{label:"Zoom"},{default:ce(()=>[ee(Oi,{"model-value":Math.ceil(e.zoom*100),min:Y(Po)*100,max:Y(Oo)*100,step:Y(Cf)*100,"onUpdate:modelValue":a},{suffix:ce(()=>[Rt(Xe(Math.ceil(e.zoom*100))+"% ",1)]),_:1},8,["model-value","min","max","step"])]),_:1})]),_:1},8,["modelValue","name"])],64))}}),Pf=Object.freeze(Object.defineProperty({__proto__:null,default:cl},Symbol.toStringTag,{value:"Module"})),Of={},$f={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"};function Af(e,t){return O(),q("svg",$f,[...t[0]||(t[0]=[G("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[G("circle",{cx:"14",cy:"14",r:"12"}),G("path",{d:"m23 23l7 7M9 12V9h3m4 0h3v3M9 16v3h3m7-3v3h-3"})],-1)])])}const ul=ye(Of,[["render",Af]]),Lf=Object.freeze(Object.defineProperty({__proto__:null,default:ul},Symbol.toStringTag,{value:"Module"})),zf={class:"block w-4 h-4"},Df={class:"w-12"},fl=Te({__name:"ButtonResetZoom",props:{zoom:{type:Number}},emits:["click"],setup(e,{emit:t}){const n=t;function o(i){n("click",i)}return(i,r)=>(O(),q("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:We(o,["stop"])},[G("div",zf,[ee(ul)]),G("div",Df,Xe(Math.ceil(e.zoom*100))+"%",1)]))}}),Nf=Object.freeze(Object.defineProperty({__proto__:null,default:fl},Symbol.toStringTag,{value:"Module"}));async function bn(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 bn(e-1,t,n);i(r)},t)})}const jf={},Rf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Bf(e,t){return O(),q("svg",Rf,[...t[0]||(t[0]=[Oc('<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 dl=ye(jf,[["render",Bf]]),Ff=Object.freeze(Object.defineProperty({__proto__:null,default:dl},Symbol.toStringTag,{value:"Module"})),Hf={},Vf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Wf(e,t){return O(),q("svg",Vf,[...t[0]||(t[0]=[G("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"},null,-1)])])}const pl=ye(Hf,[["render",Wf]]),Uf=Object.freeze(Object.defineProperty({__proto__:null,default:pl},Symbol.toStringTag,{value:"Module"})),Kf=["aria-hidden"],qf=["onClick"],Yf={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"},Zf={class:"whitespace-nowrap"},$i=Te({__name:"ButtonDropdown",props:hn({label:{type:String},title:{type:String},items:{type:Array},disabled:{type:Boolean},canLoadItems:{type:Boolean},loadItems:{type:Function},enableHapticFeedback:{type:Boolean}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:hn(["select"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=$n(e,"modelValue"),r=te(null),s=te(!1),a=te(!1),l=te(!1),u=te(!1),c=te(!1),f={mounted:k=>{var D;(D=k.children[i.value])==null||D.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}};Eo({onKeyDown:Z});const p=Ei(),g=Mi();async function x(){if(!n.items.length&&(s.value||await C(),!n.items.length)){s.value=!1;return}s.value=!s.value,p(s.value),s.value?(B(),I(r.value)):setTimeout(y,250)}async function C(){a.value||n.items.length||!n.canLoadItems||!n.loadItems||(a.value=!0,await n.loadItems(),a.value=!1)}function B(){const k=r.value;if(k){const D=k.getBoundingClientRect(),Q=D.x+D.width/2;l.value=D.y>window.innerHeight/2,u.value=Q<window.innerWidth/3,c.value=Q>window.innerWidth/3*2}}function H(k,D){x(),k!=i.value&&(i.value=k,o("select",k,D),n.enableHapticFeedback&&g())}function Z(k){s.value&&k.key==="Escape"&&(x(),k.preventDefault())}let W=[];function I(k){const D=window.getComputedStyle(k).zIndex,Q=k.style.zIndex;(!D||!(+D>0))&&((!k.parentElement||k.parentElement.childElementCount>1)&&(k.style.zIndex="1",W.push({el:k,zIndex:Q})),k.parentElement&&I(k.parentElement))}function y(){W.forEach(({el:k,zIndex:D})=>{k.style.zIndex=D??""}),W=[]}let v=!1;function z(){v||(v=!0,p(!0,{desktopOnly:!0}))}function N(){v&&(v=!1,p(!1,{desktopOnly:!0}))}return(k,D)=>(O(),q("div",{ref_key:"root",ref:r,class:"select-none relative inline-flex"},[s.value?(O(),q("div",{key:0,class:"fixed inset-0 bg-transparent",onClick:x})):Ee("",!0),e.items.length?(O(),me(To,{key:1,name:"slide-fade","enter-from-class":"scale-y-90 opacity-0 pointer-events-none","leave-to-class":"scale-y-90 opacity-0 pointer-events-none"},{default:ce(()=>[s.value?vt((O(),q("ul",{key:0,ref:"list","aria-hidden":!s.value,class:$e(["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":!u.value&&!c.value,"right-0 text-right":c.value}]),onWheelPassive:D[0]||(D[0]=We(()=>{},["stop"])),onTouchmove:D[1]||(D[1]=We(()=>{},["stop"]))},[(O(!0),q(Me,null,pn(e.items,(Q,m)=>vt((O(),q("li",{key:m,tabindex:"-1",class:$e(["h-10 px-4 last:border-b-transparent cursor-pointer hover:bg-stone-100 hover:bg-opacity-10 duration-100",{"text-textPrimary":m===i.value}]),onClick:_=>H(m,_)},[G("div",{class:$e(["h-full py-2",{"border-t-[1px] border-solid border-stone-400 border-opacity-30":m>0}])},[Ie(k.$slots,"item",{item:Q},()=>[Rt(Xe(Q),1)])],2)],10,qf)),[[Y(vn),30]])),128))],42,Kf)),[[f]]):Ee("",!0)]),_:3})):Ee("",!0),vt((O(),q("button",Dn({type:"button",tabindex:"-1",class:["w-full h-10 max-h-full rounded-full bg-black bg-opacity-50 group duration-100",{"pointer-events-none text-stone-400":e.disabled||a.value}]},e.title?{title:e.title}:{},{onClick:We(x,["stop"]),onMouseenter:z,onMouseleave:N}),[G("div",Yf,[G("span",Zf,Xe(e.label),1),e.items.length||e.canLoadItems?(O(),q("span",{key:0,class:$e(["w-4 h-4 flex ml-1 -mr-3 flex-shrink-0",{"rotate-180":l.value}]),"aria-hidden":"true"},[a.value?(O(),me(dl,{key:0})):(O(),me(pl,{key:1}))],2)):Ee("",!0)])],16)),[[Y(vn),30]])],512))}}),Xf=Object.freeze(Object.defineProperty({__proto__:null,default:$i},Symbol.toStringTag,{value:"Module"})),hl=Te({__name:"ChapterNav",props:{data:{type:Object},chapterSpec:{type:Object},touchDevice:{type:Boolean}},emits:["getHiddenChapters","chaptersDialogOpen"],setup(e,{emit:t}){const n=e,o=t;async function i(){const l=n.chapterSpec;if(!l)return;const{trigger:u,sel:c,label:f}=l;if(u&&(!c||!f)){await r(u);return}o("getHiddenChapters"),await bn(50,50,()=>n.data.chapters.length?!0:void 0)}async function r(l){const u=document.querySelector(l);u&&(u instanceof HTMLDialogElement?u.showModal():u.click(),o("chaptersDialogOpen"))}function s(l,u){var c,f,p;(p=(f=(c=n.data)==null?void 0:c.chapters)==null?void 0:f[l])==null||p.select(a(u))}function a(l){return!n.touchDevice&&(l.ctrlKey||l.metaKey)}return(l,u)=>{var c;return O(),me($i,{modelValue:e.data.activeIndex,label:e.data.activeLabel,title:"Select chapter",items:e.data.chapters,"can-load-items":!!((c=e.chapterSpec)!=null&&c.trigger),"load-items":i,"enable-haptic-feedback":"",onSelect:s},{item:ce(({item:f})=>[Rt(Xe(f.label),1)]),_:1},8,["modelValue","label","items","can-load-items"])}}}),Gf=Object.freeze(Object.defineProperty({__proto__:null,default:hl},Symbol.toStringTag,{value:"Module"})),Jf={},Qf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function ed(e,t){return O(),q("svg",Qf,[...t[0]||(t[0]=[G("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 gl=ye(Jf,[["render",ed]]),td=Object.freeze(Object.defineProperty({__proto__:null,default:gl},Symbol.toStringTag,{value:"Module"})),ml=Te({__name:"DirectionToast",props:{direction:{type:Number}},setup(e){const t=e,n=sessionStorage.getItem("tk:dir"),o=te(typeof n!="string"||+n!==t.direction),i=tt(()=>o.value=!1,1250);pe(()=>t.direction,()=>{r(),o.value=!0,i()}),Ge(()=>{r(),i();let s;pe(Ci(),l=>{l!=="visible"?s=Date.now():Date.now()-s>7e3&&(o.value=!0,i())})});function r(){sessionStorage.setItem("tk:dir",t.direction+"")}return(s,a)=>(O(),me(To,{name:"slow-fade","enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ce(()=>[o.value?(O(),q("div",{key:0,class:$e(["fixed z-50 left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none w-28 h-24 p-4 bg-black bg-opacity-40 rounded-2xl duration-500",{"rotate-90":e.direction===Y(xt).vertical,"rotate-180":e.direction===Y(xt).rtl}])},[ee(gl)],2)):Ee("",!0)]),_:1}))}}),nd=Object.freeze(Object.defineProperty({__proto__:null,default:ml},Symbol.toStringTag,{value:"Module"})),vl=Te({__name:"HelpScreen",props:{touchDevice:{type:Boolean}},emits:["hide"],setup(e,{emit:t}){const n=e,o=t,i=te(null),r=te([]);Ge(async()=>{const u=el(i),c=tt(()=>{s({width:u.width.value,height:u.height.value})},50);c(),pe(u.width,c),pe(u.height,c)});function s(u){var p;const c=(p=i.value)==null?void 0:p.parentElement;if(!c)return;const f=Array.from(c.querySelectorAll("#controls [title]"));f.length&&(r.value=a(f,u))}function a(u,c){const f=[],p=[];let g=0,x=0;const C=50,B=25;u.forEach(y=>{var D;const v=(D=y.getAttribute("title"))==null?void 0:D.trim(),z=y.getBoundingClientRect();if(!v||!z.height||!z.width)return;const N=Math.ceil((z.top-10)/C),k=Math.ceil((z.left-10)/C);p.push({isTour:!1,title:v,rect:z,fromX:k,toX:Math.max(k+1,Math.ceil((z.right+10)/C)),fromY:N,toY:Math.max(N+1,Math.ceil((z.bottom+10)/C))})}),p.forEach(y=>{for(let v=y.fromY;v<y.toY;v++){f[v]??(f[v]=[]);for(let z=y.fromX;z<y.toX;z++)f[v][z]=y;y.toY>g+1&&(g=y.toY-1),y.toX>x+1&&(x=y.toX-1)}});let H=x/2;p.forEach(y=>{y.isAlignRight=y.fromX>H});const Z=(y,v)=>{f[v]??(f[v]=[]);const z=v>=y.toY;if(y.isTour)for(let N=y.fromX;N<y.toX;N++)delete f[y.fromY][N],y.fromY=v,y.toY=v+(z?1:-1),f[v][N]=y;else{const N=y.isAlignRight?y.fromX-3:y.fromX,k=N+3;y.helpItem={fromX:N,toX:k,fromY:v,toY:v+1,isTour:!0,isAlignRight:y.isAlignRight};for(let D=N;D<k;D++)f[v][D]=y.helpItem}},W=(y,v)=>{if(v>g||v<0)return!1;const z=v>=y.toY,N=f[v];if(!N)return Z(y,v),!0;const k=N[y.fromX];if(k&&!k.isTour)return!1;if(k&&k.isTour)return W(k,z?v+1:v-1)?(Z(y,v),!0):!1;if(!k){const D=y.isAlignRight?-1:1;return N[y.fromX+D]||N[y.fromX+D*2]?W(y,z?v+1:v-1):(Z(y,v),!0)}return!1};p.forEach(y=>{if(!W(y,y.toY)){if(y.isAlignRight){const v=f[y.fromY]??[];if(!v.slice(y.fromX-3,y.fromX).filter(Boolean).length){const N=y.fromX-3,k=y.fromX;y.helpItem={isTour:!0,isAlignRight:!0,fromX:N,toX:k,fromY:y.fromY,toY:y.toY};for(let D=y.fromX-3;D<y.fromX;D++)v[D]=y.helpItem;return}}W(y,y.fromY-1)}});const I=[];return p.forEach(y=>{const{title:v,helpItem:z,rect:N,isAlignRight:k,fromX:D,fromY:Q,toY:m}=y;if(!v||!z||!N)return;const _=z.fromY>=m,U=z.toY<=Q;I.push({title:l(v),style:{top:_?`${N.bottom+(z.fromY-m)*C+B}px`:U?void 0:`${N.top+8}px`,bottom:U?`${c.height-N.top+(z.toY-Q)*C+B}px`:void 0,left:k?void 0:`${N.left}px`,right:k?_?`${c.width-N.right}px`:`${c.width-N.right+N.width+B}px`:void 0},arrowStyle:{width:U||_?"2px":`${Math.abs(z.toX-D)*C+B-5}px`,height:U||_?`${(_?z.fromY-m:Q-z.toY)*C+B}px`:"2px",top:_?`${N.bottom}px`:U?void 0:`${N.top+20}px`,bottom:U?`${c.height-N.top}px`:void 0,left:k?void 0:`${N.left+N.width/2}px`,right:k?_?`${c.width-N.right+N.width/2}px`:`${c.width-N.right+N.width}px`:void 0}})}),I}function l(u){return n.touchDevice?u.split("(")[0].trim():u}return(u,c)=>(O(),q(Me,null,[c[1]||(c[1]=G("div",{class:"fixed inset-0 bg-black bg-opacity-90"},null,-1)),G("div",{ref_key:"root",ref:i,class:"fixed inset-0 z-20 overscroll-contain select-none",onClick:c[0]||(c[0]=We(f=>o("hide"),["stop"]))},[(O(!0),q(Me,null,pn(r.value,f=>(O(),q(Me,{key:f.title},[G("div",{class:"absolute",style:ze(f.style)},Xe(f.title),5),G("div",{class:"absolute bg-stone-300 rounded-lg",style:ze(f.arrowStyle)},null,4)],64))),128))],512)],64))}}),od=Object.freeze(Object.defineProperty({__proto__:null,default:vl},Symbol.toStringTag,{value:"Module"})),bl=Te({__name:"PageNav",props:hn({disabled:{type:Boolean},pages:{type:Array},totalImgs:{type:Number}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=$n(e,"modelValue"),o=oe(()=>t.pages.map(l=>l.map(({index:u})=>`${u+1}`).join("-"))),i=oe(()=>{const l=n.value,u=t.pages.findIndex(c=>c.some(({index:f})=>f===l));return u===-1?t.pages.length-1:u}),r=oe(()=>t.pages.length?`${o.value[i.value]}/${t.totalImgs}`:"--");function s(l){const u=t.pages[l][0].index;a(u)}function a(l){n.value=l}return(l,u)=>(O(),me($i,{"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"]))}}),id=Object.freeze(Object.defineProperty({__proto__:null,default:bl},Symbol.toStringTag,{value:"Module"})),rd={},sd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function ld(e,t){return O(),q("svg",sd,[...t[0]||(t[0]=[G("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),G("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 Ai=ye(rd,[["render",ld]]),ad=Object.freeze(Object.defineProperty({__proto__:null,default:Ai},Symbol.toStringTag,{value:"Module"})),cd={},ud={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function fd(e,t){return O(),q("svg",ud,[...t[0]||(t[0]=[G("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 Li=ye(cd,[["render",fd]]),dd=Object.freeze(Object.defineProperty({__proto__:null,default:Li},Symbol.toStringTag,{value:"Module"})),yl=ye(Te({__name:"PauseToast",props:{playing:{type:Boolean}},setup(e){const t=e,n=te(0);return pe(()=>t.playing,()=>{n.value=Date.now()}),(o,i)=>n.value?(O(),q("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?(O(),me(Li,{key:0})):(O(),me(Ai,{key:1}))])):Ee("",!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)}}"]]]),pd=Object.freeze(Object.defineProperty({__proto__:null,default:yl},Symbol.toStringTag,{value:"Module"})),hd=30,wl=ye(Te({__name:"ProgressBar",props:{value:{type:Number},total:{type:Number},longStrip:{type:Boolean},height:{type:Number},rtl:{type:Boolean}},setup(e){const t=e,n=oe(()=>Math.floor(t.value)+1),o=oe(()=>`${Math.max(2,Math.min(10,t.height))}px`),i=Ii().width,r=oe(()=>i.value/t.total>=hd);return(s,a)=>(O(),q("div",{class:$e(["rprog",{"rprog--rtl":e.rtl}]),style:ze({height:o.value})},[r.value?(O(!0),q(Me,{key:0},pn(e.total,l=>(O(),q("span",{key:l,class:$e(["rprog__item",{"rprog__item--active":n.value===l}]),style:ze(!e.longStrip||n.value!==l?{}:{"--portion":`${e.value%1*100}%`})},null,6))),128)):(O(),q("div",{key:1,style:ze({width:`${e.value/e.total*100}%`}),class:"h-full bg-textPrimary bg-opacity-80"},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{background-color:rgb(251 130 82/var(--tw-bg-opacity,1));content:"";display:block;height:100%;--tw-bg-opacity:.8;width:var(--portion)}']]]),gd=Object.freeze(Object.defineProperty({__proto__:null,default:wl},Symbol.toStringTag,{value:"Module"})),xl=Te({__name:"GesturesContainer",props:{zoom:{type:Number},zooming:{type:Boolean},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=te(null),s=te(Math.min(Oo,Math.max(Po,o.zoom))),a=te(!1),l=te(!1),u={isZoomIn:!1,isZoomOut:!1,initial:void 0};t({rootEl:r}),pe(()=>o.zoom,w=>X(w)),Ge(()=>{o.touchDevice?Lt(r,"touchstart",H):(Lt(r,"mousedown",g),Lt(window,"wheel",z))}),Eo({onKeyDown:w=>{var $;if(!o.busy&&(($=r.value)==null||$.focus(),!(w.key==="Meta"||w.key==="Control")&&(w.ctrlKey||w.metaKey)))switch(w.key){case"0":X(1);break;case"-":X(s.value-.2),w.preventDefault();break;case"=":case"+":X(s.value+.2),w.preventDefault();break}},onKeyUp:w=>{o.zooming&&!(w.ctrlKey||w.metaKey)&&m()}});function c(w){l.value!==w&&(l.value=w,w?o.playController.pause():(i("dragEnd"),o.playController.resume()))}let f={x:0,y:0},p={x:0,y:0};function g(w){if(w.button!==0)return;const $=r.value;$&&(f={x:w.clientX,y:w.clientY},p={x:$.scrollLeft,y:$.scrollTop},window.addEventListener("mousemove",x),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",x),setTimeout(()=>c(!1))},{once:!0}),w.preventDefault(),w.stopPropagation())}function x(w){const $=w.clientX-f.x,b=w.clientY-f.y;if(!l.value&&Math.abs($)<.5&&Math.abs(b)<.5)return;c(!0);const F=r.value;F&&(F.scrollLeft=p.x-$,F.scrollTop=p.y-b)}let C={distance:0,zoom:s.value,x:0,y:0},B=!1;function H(w){o.busy||(B=w.touches.length===2,B&&(i("update:zooming",!0),c(!0),w.stopPropagation(),w.preventDefault(),C={distance:N(w),zoom:s.value,x:(w.touches[0].clientX+w.touches[1].clientX)/2,y:(w.touches[0].clientY+w.touches[1].clientY)/2}),(B||o.longStrip&&o.playController.isPlaying.value)&&window.addEventListener("touchend",Z,{once:!0}))}function Z(){var F;if(B=!1,o.zooming){c(!1),m();return}if(!l.value)return;const w=tt(()=>{var re;c(!1),(re=r.value)==null||re.removeEventListener("scroll",b)},200),$=setTimeout(w,200);(F=r.value)==null||F.addEventListener("scroll",b);function b(){clearTimeout($),w()}}function W(w){if(!(!B&&!(o.longStrip&&o.playController.isPlaying.value))&&(c(!0),o.zooming)){w.stopPropagation(),w.preventDefault();const b=N(w)/C.distance;U(Math.ceil(b*C.zoom*100)/100,C)}}const I=tt(()=>a.value=!1,100);let y=!1;const v=tt(()=>{y=!1},30);function z(w){if(o.busy)return;let $=o.zooming;if(y||(y=!0,$=w.ctrlKey||w.metaKey,$&&i("update:zooming",!0)),v(),$){w.stopPropagation(),w.preventDefault();const b=Math.ceil((s.value+w.deltaY*-.01)*100)/100;U(b,{x:w.clientX,y:w.clientY});return}o.horizontal&&(a.value||(a.value=!0),I(),w.deltaY&&(r.value&&(r.value.scrollLeft+=w.deltaY*(o.rtl?-1:1)),w.stopPropagation()))}function N(w){return Math.hypot(w.touches[0].clientX-w.touches[1].clientX,w.touches[0].clientY-w.touches[1].clientY)}const k={x:0,y:0,ts:0};function D(w){if(l.value||o.zooming)return;const $=r.value;if(!$)return;if(!o.longStrip){const Oe=o.horizontal?$.clientWidth:$.clientHeight,Le=(o.horizontal?o.rtl?Oe-w.clientX:w.clientX:w.clientY)/Oe;if(Le<=.2&&o.pageIndex>0){i("prev");return}else if(Le>=.8){i("next");return}}if(i("click"),o.playController.isPlaying.value)return;const{clientX:b,clientY:F}=w,{x:re,y:se,ts:we}=k;k.x=b,k.y=F,k.ts=new Date().getTime();const Pe=k.ts-we;Pe>250||Pe<10||Math.abs(re-b)>40||Math.abs(se-F)>40||(k.ts=0,k.x=0,k.y=0,Q(b,F))}async function Q(w,$){const b=s.value===1?2:1;await X(b,{x:w,y:$}),m()}function m(){i("update:zooming",!1),u.initial=void 0,u.isZoomIn=!1,u.isZoomOut=!1}function _(){if(u.initial)return;const w=r.value;if(!w)return;const $=w.querySelector(`[data-index="${o.pageIndex}"],[data-index2="${o.pageIndex}"]`)??void 0;$&&(u.initial={el:$,rect:$.getBoundingClientRect()})}function U(w,$){if(u.isZoomIn=u.isZoomIn||!u.isZoomOut&&w>1,u.isZoomIn&&w<1){X(1,$);return}if(u.isZoomOut=u.isZoomOut||!u.isZoomIn&&w<1,u.isZoomOut&&w>1){X(1,$);return}X(w,$)}async function X(w,$){const b=r.value,F=Math.min(Oo,Math.max(Po,w));if(!b||s.value===F)return;_();const{initial:re}=u;if(!re)return;const se=($==null?void 0:$.x)??b.clientWidth/2,we=($==null?void 0:$.y)??b.clientHeight/2;s.value=F,i("update:zoom",F),await Mt();const{el:Pe,rect:Oe}=re,dt=Pe.offsetWidth/Oe.width,Le=Pe.offsetHeight/Oe.height;b.scrollLeft=Pe.offsetLeft-Oe.left*dt+se*(dt-1),b.scrollTop=Pe.offsetTop-Oe.top*Le+we*(Le-1)}return(w,$)=>(O(),q("div",{ref_key:"rootEl",ref:r,tabindex:"0",class:$e(["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&&(l.value||a.value||e.zooming),"cursor-grabbing":!e.touchDevice&&l.value,"overflow-hidden":e.zooming}]),style:ze({"font-size":`${s.value}px`}),onClick:We(D,["stop"]),onTouchmoveCapture:We(W,["stop"])},[Ie(w.$slots,"default")],38))}}),md=Object.freeze(Object.defineProperty({__proto__:null,default:xl},Symbol.toStringTag,{value:"Module"})),vd='.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}}',bd={},yd={class:"loading-indicator"};function wd(e,t){return O(),q("div",yd)}const zi=ye(bd,[["render",wd],["styles",[vd]]]),xd=Object.freeze(Object.defineProperty({__proto__:null,default:zi},Symbol.toStringTag,{value:"Module"}));function Di(e,t){return(e==null?void 0:e.querySelector(`[data-index="${t}"],[data-index2="${t}"]`))??void 0}const _d=["data-index"],Sd={key:0,class:"img img--loading"},kd=["src"],Cd=["data-index"],_l=ye(Te({__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},spaceTop:{type:null},touchDevice:{type:Boolean},playController:{type:Object},busy:{type:Boolean},idle:{type:Boolean},hasNext:{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=te(null),s=oe(()=>{var I;return(I=r.value)==null?void 0:I.rootEl});t({rootEl:s});const a=te(null),l=Ii(),u=oe(()=>{const{width:I,height:y}=l,v=o.isLongStrip?o.isVertical?I.value:y.value:Math.min(I.value,y.value);return Math.min(4,Math.max(1,Math.ceil(v/400-1)))*o.gap}),c=te(o.isLongStrip?{min:o.pageIndex-1,max:o.pageIndex}:B()),f=oe(()=>{const{min:I,max:y}=c.value,v={};for(let z=I;z<=y;z++)v[z]=!0;return v}),p=te(x()),g=W(()=>{p.value=x()},100);pe(l.width,g),pe(l.height,g),pe(()=>o.pages,g),pe(()=>o.isLongStrip,g),pe(()=>o.isVertical,g);function x(){const I=l.width.value,y=l.height.value,{pages:v,isLongStrip:z,isVertical:N}=o;return v.map(k=>{var b;const D=k.some(F=>{var re;return(re=F.img)==null?void 0:re.isLoading}),Q=k.map(F=>F.index),m={isLoading:D,indexes:Q,visible:!1};if(D)return m;const _=k.map(({img:F})=>F).filter(Boolean);if(!_.length||(m.srcs=_.map(({src:F})=>F),_.every(F=>F.hasError)))return m;const X=(b=_.find(F=>!F.hasError))==null?void 0:b.size;if(!X)return m;const w=_.reduce((F,re)=>{var se;return F+(((se=re.size)==null?void 0:se.width)??X.width)},0),$=_.reduce((F,re)=>{var se;return F+(((se=re.size)==null?void 0:se.height)??X.height)},0)/_.length;return z&&N||!z&&I/w<y/$?(m.width=Math.min(I,w),m.height=$*(m.width/w)):(m.height=Math.min(y,$),m.width=w*(m.height/$)),m})}const C=oe(()=>{const I=o.isVertical?"width":"height";return p.value.map(y=>y[I]).filter(Boolean).sort((y,v)=>v-y)[0]});Ge(()=>{const I=Di(s.value,o.pageIndex);I==null||I.scrollIntoView({behavior:"instant",block:"start"});let y,v=!1;ss(()=>{y!==o.pageIndex&&(y=o.pageIndex,z(),v||(v=!0,Mt(()=>i("ready"))))});async function z(){if(!o.isLongStrip){c.value=B();return}const N=Math.floor(o.page),k=Di(s.value,N);if(!k)return;const D=+H(k).getAttribute("data-index"),Q=+Z(k).getAttribute("data-index");(D!==c.value.min||Q!==c.value.max)&&(c.value={min:D,max:Q})}});function B(){const{pageIndex:I}=o;return{min:I-(o.isDouble?5:3),max:I+(o.isDouble?6:3)}}function H(I,y=0){const v=I.previousElementSibling;if(!v)return I;const z=y+(o.isVertical?v.clientHeight:v.clientWidth);return(o.isVertical?z>l.height.value*1.5:o.isRTL?z>l.width.value*2.5:z>l.width.value*1.5)?v:H(v,z)}function Z(I,y=0){const v=I.nextElementSibling;if(!v)return I;const z=y+(o.isVertical?v.clientHeight:v.clientWidth);return(o.isVertical?z>l.height.value*3.5:o.isRTL?z>l.width.value*1.5:z>l.width.value*2.5)?v:Z(v,z)}function W(I,y){let v;return()=>{v||(v??(v=setTimeout(()=>{v=void 0,I()},y)))}}return(I,y)=>(O(),me(xl,{ref_key:"gestureContainer",ref:r,zoom:e.zoom,zooming:e.zooming,"page-index":e.pageIndex,class:$e(["rbod",{"rbod--touch":e.touchDevice,"rbod--long-strip":e.isLongStrip,"rbod--paging":!e.isLongStrip,"rbod--vertical":e.isVertical,"rbod--rtl":e.isRTL,"rbod--idle":e.idle,"rbod--first":!e.isLongStrip&&e.pageIndex===0,"rbod--last":!e.isLongStrip&&e.pageIndex===e.totalImgs&&!e.hasNext,"rbod--1page":p.value.length===1}]),"play-controller":e.playController,horizontal:!e.isVertical,rtl:e.isRTL,"touch-device":e.touchDevice,busy:e.busy,"long-strip":e.isLongStrip,style:ze({"--gap":`${u.value}em`,"--space-top":(e.spaceTop||0)+"px","--screen-width-em":Y(l).width.value+"em","--screen-height-em":Y(l).height.value+"em",...e.isLongStrip?{"--max-size-em":C.value+"em"}:{}}),"onUpdate:zoom":y[0]||(y[0]=v=>i("update:zoom",v)),"onUpdate:zooming":y[1]||(y[1]=v=>i("update:zooming",v)),onDragEnd:y[2]||(y[2]=()=>i("dragEnd")),onClick:y[3]||(y[3]=()=>i("click")),onPrev:y[4]||(y[4]=()=>i("prev")),onNext:y[5]||(y[5]=()=>i("next"))},{default:ce(()=>[(O(!0),q(Me,null,pn(p.value,v=>{var z;return O(),q("div",Dn({key:e.direction+"_"+v.indexes[0],"data-index":v.indexes[0]},{ref_for:!0},v.indexes.length>1?{"data-index2":v.indexes[1]}:{}),[!((z=v.srcs)!=null&&z.length)||v.isLoading?(O(),q("div",Sd,[f.value[v.indexes[0]]?(O(),me(zi,{key:0})):Ee("",!0)])):v.srcs.length==1?(O(),me(jr(f.value[v.indexes[0]]?"img":"div"),Dn({key:1,class:"img"},{ref_for:!0},f.value[v.indexes[0]]?{src:v.srcs[0]}:{},{style:{width:v.width!==void 0?v.width+"em":"",height:v.height!==void 0?v.height+"em":""}}),null,16,["style"])):(O(),q("div",{key:2,class:$e(["img img--double",{"flex-row-reverse":e.isRTL}]),style:ze({width:v.width!==void 0?v.width+u.value+"em":"",height:v.height!==void 0?v.height+"em":""})},[v.indexes.some(N=>f.value[N])?(O(!0),q(Me,{key:0},pn(v.srcs,N=>(O(),q("div",{key:N},[G("img",{src:N},null,8,kd)]))),128)):Ee("",!0)],6))],16,_d)}),128)),G("div",{ref_key:"autoNextEl",ref:a,class:"last","data-index":e.totalImgs},[Ie(I.$slots,"end")],8,Cd)]),_:3},8,["zoom","zooming","page-index","play-controller","horizontal","rtl","touch-device","busy","long-strip","class","style"]))}}),[["styles",['.rbod{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:1024px){.rbod{transform:none}}.rbod--rtl{flex-direction:row-reverse}.rbod.rbod--vertical>div{padding:calc(var(--gap)/2) 0}.rbod:not(.rbod--vertical){align-items:center;display:flex;height:100%;justify-content:flex-start}.rbod:not(.rbod--vertical)>div{padding:0 calc(var(--gap)/2)}.rbod--long-strip.rbod--vertical.rbod--1page>div:first-child{min-height:100vh}.rbod--long-strip.rbod--vertical>div:first-child{margin-top:var(--space-top);padding-top:0}.rbod--long-strip.rbod--vertical>div:last-child{padding-bottom:0}.rbod--long-strip.rbod--vertical>div{width:var(--max-size-em)}.rbod--long-strip.rbod--vertical .img--loading{height:75vh;width:100%}.rbod--long-strip.rbod--vertical .last{height:100vh}.rbod--long-strip:not(.rbod--vertical).rbod--1page>div:first-child{min-width:100vw}.rbod--long-strip:not(.rbod--vertical)>div{align-items:center;display:flex;height:var(--max-size-em)}.rbod--long-strip:not(.rbod--vertical) .img--loading{height:100%;max-width:100vw;width:680px}.rbod--long-strip:not(.rbod--vertical) .last{width:100vw}.rbod--long-strip>div>img{flex-shrink:0;margin:auto}.rbod--paging:not(.rbod--touch):after,.rbod--paging:not(.rbod--touch):before{content:"";cursor:pointer;display:block;position:fixed;z-index:10}.rbod--paging.rbod--first:before,.rbod--paging.rbod--last:after{cursor:default}.rbod--paging.rbod--idle:after,.rbod--paging.rbod--idle:before{cursor:none}.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:after,.rbod--paging.rbod--vertical:before{height:20vw;left:0;right:0}.rbod--paging.rbod--vertical:before{top:0}.rbod--paging.rbod--vertical:after{bottom:0}.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).rbod--rtl:before{right:0}.rbod--paging:not(.rbod--vertical).rbod--rtl:after,.rbod--paging:not(.rbod--vertical):not(.rbod--rtl):before{left:0}.rbod--paging:not(.rbod--vertical):not(.rbod--rtl):after{right:0}.rbod--paging:not(.rbod--vertical):after,.rbod--paging:not(.rbod--vertical):before{bottom:0;top:0;width:20vw}.rbod--paging:not(.rbod--vertical)>div{height:var(--screen-height-em)}.rbod--paging .img--loading{height:100%;width:100%}.rbod--paging .img.img--double{align-items:center;background-color:transparent;display:flex;gap:var(--gap);justify-content:center}.rbod--paging .img.img--double div{display:flex;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rbod--paging .img.img--double div img{flex-shrink:0;max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain}.rbod>div{flex-shrink:0}.rbod .img,.rbod>div{margin:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none}.rbod .img{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));-o-object-fit:contain;object-fit:contain}.rbod .img--loading{align-items:center;background-color:transparent;display:flex;justify-content:center}']]]),Td=Object.freeze(Object.defineProperty({__proto__:null,default:_l},Symbol.toStringTag,{value:"Module"})),Id={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},Md={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},Ed={class:"flex justify-between items-end"},Pd={class:"inline-block children-pointer-events-auto"},Od={class:"inline-flex flex-col items-end gap-4 children-pointer-events-auto"},$d={class:"inline-block z-20 relative"},Ad={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"},Sl=ye(Te({__name:"ReaderLayout",props:{loading:{type:Boolean},immediate:{type:Boolean},idle:{type:Boolean},fullScreen:{type:Boolean},zooming:{type:Boolean},rtl:{type:Boolean},spaceTop:{type:null}},setup(e,{expose:t}){const n={mounted:i=>i.showModal(),beforeUnmount:i=>i.close()},o=te(null);return t({rootEl:o}),(i,r)=>vt((O(),q("dialog",Id,[G("div",{ref_key:"rootEl",ref:o,id:"reader-layout",class:$e({"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?(O(),q("div",Md,[ee(zi)])):Ee("",!0),Ie(i.$slots,"default"),G("div",{id:"controls",class:$e(["fixed pointer-events-none cursor-auto transition-opacity duration-100 ease-linear 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.fullScreen,"opacity-0 -z-10":e.fullScreen}])},[G("div",{class:"flex gap-1 items-center children-pointer-events-auto relative z-30 flex-shrink-0 2xs:gap-3",style:ze({paddingTop:`${e.spaceTop||0}px`})},[Ie(i.$slots,"back"),Ie(i.$slots,"exit"),Ie(i.$slots,"chapter-nav")],4),G("div",Ed,[G("div",Pd,[Ie(i.$slots,"page-nav")]),G("div",Od,[Ie(i.$slots,"entry"),G("div",$d,[Ie(i.$slots,"settings")]),Ie(i.$slots,"full-screen"),Ie(i.$slots,"play"),Ie(i.$slots,"break-first")])]),G("div",{class:$e(["fixed pointer-events-none left-0 right-0 bottom-0",{"flex justify-end":e.rtl}])},[Ie(i.$slots,"progress")],2)],2),!e.fullScreen||e.zooming?(O(),q("div",Ad,[Ie(i.$slots,"reset-zoom")])):Ee("",!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))}"]]]),Ld=Object.freeze(Object.defineProperty({__proto__:null,default:Sl},Symbol.toStringTag,{value:"Module"})),kl=ye(Te({__name:"ReaderTour",emits:["hide"],setup(e,{emit:t}){const n=t,o=te(null),i=te(0),r=te([]),s=oe(()=>r.value[i.value]),a=Js(l,500);Ge(()=>{const f=el(o),p=tt(()=>u({width:f.width.value,height:f.height.value}),50);p(),pe(f.width,p),pe(f.height,p)});function l(){i.value>=r.value.length-1?n("hide"):i.value++}function u(f){const p=c();r.value=p.map(({rect:g,text:x})=>{const C=g.top<f.height-g.bottom,B=g.left<f.width-g.right;return{text:x,style:{left:`${g.left}px`,top:`${g.top}px`,width:`${g.width}px`,height:`${g.height}px`},textStyle:{left:B?`${g.left-12}px`:void 0,right:B?void 0:`${f.width-g.left}px`,top:C?`${g.bottom+12}px`:`${g.top+20}px`,textAlign:C?void 0:"right",transform:C?void 0:"translateY(-50%)"}}}),i.value>=r.value.length&&(i.value=r.value.length-1)}function c(){var g;const f=(g=o.value)==null?void 0:g.parentElement;if(!f)return[];const p=[];return f.querySelectorAll("[data-tour]").forEach(x=>{var H;const C=(H=x.getAttribute("data-tour"))==null?void 0:H.trim();if(!(C!=null&&C.length))return;const B=x.getBoundingClientRect();p.push({rect:B,text:C})}),p}return(f,p)=>{var g,x;return O(),q(Me,null,[G("div",{class:$e(["fixed inset-0 bg-black bg-opacity-50 duration-500",{"opacity-0":!s.value,"opacity-100":!!s.value}])},null,2),G("div",{ref_key:"root",ref:o,class:"tour",onClick:p[0]||(p[0]=We((...C)=>Y(a)&&Y(a)(...C),["stop"]))},[s.value?(O(),q("div",{key:i.value,class:"tour__target",style:ze(s.value.style)},null,4)):Ee("",!0),(O(),q("div",{key:i.value,class:"tour__text",style:ze((g=s.value)==null?void 0:g.textStyle)},Xe(((x=s.value)==null?void 0:x.text)??""),5))],512)],64)}}}),[["styles",[".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:10px}}"]]]),zd=Object.freeze(Object.defineProperty({__proto__:null,default:kl},Symbol.toStringTag,{value:"Module"})),Dd={},Nd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function jd(e,t){return O(),q("svg",Nd,[...t[0]||(t[0]=[G("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 Cl=ye(Dd,[["render",jd]]),Rd=Object.freeze(Object.defineProperty({__proto__:null,default:Cl},Symbol.toStringTag,{value:"Module"})),Bd={},Fd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Hd(e,t){return O(),q("svg",Fd,[...t[0]||(t[0]=[G("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 Tl=ye(Bd,[["render",Hd]]),Vd=Object.freeze(Object.defineProperty({__proto__:null,default:Tl},Symbol.toStringTag,{value:"Module"})),Wd={},Ud={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Kd(e,t){return O(),q("svg",Ud,[...t[0]||(t[0]=[G("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 Il=ye(Wd,[["render",Kd]]),qd=Object.freeze(Object.defineProperty({__proto__:null,default:Il},Symbol.toStringTag,{value:"Module"})),Yd={},Zd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Xd(e,t){return O(),q("svg",Zd,[...t[0]||(t[0]=[G("path",{fill:"currentColor",d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z"},null,-1)])])}const Ml=ye(Yd,[["render",Xd]]),Gd=Object.freeze(Object.defineProperty({__proto__:null,default:Ml},Symbol.toStringTag,{value:"Module"})),Jd={},Qd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function ep(e,t){return O(),q("svg",Qd,[...t[0]||(t[0]=[G("path",{fill:"currentColor",d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z"},null,-1)])])}const El=ye(Jd,[["render",ep]]),tp=Object.freeze(Object.defineProperty({__proto__:null,default:El},Symbol.toStringTag,{value:"Module"})),np={},op={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 56"};function ip(e,t){return O(),q("svg",op,[...t[0]||(t[0]=[G("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 Pl=ye(np,[["render",ip]]),rp=Object.freeze(Object.defineProperty({__proto__:null,default:Pl},Symbol.toStringTag,{value:"Module"})),sp={},lp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function ap(e,t){return O(),q("svg",lp,[...t[0]||(t[0]=[G("g",{fill:"none"},[G("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"}),G("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 Ol=ye(sp,[["render",ap]]),cp=Object.freeze(Object.defineProperty({__proto__:null,default:Ol},Symbol.toStringTag,{value:"Module"})),up={},fp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function dp(e,t){return O(),q("svg",fp,[...t[0]||(t[0]=[G("path",{fill:"currentColor",d:"M4 4h6v2H6v4H4V4Zm10 0h6v6h-2V6h-4V4ZM6 14v4h4v2H4v-6h2Zm14 0v6h-6v-2h4v-4h2Z"},null,-1)])])}const $l=ye(up,[["render",dp]]),pp=Object.freeze(Object.defineProperty({__proto__:null,default:$l},Symbol.toStringTag,{value:"Module"})),hp={},gp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function mp(e,t){return O(),q("svg",gp,[...t[0]||(t[0]=[G("path",{fill:"currentColor",d:"M14 20v-6h6v2h-4v4h-2Zm-6 0v-4H4v-2h6v6H8Zm12-10h-6V4h2v4h4v2Zm-10 0H4V8h4V4h2v6Z"},null,-1)])])}const Al=ye(hp,[["render",mp]]),vp=Object.freeze(Object.defineProperty({__proto__:null,default:Al},Symbol.toStringTag,{value:"Module"})),bp={},yp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function wp(e,t){return O(),q("svg",yp,[...t[0]||(t[0]=[G("path",{fill:"currentColor",d:"M19 12.998h-6v6h-2v-6H5v-2h6v-6h2v6h6z"},null,-1)])])}const Ll=ye(bp,[["render",wp]]),xp=Object.freeze(Object.defineProperty({__proto__:null,default:Ll},Symbol.toStringTag,{value:"Module"})),_p={},Sp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function kp(e,t){return O(),q("svg",Sp,[...t[0]||(t[0]=[G("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 zl=ye(_p,[["render",kp]]),Cp=Object.freeze(Object.defineProperty({__proto__:null,default:zl},Symbol.toStringTag,{value:"Module"}));function Wn(e=0){return new Promise(t=>setTimeout(t,e))}function Dl(e){const t=async(n,o)=>{var i;if(!n.toBlob){if(o)return;const r=n.cloneNode(),s=(i=r.getContext)==null?void 0:i.call(r,"2d");if(!s)return;try{s.drawImage(e,0,0)}catch{return}return t(r,!0)}return await new Promise(r=>{const s=a=>{if(!a)return r(void 0);const l=URL.createObjectURL(a);r(l)};try{n.toBlob(s,"image/jpeg",1)}catch{r(void 0)}})};return t(e,!1)}let $o;async function Tp(e,t){if($o||!t.startsWith("blob:"))return t;if($o===void 0){try{if((await fetch(t)).ok)return $o=!0,t}catch{}$o=!1}e.complete||await new Promise(l=>{let u=0;const c=setInterval(()=>{e.complete?(l(),clearInterval(c)):++u>=30&&l()},100)});const o=e.naturalWidth,i=e.naturalHeight;if(!o||!i)return;const r=document.createElement("canvas"),s=r.getContext("2d");return r.width=o,r.height=i,s==null||s.drawImage(e,0,0,o,i),await Dl(r)}function Ip(e){const t=new Set,n=e.getAttributeNames(),o=n.indexOf("src"),i=o!==-1;i&&(n.splice(o,1),n.push("src"));for(const r of n){if(r==="srcset"||i&&r===":src"||r!=="data-url"&&r!=="data-original"&&!r.includes("src"))continue;const s=e.getAttribute(r);s&&(r==="src"&&e.naturalWidth&&e.naturalWidth<200||t.add(s.replace(/(\n|\t)/g," ").trim()))}return Array.from(t)}function Ni(e,t){return e>=75&&t>=50&&(e>=200||t>=200)}class Mp{constructor({onChanged:t}){Ae(this,"isMounted",!0);Ae(this,"elsDisposeCallbacksMap",new Map);Ae(this,"onChanged");this.onChanged=t}dispose(){this.isMounted=!1,this.elsDisposeCallbacksMap.forEach(t=>t()),this.elsDisposeCallbacksMap=new Map,this.onChanged=()=>{}}async download(t){if(!this.isMounted)return;const n=t.el,o=!!n&&n instanceof HTMLImageElement,i=n?o?Ip(n):[await Dl(n)].filter(Boolean):[t.src].filter(Boolean);if(!(!n&&!i.length||!this.isMounted)){if(n&&!this.elsDisposeCallbacksMap.has(n))if(o){let r=i.slice(-1)[0];const s=new MutationObserver(a=>{a.some(u=>{if(u.attributeName!=="src")return!1;const c=r;return r=n.getAttribute("src"),!!r&&c!==r})&&this.download(t)});s.observe(n,{attributes:!0}),this.elsDisposeCallbacksMap.set(n,()=>s.disconnect())}else{const r=n.getContext("2d");if(r){const s=r.drawImage.bind(r),a=r.putImageData.bind(r),l=(u,c,f)=>(setTimeout(()=>this.download(t),100),u.apply(c,f));r.drawImage=new Proxy(s,{apply:l}),r.putImageData=new Proxy(a,{apply:l}),this.elsDisposeCallbacksMap.set(n,()=>{r.drawImage=s,r.putImageData=a})}}i.length&&(this.onChanged(t,{src:i[0],isLoading:!0,hasError:!1}),await this.downloadRawImage(t,i))}}async downloadRawImage(t,n){const o=t.el instanceof HTMLImageElement?t.el:void 0;for(let i=0;i<n.length;i++){const r=n[i],s=o?await Tp(o,r):r;if(!s||!this.isMounted)return;const a=await Ep(s,o,l=>{this.isMounted&&this.onChanged(t,{src:s,size:l,isLoading:!1,hasError:!1})});if(a.ok||!this.isMounted)return;i===n.length-1&&this.onChanged(t,{src:s,isLoading:!1,hasError:!!a.error,invalid:!!a.invalid,size:a.size})}}}async function Ep(e,t,n){return(t==null?void 0:t.src)===e&&t.naturalWidth&&t.naturalHeight?(n({width:t.naturalWidth,height:t.naturalHeight}),t.complete?{ok:!0}:new Promise(o=>{t.addEventListener("load",()=>o({ok:!0}),{once:!0})})):await new Promise(o=>{const i=new Image,r=setInterval(()=>{const{naturalWidth:s,naturalHeight:a}=i;if(a&&s){const l={width:s,height:a};Ni(s,a)?n(l):o({invalid:!0,size:l}),clearInterval(r)}},20);i.onerror=()=>{o({error:!0}),clearInterval(r)},i.onload=()=>setTimeout(()=>o({ok:!0}),25),i.src=e})}const Pp=3;class Op{constructor(t){Ae(this,"download");Ae(this,"threads");Ae(this,"completedItems");Ae(this,"promisesMap",new Map);this.download=t.download}dispose(){var t;(t=this.threads)==null||t.dispose(),this.threads=void 0,this.completedItems=void 0}run({activeIndex:t,items:n}){var r;if(this.completedItems===n)return;this.completedItems=void 0,(r=this.threads)==null||r.dispose();let o=Math.max(0,t-1),i=!0;this.threads=new $p(Pp,()=>{const s=n[o];if(!s){this.completedItems=n;return}i&&o===n.length-1?(i=!1,o=t-2):i?o++:o--;const a=s.src??s.el;if(a){const u=this.promisesMap.get(a);if(u)return u}const l=this.download(s);return a&&this.promisesMap.set(a,l),l}),this.threads.exec()}}class $p{constructor(t,n){Ae(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 Wn(20),this.next())}}class Nl{constructor(){Ae(this,"elsPool",new Map)}check(t){if(!t||t===document.body)return!0;const n=this.elsPool.get(t);if(n!==void 0)return n;const o=getComputedStyle(t);if(!(o.display!=="none"&&+(o.opacity??"1")>.1))return this.elsPool.set(t,!1),!1;const r=this.check(t.parentElement);return this.elsPool.set(t,r),r}}function Ap(e,t){let n=[t??document.documentElement];const o=e.split("->");for(let i=0;i<o.length;i++){const r=o[i];n=n.map(s=>Array.from((s.shadowRoot??s).querySelectorAll(r))).flat()}return n}function ji(e){if(e instanceof HTMLOptionElement){const t=e.parentElement instanceof HTMLOptGroupElement?e.parentElement.parentElement:e.parentElement;if(!t||!(t instanceof HTMLSelectElement))return;const n=e.getAttribute("value")||"";if(t.value===n)return;t.value=n,t.dispatchEvent(new Event("change"));return}e instanceof HTMLAnchorElement&&e.addEventListener("click",t=>t.preventDefault(),{once:!0}),e.click(),e.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0,pointerType:"mouse",button:0})),e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0}))}async function Lp(e){const{lstrip:t,lstripBtn:n}=e||{};if(!t||!n||!!document.querySelector(t))return!1;const i=n.split(";");for(const r of i)if(!await zp(r.trim()))return!1;return!0}async function zp(e){const t=await bn(50,30,()=>document.querySelector(e));return t?(ji(t),await Wn(),!0):!1}class Dp{constructor({spec:t,onChanged:n}){Ae(this,"spec");Ae(this,"onChanged");Ae(this,"rawImages",[]);Ae(this,"isMounted",!0);Ae(this,"loadRawImagesTs");Ae(this,"imgListenersMap",new Map);Ae(this,"disconnectObservers");Ae(this,"contentEl");Ae(this,"reloadRawImages",tt(()=>{this.contentEl&&this.loadRawImages(this.contentEl)},100));this.spec=t,this.onChanged=n,this.init()}dispose(){var t;this.isMounted=!1,(t=this.disconnectObservers)==null||t.call(this),this.disconnectObservers=void 0,this.onChanged=()=>{}}init(){var i;const t=new MutationObserver(this.reloadRawImages),n=(i=this.spec)!=null&&i.imgDivs?void 0:(()=>{let r=window.innerWidth;return new ResizeObserver(tt(()=>{const s=window.innerWidth;if(s!==r){r=s;return}this.reloadRawImages()},50))})();this.disconnectObservers=async()=>{t.disconnect(),n==null||n.disconnect()};let o=!1;this.loadContentEl(r=>{this.contentEl!==r&&(this.contentEl=r,t.disconnect(),n==null||n.disconnect(),t.observe(this.contentEl,{childList:!0,subtree:!0}),n==null||n.observe(this.contentEl),o?this.reloadRawImages():(o=!0,this.loadRawImages(this.contentEl)))})}setRawImages(t){let n=!1;const o=t.map((i,r)=>{const s=this.rawImages[r];return s&&s.el===i.el&&s.parentEl===i.parentEl&&s.src===i.src?s:(n=!0,i)});(n||!o.length)&&(this.rawImages=o,this.onChanged(t))}async loadContentEl(t){var a;const n=await Lp(this.spec),o=(a=this.spec)==null?void 0:a.content;if(!o){t(document.body);return}let i=await bn(n?100:1,10,()=>{for(const l of o.split(",")){const u=document.querySelector(l);if(u)return u}});if(!i)return;t(i);let r=0;const s=async()=>{if(this.isMounted&&!(i!=null&&i.isConnected)){if(r=0,i=await bn(50,20,()=>{const l=document.querySelector(o);return l!=null&&l.isConnected&&l!==i?l:void 0}),!i)return;t(i)}!this.isMounted||++r>=10||setTimeout(s,200)};setTimeout(s,200)}async loadRawImages(t){var r;if(!this.isMounted||!t.isConnected)return;const n=Date.now();this.loadRawImagesTs=n;const o=(r=this.spec)==null?void 0:r.imgDivs,i=o?await this.loadFromImgDivs(t,o):this.loadFromContentEl(t);this.loadRawImagesTs!==n||!t.isConnected||!this.isMounted||this.setRawImages(i)}async loadFromImgDivs(t,n){const o=Ap(n,t);if(!o.length)return this.loadFromContentEl(t);const i=new Nl;return o.map(s=>{const a=Array.from(s.querySelectorAll("img,canvas"));for(const l of a)if(i.check(l)){if(l instanceof HTMLCanvasElement){if(jl(l))return{el:l,parentEl:s}}else if(l instanceof HTMLImageElement&&Rl(l))return{el:l,parentEl:s}}return{parentEl:s}})}loadFromContentEl(t){const n=[],o={},i=new Nl;return Array.from(t.querySelectorAll("img,canvas")).forEach(s=>{if(!i.check(s)){this.observeInvalidImgEl(s);return}if(s instanceof HTMLCanvasElement)jl(s)&&n.push({el:s});else if(s instanceof HTMLImageElement)if(Rl(s)){const a=s.getAttribute("src");if(a){const l=o[a];if(l!==void 0&&l!==-1){n.splice(l,1);return}o[a]=n.length}n.push({el:s})}else this.observeInvalidImgEl(s)}),n}observeInvalidImgEl(t){if(!(t instanceof HTMLImageElement)||this.imgListenersMap.has(t))return;const n=()=>{t.removeEventListener("load",n),this.imgListenersMap.delete(t),this.reloadRawImages()};this.imgListenersMap.set(t,n),t.addEventListener("load",n)}}function jl(e){return e.isConnected&&Ni(e.width,e.height)}function Rl(e){if(!e.isConnected)return!1;const t=e.getBoundingClientRect();return!t.width||!t.height||Ni(t.width,t.height)}const Ri="mp-scroll-container";class Bi{constructor(){Ae(this,"unmountedCallbacks",new Map)}dispose(){for(const t of this.unmountedCallbacks.values())t()}scrollTo({rawImages:t,page:n,skipIfVisible:o,isScrollDown:i,fallbackScrollEl:r}){const s=Math.floor(n),a=t[Math.min(t.length-1,s)];if(!a)return;const l=a.el??a.parentEl??(a.src?document.querySelector(`img[src^="${a.src}"]`):void 0);if(!l)return;const u=l.getBoundingClientRect();if(o&&u.top<=0&&u.top+u.height>0)return;const c=Bi.getScrollable(l,r);if(!c)return;const{el:f,top:p}=c;r!==document.documentElement&&!f.classList.contains(Ri)&&(f.classList.add(Ri),this.unmountedCallbacks.has(f)||this.unmountedCallbacks.set(f,()=>{f.classList.remove(Ri)}));const g=n>=t.length?u.height:i?Math.max(0,u.height-window.innerHeight+100):n%1*u.height,x={top:p+g,behavior:"instant"};f.scrollTo(x),f===document.body&&document.documentElement.scrollTo(x)}static getScrollable(t,n){const o=(i,r)=>{if(!i)return;const{offsetTop:s,offsetParent:a}=i;if(a&&s&&r.set(a,Math.max(r.get(a)??0,s)),!(i===n||i.scrollHeight-i.clientHeight>=10&&window.getComputedStyle(i).overflow!=="visible"))return o(i.parentElement,r);let u=0;return r.forEach((c,f)=>{u+=f===a?c-s:c}),{el:i,top:u}};return o(t,new Map)}}function Bl(e){var t,n;for(let o=0;o<e.length;o++){const i=((t=e[o])==null?void 0:t.el)??((n=e[o])==null?void 0:n.parentEl),r=i==null?void 0:i.getBoundingClientRect();if(!r||r.bottom<=0)continue;const s=r.top;return o+(s>=0?0:-s/r.height)}return 0}function Np(e){if(document.documentElement.scrollTop<700)return 0;const n=Array.from(document.querySelectorAll("img[src]")).filter(o=>e.includes(o.src)).map(o=>({el:o}));return Bl(n)}function jp(e){var k,D,Q;const t=(k=e.raw.value)==null?void 0:k.isWebtoon,n=te(t===!1),o=te(t);let i=!1;const r=e.touchDevice&&!navigator.userAgent.toLowerCase().includes("android"),s=((Q=(D=e.raw.value)==null?void 0:D.imgs)==null?void 0:Q.filter(Boolean))??[];let a=e.isAutoShow!==!1?e.page.value:s.length?Np(s):void 0,l=s.map(m=>({src:m})),u,c;const f=new Map,p=({src:m,el:_})=>{const U=_??m;return U?f.get(U):void 0},g=te(s.map(m=>({src:m,isLoading:!0,hasError:!1}))),x=()=>{const m=[];l.forEach(_=>{const{src:U,el:X}=_,w=X??U,$=w?f.get(w):void 0;(w&&!($!=null&&$.invalid)||_.parentEl)&&m.push($)}),g.value=m};let C=setTimeout(e.onTimeout,2e4);const B=()=>{C&&(clearTimeout(C),C=void 0)};let H=0,Z=0;const W=4,I=new Mp({onChanged(m,_){const U=m.el??m.src;if(!U||(f.set(U,_),x(),_.isLoading))return;if(_.hasError){if(c||o.value!==void 0)return;c=setTimeout(()=>{c=void 0,o.value===void 0&&e.onError("Failed to load images")},3e3);return}const{size:X,invalid:w}=_;if(!(!X||w)){if(!o.value&&Z<W){const $=i?l:l.filter(({el:Pe,src:Oe})=>Oe||!(Pe&&Pe instanceof HTMLImageElement&&!f.has(Pe)));let b=$.indexOf(m);if(i&&b>4||b===-1&&(m.el&&(b=$.findIndex(Pe=>Pe.el===m.el)),b===-1))return;const F=b>Math.min(1,$.length-3)&&b<Math.max($.length-2,3),re=X.width/X.height;re>2&&H++;const se=re<.5||H>=W,we=!se&&.65<re&&re<.75;we&&Z++,o.value!==se&&(F||se)&&(o.value=se),F&&n.value!=we&&(n.value=!0),o.value===void 0&&we&&Z===W&&(o.value=!1)}N()}}}),y=new Op({download:async m=>{!(m.el&&f.has(m.el))&&!(m.src&&f.has(m.src))&&await I.download(m)}}),v=()=>{y.run({items:l,activeIndex:Math.min(l.length-1,Math.floor(e.page.value))})},z=new Bi;if(s.length)v();else{let m=!1;u=new Dp({spec:e.spec,async onChanged(_){var U;if(l=_,x(),!e.raw.value&&!_.length){e.onError("no_img");return}(U=e.spec)!=null&&U.imgDivs&&!m&&e.isAutoShow!==!1&&e.page.value&&(m=!0,z.scrollTo({rawImages:_,page:e.page.value,skipIfVisible:!0,fallbackScrollEl:r?document.body:document.documentElement}),await Wn(1)),a===void 0&&e.isAutoShow===!1&&(a=Bl(_)),v()}})}ii(()=>{I.dispose(),y.dispose(),u==null||u.dispose(),c&&clearTimeout(c),z.dispose(),i&&z.scrollTo({rawImages:l,page:e.page.value,fallbackScrollEl:document.documentElement})});function N(){if(i||o.value===void 0||a===void 0)return;const m=Math.max(0,Math.min(a,l.length)),_=Math.min(Math.floor(m),l.length-1);if(_>=1){const X=l[_];if(!X||!p(X)){e.isAutoShow&&z.scrollTo({rawImages:l,page:_,fallbackScrollEl:r?document.body:document.documentElement});return}for(let w=_;w<l.length;w++){const $=p(l[w]);if(!$)return;if(!$.invalid){if(!$.size&&!$.hasError)return;break}}for(let w=_-1;w>=0;w--){const{src:$,el:b}=l[w],F=b??$;if(!F)break;const re=f.get(F);if(!re)return;if(!re.invalid){if(!re.size&&!re.hasError)return;break}}}if(i)return;i=!0,B(),e.onReady(m);let U=!0;pe(()=>Math.floor(e.page.value),(X,w)=>{X===w&&!U||(z.scrollTo({rawImages:l,page:X,isScrollDown:w===void 0||X>w||l.length===1,skipIfVisible:U&&l.length>1,fallbackScrollEl:r?document.body:document.documentElement}),U=!1,w??(w=-1),v())},{immediate:!0})}return{asyncImgs:oe(()=>g.value),isWebtoon:oe(()=>o.value??!1),isManga:oe(()=>n.value)}}function Rp(e,t,n){return oe(()=>t.value?Fl(e.value,n.value):e.value.map((o,i)=>[{img:o,index:i}]))}function Fl(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,a)=>({img:s,index:n+a})),...Fl(e.slice(r.length),t&&i,n+r.length)]}function Bp(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=te(t&&e>0?Math.max(0,e):+(sessionStorage.getItem("tk:page")??"0")||e);return oe({get:()=>o.value,set:i=>{o.value=i,sessionStorage.setItem("tk:page",i+"")}})}function Fp(){sessionStorage.removeItem("tk:page"),sessionStorage.removeItem("tk:page:path")}const Fi=40;function Hp({page:e,totalImgs:t,direction:n,style:o,isLongStrip:i,isVertical:r,isRTL:s,spaceTop:a,scrollEl:l,isWebtoon:u,interferePlayer:c,onChangedPage:f,onInitialized:p,onFinished:g}){let x=!1,C=!1,B=!1,H;const Z=tt(D,300),W=Js(()=>{D(),Z()},300),I=b=>(z(b),tt(z,50)(b));async function y(){N(e.value,{smooth:!1,ensureLastImgVisibility:!0})}function v(){var b;C=!0,p(),Q(),(b=l.value)==null||b.addEventListener("scroll",W),setTimeout(()=>{const{width:F,height:re}=Ii();pe(F,()=>{r.value&&I(e.value)}),pe(re,()=>{r.value||I(e.value)}),pe(o,()=>I(e.value)),pe(n,()=>I(e.value)),/iPad|iPhone|iPod/.test(navigator.userAgent)&&pe(t,()=>{s.value&&I(e.value)})},300)}async function z(b){if(!(!C||x)){if(x=!0,await Mt(),_()===b){x=!1;return}N(b)}}function N(b,{smooth:F,ensureLastImgVisibility:re=!1}={smooth:!1}){const se=l.value;if(!se)return;x=!0;const we=async()=>{await Mt(),x=!1,C||v()},Pe=Math.floor(b),Oe=Di(se,Pe);if(!Oe){we();return}c(async()=>{await k(se,!i.value&&F,async()=>{await $(se,Oe,{smooth:F,page:b,ensureLastImgVisibility:re})}),await we()})}async function k(b,F,re){F&&b.style.setProperty("scroll-snap-type","none"),await re(),F&&b.style.removeProperty("scroll-snap-type")}function D(){if(x)return;const b=_();b!==void 0&&b!==e.value&&f(b),Q()}function Q(){B||!B&&m()&&(B=!0,g())}function m(){const b=l.value;if(!b)return!1;const F=i.value?u.value?3:!r.value&&b.clientWidth>b.clientHeight?2.25:2.5:2;return r.value?b.scrollHeight-b.scrollTop<b.clientHeight*F:b.scrollWidth-(s.value?-b.scrollLeft:b.scrollLeft)<b.clientWidth*F}function _(){const b=U();return b?(+b.getAttribute("data-index")||0)+(i.value?X(b):0):void 0}function U(){var F;if(H??(H=l.value.getRootNode()),!H)return;const b=(F=H.elementsFromPoint)==null?void 0:F.call(H,r.value||!i.value?window.innerWidth/2:s.value?window.innerWidth-Fi:Fi,r.value&&i.value?a.value||Fi:window.innerHeight/2);if(b)for(let re=0;re<b.length;re++){const se=b[re];if(se.hasAttribute("data-index"))return se;if(se===l.value)break}}function X(b){const F=b.getBoundingClientRect();return r.value?Math.abs(F.top-a.value)/F.height:s.value?Math.max(0,F.right-l.value.clientWidth)/F.width:Math.abs(F.left)/F.width}let w=!1;async function $(b,F,re){if(w)return;const se=F.getBoundingClientRect();if(!i.value){if(r.value){if(se.top<=0&&se.bottom>=b.clientHeight)return}else if(se.left<=0&&se.right>=b.clientWidth)return}w=!0;const we=r.value?b.scrollTop:b.scrollLeft,Pe=re.page,Oe=i.value?Pe%1:0,dt=await bn(30,10,async()=>{await Wn();let je;if(!(F.offsetHeight<10))return i.value?r.value?je=F.offsetTop+Oe*F.offsetHeight-a.value:s.value?je=F.offsetLeft-b.clientWidth+F.offsetWidth-Oe*F.offsetWidth:je=F.offsetLeft+Oe*F.offsetWidth:r.value?je=F.offsetTop+(se.top>0?0:se.height-b.clientHeight):je=F.offsetLeft+(se.left>0?0:se.width-b.clientWidth),Pe>.5&&Math.abs(je)<100?void 0:je})??0,Le=re.ensureLastImgVisibility?r.value?Math.min(dt,b.scrollHeight-b.clientHeight*2):s.value?Math.max(dt,-(b.scrollWidth-b.clientWidth*2)):Math.min(dt,b.scrollWidth-b.clientWidth*2):dt;if(!re.smooth){r.value?b.scrollTop=Le:b.scrollLeft=Le,w=!1;return}const zt=Le-we,Vt=30;let Wt=0;return new Promise(je=>{(function Ut(){const d=Vp(Wt,we,zt,Vt);r.value?b.scrollTop=d:b.scrollLeft=d,Wt++,Wt<=Vt?requestAnimationFrame(Ut):(je(),w=!1)})()})}return{init:y,goToPage:N}}function Vp(e,t,n,o){return n*(Math.pow(e/o-1,3)+1)+t}function Wp({autoPlay:e,touchDevice:t,scrollEl:n,isVertical:o,isRTL:i,isLongStrip:r,speed:s}){const a=te(e||sessionStorage.getItem("tk:playing")==="true"),l=oe({get:()=>a.value,set:v=>{a.value=v,sessionStorage.setItem("tk:playing",v?"true":"false")}}),u=te(!1);let c,f;const p=tt(I,100),g=tt(()=>{u.value=!0},t?2e3:1e3),x=()=>setTimeout(()=>{u.value=!1,g()},30);x(),t||Lt(window,"mousemove",x),Ge(()=>{t||pe(Ci(),z=>{l.value&&(z==="visible"?I():f==null||f())}),pe(s,()=>C()),pe(r,v=>{v||H()})}),Zt(H);async function C(v){l.value&&(f==null||f()),v&&(await Mt(),await v()),l.value&&p()}function B(){l.value?H():Z()}function H(){l.value&&(l.value=!1,f==null||f(),x())}function Z(){!l.value&&r.value&&(l.value=!0,I(),x())}function W(){f==null||f()}function I(){const v=n.value;if(!l.value||!v)return;const z=o.value?v.scrollHeight-v.clientHeight:v.scrollWidth-v.clientWidth,N=y();if(z<=N){H();return}f=()=>{c=Date.now(),f=void 0};const k=Date.now();c=k;const D=.1*s.value,Q=o.value?"scrollTop":"scrollLeft";let m=Date.now(),_=0;const U=()=>{if(c!==k)return;const X=Date.now(),w=X-m;m=X;const $=D*w+_;$>=1?(_=$%1,v[Q]+=($-_)*(i.value?-1:1)):_=$,setTimeout(U,1)};U()}function y(){const v=n.value;return o.value?v.scrollTop:i.value?-v.scrollLeft:v.scrollLeft}return{isPlaying:l,isIdle:u,toggle:B,play:Z,pause:W,resume:I,stop:H,interfere:C,awake:x}}function Up({raw:e,spec:t,siteMeta:n,onSelect:o}){var D,Q,m;const{vol:i,inferVol:r,chap:s,title:a,slug:l,basePath:u}=e,c=t==null?void 0:t.chapter;let f=-1;async function p(_,U){if(o){o({..._});return}if(_.slug){g(_.slug,U);return}if(_.elIndex===void 0||!(c!=null&&c.sel))return;let X=null;document.querySelector(c.sel)||(c!=null&&c.trigger&&(X=document.querySelector(c.trigger)),X&&(X.click(),await new Promise($=>setTimeout(()=>$(),50))));const w=c&&c.sel&&!c.url?document.querySelectorAll(c.sel):void 0;w!=null&&w[_.elIndex]&&(ji(w[_.elIndex]),X&&document.querySelector(c.sel)&&X.click())}function g(_,U){const X=Kp(u,_,(n==null?void 0:n.trailing)??!0);U?window.open(X,"_blank","noopener"):location.href=X}function x(_){const U=W[_];return U?X=>p(U,X):void 0}function C(_,U,X){if(_){const w=document.querySelector(_);w&&ji(w);return}U&&g(U,X)}const B=i??r,H=c==null?void 0:c.url,Z=((D=a.chapters)==null?void 0:D.filter(_=>_.slug||!H&&_.elIndex!==void 0))??[],W=Z.length>1?Z:[],I=(Q=e.prev)==null?void 0:Q.slug,y=(m=e.next)==null?void 0:m.slug,{prevBtn:v,nextBtn:z}=t??{};let N=I||v&&!W.length&&document.body.querySelector(v)?_=>C(v,I,_):void 0,k=y||z&&!W.length&&document.body.querySelector(z)?_=>C(z,y,_):void 0;if(W.length){if(H&&(f=W.findIndex(_=>_.slug===e.slug)),f===-1&&(f=W.findIndex(_=>(_.vol??_.inferVol)===B&&_.chap===s)),H&&f===-1&&(f=W.findIndex(_=>_.slug&&l.startsWith(`${_.slug}-`)&&l.length-_.slug.length>3)),f!==-1)N??(N=x(f+1)),k??(k=x(f-1));else if(!I&&!y){const _=W.findIndex(U=>{const X=U.vol??U.inferVol;return B===void 0||X===void 0||B===X?U.chap<s:X<B});_!==-1?(N=x(_),k=x(_-1)):k=x(W.length-1)}}return{activeIndex:f,activeLabel:Hl({vol:i,chap:s}),prev:N,next:k,chapters:W.map(_=>({label:Hl(_),select:U=>p(_,U)}))}}function Hl({vol:e,chap:t}){return e==null?`Ch.${t}`:`Vol.${e} ch.${t}`}function Kp(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("?")}var Ao=(e=>(e[e.never=0]="never",e[e.move=1]="move",e[e.firstMove=2]="firstMove",e))(Ao||{});const qp={class:"flex justify-center items-center gap-1 pl-1 pr-2 h-full"},Yp={key:0,class:"ml-auto inline-flex gap-[1px] scale-95 origin-right"},Vl=ye(Te({inheritAttrs:!1,__name:"App",props:{immediate:{type:Boolean},raw:{type:Object},spec:{type:Object},siteMeta:{type:null},page:{type:Number},spaceTop:{type:Number},fullScreen:{type:Boolean},touchDevice:{type:Boolean},entryId:{type:String},autoPlay:{type:Boolean},readerStyle:{type:Number},direction:{type:Number},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean},offlineMode:{type:Boolean},autoNextSeconds:{type:Number},defaultGap:{type:Number},hideControlsEvent:{type:Number},progressSize:{type:Number}},emits:["error","crash","ready","pageChanged","fullScreenChanged","playingChanged","tourEnabledChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","timeout"],setup(e,{emit:t}){const n=e,o=t;let i=!1;Dr((T,L,ue)=>{var de;if(!i){i=!0;const _t=`(1.27.1) ${(L==null?void 0:L.$options.name)??(L==null?void 0:L.$options.__name)??(L==null?void 0:L.$options.__file)}.${ue}: ${(de=T.stack)==null?void 0:de.replaceAll(/(\n|\t)/g," ")}`;o("crash",_t)}return!1});let r=!1,s;const a=te(!1),l=te(!1),u=Uu({touchDevice:n.touchDevice}),c=Bp(n.page,n.isAutoShow),f=oe(()=>n.immediate||a.value?n.spaceTop??0:0),{asyncImgs:p,isWebtoon:g}=jp({raw:oe(()=>n.raw),spec:n.spec,page:c,touchDevice:n.touchDevice,isAutoShow:n.isAutoShow,async onReady(T){Le(T),a.value=!0},onError:()=>{o("error"),E()},onTimeout:()=>o("timeout")}),{direction:x,style:C,isRTL:B,isDouble:H,isVertical:Z,isLongStrip:W,gap:I,speed:y,zoom:v,breakFirst:z,autoNextSeconds:N}=Mf({isWebtoon:g,titleName:oe(()=>{var T;return(T=n.raw)==null?void 0:T.title.name}),defaultStyle:oe(()=>n.readerStyle),defaultDirection:oe(()=>n.direction),defaultGap:oe(()=>n.defaultGap)}),k=te(!1),D=Rp(p,H,z),Q=oe(()=>p.value.length),m=oe(()=>c.value>=Q.value),_=oe(()=>n.raw?Up({raw:n.raw,spec:n.spec,siteMeta:n.siteMeta,onSelect:n.offlineMode?T=>o("selectChapter",T):void 0}):void 0),U=te(null),X=te(null),w=te(!1),$=te(!1),b=Wp({autoPlay:!n.tourEnabled&&n.autoPlay,touchDevice:n.touchDevice,scrollEl:oe(()=>{var T;return(T=U.value)==null?void 0:T.rootEl}),speed:y,isRTL:B,isVertical:Z,isLongStrip:W}),F=oe(()=>!n.touchDevice&&b.isIdle.value&&!u.value&&!k.value),re=oe({get(){return v.value},set(T){b.interfere(()=>{v.value=T})}}),se=Hp({page:c,totalImgs:Q,style:C,direction:x,isLongStrip:W,isVertical:Z,isRTL:B,spaceTop:f,isWebtoon:g,scrollEl:oe(()=>{var T;return(T=U.value)==null?void 0:T.rootEl}),interferePlayer:T=>b.interfere(T),onChangedPage:Le,onInitialized(){o("ready"),l.value=!0,s=zt()},onFinished:()=>o("finished")}),we=oe(()=>Math.floor(c.value)),Pe=oe(()=>W.value?c.value:H.value?j():Math.floor(c.value)),Oe=()=>b.interfere(()=>Wn(100));ef().addListener({onKeyDown:T=>{if(n.tourEnabled)return;const L=W.value&&Z.value,ue=W.value&&!Z.value,de=!W.value&&Z.value,qe=!W.value&&!Z.value;switch(T.key){case" ":T.preventDefault(),W.value?(be(!1),b.toggle()):J();break;case"ArrowUp":case"PageUp":L?Oe():de&&we.value!==0&&(T.preventDefault(),V());break;case"ArrowDown":case"PageDown":L?Oe():de&&!m.value&&(T.preventDefault(),R());break;case"ArrowLeft":ue?Oe():qe?(T.preventDefault(),M()):Z.value&&d();break;case"ArrowRight":ue?Oe():qe?(T.preventDefault(),P()):Z.value&&Ut();break;case"Escape":T.preventDefault();break}},onKeyUp:T=>{switch(T.key){case"b":z.value=!z.value;break;case"f":ne();break;case"t":K();break;case"h":be();break}}}),Nu(()=>o("hapticFeedback")),Lt("fullscreenchange",()=>{w.value=!!document.fullscreenElement}),n.touchDevice&&pe(Ci(),L=>{L==="hidden"&&(b.isPlaying.value?b.stop():n.fullScreen&&J(!1))}),pe(b.isPlaying,T=>{T||J(!1),o("playingChanged",T)}),pe(b.isIdle,T=>{b.isPlaying.value&&J(T)}),pe(u,T=>{!T&&b.isIdle.value?b.awake():T&&n.fullScreen&&J()});function Le(T){if(c.value===T)return;const L=p.value.length;if(T<0||T>=L+1)return;const ue=Math.floor(T*100)/100;if(ue===c.value)return;const de=c.value;if(c.value=ue,o("pageChanged",ue),T>=L){J(!1),b.stop();return}if(T<.01&&de>T){J(!1),b.awake();return}const _t=n.hideControlsEvent??Ao.firstMove;if(!r&&_t===Ao.firstMove){(W.value?s!==void 0&&Math.abs(zt()-s)>300:Math.abs(de-T)>=1)&&J(!0);return}!b.isPlaying.value&&_t===Ao.move&&J(!0)}function zt(){var L;const T=(L=U.value)==null?void 0:L.rootEl;return T?Z.value?T.scrollTop:B.value?-T.scrollLeft:T.scrollLeft:0}function Vt(){!n.touchDevice&&!W.value&&se.goToPage(we.value,{smooth:!0})}function Wt(){if(b.isPlaying.value){!n.fullScreen||!n.touchDevice?b.stop():b.awake();return}J()}function je(T){n.offlineMode&&(T.preventDefault(),o("pressedBack"))}function Ut(T=!1){var L,ue;(ue=(L=_.value)==null?void 0:L.next)==null||ue.call(L,T)}function d(T=!1){var L,ue;(ue=(L=_.value)==null?void 0:L.prev)==null||ue.call(L,T)}function h(T){B.value?Ut(A(T)):d(A(T))}function S(T){B.value?d(A(T)):Ut(A(T))}function A(T){return!n.touchDevice&&(T.ctrlKey||T.metaKey)}function M(){B.value?R():V()}function P(){B.value?V():R()}function V(){var ue;const T=D.value,L=m.value?T[T.length-1][0].index:(ue=T[j()-1])==null?void 0:ue[0].index;L!==void 0?se.goToPage(L):d()}function R(){var T,L;if(m.value)Ut();else{const ue=((L=(T=D.value[j()+1])==null?void 0:T[0])==null?void 0:L.index)??p.value.length;se.goToPage(ue)}}function j(){const T=we.value,L=D.value.findIndex(ue=>ue.some(({index:de})=>de===T));return L===-1?D.value.length-1:L}function E(){if(n.offlineMode){o("pressedBack");return}Fp(),o("dispose")}async function J(T){if(u.value&&!n.fullScreen)return;const L=typeof T=="boolean"?T:!n.fullScreen;L!==n.fullScreen&&(r=!0,o("fullScreenChanged",L),L&&setTimeout(()=>{n.fullScreen&&u.value&&o("fullScreenChanged",!1)},100))}function K(){n.entryId?he():le()}function ne(){var T,L;document.fullscreenElement?document.exitFullscreen():(L=(T=X.value)==null?void 0:T.rootEl)==null||L.requestFullscreen()}function le(){b.stop(),o("addEntry")}function he(){b.stop(),o("openEntry",n.entryId)}function be(T){$.value!==T&&($.value=!$.value,$.value&&b.isPlaying.value&&b.stop())}return(T,L)=>e.immediate||a.value?(O(),me(Sl,{key:0,ref_key:"root",ref:X,loading:!l.value,immediate:!!e.immediate,"full-screen":!!e.fullScreen,zooming:k.value,idle:F.value,"space-top":f.value,rtl:Y(B),onClick:L[15]||(L[15]=We(()=>{},["stop"]))},ri({settings:ce(()=>{var ue;return[ee(cl,{"reader-style":Y(C),"onUpdate:readerStyle":L[6]||(L[6]=de=>Ce(C)?C.value=de:null),direction:Y(x),"onUpdate:direction":L[7]||(L[7]=de=>Ce(x)?x.value=de:null),gap:Y(I),"onUpdate:gap":L[8]||(L[8]=de=>Ce(I)?I.value=de:null),speed:Y(y),"onUpdate:speed":L[9]||(L[9]=de=>Ce(y)?y.value=de:null),zoom:re.value,"onUpdate:zoom":L[10]||(L[10]=de=>re.value=de),"auto-next-seconds":Y(N),"onUpdate:autoNextSeconds":L[11]||(L[11]=de=>Ce(N)?N.value=de:null),name:(ue=e.raw)==null?void 0:ue.title.name,webtoon:Y(g),disabled:!a.value,"hide-auto-next":e.autoNextSeconds!==void 0,onHelp:be},null,8,["reader-style","direction","gap","speed","zoom","auto-next-seconds","name","webtoon","disabled","hide-auto-next"])]}),"reset-zoom":ce(()=>[ee(To,{name:"fade","enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ce(()=>[k.value||Y(v)!==1?(O(),me(fl,{key:0,zoom:re.value,onClick:L[14]||(L[14]=We(()=>re.value=1,["stop"])),class:"duration-200"},null,8,["zoom"])):Ee("",!0)]),_:1})]),default:ce(()=>{var ue;return[a.value?(O(),me(_l,{key:0,ref_key:"body",ref:U,zoom:re.value,"onUpdate:zoom":L[0]||(L[0]=de=>re.value=de),zooming:k.value,"onUpdate:zooming":L[1]||(L[1]=de=>k.value=de),page:Y(c),"page-index":we.value,pages:Y(D),"total-imgs":Y(p).length,direction:Y(x),gap:Y(I),"is-long-strip":Y(W),isRTL:Y(B),"is-double":Y(H),"is-vertical":Y(Z),"space-top":f.value,busy:Y(u),idle:F.value,"play-controller":Y(b),"touch-device":e.touchDevice,"has-next":!!((ue=_.value)!=null&&ue.next),onReady:Y(se).init,onPrev:V,onNext:R,onClick:Wt,onDragEnd:Vt,onWheelPassive:L[2]||(L[2]=()=>Y(b).interfere())},ri({_:2},[a.value&&Y(p).length?{name:"end",fn:ce(()=>{var de;return[ee(tl,{"has-next":!!((de=_.value)!=null&&de.next),"offline-mode":!!e.offlineMode,seconds:e.autoNextSeconds??Y(N),onNext:Ut,onHide:E},ri({_:2},[Y(v)===1&&!e.entryId&&e.raw&&!e.offlineMode?{name:"bottom-center",fn:ce(()=>[ee(Pi,{class:"bg-primary w-min !h-9 !bg-opacity-100",onClick:K},{default:ce(()=>[G("div",qp,[ee(Ll,{class:"flex-shrink-0 w-auto"}),L[16]||(L[16]=G("span",{class:"text-sm"},"Add to library",-1))])]),_:1})]),key:"0"}:void 0]),1032,["has-next","offline-mode","seconds"])]}),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","idle","play-controller","touch-device","has-next","onReady"])):Ee("",!0),l.value&&!m.value&&!e.tourEnabled?(O(),me(ml,{key:1,direction:Y(x)},null,8,["direction"])):Ee("",!0),l.value&&!m.value?(O(),me(yl,{key:2,playing:!!Y(b).isPlaying.value},null,8,["playing"])):Ee("",!0),$.value?(O(),me(vl,{key:3,"touch-device":e.touchDevice,onHide:be},null,8,["touch-device"])):Ee("",!0),e.tourEnabled?(O(),me(kl,{key:4,onHide:L[3]||(L[3]=()=>o("tourEnabledChanged",!1))})):Ee("",!0)]}),_:2},[e.raw||e.offlineMode?{name:"back",fn:ce(()=>[ee(st,{href:e.offlineMode||!e.raw?"#":e.raw.title.url,title:"Back to manga","enable-haptic-feedback":"",onClick:je},{default:ce(()=>[ee(Cl)]),_:1},8,["href"])]),key:"0"}:void 0,!e.touchDevice&&!e.offlineMode?{name:"exit",fn:ce(()=>[ee(st,{title:"Hide reader","data-tour":"You have entered reader mode, press here to return to the original page",onClick:E},{default:ce(()=>[ee(zl)]),_:1})]),key:"1"}:void 0,_.value?{name:"chapter-nav",fn:ce(()=>{var ue;return[ee(hl,{"touch-device":e.touchDevice,"chapter-spec":(ue=e.spec)==null?void 0:ue.chapter,data:_.value,onGetHiddenChapters:L[4]||(L[4]=()=>o("getHiddenChapters")),onChaptersDialogOpen:L[5]||(L[5]=()=>J(!0))},null,8,["touch-device","chapter-spec","data"]),_.value.next||_.value.prev?(O(),q("div",Yp,[ee(st,{title:`${Y(B)?"Next":"Prev"} chapter (←)`,disabled:Y(B)?!_.value.next:!_.value.prev,class:"!rounded-r-none","enable-haptic-feedback":"",onClick:h},{default:ce(()=>[ee(Ml)]),_:1},8,["title","disabled"]),ee(st,{title:`${Y(B)?"Prev":"Next"} chapter (→)`,disabled:Y(B)?!_.value.prev:!_.value.next,class:"!rounded-l-none","enable-haptic-feedback":"",onClick:S},{default:ce(()=>[ee(El)]),_:1},8,["title","disabled"])])):Ee("",!0)]}),key:"2"}:void 0,Y(D).length?{name:"page-nav",fn:ce(()=>[ee(bl,{"model-value":we.value,disabled:!l.value,pages:Y(D),"total-imgs":Y(p).length,"onUpdate:modelValue":Y(se).goToPage},null,8,["model-value","disabled","pages","total-imgs","onUpdate:modelValue"])]),key:"3"}:void 0,!e.offlineMode&&e.raw?{name:"entry",fn:ce(()=>[ee(st,{title:e.entryId?"View entry (T)":"Add to library (T)","data-tour":"Prress here to add to your collection",onClick:K},{default:ce(()=>[e.entryId?(O(),me(Il,{key:0})):(O(),me(Tl,{key:1}))]),_:1},8,["title"])]),key:"4"}:void 0,e.touchDevice?void 0:{name:"full-screen",fn:ce(()=>[ee(st,{title:`${w.value?"Exit":"Enter"} fullscreen (F)`,onClick:ne},{default:ce(()=>[w.value?(O(),me(Al,{key:0})):(O(),me($l,{key:1}))]),_:1},8,["title"])]),key:"5"},Y(W)?{name:"play",fn:ce(()=>[ee(st,{"data-tour":"Press here to play like a video",title:`${Y(b).isPlaying.value?"Pause":"Play"} (Space)`,disabled:!l.value,onClick:L[12]||(L[12]=()=>Y(b).toggle())},{default:ce(()=>[Y(b).isPlaying.value?(O(),me(Ai,{key:0})):(O(),me(Li,{key:1}))]),_:1},8,["title","disabled"])]),key:"6"}:void 0,Y(H)?{name:"break-first",fn:ce(()=>[ee(st,{title:"Break 1st page (B)","data-tour":"Press here to separate the first page from double-page mode",disabled:!l.value,onClick:L[13]||(L[13]=()=>z.value=!Y(z))},{default:ce(()=>[Y(z)?(O(),me(Ol,{key:0})):(O(),me(Pl,{key:1}))]),_:1},8,["disabled"])]),key:"7"}:void 0,e.progressSize!==0&&!m.value?{name:"progress",fn:ce(()=>[ee(wl,{value:Pe.value,total:Y(D).length,"long-strip":Y(W),height:e.progressSize??2,rtl:Y(B)},null,8,["value","total","long-strip","height","rtl"])]),key:"8"}:void 0]),1032,["loading","immediate","full-screen","zooming","idle","space-top","rtl"])):Ee("",!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}.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-full{bottom:100%}.left-0{left:0}.left-1\\/2{left:50%}.left-10{left:40px}.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-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-50{z-index:50}.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}.mb-8{margin-bottom:32px}.ml-1{margin-left:4px}.ml-auto{margin-left:auto}.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\\.5{height:6px}.h-10{height:40px}.h-12{height:48px}.h-16{height:64px}.h-2{height:8px}.h-20{height:80px}.h-24{height:96px}.h-4{height:16px}.h-6{height:24px}.h-7{height:28px}.h-8{height:32px}.h-9{height:36px}.h-\\[101\\%\\]{height:101%}.h-\\[30rem\\]{height:480px}.h-full{height:100%}.max-h-\\[70vh\\]{max-height:70vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-full{max-height:100%}.max-h-none{max-height:none}.w-0{width:0}.w-1{width:4px}.w-10{width:40px}.w-12{width:48px}.w-2{width:8px}.w-20{width:80px}.w-24{width:96px}.w-28{width:112px}.w-4{width:16px}.w-40{width:160px}.w-\\[4\\.8rem\\]{width:76.8px}.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-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-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}.translate-y-1\\.5,.translate-y-full{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-full{--tw-translate-y:100%}.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}.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}.overscroll-contain{overscroll-behavior:contain}.text-ellipsis{text-overflow:ellipsis}.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-sm{border-radius:2px}.\\!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-t-xl{border-top-left-radius:12px;border-top-right-radius:12px}.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-stone-300{--tw-border-opacity:1;border-color:rgb(214 211 209/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-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.border-opacity-30{--tw-border-opacity:.3}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-primary{--tw-bg-opacity:1;background-color:rgb(184 92 56/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-400{--tw-bg-opacity:1;background-color:rgb(168 162 158/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-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-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-1{padding:4px}.p-2{padding:8px}.p-4{padding:16px}.p-6{padding:24px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-6{padding-left:24px;padding-right:24px}.py-1{padding-bottom:4px;padding-top:4px}.py-2{padding-bottom:8px;padding-top:8px}.pb-12{padding-bottom:48px}.pb-6{padding-bottom:24px}.pb-7{padding-bottom:28px}.pl-1{padding-left:4px}.pr-2{padding-right:8px}.pt-3{padding-top:12px}.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}.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-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-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-90{opacity:.9}.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-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)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.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)}.ease-linear{transition-timing-function:linear}.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-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\\:text-stone-100:hover{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.hover\\:text-stone-400:hover{--tw-text-opacity:1;color:rgb(168 162 158/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}}@media (min-width:640px){.sm\\:w-\\[32rem\\]{width:512px}.sm\\:p-3{padding:12px}}@media (min-width:768px){.md\\:px-8{padding-left:32px;padding-right:32px}.md\\:pb-5{padding-bottom:20px}.md\\:pb-6{padding-bottom:24px}.md\\:text-lg{font-size:18px;line-height:28px}}@media (min-width:1024px){.lg\\:px-10{padding-left:40px;padding-right:40px}.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}}']]]),Zp=Object.freeze(Object.defineProperty({__proto__:null,default:Vl},Symbol.toStringTag,{value:"Module"})),Xp=Object.freeze(Object.defineProperty({__proto__:null,default:Te({__name:"IntersectionWrapper",emits:["visible"],setup(e,{emit:t}){const n=t,o=te(null),i=te(!1);return Ge(async()=>{await Mt(),Ti(o,r=>{const s=r.some(a=>a.isIntersecting);s!==i.value&&(i.value=s),s&&n("visible")})}),(r,s)=>(O(),q("div",{ref_key:"root",ref:o},[Ie(r.$slots,"default",{visible:i.value})],512))}})},Symbol.toStringTag,{value:"Module"})),Gp={},Jp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Qp(e,t){return O(),q("svg",Jp,[...t[0]||(t[0]=[G("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 eh=Object.freeze(Object.defineProperty({__proto__:null,default:ye(Gp,[["render",Qp]])},Symbol.toStringTag,{value:"Module"})),th="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]){visibility:hidden!important}.mp-scroll-container{max-height:100vh!important;overflow:hidden!important}html:has(body.mp-scroll-container){overflow:auto!important}",rn="gear-second",Hi={immediate:void 0,raw:void 0,spec:void 0,siteMeta:void 0,page:0,spaceTop:void 0,fullScreen:void 0,touchDevice:void 0,entryId:void 0,autoPlay:void 0,readerStyle:void 0,direction:void 0,isAutoShow:void 0,tourEnabled:void 0,offlineMode:void 0,autoNextSeconds:void 0,defaultGap:void 0,progressSize:void 0,hideControlsEvent:void 0,onError:void 0,onCrash:void 0,onDispose:void 0,onFullScreenChanged: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},nt={promise:void 0,data:oo({...Hi})};async function nh(e){return nt.promise?(nt.data.raw=e.raw,await nt.promise):(nt.promise=new Promise(t=>{let n=!1,o=!1,i,r,s=0;const a=!!e.spaceTop||!!e.isAutoShow&&!!e.page,l=()=>{n||(n=!0,clearInterval(i),i=void 0,r!=null&&r.isConnected&&document.body.removeChild(r),document.documentElement.classList.remove(rn),Object.assign(nt.data,Hi),nt.promise=void 0)},u=tt(p=>{var g;return!n&&((g=e.onPageChanged)==null?void 0:g.call(e,p))},300);Object.assign(nt.data,Hi,e,{immediate:a,onReady(){a||(c(),document.documentElement.classList.add(rn))},onError(){var p,g;l(),o?((p=e.onDispose)==null||p.call(e),(g=e.onError)==null||g.call(e)):f()},onDispose:()=>{var p;l(),(p=e==null?void 0:e.onDispose)==null||p.call(e)},onFullScreenChanged:p=>{var g;nt.data.fullScreen=p,(g=e.onFullScreenChanged)==null||g.call(e,p)},onPageChanged:p=>{nt.data.page=p,!(s>=p)&&(s=p,u(p))},onTourEnabledChanged:p=>{nt.data.tourEnabled=p}}),oh().then(()=>{if(n){f();return}r=document.createElement(rn),a?(document.documentElement.classList.add(rn),document.body.appendChild(r),setTimeout(c)):document.body.appendChild(r);let p=0;i=setInterval(()=>{if(++p===30||n){clearInterval(i),i=void 0;return}r.isConnected||(document.documentElement.classList.add(rn),document.body.appendChild(r))},100)});function c(){o||(o=!0,t({updateArgs(p){Object.assign(nt.data,p)},dispose:l}))}function f(){o||t(void 0)}}),await nt.promise)}async function oh(){if(window.customElements.get(rn))return;const e=document.createElement("style"),t=th;e.appendChild(document.createTextNode(t)),document.head.appendChild(e);const n=du({styles:[await ih()],data:()=>({readerData:nt.data}),render(){return xs(Vl,this.readerData)}});window.customElements.define(rn,n)}async function ih(){const e=Object.assign({"./App.vue":Zp,"./components/AutoNext.vue":Wu,"./components/BaseButton.vue":qu,"./components/BottomSheet.vue":rf,"./components/ButtonDropdown.vue":Xf,"./components/ButtonIcon.vue":Yu,"./components/ButtonReaderSettings.vue":Pf,"./components/ButtonResetZoom.vue":Nf,"./components/ChapterNav.vue":Gf,"./components/DirectionToast.vue":nd,"./components/GesturesContainer.vue":md,"./components/HelpScreen.vue":od,"./components/InputPercentage.vue":af,"./components/InputSelect.vue":uf,"./components/IntersectionWrapper.vue":Xp,"./components/LoadingIndicator.vue":xd,"./components/PageNav.vue":id,"./components/PauseToast.vue":pd,"./components/ProgressBar.vue":gd,"./components/ReaderBody.vue":Td,"./components/ReaderLayout.vue":Ld,"./components/ReaderTour.vue":zd,"./components/TableField.vue":pf,"./components/icons/IconBack.vue":Rd,"./components/icons/IconBookmarkNew.vue":Vd,"./components/icons/IconBookmarked.vue":qd,"./components/icons/IconChevronLeft.vue":Gd,"./components/icons/IconChevronRight.vue":tp,"./components/icons/IconClose.vue":Ju,"./components/icons/IconDouble.vue":rp,"./components/icons/IconDoubleSkip.vue":cp,"./components/icons/IconExclamationCircle.vue":eh,"./components/icons/IconFullscreen.vue":pp,"./components/icons/IconFullscreenExit.vue":vp,"./components/icons/IconHelp.vue":vf,"./components/icons/IconLoading.vue":Ff,"./components/icons/IconNext.vue":td,"./components/icons/IconPause.vue":ad,"./components/icons/IconPlay.vue":dd,"./components/icons/IconPlus.vue":xp,"./components/icons/IconReaderExit.vue":Cp,"./components/icons/IconSettings.vue":xf,"./components/icons/IconTriangle.vue":Uf,"./components/icons/IconZoom.vue":Lf}),t=[];for(const n in e){const o=e[n];t.push(o.default.styles)}return t.join("")}return nh});
|
|
20
|
+
**/let mi;const _s=typeof window<"u"&&window.trustedTypes;if(_s)try{mi=_s.createPolicy("vue",{createHTML:e=>e})}catch{}const Ss=mi?e=>mi.createHTML(e):e=>e,Vc="http://www.w3.org/2000/svg",Wc="http://www.w3.org/1998/Math/MathML",$t=typeof document<"u"?document:null,ks=$t&&$t.createElement("template"),Uc={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"?$t.createElementNS(Vc,e):t==="mathml"?$t.createElementNS(Wc,e):n?$t.createElement(e,{is:n}):$t.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>$t.createTextNode(e),createComment:e=>$t.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>$t.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{ks.innerHTML=Ss(o==="svg"?`<svg>${e}</svg>`:o==="mathml"?`<math>${e}</math>`:e);const a=ks.content;if(o==="svg"||o==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}t.insertBefore(a,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Ft="transition",Rn="animation",Bn=Symbol("_vtc"),Cs={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},Kc=Se({},Ir,Cs),To=(e=>(e.displayName="Transition",e.props=Kc,e))((e,{slots:t})=>xs(Fa,qc(e),t)),en=(e,t=[])=>{ie(e)?e.forEach(n=>n(...t)):e&&e(...t)},Ts=e=>e?ie(e)?e.some(t=>t.length>1):e.length>1:!1;function qc(e){const t={};for(const m in e)m in Cs||(t[m]=e[m]);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:a=`${n}-enter-to`,appearFromClass:l=r,appearActiveClass:u=s,appearToClass:c=a,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:g=`${n}-leave-to`}=e,x=Yc(i),C=x&&x[0],B=x&&x[1],{onBeforeEnter:H,onEnter:Z,onEnterCancelled:W,onLeave:I,onLeaveCancelled:y,onBeforeAppear:v=H,onAppear:z=Z,onAppearCancelled:N=W}=t,k=(m,_,U,X)=>{m._enterCancelled=X,tn(m,_?c:a),tn(m,_?u:s),U&&U()},D=(m,_)=>{m._isLeaving=!1,tn(m,f),tn(m,g),tn(m,p),_&&_()},Q=m=>(_,U)=>{const X=m?z:Z,w=()=>k(_,m,U);en(X,[_,w]),Is(()=>{tn(_,m?l:r),At(_,m?c:a),Ts(X)||Ms(_,o,C,w)})};return Se(t,{onBeforeEnter(m){en(H,[m]),At(m,r),At(m,s)},onBeforeAppear(m){en(v,[m]),At(m,l),At(m,u)},onEnter:Q(!1),onAppear:Q(!0),onLeave(m,_){m._isLeaving=!0;const U=()=>D(m,_);At(m,f),m._enterCancelled?(At(m,p),Os(m)):(Os(m),At(m,p)),Is(()=>{m._isLeaving&&(tn(m,f),At(m,g),Ts(I)||Ms(m,o,B,U))}),en(I,[m,U])},onEnterCancelled(m){k(m,!1,void 0,!0),en(W,[m])},onAppearCancelled(m){k(m,!0,void 0,!0),en(N,[m])},onLeaveCancelled(m){D(m),en(y,[m])}})}function Yc(e){if(e==null)return null;if(xe(e))return[vi(e.enter),vi(e.leave)];{const t=vi(e);return[t,t]}}function vi(e){return Ro(e)}function At(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[Bn]||(e[Bn]=new Set)).add(t)}function tn(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[Bn];n&&(n.delete(t),n.size||(e[Bn]=void 0))}function Is(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Zc=0;function Ms(e,t,n,o){const i=e._endId=++Zc,r=()=>{i===e._endId&&o()};if(n!=null)return setTimeout(r,n);const{type:s,timeout:a,propCount:l}=Xc(e,t);if(!s)return o();const u=s+"end";let c=0;const f=()=>{e.removeEventListener(u,p),r()},p=g=>{g.target===e&&++c>=l&&f()};setTimeout(()=>{c<l&&f()},a+1),e.addEventListener(u,p)}function Xc(e,t){const n=window.getComputedStyle(e),o=x=>(n[x]||"").split(", "),i=o(`${Ft}Delay`),r=o(`${Ft}Duration`),s=Es(i,r),a=o(`${Rn}Delay`),l=o(`${Rn}Duration`),u=Es(a,l);let c=null,f=0,p=0;t===Ft?s>0&&(c=Ft,f=s,p=r.length):t===Rn?u>0&&(c=Rn,f=u,p=l.length):(f=Math.max(s,u),c=f>0?s>u?Ft:Rn:null,p=c?c===Ft?r.length:l.length:0);const g=c===Ft&&/\b(?:transform|all)(?:,|$)/.test(o(`${Ft}Property`).toString());return{type:c,timeout:f,propCount:p,hasTransform:g}}function Es(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,o)=>Ps(n)+Ps(e[o])))}function Ps(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Os(e){return(e?e.ownerDocument:document).body.offsetHeight}function Gc(e,t,n){const o=e[Bn];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Io=Symbol("_vod"),$s=Symbol("_vsh"),Jc={name:"show",beforeMount(e,{value:t},{transition:n}){e[Io]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Fn(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),Fn(e,!0),o.enter(e)):o.leave(e,()=>{Fn(e,!1)}):Fn(e,t))},beforeUnmount(e,{value:t}){Fn(e,t)}};function Fn(e,t){e.style.display=t?e[Io]:"none",e[$s]=!t}const Qc=Symbol(""),eu=/(?:^|;)\s*display\s*:/;function tu(e,t,n){const o=e.style,i=ke(n);let r=!1;if(n&&!i){if(t)if(ke(t))for(const s of t.split(";")){const a=s.slice(0,s.indexOf(":")).trim();n[a]==null&&Mo(o,a,"")}else for(const s in t)n[s]==null&&Mo(o,s,"");for(const s in n)s==="display"&&(r=!0),Mo(o,s,n[s])}else if(i){if(t!==n){const s=o[Qc];s&&(n+=";"+s),o.cssText=n,r=eu.test(n)}}else t&&e.removeAttribute("style");Io in e&&(e[Io]=r?o.display:"",e[$s]&&(o.display="none"))}const As=/\s*!important$/;function Mo(e,t,n){if(ie(n))n.forEach(o=>Mo(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=nu(e,t);As.test(n)?e.setProperty(Ye(o),n.replace(As,""),"important"):e[o]=n}}const Ls=["Webkit","Moz","ms"],bi={};function nu(e,t){const n=bi[t];if(n)return n;let o=Re(t);if(o!=="filter"&&o in e)return bi[t]=o;o=Zn(o);for(let i=0;i<Ls.length;i++){const r=Ls[i]+o;if(r in e)return bi[t]=r}return t}const zs="http://www.w3.org/1999/xlink";function Ds(e,t,n,o,i,r=ea(t)){o&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(zs,t.slice(6,t.length)):e.setAttributeNS(zs,t,n):n==null||r&&!Xi(n)?e.removeAttribute(t):e.setAttribute(t,r?"":kt(n)?String(n):n)}function Ns(e,t,n,o,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?Ss(n):n);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const a=r==="OPTION"?e.getAttribute("value")||"":e.value,l=n==null?e.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in e))&&(e.value=l),n==null&&e.removeAttribute(t),e._value=n;return}let s=!1;if(n===""||n==null){const a=typeof e[t];a==="boolean"?n=Xi(n):n==null&&a==="string"?(n="",s=!0):a==="number"&&(n=0,s=!0)}try{e[t]=n}catch{}s&&e.removeAttribute(i||t)}function gn(e,t,n,o){e.addEventListener(t,n,o)}function ou(e,t,n,o){e.removeEventListener(t,n,o)}const js=Symbol("_vei");function iu(e,t,n,o,i=null){const r=e[js]||(e[js]={}),s=r[t];if(o&&s)s.value=o;else{const[a,l]=ru(t);if(o){const u=r[t]=au(o,i);gn(e,a,u,l)}else s&&(ou(e,a,s,l),r[t]=void 0)}}const Rs=/(?:Once|Passive|Capture)$/;function ru(e){let t;if(Rs.test(e)){t={};let o;for(;o=e.match(Rs);)e=e.slice(0,e.length-o[0].length),t[o[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):Ye(e.slice(2)),t]}let yi=0;const su=Promise.resolve(),lu=()=>yi||(su.then(()=>yi=0),yi=Date.now());function au(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;ft(cu(o,n.value),t,5,[o])};return n.value=e,n.attached=lu(),n}function cu(e,t){if(ie(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>i=>!i._stopped&&o&&o(i))}else return t}const Bs=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,uu=(e,t,n,o,i,r)=>{const s=i==="svg";t==="class"?Gc(e,o,s):t==="style"?tu(e,n,o):Un(t)?Lo(t)||iu(e,t,n,o,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):fu(e,t,o,s))?(Ns(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Ds(e,t,o,s,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!ke(o))?Ns(e,Re(t),o,r,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),Ds(e,t,o,s))};function fu(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&Bs(t)&&ae(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 Bs(t)&&ke(n)?!1:t in e}const Fs={};function du(e,t,n){let o=Te(e,t);qn(o)&&(o=Se({},o,t));class i extends wi{constructor(s){super(o,s,n)}}return i.def=o,i}const pu=typeof HTMLElement<"u"?HTMLElement:class{};class wi extends pu{constructor(t,n={},o=Ys){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!==Ys?this._root=this.shadowRoot:t.shadowRoot!==!1?(this.attachShadow(Se({},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 wi){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,Mt(()=>{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 a;if(r&&!ie(r))for(const l in r){const u=r[l];(u===Number||u&&u.type===Number)&&(l in this._props&&(this._props[l]=Ro(this._props[l])),(a||(a=Object.create(null)))[Re(l)]=!0)}this._numberProps=a,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)ve(this,o)||Object.defineProperty(this,o,{get:()=>Y(n[o])})}_resolveProps(t){const{props:n}=t,o=ie(n)?n:Object.keys(n||{});for(const i of Object.keys(this))i[0]!=="_"&&o.includes(i)&&this._setProp(i,this[i]);for(const i of o.map(Re))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(r){this._setProp(i,r,!0,!this._patching)}})}_setAttr(t){if(t.startsWith("data-v-"))return;const n=this.hasAttribute(t);let o=n?this.getAttribute(t):Fs;const i=Re(t);n&&this._numberProps&&this._numberProps[i]&&(o=Ro(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===Fs?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(Ye(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Ye(t),n+""):n||this.removeAttribute(Ye(t)),r&&r.observe(this,{attributes:!0})}}_update(){const t=this._createVNode();this._app&&(t.appContext=this._app._context),wu(t,this._root)}_createVNode(){const t={};this.shadowRoot||(t.onVnodeMounted=t.onVnodeUpdated=this._renderSlots.bind(this));const n=ee(this._def,Se(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,qn(s[0])?Se({detail:s},s[0]):{detail:s}))};o.emit=(r,...s)=>{i(r,s),Ye(r)!==r&&i(Ye(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],a=i.parentNode;if(s)for(const l of s){if(n&&l.nodeType===1){const u=n+"-s",c=document.createTreeWalker(l,1);l.setAttribute(u,"");let f;for(;f=c.nextNode();)f.setAttribute(u,"")}a.insertBefore(l,i)}else for(;i.firstChild;)a.insertBefore(i.firstChild,i);a.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 Hs=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ie(t)?n=>Xn(t,n):t};function hu(e){e.target.composing=!0}function Vs(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const xi=Symbol("_assign");function Ws(e,t,n){return t&&(e=e.trim()),n&&(e=jo(e)),e}const gu={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[xi]=Hs(i);const r=o||i.props&&i.props.type==="number";gn(e,t?"change":"input",s=>{s.target.composing||e[xi](Ws(e.value,n,r))}),(n||r)&&gn(e,"change",()=>{e.value=Ws(e.value,n,r)}),t||(gn(e,"compositionstart",hu),gn(e,"compositionend",Vs),gn(e,"change",Vs))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:i,number:r}},s){if(e[xi]=Hs(s),e.composing)return;const a=(r||e.type==="number")&&!/^0\d/.test(e.value)?jo(e.value):e.value,l=t??"";a!==l&&(document.activeElement===e&&e.type!=="range"&&(o&&t===n||i&&e.value.trim()===l)||(e.value=l))}},mu=["ctrl","shift","alt","meta"],vu={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)=>mu.some(n=>e[`${n}Key`]&&!t.includes(n))},We=(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 a=vu[t[s]];if(a&&a(i,t))return}return e(i,...r)})},bu={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Us=(e,t)=>{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=i=>{if(!("key"in i))return;const r=Ye(i.key);if(t.some(s=>s===r||bu[s]===r))return e(i)})},yu=Se({patchProp:uu},Uc);let Ks;function qs(){return Ks||(Ks=pc(yu))}const wu=(...e)=>{qs().render(...e)},Ys=(...e)=>{const t=qs().createApp(...e),{mount:n}=t;return t.mount=o=>{const i=_u(o);if(!i)return;const r=t._component;!ae(r)&&!r.render&&!r.template&&(r.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const s=n(i,!1,xu(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),s},t};function xu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function _u(e){return ke(e)?document.querySelector(e):e}function _i(e,t){return Fo()?(na(e,t),!0):!1}const Si=new WeakMap,Su=(...e)=>{var t;const n=e[0],o=(t=Qt())===null||t===void 0?void 0:t.proxy,i=o??Fo();if(i==null&&!qr())throw new Error("injectLocal must be called in setup");return i&&Si.has(i)&&n in Si.get(i)?Si.get(i)[n]:Ot(...e)},Zs=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const ku=e=>e!=null,Cu=Object.prototype.toString,Tu=e=>Cu.call(e)==="[object Object]",nn=()=>{};function Xs(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}function Iu(e,t={}){let n,o,i=nn;const r=l=>{clearTimeout(l),i(),i=nn};let s;return l=>{const u=ut(e),c=ut(t.maxWait);return n&&r(n),u<=0||c!==void 0&&c<=0?(o&&(r(o),o=void 0),Promise.resolve(l())):new Promise((f,p)=>{i=t.rejectOnCancel?p:f,s=l,c&&!o&&(o=setTimeout(()=>{n&&r(n),o=void 0,f(s())},c)),n=setTimeout(()=>{o&&r(o),o=void 0,f(l())},u)})}}function Mu(...e){let t=0,n,o=!0,i=nn,r,s,a,l,u;!Ce(e[0])&&typeof e[0]=="object"?{delay:s,trailing:a=!0,leading:l=!0,rejectOnCancel:u=!1}=e[0]:[s,a=!0,l=!0,u=!1]=e;const c=()=>{n&&(clearTimeout(n),n=void 0,i(),i=nn)};return p=>{const g=ut(s),x=Date.now()-t,C=()=>r=p();return c(),g<=0?(t=Date.now(),C()):(x>g?(t=Date.now(),(l||!o)&&C()):a&&(r=new Promise((B,H)=>{i=u?H:B,n=setTimeout(()=>{t=Date.now(),o=!0,B(C()),c()},Math.max(0,g-x))})),!l&&!n&&(n=setTimeout(()=>o=!0,g)),o=!1,r)}}function Gs(e){return e.endsWith("rem")?Number.parseFloat(e)*16:Number.parseFloat(e)}function Hn(e){return Array.isArray(e)?e:[e]}function Eu(e){return Qt()}function tt(e,t=200,n={}){return Xs(Iu(t,n),e)}function Js(e,t=200,n=!1,o=!0,i=!1){return Xs(Mu(t,n,o,i),e)}function Qs(e,t=!0,n){Eu()?Ge(e,n):t?e():Mt(e)}function Pu(e,t,n){return pe(e,t,{...n,immediate:!0})}const mn=Zs?window:void 0,Ou=Zs?window.document:void 0;function wt(e){var t;const n=ut(e);return(t=n==null?void 0:n.$el)!==null&&t!==void 0?t:n}function Lt(...e){const t=[],n=()=>{t.forEach(a=>a()),t.length=0},o=(a,l,u,c)=>(a.addEventListener(l,u,c),()=>a.removeEventListener(l,u,c)),i=oe(()=>{const a=Hn(ut(e[0])).filter(l=>l!=null);return a.every(l=>typeof l!="string")?a:void 0}),r=Pu(()=>{var a,l;return[(a=(l=i.value)===null||l===void 0?void 0:l.map(u=>wt(u)))!==null&&a!==void 0?a:[mn].filter(u=>u!=null),Hn(ut(i.value?e[1]:e[0])),Hn(Y(i.value?e[2]:e[1])),ut(i.value?e[3]:e[2])]},([a,l,u,c])=>{if(n(),!(a!=null&&a.length)||!(l!=null&&l.length)||!(u!=null&&u.length))return;const f=Tu(c)?{...c}:c;t.push(...a.flatMap(p=>l.flatMap(g=>u.map(x=>o(p,g,x,f)))))},{flush:"post"}),s=()=>{r(),n()};return _i(n),s}function $u(){const e=ct(!1),t=Qt();return t&&Ge(()=>{e.value=!0},t),e}function ki(e){const t=$u();return oe(()=>(t.value,!!e()))}const Au=Symbol("vueuse-ssr-width");function Lu(){const e=qr()?Su(Au,null):null;return typeof e=="number"?e:void 0}function zu(e,t={}){const{window:n=mn,ssrWidth:o=Lu()}=t,i=ki(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),r=ct(typeof o=="number"),s=ct(),a=ct(!1),l=u=>{a.value=u.matches};return ss(()=>{if(r.value){r.value=!i.value,a.value=ut(e).split(",").some(u=>{const c=u.includes("not all"),f=u.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),p=u.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let g=!!(f||p);return f&&g&&(g=o>=Gs(f[1])),p&&g&&(g=o<=Gs(p[1])),c?!g:g});return}i.value&&(s.value=n.matchMedia(ut(e)),a.value=s.value.matches)}),Lt(s,"change",l,{passive:!0}),oe(()=>a.value)}function Ci(e={}){const{document:t=Ou}=e;if(!t)return ct("visible");const n=ct(t.visibilityState);return Lt(t,"visibilitychange",()=>{n.value=t.visibilityState},{passive:!0}),n}function Du(e,t,n={}){const{window:o=mn,...i}=n;let r;const s=ki(()=>o&&"ResizeObserver"in o),a=()=>{r&&(r.disconnect(),r=void 0)},l=pe(oe(()=>{const c=ut(e);return Array.isArray(c)?c.map(f=>wt(f)):[wt(c)]}),c=>{if(a(),s.value&&o){r=new ResizeObserver(t);for(const f of c)f&&r.observe(f,i)}},{immediate:!0,flush:"post"}),u=()=>{a(),l()};return _i(u),{isSupported:s,stop:u}}function el(e,t={width:0,height:0},n={}){const{window:o=mn,box:i="content-box"}=n,r=oe(()=>{var f;return(f=wt(e))===null||f===void 0||(f=f.namespaceURI)===null||f===void 0?void 0:f.includes("svg")}),s=ct(t.width),a=ct(t.height),{stop:l}=Du(e,([f])=>{const p=i==="border-box"?f.borderBoxSize:i==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(o&&r.value){const g=wt(e);if(g){const x=g.getBoundingClientRect();s.value=x.width,a.value=x.height}}else if(p){const g=Hn(p);s.value=g.reduce((x,{inlineSize:C})=>x+C,0),a.value=g.reduce((x,{blockSize:C})=>x+C,0)}else s.value=f.contentRect.width,a.value=f.contentRect.height},n);Qs(()=>{const f=wt(e);f&&(s.value="offsetWidth"in f?f.offsetWidth:t.width,a.value="offsetHeight"in f?f.offsetHeight:t.height)});const u=pe(()=>wt(e),f=>{s.value=f?t.width:0,a.value=f?t.height:0});function c(){l(),u()}return{width:s,height:a,stop:c}}function Ti(e,t,n={}){const{root:o,rootMargin:i="0px",threshold:r=0,window:s=mn,immediate:a=!0}=n,l=ki(()=>s&&"IntersectionObserver"in s),u=oe(()=>Hn(ut(e)).map(wt).filter(ku));let c=nn;const f=ct(a),p=l.value?pe(()=>[u.value,wt(o),f.value],([x,C])=>{if(c(),!f.value||!x.length)return;const B=new IntersectionObserver(t,{root:wt(C),rootMargin:i,threshold:r});x.forEach(H=>H&&B.observe(H)),c=()=>{B.disconnect(),c=nn}},{immediate:a,flush:"post"}):nn,g=()=>{c(),p(),f.value=!1};return _i(g),{isSupported:l,isActive:f,pause(){c(),f.value=!1},resume(){f.value=!0},stop:g}}function Ii(e={}){const{window:t=mn,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:o=Number.POSITIVE_INFINITY,listenOrientation:i=!0,includeScrollbar:r=!0,type:s="inner"}=e,a=ct(n),l=ct(o),u=()=>{if(t)if(s==="outer")a.value=t.outerWidth,l.value=t.outerHeight;else if(s==="visual"&&t.visualViewport){const{width:f,height:p,scale:g}=t.visualViewport;a.value=Math.round(f*g),l.value=Math.round(p*g)}else r?(a.value=t.innerWidth,l.value=t.innerHeight):(a.value=t.document.documentElement.clientWidth,l.value=t.document.documentElement.clientHeight)};u(),Qs(u);const c={passive:!0};return Lt("resize",u,c),t&&s==="visual"&&t.visualViewport&&Lt(t.visualViewport,"resize",u,c),i&&pe(zu("(orientation: portrait)"),()=>u()),{width:a,height:l}}function Nu(e){On("hapticFeedback",e)}function Mi(){return Ot("hapticFeedback")}const ju=(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(l,20);a();function a(){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 l(){const u=+n||50;i<=u?(i++,r-=.65/u,o.style.transform=`scale(${i})`,o.style.opacity=`${r}`):(o.remove(),clearInterval(s))}},vn={mounted:(e,t)=>{e.style.position="relative",e.style.overflow="hidden",e.setAttribute("data-ripple",t.value),e.addEventListener("click",n=>ju(e,n))},updated:(e,t)=>{e.setAttribute("data-ripple",t.value)}},Ru={class:"inline-flex p-6 gap-6 text-base text-stone-300 select-none"},Bu={key:0,class:"inline-block rounded-full relative w-28 h-12 overflow-hidden"},Fu={class:"absolute bottom-0 left-0 right-0 flex justify-center pb-7 md:pb-6 lg:pb-4"},Hu=Te({__name:"AutoNext",props:{hasNext:{type:Boolean},offlineMode:{type:Boolean},seconds:{type:Number}},emits:["next","hide"],setup(e,{emit:t}){const n=e,o=t,i=te(null),r=te(null),s=te(!1),a=te(!1),l=te(n.seconds),u=te(n.seconds<=0),c=te(n.seconds),f=Mi();Ge(()=>{let x;Ti(r,C=>{a.value=C.some(B=>B.isIntersecting),u.value=n.seconds<=0,l.value=n.seconds,c.value=n.seconds,x&&(clearInterval(x),x=void 0),!(!a.value||u.value)&&(x=setInterval(()=>{l.value-=1,l.value<=0&&(clearInterval(x),x=void 0,o("next"))},1e3))}),Ti(i,C=>{s.value=C.some(B=>B.isIntersecting)}),Zt(()=>x&&clearInterval(x))});function p(){o("next"),f()}function g(){o("hide")}return(x,C)=>(O(),q("div",{ref_key:"root",ref:i,class:"h-full w-full flex justify-center items-center relative"},[vt(G("div",Ru,[e.hasNext?(O(),q("div",Bu,[a.value?(O(),q("div",{key:0,class:"absolute left-0 top-0 bottom-0 h-full bg-stone-600 bg-opacity-50",style:ze(u.value?{}:{animation:`auto-next ${c.value}s linear forwards`})},null,4)):Ee("",!0),vt((O(),q("button",{ref_key:"nextButton",ref:r,class:"bg-transparent rounded-full h-full w-full border-solid border-stone-600 border-2 hover:bg-stone-300 hover:bg-opacity-10 totalDuration-200",onClick:We(p,["stop"])},[Rt(Xe(u.value?"Next":`Next in ${l.value}`),1)])),[[Y(vn)]])])):Ee("",!0),vt((O(),q("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:We(g,["stop"])},[Rt(Xe(e.offlineMode?"Close":"Hide"),1)])),[[Y(vn)]])],512),[[Jc,s.value||!e.hasNext]]),G("div",Fu,[Ie(x.$slots,"bottom-center")])],512))}}),Vu=".animate-auto-next{animation:auto-next 5s linear forwards}@keyframes auto-next{0%{width:0}to{width:100%}}",ye=(e,t)=>{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},tl=ye(Hu,[["styles",[Vu]]]),Wu=Object.freeze(Object.defineProperty({__proto__:null,default:tl},Symbol.toStringTag,{value:"Module"}));function Uu({touchDevice:e}){const t=te(!1);let n=0;return On("busy:touchDevice",e),On("setBusyState",o=>{n+=o?1:-1;const i=n>0;t.value!=i&&(t.value=i)}),t}function Ei(){const e=Ot("busy:touchDevice"),t=Ot("setBusyState");let n=!1;return Zt(()=>{n&&(t==null||t(!1))}),(o,{desktopOnly:i=!1}={})=>{i&&e||(n=o,t==null||t(o))}}const Ku={class:"group-hover:bg-stone-100 group-hover:bg-opacity-20 duration-200 rounđe-full p-2 w-full h-full inline-flex justify-center items-center gap-2 text-base"},Pi=Te({__name:"BaseButton",props:{disabled:{type:Boolean},href:{type:String},transparent:{type:Boolean},enableHapticFeedback:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=e,o=t,i=Ei(),r=Mi();let s=!1;function a(){s||(s=!0,i(!0,{desktopOnly:!0}))}function l(){s&&(s=!1,i(!1,{desktopOnly:!0}))}function u(c){n.disabled?c.preventDefault():(o("click",c),n.enableHapticFeedback&&r())}return(c,f)=>vt((O(),me(jr(e.href?"a":"button"),Dn(e.href?{href:e.href}:{},{class:["h-10 max-w-full max-h-full rounded-full flex-shrink-0 focus:outline-none outline-none",{"cursor-default text-stone-400 hover:text-stone-400":e.disabled,"text-stone-100 hover:text-stone-100 group duration-200":!e.disabled,"bg-black bg-opacity-50":!e.transparent}],onClick:We(u,["stop"]),onMouseenter:a,onMouseleave:l}),{default:ce(()=>[G("div",Ku,[Ie(c.$slots,"default")])]),_:3},16,["class"])),[[Y(vn),e.disabled?0:15]])}}),qu=Object.freeze(Object.defineProperty({__proto__:null,default:Pi},Symbol.toStringTag,{value:"Module"})),st=Te({__name:"ButtonIcon",props:{disabled:{type:Boolean},href:{type:String},transparent:{type:Boolean},enableHapticFeedback:{type:Boolean}},emits:["click"],setup(e,{emit:t}){const n=t;return(o,i)=>(O(),me(Pi,{class:"w-10",disabled:e.disabled,href:e.href,transparent:e.transparent,"enable-haptic-feedback":e.enableHapticFeedback,onClick:i[0]||(i[0]=r=>n("click",r))},{default:ce(()=>[Ie(o.$slots,"default")]),_:3},8,["disabled","href","transparent","enable-haptic-feedback"]))}}),Yu=Object.freeze(Object.defineProperty({__proto__:null,default:st},Symbol.toStringTag,{value:"Module"})),Zu={},Xu={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Gu(e,t){return O(),q("svg",Xu,[...t[0]||(t[0]=[G("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 nl=ye(Zu,[["render",Gu]]),Ju=Object.freeze(Object.defineProperty({__proto__:null,default:nl},Symbol.toStringTag,{value:"Module"}));class Qu{constructor(){Ae(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){t.stopImmediatePropagation(),t.stopPropagation(),this.listeners.forEach(n=>{var o;return(o=n.onKeyDown)==null?void 0:o.call(n,t)})}onKeyUp(t){t.stopImmediatePropagation(),t.stopPropagation(),this.listeners.forEach(n=>{var o;return(o=n.onKeyUp)==null?void 0:o.call(n,t)})}addListener(t){this.listeners.push(t)}removeListener(t){const n=this.listeners.indexOf(t);n!==-1&&this.listeners.splice(n,1)}}function ef(){const e=new Qu;return Zt(()=>e.dispose()),On("keyController",e),e}function Eo(e){const t=Ot("keyController");Ge(()=>t.addListener(e)),Zt(()=>t.removeListener(e))}const tf={class:"flex w-full flex-shrink-0 justify-between items-center h-16 px-3"},nf={class:"font-medium md:text-lg text-ellipsis overflow-hidden whitespace-nowrap px-3 select-text"},of={class:"overflow-auto px-6 md:px-8 lg:px-10 xl:px-12 pt-3 pb-12 flex-grow scrollbar-sm"},ol=Te({__name:"BottomSheet",props:hn({name:{type:String}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=$n(e,"modelValue");Eo({onKeyDown:o});const n=Ei();pe(t,i=>n(i));function o(i){t.value&&i.key==="Escape"&&(t.value=!1,i.preventDefault())}return(i,r)=>(O(),q("div",{class:$e(["fixed inset-0 flex flex-col items-center justify-end select-none",{"!pointer-events-none":!t.value}]),onClick:r[4]||(r[4]=()=>t.value=!1)},[ee(To,{name:"slide","enter-from-class":"opacity-0 translate-y-full","leave-to-class":"opacity-0 translate-y-full"},{default:ce(()=>[t.value?(O(),q("div",{key:0,class:"inline-flex flex-col h-[30rem] w-full sm:w-[32rem] max-h-[80vh] bg-stone-800 bg-opacity-90 backdrop-blur-md rounded-t-xl max-w-full overflow-hidden duration-200",onClick:r[1]||(r[1]=We(()=>{},["stop"])),onWheelPassive:r[2]||(r[2]=We(()=>{},["stop"])),onTouchmove:r[3]||(r[3]=We(()=>{},["stop"]))},[G("div",tf,[ee(st,{transparent:"",onClick:r[0]||(r[0]=()=>t.value=!1)},{default:ce(()=>[ee(nl)]),_:1}),G("div",nf,Xe(e.name),1),Ie(i.$slots,"actions")]),G("div",of,[Ie(i.$slots,"default")])],32)):Ee("",!0)]),_:3})],2))}}),rf=Object.freeze(Object.defineProperty({__proto__:null,default:ol},Symbol.toStringTag,{value:"Module"})),sf=["min","max","step"],lf={class:"flex-shrink-0"},Oi=ye(Te({__name:"InputPercentage",props:hn({min:{type:Number},max:{type:Number},step:{type:Number},disabled:{type:Boolean},suffix:{type:String}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=$n(e,"modelValue"),n=oe({get(){return t.value},set(o){t.value=+o}});return(o,i)=>(O(),q("div",{class:$e(["flex items-center gap-3 pl-1 py-1",{"pointer-events-none opacity-50":e.disabled}]),style:ze({"--percentage":`${(n.value-e.min)/(e.max-e.min)*100}%`})},[vt(G("input",{"onUpdate:modelValue":i[0]||(i[0]=r=>n.value=r),type:"range",min:e.min,max:e.max,step:e.step??1,class:"flex-grow"},null,8,sf),[[gu,n.value]]),G("p",lf,[Ie(o.$slots,"suffix")])],6))}}),[["styles",["input[type=range]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:linear-gradient(to right,#d6d3d1 var(--percentage),#78716c var(--percentage));border-radius:2px;border-style:none;cursor:pointer;height:6px;opacity:.9;--tw-bg-opacity:1;background-color:rgb(120 113 108/var(--tw-bg-opacity,1));outline:2px solid transparent;outline-offset:2px}input[type=range]::-webkit-slider-thumb{-webkit-appearance:none!important;border-radius:2px;border-style:solid;border-width:2px;cursor:pointer;height:28px;width:16px;--tw-border-opacity:1;border-color:rgb(214 211 209/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(214 211 209/var(--tw-bg-opacity,1));transition-duration:.2s}input[type=range]:hover{opacity:1}"]]]),af=Object.freeze(Object.defineProperty({__proto__:null,default:Oi},Symbol.toStringTag,{value:"Module"})),cf=["onClick","onKeyup"],Vn=Te({__name:"InputSelect",props:hn({items:{type:Array}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=$n(e,"modelValue"),o=te(null),i=te({width:"",left:""});Ge(()=>{let s=!1;pe(n,a=>{var u;const l=(u=o.value)==null?void 0:u.children[a+1];l&&(i.value={width:l.offsetWidth+"px",left:l.offsetLeft+"px"},l.scrollIntoView({behavior:s?"smooth":"auto",block:"center",inline:"center"}),s=!0)},{immediate:!0})});function r(s){s!==n.value&&(n.value=s)}return(s,a)=>(O(),q("div",{ref_key:"root",ref:o,class:"relative h-8 rounded-[2.5rem] inline-flex bg-black bg-opacity-90 p-1 text-sm overflow-auto max-w-full scrollbar-none leading-none"},[G("div",{class:"bg-stone-400 h-6 rounded-2xl absolute top-1 pointer-events-none duration-200",style:ze(i.value)},null,4),(O(!0),q(Me,null,pn(t.items,(l,u)=>vt((O(),q("div",{key:u,tabindex:"0",class:$e(["inline-flex justify-center items-center h-6 rounded-2xl px-3 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":u==n.value,"text-stone-400":u!=n.value}]),onClick:()=>r(u),onKeyup:[Us(()=>r(u),["enter"]),Us(()=>r(u),["space"])]},[Rt(Xe(l),1)],42,cf)),[[Y(vn),30]])),128))],512))}}),uf=Object.freeze(Object.defineProperty({__proto__:null,default:Vn},Symbol.toStringTag,{value:"Module"})),ff={class:"flex items-center mb-8 last:mb-0"},df={class:"flex-grow overflow-hidden"},on=Te({__name:"TableField",props:{label:{type:String},disabled:{type:Boolean}},setup(e){return(t,n)=>(O(),q("div",ff,[G("div",{class:$e(["flex-shrink-0 w-[4.8rem]",{"opacity-50":e.disabled}])},Xe(e.label),3),G("div",df,[Ie(t.$slots,"default")])]))}}),pf=Object.freeze(Object.defineProperty({__proto__:null,default:on},Symbol.toStringTag,{value:"Module"})),hf={},gf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function mf(e,t){return O(),q("svg",gf,[...t[0]||(t[0]=[G("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 il=ye(hf,[["render",mf]]),vf=Object.freeze(Object.defineProperty({__proto__:null,default:il},Symbol.toStringTag,{value:"Module"})),bf={},yf={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 36 36"};function wf(e,t){return O(),q("svg",yf,[...t[0]||(t[0]=[G("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),G("path",{fill:"none",d:"M0 0h36v36H0z"},null,-1)])])}const rl=ye(bf,[["render",wf]]),xf=Object.freeze(Object.defineProperty({__proto__:null,default:rl},Symbol.toStringTag,{value:"Module"}));function _f(e){if(e)try{return JSON.parse(e)}catch(t){console.log(t);return}}function Sf(e){return String(e).normalize("NFKD").replace(/[\u0300-\u036f]/g,"").trim().toLowerCase().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}var xt=(e=>(e[e.vertical=0]="vertical",e[e.ltr=1]="ltr",e[e.rtl=2]="rtl",e))(xt||{}),Ht=(e=>(e[e.longStrip=0]="longStrip",e[e.single=1]="single",e[e.double=2]="double",e))(Ht||{});const sl=.25,ll=5,kf=.25,Po=.2,Oo=5,Cf=.05,Tf=0,If=5,al=5;function Mf(e){var y,v,z,N,k,D,Q;const{titleName:t,isWebtoon:n}=e,o=oe(()=>t.value?Sf(t.value):location.hostname),i=te(Ef(`tkr:${o.value}`)),r=m=>{i.value=m;const _=`tkr:${o.value}`;!m||!Object.keys(m).length?localStorage.removeItem(_):localStorage.setItem(_,JSON.stringify(m))},s=m=>{if(!i.value){r(m);return}const _={...i.value};Object.entries(m).forEach(([U,X])=>{X===void 0?delete _[U]:_[U]=X}),r(_)},a=te((y=i.value)==null?void 0:y.style),l=te((v=i.value)==null?void 0:v.direction),u=te((z=i.value)==null?void 0:z.gap),c=te(((N=i.value)==null?void 0:N.speed)??1),f=te(((k=i.value)==null?void 0:k.zoom)??1),p=te(((D=i.value)==null?void 0:D.breakFirst)??!1),g=te(((Q=i.value)==null?void 0:Q.autoNextSeconds)??al),x=oe({get(){return n.value?Ht.longStrip:a.value??e.defaultStyle.value??Ht.longStrip},set:m=>{if(a.value===m)return;const _=x.value===Ht.longStrip,U=m===Ht.longStrip;a.value=m,s({style:m}),_!==U&&(C.value=U?xt.vertical:xt.rtl)}}),C=oe({get(){return n.value?xt.vertical:l.value??e.defaultDirection.value??xt.vertical},set:m=>{l.value=m,s({direction:m})}}),B=oe({get:()=>u.value??e.defaultGap.value??0,set(m){u.value=m,s({gap:m})}}),H=oe({get:()=>c.value,set(m){c.value=m,s({speed:m===1?void 0:m})}}),Z=oe({get:()=>f.value,set(m){f.value=m,s({zoom:m===1?void 0:m})}}),W=oe({get:()=>p.value,set(m){p.value=m,s({breakFirst:m?!0:void 0})}}),I=oe({get:()=>g.value,set(m){g.value=m,s({autoNextSeconds:m===al?void 0:m})}});return{direction:C,style:x,gap:B,speed:H,zoom:Z,isLongStrip:oe(()=>x.value===Ht.longStrip),isDouble:oe(()=>x.value===Ht.double),isRTL:oe(()=>C.value===xt.rtl),isVertical:oe(()=>C.value===xt.vertical),breakFirst:W,autoNextSeconds:I}}function Ef(e){const t=localStorage.getItem(e),n=_f(t||void 0),o={};return n?(n.style!==void 0&&Object.values(Ht).includes(n.style)&&(o.style=n.style),n.direction!==void 0&&Object.values(xt).includes(n.direction)&&(o.direction=n.direction),n.gap!==void 0&&n.gap>=Tf&&n.gap<=If&&(o.gap=n.gap),n.speed!==void 0&&n.speed>=sl&&n.speed<=ll&&(o.speed=n.speed),n.zoom!==void 0&&n.zoom>=Po&&n.zoom<=Oo&&(o.zoom=n.zoom),n.breakFirst===!0&&(o.breakFirst=!0),n.autoNextSeconds<=5&&n.autoNextSeconds>=-1&&(o.autoNextSeconds=n.autoNextSeconds),Object.keys(o).length?o:void 0):o}const cl=Te({__name:"ButtonReaderSettings",props:{name:{type:String},direction:{type:Number},readerStyle:{type:Number},gap:{type:Number},autoNextSeconds:{type:Number},speed:{type:Number},zoom:{type:Number},webtoon:{type:Boolean},disabled:{type:Boolean},hideAutoNext:{type:Boolean}},emits:["update:reader-style","update:direction","update:gap","update:autoNextSeconds","update:speed","update:zoom","help"],setup(e,{emit:t}){const n=e,o=t,i=te(!1),r=oe(()=>["Long strip",n.webtoon?void 0:"Single page",n.webtoon?void 0:"Double page"].filter(Boolean)),s=oe(()=>n.name??location.hostname);Eo({onKeyUp:u=>{u.key==="s"&&!u.metaKey&&!u.ctrlKey&&(i.value=!i.value)}});function a(u){o("update:zoom",Math.round(u)/100)}function l(){i.value=!1,o("help")}return(u,c)=>(O(),q(Me,null,[ee(st,{title:"Reader settings (S)",disabled:e.disabled,onClick:c[0]||(c[0]=()=>i.value=!0)},{default:ce(()=>[ee(rl)]),_:1},8,["disabled"]),ee(ol,{modelValue:i.value,"onUpdate:modelValue":c[6]||(c[6]=f=>i.value=f),name:s.value},{actions:ce(()=>[ee(st,{transparent:"",onClick:l},{default:ce(()=>[ee(il)]),_:1})]),default:ce(()=>[ee(on,{label:"Style"},{default:ce(()=>[ee(Vn,{"model-value":e.readerStyle,items:r.value,"onUpdate:modelValue":c[1]||(c[1]=f=>o("update:reader-style",f))},null,8,["model-value","items"])]),_:1}),ee(on,{label:"Direction"},{default:ce(()=>[ee(Vn,{"model-value":e.direction,items:e.webtoon?["Vertical"]:["Vertical","Left to right","Right to left"],"onUpdate:modelValue":c[2]||(c[2]=f=>o("update:direction",f))},null,8,["model-value","items"])]),_:1}),ee(on,{label:"Gap"},{default:ce(()=>[ee(Vn,{"model-value":e.gap,items:["None","1px","2px","3px","4px","5px"],"onUpdate:modelValue":c[3]||(c[3]=f=>o("update:gap",f))},null,8,["model-value"])]),_:1}),e.hideAutoNext?Ee("",!0):(O(),me(on,{key:0,label:"Auto Next"},{default:ce(()=>[ee(Vn,{"model-value":e.autoNextSeconds<0?0:e.autoNextSeconds,items:["None","1s","2s","3s","4s","5s"],"onUpdate:modelValue":c[4]||(c[4]=f=>o("update:autoNextSeconds",f===0?-1:f))},null,8,["model-value"])]),_:1})),ee(on,{label:"Speed"},{default:ce(()=>[ee(Oi,{"model-value":e.speed,min:Y(sl),max:Y(ll),step:Y(kf),suffix:"x","onUpdate:modelValue":c[5]||(c[5]=f=>o("update:speed",f))},{suffix:ce(()=>[Rt(Xe(e.speed.toFixed(2))+"x ",1)]),_:1},8,["model-value","min","max","step"])]),_:1}),ee(on,{label:"Zoom"},{default:ce(()=>[ee(Oi,{"model-value":Math.ceil(e.zoom*100),min:Y(Po)*100,max:Y(Oo)*100,step:Y(Cf)*100,"onUpdate:modelValue":a},{suffix:ce(()=>[Rt(Xe(Math.ceil(e.zoom*100))+"% ",1)]),_:1},8,["model-value","min","max","step"])]),_:1})]),_:1},8,["modelValue","name"])],64))}}),Pf=Object.freeze(Object.defineProperty({__proto__:null,default:cl},Symbol.toStringTag,{value:"Module"})),Of={},$f={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"};function Af(e,t){return O(),q("svg",$f,[...t[0]||(t[0]=[G("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[G("circle",{cx:"14",cy:"14",r:"12"}),G("path",{d:"m23 23l7 7M9 12V9h3m4 0h3v3M9 16v3h3m7-3v3h-3"})],-1)])])}const ul=ye(Of,[["render",Af]]),Lf=Object.freeze(Object.defineProperty({__proto__:null,default:ul},Symbol.toStringTag,{value:"Module"})),zf={class:"block w-4 h-4"},Df={class:"w-12"},fl=Te({__name:"ButtonResetZoom",props:{zoom:{type:Number}},emits:["click"],setup(e,{emit:t}){const n=t;function o(i){n("click",i)}return(i,r)=>(O(),q("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:We(o,["stop"])},[G("div",zf,[ee(ul)]),G("div",Df,Xe(Math.ceil(e.zoom*100))+"%",1)]))}}),Nf=Object.freeze(Object.defineProperty({__proto__:null,default:fl},Symbol.toStringTag,{value:"Module"}));async function bn(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 bn(e-1,t,n);i(r)},t)})}const jf={},Rf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Bf(e,t){return O(),q("svg",Rf,[...t[0]||(t[0]=[Oc('<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 dl=ye(jf,[["render",Bf]]),Ff=Object.freeze(Object.defineProperty({__proto__:null,default:dl},Symbol.toStringTag,{value:"Module"})),Hf={},Vf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Wf(e,t){return O(),q("svg",Vf,[...t[0]||(t[0]=[G("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"},null,-1)])])}const pl=ye(Hf,[["render",Wf]]),Uf=Object.freeze(Object.defineProperty({__proto__:null,default:pl},Symbol.toStringTag,{value:"Module"})),Kf=["aria-hidden"],qf=["onClick"],Yf={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"},Zf={class:"whitespace-nowrap"},$i=Te({__name:"ButtonDropdown",props:hn({label:{type:String},title:{type:String},items:{type:Array},disabled:{type:Boolean},canLoadItems:{type:Boolean},loadItems:{type:Function},enableHapticFeedback:{type:Boolean}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:hn(["select"],["update:modelValue"]),setup(e,{emit:t}){const n=e,o=t,i=$n(e,"modelValue"),r=te(null),s=te(!1),a=te(!1),l=te(!1),u=te(!1),c=te(!1),f={mounted:k=>{var D;(D=k.children[i.value])==null||D.scrollIntoView({behavior:"auto",block:"center",inline:"center"})}};Eo({onKeyDown:Z});const p=Ei(),g=Mi();async function x(){if(!n.items.length&&(s.value||await C(),!n.items.length)){s.value=!1;return}s.value=!s.value,p(s.value),s.value?(B(),I(r.value)):setTimeout(y,250)}async function C(){a.value||n.items.length||!n.canLoadItems||!n.loadItems||(a.value=!0,await n.loadItems(),a.value=!1)}function B(){const k=r.value;if(k){const D=k.getBoundingClientRect(),Q=D.x+D.width/2;l.value=D.y>window.innerHeight/2,u.value=Q<window.innerWidth/3,c.value=Q>window.innerWidth/3*2}}function H(k,D){x(),k!=i.value&&(i.value=k,o("select",k,D),n.enableHapticFeedback&&g())}function Z(k){s.value&&k.key==="Escape"&&(x(),k.preventDefault())}let W=[];function I(k){const D=window.getComputedStyle(k).zIndex,Q=k.style.zIndex;(!D||!(+D>0))&&((!k.parentElement||k.parentElement.childElementCount>1)&&(k.style.zIndex="1",W.push({el:k,zIndex:Q})),k.parentElement&&I(k.parentElement))}function y(){W.forEach(({el:k,zIndex:D})=>{k.style.zIndex=D??""}),W=[]}let v=!1;function z(){v||(v=!0,p(!0,{desktopOnly:!0}))}function N(){v&&(v=!1,p(!1,{desktopOnly:!0}))}return(k,D)=>(O(),q("div",{ref_key:"root",ref:r,class:"select-none relative inline-flex"},[s.value?(O(),q("div",{key:0,class:"fixed inset-0 bg-transparent",onClick:x})):Ee("",!0),e.items.length?(O(),me(To,{key:1,name:"slide-fade","enter-from-class":"scale-y-90 opacity-0 pointer-events-none","leave-to-class":"scale-y-90 opacity-0 pointer-events-none"},{default:ce(()=>[s.value?vt((O(),q("ul",{key:0,ref:"list","aria-hidden":!s.value,class:$e(["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":!u.value&&!c.value,"right-0 text-right":c.value}]),onWheelPassive:D[0]||(D[0]=We(()=>{},["stop"])),onTouchmove:D[1]||(D[1]=We(()=>{},["stop"]))},[(O(!0),q(Me,null,pn(e.items,(Q,m)=>vt((O(),q("li",{key:m,tabindex:"-1",class:$e(["h-10 px-4 last:border-b-transparent cursor-pointer hover:bg-stone-100 hover:bg-opacity-10 duration-100",{"text-textPrimary":m===i.value}]),onClick:_=>H(m,_)},[G("div",{class:$e(["h-full py-2",{"border-t-[1px] border-solid border-stone-400 border-opacity-30":m>0}])},[Ie(k.$slots,"item",{item:Q},()=>[Rt(Xe(Q),1)])],2)],10,qf)),[[Y(vn),30]])),128))],42,Kf)),[[f]]):Ee("",!0)]),_:3})):Ee("",!0),vt((O(),q("button",Dn({type:"button",tabindex:"-1",class:["w-full h-10 max-h-full rounded-full bg-black bg-opacity-50 group duration-100",{"pointer-events-none text-stone-400":e.disabled||a.value}]},e.title?{title:e.title}:{},{onClick:We(x,["stop"]),onMouseenter:z,onMouseleave:N}),[G("div",Yf,[G("span",Zf,Xe(e.label),1),e.items.length||e.canLoadItems?(O(),q("span",{key:0,class:$e(["w-4 h-4 flex ml-1 -mr-3 flex-shrink-0",{"rotate-180":l.value}]),"aria-hidden":"true"},[a.value?(O(),me(dl,{key:0})):(O(),me(pl,{key:1}))],2)):Ee("",!0)])],16)),[[Y(vn),30]])],512))}}),Xf=Object.freeze(Object.defineProperty({__proto__:null,default:$i},Symbol.toStringTag,{value:"Module"})),hl=Te({__name:"ChapterNav",props:{data:{type:Object},chapterSpec:{type:Object},touchDevice:{type:Boolean}},emits:["getHiddenChapters","chaptersDialogOpen"],setup(e,{emit:t}){const n=e,o=t;async function i(){const l=n.chapterSpec;if(!l)return;const{trigger:u,sel:c,label:f}=l;if(u&&(!c||!f)){await r(u);return}o("getHiddenChapters"),await bn(50,50,()=>n.data.chapters.length?!0:void 0)}async function r(l){const u=document.querySelector(l);u&&(u instanceof HTMLDialogElement?u.showModal():u.click(),o("chaptersDialogOpen"))}function s(l,u){var c,f,p;(p=(f=(c=n.data)==null?void 0:c.chapters)==null?void 0:f[l])==null||p.select(a(u))}function a(l){return!n.touchDevice&&(l.ctrlKey||l.metaKey)}return(l,u)=>{var c;return O(),me($i,{modelValue:e.data.activeIndex,label:e.data.activeLabel,title:"Select chapter",items:e.data.chapters,"can-load-items":!!((c=e.chapterSpec)!=null&&c.trigger),"load-items":i,"enable-haptic-feedback":"",onSelect:s},{item:ce(({item:f})=>[Rt(Xe(f.label),1)]),_:1},8,["modelValue","label","items","can-load-items"])}}}),Gf=Object.freeze(Object.defineProperty({__proto__:null,default:hl},Symbol.toStringTag,{value:"Module"})),Jf={},Qf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function ed(e,t){return O(),q("svg",Qf,[...t[0]||(t[0]=[G("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 gl=ye(Jf,[["render",ed]]),td=Object.freeze(Object.defineProperty({__proto__:null,default:gl},Symbol.toStringTag,{value:"Module"})),ml=Te({__name:"DirectionToast",props:{direction:{type:Number}},setup(e){const t=e,n=sessionStorage.getItem("tk:dir"),o=te(typeof n!="string"||+n!==t.direction),i=tt(()=>o.value=!1,1250);pe(()=>t.direction,()=>{r(),o.value=!0,i()}),Ge(()=>{r(),i();let s;pe(Ci(),l=>{l!=="visible"?s=Date.now():Date.now()-s>7e3&&(o.value=!0,i())})});function r(){sessionStorage.setItem("tk:dir",t.direction+"")}return(s,a)=>(O(),me(To,{name:"slow-fade","enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ce(()=>[o.value?(O(),q("div",{key:0,class:$e(["fixed z-50 left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 pointer-events-none w-28 h-24 p-4 bg-black bg-opacity-40 rounded-2xl duration-500",{"rotate-90":e.direction===Y(xt).vertical,"rotate-180":e.direction===Y(xt).rtl}])},[ee(gl)],2)):Ee("",!0)]),_:1}))}}),nd=Object.freeze(Object.defineProperty({__proto__:null,default:ml},Symbol.toStringTag,{value:"Module"})),vl=Te({__name:"HelpScreen",props:{touchDevice:{type:Boolean}},emits:["hide"],setup(e,{emit:t}){const n=e,o=t,i=te(null),r=te([]);Ge(async()=>{const u=el(i),c=tt(()=>{s({width:u.width.value,height:u.height.value})},50);c(),pe(u.width,c),pe(u.height,c)});function s(u){var p;const c=(p=i.value)==null?void 0:p.parentElement;if(!c)return;const f=Array.from(c.querySelectorAll("#controls [title]"));f.length&&(r.value=a(f,u))}function a(u,c){const f=[],p=[];let g=0,x=0;const C=50,B=25;u.forEach(y=>{var D;const v=(D=y.getAttribute("title"))==null?void 0:D.trim(),z=y.getBoundingClientRect();if(!v||!z.height||!z.width)return;const N=Math.ceil((z.top-10)/C),k=Math.ceil((z.left-10)/C);p.push({isTour:!1,title:v,rect:z,fromX:k,toX:Math.max(k+1,Math.ceil((z.right+10)/C)),fromY:N,toY:Math.max(N+1,Math.ceil((z.bottom+10)/C))})}),p.forEach(y=>{for(let v=y.fromY;v<y.toY;v++){f[v]??(f[v]=[]);for(let z=y.fromX;z<y.toX;z++)f[v][z]=y;y.toY>g+1&&(g=y.toY-1),y.toX>x+1&&(x=y.toX-1)}});let H=x/2;p.forEach(y=>{y.isAlignRight=y.fromX>H});const Z=(y,v)=>{f[v]??(f[v]=[]);const z=v>=y.toY;if(y.isTour)for(let N=y.fromX;N<y.toX;N++)delete f[y.fromY][N],y.fromY=v,y.toY=v+(z?1:-1),f[v][N]=y;else{const N=y.isAlignRight?y.fromX-3:y.fromX,k=N+3;y.helpItem={fromX:N,toX:k,fromY:v,toY:v+1,isTour:!0,isAlignRight:y.isAlignRight};for(let D=N;D<k;D++)f[v][D]=y.helpItem}},W=(y,v)=>{if(v>g||v<0)return!1;const z=v>=y.toY,N=f[v];if(!N)return Z(y,v),!0;const k=N[y.fromX];if(k&&!k.isTour)return!1;if(k&&k.isTour)return W(k,z?v+1:v-1)?(Z(y,v),!0):!1;if(!k){const D=y.isAlignRight?-1:1;return N[y.fromX+D]||N[y.fromX+D*2]?W(y,z?v+1:v-1):(Z(y,v),!0)}return!1};p.forEach(y=>{if(!W(y,y.toY)){if(y.isAlignRight){const v=f[y.fromY]??[];if(!v.slice(y.fromX-3,y.fromX).filter(Boolean).length){const N=y.fromX-3,k=y.fromX;y.helpItem={isTour:!0,isAlignRight:!0,fromX:N,toX:k,fromY:y.fromY,toY:y.toY};for(let D=y.fromX-3;D<y.fromX;D++)v[D]=y.helpItem;return}}W(y,y.fromY-1)}});const I=[];return p.forEach(y=>{const{title:v,helpItem:z,rect:N,isAlignRight:k,fromX:D,fromY:Q,toY:m}=y;if(!v||!z||!N)return;const _=z.fromY>=m,U=z.toY<=Q;I.push({title:l(v),style:{top:_?`${N.bottom+(z.fromY-m)*C+B}px`:U?void 0:`${N.top+8}px`,bottom:U?`${c.height-N.top+(z.toY-Q)*C+B}px`:void 0,left:k?void 0:`${N.left}px`,right:k?_?`${c.width-N.right}px`:`${c.width-N.right+N.width+B}px`:void 0},arrowStyle:{width:U||_?"2px":`${Math.abs(z.toX-D)*C+B-5}px`,height:U||_?`${(_?z.fromY-m:Q-z.toY)*C+B}px`:"2px",top:_?`${N.bottom}px`:U?void 0:`${N.top+20}px`,bottom:U?`${c.height-N.top}px`:void 0,left:k?void 0:`${N.left+N.width/2}px`,right:k?_?`${c.width-N.right+N.width/2}px`:`${c.width-N.right+N.width}px`:void 0}})}),I}function l(u){return n.touchDevice?u.split("(")[0].trim():u}return(u,c)=>(O(),q(Me,null,[c[1]||(c[1]=G("div",{class:"fixed inset-0 bg-black bg-opacity-90"},null,-1)),G("div",{ref_key:"root",ref:i,class:"fixed inset-0 z-20 overscroll-contain select-none",onClick:c[0]||(c[0]=We(f=>o("hide"),["stop"]))},[(O(!0),q(Me,null,pn(r.value,f=>(O(),q(Me,{key:f.title},[G("div",{class:"absolute",style:ze(f.style)},Xe(f.title),5),G("div",{class:"absolute bg-stone-300 rounded-lg",style:ze(f.arrowStyle)},null,4)],64))),128))],512)],64))}}),od=Object.freeze(Object.defineProperty({__proto__:null,default:vl},Symbol.toStringTag,{value:"Module"})),bl=Te({__name:"PageNav",props:hn({disabled:{type:Boolean},pages:{type:Array},totalImgs:{type:Number}},{modelValue:{type:Number,required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const t=e,n=$n(e,"modelValue"),o=oe(()=>t.pages.map(l=>l.map(({index:u})=>`${u+1}`).join("-"))),i=oe(()=>{const l=n.value,u=t.pages.findIndex(c=>c.some(({index:f})=>f===l));return u===-1?t.pages.length-1:u}),r=oe(()=>t.pages.length?`${o.value[i.value]}/${t.totalImgs}`:"--");function s(l){const u=t.pages[l][0].index;a(u)}function a(l){n.value=l}return(l,u)=>(O(),me($i,{"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"]))}}),id=Object.freeze(Object.defineProperty({__proto__:null,default:bl},Symbol.toStringTag,{value:"Module"})),rd={},sd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function ld(e,t){return O(),q("svg",sd,[...t[0]||(t[0]=[G("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),G("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 Ai=ye(rd,[["render",ld]]),ad=Object.freeze(Object.defineProperty({__proto__:null,default:Ai},Symbol.toStringTag,{value:"Module"})),cd={},ud={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function fd(e,t){return O(),q("svg",ud,[...t[0]||(t[0]=[G("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 Li=ye(cd,[["render",fd]]),dd=Object.freeze(Object.defineProperty({__proto__:null,default:Li},Symbol.toStringTag,{value:"Module"})),yl=ye(Te({__name:"PauseToast",props:{playing:{type:Boolean}},setup(e){const t=e,n=te(0);return pe(()=>t.playing,()=>{n.value=Date.now()}),(o,i)=>n.value?(O(),q("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?(O(),me(Li,{key:0})):(O(),me(Ai,{key:1}))])):Ee("",!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)}}"]]]),pd=Object.freeze(Object.defineProperty({__proto__:null,default:yl},Symbol.toStringTag,{value:"Module"})),hd=30,wl=ye(Te({__name:"ProgressBar",props:{value:{type:Number},total:{type:Number},longStrip:{type:Boolean},height:{type:Number},rtl:{type:Boolean}},setup(e){const t=e,n=oe(()=>Math.floor(t.value)+1),o=oe(()=>`${Math.max(2,Math.min(10,t.height))}px`),i=Ii().width,r=oe(()=>i.value/t.total>=hd);return(s,a)=>(O(),q("div",{class:$e(["rprog",{"rprog--rtl":e.rtl}]),style:ze({height:o.value})},[r.value?(O(!0),q(Me,{key:0},pn(e.total,l=>(O(),q("span",{key:l,class:$e(["rprog__item",{"rprog__item--active":n.value===l}]),style:ze(!e.longStrip||n.value!==l?{}:{"--portion":`${e.value%1*100}%`})},null,6))),128)):(O(),q("div",{key:1,style:ze({width:`${e.value/e.total*100}%`}),class:"h-full bg-textPrimary bg-opacity-80"},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{background-color:rgb(251 130 82/var(--tw-bg-opacity,1));content:"";display:block;height:100%;--tw-bg-opacity:.8;width:var(--portion)}']]]),gd=Object.freeze(Object.defineProperty({__proto__:null,default:wl},Symbol.toStringTag,{value:"Module"})),xl=Te({__name:"GesturesContainer",props:{zoom:{type:Number},zooming:{type:Boolean},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=te(null),s=te(Math.min(Oo,Math.max(Po,o.zoom))),a=te(!1),l=te(!1),u={isZoomIn:!1,isZoomOut:!1,initial:void 0};t({rootEl:r}),pe(()=>o.zoom,w=>X(w)),Ge(()=>{o.touchDevice?Lt(r,"touchstart",H):(Lt(r,"mousedown",g),Lt(window,"wheel",z))}),Eo({onKeyDown:w=>{var $;if(!o.busy&&(($=r.value)==null||$.focus(),!(w.key==="Meta"||w.key==="Control")&&(w.ctrlKey||w.metaKey)))switch(w.key){case"0":X(1);break;case"-":X(s.value-.2),w.preventDefault();break;case"=":case"+":X(s.value+.2),w.preventDefault();break}},onKeyUp:w=>{o.zooming&&!(w.ctrlKey||w.metaKey)&&m()}});function c(w){l.value!==w&&(l.value=w,w?o.playController.pause():(i("dragEnd"),o.playController.resume()))}let f={x:0,y:0},p={x:0,y:0};function g(w){if(w.button!==0)return;const $=r.value;$&&(f={x:w.clientX,y:w.clientY},p={x:$.scrollLeft,y:$.scrollTop},window.addEventListener("mousemove",x),window.addEventListener("mouseup",()=>{window.removeEventListener("mousemove",x),setTimeout(()=>c(!1))},{once:!0}),w.preventDefault(),w.stopPropagation())}function x(w){const $=w.clientX-f.x,b=w.clientY-f.y;if(!l.value&&Math.abs($)<.5&&Math.abs(b)<.5)return;c(!0);const F=r.value;F&&(F.scrollLeft=p.x-$,F.scrollTop=p.y-b)}let C={distance:0,zoom:s.value,x:0,y:0},B=!1;function H(w){o.busy||(B=w.touches.length===2,B&&(i("update:zooming",!0),c(!0),w.stopPropagation(),w.preventDefault(),C={distance:N(w),zoom:s.value,x:(w.touches[0].clientX+w.touches[1].clientX)/2,y:(w.touches[0].clientY+w.touches[1].clientY)/2}),(B||o.longStrip&&o.playController.isPlaying.value)&&window.addEventListener("touchend",Z,{once:!0}))}function Z(){var F;if(B=!1,o.zooming){c(!1),m();return}if(!l.value)return;const w=tt(()=>{var re;c(!1),(re=r.value)==null||re.removeEventListener("scroll",b)},200),$=setTimeout(w,200);(F=r.value)==null||F.addEventListener("scroll",b);function b(){clearTimeout($),w()}}function W(w){if(!(!B&&!(o.longStrip&&o.playController.isPlaying.value))&&(c(!0),o.zooming)){w.stopPropagation(),w.preventDefault();const b=N(w)/C.distance;U(Math.ceil(b*C.zoom*100)/100,C)}}const I=tt(()=>a.value=!1,100);let y=!1;const v=tt(()=>{y=!1},30);function z(w){if(o.busy)return;let $=o.zooming;if(y||(y=!0,$=w.ctrlKey||w.metaKey,$&&i("update:zooming",!0)),v(),$){w.stopPropagation(),w.preventDefault();const b=Math.ceil((s.value+w.deltaY*-.01)*100)/100;U(b,{x:w.clientX,y:w.clientY});return}o.horizontal&&(a.value||(a.value=!0),I(),w.deltaY&&(r.value&&(r.value.scrollLeft+=w.deltaY*(o.rtl?-1:1)),w.stopPropagation()))}function N(w){return Math.hypot(w.touches[0].clientX-w.touches[1].clientX,w.touches[0].clientY-w.touches[1].clientY)}const k={x:0,y:0,ts:0};function D(w){if(l.value||o.zooming)return;const $=r.value;if(!$)return;if(!o.longStrip){const Oe=o.horizontal?$.clientWidth:$.clientHeight,Le=(o.horizontal?o.rtl?Oe-w.clientX:w.clientX:w.clientY)/Oe;if(Le<=.2&&o.pageIndex>0){i("prev");return}else if(Le>=.8){i("next");return}}if(i("click"),o.playController.isPlaying.value)return;const{clientX:b,clientY:F}=w,{x:re,y:se,ts:we}=k;k.x=b,k.y=F,k.ts=new Date().getTime();const Pe=k.ts-we;Pe>250||Pe<10||Math.abs(re-b)>40||Math.abs(se-F)>40||(k.ts=0,k.x=0,k.y=0,Q(b,F))}async function Q(w,$){const b=s.value===1?2:1;await X(b,{x:w,y:$}),m()}function m(){i("update:zooming",!1),u.initial=void 0,u.isZoomIn=!1,u.isZoomOut=!1}function _(){if(u.initial)return;const w=r.value;if(!w)return;const $=w.querySelector(`[data-index="${o.pageIndex}"],[data-index2="${o.pageIndex}"]`)??void 0;$&&(u.initial={el:$,rect:$.getBoundingClientRect()})}function U(w,$){if(u.isZoomIn=u.isZoomIn||!u.isZoomOut&&w>1,u.isZoomIn&&w<1){X(1,$);return}if(u.isZoomOut=u.isZoomOut||!u.isZoomIn&&w<1,u.isZoomOut&&w>1){X(1,$);return}X(w,$)}async function X(w,$){const b=r.value,F=Math.min(Oo,Math.max(Po,w));if(!b||s.value===F)return;_();const{initial:re}=u;if(!re)return;const se=($==null?void 0:$.x)??b.clientWidth/2,we=($==null?void 0:$.y)??b.clientHeight/2;s.value=F,i("update:zoom",F),await Mt();const{el:Pe,rect:Oe}=re,dt=Pe.offsetWidth/Oe.width,Le=Pe.offsetHeight/Oe.height;b.scrollLeft=Pe.offsetLeft-Oe.left*dt+se*(dt-1),b.scrollTop=Pe.offsetTop-Oe.top*Le+we*(Le-1)}return(w,$)=>(O(),q("div",{ref_key:"rootEl",ref:r,tabindex:"0",class:$e(["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&&(l.value||a.value||e.zooming),"cursor-grabbing":!e.touchDevice&&l.value,"overflow-hidden":e.zooming}]),style:ze({"font-size":`${s.value}px`}),onClick:We(D,["stop"]),onTouchmoveCapture:We(W,["stop"])},[Ie(w.$slots,"default")],38))}}),md=Object.freeze(Object.defineProperty({__proto__:null,default:xl},Symbol.toStringTag,{value:"Module"})),vd='.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}}',bd={},yd={class:"loading-indicator"};function wd(e,t){return O(),q("div",yd)}const zi=ye(bd,[["render",wd],["styles",[vd]]]),xd=Object.freeze(Object.defineProperty({__proto__:null,default:zi},Symbol.toStringTag,{value:"Module"}));function Di(e,t){return(e==null?void 0:e.querySelector(`[data-index="${t}"],[data-index2="${t}"]`))??void 0}const _d=["data-index"],Sd={key:0,class:"img img--loading"},kd=["src"],Cd=["data-index"],_l=ye(Te({__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},spaceTop:{type:null},touchDevice:{type:Boolean},playController:{type:Object},busy:{type:Boolean},idle:{type:Boolean},hasNext:{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=te(null),s=oe(()=>{var I;return(I=r.value)==null?void 0:I.rootEl});t({rootEl:s});const a=te(null),l=Ii(),u=oe(()=>{const{width:I,height:y}=l,v=o.isLongStrip?o.isVertical?I.value:y.value:Math.min(I.value,y.value);return Math.min(4,Math.max(1,Math.ceil(v/400-1)))*o.gap}),c=te(o.isLongStrip?{min:o.pageIndex-1,max:o.pageIndex}:B()),f=oe(()=>{const{min:I,max:y}=c.value,v={};for(let z=I;z<=y;z++)v[z]=!0;return v}),p=te(x()),g=W(()=>{p.value=x()},100);pe(l.width,g),pe(l.height,g),pe(()=>o.pages,g),pe(()=>o.isLongStrip,g),pe(()=>o.isVertical,g);function x(){const I=l.width.value,y=l.height.value,{pages:v,isLongStrip:z,isVertical:N}=o;return v.map(k=>{var b;const D=k.some(F=>{var re;return(re=F.img)==null?void 0:re.isLoading}),Q=k.map(F=>F.index),m={isLoading:D,indexes:Q,visible:!1};if(D)return m;const _=k.map(({img:F})=>F).filter(Boolean);if(!_.length||(m.srcs=_.map(({src:F})=>F),_.every(F=>F.hasError)))return m;const X=(b=_.find(F=>!F.hasError))==null?void 0:b.size;if(!X)return m;const w=_.reduce((F,re)=>{var se;return F+(((se=re.size)==null?void 0:se.width)??X.width)},0),$=_.reduce((F,re)=>{var se;return F+(((se=re.size)==null?void 0:se.height)??X.height)},0)/_.length;return z&&N||!z&&I/w<y/$?(m.width=Math.min(I,w),m.height=$*(m.width/w)):(m.height=Math.min(y,$),m.width=w*(m.height/$)),m})}const C=oe(()=>{const I=o.isVertical?"width":"height";return p.value.map(y=>y[I]).filter(Boolean).sort((y,v)=>v-y)[0]});Ge(()=>{const I=Di(s.value,o.pageIndex);I==null||I.scrollIntoView({behavior:"instant",block:"start"});let y,v=!1;ss(()=>{y!==o.pageIndex&&(y=o.pageIndex,z(),v||(v=!0,Mt(()=>i("ready"))))});async function z(){if(!o.isLongStrip){c.value=B();return}const N=Math.floor(o.page),k=Di(s.value,N);if(!k)return;const D=+H(k).getAttribute("data-index"),Q=+Z(k).getAttribute("data-index");(D!==c.value.min||Q!==c.value.max)&&(c.value={min:D,max:Q})}});function B(){const{pageIndex:I}=o;return{min:I-(o.isDouble?5:3),max:I+(o.isDouble?6:3)}}function H(I,y=0){const v=I.previousElementSibling;if(!v)return I;const z=y+(o.isVertical?v.clientHeight:v.clientWidth);return(o.isVertical?z>l.height.value*1.5:o.isRTL?z>l.width.value*2.5:z>l.width.value*1.5)?v:H(v,z)}function Z(I,y=0){const v=I.nextElementSibling;if(!v)return I;const z=y+(o.isVertical?v.clientHeight:v.clientWidth);return(o.isVertical?z>l.height.value*3.5:o.isRTL?z>l.width.value*1.5:z>l.width.value*2.5)?v:Z(v,z)}function W(I,y){let v;return()=>{v||(v??(v=setTimeout(()=>{v=void 0,I()},y)))}}return(I,y)=>(O(),me(xl,{ref_key:"gestureContainer",ref:r,zoom:e.zoom,zooming:e.zooming,"page-index":e.pageIndex,class:$e(["rbod",{"rbod--touch":e.touchDevice,"rbod--long-strip":e.isLongStrip,"rbod--paging":!e.isLongStrip,"rbod--vertical":e.isVertical,"rbod--rtl":e.isRTL,"rbod--idle":e.idle,"rbod--first":!e.isLongStrip&&e.pageIndex===0,"rbod--last":!e.isLongStrip&&e.pageIndex===e.totalImgs&&!e.hasNext,"rbod--1page":p.value.length===1}]),"play-controller":e.playController,horizontal:!e.isVertical,rtl:e.isRTL,"touch-device":e.touchDevice,busy:e.busy,"long-strip":e.isLongStrip,style:ze({"--gap":`${u.value}em`,"--space-top":(e.spaceTop||0)+"px","--screen-width-em":Y(l).width.value+"em","--screen-height-em":Y(l).height.value+"em",...e.isLongStrip?{"--max-size-em":C.value+"em"}:{}}),"onUpdate:zoom":y[0]||(y[0]=v=>i("update:zoom",v)),"onUpdate:zooming":y[1]||(y[1]=v=>i("update:zooming",v)),onDragEnd:y[2]||(y[2]=()=>i("dragEnd")),onClick:y[3]||(y[3]=()=>i("click")),onPrev:y[4]||(y[4]=()=>i("prev")),onNext:y[5]||(y[5]=()=>i("next"))},{default:ce(()=>[(O(!0),q(Me,null,pn(p.value,v=>{var z;return O(),q("div",Dn({key:e.direction+"_"+v.indexes[0],"data-index":v.indexes[0]},{ref_for:!0},v.indexes.length>1?{"data-index2":v.indexes[1]}:{}),[!((z=v.srcs)!=null&&z.length)||v.isLoading?(O(),q("div",Sd,[f.value[v.indexes[0]]?(O(),me(zi,{key:0})):Ee("",!0)])):v.srcs.length==1?(O(),me(jr(f.value[v.indexes[0]]?"img":"div"),Dn({key:1,class:"img"},{ref_for:!0},f.value[v.indexes[0]]?{src:v.srcs[0]}:{},{style:{width:v.width!==void 0?v.width+"em":"",height:v.height!==void 0?v.height+"em":""}}),null,16,["style"])):(O(),q("div",{key:2,class:$e(["img img--double",{"flex-row-reverse":e.isRTL}]),style:ze({width:v.width!==void 0?v.width+u.value+"em":"",height:v.height!==void 0?v.height+"em":""})},[v.indexes.some(N=>f.value[N])?(O(!0),q(Me,{key:0},pn(v.srcs,N=>(O(),q("div",{key:N},[G("img",{src:N},null,8,kd)]))),128)):Ee("",!0)],6))],16,_d)}),128)),G("div",{ref_key:"autoNextEl",ref:a,class:"last","data-index":e.totalImgs},[Ie(I.$slots,"end")],8,Cd)]),_:3},8,["zoom","zooming","page-index","play-controller","horizontal","rtl","touch-device","busy","long-strip","class","style"]))}}),[["styles",['.rbod{--tw-translate-y:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width:1024px){.rbod{transform:none}}.rbod--rtl{flex-direction:row-reverse}.rbod.rbod--vertical>div{padding:calc(var(--gap)/2) 0}.rbod:not(.rbod--vertical){align-items:center;display:flex;height:100%;justify-content:flex-start}.rbod:not(.rbod--vertical)>div{padding:0 calc(var(--gap)/2)}.rbod--long-strip.rbod--vertical.rbod--1page>div:first-child{min-height:100vh}.rbod--long-strip.rbod--vertical>div:first-child{margin-top:var(--space-top);padding-top:0}.rbod--long-strip.rbod--vertical>div:last-child{padding-bottom:0}.rbod--long-strip.rbod--vertical>div{width:var(--max-size-em)}.rbod--long-strip.rbod--vertical .img--loading{height:75vh;width:100%}.rbod--long-strip.rbod--vertical .last{height:100vh}.rbod--long-strip:not(.rbod--vertical).rbod--1page>div:first-child{min-width:100vw}.rbod--long-strip:not(.rbod--vertical)>div{align-items:center;display:flex;height:var(--max-size-em)}.rbod--long-strip:not(.rbod--vertical) .img--loading{height:100%;max-width:100vw;width:680px}.rbod--long-strip:not(.rbod--vertical) .last{width:100vw}.rbod--long-strip>div>img{flex-shrink:0;margin:auto}.rbod--paging:not(.rbod--touch):after,.rbod--paging:not(.rbod--touch):before{content:"";cursor:pointer;display:block;position:fixed;z-index:10}.rbod--paging.rbod--first:before,.rbod--paging.rbod--last:after{cursor:default}.rbod--paging.rbod--idle:after,.rbod--paging.rbod--idle:before{cursor:none}.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:after,.rbod--paging.rbod--vertical:before{height:20vw;left:0;right:0}.rbod--paging.rbod--vertical:before{top:0}.rbod--paging.rbod--vertical:after{bottom:0}.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).rbod--rtl:before{right:0}.rbod--paging:not(.rbod--vertical).rbod--rtl:after,.rbod--paging:not(.rbod--vertical):not(.rbod--rtl):before{left:0}.rbod--paging:not(.rbod--vertical):not(.rbod--rtl):after{right:0}.rbod--paging:not(.rbod--vertical):after,.rbod--paging:not(.rbod--vertical):before{bottom:0;top:0;width:20vw}.rbod--paging:not(.rbod--vertical)>div{height:var(--screen-height-em)}.rbod--paging .img--loading{height:100%;width:100%}.rbod--paging .img.img--double{align-items:center;background-color:transparent;display:flex;gap:var(--gap);justify-content:center}.rbod--paging .img.img--double div{display:flex;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.rbod--paging .img.img--double div img{flex-shrink:0;max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain}.rbod>div{flex-shrink:0}.rbod .img,.rbod>div{margin:auto;-webkit-user-select:none;-moz-user-select:none;user-select:none}.rbod .img{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1));-o-object-fit:contain;object-fit:contain}.rbod .img--loading{align-items:center;background-color:transparent;display:flex;justify-content:center}']]]),Td=Object.freeze(Object.defineProperty({__proto__:null,default:_l},Symbol.toStringTag,{value:"Module"})),Id={class:"max-h-none max-w-none h-full w-full m-0 p-0 border-none outline-none"},Md={key:0,class:"fixed inset-0 h-[101%] flex justify-center items-center z-10 bg-black"},Ed={class:"flex justify-between items-end"},Pd={class:"inline-block children-pointer-events-auto"},Od={class:"inline-flex flex-col items-end gap-4 children-pointer-events-auto"},$d={class:"inline-block z-20 relative"},Ad={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"},Sl=ye(Te({__name:"ReaderLayout",props:{loading:{type:Boolean},immediate:{type:Boolean},idle:{type:Boolean},fullScreen:{type:Boolean},zooming:{type:Boolean},rtl:{type:Boolean},spaceTop:{type:null}},setup(e,{expose:t}){const n={mounted:i=>i.showModal(),beforeUnmount:i=>i.close()},o=te(null);return t({rootEl:o}),(i,r)=>vt((O(),q("dialog",Id,[G("div",{ref_key:"rootEl",ref:o,id:"reader-layout",class:$e({"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?(O(),q("div",Md,[ee(zi)])):Ee("",!0),Ie(i.$slots,"default"),G("div",{id:"controls",class:$e(["fixed pointer-events-none cursor-auto transition-opacity duration-100 ease-linear 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.fullScreen,"opacity-0 -z-10":e.fullScreen}])},[G("div",{class:"flex gap-1 items-center children-pointer-events-auto relative z-30 flex-shrink-0 2xs:gap-3",style:ze({paddingTop:`${e.spaceTop||0}px`})},[Ie(i.$slots,"back"),Ie(i.$slots,"exit"),Ie(i.$slots,"chapter-nav")],4),G("div",Ed,[G("div",Pd,[Ie(i.$slots,"page-nav")]),G("div",Od,[Ie(i.$slots,"entry"),G("div",$d,[Ie(i.$slots,"settings")]),Ie(i.$slots,"full-screen"),Ie(i.$slots,"play"),Ie(i.$slots,"break-first")])]),G("div",{class:$e(["fixed pointer-events-none left-0 right-0 bottom-0",{"flex justify-end":e.rtl}])},[Ie(i.$slots,"progress")],2)],2),!e.fullScreen||e.zooming?(O(),q("div",Ad,[Ie(i.$slots,"reset-zoom")])):Ee("",!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))}"]]]),Ld=Object.freeze(Object.defineProperty({__proto__:null,default:Sl},Symbol.toStringTag,{value:"Module"})),kl=ye(Te({__name:"ReaderTour",emits:["hide"],setup(e,{emit:t}){const n=t,o=te(null),i=te(0),r=te([]),s=oe(()=>r.value[i.value]),a=Js(l,500);Ge(()=>{const f=el(o),p=tt(()=>u({width:f.width.value,height:f.height.value}),50);p(),pe(f.width,p),pe(f.height,p)});function l(){i.value>=r.value.length-1?n("hide"):i.value++}function u(f){const p=c();r.value=p.map(({rect:g,text:x})=>{const C=g.top<f.height-g.bottom,B=g.left<f.width-g.right;return{text:x,style:{left:`${g.left}px`,top:`${g.top}px`,width:`${g.width}px`,height:`${g.height}px`},textStyle:{left:B?`${g.left-12}px`:void 0,right:B?void 0:`${f.width-g.left}px`,top:C?`${g.bottom+12}px`:`${g.top+20}px`,textAlign:C?void 0:"right",transform:C?void 0:"translateY(-50%)"}}}),i.value>=r.value.length&&(i.value=r.value.length-1)}function c(){var g;const f=(g=o.value)==null?void 0:g.parentElement;if(!f)return[];const p=[];return f.querySelectorAll("[data-tour]").forEach(x=>{var H;const C=(H=x.getAttribute("data-tour"))==null?void 0:H.trim();if(!(C!=null&&C.length))return;const B=x.getBoundingClientRect();p.push({rect:B,text:C})}),p}return(f,p)=>{var g,x;return O(),q(Me,null,[G("div",{class:$e(["fixed inset-0 bg-black bg-opacity-50 duration-500",{"opacity-0":!s.value,"opacity-100":!!s.value}])},null,2),G("div",{ref_key:"root",ref:o,class:"tour",onClick:p[0]||(p[0]=We((...C)=>Y(a)&&Y(a)(...C),["stop"]))},[s.value?(O(),q("div",{key:i.value,class:"tour__target",style:ze(s.value.style)},null,4)):Ee("",!0),(O(),q("div",{key:i.value,class:"tour__text",style:ze((g=s.value)==null?void 0:g.textStyle)},Xe(((x=s.value)==null?void 0:x.text)??""),5))],512)],64)}}}),[["styles",[".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:10px}}"]]]),zd=Object.freeze(Object.defineProperty({__proto__:null,default:kl},Symbol.toStringTag,{value:"Module"})),Dd={},Nd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function jd(e,t){return O(),q("svg",Nd,[...t[0]||(t[0]=[G("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 Cl=ye(Dd,[["render",jd]]),Rd=Object.freeze(Object.defineProperty({__proto__:null,default:Cl},Symbol.toStringTag,{value:"Module"})),Bd={},Fd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Hd(e,t){return O(),q("svg",Fd,[...t[0]||(t[0]=[G("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 Tl=ye(Bd,[["render",Hd]]),Vd=Object.freeze(Object.defineProperty({__proto__:null,default:Tl},Symbol.toStringTag,{value:"Module"})),Wd={},Ud={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Kd(e,t){return O(),q("svg",Ud,[...t[0]||(t[0]=[G("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 Il=ye(Wd,[["render",Kd]]),qd=Object.freeze(Object.defineProperty({__proto__:null,default:Il},Symbol.toStringTag,{value:"Module"})),Yd={},Zd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function Xd(e,t){return O(),q("svg",Zd,[...t[0]||(t[0]=[G("path",{fill:"currentColor",d:"M15.41 7.41L14 6l-6 6l6 6l1.41-1.41L10.83 12z"},null,-1)])])}const Ml=ye(Yd,[["render",Xd]]),Gd=Object.freeze(Object.defineProperty({__proto__:null,default:Ml},Symbol.toStringTag,{value:"Module"})),Jd={},Qd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function ep(e,t){return O(),q("svg",Qd,[...t[0]||(t[0]=[G("path",{fill:"currentColor",d:"M10 6L8.59 7.41L13.17 12l-4.58 4.59L10 18l6-6z"},null,-1)])])}const El=ye(Jd,[["render",ep]]),tp=Object.freeze(Object.defineProperty({__proto__:null,default:El},Symbol.toStringTag,{value:"Module"})),np={},op={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 56 56"};function ip(e,t){return O(),q("svg",op,[...t[0]||(t[0]=[G("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 Pl=ye(np,[["render",ip]]),rp=Object.freeze(Object.defineProperty({__proto__:null,default:Pl},Symbol.toStringTag,{value:"Module"})),sp={},lp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function ap(e,t){return O(),q("svg",lp,[...t[0]||(t[0]=[G("g",{fill:"none"},[G("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"}),G("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 Ol=ye(sp,[["render",ap]]),cp=Object.freeze(Object.defineProperty({__proto__:null,default:Ol},Symbol.toStringTag,{value:"Module"})),up={},fp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function dp(e,t){return O(),q("svg",fp,[...t[0]||(t[0]=[G("path",{fill:"currentColor",d:"M4 4h6v2H6v4H4V4Zm10 0h6v6h-2V6h-4V4ZM6 14v4h4v2H4v-6h2Zm14 0v6h-6v-2h4v-4h2Z"},null,-1)])])}const $l=ye(up,[["render",dp]]),pp=Object.freeze(Object.defineProperty({__proto__:null,default:$l},Symbol.toStringTag,{value:"Module"})),hp={},gp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function mp(e,t){return O(),q("svg",gp,[...t[0]||(t[0]=[G("path",{fill:"currentColor",d:"M14 20v-6h6v2h-4v4h-2Zm-6 0v-4H4v-2h6v6H8Zm12-10h-6V4h2v4h4v2Zm-10 0H4V8h4V4h2v6Z"},null,-1)])])}const Al=ye(hp,[["render",mp]]),vp=Object.freeze(Object.defineProperty({__proto__:null,default:Al},Symbol.toStringTag,{value:"Module"})),bp={},yp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function wp(e,t){return O(),q("svg",yp,[...t[0]||(t[0]=[G("path",{fill:"currentColor",d:"M19 12.998h-6v6h-2v-6H5v-2h6v-6h2v6h6z"},null,-1)])])}const Ll=ye(bp,[["render",wp]]),xp=Object.freeze(Object.defineProperty({__proto__:null,default:Ll},Symbol.toStringTag,{value:"Module"})),_p={},Sp={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24"};function kp(e,t){return O(),q("svg",Sp,[...t[0]||(t[0]=[G("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 zl=ye(_p,[["render",kp]]),Cp=Object.freeze(Object.defineProperty({__proto__:null,default:zl},Symbol.toStringTag,{value:"Module"}));function Wn(e=0){return new Promise(t=>setTimeout(t,e))}function Dl(e){const t=async(n,o)=>{var i;if(!n.toBlob){if(o)return;const r=n.cloneNode(),s=(i=r.getContext)==null?void 0:i.call(r,"2d");if(!s)return;try{s.drawImage(e,0,0)}catch{return}return t(r,!0)}return await new Promise(r=>{const s=a=>{if(!a)return r(void 0);const l=URL.createObjectURL(a);r(l)};try{n.toBlob(s,"image/jpeg",1)}catch{r(void 0)}})};return t(e,!1)}let $o;async function Tp(e,t){if($o||!t.startsWith("blob:"))return t;if($o===void 0){try{if((await fetch(t)).ok)return $o=!0,t}catch{}$o=!1}e.complete||await new Promise(l=>{let u=0;const c=setInterval(()=>{e.complete?(l(),clearInterval(c)):++u>=30&&l()},100)});const o=e.naturalWidth,i=e.naturalHeight;if(!o||!i)return;const r=document.createElement("canvas"),s=r.getContext("2d");return r.width=o,r.height=i,s==null||s.drawImage(e,0,0,o,i),await Dl(r)}function Ip(e){const t=new Set,n=e.getAttributeNames(),o=n.indexOf("src"),i=o!==-1;i&&(n.splice(o,1),n.push("src"));for(const r of n){if(r==="srcset"||i&&r===":src"||r!=="data-url"&&r!=="data-original"&&!r.includes("src"))continue;const s=e.getAttribute(r);s&&(r==="src"&&e.naturalWidth&&e.naturalWidth<200||t.add(s.replace(/(\n|\t)/g," ").trim()))}return Array.from(t)}function Ni(e,t){return e>=75&&t>=50&&(e>=200||t>=200)}class Mp{constructor({onChanged:t}){Ae(this,"isMounted",!0);Ae(this,"elsDisposeCallbacksMap",new Map);Ae(this,"onChanged");this.onChanged=t}dispose(){this.isMounted=!1,this.elsDisposeCallbacksMap.forEach(t=>t()),this.elsDisposeCallbacksMap=new Map,this.onChanged=()=>{}}async download(t){if(!this.isMounted)return;const n=t.el,o=!!n&&n instanceof HTMLImageElement,i=n?o?Ip(n):[await Dl(n)].filter(Boolean):[t.src].filter(Boolean);if(!(!n&&!i.length||!this.isMounted)){if(n&&!this.elsDisposeCallbacksMap.has(n))if(o){let r=i.slice(-1)[0];const s=new MutationObserver(a=>{a.some(u=>{if(u.attributeName!=="src")return!1;const c=r;return r=n.getAttribute("src"),!!r&&c!==r})&&this.download(t)});s.observe(n,{attributes:!0}),this.elsDisposeCallbacksMap.set(n,()=>s.disconnect())}else{const r=n.getContext("2d");if(r){const s=r.drawImage.bind(r),a=r.putImageData.bind(r),l=(u,c,f)=>(setTimeout(()=>this.download(t),100),u.apply(c,f));r.drawImage=new Proxy(s,{apply:l}),r.putImageData=new Proxy(a,{apply:l}),this.elsDisposeCallbacksMap.set(n,()=>{r.drawImage=s,r.putImageData=a})}}i.length&&(this.onChanged(t,{src:i[0],isLoading:!0,hasError:!1}),await this.downloadRawImage(t,i))}}async downloadRawImage(t,n){const o=t.el instanceof HTMLImageElement?t.el:void 0;for(let i=0;i<n.length;i++){const r=n[i],s=o?await Tp(o,r):r;if(!s||!this.isMounted)return;const a=await Ep(s,o,l=>{this.isMounted&&this.onChanged(t,{src:s,size:l,isLoading:!1,hasError:!1})});if(a.ok||!this.isMounted)return;i===n.length-1&&this.onChanged(t,{src:s,isLoading:!1,hasError:!!a.error,invalid:!!a.invalid,size:a.size})}}}async function Ep(e,t,n){return(t==null?void 0:t.src)===e&&t.naturalWidth&&t.naturalHeight?(n({width:t.naturalWidth,height:t.naturalHeight}),t.complete?{ok:!0}:new Promise(o=>{t.addEventListener("load",()=>o({ok:!0}),{once:!0})})):await new Promise(o=>{const i=new Image,r=setInterval(()=>{const{naturalWidth:s,naturalHeight:a}=i;if(a&&s){const l={width:s,height:a};Ni(s,a)?n(l):o({invalid:!0,size:l}),clearInterval(r)}},20);i.onerror=()=>{o({error:!0}),clearInterval(r)},i.onload=()=>setTimeout(()=>o({ok:!0}),25),i.src=e})}const Pp=3;class Op{constructor(t){Ae(this,"download");Ae(this,"threads");Ae(this,"completedItems");Ae(this,"promisesMap",new Map);this.download=t.download}dispose(){var t;(t=this.threads)==null||t.dispose(),this.threads=void 0,this.completedItems=void 0}run({activeIndex:t,items:n}){var r;if(this.completedItems===n)return;this.completedItems=void 0,(r=this.threads)==null||r.dispose();let o=Math.max(0,t-1),i=!0;this.threads=new $p(Pp,()=>{const s=n[o];if(!s){this.completedItems=n;return}i&&o===n.length-1?(i=!1,o=t-2):i?o++:o--;const a=s.src??s.el;if(a){const u=this.promisesMap.get(a);if(u)return u}const l=this.download(s);return a&&this.promisesMap.set(a,l),l}),this.threads.exec()}}class $p{constructor(t,n){Ae(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 Wn(20),this.next())}}class Nl{constructor(){Ae(this,"elsPool",new Map)}check(t){if(!t||t===document.body)return!0;const n=this.elsPool.get(t);if(n!==void 0)return n;const o=getComputedStyle(t);if(!(o.display!=="none"&&+(o.opacity??"1")>.1))return this.elsPool.set(t,!1),!1;const r=this.check(t.parentElement);return this.elsPool.set(t,r),r}}function Ap(e,t){let n=[t??document.documentElement];const o=e.split("->");for(let i=0;i<o.length;i++){const r=o[i];n=n.map(s=>Array.from((s.shadowRoot??s).querySelectorAll(r))).flat()}return n}function ji(e){if(e instanceof HTMLOptionElement){const t=e.parentElement instanceof HTMLOptGroupElement?e.parentElement.parentElement:e.parentElement;if(!t||!(t instanceof HTMLSelectElement))return;const n=e.getAttribute("value")||"";if(t.value===n)return;t.value=n,t.dispatchEvent(new Event("change"));return}e instanceof HTMLAnchorElement&&e.addEventListener("click",t=>t.preventDefault(),{once:!0}),e.click(),e.dispatchEvent(new PointerEvent("pointerdown",{bubbles:!0,cancelable:!0,pointerType:"mouse",button:0})),e.dispatchEvent(new MouseEvent("mousedown",{bubbles:!0,cancelable:!0,view:window,button:0}))}async function Lp(e){const{lstrip:t,lstripBtn:n}=e||{};if(!t||!n||!!document.querySelector(t))return!1;const i=n.split(";");for(const r of i)if(!await zp(r.trim()))return!1;return!0}async function zp(e){const t=await bn(50,30,()=>document.querySelector(e));return t?(ji(t),await Wn(),!0):!1}class Dp{constructor({spec:t,onChanged:n}){Ae(this,"spec");Ae(this,"onChanged");Ae(this,"rawImages",[]);Ae(this,"isMounted",!0);Ae(this,"loadRawImagesTs");Ae(this,"imgListenersMap",new Map);Ae(this,"disconnectObservers");Ae(this,"contentEl");Ae(this,"reloadRawImages",tt(()=>{this.contentEl&&this.loadRawImages(this.contentEl)},100));this.spec=t,this.onChanged=n,this.init()}dispose(){var t;this.isMounted=!1,(t=this.disconnectObservers)==null||t.call(this),this.disconnectObservers=void 0,this.onChanged=()=>{}}init(){var i;const t=new MutationObserver(this.reloadRawImages),n=(i=this.spec)!=null&&i.imgDivs?void 0:(()=>{let r=window.innerWidth;return new ResizeObserver(tt(()=>{const s=window.innerWidth;if(s!==r){r=s;return}this.reloadRawImages()},50))})();this.disconnectObservers=async()=>{t.disconnect(),n==null||n.disconnect()};let o=!1;this.loadContentEl(r=>{this.contentEl!==r&&(this.contentEl=r,t.disconnect(),n==null||n.disconnect(),t.observe(this.contentEl,{childList:!0,subtree:!0}),n==null||n.observe(this.contentEl),o?this.reloadRawImages():(o=!0,this.loadRawImages(this.contentEl)))})}setRawImages(t){let n=!1;const o=t.map((i,r)=>{const s=this.rawImages[r];return s&&s.el===i.el&&s.parentEl===i.parentEl&&s.src===i.src?s:(n=!0,i)});(n||!o.length)&&(this.rawImages=o,this.onChanged(t))}async loadContentEl(t){var a;const n=await Lp(this.spec),o=(a=this.spec)==null?void 0:a.content;if(!o){t(document.body);return}let i=await bn(n?100:1,10,()=>{for(const l of o.split(",")){const u=document.querySelector(l);if(u)return u}});if(!i)return;t(i);let r=0;const s=async()=>{if(this.isMounted&&!(i!=null&&i.isConnected)){if(r=0,i=await bn(50,20,()=>{const l=document.querySelector(o);return l!=null&&l.isConnected&&l!==i?l:void 0}),!i)return;t(i)}!this.isMounted||++r>=10||setTimeout(s,200)};setTimeout(s,200)}async loadRawImages(t){var r;if(!this.isMounted||!t.isConnected)return;const n=Date.now();this.loadRawImagesTs=n;const o=(r=this.spec)==null?void 0:r.imgDivs,i=o?await this.loadFromImgDivs(t,o):this.loadFromContentEl(t);this.loadRawImagesTs!==n||!t.isConnected||!this.isMounted||this.setRawImages(i)}async loadFromImgDivs(t,n){const o=Ap(n,t);if(!o.length)return this.loadFromContentEl(t);const i=new Nl;return o.map(s=>{const a=Array.from(s.querySelectorAll("img,canvas"));for(const l of a)if(i.check(l)){if(l instanceof HTMLCanvasElement){if(jl(l))return{el:l,parentEl:s}}else if(l instanceof HTMLImageElement&&Rl(l))return{el:l,parentEl:s}}return{parentEl:s}})}loadFromContentEl(t){const n=[],o={},i=new Nl;return Array.from(t.querySelectorAll("img,canvas")).forEach(s=>{if(!i.check(s)){this.observeInvalidImgEl(s);return}if(s instanceof HTMLCanvasElement)jl(s)&&n.push({el:s});else if(s instanceof HTMLImageElement)if(Rl(s)){const a=s.getAttribute("src");if(a){const l=o[a];if(l!==void 0&&l!==-1){n.splice(l,1);return}o[a]=n.length}n.push({el:s})}else this.observeInvalidImgEl(s)}),n}observeInvalidImgEl(t){if(!(t instanceof HTMLImageElement)||this.imgListenersMap.has(t))return;const n=()=>{t.removeEventListener("load",n),this.imgListenersMap.delete(t),this.reloadRawImages()};this.imgListenersMap.set(t,n),t.addEventListener("load",n)}}function jl(e){return e.isConnected&&Ni(e.width,e.height)}function Rl(e){if(!e.isConnected)return!1;const t=e.getBoundingClientRect();return!t.width||!t.height||Ni(t.width,t.height)}const Ri="mp-scroll-container";class Bi{constructor(){Ae(this,"unmountedCallbacks",new Map)}dispose(){for(const t of this.unmountedCallbacks.values())t()}scrollTo({rawImages:t,page:n,skipIfVisible:o,isScrollDown:i,fallbackScrollEl:r}){const s=Math.floor(n),a=t[Math.min(t.length-1,s)];if(!a)return;const l=a.el??a.parentEl??(a.src?document.querySelector(`img[src^="${a.src}"]`):void 0);if(!l)return;const u=l.getBoundingClientRect();if(o&&u.top<=0&&u.top+u.height>0)return;const c=Bi.getScrollable(l,r);if(!c)return;const{el:f,top:p}=c;r!==document.documentElement&&!f.classList.contains(Ri)&&(f.classList.add(Ri),this.unmountedCallbacks.has(f)||this.unmountedCallbacks.set(f,()=>{f.classList.remove(Ri)}));const g=n>=t.length?u.height:i?Math.max(0,u.height-window.innerHeight+100):n%1*u.height,x={top:p+g,behavior:"instant"};f.scrollTo(x),f===document.body&&document.documentElement.scrollTo(x)}static getScrollable(t,n){const o=(i,r)=>{if(!i)return;const{offsetTop:s,offsetParent:a}=i;if(a&&s&&r.set(a,Math.max(r.get(a)??0,s)),!(i===n||i.scrollHeight-i.clientHeight>=10&&window.getComputedStyle(i).overflow!=="visible"))return o(i.parentElement,r);let u=0;return r.forEach((c,f)=>{u+=f===a?c-s:c}),{el:i,top:u}};return o(t,new Map)}}function Bl(e){var t,n;for(let o=0;o<e.length;o++){const i=((t=e[o])==null?void 0:t.el)??((n=e[o])==null?void 0:n.parentEl),r=i==null?void 0:i.getBoundingClientRect();if(!r||r.bottom<=0)continue;const s=r.top;return o+(s>=0?0:-s/r.height)}return 0}function Np(e){if(document.documentElement.scrollTop<700)return 0;const n=Array.from(document.querySelectorAll("img[src]")).filter(o=>e.includes(o.src)).map(o=>({el:o}));return Bl(n)}function jp(e){var k,D,Q;const t=(k=e.raw.value)==null?void 0:k.isWebtoon,n=te(t===!1),o=te(t);let i=!1;const r=e.touchDevice&&!navigator.userAgent.toLowerCase().includes("android"),s=((Q=(D=e.raw.value)==null?void 0:D.imgs)==null?void 0:Q.filter(Boolean))??[];let a=e.isAutoShow!==!1?e.page.value:s.length?Np(s):void 0,l=s.map(m=>({src:m})),u,c;const f=new Map,p=({src:m,el:_})=>{const U=_??m;return U?f.get(U):void 0},g=te(s.map(m=>({src:m,isLoading:!0,hasError:!1}))),x=()=>{const m=[];l.forEach(_=>{const{src:U,el:X}=_,w=X??U,$=w?f.get(w):void 0;(w&&!($!=null&&$.invalid)||_.parentEl)&&m.push($)}),g.value=m};let C=setTimeout(e.onTimeout,2e4);const B=()=>{C&&(clearTimeout(C),C=void 0)};let H=0,Z=0;const W=4,I=new Mp({onChanged(m,_){const U=m.el??m.src;if(!U||(f.set(U,_),x(),_.isLoading))return;if(_.hasError){if(c||o.value!==void 0)return;c=setTimeout(()=>{c=void 0,o.value===void 0&&e.onError("Failed to load images")},3e3);return}const{size:X,invalid:w}=_;if(!(!X||w)){if(!o.value&&Z<W){const $=i?l:l.filter(({el:Pe,src:Oe})=>Oe||!(Pe&&Pe instanceof HTMLImageElement&&!f.has(Pe)));let b=$.indexOf(m);if(i&&b>4||b===-1&&(m.el&&(b=$.findIndex(Pe=>Pe.el===m.el)),b===-1))return;const F=b>Math.min(1,$.length-3)&&b<Math.max($.length-2,3),re=X.width/X.height;re>2&&H++;const se=re<.5||H>=W,we=!se&&.65<re&&re<.75;we&&Z++,o.value!==se&&(F||se)&&(o.value=se),F&&n.value!=we&&(n.value=!0),o.value===void 0&&we&&Z===W&&(o.value=!1)}N()}}}),y=new Op({download:async m=>{!(m.el&&f.has(m.el))&&!(m.src&&f.has(m.src))&&await I.download(m)}}),v=()=>{y.run({items:l,activeIndex:Math.min(l.length-1,Math.floor(e.page.value))})},z=new Bi;if(s.length)v();else{let m=!1;u=new Dp({spec:e.spec,async onChanged(_){var U;if(l=_,x(),!e.raw.value&&!_.length){e.onError("no_img");return}(U=e.spec)!=null&&U.imgDivs&&!m&&e.isAutoShow!==!1&&e.page.value&&(m=!0,z.scrollTo({rawImages:_,page:e.page.value,skipIfVisible:!0,fallbackScrollEl:r?document.body:document.documentElement}),await Wn(1)),a===void 0&&e.isAutoShow===!1&&(a=Bl(_)),v()}})}ii(()=>{I.dispose(),y.dispose(),u==null||u.dispose(),c&&clearTimeout(c),z.dispose(),i&&z.scrollTo({rawImages:l,page:e.page.value,fallbackScrollEl:document.documentElement})});function N(){if(i||o.value===void 0||a===void 0)return;const m=Math.max(0,Math.min(a,l.length)),_=Math.min(Math.floor(m),l.length-1);if(_>=1){const X=l[_];if(!X||!p(X)){e.isAutoShow&&z.scrollTo({rawImages:l,page:_,fallbackScrollEl:r?document.body:document.documentElement});return}for(let w=_;w<l.length;w++){const $=p(l[w]);if(!$)return;if(!$.invalid){if(!$.size&&!$.hasError)return;break}}for(let w=_-1;w>=0;w--){const{src:$,el:b}=l[w],F=b??$;if(!F)break;const re=f.get(F);if(!re)return;if(!re.invalid){if(!re.size&&!re.hasError)return;break}}}if(i)return;i=!0,B(),e.onReady(m);let U=!0;pe(()=>Math.floor(e.page.value),(X,w)=>{X===w&&!U||(z.scrollTo({rawImages:l,page:X,isScrollDown:w===void 0||X>w||l.length===1,skipIfVisible:U&&l.length>1,fallbackScrollEl:r?document.body:document.documentElement}),U=!1,w??(w=-1),v())},{immediate:!0})}return{asyncImgs:oe(()=>g.value),isWebtoon:oe(()=>o.value??!1),isManga:oe(()=>n.value)}}function Rp(e,t,n){return oe(()=>t.value?Fl(e.value,n.value):e.value.map((o,i)=>[{img:o,index:i}]))}function Fl(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,a)=>({img:s,index:n+a})),...Fl(e.slice(r.length),t&&i,n+r.length)]}function Bp(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=te(t&&e>0?Math.max(0,e):+(sessionStorage.getItem("tk:page")??"0")||e);return oe({get:()=>o.value,set:i=>{o.value=i,sessionStorage.setItem("tk:page",i+"")}})}function Fp(){sessionStorage.removeItem("tk:page"),sessionStorage.removeItem("tk:page:path")}const Fi=40;function Hp({page:e,totalImgs:t,direction:n,style:o,isLongStrip:i,isVertical:r,isRTL:s,spaceTop:a,scrollEl:l,isWebtoon:u,interferePlayer:c,onChangedPage:f,onInitialized:p,onFinished:g}){let x=!1,C=!1,B=!1,H;const Z=tt(D,300),W=Js(()=>{D(),Z()},300),I=b=>(z(b),tt(z,50)(b));async function y(){N(e.value,{smooth:!1,ensureLastImgVisibility:!0})}function v(){var b;C=!0,p(),Q(),(b=l.value)==null||b.addEventListener("scroll",W),setTimeout(()=>{const{width:F,height:re}=Ii();pe(F,()=>{r.value&&I(e.value)}),pe(re,()=>{r.value||I(e.value)}),pe(o,()=>I(e.value)),pe(n,()=>I(e.value)),/iPad|iPhone|iPod/.test(navigator.userAgent)&&pe(t,()=>{s.value&&I(e.value)})},300)}async function z(b){if(!(!C||x)){if(x=!0,await Mt(),_()===b){x=!1;return}N(b)}}function N(b,{smooth:F,ensureLastImgVisibility:re=!1}={smooth:!1}){const se=l.value;if(!se)return;x=!0;const we=async()=>{await Mt(),x=!1,C||v()},Pe=Math.floor(b),Oe=Di(se,Pe);if(!Oe){we();return}c(async()=>{await k(se,!i.value&&F,async()=>{await $(se,Oe,{smooth:F,page:b,ensureLastImgVisibility:re})}),await we()})}async function k(b,F,re){F&&b.style.setProperty("scroll-snap-type","none"),await re(),F&&b.style.removeProperty("scroll-snap-type")}function D(){if(x)return;const b=_();b!==void 0&&b!==e.value&&f(b),Q()}function Q(){B||!B&&m()&&(B=!0,g())}function m(){const b=l.value;if(!b)return!1;const F=i.value?u.value?3:!r.value&&b.clientWidth>b.clientHeight?2.25:2.5:2;return r.value?b.scrollHeight-b.scrollTop<b.clientHeight*F:b.scrollWidth-(s.value?-b.scrollLeft:b.scrollLeft)<b.clientWidth*F}function _(){const b=U();return b?(+b.getAttribute("data-index")||0)+(i.value?X(b):0):void 0}function U(){var F;if(H??(H=l.value.getRootNode()),!H)return;const b=(F=H.elementsFromPoint)==null?void 0:F.call(H,r.value||!i.value?window.innerWidth/2:s.value?window.innerWidth-Fi:Fi,r.value&&i.value?a.value||Fi:window.innerHeight/2);if(b)for(let re=0;re<b.length;re++){const se=b[re];if(se.hasAttribute("data-index"))return se;if(se===l.value)break}}function X(b){const F=b.getBoundingClientRect();return r.value?Math.abs(F.top-a.value)/F.height:s.value?Math.max(0,F.right-l.value.clientWidth)/F.width:Math.abs(F.left)/F.width}let w=!1;async function $(b,F,re){if(w)return;const se=F.getBoundingClientRect();if(!i.value){if(r.value){if(se.top<=0&&se.bottom>=b.clientHeight)return}else if(se.left<=0&&se.right>=b.clientWidth)return}w=!0;const we=r.value?b.scrollTop:b.scrollLeft,Pe=re.page,Oe=i.value?Pe%1:0,dt=await bn(30,10,async()=>{await Wn();let je;if(!(F.offsetHeight<10))return i.value?r.value?je=F.offsetTop+Oe*F.offsetHeight-a.value:s.value?je=F.offsetLeft-b.clientWidth+F.offsetWidth-Oe*F.offsetWidth:je=F.offsetLeft+Oe*F.offsetWidth:r.value?je=F.offsetTop+(se.top>0?0:se.height-b.clientHeight):je=F.offsetLeft+(se.left>0?0:se.width-b.clientWidth),Pe>.5&&Math.abs(je)<100?void 0:je})??0,Le=re.ensureLastImgVisibility?r.value?Math.min(dt,b.scrollHeight-b.clientHeight*2):s.value?Math.max(dt,-(b.scrollWidth-b.clientWidth*2)):Math.min(dt,b.scrollWidth-b.clientWidth*2):dt;if(!re.smooth){r.value?b.scrollTop=Le:b.scrollLeft=Le,w=!1;return}const zt=Le-we,Vt=30;let Wt=0;return new Promise(je=>{(function Ut(){const d=Vp(Wt,we,zt,Vt);r.value?b.scrollTop=d:b.scrollLeft=d,Wt++,Wt<=Vt?requestAnimationFrame(Ut):(je(),w=!1)})()})}return{init:y,goToPage:N}}function Vp(e,t,n,o){return n*(Math.pow(e/o-1,3)+1)+t}function Wp({autoPlay:e,touchDevice:t,scrollEl:n,isVertical:o,isRTL:i,isLongStrip:r,speed:s}){const a=te(e||sessionStorage.getItem("tk:playing")==="true"),l=oe({get:()=>a.value,set:v=>{a.value=v,sessionStorage.setItem("tk:playing",v?"true":"false")}}),u=te(!1);let c,f;const p=tt(I,100),g=tt(()=>{u.value=!0},t?2e3:1e3),x=()=>setTimeout(()=>{u.value=!1,g()},30);x(),t||Lt(window,"mousemove",x),Ge(()=>{t||pe(Ci(),z=>{l.value&&(z==="visible"?I():f==null||f())}),pe(s,()=>C()),pe(r,v=>{v||H()})}),Zt(H);async function C(v){l.value&&(f==null||f()),v&&(await Mt(),await v()),l.value&&p()}function B(){l.value?H():Z()}function H(){l.value&&(l.value=!1,f==null||f(),x())}function Z(){!l.value&&r.value&&(l.value=!0,I(),x())}function W(){f==null||f()}function I(){const v=n.value;if(!l.value||!v)return;const z=o.value?v.scrollHeight-v.clientHeight:v.scrollWidth-v.clientWidth,N=y();if(z<=N){H();return}f=()=>{c=Date.now(),f=void 0};const k=Date.now();c=k;const D=.1*s.value,Q=o.value?"scrollTop":"scrollLeft";let m=Date.now(),_=0;const U=()=>{if(c!==k)return;const X=Date.now(),w=X-m;m=X;const $=D*w+_;$>=1?(_=$%1,v[Q]+=($-_)*(i.value?-1:1)):_=$,setTimeout(U,1)};U()}function y(){const v=n.value;return o.value?v.scrollTop:i.value?-v.scrollLeft:v.scrollLeft}return{isPlaying:l,isIdle:u,toggle:B,play:Z,pause:W,resume:I,stop:H,interfere:C,awake:x}}function Up({raw:e,spec:t,siteMeta:n,onSelect:o}){var D,Q,m;const{vol:i,inferVol:r,chap:s,title:a,slug:l,basePath:u}=e,c=t==null?void 0:t.chapter;let f=-1;async function p(_,U){if(o){o({..._});return}if(_.slug){g(_.slug,U);return}if(_.elIndex===void 0||!(c!=null&&c.sel))return;let X=null;document.querySelector(c.sel)||(c!=null&&c.trigger&&(X=document.querySelector(c.trigger)),X&&(X.click(),await new Promise($=>setTimeout(()=>$(),50))));const w=c&&c.sel&&!c.url?document.querySelectorAll(c.sel):void 0;w!=null&&w[_.elIndex]&&(ji(w[_.elIndex]),X&&document.querySelector(c.sel)&&X.click())}function g(_,U){const X=Kp(u,_,(n==null?void 0:n.trailing)??!0);U?window.open(X,"_blank","noopener"):location.href=X}function x(_){const U=W[_];return U?X=>p(U,X):void 0}function C(_,U,X){if(_){const w=document.querySelector(_);w&&ji(w);return}U&&g(U,X)}const B=i??r,H=c==null?void 0:c.url,Z=((D=a.chapters)==null?void 0:D.filter(_=>_.slug||!H&&_.elIndex!==void 0))??[],W=Z.length>1?Z:[],I=(Q=e.prev)==null?void 0:Q.slug,y=(m=e.next)==null?void 0:m.slug,{prevBtn:v,nextBtn:z}=t??{};let N=I||v&&!W.length&&document.body.querySelector(v)?_=>C(v,I,_):void 0,k=y||z&&!W.length&&document.body.querySelector(z)?_=>C(z,y,_):void 0;if(W.length){if(H&&(f=W.findIndex(_=>_.slug===e.slug)),f===-1&&(f=W.findIndex(_=>(_.vol??_.inferVol)===B&&_.chap===s)),H&&f===-1&&(f=W.findIndex(_=>_.slug&&l.startsWith(`${_.slug}-`)&&l.length-_.slug.length>3)),f!==-1)N??(N=x(f+1)),k??(k=x(f-1));else if(!I&&!y){const _=W.findIndex(U=>{const X=U.vol??U.inferVol;return B===void 0||X===void 0||B===X?U.chap<s:X<B});_!==-1?(N=x(_),k=x(_-1)):k=x(W.length-1)}}return{activeIndex:f,activeLabel:Hl({vol:i,chap:s}),prev:N,next:k,chapters:W.map(_=>({label:Hl(_),select:U=>p(_,U)}))}}function Hl({vol:e,chap:t}){return e==null?`Ch.${t}`:`Vol.${e} ch.${t}`}function Kp(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("?")}var Ao=(e=>(e[e.never=0]="never",e[e.move=1]="move",e[e.firstMove=2]="firstMove",e))(Ao||{});const qp={class:"flex justify-center items-center gap-1 pl-1 pr-2 h-full"},Yp={key:0,class:"ml-auto inline-flex gap-[1px] scale-95 origin-right"},Vl=ye(Te({inheritAttrs:!1,__name:"App",props:{immediate:{type:Boolean},raw:{type:Object},spec:{type:Object},siteMeta:{type:null},page:{type:Number},spaceTop:{type:Number},fullScreen:{type:Boolean},touchDevice:{type:Boolean},entryId:{type:String},autoPlay:{type:Boolean},readerStyle:{type:Number},direction:{type:Number},isAutoShow:{type:Boolean},tourEnabled:{type:Boolean},offlineMode:{type:Boolean},autoNextSeconds:{type:Number},defaultGap:{type:Number},hideControlsEvent:{type:Number},progressSize:{type:Number}},emits:["error","crash","ready","pageChanged","fullScreenChanged","playingChanged","tourEnabledChanged","dispose","openEntry","addEntry","finished","getHiddenChapters","hapticFeedback","pressedBack","selectChapter","timeout"],setup(e,{emit:t}){const n=e,o=t;let i=!1;Dr((T,L,ue)=>{var de;if(!i){i=!0;const _t=`(1.28.1) ${(L==null?void 0:L.$options.name)??(L==null?void 0:L.$options.__name)??(L==null?void 0:L.$options.__file)}.${ue}: ${(de=T.stack)==null?void 0:de.replaceAll(/(\n|\t)/g," ")}`;o("crash",_t)}return!1});let r=!1,s;const a=te(!1),l=te(!1),u=Uu({touchDevice:n.touchDevice}),c=Bp(n.page,n.isAutoShow),f=oe(()=>n.immediate||a.value?n.spaceTop??0:0),{asyncImgs:p,isWebtoon:g}=jp({raw:oe(()=>n.raw),spec:n.spec,page:c,touchDevice:n.touchDevice,isAutoShow:n.isAutoShow,async onReady(T){Le(T),a.value=!0},onError:()=>{o("error"),E()},onTimeout:()=>o("timeout")}),{direction:x,style:C,isRTL:B,isDouble:H,isVertical:Z,isLongStrip:W,gap:I,speed:y,zoom:v,breakFirst:z,autoNextSeconds:N}=Mf({isWebtoon:g,titleName:oe(()=>{var T;return(T=n.raw)==null?void 0:T.title.name}),defaultStyle:oe(()=>n.readerStyle),defaultDirection:oe(()=>n.direction),defaultGap:oe(()=>n.defaultGap)}),k=te(!1),D=Rp(p,H,z),Q=oe(()=>p.value.length),m=oe(()=>c.value>=Q.value),_=oe(()=>n.raw?Up({raw:n.raw,spec:n.spec,siteMeta:n.siteMeta,onSelect:n.offlineMode?T=>o("selectChapter",T):void 0}):void 0),U=te(null),X=te(null),w=te(!1),$=te(!1),b=Wp({autoPlay:!n.tourEnabled&&n.autoPlay,touchDevice:n.touchDevice,scrollEl:oe(()=>{var T;return(T=U.value)==null?void 0:T.rootEl}),speed:y,isRTL:B,isVertical:Z,isLongStrip:W}),F=oe(()=>!n.touchDevice&&b.isIdle.value&&!u.value&&!k.value),re=oe({get(){return v.value},set(T){b.interfere(()=>{v.value=T})}}),se=Hp({page:c,totalImgs:Q,style:C,direction:x,isLongStrip:W,isVertical:Z,isRTL:B,spaceTop:f,isWebtoon:g,scrollEl:oe(()=>{var T;return(T=U.value)==null?void 0:T.rootEl}),interferePlayer:T=>b.interfere(T),onChangedPage:Le,onInitialized(){o("ready"),l.value=!0,s=zt()},onFinished:()=>o("finished")}),we=oe(()=>Math.floor(c.value)),Pe=oe(()=>W.value?c.value:H.value?j():Math.floor(c.value)),Oe=()=>b.interfere(()=>Wn(100));ef().addListener({onKeyDown:T=>{if(n.tourEnabled)return;const L=W.value&&Z.value,ue=W.value&&!Z.value,de=!W.value&&Z.value,qe=!W.value&&!Z.value;switch(T.key){case" ":T.preventDefault(),W.value?(be(!1),b.toggle()):J();break;case"ArrowUp":case"PageUp":L?Oe():de&&we.value!==0&&(T.preventDefault(),V());break;case"ArrowDown":case"PageDown":L?Oe():de&&!m.value&&(T.preventDefault(),R());break;case"ArrowLeft":ue?Oe():qe?(T.preventDefault(),M()):Z.value&&d();break;case"ArrowRight":ue?Oe():qe?(T.preventDefault(),P()):Z.value&&Ut();break;case"Escape":T.preventDefault();break}},onKeyUp:T=>{switch(T.key){case"b":z.value=!z.value;break;case"f":ne();break;case"t":K();break;case"h":be();break}}}),Nu(()=>o("hapticFeedback")),Lt("fullscreenchange",()=>{w.value=!!document.fullscreenElement}),n.touchDevice&&pe(Ci(),L=>{L==="hidden"&&(b.isPlaying.value?b.stop():n.fullScreen&&J(!1))}),pe(b.isPlaying,T=>{T||J(!1),o("playingChanged",T)}),pe(b.isIdle,T=>{b.isPlaying.value&&J(T)}),pe(u,T=>{!T&&b.isIdle.value?b.awake():T&&n.fullScreen&&J()});function Le(T){if(c.value===T)return;const L=p.value.length;if(T<0||T>=L+1)return;const ue=Math.floor(T*100)/100;if(ue===c.value)return;const de=c.value;if(c.value=ue,o("pageChanged",ue),T>=L){J(!1),b.stop();return}if(T<.01&&de>T){J(!1),b.awake();return}const _t=n.hideControlsEvent??Ao.firstMove;if(!r&&_t===Ao.firstMove){(W.value?s!==void 0&&Math.abs(zt()-s)>300:Math.abs(de-T)>=1)&&J(!0);return}!b.isPlaying.value&&_t===Ao.move&&J(!0)}function zt(){var L;const T=(L=U.value)==null?void 0:L.rootEl;return T?Z.value?T.scrollTop:B.value?-T.scrollLeft:T.scrollLeft:0}function Vt(){!n.touchDevice&&!W.value&&se.goToPage(we.value,{smooth:!0})}function Wt(){if(b.isPlaying.value){!n.fullScreen||!n.touchDevice?b.stop():b.awake();return}J()}function je(T){n.offlineMode&&(T.preventDefault(),o("pressedBack"))}function Ut(T=!1){var L,ue;(ue=(L=_.value)==null?void 0:L.next)==null||ue.call(L,T)}function d(T=!1){var L,ue;(ue=(L=_.value)==null?void 0:L.prev)==null||ue.call(L,T)}function h(T){B.value?Ut(A(T)):d(A(T))}function S(T){B.value?d(A(T)):Ut(A(T))}function A(T){return!n.touchDevice&&(T.ctrlKey||T.metaKey)}function M(){B.value?R():V()}function P(){B.value?V():R()}function V(){var ue;const T=D.value,L=m.value?T[T.length-1][0].index:(ue=T[j()-1])==null?void 0:ue[0].index;L!==void 0?se.goToPage(L):d()}function R(){var T,L;if(m.value)Ut();else{const ue=((L=(T=D.value[j()+1])==null?void 0:T[0])==null?void 0:L.index)??p.value.length;se.goToPage(ue)}}function j(){const T=we.value,L=D.value.findIndex(ue=>ue.some(({index:de})=>de===T));return L===-1?D.value.length-1:L}function E(){if(n.offlineMode){o("pressedBack");return}Fp(),o("dispose")}async function J(T){if(u.value&&!n.fullScreen)return;const L=typeof T=="boolean"?T:!n.fullScreen;L!==n.fullScreen&&(r=!0,o("fullScreenChanged",L),L&&setTimeout(()=>{n.fullScreen&&u.value&&o("fullScreenChanged",!1)},100))}function K(){n.entryId?he():le()}function ne(){var T,L;document.fullscreenElement?document.exitFullscreen():(L=(T=X.value)==null?void 0:T.rootEl)==null||L.requestFullscreen()}function le(){b.stop(),o("addEntry")}function he(){b.stop(),o("openEntry",n.entryId)}function be(T){$.value!==T&&($.value=!$.value,$.value&&b.isPlaying.value&&b.stop())}return(T,L)=>e.immediate||a.value?(O(),me(Sl,{key:0,ref_key:"root",ref:X,loading:!l.value,immediate:!!e.immediate,"full-screen":!!e.fullScreen,zooming:k.value,idle:F.value,"space-top":f.value,rtl:Y(B),onClick:L[15]||(L[15]=We(()=>{},["stop"]))},ri({settings:ce(()=>{var ue;return[ee(cl,{"reader-style":Y(C),"onUpdate:readerStyle":L[6]||(L[6]=de=>Ce(C)?C.value=de:null),direction:Y(x),"onUpdate:direction":L[7]||(L[7]=de=>Ce(x)?x.value=de:null),gap:Y(I),"onUpdate:gap":L[8]||(L[8]=de=>Ce(I)?I.value=de:null),speed:Y(y),"onUpdate:speed":L[9]||(L[9]=de=>Ce(y)?y.value=de:null),zoom:re.value,"onUpdate:zoom":L[10]||(L[10]=de=>re.value=de),"auto-next-seconds":Y(N),"onUpdate:autoNextSeconds":L[11]||(L[11]=de=>Ce(N)?N.value=de:null),name:(ue=e.raw)==null?void 0:ue.title.name,webtoon:Y(g),disabled:!a.value,"hide-auto-next":e.autoNextSeconds!==void 0,onHelp:be},null,8,["reader-style","direction","gap","speed","zoom","auto-next-seconds","name","webtoon","disabled","hide-auto-next"])]}),"reset-zoom":ce(()=>[ee(To,{name:"fade","enter-from-class":"opacity-0","leave-to-class":"opacity-0"},{default:ce(()=>[k.value||Y(v)!==1?(O(),me(fl,{key:0,zoom:re.value,onClick:L[14]||(L[14]=We(()=>re.value=1,["stop"])),class:"duration-200"},null,8,["zoom"])):Ee("",!0)]),_:1})]),default:ce(()=>{var ue;return[a.value?(O(),me(_l,{key:0,ref_key:"body",ref:U,zoom:re.value,"onUpdate:zoom":L[0]||(L[0]=de=>re.value=de),zooming:k.value,"onUpdate:zooming":L[1]||(L[1]=de=>k.value=de),page:Y(c),"page-index":we.value,pages:Y(D),"total-imgs":Y(p).length,direction:Y(x),gap:Y(I),"is-long-strip":Y(W),isRTL:Y(B),"is-double":Y(H),"is-vertical":Y(Z),"space-top":f.value,busy:Y(u),idle:F.value,"play-controller":Y(b),"touch-device":e.touchDevice,"has-next":!!((ue=_.value)!=null&&ue.next),onReady:Y(se).init,onPrev:V,onNext:R,onClick:Wt,onDragEnd:Vt,onWheelPassive:L[2]||(L[2]=()=>Y(b).interfere())},ri({_:2},[a.value&&Y(p).length?{name:"end",fn:ce(()=>{var de;return[ee(tl,{"has-next":!!((de=_.value)!=null&&de.next),"offline-mode":!!e.offlineMode,seconds:e.autoNextSeconds??Y(N),onNext:Ut,onHide:E},ri({_:2},[Y(v)===1&&!e.entryId&&e.raw&&!e.offlineMode?{name:"bottom-center",fn:ce(()=>[ee(Pi,{class:"bg-primary w-min !h-9 !bg-opacity-100",onClick:K},{default:ce(()=>[G("div",qp,[ee(Ll,{class:"flex-shrink-0 w-auto"}),L[16]||(L[16]=G("span",{class:"text-sm"},"Add to library",-1))])]),_:1})]),key:"0"}:void 0]),1032,["has-next","offline-mode","seconds"])]}),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","idle","play-controller","touch-device","has-next","onReady"])):Ee("",!0),l.value&&!m.value&&!e.tourEnabled?(O(),me(ml,{key:1,direction:Y(x)},null,8,["direction"])):Ee("",!0),l.value&&!m.value?(O(),me(yl,{key:2,playing:!!Y(b).isPlaying.value},null,8,["playing"])):Ee("",!0),$.value?(O(),me(vl,{key:3,"touch-device":e.touchDevice,onHide:be},null,8,["touch-device"])):Ee("",!0),e.tourEnabled?(O(),me(kl,{key:4,onHide:L[3]||(L[3]=()=>o("tourEnabledChanged",!1))})):Ee("",!0)]}),_:2},[e.raw||e.offlineMode?{name:"back",fn:ce(()=>[ee(st,{href:e.offlineMode||!e.raw?"#":e.raw.title.url,title:"Back to manga","enable-haptic-feedback":"",onClick:je},{default:ce(()=>[ee(Cl)]),_:1},8,["href"])]),key:"0"}:void 0,!e.touchDevice&&!e.offlineMode?{name:"exit",fn:ce(()=>[ee(st,{title:"Hide reader","data-tour":"You have entered reader mode, press here to return to the original page",onClick:E},{default:ce(()=>[ee(zl)]),_:1})]),key:"1"}:void 0,_.value?{name:"chapter-nav",fn:ce(()=>{var ue;return[ee(hl,{"touch-device":e.touchDevice,"chapter-spec":(ue=e.spec)==null?void 0:ue.chapter,data:_.value,onGetHiddenChapters:L[4]||(L[4]=()=>o("getHiddenChapters")),onChaptersDialogOpen:L[5]||(L[5]=()=>J(!0))},null,8,["touch-device","chapter-spec","data"]),_.value.next||_.value.prev?(O(),q("div",Yp,[ee(st,{title:`${Y(B)?"Next":"Prev"} chapter (←)`,disabled:Y(B)?!_.value.next:!_.value.prev,class:"!rounded-r-none","enable-haptic-feedback":"",onClick:h},{default:ce(()=>[ee(Ml)]),_:1},8,["title","disabled"]),ee(st,{title:`${Y(B)?"Prev":"Next"} chapter (→)`,disabled:Y(B)?!_.value.prev:!_.value.next,class:"!rounded-l-none","enable-haptic-feedback":"",onClick:S},{default:ce(()=>[ee(El)]),_:1},8,["title","disabled"])])):Ee("",!0)]}),key:"2"}:void 0,Y(D).length?{name:"page-nav",fn:ce(()=>[ee(bl,{"model-value":we.value,disabled:!l.value,pages:Y(D),"total-imgs":Y(p).length,"onUpdate:modelValue":Y(se).goToPage},null,8,["model-value","disabled","pages","total-imgs","onUpdate:modelValue"])]),key:"3"}:void 0,!e.offlineMode&&e.raw?{name:"entry",fn:ce(()=>[ee(st,{title:e.entryId?"View entry (T)":"Add to library (T)","data-tour":"Prress here to add to your collection",onClick:K},{default:ce(()=>[e.entryId?(O(),me(Il,{key:0})):(O(),me(Tl,{key:1}))]),_:1},8,["title"])]),key:"4"}:void 0,e.touchDevice?void 0:{name:"full-screen",fn:ce(()=>[ee(st,{title:`${w.value?"Exit":"Enter"} fullscreen (F)`,onClick:ne},{default:ce(()=>[w.value?(O(),me(Al,{key:0})):(O(),me($l,{key:1}))]),_:1},8,["title"])]),key:"5"},Y(W)?{name:"play",fn:ce(()=>[ee(st,{"data-tour":"Press here to play like a video",title:`${Y(b).isPlaying.value?"Pause":"Play"} (Space)`,disabled:!l.value,onClick:L[12]||(L[12]=()=>Y(b).toggle())},{default:ce(()=>[Y(b).isPlaying.value?(O(),me(Ai,{key:0})):(O(),me(Li,{key:1}))]),_:1},8,["title","disabled"])]),key:"6"}:void 0,Y(H)?{name:"break-first",fn:ce(()=>[ee(st,{title:"Break 1st page (B)","data-tour":"Press here to separate the first page from double-page mode",disabled:!l.value,onClick:L[13]||(L[13]=()=>z.value=!Y(z))},{default:ce(()=>[Y(z)?(O(),me(Ol,{key:0})):(O(),me(Pl,{key:1}))]),_:1},8,["disabled"])]),key:"7"}:void 0,e.progressSize!==0&&!m.value?{name:"progress",fn:ce(()=>[ee(wl,{value:Pe.value,total:Y(D).length,"long-strip":Y(W),height:e.progressSize??2,rtl:Y(B)},null,8,["value","total","long-strip","height","rtl"])]),key:"8"}:void 0]),1032,["loading","immediate","full-screen","zooming","idle","space-top","rtl"])):Ee("",!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}.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-full{bottom:100%}.left-0{left:0}.left-1\\/2{left:50%}.left-10{left:40px}.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-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-50{z-index:50}.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}.mb-8{margin-bottom:32px}.ml-1{margin-left:4px}.ml-auto{margin-left:auto}.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\\.5{height:6px}.h-10{height:40px}.h-12{height:48px}.h-16{height:64px}.h-2{height:8px}.h-20{height:80px}.h-24{height:96px}.h-4{height:16px}.h-6{height:24px}.h-7{height:28px}.h-8{height:32px}.h-9{height:36px}.h-\\[101\\%\\]{height:101%}.h-\\[30rem\\]{height:480px}.h-full{height:100%}.max-h-\\[70vh\\]{max-height:70vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-full{max-height:100%}.max-h-none{max-height:none}.w-0{width:0}.w-1{width:4px}.w-10{width:40px}.w-12{width:48px}.w-2{width:8px}.w-20{width:80px}.w-24{width:96px}.w-28{width:112px}.w-4{width:16px}.w-40{width:160px}.w-\\[4\\.8rem\\]{width:76.8px}.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-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-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}.translate-y-1\\.5,.translate-y-full{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-full{--tw-translate-y:100%}.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}.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}.overscroll-contain{overscroll-behavior:contain}.text-ellipsis{text-overflow:ellipsis}.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-sm{border-radius:2px}.\\!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-t-xl{border-top-left-radius:12px;border-top-right-radius:12px}.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-stone-300{--tw-border-opacity:1;border-color:rgb(214 211 209/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-600{--tw-border-opacity:1;border-color:rgb(87 83 78/var(--tw-border-opacity,1))}.border-opacity-30{--tw-border-opacity:.3}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-primary{--tw-bg-opacity:1;background-color:rgb(184 92 56/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-400{--tw-bg-opacity:1;background-color:rgb(168 162 158/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-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-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-1{padding:4px}.p-2{padding:8px}.p-4{padding:16px}.p-6{padding:24px}.px-3{padding-left:12px;padding-right:12px}.px-4{padding-left:16px;padding-right:16px}.px-6{padding-left:24px;padding-right:24px}.py-1{padding-bottom:4px;padding-top:4px}.py-2{padding-bottom:8px;padding-top:8px}.pb-12{padding-bottom:48px}.pb-6{padding-bottom:24px}.pb-7{padding-bottom:28px}.pl-1{padding-left:4px}.pr-2{padding-right:8px}.pt-3{padding-top:12px}.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}.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-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-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-90{opacity:.9}.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-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)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.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)}.ease-linear{transition-timing-function:linear}.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-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\\:text-stone-100:hover{--tw-text-opacity:1;color:rgb(245 245 244/var(--tw-text-opacity,1))}.hover\\:text-stone-400:hover{--tw-text-opacity:1;color:rgb(168 162 158/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}}@media (min-width:640px){.sm\\:w-\\[32rem\\]{width:512px}.sm\\:p-3{padding:12px}}@media (min-width:768px){.md\\:px-8{padding-left:32px;padding-right:32px}.md\\:pb-5{padding-bottom:20px}.md\\:pb-6{padding-bottom:24px}.md\\:text-lg{font-size:18px;line-height:28px}}@media (min-width:1024px){.lg\\:px-10{padding-left:40px;padding-right:40px}.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}}']]]),Zp=Object.freeze(Object.defineProperty({__proto__:null,default:Vl},Symbol.toStringTag,{value:"Module"})),Xp=Object.freeze(Object.defineProperty({__proto__:null,default:Te({__name:"IntersectionWrapper",emits:["visible"],setup(e,{emit:t}){const n=t,o=te(null),i=te(!1);return Ge(async()=>{await Mt(),Ti(o,r=>{const s=r.some(a=>a.isIntersecting);s!==i.value&&(i.value=s),s&&n("visible")})}),(r,s)=>(O(),q("div",{ref_key:"root",ref:o},[Ie(r.$slots,"default",{visible:i.value})],512))}})},Symbol.toStringTag,{value:"Module"})),Gp={},Jp={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function Qp(e,t){return O(),q("svg",Jp,[...t[0]||(t[0]=[G("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 eh=Object.freeze(Object.defineProperty({__proto__:null,default:ye(Gp,[["render",Qp]])},Symbol.toStringTag,{value:"Module"})),th="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}",rn="gear-second",Hi={immediate:void 0,raw:void 0,spec:void 0,siteMeta:void 0,page:0,spaceTop:void 0,fullScreen:void 0,touchDevice:void 0,entryId:void 0,autoPlay:void 0,readerStyle:void 0,direction:void 0,isAutoShow:void 0,tourEnabled:void 0,offlineMode:void 0,autoNextSeconds:void 0,defaultGap:void 0,progressSize:void 0,hideControlsEvent:void 0,onError:void 0,onCrash:void 0,onDispose:void 0,onFullScreenChanged: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},nt={promise:void 0,data:oo({...Hi})};async function nh(e){return nt.promise?(nt.data.raw=e.raw,await nt.promise):(nt.promise=new Promise(t=>{let n=!1,o=!1,i,r,s=0;const a=!!e.spaceTop||!!e.isAutoShow&&!!e.page,l=()=>{n||(n=!0,clearInterval(i),i=void 0,r!=null&&r.isConnected&&document.body.removeChild(r),document.documentElement.classList.remove(rn),Object.assign(nt.data,Hi),nt.promise=void 0)},u=tt(p=>{var g;return!n&&((g=e.onPageChanged)==null?void 0:g.call(e,p))},300);Object.assign(nt.data,Hi,e,{immediate:a,onReady(){a||(c(),document.documentElement.classList.add(rn))},onError(){var p,g;l(),o?((p=e.onDispose)==null||p.call(e),(g=e.onError)==null||g.call(e)):f()},onDispose:()=>{var p;l(),(p=e==null?void 0:e.onDispose)==null||p.call(e)},onFullScreenChanged:p=>{var g;nt.data.fullScreen=p,(g=e.onFullScreenChanged)==null||g.call(e,p)},onPageChanged:p=>{nt.data.page=p,!(s>=p)&&(s=p,u(p))},onTourEnabledChanged:p=>{nt.data.tourEnabled=p}}),oh().then(()=>{if(n){f();return}r=document.createElement(rn),a?(document.documentElement.classList.add(rn),document.body.appendChild(r),setTimeout(c)):document.body.appendChild(r);let p=0;i=setInterval(()=>{if(++p===30||n){clearInterval(i),i=void 0;return}r.isConnected||(document.documentElement.classList.add(rn),document.body.appendChild(r))},100)});function c(){o||(o=!0,t({updateArgs(p){Object.assign(nt.data,p)},dispose:l}))}function f(){o||t(void 0)}}),await nt.promise)}async function oh(){if(window.customElements.get(rn))return;const e=document.createElement("style"),t=th;e.appendChild(document.createTextNode(t)),document.head.appendChild(e);const n=du({styles:[await ih()],data:()=>({readerData:nt.data}),render(){return xs(Vl,this.readerData)}});window.customElements.define(rn,n)}async function ih(){const e=Object.assign({"./App.vue":Zp,"./components/AutoNext.vue":Wu,"./components/BaseButton.vue":qu,"./components/BottomSheet.vue":rf,"./components/ButtonDropdown.vue":Xf,"./components/ButtonIcon.vue":Yu,"./components/ButtonReaderSettings.vue":Pf,"./components/ButtonResetZoom.vue":Nf,"./components/ChapterNav.vue":Gf,"./components/DirectionToast.vue":nd,"./components/GesturesContainer.vue":md,"./components/HelpScreen.vue":od,"./components/InputPercentage.vue":af,"./components/InputSelect.vue":uf,"./components/IntersectionWrapper.vue":Xp,"./components/LoadingIndicator.vue":xd,"./components/PageNav.vue":id,"./components/PauseToast.vue":pd,"./components/ProgressBar.vue":gd,"./components/ReaderBody.vue":Td,"./components/ReaderLayout.vue":Ld,"./components/ReaderTour.vue":zd,"./components/TableField.vue":pf,"./components/icons/IconBack.vue":Rd,"./components/icons/IconBookmarkNew.vue":Vd,"./components/icons/IconBookmarked.vue":qd,"./components/icons/IconChevronLeft.vue":Gd,"./components/icons/IconChevronRight.vue":tp,"./components/icons/IconClose.vue":Ju,"./components/icons/IconDouble.vue":rp,"./components/icons/IconDoubleSkip.vue":cp,"./components/icons/IconExclamationCircle.vue":eh,"./components/icons/IconFullscreen.vue":pp,"./components/icons/IconFullscreenExit.vue":vp,"./components/icons/IconHelp.vue":vf,"./components/icons/IconLoading.vue":Ff,"./components/icons/IconNext.vue":td,"./components/icons/IconPause.vue":ad,"./components/icons/IconPlay.vue":dd,"./components/icons/IconPlus.vue":xp,"./components/icons/IconReaderExit.vue":Cp,"./components/icons/IconSettings.vue":xf,"./components/icons/IconTriangle.vue":Uf,"./components/icons/IconZoom.vue":Lf}),t=[];for(const n in e){const o=e[n];t.push(o.default.styles)}return t.join("")}return nh});
|