<\/div>/g,""),`${n}`}const _a=[[/([او]ۤ)(.ّ)/g,"<.madd-lazim>$1$2"],[/([لمصكعسقن]ۤ)/g,"<.madd-lazim>$1"],[/(اۤ)(لۡ)/g,"<.madd-lazim>$1$2"],[/(ـ?[اویٰ]ۤ)([ـ ]?ى?[ٕٔءأإؤئ])/g,"<.madd-wajib>$1$2"],[/([\u06E5\u06E6]ۤ)/g,"<.madd-wajib>$1 "],[/(َا|ِی|ُو)(?=..\n)/g,(t,e)=>`${e}<.madd-aarid>${e}`],[/ٱل(.ّ)/g,"ٱ<.idgham>ل$1"],[/([لّ?.])ل(.ّ)/g,"$1<.idgham>ل$2"],[/([وایى]۟)/g,"<.idgham>$1"],[/([ࣰًࣱٌࣲٍ]|ن)([اى]? )([ینمو])/g,"<.idgham>$1$2<.ikhfaa>$3"],[/([ࣰࣱࣲ]|ن)(?=[اى]? [لر])/g,"<.idgham>$1"],[/([ࣰًࣱٌࣲٍ]|ن)(?= ?[صذثكجشقسدطزفتضظ])/g,"<.ikhfaa>$1"],[/([ۭۢ])/g,"<.ikhfaa>$1"],[/([نم]ّ[َ-ِ])/g,"<.ikhfaa>$1"],[/م(?= [مب])/g,"<.ikhfaa>م"],[/([قطبجد]ۡ)/g,"<.qalqalah>$1"],[/ (?=\d+[ ]|\n)/," "]];function xa(t){let e,n,o,r,s=t[12](t[11].quran[t[3]-1][0])+"",a=""+z(ma(t[3])[1]);return{c(){e=ee("div"),n=new ve(!1),o=re(),r=oe(a),n.a=o,ce(e,"class","kitab")},m(t,a){Qt(t,e,a),n.m(s,e),Kt(e,o),Kt(e,r)},p(t,e){8&e&&s!==(s=t[12](t[11].quran[t[3]-1][0])+"")&&n.p(s),8&e&&a!==(a=""+z(ma(t[3])[1]))&&le(r,a)},d(t){t&&Zt(e)}}}function ka(t){let e,n=ya(t[6],t[3])+"";return{c(){e=ee("div"),ce(e,"class","qpc"),de(e,"font-family","QCF2"+(""+t[6]).padStart(3,"0"))},m(t,o){Qt(t,e,o),e.innerHTML=n},p(t,o){72&o&&n!==(n=ya(t[6],t[3])+"")&&(e.innerHTML=n),64&o&&de(e,"font-family","QCF2"+(""+t[6]).padStart(3,"0"))},d(t){t&&Zt(e)}}}function ja(t){let e,n,o;function r(t,e){return t[7].online&&!t[5].tajweed?Ta:Ea}let s=r(t),a=s(t);return{c(){e=ee("style"),e.textContent='[data-ayah-id="0"] {color: brown}',n=re(),a.c(),o=se()},m(r,s){Qt(r,e,s),t[13](e),Qt(r,n,s),a.m(r,s),Qt(r,o,s)},p(t,e){s===(s=r(t))&&a?a.p(t,e):(a.d(1),a=s(t),a&&(a.c(),a.m(o.parentNode,o)))},d(r){r&&Zt(e),t[13](null),r&&Zt(n),a.d(r),r&&Zt(o)}}}function Ea(t){let e,n=t[12]($a(t[6]))+"";return{c(){e=ee("div"),ce(e,"class","kitab text-page")},m(t,o){Qt(t,e,o),e.innerHTML=n},p(t,o){64&o&&n!==(n=t[12]($a(t[6]))+"")&&(e.innerHTML=n)},d(t){t&&Zt(e)}}}function Ta(t){let e,n=wa(t[6])+"";return{c(){e=ee("div"),ce(e,"class","qpc qpc-page"),de(e,"font-family","QCF2"+(""+t[6]).padStart(3,"0"))},m(t,o){Qt(t,e,o),e.innerHTML=n},p(t,o){64&o&&n!==(n=wa(t[6])+"")&&(e.innerHTML=n),64&o&&de(e,"font-family","QCF2"+(""+t[6]).padStart(3,"0"))},d(t){t&&Zt(e)}}}function qa(t){let e,n=t[10](t[11].lang_text[t[3]-1])+"";return{c(){e=ee("div"),ce(e,"class","tafsir hl-inner text-gray-600 mt-[5px] svelte-cdklur")},m(t,o){Qt(t,e,o),e.innerHTML=n},p(t,o){8&o&&n!==(n=t[10](t[11].lang_text[t[3]-1])+"")&&(e.innerHTML=n)},d(t){t&&Zt(e)}}}function La(t){let e,n,o,r,s,a,i,c,l,u,d,f,p,h,m,v,g,b,y,w,$,_,x,k=`${t[1]}s`,j=t[9](t[5].start)+"",E=t[9](t[5].end)+"",T=t[9](t[4].ayah_reps)+"",q=t[9](t[5].ayah_reps)+"",L=t[9](t[4].all_reps)+"",O=t[9](t[5].all_reps)+"",S="ar"===t[8]&&function(t){let e;return{c(){e=oe("")},m(t,n){Qt(t,e,n)},d(t){t&&Zt(e)}}}(),A="ar"===t[8]&&function(t){let e;return{c(){e=oe("")},m(t,n){Qt(t,e,n)},d(t){t&&Zt(e)}}}();function M(t,e){return t[5].show_mushaf?ja:t[7].online&&!t[5].tajweed?ka:xa}let N=M(t),C=N(t),P=t[11].lang_text[t[3]-1]&&qa(t);return{c(){e=ee("div"),n=ee("progress"),o=re(),r=ee("div"),s=oe("آيات: "),a=oe(j),i=oe(" إلى "),c=oe(E),l=oe(" • \n "),u=ne("svg"),d=ne("use"),f=oe(T),p=oe("/"),S&&S.c(),h=oe(q),m=oe(" • \n "),v=ne("svg"),g=ne("use"),b=oe(L),y=oe("/"),A&&A.c(),w=oe(O),$=re(),_=ee("div"),C.c(),x=re(),P&&P.c(),ce(n,"max","1"),n.value=t[0],ce(n,"class","svelte-cdklur"),de(n,"--duration",k),ce(d,"href","#icon-repeat-one"),ce(u,"class","icon icon-repeat-one"),ce(g,"href","#icon-repeat"),ce(v,"class","icon icon-repeat"),ce(r,"class","leading-[1] text-[12px] text-gray-400 text-end"),ce(_,"dir","rtl"),ce(e,"class","cont svelte-cdklur"),he(e,"cont-page",t[5].show_mushaf)},m(t,k){Qt(t,e,k),Kt(e,n),Kt(e,o),Kt(e,r),Kt(r,s),Kt(r,a),Kt(r,i),Kt(r,c),Kt(r,l),Kt(r,u),Kt(u,d),Kt(r,f),Kt(r,p),S&&S.m(r,null),Kt(r,h),Kt(r,m),Kt(r,v),Kt(v,g),Kt(r,b),Kt(r,y),A&&A.m(r,null),Kt(r,w),Kt(e,$),Kt(e,_),C.m(_,null),Kt(e,x),P&&P.m(e,null)},p(t,[o]){1&o&&(n.value=t[0]),2&o&&k!==(k=`${t[1]}s`)&&de(n,"--duration",k),32&o&&j!==(j=t[9](t[5].start)+"")&&le(a,j),32&o&&E!==(E=t[9](t[5].end)+"")&&le(c,E),16&o&&T!==(T=t[9](t[4].ayah_reps)+"")&&le(f,T),32&o&&q!==(q=t[9](t[5].ayah_reps)+"")&&le(h,q),16&o&&L!==(L=t[9](t[4].all_reps)+"")&&le(b,L),32&o&&O!==(O=t[9](t[5].all_reps)+"")&&le(w,O),N===(N=M(t))&&C?C.p(t,o):(C.d(1),C=N(t),C&&(C.c(),C.m(_,null))),t[11].lang_text[t[3]-1]?P?P.p(t,o):(P=qa(t),P.c(),P.m(e,null)):P&&(P.d(1),P=null),32&o&&he(e,"cont-page",t[5].show_mushaf)},i:$t,o:$t,d(t){t&&Zt(e),S&&S.d(),A&&A.d(),C.d(),P&&P.d()}}}function Oa(t,e,n){let o,r,s,a,i,c;Mt(t,Jn,(t=>n(4,s=t))),Mt(t,Yn,(t=>n(5,a=t))),Mt(t,Bn,(t=>n(14,i=t))),Mt(t,Wn,(t=>n(7,c=t)));let{progress_value:l}=e,{progress_dur:u}=e;const{lang:d}=document.documentElement,f="ar"===d?z:t=>t,p=i;let h;return t.$$set=t=>{"progress_value"in t&&n(0,l=t.progress_value),"progress_dur"in t&&n(1,u=t.progress_dur)},t.$$.update=()=>{48&t.$$.dirty&&n(3,o=ha(a.surah,s.cur)),8&t.$$.dirty&&n(6,r=va(o)),12&t.$$.dirty&&h&&n(2,h.innerText=h.innerText.replace(/data-ayah-id="\d+"/,`data-ayah-id="${o}"`),h)},[l,u,h,o,s,a,r,c,d,f,function(t){return"ar"===d?t.replace(/﴿.*?﴾/g,"
$&"):t},p,t=>{return a.tajweed?(e=((t,e)=>e.reduce(((t,e)=>t[e[0]instanceof RegExp?"replace":"replaceAll"](e[0],e[1])),t))(t,_a),(null==(n=window._useragent)?void 0:n.safari)?e.replace(/([ئبت-خس-غف-نهيی])([^ء-يی\n ]*<[^>]+>[ً-ْٰۖۗۚۛۜ]*)(?=[آ-يی])/g,"$1$2"):e).replace(/<\.(\w.*?)>/g,((t,e)=>`
`)):t;var e,n},function(t){Le[t?"unshift":"push"]((()=>{h=t,n(2,h),n(3,o),n(5,a),n(4,s)}))}]}class Sa extends an{constructor(t){super(),sn(this,t,Oa,La,qt,{progress_value:0,progress_dur:1})}}function Aa(t){let e,n,o,r,s,a,i=t[2].quran[t[1]-1][0]+"";return{c(){e=ee("div"),n=ee("div"),o=ee("p"),r=oe(i),ce(o,"dir","rtl"),ce(o,"class","svelte-18bs6qr"),ce(n,"class","absolute w-full text-center font-[Kitab]"),ce(e,"class","relative")},m(t,s){Qt(t,e,s),Kt(e,n),Kt(n,o),Kt(o,r),a=!0},p(t,e){(!a||2&e)&&i!==(i=t[2].quran[t[1]-1][0]+"")&&le(r,i)},i(t){a||(Pe((()=>{a&&(s||(s=Ze(n,ln,{duration:150},!0)),s.run(1))})),a=!0)},o(t){s||(s=Ze(n,ln,{duration:150},!1)),s.run(0),a=!1},d(t){t&&Zt(e),t&&s&&s.end()}}}function Ma(t){let e,n,o=t[0]&&Aa(t);return{c(){o&&o.c(),e=se()},m(t,r){o&&o.m(t,r),Qt(t,e,r),n=!0},p(t,[n]){t[0]?o?(o.p(t,n),1&n&&Ke(o,1)):(o=Aa(t),o.c(),Ke(o,1),o.m(e.parentNode,e)):o&&(Ve(),Ye(o,1,1,(()=>{o=null})),Xe())},i(t){n||(Ke(o),n=!0)},o(t){Ye(o),n=!1},d(t){o&&o.d(t),t&&Zt(e)}}}function Na(t,e,n){let o,r;Mt(t,Yn,(t=>n(7,o=t))),Mt(t,Bn,(t=>n(8,r=t)));const s=r;let a,i,c=!1,{start:l,end:u,surah:d}=o;return t.$$.update=()=>{248&t.$$.dirty&&(o.start===l&&o.end===u||(clearTimeout(a),n(1,i=ha(o.surah,o.start!==l?o.start:o.end)),d===o.surah&&n(0,c=!0),n(4,({start:l,end:u,surah:d}=o),l,(n(5,u),n(7,o),n(4,l),n(3,a),n(6,d)),(n(6,d),n(7,o),n(4,l),n(5,u),n(3,a))),n(3,a=setTimeout((()=>{n(0,c=!1)}),1500))))},[c,i,s,a,l,u,d,o]}class Ca extends an{constructor(t){super(),sn(this,t,Na,Ma,qt,{})}}function Pa(t){let e,n,o,r,s,a;return{c(){e=ee("div"),n=ee("button"),n.textContent="–",o=re(),r=ee("button"),r.textContent="+",ce(n,"class","decrease svelte-11emc99"),ce(n,"title","أقل"),ce(r,"class","increase svelte-11emc99"),ce(r,"title","أكثر"),ce(e,"class","ps-2")},m(i,c){Qt(i,e,c),Kt(e,n),Kt(e,o),Kt(e,r),s||(a=[Rt(I.call(null,n,t[1])),Rt(I.call(null,r,t[2]))],s=!0)},p:$t,i:$t,o:$t,d(t){t&&Zt(e),s=!1,Et(a)}}}function Da(t){const e=Ee();return[e,()=>e("input",-1),()=>e("input",1)]}class za extends an{constructor(t){super(),sn(this,t,Da,Pa,qt,{})}}function Fa(t){let e,n,o;return{c(){e=ee("button"),e.innerHTML='',ce(e,"class","close-btn svelte-kfyj2r"),he(e,"active",t[0])},m(r,s){Qt(r,e,s),n||(o=ae(e,"click",t[1]),n=!0)},p(t,[n]){1&n&&he(e,"active",t[0])},i:$t,o:$t,d(t){t&&Zt(e),n=!1,o()}}}function Ra(t,e,n){let{active:o=!1}=e;return t.$$set=t=>{"active"in t&&n(0,o=t.active)},[o,function(e){Te.call(this,t,e)}]}class Ia extends an{constructor(t){super(),sn(this,t,Ra,Fa,qt,{active:0})}}function Ha(t){let e,n,o,r,s,a;return{c(){e=ne("svg"),n=ne("path"),o=ne("animate"),ce(o,"begin","indefinite"),ce(o,"attributeName","d"),ce(o,"fill","freeze"),ce(o,"dur","0.1s"),ce(o,"data-to","M11,10 L15,10 15,26 11,26 M17,10 L21,10 21,26 17,26"),ce(n,"d","M11,10 L16.46,13.74 L16.46,22.28 L11,26 M16.46,13.74 L22.7,18 L22.7,18 L16.46,22.28"),ce(e,"viewBox","8 10 16 16"),ce(e,"fill","#555555")},m(i,c){Qt(i,e,c),Kt(e,n),Kt(n,o),s||(a=Rt(r=Ba.call(null,e,t[0])),s=!0)},p(t,[e]){r&&Tt(r.update)&&1&e&&r.update.call(null,t[0])},i:$t,o:$t,d(t){t&&Zt(e),s=!1,a()}}}function Ba(t){const e=t.querySelector("animate");return e.dataset.from=t.querySelector("path").getAttribute("d"),{update:function(t){e.setAttribute("from",e.dataset[t?"from":"to"]),e.setAttribute("to",e.dataset[t?"to":"from"]),e.beginElement()}}}function Ua(t,e,n){let{playing:o=!1}=e;return t.$$set=t=>{"playing"in t&&n(0,o=t.playing)},[o]}class Wa extends an{constructor(t){super(),sn(this,t,Ua,Ha,qt,{playing:0})}}function Ga(t){let e,n,o,r,s;return n=new Wa({props:{playing:t[2]}}),{c(){e=ee("button"),nn(n.$$.fragment),e.disabled=t[3],ce(e,"title","شغل/قف"),ce(e,"tabindex","0"),ce(e,"class","svelte-1gqbfif"),he(e,"sm",t[1])},m(a,i){Qt(a,e,i),on(n,e,null),t[5](e),o=!0,r||(s=ae(e,"click",t[4]),r=!0)},p(t,[r]){const s={};4&r&&(s.playing=t[2]),n.$set(s),(!o||8&r)&&(e.disabled=t[3]),(!o||2&r)&&he(e,"sm",t[1])},i(t){o||(Ke(n.$$.fragment,t),o=!0)},o(t){Ye(n.$$.fragment,t),o=!1},d(o){o&&Zt(e),rn(n),t[5](null),r=!1,s()}}}function Va(t,e,n){let{small:o=!1}=e,{playing:r=!1}=e,{disabled:s=!1}=e,{button:a}=e;return t.$$set=t=>{"small"in t&&n(1,o=t.small),"playing"in t&&n(2,r=t.playing),"disabled"in t&&n(3,s=t.disabled),"button"in t&&n(0,a=t.button)},[a,o,r,s,function(e){Te.call(this,t,e)},function(t){Le[t?"unshift":"push"]((()=>{a=t,n(0,a)}))}]}class Xa extends an{constructor(t){super(),sn(this,t,Va,Ga,qt,{small:1,playing:2,disabled:3,button:0})}}function Ka(t,e,n,o){const r=(o=o||document.body).clientWidth,s=o.clientHeight,a=t.offsetWidth,i=t.offsetHeight,c=e.right-e.left,l=e.bottom-e.top,u=e.top+l/2-i/2<0,d=e.left+c/2-a/2<0,f=e.left+a/2+c/2>=r,p=e.top+i/2+l/2>=s,h=e.top-i<0,m=e.left-a<0,v=e.top+i+l>=s,g=e.left+a+c>=r;("left"===n||"right"===n)&&m&&g&&(n="top"),"top"===n&&h&&(n="bottom"),"bottom"===n&&v&&!h&&(n="top"),"left"===n&&m&&(n="right"),"right"===n&&g&&(n="left"),t.classList.contains(n)||(t.className=t.className.replace(/\b(top|bottom|left|right)+/,n));const b=function(t){return t===document.body?{x:window.scrollX,y:window.scrollY}:{x:t.offsetLeft+t.scrollLeft,y:t.offsetTop+t.scrollTop}}(o),y=t.classList.contains("popover"),w=t.querySelector(".tip-arrow"),$=w?w.offsetWidth:0,_=w?w.offsetHeight:0;let x,k,j,E;"left"===n||"right"===n?(E="left"===n?e.left+b.x-a-(y?$:0):e.left+b.x+c,u?(j=e.top+b.y,w&&(x=l/2-$)):p?(j=e.top+b.y-i+l,w&&(x=i-l/2-$)):(j=e.top+b.y-i/2+l/2,w&&(x=i/2-(y?.9*_:_/2)))):"top"!==n&&"bottom"!==n||(j="top"===n?e.top+b.y-i-(y?_:0):e.top+b.y+l,d?(E=0,w&&(k=e.left+c/2-$)):f?(E=r-1.01*a,w&&(k=a-(r-e.left)+c/2-$/2)):(E=e.left+b.x-a/2+c/2,w&&(k=a/2-$/2))),t.style.top=j+"px",t.style.left=E+"px",x&&(w.style.top=x+"px"),k&&(w.style.left=k+"px")}function Ya(t){let e,n,o,r,s,a,i,c,l,u,d,f,p=t[0].msg+"",h=t[0].ok_btn&&Ja(t);return{c(){e=ee("div"),n=ee("div"),o=re(),r=ee("div"),s=new ve(!1),a=re(),h&&h.c(),ce(n,"class","tip-arrow svelte-1w137t9"),s.a=a,ce(r,"class","tooltip-inner svelte-1w137t9"),ce(e,"role","tooltip"),ce(e,"class",i="tooltip tooltip-"+t[0].direction+" slide-up-fade-in svelte-1w137t9")},m(i,l){Qt(i,e,l),Kt(e,n),Kt(e,o),Kt(e,r),s.m(p,r),Kt(r,a),h&&h.m(r,null),u=!0,d||(f=Rt(c=t[1].call(null,e,t[0])),d=!0)},p(t,n){(!u||1&n)&&p!==(p=t[0].msg+"")&&s.p(p),t[0].ok_btn?h?h.p(t,n):(h=Ja(t),h.c(),h.m(r,null)):h&&(h.d(1),h=null),(!u||1&n&&i!==(i="tooltip tooltip-"+t[0].direction+" slide-up-fade-in svelte-1w137t9"))&&ce(e,"class",i),c&&Tt(c.update)&&1&n&&c.update.call(null,t[0])},i(t){u||(l&&l.end(1),u=!0)},o(t){l=Qe(e,ln,{duration:200}),u=!1},d(t){t&&Zt(e),h&&h.d(),t&&l&&l.end(),d=!1,f()}}}function Ja(t){let e,n,o;return{c(){e=ee("button"),e.textContent="✔",ce(e,"class","ok svelte-1w137t9")},m(r,s){Qt(r,e,s),n||(o=ae(e,"click",t[3]),n=!0)},p:$t,d(t){t&&Zt(e),n=!1,o()}}}function Qa(t){let e,n,o,r,s=t[0].show&&Ya(t);return{c(){e=ee("div"),s&&s.c()},m(a,i){Qt(a,e,i),s&&s.m(e,null),t[6](e),n=!0,o||(r=[ae(window,"resize",(function(){Tt(R(t[2],12))&&R(t[2],12).apply(this,arguments)})),ae(e,"mouseover",t[4]),ae(e,"focus",t[5]),ae(e,"mouseleave",ai)],o=!0)},p(n,[o]){(t=n)[0].show?s?(s.p(t,o),1&o&&Ke(s,1)):(s=Ya(t),s.c(),Ke(s,1),s.m(e,null)):s&&(Ve(),Ye(s,1,1,(()=>{s=null})),Xe())},i(t){n||(Ke(s),n=!0)},o(t){Ye(s),n=!1},d(n){n&&Zt(e),s&&s.d(),t[6](null),o=!1,Et(r)}}}const Za=Sn({direction:"top"});let ti,ei;function ni(t,e){const n={show:!0,direction:"top",attach_to:e,ok_btn:!1};return()=>{t.msg=function(){var t;let n="";return e.getAttribute("title")||e.dataset.title?(n=e.getAttribute("title")||e.dataset.title,e.removeAttribute("title"),e.dataset.title=n):"TEMPLATE"===(null==(t=e.nextElementSibling)?void 0:t.tagName)&&(n=e.nextElementSibling.innerHTML),n}(),si=!1,Za.set({...n,...t}),t.timeout&&(clearTimeout(ei),ei=setTimeout((()=>Za.set({show:!1})),t.timeout))}}function oi(t){ti.contains(t.target)||Za.set({show:!1})}const ri=R((()=>{si&&Za.set({show:!1})}),100);let si=!0;function ai(t){"hover"===At(Za).type&&(si=!0,ri())}function ii(t,e){const n=ni({...e,type:"click"},t);return t.addEventListener("click",n),{destroy(){t.removeEventListener("click",n)}}}function ci(t,e,n){let o,r=$t;var s,a,i;return Mt(t,Za,(t=>n(0,o=t))),t.$$.on_destroy.push((()=>r())),s=document,a="mousedown",i=oi,s.addEventListener(a,i,!1),je((()=>{((t,e,n)=>{t.removeEventListener(e,n,!1)})(document,"mousedown",oi)})),[o,function(t){async function e(){o.show&&(await Ce(),Ka(t,o.attach_to.getBoundingClientRect(),o.direction||"top"))}return e(),{update:e}},()=>{Za.set(o)},()=>Ft(Za,o.show=!1,o),()=>{si=!1},()=>{si=!1},function(t){Le[t?"unshift":"push"]((()=>{ti=t}))}]}class li extends an{constructor(t){super(),sn(this,t,ci,Qa,qt,{})}}const{document:ui}=Xt,di=t=>({}),fi=t=>({show:t[3]});function pi(t){let e,n,o;const r=t[8].default,s=Nt(r,t,t[7],null);return{c(){e=ee("div"),s&&s.c(),ce(e,"class","absolute z-10")},m(n,r){Qt(n,e,r),s&&s.m(e,null),t[9](e),o=!0},p(t,e){s&&s.p&&(!o||128&e)&&Dt(s,r,t,t[7],o?Pt(r,t[7],e,null):zt(t[7]),null)},i(t){o||(Ke(s,t),t&&Pe((()=>{o&&(n||(n=Ze(e,un,{duration:150,y:10},!0)),n.run(1))})),o=!0)},o(t){Ye(s,t),t&&(n||(n=Ze(e,un,{duration:150,y:10},!1)),n.run(0)),o=!1},d(o){o&&Zt(e),s&&s.d(o),t[9](null),o&&n&&n.end()}}}function hi(t){let e,n,o,r,s;const a=t[8].button,i=Nt(a,t,t[7],fi);let c=t[0]&&pi(t);return{c(){i&&i.c(),e=re(),c&&c.c(),n=re()},m(a,l){i&&i.m(a,l),Qt(a,e,l),c&&c.m(a,l),Qt(a,n,l),o=!0,r||(s=[ae(window,"resize",t[2]),ae(ui,"mouseup",t[10])],r=!0)},p(t,[e]){i&&i.p&&(!o||128&e)&&Dt(i,a,t,t[7],o?Pt(a,t[7],e,di):zt(t[7]),fi),t[0]?c?(c.p(t,e),1&e&&Ke(c,1)):(c=pi(t),c.c(),Ke(c,1),c.m(n.parentNode,n)):c&&(Ve(),Ye(c,1,1,(()=>{c=null})),Xe())},i(t){o||(Ke(i,t),Ke(c),o=!0)},o(t){Ye(i,t),Ye(c),o=!1},d(t){i&&i.d(t),t&&Zt(e),c&&c.d(t),t&&Zt(n),r=!1,Et(s)}}}function mi(t,e,n){let o,{$$slots:r={},$$scope:s}=e,{hide_on_click:a=!0}=e,{append_to_body:i=!1}=e,{shown:c=!1}=e,l=null;function u(){c&&o&&Ka(o,o.previousElementSibling.getBoundingClientRect(),"bottom")}function d(t){if(!t.screenX)return;const e=t.target;c&&o&&(!o.contains(e)||a&&"INPUT"!==e.tagName)&&setTimeout((()=>n(0,c=!1)),t.target===l?200:80)}return t.$$set=t=>{"hide_on_click"in t&&n(5,a=t.hide_on_click),"append_to_body"in t&&n(6,i=t.append_to_body),"shown"in t&&n(0,c=t.shown),"$$scope"in t&&n(7,s=t.$$scope)},[c,o,u,async function(t){l=t.target,await new Promise((t=>setTimeout(t,50))),c?t.screenX||n(0,c=!1):(n(0,c=!0),await Ce(),u(),i&&document.body.appendChild(o))},d,a,i,s,r,function(t){Le[t?"unshift":"push"]((()=>{o=t,n(1,o)}))},t=>setTimeout((()=>d(t)),5)]}class vi extends an{constructor(t){super(),sn(this,t,mi,hi,qt,{hide_on_click:5,append_to_body:6,shown:0})}}function gi(t){let e,n,o,r;return{c(){e=ee("input"),n=ee("div"),ce(e,"type","checkbox"),e.hidden=!0,ce(e,"class","svelte-1vd7q1r"),ce(n,"class","svelte-1vd7q1r")},m(s,a){Qt(s,e,a),e.checked=t[0],Qt(s,n,a),o||(r=[ae(e,"change",t[2]),ae(e,"change",t[1])],o=!0)},p(t,[n]){1&n&&(e.checked=t[0])},i:$t,o:$t,d(t){t&&Zt(e),t&&Zt(n),o=!1,Et(r)}}}function bi(t,e,n){let{value:o=!1}=e;return t.$$set=t=>{"value"in t&&n(0,o=t.value)},[o,function(e){Te.call(this,t,e)},function(){o=this.checked,n(0,o)}]}class yi extends an{constructor(t){super(),sn(this,t,bi,gi,qt,{value:0})}}const{window:wi}=Xt;function $i(t,e,n){const o=t.slice();return o[50]=e[n],o[52]=n,o}function _i(t,e,n){const o=t.slice();return o[53]=e[n][0],o[54]=e[n][1],o[52]=n,o}function xi(t){let e,n,o,r,s,a,i,c,l,u,d,f,p,h,m,v,g,b,y,w,$,_,x,k,j,E,T,q,L,O,S,A,M,N,C,P,D=t[1].playback_rate.toFixed(2)+"";function z(e){t[25](e)}let F={};function R(e){t[26](e)}void 0!==t[1].show_mushaf&&(F.value=t[1].show_mushaf),x=new yi({props:F}),Le.push((()=>en(x,"value",z)));let H={};return void 0!==t[1].tajweed&&(H.value=t[1].tajweed),O=new yi({props:H}),Le.push((()=>en(O,"value",R))),{c(){e=ee("ul"),n=ee("div"),o=ee("button"),o.innerHTML='',r=re(),s=ee("button"),s.innerHTML='',a=re(),i=ee("div"),c=ee("button"),c.innerHTML='',u=re(),d=ee("span"),f=oe(D),p=oe("x"),h=re(),m=ee("button"),m.innerHTML='',b=re(),y=ee("label"),w=ne("svg"),$=ne("use"),_=oe(" مصحف "),nn(x.$$.fragment),j=re(),E=ee("label"),T=ne("svg"),q=ne("use"),L=oe(" عرض مصحف التجويد "),nn(O.$$.fragment),A=re(),M=ee("button"),M.innerHTML=' نسخ',ce(o,"class","text-center flex-1 svelte-612ciq"),ce(s,"class","text-center flex-1 svelte-612ciq"),ce(n,"class","flex flex-1 svelte-612ciq"),ce(n,"dir","ltr"),ce(c,"class","flex-1 svelte-612ciq"),ce(d,"class","w-[3rem] text-xs"),ce(m,"class","flex-1 svelte-612ciq"),ce(i,"class","flex items-center text-center svelte-612ciq"),ce(i,"dir","ltr"),i.hidden=g=t[9].hide_distractions,ce($,"href","#icon-book"),ce(w,"class","icon icon-book svelte-612ciq"),ce(y,"class","flex items-center justify-between svelte-612ciq"),ce(q,"href","#icon-tajweed"),ce(T,"class","icon icon-tajweed svelte-612ciq"),ce(E,"class","flex items-center justify-between svelte-612ciq"),ce(M,"title","نسخ"),ce(M,"class","svelte-612ciq"),ce(e,"class","popover popover-menu w-[8rem] svelte-612ciq")},m(g,k){Qt(g,e,k),Kt(e,n),Kt(n,o),Kt(n,r),Kt(n,s),Kt(e,a),Kt(e,i),Kt(i,c),Kt(i,u),Kt(i,d),Kt(d,f),Kt(d,p),Kt(i,h),Kt(i,m),Kt(e,b),Kt(e,y),Kt(y,w),Kt(w,$),Kt(y,_),on(x,y,null),Kt(e,j),Kt(e,E),Kt(E,T),Kt(T,q),Kt(E,L),on(O,E,null),Kt(e,A),Kt(e,M),N=!0,C||(P=[ae(o,"click",t[21]),ae(s,"click",t[22]),Rt(l=I.call(null,c,t[23])),Rt(v=I.call(null,m,t[24])),ae(M,"click",t[27])],C=!0)},p(t,e){l&&Tt(l.update)&&2&e[0]&&l.update.call(null,t[23]),(!N||2&e[0])&&D!==(D=t[1].playback_rate.toFixed(2)+"")&&le(f,D),v&&Tt(v.update)&&2&e[0]&&v.update.call(null,t[24]),(!N||512&e[0]&&g!==(g=t[9].hide_distractions))&&(i.hidden=g);const n={};!k&&2&e[0]&&(k=!0,n.value=t[1].show_mushaf,De((()=>k=!1))),x.$set(n);const o={};!S&&2&e[0]&&(S=!0,o.value=t[1].tajweed,De((()=>S=!1))),O.$set(o)},i(t){N||(Ke(x.$$.fragment,t),Ke(O.$$.fragment,t),N=!0)},o(t){Ye(x.$$.fragment,t),Ye(O.$$.fragment,t),N=!1},d(t){t&&Zt(e),rn(x),rn(O),C=!1,Et(P)}}}function ki(t){let e,n,o;return{c(){e=ee("button"),e.innerHTML='',ce(e,"class","options-btn svelte-612ciq"),ce(e,"slot","button"),ce(e,"title","خصائص")},m(r,s){Qt(r,e,s),n||(o=ae(e,"click",(function(){Tt(t[56])&&t[56].apply(this,arguments)})),n=!0)},p(e,n){t=e},d(t){t&&Zt(e),n=!1,o()}}}function ji(t){let e,n,o=t[54].name+"";return{c(){e=ee("option"),n=oe(o),e.__value=t[53],e.value=e.__value},m(t,o){Qt(t,e,o),Kt(e,n)},p:$t,d(t){t&&Zt(e)}}}function Ei(t){let e,n,o;return{c(){e=ee("div"),n=ee("progress"),n.value=o=t[10][t[2].src],ce(n,"max","1"),ce(n,"class","svelte-612ciq"),ce(e,"class","relative")},m(t,o){Qt(t,e,o),Kt(e,n)},p(t,e){1028&e[0]&&o!==(o=t[10][t[2].src])&&(n.value=o)},d(t){t&&Zt(e)}}}function Ti(t){let e,n,o,r,s=t[13](t[52]+1)+"",a=t[50]+"";return{c(){e=ee("option"),n=oe(s),o=oe("- "),r=oe(a),e.__value=t[52]+1,e.value=e.__value},m(t,s){Qt(t,e,s),Kt(e,n),Kt(e,o),Kt(e,r)},p:$t,d(t){t&&Zt(e)}}}function qi(t){let e,n,o,r,s,a,i,c,l,u,d,f,p,h,m,v,g,b,y,w,$,_,x,k,j,E,T,q,L,O,S,A,M,N,C,P,D,z,F,R,I,H,U,W,G,V,X,K,Y,J,Q,Z,tt,et,nt,ot,rt,st,at,it,ct,lt,ut,dt,ft,pt,ht,mt,vt,gt,bt,yt,wt,$t,_t,xt,kt,jt,qt,Lt,Ot,St,At,Mt,Nt,Ct,Pt,Dt,zt,Ft,It,Ht,Bt,Ut;function Wt(e){t[20](e)}let Gt={small:t[0]&&t[1].show_mushaf,disabled:!(t[8]&&t[2].can_seek),playing:t[5]};void 0!==t[4]&&(Gt.button=t[4]),n=new Xa({props:Gt}),Le.push((()=>en(n,"button",Wt))),n.$on("click",t[15]),i=new vi({props:{hide_on_click:!1,$$slots:{button:[ki,({show:t})=>({56:t}),({show:t})=>[0,t?33554432:0]],default:[xi]},$$scope:{ctx:t}}}),d=new Sa({props:{progress_value:t[6],progress_dur:t[7]}}),h=new Ca({});let Vt=Object.entries(t[11]),Xt=[];for(let e=0;een(Mt,"show",se))),Pt=new li({}),zt=new rr({}),It=new zn({}),{c(){e=ee("main"),nn(n.$$.fragment),r=re(),s=ee("div"),a=ee("div"),nn(i.$$.fragment),c=re(),l=ee("button"),l.innerHTML='',u=re(),nn(d.$$.fragment),p=re(),nn(h.$$.fragment),m=re(),v=ee("div"),g=ee("ul"),b=ee("select");for(let t=0;tt[28].call(b))),ce($,"class","form-select bg-transparent block w-full border-b border-gray-600 px-2 py-1"),void 0===t[1].surah&&Pe((()=>t[29].call($))),ce(j,"class","px-1 text-gray-500"),ce(T,"class","w-10 svelte-612ciq"),ce(T,"type","text"),ce(T,"inputmode","numeric"),ce(T,"pattern","[1-9]+[0-9]*"),T.required=!0,ce(k,"class","flex items-center"),ce(M,"class","px-1 text-gray-500"),ce(C,"class","w-10 svelte-612ciq"),ce(C,"type","text"),ce(C,"inputmode","numeric"),ce(C,"pattern","[1-9]+[0-9]*"),C.required=!0,ce(A,"class","flex items-center"),ce(x,"class","flex justify-between items-center px-2 py-1 rounded-b"),ce(g,"class","mt-4 rounded border border-gray-600"),ce(W,"href","#icon-repeat"),ce(U,"class","icon icon-repeat svelte-612ciq"),ce(X,"class","has-tip svelte-612ciq"),ce(X,"title","كم مرة تكرر الآيات المختارة"),ce(V,"class","inline-block w-12 ipad-no-height svelte-612ciq"),ce(Y,"type","text"),ce(Y,"class","w-11 svelte-612ciq"),Y.value=J=t[1].all_reps,Y.readOnly=!0,Y.required=!0,ce(I,"class","flex justify-between items-center px-2 py-1 border-b border-gray-600 rounded-t"),ce(rt,"href","#icon-repeat-one"),ce(ot,"class","icon icon-repeat-one svelte-612ciq"),ce(it,"class","has-tip svelte-612ciq"),ce(it,"title","كم مرة تكرر كل آية وحدها"),ce(at,"class","inline-block w-12 ipad-no-height svelte-612ciq"),ce(lt,"type","text"),ce(lt,"class","w-11 svelte-612ciq"),lt.value=ut=t[1].ayah_reps,lt.readOnly=!0,lt.required=!0,ce(et,"class","flex justify-between items-center px-2 py-1 border-b border-gray-600"),ce(gt,"href","#icon-hourglass"),ce(vt,"class","icon icon-hourglass svelte-612ciq"),ce(wt,"class","has-tip svelte-612ciq"),ce(wt,"title","السكت بعد كل آية، حسب طول الآية"),ce(yt,"class","inline-block w-12 ipad-no-height svelte-612ciq"),ce(_t,"type","text"),ce(_t,"class","w-11 svelte-612ciq"),_t.value=xt=(11===t[1].delay?"∞":t[1].delay)+"x",_t.readOnly=!0,_t.required=!0,ce(ht,"class","flex justify-between items-center px-2 py-1 rounded-b"),ce(R,"class","mt-4 rounded border border-gray-600"),v.hidden=t[0],ce(e,"class","py-4"),Lt.hidden=St=t[9].hide_distractions},m(o,f){Qt(o,e,f),on(n,e,null),Kt(e,r),Kt(e,s),Kt(s,a),on(i,a,null),Kt(a,c),Kt(a,l),Kt(s,u),on(d,s,null),Kt(e,p),on(h,e,null),Kt(e,m),Kt(e,v),Kt(v,g),Kt(g,b);for(let t=0;to=!1))),n.$set(r);const a={};514&e[0]|100663296&e[1]&&(a.$$scope={dirty:e,ctx:t}),i.$set(a);const c={};if(64&e[0]&&(c.progress_value=t[6]),128&e[0]&&(c.progress_dur=t[7]),d.$set(c),(!Ht||1&e[0]&&f!==(f=!t[0]))&&(s.hidden=f),2048&e[0]){let n;for(Vt=Object.entries(t[11]),n=0;nNt=!1))),Mt.$set(u)},i(t){Ht||(Ke(n.$$.fragment,t),Ke(i.$$.fragment,t),Ke(d.$$.fragment,t),Ke(h.$$.fragment,t),Ke(O.$$.fragment,t),Ke(z.$$.fragment,t),Ke(Z.$$.fragment,t),Ke(ft.$$.fragment,t),Ke(jt.$$.fragment,t),Ke(Ot.$$.fragment,t),Ke(Mt.$$.fragment,t),Ke(Pt.$$.fragment,t),Ke(zt.$$.fragment,t),Ke(It.$$.fragment,t),Ht=!0)},o(t){Ye(n.$$.fragment,t),Ye(i.$$.fragment,t),Ye(d.$$.fragment,t),Ye(h.$$.fragment,t),Ye(O.$$.fragment,t),Ye(z.$$.fragment,t),Ye(Z.$$.fragment,t),Ye(ft.$$.fragment,t),Ye(jt.$$.fragment,t),Ye(Ot.$$.fragment,t),Ye(Mt.$$.fragment,t),Ye(Pt.$$.fragment,t),Ye(zt.$$.fragment,t),Ye(It.$$.fragment,t),Ht=!1},d(t){t&&Zt(e),rn(n),rn(i),rn(d),rn(h),te(Xt,t),Yt&&Yt.d(),te(oe,t),rn(O),rn(z),rn(Z),rn(ft),rn(jt),t&&Zt(qt),t&&Zt(Lt),rn(Ot),t&&Zt(At),rn(Mt,t),t&&Zt(Ct),rn(Pt,t),t&&Zt(Dt),rn(zt,t),t&&Zt(Ft),rn(It,t),Bt=!1,Et(Ut)}}}function Li(t,e){t.addEventListener("keydown",(t=>{"ArrowUp"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),e("ArrowDown"===t.key?-1:1))}))}function Oi(t,e,n){let o,r,s,a,i,c,l;Mt(t,Yn,(t=>n(1,r=t))),Mt(t,Jn,(t=>n(18,s=t))),Mt(t,Qn,(t=>n(2,a=t))),Mt(t,Bn,(t=>n(46,i=t))),Mt(t,Wn,(t=>n(9,c=t))),Mt(t,oo,(t=>n(10,l=t)));const u=i,{qaris:d,surah_names:f}=window.__METADATA__,{lang:p}=document.documentElement,h="ar"===p?z:t=>t;let m,v,g=!1,b=!1,y=!1,w=0,$=0;function _(){Zn.pause(),n(0,b=!1),n(5,y=!1),clearTimeout(v),n(6,w=0),document.title=window.BASE_TITLE,Ft(Jn,s={cur:r.start,all_reps:1,ayah_reps:1},s)}let x,k=!0;function j(){if(y){n(7,$=0);const{cur:t}=s;n(6,w=(Zn.currentTime-o[t-1])/(o[t]-o[t-1])),Zn.pause(),n(5,y=!1),clearTimeout(v)}else{if(!b){const t=u.mushaf_data.surah_lengths[r.surah-1];o.length===t&&o.push(Zn.duration),k=Zn.src.startsWith("blob:"),r.start>r.end&&Ft(Yn,r.start=r.end,r),Zn.currentTime=o[r.start-1],Ft(Jn,s={cur:r.start,all_reps:1,ayah_reps:1},s),n(6,w=0)}Zn.play().then((()=>{n(7,$=(o[s.cur]-Zn.currentTime)/r.playback_rate),setTimeout((()=>{n(6,w=1)}),20)})),n(5,y=!0),n(0,b=!0)}}function E(t){let{cur:e,all_reps:a}=s;const{start:i,end:c}=r;e!==r.end||a!==r.all_reps||1!==t?(a>1&&-1===t&&e===i?(a--,e=r.end):a{n(7,$=(o[e]-o[e-1])/r.playback_rate),n(6,w=1)}),50)):_()}function T(){const t=ha(r.surah,s.cur),e=u.lang_text[t-1];U(`﴿${u.quran[t-1][0]}﴾ (${z(s.cur)})`+(e?"\n"+e:""),window._useragent.android_webview)}return Zn.on("ratechange",(()=>{if(!y)return;clearTimeout(x);const{cur:t}=s;n(7,$=0),n(6,w=(Zn.currentTime-o[t-1])/(o[t]-o[t-1])),x=setTimeout((()=>{n(7,$=(o[t]-Zn.currentTime)/r.playback_rate),n(6,w=1)}),10)})),Zn.on("timeupdate",(()=>{!Zn.paused&&Zn.currentTime>=o[s.cur]-1.8*Zn.playbackRate*.2&&function(){let{cur:t,all_reps:e,ayah_reps:i}=s,c=(o[t]-o[t-1])*r.delay/r.playback_rate;t!==r.end||e!==r.all_reps||i!==r.ayah_reps?(ir.end&&(t=r.start,e++,to.volume=.5,to.play(),c=c||1),t!==s.cur+1&&(Zn.currentTime=o[t-1]),Ft(Jn,s={cur:t,all_reps:e,ayah_reps:i},s),c?(Zn.pause(),n(7,$=c),n(6,w=0)):n(6,w=n(7,$=0)),v=setTimeout((()=>{if(y){if(!k&&a.blob_url){const{currentTime:t}=Zn;Zn.src=a.blob_url,Zn.playbackRate=r.playback_rate,Zn.currentTime=t,k=!0}Zn.paused&&Zn.play(),setTimeout((()=>{n(7,$=(o[t]-o[t-1])/r.playback_rate),n(6,w=1)}),50)}}),1e3*c)):_()}()})),t.$$.update=()=>{4&t.$$.dirty[0]&&n(8,o=a.timings),262147&t.$$.dirty[0]&&(document.title=(b?`${f[r.surah-1]} ${h(s.cur)} | `:"")+window.BASE_TITLE),3&t.$$.dirty[0]&&b&&r.show_mushaf&&setTimeout((()=>{document.querySelector(".cont").scrollIntoView({behavior:"smooth"})}),700)},[b,r,a,g,m,y,w,$,o,c,l,d,f,h,_,j,E,T,s,t=>{var e,n;null==(n=(e={Escape:_,Space(){document.activeElement!==m&&j()}})[t.code])||n.call(e)},function(t){m=t,n(4,m)},()=>{E(-1)},()=>{E(1)},()=>Ft(Yn,r.playback_rate-=.05,r),()=>Ft(Yn,r.playback_rate+=.05,r),function(e){t.$$.not_equal(r.show_mushaf,e)&&(r.show_mushaf=e,Yn.set(r))},function(e){t.$$.not_equal(r.tajweed,e)&&(r.tajweed=e,Yn.set(r))},()=>T(),function(){r.qari=pe(this),Yn.set(r),n(11,d)},function(){r.surah=pe(this),Yn.set(r),n(11,d)},function(){r.start=this.value,Yn.set(r),n(11,d)},t=>Ft(Yn,r.start+=t,r),t=>Ft(Yn,r.start+=t.detail,r),function(){r.end=this.value,Yn.set(r),n(11,d)},t=>Ft(Yn,r.end+=t,r),t=>Ft(Yn,r.end+=t.detail,r),t=>Ft(Yn,r.all_reps=F(+r.all_reps+t.detail,1,100),r),t=>Ft(Yn,r.ayah_reps=F(+r.ayah_reps+t.detail,1,100),r),t=>Ft(Yn,r.delay=F(r.delay+t.detail/2,0,2),r),()=>n(3,g=!g),function(t){g=t,n(3,g)}]}class Si extends an{constructor(t){super(),sn(this,t,Oi,qi,qt,{},null,[-1,-1])}}const Ai=new Date,Mi=Wn.subscribe((t=>{t.loaded&&(Mi(),new Si({target:document.body}),setTimeout((()=>{const t=document.querySelector("#page-loading");t.style.opacity=0,t.addEventListener("transitionend",t.remove)}),Math.max(1e3-(new Date-Ai),0)))}))}},function(){return e||(0,t[n(t)[0]])((e={exports:{}}).exports,e),e.exports});export default o();المقرئ
