PageSourceSearch

https://www.swa.gov.sa/ar/chunk-B4YFS7CW.js

js swa.gov.sa collected 2026-10-02 17:15:18 UTC 45,957 bytes, 2 lines download raw bytes

1import{a as R}from"./chunk-R62MJYOS.js";import{a as Ie}from"./chunk-SGYHSEQ5.js";import{a as Fe}from"./chunk-LWUKXIGZ.js";import{a as Oe}from"./chunk-PBWFF3MW.js";import{d as ke}from"./chunk-S5GXOG6I.js";import"./chunk-R4YOZNOI.js";import"./chunk-FJDW344Y.js";import"./chunk-5LVXJWGR.js";import{a as Ae}from"./chunk-7VJWK2JO.js";import"./chunk-TFUXPF5C.js";import{a as N}from"./chunk-ADPUZLEP.js";import"./chunk-RONQHHKM.js";import{A as Te,f as we,g as ye,k as Ee,n as Se,o as Me,y as Pe,z as De}from"./chunk-KE6TWG4W.js";import{D as H,w as xe,x as be}from"./chunk-BPTP2OGQ.js";import{$b as w,C as ce,Da as O,Eb as l,Fb as s,Fc as P,G as de,Gb as E,Hb as J,Ib as K,Kb as S,Nb as x,Ob as g,Ra as ue,Sa as ge,Tc as q,Uc as Q,Vc as B,Wa as te,Xa as ne,Za as a,Zb as _e,_a as y,_b as v,a as le,ac as M,bc as F,bd as Z,ca as k,cc as ve,ed as V,gd as L,ic as I,jc as ie,kb as $,kc as he,lc as fe,ma as h,na as f,pc as T,rb as b,rc as A,sb as X,sc as Ce,tb as c,ub as W,vb as me,za as pe}from"./chunk-CEMWIL7S.js";import{a as Y,b as j}from"./chunk-ZQYCHSNR.js";var ze=(o,d)=>({"dga-shadow-sm":o,"":d}),Ge=o=>["/events",o];function Ue(o,d){if(o&1){let n=S();l(0,"div",13)(1,"img",14),x("error",function(i){h(n);let t=g();return f(t.onImageError(i));}),s()();}if(o&2){let n=g();a(),c("src",n.getImageUrl(n.event),ge)("alt",n.en==="ar"?n.event.titleAr:n.event.titleEn)("title",n.en==="ar"?n.event.titleAr:n.event.titleEn);}}function Xe(o,d){if(o&1&&(l(0,"div",15)(1,"span",11),v(2),s()()),o&2){let n=g();a(2),w(n.en=="en"?(n.event==null?null:n.event.typeEn)||"Saudi Arabia":(n.event==null?null:n.event.typeAr)||"\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629");}}function We(o,d){if(o&1&&(l(0,"div",16)(1,"span",11),v(2),s()()),o&2){let n=g();a(2),w(n.en=="en"?(n.event==null?null:n.event.locationEn)||"Saudi Arabia":(n.event==null?null:n.event.locationAr)||"\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629");}}function Je(o,d){if(o&1){let n=S();l(0,"div",17)(1,"a",18),E(2,"app-dga-button",19),s(),l(3,"div",20)(4,"app-dga-button",21),x("clicked",function(){h(n);let i=g();return f(i.openGoogleCalendar());}),s()()();}if(o&2){let n=g();a(),c("routerLink",he(8,Ge,n.event==null?null:n.event.slug)),a(),c("title",n.en=="en"?"Show Details":"\u0639\u0631\u0636 \u0627\u0644\u062A\u0641\u0627\u0635\u064A\u0644")("color","w-full bg-[var(--dga-primary-btn-color)] hover:bg-[var(--dga-primary-btn-color-hover)] active:bg-[var(--dga-primary-btn-color-active)] text-white border border-[var(--dga-primary-btn-color)]"),a(2),c("title",n.en=="en"?"Export to Calendar":"\u062A\u0635\u062F\u064A\u0631 \u0644\u0644\u062A\u0642\u0648\u064A\u0645")("ariaLabel",n.en=="en"?"Export to Calendar":"\u062A\u0635\u062F\u064A\u0631 \u0644\u0644\u062A\u0642\u0648\u064A\u0645")("color","w-full")("variant","outline")("img","../../../../assets/images/events-calendar/Trailing icon.svg");}}var He=(()=>{let d=class d{constructor(e,i){this.eventsService=e,this.btn=!0,this.en="ar",this.defaultImg="../../../../assets/images/events-calendar/default-img.png",this.isBrowser=L(i);}statusLabel(e){let t={upcoming:{en:"Upcoming",ar:"\u0642\u0627\u062F\u0645"},ongoing:{en:"Ongoing",ar:"\u062C\u0627\u0631\u064A"},finished:{en:"Finished",ar:"\u0645\u0646\u062A\u0647\u064A"}}[e]||{en:e,ar:e};return this.en==="ar"?t.ar:t.en;}toGoogleCalendarUrl(e){return this.eventsService.toGoogleCalendarUrl(e);}openGoogleCalendar(){if(!this.isBrowser||!this.event)return;let e=this.toGoogleCalendarUrl(this.event);window.open(e,"_blank","noopener,noreferrer");}downloadIcs(e){this.eventsService.downloadIcs(e);}getImageUrl(e){return this.eventsService.getImageUrl(e);}onImageError(e){return this.eventsService.onImageError(e);}mapStatus(e){if(e==null)return this.en==="ar"?"\u063A\u064A\u0631 \u0645\u0639\u0631\u0648\u0641":"Unknown";let t={0:{en:"Not Live",ar:"\u063A\u064A\u0631 \u0645\u0628\u0627\u0634\u0631"},1:{en:"Upcoming",ar:"\u0642\u0627\u062F\u0645"},2:{en:"Ongoing",ar:"\u062C\u0627\u0631\u064A"}
1,3:{en:"Completed",ar:"\u0645\u0646\u062A\u0647\u064A"}}[e]||{en:"Unknown",ar:"\u063A\u064A\u0631 \u0645\u0639\u0631\u0648\u0641"};return this.en==="ar"?t.ar:t.en;}};d.ɵfac=function(i){return new(i||d)(y(R),y(O));},d.ɵcmp=k({type:d,selectors:[["app-dga-events-calendar-card"]],inputs:{event:"event",btn:"btn"},standalone:!0,features:[I],decls:18,vars:19,consts:[[1,"w-full","p-3","flex","flex-col","rounded-2xl","border-2","border-gray-100","bg-white","transition-all","ease-in-out","duration-300","h-full","object-cover",3,"ngClass"],["div","",4,"ngIf"],[1,"flex-1"],[1,"flex","flex-col","gap-2","text-[#161b26]","my-2"],[1,"text-md","font-bold"],[1,"flex","gap-2"],[1,"text-sm","font-normal","text-[#1F2A37]"],[1,"flex","flex-wrap","gap-2","my-2"],["class","flex items-center justify-center px-2 py-1 border rounded bg-[#ECFDF3] text-[#085D3A] border-[#ABEFC6]",4,"ngIf"],["class","flex items-center justify-center px-2 py-1 border rounded bg-[#F9FAFB] text-[#384250] border-[#E5E7EB]",4,"ngIf"],[1,"flex","items-center","justify-center","px-2","py-1","border","rounded",3,"ngClass"],[1,"text-xs","font-medium"],["class","flex flex-wrap items-stretch gap-3 sm:gap-4 w-full mt-4",4,"ngIf"],["div",""],["loading","lazy",1,"w-full","h-[250px]","sm:h-[250px]","lg:h-[250px]","object-cover","rounded-md","border","border-[#f3f4f6]",3,"error","src","alt","title"],[1,"flex","items-center","justify-center","px-2","py-1","border","rounded","bg-[#ECFDF3]","text-[#085D3A]","border-[#ABEFC6]"],[1,"flex","items-center","justify-center","px-2","py-1","border","rounded","bg-[#F9FAFB]","text-[#384250]","border-[#E5E7EB]"],[1,"flex","flex-wrap","items-stretch","gap-3","sm:gap-4","w-full","mt-4"],[1,"flex-1","basis-full","sm:basis-[calc(50%-0.5rem)]","md:basis-auto","min-w-0",3,"routerLink"],[3,"title","color"],[1,"flex-1","basis-full","sm:basis-[calc(50%-0.5rem)]","md:basis-auto","min-w-0"],[3,"clicked","title","ariaLabel","color","variant","img"]],template:function(i,t){i&1&&(l(0,"div",0),b(1,Ue,2,3,"div",1),l(2,"div",2)(3,"div",3)(4,"div",4),v(5),s()(),l(6,"div",5)(7,"p",6),v(8),T(9,"date"),T(10,"date"),s()(),l(11,"div",7),b(12,Xe,3,1,"div",8)(13,We,3,1,"div",9),l(14,"div",10)(15,"span",11),v(16),s()()()(),b(17,Je,5,10,"div",12),s()),i&2&&(c("ngClass",fe(16,ze,t.btn,t.btn!=!1)),a(),c("ngIf",t.event),a(4),M(" ",t.en=="ar"?t.event==null?null:t.event.titleAr:t.event==null?null:t.event.titleEn," "),a(3),F("",A(9,10,t.event==null?null:t.event.startDate,"yyyy-MM-dd")," - ",A(10,13,t.event==null?null:t.event.endDate,"yyyy-MM-dd")," "),a(4),c("ngIf",(t.event==null?null:t.event.typeAr)&&(t.event==null?null:t.event.typeEn)),a(),c("ngIf",(t.event==null?null:t.event.locationAr)&&(t.event==null?null:t.event.locationEn)),a(),c("ngClass",(t.event==null?null:t.event.eventLiveStatus)===2?"bg-[#ECFDF3] text-[#085D3A] border-[#ABEFC6]":"bg-[#F9FAFB] text-[#384250] border-[#E5E7EB]"),a(2),M(" ",t.mapStatus(t.event==null?null:t.event.eventLiveStatus)," "),a(),c("ngIf",t.btn));},dependencies:[V,q,B,Z,H,be,N]});let o=d;return o;})();var Ke=()=>["\u064A\u0646\u0627\u064A\u0631","\u0641\u0628\u0631\u0627\u064A\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064A\u0644","\u0645\u0627\u064A\u0648","\u064A\u0648\u0646\u064A\u0648","\u064A\u0648\u0644\u064A\u0648","\u0623\u063A\u0633\u0637\u0633","\u0633\u0628\u062A\u0645\u0628\u0631","\u0623\u0643\u062A\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062F\u064A\u0633\u0645\u0628\u0631"],qe=()=>["January","February","March","April","May","June","July","August","September","October","November","December"];function Qe(o,d){if(o&1&&(l(0,"div",12),v(1),s()),o&2){let n=d.$implicit;a(),w(n);}}function Ze(o,d){if(o&1&&(J(0),l(1,"div",21),v(2),s(),K()),o&2){let n=g().$implicit;a(2),w(n.date.getDate());}}function et(o,d){if(o&1&&(l(0,"span",22),v(1),s()),o&2){let n=g().$implicit;a(),w(n.date.getDate());}}function tt(o,d){if(o&1&&(l(0,"div",18)(1,"div",19),b(2,Ze,3,1,"ng-container",20)(3,et,2,1,"ng-template",null,0,Ce),s()()),o&2){let n=d.$implicit,e=_e(4),i=g(3);me("muted",!n.inMonth),a(2),c("ngIf",!i.isToday(n.date))("ngIfElse",e);}}function nt(o,d){if(o&1){let n=S();l(0,"div",23),x("click",function(i){let t=h(n).$implicit,r=g(3);return f(r.onBarClick(i,t.event));})("mouseenter",function(i){let t=h(n).$implicit,r=g(3);return f(r.onBarEnter(i,t.event));})("mousemove",function(i){h(n);let t=g(3);return f(t.onBarMove(i));})("mouseleave",function(){h(n);let i=g(3);return f(i.onBarLeave());})("blur",function(){h(n);let i=g(3);return f(i.onBarLeave());})("touchstart",function(i){let t=h(n).$implicit,r=g(3);return f(r.onBarTouchStart(i,t.event));})("touchmove",function(i){h(n);let t=g(3);return f(t.onBarTouchMove(i));})("touchend",function(i){h(n);let t=g(3);return f(t.onBarTouchEnd(i));}),l(1,"span",24),v(2),s(),l(3,"p",25),v(4),T(5,"date"),T(6,"date"),s()();}if(o&2){let n=d.$implicit,e=g(3);W("grid-column",n.colStart+" / span "+n.colSpan),c("ngClass","status-"+n.eventLiveStatus)("title",e.lang==="ar"?n.event.titleAr:n.event.titleEn),X("dir",e.lang==="ar"?"rtl":"ltr"),a(2),M(" ",e.lang==="ar"?n.event.titleAr:n.event.titleEn," "),a(2),ve(" ",e.lang==="ar"?n.event.locationAr:n.event.locationEn," | ",A(5,9,n.event.startDate,"HH:mm")," - ",A(6,12,n.event.endD
1ate,"HH:mm")," ");}}function it(o,d){if(o&1&&(l(0,"div",13)(1,"div",14),b(2,tt,5,4,"div",15),s(),l(3,"div",16),b(4,nt,7,15,"div",17),s()()),o&2){let n=d.$implicit,e=d.index,i=g(2);W("--day-h",i.weekDayHeightsSig()[e],"px")("--bars-top",i.dayHeaderH,"px"),a(2),c("ngForOf",n),a(2),c("ngForOf",i.weekSpansSig()[e]);}}function ot(o,d){if(o&1&&(J(0),l(1,"div",7),b(2,Qe,2,1,"div",8),s(),l(3,"div",9)(4,"div",10),b(5,it,5,6,"div",11),s()(),K()),o&2){let n=g();a(2),c("ngForOf",n.weekDaysSig()),a(3),c("ngForOf",n.weeksSig());}}function rt(o,d){if(o&1){let n=S();l(0,"div",32),x("click",function(i){let t=h(n).$implicit,r=g(3);return f(r.onBarClick(i,t));})("mouseenter",function(i){let t=h(n).$implicit,r=g(3);return f(r.onBarEnter(i,t));})("mousemove",function(i){h(n);let t=g(3);return f(t.onBarMove(i));})("mouseleave",function(){h(n);let i=g(3);return f(i.onBarLeave());})("blur",function(){h(n);let i=g(3);return f(i.onBarLeave());})("touchstart",function(i){let t=h(n).$implicit,r=g(3);return f(r.onBarTouchStart(i,t));})("touchmove",function(i){h(n);let t=g(3);return f(t.onBarTouchMove(i));})("touchend",function(i){h(n);let t=g(3);return f(t.onBarTouchEnd(i));}),l(1,"span",33),v(2),s(),l(3,"p",34),v(4),s()();}if(o&2){let n=d.$implicit,e=g(3);c("ngClass","status-"+n.eventLiveStatus)("title",e.lang==="ar"?n.titleAr:n.titleEn),X("dir",e.lang==="ar"?"rtl":"ltr"),a(2),M(" ",e.lang==="ar"?n.titleAr:n.titleEn," "),a(2),M(" ",e.lang==="ar"?n.locationAr:n.locationEn," ");}}function at(o,d){if(o&1){let n=S();l(0,"div",28)(1,"div",29),x("click",function(){let i=h(n).$implicit,t=g(2);return f(t.goToMonth(i));})("keydown.enter",function(){let i=h(n).$implicit,t=g(2);return f(t.goToMonth(i));})("keydown.space",function(){let i=h(n).$implicit,t=g(2);return f(t.goToMonth(i));}),v(2),s(),l(3,"div",30),x("click",function(i){return h(n),f(i.stopPropagation());}),b(4,rt,5,5,"div",31),s()();}if(o&2){let n=d.$implicit,e=g(2);a(2),M(" ",e.lang==="ar"?ie(2,Ke)[n]:ie(3,qe)[n]," "),a(2),c("ngForOf",e.eventsByMonthSig(n)());}}function st(o,d){if(o&1&&(J(0),l(1,"div",26),b(2,at,5,4,"div",27),s(),K()),o&2){let n=g();a(2),c("ngForOf",n.monthsArr);}}function lt(o,d){if(o&1&&(l(0,"div",38)(1,"span",39),v(2),s(),l(3,"span",43),v(4),T(5,"date"),T(6,"date"),s()()),o&2){let n,e=g(2);a(2),w(e.lang==="ar"?"\u0627\u0644\u062A\u0627\u0631\u064A\u062E":"Date"),a(2),F(" ",A(5,3,(n=e.tt().event)==null?null:n.startDate,"yyyy-MM-dd")," \u2013 ",A(6,6,(n=e.tt().event)==null?null:n.endDate,"yyyy-MM-dd")," ");}}function ct(o,d){if(o&1&&(l(0,"div",38)(1,"span",39),v(2),s(),l(3,"span",43),v(4),T(5,"date"),T(6,"date"),s()()),o&2){let n,e=g(2);a(2),w(e.lang==="ar"?"\u0627\u0644\u0648\u0642\u062A":"Time"),a(2),F(" ",A(5,3,(n=e.tt().event)==null?null:n.startDate,"HH:mm")," \u2013 ",A(6,6,(n=e.tt().event)==null?null:n.endDate,"HH:mm")," ");}}function dt(o,d){if(o&1&&(l(0,"div",38)(1,"span",39),v(2),s(),l(3,"span",43),v(4),s()()),o&2){let n,e=g(2);a(2),w(e.lang==="ar"?"\u0627\u0644\u0645\u0648\u0642\u0639":"Location"),a(2),w(e.lang==="ar"?(n=e.tt().event)==null?null:n.locationAr:(n=e.tt().event)==null?null:n.locationEn);}}function pt(o,d){if(o&1&&(l(0,"div",38)(1,"span",39),v(2),s(),l(3,"span",43),v(4),s()()),o&2){let n,e=g(2);a(2),w(e.lang==="ar"?"\u0627\u0644\u0646\u0648\u0639":"Type"),a(2),w(e.lang==="ar"?(n=e.tt().event)==null?null:n.typeAr:(n=e.tt().event)==null?null:n.typeEn);}}function ut(o,d){if(o&1&&(l(0,"div",38)(1,"span",39),v(2),s(),l(3,"span",43),v(4),s()()),o&2){let n,e=g(2);a(2),w(e.lang==="ar"?"\u0627\u0644\u062D\u0627\u0644\u0629":"Status"),a(2),w(e.statusLabel((n=(n=e.tt().event)==null?null:n.eventLiveStatus)!==null&&n!==void 0?n:0));}}function gt(o,d){if(o&1&&(l(0,"div",35)(1,"div",36)(2,"p",37),v(3),s(),l(4,"div",38)(5,"span",39),v(6),s(),E(7,"div",40),s(),b(8,lt,7,9,"div",41)(9,ct,7,9,"div",41)(10,dt,5,2,"div",41)(11,pt,5,2,"div",41)(12,ut,5,2,"div",41),s(),E(13,"div",42),s()),o&2){let n,e,i,t,r,p,m,_,u=g();W("left",u.tt().x,"px")("top",u.tt().y,"px"),X("dir",u.lang==="ar"?"rtl":"ltr"),a(),c("ngClass","status-"+((n=(n=u.tt().event)==null?null:n.eventLiveStatus)!==null&&n!==void 0?n:0)),a(2),M(" ",u.lang==="ar"?(e=u.tt().event)==null?null:e.titleAr:(e
1=u.tt().event)==null?null:e.titleEn," "),a(3),w(u.lang==="ar"?"\u0627\u0644\u0648\u0635\u0641":"Description"),a(),c("innerHTML",u.truncatePlain(u.lang==="ar"?(i=u.tt().event)==null?null:i.descriptionAr:(i=u.tt().event)==null?null:i.descriptionEn,200,"....."),ue),a(),c("ngIf",((t=u.tt().event)==null?null:t.startDate)&&((t=u.tt().event)==null?null:t.endDate)),a(),c("ngIf",((r=u.tt().event)==null?null:r.startDate)&&((r=u.tt().event)==null?null:r.endDate)),a(),c("ngIf",u.lang==="ar"?(p=u.tt().event)==null?null:p.locationAr:(p=u.tt().event)==null?null:p.locationEn),a(),c("ngIf",((m=u.tt().event)==null?null:m.typeAr)||((m=u.tt().event)==null?null:m.typeEn)),a(),c("ngIf",((_=u.tt().event)==null?null:_.eventLiveStatus)!==void 0),a(),c("ngClass","side-"+u.tt().side);}}var Ne=(()=>{let d=class d{set events(e){this._events.set(e??[]);}set view(e){e&&this.eventService.viewMode.set(e);}constructor(e,i){this.eventService=e,this.eventClick=new pe(),this.viewMode=this.eventService.viewMode,this._events=$([]),this.lang="ar",this.year=$(new Date().getFullYear()),this.month=$(new Date().getMonth()),this.DAY_HEADER_H=28,this.dayHeaderH=this.DAY_HEADER_H,this.BAR_H=64,this.BAR_GAP=4,this.BAR_TOP_PAD=4,this.BAR_BOTTOM_PAD=8,this.PILL_H=26,this.PILL_GAP=4,this.PILL_TOP_PAD=2,this.PILL_BOTTOM_PAD=4,this.BASE_DAY_H=180,this.YEAR_COLS=4,this.YEAR_BASE_H=84,this.YEAR_PER_ITEM=28,this.YEAR_INSET=16,this.weekDaysSig=P(()=>this.lang==="ar"?["\u0627\u0644\u0623\u062D\u062F","\u0627\u0644\u0627\u062B\u0646\u064A\u0646","\u0627\u0644\u062B\u0644\u0627\u062B\u0627\u0621","\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621","\u0627\u0644\u062E\u0645\u064A\u0633","\u0627\u0644\u062C\u0645\u0639\u0629","\u0627\u0644\u0633\u0628\u062A"]:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),this.monthNames={ar:["\u064A\u0646\u0627\u064A\u0631","\u0641\u0628\u0631\u0627\u064A\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064A\u0644","\u0645\u0627\u064A\u0648","\u064A\u0648\u0646\u064A\u0648","\u064A\u0648\u0644\u064A\u0648","\u0623\u063A\u0633\u0637\u0633","\u0633\u0628\u062A\u0645\u0628\u0631","\u0623\u0643\u062A\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062F\u064A\u0633\u0645\u0628\u0631"],en:["January","February","March","April","May","June","July","August","September","October","November","December"]},this.monthLabelSig=P(()=>this.lang==="ar"?this.monthNames.ar[this.month()]:this.monthNames.en[this.month()]),this.dayChipLabel=t=>{let r=t.getMonth(),p=t.getDate().toString().padStart(2,"0");return this.lang==="ar"?`${this.monthNames.ar[r]} ${p}`:`${this.monthNames.en[r]} ${p}`;},this.weeksSig=P(()=>{let t=this.year(),r=this.month(),m=new Date(t,r,1).getDay(),_=[];for(let u=0;u<42;u++){let C=u-m+1,D=new Date(t,r,C);_.push({date:D,inMonth:D.getMonth()===r});}return Array.from({length:6},(u,C)=>_.slice(C*7,C*7+7));}),this.monthEventsSig=P(()=>{let t=this.year(),r=this.month();return this._events().filter(p=>this.inMonth(p,r,t));}),this.pillsIndexSig=P(()=>{let t=new Map();for(let r of this.monthEventsSig()){let p=new Date(r.startDate);if(!this.isSingleDay(r)||p.getMonth()!==this.month()||p.getFullYear()!==this.year())continue;let m=this.keyOf(p);(t.get(m)??t.set(m,[]).get(m)).push(r);}return t;}),this.pillsForDate=t=>this.pillsIndexSig().get(this.keyOf(t))??[],this.weekSpansSig=P(()=>{let t=this.weeksSig(),r=t.map(()=>[]),p=[...this.monthEventsSig()].sort((m,_)=>{let u=+new Date(m.startDate),C=+new Date(_.startDate);if(u!==C)return u-C;let D=+new Date(m.endDate??m.startDate),z=+new Date(_.endDate??_.startDate);return D-z;});for(let m of p){let _=new Date(m.startDate),u=new Date(m.endDate??m.startDate);t.forEach((C,D)=>{let z=new Date(C[0].date.getFullYear(),C[0].date.getMonth(),C[0].date.getDate(),0,0,0),oe=new Date(C[6].date.getFullYear(),C[6].date.getMonth(),C[6].date.getDate(),23,59,59);if(u<z||_>oe)return;let re=Math.max(0,_>z?_.getDay():0),Re=Math.min(6,u<oe?u.getDay():6),ee=re+1,ae=Math.max(1,Re-re+1),se=[];for(let U of r[D])!(U.colStart+U.colSpan-1<ee||ee+ae-1<U.colStart)&&(se[U.lane]=!0);let G=0;for(;se[G];)G++;let Ye=this.BAR_H+this.BAR_GAP,je=this.BAR_TOP_PAD+G*Ye;r[D].push({event:m,eventLiveStatus:m.eventLiveStatus,colStart:ee,colSpan:ae,lane:G,y:je});});}return r;}),this.weekDayHeightsSig=P(()=>this.weekSpansSig().map(r=>{let p=0;if(r.length){let _=Math.max(...r.map(u=>u.lane));p=this.BAR_TOP_PAD+(_+1)*this.BAR_H+_*this.BAR_GAP+this.BAR_BOTTOM_PAD;}let m=this.DAY_HEADER_H+p;return Math.max(this.BASE_DAY_H,m);})),this.monthsArr=Array.from({length:12},(t,r)=>r),this.eventsByMonthSig=t=>P(()=>this._events().filter(r=>this.inMonth(r,t,this.year()))),this.monthCountsSig=P(()=>this.monthsArr.map(t=>this._events().filter(r=>this.inMonth(r,t,this.year())).length)),this.monthCardHeightsSig=P(()=>this.monthCountsSig().map(t=>
1this.YEAR_BASE_H+t*this.YEAR_PER_ITEM+this.YEAR_INSET)),this._tt=$({visible:!1,x:0,y:0,side:"top",event:null}),this.tt=()=>this._tt(),this.suppressNextClick=!1,this.longPressActive=!1,this.touchStartX=0,this.touchStartY=0,this.LP_THRESHOLD=400,this.MOVE_TOLERANCE=12,this.isBrowser=L(i);}get yearVal(){return this.year();}get monthLabel(){return this.monthLabelSig();}endOf(e){return new Date(e.endDate??e.startDate);}sameDay(e,i){return e.getFullYear()===i.getFullYear()&&e.getMonth()===i.getMonth()&&e.getDate()===i.getDate();}isSingleDay(e){let i=new Date(e.startDate),t=this.endOf(e);return this.sameDay(i,t);}inMonth(e,i,t){let r=new Date(e.startDate),p=this.endOf(e),m=new Date(t,i,1),_=new Date(t,i+1,0,23,59,59);return p>=m&&r<=_;}isToday(e){let i=new Date();return e.getFullYear()===i.getFullYear()&&e.getMonth()===i.getMonth()&&e.getDate()===i.getDate();}keyOf(e){return`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`;}setView(e){this.eventService.viewMode.set(e);}prev(){this.eventService.viewMode()==="month"?this.prevMonth():this.year.set(this.year()-1);}next(){this.eventService.viewMode()==="month"?this.nextMonth():this.year.set(this.year()+1);}prevMonth(){let e=this.month()-1;e<0?(this.month.set(11),this.year.set(this.year()-1)):this.month.set(e);}nextMonth(){let e=this.month()+1;e>11?(this.month.set(0),this.year.set(this.year()+1)):this.month.set(e);}goToday(){let e=new Date();this.year.set(e.getFullYear()),this.month.set(e.getMonth());}onEventClick(e){this.eventClick.emit(e);}goToMonth(e){this.month.set(e),this.eventService.viewMode.set("month");}clampTooltip(e,i){let t=this.isBrowser?window.innerWidth:1200,r=this.isBrowser?window.innerHeight:800,p=340,m=160,_=12,u=Math.min(Math.max(e,_+p/2),t-_-p/2),C=i,D=i>=m+30?"top":"bottom";return C=D==="bottom"?Math.min(i+m+30,r-_):Math.max(i,_+m),{x:u,y:C,side:D};}onBarEnter(e,i){if(!this.isBrowser)return;let{x:t,y:r,side:p}=this.clampTooltip(e.clientX,e.clientY-12);this._tt.set({visible:!0,x:t,y:r,side:p,event:i});}onBarMove(e){if(!this._tt().visible||!this.isBrowser)return;let{x:i,y:t,side:r}=this.clampTooltip(e.clientX,e.clientY-12);this._tt.set(j(Y({},this._tt()),{x:i,y:t,side:r}));}onBarLeave(){this.clearLongPress(),this._tt.set({visible:!1,x:0,y:0,side:"top",event:null});}onBarClick(e,i){if(this.suppressNextClick){e.preventDefault(),e.stopPropagation(),this.suppressNextClick=!1;return;}this.onEventClick(i);}onBarTouchStart(e,i){if(!this.isBrowser||e.touches.length>1)return;let t=e.touches[0];this.touchStartX=t.clientX,this.touchStartY=t.clientY,this.longPressActive=!1,this.clearLongPress(),this.longPressTimer=setTimeout(()=>{let{x:r,y:p,side:m}=this.clampTooltip(t.clientX,t.clientY);this._tt.set({visible:!0,x:r,y:p,side:m,event:i}),this.longPressActive=!0,this.suppressNextClick=!0,this.mobileHideTimer&&clearTimeout(this.mobileHideTimer),this.mobileHideTimer=setTimeout(()=>{this._tt().event?.id===i.id&&this.onBarLeave();},3e3);},this.LP_THRESHOLD);}onBarTouchMove(e){if(!this.isBrowser)return;let i=e.touches?.[0];if(!i)return;let t=Math.abs(i.clientX-this.touchStartX),r=Math.abs(i.clientY-this.touchStartY);if((t>this.MOVE_TOLERANCE||r>this.MOVE_TOLERANCE)&&this.clearLongPress(),this.longPressActive){let{x:p,y:m,side:_}=this.clampTooltip(i.clientX,i.clientY);this._tt.set(j(Y({},this._tt()),{x:p,y:m,side:_}));}}onBarTouchEnd(e){this.isBrowser&&(this.longPressActive&&(e.preventDefault(),e.stopPropagation()),this.clearLongPress());}clearLongPress(){this.longPressTimer&&(clearTimeout(this.longPressTimer),this.longPressTimer=void 0);}statusLabel(e){let i={0:{ar:"\u063A\u064A\u0631 \u0645\u0628\u0627\u0634\u0631",en:"Not Live"},1:{ar:"\u0642\u0627\u062F\u0645",en:"Upcoming"},2:{ar:"\u062C\u0627\u0631\u064A",en:"Ongoing"},3:{ar:"\u0645\u0646\u062A\u0647\u064A",en:"Completed"}},t=i[e]??i[0];return this.lang==="ar"?t.ar:t.en;}truncatePlain(e,i=100,t="....."){if(e==null)return"";let r=e.toString().replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim();if(r.length<=i)return r;let p=r.slice(0,i),m=p.lastIndexOf(" ");return m>Math.floor(i*.6)&&(p=p.slice(0,m)),p=p.replace(/[.,;:!?\u061F]+$/u,""),p+t;}onDocTouchStart(e){if(!this._tt().visible)return;let i=e.target,t=!!i.closest(".dga-tt-card"),r=!!i.closest(".y-bar, .bar");!t&&!r&&this.onBarLeave();}onDocClick(e){if(!this._tt().visible)return;let i=e.target,t=!!i.closest(".dga-tt-card"),r=!!i.closest(".y-bar, .bar");!t&&!r&&this.onBarLeave();}onScrollClose(){this._tt().visible&&this.onBarLeave();}onResizeClose(){this._tt().visible&&this.onBarLeave();}};d.ɵfac=function(i){return new(i||d)(y(R),y(O));},d.ɵcmp=k({type:d,selectors:[["app-dga-calendar"]],hostBindings:function(i,t){i&1&&x("touchstart",function(p){return t.onDocTouchStart(p);},!1,ne)("click",function(p){return t.onDocClick(p);},!1,ne)("scroll",function(){return t.onScrollClose();},!1,te)("resize",function(){return t.onResizeClose();},!1,te);},inputs:{events:"events",view:"view"},outputs:{eventClick:"eventClick"},standalone:!0,features:[I],decls:8,vars:9,consts:[["todayTpl",""],[1,"flex","items-center","justify-between","mb-6"],["aria-label","Previous",3,"click","color","title"],[1,"title"],["aria-label","Next",3,"click","color","title"],[4,"ngIf"],["class","dga-tt",3,"left","top",4,"ngIf"],[1,"wk"],["class","weekday text-[10px] md:text-[16
1px]",4,"ngFor","ngForOf"],[1,"month-wrap"],[1,"month-weeks"],["class","week",3,"--day-h","--bars-top",4,"ngFor","ngForOf"],[1,"weekday","text-[10px]","md:text-[16px]"],[1,"week"],[1,"days-grid"],["class","day",3,"muted",4,"ngFor","ngForOf"],[1,"bars-abs","my-2"],["class","bar flex flex-col justify-center rounded-e",3,"ngClass","gridColumn","title","click","mouseenter","mousemove","mouseleave","blur","touchstart","touchmove","touchend",4,"ngFor","ngForOf"],[1,"day"],[1,"date-wrap"],[4,"ngIf","ngIfElse"],[1,"day-number","text-[10px]","md:text-[16px]"],[1,"today-badge","w-7","h-7","text-[10px]","md:text-[16px]"],[1,"bar","flex","flex-col","justify-center","rounded-e",3,"click","mouseenter","mousemove","mouseleave","blur","touchstart","touchmove","touchend","ngClass","title"],[1,"bar-label"],[1,"text-[#6C737F]","font-normal","truncate"],[1,"year-grid","grid","grid-cols-1","md:grid-cols-3","gap-3","overflow-hidden"],["class","y-card",4,"ngFor","ngForOf"],[1,"y-card"],["tabindex","0",1,"y-title","text-center","cursor-pointer","hover:text-[#1b8354]",3,"click","keydown.enter","keydown.space"],[1,"y-list","my-2",3,"click"],["class","y-bar flex flex-col justify-center rounded-e",3,"ngClass","title","click","mouseenter","mousemove","mouseleave","blur","touchstart","touchmove","touchend",4,"ngFor","ngForOf"],[1,"y-bar","flex","flex-col","justify-center","rounded-e",3,"click","mouseenter","mousemove","mouseleave","blur","touchstart","touchmove","touchend","ngClass","title"],[1,"bar-label","whitespace-normal","break-words"],[1,"text-[#6C737F]","font-normal"],[1,"dga-tt"],[1,"dga-tt-card",3,"ngClass"],[1,"dga-tt-title","text-center","text-[var(--color-primary)]"],[1,"flex","flex-col","mb-2"],[1,"dga-tt-label"],[1,"dga-tt-val",3,"innerHTML"],["class","flex flex-col mb-2",4,"ngIf"],[1,"dga-tt-arrow",3,"ngClass"],[1,"dga-tt-val"]],template:function(i,t){i&1&&(l(0,"div",1)(1,"app-dga-button",2),x("click",function(){return t.prev();}),s(),l(2,"div",3),v(3),s(),l(4,"app-dga-button",4),x("click",function(){return t.next();}),s()(),b(5,ot,6,2,"ng-container",5)(6,st,3,1,"ng-container",5)(7,gt,14,15,"div",6)),i&2&&(a(),c("color","bg-[var(--dga-primary-btn-color)] hover:bg-[var(--dga-primary-btn-color-hover)] active:bg-[var(--dga-primary-btn-color-active)]  text-white border border-[var(--dga-primary-btn-color)]")("title","<"),a(2),F(" ",t.viewMode()==="year"?"":t.monthLabel," ",t.yearVal," "),a(),c("color","bg-[var(--dga-primary-btn-color)] hover:bg-[var(--dga-primary-btn-color-hover)] active:bg-[var(--dga-primary-btn-color-active)]  text-white border border-[var(--dga-primary-btn-color)]")("title",">"),a(),c("ngIf",t.viewMode()==="month"),a(),c("ngIf",t.viewMode()==="year"),a(),c("ngIf",t.tt().visible));},dependencies:[V,q,Q,B,Z,H,N],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block}.cal-header[_ngcontent-%COMP%]{display:grid;grid-template-columns:40px 1fr auto;align-items:center;margin-bottom:12px}.nav-btn[_ngcontent-%COMP%]{width:36px;height:36px;display:grid;place-items:center;border:1px solid #e5e7eb;border-radius:999px;background:#fff;cursor:pointer;box-shadow:0 1px 2px #0000000d}.title[_ngcontent-%COMP%]{text-align:center;font-weight:800;font-size:20px;color:#0f172a}.view-toggle[_ngcontent-%COMP%]{display:flex;gap:6px;justify-content:flex-end}.seg[_ngcontent-%COMP%]{border:1px solid #d1d5db;background:#fff;border-radius:10px;padding:.35rem .6rem;font-size:.85rem;cursor:pointer}.seg.active[_ngcontent-%COMP%]{background:#0ea5e9;color:#fff;border-color:#0ea5e9}.wk[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}.weekday[_ngcontent-%COMP%]{color:#6c737f;font-weight:600;text-align:center;padding:.6rem 0;border-radius:10px;margin-bottom:6px}.wk[_ngcontent-%COMP%]   .weekday[_ngcontent-%COMP%]:first-child, .wk[_ngcontent-%COMP%]   .weekday[_ngcontent-%COMP%]:last-child{color:#1b8354}.month-wrap[_ngcontent-%COMP%]{position:relative;border-radius:14px;background:#fff;overflow:hidden;box-shadow:0 2px 6px #0000000a}.month-weeks[_ngcontent-%COMP%]   .week[_ngcontent-%COMP%]:first-child   .days-grid[_ngcontent-%COMP%]{border-top-left-radius:14px;border-top-right-radius:14px;overflow:hidden}.month-weeks[_ngcontent-%COMP%]   .week[_ngcontent-%COMP%]:last-child   .days-grid[_ngcontent-%COMP%]{border-bottom-left-radius:14px;border-bottom-right-radius:14px;overflow:hidden}.week[_ngcontent-%COMP%]{position:relative;--day-h: 180px;--bars-top: 28px;--bar-h: 64px}.days-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-top:1px solid #e5e7eb;border-left:1px solid #e5e7eb}.day[_ngcontent-%COMP%]{height:var(--day-h);padding-top:var(--bars-top);padding-inline:6px;background:#fff;border-right:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;position:relative;box-sizing:border-box}.day.muted[_ngcontent-%COMP%]{background:#fafafa;color:#6b7280}.date-wrap[_ngcontent-%COMP%]{position:absolute;inset-inline:0;top:0;height:var(--bars-top)}.day-number[_ngcontent-%COMP%]{position:absolute;inset-inline-start:10px;top:6px;font-weight:600}.today-badge[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;border-radius:999px;background:#157f4b;color:#fff;font-weight:600;position:absolute;inset-inline-start:10px;top:6px}.bars-abs[_ngcontent-%COMP%]{position:absolute;inset-inline:0;top:var(--bars-top);bottom:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));pointer-events:none;z-index:1}.bar[_ngcontent-%COMP%]{pointer-events:auto;position:relative;height:var(--bar-h);margin-inline:8px;padding-inline:10px 40px;font-size:13px;font-weight:700;overflow:hidden;color:#fff;cursor:pointer}.bar-label[_ngcontent-%COMP%]{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.bar[_ngcontent-%COMP%]:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:4px;background:#5b2d12}.status-2[_ngcontent-%COMP%]{background:#f3fcf6;color:#074d31}.status-2[_ngcontent-%COMP%]:before{background:#074d31}.status-3[_ngcontent-%COMP%]{background:#fffde1;color:#dba102}.status-3[_ngcontent-%COMP%]:before{background:#dba102}.status-1[_ngcontent-%COMP%]{background:#edf4fd;color:#1971e5}.status-1[_ngcontent-%COMP%]:before{background:#1971e5}.status-0[_ngcontent-%COMP%]{background:#f9fafb;color:#4d5761}.status-0[_ngcontent-%COMP%]:before{background:#4d5761}.year-grid[_ngcontent-%COMP%]{grid-auto-rows:minmax(300px,auto)}.y-card[_ngcontent-%COMP%]{background:#fff;border:1px solid #e5e7eb;border-radius:12px;padding:10px;box-shadow:0 1px 3px #0000000a;min-height:300px;display:flex;flex-direction:column}.year-grid[_ngcontent-%COMP%]   .y-card[_ngcontent-%COMP%]:nth-child(2n){background:#f9fafb}.y-title[_ngcontent-%COMP%]{font-weight:800;margin-bottom:8px;text-align:center}.y-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.y-pill[_ngcontent-%COMP%]{padding:6px 8px;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
1.y-bar[_ngcontent-%COMP%]{cursor:pointer;position:relative;pointer-events:auto;min-height:64px;padding-inline:10px 40px;font-size:13px;font-weight:700;margin-inline:0;overflow:hidden;white-space:normal}.y-bar[_ngcontent-%COMP%]:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:4px}.y-bar[_ngcontent-%COMP%]   .bar-label[_ngcontent-%COMP%]{white-space:normal;word-break:break-word}.footer-nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-top:10px}.footer-nav[_ngcontent-%COMP%]   .spacer[_ngcontent-%COMP%]{flex:1}.dga-tt[_ngcontent-%COMP%]{position:fixed;z-index:9999;transform:translate(-50%,calc(-100% - 10px));pointer-events:none}.dga-tt-card[_ngcontent-%COMP%]{pointer-events:auto;position:relative;background:#fff;border-radius:12px;padding:10px 12px;box-shadow:0 10px 30px #0000002e,0 4px 10px #0000001f;width:300px;font-size:13px;line-height:1.5;border:1px solid #e5e7eb}.dga-tt-close[_ngcontent-%COMP%]{position:absolute;top:6px;inset-inline-end:6px;width:28px;height:28px;border-radius:999px;border:1px solid #e5e7eb;background:#fff;color:#475569;font-size:18px;line-height:1;display:grid;place-items:center;box-shadow:0 1px 4px #00000014;cursor:pointer}.dga-tt-close[_ngcontent-%COMP%]:active{transform:scale(.98)}.dga-tt-title[_ngcontent-%COMP%]{font-weight:800;margin-bottom:6px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dga-tt-label[_ngcontent-%COMP%]{color:var(--dga-black-text-color);font-weight:800!important}.dga-tt-val[_ngcontent-%COMP%]{color:#6c737f}.dga-tt-badge[_ngcontent-%COMP%]{display:inline-block;padding:2px 8px;border-radius:999px;font-weight:700;background:#374151;color:#fff}.dga-tt-badge.status-2[_ngcontent-%COMP%]{background:#e7f7ee;color:#0f5132}.dga-tt-badge.status-3[_ngcontent-%COMP%]{background:#fff4cc;color:#946200}.dga-tt-badge.status-1[_ngcontent-%COMP%]{background:#e8f0ff;color:#1a5adf}.dga-tt-badge.status-0[_ngcontent-%COMP%]{background:#eef1f6;color:#4d5761}.dga-tt-arrow[_ngcontent-%COMP%]{position:absolute;width:12px;height:12px;background:#fff;transform:rotate(45deg);left:50%;translate:-50% 0;top:calc(100% - 6px);box-shadow:2px 2px 8px #0000002e;border:1px solid #e5e7eb}.dga-tt-arrow.side-bottom[_ngcontent-%COMP%]{top:auto;bottom:calc(100% - 6px)}'],changeDetection:0});let o=d;return o;})();function mt(o,d){if(o&1){let n=S();l(0,"form",8)(1,"app-dropdown-input",13),x("onSelect",function(){h(n);let i=g();return f(i.switchDateType());}),s()();}if(o&2){let n=g();c("formGroup",n.filter),a(),c("formControl",n.filter.get("dateType"))("options",n.dateType)("placeholder",n.en=="en"?"Select type of calendar":"\u0646\u0648\u0639 \u0627\u0644\u062A\u0642\u0648\u064A\u0645");}}function _t(o,d){o&1&&(l(0,"div",14),E(1,"div",15),s());}function vt(o,d){if(o&1&&E(0,"app-dga-events-calendar-card",20),o&2){let n=d.$implicit;c("event",n);}}function ht(o,d){if(o&1){let n=S();l(0,"app-unified-pagination",21),x("pageChange",function(i){h(n);let t=g(3);return f(t.onPageChange(i));}),s();}if(o&2){let n=g(3);c("config",n.paginationConfig);}}function ft(o,d){if(o&1&&(l(0,"section")(1,"div",17),b(2,vt,1,1,"app-dga-events-calendar-card",18),s(),b(3,ht,1,1,"app-unified-pagination",19),s()),o&2){let n=g(2);a(2),c("ngForOf",n.paginatedCards)("ngForTrackBy",n.trackByFn),a(),c("ngIf",n.paginationConfig.totalPages>1);}}function Ct(o,d){if(o&1&&(l(0,"section",22),E(1,"img",23),l(2,"h3",24),v(3),s(),l(4,"p",25),v(5),s()()),o&2){let n=g(2);a(3),w(n.language=="en"?"No events currently":"\u0644\u0627 \u062A\u0648\u062C\u062F \u0641\u0639\u0627\u0644\u064A\u0627\u062A \u062D\u0627\u0644\u064A\u0627\u064B"),a(2),M(" ",n.language=="en"?"Keep up to date with the latest events, workshops, and activities happening around you. Browse our calendar to explore upcoming occasions and never miss out.":"\u062A\u0631\u0642\u0651\u0628 \u0645\u0639\u0646\u0627 \u0622\u062E\u0631 \u0627\u0644\u0623\u0646\u0634\u0637\u0629 \u0648\u0627\u0644\u0623\u062D\u062F\u0627\u062B \u0627\u0644\u0642\u0627\u062F\u0645\u0629 \u0627\u0644\u062A\u064A \u0633\u062A\u064F\u0639\u0644\u0646 \u0647\u0646\u0627."," ");}}function xt(o,d){if(o&1&&(l(0,"div"),b(1,ft,4,3,"section",12)(2,Ct,6,2,"section",16),s()),o&2){let n=g();a(),c("ngIf",n.paginatedCards.length>0&&!n.isLoading),a(),c("ngIf",n.paginatedCards.length==0&&!n.isLoading);}}function bt(o,d){if(o&1){let n=S();l(0,"div")(1,"app-dga-calendar",26),x("eventClick",function(i){h(n);let t=g();return f(t.openEvent(i));}),s()();}if(o&2){let n=g();a(),c("events",n.events)("view",n.dateSwitcher);}}var ln=(()=>{let d=class d{constructor(e,i,t,r,p){this.platformId=e,this.metaService=i,this.eventService=t,this.fb=r,this.router=p,this.en="ar",this.language="ar",this.isLoading=!1,this.dateSwitcher=this.eventService.viewM
1ode(),this.previousRoutes=[{title:{en:"Main Page",ar:" \u0627\u0644\u0631\u0626\u064A\u0633\u064A\u0629"},link:{path:"/"}},{title:{en:"Media Center",ar:"\u0627\u0644\u0645\u0631\u0643\u0632 \u0627\u0644\u0625\u0639\u0644\u0627\u0645\u064A"}}],this.pageName={en:"Events Calendar",ar:"\u0631\u0648\u0632\u0646\u0627\u0645\u0629 \u0627\u0644\u0641\u0639\u0627\u0644\u064A\u0627\u062A"},this.description={en:"Stay updated with the latest events, workshops, and activities happening around you. Browse our calendar to explore upcoming occasions and never miss out.",ar:"\u062A\u0627\u0628\u0639 \u0623\u062D\u062F\u062B \u0627\u0644\u0641\u0639\u0627\u0644\u064A\u0627\u062A \u0648\u0648\u0631\u0634 \u0627\u0644\u0639\u0645\u0644 \u0648\u0627\u0644\u0623\u0646\u0634\u0637\u0629 \u0645\u0646 \u062D\u0648\u0644\u0643. \u062A\u0635\u0641\u062D \u0627\u0644\u0631\u0648\u0632\u0646\u0627\u0645\u0629 \u0644\u0627\u0643\u062A\u0634\u0627\u0641 \u0627\u0644\u0645\u0646\u0627\u0633\u0628\u0627\u062A \u0627\u0644\u0642\u0627\u062F\u0645\u0629 \u0648\u0644\u0627 \u062A\u0641\u0648\u0651\u062A \u0623\u064A \u062D\u062F\u062B."},this.keywords={en:"events, calendar, activities, workshops, conferences, occasions, schedule",ar:"\u0641\u0639\u0627\u0644\u064A\u0627\u062A, \u0631\u0648\u0632\u0646\u0627\u0645\u0629, \u0623\u0646\u0634\u0637\u0629, \u0648\u0631\u0634 \u0639\u0645\u0644, \u0645\u0624\u062A\u0645\u0631\u0627\u062A, \u0645\u0646\u0627\u0633\u0628\u0627\u062A, \u062C\u062F\u0648\u0644"},this.allEvents=[],this.events=[],this.paginatedCards=[],this.itemsPerPage=9,this.paginationConfig={currentPage:1,totalPages:1,totalCount:0,itemsPerPage:this.itemsPerPage,hasNext:!1,hasPrevious:!1,language:"en",showPageInfo:!0,maxVisiblePages:5},this.form=this.fb.group({search:[""]}),this.filter=this.fb.group({status:[""],type:[""],location:[""],dateType:[]}),this.status=[],this.type=[],this.location=[],this.dateType=[],this.viewMode="card",this.subs=new le(),this.isBrowser=L(this.platformId);}ngOnInit(){this.isLoading=!0,this.loadEvents(),this.paginationConfig.language=this.language==="ar"?"ar":"en",this.subs.add(this.form.get("search").valueChanges.pipe(ce(250),de()).subscribe(()=>this.applyFilters())),this.subs.add(this.filter.valueChanges.subscribe(()=>this.applyFilters())),this.metaService.setMetaTags(this.pageName,this.description,this.keywords,this.language);}ngOnDestroy(){this.subs.unsubscribe();}loadEvents(){this.eventService.getAllEvents().subscribe({next:e=>{let i=Array.isArray(e)?e:[];this.allEvents=i.filter(Boolean),this.events=[...this.allEvents],this.initFilter(this.allEvents),this.paginationConfig.currentPage=1,this.updatePaginationConfig(),this.updateDisplayedCards(),this.isLoading=!1;},error:()=>{this.isLoading=!1;}});}applyFilters(){let e=(this.form.get("search")?.value||"").toString().trim().toLowerCase(),{status:i,type:t,location:r}=this.filter.value,p=[...this.allEvents];if(i){let m=Number(i);p=p.filter(_=>Number(_?.eventLiveStatus)===m);}t&&(p=p.filter(m=>(this.en==="en"?m?.typeEn||"":m?.typeAr||"").toString().trim()===t)),r&&(console.log("location",r),p=p.filter(m=>(this.en==="en"?m?.locationEn??"":m?.locationAr??"").toString().trim()===r)),e&&(p=p.filter(m=>[m?.titleEn,m?.titleAr,m?.descriptionEn,m?.descriptionAr].some(u=>(u||"").toString().toLowerCase().includes(e)))),this.events=p,this.paginationConfig.currentPage=1,this.updatePaginationConfig(),this.updateDisplayedCards();}initFilter(e=this.allEvents??[]){let i={0:"notLive",1:"upcoming",2:"ongoing",3:"completed"},t={notLive:{en:"Not Live",ar:"\u063A\u064A\u0631 \u0645\u0628\u0627\u0634\u0631"},upcoming:{en:"Upcoming",ar:"\u0642\u0627\u062F\u0645"},ongoing:{en:"Ongoing",ar:"\u062C\u0627\u0631\u064A"},completed:{en:"Completed",ar:"\u0645\u0646\u062A\u0647\u064A"}},r=[1,2,3];this.status=r.map(_=>{let u=i[_],C=t[u];return{value:String(_),label:this.en==="ar"?C.ar:C.en};});let p=new Map();for(let _ of e){let u=(_?.typeEn||"").toString().trim(),C=(_?.typeAr||"").toString().trim();u&&p.set(u,C||void 0);}this.type=Array.from(p.entries()).map(([_,u])=>({value:this.en==="ar"&&u||_,label:this.en==="ar"&&u||_}));let m=new Map();for(let _ of e){let u=(_?.locationEn||"").toString().trim(),C=(_?.locationAr||"").toString().trim();u&&m.set(u,C||void 0);}this.location=Array.from(m.entries()).map(([_,u])=>({value:this.en==="ar"&&u||_,label:this.en==="ar"&&u||_})),this.dateType=[{value:"year",label:this.en==="ar"?"\u0633\u0646\u0648\u064A":"Year"},{value:"month",label:this.en==="ar"?"\u0634\u0647\u0631\u064A":"Monthly"}];}trackByFn(e,i){return i?.id??e;}updatePaginationConfig(){let e=Math.ceil(this.events.length/this.itemsPerPage)||0;e===0?this.paginationConfig.currentPage=1:this.paginationConfig.currentPage>e?this.paginationConfig.currentPage=e:this.paginationConfig.currentPage<1&&(this.paginationConfig.currentPage=1),this.paginationConfig=j(Y({},this.paginationConfig),{language:this.language==="ar"?"ar":"en",totalPages:e,totalCount:this.events.length,hasNext:e>0&&this.paginationConfig.currentPage<e,hasPrevious:e>0&&this.paginationConfig.currentPage>1});}updateDisplayedCards(){let e=(this.paginationConfig.currentPage-1)*this.itemsPerPage,i=e+this.itemsPerPage;this.paginatedCards=this.events.slice(e,i);}onPageChange(e){switch(e.action){case"next":this.handleNextPage();break;case"previous":this.handlePreviousPage();break;case"goto":this.handleGoToPage(e.page);break;}}handleNextPage(){this.paginationConfig.hasNext&&(this.paginationConfig.currentPage++,this.updatePaginationConfig(),this.updateDisplayedCards());}handlePreviousPage(){this.paginationConfig.hasPrevious&&(this.paginationConfig.currentPage--,this.updatePaginationConfig(),this.updateDisplayedCards());}handleGoToPage(e){e!==this.paginationConfig.currentPage&&e>=1&&e<=this.paginationConfig.totalPages&&(this.paginationConfig.currentPage=e,this.updatePaginationConfig(),this.updateDisplayedCards());}switchView(e){this.viewMode=e,this.filter.get("dateType")?.setValue(null);}openEvent(e){this.router.navigate([`/events/${e.slug}`]);}
1switchDateType(){console.log(this.eventService.viewMode());let e=this.filter.get("dateType")?.value;this.eventService.viewMode.set(e??this.eventService.viewMode());}};d.ɵfac=function(i){return new(i||d)(y(O),y(Ae),y(R),y(Pe),y(xe));},d.ɵcmp=k({type:d,selectors:[["app-events-calendar"]],standalone:!0,features:[I],decls:20,vars:27,consts:[[3,"previousRoutes","pageName","language","isBodyOverlapped"],[1,"w-full","mx-auto","flex","flex-col","gap-4","md:flex-row","md:justify-between"],[1,"flex","gap-2"],[3,"click","color","img"],[1,"w-full","md:w-[35%]","lg:w-[30%]",3,"formGroup"],[3,"input","placeholder","formControl"],[1,"w-full","mx-auto","my-4"],[1,"w-full","flex","flex-col","gap-4","md:flex-row"],[1,"w-full","md:w-[35%]","lg:w-[20%]",3,"formGroup"],[3,"click","formControl","options","placeholder"],["class","w-full md:w-[35%] lg:w-[20%]",3,"formGroup",4,"ngIf"],["class","flex justify-center items-center my-16",4,"ngIf"],[4,"ngIf"],[3,"onSelect","formControl","options","placeholder"],[1,"flex","justify-center","items-center","my-16"],[1,"animate-spin","rounded-full","h-12","w-12","border-t-2","border-b-2","border-[var(--dga-primary-btn-color)]"],["class","flex flex-col items-center justify-center py-20",4,"ngIf"],[1,"grid","grid-cols-1","md:grid-cols-2","xl:grid-cols-3","gap-6"],[3,"event",4,"ngFor","ngForOf","ngForTrackBy"],[3,"config","pageChange",4,"ngIf"],[3,"event"],[3,"pageChange","config"],[1,"flex","flex-col","items-center","justify-center","py-20"],["src","../../../../../assets/images/events-calendar/404-event.png","alt","No Events","loading","lazy",1,"w-48","h-48","mb-4"],[1,"text-lg","font-bold"],[1,"text-xs","font-normal","mt-2"],[3,"eventClick","events","view"]],template:function(i,t){i&1&&(l(0,"app-dga-page-container",0)(1,"div",1)(2,"div",2)(3,"app-dga-button",3),x("click",function(){return t.switchView("card");}),s(),l(4,"app-dga-button",3),x("click",function(){return t.switchView("calendar");}),s()(),l(5,"form",4)(6,"app-search-input",5),x("input",function(){return t.applyFilters();}),s()()(),E(7,"hr",6),l(8,"div",7)(9,"form",8)(10,"app-dropdown-input",9),x("click",function(){return t.applyFilters();}),s()(),l(11,"form",8)(12,"app-dropdown-input",9),x("click",function(){return t.applyFilters();}),s()(),l(13,"form",8)(14,"app-dropdown-input",9),x("click",function(){return t.applyFilters();}),s()(),b(15,mt,2,4,"form",10),s(),E(16,"hr",6),b(17,_t,2,0,"div",11)(18,xt,3,2,"div",12)(19,bt,2,2,"div",12),s()),i&2&&(c("previousRoutes",t.previousRoutes)("pageName",t.pageName)("language",t.language)("isBodyOverlapped",!0),a(3),c("color",t.viewMode==="card"?"bg-[var(--dga-primary-btn-color)] hover:bg-[var(--dga-primary-btn-color-hover)] active:bg-[var(--dga-primary-btn-color-active)] text-white border border-[var(--dga-primary-btn-color)]":"border border-[#D2D6DB] hover:bg-[#F3F4F6]")("img",t.viewMode==="card"?"../../../../../assets/images/events-calendar/card-ui-white.svg":`      ../../../../../assets/images/events-calendar/card-ui.svg
2`),a(),c("color",t.viewMode==="calendar"?"bg-[var(--dga-primary-btn-color)] hover:bg-[var(--dga-primary-btn-color-hover)] active:bg-[var(--dga-primary-btn-color-active)] text-white border border-[var(--dga-primary-btn-color)]":"border border-[#D2D6DB] hover:bg-[#F3F4F6]")("img",t.viewMode==="calendar"?"../../../../../assets/images/events-calendar/calender-icon.svg":"../../../../assets/images/events-calendar/calender-icon-black.svg"),a(),c("formGroup",t.form),a(),c("placeholder",t.en=="en"?"Search for events":"\u0628\u062D\u062B \u0639\u0646 \u0641\u0639\u0627\u0644\u064A\u0627\u062A")("formControl",t.form.get("search")),a(3),c("formGroup",t.filter),a(),c("formControl",t.filter.get("status"))("options",t.status)("placeholder",t.en=="en"?"Select status of event":"\u0627\u062E\u062A\u0631 \u062D\u0627\u0644\u0629 \u0627\u0644\u062D\u062F\u062B"),a(),c("formGroup",t.filter),a(),c("formControl",t.filter.get("type"))("options",t.type)("placeholder",t.en=="en"?"Select type of event":"\u0627\u062E\u062A\u0631 \u0646\u0648\u0639 \u0627\u0644\u062D\u062F\u062B"),a(),c("formGroup",t.filter),a(),c("formControl",t.filter.get("location"))("options",t.location)("placeholder",t.en=="en"?"Select location of event":"\u0645\u0648\u0642\u0639 \u0627\u0644\u062D\u062F\u062B"),a(),c("ngIf",t.viewM
2ode==="calendar"),a(2),c("ngIf",t.isLoading),a(),c("ngIf",t.viewMode==="card"),a(),c("ngIf",t.viewMode==="calendar"));},dependencies:[ke,He,V,Q,B,De,Ee,we,ye,Te,Se,Me,Oe,Ie,H,Fe,N,Ne]});let o=d;return o;})();export{ln as EventsCalendarComponent};/**i18n:34af3656f0562cb6a33cf22ea7254dacf3d3f980c546b3cc51fddd03c4df9e28*/

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.