-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
5 lines (5 loc) · 9.6 KB
/
main.js
1
2
3
4
5
var x=Object.defineProperty;var ee=(e,t,n)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var z=(e,t,n)=>(ee(e,typeof t!="symbol"?t+"":t,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))l(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const _ of o.addedNodes)_.tagName==="LINK"&&_.rel==="modulepreload"&&l(_)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function l(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function M(){}function X(e){return e()}function V(){return Object.create(null)}function B(e){e.forEach(X)}function Y(e){return typeof e=="function"}function te(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}function ne(e){return Object.keys(e).length===0}function P(e,t){e.appendChild(t)}function c(e,t,n){e.insertBefore(t,n||null)}function s(e){e.parentNode&&e.parentNode.removeChild(e)}function E(e){return document.createElement(e)}function p(e){return document.createTextNode(e)}function R(){return p(" ")}function U(){return p("")}function T(e,t,n,l){return e.addEventListener(t,n,l),()=>e.removeEventListener(t,n,l)}function O(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function le(e){return Array.from(e.childNodes)}function g(e,t){t=""+t,e.data!==t&&(e.data=t)}function G(e,t,n,l){n==null?e.style.removeProperty(t):e.style.setProperty(t,n,l?"important":"")}let j;function I(e){j=e}function ie(){if(!j)throw new Error("Function called outside component initialization");return j}function oe(e){ie().$$.on_mount.push(e)}const A=[],J=[];let S=[];const Q=[],re=Promise.resolve();let q=!1;function fe(){q||(q=!0,re.then(Z))}function H(e){S.push(e)}const F=new Set;let L=0;function Z(){if(L!==0)return;const e=j;do{try{for(;L<A.length;){const t=A[L];L++,I(t),ue(t.$$)}}catch(t){throw A.length=0,L=0,t}for(I(null),A.length=0,L=0;J.length;)J.pop()();for(let t=0;t<S.length;t+=1){const n=S[t];F.has(n)||(F.add(n),n())}S.length=0}while(A.length);for(;Q.length;)Q.pop()();q=!1,F.clear(),I(e)}function ue(e){if(e.fragment!==null){e.update(),B(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(H)}}function se(e){const t=[],n=[];S.forEach(l=>e.indexOf(l)===-1?t.push(l):n.push(l)),n.forEach(l=>l()),S=t}const ce=new Set;function de(e,t){e&&e.i&&(ce.delete(e),e.i(t))}function _e(e,t,n){const{fragment:l,after_update:i}=e.$$;l&&l.m(t,n),H(()=>{const o=e.$$.on_mount.map(X).filter(Y);e.$$.on_destroy?e.$$.on_destroy.push(...o):B(o),e.$$.on_mount=[]}),i.forEach(H)}function pe(e,t){const n=e.$$;n.fragment!==null&&(se(n.after_update),B(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function ae(e,t){e.$$.dirty[0]===-1&&(A.push(e),fe(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function me(e,t,n,l,i,o,_=null,k=[-1]){const b=j;I(e);const u=e.$$={fragment:null,ctx:[],props:o,update:M,not_equal:i,bound:V(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(b?b.$$.context:[])),callbacks:V(),dirty:k,skip_bound:!1,root:t.target||b.$$.root};_&&_(u.root);let r=!1;if(u.ctx=n?n(e,t.props||{},(f,m,...w)=>{const v=w.length?w[0]:m;return u.ctx&&i(u.ctx[f],u.ctx[f]=v)&&(!u.skip_bound&&u.bound[f]&&u.bound[f](v),r&&ae(e,f)),m}):[],u.update(),r=!0,B(u.before_update),u.fragment=l?l(u.ctx):!1,t.target){if(t.hydrate){const f=le(t.target);u.fragment&&u.fragment.l(f),f.forEach(s)}else u.fragment&&u.fragment.c();t.intro&&de(e.$$.fragment),_e(e,t.target,t.anchor),Z()}I(b)}class be{constructor(){z(this,"$$");z(this,"$$set")}$destroy(){pe(this,1),this.$destroy=M}$on(t,n){if(!Y(n))return M;const l=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return l.push(n),()=>{const i=l.indexOf(n);i!==-1&&l.splice(i,1)}}$set(t){this.$$set&&!ne(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const ke="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ke);function ye(e){let t,n,l,i,o,_=e[5](e[1])+"",k,b,u=e[5](e[2])+"",r,f,m;function w(d,h){return d[3]<=12?$e:ve}let v=w(e),a=v(e);function y(d,h){return d[2]<9?Ne:we}let $=y(e),N=$(e);function K(d,h){return d[3]<=12?Ee:Ce}let D=K(e),C=D(e);return{c(){a.c(),t=U(),N.c(),n=p(":"),l=p(e[1]),i=E("br"),o=R(),k=p(_),b=p(" : "),r=p(u),f=p(` :
`),C.c(),m=U()},m(d,h){a.m(d,h),c(d,t,h),N.m(d,h),c(d,n,h),c(d,l,h),c(d,i,h),c(d,o,h),c(d,k,h),c(d,b,h),c(d,r,h),c(d,f,h),C.m(d,h),c(d,m,h)},p(d,h){v===(v=w(d))&&a?a.p(d,h):(a.d(1),a=v(d),a&&(a.c(),a.m(t.parentNode,t))),$===($=y(d))&&N?N.p(d,h):(N.d(1),N=$(d),N&&(N.c(),N.m(n.parentNode,n))),h&2&&g(l,d[1]),h&2&&_!==(_=d[5](d[1])+"")&&g(k,_),h&4&&u!==(u=d[5](d[2])+"")&&g(r,u),D===(D=K(d))&&C?C.p(d,h):(C.d(1),C=D(d),C&&(C.c(),C.m(m.parentNode,m)))},d(d){d&&(s(t),s(n),s(l),s(i),s(o),s(k),s(b),s(r),s(f),s(m)),a.d(d),N.d(d),C.d(d)}}}function he(e){let t,n,l;function i(r,f){return r[3]<=12?Le:Oe}let o=i(e),_=o(e);function k(r,f){return r[2]<9?Se:Ae}let b=k(e),u=b(e);return{c(){_.c(),t=U(),u.c(),n=p(":"),l=p(e[1])},m(r,f){_.m(r,f),c(r,t,f),u.m(r,f),c(r,n,f),c(r,l,f)},p(r,f){o===(o=i(r))&&_?_.p(r,f):(_.d(1),_=o(r),_&&(_.c(),_.m(t.parentNode,t))),b===(b=k(r))&&u?u.p(r,f):(u.d(1),u=b(r),u&&(u.c(),u.m(n.parentNode,n))),f&2&&g(l,r[1])},d(r){r&&(s(t),s(n),s(l)),_.d(r),u.d(r)}}}function ge(e){let t=e[5](e[1])+"",n,l,i=e[5](e[2])+"",o,_,k;function b(f,m){return f[3]<=12?Ie:Pe}let u=b(e),r=u(e);return{c(){n=p(t),l=p(" : "),o=p(i),_=p(` :
`),r.c(),k=U()},m(f,m){c(f,n,m),c(f,l,m),c(f,o,m),c(f,_,m),r.m(f,m),c(f,k,m)},p(f,m){m&2&&t!==(t=f[5](f[1])+"")&&g(n,t),m&4&&i!==(i=f[5](f[2])+"")&&g(o,i),u===(u=b(f))&&r?r.p(f,m):(r.d(1),r=u(f),r&&(r.c(),r.m(k.parentNode,k)))},d(f){f&&(s(n),s(l),s(o),s(_),s(k)),r.d(f)}}}function ve(e){let t=e[3]-12+"",n,l;return{c(){n=p(t),l=p(":")},m(i,o){c(i,n,o),c(i,l,o)},p(i,o){o&8&&t!==(t=i[3]-12+"")&&g(n,t)},d(i){i&&(s(n),s(l))}}}function $e(e){let t,n;return{c(){t=p(e[3]),n=p(`:
`)},m(l,i){c(l,t,i),c(l,n,i)},p(l,i){i&8&&g(t,l[3])},d(l){l&&(s(t),s(n))}}}function we(e){let t;return{c(){t=p(e[2])},m(n,l){c(n,t,l)},p(n,l){l&4&&g(t,n[2])},d(n){n&&s(t)}}}function Ne(e){let t,n;return{c(){t=p("0"),n=p(e[2])},m(l,i){c(l,t,i),c(l,n,i)},p(l,i){i&4&&g(n,l[2])},d(l){l&&(s(t),s(n))}}}function Ce(e){let t=e[5](e[3]-12)+"",n;return{c(){n=p(t)},m(l,i){c(l,n,i)},p(l,i){i&8&&t!==(t=l[5](l[3]-12)+"")&&g(n,t)},d(l){l&&s(n)}}}function Ee(e){let t=e[5](e[3])+"",n;return{c(){n=p(t)},m(l,i){c(l,n,i)},p(l,i){i&8&&t!==(t=l[5](l[3])+"")&&g(n,t)},d(l){l&&s(n)}}}function Oe(e){let t=e[3]-12+"",n,l;return{c(){n=p(t),l=p(":")},m(i,o){c(i,n,o),c(i,l,o)},p(i,o){o&8&&t!==(t=i[3]-12+"")&&g(n,t)},d(i){i&&(s(n),s(l))}}}function Le(e){let t,n;return{c(){t=p(e[3]),n=p(`:
`)},m(l,i){c(l,t,i),c(l,n,i)},p(l,i){i&8&&g(t,l[3])},d(l){l&&(s(t),s(n))}}}function Ae(e){let t;return{c(){t=p(e[2])},m(n,l){c(n,t,l)},p(n,l){l&4&&g(t,n[2])},d(n){n&&s(t)}}}function Se(e){let t,n;return{c(){t=p("0"),n=p(e[2])},m(l,i){c(l,t,i),c(l,n,i)},p(l,i){i&4&&g(n,l[2])},d(l){l&&(s(t),s(n))}}}function Pe(e){let t=e[5](e[3]-12)+"",n;return{c(){n=p(t)},m(l,i){c(l,n,i)},p(l,i){i&8&&t!==(t=l[5](l[3]-12)+"")&&g(n,t)},d(l){l&&s(n)}}}function Ie(e){let t=e[5](e[3])+"",n;return{c(){n=p(t)},m(l,i){c(l,n,i)},p(l,i){i&8&&t!==(t=l[5](l[3])+"")&&g(n,t)},d(l){l&&s(n)}}}function Me(e){let t,n,l,i,o,_,k,b,u,r,f,m;function w(y,$){if(y[0]==1)return ge;if(y[0]==0)return he;if(y[0]==2)return ye}let v=w(e),a=v&&v(e);return{c(){t=E("div"),a&&a.c(),n=R(),l=E("button"),l.textContent="Dark Mode",i=R(),o=E("div"),_=E("button"),_.textContent="English",k=p(", "),b=E("button"),b.textContent="Arabic",u=p(", "),r=E("button"),r.textContent="Both",O(t,"class","main svelte-19e3go7"),G(t,"font-size","20px"),O(l,"class","svelte-19e3go7"),O(_,"class","svelte-19e3go7"),O(b,"class","svelte-19e3go7"),O(r,"class","svelte-19e3go7"),O(o,"class","bottom svelte-19e3go7"),G(o,"font-family","sans-serif")},m(y,$){c(y,t,$),a&&a.m(t,null),c(y,n,$),c(y,l,$),c(y,i,$),c(y,o,$),P(o,_),P(o,k),P(o,b),P(o,u),P(o,r),f||(m=[T(l,"click",e[4]),T(_,"click",e[6]),T(b,"click",e[7]),T(r,"click",e[8])],f=!0)},p(y,[$]){v===(v=w(y))&&a?a.p(y,$):(a&&a.d(1),a=v&&v(y),a&&(a.c(),a.m(t,null)))},i:M,o:M,d(y){y&&(s(t),s(n),s(l),s(i),s(o)),a&&a.d(),f=!1,B(m)}}}function W(e,t,n){const l=new Date;l.setTime(l.getTime()+n*24*60*60*1e3);let i="expires="+l.toUTCString();document.cookie=e+"="+t+";"+i+";path=/"}function je(e){let t=e+"=",l=decodeURIComponent(document.cookie).split(";");for(let i=0;i<l.length;i++){let o=l[i];for(;o.charAt(0)==" ";)o=o.substring(1);if(o.indexOf(t)==0)return o.substring(t.length,o.length)}return""}function Be(e,t,n){let l,i,o,_=new Date,k=0;oe(()=>{const a=setInterval(()=>{n(9,_=new Date)},1e3);return()=>{clearInterval(a)}});function b(){window.document.body.classList.toggle("dark-mode"),u?(u=!1,W("dim","o",365)):(u=!0,W("dim","d",365))}let u=!1;window.document.body.classList.remove("dark-mode"),je("dim")=="d"&&(window.document.body.classList.add("dark-mode"),u=!0);let r=["٠","١","٢","٣","٤","٥","٦","٧","٨","٩"];function f(a){let y=a.toString();return y.length==1?`${r[y[0]]}`:`${r[y[0]]}${r[y[1]]}`}function m(){n(0,k=0)}function w(){n(0,k=1)}function v(){n(0,k=2)}return e.$$.update=()=>{e.$$.dirty&512&&n(3,l=_.getHours()),e.$$.dirty&512&&n(2,i=_.getMinutes()),e.$$.dirty&512&&n(1,o=_.getSeconds())},[k,o,i,l,b,f,m,w,v,_]}class De extends be{constructor(t){super(),me(this,t,Be,Me,te,{})}}new De({target:document.getElementById("app")});