PageSourceSearch

https://greatcontroversy.vercel.app/assets/BookReader-BwvBaKMw.js

js greatcontroversy.vercel.app collected 2026-10-03 07:01:57 UTC 149,859 bytes, 79 lines download raw bytes

1import{R as e,r as h,g as rr,t as ar,a as sa,s as ca}from"./index-lpKs_g1b.js";var Tr={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},or=e.createContext&&e.createContext(Tr),ua=["attr","size","title"];function da(t,r){if(t==null)return{};var u=ha(t,r),o,c;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(c=0;c<s.length;c++)o=s[c],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(t,o)&&(u[o]=t[o])}return u}function ha(t,r){if(t==null)return{};var u={};for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){if(r.indexOf(o)>=0)continue;u[o]=t[o]}return u}function qt(){return qt=Object.assign?Object.assign.bind():function(t){for(var r=1;r<arguments.length;r++){var u=arguments[r];for(var o in u)Object.prototype.hasOwnProperty.call(u,o)&&(t[o]=u[o])}return t},qt.apply(this,arguments)}function ir(t,r){var u=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);r&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(t,c).enumerable})),u.push.apply(u,o)}return u}function Zt(t){for(var r=1;r<arguments.length;r++){var u=arguments[r]!=null?arguments[r]:{};r%2?ir(Object(u),!0).forEach(function(o){pa(t,o,u[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(u)):ir(Object(u)).forEach(function(o){Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(u,o))})}return t}function pa(t,r,u){return r=ma(r),r in t?Object.defineProperty(t,r,{value:u,enumerable:!0,configurable:!0,writable:!0}):t[r]=u,t}function ma(t){var r=fa(t,"string");return typeof r=="symbol"?r:r+""}function fa(t,r){if(typeof t!="object"||!t)return t;var u=t[Symbol.toPrimitive];if(u!==void 0){var o=u.call(t,r);
vendor: 8,909 bytes, line 1
1if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function Ir(t){return t&&t.map((r,u)=>e.createElement(r.tag,Zt({key:u},r.attr),Ir(r.child)))}function V(t){return r=>e.createElement(ga,qt({attr:Zt({},t.attr)},r),Ir(t.child))}function ga(t){var r=u=>{var{attr:o,size:c,title:s}=t,g=da(t,ua),b=c||u.size||"1em",S;return u.className&&(S=u.className),t.className&&(S=(S?S+" ":"")+t.className),e.createElement("svg",qt({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},u.attr,o,g,{className:S,style:Zt(Zt({color:t.color||u.color},u.style),t.style),height:b,width:b,xmlns:"http://www.w3.org/2000/svg"}),s&&e.createElement("title",null,s),t.children)};return or!==void 0?e.createElement(or.Consumer,null,u=>r(u)):r(Tr)}function lr(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15-5-2.18L7 18V5h10v13z"},child:[]}]})(t)}function sr(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"},child:[]}]})(t)}function Ea(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"},child:[]}]})(t)}function un(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 21.35-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"},child:[]}]})(t)}function ka(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 1 3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-1 6h2v2h-2V7zm0 4h2v6h-2v-6z"},child:[]}]})(t)}function ba(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(t)}function cr(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12.87 15.07-2.54-2.51.03-.03A17.52 17.52 0 0 0 14.07 6H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7 1.62-4.33L19.12 17h-3.24z"},child:[]}]})(t)}function ya(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18 13c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6v4l5-5-5-5v4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8h-2z"},child:[]},{tag:"path",attr:{d:"M10.86 15.94v-4.27h-.09L9 12.3v.69l1.01-.31v3.26zM12.25 13.44v.74c0 1.9 1.31 1.82 1.44 1.82.14 0 1.44.09 1.44-1.82v-.74c0-1.9-1.31-1.82-1.44-1.82-.14 0-1.44-.09-1.44 1.82zm2.04-.12v.97c0 .77-.21 1.03-.59 1.03s-.6-.26-.6-1.03v-.97c0-.75.22-1.01.59-1.01.38-.01.6.26.6 1.01z"},child:[]}]})(t)}function wa(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"},child:[]}]})(t)}function zr(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M8 5v14l11-7z"},child:[]}]})(t)}function va(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z"},child:[]}]})(t)}function Ca(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M11.99 5V1l-5 5 5 5V7c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6h-2c0 4.42 3.58 8 8 8s8-3.58 8-8-3.58-8-8-8z"},child:[]},{tag:"path",attr:{d:"M10.89 16h-.85v-3.26l-1.01.31v-.69l1.77-.63h.09V16zM15.17 14.24c0 .32-.03.6-.1.82s-.17.42-.29.57-.28.26-.45.33-.37.1-.59.1-.41-.03-.59-.1-.33-.18-.46-.33-.23-.34-.3-.57-.11-.5-.11-.82v-.74c0-.32.03-.6.1-.82s.17-.42.29-.57.28-.26.45-.33.37-.1.59-.1.41.03.59.1.33.18.46.33.23.34.3.57.11.5.11.82v.74zm-.85-.86c0-.19-.01-.35-.04-.48s-.07-.23-.12-.31-.11-.14-.19-.17-.16-.05-.25-.05-.18.02-.25.05-.14.09-.19.17-.09.18-.12.31-.04.29-.04.48v.97c0 .19.01.35.04.48s.07.24.12.32.11.14.19.17.16.05.25.05.18-.02.25-.05.14-.09.19-.17.09-.19.11-.32.04-.29.04-.48v-.97z"},child:[]}]})(t)}function Sa(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m6 18 8.5-6L6 6v12zM16 6v12h2V6h-2z"},child:[]}]})(t)}function Aa(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M6 6h2v12H6zm3.5 6 8.5 6V6z"},child:[]}]})(t)}function Pa(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m20.38 8.57-1.23 1.85a8 8 0 0 1-.22 7.58H5.07A8 8 0 0 1 15.58 6.85l1.85-1.23A10 10 0 0 0 3.35 19a2 2 0 0 0 1.72 1h13.85a2 2 0 0 0 1.74-1 10 10 0 0 0-.27-10.44zm-9.79 6.84a2 2 0 0 0 2.83 0l5.66-8.49-8.49 5.66a2 2 0 0 0 0 2.83z"},child:[]}]})(t)}function xa(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"},child:[]}]})(t)}function ur(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26 5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z"},child:[]}]})(t)}function dr(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 0 0-1.41 0 .996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 0 0 0-1.41.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"},child:[]}]})(t)}function La(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 20h14v-2H5v2zM19 9h-4V3H9v6H5l7 7 7-7z"},child:[]}]})(t)}function hr(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 3a9 9 0 0 0-9 9v7c0 1.1.9 2 2 2h4v-8H5v-1c0-3.87 3.13-7 7-7s7 3.13 7 7v1h-4v8h4c1.1 0 2-.9 2-2v-7a9 9 0 0 0-9-9z"},child:[]}]})(t)}function Ta(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(t)}function Ia(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(t)}function za(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"},child:[]}]})(t)}function Wa(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"},child:[]}]})(t)}function pr(t){return V({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3
1-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"},child:[]}]})(t)}function dn(t){return V({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M80 299.3V512H196V299.3h86.5l18-97.8H196V166.9c0-51.7 20.3-71.5 72.7-71.5c16.3 0 29.4 .4 37 1.2V7.9C291.4 4 256.4 0 236.2 0C129.3 0 80 50.5 80 159.4v42.1H14v97.8H80z"},child:[]}]})(t)}function _t(t){return V({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"},child:[]}]})(t)}function hn(t){return V({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"},child:[]}]})(t)}function st(t){return V({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M437.332 80H74.668C51.199 80 32 99.198 32 122.667v266.666C32 412.802 51.199 432 74.668 432h362.664C460.801 432 480 412.802 480 389.333V122.667C480 99.198 460.801 80 437.332 80zM432 170.667L256 288 80 170.667V128l176 117.333L432 128v42.667z"},child:[]}]})(t)}function Ma({labels:t,chapterTitle:r,playing:u,time:o,duration:c,speed:s,onToggle:g,onSeekRelative:b,onSeekTo:S,onCycleSpeed:P,onPrevChapter:w,onNextChapter:T,canPrevChapter:l,canNextChapter:v,onExpand:E,onHide:L,continuePlay:m,onToggleContinuePlay:C,containerWidth:M}){const q=M?{left:"50%",right:"auto",transform:"translateX(-50%)",width:`min(${M}px, calc(100vw - 24px))`,borderTopLeftRadius:14,borderTopRightRadius:14}:void 0,ae=oe=>{if(!Number.isFinite(oe)||oe<0)return"0:00";const Ze=Math.floor(oe/60),Fe=Math.floor(oe%60);return`${Ze}:${Fe.toString().padStart(2,"0")}`},be=Math.max(0,c-o);return e.createElement("div",{className:"audio-minibar",style:q,onClick:E,onKeyDown:oe=>{(oe.key==="Enter"||oe.key===" ")&&(oe.preventDefault(),E())},role:"button",tabIndex:0,"aria-label":t.openPlayer},e.createElement("div",{className:"audio-minibar-title",title:r||t.untitledChapter},r||t.untitledChapter),e.createElement("div",{className:"audio-minibar-controls",onClick:oe=>oe.stopPropagation()},e.createElement("button",{className:"audio-minibar-btn",onClick:()=>w?.(),"aria-label":t.previousChapter,title:t.previousChapter,disabled:!l},e.createElement(Aa,{size:18})),e.createElement("button",{className:"audio-minibar-btn",onClick:()=>b(-15),"aria-label":t.back15Seconds,title:t.back15Seconds},e.createElement("span",{className:"audio-minibar-icon-wrap"},e.createElement(Ca,{size:18}),e.createElement("span",{className:"audio-minibar-icon-badge"},"5"))),e.createElement("button",{className:"audio-minibar-btn",onClick:g,"aria-label":t.playPause,title:u?t.pause:t.play},u?e.createElement(wa,{size:18}):e.createElement(zr,{size:18})),e.createElement("button",{className:"audio-minibar-btn",onClick:()=>b(15),"aria-label":t.forward15Seconds,title:t.forward15Seconds},e.createElement("span",{className:"audio-minibar-icon-wrap"},e.createElement(ya,{size:18}),e.createElement("span",{className:"audio-minibar-icon-badge"},"5"))),e.createElement("button",{className:"audio-minibar-btn",onClick:()=>T?.(),"aria-label":t.nextChapter,title:t.nextChapter,disabled:!v},e.createElement(Sa,{size:18})),e.createElement("button",{className:"audio-minibar-btn audio-minibar-btn-speed",onClick:P,"aria-label":t.changeSpeed,title:t.changeSpeed},e.createElement(Pa,{size:18}),e.createElement("span",{className:"audio-minibar-speed-chip","aria-hidden":"true"},`${s}x`)),C?e.createElement("button",{className:`audio-minibar-btn audio-minibar-btn-toggle${m?" is-active":""}`,onClick:C,"aria-label":t.continuePlay,title:t.continuePlay},e.createElement(va,{size:18})):null,L?e.createElement("button",{className:"audio-minibar-btn audio-minibar-btn-hide",onClick:L,"aria-label":t.hidePlayer,title:t.hidePlayer},e.createElement(Ia,{size:20})):null),e.createElement("div",{className:"audio-minibar-progress",onClick:oe=>{if(oe.stopPropagation(),!c)return;const Fe=oe.currentTarget.getBoundingClientRect(),Oe=oe.clientX-Fe.left,ht=Math.max(0,Math.min(1,Oe/Fe.width));S(c*ht)},role:"progressbar","aria-label":t.audioProgress,"aria-valuemin":0,"aria-valuemax":Math.max(0,Math.floor(c)),"aria-valuenow":Math.max(0,Math.floor(o))},e.createElement("div",{className:"audio-minibar-progress-fill",style:{width:`${c?o/c*100:0}%`}})),e.createElement("div",{className:"audio-minibar-time-row",onClick:oe=>oe.stopPropagation()},e.createElement("span",{className:"audio-minibar-time"},ae(o)),e.createElement("span",{className:"audio-minibar-time"},"-",ae(be)," ",t.left)))}const Se={"The Great Controversy - Ellen G. White 2":"English","El Conflicto de los Siglos - Ellen G. White":"Spanish","Der grosse Kampf - Ellen G. White":"German","Il gran conflitto - Ellen G. White":"Italian","De Grote Strijd - Ellen G. White":"Dutch","MOD EN BEDRE FREMTID - Ellen G. White":"Danish","Mot historiens klimaks - Ellen G. White":"Norwegian","O Grande Conflito - Ellen G. White":"Portuguese","O Le Finauga Tele - Ellen G. White":"Samoan","Suur Voitlus - Ellen G. White":"Estonian","Tragedia veacurilor - Ellen G. White":"Romanian","VELIKA BORBA IZMEDU KRISTA I SOTONE - Ellen G. White":"Hrvatski","VIeLIKATA BORBA MIeZhDU KhRISTA i SATANA - Ellen G. White":"Bulgarian","Velke drama veku - Ellen G. White":"Slovak","Velky spor vekov - Ellen G. White":"Czech","Vielika borot'ba - Ellen G. White":"Ukrainian","Vielikaia bor'ba - Ellen G. White":"Russian","Wielki boj - Ellen G. White":"Polish","alSra` al`Zym - Ellen G. White":"Arabic","Amharic - Ellen G. White":"Amharic","Chinese - Ellen G. White":"Chinese","Japanese - Ellen G. White":"Japanese","Korean - Ellen G. White":"Korean","Serbian - Ellen G. White":"Serbian","Farsi - Ellen G. White":"Farsi","Afrikaans - Ellen G. White":"Afrikaans","Hindi - Ellen G. White":"Hindi","Bengali - Ellen G. White":"Bengali","Indonesian - Ellen G. White":"Indonesian","Kontroversi Besar - Ellen G. White":"Malay","Urdu - Ellen G. White":"Urdu","French - Ellen G. White":"French","Beteja e Madhe - Ellen G. White":"Albanian","A nagy küzdelem - Ellen G. White":"Hungarian","Η Μεγάλη Διαμάχη - Ellen G. White":"Greek"},Na={loadingAudio:"Loading audio…",untitledChapter:"Untitled Chapter",source:"Source",copied:"Copied",copyUrl:"Copy URL",minimizePlayer:"Minimize player",previousChapter:"Previous chapter",rewind15:"Rewind 15",playPause:"Play/Pause",forward15:"Forward 15",nextChapter:"Next chapter",left:"left",audioBy:"Audio by",openPlayer:"Open player",back15Seconds:"Back 15 seconds",forward15Seconds:"Forward 15 seconds",changeSpeed:"Change speed",audioProgress:"Audio progress",play:"Play",pause:"Pause",hidePlayer:"Hide player",continuePlay:"Continue play"},Ra={es:{loadingAudio:"Cargando audio…",untitledChapter:"Capítulo sin título",source:"Fuente",copied:"Copiado",copyUrl:"Copiar URL",minimizePlayer:"Minimizar reproductor",previousChapter:"Capítulo anterior",rewind15:"Retroceder 15",playPause:"Reproducir/Pausar",forward15:"Adelantar 15",nextChapter:"Capítulo siguiente",left:"restante",audioBy:"Audio por",openPlayer:"Abrir reproductor",back15Seconds:"Retroceder 15 segundos",forward15Seconds:"Adelantar 15 segundos",changeSpeed:"Cambiar velocidad",audioProgress:"Progreso de audio",play:"Reproducir",pause:"Pausar",continuePlay:"Reproducción continua"},de:{loadingAudio:"Audio wird geladen…",untitledChapter:"Kapitel ohne Titel",source:"Quelle",copied:"Kopiert",copyUrl:"URL kopieren",minimizePlayer:"Player minimieren",previousChapter:"Vorheriges Kapitel",rewind15:"15 zurück",playPause:"Wiedergabe/Pause",forward15:"15 vor",nextChapter:"Nächstes Kapitel",left:"übrig",audioBy:"Audio von",openPlayer:"Player öffnen",back15Seconds:"15 Sekunden zurück",forward15Seconds:"15 Sekunden vor",changeSpeed:"Geschwindigkeit ändern",audioProgress:"Audio-Fortschritt",play:"Wiedergabe",pause:"Pause",continuePlay:"Kontinuierliche Wiedergabe"},it:{loadingAudio:"Caricamento audio…",untitledChapter:"Capitolo senza titolo",source:"Fonte",copied:"Copiato",copyUrl:"Copia URL",minimizePlayer:"Riduci lettore",previousChapter:"Capitolo precedente",rewind15:"Indietro 15",playPause:"Riproduci/Pausa",forward15:"Avanti 15",nextChapter:"Capitolo successivo",left:"r
1imanenti",audioBy:"Audio di",openPlayer:"Apri lettore",back15Seconds:"Indietro di 15 secondi",forward15Seconds:"Avanti di 15 secondi",changeSpeed:"Cambia velocità",audioProgress:"Progresso audio",play:"Riproduci",pause:"Pausa",continuePlay:"Riproduzione continua"},pt:{loadingAudio:"Carregando áudio…",untitledChapter:"Capítulo sem título",source:"Fonte",copied:"Copiado",copyUrl:"Copiar URL",minimizePlayer:"Minimizar player",previousChapter:"Capítulo anterior",rewind15:"Voltar 15",playPause:"Reproduzir/Pausar",forward15:"Avançar 15",nextChapter:"Próximo capítulo",left:"restantes",audioBy:"Áudio por",openPlayer:"Abrir player",back15Seconds:"Voltar 15 segundos",forward15Seconds:"Avançar 15 segundos",changeSpeed:"Alterar velocidade",audioProgress:"Progresso do áudio",play:"Reproduzir",pause:"Pausar",continuePlay:"Reprodução contínua"},fr:{loadingAudio:"Chargement audio…",untitledChapter:"Chapitre sans titre",source:"Source",copied:"Copié",copyUrl:"Copier l’URL",minimizePlayer:"Réduire le lecteur",previousChapter:"Chapitre précédent",rewind15:"Reculer 15",playPause:"Lecture/Pause",forward15:"Avancer 15",nextChapter:"Chapitre suivant",left:"restantes",audioBy:"Audio par",openPlayer:"Ouvrir le lecteur",back15Seconds:"Reculer de 15 secondes",forward15Seconds:"Avancer de 15 secondes",changeSpeed:"Changer la vitesse",audioProgress:"Progression audio",play:"Lecture",pause:"Pause",continuePlay:"Lecture continue"},ar:{loadingAudio:"جارٍ تحميل الصوت…",untitledChapter:"فصل بدون عنوان",source:"المصدر",copied:"تم النسخ",copyUrl:"نسخ الرابط",minimizePlayer:"تصغير المشغل",previousChapter:"الفصل السابق",rewind15:"رجوع 15",playPause:"تشغيل/إيقاف",forward15:"تقديم 15",nextChapter:"الفصل التالي",left:"متبقي",audioBy:"الصوت بواسطة",openPlayer:"فتح المشغل",back15Seconds:"رجوع 15 ثانية",forward15Seconds:"تقديم 15 ثانية",changeSpeed:"تغيير السرعة",audioProgress:"تقدم الصوت",play:"تشغيل",pause:"إيقاف",continuePlay:"تشغيل مستمر"},zh:{loadingAudio:"正在加载音频…",untitledChapter:"未命名章节",source:"来源",copied:"已复制",copyUrl:"复制链接",minimizePlayer:"最小化播放器",previousChapter:"上一章",rewind15:"后退15秒",playPause:"播放/暂停",forward15:"前进15秒",nextChapter:"下一章",left:"剩余",audioBy:"音频来源",openPlayer:"打开播放器",back15Seconds:"后退15秒",forward15Seconds:"前进15秒",changeSpeed:"调整速度",audioProgress:"音频进度",play:"播放",pause:"暂停"},ko:{loadingAudio:"오디오 로딩 중…",untitledChapter:"제목 없는 장",source:"출처",copied:"복사됨",copyUrl:"URL 복사",minimizePlayer:"플레이어 최소화",previousChapter:"이전 장",rewind15:"15초 뒤로",playPause:"재생/일시정지",forward15:"15초 앞으로",nextChapter:"다음 장",left:"남음",audioBy:"오디오 제공",openPlayer:"플레이어 열기",back15Seconds:"15초 뒤로",forward15Seconds:"15초 앞으로",changeSpeed:"속도 변경",audioProgress:"오디오 진행",play:"재생",pause:"일시정지"},ja:{loadingAudio:"音声を読み込み中…",untitledChapter:"無題の章",source:"ソース",copied:"コピーしました",copyUrl:"URLをコピー",minimizePlayer:"プレーヤーを最小化",previousChapter:"前の章",rewind15:"15秒戻す",playPause:"再生/一時停止",forward15:"15秒進む",nextChapter:"次の章",left:"残り",audioBy:"音声提供",openPlayer:"プレーヤーを開く",back15Seconds:"15秒戻す",forward15Seconds:"15秒進む",changeSpeed:"速度変更",audioProgress:"音声の進行",play:"再生",pause:"一時停止"},ru:{loadingAudio:"Загрузка аудио…",untitledChapter:"Глава без названия",source:"Источник",copied:"Скопировано",copyUrl:"Копировать URL",minimizePlayer:"Свернуть плеер",previousChapter:"Предыдущая глава",rewind15:"Назад 15",playPause:"Воспроизвести/Пауза",forward15:"Вперёд 15",nextChapter:"Следующая глава",left:"осталось",audio
1By:"Аудио от",openPlayer:"Открыть плеер",back15Seconds:"Назад на 15 секунд",forward15Seconds:"Вперёд на 15 секунд",changeSpeed:"Изменить скорость",audioProgress:"Прогресс аудио",play:"Воспроизвести",pause:"Пауза"},uk:{loadingAudio:"Завантаження аудіо…",untitledChapter:"Розділ без назви",source:"Джерело",copied:"Скопійовано",copyUrl:"Копіювати URL",minimizePlayer:"Згорнути плеєр",previousChapter:"Попередній розділ",rewind15:"Назад 15",playPause:"Відтворити/Пауза",forward15:"Вперед 15",nextChapter:"Наступний розділ",left:"залишилось",audioBy:"Аудіо від",openPlayer:"Відкрити плеєр",back15Seconds:"Назад на 15 секунд",forward15Seconds:"Вперед на 15 секунд",changeSpeed:"Змінити швидкість",audioProgress:"Прогрес аудіо",play:"Відтворити",pause:"Пауза"},pl:{loadingAudio:"Ładowanie audio…",untitledChapter:"Rozdział bez tytułu",source:"Źródło",copied:"Skopiowano",copyUrl:"Kopiuj URL",minimizePlayer:"Zminimalizuj odtwarzacz",previousChapter:"Poprzedni rozdział",rewind15:"Cofnij 15",playPause:"Odtwórz/Pauza",forward15:"Przewiń 15",nextChapter:"Następny rozdział",left:"pozostało",audioBy:"Audio od",openPlayer:"Otwórz odtwarzacz",back15Seconds:"Cofnij 15 sekund",forward15Seconds:"Przewiń 15 sekund",changeSpeed:"Zmień prędkość",audioProgress:"Postęp audio",play:"Odtwórz",pause:"Pauza"},da:{loadingAudio:"Indlæser lyd…",untitledChapter:"Kapitel uden titel",source:"Kilde",copied:"Kopieret",copyUrl:"Kopiér URL",minimizePlayer:"Minimer afspiller",previousChapter:"Forrige kapitel",rewind15:"Tilbage 15",playPause:"Afspil/Pause",forward15:"Frem 15",nextChapter:"Næste kapitel",left:"tilbage",audioBy:"Lyd af",openPlayer:"Åbn afspiller",back15Seconds:"Tilbage 15 sekunder",forward15Seconds:"Frem 15 sekunder",changeSpeed:"Skift hastighed",audioProgress:"Lydfremdrift",play:"Afspil",pause:"Pause",hidePlayer:"Skjul afspiller",continuePlay:"Fortsæt afspilning"},no:{loadingAudio:"Laster lyd…",untitledChapter:"Kapittel uten tittel",source:"Kilde",copied:"Kopiert",copyUrl:"Kopier URL",minimizePlayer:"Minimer spiller",previousChapter:"Forrige kapittel",rewind15:"Tilbake 15",playPause:"Spill av/Pause",forward15:"Frem 15",nextChapter:"Neste kapittel",left:"igjen",audioBy:"Lyd av",openPlayer:"Åpne spiller",back15Seconds:"Tilbake 15 sekunder",forward15Seconds:"Frem 15 sekunder",changeSpeed:"Endre hastighet",audioProgress:"Lydfremdrift",play:"Spill av",pause:"Pause",hidePlayer:"Skjul spiller",continuePlay:"Fortsett avspilling"},sm:{loadingAudio:"O loʼo uta leo…",untitledChapter:"Mataupu e leai se ulutala",source:"Punaoa",copied:"Ua kopi",copyUrl:"Kopi URL",minimizePlayer:"Faʼaitiiti le player",previousChapter:"Mataupu muamua",rewind15:"Toe 15",playPause:"Ta/Pau",forward15:"Luma 15",nextChapter:"Mataupu sosoʻo",left:"o totoe",audioBy:"Leo e",openPlayer:"Tatala player",back15Seconds:"Toe 15 sekone",forward15Seconds:"Luma 15 sekone",changeSpeed:"Sui saoasaoa",audioProgress:"Alualu i luma leo",play:"Ta",pause:"Pau",hidePlayer:"Natia player",continuePlay:"Faʻaauau ta"},et:{loadingAudio:"Heli laadimine…",untitledChapter:"Pealkirjata peatükk",source:"Allikas",copied:"Kopeeritud",copyUrl:"Kopeeri URL",minimizePlayer:"Minimeeri mängija",previousChapter:"Eelmine peatükk",rewind15:"Tagasi 15",playPause:"Esita/Paus",forward15:"Edasi 15",nextChapter:"Järgmine peatükk",left:"jäänud",audioBy:"Audio autor",openPlayer:"Ava mängija",back15Seconds:"Tagasi 15 sekundit",forward15Seconds:"Edasi 15 sekundit",changeSpeed:"Muuda kiirust",audioProgress:"Heli edenemine",play:"Esita",pause:"Paus",hidePlayer:"Peida mängija",continuePlay:"Jätka esitust"},ro:{loadingAudio:"Se încarcă audio…",untitledChapter:"Capitol fără titlu",source:"Sursă",copied:"Copiat",copyUrl:"Copiază URL",minimizePlayer:"Minimizează playerul",previousChapter:"Capitolul anterior",rewind15:"Înapoi 15",playPause:"Redare/Pauză",forward15:"Înainte 15",nextChapter:"Capitolul următor",left:"rămas",audio
1By:"Audio de",openPlayer:"Deschide playerul",back15Seconds:"Înapoi 15 secunde",forward15Seconds:"Înainte 15 secunde",changeSpeed:"Schimbă viteza",audioProgress:"Progres audio",play:"Redare",pause:"Pauză",hidePlayer:"Ascunde playerul",continuePlay:"Redare continuă"},hr:{loadingAudio:"Učitavanje zvuka…",untitledChapter:"Poglavlje bez naslova",source:"Izvor",copied:"Kopirano",copyUrl:"Kopiraj URL",minimizePlayer:"Minimiziraj reproduktor",previousChapter:"Prethodno poglavlje",rewind15:"Natrag 15",playPause:"Reproduciraj/Pauza",forward15:"Naprijed 15",nextChapter:"Sljedeće poglavlje",left:"preostalo",audioBy:"Audio od",openPlayer:"Otvori reproduktor",back15Seconds:"Natrag 15 sekundi",forward15Seconds:"Naprijed 15 sekundi",changeSpeed:"Promijeni brzinu",audioProgress:"Napredak zvuka",play:"Reproduciraj",pause:"Pauza",hidePlayer:"Sakrij reproduktor",continuePlay:"Nastavi reprodukciju"},bg:{loadingAudio:"Зареждане на аудио…",untitledChapter:"Глава без заглавие",source:"Източник",copied:"Копирано",copyUrl:"Копирай URL",minimizePlayer:"Минимизирай плейъра",previousChapter:"Предишна глава",rewind15:"Назад 15",playPause:"Пуск/Пауза",forward15:"Напред 15",nextChapter:"Следваща глава",left:"остава",audioBy:"Аудио от",openPlayer:"Отвори плейъра",back15Seconds:"Назад 15 секунди",forward15Seconds:"Напред 15 секунди",changeSpeed:"Смени скоростта",audioProgress:"Прогрес на аудио",play:"Пусни",pause:"Пауза",hidePlayer:"Скрий плейъра",continuePlay:"Непрекъснато възпроизвеждане"},sk:{loadingAudio:"Načítava sa audio…",untitledChapter:"Kapitola bez názvu",source:"Zdroj",copied:"Skopírované",copyUrl:"Kopírovať URL",minimizePlayer:"Minimalizovať prehrávač",previousChapter:"Predchádzajúca kapitola",rewind15:"Späť 15",playPause:"Prehrať/Pauza",forward15:"Dopredu 15",nextChapter:"Ďalšia kapitola",left:"zostáva",audioBy:"Audio od",openPlayer:"Otvoriť prehrávač",back15Seconds:"Späť o 15 sekúnd",forward15Seconds:"Dopredu o 15 sekúnd",changeSpeed:"Zmeniť rýchlosť",audioProgress:"Priebeh audia",play:"Prehrať",pause:"Pauza",hidePlayer:"Skryť prehrávač",continuePlay:"Pokračovať v prehrávaní"},cs:{loadingAudio:"Načítání audia…",untitledChapter:"Kapitola bez názvu",source:"Zdroj",copied:"Zkopírováno",copyUrl:"Kopírovat URL",minimizePlayer:"Minimalizovat přehrávač",previousChapter:"Předchozí kapitola",rewind15:"Zpět 15",playPause:"Přehrát/Pauza",forward15:"Vpřed 15",nextChapter:"Další kapitola",left:"zbývá",audioBy:"Audio od",openPlayer:"Otevřít přehrávač",back15Seconds:"Zpět o 15 sekund",forward15Seconds:"Vpřed o 15 sekund",changeSpeed:"Změnit rychlost",audioProgress:"Průběh audia",play:"Přehrát",pause:"Pauza",hidePlayer:"Skrýt přehrávač",continuePlay:"Pokračovat v přehrávání"},fa:{loadingAudio:"در حال بارگذاری صوت…",untitledChapter:"فصل بدون عنوان",source:"منبع",copied:"کپی شد",copyUrl:"کپی URL",minimizePlayer:"کوچک کردن پخش‌کننده",previousChapter:"فصل قبلی",rewind15:"۱۵ ثانیه عقب",playPause:"پخش/توقف",forward15:"۱۵ ثانیه جلو",nextChapter:"فصل بعدی",left:"باقی‌مانده",audioBy:"صوت توسط",openPlayer:"باز کردن پخش‌کننده",back15Seconds:"۱۵ ثانیه عقب",forward15Seconds:"۱۵ ثانیه جلو",changeSpeed:"تغییر سرعت",audioProgress:"پیشرفت صوت",play:"پخش",pause:"توقف",hidePlayer:"پنهان کردن پخش‌کننده",continuePlay:"پخش پیوسته"},af:{loadingAudio:"Laai oudio…",untitledChapter:"Hoofstuk sonder titel",source:"Bron",copied:"Gekopieer",copyUrl:"Kopieer URL",minimizePlayer:"Minimaliseer speler",previousChapter:"Vorige hoofstuk",rewind15:"Terug 15",playPause:"Speel/Pouse",forward15:"Vorentoe 15",nextChapter:"Volgende hoofstuk",left:"oor",audioBy:"Oudio deur",openPlayer:"Open speler",back15Seconds:"Terug 15 sekondes",forward15Seconds:"Vorentoe 15 sekondes",changeSpeed:"Verander spoed",audioProgress:"Oudio-vordering",play:"Speel",pause:"Pouse",hidePlayer:"Versteek speler",continuePlay:"Gaan voort met speel"},sr:{loadingAudio:"Учитавање аудио записа…",untitledChapter:"Поглавље без наслова",source:"Извор",copied:"Копирано",copyUrl:"Копирај URL",minimizePlayer:"Умањи плејер",previousChapter:"Претходно поглавље",rewind15:"Назад 15",playPause:"Пусти/Пауза",forward15:"Напред 15",nextChapter:"Следеће поглавље",left:"преостало",audioBy:"Аудио од",openPlayer:"Отвори плејер",back15Seconds:"Назад 15 секунди",forward15Seconds:"Напред 15 секунди",changeSpeed:"Промени брзину",audioProgress:"Напредак аудио записа",play:"Пусти",pause:"Пауза",hidePlayer:"Сакриј плејер",continuePlay:"Настави репродукцију"},sl:{loadingAudio:"Nalaganje zvoka…",untitledChapter:"Poglavje brez naslova",source:"Vir",copied:"Kopirano",copyUrl:"Kopiraj URL",minimizePlayer:"Pomanjšaj predvajalnik",previousChapter:"Prejšnje poglavje",rewind15:"Nazaj 15",playPause:"Predvajaj/Pavza",forward15:"Naprej 15",nextChapter:"Naslednje poglavje",left:"preostalo",audio
1By:"Zvok od",openPlayer:"Odpri predvajalnik",back15Seconds:"Nazaj 15 sekund",forward15Seconds:"Naprej 15 sekund",changeSpeed:"Spremeni hitrost",audioProgress:"Napredek zvoka",play:"Predvajaj",pause:"Pavza",hidePlayer:"Skrij predvajalnik",continuePlay:"Nadaljuj predvajanje"},am:{loadingAudio:"ድምፅ በመጫን ላይ…",untitledChapter:"ርዕስ የሌለው ምዕራፍ",source:"ምንጭ",copied:"ተቀድቷል",copyUrl:"URL ቅዳ",minimizePlayer:"አጫዋቹን አነስ",previousChapter:"ያለፈው ምዕራፍ",rewind15:"15 ተመለስ",playPause:"አጫውት/አቁም",forward15:"15 ወደፊት",nextChapter:"ቀጣይ ምዕራፍ",left:"ቀሪ",audioBy:"ድምፅ በ",openPlayer:"አጫዋች ክፈት",back15Seconds:"15 ሰከንድ ተመለስ",forward15Seconds:"15 ሰከንድ ወደፊት",changeSpeed:"ፍጥነት ቀይር",audioProgress:"የድምፅ ሂደት",play:"አጫውት",pause:"አቁም",hidePlayer:"አጫዋቹን ደብቅ",continuePlay:"ቀጥል አጫውት"},tr:{},hi:{loadingAudio:"ऑडियो लोड हो रहा है…",untitledChapter:"बिना शीर्षक अध्याय",source:"स्रोत",copied:"कॉपी किया गया",copyUrl:"URL कॉपी करें",minimizePlayer:"प्लेयर छोटा करें",previousChapter:"पिछला अध्याय",rewind15:"15 सेकंड पीछे",playPause:"चलाएँ/रोकें",forward15:"15 सेकंड आगे",nextChapter:"अगला अध्याय",left:"शेष",audioBy:"ऑडियो द्वारा",openPlayer:"प्लेयर खोलें",back15Seconds:"15 सेकंड पीछे",forward15Seconds:"15 सेकंड आगे",changeSpeed:"गति बदलें",audioProgress:"ऑडियो प्रगति",play:"चलाएँ",pause:"रोकें"},bn:{loadingAudio:"অডিও লোড হচ্ছে…",untitledChapter:"শিরোনামহীন অধ্যায়",source:"উৎস",copied:"কপি হয়েছে",copyUrl:"URL কপি করুন",minimizePlayer:"প্লেয়ার মিনিমাইজ করুন",previousChapter:"পূর্ববর্তী অধ্যায়",rewind15:"১৫ সেকেন্ড পিছনে",playPause:"চালান/থামান",forward15:"১৫ সেকেন্ড সামনে",nextChapter:"পরবর্তী অধ্যায়",left:"বাকি",audioBy:"অডিও",openPlayer:"প্লেয়ার খুলুন",back15Seconds:"১৫ সেকেন্ড পিছনে",forward15Seconds:"১৫ সেকেন্ড সামনে",changeSpeed:"গতি পরিবর্তন",audioProgress:"অডিও অগ্রগতি",play:"চালান",pause:"থামান"},id:{loadingAudio:"Memuat audio…",untitledChapter:"Bab tanpa judul",source:"Sumber",copied:"Disalin",copyUrl:"Salin URL",minimizePlayer:"Minimalkan pemutar",previousChapter:"Bab sebelumnya",rewind15:"Mundur 15",playPause:"Putar/Jeda",forward15:"Maju 15",nextChapter:"Bab berikutnya",left:"tersisa",audioBy:"Audio oleh",openPlayer:"Buka pemutar",back15Seconds:"Mundur 15 detik",forward15Seconds:"Maju 15 detik",changeSpeed:"Ubah kecepatan",audioProgress:"Progres audio",play:"Putar",pause:"Jeda"},ur:{loadingAudio:"آڈیو لوڈ ہو رہا ہے…",untitledChapter:"بلا عنوان باب",source:"ذریعہ",copied:"کاپی ہو گیا",copyUrl:"URL کاپی کریں",minimizePlayer:"پلیئر منیمائز کریں",previousChapter:"پچھلا باب",rewind15:"15 پیچھے",playPause:"چلائیں/روکیں",forward15:"15 آگے",nextChapter:"اگلا باب",left:"باقی",audioBy:"آڈیو از",openPlayer:"پلیئر کھولیں",back15Seconds:"15 سیکنڈ پیچھے",forward15Seconds:"15 سیکنڈ آگے",changeSpeed:"رفتار بدلیں",audioProgress:"آڈیو پیش رفت",play:"چلائیں",pause:"روکیں"},sq:{loadingAudio:"Duke ngarkuar audion…",untitledChapter:"Kapitull pa titull",source:"Burimi",copied:"U kopjua",copyUrl:"Kopjo URL",minimizePlayer:"Minimizo player-in",previousChapter:"Kapitulli i mëparshëm",rewind15:"Mbrapa 15",playPause:"Luaj/Pusho",forward15:"Përpara 15",nextChapter:"Kapitulli tjetër",left:"mbetur",audioBy:"Audio nga",openPlayer:"Hap player-in",back15Seconds:"Mbrapa 15 sekonda",forward15Seconds:"Përpara 15 sekonda",changeSpeed:"Ndrysho shpejtësinë",audioProgress:"Progresi i audios",play:"Luaj",pause:"Pusho"}},Ga={en:{hidePlayer:"Hide player",continuePlay:"Continue play"},es:{hidePlayer:"Ocultar reproductor",continuePlay:"Reproducción continua"},de:{hidePlayer:"Player ausblenden",continuePlay:"Kontinuierliche Wiedergabe"},it:{hidePlayer:"Nascondi lettore",continuePlay:"Riproduzione continua"},da:{hidePlayer:"Skjul afspiller",continuePlay:"Fortsæt afspilning"},no:{hidePlayer:"Skjul spiller",continuePlay:"Fortsett avspilling"},pt:{hidePlayer:"Ocultar player",continuePlay:"Reprodução contínua"},sm:{hidePlayer:"Natia player",continuePlay:"Faʻaauau ta"},et:{hidePlayer:"Peida mängija",continuePlay:"Jätka esitust"},ro:{hidePlayer:"Ascunde playerul",continuePlay:"Redare continuă"}
1,hr:{hidePlayer:"Sakrij reproduktor",continuePlay:"Nastavi reprodukciju"},bg:{hidePlayer:"Скрий плейъра",continuePlay:"Непрекъснато възпроизвеждане"},sk:{hidePlayer:"Skryť prehrávač",continuePlay:"Pokračovať v prehrávaní"},cs:{hidePlayer:"Skrýt přehrávač",continuePlay:"Pokračovat v přehrávání"},uk:{hidePlayer:"Сховати плеєр",continuePlay:"Безперервне відтворення"},ru:{hidePlayer:"Скрыть плеер",continuePlay:"Непрерывное воспроизведение"},pl:{hidePlayer:"Ukryj odtwarzacz",continuePlay:"Odtwarzanie ciągłe"},ar:{hidePlayer:"إخفاء المشغل",continuePlay:"تشغيل مستمر"},am:{hidePlayer:"አጫዋቹን ደብቅ",continuePlay:"ቀጥል አጫውት"},zh:{hidePlayer:"隐藏播放器",continuePlay:"连续播放"},ko:{hidePlayer:"플레이어 숨기기",continuePlay:"연속 재생"},ja:{hidePlayer:"プレーヤーを非表示",continuePlay:"連続再生"},sr:{hidePlayer:"Сакриј плејер",continuePlay:"Настави репродукцију"},fa:{hidePlayer:"پنهان کردن پخش‌کننده",continuePlay:"پخش پیوسته"},af:{hidePlayer:"Versteek speler",continuePlay:"Gaan voort met speel"},hi:{hidePlayer:"प्लेयर छिपाएँ",continuePlay:"लगातार चलाएँ"},bn:{hidePlayer:"প্লেয়ার লুকান",continuePlay:"অবিরাম চালান"},id:{hidePlayer:"Sembunyikan pemutar",continuePlay:"Lanjutkan pemutaran"},ur:{hidePlayer:"پلیئر چھپائیں",continuePlay:"مسلسل چلائیں"},fr:{hidePlayer:"Masquer le lecteur",continuePlay:"Lecture continue"},sq:{hidePlayer:"Fshihe player-in",continuePlay:"Vazhdo riprodhimin"},sl:{hidePlayer:"Skrij predvajalnik",continuePlay:"Nadaljuj predvajanje"}},$a="The Great Controversy - Ellen G. White 2",mr="/book-content/audio-manifests/gc-english.json",Oa="/book-content/audio-manifests/gc-multilang.json",Ha="/book-content/audio-manifests/gc-multilang-extra.json",Ba=new Set(["Der grosse Kampf - Ellen G. White"]),Da="https://ellenwhiteaudio.org/audio",En={"The Great Controversy - Ellen G. White 2":{languageCodes:["en"],bookCodes:["gc"]},"El Conflicto de los Siglos - Ellen G. White":{languageCodes:["sp","es"],bookCodes:["gc","cs"],sourcePageUrl:"https://ellenwhiteaudio.org/sp/el-conflicto-de-los-siglos-nueva-narracion/"},"Der grosse Kampf - Ellen G. White":{languageCodes:["de"],bookCodes:["gc","gk"]},"Il gran conflitto - Ellen G. White":{languageCodes:["it"],bookCodes:["gc"],sourcePageUrl:"https://ellenwhiteaudio.org/it/il-gran-conflitto/"},"MOD EN BEDRE FREMTID - Ellen G. White":{languageCodes:["da"],bookCodes:["gc","mbf"]},"Mot historiens klimaks - Ellen G. White":{languageCodes:["no","nb"],bookCodes:["gc","mhk"],sourcePageUrl:"https://ellenwhiteaudio.org/no/mot-historiens-klimaks-ai/"},"O Grande Conflito - Ellen G. White":{languageCodes:["pt"],bookCodes:["gc"],sourcePageUrl:"https://ellenwhiteaudio.org/pt/grande-conflito/"},"O Le Finauga Tele - Ellen G. White":{languageCodes:["sm"],bookCodes:["gc","ft"]},"Suur Voitlus - Ellen G. White":{languageCodes:["et"],bookCodes:["gc","sv"]},"Tragedia veacurilor - Ellen G. White":{languageCodes:["ro"],bookCodes:["gc","tv"]},"VELIKA BORBA IZMEDU KRISTA I SOTONE - Ellen G. White":{languageCodes:["hr"],bookCodes:["gc","vb"]},"VIeLIKATA BORBA MIeZhDU KhRISTA i SATANA - Ellen G. White":{languageCodes:["bg"],bookCodes:["gc","bc"]},"Velke drama veku - Ellen G. White":{languageCodes:["sk"],bookCodes:["gc","vdv","vsv"],sourcePageUrl:"https://ellenwhiteaudio.org/sk/velky-spor-vekov-ai/"},"Velky spor vekov - Ellen G. White":{languageCodes:["cs"],bookCodes:["gc","vsv","vdv"]},"Vielika borot'ba - Ellen G. White":{languageCodes:["uk"],bookCodes:["gc","vb","вб"]},"Vielikaia bor'ba - Ellen G. White":{languageCodes:["ru"],bookCodes:["gc","vb","вб"],sourcePageUrl:"https://ellenwhiteaudio.org/ru/%d0%b2%d0%b5%d0%bb%d0%b8%d0%ba%d0%b0%d1%8f-%d0%b1%d0%be%d1%80%d1%8c%d0%b1%d0%b0/"},"Wielki boj - Ellen G. White":{languageCodes:["pl"],bookCodes:["gc","wb"]},"alSra` al`Zym - Ellen G. White":{languageCodes:["ar"],bookCodes:["gc"],sourcePageUrl:"https://ellenwhiteaudio.org/ar/ai-%d8%a7%d9%84%d8%b5%d8%b1%d8%a7%d8%b9-%d8%a7%d9%84%d8%b9%d8%b8%d9%8a%d9%85/"},"Amharic - Ellen G. White":{languageCodes:["am"],bookCodes:["gc"]},"Chinese - Ellen G. White":{languageCodes:["cn","zh"],bookCodes:["gc"],sourcePageUrl:"https://ellenwhiteaudio.org/cn/%e5%96%84%e6%81%b6%e4%b9%8b%e4%ba%89/"},"Japanese - Ellen G. White":{languageCodes:["ja"],bookCodes:["gc"]},"Korean - Ellen G. White":{languageCodes:["kr","ko"],bookCodes:["gc"]},"Serbian - Ellen G. White":{languageCodes:["sr","rs"],bookCodes:["gc","vb"],sourcePageUrl:"https://ellenwhiteaudio.org/sr/velika-borba/"},"Farsi - Ellen G. White":{languageCodes:["fa"],bookCodes:["gc"]},"Afrikaans - Ellen G. White":{languageCodes:["af"],bookCodes:["gc"]},"Hindi - Ellen G. White":{languageCodes:["hi"],bookCodes:["gc"]},"Bengali - Ellen G. White":{languageCodes:["bn"],bookCodes:["gc"]},"Indonesian - Ellen G. White":{languageCodes:["id"],bookCodes:["gc"]},"Urdu - Ellen G. White":{languageCodes:["ur"],bookCodes:["gc"]},"French - Ellen G. White":{languageCodes:["fr"],bookCodes:["gc"],sourcePageUrl:"https://ellenwhiteaudio.org/fr/la-tragedie-des-siecles/"},"Beteja e Madhe - Ellen G. White":{languageCodes:["sq"],bookCodes:["gc","bz"]},"Veliki boj med Kristusom in Satanom - Ellen G. White":{languageCodes:["sl"],bookCodes:["gc","vb"],sourcePageUrl:"https://ellenwhiteaudio.org/sl/veliki-boj-med-kristusom-in-satanom/"}},ja=new Set(["en","ar","sr","de","sp","fr","pt","cn","it","no","ru","sl","sk"]),fr=new Set(Object.entries(En).filter(([,t])=>t.languageCodes.some(r=>ja.has(r.trim().toLowerCase()))).map(([t])=>t));function kn(t){try{return decodeURIComponent(t)}catch{return t}}function pn(t){const r=kn(t).replace(/[_]+/g," ").trim(),u=r.match(/^[^\d]{0,8}(\d{1,3})(?:\D|$)/);if(u)return Number(u[1]);const o=r.match(/(?:^|\D)(\d{1,3})(?:\D|$)/);return o?Number(o[1]):Number.MAX_SAFE_INTEGER}function Vt(t,r){if(!t.length)return null;const u=t.find(s=>
1s.order===r);if(u)return u;const o=t.find(s=>s.order===r+1);if(o)return o;const c=[...t].sort((s,g)=>s.order===g.order?s.name.localeCompare(g.name):s.order-g.order);return r>=0&&r<c.length?c[r]:null}function Ua(t,r,u){if(!t)return null;for(const o of r){const c=t[o];if(!c?.length)continue;const s=c.find(S=>S.chapterIdx===u);if(s?.url)return s;const g=c.map(S=>({order:S.chapterIdx,name:S.code||S.title||String(S.chapterIdx),url:S.url})),b=Vt(g,u);if(b?.url)return{chapterIdx:b.order,title:b.name,url:b.url}}return null}function gr(t){if(!isFinite(t)||t<=0)return"0:00";const r=Math.floor(t/60),u=Math.floor(t%60).toString().padStart(2,"0");return`${r}:${u}`}const mn=[.75,1,1.25,1.5,2];function _a({lang:t,chapterIdx:r,chapterTitle:u,onNextChapter:o,onPrevChapter:c,canNextChapter:s=!0,canPrevChapter:g=!0,minimized:b,autoPlayRequest:S=0,onPlayingChange:P,onExpand:w,onMinimize:T,onHide:l,continuePlay:v=!1,onToggleContinuePlay:E,containerWidth:L}){const m=h.useRef(null),[C,M]=h.useState(null),[q,ae]=h.useState(!1),[be,oe]=h.useState(0),[Ze,Fe]=h.useState(0),[Oe,ht]=h.useState(()=>Number(localStorage.getItem("audio-speed")||"1")),[et,Pt]=h.useState(()=>Number(localStorage.getItem("audio-volume")||"1")),[Xt,Ke]=h.useState(null),[p,ze]=h.useState(!0),[O,xe]=h.useState(null),[tt,me]=h.useState(null),[ue,nt]=h.useState(!1),ie=(En[t]?.languageCodes?.[0]||"").trim().toLowerCase(),fe=ie==="sp"?"es":ie==="cn"?"zh":ie==="kr"?"ko":ie==="nb"?"no":ie,X={...Na,...Ra[fe]||{},...Ga[fe]||{}};h.useEffect(()=>{let I=!0;const B=async J=>{const H=`/book-content/audio/${encodeURIComponent(J)}`;try{const se=await fetch(`${H}/index.json`);return se.ok?{list:await se.json(),base:H}:null}catch(se){return console.error("[AudioPlayer] Local audio index fetch failed",se),null}},te=async J=>{try{const H=await fetch(J);return H.ok?await H.json():null}catch{return null}},ne=async J=>{try{const H=await fetch(J);return H.ok?await H.json():null}catch{return null}},ye=async(J,H)=>{const se=`${Da}/${encodeURIComponent(J)}/${encodeURIComponent(H)}/`;try{const ce=await fetch(se);if(!ce.ok)return null;const Z=await ce.text(),We=new DOMParser().parseFromString(Z,"text/html"),ve=Array.from(We.querySelectorAll("a[href]")).map(re=>(re.getAttribute("href")||"").trim()).filter(re=>/\.mp3(?:$|\?)/i.test(re)).map(re=>{const D=new URL(re,se).toString(),U=kn(D.split("/").pop()||re);return{order:pn(U),name:U,url:D}}).filter((re,D,U)=>U.findIndex(Ce=>Ce.url===re.url)===D).sort((re,D)=>re.order===D.order?re.name.localeCompare(D.name):re.order-D.order);return ve.length?ve:null}catch{return null}},we=async J=>{try{const H=await fetch(J);if(!H.ok)return null;const se=await H.text(),ce=new DOMParser().parseFromString(se,"text/html"),Z=[],We=new Set,F=D=>{const U=(D||"").trim();if(!U||!/\.mp3(?:$|\?)/i.test(U))return;let Ce=U;try{Ce=new URL(U,J).toString()}catch{return}if(We.has(Ce))return;We.add(Ce);const he=kn(Ce.split("/").pop()||U);Z.push({order:pn(he),name:he,url:Ce})};return Array.from(ce.querySelectorAll("a[href]")).forEach(D=>F(D.getAttribute("href"))),Array.from(ce.querySelectorAll("*")).forEach(D=>{F(D.getAttribute("data-src")),F(D.getAttribute("data-audio")),F(D.getAttribute("data-mp3"))}),Z.length?Z.sort((D,U)=>D.order===U.order?D.name.localeCompare(U.name):D.order-U.order):null}catch{return null}},kt=(J,H)=>J===$a||(H||"").toLowerCase()==="english"?mr:null,Ee=async(J,H)=>{for(const se of J){const ce=(se||"").trim();if(!ce)continue;const Z=await B(ce);if(!Z?.list?.length)continue;const We=String(H+1).padStart(2,"0"),F=Z.list.find(D=>D.startsWith(`GC-${We}-`)||D.startsWith(`GC-${We}`));if(F)return{url:`${Z.base}/${encodeURIComponent(F)}`,languageName:ce};const ve=Z.list.map(D=>({order:pn(D),name:D,url:`${Z.base}/${encodeURIComponent(D)}`})),re=Vt(ve,H);if(re?.url)return{url:re.url,languageName:ce}}return null},Yt=(J,H)=>J?.tracks?.length&&J.tracks.find(se=>se.chapterIdx===H)||null;return(async()=>{ze(!0),M(null),Ke(null),xe(null),me(null);const J=Se[t],H=J||t,se=[t,H,J].filter(Boolean);if(Ba.has(t)){const F=await Ee(se,r);if(I&&F?.url){M(F.url),Ke(J||H),me("local-index"),xe({name:"Amazing Recordings",url:"https://amazingrecordings.org/audio/horbuch_vom_schatten_zum_licht_von_ellen_g_white.html",licenseSummary:"Locally mirrored for offline playback."}),ze(!1);return}}const ce=kt(t,H);if(ce){const F=await te(ce),ve=Yt(F,r);if(I&&ve?.url){M(ve.url),Ke(F?.bookLanguageName||H),me("english-manifest"),xe({name:F?.source?.name||"EllenWhiteAudio.org",url:F?.source?.url||"https://ellenwhiteaudio.org/great-controversy/",licenseSummary:F?.source?.licenseSummary}),ze(!1);return}}const Z=En[t];if(Z){const F=[...new Set(Z.languageCodes.map(he=>
1he.trim().toLowerCase()).filter(Boolean))],ve=[...new Set(Z.bookCodes.map(he=>he.trim().toLowerCase()).filter(Boolean))],[re,D]=await Promise.all([ne(Oa),ne(Ha)]),U={...re||{},...D||{}},Ce=Ua(U,F,r);if(I&&Ce?.url){M(Ce.url),Ke(H),me("multilang-manifest"),xe({name:"EllenWhiteAudio.org",url:Z.sourcePageUrl||`https://ellenwhiteaudio.org/${F[0]==="en"?"":F[0]}`,licenseSummary:"Used with attribution for non-commercial educational and ministry use."}),ze(!1);return}for(const he of F)for(const bt of ve){const Nt=await ye(he,bt),xt=Vt(Nt||[],r);if(I&&xt){M(xt.url),Ke(H),me("remote-directory"),xe({name:"EllenWhiteAudio.org",url:Z.sourcePageUrl||`https://ellenwhiteaudio.org/${he==="en"?"":he}`,licenseSummary:"Used with attribution for non-commercial educational and ministry use."}),ze(!1);return}}if(Z.sourcePageUrl){const he=await we(Z.sourcePageUrl),bt=Vt(he||[],r);if(I&&bt){M(bt.url),Ke(H),me("source-page"),xe({name:"EllenWhiteAudio.org",url:Z.sourcePageUrl,licenseSummary:"Used with attribution for non-commercial educational and ministry use."}),ze(!1);return}}}if(!I)return;const We=await Ee(se,r);We?.url?(Ke(J||H),M(We.url),me("local-index")):(Ke(null),M(null),me(null)),ze(!1)})(),()=>{I=!1}},[t,r]),h.useEffect(()=>{try{localStorage.setItem("audio-speed",String(Oe))}catch{}m.current&&(m.current.playbackRate=Oe)},[Oe]),h.useEffect(()=>{try{localStorage.setItem("audio-volume",String(et))}catch{}m.current&&(m.current.volume=et)},[et]),h.useEffect(()=>{const I=m.current;if(!I)return;const B=()=>{ae(!0),P?.(!0)},te=()=>{ae(!1),P?.(!1)},ne=()=>Fe(I.currentTime||0),ye=()=>oe(I.duration||0),we=()=>{ae(!1),P?.(!1),v&&o&&o(!0)},kt=Ee=>{console.error("[AudioPlayer] Event: error",Ee)};return I.addEventListener("play",B),I.addEventListener("pause",te),I.addEventListener("timeupdate",ne),I.addEventListener("loadedmetadata",ye),I.addEventListener("ended",we),I.addEventListener("error",kt),()=>{I.removeEventListener("play",B),I.removeEventListener("pause",te),I.removeEventListener("timeupdate",ne),I.removeEventListener("loadedmetadata",ye),I.removeEventListener("ended",we),I.removeEventListener("error",kt)}},[C,o,P,v]),h.useEffect(()=>{if(!C)return;const B=`audio-pos:${Se[t]||t}:${r}`,te=m.current,ne=()=>{try{const we=Number(localStorage.getItem(B)||"0");te&&isFinite(we)&&we>2&&we<(te.duration||1/0)&&(te.currentTime=we)}catch(we){console.error("[AudioPlayer] Error restoring position",we)}},ye=()=>{ne()};return te?.addEventListener("loadedmetadata",ye),ne(),()=>{te?.removeEventListener("loadedmetadata",ye)}},[C,t,r]),h.useEffect(()=>{const I=m.current;if(!I||!C)return;let B=null;const te=()=>{if(I.currentTime>0&&I.duration>0){const ye=`audio-pos:${Se[t]||t}:${r}`;try{localStorage.setItem(ye,String(I.currentTime||0))}catch{}}};return B=window.setInterval(te,3e3),()=>{B&&window.clearInterval(B)}},[C,t,r]),h.useEffect(()=>{if(!S||!C)return;const I=m.current;if(!I)return;const B=async()=>{try{await I.play()}catch(ne){console.error("[AudioPlayer] Autoplay request failed:",ne)}};if(I.readyState>=2){B();return}const te=()=>{B()};return I.addEventListener("canplay",te,{once:!0}),()=>{I.removeEventListener("canplay",te)}},[S,C]);const R=async()=>{const I=m.current;if(I)try{I.paused?await I.play():I.pause()}catch(B){console.error("[AudioPlayer] Error in toggle play/pause:",B)}},Y=I=>{const B=m.current;B&&(B.currentTime=I)},ge=I=>{const B=m.current;if(!B)return;const te=(B.currentTime||0)+I,ne=Number.isFinite(B.duration)&&B.duration>0?B.duration:Number.MAX_SAFE_INTEGER;B.currentTime=Math.max(0,Math.min(ne,te))},rt=()=>{ht(I=>{const B=mn.findIndex(ne=>Math.abs(ne-I)<.001),te=B>=0?(B+1)%mn.length:1;return mn[te]})};h.useEffect(()=>{if(!ue)return;const I=window.setTimeout(()=>nt(!1),1400);return()=>window.clearTimeout(I)},[ue]);const pt=Xt||Se[t]||t,at=Math.max(0,be-Ze);return tt&&tt.split("-").map(I=>I.charAt(0).toUpperCase()+I.slice(1)).join(" · "),p?e.createElement("div",{className:"audio-player modern-audio-player audio-unavailable"},e.createElement("div",{className:"audio-unavailable-text"},X.loadingAudio)):C?e.createElement(e.Fragment,null,e.createElement("audio",{ref:m,src:C,preload:"metadata"}),b?e.createElement(Ma,{labels:X,chapterTitle:u,playing:q,time:Ze,duration:be,speed:Oe,onToggle:R,onSeekRelative:ge,onSeekTo:Y,onCycleSpeed:rt,onPrevChapter:()=>c?.(q),onNextChapter:()=>o?.(q),canPrevChapter:g,canNextChapter:s,onExpand:w||(()=>{}),onHide:l,continuePlay:v,onToggleContinuePlay:E,containerWidth:L}):e.createElement("div",{className:"audio-player modern-audio-player"},e.createElement("div",{className:"audio-info"},e.createElement("div",{className:"audio-chapter"},e.createElement("span",{className:"audio-chapter-title"},u||X.untitledChapter),e.createElement("span",{className:"audio-chapter-lang"},pt),null),e.createElement("div",{className:"audio-top-actions"},T&&e.createElement("button",{className:"audio-minimize-btn",onClick:T,"aria-label":X.minimizePlayer,title:X.minimizePlayer},"─"))),e.createElement("div",{className:"audio-controls"},e.createElement("button",{className:"audio-btn audio-btn-secondary",onClick:()=>c?.(q),"aria-label":X.previousChapter,title:X.previousChapter,disabled:!c},e.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("path",{d:"M19 20L9 12l10-8v16z"}),e.createElement("path",{d:"M5 19V5"}))),e.createElement("button",{className:"audio-btn audio-rewind",onClick:()=>Y(Math.max(0,(m.current?.currentTime||0)-15)),"aria-label":X.rewind15,title:X.rewind15},e.createElement("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("path",{d:"M11 19l-9-7 9-7v14zM22 19l-9-7 9-7v14z"}))),e.createElement("button",{className:"audio-btn audio-play",onClick:R,"aria-label":X.playPause,title:q?X.pause:X.play},q?e.createElement("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"
1currentColor"},e.createElement("path",{d:"M6 19h4V5H6v14zm8-14v14h4V5h-4z"})):e.createElement("svg",{width:"28",height:"28",viewBox:"0 0 24 24",fill:"currentColor"},e.createElement("path",{d:"M8 5v14l11-7z"}))),e.createElement("button",{className:"audio-btn audio-forward",onClick:()=>Y(Math.min(m.current?.duration||0,(m.current?.currentTime||0)+15)),"aria-label":X.forward15,title:X.forward15},e.createElement("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("path",{d:"M13 5l9 7-9 7V5zM2 5l9 7-9 7V5z"}))),e.createElement("button",{className:"audio-btn audio-btn-secondary",onClick:()=>o?.(q),"aria-label":X.nextChapter,title:X.nextChapter,disabled:!o},e.createElement("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("path",{d:"M5 4l10 8-10 8V4z"}),e.createElement("path",{d:"M19 5v14"})))),e.createElement("div",{className:"audio-timeline-block"},e.createElement("div",{className:"audio-timeline",onClick:I=>{const te=I.currentTarget.getBoundingClientRect(),ye=(I.clientX-te.left)/te.width;Y((m.current?.duration||0)*ye)}},e.createElement("div",{className:"audio-progress",style:{width:`${(be?Ze/be:0)*100}%`}})),e.createElement("div",{className:"audio-times audio-times-by-timeline"},e.createElement("span",null,gr(Ze)),e.createElement("span",null,"-",gr(at)," ",X.left))),e.createElement("div",{className:"audio-settings"},e.createElement("label",{className:"audio-label"},e.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("circle",{cx:"12",cy:"12",r:"10"}),e.createElement("path",{d:"M12 6v6l4 2"})),e.createElement("select",{value:String(Oe),onChange:I=>ht(Number(I.target.value))},e.createElement("option",{value:"0.75"},"0.75x"),e.createElement("option",{value:"1"},"1x"),e.createElement("option",{value:"1.25"},"1.25x"),e.createElement("option",{value:"1.5"},"1.5x"),e.createElement("option",{value:"2"},"2x"))),e.createElement("label",{className:"audio-label"},e.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5"}),e.createElement("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"})),e.createElement("input",{type:"range",min:0,max:1,step:.01,value:String(et),onChange:I=>Pt(Number(I.target.value))})),C&&e.createElement("a",{className:"audio-download",href:C,download:!0,target:"_blank",rel:"noreferrer"},e.createElement("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),e.createElement("polyline",{points:"7 10 12 15 17 10"}),e.createElement("line",{x1:"12",y1:"15",x2:"12",y2:"3"}))),E?e.createElement("button",{type:"button",className:`audio-download${v?" is-active":""}`,onClick:E,"aria-label":X.continuePlay,title:X.continuePlay},X.continuePlay):null),O&&e.createElement("div",{className:"audio-attribution"},X.audioBy," ",e.createElement("a",{href:O.url,target:"_blank",rel:"noreferrer"},O.name),O.licenseSummary?e.createElement("span",null," · ",O.licenseSummary):null))):null}const Va=e.memo(function({loading:r,isDesktop:u,pageWidth:o,textSize:c,displayedHtml:s,contentRef:g,copyrightText:b,lang:S,chapterIdx:P}){const w=Wr(S);if(r)return e.createElement("main",{className:"reader-main"},e.createElement("div",null,"Loading…"));const T={width:u?`${o}px`:"100%",fontSize:`${c}px`,position:"relative"};return e.createElement("main",{className:"reader-main"},e.createElement("div",{className:"reader-wrapper",style:T},e.createElement("div",{className:"reader-content-layout"},e.createElement("div",{className:"reader-book-content"},e.createElement("div",{ref:g,className:"reader-book-html",dangerouslySetInnerHTML:{__html:s}}))),e.createElement("footer",{className:"reader-footer"},e.createElement("div",{className:"reader-footer-inner"},b," · ",e.createElement("a",{href:"https://github.com/apopovski",target:"_blank",rel:"noreferrer",style:{color:"inherit",textDecoration:"underline"}},w)))))},(t,r)=>t.loading===r.loading&&t.isDesktop===r.isDesktop&&t.pageWidth===r.pageWidth&&t.textSize===r.textSize&&t.dis
1playedHtml===r.displayedHtml&&t.contentRef===r.contentRef&&t.copyrightText===r.copyrightText),Be="Amharic - Ellen G. White",Fa="/book-content/txt/Amharic.rtf",Ie="Chinese - Ellen G. White",Ka="/book-content/txt/GC-Chinese.txt",De="Korean - Ellen G. White",qa="/book-content/html/GC Koren.txt",Ne="Japanese - Ellen G. White",Za="/book-content/html/Japanese.txt",Re="Serbian - Ellen G. White",Xa="/book-content/txt/GC-Serbian.txt",Ae="Farsi - Ellen G. White",Ya="/book-content/txt/GC-Farsi.txt",je="Afrikaans - Ellen G. White",Ja="/book-content/txt/GC-Afrikaans.txt",Ge="Hindi - Ellen G. White",Qa="/book-content/txt/GC-Hindi.txt",$e="Bengali - Ellen G. White",eo="/book-content/txt/GC-Bengali.txt",Ue="Indonesian - Ellen G. White",to="/book-content/txt/GC-Indonesian.txt",_e="Kontroversi Besar - Ellen G. White",no="/book-content/txt/GC-Indonesian.txt",Ve="De Grote Strijd - Ellen G. White",Pe="Urdu - Ellen G. White",ro="/book-content/txt/GC-Urdu.txt",ct="French - Ellen G. White",ao="Wielki boj - Ellen G. White",Qe="Beteja e Madhe - Ellen G. White",oo="/book-content/txt/GC-Albanian.txt",ut="A nagy küzdelem - Ellen G. White",dt="Η Μεγάλη Διαμάχη - Ellen G. White",Er="[email protected]",kr="[email protected]",io="https://donate.stripe.com/4gM4gt6Vqb1s4w4e7Kd3i00",lo="19562447002",so={"Der grosse Kampf - Ellen G. White":"4915753992703"},co={"Der grosse Kampf - Ellen G. White":"+49 157 53992703"},uo="https://github.com/apopovski",br={en:"Developed by",es:"Desarrollado por",de:"Entwickelt von",it:"Sviluppato da",nl:"Ontwikkeld door",da:"Udviklet af",no:"Utviklet av",pt:"Desenvolvido por",sm:"AtiaÊ»e e",et:"Arendaja",ro:"Dezvoltat de",hr:"Razvio",bg:"Разработено от",sk:"Vyvinul",cs:"Vyvinul",uk:"Розроблено",ru:"Разработано",pl:"Opracowane przez",ar:"تطوير",am:"የተገነባው በ",zh:"开发者",ko:"개발",ja:"開発",sr:"Развио",fa:"توسعه توسط",af:"Ontwikkel deur",hi:"द्वारा विकसित",bn:"ডেভেলপ করেছেন",id:"Dikembangkan oleh",ms:"Dibangunkan oleh",ur:"تیار کردہ از",fr:"Développé par",sq:"Zhvilluar nga",hu:"Fejlesztette",el:"Ανάπτυξη από"},ho="Aleksandar Popovski",po={"The Great Controversy - Ellen G. White 2":"Contact on WhatsApp","El Conflicto de los Siglos - Ellen G. White":"Contactar por WhatsApp","Der grosse Kampf - Ellen G. White":"Kontakt per WhatsApp","Il gran conflitto - Ellen G. White":"Contatta su WhatsApp",[Ve]:"Contact via WhatsApp","MOD EN BEDRE FREMTID - Ellen G. White":"Kontakt pÃ¥ WhatsApp","Mot historiens klimaks - Ellen G. White":"Kontakt pÃ¥ WhatsApp","O Grande Conflito - Ellen G. White":"Contato no WhatsApp","O Le Finauga Tele - Ellen G. White":"Contact on WhatsApp","Suur Voitlus - Ellen G. White":"Võta ühendust WhatsAppis","Tragedia veacurilor - Ellen G. White":"Contact pe WhatsApp","VELIKA BORBA IZMEDU KRISTA I SOTONE - Ellen G. White":"Kontakt na WhatsAppu","VIeLIKATA BORBA MIeZhDU KhRISTA i SATANA - Ellen G. White":"Контакт в WhatsApp","Velke drama veku - Ellen G. White":"Kontakt na WhatsApp","Velky spor vekov - Ellen G. White":"Kontakt na WhatsApp","Vielika borot'ba - Ellen G. White":"Зв’язатися у WhatsApp","Vielikaia bor'ba - Ellen G. White":"Связаться в WhatsApp","Wielki boj - Ellen G. White":"Kontakt przez WhatsApp","alSra` al`Zym - Ellen G. White":"تواصل عبر واتساب",[Be]:"በWhatsApp ያግኙን",[Ie]:"通过 WhatsApp 联系",[De]:"WhatsApp으로 문의",[Ne]:"WhatsAppで連絡",[Re]:"Kontaktirajte preko WhatsApp-а",[Ae]:"ارتباط از طریق واتساپ",[je]:"Kontak op WhatsApp",[Ge]:"WhatsApp पर संपर्क करें",[$e]:"WhatsApp-এ যোগাযোগ করুন",[Ue]:"Hubungi lewat WhatsApp",[_e]:"Hubungi di WhatsApp",[Pe]:"واٹس ایپ پر رابطہ کریں",[ct]:"Contact sur WhatsApp",[Qe]:"Kontakto në WhatsApp",[ut]:"Kapcsolat WhatsAppon",[dt]:"Επικοινωνία στο WhatsApp"},St=640,Ft=820,mo=680,fo=760;function go(t){const r=Math.round(t*.67);return Math.max(mo,Math.min(fo,r))}function yr(t,r){const u=Math.max(St,Math.min(Ft,r)),o=Math.round(t*.48),c=Math.max(St,Math.min(Math.max(St,u-120),o)),g=Math.max(0,u-c)/2.5,b=Math.max(c,Math.min(u,c+Math.round(g)));return{small:c,medium:b,wide:u}}const At=["The Great Controversy - Ellen G. White 2","El Conflicto de los Siglos - Ellen G. White","Der grosse Kampf - Ellen G. White","Il gran conflitto - Ellen G. White",Ve,"MOD EN BEDRE FREMTID - Ellen G. White","Mot historiens klimaks - Ellen G. White","O Grande Conflito - Ellen G. White","O Le Finauga Tele - Ellen G. White","Suur Voitlus - Ellen G. White","Tragedia veacurilor - Ellen G. White","VELIKA BORBA IZMEDU KRISTA I SOTONE - Ellen G. White","VIeLIKATA BORBA MIeZhDU KhRISTA i SATANA - Ellen G. White","Velke drama veku - Ellen G. White","Velky spor vekov - Ellen G. White","Vielika borot'ba - Ellen G. White","Vielikaia bor'ba - Ellen G. White","Wielki boj - Ellen G. White","alSra` al`Zym - Ellen G. White",Be,Ie,De,Ne,Re,Ae,je,Ge,$e,Ue,_e,Pe,ct,Qe,ut,dt],Te={"The Great Controversy - Ellen G. White 2":"en","El Conflicto de los Siglos - Ellen G. White":"es","Der grosse Kampf - Ellen G. White":"de","Il gran conflitto - Ellen G. White":"it",[Ve]:"nl","MOD EN BEDRE FREMTID - Ellen G. White":"da","Mot historiens klimaks - Ellen G. White":"no","O Grande Conflito - Ellen G. White":"pt","O Le Finauga Tele - Ellen G. White":"sm","Suur Voitlus - Ellen G. White":"et","Tragedia veacurilor - Ellen G. White":"ro","VELIKA BORBA IZMEDU KRISTA I SOTONE - Ellen G. White":"hr","VIeLIKATA BORBA MIeZhDU KhRISTA i SATANA - Ellen G. White":"bg","Velke drama veku - Ellen G. White":"sk","Velky spor vekov - Ellen G. White":"cs","Vielika borot'ba - Ellen G. White":"uk","Vielikaia bor'ba - Ellen G. White":"ru","Wielki boj - Ellen G. White":"pl","alSra` al`Zym - Ellen G. White":"ar",[Be]:"am",[Ie]:"zh",[De]:"ko",[Ne]:"ja",[Re]:"sr",[Ae]:"fa",[je]:"af",[Ge]:"hi",[$e]:"bn",[Ue]:"id",[_e]:"ms",[Pe]:"ur",[ct]:"fr",[Qe]:"sq",[ut]:"hu",[dt]:"el"},wr={en:"Hi, I would like to connect.",es:"Hola, me gustaría conectar.",de:"Hallo, ich möchte gerne Kontakt aufnehmen.",it:"Ciao, vorrei mettermi in contatto.",nl:"Hallo, ik wil graag contact opnemen.",da:"Hej, jeg vil gerne komme i kontakt.",no:"Hei, jeg vil gjerne ta kontakt.",pt:"Olá, gostaria de entrar em contato.",sm:"Talofa, ou te fia fesootaÊ»i.",et:"Tere, sooviksin ühendust võtta.",ro:"Bună, aș dori să iau legătura.",hr:"Bok, želio bih stupiti u kontakt.",bg:"Здравейте, бих искал да се свържа.",sk:"Ahoj, rád by som sa spojil.",cs:"Ahoj, rád bych se spojil.",uk:"Привіт, я хотів(ла) б звʼязатися.",ru:"Здравствуйте, я хотел(а) бы связаться.",pl:"Cześć, chciałbym/chciałabym się skontaktować.",ar:"مرحبًا، أود التواصل.",am:"ሰላም፣ መገናኘት እፈልጋለሁ።",zh:"你好,我想联系你。",ko:"안녕하세요, 연락하고 싶습니다.",ja:"こんにちは、連絡を取りたいです。",sr:"Здраво, желео/желела бих да ступим у контакт.",fa:"سلام، مایلم ارتباط برقرار کنم.",af:"Hallo, ek wil graag kontak maak.",hi:"नमस्ते, मैं संपर्क करना चाहता/चाहती हूँ।",bn:"হ্যালো, আমি যোগাযোগ করতে চাই।",id:"Halo, saya ingin terhubung.",ms:"Hai, saya ingin berhubung.",ur:"ہیلو، میں رابطہ کرنا چاہتا/چاہتی ہوں۔",fr:"Bonjour, je souhaite entrer en contact.",sq:"Përshëndetje, do të doja të lidhesha.",hu:"Szia, szeretnék kapcsolatba lépni.",el:"Γεια σας, θα ήθελα να επικοινωνήσω."},Eo={"The Great Controversy - Ellen G. White 2":"The Great Controversy","El Conflicto de los Siglos - Ellen G. White":"El Conflicto de los Siglos","Der grosse Kampf - Ellen G. White":"Der große Kampf","Il gran conflitto - Ellen G. White":"Il gran conflitto",[Ve]:"De Grote Strijd","MOD EN BEDRE FREMTID - Ellen G. White":"Mod en bedre fremtid","Mot historiens klimaks - Ellen G. White":"Mot historiens klimaks","O Grande Conflito - Ellen G. White":"O Grande Conflito","O Le Finauga Tele - Ellen G. White":"O Le Finauga Tele","Suur Voitlus - Ellen G. White":"Suur Võitlus","Tragedia veacurilor - Ellen G. White":"Tragedia veacurilor","VELIKA BORBA IZMEDU KRISTA I SOTONE - Ellen G. White":"Velika borba između Krista i Sotone","VIeLIKATA BORBA MIeZhDU KhRISTA i SATANA - Ellen G. White":"Великата борба между Христос и Сатана","Velke drama veku - Ellen G. White":"Veľké drama vekov","Velky spor vekov - Ellen G. White":"Velký spor věků","Vielika borot'ba - Ellen G. White":"Велика боротьба","Vielikaia bor'ba - Ellen G. White":"Великая борьба","Wielki boj - Ellen G. White":"Wielki bój","alSra` al`Zym - Ellen G. White":"الصراع العظيم",[Be]:"ታላቁ ተጋድሎ",[Ie]:"善恶之争",[De]:"각 시대의 대쟁투",[Ne]:"各時代の大争闘",[Re]:"Велика борба између Христа и Сотоне",[Ae]:"نبرد عظیم",[je]:"Die Groot Stryd",[Ge]:"महान संघर्ष",[$e]:"মহা বিবাদ",[Ue]:"Kemenangan Akhir",[_e]:"Kontroversi Besar",[Pe]:"عظیم کشمکش",[ct]:"La Tragédie des Siècles",[Qe]:"Beteja e Madhe",[ut]:"A nagy küzdelem",[dt]:"Η Μεγάλη Διαμάχη"},vr={en:"Cosmic conflict between good and evil",es:"Conflicto cósmico entre el bien y el mal",de:"Kosmischer Konflikt zwischen Gut und Böse",it:"Conflitto cosmico tra il bene e il male",nl:"Kosmisch conflict tussen goed en kwaad",da:"Kosmisk konflikt mellem godt og ondt",no:"Kosmisk konflikt mellom godt og ondt",pt:"Conflito cósmico entre o bem e o mal",sm:"FeteÊ»enaÊ»iga faale-vateatea i le va o le lelei ma le leaga",et:"Kosmiline konflikt hea ja kurja vahel",ro:"Conflict cosmic între bine și rău",hr:"Kozmički sukob između dobra i zla",bg:"Космически конфликт между доброто и злото",sk:"Kozmický konflikt medzi dobrom a zlom",cs:"Kosmický konflikt mezi dobrem a zlem",uk:"Космічний конфлікт між добром і злом",ru:"Космический конфликт между добром и злом",pl:"Kosmiczny konflikt między dobrem a złem",ar:"صراع كوني بين الخير والشر",am:"በመልካምና በክፉ መካከል ያለ ኮስሚክ ግጭት",zh:"善与恶之间的宇宙冲突",ko:"선과 악 사이의 우주적 대쟁투",ja:"善と悪の間の
1宇宙的争闘",sr:"Космички сукоб између добра и зла",fa:"نبرد کیهانی میان خیر و شر",af:"Kosmiese konflik tussen goed en kwaad",hi:"अच्छाई और बुराई के बीच ब्रह्मांडीय संघर्ष",bn:"ভাল ও মন্দের মধ্যে মহাজাগতিক সংঘর্ষ",id:"Konflik kosmik antara yang baik dan yang jahat",ms:"Konflik kosmik antara yang baik dan yang jahat",ur:"نیکی اور بدی کے درمیان کائناتی کشمکش",fr:"Conflit cosmique entre le bien et le mal",sq:"Konflikt kozmik ndërmjet së mirës dhe së keqes",hu:"Kozmikus küzdelem a jó és a rossz között",el:"Κοσμική σύγκρουση ανάμεσα στο καλό και το κακό"},Je=t=>Eo[t]||(t||"").split(" - Ellen")[0].trim(),Mt={"The Great Controversy - Ellen G. White 2":"English","El Conflicto de los Siglos - Ellen G. White":"Español","Der grosse Kampf - Ellen G. White":"Deutsch","Il gran conflitto - Ellen G. White":"Italiano",[Ve]:"Nederlands","MOD EN BEDRE FREMTID - Ellen G. White":"Dansk","Mot historiens klimaks - Ellen G. White":"Norsk","O Grande Conflito - Ellen G. White":"Português","O Le Finauga Tele - Ellen G. White":"Gagana Samoa","Suur Voitlus - Ellen G. White":"Eesti","Tragedia veacurilor - Ellen G. White":"Română","VELIKA BORBA IZMEDU KRISTA I SOTONE - Ellen G. White":"Hrvatski","VIeLIKATA BORBA MIeZhDU KhRISTA i SATANA - Ellen G. White":"Български","Velke drama veku - Ellen G. White":"Slovenčina","Velky spor vekov - Ellen G. White":"ČeÅ¡tina","Vielika borot'ba - Ellen G. White":"Українська","Vielikaia bor'ba - Ellen G. White":"Русский","Wielki boj - Ellen G. White":"Polski","alSra` al`Zym - Ellen G. White":"العربية",[Be]:"አማርኛ",[Ie]:"中文",[De]:"한국어",[Ne]:"日本語",[Re]:"Српски",[Ae]:"فارسی",[je]:"Afrikaans",[Ge]:"हिन्दी",[$e]:"বাংলা",[Ue]:"Bahasa Indonesia",[_e]:"Bahasa Melayu",[Pe]:"اردو",[ct]:"Français",[Qe]:"Shqip",[ut]:"Magyar",[dt]:"Ελληνικά"};function ko(t){const r=(Se[t]||"").trim(),u=(Mt[t]||"").trim();return!r&&!u?t:r?!u||r.localeCompare(u,void 0,{sensitivity:"base"})===0?r:`${r} — ${u}`:u}const bn={"The Great Controversy - Ellen G. White 2":"Chapter","El Conflicto de los Siglos - Ellen G. White":"Capítulo","Der grosse Kampf - Ellen G. White":"Kapitel","Il gran conflitto - Ellen G. White":"Capitolo",[Ve]:"Hoofdstuk","MOD EN BEDRE FREMTID - Ellen G. White":"Kapitel","Mot historiens klimaks - Ellen G. White":"Kapittel","O Grande Conflito - Ellen G. White":"Capítulo","O Le Finauga Tele - Ellen G. White":"Mataupu","Suur Voitlus - Ellen G. White":"Peatükk","Tragedia veacurilor - Ellen G. White":"Capitol","VELIKA BORBA IZMEDU KRISTA I SOTONE - Ellen G. White":"Poglavlje","VIeLIKATA BORBA MIeZhDU KhRISTA i SATANA - Ellen G. White":"Glava","Velke drama veku - Ellen G. White":"Kapitola","Velky spor vekov - Ellen G. White":"Kapitola","Vielika borot'ba - Ellen G. White":"Rozdil","Vielikaia bor'ba - Ellen G. White":"Glava","Wielki boj - Ellen G. White":"Rozdział","alSra` al`Zym - Ellen G. White":"الفصل",[Be]:"ምዕራፍ",[Ie]:"ç« ",[De]:"장",[Ne]:"ç« ",[Re]:"Поглавље",[Ae]:"فصل",[je]:"Hoofstuk",[Ge]:"पाठ",[$e]:"অধ্যায়",[Ue]:"Bab",[_e]:"Bab",[Pe]:"باب",[ct]:"Chapitre",[Qe]:"Kapitulli",[ut]:"Fejezet",[dt]:"Κεφάλαιο"},bo={"The Great Controversy - Ellen G. White 2":"Contents","El Conflicto de los Siglos - Ellen G. White":"Contenido","Der grosse Kampf - Ellen G. White":"Inhalt","Il gran conflitto - Ellen G. White":"Indice",[Ve]:"Inhoud","MOD EN BEDRE FREMTID - Ellen G. White":"Indhold","Mot historiens klimaks - Ellen G. White":"Innhold","O Grande Conflito - Ellen G. White":"Conteúdo","O Le Finauga Tele - Ellen G. White":"Mataupu","Suur Voitlus - Ellen G. White":"Sisukord","Tragedia veacurilor - Ellen G. White":"Cuprins","VELIKA BORBA IZMEDU KRISTA I SOTONE - Ellen G. White":"Sadržaj","VIeLIKATA BORBA MIeZhDU KhRISTA i SATANA - Ellen G. White":"Съдържание","Velke drama veku - Ellen G. White":"Obsah","Velky spor vekov - Ellen G. White":"Obsah","Vielika borot'ba - Ellen G. White":"Зміст","Vielikaia bor'ba - Ellen G. White":"Содержание","Wielki boj - Ellen G. White":"Spis treści","alSra` al`Zym - Ellen G. White":"المحتويات",[Be]:"ይዘት",[Ie]:"目录",[De]:"목차",[Ne]:"目次",[Re]:"Садржај",[Ae]:"فهرست",[je]:"Inhoud",[Ge]:"विषय सूची",[$e]:"সূচিপত্র",[Ue]:"Daftar Isi",[_e]:"Kandungan",[Pe]:"فہرست",[ct]:"Sommaire",[Qe]:"Përmbajtja",[ut]:"Tartalomjegyzék",[dt]:"ΠεριεÏ
1‡ÏŒÎ¼ÎµÎ½Î±"},yo={"The Great Controversy - Ellen G. White 2":"Continue","El Conflicto de los Siglos - Ellen G. White":"Continuar","Der grosse Kampf - Ellen G. White":"Weiter","Il gran conflitto - Ellen G. White":"Continua",[Ve]:"Verder","MOD EN BEDRE FREMTID - Ellen G. White":"Fortsæt","Mot historiens klimaks - Ellen G. White":"Fortsett","O Grande Conflito - Ellen G. White":"Continuar","O Le Finauga Tele - Ellen G. White":"Fa‘aauau","Suur Voitlus - Ellen G. White":"Jätka","Tragedia veacurilor - Ellen G. White":"Continuă","VELIKA BORBA IZMEDU KRISTA I SOTONE - Ellen G. White":"Nastavi","VIeLIKATA BORBA MIeZhDU KhRISTA i SATANA - Ellen G. White":"Продължи","Velke drama veku - Ellen G. White":"PokračovaÅ¥","Velky spor vekov - Ellen G. White":"Pokračovat","Vielika borot'ba - Ellen G. White":"Продовжити","Vielikaia bor'ba - Ellen G. White":"Продолжить","Wielki boj - Ellen G. White":"Kontynuuj","alSra` al`Zym - Ellen G. White":"متابعة",[Be]:"ቀጥል",[Ie]:"ç»§ç»­",[De]:"계속",[Ne]:"続ける",[Re]:"Настави",[Ae]:"ادامه",[je]:"Gaan voort",[Ge]:"जारी रखें",[$e]:"চালিয়ে যান",[Ue]:"Lanjutkan",[_e]:"Teruskan",[Pe]:"جاری رکھیں",[ct]:"Continuer",[Qe]:"Vazhdo",[ut]:"Folytatás",[dt]:"Συνέχεια"},Cr={en:"Copied",es:"Copiado",de:"Kopiert",it:"Copiato",nl:"Gekopieerd",da:"Kopieret",no:"Kopiert",pt:"Copiado",sm:"Ua kopi",et:"Kopeeritud",ro:"Copiat",hr:"Kopirano",bg:"Копирано",sk:"Skopírované",cs:"Zkopírováno",uk:"Скопійовано",ru:"Скопировано",pl:"Skopiowano",ar:"تم النسخ",am:"ተቀድቷል",zh:"已复制",ko:"복사됨",ja:"コピーしました",sr:"Копирано",fa:"کپی شد",af:"Gekopieer",hi:"कॉपी किया गया",bn:"কপি হয়েছে",id:"Disalin",ur:"کاپی ہو گیا",fr:"Copié",sq:"U kopjua",hu:"Kimásolva",el:"Αντιγράφηκε"},Sr={en:"Audio available",es:"Audio disponible",de:"Audio verfügbar",it:"Audio disponibile",nl:"Audio beschikbaar",da:"Lyd tilgængelig",no:"Lyd tilgjengelig",pt:"Áudio disponível",sm:"E avanoa le leo",et:"Heli saadaval",ro:"Audio disponibil",hr:"Audio dostupan",bg:"Налично аудио",sk:"Dostupné audio",cs:"Dostupné audio",uk:"Доступне аудіо",ru:"Аудио доступно",pl:"Dostępne audio",ar:"الصوت متاح",am:"ድምጽ ይገኛል",zh:"有音频",ko:"오디오 사용 가능",ja:"音声あり",sr:"Аудио доступан",fa:"صوت در دسترس است",af:"Klank beskikbaar",hi:"ऑडियो उपलब्ध",bn:"অডিও উপলভ্য",id:"Audio tersedia",ur:"آڈیو دستیاب ہے",fr:"Audio disponible",sq:"Audio i disponuesh",hu:"Hanganyag elérhető",el:"Διαθέσιμο ηχητικό"};function Ar(t){const r=(Te[t]||"en").toLowerCase();return Sr[r]||Sr.en}function Wr(t){const r=(Te[t]||"en").toLowerCase();return`${br[r]||br.en} ${ho}`}function Mr(t){return so[t]||lo}function wo(t){return co[t]||`+${Mr(t)}`}function vo(t){const r=(Te[t]||"en").toLowerCase();return wr[r]||wr.en}const Pr={...Object.fromEntries(At.map(t=>[t,`© 2026 ${Je(t)}`]))};function zt(t){return t.replace(/[.*+?^${}()|[\\]\\]/g,"\\$&")}function Co(t){return(t||"").toLowerCase().normalize("NFKD").replace(/[\u0300-\u036f]/g,"").replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,80)}function yn(t){return(t||"").toLowerCase().normalize("NFKD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,80)}function Nr(t){const r={А:"A",а:"a",Б:"B",б:"b",В:"V",в:"v",Г:"G",г:"g",Д:"D",д:"d",Ђ:"Dj",ђ:"dj",Е:"E",е:"e",Ё:"E",ё:"e",Ж:"Zh",ж:"zh",З:"Z",з:"z",И:"I",и:"i",Й:"I",й:"i",Ј:"J",ј:"j",К:"K",к:"k",Л:"L",л:"l",Љ:"Lj",љ:"lj",М:"M",м:"m",Н:"N",н:"n",Њ:"Nj",њ:"nj",О:"O",о:"o",П:"P",п:"p",Р:"R",р:"r",С:"S",с:"s",Т:"T",т:"t",Ћ:"C",ћ:"c",У:"U",у:"u",Ф:"F",ф:"f",Ð¥:"H",х:"h",Ц:"C",ц:"c",Ч:"Ch",ч:"ch",Џ:"Dz",џ:"dz",Ш:"Sh",ш:"sh",Ы:"Y",ы:"y",Э:"E",э:"e",Ю:"Yu",ю:"yu",Я:"Ya",я:"ya",Ь:"",ь:"",Ъ:"",ъ:"a",І:"I",і:"i",Ї:"Yi",ї:"yi",Є:"Ye",є:"ye",Ґ:"G",ґ:"g"};return Array.from(t||"").map(u=>r[u]??u).join("")}function qe(t){const r=(t||"").trim(),u=r.match(/\bchapter\s+(\d+)\b/i);if(u&&u[1])return Number(u[1]);const o=r.match(/^(\d{1,3})\s*[—–-]/);return o&&o[1]?Number(o[1]):null}function Kt(t){return(t||"").replace(/^\s*chapter\s+\d+\s*[-—–:]*\s*/i,"").replace(/^\s*\d{1,3}\s*[—–:-]\s*/i,"").trim()}const So={sr:"poglavlje",ar:"alfasl",fa:"fasl",am:"meiraf",zh:"zhang",ko:"jang",ja:"sho",hi:"paath",bn:"oddhay",ur:"bab"};function Wt(t){const r=(Te[t]||"").toLowerCase(),u=So[r];if(u)return u;const o=(bn[t]||"Chapter").trim(),c=Nr(o);
1return yn(c)||Co(o)||"chapter"}function fn(t,r,u){const o=Wt(t),c=Kt(r),s=Nr(c||r||"").replace(new RegExp(`^\\s*${o}\\s+[ivxlcdm\\d]+\\s*[-—–:]*\\s*`,"i"),"").replace(/^\s*[ivxlcdm\d]+\s*[-—–:]+\s*/i,"").trim();return yn(s)||`${o}-${u}`}const Et=Object.fromEntries(At.flatMap(t=>{const r=Mt[t]||Se[t]||Je(t)||t,u=yn(r),o=(Te[t]||"").toLowerCase();return[u?[u,t]:null,o?[o,t]:null].filter(Boolean)}));Et.rs=Re;const Ao=Object.fromEntries(Object.entries(Te).map(([t,r])=>[String(r||"").toLowerCase(),t]));function Po(){const r=(window.location.pathname||"/").trim().match(/^\/([^/]+)/)?.[1]?.toLowerCase();if(r&&Et[r])return Et[r];const u=(Array.isArray(navigator.languages)&&navigator.languages.length?navigator.languages:[navigator.language]).map(o=>String(o||"").trim().toLowerCase()).filter(Boolean);for(const o of u){const c=o.split("-")[0],s=[o,c];(c==="nb"||c==="nn")&&s.push("no");for(const g of s){const b=Ao[g];if(b)return b}}return At[0]}function xo(t,r){if(!r)return t||"";try{const u=zt(r),o=new DOMParser().parseFromString(t||"","text/html");o.querySelectorAll('style, link[rel="stylesheet"]').forEach(g=>g.remove()),o.querySelectorAll("*").forEach(g=>{g.hasAttribute("style")&&g.removeAttribute("style"),g.hasAttribute("class")&&g.removeAttribute("class"),Array.from(g.attributes).forEach(b=>{b.name.startsWith("on")&&g.removeAttribute(b.name)})});const c=o.createTreeWalker(o.body,NodeFilter.SHOW_TEXT,null);let s=c.nextNode();for(;s;){const g=s,b=g.nodeValue||"",S=o.createDocumentFragment();let P=0;const w=new RegExp(u,"gi");let T;for(;(T=w.exec(b))!==null;){T.index>P&&S.appendChild(o.createTextNode(b.slice(P,T.index)));const l=o.createElement("mark");l.className="search-highlight",l.textContent=T[0],S.appendChild(l),P=T.index+T[0].length,w.lastIndex===T.index&&w.lastIndex++}P<b.length&&S.appendChild(o.createTextNode(b.slice(P))),S.childNodes.length&&g.parentNode?.replaceChild(S,g),s=c.nextNode()}return o.body.innerHTML}catch{return t||""}}function Lo(t,r){try{const u=new DOMParser().parseFromString(t||"","text/html");return u.querySelectorAll("p, blockquote").forEach((c,s)=>{c.id||(c.id=`gc-p-${r}-${s+1}`)}),u.body.innerHTML}catch{return t||""}}function xr(t){try{const r=new DOMParser().parseFromString(t||"","text/html"),u=r.querySelector('a[href*="text.egwwritings.org/read/"]');if(!u)return null;const o=(u.getAttribute("href")||"").trim();if(!o)return null;const c=(r.querySelector("h1,h2,h3")?.textContent||"").trim();return{href:o,title:c}}catch{return null}}function To(t,r,u){try{const o=new DOMParser().parseFromString(t||"","text/html");let c=(u||"").trim();c||(c=(o.querySelector("h1")?.textContent||"").trim()),c||(c=(o.querySelector("title")?.textContent||"").trim().split("|")[0]?.trim()||""),c||(c=r||"Kapitulli");const s=o.querySelector("#r-pl");if(!s)return"";const b=Array.from(s.querySelectorAll("p.para, blockquote")).map(S=>{const P=S.cloneNode(!0);P.querySelectorAll(".refCode, .anchor-link, .page-break").forEach(T=>T.remove());const w=(P.textContent||"").replace(/\s+/g," ").trim();return w?`<p>${K(w)}</p>`:""}).filter(Boolean);return b.length?`<div><h2 class="chapterhead">${K(c)}</h2>${b.join("")}</div>`:""}catch{return""}}function Io(t){if(!Array.isArray(t)||!t.length)return-1;const r=[/\bappendix\b/i,/\bappendice\b/i,/\banexo\b/i,/\bannex\b/i,/\banhang\b/i,/\bprilog\b/i,/\bдодаток\b/i,/\bприложение\b/i,/\b附录\b/i];return t.findIndex(o=>r.some(c=>c.test((o?.title||"").trim())))}function zo(t,r,u){try{const o=new DOMParser().parseFromString(t||"","text/html"),c=Array.from(o.querySelectorAll("p, blockquote")),s=/\b(appendix|appendice|appendixen|anexo|annex|anhang|prilog|додаток|приложение)\b|附录/iu;return c.forEach(g=>{const b=g.textContent||"";if(/\[\d{1,4}\]/.test(b)&&(g.innerHTML=(g.innerHTML||"").replace(/\s*\[(\d{1,4})\]/g,"")),!u&&r){const S=b.match(/\[(\d{1,4})\]/),P=/\([^)]*\)/.test(b)&&s.test(b);if(S&&S[1]&&P){const w=S[1],T=`${r}#app-page-${w}`;g.querySelector(`a[href="${T}"]`)||(g.innerHTML=(g.innerHTML||"").replace(/\(([^)]*)\)/u,(l,v)=>s.test(v)?`(${String(v).replace(s,L=>`<a href="${T}">${L}</a>`)})`:l))}}if(u){const S=(g.textContent||"").match(/\bpage\s+(\d{1,4})\b/i);if(S&&S[1]){const P=`app-page-${S[1]}`;if(!o.getElementById(P)){const w=o.createElement("span");w.id=P,w.setAttribute("aria-hidden","true"),g.prepend(w)}}}}),o.body.innerHTML}catch{return t||""}}function Wo(t,r,u,o){try{const c=Se[r]||"";if(c.toLowerCase()==="arabic"||c.toLowerCase()==="farsi"||c.toLowerCase()==="persian"||c.toLowerCase()==="urdu"||r===Ie||r===Ne||r===Ae||r===Ge||r===$e||r===Pe||typeof u!="number"||u<0)return t;const s=new DOMParser().parseFromString(t||"","text/html");s.querySelectorAll('style, link[rel="stylesheet"]').forEach(w=>w.remove()),s.querySelectorAll("*").forEach(w=>{if(w.hasAttribute("style")&&w.removeAttribute("style"),w.hasAttribute("class")){const T=(w.getAttribute("class")||"").split(/\s+/),l=w.tagName==="MARK"&&T.includes("search-highlight"),v=w.tagName==="SPAN"&&T.includes("dropcap");!l&&!v&&w.removeAttribute("class")}
1Array.from(w.attributes).forEach(T=>{T.name.startsWith("on")&&w.removeAttribute(T.name)})});let g=null;const b=s.body.querySelector("h1,h2,h3,h4,h5,h6");if(b){const w=(b.textContent||"").trim();if(/information\s+about.*book/i.test(w)||/^\s*introduction\b/i.test(w)||/\b(preface|foreword|appendix)\b/i.test(w))return t}if(Array.isArray(o)&&o[u]&&/^(?:\s*(?:preface|introduction|foreword|appendix)\b)/i.test((o[u].title||"").trim()))return t;if(b){let w=null;for(b.parentElement&&b.parentElement.classList.contains("chapter-heading")?w=b.parentElement.nextElementSibling:w=b.nextElementSibling;w;){if(w.classList&&w.classList.contains("chapter-heading")){w=w.nextElementSibling;continue}if(/^P$/i.test(w.tagName)||/^BLOCKQUOTE$/i.test(w.tagName)||w.tagName==="DIV"&&w.textContent&&w.textContent.trim().length){g=w;break}w=w.nextElementSibling}}if(g||(g=s.body.querySelector("p, blockquote")),g||(g=s.body.querySelector("div:not(.chapter-heading)")),!g)return t;const S=s.createTreeWalker(g,NodeFilter.SHOW_TEXT,null);let P=S.nextNode();for(;P;){const w=P.nodeValue||"",T=w.replace(/^\s+/,"");if(T.length){const l=['"',"“","”","«","»","‘","’","„"];let v=1;l.includes(T[0])&&T.length>=2&&(v=2);const E=w.match(/^\s*/)?.[0]||"",L=w.substr(E.length,v),m=w.substr(E.length+v),C=s.createDocumentFragment(),M=s.createElement("span");M.className="dropcap",M.textContent=L,C.appendChild(s.createTextNode(E)),C.appendChild(M),m.length&&C.appendChild(s.createTextNode(m)),P.parentNode?.replaceChild(C,P);break}P=S.nextNode()}return s.body.innerHTML}catch{return t}}function Mo(t){try{const r=new DOMParser().parseFromString(t||"","text/html"),u=Array.from(r.body.querySelectorAll(".chapter-heading"));return u.length?(u.forEach(o=>{const c=o.querySelector(".chapter-number"),s=o.querySelector(".chapter-title");let g="h2";s&&(s.tagName||"").match(/^H[1-6]$/i)&&(g=s.tagName.toLowerCase());const b=r.createElement(g);b.className="chapterhead";const S=c&&(c.textContent||"").trim()||"",P=s&&(s.textContent||"").trim()||"";if(S&&P){const w=S.replace(/^CHAPTER\s*/i,"Chapter "),T=r.createElement("span");T.className="chapter-num-inline",T.textContent=w,b.appendChild(T);const l=r.createElement("span");l.className="chapter-sep-inline",l.textContent=" — ",b.appendChild(l);const v=r.createElement("span");v.className="chapter-title-inline",v.textContent=P,b.appendChild(v)}else P?b.textContent=P:b.textContent=(o.textContent||"").trim();o.parentNode?.replaceChild(b,o)}),r.body.innerHTML):t}catch{return t}}function K(t){return(t||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}const No=[{title:"Voorwoord",href:"https://text.egwwritings.org/read/11453.7"},{title:"Inleiding",href:"https://text.egwwritings.org/read/11453.24"},{title:"Hoofdstuk 1 — De Verwoesting van Jeruzalem",href:"https://text.egwwritings.org/read/11453.69"},{title:"Hoofdstuk 2 — Vervolging in de Eerste Eeuwen",href:"https://text.egwwritings.org/read/11453.165"},{title:"Hoofdstuk 3 — De Afval",href:"https://text.egwwritings.org/read/11453.210"},{title:"Hoofdstuk 4 — De Waldenzen",href:"https://text.egwwritings.org/read/11453.273"},{title:"Hoofdstuk 5 — Johannes Wycliffe",href:"https://text.egwwritings.org/read/11453.358"},{title:"Hoofdstuk 6 — Huss en Jerome",href:"https://text.egwwritings.org/read/11453.443"},{title:"Hoofdstuk 7 — Luthers Afscheiding van Rome",href:"https://text.egwwritings.org/read/11453.563"},{title:"Hoofdstuk 8 — Luther voor de Rijksdag",href:"https://text.egwwritings.org/read/11453.688"},{title:"Hoofdstuk 9 — De Zwitserse Hervormer",href:"https://text.egwwritings.org/read/11453.816"},{title:"Hoofdstuk 10 — Voortgang van de Hervorming in Duitschland",href:"https://text.egwwritings.org/read/11453.882"},{title:"Hoofdstuk 11 — Protest van de Vorsten",href:"https://text.egwwritings.org/read/11453.948"},{title:"Hoofdstuk 12 — De Hervorming in Frankrijk",href:"https://text.egwwritings.org/read/11453.1019"},{title:"Hoofdstuk 13 — In de Nederlanden en Skandinavië",href:"https://text.egwwritings.org/read/11453.1143"},{title:"Hoofdstuk 14 — Latere Engelse Hervormers",href:"https://text.egwwritings.org/read/11453.1181"},{title:"Hoofdstuk 15 — De Bijbel en de Franse Revolutie",href:"https://text.egwwritings.org/read/11453.1280"},{title:"Hoofdstuk 16 — De Pelgrimvaders",href:"https://text.egwwritings.org/read/11453.1397"},{title:"Hoofdstuk 17 — Voorlopers van de Morgen",href:"https://text.egwwritings.org/read/11453.1449"},{title:"Hoofdstuk 18 — Een Amerikaanse Hervormer",href:"https://text.egwwritings.org/read/11453.1538"},{title:"Hoofdstuk 19 — Licht in de Duisternis",href:"https://text.egwwritings.org/read/11453.1655"},{title:"Hoofdstuk 20 — Een Grote Godsdienstige Opwekking",href:"https://text.egwwritings.org/read/11453.1710"}
1,{title:"Hoofdstuk 21 — Een Waarschuwing Verworpen",href:"https://text.egwwritings.org/read/11453.1803"},{title:"Hoofdstuk 22 — Profetieen Vervuld",href:"https://text.egwwritings.org/read/11453.1883"},{title:"Hoofdstuk 23 — Wat is het Heiligdom?",href:"https://text.egwwritings.org/read/11453.1967"},{title:"Hoofdstuk 24 — In het Heilige der Heiligen",href:"https://text.egwwritings.org/read/11453.2037"},{title:"Hoofdstuk 25 — Gods Wet Onveranderlik",href:"https://text.egwwritings.org/read/11453.2081"},{title:"Hoofdstuk 26 — Een Hervormingswerk",href:"https://text.egwwritings.org/read/11453.2167"},{title:"Hoofdstuk 27 — Opwekkingen in de Laatste Tijd",href:"https://text.egwwritings.org/read/11453.2216"},{title:"Hoofdstuk 28 — Het Onderzoekend Oordeel",href:"https://text.egwwritings.org/read/11453.2303"},{title:"Hoofdstuk 29 — De Oorsprong van het Kwaad",href:"https://text.egwwritings.org/read/11453.2366"},{title:"Hoofdstuk 30 — Vijandschap tussen de Mens en Satan",href:"https://text.egwwritings.org/read/11453.2428"},{title:"Hoofdstuk 31 — Het Werk van Boze Geesten",href:"https://text.egwwritings.org/read/11453.2459"},{title:"Hoofdstuk 32 — Strikken van de Satan",href:"https://text.egwwritings.org/read/11453.2492"},{title:"Hoofdstuk 33 — Het Eerste Grote Bedrog",href:"https://text.egwwritings.org/read/11453.2561"},{title:"Hoofdstuk 34 — Spiritualisme",href:"https://text.egwwritings.org/read/11453.2658"},{title:"Hoofdstuk 35 — Doeleinden van het Pausdom",href:"https://text.egwwritings.org/read/11453.2709"},{title:"Hoofdstuk 36 — De Naderende Strijd",href:"https://text.egwwritings.org/read/11453.2806"},{title:"Hoofdstuk 37 — De Schriften een Bron van Veiligheid",href:"https://text.egwwritings.org/read/11453.2858"},{title:"Hoofdstuk 38 — De Laatste Waarschuwing",href:"https://text.egwwritings.org/read/11453.2907"},{title:"Hoofdstuk 39 — “De Tijd der Benauwdheid”",href:"https://text.egwwritings.org/read/11453.2951"},{title:"Hoofdstuk 40 — Gods Volk Verlost",href:"https://text.egwwritings.org/read/11453.3055"},{title:"Hoofdstuk 41 — Verwoesting van de Aarde",href:"https://text.egwwritings.org/read/11453.3136"},{title:"Hoofdstuk 42 — Het Einde van de Strijd",href:"https://text.egwwritings.org/read/11453.3181"},{title:"Aanhangsel",href:"https://text.egwwritings.org/read/11453.3268"},{title:"Algemene aantekeningen",href:"https://text.egwwritings.org/read/11453.3269"},{title:"De katholieke encyclopedie",href:"https://text.egwwritings.org/read/11453.3271"},{title:"Biografiese aantekeningen",href:"https://text.egwwritings.org/read/11453.3385"}];function Ro(t,r){const u=t.map((s,g)=>({title:s.title,href:`#external-ch-${g+1}`})),o=u.map(s=>s.href.replace(/^#/,"")),c=t.map((s,g)=>`<div id="${o[g]}"><h2 class="chapterhead">${K(s.title)}</h2><p><a href="${K(s.href)}" target="_blank" rel="noreferrer">${K(r)}</a></p></div>`);return{toc:u,chapterIds:o,chapterHtml:c}}const Lr=new Set([Ve]);function Go(t){const r=(t||"").replace(/\r\n?/g,`
2`).split(`
3`),u=/^\s*ምዕራፍ\s+(\S+)\s*[-—–]\s*(.+?)\s*$/u,o=E=>(E||"").replace(/^\s*[-:]+\s*/u,"").replace(/\s*[-:]+\s*$/gu,"").replace(/[*]+.*$/u,"").replace(/\s*[-—–]\s*/gu,"—").replace(/\s+/gu," ").trim(),c=[];let s=[],g=null,b=0;const S=()=>{g&&(c.push(g),g=null)};for(const E of r){const m=E.trim().match(u);if(m){S(),b+=1;const C=(m[1]||"").trim(),M=(m[2]||"").trim();g={id:`amh-ch-${b}`,title:o(`ምዕራፍ ${C}—${M}`),lines:[]};continue}g?g.lines.push(E):s.push(E)}S(),s.join(`
4`).trim()&&c.unshift({id:"amh-intro",title:"መቅድም",lines:s});const w=E=>{const L=[];let m=[];const C=()=>{const M=m.join(" ").replace(/\s+/g," ").trim();M&&L.push(`<p>${K(M)}</p>`),m=[]};return E.forEach(M=>{const q=(M||"").trim();q?m.push(q):C()}),C(),L.join(`
5`)},T=c.map(E=>({title:E.title,href:`#${E.id}`})),l=c.map(E=>E.id),v=c.map(E=>{const L=(E.id==="amh-intro","h2"),m=`<${L} class="chapterhead">${K(E.title)}</${L}>`,C=w(E.lines);return`<div id="${E.id}">
6${m}
7${C}
8</div>`});return{toc:T,chapterIds:l,chapterHtml:v}}function $o(t){const r=(t||"").replace(/\r\n?/g,`
9`).split(`
10`),u=/^\s*第\s*([0-90-9]{1,3}|[一二三四五六七八九十百千〇零两兩]{1,6})\s*章\s*[—–\-::]?\s*(.*?)\s*$/,o=/\bGCS\s*\d+(?:\.\d+)?\b/gi,c=(L,m)=>{const C=(m||"").replace(/[*]+.*$/u,"").replace(/^\s*[-—–::]+\s*/u,"").replace(/\s+/gu," ").trim();return C?`第${(L||"").trim()}章 ${C}`:`第${(L||"").trim()}章`},s=[];let g=[],b=null,S=0;const P=()=>{b&&(s.push(b),b=null)};for(const L of r){const C=L.trim().match(u);if(C){P(),S+=1;const M=(C[1]||"").trim(),q=(C[2]||"").trim();b={id:`zh-ch-${S}`,title:c(M,q),lines:[]};continue}b?b.lines.push(L):g.push(L)}P(),g.join(`
11`).trim()&&s.unshift({id:"zh-intro",title:"引言",lines:g});const T=L=>{const m=[];let C=[];const M=()=>{const q=C.join(" ").replace(o,"").replace(/\s+/g," ").trim();q&&m.push(`<p>${K(q)}</p>`),C=[]};
11return L.forEach(q=>{const ae=(q||"").trim();ae?C.push(ae):M()}),M(),m.join(`
12`)},l=s.map(L=>({title:L.title,href:`#${L.id}`})),v=s.map(L=>L.id),E=s.map(L=>{const m=`<h2 class="chapterhead">${K(L.title)}</h2>`,C=T(L.lines);return`<div id="${L.id}">
13${m}
14${C}
15</div>`});return{toc:l,chapterIds:v,chapterHtml:E}}function Oo(t){const r=(t||"").replace(/^\uFEFF/,"").replace(/\r\n?/g,`
16`).split(`
17`),u=/^\s*(\d{1,3})\s*장\s*[—–\-:]\s*(.+?)\s*$/u,o=[];let c=[],s=null,g=0;const b=(m,C)=>{const M=(C||"").replace(/^\s*[-—–:]+\s*/u,"").replace(/\s+/gu," ").trim();return M?`${m} 장 — ${M}`:`${m} 장`},S=()=>{s&&(o.push(s),s=null)};for(const m of r){const M=(m||"").trim().match(u);if(M){S(),g+=1,s={id:`ko-ch-${g}`,title:b((M[1]||"").trim(),(M[2]||"").trim()),lines:[]};continue}s?s.lines.push(m):c.push(m)}for(S();c.length&&!c[0].trim();)c.shift();c[0]?.trim()==="각 시대의 대쟁투"&&c.shift();const P=c.findIndex(m=>/^\s*저자의\s*서문\s*$/u.test((m||"").trim()));let w="서문";P>=0&&(w="저자의 서문",c.splice(P,1)),c.join(`
18`).trim()&&o.unshift({id:"ko-intro",title:w,lines:c});const l=m=>{const C=[];let M=[];const q=()=>{const ae=M.join(" ").replace(/\s+/g," ").trim();ae&&C.push(`<p>${K(ae)}</p>`),M=[]};return m.forEach(ae=>{const be=(ae||"").trim();be?M.push(be):q()}),q(),C.join(`
19`)},v=o.map(m=>({title:m.title,href:`#${m.id}`})),E=o.map(m=>m.id),L=o.map(m=>{const C=`<h2 class="chapterhead">${K(m.title)}</h2>`,M=l(m.lines);return`<div id="${m.id}">
20${C}
21${M}
22</div>`});return{toc:v,chapterIds:E,chapterHtml:L}}function Ho(t){const r=(t||"").replace(/^\uFEFF/,"").replace(/\r\n?/g,`
23`).split(`
24`),u=/^\s*第\s*([0-90-9一二三四五六七八九十百千〇零]{1,8})\s*章\s*[—–\-::]\s*(.*?)\s*$/u,o=[];let c=[],s=null,g=0;const b=(m,C)=>{const M=(C||"").replace(/^\s*[-—–::]+\s*/u,"").replace(/\s+/gu," ").trim();return M?`第${m}章—${M}`:`第${m}章`},S=()=>{s&&(o.push(s),s=null)};for(const m of r){const M=(m||"").trim().match(u);if(M){S(),g+=1,s={id:`ja-ch-${g}`,title:b((M[1]||"").trim(),(M[2]||"").trim()),lines:[]};continue}s?s.lines.push(m):c.push(m)}for(S();c.length&&!c[0].trim();)c.shift();c[0]?.trim()==="各時代の大争闘"&&c.shift();let P="まえがき";const w=c.findIndex(m=>/^\s*まえがき\s*$/u.test((m||"").trim()));w>=0&&(P="まえがき",c.splice(w,1)),c.join(`
25`).trim()&&o.unshift({id:"ja-intro",title:P,lines:c});const l=m=>{const C=[];let M=[];const q=()=>{const ae=M.join(" ").replace(/\s+/g," ").trim();ae&&C.push(`<p>${K(ae)}</p>`),M=[]};return m.forEach(ae=>{const be=(ae||"").trim();be?M.push(be):q()}),q(),C.join(`
26`)},v=o.map(m=>({title:m.title,href:`#${m.id}`})),E=o.map(m=>m.id),L=o.map(m=>{const C=`<h2 class="chapterhead">${K(m.title)}</h2>`,M=l(m.lines);return`<div id="${m.id}">
27${C}
28${M}
29</div>`});return{toc:v,chapterIds:E,chapterHtml:L}}function Bo(t){const r=(t||"").replace(/\r\n?/g,`
30`).split(`
31`),u=/^\s*Поглавље\s+([IVXLCDM]+|\d+)\s*[—–\-:]\s*(.*?)\s*$/i,o=l=>(l||"").replace(/^\s*Поглавље\s+/iu,"Поглавље ").replace(/\s*[-—–:]\s*/gu," — ").replace(/[*]+.*$/u,"").replace(/\s+/gu," ").trim(),c=[];let s=null,g=0;const b=()=>{s&&(c.push(s),s=null)};for(const l of r){const v=(l||"").trim();if(v.match(u)){b(),g+=1,s={id:`sr-ch-${g}`,title:o(v),lines:[]};continue}s&&s.lines.push(l)}b();const S=l=>{const v=[];let E=[];const L=()=>{const m=E.join(" ").replace(/\s+/g," ").trim();m&&v.push(`<p>${K(m)}</p>`),E=[]};return l.forEach(m=>{const C=(m||"").trim();C?E.push(C):L()}),L(),v.join(`
32`)},P=c.map(l=>({title:l.title,href:`#${l.id}`})),w=c.map(l=>l.id),T=c.map(l=>{const v=`<h2 class="chapterhead">${K(l.title)}</h2>`,E=S(l.lines);return`<div id="${l.id}">
33${v}
34${E}
35</div>`});return{toc:P,chapterIds:w,chapterHtml:T}}function Do(t){const r=(t||"").replace(/\r\n?/g,`
36`).split(`
37`),u=/^\s*@@CHAPTER@@\s*(.+?)\s*$/,o=l=>(l||"").replace(/^\s*(\d{1,3})\s*[—–:-]\s*/,"$1—").replace(/\s+/g," ").trim(),c=[];let s=null,g=0;const b=()=>{s&&(c.push(s),s=null)};for(const l of r){const E=(l||"").trim().match(u);if(E){b(),g+=1,s={id:`fa-ch-${g}`,title:o(E[1]||""),lines:[]};continue}s&&s.lines.push(l)}b();const S=l=>{const v=[];let E=[];const L=()=>{const m=E.join(" ").replace(/\s+/g," ").trim();m&&v.push(`<p>${K(m)}</p>`),E=[]};return l.forEach(m=>{const C=(m||"").trim();C?E.push(C):L()}),L(),v.join(`
38`)},P=c.map(l=>({title:l.title,href:`#${l.id}`})),w=c.map(l=>l.id),T=c.map(l=>{const v=`<h2 class="chapterhead">${K(l.title)}</h2>`,E=S(l.lines);return`<div id="${l.id}">
39${v}
40${E}
41</div>`});return{toc:P,chapterIds:w,chapterHtml:T}}function jo(t){const r=(t||"").replace(/\r\n?/g,`
42`).split(`
43`),u=/^\s*@@CHAPTER@@\s*(.+?)\s*$/,o=l=>
43(l||"").replace(/^\s*hoofstuk\s+/i,"Hoofstuk ").replace(/^\s*inleiding\s*$/i,"Inleiding").replace(/\*.*$/,"").replace(/\s*[—–-]\s*/g,"—").replace(/\s+/g," ").trim(),c=[];let s=null,g=0;const b=()=>{s&&(c.push(s),s=null)};for(const l of r){const E=(l||"").trim().match(u);if(E){b(),g+=1,s={id:`af-ch-${g}`,title:o(E[1]||""),lines:[]};continue}s&&s.lines.push(l)}b();const S=l=>{const v=[];let E=[];const L=()=>{const m=E.join(" ").replace(/\s+/g," ").trim();m&&v.push(`<p>${K(m)}</p>`),E=[]};return l.forEach(m=>{const C=(m||"").trim();C?E.push(C):L()}),L(),v.join(`
44`)},P=c.map(l=>({title:l.title,href:`#${l.id}`})),w=c.map(l=>l.id),T=c.map(l=>{const v=`<h2 class="chapterhead">${K(l.title)}</h2>`,E=S(l.lines);return`<div id="${l.id}">
45${v}
46${E}
47</div>`});return{toc:P,chapterIds:w,chapterHtml:T}}function Uo(t){const r=(t||"").replace(/\r\n?/g,`
48`).split(`
49`),u=/^\s*@@CHAPTER@@\s*(.+?)\s*$/,o=l=>(l||"").replace(/^\s*[-:]+\s*/,"").replace(/\s*[-:]+\s*$/g,"").replace(/^\s*पाठ\s*([०-९0-9]+)\s*[-—–:]?\s*/u,"पाठ $1 - ").replace(/^\s*पाठ\s*([०-९0-9]+)\s*-\s*/u,"पाठ $1 - ").replace(/[*]+.*$/u,"").replace(/\s+/g," ").trim(),c=[];let s=null,g=0;const b=()=>{s&&(c.push(s),s=null)};for(const l of r){const E=(l||"").trim().match(u);if(E){b(),g+=1,s={id:`hi-ch-${g}`,title:o(E[1]||""),lines:[]};continue}s&&s.lines.push(l)}b();const S=l=>{const v=[];let E=[];const L=()=>{const m=E.join(" ").replace(/\s+/g," ").trim();m&&v.push(`<p>${K(m)}</p>`),E=[]};return l.forEach(m=>{const C=(m||"").trim();C?E.push(C):L()}),L(),v.join(`
50`)},P=c.map(l=>({title:l.title,href:`#${l.id}`})),w=c.map(l=>l.id),T=c.map(l=>{const v=`<h2 class="chapterhead">${K(l.title)}</h2>`,E=S(l.lines);return`<div id="${l.id}">
51${v}
52${E}
53</div>`});return{toc:P,chapterIds:w,chapterHtml:T}}function _o(t){const r=(t||"").replace(/\r\n?/g,`
54`).split(`
55`),u=/^\s*@@CHAPTER@@\s*(.+?)\s*$/,o=l=>(l||"").replace(/^\s*[-:]+\s*/,"").replace(/\s*[-:]+\s*$/g,"").replace(/\s*[—–-]\s*/g," - ").replace(/[*]+.*$/u,"").replace(/\s+/g," ").trim(),c=[];let s=null,g=0;const b=()=>{s&&(c.push(s),s=null)};for(const l of r){const E=(l||"").trim().match(u);if(E){b(),g+=1,s={id:`bn-ch-${g}`,title:o(E[1]||""),lines:[]};continue}s&&s.lines.push(l)}b();const S=l=>{const v=[];let E=[];const L=()=>{const m=E.join(" ").replace(/\s+/g," ").trim();m&&v.push(`<p>${K(m)}</p>`),E=[]};return l.forEach(m=>{const C=(m||"").trim();C?E.push(C):L()}),L(),v.join(`
56`)},P=c.map(l=>({title:l.title,href:`#${l.id}`})),w=c.map(l=>l.id),T=c.map(l=>{const v=`<h2 class="chapterhead">${K(l.title)}</h2>`,E=S(l.lines);return`<div id="${l.id}">
57${v}
58${E}
59</div>`});return{toc:P,chapterIds:w,chapterHtml:T}}function gn(t){const r=(t||"").replace(/\r\n?/g,`
60`).split(`
61`),u=/^\s*@@CHAPTER@@\s*(.+?)\s*$/,o=l=>(l||"").replace(/^\s*[-:]+\s*/,"").replace(/\s*[-:]+\s*$/g,"").replace(/\s*[—–-]\s*/g,"—").replace(/[*]+.*$/u,"").replace(/\s+/g," ").trim(),c=[];let s=null,g=0;const b=()=>{s&&(c.push(s),s=null)};for(const l of r){const E=(l||"").trim().match(u);if(E){b(),g+=1,s={id:`id-ch-${g}`,title:o(E[1]||""),lines:[]};continue}s&&s.lines.push(l)}b();const S=l=>{const v=[];let E=[];const L=()=>{const m=E.join(" ").replace(/\s+/g," ").trim();m&&v.push(`<p>${K(m)}</p>`),E=[]};return l.forEach(m=>{const C=(m||"").trim();C?E.push(C):L()}),L(),v.join(`
62`)},P=c.map(l=>({title:l.title,href:`#${l.id}`})),w=c.map(l=>l.id),T=c.map(l=>{const v=`<h2 class="chapterhead">${K(l.title)}</h2>`,E=S(l.lines);return`<div id="${l.id}">
63${v}
64${E}
65</div>`});return{toc:P,chapterIds:w,chapterHtml:T}}function Vo(t){const r=(t||"").replace(/\r\n?/g,`
66`).split(`
67`),u=/^\s*@@CHAPTER@@\s*(.+?)\s*$/,o=l=>(l||"").replace(/^\s*[-:]+\s*/,"").replace(/\s*[-:]+\s*$/g,"").replace(/\s*[—–-]\s*/g," - ").replace(/[*]+.*$/u,"").replace(/\s+/g," ").trim(),c=[];let s=null,g=0;const b=()=>{s&&(c.push(s),s=null)};for(const l of r){const E=(l||"").trim().match(u);if(E){b(),g+=1,s={id:`ur-ch-${g}`,title:o(E[1]||""),lines:[]};continue}s&&s.lines.push(l)}b();const S=l=>{const v=[];let E=[];const L=()=>{const m=E.join(" ").replace(/\s+/g," ").trim();m&&v.push(`<p>${K(m)}</p>`),E=[]};return l.forEach(m=>{const C=(m||"").trim();C?E.push(C):L()}),L(),v.join(`
68`)},P=c.map(l=>({title:l.title,href:`#${l.id}`})),w=c.map(l=>l.id),T=c.map(l=>{const v=`<h2 class="chapterhead">${K(l.title)}</h2>`,E=S(l.lines);return`<div id="${l.id}">
69${v}
70${E}
71</div>`});return{toc:P,chapterIds:w,chapterHtml:T}}function Xo(){const[r,u]=h.useState(""),[o,c]=h.useState([]),[s,g]=h.useState(0),[b,S]=h.useState(null),[P,w]=h.useState(null),[T,l]=h.useState(!1),[v,E]=h.useState(""),[L,m]=h.useState(null),[C,M]=h.useState({top:0,left:0}),[q,ae]=h.useState(!1),[be,oe]=h.useState(!1),[Ze,Fe]=h.useState(0),[Oe,ht]=
71h.useState(!1),[et,Pt]=h.useState(!1),[Xt,Ke]=h.useState(!1),[p,ze]=h.useState(()=>Po()),[O,xe]=h.useState([]),[tt,me]=h.useState(null),[ue,nt]=h.useState([]),ie=h.useRef(new Map),fe=h.useRef(new Map),X=h.useRef(new Set),[R,Y]=h.useState(0),[ge,rt]=h.useState(0),[pt,at]=h.useState(!0),[I,B]=h.useState(!1),[,te]=h.useState(0),[ne,ye]=h.useState(()=>{const n=localStorage.getItem("reader-page-width");if(n){const a=Number(n);if(!Number.isNaN(a))return Math.max(St,Math.min(Ft,a))}return go(window.innerWidth||1280)}),[we,kt]=h.useState(()=>Math.max(St,Math.min(Ft,(window.innerWidth||1280)-48))),[Ee,Yt]=h.useState(()=>{const n=localStorage.getItem("reader-width-preset");return n==="small"||n==="medium"||n==="wide"?n:"small"}),[Jt,J]=h.useState(()=>{const n=localStorage.getItem("reader-text-size");return n?Number(n):18}),[H,se]=h.useState(!0),[ce,Z]=h.useState(!1),[We,F]=h.useState(!1),[ve,re]=h.useState(!1),[D,U]=h.useState(!1),[Ce,he]=h.useState(0),[bt,Nt]=h.useState(!1),[xt,wn]=h.useState({top:0,left:0}),[vn,Cn]=h.useState(()=>rr()),[Rt,Qt]=h.useState(null),[Sn,An]=h.useState(!1),[Me,Pn]=h.useState(()=>{try{const n=localStorage.getItem("reader-bookmark");if(!n)return null;const a=JSON.parse(n);return!a||typeof a.lang!="string"||typeof a.chapterIdx!="number"?null:a}catch{return null}}),[le,He]=h.useState(()=>{const n=window.location.pathname||"/";if(!!(window.location.hash&&window.location.hash.startsWith("#gc-p-")))return!1;if(n==="/"||n==="")return!0;const d=n.match(/^\/([^/]+)\/?$/);if(d){const k=decodeURIComponent(d[1]||"").toLowerCase();if(Et[k])return!0}return!1}),xn=h.useRef(null),yt=h.useRef(null),Ln=h.useRef(!1),Xe=h.useRef(null),Ye=h.useRef(null),Lt=h.useRef(null),Gt=h.useRef(null),[ot,Tn]=h.useState(()=>localStorage.getItem("reader-dark")==="1"),_=h.useRef(null),en=h.useRef(null),Rr=h.useRef(null),In=h.useRef(null),tn=h.useRef(null),zn=h.useRef(null),Wn=h.useRef(null),$t=h.useRef(null),Mn=h.useRef(null),Nn=()=>{try{window.scrollTo({top:0,behavior:"auto"})}catch{window.scrollTo(0,0)}},Ot=n=>{if(!O.length)return 0;const a=Math.max(0,Math.min(O.length-1,n)),i=d=>{const k=(O[d]?.title||"").trim();return qe(k)!==null};if(i(a))return a;for(let d=a+1;d<O.length;d++)if(i(d))return d;return a},Gr=(n=!1)=>{if(ge<O.length-1){const a=Ot(ge+1);rt(a),n&&Fe(i=>i+1)}},$r=(n=!1)=>{if(ge>0){const a=Ot(ge-1);rt(a),n&&Fe(i=>i+1)}},Or=O[ge]?.title||"";h.useEffect(()=>{if(!O.length){rt(0);return}(ge>=O.length||qe((O[ge]?.title||"").trim())===null)&&rt(Ot(Math.max(0,Math.min(ge,O.length-1))))},[O,ge]),h.useEffect(()=>{{ae(!0);return}},[be,!0]);const Hr=()=>{const n=_.current;n&&n.querySelectorAll("span.user-highlight-temp").forEach(a=>{const i=a.parentNode;for(;a.firstChild;)i?.insertBefore(a.firstChild,a);i?.removeChild(a)})},[Br,Rn]=h.useState(null),[Fo,Dr]=h.useState(null),[jr,Ur]=h.useState(null),[_r,Vr]=h.useState(null),Gn=h.useMemo(()=>yr(window.innerWidth||1280,we),[we]),Tt=["small","medium","wide"],$n=Math.max(0,Tt.indexOf(Ee)),Fr=$n>0,Kr=$n<Tt.length-1,qr=Ee==="small"?20:Ee==="medium"?52:100,On=n=>{Yt(a=>{const i=Math.max(0,Tt.indexOf(a)),d=n==="decrease"?Math.max(0,i-1):Math.min(Tt.length-1,i+1);return Tt[d]})},Hn=(n,a=260)=>{const i=window.innerWidth,d=12,k=Math.max(160,i-d*2),f=Math.min(a,k);if(!n)return{position:"fixed",top:72,left:d,width:f,maxWidth:`calc(100vw - ${d*2}px)`,zIndex:9999};const A=n.getBoundingClientRect();let y=A.left;return y+f+d>i&&(y=i-f-d),y<d&&(y=d),{position:"fixed",top:A.bottom+8,left:y,width:f,maxWidth:`calc(100vw - ${d*2}px)`,zIndex:9999}};h.useEffect(()=>{const n=window.matchMedia("(min-width:900px)"),a=()=>se(!!n.matches);return a(),n.addEventListener?.("change",a),()=>n.removeEventListener?.("change",a)},[]),h.useEffect(()=>{const n=()=>{const a=Math.max(St,Math.min(Ft,window.innerWidth-48));kt(a);const i=yr(window.innerWidth||1280,a);ye(i[Ee])};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[Ee]),h.useEffect(()=>{localStorage.setItem("reader-width-preset",Ee),ye(Gn[Ee])},[Ee,Gn]),h.useEffect(()=>{localStorage.setItem("reader-page-width",String(ne))},[ne]),h.useEffect(()=>{if(le||pt){he(0);return}let n=!1;const a=64,i=()=>{n=!1;const k=_.current;if(!k)return;const f=k.getBoundingClientRect(),A=window.scrollY||document.documentElement.scrollTop||0,y=A+f.top,$=Math.max(k.scrollHeight,f.height,1),G=y+$;if(A+window.innerHeight>=G-2){he(100);return}const z=(A+a-y)/Math.max(1,G-y)*100,de=Math.max(0,Math.min(100,Math.round(z)));he(de)},d=()=>{n||(n=!0,window.requestAnimationFrame(i))};return i(),window.addEventListener("scroll",d,{passive:!0}),window.addEventListener("resize",d),()=>{window.removeEventListener("scroll",d),window.removeEventListener("resize",d)}},[R,le,pt]),h.useEffect(()=>{if(!ve)return;const n=a=>{const i=a.target;i&&zn.current?.contains(i)||i&&tn.current?.contains(i)||re(!1)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[ve]),h.useEffect(()=>{if(!ce)return;const n=a=>{const i=a.target;i&&Wn.current?.contains(i)||i&&en.current?.contains(i)||Z(!1)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[ce]),h.useEffect(()=>{if(!D)return;const n=a=>{const i=a.target;i&&Mn.current?.contains(i)||i&&$t.current?.contains(i)||U(!1)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[D]),h.useEffect(()=>{const n=d=>{let k=d.match(/^\/([^/]+)\/?$/i);if(k){const G=decodeURIComponent(k[1]||"").toLowerCase(),N=Et[G];if(N)return{folder:N,idx:null,num:null,showToc:!0}}if(k=d.match(/^\/([^/]+)\/[^/]+-(\d+)(?:\/([^/]+))?(?:\/)?$/i),k){const G=decodeURIComponent(k[1]||"").toLowerCase(),N=Math.max(1,parseInt(k[2],10)),j=Math.max(0,N-1),z=Et[G];return z?{folder:z,idx:j,num:N,showToc:!1}:null}if(k=d.match(/^\/([^/]+)\/chapter\/(\d+)(?:-([^/]+))?(?:\/)?$/i),!k)return null;const f=decodeURIComponent(k[1]||"").toLowerCase(),A=Math.max(1,parseInt(k[2],10)),y=Math.max(0,A-1),$=Et[f];return $?{folder:$,idx:y,num:A,showToc:!1}:null},a=n(window.location.pathname);a&&(a.idx!==null&&(Xe.current=a.idx,Ye.current=a.num??null),ze(a.folder),He(a.showToc??!1));const i=()=>{const d=n(window.location.pathname);d&&(d.idx!==null&&(Xe.current=d.idx,Ye.current=d.num??null),ze(d.folder),He(d.showToc??!1))};return window.addEventListener("popstate",i),()=>window.removeEventListener("popstate",i)},[]),h.useEffect(()=>{try{localStorage.setItem("reader-dark",ot?"1":"0"),document.documentElement.setAttribute("data-theme",ot?"dark":"light")}catch{}},[ot]),h.useEffect(()=>{const d=p&&p.toLowerCase().includes("alsra")||p===Ae||p===Pe;document.documentElement.setAttribute("dir",d?"rtl":"ltr")},[p]),h.useEffect(()=>{const n=i=>{const d=i.target;d&&_.current?.contains(d)&&(Ln.current=!0)},a=()=>{Ln.current=!1};return document.addEventListener("pointerdown",n),document.addEventListener("pointerup",a),()=>{document.removeEventListener("pointerdown",n),document.removeEventListener("pointerup",a)}},[]);const Zr=async()=>{try{const n=Je(p),a=(Te[p]||"").toLowerCase(),i=O[R]?.title||"",d=qe(i)??R+1,k=Wt(p),f=fn(p,i,d),A=le?`/${a}`:`/${a}/${k}-${d}/${f}`,y=`${window.location.origin}${A}`,$=L?`${y}#${L}`:window.location.href,G=`${v}${v?`
72
73`:""}${n}
74${$}`;if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(G);else{const N=document.createElement("textarea");N.value=G,N.style.position="fixed",N.style.opacity="0",document.body.appendChild(N),N.focus(),N.select(),document.execCommand("copy"),document.body.removeChild(N)}l(!1);try{_.current&&_.current.style&&(_.current.style.webkitTouchCallout="")}catch{}if(window.getSelection()?.removeAllRanges(),Gt.current){const N=Gt.current;wn({top:N.top+window.scrollY-40,left:N.left+window.scrollX+Math.max(N.width/2,0)})}else wn({top:Math.max(16,window.scrollY+16),left:Math.max(16,window.innerWidth/2)});Nt(!0),Lt.current&&window.clearTimeout(Lt.current),Lt.current=window.setTimeout(()=>Nt(!1),1600)}catch(n){console.error("Failed to copy:",n)}},Ht=()=>{const n=window.getSelection();if(!(!n||!yt.current))try{n.removeAllRanges(),n.addRange(yt.current.cloneRange())}catch{}};h.useEffect(()=>{T&&v&&yt.current&&Ht()},[T,v]),h.useEffect(()=>{if(!T)return;const n=()=>{let a=null;try{a=yt.current?.getBoundingClientRect?.()||null}catch{a=null}if(a){const d=typeof navigator<"u"&&/iP(ad|hone|od)/i.test(navigator.userAgent||"")?110:56;M({top:a.top-d,left:a.left+Math.max(a.width/2,0)}),Gt.current=a}};return n(),window.addEventListener("scroll",n,{passive:!0}
74),window.addEventListener("resize",n),()=>{window.removeEventListener("scroll",n),window.removeEventListener("resize",n)}},[T]),h.useEffect(()=>{const n=a=>{try{const i=window.getSelection(),d=i?(i.toString()||"").trim():"",k=i?.anchorNode||null;if(!d||!k||!_.current?.contains(k))return;const f=i.rangeCount?i.getRangeAt(0):null;if(!f)return;const A=f.startContainer?.nodeType===Node.ELEMENT_NODE?f.startContainer:f.startContainer.parentElement||null,y=A?.closest?.("p, blockquote")||A?.closest?.("[id]")||null;let $=null;if(y&&y.id&&($=y.id),!$&&_.current){const z=Array.from(_.current.querySelectorAll("p, blockquote")),de=y?z.indexOf(y):-1,lt=de>=0?de+1:Math.max(1,z.length);$=`gc-p-${R+1}-${lt}`,y&&!y.id&&(y.id=$)}const G=f.getBoundingClientRect();Gt.current=G,yt.current=f.cloneRange(),E(d),m($);const N=typeof navigator<"u"&&/iP(ad|hone|od)/i.test(navigator.userAgent||""),j=N?110:56;M({top:G.top-j,left:G.left+Math.max(G.width/2,0)}),l(!0);try{N&&_.current&&_.current.style&&(_.current.style.webkitTouchCallout="none")}catch{}}catch{}};return document.addEventListener("pointerup",n),document.addEventListener("touchend",n),()=>{document.removeEventListener("pointerup",n),document.removeEventListener("touchend",n)}},[R]),h.useEffect(()=>{if(!T)return;const n=a=>{const i=a.target;if(!(i&&xn.current?.contains(i))&&!(i&&_.current?.contains(i))){l(!1),m(null);try{_.current&&_.current.style&&(_.current.style.webkitTouchCallout="")}catch{}}};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[T]);const It=n=>{const a=Je(p),i=`"${v}" — ${a}`,d=`${window.location.origin}${window.location.pathname}`,k=L?`${d}#${L}`:window.location.href;let f="";switch(n){case"facebook":f=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(k)}&quote=${encodeURIComponent(i)}`;break;case"twitter":f=`https://twitter.com/intent/tweet?text=${encodeURIComponent(i)}&url=${encodeURIComponent(k)}`;break;case"whatsapp":f=`https://wa.me/?text=${encodeURIComponent(i+" "+k)}`;break;case"email":f=`mailto:?subject=${encodeURIComponent(a)}&body=${encodeURIComponent(i+`
75
76`+k)}`;break;case"native":if(navigator.share){const A=`${v}${v?`
77
78`:""}${a}
79${k}`;navigator.share({title:a,text:A}).catch(y=>
79console.log("Share cancelled:",y)),l(!1);try{_.current&&_.current.style&&(_.current.style.webkitTouchCallout="")}catch{}window.getSelection()?.removeAllRanges();return}break}if(f){window.open(f,"_blank","width=720,height=520"),l(!1);try{_.current&&_.current.style&&(_.current.style.webkitTouchCallout="")}catch{}window.getSelection()?.removeAllRanges()}};h.useEffect(()=>{Hr(),yt.current=null,m(null)},[R,p]),h.useEffect(()=>()=>{Lt.current&&window.clearTimeout(Lt.current)},[]),h.useEffect(()=>{const n=()=>{const d=window.matchMedia?.("(display-mode: standalone)"),k=window.navigator.standalone===!0,f=!!(d?.matches||k);An(f)},a=d=>{d.preventDefault(),Qt(d)},i=()=>{An(!0),Qt(null)};return n(),window.addEventListener("beforeinstallprompt",a),window.addEventListener("appinstalled",i),()=>{window.removeEventListener("beforeinstallprompt",a),window.removeEventListener("appinstalled",i)}},[]),h.useEffect(()=>{const n=a=>{a.key==="gc_analytics_consent"&&Cn(rr())};return window.addEventListener("storage",n),()=>window.removeEventListener("storage",n)},[]);const Xr=async()=>{if(Rt)try{await Rt.prompt(),await Rt.userChoice}catch{}finally{Qt(null),U(!1)}},wt=n=>{const a=Je(p)||(p||"").split(" - Ellen")[0].trim()||"The Great Controversy",i=`${window.location.origin}${window.location.pathname}`,d=`${a} — ${i}`;let k="";switch(n){case"facebook":k=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(i)}`;break;case"twitter":k=`https://twitter.com/intent/tweet?text=${encodeURIComponent(d)}`;break;case"whatsapp":k=`https://wa.me/?text=${encodeURIComponent(d)}`;break;case"email":k=`mailto:?subject=${encodeURIComponent(a)}&body=${encodeURIComponent(d)}`;break;
79case"native":if(navigator.share){navigator.share({title:a,text:a,url:i}).catch(()=>null);return}break}k&&window.open(k,"_blank","width=720,height=520")},nn=()=>{const n=Je(p)||"The Great Controversy",a=vo(p),i=`${n} — "${a}"`,k=`https://wa.me/${Mr(p)}?text=${encodeURIComponent(i)}`;window.open(k,"_blank","noopener,noreferrer"),U(!1)},rn=()=>{const n="Pytanie dotyczące książki Wielki bój";window.location.href=`mailto:${Er}?subject=${encodeURIComponent(n)}`,U(!1)},Bn=()=>{const n="Zamówienie drukowanego egzemplarza książki Wielki bój";window.location.href=`mailto:${kr}?subject=${encodeURIComponent(n)}`,U(!1)},an=()=>{window.open(io,"_blank","noopener,noreferrer"),re(!1),U(!1)};h.useEffect(()=>{at(!0),xe([]),nt([]),me(null),ie.current.clear(),fe.current.clear(),Y(0);const n=async k=>{for(const f of k)try{const A=await fetch(f);if(!A.ok)continue;const y=await A.text();if(/<title>\s*document moved\s*<\/title>/i.test(y)||/document moved permanently/i.test(y))continue;return y}catch{}throw new Error("Not found")};if(p===Ve){const k=Ro(No,"Lees brontekst");xe(k.toc),nt(k.chapterIds),me(null),ie.current.clear(),fe.current.clear(),k.chapterHtml.forEach((y,$)=>{ie.current.set($,y),fe.current.set($,y.replace(/<[^>]+>/g," "))});const f=Ye.current,A=Xe.current;if(typeof f=="number"){const y=k.toc.findIndex($=>qe($.title)===f);Y(y>=0?y:0)}else typeof A=="number"&&A>=0&&A<k.chapterIds.length?Y(A):Y(0);Xe.current=null,Ye.current=null,at(!1);return}if(p===Be||p===Ie||p===De||p===Ne||p===Re||p===Ae||p===je||p===Ge||p===$e||p===Ue||p===_e||p===Pe||p===Qe){fetch(p===Be?Fa:p===Ie?Ka:p===De?qa:p===Ne?Za:p===Re?Xa:p===Ae?Ya:p===je?Ja:p===Ge?Qa:p===$e?eo:p===Ue?to:p===_e?no:p===Pe?ro:oo).then(f=>{if(!f.ok)throw new Error("Source file missing");return f.text()}).then(f=>{const A=p===Be?Go(f):p===Ie?$o(f):p===De?Oo(f):p===Ne?Ho(f):p===Re?Bo(f):p===Ae?Do(f):p===je?jo(f):p===Ge?Uo(f):p===$e?_o(f):p===Ue||p===_e?gn(f):p===Pe?Vo(f):gn(f);xe(A.toc),nt(A.chapterIds),me(null),ie.current.clear(),fe.current.clear(),A.chapterHtml.forEach((N,j)=>{ie.current.set(j,N),fe.current.set(j,N.replace(/<[^>]+>/g," "))});let y=0;const $=Ye.current,G=Xe.current;if(typeof $=="number"){const N=Math.max(0,Math.min(A.chapterIds.length-1,$-1));Y(N)}else typeof G=="number"&&G>=0&&G<A.chapterIds.length?Y(G):Y(y);Xe.current=null,Ye.current=null,at(!1)}).catch(()=>{xe([]),nt([]),me(null),ie.current.clear(),fe.current.clear(),at(!1)});return}const a=`/book-content/html/${encodeURIComponent(p)}`,i=`/book-content/html/${p}`,d=[`${a}/index.html`,`${a}/`,`${i}/index.html`,`${i}/`];n(d).then(k=>{const f=new DOMParser().parseFromString(k,"text/html");let A=f.querySelector('nav[type="toc"]')||f.querySelector("nav.toc")||f.querySelector(".toc")||f.querySelector("#toc")||f.querySelector("ol");const y=[],$=W=>/^\s*information\s+about.*book/i.test(W.trim()),G=W=>{const x=(W||"").replace(/\s+/g," ").trim();return!x||/^[\p{P}\p{S}\s]+$/u.test(x)||!/[\p{L}\p{N}]/u.test(x)?"":x},N=W=>{const x=G(W);return!!(!x||/^[\[(]?\d{1,4}(?:[\].,:;\-]\d{0,4})?[\])\.]?$/u.test(x)||/^(?:n(?:ote)?\s*)?\d{1,4}$/iu.test(x)||$(x)||/^\s*(?:preface|foreword)\b/i.test(x)||(Se[p]||"").toLowerCase().includes("span")&&(/^\s*(?:informaci[oó]n\s+sobre(?:\s+este|\s+el)?\s+libro)\b/i.test(x)||/^\s*(?:prefacio|pr[oó]logo)\b/i.test(x)))};if(A&&A.querySelectorAll("a").forEach(W=>{const x=W.getAttribute("href")||"",Q=G(W.textContent||"");x&&Q&&!N(Q)&&y.push({title:Q,href:x})}),!y.length||y.length<3){const W=new Set;Array.from(f.querySelectorAll("a[href]")).forEach(Q=>{const ee=Q.getAttribute("href")||"";if(!ee.startsWith("#"))return;const Le=ee.replace(/^#/,"");if(!Le||!f.getElementById(Le))return;const pe=G(Q.textContent||"");pe&&(N(pe)||W.has(ee)||(W.add(ee),y.push({title:pe,href:ee})))})}if(y.length<3){const W=Array.from(f.querySelectorAll('h2.chapterhead, h2[class*="chapter"]')),x=[];W.forEach(Q=>{const ee=G(Q.textContent||"");if(!ee||N(ee))return;let Le=Q;for(;Le&&!Le.id;)Le=Le.parentElement;Le&&Le.id&&x.push({title:ee,href:`#${Le.id}`})}),x.length>y.length&&(y.length=0,y.push(...x))}const j=y.findIndex(W=>/\bintroduction\b/i.test(W.title));let z=j>=0?y.slice(j):y;p==="Der grosse Kampf - Ellen G. White"&&(z=z.filter(W=>{const x=W.title||"",Q=qe(x);return!(/informationen|vorwort/i.test(x)||/untreue\s+und\s+abfall/i.test(x)||Q===2||Q===3||Q===4)})),p==="Il gran conflitto - Ellen G. White"&&(z=z.filter(W=>{const x=W.title||"";return!/informazioni|prefazione/i.test(x)})),p==="O Grande Conflito - Ellen G. White"&&(z=z.filter(W=>{const x=W.title||"";return!/informações/i.test(x)})),p==="O Le Finauga Tele - Ellen G. White"&&(z=z.filter(W=>{const x=W.title||"";return!/upu\s+tomua/i.test(x)})),p==="VELIKA BORBA IZMEDU KRISTA I SOTONE - Ellen G. White"&&(z=z.filter(W=>{const x=W.title||"";return!/predgovor/i.test(x)})),p==="VIeLIKATA BORBA MIeZhDU KhRISTA i SATANA - Ellen G. White"&&(z=z.filter(W=>{const x=W.title||"";return!/предговор/i.test(x)})),p==="Tragedia veacurilor - Ellen G. White"&&(z=z.filter(W=>{const x=W.title||"";return!/informații.*despre/i.test(x)})),p==="Velky spor vekov - Ellen G. White"&&(z=z.filter(W=>{const x=W.title||"";return!/předmluva/i.test(x)})),p==="Vielikaia bor'ba - Ellen G. White"&&(z=z.filter(W=>{const x=W.title||"";return!/информация.*об|предисловие/i.test(x)})),p==="Wielki boj - Ellen G. White"&&(z=z.filter(W=>{const x=W.title||"";return!/wprowadzenie.*do.*wydania/i.test(x)})),p==="alSra` al`Zym - Ellen G. White"&&(z=z.filter(W=>{const x=W.title||"";return!/المقدمة/.test(x)})),z=z.filter(W=>{const x=G(W.title||"");return!!(x&&!N(x))}).map(W=>
79({...W,title:G(W.title||"")})),xe(z);let de=0;const lt=Ye.current,ke=Xe.current;if(typeof lt=="number"){const W=z.findIndex(x=>qe(x.title)===lt);W>=0?Y(W):typeof ke=="number"&&ke>=0&&ke<z.length?Y(ke):Y(de)}else typeof ke=="number"&&ke>=0&&ke<z.length?Y(ke):Y(de);Xe.current=null,Ye.current=null;const gt=z.map(W=>W.href.replace(/^#/,""));nt(gt),me(f),ie.current.clear(),fe.current.clear(),at(!1),"requestIdleCallback"in window&&window.requestIdleCallback(()=>{gt.forEach((W,x)=>{x!==de&&on(f,W,y)})},{timeout:2e3})}).catch(()=>{xe([]),nt([]),me(null),ie.current.clear(),fe.current.clear(),at(!1)})},[p]),h.useEffect(()=>{if(!ue.length)return;const n=(Te[p]||"").toLowerCase();if(le){const y=n?`/${n}`:"/";window.location.pathname!==y&&window.history.replaceState({},"",y),ar(y);return}const a=O[R]?.title||"",i=qe(a)??R+1,d=Wt(p),k=Kt(a),f=fn(p,a,i),A=`/${n}/${d}-${i}/${f}`;window.location.pathname!==A&&window.history.replaceState({},"",A),ar(A),sa("chapter_open",{language:n,language_name:Se[p]||p,chapter_number:i,chapter_title:k||a||`Chapter ${i}`,path:A})},[p,R,ue.length,O,le]);function on(n,a,i){const d=n.getElementById(a);if(!d)return"";let k=d,f="";for(;k;){f+=k.outerHTML;const A=k.nextElementSibling;if(A&&i.some(y=>y.href.replace(/^#/,"")===A.id))break;k=k.nextElementSibling}return f}function ln(n){if(ie.current.has(n))return ie.current.get(n);if(!tt||!ue[n])return"";const a=on(tt,ue[n],O);return ie.current.set(n,a),a}function Dn(n){if(fe.current.has(n))return fe.current.get(n);const i=ln(n).replace(/<[^>]+>/g," ");return fe.current.set(n,i),i}h.useEffect(()=>{if(!Lr.has(p)||!ue.length||R<0||R>=ue.length)return;const a=ue[R];if(!a)return;const i=ie.current.get(R)||(tt?on(tt,a,O):""),d=xr(i);if(!d){B(!1);return}if(X.current.has(R)){B(!0);return}let k=!1;return X.current.add(R),B(!0),fetch(d.href).then(f=>{if(!f.ok)throw new Error("Failed to fetch external chapter");return f.text()}).then(f=>{if(k)return;const A=d.title||O[R]?.title||`${bn[p]||"Chapter"} ${R+1}`,$=To(f,A,p===Ve?A:null);$&&(ie.current.set(R,$),fe.current.set(R,$.replace(/<[^>]+>/g," ")),te(G=>G+1))}).catch(()=>{}).finally(()=>{X.current.delete(R),k||B(!1)}),()=>{k=!0}},[p,R,ue,tt,O]);function sn(n){const a=(n||"").trim();let i=!1,d=a;if((a.startsWith('"')&&a.endsWith('"')||a.startsWith("'")&&a.endsWith("'"))&&(d=a.slice(1,-1).trim(),i=!0),i)return{raw:a,query:d,exact:i,isAnd:!1,terms:d?[d]:[]};const k=a.split("&").map(f=>f.trim()).filter(Boolean);return k.length>=2?{raw:a,query:a,exact:!1,isAnd:!0,terms:k}:{raw:a,query:d,exact:!1,isAnd:!1,terms:d?[d]:[]}}function Bt(n){const a=_.current;if(!a)return!1;if(n.paragraphId){const i=document.getElementById(n.paragraphId);if(i){try{i.scrollIntoView({behavior:"smooth",block:"center"})}catch{i.scrollIntoView()}return!0}}if(typeof n.paragraphIdx=="number"){const d=Array.from(a.querySelectorAll("p, blockquote"))[n.paragraphIdx];if(d){try{d.scrollIntoView({behavior:"smooth",block:"center"})}catch{d.scrollIntoView()}return!0}}return!1}function jn(){const n=sn(r),{query:a,exact:i,isAnd:d,terms:k}=n;if(!a){c([]),S(null),w(null);return}const f=[];if(d){const A=k.map(y=>y.toLocaleLowerCase());for(let y=0;y<ue.length;y++){const $=ln(y),G=new DOMParser().parseFromString($||"","text/html");Array.from(G.body.querySelectorAll("p, blockquote")).forEach((j,z)=>{const de=(j.textContent||"").replace(/\s+/g," ").trim();if(!de)return;const lt=de.toLocaleLowerCase();if(!A.every(W=>lt.includes(W)))return;const gt=j.id||`gc-p-${y+1}-${z+1}`;f.push({idx:y,occ:0,paragraphIdx:z,paragraphId:gt,snippet:de})})}}else{const A=zt(a);for(let y=0;y<ue.length;y++){const $=Dn(y);let G,N=0;const j=i?`\\b${A}\\b`:A,z=new RegExp(j,"gi");for(;(G=z.exec($))!==null;)f.push({idx:y,occ:N}),N++,z.lastIndex===G.index&&z.lastIndex++}}if(c(f),f.length){const A=f[0];He(!1),Y(A.idx),S(d?null:a),g(0),setTimeout(()=>{Bt(A)||Dt(A.occ||0)},200)}else S(null)}function Dt(n=0){const a=_.current;if(!a)return;const d=a.querySelectorAll(".search-highlight")[n];if(d){try{d.scrollIntoView({behavior:"smooth",block:"center"})}catch{d.scrollIntoView()}d.style.outline="3px solid rgba(50,100,255,0.14)",setTimeout(()=>{d&&(d.style.outline="")},1200);return}const k=(b||"").trim();if(k)try{const f=new RegExp(zt(k),"gi"),A=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null);let y=A.nextNode(),$=0;for(;y;){const G=y.nodeValue||"";let N;for(;(N=f.exec(G))!==null;){if($===n){const j=document.createRange();j.setStart(y,N.index),j.setEnd(y,N.index+N[0].length);const z=j.startContainer.parentElement||j.startContainer.parentNode;if(z){try{z.scrollIntoView({behavior:"smooth",block:"center"})}catch{z.scrollIntoView()}z.style.outline="3px solid rgba(50,100,255,0.14)",setTimeout(()=>{z&&(z.style.outline="")},1200)}j.detach?.();return}$++,f.lastIndex===N.index&&f.lastIndex++}y=A.nextNode()}}catch{}}h.useEffect(()=>{if(!o.length)return;const n=o[Math.min(s,o.length-1)];if(n){const a=sn(r);He(!1),Y(n.idx),S(a.isAnd?null:a.query||null),setTimeout(()=>{Bt(n)||Dt(n.occ||0)},200)}},[s,o,r]),h.useEffect(()=>{if(P===null)return;const n=_.current;if(!n)return;const a=()=>
79{if(R!==P.idx)return!1;if(Bt(P))return w(null),!0;const k=n.querySelectorAll(".search-highlight"),f=P.occ||0;return k.length>f?(Dt(f),w(null),!0):!1};if(a())return;const i=setInterval(()=>{a()&&clearInterval(i)},150),d=setTimeout(()=>{clearInterval(i),R===P.idx&&(Bt(P)||Dt(P.occ||0)),w(null)},1200);return()=>{clearInterval(i),clearTimeout(d)}},[P,R,b]);const Un=ln(R),_n=(Lr.has(p)?!!xr(Un):!1)?"<div><p>Loading chapter…</p></div>":Un,mt=h.useMemo(()=>Io(O),[O]),Vn=h.useMemo(()=>{if(mt<0||mt>=O.length)return null;const n=O[mt]?.title||"",a=qe(n)??mt+1,i=Wt(p),d=fn(p,n,a);return`/${(Te[p]||"").toLowerCase()}/${i}-${a}/${d}`},[mt,O,p]),Fn=h.useMemo(()=>xo(_n,b),[_n,b]),Kn=h.useMemo(()=>zo(Fn,Vn,R===mt),[Fn,Vn,R,mt]),qn=h.useMemo(()=>Mo(Kn),[Kn]),Zn=h.useMemo(()=>Lo(qn,R+1),[qn,R]),Xn=h.useMemo(()=>Wo(Zn,p,R,O),[Zn,p,R,O]);h.useEffect(()=>{const n=(window.location.hash||"").replace(/^#/,"");if(!n)return;let a=0;const i=10,d=()=>{const k=document.getElementById(n);k?setTimeout(()=>{try{k.scrollIntoView({behavior:"smooth",block:"center"})}catch{const f=k.getBoundingClientRect(),A=window.scrollY+f.top-window.innerHeight/2+f.height/2;window.scrollTo({top:A,behavior:"smooth"})}},100):a<i&&(a++,setTimeout(d,100))};requestAnimationFrame(()=>{setTimeout(d,200)})},[R,Xn]);const jt=Je(p);h.useEffect(()=>{const n=jt||"The Great Controversy",a=Se[p]||Mt[p]||(Te[p]||"en").toUpperCase(),i=(Te[p]||"en").toLowerCase(),d=(O[R]?.title||"").trim(),k=qe(d)??R+1,f=Kt(d)||d,A=!le&&ue.length>0,y=A&&f?`${f} | ${n}`:`${n} | ${a}`,G=`${vr[i]||vr.en}.`;document.title=y,document.documentElement.setAttribute("lang",i);const N=window.location.origin,j=`${N}${window.location.pathname}`,z=(x,Q)=>{let ee=document.head.querySelector(`meta[name="${x}"]`);ee||(ee=document.createElement("meta"),ee.setAttribute("name",x),document.head.appendChild(ee)),ee.setAttribute("content",Q)},de=(x,Q)=>{let ee=document.head.querySelector(`meta[property="${x}"]`);ee||(ee=document.createElement("meta"),ee.setAttribute("property",x),document.head.appendChild(ee)),ee.setAttribute("content",Q)},lt=(x,Q,ee,Le)=>{let pe=document.head.querySelector(x);return pe||(pe=document.createElement("link"),document.head.appendChild(pe)),pe.setAttribute("rel",Q),pe.setAttribute("href",ee),pe};z("description",G),z("robots","index,follow,max-image-preview:large,max-snippet:-1,max-video-preview:-1"),de("og:title",y),de("og:description",G),de("og:url",j),de("og:type",A?"article":"website"),z("twitter:title",n),z("twitter:description",G),z("twitter:card","summary_large_image"),z("apple-mobile-web-app-title",n),lt('link[rel="canonical"]',"canonical",j),document.head.querySelectorAll('link[rel="alternate"][data-seo-alternate="1"]').forEach(x=>x.remove()),At.forEach(x=>{const Q=(Te[x]||"").toLowerCase();if(!Q)return;const ee=Wt(x),Le=A?`/${Q}/${encodeURIComponent(ee)}-${k}/chapter-${k}`:`/${Q}`,pe=document.createElement("link");pe.setAttribute("rel","alternate"),pe.setAttribute("hreflang",Q),pe.setAttribute("href",`${N}${Le}`),pe.setAttribute("data-seo-alternate","1"),document.head.appendChild(pe)});const ke=document.createElement("link");ke.setAttribute("rel","alternate"),ke.setAttribute("hreflang","x-default"),ke.setAttribute("href",`${N}/`),ke.setAttribute("data-seo-alternate","1"),document.head.appendChild(ke);const gt={"@context":"https://schema.org","@graph":[{"@type":"WebSite",name:"The Great Controversy",inLanguage:i,url:N},{"@type":"Book",name:n,inLanguage:i,url:j,author:{"@type":"Person",name:"Ellen G. White"}}]};A&&f&&gt["@graph"].push({"@type":"Chapter",name:f,inLanguage:i,isPartOf:{"@type":"Book",name:n,url:`${N}/${i}`},url:j});let W=document.head.querySelector('script[data-seo-jsonld="1"]');W||(W=document.createElement("script"),W.type="application/ld+json",W.setAttribute("data-seo-jsonld","1"),document.head.appendChild(W)),W.textContent=JSON.stringify(gt)},[jt,p,R,O,le,ue.length]);const cn=bo[p]||"Contents",Yr=cn,Jr=p===Ie?"暂无目录":"No contents available",vt=po[p]||"Contact on WhatsApp",Yn=`${vt}: ${wo(p)}`,ft=p===ao,Ct=ft?`Pytania: ${Er}`:vt,Ut=`Zamów drukowany egzemplarz: ${kr}`,Jn=yo[p]||"Continue",Qn=fr.has(p),er="Play chapter audio",Qr="Now playing audio chapter",ea="Audio chapter selected",ta=Wr(p),tr=(p||"").toLowerCase().includes("alsra")||p===Ae||p===Pe,na=h.useMemo(()=>{const n="The Great Controversy - Ellen G. White 2",a=new Intl.Collator("en",{sensitivity:"base",numeric:!0}),i=At.filter(d=>d!==n).sort((d,k)=>{const f=Se[d]||Mt[d]||d,A=Se[k]||Mt[k]||k;return a.compare(f,A)});return At.includes(n)?[n,...i]:i},[]),ra={width:H?`${ne}px`:"100%",fontSize:`${Jt}px`,position:"relative"},it=!le&&!!Me&&Me.lang===p&&Me.chapterIdx===R,aa=Cr[(Te[p]||"en").toLowerCase()]||Cr.en,oa=n=>{const a=Ot(n);rt(a),oe(!1),ae(!0),Pt(!1),Fe(i=>i+1)},nr=()=>{if(le&&Me){Me.lang!==p?(Xe.current=Me.chapterIdx,Ye.current=null,ze(Me.lang)):Y(Me.chapterIdx),He(!1);return}if(it){localStorage.removeItem("reader-bookmark"),Pn(null);return}const n={lang:p,chapterIdx:R,ts:Date.now()};localStorage.setItem("reader-bookmark",JSON.stringify(n)),Pn(n)},ia=()=>{J(n=>{const a=Math.max(12,n-1);return localStorage.setItem("reader-text-size",String(a)),a})},la=()=>{J(n=>{const a=Math.min(36,n+1);return localStorage.setItem("reader-text-size",String(a)),a})};return e.createElement("div",{className:"reader-root"},e.createElement("header",{className:"reader-header-bar"},e.createElement("div",{className:"reader-header-bar-inner",style:{width:H?`${ne}px`:"100%"}}
79,e.createElement("div",{className:"reader-header-controls"},e.createElement("div",{className:"reader-header-title",style:{fontWeight:600},role:"button",tabIndex:0,onClick:()=>{He(!0);try{window.scrollTo({top:0,behavior:"smooth"})}catch{window.scrollTo(0,0)}},onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),He(!0))},"aria-label":`Open contents for ${jt}`},jt),e.createElement("button",{className:"reader-burger-icon",ref:Rr,onClick:n=>{n.stopPropagation(),F(!1),re(!1),Z(!1),U(!1),He(!0);try{window.scrollTo({top:0,behavior:"smooth"})}catch{window.scrollTo(0,0)}},"aria-label":cn},e.createElement(za,{size:28})),e.createElement("div",{className:"reader-right-controls",style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:8}},e.createElement("button",{className:"reader-prev-chapter","aria-label":"Previous chapter",disabled:le||R<=0,onClick:()=>{le||R>0&&(Y(R-1),Nn())}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("polyline",{points:tr?"9 6 15 12 9 18":"15 18 9 12 15 6"}))),e.createElement("button",{className:"reader-next-chapter","aria-label":"Next chapter",disabled:le||R>=ue.length-1,onClick:()=>{le||R<ue.length-1&&(Y(R+1),Nn())}},e.createElement("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("polyline",{points:tr?"15 18 9 12 15 6":"9 6 15 12 9 18"}))),e.createElement("button",{className:`reader-bookmark-btn${it?" active":""}`,"aria-label":le&&Me?"Go to bookmark":it?"Remove bookmark":"Bookmark this chapter",title:le&&Me?"Go to bookmark":it?"Remove bookmark":"Bookmark this chapter",onClick:nr},it?e.createElement(sr,{size:18}):e.createElement(lr,{size:18})),e.createElement("button",{className:"reader-search-icon",ref:In,onClick:()=>{const n=In.current;if(n){const a=n.getBoundingClientRect();Dr({position:"fixed",top:a.bottom+8,left:a.left,minWidth:320})}F(!0),setTimeout(()=>{document.querySelector(".reader-search-input")?.focus()},120)},"aria-label":"Search"},e.createElement(ba,{size:24})),e.createElement("button",{ref:en,className:"reader-lang-icon",onClick:n=>{n.stopPropagation(),Rn(Hn(en.current,260)),Z(a=>!a)},"aria-label":"Language"},e.createElement(cr,{size:26})),e.createElement("button",{className:"reader-share-icon",ref:tn,onClick:n=>{n.stopPropagation();const a=tn.current;if(a){const i=a.getBoundingClientRect();Ur({position:"fixed",top:i.bottom+8,left:i.left,minWidth:220})}re(i=>!i)},"aria-label":"Share"},e.createElement(pr,{size:22})),e.createElement("button",{className:"reader-whatsapp-icon",onClick:ft?rn:nn,"aria-label":ft?Ct:Yn,title:ft?Ct:Yn},ft?e.createElement(st,{size:22}):e.createElement(_t,{size:22})),e.createElement("button",{className:"reader-donate-icon",onClick:an,"aria-label":"Donate via Stripe",title:"Donate"},e.createElement(un,{size:20}),e.createElement("span",null,"Donate")),e.createElement("button",{className:"reader-more-icon",ref:$t,onClick:n=>{n.stopPropagation();const a=$t.current;if(a){const i=a.getBoundingClientRect();Vr({position:"fixed",top:i.bottom+8,right:Math.max(12,window.innerWidth-i.right),minWidth:220})}U(i=>!i)},"aria-label":"More"},e.createElement(Wa,{size:22})),e.createElement("div",{className:"reader-text-size-controls",style:{display:"flex",alignItems:"center",gap:6,marginLeft:4}},e.createElement("button",{className:"reader-text-size-btn","aria-label":"Decrease text size",onClick:ia},"A −"),e.createElement("button",{className:"reader-text-size-btn","aria-label":"Increase text size",onClick:la},"A +")),e.createElement("button",{className:"reader-darkmode-toggle",onClick:()=>Tn(n=>!n),"aria-label":"Toggle dark mode"},ot?e.createElement(ur,{size:22}):e.createElement(dr,{size:22})),H&&e.createElement("div",{className:"reader-width-control",role:"group","aria-label":"Adjust content width"},e.createElement("button",{className:"reader-width-arrow-btn","aria-label":"Decrease content width",title:"Decrease content width",onClick:()=>On("decrease"),disabled:!Fr},"←"),e.createElement("div",{className:"reader-width-indicator","aria-label":`Content width ${Ee}`,title:`Content width ${Ee}`},e.createElement("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},e.createElement("line",{x1:"3",y1:"11",x2:"19",y2:"11",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.35"}),e.createElement("polyline",{points:"5,9 3,11 5,13",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"}),e.createElement("polyline",{points:"17,9 19,11 17,13",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})),e.createElement("span",{className:"reader-width-indicator-active",style:{width:`${qr}%`},"aria-hidden":"true"})),e.createElement("button",{className:"reader-width-arrow-btn","aria-label":"Increase content width",title:"Increase content width",onClick:()=>On("increase"),disabled:!Kr},"→")))))),ve&&e.createElement("div",{ref:zn,className:"reader-share-dropdown",style:jr||void 0,onClick:n=>n.stopPropagation()},e.createElement("button",{onClick:()=>wt("facebook"),"aria-label":"Share on Facebook"},e.createElement(dn,{size:16}),e.createElement("span",null,"Facebook")),e.createElement("button",{onClick:()=>wt("twitter"),"aria-label":"Share on X (Twitter)"},e.createElement(hn,{size:16}),e.createElement("span",null,"X (Twitter)")),ft?e.createElement(e.Fragment,null,e.createElement("button",{onClick:rn,"aria-label":Ct},e.createElement(st,{size:18}),e.createElement("span",null,Ct)),e.createElement("button",{onClick:Bn,"aria-label":Ut},e.createElement(st,{size:18}),e.createElement("span",null,Ut))):e.createElement("button",{onClick:nn,"aria-label":vt},e.createElement(_t,{size:18}),e.createElement("span",null,vt)),e.createElement("button",{onClick:()=>wt("email"),"aria-label":"Share via Email"},e.createElement(st,{size:18}),e.createElement("span",null,"Email")),e.createElement("button",{onClick:an,"aria-label":"Donate via Stripe"},e.createElement(un,{size:18}),e.createElement("span",null,"Donate"))),D&&e.createElement("div",{ref:Mn,className:"reader-share-dropdown",style:_r||void 0,onClick:n=>n.stopPropagation()},!Sn&&Rt&&e.createElement("button",{onClick:Xr,"aria-label":"Install app"},e.createElement(La,{size:20}),e.createElement("span",null,"Install app")),Sn&&e.createElement("div",{className:"reader-menu-status","aria-live":"polite"},e.createElement(Ea,{size:20}),e.createElement("span",null,"App installed")),e.createElement("button",{onClick:()=>{nr(),U(!1)},"aria-label":le&&Me?"Go to bookmark":it?"Remove bookmark":"Bookmark this chapter"},it?e.createElement(sr,{size:20}):e.createElement(lr,{size:20}),e.createElement("span",null,le&&Me?"Go to bookmark":it?"Remove bookmark":"Bookmark")),e.createElement("button",{onClick:()=>{Rn(Hn($t.current,260)),Z(!0),U(!1)},"aria-label":"Language"},e.createElement(cr,{size:20}),e.createElement("span",null,"Language")),e.createElement("button",{onClick:()=>{Tn(n=>
79!n),U(!1)},"aria-label":"Toggle dark mode"},ot?e.createElement(ur,{size:20}):e.createElement(dr,{size:20}),e.createElement("span",null,ot?"Light mode":"Dark mode")),e.createElement("button",{onClick:()=>{const n=vn!=="granted";ca(n),Cn(n?"granted":"denied"),U(!1)},"aria-label":"Privacy settings"},e.createElement(ka,{size:20}),e.createElement("span",null,vn==="granted"?"Privacy: Analytics on":"Privacy: Analytics off")),e.createElement("button",{onClick:()=>wt("facebook"),"aria-label":"Share on Facebook"},e.createElement(dn,{size:16}),e.createElement("span",null,"Facebook")),e.createElement("button",{onClick:()=>wt("twitter"),"aria-label":"Share on X (Twitter)"},e.createElement(hn,{size:16}),e.createElement("span",null,"X (Twitter)")),ft?e.createElement(e.Fragment,null,e.createElement("button",{onClick:rn,"aria-label":Ct},e.createElement(st,{size:18}),e.createElement("span",null,Ct)),e.createElement("button",{onClick:Bn,"aria-label":Ut},e.createElement(st,{size:18}),e.createElement("span",null,Ut))):e.createElement("button",{onClick:nn,"aria-label":vt},e.createElement(_t,{size:18}),e.createElement("span",null,vt)),e.createElement("button",{onClick:()=>wt("email"),"aria-label":"Share via Email"},e.createElement(st,{size:18}),e.createElement("span",null,"Email")),e.createElement("button",{onClick:an,"aria-label":"Donate via Stripe"},e.createElement(un,{size:18}),e.createElement("span",null,"Donate"))),le?e.createElement("main",{className:"reader-main"},e.createElement("div",{className:"reader-wrapper",style:ra},pt?e.createElement("div",null,"Loading…"):e.createElement(e.Fragment,null,e.createElement("section",{className:"reader-opening-toc-inline","aria-label":Yr},e.createElement("div",{className:"reader-opening-toc-inline-header"},e.createElement("div",{className:"reader-opening-toc-inline-titles"},e.createElement("div",{className:"reader-opening-subtitle"},cn)),e.createElement("div",{className:"reader-opening-toc-inline-actions"},e.createElement("button",{className:"reader-opening-continue",onClick:()=>{He(!1);try{window.scrollTo({top:0,behavior:"smooth"})}catch{window.scrollTo(0,0)}},"aria-label":Jn},Jn))),e.createElement("ul",{className:"reader-toc-list reader-opening-toc-list"},O.length===0&&e.createElement("li",{className:"reader-toc-empty"},Jr),O.map((n,a)=>{const i=qe(n.title),d=i?Kt(n.title):n.title,k=bn[p]||"Chapter",f=Qn&&a===ge;return e.createElement("li",{key:n.href},e.createElement("div",{className:"reader-toc-row"},e.createElement("button",{className:`reader-toc-item-btn ${a===R?"active":""}`,onClick:()=>{Y(a),He(!1);try{window.scrollTo({top:0,behavior:"smooth"})}catch{window.scrollTo(0,0)}}},i&&e.createElement("span",{className:"reader-toc-num"},k," ",i),e.createElement("span",{className:`reader-toc-title${i?"":" full-title"}`},d)),Qn?e.createElement("button",{type:"button",className:`reader-toc-audio-btn${f?" is-selected":""}${f&&Oe?" is-playing":""}`,"aria-label":f?Oe?Qr:ea:er,title:er,onClick:()=>oa(a)},e.createElement(zr,{size:16})):null))})))),e.createElement("footer",{className:"reader-footer"},e.createElement("div",{className:"reader-footer-inner"},Pr[p]||`© ${Je(p)||Se[p]||p}`," · ",e.createElement("a",{href:uo,target:"_blank",rel:"noreferrer",style:{color:"inherit",textDecoration:"underline"}},ta))))):e.createElement(Va,{loading:pt||I,isDesktop:H,pageWidth:ne,textSize:Jt,displayedHtml:Xn,contentRef:_,copyrightText:Pr[p]||`© ${Je(p)||Se[p]||p}`,lang:p,chapterIdx:R}),et?e.createElement("button",{className:`reader-audio-restore-btn${Oe?" is-playing":""}`,onClick:()=>Pt(!1),"aria-label":"Show player",title:"Show player"},e.createElement(hr,{size:16})):null,e.createElement("section",{className:`reader-audio-section${et?" is-hidden":""}`,"aria-label":"Chapter audio player","aria-hidden":et,style:{width:H?`${ne}px`:"calc(100vw - 16px)"}},e.createElement(_a,{key:`audio-${p}`,lang:p,chapterIdx:ge,chapterTitle:Or,onNextChapter:Gr,onPrevChapter:$r,canNextChapter:ge<O.length-1,canPrevChapter:ge>0,minimized:!0,autoPlayRequest:Ze,onPlayingChange:ht,continuePlay:Xt,onToggleContinuePlay:()=>Ke(n=>!n),onExpand:()=>{},onMinimize:()=>{},onHide:()=>Pt(!0),containerWidth:H?ne:null})),We&&e.createElement("div",{className:"reader-search-modal",onClick:()=>F(!1)},e.createElement("div",{className:"reader-search-card",onClick:n=>n.stopPropagation()},e.createElement("div",{className:"reader-search-bar"},e.createElement("input",{className:"reader-search-input",value:r,onChange:n=>u(n.target.value),onKeyDown:n=>{n.key==="Enter"&&jn()},placeholder:"Search in this language"}),e.createElement("button",{className:"reader-search-close",onClick:()=>F(!1)},"✕")),e.createElement("div",{className:"reader-search-results"},e.createElement("div",{style:{display:"flex",gap:8,alignItems:"center"}},e.createElement("button",{onClick:()=>g(n=>Math.max(0,n-1))},"Prev"),e.createElement("div",{style:{minWidth:80,textAlign:"center"}},o.length?`${s+1} / ${o.length}`:"0 / 0"),e.createElement("button",{onClick:()=>g(n=>Math.min(o.length-1||0,n+1))},"Next"),e.createElement("button",{onClick:()=>jn()},"Search")),o.length===0&&e.createElement("div",{className:"reader-search-noresults"},"No results"),o.map((n,a)=>{const i=sn(r),d=i.query,k=Dn(n.idx),f=(()=>
79{if(n.snippet)return n.snippet;const y=(()=>{let $=0;const G=new RegExp(zt(d),"gi");let N;for(;(N=G.exec(k))!==null;){if($===n.occ)return N.index;$++,G.lastIndex===N.index&&G.lastIndex++}return-1})();return y>=0?k.substr(Math.max(0,y-40),Math.min(220,k.length-y+40)):k.substr(0,220)})(),A=(()=>{const y=K(f),$=i.isAnd?i.terms:d?[d]:[];if(!$.length)return y;let G=y;return $.slice().sort((N,j)=>j.length-N.length).forEach(N=>{N&&(G=G.replace(new RegExp(zt(N),"gi"),j=>`<mark class="search-highlight">${j}</mark>`))}),G})();return e.createElement("button",{key:`${n.idx}-${n.occ}-${n.paragraphIdx??"x"}-${a}`,className:"reader-search-result",onClick:()=>{F(!1),He(!1),Y(n.idx),g(a),i.isAnd?S(null):S(d||null),w({idx:n.idx,occ:n.occ,paragraphIdx:n.paragraphIdx,paragraphId:n.paragraphId})}},e.createElement("div",{className:"reader-search-chapter"},O&&O[n.idx]&&O[n.idx].title?O[n.idx].title:`Chapter ${n.idx+1}`),e.createElement("div",{style:{fontSize:"0.95rem",color:"inherit"},dangerouslySetInnerHTML:{__html:A}}))})))),ce&&e.createElement("div",{ref:Wn,className:"reader-lang-panel",style:Br||void 0,onClick:n=>n.stopPropagation()},e.createElement("ul",null,na.map(n=>e.createElement("li",{key:n},e.createElement("button",{disabled:n===p,onClick:()=>{ze(n),Y(0),rt(0),ht(!1),Z(!1)}},e.createElement("span",null,ko(n)),fr.has(n)?e.createElement("span",{className:"reader-lang-audio-icon","aria-label":Ar(n),title:Ar(n)},e.createElement(hr,{size:16})):null))))),T&&e.createElement("div",{ref:xn,className:"reader-share-popup",style:(()=>{let i=C.left,d=C.top;if(typeof window<"u"){const k=window.innerWidth-130-8,f=260/2+8;i>k&&(i=k),i<f&&(i=f);const A=8,y=window.innerHeight-60;d<A&&(d=A),d>y&&(d=y)}return{position:"fixed",top:`${d}px`,left:`${i}px`,transform:"translateX(-50%)",zIndex:1e4,background:ot?"#23243a":"#fff",color:ot?"#ffe066":"#23235a",border:"1.5px solid #e0e0e0",borderRadius:8,padding:"6px"}})(),onMouseDown:n=>{Ht(),n.stopPropagation(),n.preventDefault()},onTouchStart:n=>{Ht(),n.stopPropagation(),n.preventDefault()},onMouseEnter:Ht},e.createElement("div",{className:"reader-share-popup-content"},e.createElement("button",{onClick:Zr,"aria-label":"Copy text",title:"Copy"},e.createElement(xa,{size:18})),typeof navigator<"u"&&typeof navigator.share=="function"&&e.createElement("button",{onClick:()=>It("native"),"aria-label":"Share",title:"Share"},e.createElement(pr,{size:18})),e.createElement("button",{onClick:()=>It("facebook"),"aria-label":"Share on Facebook",title:"Facebook"},e.createElement(dn,{size:16})),e.createElement("button",{onClick:()=>It("twitter"),"aria-label":"Share on X/Twitter",title:"X (Twitter)"},e.createElement(hn,{size:16})),e.createElement("button",{onClick:()=>It("whatsapp"),"aria-label":"Share on WhatsApp",title:"WhatsApp"},e.createElement(_t,{size:18})),e.createElement("button",{onClick:()=>It("email"),"aria-label":"Share via Email",title:"Email"},e.createElement(st,{size:18})),e.createElement("button",{onClick:()=>{l(!1);try{_.current&&_.current.style&&(_.current.style.webkitTouchCallout="")}catch{}window.getSelection()?.removeAllRanges()},"aria-label":"Close",title:"Close",className:"reader-share-close"},e.createElement(Ta,{size:16})))),bt&&e.createElement("div",{className:"reader-share-feedback reader-share-feedback-near",role:"status","aria-live":"polite",style:{position:"absolute",top:`${xt.top}px`,left:`${xt.left}px`,transform:"translateX(-50%)",zIndex:10001}},aa),!le&&!pt&&e.createElement("div",{className:"reader-scroll-percent","aria-label":`Chapter read ${Ce}%`,title:`Chapter read ${Ce}%`},Ce,"%"))}export{Xo as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.