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,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}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-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-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)}"e=${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&>["@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.