@a.nemreen/dga-ui 0.3.16 → 0.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +158 -127
- package/LICENSE +21 -21
- package/README.md +474 -474
- package/fesm2022/a.nemreen-dga-ui-cookies.mjs +3 -3
- package/fesm2022/a.nemreen-dga-ui-header.mjs +1 -1
- package/fesm2022/a.nemreen-dga-ui.mjs +128 -110
- package/package.json +1 -1
- package/types/a.nemreen-dga-ui.d.ts +27 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF as gs,PlatformLocation as ms}from"@angular/common";import*as t from"@angular/core";import{inject as x,DestroyRef as L,input as i,numberAttribute as A,booleanAttribute as m,signal as y,computed as n,effect as M,ChangeDetectionStrategy as h,Component as v,ElementRef as F,Renderer2 as
|
|
1
|
+
import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF as gs,PlatformLocation as ms}from"@angular/common";import*as t from"@angular/core";import{inject as x,DestroyRef as L,input as i,numberAttribute as A,booleanAttribute as m,signal as y,computed as n,effect as M,ChangeDetectionStrategy as h,Component as v,ElementRef as F,Renderer2 as Pi,HostListener as O,Directive as V,output as w,Injectable as Ha,InjectionToken as zi,makeEnvironmentProviders as Fi,ViewEncapsulation as Ri,forwardRef as Me,linkedSignal as _e,model as S,afterNextRender as T,ViewChildren as Ti,viewChild as R,Injector as G,untracked as fs,DOCUMENT as it,contentChildren as bt,TemplateRef as ht,contentChild as Ka}from"@angular/core";import{DomSanitizer as Wa}from"@angular/platform-browser";import*as Ya from"@angular/forms";import{NG_VALUE_ACCESSOR as Oi,FormsModule as bs}from"@angular/forms";import{DgaLocaleService as hs,DgaThemeService as Ai}from"@a.nemreen/dga-tokens";class yt{doc=x(ja);destroyRef=x(L);text=i.required(...ngDevMode?[{debugName:"text"}]:[]);effect=i("typewriter",...ngDevMode?[{debugName:"effect"}]:[]);speed=i(32,{...ngDevMode?{debugName:"speed"}:{},transform:A});delay=i(180,{...ngDevMode?{debugName:"delay"}:{},transform:A});cursor=i(!0,{...ngDevMode?{debugName:"cursor"}:{},transform:m});disabled=i(!1,{...ngDevMode?{debugName:"disabled"}:{},transform:m});displayed=y("",...ngDevMode?[{debugName:"displayed"}]:[]);phase=y("idle",...ngDevMode?[{debugName:"phase"}]:[]);timer=null;charIndex=0;showCursor=n(()=>this.effect()==="typewriter"&&this.cursor()&&this.phase()!=="idle"&&!this.shouldReduceMotion(),...ngDevMode?[{debugName:"showCursor"}]:[]);constructor(){M(()=>{const e=this.text(),a=this.effect();if(this.disabled(),this.speed(),this.delay(),a==="glow"){this.clearTimer(),this.displayed.set(e),this.phase.set("done");return}this.start(e)}),this.destroyRef.onDestroy(()=>this.clearTimer())}start(e){if(this.clearTimer(),this.charIndex=0,!e||this.disabled()||this.shouldReduceMotion()){this.displayed.set(e),this.phase.set("done");return}this.displayed.set(""),this.phase.set("writing");const a=Math.max(0,Number(this.delay())||0);this.timer=setTimeout(()=>this.tick(e),a)}tick(e){if(this.charIndex+=1,this.displayed.set(e.slice(0,this.charIndex)),this.charIndex>=e.length){this.phase.set("done"),this.timer=null;return}const a=Math.max(12,Number(this.speed())||32);this.timer=setTimeout(()=>this.tick(e),a)}clearTimer(){this.timer!=null&&(clearTimeout(this.timer),this.timer=null)}shouldReduceMotion(){return this.doc.documentElement.getAttribute("data-a11y")?.includes("reduce-motion")?!0:typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:yt,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:yt,isStandalone:!0,selector:"dga-writing",inputs:{text:{classPropertyName:"text",publicName:"text",isSignal:!0,isRequired:!0,transformFunction:null},effect:{classPropertyName:"effect",publicName:"effect",isSignal:!0,isRequired:!1,transformFunction:null},speed:{classPropertyName:"speed",publicName:"speed",isSignal:!0,isRequired:!1,transformFunction:null},delay:{classPropertyName:"delay",publicName:"delay",isSignal:!0,isRequired:!1,transformFunction:null},cursor:{classPropertyName:"cursor",publicName:"cursor",isSignal:!0,isRequired:!1,transformFunction:null},disabled:{classPropertyName:"disabled",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{"attr.data-dga-writing":"phase()","attr.data-effect":"effect()","attr.data-done":'phase() === "done" ? "" : null'},classAttribute:"dga-writing"},ngImport:t,template:`
|
|
2
2
|
@if (effect() === 'glow') {
|
|
3
3
|
<span class="dga-writing__glow" aria-hidden="true">{{ text() }}</span>
|
|
4
4
|
} @else {
|
|
@@ -18,7 +18,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
<span class="dga-writing__sr">{{ text() }}</span>
|
|
21
|
-
`,host:{class:"dga-writing","[attr.data-dga-writing]":"phase()","[attr.data-effect]":"effect()","[attr.data-done]":'phase() === "done" ? "" : null'},changeDetection:h.OnPush,styles:[":host{display:inline}:host .dga-writing__sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:host .dga-writing__cursor{display:inline-block;width:.08em;height:.9em;margin-inline-start:.08em;vertical-align:-.05em;background:currentColor;border-radius:1px;animation:dga-writing-blink 1s steps(1) infinite}:host[data-done] .dga-writing__cursor{opacity:0;animation:none;transition:opacity .32s ease}:host .dga-writing__glow{display:inline;color:inherit;-webkit-text-fill-color:currentColor;text-shadow:0 0 .35em color-mix(in srgb,white 28%,transparent),0 0 .9em color-mix(in srgb,var(--dga-color-primary-200, #a7f3d0) 14%,transparent);animation:dga-writing-glow 5s ease-in-out infinite}@keyframes dga-writing-blink{0%,49%{opacity:1}50%,to{opacity:0}}@keyframes dga-writing-glow{0%,to{text-shadow:0 0 .2em color-mix(in srgb,white 12%,transparent),0 0 .6em color-mix(in srgb,var(--dga-color-primary-200, #a7f3d0) 6%,transparent)}50%{text-shadow:0 0 .45em color-mix(in srgb,white 36%,transparent),0 0 1.1em color-mix(in srgb,var(--dga-color-primary-100, #d1fae5) 16%,transparent)}}@media(prefers-reduced-motion:reduce){:host .dga-writing__cursor{animation:none;opacity:0}:host .dga-writing__glow{animation:none;text-shadow:none}}:host-context(html[data-a11y~=\"reduce-motion\"]) .dga-writing__cursor{animation:none;opacity:0}:host-context(html[data-a11y~=\"reduce-motion\"]) .dga-writing__glow{animation:none;text-shadow:none}\n"]}]}],ctorParameters:()=>[],propDecorators:{text:[{type:t.Input,args:[{isSignal:!0,alias:"text",required:!0}]}],effect:[{type:t.Input,args:[{isSignal:!0,alias:"effect",required:!1}]}],speed:[{type:t.Input,args:[{isSignal:!0,alias:"speed",required:!1}]}],delay:[{type:t.Input,args:[{isSignal:!0,alias:"delay",required:!1}]}],cursor:[{type:t.Input,args:[{isSignal:!0,alias:"cursor",required:!1}]}],disabled:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}]}});function f(...d){return d.filter(Boolean).join(" ")}const
|
|
21
|
+
`,host:{class:"dga-writing","[attr.data-dga-writing]":"phase()","[attr.data-effect]":"effect()","[attr.data-done]":'phase() === "done" ? "" : null'},changeDetection:h.OnPush,styles:[":host{display:inline}:host .dga-writing__sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}:host .dga-writing__cursor{display:inline-block;width:.08em;height:.9em;margin-inline-start:.08em;vertical-align:-.05em;background:currentColor;border-radius:1px;animation:dga-writing-blink 1s steps(1) infinite}:host[data-done] .dga-writing__cursor{opacity:0;animation:none;transition:opacity .32s ease}:host .dga-writing__glow{display:inline;color:inherit;-webkit-text-fill-color:currentColor;text-shadow:0 0 .35em color-mix(in srgb,white 28%,transparent),0 0 .9em color-mix(in srgb,var(--dga-color-primary-200, #a7f3d0) 14%,transparent);animation:dga-writing-glow 5s ease-in-out infinite}@keyframes dga-writing-blink{0%,49%{opacity:1}50%,to{opacity:0}}@keyframes dga-writing-glow{0%,to{text-shadow:0 0 .2em color-mix(in srgb,white 12%,transparent),0 0 .6em color-mix(in srgb,var(--dga-color-primary-200, #a7f3d0) 6%,transparent)}50%{text-shadow:0 0 .45em color-mix(in srgb,white 36%,transparent),0 0 1.1em color-mix(in srgb,var(--dga-color-primary-100, #d1fae5) 16%,transparent)}}@media(prefers-reduced-motion:reduce){:host .dga-writing__cursor{animation:none;opacity:0}:host .dga-writing__glow{animation:none;text-shadow:none}}:host-context(html[data-a11y~=\"reduce-motion\"]) .dga-writing__cursor{animation:none;opacity:0}:host-context(html[data-a11y~=\"reduce-motion\"]) .dga-writing__glow{animation:none;text-shadow:none}\n"]}]}],ctorParameters:()=>[],propDecorators:{text:[{type:t.Input,args:[{isSignal:!0,alias:"text",required:!0}]}],effect:[{type:t.Input,args:[{isSignal:!0,alias:"effect",required:!1}]}],speed:[{type:t.Input,args:[{isSignal:!0,alias:"speed",required:!1}]}],delay:[{type:t.Input,args:[{isSignal:!0,alias:"delay",required:!1}]}],cursor:[{type:t.Input,args:[{isSignal:!0,alias:"cursor",required:!1}]}],disabled:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}]}});function f(...d){return d.filter(Boolean).join(" ")}const vs="dga-button-effects";function Vi(){if(typeof document>"u"||document.getElementById(vs))return;const d=document.createElement("style");d.id=vs,d.textContent=`
|
|
22
22
|
@keyframes dga-btn-shine {
|
|
23
23
|
from { transform: translateX(-120%) skewX(-12deg); }
|
|
24
24
|
to { transform: translateX(120%) skewX(-12deg); }
|
|
@@ -87,7 +87,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
87
87
|
animation: none;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
`,document.head.appendChild(d)}const Ei="inline-flex cursor-pointer items-center justify-center gap-sm font-medium transition-[opacity,transform,box-shadow,background-color,color,filter] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus active:opacity-80 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-opacity motion-reduce:hover:translate-y-0 motion-reduce:hover:scale-100 motion-reduce:active:scale-100 motion-reduce:hover:translate-x-0",$i={primary:"bg-primary text-on-color shadow-sm hover:opacity-90",secondary:"bg-secondary text-on-color shadow-sm hover:opacity-90",subtle:"bg-neutral-light text-fg hover:bg-sunken",outline:"border border-border-primary bg-surface text-fg-primary hover:bg-primary-light",outlineMuted:"border border-border bg-surface text-fg hover:bg-neutral-light",outlineInverse:"border border-on-color bg-transparent text-on-color hover:bg-on-color/10",ghost:"bg-transparent text-fg-primary hover:bg-primary-light",danger:"bg-error text-on-color shadow-sm hover:opacity-90",inverse:"bg-surface text-fg-primary-strong shadow-sm hover:opacity-90"},Bi={sm:"h-4xl rounded-sm px-lg text-body-sm",md:"h-5xl rounded-sm px-xl text-body-md",lg:"h-6xl rounded-sm px-2xl text-body-lg"},ji={sm:"size-4xl rounded-sm p-0",md:"size-5xl rounded-sm p-0",lg:"size-6xl rounded-sm p-0"},Hi={sm:"size-lg",md:"size-lg",lg:"size-2xl"},Ki={opacity:"",ripple:"relative overflow-hidden",lift:"hover:-translate-y-0.5 hover:shadow-md focus-visible:outline-offset-4",scale:"hover:scale-[1.03] active:scale-[0.98]",glow:"hover:shadow-[0_0_0_4px_color-mix(in_oklab,var(--color-primary)_28%,transparent)] focus-visible:outline-offset-4",press:"active:scale-[0.96] active:shadow-inner hover:brightness-105",bounce:"",slide:"hover:ltr:translate-x-0.5 hover:rtl:-translate-x-0.5 active:ltr:translate-x-1 active:rtl:-translate-x-1",shine:"",pulse:"",float:"hover:-translate-y-1 hover:shadow-lg focus-visible:outline-offset-4",wobble:"",jelly:""},vs=520;class D{destroyRef=x(L);host=x(F);renderer=x(Li);variant=i("primary",...ngDevMode?[{debugName:"variant"}]:[]);size=i("md",...ngDevMode?[{debugName:"size"}]:[]);effect=i("opacity",...ngDevMode?[{debugName:"effect"}]:[]);iconOnly=i(!1,{...ngDevMode?{debugName:"iconOnly"}:{},transform:m});fullWidth=i(!1,{...ngDevMode?{debugName:"fullWidth"}:{},transform:m});cooldownMs=i(0,...ngDevMode?[{debugName:"cooldownMs"}]:[]);loading=i(!1,{...ngDevMode?{debugName:"loading"}:{},transform:m});buttonClass=i("",{...ngDevMode?{debugName:"buttonClass"}:{},alias:"dgaButtonClass"});cooling=y(!1,...ngDevMode?[{debugName:"cooling"}]:[]);cooldownTimer=null;spinnerEl=null;busy=n(()=>this.loading()||this.cooling(),...ngDevMode?[{debugName:"busy"}]:[]);classes=n(()=>f(Ei,$i[this.variant()],this.iconOnly()?ji[this.size()]:Bi[this.size()],Ki[this.effect()],this.fullWidth()&&"w-full",this.busy()&&"pointer-events-none opacity-70",this.buttonClass()),...ngDevMode?[{debugName:"classes"}]:[]);constructor(){Vi(),M(()=>{this.busy()?this.attachSpinner():this.detachSpinner()}),this.destroyRef.onDestroy(()=>{this.clearCooldown(),this.detachSpinner()})}onPointerDown(e){this.spawnRipple(e)}onHostClick(){if(this.busy())return;const e=this.cooldownMs();e<=0||(this.cooling.set(!0),this.attachSpinner(),this.clearCooldown(),this.cooldownTimer=setTimeout(()=>{this.cooling.set(!1),this.cooldownTimer=null},e))}spawnRipple(e){if(this.effect()!=="ripple"||this.busy()||e.button!==0)return;const a=this.host.nativeElement;if(a.getAttribute("aria-disabled")==="true"||"disabled"in a&&a.disabled||typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches||typeof document>"u")return;const s=a.getBoundingClientRect(),r=e.clientX-s.left,l=e.clientY-s.top,u=Math.max(s.width,s.height)*2.2,o=this.renderer.createElement("span");this.renderer.setAttribute(o,"aria-hidden","true"),this.renderer.setAttribute(o,"data-part","ripple"),this.renderer.setStyle(o,"position","absolute"),this.renderer.setStyle(o,"left",`${r}px`),this.renderer.setStyle(o,"top",`${l}px`),this.renderer.setStyle(o,"width",`${u}px`),this.renderer.setStyle(o,"height",`${u}px`),this.renderer.setStyle(o,"margin-left",`${-u/2}px`),this.renderer.setStyle(o,"margin-top",`${-u/2}px`),this.renderer.setStyle(o,"border-radius","50%"),this.renderer.setStyle(o,"background","currentColor"),this.renderer.setStyle(o,"opacity","0"),this.renderer.setStyle(o,"pointer-events","none"),this.renderer.setStyle(o,"z-index","0"),this.renderer.appendChild(a,o),o.animate([{transform:"scale(0)",opacity:.35},{transform:"scale(1)",opacity:0}],{duration:vs,easing:"cubic-bezier(0, 0, 0.2, 1)"}).addEventListener("finish",()=>o.remove()),setTimeout(()=>o.remove(),vs+80)}attachSpinner(){if(this.spinnerEl||typeof document>"u")return;const e=this.renderer.createElement("span");this.renderer.setAttribute(e,"aria-hidden","true"),this.renderer.setAttribute(e,"data-part","spinner");for(const s of["inline-block","shrink-0","animate-spin","rounded-full","border-2","border-current","border-t-transparent",Hi[this.size()]])this.renderer.addClass(e,s);const a=this.host.nativeElement;this.renderer.insertBefore(a,e,a.firstChild),this.spinnerEl=e}detachSpinner(){this.spinnerEl&&(this.spinnerEl.remove(),this.spinnerEl=null)}clearCooldown(){this.cooldownTimer!=null&&(clearTimeout(this.cooldownTimer),this.cooldownTimer=null)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:D,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:D,isStandalone:!0,selector:"button[dgaButton], a[dgaButton]",inputs:{variant:{classPropertyName:"variant",publicName:"variant",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},effect:{classPropertyName:"effect",publicName:"effect",isSignal:!0,isRequired:!1,transformFunction:null},iconOnly:{classPropertyName:"iconOnly",publicName:"iconOnly",isSignal:!0,isRequired:!1,transformFunction:null},fullWidth:{classPropertyName:"fullWidth",publicName:"fullWidth",isSignal:!0,isRequired:!1,transformFunction:null},cooldownMs:{classPropertyName:"cooldownMs",publicName:"cooldownMs",isSignal:!0,isRequired:!1,transformFunction:null},loading:{classPropertyName:"loading",publicName:"loading",isSignal:!0,isRequired:!1,transformFunction:null},buttonClass:{classPropertyName:"buttonClass",publicName:"dgaButtonClass",isSignal:!0,isRequired:!1,transformFunction:null}},host:{listeners:{pointerdown:"onPointerDown($event)",click:"onHostClick()"},properties:{class:"classes()","attr.data-variant":"variant()","attr.data-size":"size()","attr.data-effect":"effect()","attr.data-icon-only":"iconOnly() || null","attr.data-full-width":"fullWidth() || null","attr.data-loading":"busy() || null","attr.disabled":"busy() ? true : null","attr.aria-disabled":"busy() || null","attr.aria-busy":"busy() ? true : null"}},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:D,decorators:[{type:V,args:[{selector:"button[dgaButton], a[dgaButton]",standalone:!0,host:{"[class]":"classes()","[attr.data-variant]":"variant()","[attr.data-size]":"size()","[attr.data-effect]":"effect()","[attr.data-icon-only]":"iconOnly() || null","[attr.data-full-width]":"fullWidth() || null","[attr.data-loading]":"busy() || null","[attr.disabled]":"busy() ? true : null","[attr.aria-disabled]":"busy() || null","[attr.aria-busy]":"busy() ? true : null"}}]}],ctorParameters:()=>[],propDecorators:{variant:[{type:t.Input,args:[{isSignal:!0,alias:"variant",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],effect:[{type:t.Input,args:[{isSignal:!0,alias:"effect",required:!1}]}],iconOnly:[{type:t.Input,args:[{isSignal:!0,alias:"iconOnly",required:!1}]}],fullWidth:[{type:t.Input,args:[{isSignal:!0,alias:"fullWidth",required:!1}]}],cooldownMs:[{type:t.Input,args:[{isSignal:!0,alias:"cooldownMs",required:!1}]}],loading:[{type:t.Input,args:[{isSignal:!0,alias:"loading",required:!1}]}],buttonClass:[{type:t.Input,args:[{isSignal:!0,alias:"dgaButtonClass",required:!1}]}],onPointerDown:[{type:T,args:["pointerdown",["$event"]]}],onHostClick:[{type:T,args:["click"]}]}});const Wi={sm:"h-3xl px-md text-body-sm",md:"h-4xl px-lg text-body-sm"},Yi={neutral:"border-border bg-neutral-light text-paragraph",primary:"border-border-primary-light bg-primary-light text-fg-primary-strong",success:"border-border-success bg-success-light text-fg-success",info:"border-border-info bg-info-light text-fg-info",warning:"border-border-warning bg-warning-light text-fg-warning",error:"border-border-error bg-error-light text-fg-error"};class le{variant=i("neutral",...ngDevMode?[{debugName:"variant"}]:[]);size=i("md",...ngDevMode?[{debugName:"size"}]:[]);classes=n(()=>f("inline-flex items-center rounded-sm border font-medium",Wi[this.size()],Yi[this.variant()]),...ngDevMode?[{debugName:"classes"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:le,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.1.0",version:"22.1.5",type:le,isStandalone:!0,selector:"dga-badge",inputs:{variant:{classPropertyName:"variant",publicName:"variant",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{class:"classes()","attr.data-variant":"variant()","attr.data-size":"size()"}},ngImport:t,template:"<ng-content />",isInline:!0,changeDetection:t.ChangeDetectionStrategy.OnPush})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:le,decorators:[{type:v,args:[{selector:"dga-badge",standalone:!0,template:"<ng-content />",changeDetection:h.OnPush,host:{"[class]":"classes()","[attr.data-variant]":"variant()","[attr.data-size]":"size()"}}]}],propDecorators:{variant:[{type:t.Input,args:[{isSignal:!0,alias:"variant",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}]}});const Ui={neutral:"border-border bg-neutral-light text-paragraph",primary:"border-border-primary-light bg-primary-light text-fg-primary-strong",success:"border-border-success bg-success-light text-fg-success",info:"border-border-info bg-info-light text-fg-info",warning:"border-border-warning bg-warning-light text-fg-warning",error:"border-border-error bg-error-light text-fg-error"};class Q{variant=i("neutral",...ngDevMode?[{debugName:"variant"}]:[]);removable=i(!1,{...ngDevMode?{debugName:"removable"}:{},transform:m});removeLabel=i("إزالة",...ngDevMode?[{debugName:"removeLabel"}]:[]);removed=w();classes=n(()=>f("inline-flex h-4xl max-w-full items-center rounded-sm border px-lg text-body-sm font-medium",Ui[this.variant()]),...ngDevMode?[{debugName:"classes"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Q,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Q,isStandalone:!0,selector:"dga-chip",inputs:{variant:{classPropertyName:"variant",publicName:"variant",isSignal:!0,isRequired:!1,transformFunction:null},removable:{classPropertyName:"removable",publicName:"removable",isSignal:!0,isRequired:!1,transformFunction:null},removeLabel:{classPropertyName:"removeLabel",publicName:"removeLabel",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{removed:"removed"},host:{properties:{class:"classes()","attr.data-variant":"variant()"}},ngImport:t,template:`
|
|
90
|
+
`,document.head.appendChild(d)}const Ei="inline-flex cursor-pointer items-center justify-center gap-sm font-medium transition-[opacity,transform,box-shadow,background-color,color,filter] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus active:opacity-80 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-opacity motion-reduce:hover:translate-y-0 motion-reduce:hover:scale-100 motion-reduce:active:scale-100 motion-reduce:hover:translate-x-0",$i={primary:"bg-primary text-on-color shadow-sm hover:opacity-90",secondary:"bg-secondary text-on-color shadow-sm hover:opacity-90",subtle:"bg-neutral-light text-fg hover:bg-sunken",outline:"border border-border-primary bg-surface text-fg-primary hover:bg-primary-light",outlineMuted:"border border-border bg-surface text-fg hover:bg-neutral-light",outlineInverse:"border border-on-color bg-transparent text-on-color hover:bg-on-color/10",ghost:"bg-transparent text-fg-primary hover:bg-primary-light",danger:"bg-error text-on-color shadow-sm hover:opacity-90",inverse:"bg-surface text-fg-primary-strong shadow-sm hover:opacity-90"},Bi={sm:"h-4xl rounded-sm px-lg text-body-sm",md:"h-5xl rounded-sm px-xl text-body-md",lg:"h-6xl rounded-sm px-2xl text-body-lg"},ji={sm:"size-4xl rounded-sm p-0",md:"size-5xl rounded-sm p-0",lg:"size-6xl rounded-sm p-0"},Hi={sm:"size-lg",md:"size-lg",lg:"size-2xl"},Ki={opacity:"",ripple:"relative overflow-hidden",lift:"hover:-translate-y-0.5 hover:shadow-md focus-visible:outline-offset-4",scale:"hover:scale-[1.03] active:scale-[0.98]",glow:"hover:shadow-[0_0_0_4px_color-mix(in_oklab,var(--color-primary)_28%,transparent)] focus-visible:outline-offset-4",press:"active:scale-[0.96] active:shadow-inner hover:brightness-105",bounce:"",slide:"hover:ltr:translate-x-0.5 hover:rtl:-translate-x-0.5 active:ltr:translate-x-1 active:rtl:-translate-x-1",shine:"",pulse:"",float:"hover:-translate-y-1 hover:shadow-lg focus-visible:outline-offset-4",wobble:"",jelly:""},ys=520;class D{destroyRef=x(L);host=x(F);renderer=x(Pi);variant=i("primary",...ngDevMode?[{debugName:"variant"}]:[]);size=i("md",...ngDevMode?[{debugName:"size"}]:[]);effect=i("opacity",...ngDevMode?[{debugName:"effect"}]:[]);iconOnly=i(!1,{...ngDevMode?{debugName:"iconOnly"}:{},transform:m});fullWidth=i(!1,{...ngDevMode?{debugName:"fullWidth"}:{},transform:m});cooldownMs=i(0,...ngDevMode?[{debugName:"cooldownMs"}]:[]);loading=i(!1,{...ngDevMode?{debugName:"loading"}:{},transform:m});buttonClass=i("",{...ngDevMode?{debugName:"buttonClass"}:{},alias:"dgaButtonClass"});cooling=y(!1,...ngDevMode?[{debugName:"cooling"}]:[]);cooldownTimer=null;spinnerEl=null;busy=n(()=>this.loading()||this.cooling(),...ngDevMode?[{debugName:"busy"}]:[]);classes=n(()=>f(Ei,$i[this.variant()],this.iconOnly()?ji[this.size()]:Bi[this.size()],Ki[this.effect()],this.fullWidth()&&"w-full",this.busy()&&"pointer-events-none opacity-70",this.buttonClass()),...ngDevMode?[{debugName:"classes"}]:[]);constructor(){Vi(),M(()=>{this.busy()?this.attachSpinner():this.detachSpinner()}),this.destroyRef.onDestroy(()=>{this.clearCooldown(),this.detachSpinner()})}onPointerDown(e){this.spawnRipple(e)}onHostClick(){if(this.busy())return;const e=this.cooldownMs();e<=0||(this.cooling.set(!0),this.attachSpinner(),this.clearCooldown(),this.cooldownTimer=setTimeout(()=>{this.cooling.set(!1),this.cooldownTimer=null},e))}spawnRipple(e){if(this.effect()!=="ripple"||this.busy()||e.button!==0)return;const a=this.host.nativeElement;if(a.getAttribute("aria-disabled")==="true"||"disabled"in a&&a.disabled||typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches||typeof document>"u")return;const s=a.getBoundingClientRect(),r=e.clientX-s.left,l=e.clientY-s.top,u=Math.max(s.width,s.height)*2.2,o=this.renderer.createElement("span");this.renderer.setAttribute(o,"aria-hidden","true"),this.renderer.setAttribute(o,"data-part","ripple"),this.renderer.setStyle(o,"position","absolute"),this.renderer.setStyle(o,"left",`${r}px`),this.renderer.setStyle(o,"top",`${l}px`),this.renderer.setStyle(o,"width",`${u}px`),this.renderer.setStyle(o,"height",`${u}px`),this.renderer.setStyle(o,"margin-left",`${-u/2}px`),this.renderer.setStyle(o,"margin-top",`${-u/2}px`),this.renderer.setStyle(o,"border-radius","50%"),this.renderer.setStyle(o,"background","currentColor"),this.renderer.setStyle(o,"opacity","0"),this.renderer.setStyle(o,"pointer-events","none"),this.renderer.setStyle(o,"z-index","0"),this.renderer.appendChild(a,o),o.animate([{transform:"scale(0)",opacity:.35},{transform:"scale(1)",opacity:0}],{duration:ys,easing:"cubic-bezier(0, 0, 0.2, 1)"}).addEventListener("finish",()=>o.remove()),setTimeout(()=>o.remove(),ys+80)}attachSpinner(){if(this.spinnerEl||typeof document>"u")return;const e=this.renderer.createElement("span");this.renderer.setAttribute(e,"aria-hidden","true"),this.renderer.setAttribute(e,"data-part","spinner");for(const s of["inline-block","shrink-0","animate-spin","rounded-full","border-2","border-current","border-t-transparent",Hi[this.size()]])this.renderer.addClass(e,s);const a=this.host.nativeElement;this.renderer.insertBefore(a,e,a.firstChild),this.spinnerEl=e}detachSpinner(){this.spinnerEl&&(this.spinnerEl.remove(),this.spinnerEl=null)}clearCooldown(){this.cooldownTimer!=null&&(clearTimeout(this.cooldownTimer),this.cooldownTimer=null)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:D,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:D,isStandalone:!0,selector:"button[dgaButton], a[dgaButton]",inputs:{variant:{classPropertyName:"variant",publicName:"variant",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},effect:{classPropertyName:"effect",publicName:"effect",isSignal:!0,isRequired:!1,transformFunction:null},iconOnly:{classPropertyName:"iconOnly",publicName:"iconOnly",isSignal:!0,isRequired:!1,transformFunction:null},fullWidth:{classPropertyName:"fullWidth",publicName:"fullWidth",isSignal:!0,isRequired:!1,transformFunction:null},cooldownMs:{classPropertyName:"cooldownMs",publicName:"cooldownMs",isSignal:!0,isRequired:!1,transformFunction:null},loading:{classPropertyName:"loading",publicName:"loading",isSignal:!0,isRequired:!1,transformFunction:null},buttonClass:{classPropertyName:"buttonClass",publicName:"dgaButtonClass",isSignal:!0,isRequired:!1,transformFunction:null}},host:{listeners:{pointerdown:"onPointerDown($event)",click:"onHostClick()"},properties:{class:"classes()","attr.data-variant":"variant()","attr.data-size":"size()","attr.data-effect":"effect()","attr.data-icon-only":"iconOnly() || null","attr.data-full-width":"fullWidth() || null","attr.data-loading":"busy() || null","attr.disabled":"busy() ? true : null","attr.aria-disabled":"busy() || null","attr.aria-busy":"busy() ? true : null"}},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:D,decorators:[{type:V,args:[{selector:"button[dgaButton], a[dgaButton]",standalone:!0,host:{"[class]":"classes()","[attr.data-variant]":"variant()","[attr.data-size]":"size()","[attr.data-effect]":"effect()","[attr.data-icon-only]":"iconOnly() || null","[attr.data-full-width]":"fullWidth() || null","[attr.data-loading]":"busy() || null","[attr.disabled]":"busy() ? true : null","[attr.aria-disabled]":"busy() || null","[attr.aria-busy]":"busy() ? true : null"}}]}],ctorParameters:()=>[],propDecorators:{variant:[{type:t.Input,args:[{isSignal:!0,alias:"variant",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],effect:[{type:t.Input,args:[{isSignal:!0,alias:"effect",required:!1}]}],iconOnly:[{type:t.Input,args:[{isSignal:!0,alias:"iconOnly",required:!1}]}],fullWidth:[{type:t.Input,args:[{isSignal:!0,alias:"fullWidth",required:!1}]}],cooldownMs:[{type:t.Input,args:[{isSignal:!0,alias:"cooldownMs",required:!1}]}],loading:[{type:t.Input,args:[{isSignal:!0,alias:"loading",required:!1}]}],buttonClass:[{type:t.Input,args:[{isSignal:!0,alias:"dgaButtonClass",required:!1}]}],onPointerDown:[{type:O,args:["pointerdown",["$event"]]}],onHostClick:[{type:O,args:["click"]}]}});const Wi={sm:"h-3xl px-md text-body-sm",md:"h-4xl px-lg text-body-sm"},Yi={neutral:"border-border bg-neutral-light text-paragraph",primary:"border-border-primary-light bg-primary-light text-fg-primary-strong",success:"border-border-success bg-success-light text-fg-success",info:"border-border-info bg-info-light text-fg-info",warning:"border-border-warning bg-warning-light text-fg-warning",error:"border-border-error bg-error-light text-fg-error"};class le{variant=i("neutral",...ngDevMode?[{debugName:"variant"}]:[]);size=i("md",...ngDevMode?[{debugName:"size"}]:[]);classes=n(()=>f("inline-flex items-center rounded-sm border font-medium",Wi[this.size()],Yi[this.variant()]),...ngDevMode?[{debugName:"classes"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:le,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.1.0",version:"22.1.5",type:le,isStandalone:!0,selector:"dga-badge",inputs:{variant:{classPropertyName:"variant",publicName:"variant",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{class:"classes()","attr.data-variant":"variant()","attr.data-size":"size()"}},ngImport:t,template:"<ng-content />",isInline:!0,changeDetection:t.ChangeDetectionStrategy.OnPush})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:le,decorators:[{type:v,args:[{selector:"dga-badge",standalone:!0,template:"<ng-content />",changeDetection:h.OnPush,host:{"[class]":"classes()","[attr.data-variant]":"variant()","[attr.data-size]":"size()"}}]}],propDecorators:{variant:[{type:t.Input,args:[{isSignal:!0,alias:"variant",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}]}});const Ui={neutral:"border-border bg-neutral-light text-paragraph",primary:"border-border-primary-light bg-primary-light text-fg-primary-strong",success:"border-border-success bg-success-light text-fg-success",info:"border-border-info bg-info-light text-fg-info",warning:"border-border-warning bg-warning-light text-fg-warning",error:"border-border-error bg-error-light text-fg-error"};class Q{variant=i("neutral",...ngDevMode?[{debugName:"variant"}]:[]);removable=i(!1,{...ngDevMode?{debugName:"removable"}:{},transform:m});removeLabel=i("إزالة",...ngDevMode?[{debugName:"removeLabel"}]:[]);removed=w();classes=n(()=>f("inline-flex h-4xl max-w-full items-center rounded-sm border px-lg text-body-sm font-medium",Ui[this.variant()]),...ngDevMode?[{debugName:"classes"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Q,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Q,isStandalone:!0,selector:"dga-chip",inputs:{variant:{classPropertyName:"variant",publicName:"variant",isSignal:!0,isRequired:!1,transformFunction:null},removable:{classPropertyName:"removable",publicName:"removable",isSignal:!0,isRequired:!1,transformFunction:null},removeLabel:{classPropertyName:"removeLabel",publicName:"removeLabel",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{removed:"removed"},host:{properties:{class:"classes()","attr.data-variant":"variant()"}},ngImport:t,template:`
|
|
91
91
|
<span class="truncate"><ng-content /></span>
|
|
92
92
|
@if (removable()) {
|
|
93
93
|
<button
|
|
@@ -145,7 +145,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
145
145
|
} @else {
|
|
146
146
|
<span [class]="boneClasses(false)"></span>
|
|
147
147
|
}
|
|
148
|
-
`,host:{"[attr.role]":'announce() ? "status" : "presentation"',"[attr.aria-busy]":"announce() ? true : null","[attr.aria-label]":"announce() ? label() : null","[attr.aria-hidden]":"announce() ? null : true","[attr.data-shape]":"shape()","[attr.data-animation]":"animation()","[attr.data-size]":"size()",class:"block"},changeDetection:h.OnPush,styles:["@keyframes dga-skeleton-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}.dga-skeleton-shimmer{background-image:linear-gradient(90deg,var(--color-sunken, #e8e8e8) 0%,var(--color-card, #f5f5f5) 45%,var(--color-sunken, #e8e8e8) 90%);background-size:200% 100%;animation:dga-skeleton-shimmer 1.4s ease-in-out infinite}:host-context([dir=\"rtl\"]) .dga-skeleton-shimmer{animation-direction:reverse}\n"]}]}],propDecorators:{shape:[{type:t.Input,args:[{isSignal:!0,alias:"shape",required:!1}]}],animation:[{type:t.Input,args:[{isSignal:!0,alias:"animation",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],widthClass:[{type:t.Input,args:[{isSignal:!0,alias:"widthClass",required:!1}]}],heightClass:[{type:t.Input,args:[{isSignal:!0,alias:"heightClass",required:!1}]}],lines:[{type:t.Input,args:[{isSignal:!0,alias:"lines",required:!1}]}],lastWidthClass:[{type:t.Input,args:[{isSignal:!0,alias:"lastWidthClass",required:!1}]}],radius:[{type:t.Input,args:[{isSignal:!0,alias:"radius",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],announce:[{type:t.Input,args:[{isSignal:!0,alias:"announce",required:!1}]}]}});function Ua(){return typeof document>"u"?"ar":(document.documentElement.lang||"ar").toLowerCase().split("-")[0]||"ar"}let Ga=null;function $(){return Ga||(Ga=y(Ua()),typeof document<"u"&&typeof MutationObserver<"u"&&new MutationObserver(()=>{Ga.set(Ua())}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]})),Ga}function Xa(){return typeof document>"u"?!0:(document.documentElement.getAttribute("dir")||"rtl").toLowerCase()==="rtl"}function q(){return Ua().startsWith("ar")}function
|
|
148
|
+
`,host:{"[attr.role]":'announce() ? "status" : "presentation"',"[attr.aria-busy]":"announce() ? true : null","[attr.aria-label]":"announce() ? label() : null","[attr.aria-hidden]":"announce() ? null : true","[attr.data-shape]":"shape()","[attr.data-animation]":"animation()","[attr.data-size]":"size()",class:"block"},changeDetection:h.OnPush,styles:["@keyframes dga-skeleton-shimmer{0%{background-position:100% 0}to{background-position:-100% 0}}.dga-skeleton-shimmer{background-image:linear-gradient(90deg,var(--color-sunken, #e8e8e8) 0%,var(--color-card, #f5f5f5) 45%,var(--color-sunken, #e8e8e8) 90%);background-size:200% 100%;animation:dga-skeleton-shimmer 1.4s ease-in-out infinite}:host-context([dir=\"rtl\"]) .dga-skeleton-shimmer{animation-direction:reverse}\n"]}]}],propDecorators:{shape:[{type:t.Input,args:[{isSignal:!0,alias:"shape",required:!1}]}],animation:[{type:t.Input,args:[{isSignal:!0,alias:"animation",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],widthClass:[{type:t.Input,args:[{isSignal:!0,alias:"widthClass",required:!1}]}],heightClass:[{type:t.Input,args:[{isSignal:!0,alias:"heightClass",required:!1}]}],lines:[{type:t.Input,args:[{isSignal:!0,alias:"lines",required:!1}]}],lastWidthClass:[{type:t.Input,args:[{isSignal:!0,alias:"lastWidthClass",required:!1}]}],radius:[{type:t.Input,args:[{isSignal:!0,alias:"radius",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],announce:[{type:t.Input,args:[{isSignal:!0,alias:"announce",required:!1}]}]}});function Ua(){return typeof document>"u"?"ar":(document.documentElement.lang||"ar").toLowerCase().split("-")[0]||"ar"}let Ga=null;function $(){return Ga||(Ga=y(Ua()),typeof document<"u"&&typeof MutationObserver<"u"&&new MutationObserver(()=>{Ga.set(Ua())}).observe(document.documentElement,{attributes:!0,attributeFilter:["lang"]})),Ga}function Xa(){return typeof document>"u"?!0:(document.documentElement.getAttribute("dir")||"rtl").toLowerCase()==="rtl"}function q(){return Ua().startsWith("ar")}function xs(d,e,a=["en","ar"]){if(d==null)return;if(typeof d=="string")return d;const s=d[e];if(s)return s;for(const r of a)if(r!==e&&d[r])return d[r];return Object.values(d).find(r=>!!r)}const sr={sm:"h-xs",md:"h-sm",lg:"h-md"},ir={sm:"size-4xl",md:"size-5xl",lg:"size-7xl"},rr={primary:"bg-primary",success:"bg-success",warning:"bg-warning",error:"bg-error"},nr={primary:"var(--dga-bg-primary, var(--dga-color-primary-600))",success:"var(--dga-bg-success, var(--dga-color-success-600))",warning:"var(--dga-bg-warning, var(--dga-color-warning-600))",error:"var(--dga-bg-error, var(--dga-color-error-600))"},ws=15.5,as=2*Math.PI*ws;class Nt{uiLocale=$();value=i(0,...ngDevMode?[{debugName:"value"}]:[]);size=i("md",...ngDevMode?[{debugName:"size"}]:[]);tone=i("primary",...ngDevMode?[{debugName:"tone"}]:[]);appearance=i("linear",...ngDevMode?[{debugName:"appearance"}]:[]);showValue=i(!0,...ngDevMode?[{debugName:"showValue"}]:[]);valueText=i("",...ngDevMode?[{debugName:"valueText"}]:[]);label=i(void 0,...ngDevMode?[{debugName:"label"}]:[]);resolvedLabel=n(()=>this.label()??(this.uiLocale().startsWith("ar")?"التقدم":"Progress"),...ngDevMode?[{debugName:"resolvedLabel"}]:[]);radius=ws;circumference=as;clamped=n(()=>{const e=this.value();return Number.isNaN(e)?0:Math.min(100,Math.max(0,e))},...ngDevMode?[{debugName:"clamped"}]:[]);dashOffset=n(()=>as-as*this.clamped()/100,...ngDevMode?[{debugName:"dashOffset"}]:[]);displayValue=n(()=>{const e=this.valueText().trim();return e||`${this.clamped()}${this.uiLocale().startsWith("ar")?"٪":"%"}`},...ngDevMode?[{debugName:"displayValue"}]:[]);hostClasses=n(()=>this.appearance()==="radial"?"inline-flex":"block w-full",...ngDevMode?[{debugName:"hostClasses"}]:[]);trackClasses=n(()=>f("w-full overflow-hidden rounded-full bg-sunken",sr[this.size()]),...ngDevMode?[{debugName:"trackClasses"}]:[]);barClasses=n(()=>f("h-full rounded-full transition-[width]",rr[this.tone()]),...ngDevMode?[{debugName:"barClasses"}]:[]);radialWrapClasses=n(()=>f("relative inline-flex",ir[this.size()]),...ngDevMode?[{debugName:"radialWrapClasses"}]:[]);strokeColor=n(()=>nr[this.tone()],...ngDevMode?[{debugName:"strokeColor"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Nt,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Nt,isStandalone:!0,selector:"dga-progress",inputs:{value:{classPropertyName:"value",publicName:"value",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},tone:{classPropertyName:"tone",publicName:"tone",isSignal:!0,isRequired:!1,transformFunction:null},appearance:{classPropertyName:"appearance",publicName:"appearance",isSignal:!0,isRequired:!1,transformFunction:null},showValue:{classPropertyName:"showValue",publicName:"showValue",isSignal:!0,isRequired:!1,transformFunction:null},valueText:{classPropertyName:"valueText",publicName:"valueText",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null}},host:{attributes:{role:"progressbar"},properties:{class:"hostClasses()","attr.aria-valuemin":"0","attr.aria-valuemax":"100","attr.aria-valuenow":"clamped()","attr.aria-label":"resolvedLabel()","attr.data-size":"size()","attr.data-tone":"tone()","attr.data-appearance":"appearance()"}},ngImport:t,template:`
|
|
149
149
|
@if (appearance() === 'radial') {
|
|
150
150
|
<div [class]="radialWrapClasses()" aria-hidden="true">
|
|
151
151
|
<svg class="size-full -rotate-90" viewBox="0 0 36 36" focusable="false">
|
|
@@ -271,7 +271,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
271
271
|
/>
|
|
272
272
|
</svg>
|
|
273
273
|
}
|
|
274
|
-
`,changeDetection:h.OnPush,host:{"[class]":"classes()","[attr.data-size]":"size()","[attr.aria-label]":"src() ? null : resolvedAlt()","[attr.role]":'src() ? null : "img"'}}]}],propDecorators:{src:[{type:t.Input,args:[{isSignal:!0,alias:"src",required:!1}]}],name:[{type:t.Input,args:[{isSignal:!0,alias:"name",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],alt:[{type:t.Input,args:[{isSignal:!0,alias:"alt",required:!1}]}]}});const or=["access","alertCircle","ambulance","apple","arrowDown","arrowDown02","arrowLeft","arrowLeft02","arrowNext","arrowNext02","arrowPrev","arrowPrev02","arrowRight","arrowRight02","arrowUp","arrowUp02","award","badgeCheck","bell","bellAlt","book","bookType","brain","building","calendar","calendarAlt","cart","check","checkCircle","checkCircleAlt","chevronDown","chevronLeft","chevronRight","clock","close","cloud","colorPicker","colors","cookie","copy","desert","devices","disability","door","download","droplet","error","external","eye","eyeOff","eyeOffSlash","facebook","filter","fire","flash","folder","glasses","globe","heading","headphones","helpCircle","highlighter","home","huawei","idCard","info","instagram","letterSpacing","link","linkAlt","linkedin","location","lock","lockPassword","logout","mail","mask","maximize","menu","menuAlt","message","mic","minus","moon","moonAlt","moonCloud","moreHorizontal","moreVertical","paintBoard","pause","phone","playStore","plus","plusSign","police","printer","rain","rainZap","refresh","riyal","search","share","shrink","smartphone","snow","sort","sortDown","sortUp","star","starFilled","success","sun","sunAlt","sunCloud","textAlign","textFont","textUnderline","touch","tradeDown","tradeUp","translation","upload","user","users","warning","whatsapp","wheelchair","wind","x","youtube","zoomIn","zoomOut"],ws=new Set(["arrowNext","arrowPrev","arrowNext02","arrowPrev02"]),ss="hgi-stroke-rounded",is="data-dga-fonts-loaded";class dt{loading=null;ensureLoaded(){if(typeof document>"u")return Promise.resolve();const e=document.documentElement;return this.hasToken(e.getAttribute(is))?Promise.resolve():(this.loading||(this.loading=this.load(e).finally(()=>{this.loading=null})),this.loading)}hasToken(e){return!!e?.split(/\s+/).includes(ss)}async load(e){try{document.fonts?.load&&await document.fonts.load(`1em "${ss}"`)}catch{}const a=e.getAttribute(is)??"",s=new Set(a.split(/\s+/).filter(Boolean));s.add(ss),e.setAttribute(is,[...s].join(" "))}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:dt,deps:[],target:t.ɵɵFactoryTarget.Injectable});static ɵprov=t.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:dt,providedIn:"root"})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:dt,decorators:[{type:Ha,args:[{providedIn:"root"}]}]});const rs=new Pi("DGA_ICON_OVERRIDES");function dr(d){return zi([{provide:rs,useValue:d,multi:!0}])}const ks={close:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M18 6L6.00081 17.9992M17.9992 18L6 6.00085" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',menu:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M4 5L20 5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M4 12L20 12" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M4 19L20 19" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',search:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M17 17L21 21" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',chevronDown:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',chevronLeft:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M15 6C15 6 9.00001 10.4189 9 12C8.99999 13.5812 15 18 15 18" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',chevronRight:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',check:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M5 14L8.5 17.5L19 6.5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',user:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M20 21.0001C19.713 17.269 16.7289 14.3151 12.995 14.0662L12 13.9999C11.6446 14.0096 11.3134 14.0225 11.0008 14.0378C7.3 14.2192 4.28417 17.3057 4 21.0001" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><circle cx="12" cy="6.99988" r="4" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',home:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M3 11.9896V14.5C3 17.7998 3 19.4497 4.02513 20.4749C5.05025 21.5 6.70017 21.5 10 21.5H14C17.2998 21.5 18.9497 21.5 19.9749 20.4749C21 19.4497 21 17.7998 21 14.5V11.9896C21 10.3083 21 9.46773 20.6441 8.74005C20.2882 8.01237 19.6247 7.49628 18.2976 6.46411L16.2976 4.90855C14.2331 3.30285 13.2009 2.5 12 2.5C10.7991 2.5 9.76689 3.30285 7.70242 4.90855L5.70241 6.46411C4.37533 7.49628 3.71179 8.01237 3.3559 8.74005C3 9.46773 3 10.3083 3 11.9896Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',plus:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M12.001 5.00003V19.002" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M19.002 12.002L4.99998 12.002" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',paintBoard:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C12.8417 22 14 22.1163 14 21C14 20.391 13.6832 19.9212 13.3686 19.4544C12.9082 18.7715 12.4523 18.0953 13 17C13.6667 15.6667 14.7778 15.6667 16.4815 15.6667C17.3334 15.6667 18.3334 15.6667 19.5 15.5C21.601 15.1999 22 13.9084 22 12Z" stroke="currentColor" strokeWidth="2"/><circle cx="9.5" cy="8.5" r="1.5" stroke="currentColor" strokeWidth="2"/><circle cx="16.5" cy="9.5" r="1.5" stroke="currentColor" strokeWidth="2"/><path d="M7.125 15H7M7.25 15C7.25 15.1381 7.13807 15.25 7 15.25C6.86193 15.25 6.75 15.1381 6.75 15C6.75 14.8619 6.86193 14.75 7 14.75C7.13807 14.75 7.25 14.8619 7.25 15Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',bookType:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M20 22H6C4.89543 22 4 21.1046 4 20M4 20C4 18.8954 4.89543 18 6 18H20V6C20 4.11438 20 3.17157 19.4142 2.58579C18.8284 2 17.8856 2 16 2H10C7.17157 2 5.75736 2 4.87868 2.87868C4 3.75736 4 5.17157 4 8V20Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M19.5 18C19.5 18 18.5 18.7628 18.5 20C18.5 21.2372 19.5 22 19.5 22" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M8 7.5V7C8 6.44772 8.44772 6 9 6H15C15.5523 6 16 6.44772 16 7V7.5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M12 6V14" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M10 14H14" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>'};let Ns=null;function cr(){return Ns??=import("./a.nemreen-dga-ui-dga-icon-defaults-5A50haok.mjs").then(d=>d.DGA_ICON_DEFAULTS),Ns}class ct{providerOverrides=x(rs,{optional:!0})??[];runtime=y({},...ngDevMode?[{debugName:"runtime"}]:[]);defaults=y(null,...ngDevMode?[{debugName:"defaults"}]:[]);loading=y(!1,...ngDevMode?[{debugName:"loading"}]:[]);provided=Object.assign({},...this.providerOverrides);get(e){return this.runtime()[e]??this.provided[e]??this.defaults()?.[e]??ks[e]??""}isCore(e){return Object.prototype.hasOwnProperty.call(ks,e)}ensureLoaded(e){this.defaults()||this.loading()||this.runtime()[e]||this.provided[e]||this.isCore(e)||(this.loading.set(!0),cr().then(a=>{this.defaults.set(a),this.loading.set(!1)}))}register(e,a){this.runtime.update(s=>({...s,[e]:a}))}registerAll(e){this.runtime.update(a=>({...a,...e}))}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ct,deps:[],target:t.ɵɵFactoryTarget.Injectable});static ɵprov=t.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ct,providedIn:"root"})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ct,decorators:[{type:Ha,args:[{providedIn:"root"}]}]});const ur={"2xs":"size-(--size-icon-2xs)",xs:"size-(--size-icon-xs)",sm:"size-(--size-icon-sm)",md:"size-(--size-icon-md)",lg:"size-(--size-icon-lg)",xl:"size-(--size-icon-xl)","2xl":"size-(--size-icon-2xl)","3xl":"size-(--size-icon-3xl)"},pr={current:"text-current",primary:"text-fg-primary",muted:"text-muted",success:"text-fg-success",warning:"text-fg-warning",error:"text-fg-error"};class k{sanitizer=x(Wa);iconFont=x(dt);registry=x(ct);name=i(void 0,...ngDevMode?[{debugName:"name"}]:[]);glyph=i("",...ngDevMode?[{debugName:"glyph"}]:[]);size=i("sm",...ngDevMode?[{debugName:"size"}]:[]);tone=i("current",...ngDevMode?[{debugName:"tone"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);isFont=n(()=>!!this.glyph().trim(),...ngDevMode?[{debugName:"isFont"}]:[]);logical=n(()=>{const e=this.name();return!!e&&ws.has(e)},...ngDevMode?[{debugName:"logical"}]:[]);fontClasses=n(()=>{const e=this.glyph().trim().replace(/^hgi-/,"");return!e||!/^[a-z0-9-]+$/i.test(e)?"hgi-stroke":`hgi-stroke hgi-${e}`},...ngDevMode?[{debugName:"fontClasses"}]:[]);classes=n(()=>f("inline-flex shrink-0 items-center justify-center",ur[this.size()],pr[this.tone()]),...ngDevMode?[{debugName:"classes"}]:[]);svg=n(()=>{const e=this.name(),a=e?this.registry.get(e):"";return this.sanitizer.bypassSecurityTrustHtml(a)},...ngDevMode?[{debugName:"svg"}]:[]);constructor(){M(()=>{if(this.isFont()){this.iconFont.ensureLoaded();return}const e=this.name();e&&this.registry.ensureLoaded(e)})}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:k,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:k,isStandalone:!0,selector:"dga-icon",inputs:{name:{classPropertyName:"name",publicName:"name",isSignal:!0,isRequired:!1,transformFunction:null},glyph:{classPropertyName:"glyph",publicName:"glyph",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},tone:{classPropertyName:"tone",publicName:"tone",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{class:"classes()","attr.data-name":"name() || null","attr.data-glyph":"glyph() || null","attr.data-size":"size()","attr.data-tone":"tone()","attr.data-logical":'logical() ? "true" : null',"attr.role":'label() ? "img" : null',"attr.aria-hidden":'label() ? null : "true"'}},ngImport:t,template:`
|
|
274
|
+
`,changeDetection:h.OnPush,host:{"[class]":"classes()","[attr.data-size]":"size()","[attr.aria-label]":"src() ? null : resolvedAlt()","[attr.role]":'src() ? null : "img"'}}]}],propDecorators:{src:[{type:t.Input,args:[{isSignal:!0,alias:"src",required:!1}]}],name:[{type:t.Input,args:[{isSignal:!0,alias:"name",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],alt:[{type:t.Input,args:[{isSignal:!0,alias:"alt",required:!1}]}]}});const or=["access","alertCircle","ambulance","apple","arrowDown","arrowDown02","arrowLeft","arrowLeft02","arrowNext","arrowNext02","arrowPrev","arrowPrev02","arrowRight","arrowRight02","arrowUp","arrowUp02","award","badgeCheck","bell","bellAlt","book","bookType","brain","building","calendar","calendarAlt","cart","check","checkCircle","checkCircleAlt","chevronDown","chevronLeft","chevronRight","clock","close","cloud","colorPicker","colors","cookie","copy","desert","devices","disability","door","download","droplet","error","external","eye","eyeOff","eyeOffSlash","facebook","filter","fire","flash","folder","glasses","globe","heading","headphones","helpCircle","highlighter","home","huawei","idCard","info","instagram","letterSpacing","link","linkAlt","linkedin","location","lock","lockPassword","logout","mail","mask","maximize","menu","menuAlt","message","mic","minus","moon","moonAlt","moonCloud","moreHorizontal","moreVertical","paintBoard","pause","phone","playStore","plus","plusSign","police","printer","rain","rainZap","refresh","riyal","search","share","shrink","smartphone","snow","sort","sortDown","sortUp","star","starFilled","success","sun","sunAlt","sunCloud","textAlign","textFont","textUnderline","touch","tradeDown","tradeUp","translation","upload","user","users","warning","whatsapp","wheelchair","wind","x","youtube","zoomIn","zoomOut"],ks=new Set(["arrowNext","arrowPrev","arrowNext02","arrowPrev02"]),ss="hgi-stroke-rounded",is="data-dga-fonts-loaded";class dt{loading=null;ensureLoaded(){if(typeof document>"u")return Promise.resolve();const e=document.documentElement;return this.hasToken(e.getAttribute(is))?Promise.resolve():(this.loading||(this.loading=this.load(e).finally(()=>{this.loading=null})),this.loading)}hasToken(e){return!!e?.split(/\s+/).includes(ss)}async load(e){try{document.fonts?.load&&await document.fonts.load(`1em "${ss}"`)}catch{}const a=e.getAttribute(is)??"",s=new Set(a.split(/\s+/).filter(Boolean));s.add(ss),e.setAttribute(is,[...s].join(" "))}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:dt,deps:[],target:t.ɵɵFactoryTarget.Injectable});static ɵprov=t.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:dt,providedIn:"root"})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:dt,decorators:[{type:Ha,args:[{providedIn:"root"}]}]});const rs=new zi("DGA_ICON_OVERRIDES");function dr(d){return Fi([{provide:rs,useValue:d,multi:!0}])}const Ns={close:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M18 6L6.00081 17.9992M17.9992 18L6 6.00085" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',menu:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M4 5L20 5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M4 12L20 12" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M4 19L20 19" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',search:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M17 17L21 21" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',chevronDown:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',chevronLeft:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M15 6C15 6 9.00001 10.4189 9 12C8.99999 13.5812 15 18 15 18" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',chevronRight:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M9.00005 6C9.00005 6 15 10.4189 15 12C15 13.5812 9 18 9 18" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',check:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M5 14L8.5 17.5L19 6.5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',user:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M20 21.0001C19.713 17.269 16.7289 14.3151 12.995 14.0662L12 13.9999C11.6446 14.0096 11.3134 14.0225 11.0008 14.0378C7.3 14.2192 4.28417 17.3057 4 21.0001" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><circle cx="12" cy="6.99988" r="4" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',home:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M3 11.9896V14.5C3 17.7998 3 19.4497 4.02513 20.4749C5.05025 21.5 6.70017 21.5 10 21.5H14C17.2998 21.5 18.9497 21.5 19.9749 20.4749C21 19.4497 21 17.7998 21 14.5V11.9896C21 10.3083 21 9.46773 20.6441 8.74005C20.2882 8.01237 19.6247 7.49628 18.2976 6.46411L16.2976 4.90855C14.2331 3.30285 13.2009 2.5 12 2.5C10.7991 2.5 9.76689 3.30285 7.70242 4.90855L5.70241 6.46411C4.37533 7.49628 3.71179 8.01237 3.3559 8.74005C3 9.46773 3 10.3083 3 11.9896Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',plus:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M12.001 5.00003V19.002" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M19.002 12.002L4.99998 12.002" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',paintBoard:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C12.8417 22 14 22.1163 14 21C14 20.391 13.6832 19.9212 13.3686 19.4544C12.9082 18.7715 12.4523 18.0953 13 17C13.6667 15.6667 14.7778 15.6667 16.4815 15.6667C17.3334 15.6667 18.3334 15.6667 19.5 15.5C21.601 15.1999 22 13.9084 22 12Z" stroke="currentColor" strokeWidth="2"/><circle cx="9.5" cy="8.5" r="1.5" stroke="currentColor" strokeWidth="2"/><circle cx="16.5" cy="9.5" r="1.5" stroke="currentColor" strokeWidth="2"/><path d="M7.125 15H7M7.25 15C7.25 15.1381 7.13807 15.25 7 15.25C6.86193 15.25 6.75 15.1381 6.75 15C6.75 14.8619 6.86193 14.75 7 14.75C7.13807 14.75 7.25 14.8619 7.25 15Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>',bookType:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" class="dga-icon"><path d="M20 22H6C4.89543 22 4 21.1046 4 20M4 20C4 18.8954 4.89543 18 6 18H20V6C20 4.11438 20 3.17157 19.4142 2.58579C18.8284 2 17.8856 2 16 2H10C7.17157 2 5.75736 2 4.87868 2.87868C4 3.75736 4 5.17157 4 8V20Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M19.5 18C19.5 18 18.5 18.7628 18.5 20C18.5 21.2372 19.5 22 19.5 22" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M8 7.5V7C8 6.44772 8.44772 6 9 6H15C15.5523 6 16 6.44772 16 7V7.5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M12 6V14" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/><path d="M10 14H14" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2"/></svg>'};let Ss=null;function cr(){return Ss??=import("./a.nemreen-dga-ui-dga-icon-defaults-5A50haok.mjs").then(d=>d.DGA_ICON_DEFAULTS),Ss}class ct{providerOverrides=x(rs,{optional:!0})??[];runtime=y({},...ngDevMode?[{debugName:"runtime"}]:[]);defaults=y(null,...ngDevMode?[{debugName:"defaults"}]:[]);loading=y(!1,...ngDevMode?[{debugName:"loading"}]:[]);provided=Object.assign({},...this.providerOverrides);get(e){return this.runtime()[e]??this.provided[e]??this.defaults()?.[e]??Ns[e]??""}isCore(e){return Object.prototype.hasOwnProperty.call(Ns,e)}ensureLoaded(e){this.defaults()||this.loading()||this.runtime()[e]||this.provided[e]||this.isCore(e)||(this.loading.set(!0),cr().then(a=>{this.defaults.set(a),this.loading.set(!1)}))}register(e,a){this.runtime.update(s=>({...s,[e]:a}))}registerAll(e){this.runtime.update(a=>({...a,...e}))}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ct,deps:[],target:t.ɵɵFactoryTarget.Injectable});static ɵprov=t.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ct,providedIn:"root"})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ct,decorators:[{type:Ha,args:[{providedIn:"root"}]}]});const ur={"2xs":"size-(--size-icon-2xs)",xs:"size-(--size-icon-xs)",sm:"size-(--size-icon-sm)",md:"size-(--size-icon-md)",lg:"size-(--size-icon-lg)",xl:"size-(--size-icon-xl)","2xl":"size-(--size-icon-2xl)","3xl":"size-(--size-icon-3xl)"},pr={current:"text-current",primary:"text-fg-primary",muted:"text-muted",success:"text-fg-success",warning:"text-fg-warning",error:"text-fg-error"};class k{sanitizer=x(Wa);iconFont=x(dt);registry=x(ct);name=i(void 0,...ngDevMode?[{debugName:"name"}]:[]);glyph=i("",...ngDevMode?[{debugName:"glyph"}]:[]);size=i("sm",...ngDevMode?[{debugName:"size"}]:[]);tone=i("current",...ngDevMode?[{debugName:"tone"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);isFont=n(()=>!!this.glyph().trim(),...ngDevMode?[{debugName:"isFont"}]:[]);logical=n(()=>{const e=this.name();return!!e&&ks.has(e)},...ngDevMode?[{debugName:"logical"}]:[]);fontClasses=n(()=>{const e=this.glyph().trim().replace(/^hgi-/,"");return!e||!/^[a-z0-9-]+$/i.test(e)?"hgi-stroke":`hgi-stroke hgi-${e}`},...ngDevMode?[{debugName:"fontClasses"}]:[]);classes=n(()=>f("inline-flex shrink-0 items-center justify-center",ur[this.size()],pr[this.tone()]),...ngDevMode?[{debugName:"classes"}]:[]);svg=n(()=>{const e=this.name(),a=e?this.registry.get(e):"";return this.sanitizer.bypassSecurityTrustHtml(a)},...ngDevMode?[{debugName:"svg"}]:[]);constructor(){M(()=>{if(this.isFont()){this.iconFont.ensureLoaded();return}const e=this.name();e&&this.registry.ensureLoaded(e)})}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:k,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:k,isStandalone:!0,selector:"dga-icon",inputs:{name:{classPropertyName:"name",publicName:"name",isSignal:!0,isRequired:!1,transformFunction:null},glyph:{classPropertyName:"glyph",publicName:"glyph",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},tone:{classPropertyName:"tone",publicName:"tone",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{class:"classes()","attr.data-name":"name() || null","attr.data-glyph":"glyph() || null","attr.data-size":"size()","attr.data-tone":"tone()","attr.data-logical":'logical() ? "true" : null',"attr.role":'label() ? "img" : null',"attr.aria-hidden":'label() ? null : "true"'}},ngImport:t,template:`
|
|
275
275
|
@if (isFont()) {
|
|
276
276
|
<i [class]="fontClasses()" aria-hidden="true"></i>
|
|
277
277
|
} @else {
|
|
@@ -303,7 +303,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
303
303
|
</span>
|
|
304
304
|
}
|
|
305
305
|
<ng-content select="[dgaEnd]" />
|
|
306
|
-
`,isInline:!0,styles:["dga-form-control.dga-form-control{--_dga-form-accent: var(--dga-form-field-accent, var(--dga-border-primary));--_dga-form-glow: var(--dga-form-field-focus-glow)}dga-form-control.dga-form-control[data-status=error]{--_dga-form-accent: var(--dga-border-error);--_dga-form-glow: color-mix(in srgb, var(--dga-color-red-500) 22%, transparent)}dga-form-control.dga-form-control[data-status=success]{--_dga-form-accent: var(--dga-border-success);--_dga-form-glow: color-mix(in srgb, var(--dga-color-green-500) 22%, transparent)}dga-form-control.dga-form-control[data-status=warning]{--_dga-form-accent: var(--dga-border-warning);--_dga-form-glow: color-mix(in srgb, var(--dga-color-yellow-500) 28%, transparent)}dga-form-control.dga-form-control[data-status=info]{--_dga-form-accent: var(--dga-border-info);--_dga-form-glow: color-mix(in srgb, var(--dga-color-blue-500) 22%, transparent)}dga-form-control.dga-form-control:before{content:\"\";position:absolute;inset-inline:0;bottom:0;height:2px;border-radius:0 0 3px 3px;background-color:var(--_dga-form-accent);transform:scaleX(0);transform-origin:center;opacity:0;transition:transform .22s cubic-bezier(.22,1,.36,1),opacity .22s ease,height .18s ease;z-index:2;pointer-events:none}dga-form-control.dga-form-control[data-state~=focus]:not([data-state~=disabled]){border-color:var(--_dga-form-accent);box-shadow:0 0 0 3px var(--_dga-form-glow)}dga-form-control.dga-form-control[data-state~=focus]:not([data-state~=disabled]):before{transform:scaleX(1);opacity:1;height:2.5px}dga-form-control.dga-form-control[data-state~=active]:not([data-state~=focus]):not([data-state~=disabled]):before{transform:scaleX(1);opacity:.7;height:2px}dga-form-control.dga-form-control .dga-form-control__icon,dga-form-control.dga-form-control .dga-form-control__addon{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;align-self:center;color:var(--dga-text-muted, #6b7280);line-height:0}dga-form-control.dga-form-control .dga-form-control__icon{pointer-events:none;inline-size:1.75rem;block-size:1.75rem}dga-form-control.dga-form-control .dga-form-control__icon dga-icon,dga-form-control.dga-form-control .dga-form-control__addon dga-icon,dga-form-control.dga-form-control button.dga-form-control__addon dga-icon{display:inline-flex;align-items:center;justify-content:center;line-height:0}dga-form-control.dga-form-control .dga-form-control__addon button,dga-form-control.dga-form-control button.dga-form-control__addon,dga-form-control.dga-form-control>button{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;align-self:center;margin:0;padding:0;inline-size:1.75rem;block-size:1.75rem;min-width:1.75rem;min-height:1.75rem;border:0;border-radius:var(--dga-radius-sm, 4px);background:transparent;color:var(--dga-text-muted, #6b7280);cursor:pointer;transition:color .16s ease,background-color .16s ease}dga-form-control.dga-form-control .dga-form-control__addon button:hover,dga-form-control.dga-form-control button.dga-form-control__addon:hover:not(:disabled),dga-form-control.dga-form-control>button:hover:not(:disabled){color:var(--dga-text-fg, #111827);background:color-mix(in srgb,var(--dga-color-primary-500, #10b981) 10%,transparent)}dga-form-control.dga-form-control[data-state~=focus] .dga-form-control__icon,dga-form-control.dga-form-control[data-state~=focus] .dga-form-control__addon{color:var(--_dga-form-accent)}dga-form-control.dga-form-control>input,dga-form-control.dga-form-control>select,dga-form-control.dga-form-control>textarea{border:0!important;background:transparent!important;box-shadow:none!important;outline:none!important;border-radius:0!important;min-height:0!important;height:auto;flex:1 1 auto;width:100%;min-width:0;align-self:center;line-height:1.5;padding-block:0!important;padding-inline:0!important}dga-form-control.dga-form-control>input:focus-visible,dga-form-control.dga-form-control>select:focus-visible,dga-form-control.dga-form-control>textarea:focus-visible{outline:none!important;box-shadow:none!important}\n"],dependencies:[{kind:"component",type:k,selector:"dga-icon",inputs:["name","glyph","size","tone","label"]}],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Dt,decorators:[{type:v,args:[{selector:"dga-form-control",standalone:!0,imports:[k],encapsulation:
|
|
306
|
+
`,isInline:!0,styles:["dga-form-control.dga-form-control{--_dga-form-accent: var(--dga-form-field-accent, var(--dga-border-primary));--_dga-form-glow: var(--dga-form-field-focus-glow)}dga-form-control.dga-form-control[data-status=error]{--_dga-form-accent: var(--dga-border-error);--_dga-form-glow: color-mix(in srgb, var(--dga-color-red-500) 22%, transparent)}dga-form-control.dga-form-control[data-status=success]{--_dga-form-accent: var(--dga-border-success);--_dga-form-glow: color-mix(in srgb, var(--dga-color-green-500) 22%, transparent)}dga-form-control.dga-form-control[data-status=warning]{--_dga-form-accent: var(--dga-border-warning);--_dga-form-glow: color-mix(in srgb, var(--dga-color-yellow-500) 28%, transparent)}dga-form-control.dga-form-control[data-status=info]{--_dga-form-accent: var(--dga-border-info);--_dga-form-glow: color-mix(in srgb, var(--dga-color-blue-500) 22%, transparent)}dga-form-control.dga-form-control:before{content:\"\";position:absolute;inset-inline:0;bottom:0;height:2px;border-radius:0 0 3px 3px;background-color:var(--_dga-form-accent);transform:scaleX(0);transform-origin:center;opacity:0;transition:transform .22s cubic-bezier(.22,1,.36,1),opacity .22s ease,height .18s ease;z-index:2;pointer-events:none}dga-form-control.dga-form-control[data-state~=focus]:not([data-state~=disabled]){border-color:var(--_dga-form-accent);box-shadow:0 0 0 3px var(--_dga-form-glow)}dga-form-control.dga-form-control[data-state~=focus]:not([data-state~=disabled]):before{transform:scaleX(1);opacity:1;height:2.5px}dga-form-control.dga-form-control[data-state~=active]:not([data-state~=focus]):not([data-state~=disabled]):before{transform:scaleX(1);opacity:.7;height:2px}dga-form-control.dga-form-control .dga-form-control__icon,dga-form-control.dga-form-control .dga-form-control__addon{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;align-self:center;color:var(--dga-text-muted, #6b7280);line-height:0}dga-form-control.dga-form-control .dga-form-control__icon{pointer-events:none;inline-size:1.75rem;block-size:1.75rem}dga-form-control.dga-form-control .dga-form-control__icon dga-icon,dga-form-control.dga-form-control .dga-form-control__addon dga-icon,dga-form-control.dga-form-control button.dga-form-control__addon dga-icon{display:inline-flex;align-items:center;justify-content:center;line-height:0}dga-form-control.dga-form-control .dga-form-control__addon button,dga-form-control.dga-form-control button.dga-form-control__addon,dga-form-control.dga-form-control>button{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;align-self:center;margin:0;padding:0;inline-size:1.75rem;block-size:1.75rem;min-width:1.75rem;min-height:1.75rem;border:0;border-radius:var(--dga-radius-sm, 4px);background:transparent;color:var(--dga-text-muted, #6b7280);cursor:pointer;transition:color .16s ease,background-color .16s ease}dga-form-control.dga-form-control .dga-form-control__addon button:hover,dga-form-control.dga-form-control button.dga-form-control__addon:hover:not(:disabled),dga-form-control.dga-form-control>button:hover:not(:disabled){color:var(--dga-text-fg, #111827);background:color-mix(in srgb,var(--dga-color-primary-500, #10b981) 10%,transparent)}dga-form-control.dga-form-control[data-state~=focus] .dga-form-control__icon,dga-form-control.dga-form-control[data-state~=focus] .dga-form-control__addon{color:var(--_dga-form-accent)}dga-form-control.dga-form-control>input,dga-form-control.dga-form-control>select,dga-form-control.dga-form-control>textarea{border:0!important;background:transparent!important;box-shadow:none!important;outline:none!important;border-radius:0!important;min-height:0!important;height:auto;flex:1 1 auto;width:100%;min-width:0;align-self:center;line-height:1.5;padding-block:0!important;padding-inline:0!important}dga-form-control.dga-form-control>input:focus-visible,dga-form-control.dga-form-control>select:focus-visible,dga-form-control.dga-form-control>textarea:focus-visible{outline:none!important;box-shadow:none!important}\n"],dependencies:[{kind:"component",type:k,selector:"dga-icon",inputs:["name","glyph","size","tone","label"]}],changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Dt,decorators:[{type:v,args:[{selector:"dga-form-control",standalone:!0,imports:[k],encapsulation:Ri.None,template:`
|
|
307
307
|
<ng-content select="[dgaStart]" />
|
|
308
308
|
@if (startIcon()) {
|
|
309
309
|
<span class="dga-form-control__icon dga-form-control__icon--start" aria-hidden="true">
|
|
@@ -317,7 +317,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
317
317
|
</span>
|
|
318
318
|
}
|
|
319
319
|
<ng-content select="[dgaEnd]" />
|
|
320
|
-
`,host:{"[class]":"classes()","[attr.data-size]":"size()","[attr.data-status]":'status() === "default" ? null : status()',"[attr.data-state]":"stateAttr()","[attr.data-has-start]":"hasStart() || null","[attr.data-has-end]":"hasEnd() || null","(focusin)":"onFocusIn()","(focusout)":"onFocusOut($event)","(input)":"onInput()"},changeDetection:h.OnPush,styles:["dga-form-control.dga-form-control{--_dga-form-accent: var(--dga-form-field-accent, var(--dga-border-primary));--_dga-form-glow: var(--dga-form-field-focus-glow)}dga-form-control.dga-form-control[data-status=error]{--_dga-form-accent: var(--dga-border-error);--_dga-form-glow: color-mix(in srgb, var(--dga-color-red-500) 22%, transparent)}dga-form-control.dga-form-control[data-status=success]{--_dga-form-accent: var(--dga-border-success);--_dga-form-glow: color-mix(in srgb, var(--dga-color-green-500) 22%, transparent)}dga-form-control.dga-form-control[data-status=warning]{--_dga-form-accent: var(--dga-border-warning);--_dga-form-glow: color-mix(in srgb, var(--dga-color-yellow-500) 28%, transparent)}dga-form-control.dga-form-control[data-status=info]{--_dga-form-accent: var(--dga-border-info);--_dga-form-glow: color-mix(in srgb, var(--dga-color-blue-500) 22%, transparent)}dga-form-control.dga-form-control:before{content:\"\";position:absolute;inset-inline:0;bottom:0;height:2px;border-radius:0 0 3px 3px;background-color:var(--_dga-form-accent);transform:scaleX(0);transform-origin:center;opacity:0;transition:transform .22s cubic-bezier(.22,1,.36,1),opacity .22s ease,height .18s ease;z-index:2;pointer-events:none}dga-form-control.dga-form-control[data-state~=focus]:not([data-state~=disabled]){border-color:var(--_dga-form-accent);box-shadow:0 0 0 3px var(--_dga-form-glow)}dga-form-control.dga-form-control[data-state~=focus]:not([data-state~=disabled]):before{transform:scaleX(1);opacity:1;height:2.5px}dga-form-control.dga-form-control[data-state~=active]:not([data-state~=focus]):not([data-state~=disabled]):before{transform:scaleX(1);opacity:.7;height:2px}dga-form-control.dga-form-control .dga-form-control__icon,dga-form-control.dga-form-control .dga-form-control__addon{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;align-self:center;color:var(--dga-text-muted, #6b7280);line-height:0}dga-form-control.dga-form-control .dga-form-control__icon{pointer-events:none;inline-size:1.75rem;block-size:1.75rem}dga-form-control.dga-form-control .dga-form-control__icon dga-icon,dga-form-control.dga-form-control .dga-form-control__addon dga-icon,dga-form-control.dga-form-control button.dga-form-control__addon dga-icon{display:inline-flex;align-items:center;justify-content:center;line-height:0}dga-form-control.dga-form-control .dga-form-control__addon button,dga-form-control.dga-form-control button.dga-form-control__addon,dga-form-control.dga-form-control>button{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;align-self:center;margin:0;padding:0;inline-size:1.75rem;block-size:1.75rem;min-width:1.75rem;min-height:1.75rem;border:0;border-radius:var(--dga-radius-sm, 4px);background:transparent;color:var(--dga-text-muted, #6b7280);cursor:pointer;transition:color .16s ease,background-color .16s ease}dga-form-control.dga-form-control .dga-form-control__addon button:hover,dga-form-control.dga-form-control button.dga-form-control__addon:hover:not(:disabled),dga-form-control.dga-form-control>button:hover:not(:disabled){color:var(--dga-text-fg, #111827);background:color-mix(in srgb,var(--dga-color-primary-500, #10b981) 10%,transparent)}dga-form-control.dga-form-control[data-state~=focus] .dga-form-control__icon,dga-form-control.dga-form-control[data-state~=focus] .dga-form-control__addon{color:var(--_dga-form-accent)}dga-form-control.dga-form-control>input,dga-form-control.dga-form-control>select,dga-form-control.dga-form-control>textarea{border:0!important;background:transparent!important;box-shadow:none!important;outline:none!important;border-radius:0!important;min-height:0!important;height:auto;flex:1 1 auto;width:100%;min-width:0;align-self:center;line-height:1.5;padding-block:0!important;padding-inline:0!important}dga-form-control.dga-form-control>input:focus-visible,dga-form-control.dga-form-control>select:focus-visible,dga-form-control.dga-form-control>textarea:focus-visible{outline:none!important;box-shadow:none!important}\n"]}]}],propDecorators:{size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],status:[{type:t.Input,args:[{isSignal:!0,alias:"status",required:!1}]}],disabled:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],filled:[{type:t.Input,args:[{isSignal:!0,alias:"filled",required:!1}]}],startIcon:[{type:t.Input,args:[{isSignal:!0,alias:"startIcon",required:!1}]}],endIcon:[{type:t.Input,args:[{isSignal:!0,alias:"endIcon",required:!1}]}]}});function P(d){return{provide:Oi,useExisting:Me(()=>d),multi:!0}}class It{required=i(!1,{...ngDevMode?{debugName:"required"}:{},alias:"dgaRequired",transform:m});classes=n(()=>f("mb-xs inline-block text-body-sm font-medium text-display",this.required()&&"after:ms-xxs after:text-fg-error after:content-['*']"),...ngDevMode?[{debugName:"classes"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:It,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:It,isStandalone:!0,selector:"label[dgaLabel]",inputs:{required:{classPropertyName:"required",publicName:"dgaRequired",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{class:"classes()"}},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:It,decorators:[{type:V,args:[{selector:"label[dgaLabel]",standalone:!0,host:{"[class]":"classes()"}}]}],propDecorators:{required:[{type:t.Input,args:[{isSignal:!0,alias:"dgaRequired",required:!1}]}]}});const hr="dga-choice";class ee{size=i("md",...ngDevMode?[{debugName:"size"}]:[]);invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},alias:"dgaInvalid",transform:m});classes=n(()=>f(hr),...ngDevMode?[{debugName:"classes"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ee,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:ee,isStandalone:!0,selector:'input[type="checkbox"][dgaCheckbox]',inputs:{size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"dgaInvalid",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{class:"classes()","attr.aria-invalid":"invalid() || null","attr.data-size":"size()"}},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ee,decorators:[{type:V,args:[{selector:'input[type="checkbox"][dgaCheckbox]',standalone:!0,host:{"[class]":"classes()","[attr.aria-invalid]":"invalid() || null","[attr.data-size]":"size()"}}]}],propDecorators:{size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"dgaInvalid",required:!1}]}]}});const vr="dga-choice";class Oe{size=i("md",...ngDevMode?[{debugName:"size"}]:[]);invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},alias:"dgaInvalid",transform:m});classes=n(()=>f(vr),...ngDevMode?[{debugName:"classes"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Oe,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:Oe,isStandalone:!0,selector:'input[type="radio"][dgaRadio]',inputs:{size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"dgaInvalid",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{class:"classes()","attr.aria-invalid":"invalid() || null","attr.data-size":"size()"}},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Oe,decorators:[{type:V,args:[{selector:'input[type="radio"][dgaRadio]',standalone:!0,host:{"[class]":"classes()","[attr.aria-invalid]":"invalid() || null","[attr.data-size]":"size()"}}]}],propDecorators:{size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"dgaInvalid",required:!1}]}]}});function yr(d){if(d==null||d==="")return null;const e=Number(d);return!Number.isFinite(e)||e<1?null:Math.floor(e)}class Mt{layout=i("column",...ngDevMode?[{debugName:"layout"}]:[]);columns=i(null,{...ngDevMode?{debugName:"columns"}:{},transform:yr});static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Mt,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:Mt,isStandalone:!0,selector:"[dgaChoiceGroup]",inputs:{layout:{classPropertyName:"layout",publicName:"layout",isSignal:!0,isRequired:!1,transformFunction:null},columns:{classPropertyName:"columns",publicName:"columns",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{"attr.data-layout":"layout()","attr.data-columns":"columns()","style.--dga-choice-columns":"columns()"},classAttribute:"dga-choice-group"},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Mt,decorators:[{type:V,args:[{selector:"[dgaChoiceGroup]",standalone:!0,host:{class:"dga-choice-group","[attr.data-layout]":"layout()","[attr.data-columns]":"columns()","[style.--dga-choice-columns]":"columns()"}}]}],propDecorators:{layout:[{type:t.Input,args:[{isSignal:!0,alias:"layout",required:!1}]}],columns:[{type:t.Input,args:[{isSignal:!0,alias:"columns",required:!1}]}]}});class Te{size=i("md",...ngDevMode?[{debugName:"size"}]:[]);invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},alias:"dgaInvalid",transform:m});status=i("default",...ngDevMode?[{debugName:"status"}]:[]);resolvedStatus=n(()=>this.status()!=="default"?this.status():X(this.invalid()),...ngDevMode?[{debugName:"resolvedStatus"}]:[]);classes=n(()=>f(Za(this.size(),this.resolvedStatus()),"cursor-pointer"),...ngDevMode?[{debugName:"classes"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Te,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:Te,isStandalone:!0,selector:"select[dgaSelect]",inputs:{size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"dgaInvalid",isSignal:!0,isRequired:!1,transformFunction:null},status:{classPropertyName:"status",publicName:"status",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{class:"classes()","attr.aria-invalid":'invalid() || status() === "error" || null',"attr.data-size":"size()","attr.data-status":'resolvedStatus() === "default" ? null : resolvedStatus()'}},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Te,decorators:[{type:V,args:[{selector:"select[dgaSelect]",standalone:!0,host:{"[class]":"classes()","[attr.aria-invalid]":'invalid() || status() === "error" || null',"[attr.data-size]":"size()","[attr.data-status]":'resolvedStatus() === "default" ? null : resolvedStatus()'}}]}],propDecorators:{size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"dgaInvalid",required:!1}]}],status:[{type:t.Input,args:[{isSignal:!0,alias:"status",required:!1}]}]}});const Ss="__dga_create__";class j{static nextId=0;host=x(F);listId=`dga-select-${++j.nextId}`;options=i([],...ngDevMode?[{debugName:"options"}]:[]);valueInput=i("",{...ngDevMode?{debugName:"valueInput"}:{},alias:"value"});value=_e(this.valueInput,...ngDevMode?[{debugName:"value"}]:[]);multiple=i(!1,{...ngDevMode?{debugName:"multiple"}:{},transform:m});searchable=i(!1,{...ngDevMode?{debugName:"searchable"}:{},transform:m});openMode=i("dropdown",...ngDevMode?[{debugName:"openMode"}]:[]);clearable=i(!1,{...ngDevMode?{debugName:"clearable"}:{},transform:m});size=i("md",...ngDevMode?[{debugName:"size"}]:[]);status=i("default",...ngDevMode?[{debugName:"status"}]:[]);placeholder=i("اختر…",...ngDevMode?[{debugName:"placeholder"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);removeLabel=i("إزالة",...ngDevMode?[{debugName:"removeLabel"}]:[]);clearLabel=i("مسح",...ngDevMode?[{debugName:"clearLabel"}]:[]);emptyLabel=i("لا توجد نتائج",...ngDevMode?[{debugName:"emptyLabel"}]:[]);loading=i(!1,{...ngDevMode?{debugName:"loading"}:{},transform:m});creatable=i(!1,{...ngDevMode?{debugName:"creatable"}:{},transform:m});createLabel=i("",...ngDevMode?[{debugName:"createLabel"}]:[]);disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},alias:"dgaInvalid",transform:m});valueChange=w();searchChange=w();create=w();onChange=()=>{};onTouched=()=>{};open=y(!1,...ngDevMode?[{debugName:"open"}]:[]);query=y("",...ngDevMode?[{debugName:"query"}]:[]);activeIndex=y(0,...ngDevMode?[{debugName:"activeIndex"}]:[]);uiLocale=$();ar=n(()=>this.uiLocale().startsWith("ar"),...ngDevMode?[{debugName:"ar"}]:[]);loadingLabel=n(()=>this.ar()?"جاري التحميل…":"Loading…",...ngDevMode?[{debugName:"loadingLabel"}]:[]);constructor(){M(()=>{if(!this.searchable()||this.multiple())return;const e=this.value();if(typeof e!="string"||!e)return;const a=this.options().find(s=>s.value===e);a&&!this.open()&&this.query.set(a.label)})}resolvedStatus=n(()=>this.status()!=="default"?this.status():X(this.invalid()),...ngDevMode?[{debugName:"resolvedStatus"}]:[]);listVisible=n(()=>this.openMode()==="always"||this.open(),...ngDevMode?[{debugName:"listVisible"}]:[]);selectedOpts=n(()=>{const e=this.selectedValues(),a=new Set(e);return this.options().filter(s=>a.has(s.value))},...ngDevMode?[{debugName:"selectedOpts"}]:[]);filtered=n(()=>{const e=this.options();let a;if(!this.searchable())a=e;else{const s=this.query().trim().toLowerCase();if(!s)a=e;else{const r=this.selectedOpts()[0];r&&s===r.label.toLowerCase()?a=e:a=e.filter(l=>l.label.toLowerCase().includes(s)||l.value.toLowerCase().includes(s)||(l.keywords?.toLowerCase().includes(s)??!1))}}return this.withCreateOption(a)},...ngDevMode?[{debugName:"filtered"}]:[]);activeOptionId=n(()=>!this.listVisible()||!this.filtered().length?null:this.optionId(this.activeIndex()),...ngDevMode?[{debugName:"activeOptionId"}]:[]);buttonClasses=n(()=>f(Za(this.size(),this.resolvedStatus()),Z(this.resolvedStatus()),"cursor-pointer"),...ngDevMode?[{debugName:"buttonClasses"}]:[]);triggerWrapClasses=n(()=>f("dga-form-field flex w-full flex-wrap items-center gap-sm",Za(this.size(),this.resolvedStatus()),Z(this.resolvedStatus()),"focus-within:border-border-primary",this.disabled()&&"pointer-events-none opacity-70"),...ngDevMode?[{debugName:"triggerWrapClasses"}]:[]);searchInputClasses=n(()=>f("min-w-0 flex-1 border-0 bg-transparent p-0 text-inherit outline-none","placeholder:text-muted focus:outline-none focus-visible:outline-none","disabled:cursor-not-allowed"),...ngDevMode?[{debugName:"searchInputClasses"}]:[]);listClasses=n(()=>f("z-dropdown max-h-[min(20rem,70vh)] w-full overflow-auto rounded-md border border-border bg-elevated py-xs shadow-md",this.openMode()==="always"?"relative mt-sm":"absolute mt-xs"),...ngDevMode?[{debugName:"listClasses"}]:[]);displayPlaceholder(){return this.multiple()&&this.selectedOpts().length?"":!this.multiple()&&this.hasValue()&&!this.query()?this.selectedOpts()[0]?.label??this.placeholder():this.placeholder()}hasValue(){return this.selectedValues().length>0}optionId(e){return`${this.listId}-opt-${e}`}isSelected(e){return this.selectedValues().includes(e)}isCreateOption(e){return e.value===Ss}selectedValues(){const e=this.value();return this.multiple()?Array.isArray(e)?e:e?[e]:[]:Array.isArray(e)?e.length?[e[0]]:[]:e?[e]:[]}toggleOpen(){this.disabled()||this.openMode()==="always"||(this.open.update(e=>!e),this.open()&&this.activeIndex.set(0))}onFocus(){this.disabled()||(this.openMode()==="dropdown"&&this.open.set(!0),this.activeIndex.set(0),this.searchable()&&!this.multiple()&&queueMicrotask(()=>{this.host.nativeElement.querySelector('input[role="combobox"]')?.select()}))}onType(e){this.query.set(e),this.searchChange.emit(e),this.openMode()==="dropdown"&&this.open.set(!0),this.activeIndex.set(0),!this.multiple()&&!e&&this.clearable()&&this.commit("")}onKey(e){const a=this.filtered();if(e.key==="ArrowDown")e.preventDefault(),this.openMode()==="dropdown"&&this.open.set(!0),this.moveActive(1);else if(e.key==="ArrowUp")e.preventDefault(),this.openMode()==="dropdown"&&this.open.set(!0),this.moveActive(-1);else if(e.key==="Home")e.preventDefault(),this.activeIndex.set(this.firstEnabledIndex(a));else if(e.key==="End")e.preventDefault(),this.activeIndex.set(this.lastEnabledIndex(a));else if(e.key==="Enter"&&this.listVisible()){const s=a[this.activeIndex()];s&&!s.disabled&&(e.preventDefault(),this.pick(s))}else if(e.key==="Escape"&&this.openMode()==="dropdown")this.open.set(!1);else if(e.key==="Backspace"&&this.multiple()&&this.searchable()&&!this.query()){const s=this.selectedValues();s.length&&this.toggle(s[s.length-1])}}onBlur(){this.onTouched(),this.openMode()!=="always"&&queueMicrotask(()=>{if(this.open.set(!1),this.searchable()&&!this.multiple()){const e=this.selectedOpts()[0];this.query.set(e?.label??"")}})}onOptionMouseDown(e,a){e.preventDefault(),!a.disabled&&this.pick(a)}pick(e){if(!(this.disabled()||e.disabled)){if(this.isCreateOption(e)){const a=this.query().trim();if(!a)return;this.create.emit(a),this.openMode()==="dropdown"&&this.open.set(!1);return}if(this.multiple()){this.toggle(e.value),this.searchable()&&this.query.set("");return}this.commit(e.value),this.query.set(e.label),this.openMode()==="dropdown"&&this.open.set(!1)}}toggle(e){if(this.disabled())return;const a=new Set(this.selectedValues());a.has(e)?a.delete(e):a.add(e);const s=this.options().map(r=>r.value).filter(r=>a.has(r));this.commit(s)}clear(){this.disabled()||(this.commit(this.multiple()?[]:""),this.query.set(""),this.openMode()==="dropdown"&&this.searchable()&&this.open.set(!0))}onDocClick(e){if(this.openMode()==="always")return;const a=e.target;a&&!this.host.nativeElement.contains(a)&&this.open.set(!1)}commit(e){this.value.set(e),this.valueChange.emit(e),this.onChange(e)}writeValue(e){this.value.set(e??(this.multiple()?[]:""))}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.cvaDisabled.set(e)}moveActive(e){const a=this.filtered(),s=a.length;if(!s){this.activeIndex.set(0);return}let r=this.activeIndex();for(let l=0;l<s;l++)if(r=(r+e+s)%s,!a[r]?.disabled){this.activeIndex.set(r);return}}firstEnabledIndex(e){const a=e.findIndex(s=>!s.disabled);return a<0?0:a}lastEnabledIndex(e){for(let a=e.length-1;a>=0;a--)if(!e[a]?.disabled)return a;return Math.max(e.length-1,0)}withCreateOption(e){if(!this.creatable()||!this.searchable())return e;const a=this.query().trim();return!a||this.options().some(r=>r.label.toLowerCase()===a.toLowerCase()||r.value.toLowerCase()===a.toLowerCase())?e:[...e,{label:this.formatCreateLabel(a),value:Ss}]}formatCreateLabel(e){const a=this.createLabel().trim();return a.includes("{q}")?a.replaceAll("{q}",e):a?`${a} «${e}»`:this.ar()?`إنشاء «${e}»`:`Create «${e}»`}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:j,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:j,isStandalone:!0,selector:"dga-select",inputs:{options:{classPropertyName:"options",publicName:"options",isSignal:!0,isRequired:!1,transformFunction:null},valueInput:{classPropertyName:"valueInput",publicName:"value",isSignal:!0,isRequired:!1,transformFunction:null},multiple:{classPropertyName:"multiple",publicName:"multiple",isSignal:!0,isRequired:!1,transformFunction:null},searchable:{classPropertyName:"searchable",publicName:"searchable",isSignal:!0,isRequired:!1,transformFunction:null},openMode:{classPropertyName:"openMode",publicName:"openMode",isSignal:!0,isRequired:!1,transformFunction:null},clearable:{classPropertyName:"clearable",publicName:"clearable",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},status:{classPropertyName:"status",publicName:"status",isSignal:!0,isRequired:!1,transformFunction:null},placeholder:{classPropertyName:"placeholder",publicName:"placeholder",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},removeLabel:{classPropertyName:"removeLabel",publicName:"removeLabel",isSignal:!0,isRequired:!1,transformFunction:null},clearLabel:{classPropertyName:"clearLabel",publicName:"clearLabel",isSignal:!0,isRequired:!1,transformFunction:null},emptyLabel:{classPropertyName:"emptyLabel",publicName:"emptyLabel",isSignal:!0,isRequired:!1,transformFunction:null},loading:{classPropertyName:"loading",publicName:"loading",isSignal:!0,isRequired:!1,transformFunction:null},creatable:{classPropertyName:"creatable",publicName:"creatable",isSignal:!0,isRequired:!1,transformFunction:null},createLabel:{classPropertyName:"createLabel",publicName:"createLabel",isSignal:!0,isRequired:!1,transformFunction:null},disabledInput:{classPropertyName:"disabledInput",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"dgaInvalid",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{valueChange:"valueChange",searchChange:"searchChange",create:"create"},host:{listeners:{"document:click":"onDocClick($event)"},classAttribute:"block w-full"},providers:[P(j)],ngImport:t,template:`
|
|
320
|
+
`,host:{"[class]":"classes()","[attr.data-size]":"size()","[attr.data-status]":'status() === "default" ? null : status()',"[attr.data-state]":"stateAttr()","[attr.data-has-start]":"hasStart() || null","[attr.data-has-end]":"hasEnd() || null","(focusin)":"onFocusIn()","(focusout)":"onFocusOut($event)","(input)":"onInput()"},changeDetection:h.OnPush,styles:["dga-form-control.dga-form-control{--_dga-form-accent: var(--dga-form-field-accent, var(--dga-border-primary));--_dga-form-glow: var(--dga-form-field-focus-glow)}dga-form-control.dga-form-control[data-status=error]{--_dga-form-accent: var(--dga-border-error);--_dga-form-glow: color-mix(in srgb, var(--dga-color-red-500) 22%, transparent)}dga-form-control.dga-form-control[data-status=success]{--_dga-form-accent: var(--dga-border-success);--_dga-form-glow: color-mix(in srgb, var(--dga-color-green-500) 22%, transparent)}dga-form-control.dga-form-control[data-status=warning]{--_dga-form-accent: var(--dga-border-warning);--_dga-form-glow: color-mix(in srgb, var(--dga-color-yellow-500) 28%, transparent)}dga-form-control.dga-form-control[data-status=info]{--_dga-form-accent: var(--dga-border-info);--_dga-form-glow: color-mix(in srgb, var(--dga-color-blue-500) 22%, transparent)}dga-form-control.dga-form-control:before{content:\"\";position:absolute;inset-inline:0;bottom:0;height:2px;border-radius:0 0 3px 3px;background-color:var(--_dga-form-accent);transform:scaleX(0);transform-origin:center;opacity:0;transition:transform .22s cubic-bezier(.22,1,.36,1),opacity .22s ease,height .18s ease;z-index:2;pointer-events:none}dga-form-control.dga-form-control[data-state~=focus]:not([data-state~=disabled]){border-color:var(--_dga-form-accent);box-shadow:0 0 0 3px var(--_dga-form-glow)}dga-form-control.dga-form-control[data-state~=focus]:not([data-state~=disabled]):before{transform:scaleX(1);opacity:1;height:2.5px}dga-form-control.dga-form-control[data-state~=active]:not([data-state~=focus]):not([data-state~=disabled]):before{transform:scaleX(1);opacity:.7;height:2px}dga-form-control.dga-form-control .dga-form-control__icon,dga-form-control.dga-form-control .dga-form-control__addon{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;align-self:center;color:var(--dga-text-muted, #6b7280);line-height:0}dga-form-control.dga-form-control .dga-form-control__icon{pointer-events:none;inline-size:1.75rem;block-size:1.75rem}dga-form-control.dga-form-control .dga-form-control__icon dga-icon,dga-form-control.dga-form-control .dga-form-control__addon dga-icon,dga-form-control.dga-form-control button.dga-form-control__addon dga-icon{display:inline-flex;align-items:center;justify-content:center;line-height:0}dga-form-control.dga-form-control .dga-form-control__addon button,dga-form-control.dga-form-control button.dga-form-control__addon,dga-form-control.dga-form-control>button{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;align-self:center;margin:0;padding:0;inline-size:1.75rem;block-size:1.75rem;min-width:1.75rem;min-height:1.75rem;border:0;border-radius:var(--dga-radius-sm, 4px);background:transparent;color:var(--dga-text-muted, #6b7280);cursor:pointer;transition:color .16s ease,background-color .16s ease}dga-form-control.dga-form-control .dga-form-control__addon button:hover,dga-form-control.dga-form-control button.dga-form-control__addon:hover:not(:disabled),dga-form-control.dga-form-control>button:hover:not(:disabled){color:var(--dga-text-fg, #111827);background:color-mix(in srgb,var(--dga-color-primary-500, #10b981) 10%,transparent)}dga-form-control.dga-form-control[data-state~=focus] .dga-form-control__icon,dga-form-control.dga-form-control[data-state~=focus] .dga-form-control__addon{color:var(--_dga-form-accent)}dga-form-control.dga-form-control>input,dga-form-control.dga-form-control>select,dga-form-control.dga-form-control>textarea{border:0!important;background:transparent!important;box-shadow:none!important;outline:none!important;border-radius:0!important;min-height:0!important;height:auto;flex:1 1 auto;width:100%;min-width:0;align-self:center;line-height:1.5;padding-block:0!important;padding-inline:0!important}dga-form-control.dga-form-control>input:focus-visible,dga-form-control.dga-form-control>select:focus-visible,dga-form-control.dga-form-control>textarea:focus-visible{outline:none!important;box-shadow:none!important}\n"]}]}],propDecorators:{size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],status:[{type:t.Input,args:[{isSignal:!0,alias:"status",required:!1}]}],disabled:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],filled:[{type:t.Input,args:[{isSignal:!0,alias:"filled",required:!1}]}],startIcon:[{type:t.Input,args:[{isSignal:!0,alias:"startIcon",required:!1}]}],endIcon:[{type:t.Input,args:[{isSignal:!0,alias:"endIcon",required:!1}]}]}});function P(d){return{provide:Oi,useExisting:Me(()=>d),multi:!0}}class It{required=i(!1,{...ngDevMode?{debugName:"required"}:{},alias:"dgaRequired",transform:m});classes=n(()=>f("mb-xs inline-block text-body-sm font-medium text-display",this.required()&&"after:ms-xxs after:text-fg-error after:content-['*']"),...ngDevMode?[{debugName:"classes"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:It,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:It,isStandalone:!0,selector:"label[dgaLabel]",inputs:{required:{classPropertyName:"required",publicName:"dgaRequired",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{class:"classes()"}},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:It,decorators:[{type:V,args:[{selector:"label[dgaLabel]",standalone:!0,host:{"[class]":"classes()"}}]}],propDecorators:{required:[{type:t.Input,args:[{isSignal:!0,alias:"dgaRequired",required:!1}]}]}});const hr="dga-choice";class ee{size=i("md",...ngDevMode?[{debugName:"size"}]:[]);invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},alias:"dgaInvalid",transform:m});classes=n(()=>f(hr),...ngDevMode?[{debugName:"classes"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ee,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:ee,isStandalone:!0,selector:'input[type="checkbox"][dgaCheckbox]',inputs:{size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"dgaInvalid",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{class:"classes()","attr.aria-invalid":"invalid() || null","attr.data-size":"size()"}},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ee,decorators:[{type:V,args:[{selector:'input[type="checkbox"][dgaCheckbox]',standalone:!0,host:{"[class]":"classes()","[attr.aria-invalid]":"invalid() || null","[attr.data-size]":"size()"}}]}],propDecorators:{size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"dgaInvalid",required:!1}]}]}});const vr="dga-choice";class Te{size=i("md",...ngDevMode?[{debugName:"size"}]:[]);invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},alias:"dgaInvalid",transform:m});classes=n(()=>f(vr),...ngDevMode?[{debugName:"classes"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Te,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:Te,isStandalone:!0,selector:'input[type="radio"][dgaRadio]',inputs:{size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"dgaInvalid",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{class:"classes()","attr.aria-invalid":"invalid() || null","attr.data-size":"size()"}},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Te,decorators:[{type:V,args:[{selector:'input[type="radio"][dgaRadio]',standalone:!0,host:{"[class]":"classes()","[attr.aria-invalid]":"invalid() || null","[attr.data-size]":"size()"}}]}],propDecorators:{size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"dgaInvalid",required:!1}]}]}});function yr(d){if(d==null||d==="")return null;const e=Number(d);return!Number.isFinite(e)||e<1?null:Math.floor(e)}class Mt{layout=i("column",...ngDevMode?[{debugName:"layout"}]:[]);columns=i(null,{...ngDevMode?{debugName:"columns"}:{},transform:yr});static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Mt,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:Mt,isStandalone:!0,selector:"[dgaChoiceGroup]",inputs:{layout:{classPropertyName:"layout",publicName:"layout",isSignal:!0,isRequired:!1,transformFunction:null},columns:{classPropertyName:"columns",publicName:"columns",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{"attr.data-layout":"layout()","attr.data-columns":"columns()","style.--dga-choice-columns":"columns()"},classAttribute:"dga-choice-group"},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Mt,decorators:[{type:V,args:[{selector:"[dgaChoiceGroup]",standalone:!0,host:{class:"dga-choice-group","[attr.data-layout]":"layout()","[attr.data-columns]":"columns()","[style.--dga-choice-columns]":"columns()"}}]}],propDecorators:{layout:[{type:t.Input,args:[{isSignal:!0,alias:"layout",required:!1}]}],columns:[{type:t.Input,args:[{isSignal:!0,alias:"columns",required:!1}]}]}});class Oe{size=i("md",...ngDevMode?[{debugName:"size"}]:[]);invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},alias:"dgaInvalid",transform:m});status=i("default",...ngDevMode?[{debugName:"status"}]:[]);resolvedStatus=n(()=>this.status()!=="default"?this.status():X(this.invalid()),...ngDevMode?[{debugName:"resolvedStatus"}]:[]);classes=n(()=>f(Za(this.size(),this.resolvedStatus()),"cursor-pointer"),...ngDevMode?[{debugName:"classes"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Oe,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:Oe,isStandalone:!0,selector:"select[dgaSelect]",inputs:{size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"dgaInvalid",isSignal:!0,isRequired:!1,transformFunction:null},status:{classPropertyName:"status",publicName:"status",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{class:"classes()","attr.aria-invalid":'invalid() || status() === "error" || null',"attr.data-size":"size()","attr.data-status":'resolvedStatus() === "default" ? null : resolvedStatus()'}},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Oe,decorators:[{type:V,args:[{selector:"select[dgaSelect]",standalone:!0,host:{"[class]":"classes()","[attr.aria-invalid]":'invalid() || status() === "error" || null',"[attr.data-size]":"size()","[attr.data-status]":'resolvedStatus() === "default" ? null : resolvedStatus()'}}]}],propDecorators:{size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"dgaInvalid",required:!1}]}],status:[{type:t.Input,args:[{isSignal:!0,alias:"status",required:!1}]}]}});const Cs="__dga_create__";class j{static nextId=0;host=x(F);listId=`dga-select-${++j.nextId}`;options=i([],...ngDevMode?[{debugName:"options"}]:[]);valueInput=i("",{...ngDevMode?{debugName:"valueInput"}:{},alias:"value"});value=_e(this.valueInput,...ngDevMode?[{debugName:"value"}]:[]);multiple=i(!1,{...ngDevMode?{debugName:"multiple"}:{},transform:m});searchable=i(!1,{...ngDevMode?{debugName:"searchable"}:{},transform:m});openMode=i("dropdown",...ngDevMode?[{debugName:"openMode"}]:[]);clearable=i(!1,{...ngDevMode?{debugName:"clearable"}:{},transform:m});size=i("md",...ngDevMode?[{debugName:"size"}]:[]);status=i("default",...ngDevMode?[{debugName:"status"}]:[]);placeholder=i("اختر…",...ngDevMode?[{debugName:"placeholder"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);removeLabel=i("إزالة",...ngDevMode?[{debugName:"removeLabel"}]:[]);clearLabel=i("مسح",...ngDevMode?[{debugName:"clearLabel"}]:[]);emptyLabel=i("لا توجد نتائج",...ngDevMode?[{debugName:"emptyLabel"}]:[]);loading=i(!1,{...ngDevMode?{debugName:"loading"}:{},transform:m});creatable=i(!1,{...ngDevMode?{debugName:"creatable"}:{},transform:m});createLabel=i("",...ngDevMode?[{debugName:"createLabel"}]:[]);disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},alias:"dgaInvalid",transform:m});valueChange=w();searchChange=w();create=w();onChange=()=>{};onTouched=()=>{};open=y(!1,...ngDevMode?[{debugName:"open"}]:[]);query=y("",...ngDevMode?[{debugName:"query"}]:[]);activeIndex=y(0,...ngDevMode?[{debugName:"activeIndex"}]:[]);uiLocale=$();ar=n(()=>this.uiLocale().startsWith("ar"),...ngDevMode?[{debugName:"ar"}]:[]);loadingLabel=n(()=>this.ar()?"جاري التحميل…":"Loading…",...ngDevMode?[{debugName:"loadingLabel"}]:[]);constructor(){M(()=>{if(!this.searchable()||this.multiple())return;const e=this.value();if(typeof e!="string"||!e)return;const a=this.options().find(s=>s.value===e);a&&!this.open()&&this.query.set(a.label)})}resolvedStatus=n(()=>this.status()!=="default"?this.status():X(this.invalid()),...ngDevMode?[{debugName:"resolvedStatus"}]:[]);listVisible=n(()=>this.openMode()==="always"||this.open(),...ngDevMode?[{debugName:"listVisible"}]:[]);selectedOpts=n(()=>{const e=this.selectedValues(),a=new Set(e);return this.options().filter(s=>a.has(s.value))},...ngDevMode?[{debugName:"selectedOpts"}]:[]);filtered=n(()=>{const e=this.options();let a;if(!this.searchable())a=e;else{const s=this.query().trim().toLowerCase();if(!s)a=e;else{const r=this.selectedOpts()[0];r&&s===r.label.toLowerCase()?a=e:a=e.filter(l=>l.label.toLowerCase().includes(s)||l.value.toLowerCase().includes(s)||(l.keywords?.toLowerCase().includes(s)??!1))}}return this.withCreateOption(a)},...ngDevMode?[{debugName:"filtered"}]:[]);activeOptionId=n(()=>!this.listVisible()||!this.filtered().length?null:this.optionId(this.activeIndex()),...ngDevMode?[{debugName:"activeOptionId"}]:[]);buttonClasses=n(()=>f(Za(this.size(),this.resolvedStatus()),Z(this.resolvedStatus()),"cursor-pointer"),...ngDevMode?[{debugName:"buttonClasses"}]:[]);triggerWrapClasses=n(()=>f("dga-form-field flex w-full flex-wrap items-center gap-sm",Za(this.size(),this.resolvedStatus()),Z(this.resolvedStatus()),"focus-within:border-border-primary",this.disabled()&&"pointer-events-none opacity-70"),...ngDevMode?[{debugName:"triggerWrapClasses"}]:[]);searchInputClasses=n(()=>f("min-w-0 flex-1 border-0 bg-transparent p-0 text-inherit outline-none","placeholder:text-muted focus:outline-none focus-visible:outline-none","disabled:cursor-not-allowed"),...ngDevMode?[{debugName:"searchInputClasses"}]:[]);listClasses=n(()=>f("z-dropdown max-h-[min(20rem,70vh)] w-full overflow-auto rounded-md border border-border bg-elevated py-xs shadow-md",this.openMode()==="always"?"relative mt-sm":"absolute mt-xs"),...ngDevMode?[{debugName:"listClasses"}]:[]);displayPlaceholder(){return this.multiple()&&this.selectedOpts().length?"":!this.multiple()&&this.hasValue()&&!this.query()?this.selectedOpts()[0]?.label??this.placeholder():this.placeholder()}hasValue(){return this.selectedValues().length>0}optionId(e){return`${this.listId}-opt-${e}`}isSelected(e){return this.selectedValues().includes(e)}isCreateOption(e){return e.value===Cs}selectedValues(){const e=this.value();return this.multiple()?Array.isArray(e)?e:e?[e]:[]:Array.isArray(e)?e.length?[e[0]]:[]:e?[e]:[]}toggleOpen(){this.disabled()||this.openMode()==="always"||(this.open.update(e=>!e),this.open()&&this.activeIndex.set(0))}onFocus(){this.disabled()||(this.openMode()==="dropdown"&&this.open.set(!0),this.activeIndex.set(0),this.searchable()&&!this.multiple()&&queueMicrotask(()=>{this.host.nativeElement.querySelector('input[role="combobox"]')?.select()}))}onType(e){this.query.set(e),this.searchChange.emit(e),this.openMode()==="dropdown"&&this.open.set(!0),this.activeIndex.set(0),!this.multiple()&&!e&&this.clearable()&&this.commit("")}onKey(e){const a=this.filtered();if(e.key==="ArrowDown")e.preventDefault(),this.openMode()==="dropdown"&&this.open.set(!0),this.moveActive(1);else if(e.key==="ArrowUp")e.preventDefault(),this.openMode()==="dropdown"&&this.open.set(!0),this.moveActive(-1);else if(e.key==="Home")e.preventDefault(),this.activeIndex.set(this.firstEnabledIndex(a));else if(e.key==="End")e.preventDefault(),this.activeIndex.set(this.lastEnabledIndex(a));else if(e.key==="Enter"&&this.listVisible()){const s=a[this.activeIndex()];s&&!s.disabled&&(e.preventDefault(),this.pick(s))}else if(e.key==="Escape"&&this.openMode()==="dropdown")this.open.set(!1);else if(e.key==="Backspace"&&this.multiple()&&this.searchable()&&!this.query()){const s=this.selectedValues();s.length&&this.toggle(s[s.length-1])}}onBlur(){this.onTouched(),this.openMode()!=="always"&&queueMicrotask(()=>{if(this.open.set(!1),this.searchable()&&!this.multiple()){const e=this.selectedOpts()[0];this.query.set(e?.label??"")}})}onOptionMouseDown(e,a){e.preventDefault(),!a.disabled&&this.pick(a)}pick(e){if(!(this.disabled()||e.disabled)){if(this.isCreateOption(e)){const a=this.query().trim();if(!a)return;this.create.emit(a),this.openMode()==="dropdown"&&this.open.set(!1);return}if(this.multiple()){this.toggle(e.value),this.searchable()&&this.query.set("");return}this.commit(e.value),this.query.set(e.label),this.openMode()==="dropdown"&&this.open.set(!1)}}toggle(e){if(this.disabled())return;const a=new Set(this.selectedValues());a.has(e)?a.delete(e):a.add(e);const s=this.options().map(r=>r.value).filter(r=>a.has(r));this.commit(s)}clear(){this.disabled()||(this.commit(this.multiple()?[]:""),this.query.set(""),this.openMode()==="dropdown"&&this.searchable()&&this.open.set(!0))}onDocClick(e){if(this.openMode()==="always")return;const a=e.target;a&&!this.host.nativeElement.contains(a)&&this.open.set(!1)}commit(e){this.value.set(e),this.valueChange.emit(e),this.onChange(e)}writeValue(e){this.value.set(e??(this.multiple()?[]:""))}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.cvaDisabled.set(e)}moveActive(e){const a=this.filtered(),s=a.length;if(!s){this.activeIndex.set(0);return}let r=this.activeIndex();for(let l=0;l<s;l++)if(r=(r+e+s)%s,!a[r]?.disabled){this.activeIndex.set(r);return}}firstEnabledIndex(e){const a=e.findIndex(s=>!s.disabled);return a<0?0:a}lastEnabledIndex(e){for(let a=e.length-1;a>=0;a--)if(!e[a]?.disabled)return a;return Math.max(e.length-1,0)}withCreateOption(e){if(!this.creatable()||!this.searchable())return e;const a=this.query().trim();return!a||this.options().some(r=>r.label.toLowerCase()===a.toLowerCase()||r.value.toLowerCase()===a.toLowerCase())?e:[...e,{label:this.formatCreateLabel(a),value:Cs}]}formatCreateLabel(e){const a=this.createLabel().trim();return a.includes("{q}")?a.replaceAll("{q}",e):a?`${a} «${e}»`:this.ar()?`إنشاء «${e}»`:`Create «${e}»`}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:j,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:j,isStandalone:!0,selector:"dga-select",inputs:{options:{classPropertyName:"options",publicName:"options",isSignal:!0,isRequired:!1,transformFunction:null},valueInput:{classPropertyName:"valueInput",publicName:"value",isSignal:!0,isRequired:!1,transformFunction:null},multiple:{classPropertyName:"multiple",publicName:"multiple",isSignal:!0,isRequired:!1,transformFunction:null},searchable:{classPropertyName:"searchable",publicName:"searchable",isSignal:!0,isRequired:!1,transformFunction:null},openMode:{classPropertyName:"openMode",publicName:"openMode",isSignal:!0,isRequired:!1,transformFunction:null},clearable:{classPropertyName:"clearable",publicName:"clearable",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},status:{classPropertyName:"status",publicName:"status",isSignal:!0,isRequired:!1,transformFunction:null},placeholder:{classPropertyName:"placeholder",publicName:"placeholder",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},removeLabel:{classPropertyName:"removeLabel",publicName:"removeLabel",isSignal:!0,isRequired:!1,transformFunction:null},clearLabel:{classPropertyName:"clearLabel",publicName:"clearLabel",isSignal:!0,isRequired:!1,transformFunction:null},emptyLabel:{classPropertyName:"emptyLabel",publicName:"emptyLabel",isSignal:!0,isRequired:!1,transformFunction:null},loading:{classPropertyName:"loading",publicName:"loading",isSignal:!0,isRequired:!1,transformFunction:null},creatable:{classPropertyName:"creatable",publicName:"creatable",isSignal:!0,isRequired:!1,transformFunction:null},createLabel:{classPropertyName:"createLabel",publicName:"createLabel",isSignal:!0,isRequired:!1,transformFunction:null},disabledInput:{classPropertyName:"disabledInput",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"dgaInvalid",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{valueChange:"valueChange",searchChange:"searchChange",create:"create"},host:{listeners:{"document:click":"onDocClick($event)"},classAttribute:"block w-full"},providers:[P(j)],ngImport:t,template:`
|
|
321
321
|
<div class="relative w-full">
|
|
322
322
|
@if (searchable()) {
|
|
323
323
|
<div [class]="triggerWrapClasses()">
|
|
@@ -663,7 +663,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
663
663
|
</ul>
|
|
664
664
|
}
|
|
665
665
|
</div>
|
|
666
|
-
`,changeDetection:h.OnPush,host:{class:"block w-full","(document:click)":"onDocClick($event)"},providers:[P(j)]}]}],ctorParameters:()=>[],propDecorators:{options:[{type:t.Input,args:[{isSignal:!0,alias:"options",required:!1}]}],valueInput:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]}],multiple:[{type:t.Input,args:[{isSignal:!0,alias:"multiple",required:!1}]}],searchable:[{type:t.Input,args:[{isSignal:!0,alias:"searchable",required:!1}]}],openMode:[{type:t.Input,args:[{isSignal:!0,alias:"openMode",required:!1}]}],clearable:[{type:t.Input,args:[{isSignal:!0,alias:"clearable",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],status:[{type:t.Input,args:[{isSignal:!0,alias:"status",required:!1}]}],placeholder:[{type:t.Input,args:[{isSignal:!0,alias:"placeholder",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],removeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"removeLabel",required:!1}]}],clearLabel:[{type:t.Input,args:[{isSignal:!0,alias:"clearLabel",required:!1}]}],emptyLabel:[{type:t.Input,args:[{isSignal:!0,alias:"emptyLabel",required:!1}]}],loading:[{type:t.Input,args:[{isSignal:!0,alias:"loading",required:!1}]}],creatable:[{type:t.Input,args:[{isSignal:!0,alias:"creatable",required:!1}]}],createLabel:[{type:t.Input,args:[{isSignal:!0,alias:"createLabel",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"dgaInvalid",required:!1}]}],valueChange:[{type:t.Output,args:["valueChange"]}],searchChange:[{type:t.Output,args:["searchChange"]}],create:[{type:t.Output,args:["create"]}]}});function
|
|
666
|
+
`,changeDetection:h.OnPush,host:{class:"block w-full","(document:click)":"onDocClick($event)"},providers:[P(j)]}]}],ctorParameters:()=>[],propDecorators:{options:[{type:t.Input,args:[{isSignal:!0,alias:"options",required:!1}]}],valueInput:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]}],multiple:[{type:t.Input,args:[{isSignal:!0,alias:"multiple",required:!1}]}],searchable:[{type:t.Input,args:[{isSignal:!0,alias:"searchable",required:!1}]}],openMode:[{type:t.Input,args:[{isSignal:!0,alias:"openMode",required:!1}]}],clearable:[{type:t.Input,args:[{isSignal:!0,alias:"clearable",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],status:[{type:t.Input,args:[{isSignal:!0,alias:"status",required:!1}]}],placeholder:[{type:t.Input,args:[{isSignal:!0,alias:"placeholder",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],removeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"removeLabel",required:!1}]}],clearLabel:[{type:t.Input,args:[{isSignal:!0,alias:"clearLabel",required:!1}]}],emptyLabel:[{type:t.Input,args:[{isSignal:!0,alias:"emptyLabel",required:!1}]}],loading:[{type:t.Input,args:[{isSignal:!0,alias:"loading",required:!1}]}],creatable:[{type:t.Input,args:[{isSignal:!0,alias:"creatable",required:!1}]}],createLabel:[{type:t.Input,args:[{isSignal:!0,alias:"createLabel",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"dgaInvalid",required:!1}]}],valueChange:[{type:t.Output,args:["valueChange"]}],searchChange:[{type:t.Output,args:["searchChange"]}],create:[{type:t.Output,args:["create"]}]}});function Ds(d){const e=[],a=s=>{for(const r of s)e.push(r),r.children?.length&&a(r.children)};return a(d),e}function Is(d,e){const a=e instanceof Set?e:new Set(e),s=[],r=l=>{for(const u of l)s.push(u),u.children?.length&&a.has(u.id)&&r(u.children)};return r(d),s}function Ms(d,e){const a=[],s=r=>{for(const l of r){if(l.id===e)return!0;if(l.children?.length){if(a.push(l),s(l.children))return!0;a.pop()}}return!1};return s(d),a}function rt(d,e){for(const a of d){if(a.id===e)return a;if(a.children?.length){const s=rt(a.children,e);if(s)return s}}return null}function _s(d,e){const a=e.trim().toLowerCase();if(!a)return d;const s=r=>{const l=r.label.toLowerCase().includes(a),u=(r.children??[]).map(s).filter(o=>o!=null);return l||u.length?{...r,children:u.length?u:r.children}:null};return d.map(s).filter(r=>r!=null)}class Ce{static seq=0;host=x(F);uid=++Ce.seq;items=i.required(...ngDevMode?[{debugName:"items"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);expandedIds=S([],...ngDevMode?[{debugName:"expandedIds"}]:[]);selectedIds=S([],...ngDevMode?[{debugName:"selectedIds"}]:[]);multiple=i(!1,{...ngDevMode?{debugName:"multiple"}:{},transform:m});selectable=i(!0,{...ngDevMode?{debugName:"selectable"}:{},transform:m});expandOnSelect=i(!1,{...ngDevMode?{debugName:"expandOnSelect"}:{},transform:m});selectionChange=w();expandChange=w();focusId=y(null,...ngDevMode?[{debugName:"focusId"}]:[]);expandedSet=n(()=>new Set(this.expandedIds()),...ngDevMode?[{debugName:"expandedSet"}]:[]);selectedSet=n(()=>new Set(this.selectedIds()),...ngDevMode?[{debugName:"selectedSet"}]:[]);visibleNodes=n(()=>Is(this.items(),this.expandedSet()),...ngDevMode?[{debugName:"visibleNodes"}]:[]);resolvedLabel(){return this.label()||(q()?"شجرة":"Tree")}nodeDomId(e){return`dga-tree-${this.uid}-${e}`}hasChildren(e){return!!e.children?.length}isExpanded(e){return this.expandedSet().has(e)}isSelected(e){return this.selectedSet().has(e)}twistIcon(e){return this.isExpanded(e)?"chevronDown":q()?"chevronLeft":"chevronRight"}expandAria(e){const a=q();return this.isExpanded(e.id)?a?`طي ${e.label}`:`Collapse ${e.label}`:a?`توسيع ${e.label}`:`Expand ${e.label}`}onNodeFocus(e){this.focusId.set(e)}onNodeClick(e,a){a.target?.closest(".dga-tree__twist")||(a.preventDefault(),this.focusId.set(e.id),this.focusNode(e.id),this.selectable()&&!e.disabled&&this.selectNode(e.id))}toggleExpand(e,a){if(a?.stopPropagation(),a?.preventDefault(),!rt(this.items(),e)?.children?.length)return;const r=new Set(this.expandedIds());r.has(e)?r.delete(e):r.add(e);const l=[...r];this.expandedIds.set(l),this.expandChange.emit(l),this.focusId.set(e),this.focusNode(e)}selectNode(e){const a=rt(this.items(),e);if(!a||a.disabled)return;let s;if(this.multiple()){const r=new Set(this.selectedIds());r.has(e)?r.delete(e):r.add(e),s=[...r]}else s=[e];this.selectedIds.set(s),this.selectionChange.emit(s),this.expandOnSelect()&&a.children?.length&&!this.isExpanded(e)&&this.toggleExpand(e)}onTreeKey(e){const a=this.visibleNodes().filter(o=>!o.disabled);if(!a.length)return;let s=this.focusId();(!s||!a.some(o=>o.id===s))&&(s=a[0].id,this.focusId.set(s));const r=a.findIndex(o=>o.id===s),l=a[r],u=e.key;if(u==="ArrowDown"){e.preventDefault();const o=a[Math.min(r+1,a.length-1)];this.moveFocus(o.id);return}if(u==="ArrowUp"){e.preventDefault();const o=a[Math.max(r-1,0)];this.moveFocus(o.id);return}if(u==="Home"){e.preventDefault(),this.moveFocus(a[0].id);return}if(u==="End"){e.preventDefault(),this.moveFocus(a[a.length-1].id);return}if(u==="ArrowRight"){if(e.preventDefault(),l.children?.length&&!this.isExpanded(l.id))this.toggleExpand(l.id);else if(l.children?.length&&this.isExpanded(l.id)){const o=l.children.find(c=>!c.disabled);o&&this.moveFocus(o.id)}return}if(u==="ArrowLeft"){if(e.preventDefault(),l.children?.length&&this.isExpanded(l.id))this.toggleExpand(l.id);else{const o=this.parentOf(l.id);o&&this.moveFocus(o.id)}return}if(u==="Enter"||u===" "){e.preventDefault(),this.selectable()&&this.selectNode(l.id);return}}parentOf(e){const a=(s,r)=>{for(const l of s){if(l.id===e)return r;if(l.children?.length){const u=a(l.children,l);if(u)return u}}return null};return a(this.items(),null)}moveFocus(e){this.focusId.set(e),this.focusNode(e)}focusNode(e){queueMicrotask(()=>{this.host.nativeElement.querySelector(`#${CSS.escape(this.nodeDomId(e))}`)?.focus()})}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ce,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ce,isStandalone:!0,selector:"dga-tree",inputs:{items:{classPropertyName:"items",publicName:"items",isSignal:!0,isRequired:!0,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},expandedIds:{classPropertyName:"expandedIds",publicName:"expandedIds",isSignal:!0,isRequired:!1,transformFunction:null},selectedIds:{classPropertyName:"selectedIds",publicName:"selectedIds",isSignal:!0,isRequired:!1,transformFunction:null},multiple:{classPropertyName:"multiple",publicName:"multiple",isSignal:!0,isRequired:!1,transformFunction:null},selectable:{classPropertyName:"selectable",publicName:"selectable",isSignal:!0,isRequired:!1,transformFunction:null},expandOnSelect:{classPropertyName:"expandOnSelect",publicName:"expandOnSelect",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{expandedIds:"expandedIdsChange",selectedIds:"selectedIdsChange",selectionChange:"selectionChange",expandChange:"expandChange"},host:{properties:{"attr.data-multiple":'multiple() ? "" : null'},classAttribute:"dga-tree-host block w-full"},ngImport:t,template:`
|
|
667
667
|
<ul
|
|
668
668
|
#rootList
|
|
669
669
|
role="tree"
|
|
@@ -803,7 +803,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
803
803
|
}
|
|
804
804
|
</li>
|
|
805
805
|
</ng-template>
|
|
806
|
-
`,host:{class:"dga-tree-host block w-full","[attr.data-multiple]":'multiple() ? "" : null'},styles:[":host .dga-tree__row{display:flex;align-items:center;gap:var(--spacing-xs, .25rem);min-height:var(--spacing-5xl, 2.5rem);border-radius:var(--radius-sm, .25rem);cursor:pointer;color:var(--color-fg, #161616)}:host .dga-tree__row:hover:not(.dga-tree__row--disabled){background:var(--color-primary-faint, #f0f7f2)}:host .dga-tree__row--active{outline:2px solid var(--color-focus, #2563eb);outline-offset:-2px}:host .dga-tree__row--selected{background:var(--color-primary-light, #dcefe3);font-weight:500}:host .dga-tree__row--disabled{opacity:.5;cursor:not-allowed}:host .dga-tree__twist{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:var(--spacing-4xl, 2rem);height:var(--spacing-4xl, 2rem);border:0;border-radius:var(--radius-sm, .25rem);background:transparent;color:inherit;cursor:pointer}:host .dga-tree__twist:hover{background:var(--color-neutral-light, #f3f4f6)}:host .dga-tree__twist-spacer{display:inline-block;width:var(--spacing-4xl, 2rem);flex:0 0 auto}:host .dga-tree__label{min-width:0;flex:1 1 auto;padding-inline-end:var(--spacing-md, .5rem);font-size:var(--text-body-sm, .875rem);line-height:1.4}:host li.dga-tree__item:focus{outline:none}\n"]}]}],propDecorators:{items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!0}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],expandedIds:[{type:t.Input,args:[{isSignal:!0,alias:"expandedIds",required:!1}]},{type:t.Output,args:["expandedIdsChange"]}],selectedIds:[{type:t.Input,args:[{isSignal:!0,alias:"selectedIds",required:!1}]},{type:t.Output,args:["selectedIdsChange"]}],multiple:[{type:t.Input,args:[{isSignal:!0,alias:"multiple",required:!1}]}],selectable:[{type:t.Input,args:[{isSignal:!0,alias:"selectable",required:!1}]}],expandOnSelect:[{type:t.Input,args:[{isSignal:!0,alias:"expandOnSelect",required:!1}]}],selectionChange:[{type:t.Output,args:["selectionChange"]}],expandChange:[{type:t.Output,args:["expandChange"]}]}});class De{static nextId=0;host=x(F);panelId=`dga-tree-select-${++De.nextId}`;items=i.required(...ngDevMode?[{debugName:"items"}]:[]);valueInput=i("",{...ngDevMode?{debugName:"valueInput"}:{},alias:"value"});value=_e(this.valueInput,...ngDevMode?[{debugName:"value"}]:[]);multiple=i(!1,{...ngDevMode?{debugName:"multiple"}:{},transform:m});searchable=i(!1,{...ngDevMode?{debugName:"searchable"}:{},transform:m});clearable=i(!1,{...ngDevMode?{debugName:"clearable"}:{},transform:m});size=i("md",...ngDevMode?[{debugName:"size"}]:[]);invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},transform:m});disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);placeholderInput=i("",{...ngDevMode?{debugName:"placeholderInput"}:{},alias:"placeholder"});emptyLabelInput=i("",{...ngDevMode?{debugName:"emptyLabelInput"}:{},alias:"emptyLabel"});onlyLeaves=i(!1,{...ngDevMode?{debugName:"onlyLeaves"}:{},transform:m});open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);expandedIds=S([],...ngDevMode?[{debugName:"expandedIds"}]:[]);query=y("",...ngDevMode?[{debugName:"query"}]:[]);valueChange=w();selectedIdList=n(()=>{const e=this.value();return Array.isArray(e)?e:e?[e]:[]},...ngDevMode?[{debugName:"selectedIdList"}]:[]);filteredItems=n(()=>
|
|
806
|
+
`,host:{class:"dga-tree-host block w-full","[attr.data-multiple]":'multiple() ? "" : null'},styles:[":host .dga-tree__row{display:flex;align-items:center;gap:var(--spacing-xs, .25rem);min-height:var(--spacing-5xl, 2.5rem);border-radius:var(--radius-sm, .25rem);cursor:pointer;color:var(--color-fg, #161616)}:host .dga-tree__row:hover:not(.dga-tree__row--disabled){background:var(--color-primary-faint, #f0f7f2)}:host .dga-tree__row--active{outline:2px solid var(--color-focus, #2563eb);outline-offset:-2px}:host .dga-tree__row--selected{background:var(--color-primary-light, #dcefe3);font-weight:500}:host .dga-tree__row--disabled{opacity:.5;cursor:not-allowed}:host .dga-tree__twist{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;width:var(--spacing-4xl, 2rem);height:var(--spacing-4xl, 2rem);border:0;border-radius:var(--radius-sm, .25rem);background:transparent;color:inherit;cursor:pointer}:host .dga-tree__twist:hover{background:var(--color-neutral-light, #f3f4f6)}:host .dga-tree__twist-spacer{display:inline-block;width:var(--spacing-4xl, 2rem);flex:0 0 auto}:host .dga-tree__label{min-width:0;flex:1 1 auto;padding-inline-end:var(--spacing-md, .5rem);font-size:var(--text-body-sm, .875rem);line-height:1.4}:host li.dga-tree__item:focus{outline:none}\n"]}]}],propDecorators:{items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!0}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],expandedIds:[{type:t.Input,args:[{isSignal:!0,alias:"expandedIds",required:!1}]},{type:t.Output,args:["expandedIdsChange"]}],selectedIds:[{type:t.Input,args:[{isSignal:!0,alias:"selectedIds",required:!1}]},{type:t.Output,args:["selectedIdsChange"]}],multiple:[{type:t.Input,args:[{isSignal:!0,alias:"multiple",required:!1}]}],selectable:[{type:t.Input,args:[{isSignal:!0,alias:"selectable",required:!1}]}],expandOnSelect:[{type:t.Input,args:[{isSignal:!0,alias:"expandOnSelect",required:!1}]}],selectionChange:[{type:t.Output,args:["selectionChange"]}],expandChange:[{type:t.Output,args:["expandChange"]}]}});class De{static nextId=0;host=x(F);panelId=`dga-tree-select-${++De.nextId}`;items=i.required(...ngDevMode?[{debugName:"items"}]:[]);valueInput=i("",{...ngDevMode?{debugName:"valueInput"}:{},alias:"value"});value=_e(this.valueInput,...ngDevMode?[{debugName:"value"}]:[]);multiple=i(!1,{...ngDevMode?{debugName:"multiple"}:{},transform:m});searchable=i(!1,{...ngDevMode?{debugName:"searchable"}:{},transform:m});clearable=i(!1,{...ngDevMode?{debugName:"clearable"}:{},transform:m});size=i("md",...ngDevMode?[{debugName:"size"}]:[]);invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},transform:m});disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);placeholderInput=i("",{...ngDevMode?{debugName:"placeholderInput"}:{},alias:"placeholder"});emptyLabelInput=i("",{...ngDevMode?{debugName:"emptyLabelInput"}:{},alias:"emptyLabel"});onlyLeaves=i(!1,{...ngDevMode?{debugName:"onlyLeaves"}:{},transform:m});open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);expandedIds=S([],...ngDevMode?[{debugName:"expandedIds"}]:[]);query=y("",...ngDevMode?[{debugName:"query"}]:[]);valueChange=w();selectedIdList=n(()=>{const e=this.value();return Array.isArray(e)?e:e?[e]:[]},...ngDevMode?[{debugName:"selectedIdList"}]:[]);filteredItems=n(()=>_s(this.items(),this.searchable()?this.query():""),...ngDevMode?[{debugName:"filteredItems"}]:[]);selectedItems=n(()=>this.selectedIdList().map(e=>rt(this.items(),e)).filter(e=>e!=null),...ngDevMode?[{debugName:"selectedItems"}]:[]);resolvedStatus=n(()=>X(this.invalid()),...ngDevMode?[{debugName:"resolvedStatus"}]:[]);onChange=()=>{};onTouched=()=>{};constructor(){M(()=>{if(!this.query().trim()||!this.searchable())return;const a=this.filteredItems(),s=new Set;for(const r of Ds(a)){for(const l of Ms(a,r.id))s.add(l.id);r.children?.length&&s.add(r.id)}this.expandedIds.set([...s])})}resolvedPlaceholder(){return this.placeholderInput()||(q()?"اختر…":"Choose…")}searchPlaceholder(){return this.multiple()&&this.selectedItems().length?"":!this.multiple()&&this.selectedItems().length&&!this.query()?this.selectedItems()[0].label:this.resolvedPlaceholder()}treeLabel(){return this.label()||(q()?"خيارات الشجرة":"Tree options")}emptyLabel(){return this.emptyLabelInput()||(q()?"لا نتائج":"No results")}removeLabel(){return q()?"إزالة":"Remove"}clearLabel(){return q()?"مسح":"Clear"}hasValue(){return this.selectedIdList().length>0}triggerWrapClasses(){return f("dga-form-field flex w-full flex-wrap items-center gap-sm border bg-surface","rounded-md px-md transition-[border-color,box-shadow] duration-200",this.size()==="sm"&&"min-h-4xl text-body-sm",this.size()==="md"&&"min-h-5xl text-body-md",this.size()==="lg"&&"min-h-6xl text-body-lg",Z(this.resolvedStatus()),this.disabled()&&"pointer-events-none border-border-disabled bg-disabled opacity-70",!this.disabled()&&"hover:border-border-primary-light")}searchInputClasses(){return f("min-w-24 flex-1 border-0 bg-transparent py-sm outline-none",this.size()==="sm"&&"text-body-sm",this.size()==="md"&&"text-body-md",this.size()==="lg"&&"text-body-lg")}buttonClasses(){return f("rounded-md border bg-surface px-md transition-[border-color,box-shadow] duration-200",this.size()==="sm"&&"min-h-4xl text-body-sm",this.size()==="md"&&"min-h-5xl text-body-md",this.size()==="lg"&&"min-h-6xl text-body-lg",Z(this.resolvedStatus()),!this.disabled()&&"hover:border-border-primary-light")}onType(e){this.query.set(e),this.openPanel()}openPanel(){this.disabled()||this.open.set(!0)}toggleOpen(){this.disabled()||this.open.update(e=>!e)}closePanel(){this.open.set(!1),this.query.set("")}onBlur(){this.onTouched()}onDocClick(e){this.open()&&(this.host.nativeElement.contains(e.target)||this.closePanel())}onTriggerKey(e){if(e.key==="Escape"){e.preventDefault(),this.closePanel();return}e.key==="ArrowDown"&&!this.open()&&(e.preventDefault(),this.openPanel())}onTreeSelect(e){if(this.onlyLeaves()){const s=e[e.length-1];if((s?rt(this.items(),s):null)?.children?.length)return}const a=this.multiple()?e:e[0]??"";this.commit(a),this.multiple()||this.closePanel()}remove(e){this.multiple()&&this.commit(this.selectedIdList().filter(a=>a!==e))}clear(){this.commit(this.multiple()?[]:"")}commit(e){this.value.set(e),this.onChange(e),this.valueChange.emit(e)}writeValue(e){this.value.set(e??(this.multiple()?[]:""))}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.cvaDisabled.set(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:De,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:De,isStandalone:!0,selector:"dga-tree-select",inputs:{items:{classPropertyName:"items",publicName:"items",isSignal:!0,isRequired:!0,transformFunction:null},valueInput:{classPropertyName:"valueInput",publicName:"value",isSignal:!0,isRequired:!1,transformFunction:null},multiple:{classPropertyName:"multiple",publicName:"multiple",isSignal:!0,isRequired:!1,transformFunction:null},searchable:{classPropertyName:"searchable",publicName:"searchable",isSignal:!0,isRequired:!1,transformFunction:null},clearable:{classPropertyName:"clearable",publicName:"clearable",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"invalid",isSignal:!0,isRequired:!1,transformFunction:null},disabledInput:{classPropertyName:"disabledInput",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},placeholderInput:{classPropertyName:"placeholderInput",publicName:"placeholder",isSignal:!0,isRequired:!1,transformFunction:null},emptyLabelInput:{classPropertyName:"emptyLabelInput",publicName:"emptyLabel",isSignal:!0,isRequired:!1,transformFunction:null},onlyLeaves:{classPropertyName:"onlyLeaves",publicName:"onlyLeaves",isSignal:!0,isRequired:!1,transformFunction:null},open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},expandedIds:{classPropertyName:"expandedIds",publicName:"expandedIds",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",expandedIds:"expandedIdsChange",valueChange:"valueChange"},host:{listeners:{"document:click":"onDocClick($event)"},classAttribute:"block w-full"},providers:[P(De)],ngImport:t,template:`
|
|
807
807
|
<div class="relative w-full">
|
|
808
808
|
@if (searchable()) {
|
|
809
809
|
<div [class]="triggerWrapClasses()">
|
|
@@ -1091,12 +1091,12 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
1091
1091
|
} @else if (hint()) {
|
|
1092
1092
|
<p class="mt-xs text-body-xs text-muted">{{ hint() }}</p>
|
|
1093
1093
|
}
|
|
1094
|
-
`,changeDetection:h.OnPush,host:{class:"flex w-full flex-col","[attr.data-status]":'status() === "default" ? null : status()'}}]}],propDecorators:{label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],labelHint:[{type:t.Input,args:[{isSignal:!0,alias:"labelHint",required:!1}]}],hint:[{type:t.Input,args:[{isSignal:!0,alias:"hint",required:!1}]}],error:[{type:t.Input,args:[{isSignal:!0,alias:"error",required:!1}]}],status:[{type:t.Input,args:[{isSignal:!0,alias:"status",required:!1}]}],statusMessage:[{type:t.Input,args:[{isSignal:!0,alias:"statusMessage",required:!1}]}],controlId:[{type:t.Input,args:[{isSignal:!0,alias:"controlId",required:!1}]}],required:[{type:t.Input,args:[{isSignal:!0,alias:"required",required:!1}]}]}});const xr="relative inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:cursor-not-allowed disabled:opacity-50",wr={sm:"h-2xl w-5xl p-xxs",md:"h-3xl w-6xl p-xxs",lg:"h-4xl w-7xl p-xs"},kr={sm:"size-xl",md:"size-2xl",lg:"size-3xl"};class We{checked=S(!1,...ngDevMode?[{debugName:"checked"}]:[]);size=i("md",...ngDevMode?[{debugName:"size"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);changed=w();onChange=()=>{};onTouched=()=>{};trackClasses=n(()=>f(xr,wr[this.size()],this.checked()?"bg-primary justify-end":"bg-border justify-start"),...ngDevMode?[{debugName:"trackClasses"}]:[]);thumbClasses=n(()=>f("inline-block rounded-full bg-on-color shadow-sm transition-transform",kr[this.size()]),...ngDevMode?[{debugName:"thumbClasses"}]:[]);toggle(){if(this.disabled())return;const e=!this.checked();this.checked.set(e),this.changed.emit(e),this.onChange(e)}writeValue(e){this.checked.set(!!e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.cvaDisabled.set(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:We,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.1.0",version:"22.1.5",type:We,isStandalone:!0,selector:"dga-switch",inputs:{checked:{classPropertyName:"checked",publicName:"checked",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},disabledInput:{classPropertyName:"disabledInput",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{checked:"checkedChange",changed:"changed"},host:{properties:{"attr.data-size":"size()"},classAttribute:"inline-flex items-center gap-md"},providers:[P(We)],ngImport:t,template:`
|
|
1094
|
+
`,changeDetection:h.OnPush,host:{class:"flex w-full flex-col","[attr.data-status]":'status() === "default" ? null : status()'}}]}],propDecorators:{label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],labelHint:[{type:t.Input,args:[{isSignal:!0,alias:"labelHint",required:!1}]}],hint:[{type:t.Input,args:[{isSignal:!0,alias:"hint",required:!1}]}],error:[{type:t.Input,args:[{isSignal:!0,alias:"error",required:!1}]}],status:[{type:t.Input,args:[{isSignal:!0,alias:"status",required:!1}]}],statusMessage:[{type:t.Input,args:[{isSignal:!0,alias:"statusMessage",required:!1}]}],controlId:[{type:t.Input,args:[{isSignal:!0,alias:"controlId",required:!1}]}],required:[{type:t.Input,args:[{isSignal:!0,alias:"required",required:!1}]}]}});const xr="relative inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:cursor-not-allowed disabled:opacity-50",wr={sm:"h-2xl w-5xl p-xxs",md:"h-3xl w-6xl p-xxs",lg:"h-4xl w-7xl p-xs"},kr={sm:"size-xl",md:"size-2xl",lg:"size-3xl"};class We{checked=S(!1,...ngDevMode?[{debugName:"checked"}]:[]);size=i("md",...ngDevMode?[{debugName:"size"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);ariaLabel=i("",...ngDevMode?[{debugName:"ariaLabel"}]:[]);disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);resolvedAriaLabel=n(()=>this.ariaLabel()||this.label()||null,...ngDevMode?[{debugName:"resolvedAriaLabel"}]:[]);changed=w();onChange=()=>{};onTouched=()=>{};trackClasses=n(()=>f(xr,wr[this.size()],this.checked()?"bg-primary justify-end":"bg-border justify-start"),...ngDevMode?[{debugName:"trackClasses"}]:[]);thumbClasses=n(()=>f("inline-block rounded-full bg-on-color shadow-sm transition-transform",kr[this.size()]),...ngDevMode?[{debugName:"thumbClasses"}]:[]);toggle(){if(this.disabled())return;const e=!this.checked();this.checked.set(e),this.changed.emit(e),this.onChange(e)}writeValue(e){this.checked.set(!!e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.cvaDisabled.set(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:We,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.1.0",version:"22.1.5",type:We,isStandalone:!0,selector:"dga-switch",inputs:{checked:{classPropertyName:"checked",publicName:"checked",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},ariaLabel:{classPropertyName:"ariaLabel",publicName:"ariaLabel",isSignal:!0,isRequired:!1,transformFunction:null},disabledInput:{classPropertyName:"disabledInput",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{checked:"checkedChange",changed:"changed"},host:{properties:{"attr.data-size":"size()"},classAttribute:"inline-flex items-center gap-md"},providers:[P(We)],ngImport:t,template:`
|
|
1095
1095
|
<button
|
|
1096
1096
|
type="button"
|
|
1097
1097
|
role="switch"
|
|
1098
1098
|
[attr.aria-checked]="checked()"
|
|
1099
|
-
[attr.aria-label]="
|
|
1099
|
+
[attr.aria-label]="resolvedAriaLabel()"
|
|
1100
1100
|
[disabled]="disabled()"
|
|
1101
1101
|
[class]="trackClasses()"
|
|
1102
1102
|
(click)="toggle()"
|
|
@@ -1104,12 +1104,13 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
1104
1104
|
>
|
|
1105
1105
|
<span aria-hidden="true" [class]="thumbClasses()"></span>
|
|
1106
1106
|
</button>
|
|
1107
|
+
<span class="text-body-md text-fg" [hidden]="!label()">{{ label() }}</span>
|
|
1107
1108
|
`,isInline:!0,changeDetection:t.ChangeDetectionStrategy.OnPush})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:We,decorators:[{type:v,args:[{selector:"dga-switch",standalone:!0,template:`
|
|
1108
1109
|
<button
|
|
1109
1110
|
type="button"
|
|
1110
1111
|
role="switch"
|
|
1111
1112
|
[attr.aria-checked]="checked()"
|
|
1112
|
-
[attr.aria-label]="
|
|
1113
|
+
[attr.aria-label]="resolvedAriaLabel()"
|
|
1113
1114
|
[disabled]="disabled()"
|
|
1114
1115
|
[class]="trackClasses()"
|
|
1115
1116
|
(click)="toggle()"
|
|
@@ -1117,7 +1118,8 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
1117
1118
|
>
|
|
1118
1119
|
<span aria-hidden="true" [class]="thumbClasses()"></span>
|
|
1119
1120
|
</button>
|
|
1120
|
-
|
|
1121
|
+
<span class="text-body-md text-fg" [hidden]="!label()">{{ label() }}</span>
|
|
1122
|
+
`,changeDetection:h.OnPush,host:{class:"inline-flex items-center gap-md","[attr.data-size]":"size()"},providers:[P(We)]}]}],propDecorators:{checked:[{type:t.Input,args:[{isSignal:!0,alias:"checked",required:!1}]},{type:t.Output,args:["checkedChange"]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],ariaLabel:[{type:t.Input,args:[{isSignal:!0,alias:"ariaLabel",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],changed:[{type:t.Output,args:["changed"]}]}});class Ye{valueInput=i(0,{...ngDevMode?{debugName:"valueInput"}:{},alias:"value"});value=_e(this.valueInput,...ngDevMode?[{debugName:"value"}]:[]);min=i(Number.NEGATIVE_INFINITY,...ngDevMode?[{debugName:"min"}]:[]);max=i(Number.POSITIVE_INFINITY,...ngDevMode?[{debugName:"max"}]:[]);stepSize=i(1,{...ngDevMode?{debugName:"stepSize"}:{},alias:"step"});size=i("md",...ngDevMode?[{debugName:"size"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);controlId=i("",...ngDevMode?[{debugName:"controlId"}]:[]);name=i("",...ngDevMode?[{debugName:"name"}]:[]);incrementLabel=i("زيادة",...ngDevMode?[{debugName:"incrementLabel"}]:[]);decrementLabel=i("إنقاص",...ngDevMode?[{debugName:"decrementLabel"}]:[]);disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},alias:"dgaInvalid",transform:m});status=i("default",...ngDevMode?[{debugName:"status"}]:[]);valueChange=w();onChange=()=>{};onTouched=()=>{};resolvedStatus=n(()=>this.status()!=="default"?this.status():X(this.invalid()),...ngDevMode?[{debugName:"resolvedStatus"}]:[]);wrapClasses=n(()=>{const e=this.size();return f("flex w-full items-stretch border bg-surface text-fg","transition-[border-color,box-shadow,background-color] duration-200",Z(this.resolvedStatus()),e==="sm"&&"min-h-4xl rounded-md text-body-sm",e==="md"&&"min-h-5xl rounded-md text-body-md",e==="lg"&&"min-h-6xl rounded-md text-body-lg",ie(this.resolvedStatus()),this.disabled()&&"pointer-events-none border-border-disabled bg-disabled opacity-70",!this.disabled()&&"hover:border-border-primary-light")},...ngDevMode?[{debugName:"wrapClasses"}]:[]);step(e){this.disabled()||this.commit(this.clamp(this.value()+e*this.stepSize()))}onType(e){const a=Number(e);Number.isNaN(a)||this.commit(this.clamp(a))}finiteOrNull(e){return Number.isFinite(e)?e:null}clamp(e){return Math.min(this.max(),Math.max(this.min(),e))}commit(e){this.value.set(e),this.valueChange.emit(e),this.onChange(e)}writeValue(e){this.value.set(e??0)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.cvaDisabled.set(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ye,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.1.0",version:"22.1.5",type:Ye,isStandalone:!0,selector:"dga-number-input",inputs:{valueInput:{classPropertyName:"valueInput",publicName:"value",isSignal:!0,isRequired:!1,transformFunction:null},min:{classPropertyName:"min",publicName:"min",isSignal:!0,isRequired:!1,transformFunction:null},max:{classPropertyName:"max",publicName:"max",isSignal:!0,isRequired:!1,transformFunction:null},stepSize:{classPropertyName:"stepSize",publicName:"step",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},controlId:{classPropertyName:"controlId",publicName:"controlId",isSignal:!0,isRequired:!1,transformFunction:null},name:{classPropertyName:"name",publicName:"name",isSignal:!0,isRequired:!1,transformFunction:null},incrementLabel:{classPropertyName:"incrementLabel",publicName:"incrementLabel",isSignal:!0,isRequired:!1,transformFunction:null},decrementLabel:{classPropertyName:"decrementLabel",publicName:"decrementLabel",isSignal:!0,isRequired:!1,transformFunction:null},disabledInput:{classPropertyName:"disabledInput",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"dgaInvalid",isSignal:!0,isRequired:!1,transformFunction:null},status:{classPropertyName:"status",publicName:"status",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{valueChange:"valueChange"},host:{properties:{"attr.data-size":"size()"},classAttribute:"block w-full"},providers:[P(Ye)],ngImport:t,template:`
|
|
1121
1123
|
<div [class]="wrapClasses()" [attr.data-status]="resolvedStatus() === 'default' ? null : resolvedStatus()">
|
|
1122
1124
|
<button
|
|
1123
1125
|
type="button"
|
|
@@ -1203,7 +1205,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
1203
1205
|
+
|
|
1204
1206
|
</button>
|
|
1205
1207
|
</div>
|
|
1206
|
-
`,changeDetection:h.OnPush,host:{class:"block w-full","[attr.data-size]":"size()"},providers:[P(Ye)]}]}],propDecorators:{valueInput:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]}],min:[{type:t.Input,args:[{isSignal:!0,alias:"min",required:!1}]}],max:[{type:t.Input,args:[{isSignal:!0,alias:"max",required:!1}]}],stepSize:[{type:t.Input,args:[{isSignal:!0,alias:"step",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],controlId:[{type:t.Input,args:[{isSignal:!0,alias:"controlId",required:!1}]}],name:[{type:t.Input,args:[{isSignal:!0,alias:"name",required:!1}]}],incrementLabel:[{type:t.Input,args:[{isSignal:!0,alias:"incrementLabel",required:!1}]}],decrementLabel:[{type:t.Input,args:[{isSignal:!0,alias:"decrementLabel",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"dgaInvalid",required:!1}]}],status:[{type:t.Input,args:[{isSignal:!0,alias:"status",required:!1}]}],valueChange:[{type:t.Output,args:["valueChange"]}]}});class qt{el=x(F);size=i("md",...ngDevMode?[{debugName:"size"}]:[]);constructor(){
|
|
1208
|
+
`,changeDetection:h.OnPush,host:{class:"block w-full","[attr.data-size]":"size()"},providers:[P(Ye)]}]}],propDecorators:{valueInput:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]}],min:[{type:t.Input,args:[{isSignal:!0,alias:"min",required:!1}]}],max:[{type:t.Input,args:[{isSignal:!0,alias:"max",required:!1}]}],stepSize:[{type:t.Input,args:[{isSignal:!0,alias:"step",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],controlId:[{type:t.Input,args:[{isSignal:!0,alias:"controlId",required:!1}]}],name:[{type:t.Input,args:[{isSignal:!0,alias:"name",required:!1}]}],incrementLabel:[{type:t.Input,args:[{isSignal:!0,alias:"incrementLabel",required:!1}]}],decrementLabel:[{type:t.Input,args:[{isSignal:!0,alias:"decrementLabel",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"dgaInvalid",required:!1}]}],status:[{type:t.Input,args:[{isSignal:!0,alias:"status",required:!1}]}],valueChange:[{type:t.Output,args:["valueChange"]}]}});class qt{el=x(F);size=i("md",...ngDevMode?[{debugName:"size"}]:[]);constructor(){T(()=>this.paint())}paint(){const e=this.el.nativeElement,a=Number(e.min),s=Number(e.max),r=Number(e.value),l=Number.isFinite(a)?a:0,u=Number.isFinite(s)&&s!==l?s:l+100,o=Number.isFinite(r)?r:l,c=Math.min(100,Math.max(0,(o-l)/(u-l)*100));e.style.setProperty("--dga-slider-fill",`${c}%`)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:qt,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:qt,isStandalone:!0,selector:'input[type="range"][dgaSlider]',inputs:{size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null}},host:{listeners:{input:"paint()",change:"paint()"},properties:{"attr.data-size":"size()"},classAttribute:"dga-slider"},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:qt,decorators:[{type:V,args:[{selector:'input[type="range"][dgaSlider]',standalone:!0,host:{class:"dga-slider","(input)":"paint()","(change)":"paint()","[attr.data-size]":"size()"}}]}],ctorParameters:()=>[],propDecorators:{size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}]}});class Ue{cells;length=i(4,...ngDevMode?[{debugName:"length"}]:[]);value=S("",...ngDevMode?[{debugName:"value"}]:[]);label=i("رمز التحقق",...ngDevMode?[{debugName:"label"}]:[]);alphanumeric=i(!1,{...ngDevMode?{debugName:"alphanumeric"}:{},transform:m});disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},alias:"dgaInvalid",transform:m});completed=w();onChange=()=>{};onTouched=()=>{};get slots(){return Array.from({length:Math.max(1,this.length())},(e,a)=>a)}chars(){const e=this.length(),a=this.sanitize(this.value()).slice(0,e);return Array.from({length:e},(s,r)=>a[r]??"")}sanitize(e){return this.alphanumeric()?e.toUpperCase().replace(/[^A-Z0-9]/g,""):e.replace(/\D/g,"")}cellClasses(){return f("size-5xl rounded-md border bg-surface text-center text-body-lg text-fg","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-0 focus-visible:outline-focus","disabled:bg-disabled disabled:opacity-50",this.invalid()?"border-border-error":"border-border")}onInput(e,a){const s=this.sanitize(a);if(s.length>1){const u=this.chars(),o=s.slice(0,this.length()-e);for(let c=0;c<o.length;c++)u[e+c]=o[c];this.commit(u.join("")),this.focusAt(Math.min(e+o.length,this.length()-1));return}const r=s.slice(-1),l=this.chars();l[e]=r,this.commit(l.join("")),r&&e<this.length()-1&&this.focusAt(e+1)}onKey(e,a){if(a.key==="Backspace"&&!this.chars()[e]&&e>0){a.preventDefault();const s=this.chars();s[e-1]="",this.commit(s.join("")),this.focusAt(e-1)}a.key==="ArrowLeft"&&e>0&&(a.preventDefault(),this.focusAt(e-1)),a.key==="ArrowRight"&&e<this.length()-1&&(a.preventDefault(),this.focusAt(e+1))}onPaste(e){e.preventDefault();const a=e.clipboardData?.getData("text")??"",s=this.sanitize(a).slice(0,this.length());this.commit(s),this.focusAt(Math.min(s.length,this.length()-1))}focusAt(e){queueMicrotask(()=>this.cells.get(e)?.nativeElement.focus())}syncDom(){const e=this.chars();this.cells?.forEach((a,s)=>{const r=a.nativeElement,l=e[s]??"";r.value!==l&&(r.value=l)})}commit(e){const a=this.sanitize(e).slice(0,this.length());this.value.set(a),this.onChange(a),this.syncDom(),a.length>=this.length()&&this.completed.emit(a)}writeValue(e){this.value.set(e??"")}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.cvaDisabled.set(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ue,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ue,isStandalone:!0,selector:"dga-otp",inputs:{length:{classPropertyName:"length",publicName:"length",isSignal:!0,isRequired:!1,transformFunction:null},value:{classPropertyName:"value",publicName:"value",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},alphanumeric:{classPropertyName:"alphanumeric",publicName:"alphanumeric",isSignal:!0,isRequired:!1,transformFunction:null},disabledInput:{classPropertyName:"disabledInput",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"dgaInvalid",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{value:"valueChange",completed:"completed"},host:{classAttribute:"block"},providers:[P(Ue)],viewQueries:[{propertyName:"cells",predicate:["cell"],descendants:!0}],ngImport:t,template:`
|
|
1207
1209
|
<div class="flex gap-md" role="group" dir="ltr" [attr.aria-label]="label()">
|
|
1208
1210
|
@for (slot of slots; track $index) {
|
|
1209
1211
|
<input
|
|
@@ -1241,7 +1243,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
1241
1243
|
/>
|
|
1242
1244
|
}
|
|
1243
1245
|
</div>
|
|
1244
|
-
`,changeDetection:h.OnPush,host:{class:"block"},providers:[P(Ue)]}]}],propDecorators:{cells:[{type:
|
|
1246
|
+
`,changeDetection:h.OnPush,host:{class:"block"},providers:[P(Ue)]}]}],propDecorators:{cells:[{type:Ti,args:["cell"]}],length:[{type:t.Input,args:[{isSignal:!0,alias:"length",required:!1}]}],value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]},{type:t.Output,args:["valueChange"]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],alphanumeric:[{type:t.Input,args:[{isSignal:!0,alias:"alphanumeric",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"dgaInvalid",required:!1}]}],completed:[{type:t.Output,args:["completed"]}]}});class Ge{valueInput=i([],{...ngDevMode?{debugName:"valueInput"}:{},alias:"value"});value=_e(this.valueInput,...ngDevMode?[{debugName:"value"}]:[]);placeholder=i("أضف واضغط Enter",...ngDevMode?[{debugName:"placeholder"}]:[]);label=i("وسوم",...ngDevMode?[{debugName:"label"}]:[]);removeLabel=i("إزالة",...ngDevMode?[{debugName:"removeLabel"}]:[]);disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);allowDuplicates=i(!1,{...ngDevMode?{debugName:"allowDuplicates"}:{},transform:m});invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},alias:"dgaInvalid",transform:m});status=i("default",...ngDevMode?[{debugName:"status"}]:[]);valueChange=w();draft="";onChange=()=>{};onTouched=()=>{};resolvedStatus=n(()=>this.status()!=="default"?this.status():X(this.invalid()),...ngDevMode?[{debugName:"resolvedStatus"}]:[]);wrapClasses=n(()=>f("flex min-h-4xl w-full flex-wrap items-center gap-sm rounded-md border bg-surface px-md py-sm","transition-[border-color,box-shadow] duration-200",Z(this.resolvedStatus()),"focus-within:shadow-(--dga-form-field-focus-shadow)",ie(this.resolvedStatus()),this.disabled()&&"pointer-events-none bg-disabled",!this.disabled()&&"hover:border-border-primary-light"),...ngDevMode?[{debugName:"wrapClasses"}]:[]);commit(e){e.preventDefault();const a=this.draft.trim();if(!a||this.disabled())return;if(this.value().includes(a)&&!this.allowDuplicates()){this.draft="";return}const s=[...this.value(),a];this.emitValue(s),this.draft=""}remove(e){const a=this.value().filter(s=>s!==e);this.emitValue(a)}onBackspace(){this.draft||!this.value().length||this.remove(this.value()[this.value().length-1])}writeValue(e){this.value.set(e??[])}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.cvaDisabled.set(e)}emitValue(e){this.value.set(e),this.valueChange.emit(e),this.onChange(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ge,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ge,isStandalone:!0,selector:"dga-chip-input",inputs:{valueInput:{classPropertyName:"valueInput",publicName:"value",isSignal:!0,isRequired:!1,transformFunction:null},placeholder:{classPropertyName:"placeholder",publicName:"placeholder",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},removeLabel:{classPropertyName:"removeLabel",publicName:"removeLabel",isSignal:!0,isRequired:!1,transformFunction:null},disabledInput:{classPropertyName:"disabledInput",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null},allowDuplicates:{classPropertyName:"allowDuplicates",publicName:"allowDuplicates",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"dgaInvalid",isSignal:!0,isRequired:!1,transformFunction:null},status:{classPropertyName:"status",publicName:"status",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{valueChange:"valueChange"},host:{classAttribute:"block w-full"},providers:[P(Ge)],ngImport:t,template:`
|
|
1245
1247
|
<div
|
|
1246
1248
|
[class]="wrapClasses()"
|
|
1247
1249
|
[attr.data-status]="resolvedStatus() === 'default' ? null : resolvedStatus()"
|
|
@@ -1289,7 +1291,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
1289
1291
|
(blur)="onTouched()"
|
|
1290
1292
|
/>
|
|
1291
1293
|
</div>
|
|
1292
|
-
`,changeDetection:h.OnPush,host:{class:"block w-full"},providers:[P(Ge)]}]}],propDecorators:{valueInput:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]}],placeholder:[{type:t.Input,args:[{isSignal:!0,alias:"placeholder",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],removeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"removeLabel",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],allowDuplicates:[{type:t.Input,args:[{isSignal:!0,alias:"allowDuplicates",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"dgaInvalid",required:!1}]}],status:[{type:t.Input,args:[{isSignal:!0,alias:"status",required:!1}]}],valueChange:[{type:t.Output,args:["valueChange"]}]}});const vt="SA",nt=24;function qe(d){return d.replace(/\s+/g,"").toUpperCase().replace(/[^A-Z0-9]/g,"")}function
|
|
1294
|
+
`,changeDetection:h.OnPush,host:{class:"block w-full"},providers:[P(Ge)]}]}],propDecorators:{valueInput:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]}],placeholder:[{type:t.Input,args:[{isSignal:!0,alias:"placeholder",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],removeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"removeLabel",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],allowDuplicates:[{type:t.Input,args:[{isSignal:!0,alias:"allowDuplicates",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"dgaInvalid",required:!1}]}],status:[{type:t.Input,args:[{isSignal:!0,alias:"status",required:!1}]}],valueChange:[{type:t.Output,args:["valueChange"]}]}});const vt="SA",nt=24;function qe(d){return d.replace(/\s+/g,"").toUpperCase().replace(/[^A-Z0-9]/g,"")}function qs(d){return qe(d).slice(0,nt).replace(/(.{4})(?=.)/g,"$1 ").trim()}function Ls(d){const e=qe(d);if(e.length!==nt||!e.startsWith(vt)||!/^[A-Z]{2}\d{2}[A-Z0-9]+$/.test(e))return!1;const a=e.slice(4)+e.slice(0,4);let s="";for(const l of a){const u=l.charCodeAt(0);s+=u>=65?String(u-55):l}let r=0;for(let l=0;l<s.length;l+=7){const u=String(r)+s.slice(l,l+7);r=Number(u)%97}return r===1}class Xe{value=S("",...ngDevMode?[{debugName:"value"}]:[]);controlId=i("",...ngDevMode?[{debugName:"controlId"}]:[]);name=i("iban",...ngDevMode?[{debugName:"name"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);placeholder=i("00 ACCT-000003 0000",...ngDevMode?[{debugName:"placeholder"}]:[]);countryCode=i(vt,...ngDevMode?[{debugName:"countryCode"}]:[]);disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);required=i(!1,{...ngDevMode?{debugName:"required"}:{},transform:m});invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},transform:m});prefix=n(()=>qe(this.countryCode()||vt).slice(0,2)||vt,...ngDevMode?[{debugName:"prefix"}]:[]);checksumValid=n(()=>Ls(this.value()),...ngDevMode?[{debugName:"checksumValid"}]:[]);displayValue=n(()=>{const e=qe(this.value()),a=this.prefix(),s=e.startsWith(a)?e.slice(a.length):e;return qs(s)},...ngDevMode?[{debugName:"displayValue"}]:[]);resolvedStatus=n(()=>X(this.invalid()),...ngDevMode?[{debugName:"resolvedStatus"}]:[]);groupClasses=n(()=>f("dga-iban-group flex w-full items-center border bg-surface text-fg","min-h-5xl rounded-md transition-[border-color,box-shadow,background-color] duration-200","font-mono text-body-md",Z(this.resolvedStatus()),ie(this.resolvedStatus()),this.disabled()&&"pointer-events-none border-border-disabled bg-disabled opacity-70",!this.disabled()&&"hover:border-border-primary-light"),...ngDevMode?[{debugName:"groupClasses"}]:[]);onChange=()=>{};onTouched=()=>{};onInput(e){const a=this.prefix();let s=qe(e);s.startsWith(a)&&(s=s.slice(a.length)),s=s.slice(0,nt-a.length);const r=`${a}${s}`;this.value.set(r),this.onChange(r)}writeValue(e){const a=this.prefix();let s=qe(e??"");s&&!s.startsWith(a)&&(s=`${a}${s}`.slice(0,nt)),this.value.set(s.slice(0,nt))}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.cvaDisabled.set(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Xe,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.1.0",version:"22.1.5",type:Xe,isStandalone:!0,selector:"dga-iban-input",inputs:{value:{classPropertyName:"value",publicName:"value",isSignal:!0,isRequired:!1,transformFunction:null},controlId:{classPropertyName:"controlId",publicName:"controlId",isSignal:!0,isRequired:!1,transformFunction:null},name:{classPropertyName:"name",publicName:"name",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},placeholder:{classPropertyName:"placeholder",publicName:"placeholder",isSignal:!0,isRequired:!1,transformFunction:null},countryCode:{classPropertyName:"countryCode",publicName:"countryCode",isSignal:!0,isRequired:!1,transformFunction:null},disabledInput:{classPropertyName:"disabledInput",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null},required:{classPropertyName:"required",publicName:"required",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"invalid",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{value:"valueChange"},host:{properties:{"attr.data-invalid":"invalid() || null","attr.data-valid":'checksumValid() ? "" : null'},classAttribute:"block w-full"},providers:[P(Xe)],ngImport:t,template:`
|
|
1293
1295
|
<div [class]="groupClasses()" dir="ltr">
|
|
1294
1296
|
<span class="dga-iban-prefix" aria-hidden="true">{{ prefix() }}</span>
|
|
1295
1297
|
<input
|
|
@@ -1333,7 +1335,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
1333
1335
|
(blur)="onTouched()"
|
|
1334
1336
|
/>
|
|
1335
1337
|
</div>
|
|
1336
|
-
`,changeDetection:h.OnPush,host:{class:"block w-full","[attr.data-invalid]":"invalid() || null","[attr.data-valid]":'checksumValid() ? "" : null'},providers:[P(Xe)],styles:[":host .dga-iban-prefix{flex:0 0 auto;padding-inline:var(--spacing-md, .5rem) 0;font-weight:600;letter-spacing:.04em;color:var(--color-fg-muted, var(--color-muted, #6b7280));-webkit-user-select:none;user-select:none}:host .dga-iban-field{flex:1 1 auto;min-width:0;border:0;background:transparent;padding-inline:var(--spacing-sm, .375rem) var(--spacing-lg, .75rem);padding-block:0;font:inherit;letter-spacing:.04em;color:inherit;outline:none}:host .dga-iban-field::placeholder{color:var(--color-muted, #9ca3af);letter-spacing:normal}\n"]}]}],propDecorators:{value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]},{type:t.Output,args:["valueChange"]}],controlId:[{type:t.Input,args:[{isSignal:!0,alias:"controlId",required:!1}]}],name:[{type:t.Input,args:[{isSignal:!0,alias:"name",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],placeholder:[{type:t.Input,args:[{isSignal:!0,alias:"placeholder",required:!1}]}],countryCode:[{type:t.Input,args:[{isSignal:!0,alias:"countryCode",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],required:[{type:t.Input,args:[{isSignal:!0,alias:"required",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"invalid",required:!1}]}]}});function lt(d){return d.replace(/\D/g,"").slice(0,10)}function
|
|
1338
|
+
`,changeDetection:h.OnPush,host:{class:"block w-full","[attr.data-invalid]":"invalid() || null","[attr.data-valid]":'checksumValid() ? "" : null'},providers:[P(Xe)],styles:[":host .dga-iban-prefix{flex:0 0 auto;padding-inline:var(--spacing-md, .5rem) 0;font-weight:600;letter-spacing:.04em;color:var(--color-fg-muted, var(--color-muted, #6b7280));-webkit-user-select:none;user-select:none}:host .dga-iban-field{flex:1 1 auto;min-width:0;border:0;background:transparent;padding-inline:var(--spacing-sm, .375rem) var(--spacing-lg, .75rem);padding-block:0;font:inherit;letter-spacing:.04em;color:inherit;outline:none}:host .dga-iban-field::placeholder{color:var(--color-muted, #9ca3af);letter-spacing:normal}\n"]}]}],propDecorators:{value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]},{type:t.Output,args:["valueChange"]}],controlId:[{type:t.Input,args:[{isSignal:!0,alias:"controlId",required:!1}]}],name:[{type:t.Input,args:[{isSignal:!0,alias:"name",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],placeholder:[{type:t.Input,args:[{isSignal:!0,alias:"placeholder",required:!1}]}],countryCode:[{type:t.Input,args:[{isSignal:!0,alias:"countryCode",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],required:[{type:t.Input,args:[{isSignal:!0,alias:"required",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"invalid",required:!1}]}]}});function lt(d){return d.replace(/\D/g,"").slice(0,10)}function Ps(d){const e=lt(d);return e.startsWith("1")?"citizen":e.startsWith("2")?"resident":"unknown"}function zs(d){const e=lt(d);if(!/^[12]\d{9}$/.test(e))return!1;let a=0;for(let s=0;s<10;s++){let r=Number(e[s]);s%2===0&&(r*=2,r>9&&(r=Math.floor(r/10)+r%10)),a+=r}return a%10===0}function Fs(d){const e=lt(d);if(e.length<=1)return e;const a=[e.slice(0,1)];for(let s=1;s<e.length;s+=3)a.push(e.slice(s,s+3));return a.join(" ")}class Ze{value=S("",...ngDevMode?[{debugName:"value"}]:[]);controlId=i("",...ngDevMode?[{debugName:"controlId"}]:[]);name=i("nationalId",...ngDevMode?[{debugName:"name"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);placeholder=i("1 234 567 890",...ngDevMode?[{debugName:"placeholder"}]:[]);disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);required=i(!1,{...ngDevMode?{debugName:"required"}:{},transform:m});invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},transform:m});kind=n(()=>Ps(this.value()),...ngDevMode?[{debugName:"kind"}]:[]);checksumValid=n(()=>zs(this.value()),...ngDevMode?[{debugName:"checksumValid"}]:[]);displayValue=n(()=>Fs(this.value()),...ngDevMode?[{debugName:"displayValue"}]:[]);resolvedStatus=n(()=>X(this.invalid()),...ngDevMode?[{debugName:"resolvedStatus"}]:[]);groupClasses=n(()=>f("dga-nid-group flex w-full items-center border bg-surface text-fg","min-h-5xl rounded-md transition-[border-color,box-shadow,background-color] duration-200","font-mono text-body-md",Z(this.resolvedStatus()),ie(this.resolvedStatus()),this.disabled()&&"pointer-events-none border-border-disabled bg-disabled opacity-70",!this.disabled()&&"hover:border-border-primary-light"),...ngDevMode?[{debugName:"groupClasses"}]:[]);onChange=()=>{};onTouched=()=>{};onInput(e){const a=lt(e);this.value.set(a),this.onChange(a)}writeValue(e){this.value.set(lt(e??""))}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.cvaDisabled.set(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ze,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.1.0",version:"22.1.5",type:Ze,isStandalone:!0,selector:"dga-national-id",inputs:{value:{classPropertyName:"value",publicName:"value",isSignal:!0,isRequired:!1,transformFunction:null},controlId:{classPropertyName:"controlId",publicName:"controlId",isSignal:!0,isRequired:!1,transformFunction:null},name:{classPropertyName:"name",publicName:"name",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},placeholder:{classPropertyName:"placeholder",publicName:"placeholder",isSignal:!0,isRequired:!1,transformFunction:null},disabledInput:{classPropertyName:"disabledInput",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null},required:{classPropertyName:"required",publicName:"required",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"invalid",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{value:"valueChange"},host:{properties:{"attr.data-invalid":"invalid() || null","attr.data-kind":"kind()","attr.data-valid":'checksumValid() ? "" : null'},classAttribute:"block w-full"},providers:[P(Ze)],ngImport:t,template:`
|
|
1337
1339
|
<div [class]="groupClasses()" dir="ltr">
|
|
1338
1340
|
<input
|
|
1339
1341
|
class="dga-nid-field"
|
|
@@ -1375,7 +1377,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
1375
1377
|
(blur)="onTouched()"
|
|
1376
1378
|
/>
|
|
1377
1379
|
</div>
|
|
1378
|
-
`,changeDetection:h.OnPush,host:{class:"block w-full","[attr.data-invalid]":"invalid() || null","[attr.data-kind]":"kind()","[attr.data-valid]":'checksumValid() ? "" : null'},providers:[P(Ze)],styles:[":host .dga-nid-field{flex:1 1 auto;min-width:0;width:100%;border:0;background:transparent;padding-inline:var(--spacing-lg, .75rem);padding-block:0;font:inherit;letter-spacing:.06em;color:inherit;outline:none}:host .dga-nid-field::placeholder{color:var(--color-muted, #9ca3af);letter-spacing:normal}\n"]}]}],propDecorators:{value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]},{type:t.Output,args:["valueChange"]}],controlId:[{type:t.Input,args:[{isSignal:!0,alias:"controlId",required:!1}]}],name:[{type:t.Input,args:[{isSignal:!0,alias:"name",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],placeholder:[{type:t.Input,args:[{isSignal:!0,alias:"placeholder",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],required:[{type:t.Input,args:[{isSignal:!0,alias:"required",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"invalid",required:!1}]}]}});function
|
|
1380
|
+
`,changeDetection:h.OnPush,host:{class:"block w-full","[attr.data-invalid]":"invalid() || null","[attr.data-kind]":"kind()","[attr.data-valid]":'checksumValid() ? "" : null'},providers:[P(Ze)],styles:[":host .dga-nid-field{flex:1 1 auto;min-width:0;width:100%;border:0;background:transparent;padding-inline:var(--spacing-lg, .75rem);padding-block:0;font:inherit;letter-spacing:.06em;color:inherit;outline:none}:host .dga-nid-field::placeholder{color:var(--color-muted, #9ca3af);letter-spacing:normal}\n"]}]}],propDecorators:{value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]},{type:t.Output,args:["valueChange"]}],controlId:[{type:t.Input,args:[{isSignal:!0,alias:"controlId",required:!1}]}],name:[{type:t.Input,args:[{isSignal:!0,alias:"name",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],placeholder:[{type:t.Input,args:[{isSignal:!0,alias:"placeholder",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],required:[{type:t.Input,args:[{isSignal:!0,alias:"required",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"invalid",required:!1}]}]}});function Rs(d){const e=d??"",a={length:e.length>=8,lower:/[a-z]/.test(e),upper:/[A-Z]/.test(e),digit:/\d/.test(e),special:/[^A-Za-z0-9]/.test(e)};if(!e)return{level:"empty",score:0,checks:a};let s=0;return a.length&&(s+=1),e.length>=12&&(s+=1),a.lower&&a.upper&&(s+=1),a.digit&&(s+=1),a.special&&(s+=1),s=Math.min(4,s),{level:s<=1?"weak":s===2?"fair":s===3?"good":"strong",score:s,checks:a}}class Je{meterSegments=[0,1,2,3];value=S("",...ngDevMode?[{debugName:"value"}]:[]);controlId=i("",...ngDevMode?[{debugName:"controlId"}]:[]);name=i("password",...ngDevMode?[{debugName:"name"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);placeholder=i("",...ngDevMode?[{debugName:"placeholder"}]:[]);meter=i(!1,{...ngDevMode?{debugName:"meter"}:{},transform:m});disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);required=i(!1,{...ngDevMode?{debugName:"required"}:{},transform:m});invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},transform:m});revealed=y(!1,...ngDevMode?[{debugName:"revealed"}]:[]);strength=n(()=>Rs(this.value()),...ngDevMode?[{debugName:"strength"}]:[]);meterId=n(()=>{const e=this.controlId();return e?`${e}-strength`:"dga-password-strength"},...ngDevMode?[{debugName:"meterId"}]:[]);resolvedStatus=n(()=>X(this.invalid()),...ngDevMode?[{debugName:"resolvedStatus"}]:[]);groupClasses=n(()=>f("dga-password-group flex w-full items-center border bg-surface text-fg","min-h-5xl rounded-md transition-[border-color,box-shadow,background-color] duration-200","text-body-md",Z(this.resolvedStatus()),ie(this.resolvedStatus()),this.disabled()&&"pointer-events-none border-border-disabled bg-disabled opacity-70",!this.disabled()&&"hover:border-border-primary-light"),...ngDevMode?[{debugName:"groupClasses"}]:[]);onChange=()=>{};onTouched=()=>{};toggleLabel(){const e=q();return this.revealed()?e?"إخفاء كلمة المرور":"Hide password":e?"إظهار كلمة المرور":"Show password"}strengthLabel(){const e=q();switch(this.strength().level){case"empty":return e?"أدخل كلمة مرور":"Enter a password";case"weak":return e?"ضعيفة":"Weak";case"fair":return e?"مقبولة":"Fair";case"good":return e?"جيدة":"Good";case"strong":return e?"قوية":"Strong"}}toggleReveal(){this.revealed.update(e=>!e)}onInput(e){this.value.set(e),this.onChange(e)}writeValue(e){this.value.set(e??"")}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.cvaDisabled.set(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Je,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Je,isStandalone:!0,selector:"dga-password",inputs:{value:{classPropertyName:"value",publicName:"value",isSignal:!0,isRequired:!1,transformFunction:null},controlId:{classPropertyName:"controlId",publicName:"controlId",isSignal:!0,isRequired:!1,transformFunction:null},name:{classPropertyName:"name",publicName:"name",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},placeholder:{classPropertyName:"placeholder",publicName:"placeholder",isSignal:!0,isRequired:!1,transformFunction:null},meter:{classPropertyName:"meter",publicName:"meter",isSignal:!0,isRequired:!1,transformFunction:null},disabledInput:{classPropertyName:"disabledInput",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null},required:{classPropertyName:"required",publicName:"required",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"invalid",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{value:"valueChange"},host:{properties:{"attr.data-invalid":"invalid() || null","attr.data-strength":"meter() ? strength().level : null"},classAttribute:"block w-full"},providers:[P(Je)],ngImport:t,template:`
|
|
1379
1381
|
<div [class]="groupClasses()">
|
|
1380
1382
|
<input
|
|
1381
1383
|
class="dga-password-field"
|
|
@@ -1475,31 +1477,36 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
1475
1477
|
<p class="dga-password-meter__label">{{ strengthLabel() }}</p>
|
|
1476
1478
|
</div>
|
|
1477
1479
|
}
|
|
1478
|
-
`,changeDetection:h.OnPush,host:{class:"block w-full","[attr.data-invalid]":"invalid() || null","[attr.data-strength]":"meter() ? strength().level : null"},providers:[P(Je)],styles:[":host .dga-password-field{flex:1 1 auto;min-width:0;border:0;background:transparent;padding-inline:var(--spacing-lg, .75rem) var(--spacing-sm, .375rem);padding-block:0;font:inherit;color:inherit;outline:none}:host .dga-password-field::placeholder{color:var(--color-muted, #9ca3af)}:host .dga-password-toggle{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;margin-inline-end:var(--spacing-xs, .25rem);width:var(--spacing-5xl, 2.5rem);height:var(--spacing-5xl, 2.5rem);border:0;border-radius:var(--radius-sm, .25rem);background:transparent;color:var(--color-fg-muted, var(--color-muted, #6b7280));cursor:pointer}:host .dga-password-toggle:hover:not(:disabled){color:var(--color-fg, #161616);background:var(--color-primary-light, rgba(0, 108, 53, .08))}:host .dga-password-toggle:focus-visible{outline:2px solid var(--color-focus, #2563eb);outline-offset:1px}:host .dga-password-toggle:disabled{opacity:.5;cursor:not-allowed}:host .dga-password-meter{margin-block-start:var(--spacing-sm, .375rem);display:flex;flex-direction:column;gap:var(--spacing-xs, .25rem)}:host .dga-password-meter__track{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--spacing-xxs, .125rem)}:host .dga-password-meter__seg{height:.25rem;border-radius:999px;background:var(--color-border, #d2d6db)}:host .dga-password-meter__seg--on{background:var(--color-border-error, #b42318)}:host[data-strength=fair] .dga-password-meter__seg--on{background:var(--color-border-warning, #dc6803)}:host[data-strength=good] .dga-password-meter__seg--on{background:var(--color-border-info, #175cd3)}:host[data-strength=strong] .dga-password-meter__seg--on{background:var(--color-border-success, #079455)}:host .dga-password-meter__label{margin:0;font-size:var(--text-body-xs, .75rem);color:var(--color-paragraph, #4b5563)}\n"]}]}],propDecorators:{value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]},{type:t.Output,args:["valueChange"]}],controlId:[{type:t.Input,args:[{isSignal:!0,alias:"controlId",required:!1}]}],name:[{type:t.Input,args:[{isSignal:!0,alias:"name",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],placeholder:[{type:t.Input,args:[{isSignal:!0,alias:"placeholder",required:!1}]}],meter:[{type:t.Input,args:[{isSignal:!0,alias:"meter",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],required:[{type:t.Input,args:[{isSignal:!0,alias:"required",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"invalid",required:!1}]}]}});class Qe{filesInput=i([],{...ngDevMode?{debugName:"filesInput"}:{},alias:"files"});files=_e(this.filesInput,...ngDevMode?[{debugName:"files"}]:[]);accept=i("",...ngDevMode?[{debugName:"accept"}]:[]);multiple=i(!0,{...ngDevMode?{debugName:"multiple"}:{},transform:m});appearance=i("zone",...ngDevMode?[{debugName:"appearance"}]:[]);hint=i("اسحب الملفات هنا أو اختر من جهازك",...ngDevMode?[{debugName:"hint"}]:[]);browseLabel=i("اختيار ملفات",...ngDevMode?[{debugName:"browseLabel"}]:[]);removeLabel=i("إزالة",...ngDevMode?[{debugName:"removeLabel"}]:[]);disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);maxSize=i(0,...ngDevMode?[{debugName:"maxSize"}]:[]);maxFiles=i(0,...ngDevMode?[{debugName:"maxFiles"}]:[]);filesChange=w();rejected=w();dragging=S(!1,...ngDevMode?[{debugName:"dragging"}]:[]);onChange=()=>{};onTouched=()=>{};zoneClasses=n(()=>f("flex flex-col items-center justify-center gap-md rounded-lg border border-dashed px-xl py-3xl text-center transition-colors",this.dragging()?"border-border-primary bg-primary-faint":"border-border bg-surface",this.disabled()&&"pointer-events-none opacity-60"),...ngDevMode?[{debugName:"zoneClasses"}]:[]);onDragOver(e){e.preventDefault(),this.disabled()||this.dragging.set(!0)}onDrop(e){if(e.preventDefault(),this.dragging.set(!1),this.disabled())return;const a=e.dataTransfer?.files;a?.length&&this.addFiles(Array.from(a))}onPick(e){const a=e.target;a.files?.length&&this.addFiles(Array.from(a.files)),a.value=""}remove(e){const a=this.files().filter(s=>s.id!==e);this.commit(a)}formatSize(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}addFiles(e){const a=this.maxSize(),s=this.accept().trim(),r=[],l=[];for(const c of e){if(s&&!this.matchesAccept(c,s)){r.push({file:c,reason:"accept"});continue}if(a>0&&c.size>a){r.push({file:c,reason:"maxSize"});continue}l.push(c)}const u=l.map(c=>({id:`${c.name}-${c.size}-${c.lastModified}-${Math.random().toString(36).slice(2,8)}`,name:c.name,size:c.size,file:c}));let o;if(this.multiple()){const c=this.maxFiles(),p=[...this.files(),...u];if(c>0&&p.length>c){const g=p.slice(0,c),b=u.slice(Math.max(0,c-this.files().length));for(const N of b)N.file&&r.push({file:N.file,reason:"maxFiles"});o=g}else o=p}else{o=u.slice(0,1);for(const c of l.slice(1))r.push({file:c,reason:"maxFiles"})}r.length&&this.rejected.emit(r),this.commit(o)}matchesAccept(e,a){const s=a.split(",").map(o=>o.trim().toLowerCase()).filter(Boolean);if(!s.length)return!0;const r=e.name.toLowerCase(),l=(e.type||"").toLowerCase(),u=r.includes(".")?`.${r.split(".").pop()}`:"";return s.some(o=>{if(o==="*/*")return!0;if(o.endsWith("/*")){const c=o.slice(0,-1);return l.startsWith(c)}return o.startsWith(".")?u===o:l===o})}commit(e){this.files.set(e),this.filesChange.emit(e),this.onChange(e),this.onTouched()}writeValue(e){this.files.set(e??[])}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.cvaDisabled.set(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Qe,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Qe,isStandalone:!0,selector:"dga-upload",inputs:{filesInput:{classPropertyName:"filesInput",publicName:"files",isSignal:!0,isRequired:!1,transformFunction:null},accept:{classPropertyName:"accept",publicName:"accept",isSignal:!0,isRequired:!1,transformFunction:null},multiple:{classPropertyName:"multiple",publicName:"multiple",isSignal:!0,isRequired:!1,transformFunction:null},appearance:{classPropertyName:"appearance",publicName:"appearance",isSignal:!0,isRequired:!1,transformFunction:null},hint:{classPropertyName:"hint",publicName:"hint",isSignal:!0,isRequired:!1,transformFunction:null},browseLabel:{classPropertyName:"browseLabel",publicName:"browseLabel",isSignal:!0,isRequired:!1,transformFunction:null},removeLabel:{classPropertyName:"removeLabel",publicName:"removeLabel",isSignal:!0,isRequired:!1,transformFunction:null},disabledInput:{classPropertyName:"disabledInput",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null},maxSize:{classPropertyName:"maxSize",publicName:"maxSize",isSignal:!0,isRequired:!1,transformFunction:null},maxFiles:{classPropertyName:"maxFiles",publicName:"maxFiles",isSignal:!0,isRequired:!1,transformFunction:null},dragging:{classPropertyName:"dragging",publicName:"dragging",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{filesChange:"filesChange",rejected:"rejected",dragging:"draggingChange"},host:{properties:{"attr.data-appearance":"appearance()"},classAttribute:"relative block w-full"},providers:[P(Qe)],ngImport:t,template:`
|
|
1480
|
+
`,changeDetection:h.OnPush,host:{class:"block w-full","[attr.data-invalid]":"invalid() || null","[attr.data-strength]":"meter() ? strength().level : null"},providers:[P(Je)],styles:[":host .dga-password-field{flex:1 1 auto;min-width:0;border:0;background:transparent;padding-inline:var(--spacing-lg, .75rem) var(--spacing-sm, .375rem);padding-block:0;font:inherit;color:inherit;outline:none}:host .dga-password-field::placeholder{color:var(--color-muted, #9ca3af)}:host .dga-password-toggle{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;margin-inline-end:var(--spacing-xs, .25rem);width:var(--spacing-5xl, 2.5rem);height:var(--spacing-5xl, 2.5rem);border:0;border-radius:var(--radius-sm, .25rem);background:transparent;color:var(--color-fg-muted, var(--color-muted, #6b7280));cursor:pointer}:host .dga-password-toggle:hover:not(:disabled){color:var(--color-fg, #161616);background:var(--color-primary-light, rgba(0, 108, 53, .08))}:host .dga-password-toggle:focus-visible{outline:2px solid var(--color-focus, #2563eb);outline-offset:1px}:host .dga-password-toggle:disabled{opacity:.5;cursor:not-allowed}:host .dga-password-meter{margin-block-start:var(--spacing-sm, .375rem);display:flex;flex-direction:column;gap:var(--spacing-xs, .25rem)}:host .dga-password-meter__track{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--spacing-xxs, .125rem)}:host .dga-password-meter__seg{height:.25rem;border-radius:999px;background:var(--color-border, #d2d6db)}:host .dga-password-meter__seg--on{background:var(--color-border-error, #b42318)}:host[data-strength=fair] .dga-password-meter__seg--on{background:var(--color-border-warning, #dc6803)}:host[data-strength=good] .dga-password-meter__seg--on{background:var(--color-border-info, #175cd3)}:host[data-strength=strong] .dga-password-meter__seg--on{background:var(--color-border-success, #079455)}:host .dga-password-meter__label{margin:0;font-size:var(--text-body-xs, .75rem);color:var(--color-paragraph, #4b5563)}\n"]}]}],propDecorators:{value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]},{type:t.Output,args:["valueChange"]}],controlId:[{type:t.Input,args:[{isSignal:!0,alias:"controlId",required:!1}]}],name:[{type:t.Input,args:[{isSignal:!0,alias:"name",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],placeholder:[{type:t.Input,args:[{isSignal:!0,alias:"placeholder",required:!1}]}],meter:[{type:t.Input,args:[{isSignal:!0,alias:"meter",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],required:[{type:t.Input,args:[{isSignal:!0,alias:"required",required:!1}]}],invalid:[{type:t.Input,args:[{isSignal:!0,alias:"invalid",required:!1}]}]}});class Qe{localeService=x(hs,{optional:!0});filesInput=i([],{...ngDevMode?{debugName:"filesInput"}:{},alias:"files"});files=_e(this.filesInput,...ngDevMode?[{debugName:"files"}]:[]);accept=i("",...ngDevMode?[{debugName:"accept"}]:[]);multiple=i(!0,{...ngDevMode?{debugName:"multiple"}:{},transform:m});appearance=i("zone",...ngDevMode?[{debugName:"appearance"}]:[]);hint=i("اسحب الملفات هنا أو اختر من جهازك",...ngDevMode?[{debugName:"hint"}]:[]);browseLabel=i("اختيار ملفات",...ngDevMode?[{debugName:"browseLabel"}]:[]);removeLabel=i("إزالة",...ngDevMode?[{debugName:"removeLabel"}]:[]);disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);maxSize=i(0,...ngDevMode?[{debugName:"maxSize"}]:[]);maxFiles=i(0,...ngDevMode?[{debugName:"maxFiles"}]:[]);constraints=i("",...ngDevMode?[{debugName:"constraints"}]:[]);filesChange=w();rejected=w();dragging=S(!1,...ngDevMode?[{debugName:"dragging"}]:[]);onChange=()=>{};onTouched=()=>{};zoneClasses=n(()=>f("flex flex-col items-center justify-center gap-md rounded-lg border border-dashed px-xl py-3xl text-center transition-colors",this.dragging()?"border-border-primary bg-primary-faint":"border-border bg-surface",this.disabled()&&"pointer-events-none opacity-60"),...ngDevMode?[{debugName:"zoneClasses"}]:[]);constraintsText=n(()=>{const e=this.constraints().trim();if(e)return e;const a=[],s=this.accept().trim();s&&a.push(s);const r=this.maxSize();if(r>0){const u=this.formatMaxSizeCompact(r);a.push(this.isArabic()?`حجم الملف الأقصى هو : ${u}`:`Maximum file size is : ${u}`)}const l=this.maxFiles();return l>0&&a.push(this.isArabic()?`الحد الأقصى للملفات هو : ${l}`:`Maximum number of files is : ${l}`),a.length?a.join(" | "):""},...ngDevMode?[{debugName:"constraintsText"}]:[]);onDragOver(e){e.preventDefault(),this.disabled()||this.dragging.set(!0)}onDrop(e){if(e.preventDefault(),this.dragging.set(!1),this.disabled())return;const a=e.dataTransfer?.files;a?.length&&this.addFiles(Array.from(a))}onPick(e){const a=e.target;a.files?.length&&this.addFiles(Array.from(a.files)),a.value=""}remove(e){const a=this.files().filter(s=>s.id!==e);this.commit(a)}formatSize(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}formatMaxSizeCompact(e){if(e<=0)return"";const a=e/(1024*1024);if(a>=1)return`${Number.isInteger(a)?String(a):a.toFixed(1).replace(/\.0$/,"")}MB`;const s=e/1024;return s>=1?`${Number.isInteger(s)?String(s):s.toFixed(1).replace(/\.0$/,"")}KB`:`${e}B`}isArabic(){const e=this.localeService?.localeChanges()?.toLowerCase();return e?e.startsWith("ar"):typeof document>"u"?!0:(document.documentElement.lang||"ar").toLowerCase().startsWith("ar")}addFiles(e){const a=this.maxSize(),s=this.accept().trim(),r=[],l=[];for(const c of e){if(s&&!this.matchesAccept(c,s)){r.push({file:c,reason:"accept"});continue}if(a>0&&c.size>a){r.push({file:c,reason:"maxSize"});continue}l.push(c)}const u=l.map(c=>({id:`${c.name}-${c.size}-${c.lastModified}-${Math.random().toString(36).slice(2,8)}`,name:c.name,size:c.size,file:c}));let o;if(this.multiple()){const c=this.maxFiles(),p=[...this.files(),...u];if(c>0&&p.length>c){const g=p.slice(0,c),b=u.slice(Math.max(0,c-this.files().length));for(const N of b)N.file&&r.push({file:N.file,reason:"maxFiles"});o=g}else o=p}else{o=u.slice(0,1);for(const c of l.slice(1))r.push({file:c,reason:"maxFiles"})}r.length&&this.rejected.emit(r),this.commit(o)}matchesAccept(e,a){const s=a.split(",").map(o=>o.trim().toLowerCase()).filter(Boolean);if(!s.length)return!0;const r=e.name.toLowerCase(),l=(e.type||"").toLowerCase(),u=r.includes(".")?`.${r.split(".").pop()}`:"";return s.some(o=>{if(o==="*/*")return!0;if(o.endsWith("/*")){const c=o.slice(0,-1);return l.startsWith(c)}return o.startsWith(".")?u===o:l===o})}commit(e){this.files.set(e),this.filesChange.emit(e),this.onChange(e),this.onTouched()}writeValue(e){this.files.set(e??[])}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.cvaDisabled.set(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Qe,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Qe,isStandalone:!0,selector:"dga-upload",inputs:{filesInput:{classPropertyName:"filesInput",publicName:"files",isSignal:!0,isRequired:!1,transformFunction:null},accept:{classPropertyName:"accept",publicName:"accept",isSignal:!0,isRequired:!1,transformFunction:null},multiple:{classPropertyName:"multiple",publicName:"multiple",isSignal:!0,isRequired:!1,transformFunction:null},appearance:{classPropertyName:"appearance",publicName:"appearance",isSignal:!0,isRequired:!1,transformFunction:null},hint:{classPropertyName:"hint",publicName:"hint",isSignal:!0,isRequired:!1,transformFunction:null},browseLabel:{classPropertyName:"browseLabel",publicName:"browseLabel",isSignal:!0,isRequired:!1,transformFunction:null},removeLabel:{classPropertyName:"removeLabel",publicName:"removeLabel",isSignal:!0,isRequired:!1,transformFunction:null},disabledInput:{classPropertyName:"disabledInput",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null},maxSize:{classPropertyName:"maxSize",publicName:"maxSize",isSignal:!0,isRequired:!1,transformFunction:null},maxFiles:{classPropertyName:"maxFiles",publicName:"maxFiles",isSignal:!0,isRequired:!1,transformFunction:null},constraints:{classPropertyName:"constraints",publicName:"constraints",isSignal:!0,isRequired:!1,transformFunction:null},dragging:{classPropertyName:"dragging",publicName:"dragging",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{filesChange:"filesChange",rejected:"rejected",dragging:"draggingChange"},host:{properties:{"attr.data-appearance":"appearance()"},classAttribute:"relative block w-full"},providers:[P(Qe)],ngImport:t,template:`
|
|
1479
1481
|
@if (appearance() === 'browse') {
|
|
1480
|
-
<div class="flex flex-
|
|
1481
|
-
<
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1482
|
+
<div class="flex flex-col gap-sm">
|
|
1483
|
+
<div class="flex flex-wrap items-center gap-md">
|
|
1484
|
+
<button
|
|
1485
|
+
type="button"
|
|
1486
|
+
class="inline-flex h-5xl cursor-pointer items-center gap-sm rounded-sm border
|
|
1487
|
+
border-border bg-neutral-light px-xl text-body-md font-medium text-fg
|
|
1488
|
+
hover:bg-sunken
|
|
1489
|
+
focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2
|
|
1490
|
+
focus-visible:outline-focus disabled:cursor-not-allowed disabled:opacity-50"
|
|
1491
|
+
[disabled]="disabled()"
|
|
1492
|
+
(click)="fileInput.click()"
|
|
1493
|
+
>
|
|
1494
|
+
<dga-icon name="folder" size="md" tone="current" />
|
|
1495
|
+
{{ browseLabel() }}
|
|
1496
|
+
</button>
|
|
1497
|
+
<input
|
|
1498
|
+
#fileInput
|
|
1499
|
+
type="file"
|
|
1500
|
+
class="sr-only"
|
|
1501
|
+
[attr.accept]="accept() || null"
|
|
1502
|
+
[multiple]="multiple()"
|
|
1503
|
+
[disabled]="disabled()"
|
|
1504
|
+
(change)="onPick($event)"
|
|
1505
|
+
/>
|
|
1506
|
+
</div>
|
|
1507
|
+
@if (constraintsText(); as constraints) {
|
|
1508
|
+
<p class="text-body-xs text-muted">{{ constraints }}</p>
|
|
1509
|
+
}
|
|
1503
1510
|
</div>
|
|
1504
1511
|
} @else {
|
|
1505
1512
|
<div
|
|
@@ -1528,6 +1535,9 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
1528
1535
|
[disabled]="disabled()"
|
|
1529
1536
|
(change)="onPick($event)"
|
|
1530
1537
|
/>
|
|
1538
|
+
@if (constraintsText(); as constraints) {
|
|
1539
|
+
<p class="text-body-xs text-muted">{{ constraints }}</p>
|
|
1540
|
+
}
|
|
1531
1541
|
</div>
|
|
1532
1542
|
}
|
|
1533
1543
|
|
|
@@ -1558,29 +1568,34 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
1558
1568
|
}
|
|
1559
1569
|
`,isInline:!0,dependencies:[{kind:"component",type:k,selector:"dga-icon",inputs:["name","glyph","size","tone","label"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Qe,decorators:[{type:v,args:[{selector:"dga-upload",standalone:!0,imports:[k],template:`
|
|
1560
1570
|
@if (appearance() === 'browse') {
|
|
1561
|
-
<div class="flex flex-
|
|
1562
|
-
<
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1571
|
+
<div class="flex flex-col gap-sm">
|
|
1572
|
+
<div class="flex flex-wrap items-center gap-md">
|
|
1573
|
+
<button
|
|
1574
|
+
type="button"
|
|
1575
|
+
class="inline-flex h-5xl cursor-pointer items-center gap-sm rounded-sm border
|
|
1576
|
+
border-border bg-neutral-light px-xl text-body-md font-medium text-fg
|
|
1577
|
+
hover:bg-sunken
|
|
1578
|
+
focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2
|
|
1579
|
+
focus-visible:outline-focus disabled:cursor-not-allowed disabled:opacity-50"
|
|
1580
|
+
[disabled]="disabled()"
|
|
1581
|
+
(click)="fileInput.click()"
|
|
1582
|
+
>
|
|
1583
|
+
<dga-icon name="folder" size="md" tone="current" />
|
|
1584
|
+
{{ browseLabel() }}
|
|
1585
|
+
</button>
|
|
1586
|
+
<input
|
|
1587
|
+
#fileInput
|
|
1588
|
+
type="file"
|
|
1589
|
+
class="sr-only"
|
|
1590
|
+
[attr.accept]="accept() || null"
|
|
1591
|
+
[multiple]="multiple()"
|
|
1592
|
+
[disabled]="disabled()"
|
|
1593
|
+
(change)="onPick($event)"
|
|
1594
|
+
/>
|
|
1595
|
+
</div>
|
|
1596
|
+
@if (constraintsText(); as constraints) {
|
|
1597
|
+
<p class="text-body-xs text-muted">{{ constraints }}</p>
|
|
1598
|
+
}
|
|
1584
1599
|
</div>
|
|
1585
1600
|
} @else {
|
|
1586
1601
|
<div
|
|
@@ -1609,6 +1624,9 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
1609
1624
|
[disabled]="disabled()"
|
|
1610
1625
|
(change)="onPick($event)"
|
|
1611
1626
|
/>
|
|
1627
|
+
@if (constraintsText(); as constraints) {
|
|
1628
|
+
<p class="text-body-xs text-muted">{{ constraints }}</p>
|
|
1629
|
+
}
|
|
1612
1630
|
</div>
|
|
1613
1631
|
}
|
|
1614
1632
|
|
|
@@ -1637,7 +1655,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
1637
1655
|
}
|
|
1638
1656
|
</ul>
|
|
1639
1657
|
}
|
|
1640
|
-
`,changeDetection:h.OnPush,host:{class:"relative block w-full","[attr.data-appearance]":"appearance()"},providers:[P(Qe)]}]}],propDecorators:{filesInput:[{type:t.Input,args:[{isSignal:!0,alias:"files",required:!1}]}],accept:[{type:t.Input,args:[{isSignal:!0,alias:"accept",required:!1}]}],multiple:[{type:t.Input,args:[{isSignal:!0,alias:"multiple",required:!1}]}],appearance:[{type:t.Input,args:[{isSignal:!0,alias:"appearance",required:!1}]}],hint:[{type:t.Input,args:[{isSignal:!0,alias:"hint",required:!1}]}],browseLabel:[{type:t.Input,args:[{isSignal:!0,alias:"browseLabel",required:!1}]}],removeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"removeLabel",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],maxSize:[{type:t.Input,args:[{isSignal:!0,alias:"maxSize",required:!1}]}],maxFiles:[{type:t.Input,args:[{isSignal:!0,alias:"maxFiles",required:!1}]}],filesChange:[{type:t.Output,args:["filesChange"]}],rejected:[{type:t.Output,args:["rejected"]}],dragging:[{type:t.Input,args:[{isSignal:!0,alias:"dragging",required:!1}]},{type:t.Output,args:["draggingChange"]}]}});const
|
|
1658
|
+
`,changeDetection:h.OnPush,host:{class:"relative block w-full","[attr.data-appearance]":"appearance()"},providers:[P(Qe)]}]}],propDecorators:{filesInput:[{type:t.Input,args:[{isSignal:!0,alias:"files",required:!1}]}],accept:[{type:t.Input,args:[{isSignal:!0,alias:"accept",required:!1}]}],multiple:[{type:t.Input,args:[{isSignal:!0,alias:"multiple",required:!1}]}],appearance:[{type:t.Input,args:[{isSignal:!0,alias:"appearance",required:!1}]}],hint:[{type:t.Input,args:[{isSignal:!0,alias:"hint",required:!1}]}],browseLabel:[{type:t.Input,args:[{isSignal:!0,alias:"browseLabel",required:!1}]}],removeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"removeLabel",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],maxSize:[{type:t.Input,args:[{isSignal:!0,alias:"maxSize",required:!1}]}],maxFiles:[{type:t.Input,args:[{isSignal:!0,alias:"maxFiles",required:!1}]}],constraints:[{type:t.Input,args:[{isSignal:!0,alias:"constraints",required:!1}]}],filesChange:[{type:t.Output,args:["filesChange"]}],rejected:[{type:t.Output,args:["rejected"]}],dragging:[{type:t.Input,args:[{isSignal:!0,alias:"dragging",required:!1}]},{type:t.Output,args:["draggingChange"]}]}});const Ts=[{code:"+966",label:"+966",name:{en:"Saudi Arabia",ar:"المملكة العربية السعودية"}}];class et{countries=i([],...ngDevMode?[{debugName:"countries"}]:[]);locale=i("ar",...ngDevMode?[{debugName:"locale"}]:[]);countryCode=S("+966",...ngDevMode?[{debugName:"countryCode"}]:[]);nationalNumber=S("",...ngDevMode?[{debugName:"nationalNumber"}]:[]);controlId=i("",...ngDevMode?[{debugName:"controlId"}]:[]);name=i("phone",...ngDevMode?[{debugName:"name"}]:[]);placeholder=i("00 000 0000",...ngDevMode?[{debugName:"placeholder"}]:[]);autocomplete=i("tel-national",...ngDevMode?[{debugName:"autocomplete"}]:[]);codeLabel=i("Country code",...ngDevMode?[{debugName:"codeLabel"}]:[]);disabledInput=i(!1,{...ngDevMode?{debugName:"disabledInput"}:{},alias:"disabled",transform:m});cvaDisabled=y(!1,...ngDevMode?[{debugName:"cvaDisabled"}]:[]);disabled=n(()=>this.disabledInput()||this.cvaDisabled(),...ngDevMode?[{debugName:"disabled"}]:[]);required=i(!1,{...ngDevMode?{debugName:"required"}:{},transform:m});invalid=i(!1,{...ngDevMode?{debugName:"invalid"}:{},transform:m});value=S("",...ngDevMode?[{debugName:"value"}]:[]);resolvedCountries=n(()=>{const e=new Set,a=[];for(const s of[...Ts,...this.countries()])e.has(s.code)||(e.add(s.code),a.push(s));return a},...ngDevMode?[{debugName:"resolvedCountries"}]:[]);countryOptions=n(()=>{const e=this.locale();return this.resolvedCountries().map(a=>({value:a.code,label:a.label||a.code,keywords:xs(a.name,e)}))},...ngDevMode?[{debugName:"countryOptions"}]:[]);emptyLabel=n(()=>this.locale()==="ar"?"لا نتائج":"No results",...ngDevMode?[{debugName:"emptyLabel"}]:[]);resolvedStatus=n(()=>X(this.invalid()),...ngDevMode?[{debugName:"resolvedStatus"}]:[]);groupClasses=n(()=>f("dga-phone-group flex w-full items-stretch border bg-surface text-fg","min-h-5xl rounded-md transition-[border-color,box-shadow,background-color] duration-200",Z(this.resolvedStatus()),ie(this.resolvedStatus()),this.disabled()&&"pointer-events-none border-border-disabled bg-disabled opacity-70",!this.disabled()&&"hover:border-border-primary-light"),...ngDevMode?[{debugName:"groupClasses"}]:[]);onChange=()=>{};onTouched=()=>{};constructor(){M(()=>{const e=this.countryCode(),a=this.nationalNumber().replace(/\s+/g,""),s=a?`${e}${a}`:"";s!==this.value()&&(this.value.set(s),this.onChange(s))}),M(()=>{const e=this.parseValue(this.value());(e.code!==this.countryCode()||e.national!==this.nationalNumber())&&(this.countryCode.set(e.code),this.nationalNumber.set(e.national))})}onCountryCode(e){const a=Array.isArray(e)?e[0]??"":e;a&&this.countryCode.set(a)}writeValue(e){this.value.set(e??"")}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.cvaDisabled.set(e)}parseValue(e){const a=(e??"").trim();if(!a)return{code:this.countryCode(),national:""};const r=[...this.resolvedCountries()].sort((l,u)=>u.code.length-l.code.length).find(l=>a.startsWith(l.code));return r?{code:r.code,national:a.slice(r.code.length).trim()}:{code:this.countryCode(),national:a.replace(/^\+/,"")}}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:et,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.1.0",version:"22.1.5",type:et,isStandalone:!0,selector:"dga-phone-input",inputs:{countries:{classPropertyName:"countries",publicName:"countries",isSignal:!0,isRequired:!1,transformFunction:null},locale:{classPropertyName:"locale",publicName:"locale",isSignal:!0,isRequired:!1,transformFunction:null},countryCode:{classPropertyName:"countryCode",publicName:"countryCode",isSignal:!0,isRequired:!1,transformFunction:null},nationalNumber:{classPropertyName:"nationalNumber",publicName:"nationalNumber",isSignal:!0,isRequired:!1,transformFunction:null},controlId:{classPropertyName:"controlId",publicName:"controlId",isSignal:!0,isRequired:!1,transformFunction:null},name:{classPropertyName:"name",publicName:"name",isSignal:!0,isRequired:!1,transformFunction:null},placeholder:{classPropertyName:"placeholder",publicName:"placeholder",isSignal:!0,isRequired:!1,transformFunction:null},autocomplete:{classPropertyName:"autocomplete",publicName:"autocomplete",isSignal:!0,isRequired:!1,transformFunction:null},codeLabel:{classPropertyName:"codeLabel",publicName:"codeLabel",isSignal:!0,isRequired:!1,transformFunction:null},disabledInput:{classPropertyName:"disabledInput",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null},required:{classPropertyName:"required",publicName:"required",isSignal:!0,isRequired:!1,transformFunction:null},invalid:{classPropertyName:"invalid",publicName:"invalid",isSignal:!0,isRequired:!1,transformFunction:null},value:{classPropertyName:"value",publicName:"value",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{countryCode:"countryCodeChange",nationalNumber:"nationalNumberChange",value:"valueChange"},host:{properties:{"attr.data-invalid":"invalid() || null"},classAttribute:"block w-full"},providers:[P(et)],ngImport:t,template:`
|
|
1641
1659
|
<div [class]="groupClasses()" dir="ltr">
|
|
1642
1660
|
<dga-select
|
|
1643
1661
|
class="dga-phone-code"
|
|
@@ -1828,7 +1846,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
1828
1846
|
</select>
|
|
1829
1847
|
}
|
|
1830
1848
|
</div>
|
|
1831
|
-
`,isInline:!0,dependencies:[{kind:"directive",type:
|
|
1849
|
+
`,isInline:!0,dependencies:[{kind:"directive",type:Oe,selector:"select[dgaSelect]",inputs:["size","dgaInvalid","status"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:zt,decorators:[{type:v,args:[{selector:"dga-time-picker",standalone:!0,imports:[Oe],template:`
|
|
1832
1850
|
<div
|
|
1833
1851
|
class="inline-flex max-w-full flex-wrap items-center gap-sm"
|
|
1834
1852
|
role="group"
|
|
@@ -2005,7 +2023,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
2005
2023
|
}
|
|
2006
2024
|
</div>
|
|
2007
2025
|
</div>
|
|
2008
|
-
`,changeDetection:h.OnPush,host:{class:"block w-full"},providers:[P(tt)]}]}],ctorParameters:()=>[],propDecorators:{canvasRef:[{type:t.ViewChild,args:["canvas",{isSignal:!0}]}],width:[{type:t.Input,args:[{isSignal:!0,alias:"width",required:!1}]}],height:[{type:t.Input,args:[{isSignal:!0,alias:"height",required:!1}]}],penColor:[{type:t.Input,args:[{isSignal:!0,alias:"penColor",required:!1}]}],lineWidth:[{type:t.Input,args:[{isSignal:!0,alias:"lineWidth",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],clearLabel:[{type:t.Input,args:[{isSignal:!0,alias:"clearLabel",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]},{type:t.Output,args:["valueChange"]}]}});class Ft{destroyRef=x(L);editorRef=R("editor",...ngDevMode?[{debugName:"editorRef"}]:[]);linkInputRef=R("linkInput",...ngDevMode?[{debugName:"linkInputRef"}]:[]);value=S("",...ngDevMode?[{debugName:"value"}]:[]);placeholder=i("اكتب هنا…",...ngDevMode?[{debugName:"placeholder"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);minHeight=i(168,...ngDevMode?[{debugName:"minHeight"}]:[]);disabled=i(!1,{...ngDevMode?{debugName:"disabled"}:{},transform:m});uiLocale=$();ar=n(()=>this.uiLocale().startsWith("ar"),...ngDevMode?[{debugName:"ar"}]:[]);active=y(new Set,...ngDevMode?[{debugName:"active"}]:[]);block=y("p",...ngDevMode?[{debugName:"block"}]:[]);owned=null;range=null;empty=y(!0,...ngDevMode?[{debugName:"empty"}]:[]);linkOpen=y(!1,...ngDevMode?[{debugName:"linkOpen"}]:[]);linkUrl=y("",...ngDevMode?[{debugName:"linkUrl"}]:[]);labelId=`dga-rt-label-${++Dr}`;toolbarLabel=n(()=>this.ar()?"شريط التنسيق":"Formatting toolbar",...ngDevMode?[{debugName:"toolbarLabel"}]:[]);labels=n(()=>this.ar()?{bold:"عريض",italic:"مائل",underline:"تسطير",strike:"يتوسطه خط",h2:"عنوان",h3:"عنوان فرعي",ul:"قائمة نقطية",ol:"قائمة مرقّمة",quote:"اقتباس",alignStart:"محاذاة للبداية",alignCenter:"توسيط",alignEnd:"محاذاة للنهاية",link:"رابط",clear:"مسح التنسيق",linkUrl:"عنوان الرابط",apply:"إدراج",cancel:"إلغاء"}:{bold:"Bold",italic:"Italic",underline:"Underline",strike:"Strikethrough",h2:"Heading",h3:"Subheading",ul:"Bullet list",ol:"Numbered list",quote:"Quote",alignStart:"Align start",alignCenter:"Align center",alignEnd:"Align end",link:"Link",clear:"Clear formatting",linkUrl:"Link address",apply:"Insert",cancel:"Cancel"},...ngDevMode?[{debugName:"labels"}]:[]);tools=n(()=>{const e=this.labels(),a=(r,l,u=!1)=>({id:r,label:l,text:u,sep:!1}),s=r=>({id:r,label:"",text:!1,sep:!0});return[a("bold",e.bold),a("italic",e.italic),a("underline",e.underline),a("strike",e.strike),s("s1"),a("h2",e.h2,!0),a("h3",e.h3,!0),s("s2"),a("ul",e.ul),a("ol",e.ol),a("quote",e.quote),s("s3"),a("alignStart",e.alignStart),a("alignCenter",e.alignCenter),a("alignEnd",e.alignEnd),s("s4"),a("link",e.link),a("clear",e.clear)]},...ngDevMode?[{debugName:"tools"}]:[]);constructor(){const e=()=>{const a=this.editorEl(),s=document.getSelection();!a||!s?.anchorNode||!a.contains(s.anchorNode)||(this.captureRange(),this.refreshActive())};document.addEventListener("selectionchange",e),this.destroyRef.onDestroy(()=>document.removeEventListener("selectionchange",e)),M(()=>{const a=this.value(),s=this.editorRef()?.nativeElement;!s||a===this.owned||(s.innerHTML=a||"",this.owned=a,this.empty.set(
|
|
2026
|
+
`,changeDetection:h.OnPush,host:{class:"block w-full"},providers:[P(tt)]}]}],ctorParameters:()=>[],propDecorators:{canvasRef:[{type:t.ViewChild,args:["canvas",{isSignal:!0}]}],width:[{type:t.Input,args:[{isSignal:!0,alias:"width",required:!1}]}],height:[{type:t.Input,args:[{isSignal:!0,alias:"height",required:!1}]}],penColor:[{type:t.Input,args:[{isSignal:!0,alias:"penColor",required:!1}]}],lineWidth:[{type:t.Input,args:[{isSignal:!0,alias:"lineWidth",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],clearLabel:[{type:t.Input,args:[{isSignal:!0,alias:"clearLabel",required:!1}]}],disabledInput:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]},{type:t.Output,args:["valueChange"]}]}});class Ft{destroyRef=x(L);editorRef=R("editor",...ngDevMode?[{debugName:"editorRef"}]:[]);linkInputRef=R("linkInput",...ngDevMode?[{debugName:"linkInputRef"}]:[]);value=S("",...ngDevMode?[{debugName:"value"}]:[]);placeholder=i("اكتب هنا…",...ngDevMode?[{debugName:"placeholder"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);minHeight=i(168,...ngDevMode?[{debugName:"minHeight"}]:[]);disabled=i(!1,{...ngDevMode?{debugName:"disabled"}:{},transform:m});uiLocale=$();ar=n(()=>this.uiLocale().startsWith("ar"),...ngDevMode?[{debugName:"ar"}]:[]);active=y(new Set,...ngDevMode?[{debugName:"active"}]:[]);block=y("p",...ngDevMode?[{debugName:"block"}]:[]);owned=null;range=null;empty=y(!0,...ngDevMode?[{debugName:"empty"}]:[]);linkOpen=y(!1,...ngDevMode?[{debugName:"linkOpen"}]:[]);linkUrl=y("",...ngDevMode?[{debugName:"linkUrl"}]:[]);labelId=`dga-rt-label-${++Dr}`;toolbarLabel=n(()=>this.ar()?"شريط التنسيق":"Formatting toolbar",...ngDevMode?[{debugName:"toolbarLabel"}]:[]);labels=n(()=>this.ar()?{bold:"عريض",italic:"مائل",underline:"تسطير",strike:"يتوسطه خط",h2:"عنوان",h3:"عنوان فرعي",ul:"قائمة نقطية",ol:"قائمة مرقّمة",quote:"اقتباس",alignStart:"محاذاة للبداية",alignCenter:"توسيط",alignEnd:"محاذاة للنهاية",link:"رابط",clear:"مسح التنسيق",linkUrl:"عنوان الرابط",apply:"إدراج",cancel:"إلغاء"}:{bold:"Bold",italic:"Italic",underline:"Underline",strike:"Strikethrough",h2:"Heading",h3:"Subheading",ul:"Bullet list",ol:"Numbered list",quote:"Quote",alignStart:"Align start",alignCenter:"Align center",alignEnd:"Align end",link:"Link",clear:"Clear formatting",linkUrl:"Link address",apply:"Insert",cancel:"Cancel"},...ngDevMode?[{debugName:"labels"}]:[]);tools=n(()=>{const e=this.labels(),a=(r,l,u=!1)=>({id:r,label:l,text:u,sep:!1}),s=r=>({id:r,label:"",text:!1,sep:!0});return[a("bold",e.bold),a("italic",e.italic),a("underline",e.underline),a("strike",e.strike),s("s1"),a("h2",e.h2,!0),a("h3",e.h3,!0),s("s2"),a("ul",e.ul),a("ol",e.ol),a("quote",e.quote),s("s3"),a("alignStart",e.alignStart),a("alignCenter",e.alignCenter),a("alignEnd",e.alignEnd),s("s4"),a("link",e.link),a("clear",e.clear)]},...ngDevMode?[{debugName:"tools"}]:[]);constructor(){const e=()=>{const a=this.editorEl(),s=document.getSelection();!a||!s?.anchorNode||!a.contains(s.anchorNode)||(this.captureRange(),this.refreshActive())};document.addEventListener("selectionchange",e),this.destroyRef.onDestroy(()=>document.removeEventListener("selectionchange",e)),M(()=>{const a=this.value(),s=this.editorRef()?.nativeElement;!s||a===this.owned||(s.innerHTML=a||"",this.owned=a,this.empty.set(As(s)))})}pressed(e){if(e==="h2"||e==="h3"||e==="quote"){const s=e==="quote"?"blockquote":e;return this.block()===s}if(e==="alignStart"||e==="alignCenter"||e==="alignEnd"){const s=this.explicitAlign();if(!s)return!1;const r=this.direction()==="rtl",l=r?"right":"left",u=r?"left":"right";return e==="alignCenter"?s==="center":e==="alignStart"?s===l:s===u}const a=Os(e);return a?this.active().has(a):!1}keepSelection(e){e.preventDefault()}onTool(e){if(this.disabled())return;if(e==="link"){this.openLink();return}if(e==="clear"){this.clearFormat();return}if(e==="h2"||e==="h3"||e==="quote"){const s=e==="quote"?"blockquote":e;this.formatBlock(this.block()===s?"p":s);return}if(e==="alignStart"||e==="alignCenter"||e==="alignEnd"){this.exec(this.alignCommand(e));return}const a=Os(e);a&&this.exec(a)}onInput(){this.publish(),this.refreshActive()}onBlur(){this.publish()}onCaret(){this.captureRange(),this.refreshActive()}onKeydown(e){if(this.disabled()||!(e.metaKey||e.ctrlKey))return;const a=e.key.toLowerCase(),s=a==="b"?"bold":a==="i"?"italic":a==="u"?"underline":"";s&&(e.preventDefault(),this.exec(s))}openLink(){this.captureRange();const e=this.anchorFromSelection();if(e&&!this.rangeIsCollapsed()){this.exec("unlink");return}this.linkUrl.set(e?.getAttribute("href")||"https://"),this.linkOpen.set(!0),queueMicrotask(()=>{const a=this.linkInputRef()?.nativeElement;a?.focus(),a?.select()})}closeLink(){this.linkOpen.set(!1),this.restoreSelection()}applyLink(){const e=Sr(this.linkUrl());if(!(!e||(this.restoreSelection(),!this.editorEl()))){if(this.rangeIsCollapsed()){const s=e.replace(/^https?:\/\//,"");this.exec("insertHTML",`<a href="${Vs(e)}">${Cr(s)}</a>`)}else this.exec("createLink",e);this.linkOpen.set(!1)}}exec(e,a){if(!this.disabled()){this.restoreSelection();try{document.execCommand(e,!1,a)}catch{}this.captureRange(),this.publish(),this.refreshActive()}}formatBlock(e){this.restoreSelection();try{document.execCommand("formatBlock",!1,`<${e}>`)||document.execCommand("formatBlock",!1,e)}catch{}this.captureRange(),this.publish(),this.refreshActive()}clearFormat(){this.restoreSelection();try{document.execCommand("removeFormat"),document.execCommand("unlink"),document.queryCommandState("insertOrderedList")&&document.execCommand("insertOrderedList"),document.queryCommandState("insertUnorderedList")&&document.execCommand("insertUnorderedList");for(let a=0;a<4;a++)document.execCommand("outdent");const e=String(document.queryCommandValue("formatBlock")||"").replace(/[<>]/g,"").toLowerCase();e&&e!=="p"&&e!=="div"&&(document.execCommand("formatBlock",!1,"<p>")||document.execCommand("formatBlock",!1,"p"))}catch{}this.editorEl()?.querySelectorAll("span[style]").forEach(e=>{const a=e.getAttribute("style")??"";/font-size\s*:/i.test(a)&&!/text-align|font-weight|font-style|text-decoration/i.test(a)&&e.replaceWith(...Array.from(e.childNodes))}),this.captureRange(),this.publish(),this.refreshActive()}explicitAlign(){const e=this.range?.startContainer??document.getSelection()?.anchorNode??null,s=(e instanceof Element?e:e?.parentElement)?.closest("h1, h2, h3, h4, p, li, blockquote, div");return!s||s.classList.contains("dga-rt__editor")?"":(s.style.textAlign||s.getAttribute("align")||"").toLowerCase()}alignCommand(e){if(e==="alignCenter")return"justifyCenter";const a=this.direction()==="rtl";return e==="alignStart"?a?"justifyRight":"justifyLeft":a?"justifyLeft":"justifyRight"}refreshActive(){if(typeof document>"u")return;const e=new Set;for(const s of Nr)try{document.queryCommandState(s)&&e.add(s)}catch{}this.active.set(e);let a="p";try{a=String(document.queryCommandValue("formatBlock")||"p").replace(/[<>]/g,"").toLowerCase()}catch{a="p"}this.block.set(a||"p")}publish(){const e=this.editorEl();if(!e)return;const a=As(e);this.empty.set(a);const s=a?"":Ir(e.innerHTML);this.owned=s,this.value()!==s&&this.value.set(s)}restoreSelection(){const e=this.editorEl();if(!e)return;e.focus();const a=document.getSelection();if(a){if(!e.innerHTML.trim()){e.innerHTML="<p><br></p>";const s=e.querySelector("p")??e,r=document.createRange();r.selectNodeContents(s),r.collapse(!0),a.removeAllRanges(),a.addRange(r),this.range=r.cloneRange();return}this.range&&e.contains(this.range.commonAncestorContainer)&&(a.removeAllRanges(),a.addRange(this.range))}}captureRange(){const e=this.editorEl(),a=document.getSelection();if(!e||!a||a.rangeCount===0)return;const s=a.getRangeAt(0);e.contains(s.commonAncestorContainer)&&(this.range=s.cloneRange())}rangeIsCollapsed(){return!this.range||this.range.collapsed}anchorFromSelection(){const e=this.range?.commonAncestorContainer;return(e instanceof Element?e:e?.parentElement)?.closest("a")??null}direction(){const e=this.editorEl();return!e||typeof getComputedStyle>"u"?this.ar()?"rtl":"ltr":getComputedStyle(e).direction}editorEl(){return this.editorRef()?.nativeElement??null}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ft,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ft,isStandalone:!0,selector:"dga-rich-text",inputs:{value:{classPropertyName:"value",publicName:"value",isSignal:!0,isRequired:!1,transformFunction:null},placeholder:{classPropertyName:"placeholder",publicName:"placeholder",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},minHeight:{classPropertyName:"minHeight",publicName:"minHeight",isSignal:!0,isRequired:!1,transformFunction:null},disabled:{classPropertyName:"disabled",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{value:"valueChange"},host:{properties:{"style.--dga-rt-min-h.px":"minHeight()"},classAttribute:"dga-rich-text"},viewQueries:[{propertyName:"editorRef",first:!0,predicate:["editor"],descendants:!0,isSignal:!0},{propertyName:"linkInputRef",first:!0,predicate:["linkInput"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
2009
2027
|
<div class="dga-rt" [class.dga-rt--disabled]="disabled()">
|
|
2010
2028
|
@if (label()) {
|
|
2011
2029
|
<span class="dga-rt__label" [id]="labelId">{{ label() }}</span>
|
|
@@ -2291,7 +2309,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
2291
2309
|
></div>
|
|
2292
2310
|
</div>
|
|
2293
2311
|
</div>
|
|
2294
|
-
`,changeDetection:h.OnPush,host:{class:"dga-rich-text","[style.--dga-rt-min-h.px]":"minHeight()"},styles:[":host{display:block;width:100%;max-width:100%;box-sizing:border-box;color:var(--dga-text-default, inherit)}.dga-rt{display:flex;width:100%;flex-direction:column}.dga-rt__label{display:block;margin-bottom:.5rem;font-size:.875rem;font-weight:500;color:var(--dga-text-display, inherit)}.dga-rt__field{overflow:hidden;border:1px solid var(--dga-border-neutral-subtle, var(--dga-divider));border-radius:var(--dga-radius-md, 8px);background:var(--dga-bg-surface, #fff);transition:border-color .12s ease,box-shadow .12s ease}.dga-rt__field:focus-within{border-color:var(--dga-border-primary, var(--dga-bg-primary, #1b8354));box-shadow:0 0 0 3px color-mix(in oklab,var(--dga-bg-primary, #1b8354) 18%,transparent)}.dga-rt__toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.125rem;padding:.35rem;border-bottom:1px solid var(--dga-border-neutral-subtle, var(--dga-divider));background:var(--dga-bg-sunken, #f7f7f7)}.dga-rt__btn{display:inline-flex;width:2rem;height:2rem;flex:0 0 auto;align-items:center;justify-content:center;padding:0;border:0;border-radius:var(--dga-radius-sm, 4px);background:transparent;color:var(--dga-text-default, inherit);font:inherit;line-height:1;cursor:pointer}.dga-rt__btn svg{width:1rem;height:1rem;display:block;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.dga-rt__btn svg circle{fill:currentColor;stroke:none}.dga-rt__btn--text{width:auto;min-width:2rem;padding-inline:.4rem;font-size:.75rem;font-weight:700;letter-spacing:.02em}.dga-rt__btn:hover:not(:disabled){background:color-mix(in oklab,var(--dga-bg-primary, #1b8354) 10%,transparent)}.dga-rt__btn[aria-pressed=true]{background:color-mix(in oklab,var(--dga-bg-primary, #1b8354) 18%,transparent);color:var(--dga-text-primary, var(--dga-bg-primary, #1b8354))}.dga-rt__btn:disabled{opacity:.45;cursor:not-allowed}.dga-rt__sep{width:1px;height:1.25rem;margin-inline:.2rem;background:var(--dga-border-neutral-subtle, var(--dga-divider))}.dga-rt__link{display:flex;align-items:center;gap:.375rem;padding:.375rem .5rem;border-bottom:1px solid var(--dga-border-neutral-subtle, var(--dga-divider));background:var(--dga-bg-surface, #fff)}.dga-rt__link-input{min-width:0;height:2rem;flex:1;padding-inline:.625rem;border:1px solid var(--dga-border-neutral-subtle, var(--dga-divider));border-radius:var(--dga-radius-sm, 4px);background:var(--dga-bg-surface, #fff);color:inherit;font:inherit;font-size:.875rem}.dga-rt__link-input:focus{outline:2px solid var(--dga-border-primary, var(--dga-bg-primary, #1b8354));outline-offset:1px}.dga-rt__link-apply,.dga-rt__link-cancel{height:2rem;flex:0 0 auto;padding-inline:.75rem;border-radius:var(--dga-radius-sm, 4px);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer}.dga-rt__link-apply{border:0;background:var(--dga-bg-primary, #1b8354);color:var(--dga-text-on-color, #fff)}.dga-rt__link-cancel{border:1px solid var(--dga-border-neutral-subtle, var(--dga-divider));background:transparent;color:inherit}.dga-rt__editor{position:relative;min-height:var(--dga-rt-min-h, 168px);padding:.75rem 1rem;background:var(--dga-bg-surface, #fff);color:var(--dga-text-default, inherit);font-size:.9375rem;line-height:1.65;outline:none;overflow-wrap:anywhere}.dga-rt__editor[data-empty=true]:before{content:attr(data-placeholder);position:absolute;inset-inline-start:1rem;inset-block-start:.75rem;color:var(--dga-text-muted, #9ca3af);pointer-events:none}.dga-rt__editor ::ng-deep h2{margin:.4rem 0;font-size:1.5rem;font-weight:700;line-height:1.3}.dga-rt__editor ::ng-deep h3{margin:.35rem 0;font-size:1.2rem;font-weight:700;line-height:1.35}.dga-rt__editor ::ng-deep p,.dga-rt__editor ::ng-deep blockquote{margin:.35rem 0}.dga-rt__editor ::ng-deep ul,.dga-rt__editor ::ng-deep ol{margin:.35rem 0;padding-inline-start:1.5rem}.dga-rt__editor ::ng-deep ul{list-style:disc outside}.dga-rt__editor ::ng-deep ol{list-style:decimal outside}.dga-rt__editor ::ng-deep li{display:list-item}.dga-rt__editor ::ng-deep blockquote{margin-inline:0;padding-inline-start:.75rem;border-inline-start:3px solid var(--dga-bg-primary, #1b8354);color:var(--dga-text-paragraph, inherit)}.dga-rt__editor ::ng-deep a{color:var(--dga-text-primary, var(--dga-bg-primary, #1b8354));text-decoration:underline;text-underline-offset:2px}.dga-rt--disabled .dga-rt__field{opacity:.7;background:var(--dga-bg-disabled, #f3f3f3)}.dga-rt--disabled .dga-rt__editor{pointer-events:none}\n"]}]}],ctorParameters:()=>[],propDecorators:{editorRef:[{type:t.ViewChild,args:["editor",{isSignal:!0}]}],linkInputRef:[{type:t.ViewChild,args:["linkInput",{isSignal:!0}]}],value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]},{type:t.Output,args:["valueChange"]}],placeholder:[{type:t.Input,args:[{isSignal:!0,alias:"placeholder",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],minHeight:[{type:t.Input,args:[{isSignal:!0,alias:"minHeight",required:!1}]}],disabled:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}]}});const Nr=["bold","italic","underline","strikeThrough","insertUnorderedList","insertOrderedList","justifyLeft","justifyCenter","justifyRight"];function Os(d){switch(d){case"bold":return"bold";case"italic":return"italic";case"underline":return"underline";case"strike":return"strikeThrough";case"ul":return"insertUnorderedList";case"ol":return"insertOrderedList";default:return""}}function
|
|
2312
|
+
`,changeDetection:h.OnPush,host:{class:"dga-rich-text","[style.--dga-rt-min-h.px]":"minHeight()"},styles:[":host{display:block;width:100%;max-width:100%;box-sizing:border-box;color:var(--dga-text-default, inherit)}.dga-rt{display:flex;width:100%;flex-direction:column}.dga-rt__label{display:block;margin-bottom:.5rem;font-size:.875rem;font-weight:500;color:var(--dga-text-display, inherit)}.dga-rt__field{overflow:hidden;border:1px solid var(--dga-border-neutral-subtle, var(--dga-divider));border-radius:var(--dga-radius-md, 8px);background:var(--dga-bg-surface, #fff);transition:border-color .12s ease,box-shadow .12s ease}.dga-rt__field:focus-within{border-color:var(--dga-border-primary, var(--dga-bg-primary, #1b8354));box-shadow:0 0 0 3px color-mix(in oklab,var(--dga-bg-primary, #1b8354) 18%,transparent)}.dga-rt__toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.125rem;padding:.35rem;border-bottom:1px solid var(--dga-border-neutral-subtle, var(--dga-divider));background:var(--dga-bg-sunken, #f7f7f7)}.dga-rt__btn{display:inline-flex;width:2rem;height:2rem;flex:0 0 auto;align-items:center;justify-content:center;padding:0;border:0;border-radius:var(--dga-radius-sm, 4px);background:transparent;color:var(--dga-text-default, inherit);font:inherit;line-height:1;cursor:pointer}.dga-rt__btn svg{width:1rem;height:1rem;display:block;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.dga-rt__btn svg circle{fill:currentColor;stroke:none}.dga-rt__btn--text{width:auto;min-width:2rem;padding-inline:.4rem;font-size:.75rem;font-weight:700;letter-spacing:.02em}.dga-rt__btn:hover:not(:disabled){background:color-mix(in oklab,var(--dga-bg-primary, #1b8354) 10%,transparent)}.dga-rt__btn[aria-pressed=true]{background:color-mix(in oklab,var(--dga-bg-primary, #1b8354) 18%,transparent);color:var(--dga-text-primary, var(--dga-bg-primary, #1b8354))}.dga-rt__btn:disabled{opacity:.45;cursor:not-allowed}.dga-rt__sep{width:1px;height:1.25rem;margin-inline:.2rem;background:var(--dga-border-neutral-subtle, var(--dga-divider))}.dga-rt__link{display:flex;align-items:center;gap:.375rem;padding:.375rem .5rem;border-bottom:1px solid var(--dga-border-neutral-subtle, var(--dga-divider));background:var(--dga-bg-surface, #fff)}.dga-rt__link-input{min-width:0;height:2rem;flex:1;padding-inline:.625rem;border:1px solid var(--dga-border-neutral-subtle, var(--dga-divider));border-radius:var(--dga-radius-sm, 4px);background:var(--dga-bg-surface, #fff);color:inherit;font:inherit;font-size:.875rem}.dga-rt__link-input:focus{outline:2px solid var(--dga-border-primary, var(--dga-bg-primary, #1b8354));outline-offset:1px}.dga-rt__link-apply,.dga-rt__link-cancel{height:2rem;flex:0 0 auto;padding-inline:.75rem;border-radius:var(--dga-radius-sm, 4px);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer}.dga-rt__link-apply{border:0;background:var(--dga-bg-primary, #1b8354);color:var(--dga-text-on-color, #fff)}.dga-rt__link-cancel{border:1px solid var(--dga-border-neutral-subtle, var(--dga-divider));background:transparent;color:inherit}.dga-rt__editor{position:relative;min-height:var(--dga-rt-min-h, 168px);padding:.75rem 1rem;background:var(--dga-bg-surface, #fff);color:var(--dga-text-default, inherit);font-size:.9375rem;line-height:1.65;outline:none;overflow-wrap:anywhere}.dga-rt__editor[data-empty=true]:before{content:attr(data-placeholder);position:absolute;inset-inline-start:1rem;inset-block-start:.75rem;color:var(--dga-text-muted, #9ca3af);pointer-events:none}.dga-rt__editor ::ng-deep h2{margin:.4rem 0;font-size:1.5rem;font-weight:700;line-height:1.3}.dga-rt__editor ::ng-deep h3{margin:.35rem 0;font-size:1.2rem;font-weight:700;line-height:1.35}.dga-rt__editor ::ng-deep p,.dga-rt__editor ::ng-deep blockquote{margin:.35rem 0}.dga-rt__editor ::ng-deep ul,.dga-rt__editor ::ng-deep ol{margin:.35rem 0;padding-inline-start:1.5rem}.dga-rt__editor ::ng-deep ul{list-style:disc outside}.dga-rt__editor ::ng-deep ol{list-style:decimal outside}.dga-rt__editor ::ng-deep li{display:list-item}.dga-rt__editor ::ng-deep blockquote{margin-inline:0;padding-inline-start:.75rem;border-inline-start:3px solid var(--dga-bg-primary, #1b8354);color:var(--dga-text-paragraph, inherit)}.dga-rt__editor ::ng-deep a{color:var(--dga-text-primary, var(--dga-bg-primary, #1b8354));text-decoration:underline;text-underline-offset:2px}.dga-rt--disabled .dga-rt__field{opacity:.7;background:var(--dga-bg-disabled, #f3f3f3)}.dga-rt--disabled .dga-rt__editor{pointer-events:none}\n"]}]}],ctorParameters:()=>[],propDecorators:{editorRef:[{type:t.ViewChild,args:["editor",{isSignal:!0}]}],linkInputRef:[{type:t.ViewChild,args:["linkInput",{isSignal:!0}]}],value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]},{type:t.Output,args:["valueChange"]}],placeholder:[{type:t.Input,args:[{isSignal:!0,alias:"placeholder",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],minHeight:[{type:t.Input,args:[{isSignal:!0,alias:"minHeight",required:!1}]}],disabled:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}]}});const Nr=["bold","italic","underline","strikeThrough","insertUnorderedList","insertOrderedList","justifyLeft","justifyCenter","justifyRight"];function Os(d){switch(d){case"bold":return"bold";case"italic":return"italic";case"underline":return"underline";case"strike":return"strikeThrough";case"ul":return"insertUnorderedList";case"ol":return"insertOrderedList";default:return""}}function As(d){return(d.textContent??"").replace(/\u00a0/g,"").trim().length===0}function Sr(d){const e=d.trim();return!e||/^\s*javascript:/i.test(e)?"":/^(https?:|mailto:|tel:|\/|\.\/|\.\.\/|#)/i.test(e)?e:`https://${e.replace(/^\/+/,"")}`}function Vs(d){return d.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function Cr(d){return Vs(d)}let Dr=0;function Ir(d){return d.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,"").replace(/\son\w+\s*=\s*(["']).*?\1/gi,"").replace(/\son\w+\s*=\s*[^\s>]+/gi,"").replace(/javascript:/gi,"")}const Mr="relative z-dialog flex w-full flex-col gap-xl rounded-md border-0 bg-card p-3xl shadow-md focus:outline-none",_r={sm:"max-w-(--container-sm)",md:"max-w-(--container-md)",lg:"max-w-(--container-xl)"};let qr=0;class te{injector=x(G);panel=R("panel",...ngDevMode?[{debugName:"panel"}]:[]);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);title=i("",...ngDevMode?[{debugName:"title"}]:[]);size=i("md",...ngDevMode?[{debugName:"size"}]:[]);closeLabel=i("إغلاق",...ngDevMode?[{debugName:"closeLabel"}]:[]);closeOnBackdrop=i(!0,{...ngDevMode?{debugName:"closeOnBackdrop"}:{},transform:m});closed=w();titleId=`dga-dialog-title-${++qr}`;previousFocus=null;previousOverflow="";panelClasses=n(()=>f(Mr,_r[this.size()]),...ngDevMode?[{debugName:"panelClasses"}]:[]);constructor(){M(()=>{if(!this.open()){this.unlockScroll(),this.restoreFocus();return}this.previousFocus=document.activeElement??null,this.lockScroll(),T(()=>this.focusInitial(),{injector:this.injector})})}close(){this.open()&&(this.open.set(!1),this.closed.emit())}onBackdrop(){this.closeOnBackdrop()&&this.close()}onKeydown(e){if(e.key==="Escape"){e.stopPropagation(),this.close();return}e.key==="Tab"&&this.trapFocus(e)}focusInitial(){const e=this.panel()?.nativeElement;if(!e)return;(this.getFocusable(e)[0]??e).focus()}trapFocus(e){const a=this.panel()?.nativeElement;if(!a)return;const s=this.getFocusable(a);if(s.length===0){e.preventDefault(),a.focus();return}const r=s[0],l=s[s.length-1],u=document.activeElement;e.shiftKey&&u===r?(e.preventDefault(),l.focus()):!e.shiftKey&&u===l&&(e.preventDefault(),r.focus())}getFocusable(e){return Array.from(e.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(s=>!s.hasAttribute("disabled")&&s.getClientRects().length>0)}lockScroll(){this.previousOverflow=document.body.style.overflow,document.body.style.overflow="hidden"}unlockScroll(){document.body.style.overflow=this.previousOverflow}restoreFocus(){this.previousFocus?.focus?.(),this.previousFocus=null}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:te,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:te,isStandalone:!0,selector:"dga-dialog",inputs:{open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},closeLabel:{classPropertyName:"closeLabel",publicName:"closeLabel",isSignal:!0,isRequired:!1,transformFunction:null},closeOnBackdrop:{classPropertyName:"closeOnBackdrop",publicName:"closeOnBackdrop",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",closed:"closed"},viewQueries:[{propertyName:"panel",first:!0,predicate:["panel"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
2295
2313
|
@if (open()) {
|
|
2296
2314
|
<div class="fixed inset-0 z-overlay flex items-center justify-center p-xl">
|
|
2297
2315
|
<div
|
|
@@ -2475,7 +2493,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
2475
2493
|
</button>
|
|
2476
2494
|
</div>
|
|
2477
2495
|
</dga-dialog>
|
|
2478
|
-
`}]}],propDecorators:{open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],message:[{type:t.Input,args:[{isSignal:!0,alias:"message",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],tone:[{type:t.Input,args:[{isSignal:!0,alias:"tone",required:!1}]}],confirmLabel:[{type:t.Input,args:[{isSignal:!0,alias:"confirmLabel",required:!1}]}],cancelLabel:[{type:t.Input,args:[{isSignal:!0,alias:"cancelLabel",required:!1}]}],closeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],closeOnBackdrop:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnBackdrop",required:!1}]}],confirmed:[{type:t.Output,args:["confirmed"]}],cancelled:[{type:t.Output,args:["cancelled"]}]}});const Lr="relative z-dialog flex w-full flex-col gap-xl rounded-md border-0 bg-card p-3xl shadow-md focus:outline-none",Pr={sm:"max-w-(--container-sm)",md:"max-w-(--container-md)",lg:"max-w-(--container-lg)",xl:"max-w-(--container-2xl)",full:"max-h-[min(90vh,100%)] max-w-[min(96vw,var(--container-5xl))]"},zr={fade:"dga-modal-fade-in",scale:"dga-modal-scale-in",slide:"dga-modal-slide-in"},Fr={fade:"dga-modal-fade-out",scale:"dga-modal-scale-out",slide:"dga-modal-slide-out"};let
|
|
2496
|
+
`}]}],propDecorators:{open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],message:[{type:t.Input,args:[{isSignal:!0,alias:"message",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],tone:[{type:t.Input,args:[{isSignal:!0,alias:"tone",required:!1}]}],confirmLabel:[{type:t.Input,args:[{isSignal:!0,alias:"confirmLabel",required:!1}]}],cancelLabel:[{type:t.Input,args:[{isSignal:!0,alias:"cancelLabel",required:!1}]}],closeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],closeOnBackdrop:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnBackdrop",required:!1}]}],confirmed:[{type:t.Output,args:["confirmed"]}],cancelled:[{type:t.Output,args:["cancelled"]}]}});const Lr="relative z-dialog flex w-full flex-col gap-xl rounded-md border-0 bg-card p-3xl shadow-md focus:outline-none",Pr={sm:"max-w-(--container-sm)",md:"max-w-(--container-md)",lg:"max-w-(--container-lg)",xl:"max-w-(--container-2xl)",full:"max-h-[min(90vh,100%)] max-w-[min(96vw,var(--container-5xl))]"},zr={fade:"dga-modal-fade-in",scale:"dga-modal-scale-in",slide:"dga-modal-slide-in"},Fr={fade:"dga-modal-fade-out",scale:"dga-modal-scale-out",slide:"dga-modal-slide-out"};let Es=0;class Tt{injector=x(G);panel=R("panel",...ngDevMode?[{debugName:"panel"}]:[]);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);title=i("",...ngDevMode?[{debugName:"title"}]:[]);description=i("",...ngDevMode?[{debugName:"description"}]:[]);size=i("md",...ngDevMode?[{debugName:"size"}]:[]);animation=i("scale",...ngDevMode?[{debugName:"animation"}]:[]);closeLabel=i("إغلاق",...ngDevMode?[{debugName:"closeLabel"}]:[]);closeOnBackdrop=i(!0,{...ngDevMode?{debugName:"closeOnBackdrop"}:{},transform:m});closeOnEscape=i(!0,{...ngDevMode?{debugName:"closeOnEscape"}:{},transform:m});showClose=i(!0,{...ngDevMode?{debugName:"showClose"}:{},transform:m});scrollable=i(!0,{...ngDevMode?{debugName:"scrollable"}:{},transform:m});centered=i(!0,{...ngDevMode?{debugName:"centered"}:{},transform:m});closed=w();opened=w();titleId=`dga-modal-title-${++Es}`;descId=`dga-modal-desc-${Es}`;rendered=y(!1,...ngDevMode?[{debugName:"rendered"}]:[]);leaving=y(!1,...ngDevMode?[{debugName:"leaving"}]:[]);previousFocus=null;previousOverflow="";panelClasses=n(()=>f(Lr,Pr[this.size()],this.size()==="full"?"overflow-hidden":null,this.panelAnimClass()),...ngDevMode?[{debugName:"panelClasses"}]:[]);backdropClasses=n(()=>{const a=this.animation()==="none"?"":this.leaving()?"dga-modal-fade-out":"dga-modal-fade-in";return f("absolute inset-0 bg-overlay",a)},...ngDevMode?[{debugName:"backdropClasses"}]:[]);panelAnimClass=n(()=>{const e=this.animation();return e==="none"?"":this.leaving()?Fr[e]:zr[e]},...ngDevMode?[{debugName:"panelAnimClass"}]:[]);constructor(){M(()=>{if(this.open()){this.leaving.set(!1),this.rendered()||(this.rendered.set(!0),this.previousFocus=document.activeElement??null,this.lockScroll(),T(()=>{this.focusInitial(),this.opened.emit()},{injector:this.injector}));return}if(this.rendered()){if(this.animation()==="none"){this.finishClose();return}this.leaving.set(!0)}})}close(){!this.open()&&!this.rendered()||this.open.set(!1)}onBackdrop(){this.closeOnBackdrop()&&this.close()}onKeydown(e){if(e.key==="Escape"){e.stopPropagation(),this.closeOnEscape()&&this.close();return}e.key==="Tab"&&this.trapFocus(e)}onAnimationEnd(e){this.leaving()&&e.target===this.panel()?.nativeElement&&this.finishClose()}finishClose(){this.rendered()&&(this.leaving.set(!1),this.rendered.set(!1),this.unlockScroll(),this.restoreFocus(),this.closed.emit())}focusInitial(){const e=this.panel()?.nativeElement;if(!e)return;(this.getFocusable(e)[0]??e).focus()}trapFocus(e){const a=this.panel()?.nativeElement;if(!a)return;const s=this.getFocusable(a);if(s.length===0){e.preventDefault(),a.focus();return}const r=s[0],l=s[s.length-1],u=document.activeElement;e.shiftKey&&u===r?(e.preventDefault(),l.focus()):!e.shiftKey&&u===l&&(e.preventDefault(),r.focus())}getFocusable(e){return Array.from(e.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(s=>!s.hasAttribute("disabled")&&s.getClientRects().length>0)}lockScroll(){this.previousOverflow=document.body.style.overflow,document.body.style.overflow="hidden"}unlockScroll(){document.body.style.overflow=this.previousOverflow}restoreFocus(){this.previousFocus?.focus?.(),this.previousFocus=null}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Tt,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Tt,isStandalone:!0,selector:"dga-modal",inputs:{open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},description:{classPropertyName:"description",publicName:"description",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},animation:{classPropertyName:"animation",publicName:"animation",isSignal:!0,isRequired:!1,transformFunction:null},closeLabel:{classPropertyName:"closeLabel",publicName:"closeLabel",isSignal:!0,isRequired:!1,transformFunction:null},closeOnBackdrop:{classPropertyName:"closeOnBackdrop",publicName:"closeOnBackdrop",isSignal:!0,isRequired:!1,transformFunction:null},closeOnEscape:{classPropertyName:"closeOnEscape",publicName:"closeOnEscape",isSignal:!0,isRequired:!1,transformFunction:null},showClose:{classPropertyName:"showClose",publicName:"showClose",isSignal:!0,isRequired:!1,transformFunction:null},scrollable:{classPropertyName:"scrollable",publicName:"scrollable",isSignal:!0,isRequired:!1,transformFunction:null},centered:{classPropertyName:"centered",publicName:"centered",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",closed:"closed",opened:"opened"},viewQueries:[{propertyName:"panel",first:!0,predicate:["panel"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
2479
2497
|
@if (rendered()) {
|
|
2480
2498
|
<div
|
|
2481
2499
|
class="fixed inset-0 z-overlay flex justify-center p-xl"
|
|
@@ -2558,7 +2576,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
2558
2576
|
</div>
|
|
2559
2577
|
</div>
|
|
2560
2578
|
}
|
|
2561
|
-
`,isInline:!0,styles:["@keyframes dga-modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes dga-modal-fade-out{0%{opacity:1}to{opacity:0}}@keyframes dga-modal-scale-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@keyframes dga-modal-scale-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}@keyframes dga-modal-slide-in{0%{opacity:0;transform:translateY(1rem)}to{opacity:1;transform:translateY(0)}}@keyframes dga-modal-slide-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(.75rem)}}.dga-modal-fade-in{animation:dga-modal-fade-in .18s ease-out both}.dga-modal-fade-out{animation:dga-modal-fade-out .14s ease-in both}.dga-modal-scale-in{animation:dga-modal-scale-in .2s ease-out both}.dga-modal-scale-out{animation:dga-modal-scale-out .15s ease-in both}.dga-modal-slide-in{animation:dga-modal-slide-in .22s ease-out both}.dga-modal-slide-out{animation:dga-modal-slide-out .16s ease-in both}\n"],changeDetection:t.ChangeDetectionStrategy.OnPush})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:
|
|
2579
|
+
`,isInline:!0,styles:["@keyframes dga-modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes dga-modal-fade-out{0%{opacity:1}to{opacity:0}}@keyframes dga-modal-scale-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@keyframes dga-modal-scale-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}@keyframes dga-modal-slide-in{0%{opacity:0;transform:translateY(1rem)}to{opacity:1;transform:translateY(0)}}@keyframes dga-modal-slide-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(.75rem)}}.dga-modal-fade-in{animation:dga-modal-fade-in .18s ease-out both}.dga-modal-fade-out{animation:dga-modal-fade-out .14s ease-in both}.dga-modal-scale-in{animation:dga-modal-scale-in .2s ease-out both}.dga-modal-scale-out{animation:dga-modal-scale-out .15s ease-in both}.dga-modal-slide-in{animation:dga-modal-slide-in .22s ease-out both}.dga-modal-slide-out{animation:dga-modal-slide-out .16s ease-in both}\n"],changeDetection:t.ChangeDetectionStrategy.OnPush})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Tt,decorators:[{type:v,args:[{selector:"dga-modal",standalone:!0,template:`
|
|
2562
2580
|
@if (rendered()) {
|
|
2563
2581
|
<div
|
|
2564
2582
|
class="fixed inset-0 z-overlay flex justify-center p-xl"
|
|
@@ -2641,7 +2659,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
2641
2659
|
</div>
|
|
2642
2660
|
</div>
|
|
2643
2661
|
}
|
|
2644
|
-
`,changeDetection:h.OnPush,styles:["@keyframes dga-modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes dga-modal-fade-out{0%{opacity:1}to{opacity:0}}@keyframes dga-modal-scale-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@keyframes dga-modal-scale-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}@keyframes dga-modal-slide-in{0%{opacity:0;transform:translateY(1rem)}to{opacity:1;transform:translateY(0)}}@keyframes dga-modal-slide-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(.75rem)}}.dga-modal-fade-in{animation:dga-modal-fade-in .18s ease-out both}.dga-modal-fade-out{animation:dga-modal-fade-out .14s ease-in both}.dga-modal-scale-in{animation:dga-modal-scale-in .2s ease-out both}.dga-modal-scale-out{animation:dga-modal-scale-out .15s ease-in both}.dga-modal-slide-in{animation:dga-modal-slide-in .22s ease-out both}.dga-modal-slide-out{animation:dga-modal-slide-out .16s ease-in both}\n"]}]}],ctorParameters:()=>[],propDecorators:{panel:[{type:t.ViewChild,args:["panel",{isSignal:!0}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],description:[{type:t.Input,args:[{isSignal:!0,alias:"description",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],animation:[{type:t.Input,args:[{isSignal:!0,alias:"animation",required:!1}]}],closeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],closeOnBackdrop:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnBackdrop",required:!1}]}],closeOnEscape:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnEscape",required:!1}]}],showClose:[{type:t.Input,args:[{isSignal:!0,alias:"showClose",required:!1}]}],scrollable:[{type:t.Input,args:[{isSignal:!0,alias:"scrollable",required:!1}]}],centered:[{type:t.Input,args:[{isSignal:!0,alias:"centered",required:!1}]}],closed:[{type:t.Output,args:["closed"]}],opened:[{type:t.Output,args:["opened"]}]}});const Rr={"top-start":"pointer-events-none fixed start-xl z-toast flex flex-col gap-md","top-center":"pointer-events-none fixed inset-x-0 z-toast flex justify-center px-xl","top-end":"pointer-events-none fixed end-xl z-toast flex flex-col gap-md","bottom-start":"pointer-events-none fixed start-xl z-toast flex flex-col gap-md","bottom-center":"pointer-events-none fixed inset-x-0 z-toast flex justify-center px-xl","bottom-end":"pointer-events-none fixed end-xl z-toast flex flex-col gap-md"},Or="pointer-events-auto flex w-[min(100vw-2rem,24rem)] items-start gap-lg rounded-md border border-border bg-elevated px-3xl py-xl text-body-sm shadow-lg",Tr={neutral:"text-paragraph",success:"border-s-8 border-s-border-success text-fg-success",info:"border-s-8 border-s-border-info text-fg-info",warning:"border-s-8 border-s-border-warning text-fg-warning",error:"border-s-8 border-s-border-error text-fg-error"},Ar={neutral:"info",success:"success",info:"info",warning:"warning",error:"error"},Vr={fade:"dga-toast-fade-in",push:"dga-toast-push-in",slide:"dga-toast-slide-in",scale:"dga-toast-scale-in"},Er={fade:"dga-toast-fade-out",push:"dga-toast-push-out",slide:"dga-toast-slide-out",scale:"dga-toast-scale-out"},Es=10,$r=2*Math.PI*Es,Br=180;class Ae{destroyRef=x(L);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);variant=i("info",...ngDevMode?[{debugName:"variant"}]:[]);title=i("",...ngDevMode?[{debugName:"title"}]:[]);dismissible=i(!0,{...ngDevMode?{debugName:"dismissible"}:{},transform:m});closeLabel=i("إغلاق",...ngDevMode?[{debugName:"closeLabel"}]:[]);duration=i(5e3,...ngDevMode?[{debugName:"duration"}]:[]);countdown=i(!0,{...ngDevMode?{debugName:"countdown"}:{},transform:m});pauseOnHover=i(!0,{...ngDevMode?{debugName:"pauseOnHover"}:{},transform:m});pauseOnFocus=i(!0,{...ngDevMode?{debugName:"pauseOnFocus"}:{},transform:m});animation=i("push",...ngDevMode?[{debugName:"animation"}]:[]);location=i("top-end",...ngDevMode?[{debugName:"location"}]:[]);closed=w();rendered=y(!1,...ngDevMode?[{debugName:"rendered"}]:[]);leaving=y(!1,...ngDevMode?[{debugName:"leaving"}]:[]);progress=y(1,...ngDevMode?[{debugName:"progress"}]:[]);pausedUi=y(!1,...ngDevMode?[{debugName:"pausedUi"}]:[]);ringEpoch=y(0,...ngDevMode?[{debugName:"ringEpoch"}]:[]);ringR=Es;ringC=$r;remainingMs=0;totalMs=0;paused=!1;hoverPaused=!1;focusPaused=!1;holdHoverPause=!1;holdFocusPause=!1;openSession=!1;rafId=null;lastTick=0;exitTimer=null;reduceMotionFlag=y(!1,...ngDevMode?[{debugName:"reduceMotionFlag"}]:[]);classes=n(()=>f(Or,Tr[this.variant()],this.animClass()),...ngDevMode?[{debugName:"classes"}]:[]);hostClass=n(()=>Rr[this.location()],...ngDevMode?[{debugName:"hostClass"}]:[]);isTop=n(()=>this.location().startsWith("top"),...ngDevMode?[{debugName:"isTop"}]:[]);edgeTop=n(()=>this.isTop()?"calc(var(--dga-announcement-offset, 0px) + 1rem)":null,...ngDevMode?[{debugName:"edgeTop"}]:[]);edgeBottom=n(()=>this.isTop()?null:"1rem",...ngDevMode?[{debugName:"edgeBottom"}]:[]);iconName=n(()=>Ar[this.variant()],...ngDevMode?[{debugName:"iconName"}]:[]);iconTone=n(()=>{const e=this.variant();return e==="success"?"success":e==="warning"?"warning":e==="error"?"error":e==="neutral"?"muted":"current"},...ngDevMode?[{debugName:"iconTone"}]:[]);showCountdown=n(()=>this.countdown()&&this.duration()>0&&this.dismissible()&&!this.leaving(),...ngDevMode?[{debugName:"showCountdown"}]:[]);reduceMotion=this.reduceMotionFlag;animClass=n(()=>{const e=this.animation();return e==="none"||this.reduceMotionFlag()?"":this.leaving()?Er[e]:Vr[e]},...ngDevMode?[{debugName:"animClass"}]:[]);constructor(){if(typeof window<"u"&&window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion: reduce)");this.reduceMotionFlag.set(e.matches);const a=()=>this.reduceMotionFlag.set(e.matches);e.addEventListener("change",a),this.destroyRef.onDestroy(()=>e.removeEventListener("change",a))}M(()=>{const e=this.open();if(!this.leaving()){if(e){this.clearExitTimer(),this.rendered()||this.rendered.set(!0),this.openSession||(this.openSession=!0,this.resetTicker());return}this.openSession=!1,this.rendered()&&this.beginClose()}})}ngOnDestroy(){this.stopTicker(),this.clearExitTimer()}dismiss(){!this.rendered()||this.leaving()||this.beginClose()}onAnimationEnd(e){this.leaving()&&e.target===e.currentTarget&&this.finishClose()}onRingEnded(e){e.target===e.currentTarget&&(!this.open()||this.leaving()||this.dismiss())}onPointerEnter(){!this.pauseOnHover()||this.leaving()||this.holdHoverPause||(this.hoverPaused=!0,this.syncPaused())}onPointerLeave(){this.holdHoverPause=!1,this.pauseOnHover()&&(this.hoverPaused=!1,this.syncPaused())}onFocusIn(e){!this.pauseOnFocus()||this.leaving()||this.holdFocusPause||e.target?.closest(".dga-toast-dismiss")||(this.focusPaused=!0,this.syncPaused())}onFocusOut(e){if(this.holdFocusPause=!1,!this.pauseOnFocus())return;const a=e.relatedTarget,s=e.currentTarget;s&&a&&s.contains(a)||(this.focusPaused=!1,this.syncPaused())}beginClose(){if(this.stopTicker(),this.hoverPaused=!1,this.focusPaused=!1,this.paused=!1,this.pausedUi.set(!1),this.animation()==="none"||this.reduceMotionFlag()){this.finishClose();return}this.leaving.set(!0),this.clearExitTimer(),this.exitTimer=setTimeout(()=>this.finishClose(),Br+80)}finishClose(){!this.rendered()&&!this.leaving()||(this.clearExitTimer(),this.stopTicker(),this.openSession=!1,this.closed.emit(),this.leaving.set(!1),this.rendered.set(!1),this.progress.set(1),this.pausedUi.set(!1),this.remainingMs=0,this.totalMs=0,this.open()&&this.open.set(!1))}resetTicker(){this.stopTicker(),this.holdHoverPause=!0,this.holdFocusPause=!0,this.hoverPaused=!1,this.focusPaused=!1,this.paused=!1,this.pausedUi.set(!1);const e=this.duration();if(e<=0){this.progress.set(1),this.remainingMs=0,this.totalMs=0;return}this.totalMs=e,this.remainingMs=e,this.progress.set(1),this.ringEpoch.update(a=>a+1),this.startTicker()}syncPaused(){const e=this.hoverPaused||this.focusPaused;e!==this.paused&&(this.paused=e,this.pausedUi.set(e),!this.paused&&this.open()&&this.remainingMs>0&&(this.lastTick=performance.now()))}startTicker(){if(this.stopTicker(),typeof window>"u")return;this.lastTick=performance.now();const e=a=>{if(!this.open()||this.leaving()){this.rafId=null;return}if(!this.paused){const s=a-this.lastTick;if(this.remainingMs=Math.max(0,this.remainingMs-s),this.remainingMs<=0){this.rafId=null,this.dismiss();return}}this.lastTick=a,this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}stopTicker(){this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}clearExitTimer(){this.exitTimer!==null&&(clearTimeout(this.exitTimer),this.exitTimer=null)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ae,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ae,isStandalone:!0,selector:"dga-toast",inputs:{open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},variant:{classPropertyName:"variant",publicName:"variant",isSignal:!0,isRequired:!1,transformFunction:null},title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},dismissible:{classPropertyName:"dismissible",publicName:"dismissible",isSignal:!0,isRequired:!1,transformFunction:null},closeLabel:{classPropertyName:"closeLabel",publicName:"closeLabel",isSignal:!0,isRequired:!1,transformFunction:null},duration:{classPropertyName:"duration",publicName:"duration",isSignal:!0,isRequired:!1,transformFunction:null},countdown:{classPropertyName:"countdown",publicName:"countdown",isSignal:!0,isRequired:!1,transformFunction:null},pauseOnHover:{classPropertyName:"pauseOnHover",publicName:"pauseOnHover",isSignal:!0,isRequired:!1,transformFunction:null},pauseOnFocus:{classPropertyName:"pauseOnFocus",publicName:"pauseOnFocus",isSignal:!0,isRequired:!1,transformFunction:null},animation:{classPropertyName:"animation",publicName:"animation",isSignal:!0,isRequired:!1,transformFunction:null},location:{classPropertyName:"location",publicName:"location",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",closed:"closed"},host:{properties:{class:"hostClass()","style.top":"edgeTop()","style.bottom":"edgeBottom()","attr.data-variant":"variant()","attr.data-location":"location()"}},ngImport:t,template:`
|
|
2662
|
+
`,changeDetection:h.OnPush,styles:["@keyframes dga-modal-fade-in{0%{opacity:0}to{opacity:1}}@keyframes dga-modal-fade-out{0%{opacity:1}to{opacity:0}}@keyframes dga-modal-scale-in{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}@keyframes dga-modal-scale-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}@keyframes dga-modal-slide-in{0%{opacity:0;transform:translateY(1rem)}to{opacity:1;transform:translateY(0)}}@keyframes dga-modal-slide-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(.75rem)}}.dga-modal-fade-in{animation:dga-modal-fade-in .18s ease-out both}.dga-modal-fade-out{animation:dga-modal-fade-out .14s ease-in both}.dga-modal-scale-in{animation:dga-modal-scale-in .2s ease-out both}.dga-modal-scale-out{animation:dga-modal-scale-out .15s ease-in both}.dga-modal-slide-in{animation:dga-modal-slide-in .22s ease-out both}.dga-modal-slide-out{animation:dga-modal-slide-out .16s ease-in both}\n"]}]}],ctorParameters:()=>[],propDecorators:{panel:[{type:t.ViewChild,args:["panel",{isSignal:!0}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],description:[{type:t.Input,args:[{isSignal:!0,alias:"description",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],animation:[{type:t.Input,args:[{isSignal:!0,alias:"animation",required:!1}]}],closeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],closeOnBackdrop:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnBackdrop",required:!1}]}],closeOnEscape:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnEscape",required:!1}]}],showClose:[{type:t.Input,args:[{isSignal:!0,alias:"showClose",required:!1}]}],scrollable:[{type:t.Input,args:[{isSignal:!0,alias:"scrollable",required:!1}]}],centered:[{type:t.Input,args:[{isSignal:!0,alias:"centered",required:!1}]}],closed:[{type:t.Output,args:["closed"]}],opened:[{type:t.Output,args:["opened"]}]}});const Rr={"top-start":"pointer-events-none fixed start-xl z-toast flex flex-col gap-md","top-center":"pointer-events-none fixed inset-x-0 z-toast flex justify-center px-xl","top-end":"pointer-events-none fixed end-xl z-toast flex flex-col gap-md","bottom-start":"pointer-events-none fixed start-xl z-toast flex flex-col gap-md","bottom-center":"pointer-events-none fixed inset-x-0 z-toast flex justify-center px-xl","bottom-end":"pointer-events-none fixed end-xl z-toast flex flex-col gap-md"},Tr="pointer-events-auto flex w-[min(100vw-2rem,24rem)] items-start gap-lg rounded-md border border-border bg-elevated px-3xl py-xl text-body-sm shadow-lg",Or={neutral:"text-paragraph",success:"border-s-8 border-s-border-success text-fg-success",info:"border-s-8 border-s-border-info text-fg-info",warning:"border-s-8 border-s-border-warning text-fg-warning",error:"border-s-8 border-s-border-error text-fg-error"},Ar={neutral:"info",success:"success",info:"info",warning:"warning",error:"error"},Vr={fade:"dga-toast-fade-in",push:"dga-toast-push-in",slide:"dga-toast-slide-in",scale:"dga-toast-scale-in"},Er={fade:"dga-toast-fade-out",push:"dga-toast-push-out",slide:"dga-toast-slide-out",scale:"dga-toast-scale-out"},$s=10,$r=2*Math.PI*$s,Br=180;class Ae{destroyRef=x(L);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);variant=i("info",...ngDevMode?[{debugName:"variant"}]:[]);title=i("",...ngDevMode?[{debugName:"title"}]:[]);dismissible=i(!0,{...ngDevMode?{debugName:"dismissible"}:{},transform:m});closeLabel=i("إغلاق",...ngDevMode?[{debugName:"closeLabel"}]:[]);duration=i(5e3,...ngDevMode?[{debugName:"duration"}]:[]);countdown=i(!0,{...ngDevMode?{debugName:"countdown"}:{},transform:m});pauseOnHover=i(!0,{...ngDevMode?{debugName:"pauseOnHover"}:{},transform:m});pauseOnFocus=i(!0,{...ngDevMode?{debugName:"pauseOnFocus"}:{},transform:m});animation=i("push",...ngDevMode?[{debugName:"animation"}]:[]);location=i("top-end",...ngDevMode?[{debugName:"location"}]:[]);closed=w();rendered=y(!1,...ngDevMode?[{debugName:"rendered"}]:[]);leaving=y(!1,...ngDevMode?[{debugName:"leaving"}]:[]);progress=y(1,...ngDevMode?[{debugName:"progress"}]:[]);pausedUi=y(!1,...ngDevMode?[{debugName:"pausedUi"}]:[]);ringEpoch=y(0,...ngDevMode?[{debugName:"ringEpoch"}]:[]);ringR=$s;ringC=$r;remainingMs=0;totalMs=0;paused=!1;hoverPaused=!1;focusPaused=!1;holdHoverPause=!1;holdFocusPause=!1;openSession=!1;rafId=null;lastTick=0;exitTimer=null;reduceMotionFlag=y(!1,...ngDevMode?[{debugName:"reduceMotionFlag"}]:[]);classes=n(()=>f(Tr,Or[this.variant()],this.animClass()),...ngDevMode?[{debugName:"classes"}]:[]);hostClass=n(()=>Rr[this.location()],...ngDevMode?[{debugName:"hostClass"}]:[]);isTop=n(()=>this.location().startsWith("top"),...ngDevMode?[{debugName:"isTop"}]:[]);edgeTop=n(()=>this.isTop()?"calc(var(--dga-announcement-offset, 0px) + 1rem)":null,...ngDevMode?[{debugName:"edgeTop"}]:[]);edgeBottom=n(()=>this.isTop()?null:"1rem",...ngDevMode?[{debugName:"edgeBottom"}]:[]);iconName=n(()=>Ar[this.variant()],...ngDevMode?[{debugName:"iconName"}]:[]);iconTone=n(()=>{const e=this.variant();return e==="success"?"success":e==="warning"?"warning":e==="error"?"error":e==="neutral"?"muted":"current"},...ngDevMode?[{debugName:"iconTone"}]:[]);showCountdown=n(()=>this.countdown()&&this.duration()>0&&this.dismissible()&&!this.leaving(),...ngDevMode?[{debugName:"showCountdown"}]:[]);reduceMotion=this.reduceMotionFlag;animClass=n(()=>{const e=this.animation();return e==="none"||this.reduceMotionFlag()?"":this.leaving()?Er[e]:Vr[e]},...ngDevMode?[{debugName:"animClass"}]:[]);constructor(){if(typeof window<"u"&&window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion: reduce)");this.reduceMotionFlag.set(e.matches);const a=()=>this.reduceMotionFlag.set(e.matches);e.addEventListener("change",a),this.destroyRef.onDestroy(()=>e.removeEventListener("change",a))}M(()=>{const e=this.open();if(!this.leaving()){if(e){this.clearExitTimer(),this.rendered()||this.rendered.set(!0),this.openSession||(this.openSession=!0,this.resetTicker());return}this.openSession=!1,this.rendered()&&this.beginClose()}})}ngOnDestroy(){this.stopTicker(),this.clearExitTimer()}dismiss(){!this.rendered()||this.leaving()||this.beginClose()}onAnimationEnd(e){this.leaving()&&e.target===e.currentTarget&&this.finishClose()}onRingEnded(e){e.target===e.currentTarget&&(!this.open()||this.leaving()||this.dismiss())}onPointerEnter(){!this.pauseOnHover()||this.leaving()||this.holdHoverPause||(this.hoverPaused=!0,this.syncPaused())}onPointerLeave(){this.holdHoverPause=!1,this.pauseOnHover()&&(this.hoverPaused=!1,this.syncPaused())}onFocusIn(e){!this.pauseOnFocus()||this.leaving()||this.holdFocusPause||e.target?.closest(".dga-toast-dismiss")||(this.focusPaused=!0,this.syncPaused())}onFocusOut(e){if(this.holdFocusPause=!1,!this.pauseOnFocus())return;const a=e.relatedTarget,s=e.currentTarget;s&&a&&s.contains(a)||(this.focusPaused=!1,this.syncPaused())}beginClose(){if(this.stopTicker(),this.hoverPaused=!1,this.focusPaused=!1,this.paused=!1,this.pausedUi.set(!1),this.animation()==="none"||this.reduceMotionFlag()){this.finishClose();return}this.leaving.set(!0),this.clearExitTimer(),this.exitTimer=setTimeout(()=>this.finishClose(),Br+80)}finishClose(){!this.rendered()&&!this.leaving()||(this.clearExitTimer(),this.stopTicker(),this.openSession=!1,this.closed.emit(),this.leaving.set(!1),this.rendered.set(!1),this.progress.set(1),this.pausedUi.set(!1),this.remainingMs=0,this.totalMs=0,this.open()&&this.open.set(!1))}resetTicker(){this.stopTicker(),this.holdHoverPause=!0,this.holdFocusPause=!0,this.hoverPaused=!1,this.focusPaused=!1,this.paused=!1,this.pausedUi.set(!1);const e=this.duration();if(e<=0){this.progress.set(1),this.remainingMs=0,this.totalMs=0;return}this.totalMs=e,this.remainingMs=e,this.progress.set(1),this.ringEpoch.update(a=>a+1),this.startTicker()}syncPaused(){const e=this.hoverPaused||this.focusPaused;e!==this.paused&&(this.paused=e,this.pausedUi.set(e),!this.paused&&this.open()&&this.remainingMs>0&&(this.lastTick=performance.now()))}startTicker(){if(this.stopTicker(),typeof window>"u")return;this.lastTick=performance.now();const e=a=>{if(!this.open()||this.leaving()){this.rafId=null;return}if(!this.paused){const s=a-this.lastTick;if(this.remainingMs=Math.max(0,this.remainingMs-s),this.remainingMs<=0){this.rafId=null,this.dismiss();return}}this.lastTick=a,this.rafId=requestAnimationFrame(e)};this.rafId=requestAnimationFrame(e)}stopTicker(){this.rafId!==null&&(cancelAnimationFrame(this.rafId),this.rafId=null)}clearExitTimer(){this.exitTimer!==null&&(clearTimeout(this.exitTimer),this.exitTimer=null)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ae,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ae,isStandalone:!0,selector:"dga-toast",inputs:{open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},variant:{classPropertyName:"variant",publicName:"variant",isSignal:!0,isRequired:!1,transformFunction:null},title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},dismissible:{classPropertyName:"dismissible",publicName:"dismissible",isSignal:!0,isRequired:!1,transformFunction:null},closeLabel:{classPropertyName:"closeLabel",publicName:"closeLabel",isSignal:!0,isRequired:!1,transformFunction:null},duration:{classPropertyName:"duration",publicName:"duration",isSignal:!0,isRequired:!1,transformFunction:null},countdown:{classPropertyName:"countdown",publicName:"countdown",isSignal:!0,isRequired:!1,transformFunction:null},pauseOnHover:{classPropertyName:"pauseOnHover",publicName:"pauseOnHover",isSignal:!0,isRequired:!1,transformFunction:null},pauseOnFocus:{classPropertyName:"pauseOnFocus",publicName:"pauseOnFocus",isSignal:!0,isRequired:!1,transformFunction:null},animation:{classPropertyName:"animation",publicName:"animation",isSignal:!0,isRequired:!1,transformFunction:null},location:{classPropertyName:"location",publicName:"location",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",closed:"closed"},host:{properties:{class:"hostClass()","style.top":"edgeTop()","style.bottom":"edgeBottom()","attr.data-variant":"variant()","attr.data-location":"location()"}},ngImport:t,template:`
|
|
2645
2663
|
@if (rendered()) {
|
|
2646
2664
|
<div
|
|
2647
2665
|
[class]="classes()"
|
|
@@ -2801,7 +2819,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
2801
2819
|
}
|
|
2802
2820
|
</div>
|
|
2803
2821
|
}
|
|
2804
|
-
`,changeDetection:h.OnPush,host:{"[class]":"hostClass()","[style.top]":"edgeTop()","[style.bottom]":"edgeBottom()","[attr.data-variant]":"variant()","[attr.data-location]":"location()"},styles:[".dga-toast-ring-progress{stroke-dashoffset:0;animation-name:dga-toast-ring;animation-timing-function:linear;animation-fill-mode:forwards}.dga-toast-ring-progress.is-paused{animation-play-state:paused}@keyframes dga-toast-ring{0%{stroke-dashoffset:0}to{stroke-dashoffset:62.8318530718}}@keyframes dga-toast-fade-in{0%{opacity:0}to{opacity:1}}@keyframes dga-toast-fade-out{0%{opacity:1}to{opacity:0}}@keyframes dga-toast-push-in{0%{opacity:0;transform:translateY(var(--dga-toast-push-from, -.75rem))}to{opacity:1;transform:translateY(0)}}@keyframes dga-toast-push-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(var(--dga-toast-push-out, -.5rem))}}@keyframes dga-toast-slide-in{0%{opacity:0;transform:translate(var(--dga-toast-slide-from, .75rem))}to{opacity:1;transform:translate(0)}}@keyframes dga-toast-slide-out{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(var(--dga-toast-slide-from, .75rem))}}@keyframes dga-toast-scale-in{0%{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}@keyframes dga-toast-scale-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}.dga-toast-fade-in{animation:dga-toast-fade-in .2s ease-out both}.dga-toast-fade-out{animation:dga-toast-fade-out .16s ease-in both}.dga-toast-push-in{--dga-toast-push-from: -.75rem;--dga-toast-push-out: -.5rem;animation:dga-toast-push-in .24s ease-out both}.dga-toast-push-out{--dga-toast-push-from: -.75rem;--dga-toast-push-out: -.5rem;animation:dga-toast-push-out .18s ease-in both}:host([data-location^=\"bottom\"]) .dga-toast-push-in,:host([data-location^=\"bottom\"]) .dga-toast-push-out{--dga-toast-push-from: .75rem;--dga-toast-push-out: .5rem}.dga-toast-slide-in{--dga-toast-slide-from: .75rem;animation:dga-toast-slide-in .24s ease-out both}.dga-toast-slide-out{--dga-toast-slide-from: .75rem;animation:dga-toast-slide-out .18s ease-in both}:host([data-location$=\"-start\"]) .dga-toast-slide-in,:host([data-location$=\"-start\"]) .dga-toast-slide-out{--dga-toast-slide-from: -.75rem}:host([data-location$=\"-end\"]) .dga-toast-slide-in,:host([data-location$=\"-end\"]) .dga-toast-slide-out{--dga-toast-slide-from: .75rem}:host([data-location$=\"-center\"]) .dga-toast-slide-in,:host([data-location$=\"-center\"]) .dga-toast-slide-out{--dga-toast-slide-from: 0}:host-context([dir=\"rtl\"])[data-location$=-start] .dga-toast-slide-in,:host-context([dir=\"rtl\"])[data-location$=-start] .dga-toast-slide-out{--dga-toast-slide-from: .75rem}:host-context([dir=\"rtl\"])[data-location$=-end] .dga-toast-slide-in,:host-context([dir=\"rtl\"])[data-location$=-end] .dga-toast-slide-out{--dga-toast-slide-from: -.75rem}.dga-toast-scale-in{animation:dga-toast-scale-in .22s ease-out both}.dga-toast-scale-out{animation:dga-toast-scale-out .16s ease-in both}@media(prefers-reduced-motion:reduce){.dga-toast-ring-progress,.dga-toast-fade-in,.dga-toast-fade-out,.dga-toast-push-in,.dga-toast-push-out,.dga-toast-slide-in,.dga-toast-slide-out,.dga-toast-scale-in,.dga-toast-scale-out{animation:none}}\n"]}]}],ctorParameters:()=>[],propDecorators:{open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],variant:[{type:t.Input,args:[{isSignal:!0,alias:"variant",required:!1}]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],dismissible:[{type:t.Input,args:[{isSignal:!0,alias:"dismissible",required:!1}]}],closeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],duration:[{type:t.Input,args:[{isSignal:!0,alias:"duration",required:!1}]}],countdown:[{type:t.Input,args:[{isSignal:!0,alias:"countdown",required:!1}]}],pauseOnHover:[{type:t.Input,args:[{isSignal:!0,alias:"pauseOnHover",required:!1}]}],pauseOnFocus:[{type:t.Input,args:[{isSignal:!0,alias:"pauseOnFocus",required:!1}]}],animation:[{type:t.Input,args:[{isSignal:!0,alias:"animation",required:!1}]}],location:[{type:t.Input,args:[{isSignal:!0,alias:"location",required:!1}]}],closed:[{type:t.Output,args:["closed"]}]}});class ue{seq=0;outletCount=0;fallbackTimer=null;fallbackEl=null;request=y(null,...ngDevMode?[{debugName:"request"}]:[]);registerOutlet(){return this.outletCount+=1,()=>{this.outletCount=Math.max(0,this.outletCount-1)}}show(e={}){const a
|
|
2822
|
+
`,changeDetection:h.OnPush,host:{"[class]":"hostClass()","[style.top]":"edgeTop()","[style.bottom]":"edgeBottom()","[attr.data-variant]":"variant()","[attr.data-location]":"location()"},styles:[".dga-toast-ring-progress{stroke-dashoffset:0;animation-name:dga-toast-ring;animation-timing-function:linear;animation-fill-mode:forwards}.dga-toast-ring-progress.is-paused{animation-play-state:paused}@keyframes dga-toast-ring{0%{stroke-dashoffset:0}to{stroke-dashoffset:62.8318530718}}@keyframes dga-toast-fade-in{0%{opacity:0}to{opacity:1}}@keyframes dga-toast-fade-out{0%{opacity:1}to{opacity:0}}@keyframes dga-toast-push-in{0%{opacity:0;transform:translateY(var(--dga-toast-push-from, -.75rem))}to{opacity:1;transform:translateY(0)}}@keyframes dga-toast-push-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(var(--dga-toast-push-out, -.5rem))}}@keyframes dga-toast-slide-in{0%{opacity:0;transform:translate(var(--dga-toast-slide-from, .75rem))}to{opacity:1;transform:translate(0)}}@keyframes dga-toast-slide-out{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(var(--dga-toast-slide-from, .75rem))}}@keyframes dga-toast-scale-in{0%{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}@keyframes dga-toast-scale-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}.dga-toast-fade-in{animation:dga-toast-fade-in .2s ease-out both}.dga-toast-fade-out{animation:dga-toast-fade-out .16s ease-in both}.dga-toast-push-in{--dga-toast-push-from: -.75rem;--dga-toast-push-out: -.5rem;animation:dga-toast-push-in .24s ease-out both}.dga-toast-push-out{--dga-toast-push-from: -.75rem;--dga-toast-push-out: -.5rem;animation:dga-toast-push-out .18s ease-in both}:host([data-location^=\"bottom\"]) .dga-toast-push-in,:host([data-location^=\"bottom\"]) .dga-toast-push-out{--dga-toast-push-from: .75rem;--dga-toast-push-out: .5rem}.dga-toast-slide-in{--dga-toast-slide-from: .75rem;animation:dga-toast-slide-in .24s ease-out both}.dga-toast-slide-out{--dga-toast-slide-from: .75rem;animation:dga-toast-slide-out .18s ease-in both}:host([data-location$=\"-start\"]) .dga-toast-slide-in,:host([data-location$=\"-start\"]) .dga-toast-slide-out{--dga-toast-slide-from: -.75rem}:host([data-location$=\"-end\"]) .dga-toast-slide-in,:host([data-location$=\"-end\"]) .dga-toast-slide-out{--dga-toast-slide-from: .75rem}:host([data-location$=\"-center\"]) .dga-toast-slide-in,:host([data-location$=\"-center\"]) .dga-toast-slide-out{--dga-toast-slide-from: 0}:host-context([dir=\"rtl\"])[data-location$=-start] .dga-toast-slide-in,:host-context([dir=\"rtl\"])[data-location$=-start] .dga-toast-slide-out{--dga-toast-slide-from: .75rem}:host-context([dir=\"rtl\"])[data-location$=-end] .dga-toast-slide-in,:host-context([dir=\"rtl\"])[data-location$=-end] .dga-toast-slide-out{--dga-toast-slide-from: -.75rem}.dga-toast-scale-in{animation:dga-toast-scale-in .22s ease-out both}.dga-toast-scale-out{animation:dga-toast-scale-out .16s ease-in both}@media(prefers-reduced-motion:reduce){.dga-toast-ring-progress,.dga-toast-fade-in,.dga-toast-fade-out,.dga-toast-push-in,.dga-toast-push-out,.dga-toast-slide-in,.dga-toast-slide-out,.dga-toast-scale-in,.dga-toast-scale-out{animation:none}}\n"]}]}],ctorParameters:()=>[],propDecorators:{open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],variant:[{type:t.Input,args:[{isSignal:!0,alias:"variant",required:!1}]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],dismissible:[{type:t.Input,args:[{isSignal:!0,alias:"dismissible",required:!1}]}],closeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],duration:[{type:t.Input,args:[{isSignal:!0,alias:"duration",required:!1}]}],countdown:[{type:t.Input,args:[{isSignal:!0,alias:"countdown",required:!1}]}],pauseOnHover:[{type:t.Input,args:[{isSignal:!0,alias:"pauseOnHover",required:!1}]}],pauseOnFocus:[{type:t.Input,args:[{isSignal:!0,alias:"pauseOnFocus",required:!1}]}],animation:[{type:t.Input,args:[{isSignal:!0,alias:"animation",required:!1}]}],location:[{type:t.Input,args:[{isSignal:!0,alias:"location",required:!1}]}],closed:[{type:t.Output,args:["closed"]}]}});class ue{seq=0;outletCount=0;fallbackTimer=null;fallbackEl=null;request=y(null,...ngDevMode?[{debugName:"request"}]:[]);registerOutlet(){return this.outletCount+=1,()=>{this.outletCount=Math.max(0,this.outletCount-1)}}show(e={}){const a=Bs(),s=e.variant??"success",r=e.title??(s==="success"?a?"تم النسخ":"Copied":""),l=e.message??(s==="success"?a?"تم نسخ المحتوى إلى الحافظة":"Content copied to clipboard":""),u=e.duration??5e3,o={id:++this.seq,variant:s,title:r,message:l,dismissible:e.dismissible??!0,duration:u,countdown:e.countdown??u>0,pauseOnHover:e.pauseOnHover??!0,pauseOnFocus:e.pauseOnFocus??!0,animation:e.animation??"push",location:e.location??"top-end"};this.clearFallback(),this.request.set(o),this.outletCount===0&&this.showFallback(o,a)}copied(e,a){const s=Bs();this.show({variant:"success",title:a??(s?"تم النسخ":"Copied"),message:e??(s?"تم نسخ المحتوى إلى الحافظة":"Content copied to clipboard"),duration:2600})}dismiss(){this.request.set(null),this.clearFallback()}showFallback(e,a){if(typeof document>"u")return;const s=document.createElement("div");s.setAttribute("role","status"),s.setAttribute("aria-live","polite");const r=e.location,l=r.startsWith("top"),u=r.endsWith("start")?"inset-inline-start:1rem;":r.endsWith("end")?"inset-inline-end:1rem;":"inset-inline:0;margin-inline:auto;width:max-content;",o=l?"top:calc(var(--dga-announcement-offset, 0px) + 1rem);":"bottom:1rem;";s.style.cssText=`position:fixed;${u}${o}z-index:var(--z-index-toast);max-width:min(100vw - 2rem,24rem);padding:0.875rem 1rem;border-radius:0.5rem;border:1px solid;box-shadow:0 8px 24px rgb(0 0 0 / 12%);background:var(--dga-bg-elevated,#fff);color:var(--dga-text-default,#111);border-color:var(--dga-border-success,#12b76a);border-inline-start-width:8px;font:inherit;animation:dga-toast-fallback-in 280ms ease-out`,s.innerHTML=`<strong style="display:block;margin-bottom:0.25rem">${js(e.title||(a?"تم النسخ":"Copied"))}</strong><span>${js(e.message)}</span>`,jr(),document.body.appendChild(s),this.fallbackEl=s,e.duration>0&&(this.fallbackTimer=setTimeout(()=>this.clearFallback(),e.duration))}clearFallback(){this.fallbackTimer!==null&&(clearTimeout(this.fallbackTimer),this.fallbackTimer=null),this.fallbackEl?.remove(),this.fallbackEl=null}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ue,deps:[],target:t.ɵɵFactoryTarget.Injectable});static ɵprov=t.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ue,providedIn:"root"})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ue,decorators:[{type:Ha,args:[{providedIn:"root"}]}]});function Bs(){return typeof document>"u"?!0:(document.documentElement.lang||"ar").toLowerCase().startsWith("ar")}function js(d){return d.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}let Hs=!1;function jr(){if(Hs||typeof document>"u")return;Hs=!0;const d=document.createElement("style");d.textContent="@keyframes dga-toast-fallback-in{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}",document.head.appendChild(d)}class Ot{toasts=x(ue);destroyRef=x(L);req=this.toasts.request;active=n(()=>{const e=this.req();return e?[e]:[]},...ngDevMode?[{debugName:"active"}]:[]);closeLabel=typeof document<"u"&&document.documentElement.lang.startsWith("ar")?"إغلاق":"Close";constructor(){const e=this.toasts.registerOutlet();this.destroyRef.onDestroy(e)}onClosed(e){this.req()?.id===e&&this.toasts.dismiss()}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ot,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ot,isStandalone:!0,selector:"dga-toast-outlet",host:{classAttribute:"contents"},ngImport:t,template:`
|
|
2805
2823
|
@for (toast of active(); track toast.id) {
|
|
2806
2824
|
<dga-toast
|
|
2807
2825
|
[open]="true"
|
|
@@ -2820,7 +2838,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
2820
2838
|
{{ toast.message }}
|
|
2821
2839
|
</dga-toast>
|
|
2822
2840
|
}
|
|
2823
|
-
`,isInline:!0,dependencies:[{kind:"component",type:Ae,selector:"dga-toast",inputs:["open","variant","title","dismissible","closeLabel","duration","countdown","pauseOnHover","pauseOnFocus","animation","location"],outputs:["openChange","closed"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:
|
|
2841
|
+
`,isInline:!0,dependencies:[{kind:"component",type:Ae,selector:"dga-toast",inputs:["open","variant","title","dismissible","closeLabel","duration","countdown","pauseOnHover","pauseOnFocus","animation","location"],outputs:["openChange","closed"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ot,decorators:[{type:v,args:[{selector:"dga-toast-outlet",standalone:!0,imports:[Ae],template:`
|
|
2824
2842
|
@for (toast of active(); track toast.id) {
|
|
2825
2843
|
<dga-toast
|
|
2826
2844
|
[open]="true"
|
|
@@ -2839,7 +2857,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
2839
2857
|
{{ toast.message }}
|
|
2840
2858
|
</dga-toast>
|
|
2841
2859
|
}
|
|
2842
|
-
`,changeDetection:h.OnPush,host:{class:"contents"}}]}],ctorParameters:()=>[]});class E{static seq=0;host=x(F);destroyRef=x(L);text=i.required(...ngDevMode?[{debugName:"text"}]:[]);title=i("",...ngDevMode?[{debugName:"title"}]:[]);placement=i("top",...ngDevMode?[{debugName:"placement"}]:[]);variant=i("default",...ngDevMode?[{debugName:"variant"}]:[]);showIcon=i(!0,{...ngDevMode?{debugName:"showIcon"}:{},transform:m});disabled=i(!1,{...ngDevMode?{debugName:"disabled"}:{},transform:m});showDelay=i(120,...ngDevMode?[{debugName:"showDelay"}]:[]);hideDelay=i(80,...ngDevMode?[{debugName:"hideDelay"}]:[]);dismissMs=i(2800,...ngDevMode?[{debugName:"dismissMs"}]:[]);portaled=i(!1,{...ngDevMode?{debugName:"portaled"}:{},transform:m});open=y(!1,...ngDevMode?[{debugName:"open"}]:[]);portaledStyle=y({},...ngDevMode?[{debugName:"portaledStyle"}]:[]);tipId=`dga-tip-${++E.seq}`;tipEl=R("tipEl",...ngDevMode?[{debugName:"tipEl"}]:[]);injector=x(G);showTimer=null;hideTimer=null;dismissTimer=null;touchPinned=!1;constructor(){this.destroyRef.onDestroy(()=>{this.clearTimers(),this.portaledStyle.set({}),typeof window<"u"&&(window.removeEventListener("scroll",this.onScrollCapture,!0),window.removeEventListener("resize",this.onResize,!0))}),typeof window<"u"&&(window.addEventListener("scroll",this.onScrollCapture,!0),window.addEventListener("resize",this.onResize,!0)),M(()=>{(this.disabled()||!this.text())&&this.hide()}),M(()=>{const e=this.open()&&this.portaled()&&!!this.text();fs(()=>{e?
|
|
2860
|
+
`,changeDetection:h.OnPush,host:{class:"contents"}}]}],ctorParameters:()=>[]});class E{static seq=0;host=x(F);destroyRef=x(L);text=i.required(...ngDevMode?[{debugName:"text"}]:[]);title=i("",...ngDevMode?[{debugName:"title"}]:[]);placement=i("top",...ngDevMode?[{debugName:"placement"}]:[]);variant=i("default",...ngDevMode?[{debugName:"variant"}]:[]);showIcon=i(!0,{...ngDevMode?{debugName:"showIcon"}:{},transform:m});disabled=i(!1,{...ngDevMode?{debugName:"disabled"}:{},transform:m});showDelay=i(120,...ngDevMode?[{debugName:"showDelay"}]:[]);hideDelay=i(80,...ngDevMode?[{debugName:"hideDelay"}]:[]);dismissMs=i(2800,...ngDevMode?[{debugName:"dismissMs"}]:[]);portaled=i(!1,{...ngDevMode?{debugName:"portaled"}:{},transform:m});open=y(!1,...ngDevMode?[{debugName:"open"}]:[]);portaledStyle=y({},...ngDevMode?[{debugName:"portaledStyle"}]:[]);tipId=`dga-tip-${++E.seq}`;tipEl=R("tipEl",...ngDevMode?[{debugName:"tipEl"}]:[]);injector=x(G);showTimer=null;hideTimer=null;dismissTimer=null;touchPinned=!1;constructor(){this.destroyRef.onDestroy(()=>{this.clearTimers(),this.portaledStyle.set({}),typeof window<"u"&&(window.removeEventListener("scroll",this.onScrollCapture,!0),window.removeEventListener("resize",this.onResize,!0))}),typeof window<"u"&&(window.addEventListener("scroll",this.onScrollCapture,!0),window.addEventListener("resize",this.onResize,!0)),M(()=>{(this.disabled()||!this.text())&&this.hide()}),M(()=>{const e=this.open()&&this.portaled()&&!!this.text();fs(()=>{e?T(()=>this.syncPortaledTip(),{injector:this.injector}):this.portaledStyle.set({})})})}onResize=()=>{this.open()&&this.portaled()&&this.syncPortaledTip()};onScrollCapture=()=>{this.open()&&this.hide()};onDocPointer(e){this.open()&&(this.host.nativeElement.contains(e.target)||this.hide())}onDocEscape(){this.open()&&this.hide()}onWindowBlur(){this.open()&&this.hide()}onVisibility(){typeof document<"u"&&document.visibilityState==="hidden"&&this.hide()}onEnter(e){e.pointerType!=="touch"&&(this.touchPinned=!1,this.showSoon())}onLeave(e){e.pointerType!=="touch"&&(this.touchPinned||this.hideSoon())}onFocusOut(e){const a=e.relatedTarget;a&&this.host.nativeElement.contains(a)||this.touchPinned||this.hideSoon()}onClick(e){this.disabled()||!this.text()||e.detail===0||!this.isCoarsePointer()||e.target?.closest?.('button, a[href], input, select, textarea, summary, [role="button"], [role="menuitem"], [role="option"], [role="switch"], [role="checkbox"], [role="radio"]')||(e.preventDefault(),e.stopPropagation(),this.toggleTouch())}showSoon(){this.disabled()||!this.text()||(this.clearHide(),this.clearDismiss(),!this.open()&&(this.clearShow(),this.showTimer=setTimeout(()=>{this.open.set(!0),this.showTimer=null},this.showDelay())))}hideSoon(){this.clearShow(),this.clearHide(),this.hideTimer=setTimeout(()=>{this.open.set(!1),this.hideTimer=null,this.touchPinned=!1},this.hideDelay())}show(){this.disabled()||!this.text()||(this.clearTimers(),this.open.set(!0))}hide(){this.clearTimers(),this.touchPinned=!1,this.portaledStyle.set({}),this.open.set(!1)}syncPortaledTip(){if(typeof document>"u"||!this.open()||!this.portaled())return;const e=this.tipEl()?.nativeElement,a=this.host.nativeElement.querySelector(".dga-tip__trigger");if(!e||!a)return;e.parentElement!==document.body&&document.body.appendChild(e),e.style.visibility="hidden",e.style.position="fixed",e.style.top="0",e.style.left="0";const s=a.getBoundingClientRect(),r=e.getBoundingClientRect(),l=10,u=this.placement(),o=getComputedStyle(this.host.nativeElement).direction==="rtl"||typeof document<"u"&&document.documentElement.getAttribute("dir")==="rtl",c=window.innerWidth,p=window.innerHeight;let g=0,b=0;switch(u){case"bottom":g=s.bottom+l,b=s.left+s.width/2-r.width/2;break;case"start":g=s.top+s.height/2-r.height/2,b=o?s.right+l:s.left-r.width-l;break;case"end":g=s.top+s.height/2-r.height/2,b=o?s.left-r.width-l:s.right+l;break;default:g=s.top-r.height-l,b=s.left+s.width/2-r.width/2;break}b=Math.min(Math.max(8,b),c-r.width-8),g=Math.min(Math.max(8,g),p-r.height-8),this.portaledStyle.set({position:"fixed",top:`${Math.round(g)}px`,left:`${Math.round(b)}px`,visibility:"visible"})}toggle(){this.open()?this.hide():this.show()}toggleTouch(){if(this.open()&&this.touchPinned){this.hide();return}this.touchPinned=!0,this.show(),this.scheduleDismiss()}scheduleDismiss(){this.clearDismiss();const e=this.dismissMs();e<=0||(this.dismissTimer=setTimeout(()=>{this.dismissTimer=null,this.hide()},e))}isCoarsePointer(){return typeof window<"u"&&window.matchMedia("(hover: none), (pointer: coarse)").matches}clearShow(){this.showTimer!==null&&(clearTimeout(this.showTimer),this.showTimer=null)}clearHide(){this.hideTimer!==null&&(clearTimeout(this.hideTimer),this.hideTimer=null)}clearDismiss(){this.dismissTimer!==null&&(clearTimeout(this.dismissTimer),this.dismissTimer=null)}clearTimers(){this.clearShow(),this.clearHide(),this.clearDismiss()}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:E,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:E,isStandalone:!0,selector:"dga-tooltip",inputs:{text:{classPropertyName:"text",publicName:"text",isSignal:!0,isRequired:!0,transformFunction:null},title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},placement:{classPropertyName:"placement",publicName:"placement",isSignal:!0,isRequired:!1,transformFunction:null},variant:{classPropertyName:"variant",publicName:"variant",isSignal:!0,isRequired:!1,transformFunction:null},showIcon:{classPropertyName:"showIcon",publicName:"showIcon",isSignal:!0,isRequired:!1,transformFunction:null},disabled:{classPropertyName:"disabled",publicName:"disabled",isSignal:!0,isRequired:!1,transformFunction:null},showDelay:{classPropertyName:"showDelay",publicName:"showDelay",isSignal:!0,isRequired:!1,transformFunction:null},hideDelay:{classPropertyName:"hideDelay",publicName:"hideDelay",isSignal:!0,isRequired:!1,transformFunction:null},dismissMs:{classPropertyName:"dismissMs",publicName:"dismissMs",isSignal:!0,isRequired:!1,transformFunction:null},portaled:{classPropertyName:"portaled",publicName:"portaled",isSignal:!0,isRequired:!1,transformFunction:null}},host:{listeners:{"document:pointerdown":"onDocPointer($event)","document:keydown.escape":"onDocEscape()","window:blur":"onWindowBlur()","document:visibilitychange":"onVisibility()"},properties:{"attr.data-open":"open() || null","attr.data-placement":"placement()","attr.data-variant":"variant()"}},viewQueries:[{propertyName:"tipEl",first:!0,predicate:["tipEl"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
2843
2861
|
<span
|
|
2844
2862
|
class="dga-tip__trigger"
|
|
2845
2863
|
[attr.aria-describedby]="open() ? tipId : null"
|
|
@@ -2955,7 +2973,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
2955
2973
|
</span>
|
|
2956
2974
|
</span>
|
|
2957
2975
|
}
|
|
2958
|
-
`,changeDetection:h.OnPush,host:{"[attr.data-open]":"open() || null","[attr.data-placement]":"placement()","[attr.data-variant]":"variant()"},styles:[":host{position:relative;display:inline-flex;max-width:100%;vertical-align:middle}:host .dga-tip__trigger{display:inline-flex;height:100%;max-width:100%;align-items:stretch}:host .dga-tip{position:absolute;z-index:var(--z-index-dropdown);box-sizing:border-box;width:max-content;max-width:min(240px,calc(100vw - 2rem));border-radius:var(--radius-sm, 4px);box-shadow:var(--shadow-lg);font-family:var(--font-sans, \"IBM Plex Sans Arabic\", \"IBM Plex Sans\", system-ui, sans-serif);text-align:start;pointer-events:none;animation:dga-tip-in .14s ease-out forwards}:host .dga-tip--portaled,:host .dga-tip[data-portaled]{position:fixed;z-index:var(--z-index-popover, 400);margin:0;transform:none;inset:auto;inset-inline:auto;inset-block:auto}:host .dga-tip__inner{display:flex;flex-direction:column;gap:4px;padding:var(--spacing-lg, 12px);position:relative}:host .dga-tip__head{display:flex;align-items:center;gap:var(--spacing-md, 8px);min-width:0}:host .dga-tip__title{margin:0;min-width:0;flex:1 1 auto;font-size:var(--dga-font-text-xs, 12px);font-weight:600;line-height:var(--dga-leading-text-xs, 18px);letter-spacing:0}:host .dga-tip__body{margin:0;font-size:var(--dga-font-text-xs, 12px);font-weight:400;line-height:var(--dga-leading-text-xs, 18px);letter-spacing:0;overflow-wrap:anywhere}:host .dga-tip[data-has-title][data-has-icon] .dga-tip__body:not(.dga-tip__body--inline){padding-inline-start:calc(20px + var(--spacing-md, 8px))}:host .dga-tip__icon{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:20px;height:20px;line-height:0}:host .dga-tip__icon svg{display:block;width:20px;height:20px;overflow:visible}:host .dga-tip__disc{fill:var(--dga-color-neutral-800, #1f2a37)}:host .dga-tip__mark{fill:#fff}:host .dga-tip[data-variant=default]{background:var(--color-card, #fff)}:host .dga-tip[data-variant=default] .dga-tip__title{color:var(--color-display, #1f2a37)}:host .dga-tip[data-variant=default] .dga-tip__body{color:var(--color-paragraph, #384250)}:host .dga-tip[data-variant=inverted]{background:var(--dga-color-neutral-800, #1f2a37)}:host .dga-tip[data-variant=inverted] .dga-tip__title,:host .dga-tip[data-variant=inverted] .dga-tip__body{color:#fff}:host .dga-tip[data-variant=inverted] .dga-tip__disc{fill:#fff}:host .dga-tip[data-variant=inverted] .dga-tip__mark{fill:var(--dga-color-neutral-800, #1f2a37)}:host .dga-tip[data-placement=top]{bottom:100%;left:50%;transform:translate(-50%);margin-bottom:10px}:host .dga-tip[data-placement=bottom]{top:100%;left:50%;transform:translate(-50%);margin-top:10px}:host .dga-tip[data-placement=start]{inset-inline-end:100%;top:50%;transform:translateY(-50%);margin-inline-end:10px}:host .dga-tip[data-placement=end]{inset-inline-start:100%;top:50%;transform:translateY(-50%);margin-inline-start:10px}:host .dga-tip__beak{position:absolute;width:0;height:0;border-style:solid;pointer-events:none;z-index:1}:host .dga-tip[data-placement=top] .dga-tip__beak{left:50%;top:calc(100% - 1px);transform:translate(-50%);border-width:6px 6px 0}:host .dga-tip[data-placement=bottom] .dga-tip__beak{left:50%;bottom:calc(100% - 1px);transform:translate(-50%);border-width:0 6px 6px}:host .dga-tip[data-placement=start] .dga-tip__beak{inset-block-start:50%;inset-inline-end:-5px;transform:translateY(-50%);border-width:6px 0 6px 6px}:host .dga-tip[data-placement=end] .dga-tip__beak{inset-block-start:50%;inset-inline-start:-5px;transform:translateY(-50%);border-width:6px 6px 6px 0}:host .dga-tip[data-variant=default][data-placement=top] .dga-tip__beak{border-color:var(--color-card, #fff) transparent transparent}:host .dga-tip[data-variant=default][data-placement=bottom] .dga-tip__beak{border-color:transparent transparent var(--color-card, #fff)}:host .dga-tip[data-variant=default][data-placement=start] .dga-tip__beak{border-color:transparent transparent transparent var(--color-card, #fff)}:host .dga-tip[data-variant=default][data-placement=end] .dga-tip__beak{border-color:transparent var(--color-card, #fff) transparent transparent}:host-context([dir=\"rtl\"]) .dga-tip[data-placement=start] .dga-tip__beak{border-width:6px 6px 6px 0}:host-context([dir=\"rtl\"]) .dga-tip[data-placement=end] .dga-tip__beak{border-width:6px 0 6px 6px}:host-context([dir=\"rtl\"]) .dga-tip[data-variant=default][data-placement=start] .dga-tip__beak{border-color:transparent var(--color-card, #fff) transparent transparent}:host-context([dir=\"rtl\"]) .dga-tip[data-variant=default][data-placement=end] .dga-tip__beak{border-color:transparent transparent transparent var(--color-card, #fff)}:host .dga-tip[data-variant=inverted][data-placement=top] .dga-tip__beak{border-color:var(--dga-color-neutral-800, #1f2a37) transparent transparent}:host .dga-tip[data-variant=inverted][data-placement=bottom] .dga-tip__beak{border-color:transparent transparent var(--dga-color-neutral-800, #1f2a37)}:host .dga-tip[data-variant=inverted][data-placement=start] .dga-tip__beak{border-color:transparent transparent transparent var(--dga-color-neutral-800, #1f2a37)}:host .dga-tip[data-variant=inverted][data-placement=end] .dga-tip__beak{border-color:transparent var(--dga-color-neutral-800, #1f2a37) transparent transparent}:host-context([dir=\"rtl\"]) .dga-tip[data-variant=inverted][data-placement=start] .dga-tip__beak{border-color:transparent var(--dga-color-neutral-800, #1f2a37) transparent transparent}:host-context([dir=\"rtl\"]) .dga-tip[data-variant=inverted][data-placement=end] .dga-tip__beak{border-color:transparent transparent transparent var(--dga-color-neutral-800, #1f2a37)}@keyframes dga-tip-in{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){:host .dga-tip{animation:none}}\n"]}]}],ctorParameters:()=>[],propDecorators:{text:[{type:t.Input,args:[{isSignal:!0,alias:"text",required:!0}]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],placement:[{type:t.Input,args:[{isSignal:!0,alias:"placement",required:!1}]}],variant:[{type:t.Input,args:[{isSignal:!0,alias:"variant",required:!1}]}],showIcon:[{type:t.Input,args:[{isSignal:!0,alias:"showIcon",required:!1}]}],disabled:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],showDelay:[{type:t.Input,args:[{isSignal:!0,alias:"showDelay",required:!1}]}],hideDelay:[{type:t.Input,args:[{isSignal:!0,alias:"hideDelay",required:!1}]}],dismissMs:[{type:t.Input,args:[{isSignal:!0,alias:"dismissMs",required:!1}]}],portaled:[{type:t.Input,args:[{isSignal:!0,alias:"portaled",required:!1}]}],tipEl:[{type:t.ViewChild,args:["tipEl",{isSignal:!0}]}],onDocPointer:[{type:T,args:["document:pointerdown",["$event"]]}],onDocEscape:[{type:T,args:["document:keydown.escape"]}],onWindowBlur:[{type:T,args:["window:blur"]}],onVisibility:[{type:T,args:["document:visibilitychange"]}]}});let Hr=0;class Ve{host=x(F);injector=x(G);destroyRef=x(L);triggerRef=R("trigger",...ngDevMode?[{debugName:"triggerRef"}]:[]);menuRef=R("menu",...ngDevMode?[{debugName:"menuRef"}]:[]);items=i([],...ngDevMode?[{debugName:"items"}]:[]);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);triggerLabel=i("القائمة",...ngDevMode?[{debugName:"triggerLabel"}]:[]);leadingIcon=i(null,...ngDevMode?[{debugName:"leadingIcon"}]:[]);showChevron=i(!0,{...ngDevMode?{debugName:"showChevron"}:{},transform:m});appearance=i("default",...ngDevMode?[{debugName:"appearance"}]:[]);menuMinWidth=i("12rem",...ngDevMode?[{debugName:"menuMinWidth"}]:[]);selected=w();selectedValue=w();opened=w();closed=w();panelStyle=y({},...ngDevMode?[{debugName:"panelStyle"}]:[]);seq=++Hr;triggerId=`dga-menu-trigger-${this.seq}`;listId=`dga-menu-list-${this.seq}`;activeIndex=0;onReposition=()=>{this.open()&&this.syncPanelPosition()};constructor(){document.addEventListener("scroll",this.onReposition,!0),window.addEventListener("resize",this.onReposition),this.destroyRef.onDestroy(()=>{this.detachPortaledMenu(),document.removeEventListener("scroll",this.onReposition,!0),window.removeEventListener("resize",this.onReposition)})}triggerClasses(){return this.appearance()==="icon"?f("group/trigger inline-flex size-4xl items-center justify-center rounded-md border-0","bg-transparent text-muted transition-colors duration-150","hover:bg-card-hovered hover:text-fg active:scale-[0.96]","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-focus",this.open()&&"bg-primary-faint text-fg-primary"):f("group/trigger inline-flex h-5xl items-center gap-sm rounded-sm border border-border bg-surface","px-xl text-body-md font-medium text-fg transition-all duration-150","hover:bg-neutral-light active:scale-[0.98]","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-focus",this.open()&&"border-border bg-neutral-light shadow-sm")}menuClasses(){return f("fixed z-dropdown min-w-[12rem] overflow-hidden","rounded-md border border-border bg-card py-xs shadow-lg","[animation:dga-menu-enter_160ms_ease-out]")}itemId(e){return`${this.listId}-item-${e}`}trackItem(e,a){return e.divider?`divider-${a}`:`${e.value}-${a}`}itemClass(e){return f("group/item flex w-full items-center gap-md px-lg py-sm text-start text-body-md","transition-colors duration-150","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px]","focus-visible:outline-focus",e.disabled?"cursor-not-allowed text-fg-disabled opacity-60":e.danger?"text-fg-error hover:bg-error-light":"text-fg hover:bg-neutral-light")}toggle(e){e.stopPropagation(),this.open()?this.close(!0):this.openMenu()}openMenu(){this.syncPanelPosition(),this.open.set(!0),this.activeIndex=this.firstSelectableIndex(),this.opened.emit(),O(()=>{this.portalMenuToBody(),this.syncPanelPosition(),this.focusItem(this.activeIndex)},{injector:this.injector})}close(e=!1){this.open()&&(this.detachPortaledMenu(),this.open.set(!1),this.closed.emit(),e&&queueMicrotask(()=>this.triggerRef()?.nativeElement.focus()))}selectItem(e){e.disabled||e.divider||e.value==null||(this.selected.emit(e),this.selectedValue.emit(e.value),this.close(!0))}onTriggerKey(e){(e.key==="ArrowDown"||e.key==="Enter"||e.key===" ")&&(this.open()||(e.preventDefault(),this.openMenu()))}onMenuKey(e){if(this.items().length){if(e.key==="Escape"){e.preventDefault(),e.stopPropagation(),this.close(!0);return}if(e.key==="ArrowDown"){e.preventDefault(),this.activeIndex=this.stepIndex(this.activeIndex,1),this.focusItem(this.activeIndex);return}if(e.key==="ArrowUp"){e.preventDefault(),this.activeIndex=this.stepIndex(this.activeIndex,-1),this.focusItem(this.activeIndex);return}if(e.key==="Home"){e.preventDefault(),this.activeIndex=this.firstSelectableIndex(),this.focusItem(this.activeIndex);return}e.key==="End"&&(e.preventDefault(),this.activeIndex=this.lastSelectableIndex(),this.focusItem(this.activeIndex))}}onDocumentClick(e){if(!this.open())return;const a=e.target;a&&(this.host.nativeElement.contains(a)||this.menuRef()?.nativeElement.contains(a)||this.close(!1))}onDocumentKeydown(e){this.open()&&e.key==="Escape"&&(e.stopPropagation(),this.close(!0))}isSelectable(e){return!!e&&!e.divider&&!e.disabled}firstSelectableIndex(){return this.items().findIndex(e=>this.isSelectable(e))}lastSelectableIndex(){const e=this.items();for(let a=e.length-1;a>=0;a--)if(this.isSelectable(e[a]))return a;return-1}stepIndex(e,a){const s=this.items(),r=s.length;if(!r)return-1;let l=e;for(let u=0;u<r;u++)if(l=(l+a+r)%r,this.isSelectable(s[l]))return l;return e}portalMenuToBody(){const e=this.menuRef()?.nativeElement;!e||e.parentElement===document.body||document.body.appendChild(e)}detachPortaledMenu(){const e=this.menuRef()?.nativeElement;!e||e.parentElement!==document.body||this.host.nativeElement.appendChild(e)}syncPanelPosition(){const e=this.triggerRef()?.nativeElement;if(!e)return;const a=e.getBoundingClientRect(),s=8,r=8,l=getComputedStyle(e).direction==="rtl",u=this.menuMinWidth(),o=this.menuRef()?.nativeElement;o&&(o.dir=l?"rtl":"ltr");const c=window.innerWidth,p=window.innerHeight;let g=o?.offsetWidth??0;g<8&&(g=this.cssLengthToPx(u)||192);const b=o?.offsetHeight??0;let N=l?a.left:a.right-g;N+g>c-r&&(N=a.right-g),N<r&&(N=a.left),N=Math.min(Math.max(N,r),Math.max(r,c-g-r));let C=a.bottom+s;if(b>0&&C+b>p-r){const _=a.top-s-b;_>=r&&(C=_)}this.panelStyle.set({top:`${Math.round(C)}px`,left:`${Math.round(N)}px`,right:"auto",minWidth:u})}cssLengthToPx(e){const a=e.trim(),s=/^([\d.]+)rem$/i.exec(a);if(s){const l=Number.parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return Number.parseFloat(s[1])*l}const r=/^([\d.]+)px$/i.exec(a);return r?Number.parseFloat(r[1]):Number.parseFloat(a)||0}focusItem(e){if(e<0)return;(this.menuRef()?.nativeElement??this.host.nativeElement).querySelector(`#${CSS.escape(this.itemId(e))}`)?.focus()}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ve,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ve,isStandalone:!0,selector:"dga-menu",inputs:{items:{classPropertyName:"items",publicName:"items",isSignal:!0,isRequired:!1,transformFunction:null},open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},triggerLabel:{classPropertyName:"triggerLabel",publicName:"triggerLabel",isSignal:!0,isRequired:!1,transformFunction:null},leadingIcon:{classPropertyName:"leadingIcon",publicName:"leadingIcon",isSignal:!0,isRequired:!1,transformFunction:null},showChevron:{classPropertyName:"showChevron",publicName:"showChevron",isSignal:!0,isRequired:!1,transformFunction:null},appearance:{classPropertyName:"appearance",publicName:"appearance",isSignal:!0,isRequired:!1,transformFunction:null},menuMinWidth:{classPropertyName:"menuMinWidth",publicName:"menuMinWidth",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",selected:"selected",selectedValue:"selectedValue",opened:"opened",closed:"closed"},host:{listeners:{"document:click":"onDocumentClick($event)","document:keydown":"onDocumentKeydown($event)"},properties:{"attr.data-open":"open() || null"},classAttribute:"group relative inline-block"},viewQueries:[{propertyName:"triggerRef",first:!0,predicate:["trigger"],descendants:!0,isSignal:!0},{propertyName:"menuRef",first:!0,predicate:["menu"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
2976
|
+
`,changeDetection:h.OnPush,host:{"[attr.data-open]":"open() || null","[attr.data-placement]":"placement()","[attr.data-variant]":"variant()"},styles:[":host{position:relative;display:inline-flex;max-width:100%;vertical-align:middle}:host .dga-tip__trigger{display:inline-flex;height:100%;max-width:100%;align-items:stretch}:host .dga-tip{position:absolute;z-index:var(--z-index-dropdown);box-sizing:border-box;width:max-content;max-width:min(240px,calc(100vw - 2rem));border-radius:var(--radius-sm, 4px);box-shadow:var(--shadow-lg);font-family:var(--font-sans, \"IBM Plex Sans Arabic\", \"IBM Plex Sans\", system-ui, sans-serif);text-align:start;pointer-events:none;animation:dga-tip-in .14s ease-out forwards}:host .dga-tip--portaled,:host .dga-tip[data-portaled]{position:fixed;z-index:var(--z-index-popover, 400);margin:0;transform:none;inset:auto;inset-inline:auto;inset-block:auto}:host .dga-tip__inner{display:flex;flex-direction:column;gap:4px;padding:var(--spacing-lg, 12px);position:relative}:host .dga-tip__head{display:flex;align-items:center;gap:var(--spacing-md, 8px);min-width:0}:host .dga-tip__title{margin:0;min-width:0;flex:1 1 auto;font-size:var(--dga-font-text-xs, 12px);font-weight:600;line-height:var(--dga-leading-text-xs, 18px);letter-spacing:0}:host .dga-tip__body{margin:0;font-size:var(--dga-font-text-xs, 12px);font-weight:400;line-height:var(--dga-leading-text-xs, 18px);letter-spacing:0;overflow-wrap:anywhere}:host .dga-tip[data-has-title][data-has-icon] .dga-tip__body:not(.dga-tip__body--inline){padding-inline-start:calc(20px + var(--spacing-md, 8px))}:host .dga-tip__icon{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:20px;height:20px;line-height:0}:host .dga-tip__icon svg{display:block;width:20px;height:20px;overflow:visible}:host .dga-tip__disc{fill:var(--dga-color-neutral-800, #1f2a37)}:host .dga-tip__mark{fill:#fff}:host .dga-tip[data-variant=default]{background:var(--color-card, #fff)}:host .dga-tip[data-variant=default] .dga-tip__title{color:var(--color-display, #1f2a37)}:host .dga-tip[data-variant=default] .dga-tip__body{color:var(--color-paragraph, #384250)}:host .dga-tip[data-variant=inverted]{background:var(--dga-color-neutral-800, #1f2a37)}:host .dga-tip[data-variant=inverted] .dga-tip__title,:host .dga-tip[data-variant=inverted] .dga-tip__body{color:#fff}:host .dga-tip[data-variant=inverted] .dga-tip__disc{fill:#fff}:host .dga-tip[data-variant=inverted] .dga-tip__mark{fill:var(--dga-color-neutral-800, #1f2a37)}:host .dga-tip[data-placement=top]{bottom:100%;left:50%;transform:translate(-50%);margin-bottom:10px}:host .dga-tip[data-placement=bottom]{top:100%;left:50%;transform:translate(-50%);margin-top:10px}:host .dga-tip[data-placement=start]{inset-inline-end:100%;top:50%;transform:translateY(-50%);margin-inline-end:10px}:host .dga-tip[data-placement=end]{inset-inline-start:100%;top:50%;transform:translateY(-50%);margin-inline-start:10px}:host .dga-tip__beak{position:absolute;width:0;height:0;border-style:solid;pointer-events:none;z-index:1}:host .dga-tip[data-placement=top] .dga-tip__beak{left:50%;top:calc(100% - 1px);transform:translate(-50%);border-width:6px 6px 0}:host .dga-tip[data-placement=bottom] .dga-tip__beak{left:50%;bottom:calc(100% - 1px);transform:translate(-50%);border-width:0 6px 6px}:host .dga-tip[data-placement=start] .dga-tip__beak{inset-block-start:50%;inset-inline-end:-5px;transform:translateY(-50%);border-width:6px 0 6px 6px}:host .dga-tip[data-placement=end] .dga-tip__beak{inset-block-start:50%;inset-inline-start:-5px;transform:translateY(-50%);border-width:6px 6px 6px 0}:host .dga-tip[data-variant=default][data-placement=top] .dga-tip__beak{border-color:var(--color-card, #fff) transparent transparent}:host .dga-tip[data-variant=default][data-placement=bottom] .dga-tip__beak{border-color:transparent transparent var(--color-card, #fff)}:host .dga-tip[data-variant=default][data-placement=start] .dga-tip__beak{border-color:transparent transparent transparent var(--color-card, #fff)}:host .dga-tip[data-variant=default][data-placement=end] .dga-tip__beak{border-color:transparent var(--color-card, #fff) transparent transparent}:host-context([dir=\"rtl\"]) .dga-tip[data-placement=start] .dga-tip__beak{border-width:6px 6px 6px 0}:host-context([dir=\"rtl\"]) .dga-tip[data-placement=end] .dga-tip__beak{border-width:6px 0 6px 6px}:host-context([dir=\"rtl\"]) .dga-tip[data-variant=default][data-placement=start] .dga-tip__beak{border-color:transparent var(--color-card, #fff) transparent transparent}:host-context([dir=\"rtl\"]) .dga-tip[data-variant=default][data-placement=end] .dga-tip__beak{border-color:transparent transparent transparent var(--color-card, #fff)}:host .dga-tip[data-variant=inverted][data-placement=top] .dga-tip__beak{border-color:var(--dga-color-neutral-800, #1f2a37) transparent transparent}:host .dga-tip[data-variant=inverted][data-placement=bottom] .dga-tip__beak{border-color:transparent transparent var(--dga-color-neutral-800, #1f2a37)}:host .dga-tip[data-variant=inverted][data-placement=start] .dga-tip__beak{border-color:transparent transparent transparent var(--dga-color-neutral-800, #1f2a37)}:host .dga-tip[data-variant=inverted][data-placement=end] .dga-tip__beak{border-color:transparent var(--dga-color-neutral-800, #1f2a37) transparent transparent}:host-context([dir=\"rtl\"]) .dga-tip[data-variant=inverted][data-placement=start] .dga-tip__beak{border-color:transparent var(--dga-color-neutral-800, #1f2a37) transparent transparent}:host-context([dir=\"rtl\"]) .dga-tip[data-variant=inverted][data-placement=end] .dga-tip__beak{border-color:transparent transparent transparent var(--dga-color-neutral-800, #1f2a37)}@keyframes dga-tip-in{0%{opacity:0}to{opacity:1}}@media(prefers-reduced-motion:reduce){:host .dga-tip{animation:none}}\n"]}]}],ctorParameters:()=>[],propDecorators:{text:[{type:t.Input,args:[{isSignal:!0,alias:"text",required:!0}]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],placement:[{type:t.Input,args:[{isSignal:!0,alias:"placement",required:!1}]}],variant:[{type:t.Input,args:[{isSignal:!0,alias:"variant",required:!1}]}],showIcon:[{type:t.Input,args:[{isSignal:!0,alias:"showIcon",required:!1}]}],disabled:[{type:t.Input,args:[{isSignal:!0,alias:"disabled",required:!1}]}],showDelay:[{type:t.Input,args:[{isSignal:!0,alias:"showDelay",required:!1}]}],hideDelay:[{type:t.Input,args:[{isSignal:!0,alias:"hideDelay",required:!1}]}],dismissMs:[{type:t.Input,args:[{isSignal:!0,alias:"dismissMs",required:!1}]}],portaled:[{type:t.Input,args:[{isSignal:!0,alias:"portaled",required:!1}]}],tipEl:[{type:t.ViewChild,args:["tipEl",{isSignal:!0}]}],onDocPointer:[{type:O,args:["document:pointerdown",["$event"]]}],onDocEscape:[{type:O,args:["document:keydown.escape"]}],onWindowBlur:[{type:O,args:["window:blur"]}],onVisibility:[{type:O,args:["document:visibilitychange"]}]}});let Hr=0;class Ve{host=x(F);injector=x(G);destroyRef=x(L);triggerRef=R("trigger",...ngDevMode?[{debugName:"triggerRef"}]:[]);menuRef=R("menu",...ngDevMode?[{debugName:"menuRef"}]:[]);items=i([],...ngDevMode?[{debugName:"items"}]:[]);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);triggerLabel=i("القائمة",...ngDevMode?[{debugName:"triggerLabel"}]:[]);leadingIcon=i(null,...ngDevMode?[{debugName:"leadingIcon"}]:[]);showChevron=i(!0,{...ngDevMode?{debugName:"showChevron"}:{},transform:m});appearance=i("default",...ngDevMode?[{debugName:"appearance"}]:[]);menuMinWidth=i("12rem",...ngDevMode?[{debugName:"menuMinWidth"}]:[]);selected=w();selectedValue=w();opened=w();closed=w();panelStyle=y({},...ngDevMode?[{debugName:"panelStyle"}]:[]);seq=++Hr;triggerId=`dga-menu-trigger-${this.seq}`;listId=`dga-menu-list-${this.seq}`;activeIndex=0;onReposition=()=>{this.open()&&this.syncPanelPosition()};constructor(){document.addEventListener("scroll",this.onReposition,!0),window.addEventListener("resize",this.onReposition),this.destroyRef.onDestroy(()=>{this.detachPortaledMenu(),document.removeEventListener("scroll",this.onReposition,!0),window.removeEventListener("resize",this.onReposition)})}triggerClasses(){return this.appearance()==="icon"?f("group/trigger inline-flex size-4xl items-center justify-center rounded-md border-0","bg-transparent text-muted transition-colors duration-150","hover:bg-card-hovered hover:text-fg active:scale-[0.96]","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-focus",this.open()&&"bg-primary-faint text-fg-primary"):f("group/trigger inline-flex h-5xl items-center gap-sm rounded-sm border border-border bg-surface","px-xl text-body-md font-medium text-fg transition-all duration-150","hover:bg-neutral-light active:scale-[0.98]","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-focus",this.open()&&"border-border bg-neutral-light shadow-sm")}menuClasses(){return f("fixed z-dropdown min-w-[12rem] overflow-hidden","rounded-md border border-border bg-card py-xs shadow-lg","[animation:dga-menu-enter_160ms_ease-out]")}itemId(e){return`${this.listId}-item-${e}`}trackItem(e,a){return e.divider?`divider-${a}`:`${e.value}-${a}`}itemClass(e){return f("group/item flex w-full items-center gap-md px-lg py-sm text-start text-body-md","transition-colors duration-150","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px]","focus-visible:outline-focus",e.disabled?"cursor-not-allowed text-fg-disabled opacity-60":e.danger?"text-fg-error hover:bg-error-light":"text-fg hover:bg-neutral-light")}toggle(e){e.stopPropagation(),this.open()?this.close(!0):this.openMenu()}openMenu(){this.syncPanelPosition(),this.open.set(!0),this.activeIndex=this.firstSelectableIndex(),this.opened.emit(),T(()=>{this.portalMenuToBody(),this.syncPanelPosition(),this.focusItem(this.activeIndex)},{injector:this.injector})}close(e=!1){this.open()&&(this.detachPortaledMenu(),this.open.set(!1),this.closed.emit(),e&&queueMicrotask(()=>this.triggerRef()?.nativeElement.focus()))}selectItem(e){e.disabled||e.divider||e.value==null||(this.selected.emit(e),this.selectedValue.emit(e.value),this.close(!0))}onTriggerKey(e){(e.key==="ArrowDown"||e.key==="Enter"||e.key===" ")&&(this.open()||(e.preventDefault(),this.openMenu()))}onMenuKey(e){if(this.items().length){if(e.key==="Escape"){e.preventDefault(),e.stopPropagation(),this.close(!0);return}if(e.key==="ArrowDown"){e.preventDefault(),this.activeIndex=this.stepIndex(this.activeIndex,1),this.focusItem(this.activeIndex);return}if(e.key==="ArrowUp"){e.preventDefault(),this.activeIndex=this.stepIndex(this.activeIndex,-1),this.focusItem(this.activeIndex);return}if(e.key==="Home"){e.preventDefault(),this.activeIndex=this.firstSelectableIndex(),this.focusItem(this.activeIndex);return}e.key==="End"&&(e.preventDefault(),this.activeIndex=this.lastSelectableIndex(),this.focusItem(this.activeIndex))}}onDocumentClick(e){if(!this.open())return;const a=e.target;a&&(this.host.nativeElement.contains(a)||this.menuRef()?.nativeElement.contains(a)||this.close(!1))}onDocumentKeydown(e){this.open()&&e.key==="Escape"&&(e.stopPropagation(),this.close(!0))}isSelectable(e){return!!e&&!e.divider&&!e.disabled}firstSelectableIndex(){return this.items().findIndex(e=>this.isSelectable(e))}lastSelectableIndex(){const e=this.items();for(let a=e.length-1;a>=0;a--)if(this.isSelectable(e[a]))return a;return-1}stepIndex(e,a){const s=this.items(),r=s.length;if(!r)return-1;let l=e;for(let u=0;u<r;u++)if(l=(l+a+r)%r,this.isSelectable(s[l]))return l;return e}portalMenuToBody(){const e=this.menuRef()?.nativeElement;!e||e.parentElement===document.body||document.body.appendChild(e)}detachPortaledMenu(){const e=this.menuRef()?.nativeElement;!e||e.parentElement!==document.body||this.host.nativeElement.appendChild(e)}syncPanelPosition(){const e=this.triggerRef()?.nativeElement;if(!e)return;const a=e.getBoundingClientRect(),s=8,r=8,l=getComputedStyle(e).direction==="rtl",u=this.menuMinWidth(),o=this.menuRef()?.nativeElement;o&&(o.dir=l?"rtl":"ltr");const c=window.innerWidth,p=window.innerHeight;let g=o?.offsetWidth??0;g<8&&(g=this.cssLengthToPx(u)||192);const b=o?.offsetHeight??0;let N=l?a.left:a.right-g;N+g>c-r&&(N=a.right-g),N<r&&(N=a.left),N=Math.min(Math.max(N,r),Math.max(r,c-g-r));let C=a.bottom+s;if(b>0&&C+b>p-r){const _=a.top-s-b;_>=r&&(C=_)}this.panelStyle.set({top:`${Math.round(C)}px`,left:`${Math.round(N)}px`,right:"auto",minWidth:u})}cssLengthToPx(e){const a=e.trim(),s=/^([\d.]+)rem$/i.exec(a);if(s){const l=Number.parseFloat(getComputedStyle(document.documentElement).fontSize)||16;return Number.parseFloat(s[1])*l}const r=/^([\d.]+)px$/i.exec(a);return r?Number.parseFloat(r[1]):Number.parseFloat(a)||0}focusItem(e){if(e<0)return;(this.menuRef()?.nativeElement??this.host.nativeElement).querySelector(`#${CSS.escape(this.itemId(e))}`)?.focus()}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ve,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ve,isStandalone:!0,selector:"dga-menu",inputs:{items:{classPropertyName:"items",publicName:"items",isSignal:!0,isRequired:!1,transformFunction:null},open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},triggerLabel:{classPropertyName:"triggerLabel",publicName:"triggerLabel",isSignal:!0,isRequired:!1,transformFunction:null},leadingIcon:{classPropertyName:"leadingIcon",publicName:"leadingIcon",isSignal:!0,isRequired:!1,transformFunction:null},showChevron:{classPropertyName:"showChevron",publicName:"showChevron",isSignal:!0,isRequired:!1,transformFunction:null},appearance:{classPropertyName:"appearance",publicName:"appearance",isSignal:!0,isRequired:!1,transformFunction:null},menuMinWidth:{classPropertyName:"menuMinWidth",publicName:"menuMinWidth",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",selected:"selected",selectedValue:"selectedValue",opened:"opened",closed:"closed"},host:{listeners:{"document:click":"onDocumentClick($event)","document:keydown":"onDocumentKeydown($event)"},properties:{"attr.data-open":"open() || null"},classAttribute:"group relative inline-block"},viewQueries:[{propertyName:"triggerRef",first:!0,predicate:["trigger"],descendants:!0,isSignal:!0},{propertyName:"menuRef",first:!0,predicate:["menu"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
2959
2977
|
<button
|
|
2960
2978
|
#trigger
|
|
2961
2979
|
type="button"
|
|
@@ -3097,7 +3115,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
3097
3115
|
}
|
|
3098
3116
|
</ul>
|
|
3099
3117
|
}
|
|
3100
|
-
`,changeDetection:h.OnPush,host:{class:"group relative inline-block","[attr.data-open]":"open() || null"},styles:["@keyframes dga-menu-enter{0%{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}\n"]}]}],ctorParameters:()=>[],propDecorators:{triggerRef:[{type:t.ViewChild,args:["trigger",{isSignal:!0}]}],menuRef:[{type:t.ViewChild,args:["menu",{isSignal:!0}]}],items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!1}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],triggerLabel:[{type:t.Input,args:[{isSignal:!0,alias:"triggerLabel",required:!1}]}],leadingIcon:[{type:t.Input,args:[{isSignal:!0,alias:"leadingIcon",required:!1}]}],showChevron:[{type:t.Input,args:[{isSignal:!0,alias:"showChevron",required:!1}]}],appearance:[{type:t.Input,args:[{isSignal:!0,alias:"appearance",required:!1}]}],menuMinWidth:[{type:t.Input,args:[{isSignal:!0,alias:"menuMinWidth",required:!1}]}],selected:[{type:t.Output,args:["selected"]}],selectedValue:[{type:t.Output,args:["selectedValue"]}],opened:[{type:t.Output,args:["opened"]}],closed:[{type:t.Output,args:["closed"]}],onDocumentClick:[{type:
|
|
3118
|
+
`,changeDetection:h.OnPush,host:{class:"group relative inline-block","[attr.data-open]":"open() || null"},styles:["@keyframes dga-menu-enter{0%{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}\n"]}]}],ctorParameters:()=>[],propDecorators:{triggerRef:[{type:t.ViewChild,args:["trigger",{isSignal:!0}]}],menuRef:[{type:t.ViewChild,args:["menu",{isSignal:!0}]}],items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!1}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],triggerLabel:[{type:t.Input,args:[{isSignal:!0,alias:"triggerLabel",required:!1}]}],leadingIcon:[{type:t.Input,args:[{isSignal:!0,alias:"leadingIcon",required:!1}]}],showChevron:[{type:t.Input,args:[{isSignal:!0,alias:"showChevron",required:!1}]}],appearance:[{type:t.Input,args:[{isSignal:!0,alias:"appearance",required:!1}]}],menuMinWidth:[{type:t.Input,args:[{isSignal:!0,alias:"menuMinWidth",required:!1}]}],selected:[{type:t.Output,args:["selected"]}],selectedValue:[{type:t.Output,args:["selectedValue"]}],opened:[{type:t.Output,args:["opened"]}],closed:[{type:t.Output,args:["closed"]}],onDocumentClick:[{type:O,args:["document:click",["$event"]]}],onDocumentKeydown:[{type:O,args:["document:keydown",["$event"]]}]}});class At{static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:At,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"22.1.5",type:At,isStandalone:!0,selector:"[dgaContextMenuTrigger]",host:{classAttribute:"contents"},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:At,decorators:[{type:V,args:[{selector:"[dgaContextMenuTrigger]",standalone:!0,host:{class:"contents"}}]}]});let Kr=0;class Vt{host=x(F);injector=x(G);destroyRef=x(L);surfaceRef=R("surface",...ngDevMode?[{debugName:"surfaceRef"}]:[]);menuRef=R("menu",...ngDevMode?[{debugName:"menuRef"}]:[]);items=i([],...ngDevMode?[{debugName:"items"}]:[]);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);longPress=i(!0,{...ngDevMode?{debugName:"longPress"}:{},transform:m});longPressMs=i(550,...ngDevMode?[{debugName:"longPressMs"}]:[]);menuMinWidth=i("12rem",...ngDevMode?[{debugName:"menuMinWidth"}]:[]);selected=w();selectedValue=w();opened=w();closed=w();panelStyle=y({},...ngDevMode?[{debugName:"panelStyle"}]:[]);subStyle=y({},...ngDevMode?[{debugName:"subStyle"}]:[]);openSubIndex=y(null,...ngDevMode?[{debugName:"openSubIndex"}]:[]);isRtl=y(!1,...ngDevMode?[{debugName:"isRtl"}]:[]);seq=++Kr;listId=`dga-ctx-list-${this.seq}`;activeIndex=0;pointer={x:0,y:0};longPressTimer=null;onReposition=()=>{this.open()&&this.syncPanelPosition()};constructor(){document.addEventListener("scroll",this.onReposition,!0),window.addEventListener("resize",this.onReposition),this.destroyRef.onDestroy(()=>{this.clearLongPress(),this.detachPortaledMenu(),document.removeEventListener("scroll",this.onReposition,!0),window.removeEventListener("resize",this.onReposition)})}menuClasses(){return f("fixed z-dropdown overflow-hidden rounded-md border border-border bg-card py-xs shadow-lg","[animation:dga-ctx-enter_140ms_ease-out]")}itemId(e){return`${this.listId}-item-${e}`}trackItem(e,a){return e.divider||e.type==="divider"?`divider-${a}`:e.type==="label"?`label-${e.label}-${a}`:`${e.value??e.label}-${a}`}shortcutKeys(e){const a=e.shortcut;if(!a)return null;if(Array.isArray(a))return a.length?[...a]:null;const s=String(a).trim();return s?s.includes("+")?s.split("+").map(r=>r.trim()).filter(Boolean):[s]:null}itemClass(e){return f("group/item flex w-full items-center gap-md px-lg py-sm text-start text-body-md","transition-colors duration-150","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px]","focus-visible:outline-focus",e.disabled?"cursor-not-allowed text-fg-disabled opacity-60":e.danger?"text-fg-error hover:bg-error-light":"text-fg hover:bg-neutral-light")}onContextMenu(e){e.preventDefault(),e.stopPropagation(),this.pointer={x:e.clientX,y:e.clientY},this.openAtPointer()}onTouchStart(e){if(!this.longPress())return;const a=e.touches[0];a&&(this.clearLongPress(),this.pointer={x:a.clientX,y:a.clientY},this.longPressTimer=setTimeout(()=>{this.openAtPointer()},Math.max(300,this.longPressMs())))}onTouchEnd(){this.clearLongPress()}onItemClick(e,a){if(e.children?.length){a.preventDefault(),a.stopPropagation();return}this.selectItem(e)}onItemEnter(e,a,s){e.disabled||(this.activeIndex=a,e.children?.length?(this.openSubIndex.set(a),T(()=>this.syncSubPosition(s.currentTarget),{injector:this.injector})):this.openSubIndex.set(null))}selectItem(e){e.disabled||e.divider||e.type==="divider"||e.type==="label"||e.children?.length||(this.selected.emit(e),e.value!=null&&this.selectedValue.emit(e.value),this.close(!1))}close(e=!1){this.open()&&(this.detachPortaledMenu(),this.open.set(!1),this.openSubIndex.set(null),this.closed.emit(),e&&queueMicrotask(()=>{this.surfaceRef()?.nativeElement.querySelector("[dgaContextMenuTrigger],button,a,[tabindex]")?.focus?.()}))}onMenuKey(e){if(this.items().length){if(e.key==="Escape"){if(e.preventDefault(),e.stopPropagation(),this.openSubIndex()!=null){this.openSubIndex.set(null),this.focusItem(this.activeIndex);return}this.close(!0);return}if(e.key==="ArrowDown"){e.preventDefault(),this.activeIndex=this.stepIndex(this.activeIndex,1),this.openSubIndex.set(null),this.focusItem(this.activeIndex);return}if(e.key==="ArrowUp"){e.preventDefault(),this.activeIndex=this.stepIndex(this.activeIndex,-1),this.openSubIndex.set(null),this.focusItem(this.activeIndex);return}if(e.key==="ArrowRight"||e.key==="ArrowLeft"){const s=this.isRtl(),r=e.key==="ArrowRight"&&!s||e.key==="ArrowLeft"&&s,l=this.items()[this.activeIndex];r&&l?.children?.length?(e.preventDefault(),this.openSubIndex.set(this.activeIndex),T(()=>{const u=this.menuRef()?.nativeElement.querySelector(`#${CSS.escape(this.itemId(this.activeIndex))}`);u&&this.syncSubPosition(u)},{injector:this.injector})):!r&&this.openSubIndex()!=null&&(e.preventDefault(),this.openSubIndex.set(null),this.focusItem(this.activeIndex))}}}onDocumentPointer(e){if(!this.open())return;const a=e.target;a&&(this.menuRef()?.nativeElement.contains(a)||this.close(!1))}onDocumentKeydown(e){this.open()&&e.key==="Escape"&&(e.stopPropagation(),this.close(!0))}openAtPointer(){this.isRtl.set(this.host.nativeElement.closest("[dir]")?.dir==="rtl"||document.documentElement.dir==="rtl"),this.openSubIndex.set(null),this.syncPanelPosition(),this.open.set(!0),this.activeIndex=this.firstSelectableIndex(),this.opened.emit(),T(()=>{this.portalMenuToBody(),this.syncPanelPosition(),this.focusItem(this.activeIndex)},{injector:this.injector})}clearLongPress(){this.longPressTimer!=null&&(clearTimeout(this.longPressTimer),this.longPressTimer=null)}isSelectable(e){return!!e&&!e.divider&&e.type!=="divider"&&e.type!=="label"&&!e.disabled}firstSelectableIndex(){return this.items().findIndex(e=>this.isSelectable(e))}stepIndex(e,a){const s=this.items(),r=s.length;if(!r)return-1;let l=e;for(let u=0;u<r;u++)if(l=(l+a+r)%r,this.isSelectable(s[l]))return l;return e}portalMenuToBody(){const e=this.menuRef()?.nativeElement;!e||e.parentElement===document.body||document.body.appendChild(e)}detachPortaledMenu(){const e=this.menuRef()?.nativeElement;!e||e.parentElement!==document.body||this.host.nativeElement.appendChild(e)}syncPanelPosition(){const a=this.menuMinWidth(),s=this.menuRef()?.nativeElement,r=this.isRtl();s&&(s.dir=r?"rtl":"ltr");const l=window.innerWidth,u=window.innerHeight;let o=s?.offsetWidth??0;o<8&&(o=192);const c=s?.offsetHeight??0;let p=this.pointer.x,g=this.pointer.y;p+o>l-8&&(p=l-o-8),p<8&&(p=8),g+c>u-8&&(g=u-c-8),g<8&&(g=8),this.panelStyle.set({top:`${Math.round(g)}px`,left:`${Math.round(p)}px`,right:"auto",minWidth:a})}syncSubPosition(e){const a=this.menuRef()?.nativeElement.querySelector(".dga-ctx__sub");if(!a)return;const s=this.isRtl(),r=e.getBoundingClientRect(),l=8,u=window.innerWidth,o=window.innerHeight,c=a.offsetWidth||176,p=a.offsetHeight||120;let g=s?r.left-c-4:r.right+4;g+c>u-l&&(g=r.left-c-4),g<l&&(g=r.right+4),g=Math.min(Math.max(g,l),u-c-l);let b=r.top;b+p>o-l&&(b=Math.max(l,o-p-l)),this.subStyle.set({top:`${Math.round(b)}px`,left:`${Math.round(g)}px`})}focusItem(e){if(e<0)return;this.menuRef()?.nativeElement?.querySelector(`#${CSS.escape(this.itemId(e))}`)?.focus()}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Vt,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Vt,isStandalone:!0,selector:"dga-context-menu",inputs:{items:{classPropertyName:"items",publicName:"items",isSignal:!0,isRequired:!1,transformFunction:null},open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},longPress:{classPropertyName:"longPress",publicName:"longPress",isSignal:!0,isRequired:!1,transformFunction:null},longPressMs:{classPropertyName:"longPressMs",publicName:"longPressMs",isSignal:!0,isRequired:!1,transformFunction:null},menuMinWidth:{classPropertyName:"menuMinWidth",publicName:"menuMinWidth",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",selected:"selected",selectedValue:"selectedValue",opened:"opened",closed:"closed"},host:{listeners:{"document:pointerdown":"onDocumentPointer($event)","document:keydown":"onDocumentKeydown($event)"},properties:{"attr.data-open":"open() || null"}},viewQueries:[{propertyName:"surfaceRef",first:!0,predicate:["surface"],descendants:!0,isSignal:!0},{propertyName:"menuRef",first:!0,predicate:["menu"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
3101
3119
|
<div
|
|
3102
3120
|
#surface
|
|
3103
3121
|
class="dga-ctx__surface"
|
|
@@ -3343,7 +3361,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
3343
3361
|
}
|
|
3344
3362
|
</ul>
|
|
3345
3363
|
}
|
|
3346
|
-
`,host:{"[attr.data-open]":"open() || null"},styles:[":host{display:contents}.dga-ctx__surface{display:contents}@keyframes dga-ctx-enter{0%{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}.dga-ctx__sub{position:fixed;z-index:calc(var(--z-index-dropdown, 300) + 1);min-width:11rem;overflow:hidden;border-radius:var(--radius-md, 8px);border:1px solid var(--color-border, #e5e7eb);background:var(--color-card, #fff);padding-block:var(--spacing-xs, 4px);box-shadow:var(--shadow-lg, 0 12px 32px rgb(0 0 0 / .14));animation:dga-ctx-enter .14s ease-out}\n"]}]}],ctorParameters:()=>[],propDecorators:{surfaceRef:[{type:t.ViewChild,args:["surface",{isSignal:!0}]}],menuRef:[{type:t.ViewChild,args:["menu",{isSignal:!0}]}],items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!1}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],longPress:[{type:t.Input,args:[{isSignal:!0,alias:"longPress",required:!1}]}],longPressMs:[{type:t.Input,args:[{isSignal:!0,alias:"longPressMs",required:!1}]}],menuMinWidth:[{type:t.Input,args:[{isSignal:!0,alias:"menuMinWidth",required:!1}]}],selected:[{type:t.Output,args:["selected"]}],selectedValue:[{type:t.Output,args:["selectedValue"]}],opened:[{type:t.Output,args:["opened"]}],closed:[{type:t.Output,args:["closed"]}],onDocumentPointer:[{type:
|
|
3364
|
+
`,host:{"[attr.data-open]":"open() || null"},styles:[":host{display:contents}.dga-ctx__surface{display:contents}@keyframes dga-ctx-enter{0%{opacity:0;transform:scale(.98)}to{opacity:1;transform:scale(1)}}.dga-ctx__sub{position:fixed;z-index:calc(var(--z-index-dropdown, 300) + 1);min-width:11rem;overflow:hidden;border-radius:var(--radius-md, 8px);border:1px solid var(--color-border, #e5e7eb);background:var(--color-card, #fff);padding-block:var(--spacing-xs, 4px);box-shadow:var(--shadow-lg, 0 12px 32px rgb(0 0 0 / .14));animation:dga-ctx-enter .14s ease-out}\n"]}]}],ctorParameters:()=>[],propDecorators:{surfaceRef:[{type:t.ViewChild,args:["surface",{isSignal:!0}]}],menuRef:[{type:t.ViewChild,args:["menu",{isSignal:!0}]}],items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!1}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],longPress:[{type:t.Input,args:[{isSignal:!0,alias:"longPress",required:!1}]}],longPressMs:[{type:t.Input,args:[{isSignal:!0,alias:"longPressMs",required:!1}]}],menuMinWidth:[{type:t.Input,args:[{isSignal:!0,alias:"menuMinWidth",required:!1}]}],selected:[{type:t.Output,args:["selected"]}],selectedValue:[{type:t.Output,args:["selectedValue"]}],opened:[{type:t.Output,args:["opened"]}],closed:[{type:t.Output,args:["closed"]}],onDocumentPointer:[{type:O,args:["document:pointerdown",["$event"]]}],onDocumentKeydown:[{type:O,args:["document:keydown",["$event"]]}]}});let Wr=0;class Et{destroyRef=x(L);injector=x(G);queryInput=R("queryInput",...ngDevMode?[{debugName:"queryInput"}]:[]);groups=i([],...ngDevMode?[{debugName:"groups"}]:[]);items=i([],...ngDevMode?[{debugName:"items"}]:[]);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);appearance=i("panel",...ngDevMode?[{debugName:"appearance"}]:[]);placeholder=i("ابحث عن أمر...",...ngDevMode?[{debugName:"placeholder"}]:[]);emptyLabel=i("لا توجد نتائج",...ngDevMode?[{debugName:"emptyLabel"}]:[]);clearLabel=i("مسح البحث",...ngDevMode?[{debugName:"clearLabel"}]:[]);dialogLabel=i("لوحة الأوامر",...ngDevMode?[{debugName:"dialogLabel"}]:[]);listLabel=i("الأوامر",...ngDevMode?[{debugName:"listLabel"}]:[]);closeOnSelect=i(!0,{...ngDevMode?{debugName:"closeOnSelect"}:{},transform:m});closeOnBackdrop=i(!0,{...ngDevMode?{debugName:"closeOnBackdrop"}:{},transform:m});hotkey=i(!1,{...ngDevMode?{debugName:"hotkey"}:{},transform:m});selected=w();selectedValue=w();opened=w();closed=w();queryChange=w();query=y("",...ngDevMode?[{debugName:"query"}]:[]);activeId=y(null,...ngDevMode?[{debugName:"activeId"}]:[]);seq=++Wr;listId=`dga-cmd-list-${this.seq}`;previousFocus=null;wasOpen=!1;show=n(()=>this.appearance()==="panel"||this.open(),...ngDevMode?[{debugName:"show"}]:[]);filteredGroups=n(()=>{const e=this.normalize(this.query()),a=this.resolveGroups();return e?a.map(s=>({...s,items:s.items.filter(r=>this.matches(r,e))})).filter(s=>s.items.length>0):a},...ngDevMode?[{debugName:"filteredGroups"}]:[]);flatFiltered=n(()=>this.filteredGroups().flatMap(e=>e.items.filter(a=>!a.disabled)),...ngDevMode?[{debugName:"flatFiltered"}]:[]);activeDescendant=n(()=>{const e=this.activeId();return e?this.optionId(e):null},...ngDevMode?[{debugName:"activeDescendant"}]:[]);constructor(){M(()=>{const e=this.appearance()==="dialog",a=this.open();e&&a&&!this.wasOpen?(this.wasOpen=!0,this.previousFocus=document.activeElement??null,this.opened.emit(),T(()=>this.focusInput(),{injector:this.injector})):e&&!a&&this.wasOpen&&(this.wasOpen=!1,this.query.set(""),this.activeId.set(null),this.restoreFocus())}),M(()=>{const e=this.flatFiltered(),a=this.activeId();if(!e.length){this.activeId.set(null);return}(!a||!e.some(s=>s.id===a))&&this.activeId.set(e[0].id)}),this.destroyRef.onDestroy(()=>this.restoreFocus())}optionId(e){return`${this.listId}-opt-${e}`}shortcutKeys(e){const a=e.shortcut;if(!a)return null;if(Array.isArray(a))return a.length?[...a]:null;const s=String(a).trim();return s?s.includes("+")?s.split("+").map(r=>r.trim()).filter(Boolean):[s]:null}onQueryInput(e){const a=e.target.value;this.query.set(a),this.queryChange.emit(a)}clearQuery(){this.query.set(""),this.queryChange.emit(""),this.focusInput()}setActive(e){this.activeId.set(e)}select(e){e.disabled||(this.selected.emit(e),e.value!=null?this.selectedValue.emit(e.value):this.selectedValue.emit(e.id),this.closeOnSelect()&&this.appearance()==="dialog"&&this.close())}close(){this.open()&&(this.open.set(!1),this.closed.emit())}onBackdrop(){this.closeOnBackdrop()&&this.close()}onRootKey(e){e.key==="Escape"&&this.appearance()==="dialog"&&(e.preventDefault(),e.stopPropagation(),this.close())}onInputKey(e){const a=this.flatFiltered();if(e.key==="ArrowDown"){e.preventDefault(),this.moveActive(1,a);return}if(e.key==="ArrowUp"){e.preventDefault(),this.moveActive(-1,a);return}if(e.key==="Enter"){const s=this.activeId(),r=a.find(l=>l.id===s);r&&(e.preventDefault(),this.select(r));return}e.key==="Escape"&&this.appearance()==="dialog"&&(e.preventDefault(),this.close())}onHotkey(e){!this.hotkey()||this.appearance()!=="dialog"||!(e.metaKey||e.ctrlKey)||e.key.toLowerCase()!=="k"||(e.preventDefault(),this.open()?this.close():this.open.set(!0))}moveActive(e,a){if(!a.length)return;const s=a.findIndex(l=>l.id===this.activeId()),r=s<0?0:(s+e+a.length)%a.length;this.activeId.set(a[r].id),T(()=>{document.getElementById(this.optionId(a[r].id))?.scrollIntoView({block:"nearest"})},{injector:this.injector})}resolveGroups(){const e=this.groups();if(e.length)return e;const a=this.items();return a.length?[{items:a}]:[]}matches(e,a){return[e.label,e.value,e.id,...e.keywords??[]].filter(Boolean).map(r=>this.normalize(String(r))).join(" ").includes(a)}normalize(e){return e.trim().toLowerCase()}focusInput(){this.queryInput()?.nativeElement.focus({preventScroll:!0})}restoreFocus(){this.previousFocus?.focus?.({preventScroll:!0}),this.previousFocus=null}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Et,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Et,isStandalone:!0,selector:"dga-command",inputs:{groups:{classPropertyName:"groups",publicName:"groups",isSignal:!0,isRequired:!1,transformFunction:null},items:{classPropertyName:"items",publicName:"items",isSignal:!0,isRequired:!1,transformFunction:null},open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},appearance:{classPropertyName:"appearance",publicName:"appearance",isSignal:!0,isRequired:!1,transformFunction:null},placeholder:{classPropertyName:"placeholder",publicName:"placeholder",isSignal:!0,isRequired:!1,transformFunction:null},emptyLabel:{classPropertyName:"emptyLabel",publicName:"emptyLabel",isSignal:!0,isRequired:!1,transformFunction:null},clearLabel:{classPropertyName:"clearLabel",publicName:"clearLabel",isSignal:!0,isRequired:!1,transformFunction:null},dialogLabel:{classPropertyName:"dialogLabel",publicName:"dialogLabel",isSignal:!0,isRequired:!1,transformFunction:null},listLabel:{classPropertyName:"listLabel",publicName:"listLabel",isSignal:!0,isRequired:!1,transformFunction:null},closeOnSelect:{classPropertyName:"closeOnSelect",publicName:"closeOnSelect",isSignal:!0,isRequired:!1,transformFunction:null},closeOnBackdrop:{classPropertyName:"closeOnBackdrop",publicName:"closeOnBackdrop",isSignal:!0,isRequired:!1,transformFunction:null},hotkey:{classPropertyName:"hotkey",publicName:"hotkey",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",selected:"selected",selectedValue:"selectedValue",opened:"opened",closed:"closed",queryChange:"queryChange"},host:{listeners:{"document:keydown":"onHotkey($event)"}},viewQueries:[{propertyName:"queryInput",first:!0,predicate:["queryInput"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
3347
3365
|
@if (show()) {
|
|
3348
3366
|
@if (appearance() === 'dialog') {
|
|
3349
3367
|
<div class="dga-cmd-root" role="presentation">
|
|
@@ -3553,7 +3571,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
3553
3571
|
}
|
|
3554
3572
|
</div>
|
|
3555
3573
|
</ng-template>
|
|
3556
|
-
`,styles:[":host{display:contents}.dga-cmd-root{position:fixed;inset:0;z-index:var(--z-index-dialog, 315);display:grid;place-items:start center;padding:min(20vh,8rem) var(--spacing-xl, 16px) var(--spacing-xl, 16px);pointer-events:none}.dga-cmd-root__veil{position:absolute;inset:0;background:color-mix(in srgb,var(--color-fg, #161616) 45%,transparent);pointer-events:auto}.dga-cmd-root__stage{position:relative;z-index:1;width:min(36rem,100%);pointer-events:auto;outline:none;animation:dga-cmd-rise .18s cubic-bezier(.22,1,.36,1) both}.dga-cmd{display:flex;flex-direction:column;overflow:hidden;border-radius:var(--radius-md, 8px);border:1px solid var(--color-border, #e5e7eb);background:var(--color-card, #fff);box-shadow:var(--shadow-lg, 0 12px 32px rgb(0 0 0 / .14));color:var(--color-fg, #161616)}.dga-cmd[data-appearance=panel]{box-shadow:var(--shadow-sm, 0 1px 2px rgb(0 0 0 / .06))}.dga-cmd__search{display:flex;align-items:center;gap:var(--spacing-md, 8px);border-bottom:1px solid var(--color-border, #e5e7eb);padding-inline:var(--spacing-xl, 16px);padding-block:var(--spacing-lg, 12px)}.dga-cmd__search-icon{display:inline-flex;flex-shrink:0}.dga-cmd__input{width:100%;min-width:0;border:0;background:transparent;color:inherit;font:inherit;font-size:var(--text-body-md, 1rem);outline:none}.dga-cmd__input::placeholder{color:var(--color-muted, #6c737f)}.dga-cmd__clear{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;margin:0;min-width:1.5rem;padding:var(--spacing-xs, 4px);border:0;border-radius:var(--radius-sm, 4px);background:transparent;cursor:pointer;color:var(--color-muted, #6c737f);font:inherit;line-height:1}.dga-cmd__clear:hover{background:var(--color-neutral-light, #f3f4f6)}.dga-cmd__list{max-height:min(22rem,50vh);padding:var(--spacing-xs, 4px);overscroll-behavior:contain}.dga-cmd__heading{padding:var(--spacing-sm, 8px) var(--spacing-lg, 12px) var(--spacing-xs, 4px);font-size:var(--text-body-sm, .875rem);font-weight:600;color:var(--color-muted, #6c737f)}.dga-cmd__empty{margin:0;padding:var(--spacing-3xl, 24px) var(--spacing-xl, 16px);text-align:center;font-size:var(--text-body-md, 1rem);color:var(--color-muted, #6c737f)}.dga-cmd__item{display:flex;width:100%;align-items:center;gap:var(--spacing-md, 8px);padding:var(--spacing-sm, 8px) var(--spacing-lg, 12px);border:0;border-radius:var(--radius-sm, 4px);background:transparent;color:inherit;font:inherit;font-size:var(--text-body-md, 1rem);text-align:start;cursor:pointer;transition:background-color .12s ease}.dga-cmd__item:hover,.dga-cmd__item[data-active]{background:var(--color-neutral-light, #f3f4f6)}.dga-cmd__item:disabled{cursor:not-allowed;opacity:.55}@keyframes dga-cmd-rise{0%{opacity:0;transform:translateY(-8px) scale(.98)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.dga-cmd-root__stage{animation:none}}\n"]}]}],ctorParameters:()=>[],propDecorators:{queryInput:[{type:t.ViewChild,args:["queryInput",{isSignal:!0}]}],groups:[{type:t.Input,args:[{isSignal:!0,alias:"groups",required:!1}]}],items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!1}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],appearance:[{type:t.Input,args:[{isSignal:!0,alias:"appearance",required:!1}]}],placeholder:[{type:t.Input,args:[{isSignal:!0,alias:"placeholder",required:!1}]}],emptyLabel:[{type:t.Input,args:[{isSignal:!0,alias:"emptyLabel",required:!1}]}],clearLabel:[{type:t.Input,args:[{isSignal:!0,alias:"clearLabel",required:!1}]}],dialogLabel:[{type:t.Input,args:[{isSignal:!0,alias:"dialogLabel",required:!1}]}],listLabel:[{type:t.Input,args:[{isSignal:!0,alias:"listLabel",required:!1}]}],closeOnSelect:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnSelect",required:!1}]}],closeOnBackdrop:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnBackdrop",required:!1}]}],hotkey:[{type:t.Input,args:[{isSignal:!0,alias:"hotkey",required:!1}]}],selected:[{type:t.Output,args:["selected"]}],selectedValue:[{type:t.Output,args:["selectedValue"]}],opened:[{type:t.Output,args:["opened"]}],closed:[{type:t.Output,args:["closed"]}],queryChange:[{type:t.Output,args:["queryChange"]}],onHotkey:[{type:
|
|
3574
|
+
`,styles:[":host{display:contents}.dga-cmd-root{position:fixed;inset:0;z-index:var(--z-index-dialog, 315);display:grid;place-items:start center;padding:min(20vh,8rem) var(--spacing-xl, 16px) var(--spacing-xl, 16px);pointer-events:none}.dga-cmd-root__veil{position:absolute;inset:0;background:color-mix(in srgb,var(--color-fg, #161616) 45%,transparent);pointer-events:auto}.dga-cmd-root__stage{position:relative;z-index:1;width:min(36rem,100%);pointer-events:auto;outline:none;animation:dga-cmd-rise .18s cubic-bezier(.22,1,.36,1) both}.dga-cmd{display:flex;flex-direction:column;overflow:hidden;border-radius:var(--radius-md, 8px);border:1px solid var(--color-border, #e5e7eb);background:var(--color-card, #fff);box-shadow:var(--shadow-lg, 0 12px 32px rgb(0 0 0 / .14));color:var(--color-fg, #161616)}.dga-cmd[data-appearance=panel]{box-shadow:var(--shadow-sm, 0 1px 2px rgb(0 0 0 / .06))}.dga-cmd__search{display:flex;align-items:center;gap:var(--spacing-md, 8px);border-bottom:1px solid var(--color-border, #e5e7eb);padding-inline:var(--spacing-xl, 16px);padding-block:var(--spacing-lg, 12px)}.dga-cmd__search-icon{display:inline-flex;flex-shrink:0}.dga-cmd__input{width:100%;min-width:0;border:0;background:transparent;color:inherit;font:inherit;font-size:var(--text-body-md, 1rem);outline:none}.dga-cmd__input::placeholder{color:var(--color-muted, #6c737f)}.dga-cmd__clear{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;margin:0;min-width:1.5rem;padding:var(--spacing-xs, 4px);border:0;border-radius:var(--radius-sm, 4px);background:transparent;cursor:pointer;color:var(--color-muted, #6c737f);font:inherit;line-height:1}.dga-cmd__clear:hover{background:var(--color-neutral-light, #f3f4f6)}.dga-cmd__list{max-height:min(22rem,50vh);padding:var(--spacing-xs, 4px);overscroll-behavior:contain}.dga-cmd__heading{padding:var(--spacing-sm, 8px) var(--spacing-lg, 12px) var(--spacing-xs, 4px);font-size:var(--text-body-sm, .875rem);font-weight:600;color:var(--color-muted, #6c737f)}.dga-cmd__empty{margin:0;padding:var(--spacing-3xl, 24px) var(--spacing-xl, 16px);text-align:center;font-size:var(--text-body-md, 1rem);color:var(--color-muted, #6c737f)}.dga-cmd__item{display:flex;width:100%;align-items:center;gap:var(--spacing-md, 8px);padding:var(--spacing-sm, 8px) var(--spacing-lg, 12px);border:0;border-radius:var(--radius-sm, 4px);background:transparent;color:inherit;font:inherit;font-size:var(--text-body-md, 1rem);text-align:start;cursor:pointer;transition:background-color .12s ease}.dga-cmd__item:hover,.dga-cmd__item[data-active]{background:var(--color-neutral-light, #f3f4f6)}.dga-cmd__item:disabled{cursor:not-allowed;opacity:.55}@keyframes dga-cmd-rise{0%{opacity:0;transform:translateY(-8px) scale(.98)}to{opacity:1;transform:none}}@media(prefers-reduced-motion:reduce){.dga-cmd-root__stage{animation:none}}\n"]}]}],ctorParameters:()=>[],propDecorators:{queryInput:[{type:t.ViewChild,args:["queryInput",{isSignal:!0}]}],groups:[{type:t.Input,args:[{isSignal:!0,alias:"groups",required:!1}]}],items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!1}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],appearance:[{type:t.Input,args:[{isSignal:!0,alias:"appearance",required:!1}]}],placeholder:[{type:t.Input,args:[{isSignal:!0,alias:"placeholder",required:!1}]}],emptyLabel:[{type:t.Input,args:[{isSignal:!0,alias:"emptyLabel",required:!1}]}],clearLabel:[{type:t.Input,args:[{isSignal:!0,alias:"clearLabel",required:!1}]}],dialogLabel:[{type:t.Input,args:[{isSignal:!0,alias:"dialogLabel",required:!1}]}],listLabel:[{type:t.Input,args:[{isSignal:!0,alias:"listLabel",required:!1}]}],closeOnSelect:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnSelect",required:!1}]}],closeOnBackdrop:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnBackdrop",required:!1}]}],hotkey:[{type:t.Input,args:[{isSignal:!0,alias:"hotkey",required:!1}]}],selected:[{type:t.Output,args:["selected"]}],selectedValue:[{type:t.Output,args:["selectedValue"]}],opened:[{type:t.Output,args:["opened"]}],closed:[{type:t.Output,args:["closed"]}],queryChange:[{type:t.Output,args:["queryChange"]}],onHotkey:[{type:O,args:["document:keydown",["$event"]]}]}});let Yr=0;class Ee{doc=x(it);destroyRef=x(L);injector=x(G);rootRef=R("root",...ngDevMode?[{debugName:"rootRef"}]:[]);panel=R("panel",...ngDevMode?[{debugName:"panel"}]:[]);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);title=i("",...ngDevMode?[{debugName:"title"}]:[]);side=i("end",...ngDevMode?[{debugName:"side"}]:[]);closeLabel=i("إغلاق",...ngDevMode?[{debugName:"closeLabel"}]:[]);closeOnBackdrop=i(!0,{...ngDevMode?{debugName:"closeOnBackdrop"}:{},transform:m});closed=w();titleId=`dga-drawer-title-${++Yr}`;previousFocus=null;previousBodyOverflow="";previousHtmlOverflow="";scrollLocked=!1;panelClasses=n(()=>f("dga-drawer-panel absolute top-0 flex h-full w-full max-w-(--container-sm) flex-col","bg-card shadow-lg focus:outline-none"),...ngDevMode?[{debugName:"panelClasses"}]:[]);constructor(){this.destroyRef.onDestroy(()=>{this.unlockScroll(),this.removePortaledRoot()}),M(()=>{if(!this.open()){this.unlockScroll(),this.restoreFocus();return}this.previousFocus=this.doc.activeElement??null,this.lockScroll(),this.rootRef()?.nativeElement&&this.portalToBody(),T(()=>{this.portalToBody(),this.focusInitial()},{injector:this.injector})})}close(){this.open()&&(this.open.set(!1),this.closed.emit())}onBackdrop(){this.closeOnBackdrop()&&this.close()}onKeydown(e){if(e.key==="Escape"){e.stopPropagation(),this.close();return}e.key==="Tab"&&this.trapFocus(e)}portalToBody(){const e=this.rootRef()?.nativeElement;!e||e.parentElement===this.doc.body||this.doc.body.appendChild(e)}removePortaledRoot(){const e=this.rootRef()?.nativeElement;e?.parentElement===this.doc.body&&e.remove()}focusInitial(){const e=this.panel()?.nativeElement;if(!e)return;(this.getFocusable(e)[0]??e).focus()}trapFocus(e){const a=this.panel()?.nativeElement;if(!a)return;const s=this.getFocusable(a);if(s.length===0){e.preventDefault(),a.focus();return}const r=s[0],l=s[s.length-1],u=this.doc.activeElement;e.shiftKey&&u===r?(e.preventDefault(),l.focus()):!e.shiftKey&&u===l&&(e.preventDefault(),r.focus())}getFocusable(e){return Array.from(e.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(s=>!s.hasAttribute("disabled")&&s.getClientRects().length>0)}lockScroll(){this.scrollLocked||(this.previousBodyOverflow=this.doc.body.style.overflow,this.previousHtmlOverflow=this.doc.documentElement.style.overflow,this.doc.body.style.overflow="hidden",this.doc.documentElement.style.overflow="hidden",this.scrollLocked=!0)}unlockScroll(){this.scrollLocked&&(this.doc.body.style.overflow=this.previousBodyOverflow,this.doc.documentElement.style.overflow=this.previousHtmlOverflow,this.scrollLocked=!1)}restoreFocus(){this.previousFocus?.focus?.(),this.previousFocus=null}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ee,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ee,isStandalone:!0,selector:"dga-drawer",inputs:{open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},side:{classPropertyName:"side",publicName:"side",isSignal:!0,isRequired:!1,transformFunction:null},closeLabel:{classPropertyName:"closeLabel",publicName:"closeLabel",isSignal:!0,isRequired:!1,transformFunction:null},closeOnBackdrop:{classPropertyName:"closeOnBackdrop",publicName:"closeOnBackdrop",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",closed:"closed"},viewQueries:[{propertyName:"rootRef",first:!0,predicate:["root"],descendants:!0,isSignal:!0},{propertyName:"panel",first:!0,predicate:["panel"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
3557
3575
|
@if (open()) {
|
|
3558
3576
|
<div #root class="dga-drawer-root">
|
|
3559
3577
|
<div
|
|
@@ -3675,7 +3693,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
3675
3693
|
</div>
|
|
3676
3694
|
</div>
|
|
3677
3695
|
}
|
|
3678
|
-
`,styles:[":host{display:contents}.dga-drawer-root{position:fixed;inset:0;z-index:var(--z-index-urgent, 400)}.dga-drawer-root__veil{position:absolute;inset:0;background:var(--color-overlay, rgb(0 0 0 / .5))}.dga-drawer-panel{z-index:1}[data-side=start]{inset-inline-start:0;border-inline-end:1px solid var(--dga-border-neutral-subtle, var(--dga-divider))}[data-side=end]{inset-inline-end:0;border-inline-start:1px solid var(--dga-border-neutral-subtle, var(--dga-divider))}\n"]}]}],ctorParameters:()=>[],propDecorators:{rootRef:[{type:t.ViewChild,args:["root",{isSignal:!0}]}],panel:[{type:t.ViewChild,args:["panel",{isSignal:!0}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],side:[{type:t.Input,args:[{isSignal:!0,alias:"side",required:!1}]}],closeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],closeOnBackdrop:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnBackdrop",required:!1}]}],closed:[{type:t.Output,args:["closed"]}]}});let Ur=0;const
|
|
3696
|
+
`,styles:[":host{display:contents}.dga-drawer-root{position:fixed;inset:0;z-index:var(--z-index-urgent, 400)}.dga-drawer-root__veil{position:absolute;inset:0;background:var(--color-overlay, rgb(0 0 0 / .5))}.dga-drawer-panel{z-index:1}[data-side=start]{inset-inline-start:0;border-inline-end:1px solid var(--dga-border-neutral-subtle, var(--dga-divider))}[data-side=end]{inset-inline-end:0;border-inline-start:1px solid var(--dga-border-neutral-subtle, var(--dga-divider))}\n"]}]}],ctorParameters:()=>[],propDecorators:{rootRef:[{type:t.ViewChild,args:["root",{isSignal:!0}]}],panel:[{type:t.ViewChild,args:["panel",{isSignal:!0}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],side:[{type:t.Input,args:[{isSignal:!0,alias:"side",required:!1}]}],closeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],closeOnBackdrop:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnBackdrop",required:!1}]}],closed:[{type:t.Output,args:["closed"]}]}});let Ur=0;const Ks={peek:"40dvh",half:"60dvh",full:"85dvh"},Gr=80;class $t{doc=x(it);destroyRef=x(L);injector=x(G);rootRef=R("root",...ngDevMode?[{debugName:"rootRef"}]:[]);panel=R("panel",...ngDevMode?[{debugName:"panel"}]:[]);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);title=i("",...ngDevMode?[{debugName:"title"}]:[]);snap=i("full",...ngDevMode?[{debugName:"snap"}]:[]);closeLabel=i("إغلاق",...ngDevMode?[{debugName:"closeLabel"}]:[]);closeOnBackdrop=i(!0,{...ngDevMode?{debugName:"closeOnBackdrop"}:{},transform:m});closed=w();titleId=`dga-bottom-sheet-title-${++Ur}`;dragging=y(!1,...ngDevMode?[{debugName:"dragging"}]:[]);dragY=y(0,...ngDevMode?[{debugName:"dragY"}]:[]);dragPointerId=null;dragStartY=0;previousFocus=null;previousBodyOverflow="";previousHtmlOverflow="";scrollLocked=!1;maxHeight=n(()=>Ks[this.snap()]??Ks.full,...ngDevMode?[{debugName:"maxHeight"}]:[]);panelTransform=n(()=>{const e=this.dragY();return e>0?`translateY(${e}px)`:null},...ngDevMode?[{debugName:"panelTransform"}]:[]);panelClasses=n(()=>f("dga-sheet-panel focus:outline-none"),...ngDevMode?[{debugName:"panelClasses"}]:[]);constructor(){this.destroyRef.onDestroy(()=>{this.unlockScroll(),this.removePortaledRoot()}),M(()=>{if(!this.open()){this.unlockScroll(),this.restoreFocus(),this.resetDrag();return}this.previousFocus=this.doc.activeElement??null,this.lockScroll(),this.rootRef()?.nativeElement&&this.portalToBody(),T(()=>{this.portalToBody(),this.focusInitial()},{injector:this.injector})})}close(){this.open()&&(this.open.set(!1),this.closed.emit())}onBackdrop(){this.closeOnBackdrop()&&this.close()}onKeydown(e){if(e.key==="Escape"){e.stopPropagation(),this.close();return}e.key==="Tab"&&this.trapFocus(e)}onHandlePointerDown(e){if(e.button!==0&&e.pointerType==="mouse")return;e.currentTarget.setPointerCapture(e.pointerId),this.dragPointerId=e.pointerId,this.dragStartY=e.clientY,this.dragging.set(!0),this.dragY.set(0)}onHandlePointerMove(e){if(!this.dragging()||e.pointerId!==this.dragPointerId)return;const a=Math.max(0,e.clientY-this.dragStartY);this.dragY.set(a)}onHandlePointerUp(e){if(e.pointerId!==this.dragPointerId)return;const a=e.currentTarget;a.hasPointerCapture(e.pointerId)&&a.releasePointerCapture(e.pointerId);const s=this.dragY();this.resetDrag(),s>=Gr&&this.close()}resetDrag(){this.dragging.set(!1),this.dragY.set(0),this.dragPointerId=null,this.dragStartY=0}portalToBody(){const e=this.rootRef()?.nativeElement;!e||e.parentElement===this.doc.body||this.doc.body.appendChild(e)}removePortaledRoot(){const e=this.rootRef()?.nativeElement;e?.parentElement===this.doc.body&&e.remove()}focusInitial(){const e=this.panel()?.nativeElement;if(!e)return;(this.getFocusable(e)[0]??e).focus()}trapFocus(e){const a=this.panel()?.nativeElement;if(!a)return;const s=this.getFocusable(a);if(s.length===0){e.preventDefault(),a.focus();return}const r=s[0],l=s[s.length-1],u=this.doc.activeElement;e.shiftKey&&u===r?(e.preventDefault(),l.focus()):!e.shiftKey&&u===l&&(e.preventDefault(),r.focus())}getFocusable(e){return Array.from(e.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(s=>!s.hasAttribute("disabled")&&s.getClientRects().length>0)}lockScroll(){this.scrollLocked||(this.previousBodyOverflow=this.doc.body.style.overflow,this.previousHtmlOverflow=this.doc.documentElement.style.overflow,this.doc.body.style.overflow="hidden",this.doc.documentElement.style.overflow="hidden",this.scrollLocked=!0)}unlockScroll(){this.scrollLocked&&(this.doc.body.style.overflow=this.previousBodyOverflow,this.doc.documentElement.style.overflow=this.previousHtmlOverflow,this.scrollLocked=!1)}restoreFocus(){this.previousFocus?.focus?.(),this.previousFocus=null}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:$t,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:$t,isStandalone:!0,selector:"dga-bottom-sheet",inputs:{open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},snap:{classPropertyName:"snap",publicName:"snap",isSignal:!0,isRequired:!1,transformFunction:null},closeLabel:{classPropertyName:"closeLabel",publicName:"closeLabel",isSignal:!0,isRequired:!1,transformFunction:null},closeOnBackdrop:{classPropertyName:"closeOnBackdrop",publicName:"closeOnBackdrop",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",closed:"closed"},viewQueries:[{propertyName:"rootRef",first:!0,predicate:["root"],descendants:!0,isSignal:!0},{propertyName:"panel",first:!0,predicate:["panel"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
3679
3697
|
@if (open()) {
|
|
3680
3698
|
<div #root class="dga-sheet-root">
|
|
3681
3699
|
<div
|
|
@@ -3829,7 +3847,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
3829
3847
|
</div>
|
|
3830
3848
|
</div>
|
|
3831
3849
|
}
|
|
3832
|
-
`,styles:[":host{display:contents}.dga-sheet-root{position:fixed;inset:0;z-index:var(--z-index-urgent, 400)}.dga-sheet-root__veil{position:absolute;inset:0;background:var(--color-overlay, rgb(0 0 0 / .5))}.dga-sheet-panel{z-index:1;position:absolute;inset-inline:0;bottom:0;display:flex;flex-direction:column;width:100%;max-height:85dvh;border-start-start-radius:var(--radius-lg, 12px);border-start-end-radius:var(--radius-lg, 12px);border-block-start:1px solid var(--dga-border-neutral-subtle, var(--dga-divider));background:var(--color-card, #fff);box-shadow:var(--shadow-lg);transition:transform .2s ease-out;will-change:transform}.dga-sheet__handle{display:flex;flex-shrink:0;cursor:grab;align-items:center;justify-content:center;padding-block:var(--spacing-md, 8px) var(--spacing-xs, 4px);touch-action:none;-webkit-user-select:none;user-select:none}.dga-sheet__handle:active{cursor:grabbing}.dga-sheet__handle-pill{display:block;width:2.5rem;height:.25rem;border-radius:999px;background:var(--color-border, #d2d6db)}@media(prefers-reduced-motion:reduce){.dga-sheet-panel{transition:none}}\n"]}]}],ctorParameters:()=>[],propDecorators:{rootRef:[{type:t.ViewChild,args:["root",{isSignal:!0}]}],panel:[{type:t.ViewChild,args:["panel",{isSignal:!0}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],snap:[{type:t.Input,args:[{isSignal:!0,alias:"snap",required:!1}]}],closeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],closeOnBackdrop:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnBackdrop",required:!1}]}],closed:[{type:t.Output,args:["closed"]}]}});let Xr=0;class Bt{host=x(F);destroyRef=x(L);injector=x(G);triggerRef=R("trigger",...ngDevMode?[{debugName:"triggerRef"}]:[]);panelRef=R("panel",...ngDevMode?[{debugName:"panelRef"}]:[]);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);placement=i("bottom",...ngDevMode?[{debugName:"placement"}]:[]);closeOnOutside=i(!0,{...ngDevMode?{debugName:"closeOnOutside"}:{},transform:m});opened=w();closed=w();panelStyle=y({},...ngDevMode?[{debugName:"panelStyle"}]:[]);seq=++Xr;triggerId=`dga-popover-trigger-${this.seq}`;panelId=`dga-popover-panel-${this.seq}`;onReposition=()=>{this.open()&&this.syncPanelPosition()};constructor(){document.addEventListener("scroll",this.onReposition,!0),window.addEventListener("resize",this.onReposition),this.destroyRef.onDestroy(()=>{this.detachPortaledPanel(),document.removeEventListener("scroll",this.onReposition,!0),window.removeEventListener("resize",this.onReposition)}),M(()=>{const e=this.open();fs(()=>{e?
|
|
3850
|
+
`,styles:[":host{display:contents}.dga-sheet-root{position:fixed;inset:0;z-index:var(--z-index-urgent, 400)}.dga-sheet-root__veil{position:absolute;inset:0;background:var(--color-overlay, rgb(0 0 0 / .5))}.dga-sheet-panel{z-index:1;position:absolute;inset-inline:0;bottom:0;display:flex;flex-direction:column;width:100%;max-height:85dvh;border-start-start-radius:var(--radius-lg, 12px);border-start-end-radius:var(--radius-lg, 12px);border-block-start:1px solid var(--dga-border-neutral-subtle, var(--dga-divider));background:var(--color-card, #fff);box-shadow:var(--shadow-lg);transition:transform .2s ease-out;will-change:transform}.dga-sheet__handle{display:flex;flex-shrink:0;cursor:grab;align-items:center;justify-content:center;padding-block:var(--spacing-md, 8px) var(--spacing-xs, 4px);touch-action:none;-webkit-user-select:none;user-select:none}.dga-sheet__handle:active{cursor:grabbing}.dga-sheet__handle-pill{display:block;width:2.5rem;height:.25rem;border-radius:999px;background:var(--color-border, #d2d6db)}@media(prefers-reduced-motion:reduce){.dga-sheet-panel{transition:none}}\n"]}]}],ctorParameters:()=>[],propDecorators:{rootRef:[{type:t.ViewChild,args:["root",{isSignal:!0}]}],panel:[{type:t.ViewChild,args:["panel",{isSignal:!0}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],snap:[{type:t.Input,args:[{isSignal:!0,alias:"snap",required:!1}]}],closeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],closeOnBackdrop:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnBackdrop",required:!1}]}],closed:[{type:t.Output,args:["closed"]}]}});let Xr=0;class Bt{host=x(F);destroyRef=x(L);injector=x(G);triggerRef=R("trigger",...ngDevMode?[{debugName:"triggerRef"}]:[]);panelRef=R("panel",...ngDevMode?[{debugName:"panelRef"}]:[]);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);placement=i("bottom",...ngDevMode?[{debugName:"placement"}]:[]);closeOnOutside=i(!0,{...ngDevMode?{debugName:"closeOnOutside"}:{},transform:m});opened=w();closed=w();panelStyle=y({},...ngDevMode?[{debugName:"panelStyle"}]:[]);seq=++Xr;triggerId=`dga-popover-trigger-${this.seq}`;panelId=`dga-popover-panel-${this.seq}`;onReposition=()=>{this.open()&&this.syncPanelPosition()};constructor(){document.addEventListener("scroll",this.onReposition,!0),window.addEventListener("resize",this.onReposition),this.destroyRef.onDestroy(()=>{this.detachPortaledPanel(),document.removeEventListener("scroll",this.onReposition,!0),window.removeEventListener("resize",this.onReposition)}),M(()=>{const e=this.open();fs(()=>{e?T(()=>{this.portalPanelToBody(),this.syncPanelPosition(),this.focusPanel()},{injector:this.injector}):(this.detachPortaledPanel(),this.panelStyle.set({}))})})}panelClasses(){return f("dga-popover__panel fixed z-dropdown","text-body-md text-paragraph")}onTriggerClick(e){e.stopPropagation(),this.toggle()}onTriggerKey(e){e.key==="Enter"||e.key===" "?(e.preventDefault(),this.toggle()):e.key==="Escape"&&this.open()&&(e.preventDefault(),e.stopPropagation(),this.close(!0))}onPanelKey(e){e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),this.close(!0))}toggle(){this.open()?this.close(!0):this.openPanel()}openPanel(){this.open()||(this.syncPanelPosition(),this.open.set(!0),this.opened.emit())}close(e=!1){this.open()&&(this.detachPortaledPanel(),this.open.set(!1),this.closed.emit(),e&&queueMicrotask(()=>this.triggerRef()?.nativeElement.focus()))}onDocumentPointer(e){if(!this.open()||!this.closeOnOutside())return;const a=e.target;a&&(this.host.nativeElement.contains(a)||this.panelRef()?.nativeElement.contains(a)||this.close(!1))}onDocumentKeydown(e){this.open()&&e.key==="Escape"&&(e.stopPropagation(),this.close(!0))}portalPanelToBody(){const e=this.panelRef()?.nativeElement;!e||e.parentElement===document.body||document.body.appendChild(e)}detachPortaledPanel(){const e=this.panelRef()?.nativeElement;!e||e.parentElement!==document.body||this.host.nativeElement.appendChild(e)}focusPanel(){const e=this.panelRef()?.nativeElement;if(!e)return;(e.querySelector('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')??e).focus?.()}syncPanelPosition(){const e=this.triggerRef()?.nativeElement;if(!e||typeof document>"u")return;const a=e.getBoundingClientRect(),s=8,r=8,l=this.placement(),u=getComputedStyle(e).direction==="rtl"||document.documentElement.getAttribute("dir")==="rtl",o=this.panelRef()?.nativeElement;o&&(o.dir=u?"rtl":"ltr",o.tabIndex=-1);const c=window.innerWidth,p=window.innerHeight,g=o?.offsetWidth||160,b=o?.offsetHeight||80;let N=0,C=0;switch(l){case"top":N=a.top-b-s,C=a.left+a.width/2-g/2;break;case"start":N=a.top+a.height/2-b/2,C=u?a.right+s:a.left-g-s;break;case"end":N=a.top+a.height/2-b/2,C=u?a.left-g-s:a.right+s;break;default:N=a.bottom+s,C=a.left+a.width/2-g/2;break}C=Math.min(Math.max(r,C),Math.max(r,c-g-r)),N=Math.min(Math.max(r,N),Math.max(r,p-b-r)),this.panelStyle.set({position:"fixed",zIndex:"var(--z-index-dropdown)",top:`${Math.round(N)}px`,left:`${Math.round(C)}px`,right:"auto",bottom:"auto"})}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Bt,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Bt,isStandalone:!0,selector:"dga-popover",inputs:{open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},placement:{classPropertyName:"placement",publicName:"placement",isSignal:!0,isRequired:!1,transformFunction:null},closeOnOutside:{classPropertyName:"closeOnOutside",publicName:"closeOnOutside",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",opened:"opened",closed:"closed"},host:{listeners:{"document:pointerdown":"onDocumentPointer($event)","document:keydown":"onDocumentKeydown($event)"},properties:{"attr.data-open":"open() || null","attr.data-placement":"placement()"}},viewQueries:[{propertyName:"triggerRef",first:!0,predicate:["trigger"],descendants:!0,isSignal:!0},{propertyName:"panelRef",first:!0,predicate:["panel"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
3833
3851
|
<span
|
|
3834
3852
|
#trigger
|
|
3835
3853
|
class="dga-popover__trigger"
|
|
@@ -3885,7 +3903,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
3885
3903
|
<ng-content select="[dgaPopoverPanel]" />
|
|
3886
3904
|
</div>
|
|
3887
3905
|
}
|
|
3888
|
-
`,host:{"[attr.data-open]":"open() || null","[attr.data-placement]":"placement()"},styles:[":host{position:relative;display:inline-flex;max-width:100%;vertical-align:middle}.dga-popover__trigger{display:inline-flex;max-width:100%;align-items:stretch;cursor:pointer}.dga-popover__panel{box-sizing:border-box;min-width:8rem;max-width:min(20rem,calc(100vw - 1rem));border-radius:var(--radius-md, 8px);border:1px solid var(--dga-border-neutral-subtle, var(--dga-divider));background:var(--color-card, #fff);box-shadow:var(--shadow-lg);outline:none;animation:dga-popover-in .14s ease-out forwards}@keyframes dga-popover-in{0%{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.dga-popover__panel{animation:none}}\n"]}]}],ctorParameters:()=>[],propDecorators:{triggerRef:[{type:t.ViewChild,args:["trigger",{isSignal:!0}]}],panelRef:[{type:t.ViewChild,args:["panel",{isSignal:!0}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],placement:[{type:t.Input,args:[{isSignal:!0,alias:"placement",required:!1}]}],closeOnOutside:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnOutside",required:!1}]}],opened:[{type:t.Output,args:["opened"]}],closed:[{type:t.Output,args:["closed"]}],onDocumentPointer:[{type:
|
|
3906
|
+
`,host:{"[attr.data-open]":"open() || null","[attr.data-placement]":"placement()"},styles:[":host{position:relative;display:inline-flex;max-width:100%;vertical-align:middle}.dga-popover__trigger{display:inline-flex;max-width:100%;align-items:stretch;cursor:pointer}.dga-popover__panel{box-sizing:border-box;min-width:8rem;max-width:min(20rem,calc(100vw - 1rem));border-radius:var(--radius-md, 8px);border:1px solid var(--dga-border-neutral-subtle, var(--dga-divider));background:var(--color-card, #fff);box-shadow:var(--shadow-lg);outline:none;animation:dga-popover-in .14s ease-out forwards}@keyframes dga-popover-in{0%{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@media(prefers-reduced-motion:reduce){.dga-popover__panel{animation:none}}\n"]}]}],ctorParameters:()=>[],propDecorators:{triggerRef:[{type:t.ViewChild,args:["trigger",{isSignal:!0}]}],panelRef:[{type:t.ViewChild,args:["panel",{isSignal:!0}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],placement:[{type:t.Input,args:[{isSignal:!0,alias:"placement",required:!1}]}],closeOnOutside:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnOutside",required:!1}]}],opened:[{type:t.Output,args:["opened"]}],closed:[{type:t.Output,args:["closed"]}],onDocumentPointer:[{type:O,args:["document:pointerdown",["$event"]]}],onDocumentKeydown:[{type:O,args:["document:keydown",["$event"]]}]}});const Zr={fade:"dga-image-popup-fade-in",scale:"dga-image-popup-scale-in",slide:"dga-image-popup-slide-in",zoom:"dga-image-popup-zoom-in"},Jr={fade:"dga-image-popup-fade-out",scale:"dga-image-popup-scale-out",slide:"dga-image-popup-slide-out",zoom:"dga-image-popup-zoom-out"};let Qr=0;class jt{doc=x(it);injector=x(G);host=x(F);panel=R("panel",...ngDevMode?[{debugName:"panel"}]:[]);anchor=null;images=i([],...ngDevMode?[{debugName:"images"}]:[]);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);activeIndex=S(0,...ngDevMode?[{debugName:"activeIndex"}]:[]);animation=i("scale",...ngDevMode?[{debugName:"animation"}]:[]);imageTransition=i("fade",...ngDevMode?[{debugName:"imageTransition"}]:[]);label=i("معرض الصور",...ngDevMode?[{debugName:"label"}]:[]);closeLabel=i("إغلاق",...ngDevMode?[{debugName:"closeLabel"}]:[]);prevLabel=i("الصورة السابقة",...ngDevMode?[{debugName:"prevLabel"}]:[]);nextLabel=i("الصورة التالية",...ngDevMode?[{debugName:"nextLabel"}]:[]);closeOnBackdrop=i(!0,{...ngDevMode?{debugName:"closeOnBackdrop"}:{},transform:m});closed=w();opened=w();captionId=`dga-image-popup-caption-${++Qr}`;rendered=y(!1,...ngDevMode?[{debugName:"rendered"}]:[]);leaving=y(!1,...ngDevMode?[{debugName:"leaving"}]:[]);imageEpoch=y(0,...ngDevMode?[{debugName:"imageEpoch"}]:[]);previousFocus=null;previousOverflow="";normalizedImages=n(()=>this.images().map(e=>typeof e=="string"?{src:e}:e),...ngDevMode?[{debugName:"normalizedImages"}]:[]);count=n(()=>this.normalizedImages().length,...ngDevMode?[{debugName:"count"}]:[]);showArrows=n(()=>this.count()>1,...ngDevMode?[{debugName:"showArrows"}]:[]);panelClasses=n(()=>f("relative z-dialog flex max-h-full w-full max-w-(--container-3xl) flex-col","items-center gap-lg focus:outline-none",this.panelAnimClass()),...ngDevMode?[{debugName:"panelClasses"}]:[]);backdropClasses=n(()=>{const a=this.animation()==="none"?"":this.leaving()?"dga-image-popup-fade-out":"dga-image-popup-fade-in";return f("absolute inset-0 bg-overlay",a)},...ngDevMode?[{debugName:"backdropClasses"}]:[]);imageClasses=n(()=>(this.imageEpoch(),f("max-h-[75vh] w-auto max-w-full object-contain",this.imageTransition()==="fade"?"dga-image-popup-img-fade":null)),...ngDevMode?[{debugName:"imageClasses"}]:[]);panelAnimClass=n(()=>{const e=this.animation();return e==="none"?"":this.leaving()?Jr[e]:Zr[e]},...ngDevMode?[{debugName:"panelAnimClass"}]:[]);constructor(){x(L).onDestroy(()=>{this.unlockScroll(),this.restoreHost(!0)}),M(()=>{if(this.open()){this.leaving.set(!1),this.portalHostToBody(),this.rendered()||(this.rendered.set(!0),this.previousFocus=document.activeElement??null,this.lockScroll(),T(()=>{this.portalHostToBody(),this.focusInitial(),this.opened.emit()},{injector:this.injector}));return}if(this.rendered()){if(this.animation()==="none"){this.finishClose();return}this.leaving.set(!0)}})}clampedIndex(){const e=this.count();return e<=0?0:Math.min(Math.max(0,this.activeIndex()),e-1)}activeSrc(){return this.normalizedImages()[this.clampedIndex()]?.src??""}activeAlt(){return this.normalizedImages()[this.clampedIndex()]?.alt??""}goTo(e){const a=this.count();if(a<=0)return;const s=Math.min(Math.max(0,e),a-1);s!==this.activeIndex()&&(this.activeIndex.set(s),this.imageEpoch.update(r=>r+1))}next(){const e=this.count();e<=1||this.goTo((this.clampedIndex()+1)%e)}prev(){const e=this.count();e<=1||this.goTo((this.clampedIndex()-1+e)%e)}show(e=0){this.goTo(e),this.open.set(!0)}close(){!this.open()&&!this.rendered()||this.open.set(!1)}onBackdrop(){this.closeOnBackdrop()&&this.close()}onKeydown(e){if(e.key==="Escape"){e.stopPropagation(),this.close();return}if(e.key==="ArrowRight"){e.preventDefault(),this.next();return}if(e.key==="ArrowLeft"){e.preventDefault(),this.prev();return}e.key==="Tab"&&this.trapFocus(e)}onAnimationEnd(e){this.leaving()&&e.target===this.panel()?.nativeElement&&this.finishClose()}finishClose(){this.rendered()&&(this.leaving.set(!1),this.rendered.set(!1),this.unlockScroll(),this.restoreFocus(),this.closed.emit(),T(()=>this.restoreHost(),{injector:this.injector}))}portalHostToBody(){const e=this.host.nativeElement;if(e.parentElement===this.doc.body)return;const a=e.parentElement;a&&(this.anchor||(this.anchor=this.doc.createComment("dga-image-popup"),a.insertBefore(this.anchor,e)),this.doc.body.appendChild(e))}restoreHost(e=!1){if(!e&&(this.open()||this.rendered()))return;const a=this.anchor;if(!a)return;const s=this.host.nativeElement;a.parentNode&&s.isConnected&&s.parentElement===this.doc.body&&a.parentNode.insertBefore(s,a),a.remove(),this.anchor=null}focusInitial(){const e=this.panel()?.nativeElement;if(!e)return;(this.getFocusable(e)[0]??e).focus()}trapFocus(e){const a=this.panel()?.nativeElement;if(!a)return;const s=this.getFocusable(a);if(s.length===0){e.preventDefault(),a.focus();return}const r=s[0],l=s[s.length-1],u=document.activeElement;e.shiftKey&&u===r?(e.preventDefault(),l.focus()):!e.shiftKey&&u===l&&(e.preventDefault(),r.focus())}getFocusable(e){return Array.from(e.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(s=>!s.hasAttribute("disabled")&&s.getClientRects().length>0)}lockScroll(){this.previousOverflow=document.body.style.overflow,document.body.style.overflow="hidden"}unlockScroll(){document.body.style.overflow=this.previousOverflow}restoreFocus(){this.previousFocus?.focus?.(),this.previousFocus=null}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:jt,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:jt,isStandalone:!0,selector:"dga-image-popup",inputs:{images:{classPropertyName:"images",publicName:"images",isSignal:!0,isRequired:!1,transformFunction:null},open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},activeIndex:{classPropertyName:"activeIndex",publicName:"activeIndex",isSignal:!0,isRequired:!1,transformFunction:null},animation:{classPropertyName:"animation",publicName:"animation",isSignal:!0,isRequired:!1,transformFunction:null},imageTransition:{classPropertyName:"imageTransition",publicName:"imageTransition",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},closeLabel:{classPropertyName:"closeLabel",publicName:"closeLabel",isSignal:!0,isRequired:!1,transformFunction:null},prevLabel:{classPropertyName:"prevLabel",publicName:"prevLabel",isSignal:!0,isRequired:!1,transformFunction:null},nextLabel:{classPropertyName:"nextLabel",publicName:"nextLabel",isSignal:!0,isRequired:!1,transformFunction:null},closeOnBackdrop:{classPropertyName:"closeOnBackdrop",publicName:"closeOnBackdrop",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",activeIndex:"activeIndexChange",closed:"closed",opened:"opened"},host:{properties:{"attr.data-open":'rendered() ? "" : null',"attr.data-animation":"animation()"}},viewQueries:[{propertyName:"panel",first:!0,predicate:["panel"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
3889
3907
|
@if (rendered()) {
|
|
3890
3908
|
<div class="fixed inset-0 z-overlay flex items-center justify-center p-xl">
|
|
3891
3909
|
<div
|
|
@@ -4053,7 +4071,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
4053
4071
|
</div>
|
|
4054
4072
|
</div>
|
|
4055
4073
|
}
|
|
4056
|
-
`,changeDetection:h.OnPush,host:{"[attr.data-open]":'rendered() ? "" : null',"[attr.data-animation]":"animation()"},styles:[":host{display:contents}:host-context([dir=\"rtl\"]) .dga-image-popup-arrow dga-icon{transform:scaleX(-1)}@keyframes dga-image-popup-fade-in{0%{opacity:0}to{opacity:1}}@keyframes dga-image-popup-fade-out{0%{opacity:1}to{opacity:0}}@keyframes dga-image-popup-scale-in{0%{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}@keyframes dga-image-popup-scale-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}@keyframes dga-image-popup-slide-in{0%{opacity:0;transform:translateY(1.25rem)}to{opacity:1;transform:translateY(0)}}@keyframes dga-image-popup-slide-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(.85rem)}}@keyframes dga-image-popup-zoom-in{0%{opacity:0;transform:scale(.72)}to{opacity:1;transform:scale(1)}}@keyframes dga-image-popup-zoom-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.86)}}@keyframes dga-image-popup-img-fade{0%{opacity:.35}to{opacity:1}}.dga-image-popup-fade-in{animation:dga-image-popup-fade-in .2s ease-out both}.dga-image-popup-fade-out{animation:dga-image-popup-fade-out .15s ease-in both}.dga-image-popup-scale-in{animation:dga-image-popup-scale-in .22s cubic-bezier(.16,1,.3,1) both}.dga-image-popup-scale-out{animation:dga-image-popup-scale-out .16s ease-in both}.dga-image-popup-slide-in{animation:dga-image-popup-slide-in .24s cubic-bezier(.16,1,.3,1) both}.dga-image-popup-slide-out{animation:dga-image-popup-slide-out .17s ease-in both}.dga-image-popup-zoom-in{animation:dga-image-popup-zoom-in .28s cubic-bezier(.16,1,.3,1) both}.dga-image-popup-zoom-out{animation:dga-image-popup-zoom-out .18s ease-in both}.dga-image-popup-img-fade{animation:dga-image-popup-img-fade .22s ease-out both}@media(prefers-reduced-motion:reduce){.dga-image-popup-fade-in,.dga-image-popup-fade-out,.dga-image-popup-scale-in,.dga-image-popup-scale-out,.dga-image-popup-slide-in,.dga-image-popup-slide-out,.dga-image-popup-zoom-in,.dga-image-popup-zoom-out,.dga-image-popup-img-fade{animation-duration:.01ms!important}}:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-fade-in,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-fade-out,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-scale-in,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-scale-out,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-slide-in,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-slide-out,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-zoom-in,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-zoom-out,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-img-fade{animation-duration:.01ms!important}\n"]}]}],ctorParameters:()=>[],propDecorators:{panel:[{type:t.ViewChild,args:["panel",{isSignal:!0}]}],images:[{type:t.Input,args:[{isSignal:!0,alias:"images",required:!1}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],activeIndex:[{type:t.Input,args:[{isSignal:!0,alias:"activeIndex",required:!1}]},{type:t.Output,args:["activeIndexChange"]}],animation:[{type:t.Input,args:[{isSignal:!0,alias:"animation",required:!1}]}],imageTransition:[{type:t.Input,args:[{isSignal:!0,alias:"imageTransition",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],closeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],prevLabel:[{type:t.Input,args:[{isSignal:!0,alias:"prevLabel",required:!1}]}],nextLabel:[{type:t.Input,args:[{isSignal:!0,alias:"nextLabel",required:!1}]}],closeOnBackdrop:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnBackdrop",required:!1}]}],closed:[{type:t.Output,args:["closed"]}],opened:[{type:t.Output,args:["opened"]}]}});const en=/\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i,tn=/\.pdf$/i;function
|
|
4074
|
+
`,changeDetection:h.OnPush,host:{"[attr.data-open]":'rendered() ? "" : null',"[attr.data-animation]":"animation()"},styles:[":host{display:contents}:host-context([dir=\"rtl\"]) .dga-image-popup-arrow dga-icon{transform:scaleX(-1)}@keyframes dga-image-popup-fade-in{0%{opacity:0}to{opacity:1}}@keyframes dga-image-popup-fade-out{0%{opacity:1}to{opacity:0}}@keyframes dga-image-popup-scale-in{0%{opacity:0;transform:scale(.94)}to{opacity:1;transform:scale(1)}}@keyframes dga-image-popup-scale-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.96)}}@keyframes dga-image-popup-slide-in{0%{opacity:0;transform:translateY(1.25rem)}to{opacity:1;transform:translateY(0)}}@keyframes dga-image-popup-slide-out{0%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(.85rem)}}@keyframes dga-image-popup-zoom-in{0%{opacity:0;transform:scale(.72)}to{opacity:1;transform:scale(1)}}@keyframes dga-image-popup-zoom-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.86)}}@keyframes dga-image-popup-img-fade{0%{opacity:.35}to{opacity:1}}.dga-image-popup-fade-in{animation:dga-image-popup-fade-in .2s ease-out both}.dga-image-popup-fade-out{animation:dga-image-popup-fade-out .15s ease-in both}.dga-image-popup-scale-in{animation:dga-image-popup-scale-in .22s cubic-bezier(.16,1,.3,1) both}.dga-image-popup-scale-out{animation:dga-image-popup-scale-out .16s ease-in both}.dga-image-popup-slide-in{animation:dga-image-popup-slide-in .24s cubic-bezier(.16,1,.3,1) both}.dga-image-popup-slide-out{animation:dga-image-popup-slide-out .17s ease-in both}.dga-image-popup-zoom-in{animation:dga-image-popup-zoom-in .28s cubic-bezier(.16,1,.3,1) both}.dga-image-popup-zoom-out{animation:dga-image-popup-zoom-out .18s ease-in both}.dga-image-popup-img-fade{animation:dga-image-popup-img-fade .22s ease-out both}@media(prefers-reduced-motion:reduce){.dga-image-popup-fade-in,.dga-image-popup-fade-out,.dga-image-popup-scale-in,.dga-image-popup-scale-out,.dga-image-popup-slide-in,.dga-image-popup-slide-out,.dga-image-popup-zoom-in,.dga-image-popup-zoom-out,.dga-image-popup-img-fade{animation-duration:.01ms!important}}:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-fade-in,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-fade-out,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-scale-in,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-scale-out,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-slide-in,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-slide-out,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-zoom-in,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-zoom-out,:host-context([data-a11y~=\"reduce-motion\"]) .dga-image-popup-img-fade{animation-duration:.01ms!important}\n"]}]}],ctorParameters:()=>[],propDecorators:{panel:[{type:t.ViewChild,args:["panel",{isSignal:!0}]}],images:[{type:t.Input,args:[{isSignal:!0,alias:"images",required:!1}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],activeIndex:[{type:t.Input,args:[{isSignal:!0,alias:"activeIndex",required:!1}]},{type:t.Output,args:["activeIndexChange"]}],animation:[{type:t.Input,args:[{isSignal:!0,alias:"animation",required:!1}]}],imageTransition:[{type:t.Input,args:[{isSignal:!0,alias:"imageTransition",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],closeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],prevLabel:[{type:t.Input,args:[{isSignal:!0,alias:"prevLabel",required:!1}]}],nextLabel:[{type:t.Input,args:[{isSignal:!0,alias:"nextLabel",required:!1}]}],closeOnBackdrop:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnBackdrop",required:!1}]}],closed:[{type:t.Output,args:["closed"]}],opened:[{type:t.Output,args:["opened"]}]}});const en=/\.(avif|bmp|gif|jpe?g|png|svg|webp)$/i,tn=/\.pdf$/i;function Ws(d,e){const a=(e?.mimeType??"").toLowerCase().trim();if(a.startsWith("image/"))return"image";if(a==="application/pdf")return"pdf";const s=(e?.fileName||d||"").split("?")[0].split("#")[0];return en.test(s)?"image":tn.test(s)?"pdf":"unknown"}class Ht{sanitizer=x(Wa);src=i.required(...ngDevMode?[{debugName:"src"}]:[]);type=i("auto",...ngDevMode?[{debugName:"type"}]:[]);fileName=i("",...ngDevMode?[{debugName:"fileName"}]:[]);mimeType=i("",...ngDevMode?[{debugName:"mimeType"}]:[]);alt=i("",...ngDevMode?[{debugName:"alt"}]:[]);title=i("",...ngDevMode?[{debugName:"title"}]:[]);presentation=i("dialog",...ngDevMode?[{debugName:"presentation"}]:[]);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);dialogSize=i("lg",...ngDevMode?[{debugName:"dialogSize"}]:[]);drawerSide=i("end",...ngDevMode?[{debugName:"drawerSide"}]:[]);showDownload=i(!0,{...ngDevMode?{debugName:"showDownload"}:{},transform:m});downloadName=i("",...ngDevMode?[{debugName:"downloadName"}]:[]);closeLabelInput=i("",{...ngDevMode?{debugName:"closeLabelInput"}:{},alias:"closeLabel"});closed=w();downloaded=w();resolvedKind=n(()=>{const e=this.type();return e!=="auto"?e:Ws(this.src(),{fileName:this.fileName(),mimeType:this.mimeType()})},...ngDevMode?[{debugName:"resolvedKind"}]:[]);safePdfSrc=n(()=>{if(this.resolvedKind()!=="pdf")return null;const e=this.src()?.trim();return e?this.sanitizer.bypassSecurityTrustResourceUrl(e):null},...ngDevMode?[{debugName:"safePdfSrc"}]:[]);resolvedFileName(){return this.fileName().trim()||an(this.src())}resolvedTitle(){return this.title().trim()||this.resolvedFileName()||(q()?"معاينة الملف":"File preview")}resolvedAlt(){return this.alt().trim()||this.resolvedTitle()}closeLabel(){return this.closeLabelInput()||(q()?"إغلاق":"Close")}downloadLabel(){return q()?"تنزيل":"Download"}unknownTitle(){return q()?"لا تتوفر معاينة لهذا النوع":"No preview for this file type"}bodyClasses(){return f("dga-file-preview__body")}hostInlineClasses(){return f("dga-file-preview__inline")}onDownload(){const e=this.src();if(!e)return;const a=(this.downloadName()||this.resolvedFileName()||"download").replace(/[\\/]/g,"-"),s=document.createElement("a");s.href=e,s.download=a,s.rel="noopener",s.target="_blank",s.click(),this.downloaded.emit(a)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ht,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ht,isStandalone:!0,selector:"dga-file-preview",inputs:{src:{classPropertyName:"src",publicName:"src",isSignal:!0,isRequired:!0,transformFunction:null},type:{classPropertyName:"type",publicName:"type",isSignal:!0,isRequired:!1,transformFunction:null},fileName:{classPropertyName:"fileName",publicName:"fileName",isSignal:!0,isRequired:!1,transformFunction:null},mimeType:{classPropertyName:"mimeType",publicName:"mimeType",isSignal:!0,isRequired:!1,transformFunction:null},alt:{classPropertyName:"alt",publicName:"alt",isSignal:!0,isRequired:!1,transformFunction:null},title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},presentation:{classPropertyName:"presentation",publicName:"presentation",isSignal:!0,isRequired:!1,transformFunction:null},open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},dialogSize:{classPropertyName:"dialogSize",publicName:"dialogSize",isSignal:!0,isRequired:!1,transformFunction:null},drawerSide:{classPropertyName:"drawerSide",publicName:"drawerSide",isSignal:!0,isRequired:!1,transformFunction:null},showDownload:{classPropertyName:"showDownload",publicName:"showDownload",isSignal:!0,isRequired:!1,transformFunction:null},downloadName:{classPropertyName:"downloadName",publicName:"downloadName",isSignal:!0,isRequired:!1,transformFunction:null},closeLabelInput:{classPropertyName:"closeLabelInput",publicName:"closeLabel",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",closed:"closed",downloaded:"downloaded"},host:{properties:{"attr.data-presentation":"presentation()","attr.data-kind":"resolvedKind()"},classAttribute:"dga-file-preview"},ngImport:t,template:`
|
|
4057
4075
|
@switch (presentation()) {
|
|
4058
4076
|
@case ('dialog') {
|
|
4059
4077
|
<dga-dialog
|
|
@@ -4353,7 +4371,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
4353
4371
|
</div>
|
|
4354
4372
|
}
|
|
4355
4373
|
}
|
|
4356
|
-
`,host:{class:"dga-file-preview","[attr.data-presentation]":"presentation()","[attr.data-kind]":"resolvedKind()"},styles:[":host{display:contents}:host .dga-file-preview__inline{display:flex;flex-direction:column;gap:var(--spacing-md, .5rem);width:100%}:host .dga-file-preview__body{display:flex;min-height:12rem;width:100%;align-items:center;justify-content:center;overflow:auto;border-radius:var(--radius-md, .375rem);background:var(--color-sunken, #f3f4f6)}:host .dga-file-preview__image{display:block;max-width:100%;max-height:min(70vh,36rem);object-fit:contain}:host .dga-file-preview__pdf{display:block;width:100%;min-height:min(70vh,36rem);height:min(70vh,36rem);border:0;background:var(--color-surface, #fff)}:host .dga-file-preview__unknown{display:flex;flex-direction:column;align-items:center;gap:var(--spacing-sm, .375rem);padding:var(--spacing-2xl, 1.5rem);text-align:center}:host .dga-file-preview__actions{display:flex;flex-wrap:wrap;gap:var(--spacing-sm, .375rem)}\n"]}]}],propDecorators:{src:[{type:t.Input,args:[{isSignal:!0,alias:"src",required:!0}]}],type:[{type:t.Input,args:[{isSignal:!0,alias:"type",required:!1}]}],fileName:[{type:t.Input,args:[{isSignal:!0,alias:"fileName",required:!1}]}],mimeType:[{type:t.Input,args:[{isSignal:!0,alias:"mimeType",required:!1}]}],alt:[{type:t.Input,args:[{isSignal:!0,alias:"alt",required:!1}]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],presentation:[{type:t.Input,args:[{isSignal:!0,alias:"presentation",required:!1}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],dialogSize:[{type:t.Input,args:[{isSignal:!0,alias:"dialogSize",required:!1}]}],drawerSide:[{type:t.Input,args:[{isSignal:!0,alias:"drawerSide",required:!1}]}],showDownload:[{type:t.Input,args:[{isSignal:!0,alias:"showDownload",required:!1}]}],downloadName:[{type:t.Input,args:[{isSignal:!0,alias:"downloadName",required:!1}]}],closeLabelInput:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],closed:[{type:t.Output,args:["closed"]}],downloaded:[{type:t.Output,args:["downloaded"]}]}});function an(d){try{const a=new URL(d,"https://local.invalid").pathname.split("/").pop()??"";return decodeURIComponent(a)}catch{return""}}const re=12,sn=320,se=16;class Kt{doc=x(it);destroyRef=x(L);injector=x(G);rootRef=R("root",...ngDevMode?[{debugName:"rootRef"}]:[]);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);steps=i([],...ngDevMode?[{debugName:"steps"}]:[]);stepIndex=S(0,...ngDevMode?[{debugName:"stepIndex"}]:[]);nextLabel=i("التالي",...ngDevMode?[{debugName:"nextLabel"}]:[]);prevLabel=i("السابق",...ngDevMode?[{debugName:"prevLabel"}]:[]);skipLabel=i("تخطّي",...ngDevMode?[{debugName:"skipLabel"}]:[]);doneLabel=i("إنهاء",...ngDevMode?[{debugName:"doneLabel"}]:[]);stepOfLabel=i("{current} من {total}",...ngDevMode?[{debugName:"stepOfLabel"}]:[]);allowSkip=i(!0,{...ngDevMode?{debugName:"allowSkip"}:{},transform:m});closeOnBackdrop=i(!1,{...ngDevMode?{debugName:"closeOnBackdrop"}:{},transform:m});autoStart=i(!1,{...ngDevMode?{debugName:"autoStart"}:{},transform:m});persist=i("none",...ngDevMode?[{debugName:"persist"}]:[]);persistKey=i("dga-tour-seen",...ngDevMode?[{debugName:"persistKey"}]:[]);completed=w();skipped=w();closed=w();stepChange=w();titleId=`dga-tour-title-${++rn}`;spot=y(null,...ngDevMode?[{debugName:"spot"}]:[]);popover=y(null,...ngDevMode?[{debugName:"popover"}]:[]);previousFocus=null;resizeObserver=null;measureRaf=0;unbindViewport=null;autoStarted=!1;visible=n(()=>this.open()&&this.steps().length>0,...ngDevMode?[{debugName:"visible"}]:[]);current=n(()=>{const e=this.steps(),a=this.clampIndex(this.stepIndex(),e.length);return e[a]??null},...ngDevMode?[{debugName:"current"}]:[]);isLast=n(()=>{const e=this.steps().length;return e>0&&this.stepIndex()>=e-1},...ngDevMode?[{debugName:"isLast"}]:[]);progressLabel=n(()=>{const e=this.steps().length,a=this.clampIndex(this.stepIndex(),e)+1;return this.stepOfLabel().replace("{current}",String(a)).replace("{total}",String(e))},...ngDevMode?[{debugName:"progressLabel"}]:[]);constructor(){this.destroyRef.onDestroy(()=>{this.teardownObservers(),this.removePortaledRoot(),cancelAnimationFrame(this.measureRaf)}),M(()=>{const e=this.visible(),a=this.current(),s=this.stepIndex();if(!e||!a){this.spot.set(null),this.popover.set(null),this.teardownObservers();return}O(()=>{this.portalToBody(),this.focusCard(),this.scheduleMeasure(),this.bindObservers()},{injector:this.injector}),a.target}),M(()=>{!this.autoStart()||this.autoStarted||this.steps().length===0||this.hasSeen()||this.open()||(this.autoStarted=!0,O(()=>{this.open()||this.hasSeen()||(this.stepIndex.set(0),this.open.set(!0))},{injector:this.injector}))})}next(){if(this.isLast()){this.finish(!0);return}this.goTo(this.stepIndex()+1)}prev(){this.stepIndex()<=0||this.goTo(this.stepIndex()-1)}skip(){this.markSeen(),this.open.set(!1),this.skipped.emit(),this.closed.emit(),this.restoreFocus()}onBackdrop(){this.closeOnBackdrop()&&this.skip()}onKeydown(e){if(e.key==="Escape"){e.stopPropagation(),this.skip();return}if(e.key==="ArrowRight"||e.key==="ArrowLeft"){const a=this.doc.documentElement.dir==="rtl",s=e.key==="ArrowRight"&&!a||e.key==="ArrowLeft"&&a;e.preventDefault(),s?this.next():this.prev()}}goTo(e){const a=this.clampIndex(e,this.steps().length);this.stepIndex.set(a),this.stepChange.emit(a)}finish(e){this.markSeen(),this.open.set(!1),e&&this.completed.emit(),this.closed.emit(),this.restoreFocus()}scheduleMeasure(){cancelAnimationFrame(this.measureRaf),this.measureRaf=requestAnimationFrame(()=>this.measure())}measure(){const e=this.current();if(!e||!this.visible())return;const a=e.target?.trim();if(!a){this.spot.set(null),this.popover.set(null);return}const s=this.doc.querySelector(a);if(!s){this.spot.set(null),this.popover.set(null);return}e.scroll!==!1&&s.scrollIntoView({block:"center",inline:"nearest",behavior:"auto"});const l=e.padding??8,u=s.getBoundingClientRect(),o={top:Math.max(0,u.top-l),left:Math.max(0,u.left-l),width:Math.min(this.doc.documentElement.clientWidth,u.width+l*2),height:Math.min(this.doc.documentElement.clientHeight,u.height+l*2)};this.spot.set(o);const c=e.placement??"auto";this.popover.set(this.placePopover(o,c))}placePopover(e,a){const s=this.doc.documentElement.clientWidth,r=this.doc.documentElement.clientHeight,l=this.doc.documentElement.dir==="rtl",u=180,o=Math.min(sn,s-se*2),c=a==="auto"?["bottom","top","end","start"]:[a,"bottom","top","end","start"];for(const p of c){let g=0,b=0;if(p==="bottom"?(g=e.top+e.height+re,b=e.left+e.width/2-o/2):p==="top"?(g=e.top-u-re,b=e.left+e.width/2-o/2):p==="end"?(g=e.top+e.height/2-u/2,b=l?e.left-o-re:e.left+e.width+re):(g=e.top+e.height/2-u/2,b=l?e.left+e.width+re:e.left-o-re),b=Math.min(Math.max(se,b),s-o-se),g=Math.min(Math.max(se,g),r-u-se),(p==="bottom"?e.top+e.height+re+u<r-se:p==="top"?e.top-re-u>se:!0)||a!=="auto")return{top:g,left:b,placement:p}}return{top:Math.min(e.top+e.height+re,r-u-se),left:Math.min(Math.max(se,e.left),s-o-se),placement:"bottom"}}bindObservers(){this.teardownObservers();const e=this.doc.defaultView,a=()=>this.scheduleMeasure();if(e?.addEventListener("resize",a),e?.addEventListener("scroll",a,!0),this.unbindViewport=()=>{e?.removeEventListener("resize",a),e?.removeEventListener("scroll",a,!0)},typeof ResizeObserver<"u"){this.resizeObserver=new ResizeObserver(()=>this.scheduleMeasure());const s=this.current()?.target?.trim(),r=s?this.doc.querySelector(s):null;r&&this.resizeObserver.observe(r)}}portalToBody(){const e=this.rootRef()?.nativeElement;!e||e.parentElement===this.doc.body||this.doc.body.appendChild(e)}removePortaledRoot(){const e=this.rootRef()?.nativeElement;e?.parentElement===this.doc.body&&e.remove()}teardownObservers(){this.unbindViewport?.(),this.unbindViewport=null,this.resizeObserver?.disconnect(),this.resizeObserver=null}focusCard(){this.previousFocus||(this.previousFocus=this.doc.activeElement??null),this.doc.querySelector(".dga-tour__card")?.focus({preventScroll:!0})}restoreFocus(){this.previousFocus?.focus?.({preventScroll:!0}),this.previousFocus=null}clampIndex(e,a){return a<=0?0:Math.min(Math.max(0,e),a-1)}storage(){const e=this.persist();if(e==="none")return null;try{return e==="session"?this.doc.defaultView?.sessionStorage??null:this.doc.defaultView?.localStorage??null}catch{return null}}hasSeen(){const e=this.storage();if(!e)return!1;try{return e.getItem(this.persistKey())==="1"}catch{return!1}}markSeen(){const e=this.storage();if(e)try{e.setItem(this.persistKey(),"1")}catch{}}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Kt,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Kt,isStandalone:!0,selector:"dga-tour",inputs:{open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},steps:{classPropertyName:"steps",publicName:"steps",isSignal:!0,isRequired:!1,transformFunction:null},stepIndex:{classPropertyName:"stepIndex",publicName:"stepIndex",isSignal:!0,isRequired:!1,transformFunction:null},nextLabel:{classPropertyName:"nextLabel",publicName:"nextLabel",isSignal:!0,isRequired:!1,transformFunction:null},prevLabel:{classPropertyName:"prevLabel",publicName:"prevLabel",isSignal:!0,isRequired:!1,transformFunction:null},skipLabel:{classPropertyName:"skipLabel",publicName:"skipLabel",isSignal:!0,isRequired:!1,transformFunction:null},doneLabel:{classPropertyName:"doneLabel",publicName:"doneLabel",isSignal:!0,isRequired:!1,transformFunction:null},stepOfLabel:{classPropertyName:"stepOfLabel",publicName:"stepOfLabel",isSignal:!0,isRequired:!1,transformFunction:null},allowSkip:{classPropertyName:"allowSkip",publicName:"allowSkip",isSignal:!0,isRequired:!1,transformFunction:null},closeOnBackdrop:{classPropertyName:"closeOnBackdrop",publicName:"closeOnBackdrop",isSignal:!0,isRequired:!1,transformFunction:null},autoStart:{classPropertyName:"autoStart",publicName:"autoStart",isSignal:!0,isRequired:!1,transformFunction:null},persist:{classPropertyName:"persist",publicName:"persist",isSignal:!0,isRequired:!1,transformFunction:null},persistKey:{classPropertyName:"persistKey",publicName:"persistKey",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",stepIndex:"stepIndexChange",completed:"completed",skipped:"skipped",closed:"closed",stepChange:"stepChange"},viewQueries:[{propertyName:"rootRef",first:!0,predicate:["root"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
4374
|
+
`,host:{class:"dga-file-preview","[attr.data-presentation]":"presentation()","[attr.data-kind]":"resolvedKind()"},styles:[":host{display:contents}:host .dga-file-preview__inline{display:flex;flex-direction:column;gap:var(--spacing-md, .5rem);width:100%}:host .dga-file-preview__body{display:flex;min-height:12rem;width:100%;align-items:center;justify-content:center;overflow:auto;border-radius:var(--radius-md, .375rem);background:var(--color-sunken, #f3f4f6)}:host .dga-file-preview__image{display:block;max-width:100%;max-height:min(70vh,36rem);object-fit:contain}:host .dga-file-preview__pdf{display:block;width:100%;min-height:min(70vh,36rem);height:min(70vh,36rem);border:0;background:var(--color-surface, #fff)}:host .dga-file-preview__unknown{display:flex;flex-direction:column;align-items:center;gap:var(--spacing-sm, .375rem);padding:var(--spacing-2xl, 1.5rem);text-align:center}:host .dga-file-preview__actions{display:flex;flex-wrap:wrap;gap:var(--spacing-sm, .375rem)}\n"]}]}],propDecorators:{src:[{type:t.Input,args:[{isSignal:!0,alias:"src",required:!0}]}],type:[{type:t.Input,args:[{isSignal:!0,alias:"type",required:!1}]}],fileName:[{type:t.Input,args:[{isSignal:!0,alias:"fileName",required:!1}]}],mimeType:[{type:t.Input,args:[{isSignal:!0,alias:"mimeType",required:!1}]}],alt:[{type:t.Input,args:[{isSignal:!0,alias:"alt",required:!1}]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],presentation:[{type:t.Input,args:[{isSignal:!0,alias:"presentation",required:!1}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],dialogSize:[{type:t.Input,args:[{isSignal:!0,alias:"dialogSize",required:!1}]}],drawerSide:[{type:t.Input,args:[{isSignal:!0,alias:"drawerSide",required:!1}]}],showDownload:[{type:t.Input,args:[{isSignal:!0,alias:"showDownload",required:!1}]}],downloadName:[{type:t.Input,args:[{isSignal:!0,alias:"downloadName",required:!1}]}],closeLabelInput:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],closed:[{type:t.Output,args:["closed"]}],downloaded:[{type:t.Output,args:["downloaded"]}]}});function an(d){try{const a=new URL(d,"https://local.invalid").pathname.split("/").pop()??"";return decodeURIComponent(a)}catch{return""}}const re=12,sn=320,se=16;class Kt{doc=x(it);destroyRef=x(L);injector=x(G);rootRef=R("root",...ngDevMode?[{debugName:"rootRef"}]:[]);open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);steps=i([],...ngDevMode?[{debugName:"steps"}]:[]);stepIndex=S(0,...ngDevMode?[{debugName:"stepIndex"}]:[]);nextLabel=i("التالي",...ngDevMode?[{debugName:"nextLabel"}]:[]);prevLabel=i("السابق",...ngDevMode?[{debugName:"prevLabel"}]:[]);skipLabel=i("تخطّي",...ngDevMode?[{debugName:"skipLabel"}]:[]);doneLabel=i("إنهاء",...ngDevMode?[{debugName:"doneLabel"}]:[]);stepOfLabel=i("{current} من {total}",...ngDevMode?[{debugName:"stepOfLabel"}]:[]);allowSkip=i(!0,{...ngDevMode?{debugName:"allowSkip"}:{},transform:m});closeOnBackdrop=i(!1,{...ngDevMode?{debugName:"closeOnBackdrop"}:{},transform:m});autoStart=i(!1,{...ngDevMode?{debugName:"autoStart"}:{},transform:m});persist=i("none",...ngDevMode?[{debugName:"persist"}]:[]);persistKey=i("dga-tour-seen",...ngDevMode?[{debugName:"persistKey"}]:[]);completed=w();skipped=w();closed=w();stepChange=w();titleId=`dga-tour-title-${++rn}`;spot=y(null,...ngDevMode?[{debugName:"spot"}]:[]);popover=y(null,...ngDevMode?[{debugName:"popover"}]:[]);previousFocus=null;resizeObserver=null;measureRaf=0;unbindViewport=null;autoStarted=!1;visible=n(()=>this.open()&&this.steps().length>0,...ngDevMode?[{debugName:"visible"}]:[]);current=n(()=>{const e=this.steps(),a=this.clampIndex(this.stepIndex(),e.length);return e[a]??null},...ngDevMode?[{debugName:"current"}]:[]);isLast=n(()=>{const e=this.steps().length;return e>0&&this.stepIndex()>=e-1},...ngDevMode?[{debugName:"isLast"}]:[]);progressLabel=n(()=>{const e=this.steps().length,a=this.clampIndex(this.stepIndex(),e)+1;return this.stepOfLabel().replace("{current}",String(a)).replace("{total}",String(e))},...ngDevMode?[{debugName:"progressLabel"}]:[]);constructor(){this.destroyRef.onDestroy(()=>{this.teardownObservers(),this.removePortaledRoot(),cancelAnimationFrame(this.measureRaf)}),M(()=>{const e=this.visible(),a=this.current(),s=this.stepIndex();if(!e||!a){this.spot.set(null),this.popover.set(null),this.teardownObservers();return}T(()=>{this.portalToBody(),this.focusCard(),this.scheduleMeasure(),this.bindObservers()},{injector:this.injector}),a.target}),M(()=>{!this.autoStart()||this.autoStarted||this.steps().length===0||this.hasSeen()||this.open()||(this.autoStarted=!0,T(()=>{this.open()||this.hasSeen()||(this.stepIndex.set(0),this.open.set(!0))},{injector:this.injector}))})}next(){if(this.isLast()){this.finish(!0);return}this.goTo(this.stepIndex()+1)}prev(){this.stepIndex()<=0||this.goTo(this.stepIndex()-1)}skip(){this.markSeen(),this.open.set(!1),this.skipped.emit(),this.closed.emit(),this.restoreFocus()}onBackdrop(){this.closeOnBackdrop()&&this.skip()}onKeydown(e){if(e.key==="Escape"){e.stopPropagation(),this.skip();return}if(e.key==="ArrowRight"||e.key==="ArrowLeft"){const a=this.doc.documentElement.dir==="rtl",s=e.key==="ArrowRight"&&!a||e.key==="ArrowLeft"&&a;e.preventDefault(),s?this.next():this.prev()}}goTo(e){const a=this.clampIndex(e,this.steps().length);this.stepIndex.set(a),this.stepChange.emit(a)}finish(e){this.markSeen(),this.open.set(!1),e&&this.completed.emit(),this.closed.emit(),this.restoreFocus()}scheduleMeasure(){cancelAnimationFrame(this.measureRaf),this.measureRaf=requestAnimationFrame(()=>this.measure())}measure(){const e=this.current();if(!e||!this.visible())return;const a=e.target?.trim();if(!a){this.spot.set(null),this.popover.set(null);return}const s=this.doc.querySelector(a);if(!s){this.spot.set(null),this.popover.set(null);return}e.scroll!==!1&&s.scrollIntoView({block:"center",inline:"nearest",behavior:"auto"});const l=e.padding??8,u=s.getBoundingClientRect(),o={top:Math.max(0,u.top-l),left:Math.max(0,u.left-l),width:Math.min(this.doc.documentElement.clientWidth,u.width+l*2),height:Math.min(this.doc.documentElement.clientHeight,u.height+l*2)};this.spot.set(o);const c=e.placement??"auto";this.popover.set(this.placePopover(o,c))}placePopover(e,a){const s=this.doc.documentElement.clientWidth,r=this.doc.documentElement.clientHeight,l=this.doc.documentElement.dir==="rtl",u=180,o=Math.min(sn,s-se*2),c=a==="auto"?["bottom","top","end","start"]:[a,"bottom","top","end","start"];for(const p of c){let g=0,b=0;if(p==="bottom"?(g=e.top+e.height+re,b=e.left+e.width/2-o/2):p==="top"?(g=e.top-u-re,b=e.left+e.width/2-o/2):p==="end"?(g=e.top+e.height/2-u/2,b=l?e.left-o-re:e.left+e.width+re):(g=e.top+e.height/2-u/2,b=l?e.left+e.width+re:e.left-o-re),b=Math.min(Math.max(se,b),s-o-se),g=Math.min(Math.max(se,g),r-u-se),(p==="bottom"?e.top+e.height+re+u<r-se:p==="top"?e.top-re-u>se:!0)||a!=="auto")return{top:g,left:b,placement:p}}return{top:Math.min(e.top+e.height+re,r-u-se),left:Math.min(Math.max(se,e.left),s-o-se),placement:"bottom"}}bindObservers(){this.teardownObservers();const e=this.doc.defaultView,a=()=>this.scheduleMeasure();if(e?.addEventListener("resize",a),e?.addEventListener("scroll",a,!0),this.unbindViewport=()=>{e?.removeEventListener("resize",a),e?.removeEventListener("scroll",a,!0)},typeof ResizeObserver<"u"){this.resizeObserver=new ResizeObserver(()=>this.scheduleMeasure());const s=this.current()?.target?.trim(),r=s?this.doc.querySelector(s):null;r&&this.resizeObserver.observe(r)}}portalToBody(){const e=this.rootRef()?.nativeElement;!e||e.parentElement===this.doc.body||this.doc.body.appendChild(e)}removePortaledRoot(){const e=this.rootRef()?.nativeElement;e?.parentElement===this.doc.body&&e.remove()}teardownObservers(){this.unbindViewport?.(),this.unbindViewport=null,this.resizeObserver?.disconnect(),this.resizeObserver=null}focusCard(){this.previousFocus||(this.previousFocus=this.doc.activeElement??null),this.doc.querySelector(".dga-tour__card")?.focus({preventScroll:!0})}restoreFocus(){this.previousFocus?.focus?.({preventScroll:!0}),this.previousFocus=null}clampIndex(e,a){return a<=0?0:Math.min(Math.max(0,e),a-1)}storage(){const e=this.persist();if(e==="none")return null;try{return e==="session"?this.doc.defaultView?.sessionStorage??null:this.doc.defaultView?.localStorage??null}catch{return null}}hasSeen(){const e=this.storage();if(!e)return!1;try{return e.getItem(this.persistKey())==="1"}catch{return!1}}markSeen(){const e=this.storage();if(e)try{e.setItem(this.persistKey(),"1")}catch{}}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Kt,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Kt,isStandalone:!0,selector:"dga-tour",inputs:{open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},steps:{classPropertyName:"steps",publicName:"steps",isSignal:!0,isRequired:!1,transformFunction:null},stepIndex:{classPropertyName:"stepIndex",publicName:"stepIndex",isSignal:!0,isRequired:!1,transformFunction:null},nextLabel:{classPropertyName:"nextLabel",publicName:"nextLabel",isSignal:!0,isRequired:!1,transformFunction:null},prevLabel:{classPropertyName:"prevLabel",publicName:"prevLabel",isSignal:!0,isRequired:!1,transformFunction:null},skipLabel:{classPropertyName:"skipLabel",publicName:"skipLabel",isSignal:!0,isRequired:!1,transformFunction:null},doneLabel:{classPropertyName:"doneLabel",publicName:"doneLabel",isSignal:!0,isRequired:!1,transformFunction:null},stepOfLabel:{classPropertyName:"stepOfLabel",publicName:"stepOfLabel",isSignal:!0,isRequired:!1,transformFunction:null},allowSkip:{classPropertyName:"allowSkip",publicName:"allowSkip",isSignal:!0,isRequired:!1,transformFunction:null},closeOnBackdrop:{classPropertyName:"closeOnBackdrop",publicName:"closeOnBackdrop",isSignal:!0,isRequired:!1,transformFunction:null},autoStart:{classPropertyName:"autoStart",publicName:"autoStart",isSignal:!0,isRequired:!1,transformFunction:null},persist:{classPropertyName:"persist",publicName:"persist",isSignal:!0,isRequired:!1,transformFunction:null},persistKey:{classPropertyName:"persistKey",publicName:"persistKey",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",stepIndex:"stepIndexChange",completed:"completed",skipped:"skipped",closed:"closed",stepChange:"stepChange"},viewQueries:[{propertyName:"rootRef",first:!0,predicate:["root"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
4357
4375
|
@if (visible()) {
|
|
4358
4376
|
<div
|
|
4359
4377
|
#root
|
|
@@ -4519,7 +4537,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
4519
4537
|
</div>
|
|
4520
4538
|
</div>
|
|
4521
4539
|
}
|
|
4522
|
-
`,styles:[":host{display:contents}.dga-tour{position:fixed;inset:0;z-index:var(--z-index-urgent, 400);pointer-events:none}.dga-tour__veil{position:absolute;inset:0;z-index:0;background:color-mix(in srgb,var(--color-fg, #161616) 45%,transparent);pointer-events:auto}.dga-tour__spot{position:fixed;z-index:1;border-radius:var(--radius-md, 8px);box-shadow:0 0 0 9999px color-mix(in srgb,var(--color-fg, #161616) 45%,transparent),0 0 0 2px var(--color-primary, #1b8354);background:transparent;pointer-events:none;transition:top .28s cubic-bezier(.22,1,.36,1),left .28s cubic-bezier(.22,1,.36,1),width .28s cubic-bezier(.22,1,.36,1),height .28s cubic-bezier(.22,1,.36,1)}.dga-tour:has(.dga-tour__spot) .dga-tour__veil{background:transparent}.dga-tour__card{position:fixed;z-index:2;width:min(320px,calc(100vw - 32px));max-width:calc(100vw - 32px);display:flex;flex-direction:column;gap:var(--spacing-md, 8px);padding:var(--spacing-2xl, 20px);border-radius:var(--radius-md, 8px);background:var(--color-card, var(--color-surface, #fff));color:var(--color-fg, #161616);box-shadow:var(--shadow-md, 0 8px 24px rgb(0 0 0 / .12));pointer-events:auto;outline:none;animation:dga-tour-rise .28s cubic-bezier(.22,1,.36,1) both}.dga-tour__card[data-centered]{top:50%;left:50%;transform:translate(-50%,-50%)}.dga-tour__meta{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-md, 8px)}.dga-tour__progress{font-size:var(--text-body-sm, .875rem);color:var(--color-muted, #6c737f)}.dga-tour__skip{margin:0;padding:0;border:0;background:transparent;cursor:pointer;font:inherit;font-size:var(--text-body-sm, .875rem);color:var(--color-fg-primary, var(--color-primary, #1b8354));text-decoration:underline;text-underline-offset:2px}.dga-tour__skip:hover{opacity:.85}.dga-tour__title{margin:0;font-size:var(--text-display-xs, 1.25rem);font-weight:600;line-height:1.35;color:var(--color-display, var(--color-fg, #161616))}.dga-tour__body{margin:0;font-size:var(--text-body-md, 1rem);line-height:1.55;color:var(--color-paragraph, var(--color-muted, #384250))}.dga-tour__actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--spacing-md, 8px);margin-top:var(--spacing-sm, 4px)}@keyframes dga-tour-rise{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.dga-tour__card[data-centered]{animation-name:dga-tour-center-in}@keyframes dga-tour-center-in{0%{opacity:0;transform:translate(-50%,calc(-50% + 8px))}to{opacity:1;transform:translate(-50%,-50%)}}@media(prefers-reduced-motion:reduce){.dga-tour__spot,.dga-tour__card{transition:none;animation:none}}\n"]}]}],ctorParameters:()=>[],propDecorators:{rootRef:[{type:t.ViewChild,args:["root",{isSignal:!0}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],steps:[{type:t.Input,args:[{isSignal:!0,alias:"steps",required:!1}]}],stepIndex:[{type:t.Input,args:[{isSignal:!0,alias:"stepIndex",required:!1}]},{type:t.Output,args:["stepIndexChange"]}],nextLabel:[{type:t.Input,args:[{isSignal:!0,alias:"nextLabel",required:!1}]}],prevLabel:[{type:t.Input,args:[{isSignal:!0,alias:"prevLabel",required:!1}]}],skipLabel:[{type:t.Input,args:[{isSignal:!0,alias:"skipLabel",required:!1}]}],doneLabel:[{type:t.Input,args:[{isSignal:!0,alias:"doneLabel",required:!1}]}],stepOfLabel:[{type:t.Input,args:[{isSignal:!0,alias:"stepOfLabel",required:!1}]}],allowSkip:[{type:t.Input,args:[{isSignal:!0,alias:"allowSkip",required:!1}]}],closeOnBackdrop:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnBackdrop",required:!1}]}],autoStart:[{type:t.Input,args:[{isSignal:!0,alias:"autoStart",required:!1}]}],persist:[{type:t.Input,args:[{isSignal:!0,alias:"persist",required:!1}]}],persistKey:[{type:t.Input,args:[{isSignal:!0,alias:"persistKey",required:!1}]}],completed:[{type:t.Output,args:["completed"]}],skipped:[{type:t.Output,args:["skipped"]}],closed:[{type:t.Output,args:["closed"]}],stepChange:[{type:t.Output,args:["stepChange"]}]}});let rn=0;const nn="relative flex gap-lg overflow-hidden rounded-md border border-border text-body-md",ln={neutral:"border-s-border",critical:"border-s-border-error",error:"border-s-border-error",warning:"border-s-border-warning",info:"border-s-border-info",success:"border-s-border-success"},on={neutral:"border-b-border",critical:"border-b-border-error",error:"border-b-border-error",warning:"border-b-border-warning",info:"border-b-border-info",success:"border-b-border-success"},dn={neutral:"bg-neutral-light",critical:"bg-error-faint",error:"bg-error-faint",warning:"bg-warning-faint",info:"bg-info-faint",success:"bg-success-faint"},
|
|
4540
|
+
`,styles:[":host{display:contents}.dga-tour{position:fixed;inset:0;z-index:var(--z-index-urgent, 400);pointer-events:none}.dga-tour__veil{position:absolute;inset:0;z-index:0;background:color-mix(in srgb,var(--color-fg, #161616) 45%,transparent);pointer-events:auto}.dga-tour__spot{position:fixed;z-index:1;border-radius:var(--radius-md, 8px);box-shadow:0 0 0 9999px color-mix(in srgb,var(--color-fg, #161616) 45%,transparent),0 0 0 2px var(--color-primary, #1b8354);background:transparent;pointer-events:none;transition:top .28s cubic-bezier(.22,1,.36,1),left .28s cubic-bezier(.22,1,.36,1),width .28s cubic-bezier(.22,1,.36,1),height .28s cubic-bezier(.22,1,.36,1)}.dga-tour:has(.dga-tour__spot) .dga-tour__veil{background:transparent}.dga-tour__card{position:fixed;z-index:2;width:min(320px,calc(100vw - 32px));max-width:calc(100vw - 32px);display:flex;flex-direction:column;gap:var(--spacing-md, 8px);padding:var(--spacing-2xl, 20px);border-radius:var(--radius-md, 8px);background:var(--color-card, var(--color-surface, #fff));color:var(--color-fg, #161616);box-shadow:var(--shadow-md, 0 8px 24px rgb(0 0 0 / .12));pointer-events:auto;outline:none;animation:dga-tour-rise .28s cubic-bezier(.22,1,.36,1) both}.dga-tour__card[data-centered]{top:50%;left:50%;transform:translate(-50%,-50%)}.dga-tour__meta{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-md, 8px)}.dga-tour__progress{font-size:var(--text-body-sm, .875rem);color:var(--color-muted, #6c737f)}.dga-tour__skip{margin:0;padding:0;border:0;background:transparent;cursor:pointer;font:inherit;font-size:var(--text-body-sm, .875rem);color:var(--color-fg-primary, var(--color-primary, #1b8354));text-decoration:underline;text-underline-offset:2px}.dga-tour__skip:hover{opacity:.85}.dga-tour__title{margin:0;font-size:var(--text-display-xs, 1.25rem);font-weight:600;line-height:1.35;color:var(--color-display, var(--color-fg, #161616))}.dga-tour__body{margin:0;font-size:var(--text-body-md, 1rem);line-height:1.55;color:var(--color-paragraph, var(--color-muted, #384250))}.dga-tour__actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--spacing-md, 8px);margin-top:var(--spacing-sm, 4px)}@keyframes dga-tour-rise{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.dga-tour__card[data-centered]{animation-name:dga-tour-center-in}@keyframes dga-tour-center-in{0%{opacity:0;transform:translate(-50%,calc(-50% + 8px))}to{opacity:1;transform:translate(-50%,-50%)}}@media(prefers-reduced-motion:reduce){.dga-tour__spot,.dga-tour__card{transition:none;animation:none}}\n"]}]}],ctorParameters:()=>[],propDecorators:{rootRef:[{type:t.ViewChild,args:["root",{isSignal:!0}]}],open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],steps:[{type:t.Input,args:[{isSignal:!0,alias:"steps",required:!1}]}],stepIndex:[{type:t.Input,args:[{isSignal:!0,alias:"stepIndex",required:!1}]},{type:t.Output,args:["stepIndexChange"]}],nextLabel:[{type:t.Input,args:[{isSignal:!0,alias:"nextLabel",required:!1}]}],prevLabel:[{type:t.Input,args:[{isSignal:!0,alias:"prevLabel",required:!1}]}],skipLabel:[{type:t.Input,args:[{isSignal:!0,alias:"skipLabel",required:!1}]}],doneLabel:[{type:t.Input,args:[{isSignal:!0,alias:"doneLabel",required:!1}]}],stepOfLabel:[{type:t.Input,args:[{isSignal:!0,alias:"stepOfLabel",required:!1}]}],allowSkip:[{type:t.Input,args:[{isSignal:!0,alias:"allowSkip",required:!1}]}],closeOnBackdrop:[{type:t.Input,args:[{isSignal:!0,alias:"closeOnBackdrop",required:!1}]}],autoStart:[{type:t.Input,args:[{isSignal:!0,alias:"autoStart",required:!1}]}],persist:[{type:t.Input,args:[{isSignal:!0,alias:"persist",required:!1}]}],persistKey:[{type:t.Input,args:[{isSignal:!0,alias:"persistKey",required:!1}]}],completed:[{type:t.Output,args:["completed"]}],skipped:[{type:t.Output,args:["skipped"]}],closed:[{type:t.Output,args:["closed"]}],stepChange:[{type:t.Output,args:["stepChange"]}]}});let rn=0;const nn="relative flex gap-lg overflow-hidden rounded-md border border-border text-body-md",ln={neutral:"border-s-border",critical:"border-s-border-error",error:"border-s-border-error",warning:"border-s-border-warning",info:"border-s-border-info",success:"border-s-border-success"},on={neutral:"border-b-border",critical:"border-b-border-error",error:"border-b-border-error",warning:"border-b-border-warning",info:"border-b-border-info",success:"border-b-border-success"},dn={neutral:"bg-neutral-light",critical:"bg-error-faint",error:"bg-error-faint",warning:"bg-warning-faint",info:"bg-info-faint",success:"bg-success-faint"},Ys={neutral:"text-display",critical:"text-fg-error",error:"text-fg-error",warning:"text-fg-warning",info:"text-fg-info",success:"text-fg-success"},cn={neutral:"info",critical:"error",error:"error",warning:"warning",info:"info",success:"success"},un={neutral:"muted",critical:"error",error:"error",warning:"warning",info:"current",success:"success"};class $e{variant=i("info",...ngDevMode?[{debugName:"variant"}]:[]);title=i(void 0,...ngDevMode?[{debugName:"title"}]:[]);shadow=i(!1,{...ngDevMode?{debugName:"shadow"}:{},transform:m});color=i(!1,{...ngDevMode?{debugName:"color"}:{},transform:m});display=i("default",...ngDevMode?[{debugName:"display"}]:[]);dismissible=i(!1,{...ngDevMode?{debugName:"dismissible"}:{},transform:m});closeLabel=i("إغلاق",...ngDevMode?[{debugName:"closeLabel"}]:[]);dismissed=w();shadowAttr=n(()=>this.shadow()?"true":null,...ngDevMode?[{debugName:"shadowAttr"}]:[]);colorAttr=n(()=>this.color()||this.display()==="inline"?"true":null,...ngDevMode?[{debugName:"colorAttr"}]:[]);classes=n(()=>{const e=this.variant(),a=this.display()==="inline",s=this.color()||a;return f(nn,a?"items-center border-0 border-b-2 px-3xl py-xl":"items-start border-s-8 px-3xl py-2xl",a?on[e]:ln[e],s?dn[e]:"bg-elevated",this.shadow()&&"shadow-md")},...ngDevMode?[{debugName:"classes"}]:[]);contentClasses=n(()=>f("min-w-0 flex-1",this.display()==="inline"?"flex flex-row flex-wrap items-start justify-between gap-md":"flex flex-col gap-xs"),...ngDevMode?[{debugName:"contentClasses"}]:[]);textClasses=n(()=>this.display()==="inline"?"min-w-0":"flex flex-col gap-xs",...ngDevMode?[{debugName:"textClasses"}]:[]);titleClasses=n(()=>{const e=this.color()||this.display()==="inline";return f("font-semibold",e?Ys[this.variant()]:"text-display",this.display()==="inline"&&"me-sm inline text-body-md")},...ngDevMode?[{debugName:"titleClasses"}]:[]);descriptionClasses=n(()=>{const e=this.display()==="inline",a=this.color()||e;return f("text-body-sm",e&&"inline",a&&e?Ys[this.variant()]:"text-paragraph")},...ngDevMode?[{debugName:"descriptionClasses"}]:[]);iconName=n(()=>cn[this.variant()],...ngDevMode?[{debugName:"iconName"}]:[]);iconTone=n(()=>un[this.variant()],...ngDevMode?[{debugName:"iconTone"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:$e,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:$e,isStandalone:!0,selector:"dga-alert",inputs:{variant:{classPropertyName:"variant",publicName:"variant",isSignal:!0,isRequired:!1,transformFunction:null},title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},shadow:{classPropertyName:"shadow",publicName:"shadow",isSignal:!0,isRequired:!1,transformFunction:null},color:{classPropertyName:"color",publicName:"color",isSignal:!0,isRequired:!1,transformFunction:null},display:{classPropertyName:"display",publicName:"display",isSignal:!0,isRequired:!1,transformFunction:null},dismissible:{classPropertyName:"dismissible",publicName:"dismissible",isSignal:!0,isRequired:!1,transformFunction:null},closeLabel:{classPropertyName:"closeLabel",publicName:"closeLabel",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{dismissed:"dismissed"},host:{attributes:{role:"alert"},properties:{class:"classes()","attr.data-variant":"variant()","attr.data-display":"display()","attr.data-shadow":"shadowAttr()","attr.data-color":"colorAttr()"}},ngImport:t,template:`
|
|
4523
4541
|
<dga-icon
|
|
4524
4542
|
class="shrink-0"
|
|
4525
4543
|
[class.mt-xxs]="display() === 'default'"
|
|
@@ -4851,7 +4869,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
4851
4869
|
</div>
|
|
4852
4870
|
}
|
|
4853
4871
|
</div>
|
|
4854
|
-
`,changeDetection:h.OnPush,host:{"[class]":"hostClass()"},styles:[":host{display:block;width:100%;max-width:var(--container-md, 40rem)}.dga-feedback{display:flex;flex-direction:column;gap:var(--dga-spacing-2xl, 1.25rem);padding:var(--dga-spacing-2xl, 1.25rem);border:1px solid var(--dga-border-neutral-subtle, var(--dga-color-neutral-200));border-radius:var(--dga-radius-lg, 12px);background:linear-gradient(165deg,color-mix(in srgb,var(--dga-color-primary-50, #ecfdf5) 55%,transparent) 0%,var(--dga-bg-card, #fff) 42%);box-shadow:var(--dga-shadow-xs, 0 1px 2px rgb(0 0 0 / 6%))}.dga-feedback__head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--dga-spacing-lg, .75rem);padding-bottom:var(--dga-spacing-lg, .75rem);border-bottom:1px solid color-mix(in srgb,var(--dga-border-neutral-subtle) 80%,transparent)}.dga-feedback__head-text{min-width:0;display:flex;flex-direction:column;gap:var(--dga-spacing-xs, .25rem)}.dga-feedback__title{margin:0;font-size:var(--dga-font-text-md, 1rem);line-height:var(--dga-leading-text-md, 1.5rem);font-weight:650;color:var(--dga-text-display, #161b26)}.dga-feedback__subtitle{margin:0;font-size:var(--dga-font-text-sm, .875rem);line-height:1.4;color:var(--dga-text-paragraph, #384250)}.dga-feedback__badge{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border-radius:999px;color:var(--dga-color-yellow-600, #d97706);background:color-mix(in srgb,var(--dga-color-yellow-400, #fbbf24) 18%,transparent)}.dga-feedback__body{display:flex;flex-direction:column;gap:var(--dga-spacing-xl, 1rem)}.dga-feedback__rating,.dga-feedback__comment{display:flex;flex-direction:column;gap:var(--dga-spacing-sm, .375rem)}.dga-feedback__label{font-size:var(--dga-font-text-sm, .875rem);font-weight:600;color:var(--dga-text-display, #161b26)}.dga-feedback__hint{font-size:var(--dga-font-text-xs, .75rem);color:var(--dga-text-muted, #6b7280)}.dga-feedback__textarea{width:100%;min-height:6.5rem;resize:vertical;padding:var(--dga-spacing-lg, .75rem) var(--dga-spacing-xl, 1rem);border:1px solid var(--dga-border-border, var(--dga-color-neutral-300));border-radius:var(--dga-radius-md, 8px);background:var(--dga-bg-surface, #fff);color:var(--dga-text-fg, #111827);font:inherit;font-size:var(--dga-font-text-md, 1rem);line-height:1.5;transition:border-color .16s ease,box-shadow .16s ease}.dga-feedback__textarea::placeholder{color:var(--dga-text-muted, #9da4ae)}.dga-feedback__textarea:hover{border-color:var(--dga-border-primary-light, var(--dga-color-primary-200))}.dga-feedback__textarea:focus{outline:none;border-color:var(--dga-border-primary, var(--dga-color-primary-600));box-shadow:0 0 0 3px var(--dga-form-field-focus-glow, rgb(16 185 129 / 18%))}.dga-feedback__actions{display:flex;justify-content:flex-end;padding-top:var(--dga-spacing-xs, .25rem)}.dga-feedback__success{display:flex;flex-wrap:wrap;align-items:center;gap:var(--dga-spacing-lg, .75rem);padding:var(--dga-spacing-xl, 1rem);border-radius:var(--dga-radius-md, 8px);background:color-mix(in srgb,var(--dga-color-primary-50, #ecfdf5) 80%,transparent);border:1px solid color-mix(in srgb,var(--dga-color-primary-200, #a7f3d0) 70%,transparent)}.dga-feedback__success-icon{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border-radius:999px;color:var(--dga-color-primary-700, #047857);background:color-mix(in srgb,var(--dga-color-primary-500, #10b981) 16%,transparent)}.dga-feedback__success-copy{flex:1 1 10rem;min-width:0}.dga-feedback__success-title{margin:0;font-size:var(--dga-font-text-sm, .875rem);font-weight:650;color:var(--dga-text-display, #161b26)}.dga-feedback__success-body{margin:.15rem 0 0;font-size:var(--dga-font-text-sm, .875rem);color:var(--dga-text-paragraph, #384250)}\n"]}]}],propDecorators:{rating:[{type:t.Input,args:[{isSignal:!0,alias:"rating",required:!1}]},{type:t.Output,args:["ratingChange"]}],submitted:[{type:t.Output,args:["submitted"]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],subtitle:[{type:t.Input,args:[{isSignal:!0,alias:"subtitle",required:!1}]}],ratingLabel:[{type:t.Input,args:[{isSignal:!0,alias:"ratingLabel",required:!1}]}],commentLabel:[{type:t.Input,args:[{isSignal:!0,alias:"commentLabel",required:!1}]}],commentPlaceholder:[{type:t.Input,args:[{isSignal:!0,alias:"commentPlaceholder",required:!1}]}],submitLabel:[{type:t.Input,args:[{isSignal:!0,alias:"submitLabel",required:!1}]}],againLabel:[{type:t.Input,args:[{isSignal:!0,alias:"againLabel",required:!1}]}],successTitle:[{type:t.Input,args:[{isSignal:!0,alias:"successTitle",required:!1}]}],successBody:[{type:t.Input,args:[{isSignal:!0,alias:"successBody",required:!1}]}]}});const pn=/^(javascript|data|vbscript|blob):/i,gn=/^(https?:|mailto:|tel:)/i;function Ys(d,e="/"){const a=d.trim();if(!a)return a;if(pn.test(a))return"#";if(a==="#"||a.startsWith("#")||gn.test(a)||a.startsWith("//")||!a.startsWith("/"))return a;const s=e.replace(/\/+$/,"");return!s||s==="/"?a:`${s}${a}`}function K(d,e="/"){return d==null?"#":Ys(String(d),e)||"#"}class pt{question=i("هل كانت هذه الصفحة مفيدة؟",...ngDevMode?[{debugName:"question"}]:[]);yesLabel=i("نعم",...ngDevMode?[{debugName:"yesLabel"}]:[]);noLabel=i("لا",...ngDevMode?[{debugName:"noLabel"}]:[]);closeLabel=i("إغلاق",...ngDevMode?[{debugName:"closeLabel"}]:[]);whyLabel=i("أخبرنا بالسبب",...ngDevMode?[{debugName:"whyLabel"}]:[]);whyHint=i("(يمكنك اختيار أكثر من خيار)",...ngDevMode?[{debugName:"whyHint"}]:[]);genderLabel=i("أنا",...ngDevMode?[{debugName:"genderLabel"}]:[]);commentLabel=i("ملاحظات",...ngDevMode?[{debugName:"commentLabel"}]:[]);commentPlaceholder=i("اكتب رسالتك…",...ngDevMode?[{debugName:"commentPlaceholder"}]:[]);submitLabel=i("إرسال",...ngDevMode?[{debugName:"submitLabel"}]:[]);statistic=i("",...ngDevMode?[{debugName:"statistic"}]:[]);thankYouMessage=i("شكرًا لملاحظاتك",...ngDevMode?[{debugName:"thankYouMessage"}]:[]);agreementBefore=i("لمزيد من المعلومات، يمكنك مراجعة ",...ngDevMode?[{debugName:"agreementBefore"}]:[]);participationLabel=i("بيان المشاركة الإلكترونية",...ngDevMode?[{debugName:"participationLabel"}]:[]);participationHref=i("#",...ngDevMode?[{debugName:"participationHref"}]:[]);agreementAnd=i(" و ",...ngDevMode?[{debugName:"agreementAnd"}]:[]);rulesLabel=i("قواعد المشاركة",...ngDevMode?[{debugName:"rulesLabel"}]:[]);rulesHref=i("#",...ngDevMode?[{debugName:"rulesHref"}]:[]);agreementAfter=i("",...ngDevMode?[{debugName:"agreementAfter"}]:[]);agreementLinks=i([],...ngDevMode?[{debugName:"agreementLinks"}]:[]);defaultAgreement=i(!0,{...ngDevMode?{debugName:"defaultAgreement"}:{},transform:m});ageLabel=i("الفئة العمرية",...ngDevMode?[{debugName:"ageLabel"}]:[]);ageOptions=i([],...ngDevMode?[{debugName:"ageOptions"}]:[]);yesReasons=i([{value:"relevant",label:"المحتوى ذو صلة"},{value:"well-written",label:"كان مكتوبًا بشكل جيد"},{value:"easy-layout",label:"التصميم سهّل القراءة"},{value:"other",label:"سبب آخر"}],...ngDevMode?[{debugName:"yesReasons"}]:[]);noReasons=i([{value:"not-relevant",label:"المحتوى غير ذي صلة"},{value:"inaccurate",label:"المحتوى غير دقيق"},{value:"too-long",label:"المحتوى طويل جدًا"},{value:"other",label:"سبب آخر"}],...ngDevMode?[{debugName:"noReasons"}]:[]);genderOptions=i([{value:"male",label:"ذكر"},{value:"female",label:"أنثى"}],...ngDevMode?[{debugName:"genderOptions"}]:[]);bordered=i(!0,{...ngDevMode?{debugName:"bordered"}:{},transform:m});submitted=w();closed=w();answer=y(null,...ngDevMode?[{debugName:"answer"}]:[]);phase=y("idle",...ngDevMode?[{debugName:"phase"}]:[]);reasons=y([],...ngDevMode?[{debugName:"reasons"}]:[]);gender=y("",...ngDevMode?[{debugName:"gender"}]:[]);ageRange=y("",...ngDevMode?[{debugName:"ageRange"}]:[]);comment=y("",...ngDevMode?[{debugName:"comment"}]:[]);dismissed=y(!1,...ngDevMode?[{debugName:"dismissed"}]:[]);statusMessage=y("",...ngDevMode?[{debugName:"statusMessage"}]:[]);static nextId=0;uid=++pt.nextId;commentId=`dga-page-feedback-comment-${this.uid}`;genderName=`dga-page-feedback-gender-${this.uid}`;ageName=`dga-page-feedback-age-${this.uid}`;activeReasons=n(()=>this.answer()==="no"?this.noReasons():this.yesReasons(),...ngDevMode?[{debugName:"activeReasons"}]:[]);canSubmit=n(()=>this.reasons().length>0||this.comment().trim().length>0,...ngDevMode?[{debugName:"canSubmit"}]:[]);resolvedAgreementLinks=n(()=>{const e=this.agreementLinks().filter(a=>!!a?.label?.trim());return e.length?e:[{label:this.participationLabel(),href:this.participationHref()},{label:this.rulesLabel(),href:this.rulesHref()}].filter(a=>!!a.label?.trim())},...ngDevMode?[{debugName:"resolvedAgreementLinks"}]:[]);showDefaultAgreement=n(()=>this.defaultAgreement()&&this.resolvedAgreementLinks().length>0,...ngDevMode?[{debugName:"showDefaultAgreement"}]:[]);panelClasses=n(()=>f("block w-full bg-surface",this.bordered()&&"border-t-2 border-border-primary"),...ngDevMode?[{debugName:"panelClasses"}]:[]);choose(e){this.answer.set(e),this.phase.set("details"),this.reasons.set([]),this.gender.set(""),this.ageRange.set(""),this.comment.set(""),this.statusMessage.set("")}toggleReason(e,a){const s=a.target.checked;this.reasons.update(r=>s?[...r,e]:r.filter(l=>l!==e))}onComment(e){this.comment.set(e.target.value)}onSubmit(e){e.preventDefault();const a=this.answer();!a||!this.canSubmit()||(this.submitted.emit({answer:a,reasons:this.reasons(),gender:this.gender(),ageRange:this.ageRange(),comment:this.comment().trim()}),this.statusMessage.set(this.thankYouMessage()),this.phase.set("thanks"),this.reasons.set([]),this.gender.set(""),this.ageRange.set(""),this.comment.set(""))}close(){if(this.phase()==="thanks"){this.dismissed.set(!0),this.closed.emit();return}this.answer.set(null),this.phase.set("idle"),this.reasons.set([]),this.gender.set(""),this.ageRange.set(""),this.comment.set(""),this.statusMessage.set("")}safeHref(e){return K(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:pt,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:pt,isStandalone:!0,selector:"dga-page-feedback",inputs:{question:{classPropertyName:"question",publicName:"question",isSignal:!0,isRequired:!1,transformFunction:null},yesLabel:{classPropertyName:"yesLabel",publicName:"yesLabel",isSignal:!0,isRequired:!1,transformFunction:null},noLabel:{classPropertyName:"noLabel",publicName:"noLabel",isSignal:!0,isRequired:!1,transformFunction:null},closeLabel:{classPropertyName:"closeLabel",publicName:"closeLabel",isSignal:!0,isRequired:!1,transformFunction:null},whyLabel:{classPropertyName:"whyLabel",publicName:"whyLabel",isSignal:!0,isRequired:!1,transformFunction:null},whyHint:{classPropertyName:"whyHint",publicName:"whyHint",isSignal:!0,isRequired:!1,transformFunction:null},genderLabel:{classPropertyName:"genderLabel",publicName:"genderLabel",isSignal:!0,isRequired:!1,transformFunction:null},commentLabel:{classPropertyName:"commentLabel",publicName:"commentLabel",isSignal:!0,isRequired:!1,transformFunction:null},commentPlaceholder:{classPropertyName:"commentPlaceholder",publicName:"commentPlaceholder",isSignal:!0,isRequired:!1,transformFunction:null},submitLabel:{classPropertyName:"submitLabel",publicName:"submitLabel",isSignal:!0,isRequired:!1,transformFunction:null},statistic:{classPropertyName:"statistic",publicName:"statistic",isSignal:!0,isRequired:!1,transformFunction:null},thankYouMessage:{classPropertyName:"thankYouMessage",publicName:"thankYouMessage",isSignal:!0,isRequired:!1,transformFunction:null},agreementBefore:{classPropertyName:"agreementBefore",publicName:"agreementBefore",isSignal:!0,isRequired:!1,transformFunction:null},participationLabel:{classPropertyName:"participationLabel",publicName:"participationLabel",isSignal:!0,isRequired:!1,transformFunction:null},participationHref:{classPropertyName:"participationHref",publicName:"participationHref",isSignal:!0,isRequired:!1,transformFunction:null},agreementAnd:{classPropertyName:"agreementAnd",publicName:"agreementAnd",isSignal:!0,isRequired:!1,transformFunction:null},rulesLabel:{classPropertyName:"rulesLabel",publicName:"rulesLabel",isSignal:!0,isRequired:!1,transformFunction:null},rulesHref:{classPropertyName:"rulesHref",publicName:"rulesHref",isSignal:!0,isRequired:!1,transformFunction:null},agreementAfter:{classPropertyName:"agreementAfter",publicName:"agreementAfter",isSignal:!0,isRequired:!1,transformFunction:null},agreementLinks:{classPropertyName:"agreementLinks",publicName:"agreementLinks",isSignal:!0,isRequired:!1,transformFunction:null},defaultAgreement:{classPropertyName:"defaultAgreement",publicName:"defaultAgreement",isSignal:!0,isRequired:!1,transformFunction:null},ageLabel:{classPropertyName:"ageLabel",publicName:"ageLabel",isSignal:!0,isRequired:!1,transformFunction:null},ageOptions:{classPropertyName:"ageOptions",publicName:"ageOptions",isSignal:!0,isRequired:!1,transformFunction:null},yesReasons:{classPropertyName:"yesReasons",publicName:"yesReasons",isSignal:!0,isRequired:!1,transformFunction:null},noReasons:{classPropertyName:"noReasons",publicName:"noReasons",isSignal:!0,isRequired:!1,transformFunction:null},genderOptions:{classPropertyName:"genderOptions",publicName:"genderOptions",isSignal:!0,isRequired:!1,transformFunction:null},bordered:{classPropertyName:"bordered",publicName:"bordered",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{submitted:"submitted",closed:"closed"},host:{properties:{"attr.data-phase":"phase()","attr.data-answer":"answer() || null"},classAttribute:"block"},ngImport:t,template:`
|
|
4872
|
+
`,changeDetection:h.OnPush,host:{"[class]":"hostClass()"},styles:[":host{display:block;width:100%;max-width:var(--container-md, 40rem)}.dga-feedback{display:flex;flex-direction:column;gap:var(--dga-spacing-2xl, 1.25rem);padding:var(--dga-spacing-2xl, 1.25rem);border:1px solid var(--dga-border-neutral-subtle, var(--dga-color-neutral-200));border-radius:var(--dga-radius-lg, 12px);background:linear-gradient(165deg,color-mix(in srgb,var(--dga-color-primary-50, #ecfdf5) 55%,transparent) 0%,var(--dga-bg-card, #fff) 42%);box-shadow:var(--dga-shadow-xs, 0 1px 2px rgb(0 0 0 / 6%))}.dga-feedback__head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--dga-spacing-lg, .75rem);padding-bottom:var(--dga-spacing-lg, .75rem);border-bottom:1px solid color-mix(in srgb,var(--dga-border-neutral-subtle) 80%,transparent)}.dga-feedback__head-text{min-width:0;display:flex;flex-direction:column;gap:var(--dga-spacing-xs, .25rem)}.dga-feedback__title{margin:0;font-size:var(--dga-font-text-md, 1rem);line-height:var(--dga-leading-text-md, 1.5rem);font-weight:650;color:var(--dga-text-display, #161b26)}.dga-feedback__subtitle{margin:0;font-size:var(--dga-font-text-sm, .875rem);line-height:1.4;color:var(--dga-text-paragraph, #384250)}.dga-feedback__badge{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border-radius:999px;color:var(--dga-color-yellow-600, #d97706);background:color-mix(in srgb,var(--dga-color-yellow-400, #fbbf24) 18%,transparent)}.dga-feedback__body{display:flex;flex-direction:column;gap:var(--dga-spacing-xl, 1rem)}.dga-feedback__rating,.dga-feedback__comment{display:flex;flex-direction:column;gap:var(--dga-spacing-sm, .375rem)}.dga-feedback__label{font-size:var(--dga-font-text-sm, .875rem);font-weight:600;color:var(--dga-text-display, #161b26)}.dga-feedback__hint{font-size:var(--dga-font-text-xs, .75rem);color:var(--dga-text-muted, #6b7280)}.dga-feedback__textarea{width:100%;min-height:6.5rem;resize:vertical;padding:var(--dga-spacing-lg, .75rem) var(--dga-spacing-xl, 1rem);border:1px solid var(--dga-border-border, var(--dga-color-neutral-300));border-radius:var(--dga-radius-md, 8px);background:var(--dga-bg-surface, #fff);color:var(--dga-text-fg, #111827);font:inherit;font-size:var(--dga-font-text-md, 1rem);line-height:1.5;transition:border-color .16s ease,box-shadow .16s ease}.dga-feedback__textarea::placeholder{color:var(--dga-text-muted, #9da4ae)}.dga-feedback__textarea:hover{border-color:var(--dga-border-primary-light, var(--dga-color-primary-200))}.dga-feedback__textarea:focus{outline:none;border-color:var(--dga-border-primary, var(--dga-color-primary-600));box-shadow:0 0 0 3px var(--dga-form-field-focus-glow, rgb(16 185 129 / 18%))}.dga-feedback__actions{display:flex;justify-content:flex-end;padding-top:var(--dga-spacing-xs, .25rem)}.dga-feedback__success{display:flex;flex-wrap:wrap;align-items:center;gap:var(--dga-spacing-lg, .75rem);padding:var(--dga-spacing-xl, 1rem);border-radius:var(--dga-radius-md, 8px);background:color-mix(in srgb,var(--dga-color-primary-50, #ecfdf5) 80%,transparent);border:1px solid color-mix(in srgb,var(--dga-color-primary-200, #a7f3d0) 70%,transparent)}.dga-feedback__success-icon{display:inline-flex;align-items:center;justify-content:center;width:2.25rem;height:2.25rem;border-radius:999px;color:var(--dga-color-primary-700, #047857);background:color-mix(in srgb,var(--dga-color-primary-500, #10b981) 16%,transparent)}.dga-feedback__success-copy{flex:1 1 10rem;min-width:0}.dga-feedback__success-title{margin:0;font-size:var(--dga-font-text-sm, .875rem);font-weight:650;color:var(--dga-text-display, #161b26)}.dga-feedback__success-body{margin:.15rem 0 0;font-size:var(--dga-font-text-sm, .875rem);color:var(--dga-text-paragraph, #384250)}\n"]}]}],propDecorators:{rating:[{type:t.Input,args:[{isSignal:!0,alias:"rating",required:!1}]},{type:t.Output,args:["ratingChange"]}],submitted:[{type:t.Output,args:["submitted"]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],subtitle:[{type:t.Input,args:[{isSignal:!0,alias:"subtitle",required:!1}]}],ratingLabel:[{type:t.Input,args:[{isSignal:!0,alias:"ratingLabel",required:!1}]}],commentLabel:[{type:t.Input,args:[{isSignal:!0,alias:"commentLabel",required:!1}]}],commentPlaceholder:[{type:t.Input,args:[{isSignal:!0,alias:"commentPlaceholder",required:!1}]}],submitLabel:[{type:t.Input,args:[{isSignal:!0,alias:"submitLabel",required:!1}]}],againLabel:[{type:t.Input,args:[{isSignal:!0,alias:"againLabel",required:!1}]}],successTitle:[{type:t.Input,args:[{isSignal:!0,alias:"successTitle",required:!1}]}],successBody:[{type:t.Input,args:[{isSignal:!0,alias:"successBody",required:!1}]}]}});const pn=/^(javascript|data|vbscript|blob):/i,gn=/^(https?:|mailto:|tel:)/i;function Us(d,e="/"){const a=d.trim();if(!a)return a;if(pn.test(a))return"#";if(a==="#"||a.startsWith("#")||gn.test(a)||a.startsWith("//")||!a.startsWith("/"))return a;const s=e.replace(/\/+$/,"");return!s||s==="/"?a:`${s}${a}`}function K(d,e="/"){return d==null?"#":Us(String(d),e)||"#"}class pt{question=i("هل كانت هذه الصفحة مفيدة؟",...ngDevMode?[{debugName:"question"}]:[]);yesLabel=i("نعم",...ngDevMode?[{debugName:"yesLabel"}]:[]);noLabel=i("لا",...ngDevMode?[{debugName:"noLabel"}]:[]);closeLabel=i("إغلاق",...ngDevMode?[{debugName:"closeLabel"}]:[]);whyLabel=i("أخبرنا بالسبب",...ngDevMode?[{debugName:"whyLabel"}]:[]);whyHint=i("(يمكنك اختيار أكثر من خيار)",...ngDevMode?[{debugName:"whyHint"}]:[]);genderLabel=i("أنا",...ngDevMode?[{debugName:"genderLabel"}]:[]);commentLabel=i("ملاحظات",...ngDevMode?[{debugName:"commentLabel"}]:[]);commentPlaceholder=i("اكتب رسالتك…",...ngDevMode?[{debugName:"commentPlaceholder"}]:[]);submitLabel=i("إرسال",...ngDevMode?[{debugName:"submitLabel"}]:[]);statistic=i("",...ngDevMode?[{debugName:"statistic"}]:[]);thankYouMessage=i("شكرًا لملاحظاتك",...ngDevMode?[{debugName:"thankYouMessage"}]:[]);agreementBefore=i("لمزيد من المعلومات، يمكنك مراجعة ",...ngDevMode?[{debugName:"agreementBefore"}]:[]);participationLabel=i("بيان المشاركة الإلكترونية",...ngDevMode?[{debugName:"participationLabel"}]:[]);participationHref=i("#",...ngDevMode?[{debugName:"participationHref"}]:[]);agreementAnd=i(" و ",...ngDevMode?[{debugName:"agreementAnd"}]:[]);rulesLabel=i("قواعد المشاركة",...ngDevMode?[{debugName:"rulesLabel"}]:[]);rulesHref=i("#",...ngDevMode?[{debugName:"rulesHref"}]:[]);agreementAfter=i("",...ngDevMode?[{debugName:"agreementAfter"}]:[]);agreementLinks=i([],...ngDevMode?[{debugName:"agreementLinks"}]:[]);defaultAgreement=i(!0,{...ngDevMode?{debugName:"defaultAgreement"}:{},transform:m});ageLabel=i("الفئة العمرية",...ngDevMode?[{debugName:"ageLabel"}]:[]);ageOptions=i([],...ngDevMode?[{debugName:"ageOptions"}]:[]);yesReasons=i([{value:"relevant",label:"المحتوى ذو صلة"},{value:"well-written",label:"كان مكتوبًا بشكل جيد"},{value:"easy-layout",label:"التصميم سهّل القراءة"},{value:"other",label:"سبب آخر"}],...ngDevMode?[{debugName:"yesReasons"}]:[]);noReasons=i([{value:"not-relevant",label:"المحتوى غير ذي صلة"},{value:"inaccurate",label:"المحتوى غير دقيق"},{value:"too-long",label:"المحتوى طويل جدًا"},{value:"other",label:"سبب آخر"}],...ngDevMode?[{debugName:"noReasons"}]:[]);genderOptions=i([{value:"male",label:"ذكر"},{value:"female",label:"أنثى"}],...ngDevMode?[{debugName:"genderOptions"}]:[]);bordered=i(!0,{...ngDevMode?{debugName:"bordered"}:{},transform:m});submitted=w();closed=w();answer=y(null,...ngDevMode?[{debugName:"answer"}]:[]);phase=y("idle",...ngDevMode?[{debugName:"phase"}]:[]);reasons=y([],...ngDevMode?[{debugName:"reasons"}]:[]);gender=y("",...ngDevMode?[{debugName:"gender"}]:[]);ageRange=y("",...ngDevMode?[{debugName:"ageRange"}]:[]);comment=y("",...ngDevMode?[{debugName:"comment"}]:[]);dismissed=y(!1,...ngDevMode?[{debugName:"dismissed"}]:[]);statusMessage=y("",...ngDevMode?[{debugName:"statusMessage"}]:[]);static nextId=0;uid=++pt.nextId;commentId=`dga-page-feedback-comment-${this.uid}`;genderName=`dga-page-feedback-gender-${this.uid}`;ageName=`dga-page-feedback-age-${this.uid}`;activeReasons=n(()=>this.answer()==="no"?this.noReasons():this.yesReasons(),...ngDevMode?[{debugName:"activeReasons"}]:[]);canSubmit=n(()=>this.reasons().length>0||this.comment().trim().length>0,...ngDevMode?[{debugName:"canSubmit"}]:[]);resolvedAgreementLinks=n(()=>{const e=this.agreementLinks().filter(a=>!!a?.label?.trim());return e.length?e:[{label:this.participationLabel(),href:this.participationHref()},{label:this.rulesLabel(),href:this.rulesHref()}].filter(a=>!!a.label?.trim())},...ngDevMode?[{debugName:"resolvedAgreementLinks"}]:[]);showDefaultAgreement=n(()=>this.defaultAgreement()&&this.resolvedAgreementLinks().length>0,...ngDevMode?[{debugName:"showDefaultAgreement"}]:[]);panelClasses=n(()=>f("block w-full bg-surface",this.bordered()&&"border-t-2 border-border-primary"),...ngDevMode?[{debugName:"panelClasses"}]:[]);choose(e){this.answer.set(e),this.phase.set("details"),this.reasons.set([]),this.gender.set(""),this.ageRange.set(""),this.comment.set(""),this.statusMessage.set("")}toggleReason(e,a){const s=a.target.checked;this.reasons.update(r=>s?[...r,e]:r.filter(l=>l!==e))}onComment(e){this.comment.set(e.target.value)}onSubmit(e){e.preventDefault();const a=this.answer();!a||!this.canSubmit()||(this.submitted.emit({answer:a,reasons:this.reasons(),gender:this.gender(),ageRange:this.ageRange(),comment:this.comment().trim()}),this.statusMessage.set(this.thankYouMessage()),this.phase.set("thanks"),this.reasons.set([]),this.gender.set(""),this.ageRange.set(""),this.comment.set(""))}close(){if(this.phase()==="thanks"){this.dismissed.set(!0),this.closed.emit();return}this.answer.set(null),this.phase.set("idle"),this.reasons.set([]),this.gender.set(""),this.ageRange.set(""),this.comment.set(""),this.statusMessage.set("")}safeHref(e){return K(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:pt,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:pt,isStandalone:!0,selector:"dga-page-feedback",inputs:{question:{classPropertyName:"question",publicName:"question",isSignal:!0,isRequired:!1,transformFunction:null},yesLabel:{classPropertyName:"yesLabel",publicName:"yesLabel",isSignal:!0,isRequired:!1,transformFunction:null},noLabel:{classPropertyName:"noLabel",publicName:"noLabel",isSignal:!0,isRequired:!1,transformFunction:null},closeLabel:{classPropertyName:"closeLabel",publicName:"closeLabel",isSignal:!0,isRequired:!1,transformFunction:null},whyLabel:{classPropertyName:"whyLabel",publicName:"whyLabel",isSignal:!0,isRequired:!1,transformFunction:null},whyHint:{classPropertyName:"whyHint",publicName:"whyHint",isSignal:!0,isRequired:!1,transformFunction:null},genderLabel:{classPropertyName:"genderLabel",publicName:"genderLabel",isSignal:!0,isRequired:!1,transformFunction:null},commentLabel:{classPropertyName:"commentLabel",publicName:"commentLabel",isSignal:!0,isRequired:!1,transformFunction:null},commentPlaceholder:{classPropertyName:"commentPlaceholder",publicName:"commentPlaceholder",isSignal:!0,isRequired:!1,transformFunction:null},submitLabel:{classPropertyName:"submitLabel",publicName:"submitLabel",isSignal:!0,isRequired:!1,transformFunction:null},statistic:{classPropertyName:"statistic",publicName:"statistic",isSignal:!0,isRequired:!1,transformFunction:null},thankYouMessage:{classPropertyName:"thankYouMessage",publicName:"thankYouMessage",isSignal:!0,isRequired:!1,transformFunction:null},agreementBefore:{classPropertyName:"agreementBefore",publicName:"agreementBefore",isSignal:!0,isRequired:!1,transformFunction:null},participationLabel:{classPropertyName:"participationLabel",publicName:"participationLabel",isSignal:!0,isRequired:!1,transformFunction:null},participationHref:{classPropertyName:"participationHref",publicName:"participationHref",isSignal:!0,isRequired:!1,transformFunction:null},agreementAnd:{classPropertyName:"agreementAnd",publicName:"agreementAnd",isSignal:!0,isRequired:!1,transformFunction:null},rulesLabel:{classPropertyName:"rulesLabel",publicName:"rulesLabel",isSignal:!0,isRequired:!1,transformFunction:null},rulesHref:{classPropertyName:"rulesHref",publicName:"rulesHref",isSignal:!0,isRequired:!1,transformFunction:null},agreementAfter:{classPropertyName:"agreementAfter",publicName:"agreementAfter",isSignal:!0,isRequired:!1,transformFunction:null},agreementLinks:{classPropertyName:"agreementLinks",publicName:"agreementLinks",isSignal:!0,isRequired:!1,transformFunction:null},defaultAgreement:{classPropertyName:"defaultAgreement",publicName:"defaultAgreement",isSignal:!0,isRequired:!1,transformFunction:null},ageLabel:{classPropertyName:"ageLabel",publicName:"ageLabel",isSignal:!0,isRequired:!1,transformFunction:null},ageOptions:{classPropertyName:"ageOptions",publicName:"ageOptions",isSignal:!0,isRequired:!1,transformFunction:null},yesReasons:{classPropertyName:"yesReasons",publicName:"yesReasons",isSignal:!0,isRequired:!1,transformFunction:null},noReasons:{classPropertyName:"noReasons",publicName:"noReasons",isSignal:!0,isRequired:!1,transformFunction:null},genderOptions:{classPropertyName:"genderOptions",publicName:"genderOptions",isSignal:!0,isRequired:!1,transformFunction:null},bordered:{classPropertyName:"bordered",publicName:"bordered",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{submitted:"submitted",closed:"closed"},host:{properties:{"attr.data-phase":"phase()","attr.data-answer":"answer() || null"},classAttribute:"block"},ngImport:t,template:`
|
|
4855
4873
|
@if (!dismissed()) {
|
|
4856
4874
|
<section [class]="panelClasses()" [attr.aria-label]="question()">
|
|
4857
4875
|
<div class="mx-auto w-full px-(--wrapper-padding) py-4xl lg:py-5xl">
|
|
@@ -5041,7 +5059,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
5041
5059
|
</div>
|
|
5042
5060
|
</section>
|
|
5043
5061
|
}
|
|
5044
|
-
`,isInline:!0,dependencies:[{kind:"directive",type:D,selector:"button[dgaButton], a[dgaButton]",inputs:["variant","size","effect","iconOnly","fullWidth","cooldownMs","loading","dgaButtonClass"]},{kind:"directive",type:ee,selector:'input[type="checkbox"][dgaCheckbox]',inputs:["size","dgaInvalid"]},{kind:"component",type:k,selector:"dga-icon",inputs:["name","glyph","size","tone","label"]},{kind:"directive",type:ce,selector:"input[dgaInput], textarea[dgaInput]",inputs:["size","dgaInvalid","status"]},{kind:"directive",type:Y,selector:"a[dgaLink]",inputs:["variant","dropdown"]},{kind:"directive",type:
|
|
5062
|
+
`,isInline:!0,dependencies:[{kind:"directive",type:D,selector:"button[dgaButton], a[dgaButton]",inputs:["variant","size","effect","iconOnly","fullWidth","cooldownMs","loading","dgaButtonClass"]},{kind:"directive",type:ee,selector:'input[type="checkbox"][dgaCheckbox]',inputs:["size","dgaInvalid"]},{kind:"component",type:k,selector:"dga-icon",inputs:["name","glyph","size","tone","label"]},{kind:"directive",type:ce,selector:"input[dgaInput], textarea[dgaInput]",inputs:["size","dgaInvalid","status"]},{kind:"directive",type:Y,selector:"a[dgaLink]",inputs:["variant","dropdown"]},{kind:"directive",type:Te,selector:'input[type="radio"][dgaRadio]',inputs:["size","dgaInvalid"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:pt,decorators:[{type:v,args:[{selector:"dga-page-feedback",standalone:!0,imports:[D,ee,k,ce,Y,Te],template:`
|
|
5045
5063
|
@if (!dismissed()) {
|
|
5046
5064
|
<section [class]="panelClasses()" [attr.aria-label]="question()">
|
|
5047
5065
|
<div class="mx-auto w-full px-(--wrapper-padding) py-4xl lg:py-5xl">
|
|
@@ -5231,7 +5249,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
5231
5249
|
</div>
|
|
5232
5250
|
</section>
|
|
5233
5251
|
}
|
|
5234
|
-
`,changeDetection:h.OnPush,host:{class:"block","[attr.data-phase]":"phase()","[attr.data-answer]":"answer() || null"}}]}],propDecorators:{question:[{type:t.Input,args:[{isSignal:!0,alias:"question",required:!1}]}],yesLabel:[{type:t.Input,args:[{isSignal:!0,alias:"yesLabel",required:!1}]}],noLabel:[{type:t.Input,args:[{isSignal:!0,alias:"noLabel",required:!1}]}],closeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],whyLabel:[{type:t.Input,args:[{isSignal:!0,alias:"whyLabel",required:!1}]}],whyHint:[{type:t.Input,args:[{isSignal:!0,alias:"whyHint",required:!1}]}],genderLabel:[{type:t.Input,args:[{isSignal:!0,alias:"genderLabel",required:!1}]}],commentLabel:[{type:t.Input,args:[{isSignal:!0,alias:"commentLabel",required:!1}]}],commentPlaceholder:[{type:t.Input,args:[{isSignal:!0,alias:"commentPlaceholder",required:!1}]}],submitLabel:[{type:t.Input,args:[{isSignal:!0,alias:"submitLabel",required:!1}]}],statistic:[{type:t.Input,args:[{isSignal:!0,alias:"statistic",required:!1}]}],thankYouMessage:[{type:t.Input,args:[{isSignal:!0,alias:"thankYouMessage",required:!1}]}],agreementBefore:[{type:t.Input,args:[{isSignal:!0,alias:"agreementBefore",required:!1}]}],participationLabel:[{type:t.Input,args:[{isSignal:!0,alias:"participationLabel",required:!1}]}],participationHref:[{type:t.Input,args:[{isSignal:!0,alias:"participationHref",required:!1}]}],agreementAnd:[{type:t.Input,args:[{isSignal:!0,alias:"agreementAnd",required:!1}]}],rulesLabel:[{type:t.Input,args:[{isSignal:!0,alias:"rulesLabel",required:!1}]}],rulesHref:[{type:t.Input,args:[{isSignal:!0,alias:"rulesHref",required:!1}]}],agreementAfter:[{type:t.Input,args:[{isSignal:!0,alias:"agreementAfter",required:!1}]}],agreementLinks:[{type:t.Input,args:[{isSignal:!0,alias:"agreementLinks",required:!1}]}],defaultAgreement:[{type:t.Input,args:[{isSignal:!0,alias:"defaultAgreement",required:!1}]}],ageLabel:[{type:t.Input,args:[{isSignal:!0,alias:"ageLabel",required:!1}]}],ageOptions:[{type:t.Input,args:[{isSignal:!0,alias:"ageOptions",required:!1}]}],yesReasons:[{type:t.Input,args:[{isSignal:!0,alias:"yesReasons",required:!1}]}],noReasons:[{type:t.Input,args:[{isSignal:!0,alias:"noReasons",required:!1}]}],genderOptions:[{type:t.Input,args:[{isSignal:!0,alias:"genderOptions",required:!1}]}],bordered:[{type:t.Input,args:[{isSignal:!0,alias:"bordered",required:!1}]}],submitted:[{type:t.Output,args:["submitted"]}],closed:[{type:t.Output,args:["closed"]}]}});const mn="<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' class='gds-icon'><path fill='currentColor' d='M16.47 7.97a.75.75 0 0 1 1.06 1.06l-7 7a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 0 1 1.06-1.06L10 14.44z'/><path fill='currentColor' fill-rule='evenodd' d='M12 1.25c5.937 0 10.75 4.813 10.75 10.75S17.937 22.75 12 22.75 1.25 17.937 1.25 12 6.063 1.25 12 1.25m0 1.5a9.25 9.25 0 1 0 0 18.5 9.25 9.25 0 0 0 0-18.5' clip-rule='evenodd'/></svg>";class ge{el=x(F);destroyRef=x(L);toasts=x(ue);value=i("",{...ngDevMode?{debugName:"value"}:{},alias:"dgaCopy"});target=i("",...ngDevMode?[{debugName:"target"}]:[]);successLabel=i("",...ngDevMode?[{debugName:"successLabel"}]:[]);message=i("",...ngDevMode?[{debugName:"message"}]:[]);toastTitle=i("",...ngDevMode?[{debugName:"toastTitle"}]:[]);showToast=i(!0,{...ngDevMode?{debugName:"showToast"}:{},transform:m});duration=i(2e3,...ngDevMode?[{debugName:"duration"}]:[]);copied=w();status=y(null,...ngDevMode?[{debugName:"status"}]:[]);restoreTimer=null;labelEl=null;previousLabel="";iconSlot=null;previousIconHtml="";constructor(){hn(),this.destroyRef.onDestroy(()=>this.clearTimer())}async onClick(e){e.preventDefault();const a=this.resolveText();!a||!await
|
|
5252
|
+
`,changeDetection:h.OnPush,host:{class:"block","[attr.data-phase]":"phase()","[attr.data-answer]":"answer() || null"}}]}],propDecorators:{question:[{type:t.Input,args:[{isSignal:!0,alias:"question",required:!1}]}],yesLabel:[{type:t.Input,args:[{isSignal:!0,alias:"yesLabel",required:!1}]}],noLabel:[{type:t.Input,args:[{isSignal:!0,alias:"noLabel",required:!1}]}],closeLabel:[{type:t.Input,args:[{isSignal:!0,alias:"closeLabel",required:!1}]}],whyLabel:[{type:t.Input,args:[{isSignal:!0,alias:"whyLabel",required:!1}]}],whyHint:[{type:t.Input,args:[{isSignal:!0,alias:"whyHint",required:!1}]}],genderLabel:[{type:t.Input,args:[{isSignal:!0,alias:"genderLabel",required:!1}]}],commentLabel:[{type:t.Input,args:[{isSignal:!0,alias:"commentLabel",required:!1}]}],commentPlaceholder:[{type:t.Input,args:[{isSignal:!0,alias:"commentPlaceholder",required:!1}]}],submitLabel:[{type:t.Input,args:[{isSignal:!0,alias:"submitLabel",required:!1}]}],statistic:[{type:t.Input,args:[{isSignal:!0,alias:"statistic",required:!1}]}],thankYouMessage:[{type:t.Input,args:[{isSignal:!0,alias:"thankYouMessage",required:!1}]}],agreementBefore:[{type:t.Input,args:[{isSignal:!0,alias:"agreementBefore",required:!1}]}],participationLabel:[{type:t.Input,args:[{isSignal:!0,alias:"participationLabel",required:!1}]}],participationHref:[{type:t.Input,args:[{isSignal:!0,alias:"participationHref",required:!1}]}],agreementAnd:[{type:t.Input,args:[{isSignal:!0,alias:"agreementAnd",required:!1}]}],rulesLabel:[{type:t.Input,args:[{isSignal:!0,alias:"rulesLabel",required:!1}]}],rulesHref:[{type:t.Input,args:[{isSignal:!0,alias:"rulesHref",required:!1}]}],agreementAfter:[{type:t.Input,args:[{isSignal:!0,alias:"agreementAfter",required:!1}]}],agreementLinks:[{type:t.Input,args:[{isSignal:!0,alias:"agreementLinks",required:!1}]}],defaultAgreement:[{type:t.Input,args:[{isSignal:!0,alias:"defaultAgreement",required:!1}]}],ageLabel:[{type:t.Input,args:[{isSignal:!0,alias:"ageLabel",required:!1}]}],ageOptions:[{type:t.Input,args:[{isSignal:!0,alias:"ageOptions",required:!1}]}],yesReasons:[{type:t.Input,args:[{isSignal:!0,alias:"yesReasons",required:!1}]}],noReasons:[{type:t.Input,args:[{isSignal:!0,alias:"noReasons",required:!1}]}],genderOptions:[{type:t.Input,args:[{isSignal:!0,alias:"genderOptions",required:!1}]}],bordered:[{type:t.Input,args:[{isSignal:!0,alias:"bordered",required:!1}]}],submitted:[{type:t.Output,args:["submitted"]}],closed:[{type:t.Output,args:["closed"]}]}});const mn="<svg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' class='gds-icon'><path fill='currentColor' d='M16.47 7.97a.75.75 0 0 1 1.06 1.06l-7 7a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 0 1 1.06-1.06L10 14.44z'/><path fill='currentColor' fill-rule='evenodd' d='M12 1.25c5.937 0 10.75 4.813 10.75 10.75S17.937 22.75 12 22.75 1.25 17.937 1.25 12 6.063 1.25 12 1.25m0 1.5a9.25 9.25 0 1 0 0 18.5 9.25 9.25 0 0 0 0-18.5' clip-rule='evenodd'/></svg>";class ge{el=x(F);destroyRef=x(L);toasts=x(ue);value=i("",{...ngDevMode?{debugName:"value"}:{},alias:"dgaCopy"});target=i("",...ngDevMode?[{debugName:"target"}]:[]);successLabel=i("",...ngDevMode?[{debugName:"successLabel"}]:[]);message=i("",...ngDevMode?[{debugName:"message"}]:[]);toastTitle=i("",...ngDevMode?[{debugName:"toastTitle"}]:[]);showToast=i(!0,{...ngDevMode?{debugName:"showToast"}:{},transform:m});duration=i(2e3,...ngDevMode?[{debugName:"duration"}]:[]);copied=w();status=y(null,...ngDevMode?[{debugName:"status"}]:[]);restoreTimer=null;labelEl=null;previousLabel="";iconSlot=null;previousIconHtml="";constructor(){hn(),this.destroyRef.onDestroy(()=>this.clearTimer())}async onClick(e){e.preventDefault();const a=this.resolveText();!a||!await Gs(a)||(this.flash(),this.copied.emit(a),this.notify())}static writeText(e){return Gs(e)}notify(){const e=q(),a=this.message()||this.successLabel()||(e?"تم نسخ المحتوى إلى الحافظة":"Content copied to clipboard");bn(a),this.showToast()&&this.toasts.copied(a,this.toastTitle()||(e?"تم النسخ":"Copied"))}resolveText(){const e=this.value().trim();if(e)return e;const a=this.target().trim();if(a)return document.querySelector(a)?.textContent?.trim()??"";const s=this.el.nativeElement;return(s.closest("[dga-code], .dga-code, dga-code")?.querySelector("code")??s.parentElement?.querySelector("code"))?.textContent?.trim()??""}flash(){this.clearTimer(),this.status.set("success");const e=this.el.nativeElement;this.labelEl=e.querySelector(".dga-copy-label, [dgaCopyLabel]")??e.querySelector("span:not([aria-hidden]):not(dga-icon span)"),this.labelEl&&this.successLabel()&&(this.previousLabel=this.labelEl.textContent??"",this.labelEl.textContent=this.successLabel());const a=e.querySelector("dga-icon");this.iconSlot=a?.querySelector("span:first-child")??e.querySelector("dga-icon, i, svg"),this.iconSlot&&(this.previousIconHtml=this.iconSlot.innerHTML,this.iconSlot.innerHTML=mn,this.iconSlot.classList.add("text-fg-success")),this.restoreTimer=setTimeout(()=>this.restore(),this.duration())}restore(){this.status.set(null),this.labelEl&&this.successLabel()&&(this.labelEl.textContent=this.previousLabel),this.iconSlot&&(this.iconSlot.innerHTML=this.previousIconHtml,this.iconSlot.classList.remove("text-fg-success")),this.labelEl=null,this.iconSlot=null,this.restoreTimer=null}clearTimer(){this.restoreTimer!==null&&(clearTimeout(this.restoreTimer),this.restoreTimer=null)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ge,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:ge,isStandalone:!0,selector:"button[dgaCopy], a[dgaCopy]",inputs:{value:{classPropertyName:"value",publicName:"dgaCopy",isSignal:!0,isRequired:!1,transformFunction:null},target:{classPropertyName:"target",publicName:"target",isSignal:!0,isRequired:!1,transformFunction:null},successLabel:{classPropertyName:"successLabel",publicName:"successLabel",isSignal:!0,isRequired:!1,transformFunction:null},message:{classPropertyName:"message",publicName:"message",isSignal:!0,isRequired:!1,transformFunction:null},toastTitle:{classPropertyName:"toastTitle",publicName:"toastTitle",isSignal:!0,isRequired:!1,transformFunction:null},showToast:{classPropertyName:"showToast",publicName:"showToast",isSignal:!0,isRequired:!1,transformFunction:null},duration:{classPropertyName:"duration",publicName:"duration",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{copied:"copied"},host:{listeners:{click:"onClick($event)"},properties:{"attr.data-status":"status() || null","attr.aria-live":'"polite"'},classAttribute:"dga-copy"},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ge,decorators:[{type:V,args:[{selector:"button[dgaCopy], a[dgaCopy]",standalone:!0,host:{class:"dga-copy","[attr.data-status]":"status() || null","[attr.aria-live]":'"polite"'}}]}],ctorParameters:()=>[],propDecorators:{value:[{type:t.Input,args:[{isSignal:!0,alias:"dgaCopy",required:!1}]}],target:[{type:t.Input,args:[{isSignal:!0,alias:"target",required:!1}]}],successLabel:[{type:t.Input,args:[{isSignal:!0,alias:"successLabel",required:!1}]}],message:[{type:t.Input,args:[{isSignal:!0,alias:"message",required:!1}]}],toastTitle:[{type:t.Input,args:[{isSignal:!0,alias:"toastTitle",required:!1}]}],showToast:[{type:t.Input,args:[{isSignal:!0,alias:"showToast",required:!1}]}],duration:[{type:t.Input,args:[{isSignal:!0,alias:"duration",required:!1}]}],copied:[{type:t.Output,args:["copied"]}],onClick:[{type:O,args:["click",["$event"]]}]}});async function Gs(d){try{if(typeof navigator<"u"&&navigator.clipboard?.writeText)return await navigator.clipboard.writeText(d),!0}catch{}return fn(d)}function fn(d){if(typeof document>"u")return!1;const e=document.createElement("textarea");e.value=d,e.setAttribute("readonly",""),e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select();let a=!1;try{a=document.execCommand("copy")}catch{a=!1}return document.body.removeChild(e),a}let ne=null;function bn(d){typeof document>"u"||!d||(ne||(ne=document.createElement("div"),ne.setAttribute("aria-live","polite"),ne.setAttribute("aria-atomic","true"),ne.className="sr-only",document.body.appendChild(ne)),ne.textContent="",requestAnimationFrame(()=>{ne&&(ne.textContent=d)}))}let Xs=!1;function hn(){if(Xs||typeof document>"u")return;Xs=!0;const d=document.createElement("style");d.setAttribute("data-dga-copy",""),d.textContent=`
|
|
5235
5253
|
.dga-copy {
|
|
5236
5254
|
transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease,
|
|
5237
5255
|
box-shadow 180ms ease, transform 180ms ease;
|
|
@@ -6000,7 +6018,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
6000
6018
|
</li>
|
|
6001
6019
|
}
|
|
6002
6020
|
</ol>
|
|
6003
|
-
`,changeDetection:h.OnPush,host:{role:"navigation","[attr.aria-label]":"label()",class:"dga-breadcrumb block min-w-0"},styles:[":host{--dga-breadcrumb-label-max: 12rem}\n"]}]}],ctorParameters:()=>[],propDecorators:{items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],separator:[{type:t.Input,args:[{isSignal:!0,alias:"separator",required:!1}]}],maxItems:[{type:t.Input,args:[{isSignal:!0,alias:"maxItems",required:!1}]}],itemsBeforeCollapse:[{type:t.Input,args:[{isSignal:!0,alias:"itemsBeforeCollapse",required:!1}]}],itemsAfterCollapse:[{type:t.Input,args:[{isSignal:!0,alias:"itemsAfterCollapse",required:!1}]}],truncate:[{type:t.Input,args:[{isSignal:!0,alias:"truncate",required:!1}]}],moreLabel:[{type:t.Input,args:[{isSignal:!0,alias:"moreLabel",required:!1}]}],itemClick:[{type:t.Output,args:["itemClick"]}],onDocumentClick:[{type:
|
|
6021
|
+
`,changeDetection:h.OnPush,host:{role:"navigation","[attr.aria-label]":"label()",class:"dga-breadcrumb block min-w-0"},styles:[":host{--dga-breadcrumb-label-max: 12rem}\n"]}]}],ctorParameters:()=>[],propDecorators:{items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],separator:[{type:t.Input,args:[{isSignal:!0,alias:"separator",required:!1}]}],maxItems:[{type:t.Input,args:[{isSignal:!0,alias:"maxItems",required:!1}]}],itemsBeforeCollapse:[{type:t.Input,args:[{isSignal:!0,alias:"itemsBeforeCollapse",required:!1}]}],itemsAfterCollapse:[{type:t.Input,args:[{isSignal:!0,alias:"itemsAfterCollapse",required:!1}]}],truncate:[{type:t.Input,args:[{isSignal:!0,alias:"truncate",required:!1}]}],moreLabel:[{type:t.Input,args:[{isSignal:!0,alias:"moreLabel",required:!1}]}],itemClick:[{type:t.Output,args:["itemClick"]}],onDocumentClick:[{type:O,args:["document:click",["$event"]]}],onDocumentKey:[{type:O,args:["document:keydown",["$event"]]}]}});class je{uiLocale=$();page=S(1,...ngDevMode?[{debugName:"page"}]:[]);totalPages=i(1,...ngDevMode?[{debugName:"totalPages"}]:[]);label=i(void 0,...ngDevMode?[{debugName:"label"}]:[]);prevLabel=i(void 0,...ngDevMode?[{debugName:"prevLabel"}]:[]);nextLabel=i(void 0,...ngDevMode?[{debugName:"nextLabel"}]:[]);ar=n(()=>this.uiLocale().startsWith("ar"),...ngDevMode?[{debugName:"ar"}]:[]);resolvedLabel=n(()=>this.label()??(this.ar()?"ترقيم الصفحات":"Pagination"),...ngDevMode?[{debugName:"resolvedLabel"}]:[]);resolvedPrevLabel=n(()=>this.prevLabel()??(this.ar()?"الصفحة السابقة":"Previous page"),...ngDevMode?[{debugName:"resolvedPrevLabel"}]:[]);resolvedNextLabel=n(()=>this.nextLabel()??(this.ar()?"الصفحة التالية":"Next page"),...ngDevMode?[{debugName:"resolvedNextLabel"}]:[]);prevText=n(()=>this.ar()?"السابق":"Previous",...ngDevMode?[{debugName:"prevText"}]:[]);nextText=n(()=>this.ar()?"التالي":"Next",...ngDevMode?[{debugName:"nextText"}]:[]);pages=n(()=>xn(this.page(),Math.max(1,this.totalPages())),...ngDevMode?[{debugName:"pages"}]:[]);btnClass(e){return f("inline-flex min-w-4xl items-center justify-center rounded-sm px-md py-xs text-body-sm","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus","disabled:pointer-events-none disabled:opacity-40",e?"bg-primary text-on-color":"border border-border bg-surface text-fg hover:bg-card-hovered")}go(e){const a=Math.max(1,this.totalPages()),s=Math.min(a,Math.max(1,e));s!==this.page()&&this.page.set(s)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:je,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:je,isStandalone:!0,selector:"dga-pagination",inputs:{page:{classPropertyName:"page",publicName:"page",isSignal:!0,isRequired:!1,transformFunction:null},totalPages:{classPropertyName:"totalPages",publicName:"totalPages",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},prevLabel:{classPropertyName:"prevLabel",publicName:"prevLabel",isSignal:!0,isRequired:!1,transformFunction:null},nextLabel:{classPropertyName:"nextLabel",publicName:"nextLabel",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{page:"pageChange"},host:{attributes:{role:"navigation"},properties:{"attr.aria-label":"resolvedLabel()"},classAttribute:"block"},ngImport:t,template:`
|
|
6004
6022
|
<div class="flex flex-wrap items-center gap-sm">
|
|
6005
6023
|
<button
|
|
6006
6024
|
type="button"
|
|
@@ -7254,7 +7272,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
7254
7272
|
<dga-icon name="arrowUp" size="xl" tone="current" aria-hidden="true" />
|
|
7255
7273
|
</button>
|
|
7256
7274
|
}
|
|
7257
|
-
`,changeDetection:h.OnPush,styles:[":host .dga-scroll-top__btn[data-edge=end]{inset-inline-end:var(--dga-fab-edge, 2rem);inset-inline-start:auto}:host .dga-scroll-top__btn[data-edge=start]{inset-inline-start:var(--dga-fab-edge, 2rem);inset-inline-end:auto}:host .dga-scroll-top__btn[data-edge=left]{left:var(--dga-fab-edge, 2rem);right:auto}:host .dga-scroll-top__btn[data-edge=right]{right:var(--dga-fab-edge, 2rem);left:auto}\n"]}]}],ctorParameters:()=>[],propDecorators:{threshold:[{type:t.Input,args:[{isSignal:!0,alias:"threshold",required:!1}]}],position:[{type:t.Input,args:[{isSignal:!0,alias:"position",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],smooth:[{type:t.Input,args:[{isSignal:!0,alias:"smooth",required:!1}]}],stack:[{type:t.Input,args:[{isSignal:!0,alias:"stack",required:!1}]}],clearFab:[{type:t.Input,args:[{isSignal:!0,alias:"clearFab",required:!1}]}],onResize:[{type:
|
|
7275
|
+
`,changeDetection:h.OnPush,styles:[":host .dga-scroll-top__btn[data-edge=end]{inset-inline-end:var(--dga-fab-edge, 2rem);inset-inline-start:auto}:host .dga-scroll-top__btn[data-edge=start]{inset-inline-start:var(--dga-fab-edge, 2rem);inset-inline-end:auto}:host .dga-scroll-top__btn[data-edge=left]{left:var(--dga-fab-edge, 2rem);right:auto}:host .dga-scroll-top__btn[data-edge=right]{right:var(--dga-fab-edge, 2rem);left:auto}\n"]}]}],ctorParameters:()=>[],propDecorators:{threshold:[{type:t.Input,args:[{isSignal:!0,alias:"threshold",required:!1}]}],position:[{type:t.Input,args:[{isSignal:!0,alias:"position",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],smooth:[{type:t.Input,args:[{isSignal:!0,alias:"smooth",required:!1}]}],stack:[{type:t.Input,args:[{isSignal:!0,alias:"stack",required:!1}]}],clearFab:[{type:t.Input,args:[{isSignal:!0,alias:"clearFab",required:!1}]}],onResize:[{type:O,args:["window:resize"]}]}});const Cn={sm:"gap-md p-xl",md:"gap-lg p-xl",lg:"gap-xl p-3xl",xl:"gap-3xl p-xl",panel:"gap-xl p-4xl"},Dn={none:"",sm:"shadow-sm",md:"shadow-md"};class He{appearance=i("outline",...ngDevMode?[{debugName:"appearance"}]:[]);padding=i("md",...ngDevMode?[{debugName:"padding"}]:[]);border=i("default",...ngDevMode?[{debugName:"border"}]:[]);shadow=i("",...ngDevMode?[{debugName:"shadow"}]:[]);title=i("",...ngDevMode?[{debugName:"title"}]:[]);description=i("",...ngDevMode?[{debugName:"description"}]:[]);titleTruncate=i(!1,{...ngDevMode?{debugName:"titleTruncate"}:{},transform:m});descriptionClamp=i(0,...ngDevMode?[{debugName:"descriptionClamp"}]:[]);icon=i(null,...ngDevMode?[{debugName:"icon"}]:[]);iconSize=i("xl",...ngDevMode?[{debugName:"iconSize"}]:[]);iconAppearance=i("filled",...ngDevMode?[{debugName:"iconAppearance"}]:[]);badges=i([],...ngDevMode?[{debugName:"badges"}]:[]);badgeSize=i("sm",...ngDevMode?[{debugName:"badgeSize"}]:[]);primaryLabel=i("",...ngDevMode?[{debugName:"primaryLabel"}]:[]);primaryHref=i("",...ngDevMode?[{debugName:"primaryHref"}]:[]);primaryVariant=i("primary",...ngDevMode?[{debugName:"primaryVariant"}]:[]);secondaryLabel=i("",...ngDevMode?[{debugName:"secondaryLabel"}]:[]);secondaryHref=i("",...ngDevMode?[{debugName:"secondaryHref"}]:[]);secondaryVariant=i("outlineMuted",...ngDevMode?[{debugName:"secondaryVariant"}]:[]);actionSize=i("md",...ngDevMode?[{debugName:"actionSize"}]:[]);actionsAlign=i("end",...ngDevMode?[{debugName:"actionsAlign"}]:[]);interactive=i(!1,{...ngDevMode?{debugName:"interactive"}:{},transform:m});primaryClick=w();secondaryClick=w();resolvedShadow=n(()=>{const e=this.shadow();return e||(this.appearance()==="elevated"?"md":"none")},...ngDevMode?[{debugName:"resolvedShadow"}]:[]);hasBuiltInActions=n(()=>!!this.primaryLabel()||!!this.secondaryLabel(),...ngDevMode?[{debugName:"hasBuiltInActions"}]:[]);isServiceLayout=n(()=>!!this.icon()||this.badges().length>0||this.hasBuiltInActions(),...ngDevMode?[{debugName:"isServiceLayout"}]:[]);classes=n(()=>{const e=this.border()==="default"&&this.appearance()!=="filled",a=Dn[this.resolvedShadow()];return f("flex flex-col overflow-hidden rounded-lg text-fg",this.appearance()==="outline"&&"bg-card",this.appearance()==="elevated"&&"bg-card",this.appearance()==="filled"&&"bg-sunken",e&&"border border-border",this.border()==="default"&&this.appearance()==="filled"&&"border border-transparent",this.border()==="none"&&"border border-transparent",a,this.interactive()&&"cursor-pointer transition-colors hover:bg-card-hovered focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus")},...ngDevMode?[{debugName:"classes"}]:[]);bodyClasses=n(()=>f("flex min-w-0 flex-1 flex-col",Cn[this.padding()]),...ngDevMode?[{debugName:"bodyClasses"}]:[]);titleBlockClass(){return this.isServiceLayout()?"gap-md":"gap-xs"}titleClass(){return f("m-0 w-full text-display",this.isServiceLayout()?"text-body-lg font-bold leading-snug":"text-display-xs font-semibold",this.titleTruncate()&&"truncate")}descriptionClass(){const e=this.descriptionClamp();return f("m-0 w-full leading-normal",this.isServiceLayout()?"text-body-md text-paragraph":"text-body-sm text-muted",e===1&&"truncate",e===2&&"line-clamp-2",e===3&&"line-clamp-3")}iconGlyphSize(){return{sm:"sm",md:"md",lg:"lg",xl:"2xl"}[this.iconSize()]}actionsHostClass(){return f("mt-auto flex w-full flex-wrap items-center gap-xl empty:hidden",this.actionsAlign()==="start"&&"justify-start",this.actionsAlign()==="end"&&"justify-end",this.actionsAlign()==="stretch"&&"justify-stretch")}builtInActionsClass(){return f("mt-auto flex w-full flex-wrap items-center gap-xl",this.actionsAlign()==="start"&&"justify-start",this.actionsAlign()==="end"&&"justify-end",this.actionsAlign()==="stretch"&&"justify-stretch")}safeHref(e){return K(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:He,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:He,isStandalone:!0,selector:"dga-card",inputs:{appearance:{classPropertyName:"appearance",publicName:"appearance",isSignal:!0,isRequired:!1,transformFunction:null},padding:{classPropertyName:"padding",publicName:"padding",isSignal:!0,isRequired:!1,transformFunction:null},border:{classPropertyName:"border",publicName:"border",isSignal:!0,isRequired:!1,transformFunction:null},shadow:{classPropertyName:"shadow",publicName:"shadow",isSignal:!0,isRequired:!1,transformFunction:null},title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},description:{classPropertyName:"description",publicName:"description",isSignal:!0,isRequired:!1,transformFunction:null},titleTruncate:{classPropertyName:"titleTruncate",publicName:"titleTruncate",isSignal:!0,isRequired:!1,transformFunction:null},descriptionClamp:{classPropertyName:"descriptionClamp",publicName:"descriptionClamp",isSignal:!0,isRequired:!1,transformFunction:null},icon:{classPropertyName:"icon",publicName:"icon",isSignal:!0,isRequired:!1,transformFunction:null},iconSize:{classPropertyName:"iconSize",publicName:"iconSize",isSignal:!0,isRequired:!1,transformFunction:null},iconAppearance:{classPropertyName:"iconAppearance",publicName:"iconAppearance",isSignal:!0,isRequired:!1,transformFunction:null},badges:{classPropertyName:"badges",publicName:"badges",isSignal:!0,isRequired:!1,transformFunction:null},badgeSize:{classPropertyName:"badgeSize",publicName:"badgeSize",isSignal:!0,isRequired:!1,transformFunction:null},primaryLabel:{classPropertyName:"primaryLabel",publicName:"primaryLabel",isSignal:!0,isRequired:!1,transformFunction:null},primaryHref:{classPropertyName:"primaryHref",publicName:"primaryHref",isSignal:!0,isRequired:!1,transformFunction:null},primaryVariant:{classPropertyName:"primaryVariant",publicName:"primaryVariant",isSignal:!0,isRequired:!1,transformFunction:null},secondaryLabel:{classPropertyName:"secondaryLabel",publicName:"secondaryLabel",isSignal:!0,isRequired:!1,transformFunction:null},secondaryHref:{classPropertyName:"secondaryHref",publicName:"secondaryHref",isSignal:!0,isRequired:!1,transformFunction:null},secondaryVariant:{classPropertyName:"secondaryVariant",publicName:"secondaryVariant",isSignal:!0,isRequired:!1,transformFunction:null},actionSize:{classPropertyName:"actionSize",publicName:"actionSize",isSignal:!0,isRequired:!1,transformFunction:null},actionsAlign:{classPropertyName:"actionsAlign",publicName:"actionsAlign",isSignal:!0,isRequired:!1,transformFunction:null},interactive:{classPropertyName:"interactive",publicName:"interactive",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{primaryClick:"primaryClick",secondaryClick:"secondaryClick"},host:{properties:{class:"classes()","attr.data-appearance":"appearance()","attr.data-padding":"padding()","attr.data-border":"border()","attr.data-shadow":"resolvedShadow()","attr.tabindex":"interactive() ? 0 : null"}},ngImport:t,template:`
|
|
7258
7276
|
<div class="empty:hidden overflow-hidden">
|
|
7259
7277
|
<ng-content select="[dgaCardMedia]" />
|
|
7260
7278
|
</div>
|
|
@@ -7650,7 +7668,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
7650
7668
|
</div>
|
|
7651
7669
|
</div>
|
|
7652
7670
|
</div>
|
|
7653
|
-
`,changeDetection:h.OnPush,host:{class:"block w-full","[attr.data-appearance]":"appearance()"},styles:[":host{display:block;width:100%}:host([data-appearance=\"viewport\"]){display:block;width:100%;height:100dvh;max-height:100dvh;overflow:hidden}.dga-app-shell__layout{display:flex;flex-direction:column;align-items:stretch;width:100%;min-width:0}.dga-app-shell__layout--content{gap:var(--dga-space-xl, 1.5rem)}.dga-app-shell__layout--viewport{height:100%;min-height:0;gap:0;background:var(--dga-bg-body, var(--dga-color-neutral-50))}.dga-app-shell__nav{display:flex;flex-direction:column;flex:0 0 auto;min-width:0;min-height:0}.dga-app-shell__nav--viewport{background:var(--dga-bg-nav, var(--dga-bg-surface, var(--dga-bg-default)));border-inline-end:1px solid var(--dga-border-neutral-subtle, var(--dga-divider, #e5e7eb));color:var(--dga-text-default)}.dga-app-shell__brand,.dga-app-shell__nav-foot,.dga-app-shell__header{flex:0 0 auto}.dga-app-shell__brand:empty,.dga-app-shell__nav-foot:empty,.dga-app-shell__header:empty{display:none}.dga-app-shell__nav-body{flex:1 1 auto;min-height:0;overflow:auto}.dga-app-shell__main{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;width:100%}.dga-app-shell__main--content{gap:var(--dga-space-5xl, 3rem)}.dga-app-shell__main--viewport{min-height:0;height:auto;overflow:hidden}.dga-app-shell__body--content{display:flex;flex-direction:column;gap:var(--dga-space-5xl, 3rem);width:100%;min-width:0}.dga-app-shell__body--viewport{position:relative;display:block;flex:1 1 auto;width:100%;min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;padding:var(--dga-space-xl, 1.5rem) var(--dga-space-2xl, 2rem) var(--dga-space-4xl, 2.5rem)}.dga-app-shell__body--flush{padding:0}@media(min-width:1024px){.dga-app-shell__layout--content,.dga-app-shell__layout--viewport{flex-direction:row;align-items:stretch}.dga-app-shell__layout--content .dga-app-shell__nav{position:sticky;top:var(--dga-space-xl, 1.5rem);align-self:flex-start;max-height:calc(100dvh - 2 * var(--dga-space-xl, 1.5rem));overflow-y:auto}.dga-app-shell__layout--viewport .dga-app-shell__nav{flex:0 0 auto;height:100%;max-height:100%;align-self:stretch}.dga-app-shell__layout--viewport .dga-app-shell__main{flex:1 1 auto;height:100%;max-height:100%}}@media(max-width:1023px){:host([data-appearance=\"viewport\"]){height:auto;max-height:none;overflow:visible}.dga-app-shell__layout--viewport{height:auto;min-height:100dvh;overflow:visible}.dga-app-shell__main--viewport,.dga-app-shell__body--viewport{overflow:visible}}\n"]}]}],propDecorators:{navLabel:[{type:t.Input,args:[{isSignal:!0,alias:"navLabel",required:!1}]}],appearance:[{type:t.Input,args:[{isSignal:!0,alias:"appearance",required:!1}]}],padded:[{type:t.Input,args:[{isSignal:!0,alias:"padded",required:!1}]}]}});const qn='<svg width="20" height="14" viewBox="0 0 20 14" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="14" fill="#006923"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.1 3C8.1 3 8.1 3 8.1 3C8 3.1 7.9 3.2 7.9 3.4C7.9 3.5 7.8 3.5 7.9 3.5C7.9 3.6 8 3.6 8.1 3.5C8.1 3.5 8.1 3.5 8.2 3.4C8.2 3.3 8 3.5 8 3.3C8 3.2 8.1 3.2 8.2 3.1C8.2 3 8.2 3 8.1 3V3ZM9.4 3C9.4 3 9.4 3 9.3 3.1C9.3 3.2 9.2 3.3 9.3 3.6C9.3 3.7 9.4 4 9.3 4.3C9.3 4.3 9.3 4.4 9.2 4.4C9.1 4.6 9 4.5 8.9 4.5C8.8 4.4 8.8 4.4 8.7 4.2C8.7 4 8.8 3.6 8.7 3.5C8.6 3.3 8.5 3.4 8.5 3.4C8.2 3.7 8.1 4 8.1 4.3C8 4.5 7.9 4.4 7.9 4.4C7.8 4.3 7.8 3.4 7.6 3.5C7.4 4.2 7.7 4.9 8 4.8C8.2 4.9 8.3 4.6 8.4 4.2C8.4 4.1 8.4 4.1 8.5 4.1C8.5 4.6 8.5 4.7 8.6 4.9C8.9 5.1 9.2 4.9 9.2 4.9L9.4 4.7C9.5 4.6 9.5 4.6 9.6 4.7C9.7 4.7 9.6 4.8 9.8 4.9C9.9 5 10.2 4.9 10.2 4.8C10.3 4.7 10.3 4.6 10.4 4.6C10.4 4.5 10.5 4.5 10.5 4.6C10.5 4.6 10.5 4.6 10.5 4.7C10.6 4.8 10.6 4.7 10.6 4.7C10.8 4.7 10.9 4.3 10.9 4.3C10.9 4.2 10.8 4.2 10.8 4.3C10.7 4.3 10.7 4.3 10.7 4.3C10.6 4.3 10.5 4.4 10.4 4.3C10.3 4.2 10.3 4 10.3 3.9C10.3 3.8 10.2 3.7 10.3 3.6C10.3 3.6 10.4 3.7 10.4 3.6C10.5 3.5 10.3 3.3 10.2 3.2C10.1 3.1 10 3.1 9.9 3.2C9.8 3.3 9.8 3.3 9.8 3.4C9.8 3.5 9.8 3.6 9.9 3.7C10 3.9 10.1 4.1 10.1 4.4C10.1 4.4 10 4.5 9.8 4.5C9.8 4.5 9.7 4.5 9.6 4.1C9.6 3.8 9.6 3.3 9.5 3.2C9.5 3.1 9.5 3 9.4 3L9.4 3ZM9 3C9 3 8.9 3.1 8.9 3.2C8.9 3.2 8.8 3.6 8.8 3.6C8.8 3.7 8.9 3.7 9 3.6C9.1 3.4 9.1 3.3 9.1 3.2C9.1 3.1 9 3 9 3ZM10.5 3.1C10.5 3.1 10.4 3.1 10.4 3.2C10.4 3.3 10.4 3.4 10.4 3.5C10.5 3.6 10.6 3.7 10.6 3.7C10.9 4.1 11.1 4.4 11.4 4.8C11.4 5.1 11.4 5.3 11.4 5.6C11.5 6.2 11.5 6.9 11.5 7.5C11.6 7.5 11.7 7.3 11.8 7.1C11.8 6.7 11.8 6 11.8 5.7L11.8 5.4C12.1 5.9 12.3 6.4 12.6 6.9C12.7 6.9 12.7 6.3 12.6 6.2C12.4 5.8 12.1 5.3 12 5.2C12 5.1 11.9 4.9 11.7 4.7C11.7 4.4 11.7 4.2 11.6 4.1C11.6 3.8 11.8 4.1 11.8 4C11.7 3.7 11.5 3.5 11.3 3.2C11.3 3.1 11.3 3.1 11.2 3.2C11.1 3.3 11.1 3.4 11.1 3.6C11.1 3.5 11.1 3.5 11 3.4L10.7 3.1C10.7 3.1 10.6 3.1 10.5 3.1ZM14.9 3.1C14.9 3.1 14.9 3.1 14.9 3.2C14.8 3.2 14.8 3.3 14.8 3.4C14.8 3.5 14.8 3.7 14.8 3.8L14.8 3.9C14.8 3.9 14.8 3.9 14.8 3.9C14.5 3.5 14.9 3.8 14.7 3.5C14.6 3.4 14.5 3.3 14.4 3.2C14.3 3.1 14.2 3 14.2 3.2C14.2 3.3 14.2 3.5 14.2 3.6C14.2 3.7 14.3 3.8 14.3 3.9C14.5 4.1 14.8 4.4 15 4.7C15 5.3 15 5.8 15.1 6.4C15.1 6.6 15 7 14.9 7C14.9 7 14.8 7.1 14.7 7C14.7 7 14.5 6.6 14.5 6.6C14.4 6.5 14.3 6.6 14.2 6.6C14 6.8 13.9 7.2 13.7 7.5C13.7 7.6 13.6 7.6 13.5 7.5C13.2 7.1 13.3 6.5 13.3 6.6C13 6.9 13.2 7.4 13.2 7.6C13.3 7.7 13.4 7.8 13.6 7.9C13.7 8 13.8 8 13.9 7.9C14.1 7.7 14.1 7.3 14.1 7.2C14.2 7.1 14.3 7.1 14.4 7.2C14.4 7.3 14.5 7.3 14.6 7.4C14.8 7.5 14.9 7.5 15.1 7.4C15.2 7.3 15.3 7.2 15.4 7.1C15.4 6.9 15.4 5.8 15.4 5.3L15.7 5.7C15.8 6.2 15.8 6.7 15.8 7.2C15.8 7.3 16.1 6.9 16.1 6.8C16.1 6.6 16.1 6.5 16.1 6.3C16.3 6.6 16.4 6.9 16.6 7.1C16.7 7.1 16.7 6.6 16.6 6.5C16.4 6.2 16.2 5.9 16.1 5.7C16 5.4 16 5.1 16 5C15.9 4.8 15.9 4.6 15.9 4.4C15.9 4.3 15.8 4.1 15.8 4.1C15.8 4 15.9 4.1 16 4C16 3.9 15.8 3.3 15.7 3.2C15.6 3.1 15.5 3.1 15.4 3.2C15.3 3.3 15.4 3.5 15.4 3.7C15.5 4.1 15.6 4.6 15.6 5.1C15.5 4.9 15.4 4.7 15.2 4.5L15.2 4.4C15.2 4.4 15.2 4 15.2 3.9C15.2 3.9 15.2 3.9 15.2 3.9C15.3 3.9 15.3 3.9 15.3 4C15.3 4 15.4 3.9 15.3 3.8L15 3.1C15 3.1 14.9 3.1 14.9 3.1L14.9 3.1ZM3.5 3.1C3.4 3.1 3.4 3.2 3.4 3.2C3.4 3.3 3.5 3.4 3.6 3.5C3.6 3.6 3.5 3.8 3.6 3.8C3.6 3.8 3.7 3.7 3.7 3.5C3.7 3.4 3.7 3.2 3.5 3.1C3.5 3.1 3.5 3.1 3.5 3.1L3.5 3.1ZM16.5 3.1C16.5 3.1 16.5 3.2 16.5 3.2C16.4 3.3 16.4 3.5 16.4 3.7C16.6 4.8 16.7 5.9 16.7 6.9C16.7 7 16.7 7.1 16.6 7.2C16.5 7.3 16.4 7.5 16.3 7.6C16.2 7.6 16 7.7 15.9 7.8C15.7 7.9 15.7 8.1 15.9 8.1C16.2 8 16.6 8 16.8 7.6C16.9 7.5 17 7.2 17 7C17 6 17 4.9 16.8 4.2C16.8 4.1 16.8 3.9 16.8 3.9C16.8 3.8 16.9 3.9 16.9 3.8C17 3.8 16.7 3.4 16.6 3.2C16.5 3.2 16.5 3.1 16.5 3.1L16.5 3.1ZM13.2 3.1C13.2 3.1 13.2 3.2 13.1 3.2C13 3.5 13 3.7 13.1 3.9C13.3 5.1 13.5 6.2 13.5 7.3C13.6 7.3 13.7 7.1 13.8 6.8C13.8 6.5 13.7 6.3 13.7 6.1C13.7 5.9 13.5 4.3 13.5 4.1C13.4 3.8 13.7 4.1 13.6 3.9C13.6 3.7 13.3 3.4 13.3 3.2C13.2 3.2 13.2 3.1 13.2 3.1L13.2 3.1ZM5.1 3.2C5.1 3.2 5.1 3.2 5.1 3.2C5.1 3.3 5.1 3.3 5.1 3.3C5.1 3.3 5 3.3 5 3.2C5 3.2 5 3.2 5 3.2C5 3.2 5 3.2 4.9 3.2C4.9 3.2 4.9 3.2 4.9 3.2C4.9 3.2 4.9 3.2 4.9 3.3C4.9 3.3 4.9 3.3 4.9 3.3C4.9 3.3 4.9 3.3 4.8 3.3C4.8 3.3 4.8 3.3 4.8 3.3C4.8 3.2 4.8 3.2 4.8 3.2C4.8 3.2 4.8 3.2 4.8 3.2C4.7 3.2 4.7 3.3 4.7 3.3C4.7 3.3 4.7 3.5 4.8 3.5C4.9 3.6 5.2 3.6 5.2 3.3C5.2 3.3 5.2 3.2 5.2 3.2C5.2 3.2 5.2 3.2 5.1 3.2L5.1 3.2ZM7.2 3.2C7.2 3.2 7.1 3.2 7.1 3.2C7 3.3 6.9 3.5 7 3.6C7.1 3.6 7.2 3.7 7.1 3.7C6.9 4 6.3 4.3 6.3 4.4V4.4H6.3V4.4C6.3 4.5 6.7 4.5 6.7 4.4H6.7C6.9 4.4 7.5 3.7 7.5 3.7C7.4 3.7 7.4 3.7 7.4 3.6C7.3 3.6 7.3 3.6 7.4 3.6C7.5 3.5 7.5 3.3 7.4 3.2C7.3 3.2 7.3 3.2 7.2 3.2V3.2ZM12.6 3.2C12.6 3.2 12.6 3.2 12.6 3.3C12.5 3.4 12.4 3.6 12.4 3.8C12.6 4.8 12.6 5.7 12.7 6.8C12.8 6.9 12.7 7 12.7 7.1C12.4 7.3 12.1 7.6 11.7 7.8C11.6 7.8 11.8 8 12 8C12.3 8 12.6 7.8 12.8 7.4C12.9 7.2 13 7 13 6.8C13 5.8 13 4.9 12.8 4.2C12.8 4.1 12.8 4 12.8 4C12.8 4 12.9 4 12.9 3.9C13 3.9 12.8 3.4 12.7 3.2C12.7 3.2 12.6 3.2 12.6 3.2ZM4.2 3.2C4.2 3.2 4.2 3.2 4.1 3.3C4.1 3.5 4.1 3.6 4.2 3.8C4.2 4 4.2 4.3 4.3 4.6C4.3 4.9 4.1 4.7 4.1 4.5C4.1 4.3 4.1 3.9 4.1 3.8C4 3.7 4 3.7 3.9 3.7C3.8 3.7 3.7 3.9 3.6 4.2C3.6 4.2 3.6 4.4 3.5 4.6C3.5 4.7 3.4 4.9 3.3 4.5C3.3 4.3 3.2 3.8 3.1 3.9C3.1 4.3 3 5.1 3.4 5.2C3.9 5.2 3.6 4.4 3.8 4.3C3.8 4.2 3.9 4.2 3.9 4.3V5C3.9 5.2 4 5.3 4.1 5.3C4.2 5.3 4.3 5.3 4.4 5.4L4.4 6.6C4.4 6.6 4.7 6.7 4.7 5.9C4.7 5.5 4.6 5.1 4.7 5C4.7 5 4.8 5 4.9 5C5 5.1 5 5.2 5.2 5.1C5.5 5.1 5.7 4.9 5.7 4.7C5.6 4.5 5.6 4.3 5.5 4.1C5.5 4.1 5.5 4 5.5 3.9C5.5 4 5.6 4 5.6 3.9C5.6 3.8 5.5 3.6 5.4 3.6C5.3 3.5 5.2 3.5 5.1 3.7C5.1 3.9 5.2 4.1 5.3 4.3C5.4 4.4 5.4 4.5 5.4 4.7C5.3 4.7 5.2 4.7 5.2 4.6C5.2 4.6 4.9 4.5 4.9 4.4C5 4 4.9 4 4.9 3.9C4.9 3.7 4.8 3.7 4.8 3.6C4.7 3.5 4.6 3.5 4.6 3.6C4.5 3.8 4.5 4.1 4.6 4.3C4.7 4.4 4.7 4.5 4.7 4.5C4.7 4.6 4.6 4.6 4.6 4.5C4.5 4.3 4.5 4 4.5 3.9C4.5 3.7 4.5 3.3 4.3 3.2C4.3 3.2 4.3 3.2 4.2 3.2L4.2 3.2ZM5.8 3.2C5.8 3.2 5.8 3.2 5.7 3.2C5.7 3.3 5.6 3.3 5.6 3.5C5.7 4.2 5.8 4.7 5.9 5.4C5.9 5.5 5.8 5.6 5.8 5.6C5.6 5.5 5.6 5.3 5.3 5.3C5.1 5.3 4.9 5.5 4.9 5.7C4.9 5.8 4.9 6 4.9 6.1C5 6.3 5.2 6.3 5.3 6.2C5.4 6.2 5.5 6.1 5.6 6.1C5.6 6.1 5.6 6.5 5 6.8C4.7 6.9 4.5 7 4.3 6.7C4.2 6.5 4.3 5.9 4.1 6.1C3.5 7.6 5.6 7.9 5.8 6.1C5.8 6.1 5.9 6 5.9 6C5.9 6 5.9 6.1 5.9 6.1C5.9 7.7 4.3 7.8 4.1 7.3C4 7.2 4 6.9 4 6.8C4 6.7 3.9 6.6 3.9 6.6C3.8 6.5 3.8 6.7 3.7 6.9C3.7 7 3.7 7.1 3.7 7.3C3.8 8.5 5.8 8 6.1 6.9C6.3 6.4 6.1 6 6.2 5.9L6.2 5.9H6.2L6.2 5.9C6.4 6.2 6.7 6 6.7 5.9C6.8 5.9 6.8 5.8 6.9 5.9C7 6 7.3 5.9 7.3 5.7C7.4 5.6 7.4 5.4 7.4 5.2C7.3 5.2 7.2 5.2 7.2 5.2C7.2 5.2 7.2 5.3 7.2 5.3L7.2 5.4C7.2 5.4 7.2 5.4 7.2 5.5C7.1 5.5 7.1 5.5 7.1 5.5C7.1 5.5 7 5.5 7 5.4C7 5.2 6.8 5.2 6.7 5.5C6.6 5.6 6.4 5.6 6.4 5.5C6.4 5.3 6.4 5.2 6.2 5.3L6 4C6.1 4 6.1 4.1 6.2 4C6.1 3.8 6 3.3 5.9 3.2H5.9L5.9 3.2C5.9 3.2 5.9 3.2 5.9 3.2L5.9 3.2C5.9 3.2 5.8 3.2 5.8 3.2C5.8 3.2 5.8 3.2 5.8 3.2ZM12 3.2C11.9 3.2 11.8 3.3 11.9 3.4C11.8 3.4 12 3.6 12.1 3.7C12.1 3.8 12 4 12.1 4C12.1 4 12.2 3.9 12.2 3.7C12.3 3.5 12.2 3.3 12 3.2L12 3.2V3.2ZM7.2 3.4C7.2 3.4 7.3 3.4 7.3 3.5C7.3 3.5 7.3 3.5 7.3 3.6C7.2 3.6 7.2 3.5 7.2 3.5C7.1 3.4 7.1 3.4 7.2 3.4H7.2V3.4ZM16.1 3.6C16 3.6 15.9 3.7 16 3.8C16 3.8 16.1 4 16.2 4.1C16.2 4.2 16.1 4.5 16.2 4.5C16.2 4.5 16.3 4.3 16.3 4.1C16.3 4 16.2 3.7 16.1 3.6C16.1 3.6 16.1 3.6 16.1 3.6L16.1 3.6ZM11.2 3.7C11.2 3.8 11.2 3.8 11.2 3.8C11.2 3.9 11.2 3.9 11.2 4C11.2 3.9 11.1 3.9 11.1 3.8C11 3.7 11.1 3.7 11.2 3.7ZM12.3 4.3C12.3 4.3 12.2 4.3 12.2 4.4C12.2 4.4 12.2 4.4 12.2 4.4C12.2 4.4 12.2 4.4 12.2 4.4C12.2 4.3 12.1 4.3 12.1 4.3C12.1 4.3 12.1 4.3 12.1 4.3C12.1 4.3 12.1 4.3 12.1 4.3C12.1 4.3 12.1 4.4 12.1 4.4C12.1 4.4 12 4.4 12 4.4C12 4.4 12 4.4 12 4.4C12 4.4 12 4.4 12 4.4C12 4.4 12 4.3 12 4.3C12 4.3 11.9 4.3 11.9 4.3C11.8 4.3 11.8 4.4 11.8 4.4C11.8 4.4 11.8 4.6 11.9 4.7C12.1 4.7 12.4 4.7 12.4 4.4C12.4 4.4 12.4 4.4 12.4 4.3C12.4 4.3 12.3 4.3 12.3 4.3L12.3 4.3ZM7.1 4.3C7.1 4.3 7.1 4.3 7 4.4C6.9 4.4 6.9 4.7 6.9 4.8C7 4.9 7.1 4.9 7.2 4.9C7.3 4.9 7.4 4.6 7.4 4.6C7.4 4.6 7.4 4.5 7.2 4.7C7.2 4.7 7.1 4.7 7.1 4.6C7.1 4.6 7.1 4.5 7.2 4.4C7.2 4.4 7.2 4.3 7.1 4.3V4.3ZM14.4 4.4C14.4 4.4 14.3 4.4 14.3 4.5C14.3 4.6 14.3 4.6 14.3 4.7C14.3 4.7 14.2 4.7 14.2 4.7C14.2 4.7 14.1 4.6 14.1 4.6C14.1 4.5 14 4.6 13.9 4.6C13.9 4.7 13.9 4.8 13.9 4.9C14 5 14.3 5.3 14.4 5.3C14.4 5.2 14.5 5 14.5 4.8C14.5 4.8 14.5 4.7 14.5 4.7C14.6 4.7 14.6 4.8 14.6 4.7C14.6 4.6 14.6 4.5 14.6 4.4C14.5 4.4 14.5 4.4 14.4 4.4H14.4ZM8.4 4.9L8.4 4.9C8.4 4.9 8.4 4.9 8.4 4.9C8.4 4.9 8.3 4.9 8.3 4.9C8.2 5 8.2 5.1 8.2 5.2C8.2 5.2 8.4 5.6 8.5 5.8C8.5 6.1 8.6 6.4 8.5 6.6C8.4 7 8 7.3 7.7 7.5C7.6 7.5 7.4 7.5 7.4 7.5C7.3 7.4 7.3 7.3 7.3 7.3V7.3C7.6 7.1 7.9 7 8.1 6.4C8.2 6.3 8.2 6.1 8.1 5.8C8.1 5.7 8.1 5.6 8 5.5H8C8 5.5 8.2 5.6 8.2 5.6C8.2 5.4 8.1 5.2 7.9 5.1C7.9 5 7.7 5 7.7 5.1C7.6 5.2 7.5 5.4 7.6 5.5C7.6 5.7 7.8 5.7 7.9 6C7.9 6 7.9 6.1 7.9 6.2C7.8 6.4 7.3 6.8 7.3 6.8L7.2 6.8L7.2 6.8H7.2H7.2V6.8C7.2 6.8 7.2 6.8 7.2 6.7C7.2 6.6 7.3 6.5 7.3 6.4V6.4C7.1 6.5 7 6.9 7 7C6.5 7.3 6 7.5 5.7 7.9C5.6 8.1 6.8 7.6 6.9 7.5L6.9 7.5C7 7.5 7 7.7 7.1 7.7C7.2 7.9 7.4 8 7.7 8C8.1 7.8 8.4 7.5 8.6 7.2C8.7 7.1 8.7 7.1 8.8 7.1C9 7.5 9.5 7.8 10.1 7.8C10.3 7.6 10.2 7.5 10.1 7.5C10.1 7.5 9.8 7.4 9.8 7.3C9.7 7.1 9.8 7 10 7C10.4 6.9 10.8 6.9 11.2 6.7C11.2 6.6 11.3 6.4 11.3 6.3C11.4 6.3 11.4 6.2 11.4 6.2V6.2H11.4V6.2V6.2L11.3 6.2L10 6.2C10 6.2 10 6.2 10 6.2L10 6.2C10 6.2 9.9 6.2 9.9 6.2C9.9 6.1 9.9 6.1 9.9 6.1V6.1V6.1V6.1L9.9 6.1C10 6.1 10 6.1 10 6.1C10.3 6.1 10.9 6 10.9 5.4C10.9 5.1 10.8 5 10.4 4.9C10.2 4.9 10 5.2 10 5.4C10 5.5 10.1 5.7 10 5.7C9.5 5.7 9 6 8.9 6.3H8.9H8.9H8.9C8.9 6.3 8.9 6.3 8.9 6.3H8.9H8.9H8.9C8.9 6.2 8.8 6.2 8.8 6.1C8.8 5.7 8.7 5.3 8.5 5C8.4 4.9 8.4 4.9 8.4 4.9H8.4H8.4H8.4ZM9.7 5.1C9.6 5.1 9.6 5.1 9.6 5.1C9.6 5.2 9.6 5.2 9.6 5.2C9.6 5.2 9.5 5.2 9.5 5.2C9.5 5.1 9.5 5.1 9.5 5.1C9.5 5.1 9.5 5.1 9.5 5.1C9.4 5.1 9.4 5.1 9.4 5.1C9.4 5.1 9.4 5.2 9.4 5.2C9.4 5.2 9.4 5.2 9.4 5.2C9.4 5.2 9.4 5.2 9.4 5.2C9.4 5.2 9.3 5.2 9.3 5.2C9.3 5.1 9.3 5.1 9.3 5.1C9.3 5.1 9.3 5.1 9.3 5.1C9.2 5.1 9.2 5.2 9.2 5.2C9.2 5.2 9.2 5.4 9.3 5.4C9.5 5.5 9.8 5.5 9.7 5.2C9.7 5.2 9.7 5.1 9.7 5.1C9.7 5.1 9.7 5.1 9.7 5.1L9.7 5.1ZM14.8 5.3H14.8C14.8 5.3 14.1 5.8 14.1 5.8C14 5.9 14.1 6.1 14.1 6.1C14.1 6.1 14.9 5.6 14.8 5.5C14.9 5.6 14.9 5.3 14.8 5.3L14.8 5.3ZM10.3 5.4C10.4 5.4 10.4 5.4 10.4 5.4C10.5 5.4 10.5 5.5 10.5 5.5V5.5C10.5 5.5 10.5 5.5 10.5 5.5V5.5C10.5 5.5 10.5 5.5 10.5 5.5C10.5 5.5 10.5 5.5 10.5 5.5C10.5 5.6 10.4 5.5 10.4 5.5C10.3 5.5 10.3 5.4 10.3 5.4V5.4L10.3 5.4C10.3 5.4 10.3 5.4 10.3 5.4L10.3 5.4C10.3 5.4 10.3 5.4 10.3 5.4V5.4ZM4.1 5.5C3.7 5.5 3.2 6 3.2 6.2L4.3 5.7C4.3 5.6 4.3 5.5 4.1 5.5ZM5.3 5.7C5.3 5.7 5.4 5.7 5.4 5.7C5.4 5.8 5.4 5.8 5.4 5.8V5.9C5.3 5.9 5.3 5.9 5.2 5.9C5.2 5.9 5.2 5.9 5.1 5.8C5.1 5.8 5.2 5.7 5.2 5.7L5.2 5.7C5.2 5.7 5.2 5.7 5.3 5.7L5.3 5.7L5.3 5.7ZM14.7 5.8C14.6 5.8 14.6 5.9 14.6 6C14.6 6 14.7 6.2 14.7 6.3C14.7 6.4 14.7 6.6 14.7 6.7C14.8 6.7 14.9 6.5 14.9 6.3C14.9 6.2 14.9 5.9 14.7 5.8C14.7 5.8 14.7 5.8 14.7 5.8ZM6.7 6.2C6.6 6.2 6.6 6.2 6.6 6.3C6.6 6.3 6.8 6.4 6.8 6.6C6.8 6.6 6.7 6.8 6.8 6.8C6.8 6.8 6.9 6.7 6.9 6.6C6.9 6.5 6.9 6.2 6.8 6.2C6.7 6.2 6.7 6.2 6.7 6.2L6.7 6.2ZM9.1 6.5H9.1C9.3 6.5 9.5 6.5 9.7 6.6C9.8 6.6 9.9 6.7 9.8 6.7C9.6 6.8 9.5 6.8 9.5 7C9.5 7.1 9.5 7.2 9.5 7.2C9.5 7.2 9.5 7.2 9.5 7.2C9.5 7.2 9.5 7.2 9.5 7.2V7.2H9.5L9.5 7.2H9.4C9.4 7.2 9.4 7.2 9.3 7.2C9.2 7.1 9 7 8.9 6.6C8.9 6.6 9 6.5 9.1 6.5L9.1 6.5ZM3.2 6.7C3.2 6.7 3.2 6.8 3.2 6.8C3 7.2 3 7.7 3.1 7.8C3.1 7.9 3.2 7.9 3.3 7.9C3.5 7.9 3.5 7.6 3.5 7.5C3.4 7.4 3.4 7.4 3.4 7.5C3.3 7.7 3.2 7.5 3.2 7.4C3.2 7.2 3.2 7 3.2 6.9C3.3 6.8 3.3 6.7 3.2 6.7L3.2 6.7ZM10.8 7.2C10.7 7.2 10.7 7.2 10.7 7.2C10.7 7.2 10.5 7.3 10.5 7.4C10.5 7.4 10.5 7.4 10.5 7.5C10.5 7.5 10.5 7.5 10.6 7.5C10.7 7.5 10.7 7.5 10.7 7.6C10.6 7.7 10.7 7.7 10.7 7.7C10.7 7.7 10.7 7.8 10.8 7.8C11 7.7 11.1 7.6 11.3 7.6C11.3 7.6 11.3 7.4 11.2 7.4C11.1 7.4 11 7.5 10.9 7.5C10.8 7.6 10.8 7.5 10.8 7.5C10.8 7.4 10.8 7.3 10.8 7.2C10.8 7.2 10.8 7.2 10.7 7.2L10.8 7.2ZM15.6 7.4L15.5 7.4C15.4 7.4 15.4 7.4 15.4 7.5C15.4 7.6 15.4 7.6 15.5 7.6C15.5 7.6 15.5 7.7 15.5 7.7C15.4 7.8 15.4 7.8 15.4 7.9C15.3 7.9 15.3 8 15.4 8C15.5 8 15.8 7.8 15.8 7.8C15.9 7.8 15.9 7.7 15.9 7.7C15.8 7.7 15.8 7.7 15.7 7.7C15.7 7.7 15.6 7.7 15.7 7.6C15.7 7.6 15.7 7.5 15.7 7.5C15.7 7.5 15.7 7.4 15.6 7.4C15.6 7.4 15.6 7.4 15.6 7.4H15.6Z" fill="white"/><path d="M15.5 9.9H15.3L14.2 9.9V9.6C14.2 9.5 14.1 9.4 14 9.4C13.9 9.4 13.8 9.5 13.8 9.6V9.9L3.9 9.9C4.3 10.4 5 10.6 5.6 10.6C6 10.6 11 10.6 13.8 10.6V11.1C13.8 11.3 13.9 11.4 14 11.4H15.5C15.8 11.4 16.1 11.1 16.1 10.6C16.1 10.2 15.8 9.9 15.5 9.9ZM15.5 10.9L14.2 10.9V10.6C15.1 10.6 15.7 10.6 15.7 10.6L15.7 10.5C15.7 10.5 15.7 10.6 15.7 10.6C15.7 10.8 15.6 10.9 15.5 10.9Z" fill="white"/></svg>',Ln=`data:image/svg+xml,${encodeURIComponent(qn)}`,Qa={lat:24.7136,lon:46.6753,ar:"الرياض",en:"Riyadh"},Xs="dga-top-bar.geo-prompt",Pn={clear:{ar:"صافٍ",en:"Clear",icon:"sun",nightIcon:"moon"},mainlyClear:{ar:"صافٍ غالباً",en:"Mainly clear",icon:"sunCloud",nightIcon:"moonCloud"},partlyCloudy:{ar:"غائم جزئياً",en:"Partly cloudy",icon:"sunCloud",nightIcon:"moonCloud"},cloudy:{ar:"غائم",en:"Cloudy",icon:"cloud"},fog:{ar:"ضباب",en:"Fog",icon:"cloud"},drizzle:{ar:"رذاذ",en:"Drizzle",icon:"rain"},rain:{ar:"ممطر",en:"Rain",icon:"rain"},snow:{ar:"ثلج",en:"Snow",icon:"snow"},storm:{ar:"عاصفة رعدية",en:"Thunderstorm",icon:"rainZap"}};function zn(d){return d.toLowerCase().split("-")[0]==="ar"?Qa.ar:Qa.en}function Fn(d,e,a){const s=Rn(d),r=Pn[s],l=a.toLowerCase().split("-")[0]==="ar";return{icon:!e&&r.nightIcon?r.nightIcon:r.icon,label:l?r.ar:r.en}}function Rn(d){return d===0?"clear":d===1?"mainlyClear":d===2?"partlyCloudy":d===3?"cloudy":d===45||d===48?"fog":d>=51&&d<=57?"drizzle":d>=61&&d<=67||d>=80&&d<=82?"rain":d>=71&&d<=77||d>=85&&d<=86?"snow":d>=95?"storm":"cloudy"}async function On(d,e,a){const s=new URL("https://api.open-meteo.com/v1/forecast");s.searchParams.set("latitude",String(d)),s.searchParams.set("longitude",String(e)),s.searchParams.set("current","weather_code,is_day"),s.searchParams.set("timezone","Asia/Riyadh");const r=await Zs(s,a),l=r?.current?.weather_code;return l==null||Number.isNaN(Number(l))?null:{code:Number(l),isDay:r?.current?.is_day!==0}}async function Tn(d,e,a,s){const r=new URL("https://api.bigdatacloud.net/data/reverse-geocode-client");r.searchParams.set("latitude",String(d)),r.searchParams.set("longitude",String(e)),r.searchParams.set("localityLanguage",a.toLowerCase().split("-")[0]==="ar"?"ar":"en");const l=await Zs(r,s);return l?.city?.trim()||l?.locality?.trim()||l?.principalSubdivision?.trim()||null}async function Zs(d,e){try{const a=await fetch(d,{signal:e,credentials:"omit"});return a.ok?await a.json():null}catch{return null}}const An="inline-flex h-full shrink-0 cursor-pointer items-center gap-xs rounded-sm px-xs text-body-sm font-medium leading-[22px] text-fg whitespace-nowrap hover:bg-neutral-light focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",Vn="inline-flex h-full shrink-0 items-center gap-xs rounded-sm px-xs text-body-sm font-medium leading-[22px] text-fg whitespace-nowrap",En={ar:["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الآخرة","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة"],en:["Muharram","Safar","Rabi al-Awwal","Rabi al-Thani","Jumada al-Ula","Jumada al-Akhirah","Rajab","Shaban","Ramadan","Shawwal","Dhu al-Qadah","Dhu al-Hijjah"]},$n={ar:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],en:["January","February","March","April","May","June","July","August","September","October","November","December"]},Js={ar:{regionLabel:"شريط الهوية الحكومية",stampLabel:"ختم الحكومة الرقمية",tabTextLg:"موقع حكومي مسجّل لدى هيئة الحكومة الرقمية.",tabTextSm:"موقع حكومي مسجّل لدى هيئة الحكومة الرقمية",verifyText:"كيف تتحقق؟",registrationLabel:"مسجّل لدى هيئة الحكومة الرقمية برقم:",locationAllowTitle:"السماح بالوصول إلى الموقع",locationAllowBody:"لعرض حالة الطقس واسم مدينتك نحتاج إلى إذن موقعك. يمكنك الرفض وسيُعرض طقس الرياض افتراضياً.",locationAllow:"السماح",locationNotNow:"ليس الآن",locationClose:"إغلاق",locationTooltip:"السماح بالوصول إلى الموقع لعرض الطقس في مدينتك",locationDeniedTooltip:"تم رفض إذن الموقع. يُعرض طقس الرياض.",locationRefreshTooltip:"تحديث الموقع الحالي",weatherLabel:"حالة الطقس",notices:[{icon:"link",title:"الروابط الرسمية تنتهي بـ gov.sa",highlight:"gov.sa",body:"تنتمي المواقع الإلكترونية الرسمية للجهات الحكومية في المملكة العربية السعودية إلى النطاق gov.sa."},{icon:"lock",title:"المواقع الحكومية تستخدم بروتوكول HTTPS للتشفير",highlight:"HTTPS",body:"تستخدم المواقع الرسمية للجهات الحكومية في المملكة العربية السعودية بروتوكول HTTPS للتشفير."}]},en:{regionLabel:"Government identity bar",stampLabel:"Digital government stamp",tabTextLg:"A government website registered with the Digital Government Authority.",tabTextSm:"A government website registered with the Digital Government Authority",verifyText:"How to verify?",registrationLabel:"Registered with the Digital Government Authority under number:",locationAllowTitle:"Allow location access",locationAllowBody:"We use your location to show local weather and your city name. You can decline and we’ll show Riyadh weather instead.",locationAllow:"Allow",locationNotNow:"Not now",locationClose:"Close",locationTooltip:"Allow location access to show weather in your city",locationDeniedTooltip:"Location permission denied. Showing Riyadh weather.",locationRefreshTooltip:"Refresh current location",weatherLabel:"Weather",notices:[{icon:"link",title:"Official links end with gov.sa",highlight:"gov.sa",body:"Official websites of government entities in the Kingdom of Saudi Arabia belong to the gov.sa domain."},{icon:"lock",title:"Government websites use the HTTPS protocol for encryption",highlight:"HTTPS",body:"Official websites of government entities in the Kingdom of Saudi Arabia use the HTTPS protocol for encryption."}]}};function Pe(d){return d.toLowerCase().split("-")[0]==="ar"}function Bn(d){return Pe(d)?Js.ar:Js.en}const jn=An,Hn=Vn;class ua{destroyRef=x(L);clockTimer=null;weatherAbort=null;saFlagSrc=Ln;clusterBtn=jn;clusterStatic=Hn;panelId="dga-digital-stamp";open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);calendar=S("hijri",...ngDevMode?[{debugName:"calendar"}]:[]);timeFormat=S("12",...ngDevMode?[{debugName:"timeFormat"}]:[]);showDate=i(!0,...ngDevMode?[{debugName:"showDate"}]:[]);showTime=i(!0,...ngDevMode?[{debugName:"showTime"}]:[]);showWeather=i(!0,...ngDevMode?[{debugName:"showWeather"}]:[]);showLocation=i(!0,...ngDevMode?[{debugName:"showLocation"}]:[]);autoRequestLocation=i(!0,...ngDevMode?[{debugName:"autoRequestLocation"}]:[]);locale=i("ar",...ngDevMode?[{debugName:"locale"}]:[]);regionLabel=i(...ngDevMode?[void 0,{debugName:"regionLabel"}]:[]);stampLabel=i(...ngDevMode?[void 0,{debugName:"stampLabel"}]:[]);tabTextLg=i(...ngDevMode?[void 0,{debugName:"tabTextLg"}]:[]);tabTextSm=i(...ngDevMode?[void 0,{debugName:"tabTextSm"}]:[]);verifyText=i(...ngDevMode?[void 0,{debugName:"verifyText"}]:[]);registrationLabel=i(...ngDevMode?[void 0,{debugName:"registrationLabel"}]:[]);registrationId=i("",...ngDevMode?[{debugName:"registrationId"}]:[]);registrationHref=i("#",...ngDevMode?[{debugName:"registrationHref"}]:[]);notices=i(...ngDevMode?[void 0,{debugName:"notices"}]:[]);now=y(new Date,...ngDevMode?[{debugName:"now"}]:[]);defaults=n(()=>Bn(this.locale()),...ngDevMode?[{debugName:"defaults"}]:[]);locationPromptOpen=y(!1,...ngDevMode?[{debugName:"locationPromptOpen"}]:[]);geoDenied=y(!1,...ngDevMode?[{debugName:"geoDenied"}]:[]);geoGranted=y(!1,...ngDevMode?[{debugName:"geoGranted"}]:[]);coords=y({lat:Qa.lat,lon:Qa.lon},...ngDevMode?[{debugName:"coords"}]:[]);weatherSnap=y(null,...ngDevMode?[{debugName:"weatherSnap"}]:[]);resolvedCity=y(null,...ngDevMode?[{debugName:"resolvedCity"}]:[]);weather=n(()=>{const e=this.weatherSnap();return e?Fn(e.code,e.isDay,this.locale()):null},...ngDevMode?[{debugName:"weather"}]:[]);resolvedRegionLabel=n(()=>this.regionLabel()??this.defaults().regionLabel,...ngDevMode?[{debugName:"resolvedRegionLabel"}]:[]);resolvedStampLabel=n(()=>this.stampLabel()??this.defaults().stampLabel,...ngDevMode?[{debugName:"resolvedStampLabel"}]:[]);resolvedTabTextLg=n(()=>this.tabTextLg()??this.defaults().tabTextLg,...ngDevMode?[{debugName:"resolvedTabTextLg"}]:[]);resolvedTabTextSm=n(()=>this.tabTextSm()??this.defaults().tabTextSm,...ngDevMode?[{debugName:"resolvedTabTextSm"}]:[]);resolvedVerifyText=n(()=>this.verifyText()??this.defaults().verifyText,...ngDevMode?[{debugName:"resolvedVerifyText"}]:[]);resolvedRegistrationLabel=n(()=>this.registrationLabel()??this.defaults().registrationLabel,...ngDevMode?[{debugName:"resolvedRegistrationLabel"}]:[]);resolvedNotices=n(()=>this.notices()??[...this.defaults().notices],...ngDevMode?[{debugName:"resolvedNotices"}]:[]);dateLabel=n(()=>this.calendar()==="hijri"?Kn(this.now(),this.locale()):Wn(this.now(),this.locale()),...ngDevMode?[{debugName:"dateLabel"}]:[]);timeLabel=n(()=>Yn(this.now(),this.locale(),this.timeFormat()),...ngDevMode?[{debugName:"timeLabel"}]:[]);cityLabel=n(()=>this.resolvedCity()??zn(this.locale()),...ngDevMode?[{debugName:"cityLabel"}]:[]);weatherAriaLabel=n(()=>{const e=this.weather(),a=this.defaults().weatherLabel;return e?`${a}: ${e.label}`:a},...ngDevMode?[{debugName:"weatherAriaLabel"}]:[]);locationTooltip=n(()=>this.geoDenied()?this.defaults().locationDeniedTooltip:this.geoGranted()?this.defaults().locationRefreshTooltip:this.defaults().locationTooltip,...ngDevMode?[{debugName:"locationTooltip"}]:[]);calendarToggleLabel=n(()=>{const e=Pe(this.locale());return this.calendar()==="hijri"?e?"التبديل إلى التقويم الميلادي":"Switch to Gregorian calendar":e?"التبديل إلى التقويم الهجري":"Switch to Hijri calendar"},...ngDevMode?[{debugName:"calendarToggleLabel"}]:[]);timeToggleLabel=n(()=>{const e=Pe(this.locale());return this.timeFormat()==="12"?e?"التبديل إلى تنسيق 24 ساعة":"Switch to 24-hour format":e?"التبديل إلى تنسيق 12 ساعة":"Switch to 12-hour format"},...ngDevMode?[{debugName:"timeToggleLabel"}]:[]);hostClasses=n(()=>f("block max-w-full min-w-0 border-b border-border-subtle bg-topbar font-sans text-fg",this.locationPromptOpen()?"overflow-visible":"overflow-x-clip"),...ngDevMode?[{debugName:"hostClasses"}]:[]);constructor(){O(()=>{this.bindClock(),this.bindWeatherAndLocation()})}bindClock(){this.tick(),this.scheduleMinuteTick();const e=()=>{document.hidden||(this.tick(),this.scheduleMinuteTick())};document.addEventListener("visibilitychange",e),this.destroyRef.onDestroy(()=>{document.removeEventListener("visibilitychange",e),this.clearClock(),this.weatherAbort?.abort()})}bindWeatherAndLocation(){!this.showWeather()&&!this.showLocation()||(this.refreshPlace(this.coords().lat,this.coords().lon,!1),this.syncGeolocation())}async syncGeolocation(){if(!this.showLocation()&&!this.showWeather()||typeof navigator>"u"||!navigator.geolocation)return;const e=await Un();if(e==="granted"){this.requestBrowserLocation();return}if(e==="denied"){this.geoDenied.set(!0);return}this.autoRequestLocation()&&!Gn()&&this.locationPromptOpen.set(!0)}onLocationClick(){if(this.geoGranted()){this.requestBrowserLocation();return}this.geoDenied()||this.locationPromptOpen.set(!0)}allowLocation(){this.locationPromptOpen.set(!1),ei(),this.requestBrowserLocation()}dismissLocationPrompt(){this.locationPromptOpen.set(!1),ei()}requestBrowserLocation(){typeof navigator>"u"||!navigator.geolocation||navigator.geolocation.getCurrentPosition(e=>{this.geoGranted.set(!0),this.geoDenied.set(!1),this.refreshPlace(e.coords.latitude,e.coords.longitude,!0)},e=>{e.code===1&&this.geoDenied.set(!0),this.geoGranted.set(!1)},{enableHighAccuracy:!1,timeout:1e4,maximumAge:600*1e3})}async refreshPlace(e,a,s){this.coords.set({lat:e,lon:a}),this.weatherAbort?.abort();const r=new AbortController;this.weatherAbort=r;const l=this.locale(),[u,o]=await Promise.all([this.showWeather()?On(e,a,r.signal):Promise.resolve(null),s&&this.showLocation()?Tn(e,a,l,r.signal):Promise.resolve(null)]);r.signal.aborted||(u&&this.weatherSnap.set(u),o&&this.resolvedCity.set(o))}tick(){this.now.set(new Date)}clearClock(){this.clockTimer!=null&&(clearTimeout(this.clockTimer),this.clockTimer=null)}scheduleMinuteTick(){if(this.clearClock(),document.hidden)return;const e=new Date,a=(60-e.getSeconds())*1e3-e.getMilliseconds();this.clockTimer=setTimeout(()=>{this.tick(),this.scheduleMinuteTick()},Math.max(a,250))}titleParts(e){const a=e.highlight?.trim();if(!a)return[{text:e.title,hl:!1}];const s=e.title.indexOf(a);if(s<0)return[{text:e.title,hl:!1}];const r=[];return s>0&&r.push({text:e.title.slice(0,s),hl:!1}),r.push({text:a,hl:!0}),s+a.length<e.title.length&&r.push({text:e.title.slice(s+a.length),hl:!1}),r}toggle(){this.open.update(e=>!e)}toggleCalendar(){this.calendar.update(e=>e==="hijri"?"gregorian":"hijri")}toggleTimeFormat(){this.timeFormat.update(e=>e==="12"?"24":"12")}safeHref(e){return K(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ua,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:ua,isStandalone:!0,selector:"dga-top-bar",inputs:{open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},calendar:{classPropertyName:"calendar",publicName:"calendar",isSignal:!0,isRequired:!1,transformFunction:null},timeFormat:{classPropertyName:"timeFormat",publicName:"timeFormat",isSignal:!0,isRequired:!1,transformFunction:null},showDate:{classPropertyName:"showDate",publicName:"showDate",isSignal:!0,isRequired:!1,transformFunction:null},showTime:{classPropertyName:"showTime",publicName:"showTime",isSignal:!0,isRequired:!1,transformFunction:null},showWeather:{classPropertyName:"showWeather",publicName:"showWeather",isSignal:!0,isRequired:!1,transformFunction:null},showLocation:{classPropertyName:"showLocation",publicName:"showLocation",isSignal:!0,isRequired:!1,transformFunction:null},autoRequestLocation:{classPropertyName:"autoRequestLocation",publicName:"autoRequestLocation",isSignal:!0,isRequired:!1,transformFunction:null},locale:{classPropertyName:"locale",publicName:"locale",isSignal:!0,isRequired:!1,transformFunction:null},regionLabel:{classPropertyName:"regionLabel",publicName:"regionLabel",isSignal:!0,isRequired:!1,transformFunction:null},stampLabel:{classPropertyName:"stampLabel",publicName:"stampLabel",isSignal:!0,isRequired:!1,transformFunction:null},tabTextLg:{classPropertyName:"tabTextLg",publicName:"tabTextLg",isSignal:!0,isRequired:!1,transformFunction:null},tabTextSm:{classPropertyName:"tabTextSm",publicName:"tabTextSm",isSignal:!0,isRequired:!1,transformFunction:null},verifyText:{classPropertyName:"verifyText",publicName:"verifyText",isSignal:!0,isRequired:!1,transformFunction:null},registrationLabel:{classPropertyName:"registrationLabel",publicName:"registrationLabel",isSignal:!0,isRequired:!1,transformFunction:null},registrationId:{classPropertyName:"registrationId",publicName:"registrationId",isSignal:!0,isRequired:!1,transformFunction:null},registrationHref:{classPropertyName:"registrationHref",publicName:"registrationHref",isSignal:!0,isRequired:!1,transformFunction:null},notices:{classPropertyName:"notices",publicName:"notices",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",calendar:"calendarChange",timeFormat:"timeFormatChange"},host:{properties:{class:"hostClasses()","attr.data-open":"open() || null","attr.data-calendar":"calendar()","attr.data-time-format":"timeFormat()","attr.data-city":"cityLabel()","attr.data-weather":"weather()?.label || null"}},ngImport:t,template:`
|
|
7671
|
+
`,changeDetection:h.OnPush,host:{class:"block w-full","[attr.data-appearance]":"appearance()"},styles:[":host{display:block;width:100%}:host([data-appearance=\"viewport\"]){display:block;width:100%;height:100dvh;max-height:100dvh;overflow:hidden}.dga-app-shell__layout{display:flex;flex-direction:column;align-items:stretch;width:100%;min-width:0}.dga-app-shell__layout--content{gap:var(--dga-space-xl, 1.5rem)}.dga-app-shell__layout--viewport{height:100%;min-height:0;gap:0;background:var(--dga-bg-body, var(--dga-color-neutral-50))}.dga-app-shell__nav{display:flex;flex-direction:column;flex:0 0 auto;min-width:0;min-height:0}.dga-app-shell__nav--viewport{background:var(--dga-bg-nav, var(--dga-bg-surface, var(--dga-bg-default)));border-inline-end:1px solid var(--dga-border-neutral-subtle, var(--dga-divider, #e5e7eb));color:var(--dga-text-default)}.dga-app-shell__brand,.dga-app-shell__nav-foot,.dga-app-shell__header{flex:0 0 auto}.dga-app-shell__brand:empty,.dga-app-shell__nav-foot:empty,.dga-app-shell__header:empty{display:none}.dga-app-shell__nav-body{flex:1 1 auto;min-height:0;overflow:auto}.dga-app-shell__main{display:flex;flex-direction:column;flex:1 1 auto;min-width:0;width:100%}.dga-app-shell__main--content{gap:var(--dga-space-5xl, 3rem)}.dga-app-shell__main--viewport{min-height:0;height:auto;overflow:hidden}.dga-app-shell__body--content{display:flex;flex-direction:column;gap:var(--dga-space-5xl, 3rem);width:100%;min-width:0}.dga-app-shell__body--viewport{position:relative;display:block;flex:1 1 auto;width:100%;min-width:0;min-height:0;overflow-x:hidden;overflow-y:auto;padding:var(--dga-space-xl, 1.5rem) var(--dga-space-2xl, 2rem) var(--dga-space-4xl, 2.5rem)}.dga-app-shell__body--flush{padding:0}@media(min-width:1024px){.dga-app-shell__layout--content,.dga-app-shell__layout--viewport{flex-direction:row;align-items:stretch}.dga-app-shell__layout--content .dga-app-shell__nav{position:sticky;top:var(--dga-space-xl, 1.5rem);align-self:flex-start;max-height:calc(100dvh - 2 * var(--dga-space-xl, 1.5rem));overflow-y:auto}.dga-app-shell__layout--viewport .dga-app-shell__nav{flex:0 0 auto;height:100%;max-height:100%;align-self:stretch}.dga-app-shell__layout--viewport .dga-app-shell__main{flex:1 1 auto;height:100%;max-height:100%}}@media(max-width:1023px){:host([data-appearance=\"viewport\"]){height:auto;max-height:none;overflow:visible}.dga-app-shell__layout--viewport{height:auto;min-height:100dvh;overflow:visible}.dga-app-shell__main--viewport,.dga-app-shell__body--viewport{overflow:visible}}\n"]}]}],propDecorators:{navLabel:[{type:t.Input,args:[{isSignal:!0,alias:"navLabel",required:!1}]}],appearance:[{type:t.Input,args:[{isSignal:!0,alias:"appearance",required:!1}]}],padded:[{type:t.Input,args:[{isSignal:!0,alias:"padded",required:!1}]}]}});const qn='<svg width="20" height="14" viewBox="0 0 20 14" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="20" height="14" fill="#006923"/><path fill-rule="evenodd" clip-rule="evenodd" d="M8.1 3C8.1 3 8.1 3 8.1 3C8 3.1 7.9 3.2 7.9 3.4C7.9 3.5 7.8 3.5 7.9 3.5C7.9 3.6 8 3.6 8.1 3.5C8.1 3.5 8.1 3.5 8.2 3.4C8.2 3.3 8 3.5 8 3.3C8 3.2 8.1 3.2 8.2 3.1C8.2 3 8.2 3 8.1 3V3ZM9.4 3C9.4 3 9.4 3 9.3 3.1C9.3 3.2 9.2 3.3 9.3 3.6C9.3 3.7 9.4 4 9.3 4.3C9.3 4.3 9.3 4.4 9.2 4.4C9.1 4.6 9 4.5 8.9 4.5C8.8 4.4 8.8 4.4 8.7 4.2C8.7 4 8.8 3.6 8.7 3.5C8.6 3.3 8.5 3.4 8.5 3.4C8.2 3.7 8.1 4 8.1 4.3C8 4.5 7.9 4.4 7.9 4.4C7.8 4.3 7.8 3.4 7.6 3.5C7.4 4.2 7.7 4.9 8 4.8C8.2 4.9 8.3 4.6 8.4 4.2C8.4 4.1 8.4 4.1 8.5 4.1C8.5 4.6 8.5 4.7 8.6 4.9C8.9 5.1 9.2 4.9 9.2 4.9L9.4 4.7C9.5 4.6 9.5 4.6 9.6 4.7C9.7 4.7 9.6 4.8 9.8 4.9C9.9 5 10.2 4.9 10.2 4.8C10.3 4.7 10.3 4.6 10.4 4.6C10.4 4.5 10.5 4.5 10.5 4.6C10.5 4.6 10.5 4.6 10.5 4.7C10.6 4.8 10.6 4.7 10.6 4.7C10.8 4.7 10.9 4.3 10.9 4.3C10.9 4.2 10.8 4.2 10.8 4.3C10.7 4.3 10.7 4.3 10.7 4.3C10.6 4.3 10.5 4.4 10.4 4.3C10.3 4.2 10.3 4 10.3 3.9C10.3 3.8 10.2 3.7 10.3 3.6C10.3 3.6 10.4 3.7 10.4 3.6C10.5 3.5 10.3 3.3 10.2 3.2C10.1 3.1 10 3.1 9.9 3.2C9.8 3.3 9.8 3.3 9.8 3.4C9.8 3.5 9.8 3.6 9.9 3.7C10 3.9 10.1 4.1 10.1 4.4C10.1 4.4 10 4.5 9.8 4.5C9.8 4.5 9.7 4.5 9.6 4.1C9.6 3.8 9.6 3.3 9.5 3.2C9.5 3.1 9.5 3 9.4 3L9.4 3ZM9 3C9 3 8.9 3.1 8.9 3.2C8.9 3.2 8.8 3.6 8.8 3.6C8.8 3.7 8.9 3.7 9 3.6C9.1 3.4 9.1 3.3 9.1 3.2C9.1 3.1 9 3 9 3ZM10.5 3.1C10.5 3.1 10.4 3.1 10.4 3.2C10.4 3.3 10.4 3.4 10.4 3.5C10.5 3.6 10.6 3.7 10.6 3.7C10.9 4.1 11.1 4.4 11.4 4.8C11.4 5.1 11.4 5.3 11.4 5.6C11.5 6.2 11.5 6.9 11.5 7.5C11.6 7.5 11.7 7.3 11.8 7.1C11.8 6.7 11.8 6 11.8 5.7L11.8 5.4C12.1 5.9 12.3 6.4 12.6 6.9C12.7 6.9 12.7 6.3 12.6 6.2C12.4 5.8 12.1 5.3 12 5.2C12 5.1 11.9 4.9 11.7 4.7C11.7 4.4 11.7 4.2 11.6 4.1C11.6 3.8 11.8 4.1 11.8 4C11.7 3.7 11.5 3.5 11.3 3.2C11.3 3.1 11.3 3.1 11.2 3.2C11.1 3.3 11.1 3.4 11.1 3.6C11.1 3.5 11.1 3.5 11 3.4L10.7 3.1C10.7 3.1 10.6 3.1 10.5 3.1ZM14.9 3.1C14.9 3.1 14.9 3.1 14.9 3.2C14.8 3.2 14.8 3.3 14.8 3.4C14.8 3.5 14.8 3.7 14.8 3.8L14.8 3.9C14.8 3.9 14.8 3.9 14.8 3.9C14.5 3.5 14.9 3.8 14.7 3.5C14.6 3.4 14.5 3.3 14.4 3.2C14.3 3.1 14.2 3 14.2 3.2C14.2 3.3 14.2 3.5 14.2 3.6C14.2 3.7 14.3 3.8 14.3 3.9C14.5 4.1 14.8 4.4 15 4.7C15 5.3 15 5.8 15.1 6.4C15.1 6.6 15 7 14.9 7C14.9 7 14.8 7.1 14.7 7C14.7 7 14.5 6.6 14.5 6.6C14.4 6.5 14.3 6.6 14.2 6.6C14 6.8 13.9 7.2 13.7 7.5C13.7 7.6 13.6 7.6 13.5 7.5C13.2 7.1 13.3 6.5 13.3 6.6C13 6.9 13.2 7.4 13.2 7.6C13.3 7.7 13.4 7.8 13.6 7.9C13.7 8 13.8 8 13.9 7.9C14.1 7.7 14.1 7.3 14.1 7.2C14.2 7.1 14.3 7.1 14.4 7.2C14.4 7.3 14.5 7.3 14.6 7.4C14.8 7.5 14.9 7.5 15.1 7.4C15.2 7.3 15.3 7.2 15.4 7.1C15.4 6.9 15.4 5.8 15.4 5.3L15.7 5.7C15.8 6.2 15.8 6.7 15.8 7.2C15.8 7.3 16.1 6.9 16.1 6.8C16.1 6.6 16.1 6.5 16.1 6.3C16.3 6.6 16.4 6.9 16.6 7.1C16.7 7.1 16.7 6.6 16.6 6.5C16.4 6.2 16.2 5.9 16.1 5.7C16 5.4 16 5.1 16 5C15.9 4.8 15.9 4.6 15.9 4.4C15.9 4.3 15.8 4.1 15.8 4.1C15.8 4 15.9 4.1 16 4C16 3.9 15.8 3.3 15.7 3.2C15.6 3.1 15.5 3.1 15.4 3.2C15.3 3.3 15.4 3.5 15.4 3.7C15.5 4.1 15.6 4.6 15.6 5.1C15.5 4.9 15.4 4.7 15.2 4.5L15.2 4.4C15.2 4.4 15.2 4 15.2 3.9C15.2 3.9 15.2 3.9 15.2 3.9C15.3 3.9 15.3 3.9 15.3 4C15.3 4 15.4 3.9 15.3 3.8L15 3.1C15 3.1 14.9 3.1 14.9 3.1L14.9 3.1ZM3.5 3.1C3.4 3.1 3.4 3.2 3.4 3.2C3.4 3.3 3.5 3.4 3.6 3.5C3.6 3.6 3.5 3.8 3.6 3.8C3.6 3.8 3.7 3.7 3.7 3.5C3.7 3.4 3.7 3.2 3.5 3.1C3.5 3.1 3.5 3.1 3.5 3.1L3.5 3.1ZM16.5 3.1C16.5 3.1 16.5 3.2 16.5 3.2C16.4 3.3 16.4 3.5 16.4 3.7C16.6 4.8 16.7 5.9 16.7 6.9C16.7 7 16.7 7.1 16.6 7.2C16.5 7.3 16.4 7.5 16.3 7.6C16.2 7.6 16 7.7 15.9 7.8C15.7 7.9 15.7 8.1 15.9 8.1C16.2 8 16.6 8 16.8 7.6C16.9 7.5 17 7.2 17 7C17 6 17 4.9 16.8 4.2C16.8 4.1 16.8 3.9 16.8 3.9C16.8 3.8 16.9 3.9 16.9 3.8C17 3.8 16.7 3.4 16.6 3.2C16.5 3.2 16.5 3.1 16.5 3.1L16.5 3.1ZM13.2 3.1C13.2 3.1 13.2 3.2 13.1 3.2C13 3.5 13 3.7 13.1 3.9C13.3 5.1 13.5 6.2 13.5 7.3C13.6 7.3 13.7 7.1 13.8 6.8C13.8 6.5 13.7 6.3 13.7 6.1C13.7 5.9 13.5 4.3 13.5 4.1C13.4 3.8 13.7 4.1 13.6 3.9C13.6 3.7 13.3 3.4 13.3 3.2C13.2 3.2 13.2 3.1 13.2 3.1L13.2 3.1ZM5.1 3.2C5.1 3.2 5.1 3.2 5.1 3.2C5.1 3.3 5.1 3.3 5.1 3.3C5.1 3.3 5 3.3 5 3.2C5 3.2 5 3.2 5 3.2C5 3.2 5 3.2 4.9 3.2C4.9 3.2 4.9 3.2 4.9 3.2C4.9 3.2 4.9 3.2 4.9 3.3C4.9 3.3 4.9 3.3 4.9 3.3C4.9 3.3 4.9 3.3 4.8 3.3C4.8 3.3 4.8 3.3 4.8 3.3C4.8 3.2 4.8 3.2 4.8 3.2C4.8 3.2 4.8 3.2 4.8 3.2C4.7 3.2 4.7 3.3 4.7 3.3C4.7 3.3 4.7 3.5 4.8 3.5C4.9 3.6 5.2 3.6 5.2 3.3C5.2 3.3 5.2 3.2 5.2 3.2C5.2 3.2 5.2 3.2 5.1 3.2L5.1 3.2ZM7.2 3.2C7.2 3.2 7.1 3.2 7.1 3.2C7 3.3 6.9 3.5 7 3.6C7.1 3.6 7.2 3.7 7.1 3.7C6.9 4 6.3 4.3 6.3 4.4V4.4H6.3V4.4C6.3 4.5 6.7 4.5 6.7 4.4H6.7C6.9 4.4 7.5 3.7 7.5 3.7C7.4 3.7 7.4 3.7 7.4 3.6C7.3 3.6 7.3 3.6 7.4 3.6C7.5 3.5 7.5 3.3 7.4 3.2C7.3 3.2 7.3 3.2 7.2 3.2V3.2ZM12.6 3.2C12.6 3.2 12.6 3.2 12.6 3.3C12.5 3.4 12.4 3.6 12.4 3.8C12.6 4.8 12.6 5.7 12.7 6.8C12.8 6.9 12.7 7 12.7 7.1C12.4 7.3 12.1 7.6 11.7 7.8C11.6 7.8 11.8 8 12 8C12.3 8 12.6 7.8 12.8 7.4C12.9 7.2 13 7 13 6.8C13 5.8 13 4.9 12.8 4.2C12.8 4.1 12.8 4 12.8 4C12.8 4 12.9 4 12.9 3.9C13 3.9 12.8 3.4 12.7 3.2C12.7 3.2 12.6 3.2 12.6 3.2ZM4.2 3.2C4.2 3.2 4.2 3.2 4.1 3.3C4.1 3.5 4.1 3.6 4.2 3.8C4.2 4 4.2 4.3 4.3 4.6C4.3 4.9 4.1 4.7 4.1 4.5C4.1 4.3 4.1 3.9 4.1 3.8C4 3.7 4 3.7 3.9 3.7C3.8 3.7 3.7 3.9 3.6 4.2C3.6 4.2 3.6 4.4 3.5 4.6C3.5 4.7 3.4 4.9 3.3 4.5C3.3 4.3 3.2 3.8 3.1 3.9C3.1 4.3 3 5.1 3.4 5.2C3.9 5.2 3.6 4.4 3.8 4.3C3.8 4.2 3.9 4.2 3.9 4.3V5C3.9 5.2 4 5.3 4.1 5.3C4.2 5.3 4.3 5.3 4.4 5.4L4.4 6.6C4.4 6.6 4.7 6.7 4.7 5.9C4.7 5.5 4.6 5.1 4.7 5C4.7 5 4.8 5 4.9 5C5 5.1 5 5.2 5.2 5.1C5.5 5.1 5.7 4.9 5.7 4.7C5.6 4.5 5.6 4.3 5.5 4.1C5.5 4.1 5.5 4 5.5 3.9C5.5 4 5.6 4 5.6 3.9C5.6 3.8 5.5 3.6 5.4 3.6C5.3 3.5 5.2 3.5 5.1 3.7C5.1 3.9 5.2 4.1 5.3 4.3C5.4 4.4 5.4 4.5 5.4 4.7C5.3 4.7 5.2 4.7 5.2 4.6C5.2 4.6 4.9 4.5 4.9 4.4C5 4 4.9 4 4.9 3.9C4.9 3.7 4.8 3.7 4.8 3.6C4.7 3.5 4.6 3.5 4.6 3.6C4.5 3.8 4.5 4.1 4.6 4.3C4.7 4.4 4.7 4.5 4.7 4.5C4.7 4.6 4.6 4.6 4.6 4.5C4.5 4.3 4.5 4 4.5 3.9C4.5 3.7 4.5 3.3 4.3 3.2C4.3 3.2 4.3 3.2 4.2 3.2L4.2 3.2ZM5.8 3.2C5.8 3.2 5.8 3.2 5.7 3.2C5.7 3.3 5.6 3.3 5.6 3.5C5.7 4.2 5.8 4.7 5.9 5.4C5.9 5.5 5.8 5.6 5.8 5.6C5.6 5.5 5.6 5.3 5.3 5.3C5.1 5.3 4.9 5.5 4.9 5.7C4.9 5.8 4.9 6 4.9 6.1C5 6.3 5.2 6.3 5.3 6.2C5.4 6.2 5.5 6.1 5.6 6.1C5.6 6.1 5.6 6.5 5 6.8C4.7 6.9 4.5 7 4.3 6.7C4.2 6.5 4.3 5.9 4.1 6.1C3.5 7.6 5.6 7.9 5.8 6.1C5.8 6.1 5.9 6 5.9 6C5.9 6 5.9 6.1 5.9 6.1C5.9 7.7 4.3 7.8 4.1 7.3C4 7.2 4 6.9 4 6.8C4 6.7 3.9 6.6 3.9 6.6C3.8 6.5 3.8 6.7 3.7 6.9C3.7 7 3.7 7.1 3.7 7.3C3.8 8.5 5.8 8 6.1 6.9C6.3 6.4 6.1 6 6.2 5.9L6.2 5.9H6.2L6.2 5.9C6.4 6.2 6.7 6 6.7 5.9C6.8 5.9 6.8 5.8 6.9 5.9C7 6 7.3 5.9 7.3 5.7C7.4 5.6 7.4 5.4 7.4 5.2C7.3 5.2 7.2 5.2 7.2 5.2C7.2 5.2 7.2 5.3 7.2 5.3L7.2 5.4C7.2 5.4 7.2 5.4 7.2 5.5C7.1 5.5 7.1 5.5 7.1 5.5C7.1 5.5 7 5.5 7 5.4C7 5.2 6.8 5.2 6.7 5.5C6.6 5.6 6.4 5.6 6.4 5.5C6.4 5.3 6.4 5.2 6.2 5.3L6 4C6.1 4 6.1 4.1 6.2 4C6.1 3.8 6 3.3 5.9 3.2H5.9L5.9 3.2C5.9 3.2 5.9 3.2 5.9 3.2L5.9 3.2C5.9 3.2 5.8 3.2 5.8 3.2C5.8 3.2 5.8 3.2 5.8 3.2ZM12 3.2C11.9 3.2 11.8 3.3 11.9 3.4C11.8 3.4 12 3.6 12.1 3.7C12.1 3.8 12 4 12.1 4C12.1 4 12.2 3.9 12.2 3.7C12.3 3.5 12.2 3.3 12 3.2L12 3.2V3.2ZM7.2 3.4C7.2 3.4 7.3 3.4 7.3 3.5C7.3 3.5 7.3 3.5 7.3 3.6C7.2 3.6 7.2 3.5 7.2 3.5C7.1 3.4 7.1 3.4 7.2 3.4H7.2V3.4ZM16.1 3.6C16 3.6 15.9 3.7 16 3.8C16 3.8 16.1 4 16.2 4.1C16.2 4.2 16.1 4.5 16.2 4.5C16.2 4.5 16.3 4.3 16.3 4.1C16.3 4 16.2 3.7 16.1 3.6C16.1 3.6 16.1 3.6 16.1 3.6L16.1 3.6ZM11.2 3.7C11.2 3.8 11.2 3.8 11.2 3.8C11.2 3.9 11.2 3.9 11.2 4C11.2 3.9 11.1 3.9 11.1 3.8C11 3.7 11.1 3.7 11.2 3.7ZM12.3 4.3C12.3 4.3 12.2 4.3 12.2 4.4C12.2 4.4 12.2 4.4 12.2 4.4C12.2 4.4 12.2 4.4 12.2 4.4C12.2 4.3 12.1 4.3 12.1 4.3C12.1 4.3 12.1 4.3 12.1 4.3C12.1 4.3 12.1 4.3 12.1 4.3C12.1 4.3 12.1 4.4 12.1 4.4C12.1 4.4 12 4.4 12 4.4C12 4.4 12 4.4 12 4.4C12 4.4 12 4.4 12 4.4C12 4.4 12 4.3 12 4.3C12 4.3 11.9 4.3 11.9 4.3C11.8 4.3 11.8 4.4 11.8 4.4C11.8 4.4 11.8 4.6 11.9 4.7C12.1 4.7 12.4 4.7 12.4 4.4C12.4 4.4 12.4 4.4 12.4 4.3C12.4 4.3 12.3 4.3 12.3 4.3L12.3 4.3ZM7.1 4.3C7.1 4.3 7.1 4.3 7 4.4C6.9 4.4 6.9 4.7 6.9 4.8C7 4.9 7.1 4.9 7.2 4.9C7.3 4.9 7.4 4.6 7.4 4.6C7.4 4.6 7.4 4.5 7.2 4.7C7.2 4.7 7.1 4.7 7.1 4.6C7.1 4.6 7.1 4.5 7.2 4.4C7.2 4.4 7.2 4.3 7.1 4.3V4.3ZM14.4 4.4C14.4 4.4 14.3 4.4 14.3 4.5C14.3 4.6 14.3 4.6 14.3 4.7C14.3 4.7 14.2 4.7 14.2 4.7C14.2 4.7 14.1 4.6 14.1 4.6C14.1 4.5 14 4.6 13.9 4.6C13.9 4.7 13.9 4.8 13.9 4.9C14 5 14.3 5.3 14.4 5.3C14.4 5.2 14.5 5 14.5 4.8C14.5 4.8 14.5 4.7 14.5 4.7C14.6 4.7 14.6 4.8 14.6 4.7C14.6 4.6 14.6 4.5 14.6 4.4C14.5 4.4 14.5 4.4 14.4 4.4H14.4ZM8.4 4.9L8.4 4.9C8.4 4.9 8.4 4.9 8.4 4.9C8.4 4.9 8.3 4.9 8.3 4.9C8.2 5 8.2 5.1 8.2 5.2C8.2 5.2 8.4 5.6 8.5 5.8C8.5 6.1 8.6 6.4 8.5 6.6C8.4 7 8 7.3 7.7 7.5C7.6 7.5 7.4 7.5 7.4 7.5C7.3 7.4 7.3 7.3 7.3 7.3V7.3C7.6 7.1 7.9 7 8.1 6.4C8.2 6.3 8.2 6.1 8.1 5.8C8.1 5.7 8.1 5.6 8 5.5H8C8 5.5 8.2 5.6 8.2 5.6C8.2 5.4 8.1 5.2 7.9 5.1C7.9 5 7.7 5 7.7 5.1C7.6 5.2 7.5 5.4 7.6 5.5C7.6 5.7 7.8 5.7 7.9 6C7.9 6 7.9 6.1 7.9 6.2C7.8 6.4 7.3 6.8 7.3 6.8L7.2 6.8L7.2 6.8H7.2H7.2V6.8C7.2 6.8 7.2 6.8 7.2 6.7C7.2 6.6 7.3 6.5 7.3 6.4V6.4C7.1 6.5 7 6.9 7 7C6.5 7.3 6 7.5 5.7 7.9C5.6 8.1 6.8 7.6 6.9 7.5L6.9 7.5C7 7.5 7 7.7 7.1 7.7C7.2 7.9 7.4 8 7.7 8C8.1 7.8 8.4 7.5 8.6 7.2C8.7 7.1 8.7 7.1 8.8 7.1C9 7.5 9.5 7.8 10.1 7.8C10.3 7.6 10.2 7.5 10.1 7.5C10.1 7.5 9.8 7.4 9.8 7.3C9.7 7.1 9.8 7 10 7C10.4 6.9 10.8 6.9 11.2 6.7C11.2 6.6 11.3 6.4 11.3 6.3C11.4 6.3 11.4 6.2 11.4 6.2V6.2H11.4V6.2V6.2L11.3 6.2L10 6.2C10 6.2 10 6.2 10 6.2L10 6.2C10 6.2 9.9 6.2 9.9 6.2C9.9 6.1 9.9 6.1 9.9 6.1V6.1V6.1V6.1L9.9 6.1C10 6.1 10 6.1 10 6.1C10.3 6.1 10.9 6 10.9 5.4C10.9 5.1 10.8 5 10.4 4.9C10.2 4.9 10 5.2 10 5.4C10 5.5 10.1 5.7 10 5.7C9.5 5.7 9 6 8.9 6.3H8.9H8.9H8.9C8.9 6.3 8.9 6.3 8.9 6.3H8.9H8.9H8.9C8.9 6.2 8.8 6.2 8.8 6.1C8.8 5.7 8.7 5.3 8.5 5C8.4 4.9 8.4 4.9 8.4 4.9H8.4H8.4H8.4ZM9.7 5.1C9.6 5.1 9.6 5.1 9.6 5.1C9.6 5.2 9.6 5.2 9.6 5.2C9.6 5.2 9.5 5.2 9.5 5.2C9.5 5.1 9.5 5.1 9.5 5.1C9.5 5.1 9.5 5.1 9.5 5.1C9.4 5.1 9.4 5.1 9.4 5.1C9.4 5.1 9.4 5.2 9.4 5.2C9.4 5.2 9.4 5.2 9.4 5.2C9.4 5.2 9.4 5.2 9.4 5.2C9.4 5.2 9.3 5.2 9.3 5.2C9.3 5.1 9.3 5.1 9.3 5.1C9.3 5.1 9.3 5.1 9.3 5.1C9.2 5.1 9.2 5.2 9.2 5.2C9.2 5.2 9.2 5.4 9.3 5.4C9.5 5.5 9.8 5.5 9.7 5.2C9.7 5.2 9.7 5.1 9.7 5.1C9.7 5.1 9.7 5.1 9.7 5.1L9.7 5.1ZM14.8 5.3H14.8C14.8 5.3 14.1 5.8 14.1 5.8C14 5.9 14.1 6.1 14.1 6.1C14.1 6.1 14.9 5.6 14.8 5.5C14.9 5.6 14.9 5.3 14.8 5.3L14.8 5.3ZM10.3 5.4C10.4 5.4 10.4 5.4 10.4 5.4C10.5 5.4 10.5 5.5 10.5 5.5V5.5C10.5 5.5 10.5 5.5 10.5 5.5V5.5C10.5 5.5 10.5 5.5 10.5 5.5C10.5 5.5 10.5 5.5 10.5 5.5C10.5 5.6 10.4 5.5 10.4 5.5C10.3 5.5 10.3 5.4 10.3 5.4V5.4L10.3 5.4C10.3 5.4 10.3 5.4 10.3 5.4L10.3 5.4C10.3 5.4 10.3 5.4 10.3 5.4V5.4ZM4.1 5.5C3.7 5.5 3.2 6 3.2 6.2L4.3 5.7C4.3 5.6 4.3 5.5 4.1 5.5ZM5.3 5.7C5.3 5.7 5.4 5.7 5.4 5.7C5.4 5.8 5.4 5.8 5.4 5.8V5.9C5.3 5.9 5.3 5.9 5.2 5.9C5.2 5.9 5.2 5.9 5.1 5.8C5.1 5.8 5.2 5.7 5.2 5.7L5.2 5.7C5.2 5.7 5.2 5.7 5.3 5.7L5.3 5.7L5.3 5.7ZM14.7 5.8C14.6 5.8 14.6 5.9 14.6 6C14.6 6 14.7 6.2 14.7 6.3C14.7 6.4 14.7 6.6 14.7 6.7C14.8 6.7 14.9 6.5 14.9 6.3C14.9 6.2 14.9 5.9 14.7 5.8C14.7 5.8 14.7 5.8 14.7 5.8ZM6.7 6.2C6.6 6.2 6.6 6.2 6.6 6.3C6.6 6.3 6.8 6.4 6.8 6.6C6.8 6.6 6.7 6.8 6.8 6.8C6.8 6.8 6.9 6.7 6.9 6.6C6.9 6.5 6.9 6.2 6.8 6.2C6.7 6.2 6.7 6.2 6.7 6.2L6.7 6.2ZM9.1 6.5H9.1C9.3 6.5 9.5 6.5 9.7 6.6C9.8 6.6 9.9 6.7 9.8 6.7C9.6 6.8 9.5 6.8 9.5 7C9.5 7.1 9.5 7.2 9.5 7.2C9.5 7.2 9.5 7.2 9.5 7.2C9.5 7.2 9.5 7.2 9.5 7.2V7.2H9.5L9.5 7.2H9.4C9.4 7.2 9.4 7.2 9.3 7.2C9.2 7.1 9 7 8.9 6.6C8.9 6.6 9 6.5 9.1 6.5L9.1 6.5ZM3.2 6.7C3.2 6.7 3.2 6.8 3.2 6.8C3 7.2 3 7.7 3.1 7.8C3.1 7.9 3.2 7.9 3.3 7.9C3.5 7.9 3.5 7.6 3.5 7.5C3.4 7.4 3.4 7.4 3.4 7.5C3.3 7.7 3.2 7.5 3.2 7.4C3.2 7.2 3.2 7 3.2 6.9C3.3 6.8 3.3 6.7 3.2 6.7L3.2 6.7ZM10.8 7.2C10.7 7.2 10.7 7.2 10.7 7.2C10.7 7.2 10.5 7.3 10.5 7.4C10.5 7.4 10.5 7.4 10.5 7.5C10.5 7.5 10.5 7.5 10.6 7.5C10.7 7.5 10.7 7.5 10.7 7.6C10.6 7.7 10.7 7.7 10.7 7.7C10.7 7.7 10.7 7.8 10.8 7.8C11 7.7 11.1 7.6 11.3 7.6C11.3 7.6 11.3 7.4 11.2 7.4C11.1 7.4 11 7.5 10.9 7.5C10.8 7.6 10.8 7.5 10.8 7.5C10.8 7.4 10.8 7.3 10.8 7.2C10.8 7.2 10.8 7.2 10.7 7.2L10.8 7.2ZM15.6 7.4L15.5 7.4C15.4 7.4 15.4 7.4 15.4 7.5C15.4 7.6 15.4 7.6 15.5 7.6C15.5 7.6 15.5 7.7 15.5 7.7C15.4 7.8 15.4 7.8 15.4 7.9C15.3 7.9 15.3 8 15.4 8C15.5 8 15.8 7.8 15.8 7.8C15.9 7.8 15.9 7.7 15.9 7.7C15.8 7.7 15.8 7.7 15.7 7.7C15.7 7.7 15.6 7.7 15.7 7.6C15.7 7.6 15.7 7.5 15.7 7.5C15.7 7.5 15.7 7.4 15.6 7.4C15.6 7.4 15.6 7.4 15.6 7.4H15.6Z" fill="white"/><path d="M15.5 9.9H15.3L14.2 9.9V9.6C14.2 9.5 14.1 9.4 14 9.4C13.9 9.4 13.8 9.5 13.8 9.6V9.9L3.9 9.9C4.3 10.4 5 10.6 5.6 10.6C6 10.6 11 10.6 13.8 10.6V11.1C13.8 11.3 13.9 11.4 14 11.4H15.5C15.8 11.4 16.1 11.1 16.1 10.6C16.1 10.2 15.8 9.9 15.5 9.9ZM15.5 10.9L14.2 10.9V10.6C15.1 10.6 15.7 10.6 15.7 10.6L15.7 10.5C15.7 10.5 15.7 10.6 15.7 10.6C15.7 10.8 15.6 10.9 15.5 10.9Z" fill="white"/></svg>',Ln=`data:image/svg+xml,${encodeURIComponent(qn)}`,Qa={lat:24.7136,lon:46.6753,ar:"الرياض",en:"Riyadh"},Zs="dga-top-bar.geo-prompt",Pn={clear:{ar:"صافٍ",en:"Clear",icon:"sun",nightIcon:"moon"},mainlyClear:{ar:"صافٍ غالباً",en:"Mainly clear",icon:"sunCloud",nightIcon:"moonCloud"},partlyCloudy:{ar:"غائم جزئياً",en:"Partly cloudy",icon:"sunCloud",nightIcon:"moonCloud"},cloudy:{ar:"غائم",en:"Cloudy",icon:"cloud"},fog:{ar:"ضباب",en:"Fog",icon:"cloud"},drizzle:{ar:"رذاذ",en:"Drizzle",icon:"rain"},rain:{ar:"ممطر",en:"Rain",icon:"rain"},snow:{ar:"ثلج",en:"Snow",icon:"snow"},storm:{ar:"عاصفة رعدية",en:"Thunderstorm",icon:"rainZap"}};function zn(d){return d.toLowerCase().split("-")[0]==="ar"?Qa.ar:Qa.en}function Fn(d,e,a){const s=Rn(d),r=Pn[s],l=a.toLowerCase().split("-")[0]==="ar";return{icon:!e&&r.nightIcon?r.nightIcon:r.icon,label:l?r.ar:r.en}}function Rn(d){return d===0?"clear":d===1?"mainlyClear":d===2?"partlyCloudy":d===3?"cloudy":d===45||d===48?"fog":d>=51&&d<=57?"drizzle":d>=61&&d<=67||d>=80&&d<=82?"rain":d>=71&&d<=77||d>=85&&d<=86?"snow":d>=95?"storm":"cloudy"}async function Tn(d,e,a){const s=new URL("https://api.open-meteo.com/v1/forecast");s.searchParams.set("latitude",String(d)),s.searchParams.set("longitude",String(e)),s.searchParams.set("current","weather_code,is_day"),s.searchParams.set("timezone","Asia/Riyadh");const r=await Js(s,a),l=r?.current?.weather_code;return l==null||Number.isNaN(Number(l))?null:{code:Number(l),isDay:r?.current?.is_day!==0}}async function On(d,e,a,s){const r=new URL("https://api.bigdatacloud.net/data/reverse-geocode-client");r.searchParams.set("latitude",String(d)),r.searchParams.set("longitude",String(e)),r.searchParams.set("localityLanguage",a.toLowerCase().split("-")[0]==="ar"?"ar":"en");const l=await Js(r,s);return l?.city?.trim()||l?.locality?.trim()||l?.principalSubdivision?.trim()||null}async function Js(d,e){try{const a=await fetch(d,{signal:e,credentials:"omit"});return a.ok?await a.json():null}catch{return null}}const An="inline-flex h-full shrink-0 cursor-pointer items-center gap-xs rounded-sm px-xs text-body-sm font-medium leading-[22px] text-fg whitespace-nowrap hover:bg-neutral-light focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",Vn="inline-flex h-full shrink-0 items-center gap-xs rounded-sm px-xs text-body-sm font-medium leading-[22px] text-fg whitespace-nowrap",En={ar:["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الآخرة","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة"],en:["Muharram","Safar","Rabi al-Awwal","Rabi al-Thani","Jumada al-Ula","Jumada al-Akhirah","Rajab","Shaban","Ramadan","Shawwal","Dhu al-Qadah","Dhu al-Hijjah"]},$n={ar:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],en:["January","February","March","April","May","June","July","August","September","October","November","December"]},Qs={ar:{regionLabel:"شريط الهوية الحكومية",stampLabel:"ختم الحكومة الرقمية",tabTextLg:"موقع حكومي مسجّل لدى هيئة الحكومة الرقمية.",tabTextSm:"موقع حكومي مسجّل لدى هيئة الحكومة الرقمية",verifyText:"كيف تتحقق؟",registrationLabel:"مسجّل لدى هيئة الحكومة الرقمية برقم:",locationAllowTitle:"السماح بالوصول إلى الموقع",locationAllowBody:"لعرض حالة الطقس واسم مدينتك نحتاج إلى إذن موقعك. يمكنك الرفض وسيُعرض طقس الرياض افتراضياً.",locationAllow:"السماح",locationNotNow:"ليس الآن",locationClose:"إغلاق",locationTooltip:"السماح بالوصول إلى الموقع لعرض الطقس في مدينتك",locationDeniedTooltip:"تم رفض إذن الموقع. يُعرض طقس الرياض.",locationRefreshTooltip:"تحديث الموقع الحالي",weatherLabel:"حالة الطقس",notices:[{icon:"link",title:"الروابط الرسمية تنتهي بـ gov.sa",highlight:"gov.sa",body:"تنتمي المواقع الإلكترونية الرسمية للجهات الحكومية في المملكة العربية السعودية إلى النطاق gov.sa."},{icon:"lock",title:"المواقع الحكومية تستخدم بروتوكول HTTPS للتشفير",highlight:"HTTPS",body:"تستخدم المواقع الرسمية للجهات الحكومية في المملكة العربية السعودية بروتوكول HTTPS للتشفير."}]},en:{regionLabel:"Government identity bar",stampLabel:"Digital government stamp",tabTextLg:"A government website registered with the Digital Government Authority.",tabTextSm:"A government website registered with the Digital Government Authority",verifyText:"How to verify?",registrationLabel:"Registered with the Digital Government Authority under number:",locationAllowTitle:"Allow location access",locationAllowBody:"We use your location to show local weather and your city name. You can decline and we’ll show Riyadh weather instead.",locationAllow:"Allow",locationNotNow:"Not now",locationClose:"Close",locationTooltip:"Allow location access to show weather in your city",locationDeniedTooltip:"Location permission denied. Showing Riyadh weather.",locationRefreshTooltip:"Refresh current location",weatherLabel:"Weather",notices:[{icon:"link",title:"Official links end with gov.sa",highlight:"gov.sa",body:"Official websites of government entities in the Kingdom of Saudi Arabia belong to the gov.sa domain."},{icon:"lock",title:"Government websites use the HTTPS protocol for encryption",highlight:"HTTPS",body:"Official websites of government entities in the Kingdom of Saudi Arabia use the HTTPS protocol for encryption."}]}};function Pe(d){return d.toLowerCase().split("-")[0]==="ar"}function Bn(d){return Pe(d)?Qs.ar:Qs.en}const jn=An,Hn=Vn;class ua{destroyRef=x(L);clockTimer=null;weatherAbort=null;saFlagSrc=Ln;clusterBtn=jn;clusterStatic=Hn;panelId="dga-digital-stamp";open=S(!1,...ngDevMode?[{debugName:"open"}]:[]);calendar=S("hijri",...ngDevMode?[{debugName:"calendar"}]:[]);timeFormat=S("12",...ngDevMode?[{debugName:"timeFormat"}]:[]);showDate=i(!0,...ngDevMode?[{debugName:"showDate"}]:[]);showTime=i(!0,...ngDevMode?[{debugName:"showTime"}]:[]);showWeather=i(!0,...ngDevMode?[{debugName:"showWeather"}]:[]);showLocation=i(!0,...ngDevMode?[{debugName:"showLocation"}]:[]);autoRequestLocation=i(!0,...ngDevMode?[{debugName:"autoRequestLocation"}]:[]);locale=i("ar",...ngDevMode?[{debugName:"locale"}]:[]);regionLabel=i(...ngDevMode?[void 0,{debugName:"regionLabel"}]:[]);stampLabel=i(...ngDevMode?[void 0,{debugName:"stampLabel"}]:[]);tabTextLg=i(...ngDevMode?[void 0,{debugName:"tabTextLg"}]:[]);tabTextSm=i(...ngDevMode?[void 0,{debugName:"tabTextSm"}]:[]);verifyText=i(...ngDevMode?[void 0,{debugName:"verifyText"}]:[]);registrationLabel=i(...ngDevMode?[void 0,{debugName:"registrationLabel"}]:[]);registrationId=i("",...ngDevMode?[{debugName:"registrationId"}]:[]);registrationHref=i("#",...ngDevMode?[{debugName:"registrationHref"}]:[]);notices=i(...ngDevMode?[void 0,{debugName:"notices"}]:[]);now=y(new Date,...ngDevMode?[{debugName:"now"}]:[]);defaults=n(()=>Bn(this.locale()),...ngDevMode?[{debugName:"defaults"}]:[]);locationPromptOpen=y(!1,...ngDevMode?[{debugName:"locationPromptOpen"}]:[]);geoDenied=y(!1,...ngDevMode?[{debugName:"geoDenied"}]:[]);geoGranted=y(!1,...ngDevMode?[{debugName:"geoGranted"}]:[]);coords=y({lat:Qa.lat,lon:Qa.lon},...ngDevMode?[{debugName:"coords"}]:[]);weatherSnap=y(null,...ngDevMode?[{debugName:"weatherSnap"}]:[]);resolvedCity=y(null,...ngDevMode?[{debugName:"resolvedCity"}]:[]);weather=n(()=>{const e=this.weatherSnap();return e?Fn(e.code,e.isDay,this.locale()):null},...ngDevMode?[{debugName:"weather"}]:[]);resolvedRegionLabel=n(()=>this.regionLabel()??this.defaults().regionLabel,...ngDevMode?[{debugName:"resolvedRegionLabel"}]:[]);resolvedStampLabel=n(()=>this.stampLabel()??this.defaults().stampLabel,...ngDevMode?[{debugName:"resolvedStampLabel"}]:[]);resolvedTabTextLg=n(()=>this.tabTextLg()??this.defaults().tabTextLg,...ngDevMode?[{debugName:"resolvedTabTextLg"}]:[]);resolvedTabTextSm=n(()=>this.tabTextSm()??this.defaults().tabTextSm,...ngDevMode?[{debugName:"resolvedTabTextSm"}]:[]);resolvedVerifyText=n(()=>this.verifyText()??this.defaults().verifyText,...ngDevMode?[{debugName:"resolvedVerifyText"}]:[]);resolvedRegistrationLabel=n(()=>this.registrationLabel()??this.defaults().registrationLabel,...ngDevMode?[{debugName:"resolvedRegistrationLabel"}]:[]);resolvedNotices=n(()=>this.notices()??[...this.defaults().notices],...ngDevMode?[{debugName:"resolvedNotices"}]:[]);dateLabel=n(()=>this.calendar()==="hijri"?Kn(this.now(),this.locale()):Wn(this.now(),this.locale()),...ngDevMode?[{debugName:"dateLabel"}]:[]);timeLabel=n(()=>Yn(this.now(),this.locale(),this.timeFormat()),...ngDevMode?[{debugName:"timeLabel"}]:[]);cityLabel=n(()=>this.resolvedCity()??zn(this.locale()),...ngDevMode?[{debugName:"cityLabel"}]:[]);weatherAriaLabel=n(()=>{const e=this.weather(),a=this.defaults().weatherLabel;return e?`${a}: ${e.label}`:a},...ngDevMode?[{debugName:"weatherAriaLabel"}]:[]);locationTooltip=n(()=>this.geoDenied()?this.defaults().locationDeniedTooltip:this.geoGranted()?this.defaults().locationRefreshTooltip:this.defaults().locationTooltip,...ngDevMode?[{debugName:"locationTooltip"}]:[]);calendarToggleLabel=n(()=>{const e=Pe(this.locale());return this.calendar()==="hijri"?e?"التبديل إلى التقويم الميلادي":"Switch to Gregorian calendar":e?"التبديل إلى التقويم الهجري":"Switch to Hijri calendar"},...ngDevMode?[{debugName:"calendarToggleLabel"}]:[]);timeToggleLabel=n(()=>{const e=Pe(this.locale());return this.timeFormat()==="12"?e?"التبديل إلى تنسيق 24 ساعة":"Switch to 24-hour format":e?"التبديل إلى تنسيق 12 ساعة":"Switch to 12-hour format"},...ngDevMode?[{debugName:"timeToggleLabel"}]:[]);hostClasses=n(()=>f("block max-w-full min-w-0 border-b border-border-subtle bg-topbar font-sans text-fg",this.locationPromptOpen()?"overflow-visible":"overflow-x-clip"),...ngDevMode?[{debugName:"hostClasses"}]:[]);constructor(){T(()=>{this.bindClock(),this.bindWeatherAndLocation()})}bindClock(){this.tick(),this.scheduleMinuteTick();const e=()=>{document.hidden||(this.tick(),this.scheduleMinuteTick())};document.addEventListener("visibilitychange",e),this.destroyRef.onDestroy(()=>{document.removeEventListener("visibilitychange",e),this.clearClock(),this.weatherAbort?.abort()})}bindWeatherAndLocation(){!this.showWeather()&&!this.showLocation()||(this.refreshPlace(this.coords().lat,this.coords().lon,!1),this.syncGeolocation())}async syncGeolocation(){if(!this.showLocation()&&!this.showWeather()||typeof navigator>"u"||!navigator.geolocation)return;const e=await Un();if(e==="granted"){this.requestBrowserLocation();return}if(e==="denied"){this.geoDenied.set(!0);return}this.autoRequestLocation()&&!Gn()&&this.locationPromptOpen.set(!0)}onLocationClick(){if(this.geoGranted()){this.requestBrowserLocation();return}this.geoDenied()||this.locationPromptOpen.set(!0)}allowLocation(){this.locationPromptOpen.set(!1),ti(),this.requestBrowserLocation()}dismissLocationPrompt(){this.locationPromptOpen.set(!1),ti()}requestBrowserLocation(){typeof navigator>"u"||!navigator.geolocation||navigator.geolocation.getCurrentPosition(e=>{this.geoGranted.set(!0),this.geoDenied.set(!1),this.refreshPlace(e.coords.latitude,e.coords.longitude,!0)},e=>{e.code===1&&this.geoDenied.set(!0),this.geoGranted.set(!1)},{enableHighAccuracy:!1,timeout:1e4,maximumAge:600*1e3})}async refreshPlace(e,a,s){this.coords.set({lat:e,lon:a}),this.weatherAbort?.abort();const r=new AbortController;this.weatherAbort=r;const l=this.locale(),[u,o]=await Promise.all([this.showWeather()?Tn(e,a,r.signal):Promise.resolve(null),s&&this.showLocation()?On(e,a,l,r.signal):Promise.resolve(null)]);r.signal.aborted||(u&&this.weatherSnap.set(u),o&&this.resolvedCity.set(o))}tick(){this.now.set(new Date)}clearClock(){this.clockTimer!=null&&(clearTimeout(this.clockTimer),this.clockTimer=null)}scheduleMinuteTick(){if(this.clearClock(),document.hidden)return;const e=new Date,a=(60-e.getSeconds())*1e3-e.getMilliseconds();this.clockTimer=setTimeout(()=>{this.tick(),this.scheduleMinuteTick()},Math.max(a,250))}titleParts(e){const a=e.highlight?.trim();if(!a)return[{text:e.title,hl:!1}];const s=e.title.indexOf(a);if(s<0)return[{text:e.title,hl:!1}];const r=[];return s>0&&r.push({text:e.title.slice(0,s),hl:!1}),r.push({text:a,hl:!0}),s+a.length<e.title.length&&r.push({text:e.title.slice(s+a.length),hl:!1}),r}toggle(){this.open.update(e=>!e)}toggleCalendar(){this.calendar.update(e=>e==="hijri"?"gregorian":"hijri")}toggleTimeFormat(){this.timeFormat.update(e=>e==="12"?"24":"12")}safeHref(e){return K(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ua,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:ua,isStandalone:!0,selector:"dga-top-bar",inputs:{open:{classPropertyName:"open",publicName:"open",isSignal:!0,isRequired:!1,transformFunction:null},calendar:{classPropertyName:"calendar",publicName:"calendar",isSignal:!0,isRequired:!1,transformFunction:null},timeFormat:{classPropertyName:"timeFormat",publicName:"timeFormat",isSignal:!0,isRequired:!1,transformFunction:null},showDate:{classPropertyName:"showDate",publicName:"showDate",isSignal:!0,isRequired:!1,transformFunction:null},showTime:{classPropertyName:"showTime",publicName:"showTime",isSignal:!0,isRequired:!1,transformFunction:null},showWeather:{classPropertyName:"showWeather",publicName:"showWeather",isSignal:!0,isRequired:!1,transformFunction:null},showLocation:{classPropertyName:"showLocation",publicName:"showLocation",isSignal:!0,isRequired:!1,transformFunction:null},autoRequestLocation:{classPropertyName:"autoRequestLocation",publicName:"autoRequestLocation",isSignal:!0,isRequired:!1,transformFunction:null},locale:{classPropertyName:"locale",publicName:"locale",isSignal:!0,isRequired:!1,transformFunction:null},regionLabel:{classPropertyName:"regionLabel",publicName:"regionLabel",isSignal:!0,isRequired:!1,transformFunction:null},stampLabel:{classPropertyName:"stampLabel",publicName:"stampLabel",isSignal:!0,isRequired:!1,transformFunction:null},tabTextLg:{classPropertyName:"tabTextLg",publicName:"tabTextLg",isSignal:!0,isRequired:!1,transformFunction:null},tabTextSm:{classPropertyName:"tabTextSm",publicName:"tabTextSm",isSignal:!0,isRequired:!1,transformFunction:null},verifyText:{classPropertyName:"verifyText",publicName:"verifyText",isSignal:!0,isRequired:!1,transformFunction:null},registrationLabel:{classPropertyName:"registrationLabel",publicName:"registrationLabel",isSignal:!0,isRequired:!1,transformFunction:null},registrationId:{classPropertyName:"registrationId",publicName:"registrationId",isSignal:!0,isRequired:!1,transformFunction:null},registrationHref:{classPropertyName:"registrationHref",publicName:"registrationHref",isSignal:!0,isRequired:!1,transformFunction:null},notices:{classPropertyName:"notices",publicName:"notices",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{open:"openChange",calendar:"calendarChange",timeFormat:"timeFormatChange"},host:{properties:{class:"hostClasses()","attr.data-open":"open() || null","attr.data-calendar":"calendar()","attr.data-time-format":"timeFormat()","attr.data-city":"cityLabel()","attr.data-weather":"weather()?.label || null"}},ngImport:t,template:`
|
|
7654
7672
|
<div
|
|
7655
7673
|
class="flex min-h-(--size-topbar) w-full min-w-0 max-w-full flex-wrap items-center
|
|
7656
7674
|
justify-between gap-x-sm px-(--wrapper-padding) md:h-(--size-topbar)
|
|
@@ -8068,7 +8086,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
8068
8086
|
</button>
|
|
8069
8087
|
</div>
|
|
8070
8088
|
</dga-dialog>
|
|
8071
|
-
`,changeDetection:h.OnPush,host:{"[class]":"hostClasses()","[attr.data-open]":"open() || null","[attr.data-calendar]":"calendar()","[attr.data-time-format]":"timeFormat()","[attr.data-city]":"cityLabel()","[attr.data-weather]":"weather()?.label || null"},styles:[":host .dga-top-bar-meta{scrollbar-width:none;-webkit-overflow-scrolling:touch}:host .dga-top-bar-meta::-webkit-scrollbar{display:none}\n"]}]}],ctorParameters:()=>[],propDecorators:{open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],calendar:[{type:t.Input,args:[{isSignal:!0,alias:"calendar",required:!1}]},{type:t.Output,args:["calendarChange"]}],timeFormat:[{type:t.Input,args:[{isSignal:!0,alias:"timeFormat",required:!1}]},{type:t.Output,args:["timeFormatChange"]}],showDate:[{type:t.Input,args:[{isSignal:!0,alias:"showDate",required:!1}]}],showTime:[{type:t.Input,args:[{isSignal:!0,alias:"showTime",required:!1}]}],showWeather:[{type:t.Input,args:[{isSignal:!0,alias:"showWeather",required:!1}]}],showLocation:[{type:t.Input,args:[{isSignal:!0,alias:"showLocation",required:!1}]}],autoRequestLocation:[{type:t.Input,args:[{isSignal:!0,alias:"autoRequestLocation",required:!1}]}],locale:[{type:t.Input,args:[{isSignal:!0,alias:"locale",required:!1}]}],regionLabel:[{type:t.Input,args:[{isSignal:!0,alias:"regionLabel",required:!1}]}],stampLabel:[{type:t.Input,args:[{isSignal:!0,alias:"stampLabel",required:!1}]}],tabTextLg:[{type:t.Input,args:[{isSignal:!0,alias:"tabTextLg",required:!1}]}],tabTextSm:[{type:t.Input,args:[{isSignal:!0,alias:"tabTextSm",required:!1}]}],verifyText:[{type:t.Input,args:[{isSignal:!0,alias:"verifyText",required:!1}]}],registrationLabel:[{type:t.Input,args:[{isSignal:!0,alias:"registrationLabel",required:!1}]}],registrationId:[{type:t.Input,args:[{isSignal:!0,alias:"registrationId",required:!1}]}],registrationHref:[{type:t.Input,args:[{isSignal:!0,alias:"registrationHref",required:!1}]}],notices:[{type:t.Input,args:[{isSignal:!0,alias:"notices",required:!1}]}]}});function
|
|
8089
|
+
`,changeDetection:h.OnPush,host:{"[class]":"hostClasses()","[attr.data-open]":"open() || null","[attr.data-calendar]":"calendar()","[attr.data-time-format]":"timeFormat()","[attr.data-city]":"cityLabel()","[attr.data-weather]":"weather()?.label || null"},styles:[":host .dga-top-bar-meta{scrollbar-width:none;-webkit-overflow-scrolling:touch}:host .dga-top-bar-meta::-webkit-scrollbar{display:none}\n"]}]}],ctorParameters:()=>[],propDecorators:{open:[{type:t.Input,args:[{isSignal:!0,alias:"open",required:!1}]},{type:t.Output,args:["openChange"]}],calendar:[{type:t.Input,args:[{isSignal:!0,alias:"calendar",required:!1}]},{type:t.Output,args:["calendarChange"]}],timeFormat:[{type:t.Input,args:[{isSignal:!0,alias:"timeFormat",required:!1}]},{type:t.Output,args:["timeFormatChange"]}],showDate:[{type:t.Input,args:[{isSignal:!0,alias:"showDate",required:!1}]}],showTime:[{type:t.Input,args:[{isSignal:!0,alias:"showTime",required:!1}]}],showWeather:[{type:t.Input,args:[{isSignal:!0,alias:"showWeather",required:!1}]}],showLocation:[{type:t.Input,args:[{isSignal:!0,alias:"showLocation",required:!1}]}],autoRequestLocation:[{type:t.Input,args:[{isSignal:!0,alias:"autoRequestLocation",required:!1}]}],locale:[{type:t.Input,args:[{isSignal:!0,alias:"locale",required:!1}]}],regionLabel:[{type:t.Input,args:[{isSignal:!0,alias:"regionLabel",required:!1}]}],stampLabel:[{type:t.Input,args:[{isSignal:!0,alias:"stampLabel",required:!1}]}],tabTextLg:[{type:t.Input,args:[{isSignal:!0,alias:"tabTextLg",required:!1}]}],tabTextSm:[{type:t.Input,args:[{isSignal:!0,alias:"tabTextSm",required:!1}]}],verifyText:[{type:t.Input,args:[{isSignal:!0,alias:"verifyText",required:!1}]}],registrationLabel:[{type:t.Input,args:[{isSignal:!0,alias:"registrationLabel",required:!1}]}],registrationId:[{type:t.Input,args:[{isSignal:!0,alias:"registrationId",required:!1}]}],registrationHref:[{type:t.Input,args:[{isSignal:!0,alias:"registrationHref",required:!1}]}],notices:[{type:t.Input,args:[{isSignal:!0,alias:"notices",required:!1}]}]}});function ei(d,e){const a=new Intl.DateTimeFormat("en-US",{...e,timeZone:"Asia/Riyadh"}).formatToParts(d),s={};for(const r of a)r.type!=="literal"&&(s[r.type]=r.value);return s}function Kn(d,e){const a=new Intl.DateTimeFormat("en-US-u-ca-islamic-umalqura",{day:"numeric",month:"numeric",year:"numeric",timeZone:"Asia/Riyadh"}).formatToParts(d),s=p=>parseInt(a.find(g=>g.type===p)?.value??"0",10),r=s("day"),l=s("month"),u=s("year"),o=Pe(e)?"ar":"en",c=En[o][Math.max(0,l-1)]??"";return Pe(e)?`${r}-${c}-${u} هـ`:`${r}-${c}-${u} AH`}function Wn(d,e){const a=ei(d,{day:"numeric",month:"numeric",year:"numeric"}),s=parseInt(a.day??"0",10),r=parseInt(a.month??"0",10),l=a.year??"",u=Pe(e)?"ar":"en",o=$n[u][Math.max(0,r-1)]??"";return`${s}-${o}-${l}`}function Yn(d,e,a){const s=ei(d,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}),r=parseInt(s.hour??"0",10),l=(s.minute??"00").padStart(2,"0");if(a==="24")return`${String(r).padStart(2,"0")}:${l}`;const u=r%12||12,o=r>=12,c=Pe(e)?o?"مساءً":"صباحاً":o?"PM":"AM";return`${u}:${l} ${c}`}async function Un(){try{const d=navigator.permissions;return d?.query?(await d.query({name:"geolocation"})).state:"unknown"}catch{return"unknown"}}function Gn(){try{return sessionStorage.getItem(Zs)==="1"}catch{return!1}}function ti(){try{sessionStorage.setItem(Zs,"1")}catch{}}class pa{baseHref=x(gs,{optional:!0})??x(ms).getBaseHrefFromDOM()??"/";brand=i("",...ngDevMode?[{debugName:"brand"}]:[]);title=i("",...ngDevMode?[{debugName:"title"}]:[]);links=i([],...ngDevMode?[{debugName:"links"}]:[]);columns=i([],...ngDevMode?[{debugName:"columns"}]:[]);iconGroups=i([],...ngDevMode?[{debugName:"iconGroups"}]:[]);bottomLinks=i([],...ngDevMode?[{debugName:"bottomLinks"}]:[]);policyLinks=i([],...ngDevMode?[{debugName:"policyLinks"}]:[]);logos=i([],...ngDevMode?[{debugName:"logos"}]:[]);copyright=i("",...ngDevMode?[{debugName:"copyright"}]:[]);meta=i("",...ngDevMode?[{debugName:"meta"}]:[]);appearance=i("default",...ngDevMode?[{debugName:"appearance"}]:[]);navLabel=i("",...ngDevMode?[{debugName:"navLabel"}]:[]);ariaLabel=i("",...ngDevMode?[{debugName:"ariaLabel"}]:[]);appHref(e){return K(e,this.baseHref)}showBottom=n(()=>!!(this.copyright()||this.meta()||this.bottomLinks().length||this.policyLinks().length||this.logos().length),...ngDevMode?[{debugName:"showBottom"}]:[]);navGridClass=n(()=>f("dga-footer__nav grid gap-3xl sm:grid-cols-2",this.iconGroups().length?"lg:grid-cols-5":"lg:grid-cols-4"),...ngDevMode?[{debugName:"navGridClass"}]:[]);hostClass=n(()=>f("block",this.appearance()==="brand"?"border-0 bg-footer text-on-color":"border-t border-border bg-surface text-fg"),...ngDevMode?[{debugName:"hostClass"}]:[]);headingClass=n(()=>f("m-0 border-b pb-md text-body-md font-semibold",this.appearance()==="brand"?"border-white/25 text-on-color":"border-border text-display"),...ngDevMode?[{debugName:"headingClass"}]:[]);textLinkClass=n(()=>f("inline-flex items-center gap-sm text-body-sm underline-offset-2","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",this.appearance()==="brand"?"text-on-color hover:text-on-color-muted hover:underline":"text-paragraph hover:text-fg-primary hover:underline"),...ngDevMode?[{debugName:"textLinkClass"}]:[]);bottomLinkClass=n(()=>f("text-body-sm leading-6 no-underline underline-offset-[0.2em]","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",this.appearance()==="brand"?"text-on-color hover:underline":"text-muted hover:text-fg-primary hover:underline"),...ngDevMode?[{debugName:"bottomLinkClass"}]:[]);copyrightClass=n(()=>f("m-0 text-body-sm leading-5",this.appearance()==="brand"?"text-on-color/60":"text-muted"),...ngDevMode?[{debugName:"copyrightClass"}]:[]);metaClass=n(()=>f(this.copyrightClass(),"dga-footer__meta"),...ngDevMode?[{debugName:"metaClass"}]:[]);dividerClass=n(()=>f("my-3xl border-0 border-t",this.appearance()==="brand"?"border-white/20":"border-border"),...ngDevMode?[{debugName:"dividerClass"}]:[]);iconBtnClass=n(()=>f("inline-flex size-10 items-center justify-center rounded-md border transition-colors","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus",this.appearance()==="brand"?"border-white/30 text-on-color hover:border-white/55 hover:bg-white/10":"border-border text-fg hover:bg-neutral-light"),...ngDevMode?[{debugName:"iconBtnClass"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:pa,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:pa,isStandalone:!0,selector:"dga-footer",inputs:{brand:{classPropertyName:"brand",publicName:"brand",isSignal:!0,isRequired:!1,transformFunction:null},title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},links:{classPropertyName:"links",publicName:"links",isSignal:!0,isRequired:!1,transformFunction:null},columns:{classPropertyName:"columns",publicName:"columns",isSignal:!0,isRequired:!1,transformFunction:null},iconGroups:{classPropertyName:"iconGroups",publicName:"iconGroups",isSignal:!0,isRequired:!1,transformFunction:null},bottomLinks:{classPropertyName:"bottomLinks",publicName:"bottomLinks",isSignal:!0,isRequired:!1,transformFunction:null},policyLinks:{classPropertyName:"policyLinks",publicName:"policyLinks",isSignal:!0,isRequired:!1,transformFunction:null},logos:{classPropertyName:"logos",publicName:"logos",isSignal:!0,isRequired:!1,transformFunction:null},copyright:{classPropertyName:"copyright",publicName:"copyright",isSignal:!0,isRequired:!1,transformFunction:null},meta:{classPropertyName:"meta",publicName:"meta",isSignal:!0,isRequired:!1,transformFunction:null},appearance:{classPropertyName:"appearance",publicName:"appearance",isSignal:!0,isRequired:!1,transformFunction:null},navLabel:{classPropertyName:"navLabel",publicName:"navLabel",isSignal:!0,isRequired:!1,transformFunction:null},ariaLabel:{classPropertyName:"ariaLabel",publicName:"ariaLabel",isSignal:!0,isRequired:!1,transformFunction:null}},host:{attributes:{role:"contentinfo"},properties:{class:"hostClass()","attr.aria-label":"ariaLabel() || null","attr.data-appearance":"appearance()"}},ngImport:t,template:`
|
|
8072
8090
|
<div class="w-full px-(--wrapper-padding) py-4xl lg:py-8xl">
|
|
8073
8091
|
<div class="empty:hidden mb-3xl">
|
|
8074
8092
|
<ng-content select="[dgaFooterBrand]" />
|
|
@@ -8352,7 +8370,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
8352
8370
|
</div>
|
|
8353
8371
|
}
|
|
8354
8372
|
</div>
|
|
8355
|
-
`,changeDetection:h.OnPush,host:{role:"contentinfo","[class]":"hostClass()","[attr.aria-label]":"ariaLabel() || null","[attr.data-appearance]":"appearance()"},styles:[":host .dga-footer__bottom-links{column-gap:0;row-gap:.5rem;align-items:center}:host .dga-footer__bottom-links>a:not(:last-child):after{content:\"|\";margin-inline:.75rem;pointer-events:none}:host[data-appearance=brand] .dga-footer__bottom-links>a:not(:last-child):after{color:#fff}:host .dga-footer__legal p{margin:0;white-space:pre-line}:host .dga-footer__meta{padding-block:1rem}:host .dga-footer__logos{gap:1.5rem}:host .dga-footer__logos img{height:2.75rem;max-height:48px}\n"]}]}],propDecorators:{brand:[{type:t.Input,args:[{isSignal:!0,alias:"brand",required:!1}]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],links:[{type:t.Input,args:[{isSignal:!0,alias:"links",required:!1}]}],columns:[{type:t.Input,args:[{isSignal:!0,alias:"columns",required:!1}]}],iconGroups:[{type:t.Input,args:[{isSignal:!0,alias:"iconGroups",required:!1}]}],bottomLinks:[{type:t.Input,args:[{isSignal:!0,alias:"bottomLinks",required:!1}]}],policyLinks:[{type:t.Input,args:[{isSignal:!0,alias:"policyLinks",required:!1}]}],logos:[{type:t.Input,args:[{isSignal:!0,alias:"logos",required:!1}]}],copyright:[{type:t.Input,args:[{isSignal:!0,alias:"copyright",required:!1}]}],meta:[{type:t.Input,args:[{isSignal:!0,alias:"meta",required:!1}]}],appearance:[{type:t.Input,args:[{isSignal:!0,alias:"appearance",required:!1}]}],navLabel:[{type:t.Input,args:[{isSignal:!0,alias:"navLabel",required:!1}]}],ariaLabel:[{type:t.Input,args:[{isSignal:!0,alias:"ariaLabel",required:!1}]}]}});const Xn=48,ti=8;function ns(d){return d instanceof Element&&!!d.closest('a, button, input, textarea, select, [role="tab"]')}class ai{originX=0;originY=0;tracking=!1;horizontal=!1;pointerId=null;start(e){return e.pointerType==="mouse"&&e.button!==0?!1:(this.tracking=!0,this.horizontal=!1,this.originX=e.clientX,this.originY=e.clientY,this.pointerId=e.pointerId,!0)}move(e){if(!this.tracking||e.pointerId!==this.pointerId)return"none";if(this.horizontal)return"horizontal";const a=e.clientX-this.originX,s=e.clientY-this.originY;return Math.abs(a)<ti&&Math.abs(s)<ti?"none":Math.abs(a)>Math.abs(s)?(this.horizontal=!0,"horizontal"):(this.tracking=!1,"ignored")}end(e,a){if(!this.tracking||e.pointerId!==this.pointerId)return this.reset(),null;const s=e.clientX-this.originX,r=e.clientY-this.originY;return this.reset(),Math.abs(s)<Xn||Math.abs(s)<=Math.abs(r)?null:a?s>0?"next":"prev":s<0?"next":"prev"}cancel(e){e&&this.pointerId!==null&&e.pointerId!==this.pointerId||this.reset()}reset(){this.tracking=!1,this.horizontal=!1,this.pointerId=null}}const Zn={primary:"bg-primary-strong/80",dark:"bg-overlay",none:""},Jn={none:{},fade:{"mask-image":"linear-gradient(to bottom, #000 65%, transparent 100%)","-webkit-mask-image":"linear-gradient(to bottom, #000 65%, transparent 100%)"},angle:{"clip-path":"polygon(0 0, 100% 0, 100% 100%, 0 88%)"},wave:{"clip-path":"polygon(0% 0%,100% 0%,100% 86%,92% 91%,84% 86%,76% 93%,68% 86%,60% 91%,52% 85%,44% 92%,36% 86%,28% 91%,20% 85%,12% 91%,4% 86%,0% 89%)"}};class ga{destroyRef=x(L);host=x(F);doc=x(ja);swipe=new ai;autoplayTimer=null;autoplayPaused=y(!1,...ngDevMode?[{debugName:"autoplayPaused"}]:[]);motionReady=y(!1,...ngDevMode?[{debugName:"motionReady"}]:[]);lcpPreloadHref=null;title=i("",...ngDevMode?[{debugName:"title"}]:[]);description=i("",...ngDevMode?[{debugName:"description"}]:[]);subtitle=i("",...ngDevMode?[{debugName:"subtitle"}]:[]);primaryCta=i("",...ngDevMode?[{debugName:"primaryCta"}]:[]);secondaryCta=i("",...ngDevMode?[{debugName:"secondaryCta"}]:[]);primaryHref=i("",...ngDevMode?[{debugName:"primaryHref"}]:[]);secondaryHref=i("",...ngDevMode?[{debugName:"secondaryHref"}]:[]);imageDesktop=i("",...ngDevMode?[{debugName:"imageDesktop"}]:[]);imageMobile=i("",...ngDevMode?[{debugName:"imageMobile"}]:[]);imageUrl=i("",...ngDevMode?[{debugName:"imageUrl"}]:[]);imageOverlay=i("primary",...ngDevMode?[{debugName:"imageOverlay"}]:[]);imageMaskVariant=i("none",...ngDevMode?[{debugName:"imageMaskVariant"}]:[]);slides=i([],...ngDevMode?[{debugName:"slides"}]:[]);activeIndex=S(0,...ngDevMode?[{debugName:"activeIndex"}]:[]);appearance=i("default",...ngDevMode?[{debugName:"appearance"}]:[]);transition=i("push",...ngDevMode?[{debugName:"transition"}]:[]);autoplay=i(!1,{...ngDevMode?{debugName:"autoplay"}:{},transform:m});autoplayMs=i(6e3,...ngDevMode?[{debugName:"autoplayMs"}]:[]);showDots=i(!0,{...ngDevMode?{debugName:"showDots"}:{},transform:m});showArrows=i(!1,{...ngDevMode?{debugName:"showArrows"}:{},transform:m});dotsLabel=i("شرائح القسم الرئيسي",...ngDevMode?[{debugName:"dotsLabel"}]:[]);prevLabel=i("الشريحة السابقة",...ngDevMode?[{debugName:"prevLabel"}]:[]);nextLabel=i("الشريحة التالية",...ngDevMode?[{debugName:"nextLabel"}]:[]);primaryClick=w();secondaryClick=w();slideChange=w();slideCount=n(()=>this.slides().length,...ngDevMode?[{debugName:"slideCount"}]:[]);isCarousel=n(()=>this.appearance()==="portal"&&this.slideCount()>0,...ngDevMode?[{debugName:"isCarousel"}]:[]);isCompactBand=n(()=>this.appearance()==="sub"||this.appearance()==="flat",...ngDevMode?[{debugName:"isCompactBand"}]:[]);slideIndexes=n(()=>Array.from({length:this.slideCount()},(e,a)=>a),...ngDevMode?[{debugName:"slideIndexes"}]:[]);hostClasses=n(()=>f("relative block w-full max-w-full min-w-0 overflow-hidden text-fg",(this.appearance()==="default"||this.appearance()==="aside"||this.appearance()==="brief")&&"bg-linear-to-b from-primary-faint to-body",this.appearance()==="portal"&&"min-h-(--size-hero-portal) bg-primary-strong text-on-color",this.appearance()==="sub"&&"bg-primary-faint",this.appearance()==="flat"&&"border-b border-border bg-body"),...ngDevMode?[{debugName:"hostClasses"}]:[]);innerClasses=n(()=>f("dga-hero__inner relative z-[1] flex w-full flex-col gap-3xl px-(--wrapper-padding)",this.appearance()==="default"&&"py-4xl md:flex-row md:items-center lg:py-11xl",this.appearance()==="portal"&&"min-h-(--size-hero-portal) justify-center py-8xl md:py-11xl",this.appearance()==="aside"&&"gap-4xl py-4xl md:flex-row md:items-center lg:py-8xl",this.appearance()==="brief"&&"gap-lg py-3xl md:py-4xl",this.isCompactBand()&&"min-h-(--size-hero-sub) justify-center gap-lg py-2xl md:py-3xl"),...ngDevMode?[{debugName:"innerClasses"}]:[]);titleClasses=n(()=>f("m-0 font-semibold",(this.appearance()==="default"||this.appearance()==="aside")&&"text-display-lg text-display md:text-display-xl",this.appearance()==="portal"&&"text-display-xl text-on-color",this.appearance()==="brief"&&"text-display-md text-display md:text-display-lg",this.isCompactBand()&&"text-display-sm text-display md:text-display-md"),...ngDevMode?[{debugName:"titleClasses"}]:[]);subtitleClasses=n(()=>f("m-0 max-w-(--container-3xl) text-body-lg",(this.appearance()==="default"||this.appearance()==="aside")&&"text-paragraph",this.appearance()==="portal"&&"text-on-color opacity-90",(this.appearance()==="brief"||this.isCompactBand())&&"max-w-(--container-2xl) text-body-md text-paragraph"),...ngDevMode?[{debugName:"subtitleClasses"}]:[]);imageMaskStyle=n(()=>Jn[this.imageMaskVariant()],...ngDevMode?[{debugName:"imageMaskStyle"}]:[]);constructor(){M(()=>{const e=this.autoplay()&&this.slideCount()>1,a=this.autoplayMs(),s=this.autoplayPaused();this.clearAutoplay(),!(!e||s)&&(this.autoplayTimer=setInterval(()=>this.nextSlide(),Math.max(2e3,a)))}),queueMicrotask(()=>{const e=typeof window<"u"?window:null;e?.requestAnimationFrame(()=>{e.requestAnimationFrame(()=>this.motionReady.set(!0))})}),this.destroyRef.onDestroy(()=>this.clearAutoplay()),M(()=>{const e=this.lcpImage();!e||this.lcpPreloadHref||(this.lcpPreloadHref=e.desktop,this.mountLcpPreload(e.desktop,e.mobile))})}portalCtaVariant(){return this.appearance()==="portal"?"inverse":"primary"}secondaryCtaVariant(){return this.appearance()==="portal"?"outlineInverse":"outline"}slideInactive(e){return this.clampedIndex()!==e}slideShellClass(e){const a=this.clampedIndex()===e,s=this.motionReady();return this.transition()==="fade"?f("absolute inset-0 min-h-(--size-hero-portal)",s&&"transition-opacity duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]",a?"z-[1] opacity-100":"z-0 opacity-0 pointer-events-none"):f("absolute inset-0 z-[1] min-h-(--size-hero-portal)",s&&"transition-transform duration-500 ease-[cubic-bezier(0.4,0,0.2,1)] will-change-transform",!a&&"pointer-events-none")}clampedIndex(){const e=this.slideCount();return e<=0?0:Math.min(Math.max(0,this.activeIndex()),e-1)}activeTitle(){return this.title()}activeDescription(){return this.description()||this.subtitle()}singleDesktopImage(){return this.imageDesktop()||this.imageUrl()}singleMobileImage(){return this.imageMobile()||this.singleDesktopImage()}slideTitle(e){return e.title??""}slideDescription(e){return e.description||e.subtitle||""}slideDesktop(e){return e.imageDesktop||e.imageUrl||""}slideMobile(e){return e.imageMobile||this.slideDesktop(e)}ctaPrimary(e){return e.primaryCta||""}ctaSecondary(e){return e.secondaryCta||""}ctaPrimaryHref(e){return e.primaryHref||""}ctaSecondaryHref(e){return e.secondaryHref||""}dotLabel(e){return`الشريحة ${e+1}`}dotClass(e){return this.activeIndex()===e?"bg-primary":"bg-disabled hover:bg-border"}overlayClass(e){return Zn[e??this.imageOverlay()]}slideOverlayClass(e){return this.overlayClass(e.overlay??this.imageOverlay())}pushOffset(e){const a=e-this.clampedIndex(),s=Xa()?-1:1;return`translate3d(${a*s*100}%, 0, 0)`}goSlide(e){const a=this.slideCount();if(a<=0)return;const s=Math.min(Math.max(0,e),a-1);s!==this.activeIndex()&&(this.activeIndex.set(s),this.slideChange.emit(s))}nextSlide(){const e=this.slideCount();e<=1||this.goSlide((this.clampedIndex()+1)%e)}prevSlide(){const e=this.slideCount();e<=1||this.goSlide((this.clampedIndex()-1+e)%e)}onPointerDown(e){!this.isCarousel()||this.slideCount()<=1||ns(e.target)||this.swipe.start(e)&&(e.currentTarget?.setPointerCapture?.(e.pointerId),this.pauseAutoplay())}onPointerMove(e){this.swipe.move(e)==="horizontal"&&e.preventDefault()}onPointerUp(e){const a=this.swipe.end(e,this.isRtl());this.resumeAutoplay(),a&&(a==="next"?this.nextSlide():this.prevSlide())}onPointerCancel(e){this.swipe.cancel(e),this.resumeAutoplay()}isRtl(){const e=this.host.nativeElement.getAttribute("dir")||this.host.nativeElement.closest("[dir]")?.getAttribute("dir");return e?e.toLowerCase()==="rtl":Xa()}lcpImage(){if(this.appearance()!=="portal")return null;if(this.isCarousel()){const a=this.slides()[0];if(!a)return null;const s=this.slideDesktop(a);return s?{desktop:s,mobile:this.slideMobile(a)}:null}const e=this.singleDesktopImage();return e?{desktop:e,mobile:this.singleMobileImage()}:null}mountLcpPreload(e,a){if(a&&a!==e){this.upsertImagePreload(a,"(max-width: 767px)"),this.upsertImagePreload(e,"(min-width: 768px)");return}this.upsertImagePreload(e)}upsertImagePreload(e,a){const s=this.doc?.head;if(!s||!e)return;const r=a??"";for(const u of s.querySelectorAll('link[rel="preload"][as="image"]')){const o=u;if(o.getAttribute("href")===e&&(o.getAttribute("media")??"")===r)return}const l=this.doc.createElement("link");l.rel="preload",l.as="image",l.href=e,l.setAttribute("fetchpriority","high"),e.split("?")[0].endsWith(".webp")&&(l.type="image/webp"),a&&(l.media=a),s.appendChild(l)}pauseAutoplay(){this.autoplayPaused.set(!0)}resumeAutoplay(){this.autoplayPaused.set(!1)}onPrimary(e){this.primaryClick.emit(e??void 0)}onSecondary(e){this.secondaryClick.emit(e??void 0)}clearAutoplay(){this.autoplayTimer!==null&&(clearInterval(this.autoplayTimer),this.autoplayTimer=null)}safeHref(e){return K(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ga,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:ga,isStandalone:!0,selector:"dga-hero",inputs:{title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},description:{classPropertyName:"description",publicName:"description",isSignal:!0,isRequired:!1,transformFunction:null},subtitle:{classPropertyName:"subtitle",publicName:"subtitle",isSignal:!0,isRequired:!1,transformFunction:null},primaryCta:{classPropertyName:"primaryCta",publicName:"primaryCta",isSignal:!0,isRequired:!1,transformFunction:null},secondaryCta:{classPropertyName:"secondaryCta",publicName:"secondaryCta",isSignal:!0,isRequired:!1,transformFunction:null},primaryHref:{classPropertyName:"primaryHref",publicName:"primaryHref",isSignal:!0,isRequired:!1,transformFunction:null},secondaryHref:{classPropertyName:"secondaryHref",publicName:"secondaryHref",isSignal:!0,isRequired:!1,transformFunction:null},imageDesktop:{classPropertyName:"imageDesktop",publicName:"imageDesktop",isSignal:!0,isRequired:!1,transformFunction:null},imageMobile:{classPropertyName:"imageMobile",publicName:"imageMobile",isSignal:!0,isRequired:!1,transformFunction:null},imageUrl:{classPropertyName:"imageUrl",publicName:"imageUrl",isSignal:!0,isRequired:!1,transformFunction:null},imageOverlay:{classPropertyName:"imageOverlay",publicName:"imageOverlay",isSignal:!0,isRequired:!1,transformFunction:null},imageMaskVariant:{classPropertyName:"imageMaskVariant",publicName:"imageMaskVariant",isSignal:!0,isRequired:!1,transformFunction:null},slides:{classPropertyName:"slides",publicName:"slides",isSignal:!0,isRequired:!1,transformFunction:null},activeIndex:{classPropertyName:"activeIndex",publicName:"activeIndex",isSignal:!0,isRequired:!1,transformFunction:null},appearance:{classPropertyName:"appearance",publicName:"appearance",isSignal:!0,isRequired:!1,transformFunction:null},transition:{classPropertyName:"transition",publicName:"transition",isSignal:!0,isRequired:!1,transformFunction:null},autoplay:{classPropertyName:"autoplay",publicName:"autoplay",isSignal:!0,isRequired:!1,transformFunction:null},autoplayMs:{classPropertyName:"autoplayMs",publicName:"autoplayMs",isSignal:!0,isRequired:!1,transformFunction:null},showDots:{classPropertyName:"showDots",publicName:"showDots",isSignal:!0,isRequired:!1,transformFunction:null},showArrows:{classPropertyName:"showArrows",publicName:"showArrows",isSignal:!0,isRequired:!1,transformFunction:null},dotsLabel:{classPropertyName:"dotsLabel",publicName:"dotsLabel",isSignal:!0,isRequired:!1,transformFunction:null},prevLabel:{classPropertyName:"prevLabel",publicName:"prevLabel",isSignal:!0,isRequired:!1,transformFunction:null},nextLabel:{classPropertyName:"nextLabel",publicName:"nextLabel",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{activeIndex:"activeIndexChange",primaryClick:"primaryClick",secondaryClick:"secondaryClick",slideChange:"slideChange"},host:{properties:{class:"hostClasses()","attr.data-appearance":"appearance()","attr.data-transition":"isCarousel() ? transition() : null","attr.data-dots":'isCarousel() && showDots() ? "" : null',"attr.data-arrows":'isCarousel() && showArrows() ? "" : null'}},ngImport:t,template:`
|
|
8373
|
+
`,changeDetection:h.OnPush,host:{role:"contentinfo","[class]":"hostClass()","[attr.aria-label]":"ariaLabel() || null","[attr.data-appearance]":"appearance()"},styles:[":host .dga-footer__bottom-links{column-gap:0;row-gap:.5rem;align-items:center}:host .dga-footer__bottom-links>a:not(:last-child):after{content:\"|\";margin-inline:.75rem;pointer-events:none}:host[data-appearance=brand] .dga-footer__bottom-links>a:not(:last-child):after{color:#fff}:host .dga-footer__legal p{margin:0;white-space:pre-line}:host .dga-footer__meta{padding-block:1rem}:host .dga-footer__logos{gap:1.5rem}:host .dga-footer__logos img{height:2.75rem;max-height:48px}\n"]}]}],propDecorators:{brand:[{type:t.Input,args:[{isSignal:!0,alias:"brand",required:!1}]}],title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!1}]}],links:[{type:t.Input,args:[{isSignal:!0,alias:"links",required:!1}]}],columns:[{type:t.Input,args:[{isSignal:!0,alias:"columns",required:!1}]}],iconGroups:[{type:t.Input,args:[{isSignal:!0,alias:"iconGroups",required:!1}]}],bottomLinks:[{type:t.Input,args:[{isSignal:!0,alias:"bottomLinks",required:!1}]}],policyLinks:[{type:t.Input,args:[{isSignal:!0,alias:"policyLinks",required:!1}]}],logos:[{type:t.Input,args:[{isSignal:!0,alias:"logos",required:!1}]}],copyright:[{type:t.Input,args:[{isSignal:!0,alias:"copyright",required:!1}]}],meta:[{type:t.Input,args:[{isSignal:!0,alias:"meta",required:!1}]}],appearance:[{type:t.Input,args:[{isSignal:!0,alias:"appearance",required:!1}]}],navLabel:[{type:t.Input,args:[{isSignal:!0,alias:"navLabel",required:!1}]}],ariaLabel:[{type:t.Input,args:[{isSignal:!0,alias:"ariaLabel",required:!1}]}]}});const Xn=48,ai=8;function ns(d){return d instanceof Element&&!!d.closest('a, button, input, textarea, select, [role="tab"]')}class si{originX=0;originY=0;tracking=!1;horizontal=!1;pointerId=null;start(e){return e.pointerType==="mouse"&&e.button!==0?!1:(this.tracking=!0,this.horizontal=!1,this.originX=e.clientX,this.originY=e.clientY,this.pointerId=e.pointerId,!0)}move(e){if(!this.tracking||e.pointerId!==this.pointerId)return"none";if(this.horizontal)return"horizontal";const a=e.clientX-this.originX,s=e.clientY-this.originY;return Math.abs(a)<ai&&Math.abs(s)<ai?"none":Math.abs(a)>Math.abs(s)?(this.horizontal=!0,"horizontal"):(this.tracking=!1,"ignored")}end(e,a){if(!this.tracking||e.pointerId!==this.pointerId)return this.reset(),null;const s=e.clientX-this.originX,r=e.clientY-this.originY;return this.reset(),Math.abs(s)<Xn||Math.abs(s)<=Math.abs(r)?null:a?s>0?"next":"prev":s<0?"next":"prev"}cancel(e){e&&this.pointerId!==null&&e.pointerId!==this.pointerId||this.reset()}reset(){this.tracking=!1,this.horizontal=!1,this.pointerId=null}}const Zn={primary:"bg-primary-strong/80",dark:"bg-overlay",none:""},Jn={none:{},fade:{"mask-image":"linear-gradient(to bottom, #000 65%, transparent 100%)","-webkit-mask-image":"linear-gradient(to bottom, #000 65%, transparent 100%)"},angle:{"clip-path":"polygon(0 0, 100% 0, 100% 100%, 0 88%)"},wave:{"clip-path":"polygon(0% 0%,100% 0%,100% 86%,92% 91%,84% 86%,76% 93%,68% 86%,60% 91%,52% 85%,44% 92%,36% 86%,28% 91%,20% 85%,12% 91%,4% 86%,0% 89%)"}};class ga{destroyRef=x(L);host=x(F);doc=x(ja);swipe=new si;autoplayTimer=null;autoplayPaused=y(!1,...ngDevMode?[{debugName:"autoplayPaused"}]:[]);motionReady=y(!1,...ngDevMode?[{debugName:"motionReady"}]:[]);lcpPreloadHref=null;title=i("",...ngDevMode?[{debugName:"title"}]:[]);description=i("",...ngDevMode?[{debugName:"description"}]:[]);subtitle=i("",...ngDevMode?[{debugName:"subtitle"}]:[]);primaryCta=i("",...ngDevMode?[{debugName:"primaryCta"}]:[]);secondaryCta=i("",...ngDevMode?[{debugName:"secondaryCta"}]:[]);primaryHref=i("",...ngDevMode?[{debugName:"primaryHref"}]:[]);secondaryHref=i("",...ngDevMode?[{debugName:"secondaryHref"}]:[]);imageDesktop=i("",...ngDevMode?[{debugName:"imageDesktop"}]:[]);imageMobile=i("",...ngDevMode?[{debugName:"imageMobile"}]:[]);imageUrl=i("",...ngDevMode?[{debugName:"imageUrl"}]:[]);imageOverlay=i("primary",...ngDevMode?[{debugName:"imageOverlay"}]:[]);imageMaskVariant=i("none",...ngDevMode?[{debugName:"imageMaskVariant"}]:[]);slides=i([],...ngDevMode?[{debugName:"slides"}]:[]);activeIndex=S(0,...ngDevMode?[{debugName:"activeIndex"}]:[]);appearance=i("default",...ngDevMode?[{debugName:"appearance"}]:[]);transition=i("push",...ngDevMode?[{debugName:"transition"}]:[]);autoplay=i(!1,{...ngDevMode?{debugName:"autoplay"}:{},transform:m});autoplayMs=i(6e3,...ngDevMode?[{debugName:"autoplayMs"}]:[]);showDots=i(!0,{...ngDevMode?{debugName:"showDots"}:{},transform:m});showArrows=i(!1,{...ngDevMode?{debugName:"showArrows"}:{},transform:m});dotsLabel=i("شرائح القسم الرئيسي",...ngDevMode?[{debugName:"dotsLabel"}]:[]);prevLabel=i("الشريحة السابقة",...ngDevMode?[{debugName:"prevLabel"}]:[]);nextLabel=i("الشريحة التالية",...ngDevMode?[{debugName:"nextLabel"}]:[]);primaryClick=w();secondaryClick=w();slideChange=w();slideCount=n(()=>this.slides().length,...ngDevMode?[{debugName:"slideCount"}]:[]);isCarousel=n(()=>this.appearance()==="portal"&&this.slideCount()>0,...ngDevMode?[{debugName:"isCarousel"}]:[]);isCompactBand=n(()=>this.appearance()==="sub"||this.appearance()==="flat",...ngDevMode?[{debugName:"isCompactBand"}]:[]);slideIndexes=n(()=>Array.from({length:this.slideCount()},(e,a)=>a),...ngDevMode?[{debugName:"slideIndexes"}]:[]);hostClasses=n(()=>f("relative block w-full max-w-full min-w-0 overflow-hidden text-fg",(this.appearance()==="default"||this.appearance()==="aside"||this.appearance()==="brief")&&"bg-linear-to-b from-primary-faint to-body",this.appearance()==="portal"&&"min-h-(--size-hero-portal) bg-primary-strong text-on-color",this.appearance()==="sub"&&"bg-primary-faint",this.appearance()==="flat"&&"border-b border-border bg-body"),...ngDevMode?[{debugName:"hostClasses"}]:[]);innerClasses=n(()=>f("dga-hero__inner relative z-[1] flex w-full flex-col gap-3xl px-(--wrapper-padding)",this.appearance()==="default"&&"py-4xl md:flex-row md:items-center lg:py-11xl",this.appearance()==="portal"&&"min-h-(--size-hero-portal) justify-center py-8xl md:py-11xl",this.appearance()==="aside"&&"gap-4xl py-4xl md:flex-row md:items-center lg:py-8xl",this.appearance()==="brief"&&"gap-lg py-3xl md:py-4xl",this.isCompactBand()&&"min-h-(--size-hero-sub) justify-center gap-lg py-2xl md:py-3xl"),...ngDevMode?[{debugName:"innerClasses"}]:[]);titleClasses=n(()=>f("m-0 font-semibold",(this.appearance()==="default"||this.appearance()==="aside")&&"text-display-lg text-display md:text-display-xl",this.appearance()==="portal"&&"text-display-xl text-on-color",this.appearance()==="brief"&&"text-display-md text-display md:text-display-lg",this.isCompactBand()&&"text-display-sm text-display md:text-display-md"),...ngDevMode?[{debugName:"titleClasses"}]:[]);subtitleClasses=n(()=>f("m-0 max-w-(--container-3xl) text-body-lg",(this.appearance()==="default"||this.appearance()==="aside")&&"text-paragraph",this.appearance()==="portal"&&"text-on-color opacity-90",(this.appearance()==="brief"||this.isCompactBand())&&"max-w-(--container-2xl) text-body-md text-paragraph"),...ngDevMode?[{debugName:"subtitleClasses"}]:[]);imageMaskStyle=n(()=>Jn[this.imageMaskVariant()],...ngDevMode?[{debugName:"imageMaskStyle"}]:[]);constructor(){M(()=>{const e=this.autoplay()&&this.slideCount()>1,a=this.autoplayMs(),s=this.autoplayPaused();this.clearAutoplay(),!(!e||s)&&(this.autoplayTimer=setInterval(()=>this.nextSlide(),Math.max(2e3,a)))}),queueMicrotask(()=>{const e=typeof window<"u"?window:null;e?.requestAnimationFrame(()=>{e.requestAnimationFrame(()=>this.motionReady.set(!0))})}),this.destroyRef.onDestroy(()=>this.clearAutoplay()),M(()=>{const e=this.lcpImage();!e||this.lcpPreloadHref||(this.lcpPreloadHref=e.desktop,this.mountLcpPreload(e.desktop,e.mobile))})}portalCtaVariant(){return this.appearance()==="portal"?"inverse":"primary"}secondaryCtaVariant(){return this.appearance()==="portal"?"outlineInverse":"outline"}slideInactive(e){return this.clampedIndex()!==e}slideShellClass(e){const a=this.clampedIndex()===e,s=this.motionReady();return this.transition()==="fade"?f("absolute inset-0 min-h-(--size-hero-portal)",s&&"transition-opacity duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]",a?"z-[1] opacity-100":"z-0 opacity-0 pointer-events-none"):f("absolute inset-0 z-[1] min-h-(--size-hero-portal)",s&&"transition-transform duration-500 ease-[cubic-bezier(0.4,0,0.2,1)] will-change-transform",!a&&"pointer-events-none")}clampedIndex(){const e=this.slideCount();return e<=0?0:Math.min(Math.max(0,this.activeIndex()),e-1)}activeTitle(){return this.title()}activeDescription(){return this.description()||this.subtitle()}singleDesktopImage(){return this.imageDesktop()||this.imageUrl()}singleMobileImage(){return this.imageMobile()||this.singleDesktopImage()}slideTitle(e){return e.title??""}slideDescription(e){return e.description||e.subtitle||""}slideDesktop(e){return e.imageDesktop||e.imageUrl||""}slideMobile(e){return e.imageMobile||this.slideDesktop(e)}ctaPrimary(e){return e.primaryCta||""}ctaSecondary(e){return e.secondaryCta||""}ctaPrimaryHref(e){return e.primaryHref||""}ctaSecondaryHref(e){return e.secondaryHref||""}dotLabel(e){return`الشريحة ${e+1}`}dotClass(e){return this.activeIndex()===e?"bg-primary":"bg-disabled hover:bg-border"}overlayClass(e){return Zn[e??this.imageOverlay()]}slideOverlayClass(e){return this.overlayClass(e.overlay??this.imageOverlay())}pushOffset(e){const a=e-this.clampedIndex(),s=Xa()?-1:1;return`translate3d(${a*s*100}%, 0, 0)`}goSlide(e){const a=this.slideCount();if(a<=0)return;const s=Math.min(Math.max(0,e),a-1);s!==this.activeIndex()&&(this.activeIndex.set(s),this.slideChange.emit(s))}nextSlide(){const e=this.slideCount();e<=1||this.goSlide((this.clampedIndex()+1)%e)}prevSlide(){const e=this.slideCount();e<=1||this.goSlide((this.clampedIndex()-1+e)%e)}onPointerDown(e){!this.isCarousel()||this.slideCount()<=1||ns(e.target)||this.swipe.start(e)&&(e.currentTarget?.setPointerCapture?.(e.pointerId),this.pauseAutoplay())}onPointerMove(e){this.swipe.move(e)==="horizontal"&&e.preventDefault()}onPointerUp(e){const a=this.swipe.end(e,this.isRtl());this.resumeAutoplay(),a&&(a==="next"?this.nextSlide():this.prevSlide())}onPointerCancel(e){this.swipe.cancel(e),this.resumeAutoplay()}isRtl(){const e=this.host.nativeElement.getAttribute("dir")||this.host.nativeElement.closest("[dir]")?.getAttribute("dir");return e?e.toLowerCase()==="rtl":Xa()}lcpImage(){if(this.appearance()!=="portal")return null;if(this.isCarousel()){const a=this.slides()[0];if(!a)return null;const s=this.slideDesktop(a);return s?{desktop:s,mobile:this.slideMobile(a)}:null}const e=this.singleDesktopImage();return e?{desktop:e,mobile:this.singleMobileImage()}:null}mountLcpPreload(e,a){if(a&&a!==e){this.upsertImagePreload(a,"(max-width: 767px)"),this.upsertImagePreload(e,"(min-width: 768px)");return}this.upsertImagePreload(e)}upsertImagePreload(e,a){const s=this.doc?.head;if(!s||!e)return;const r=a??"";for(const u of s.querySelectorAll('link[rel="preload"][as="image"]')){const o=u;if(o.getAttribute("href")===e&&(o.getAttribute("media")??"")===r)return}const l=this.doc.createElement("link");l.rel="preload",l.as="image",l.href=e,l.setAttribute("fetchpriority","high"),e.split("?")[0].endsWith(".webp")&&(l.type="image/webp"),a&&(l.media=a),s.appendChild(l)}pauseAutoplay(){this.autoplayPaused.set(!0)}resumeAutoplay(){this.autoplayPaused.set(!1)}onPrimary(e){this.primaryClick.emit(e??void 0)}onSecondary(e){this.secondaryClick.emit(e??void 0)}clearAutoplay(){this.autoplayTimer!==null&&(clearInterval(this.autoplayTimer),this.autoplayTimer=null)}safeHref(e){return K(e)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ga,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:ga,isStandalone:!0,selector:"dga-hero",inputs:{title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},description:{classPropertyName:"description",publicName:"description",isSignal:!0,isRequired:!1,transformFunction:null},subtitle:{classPropertyName:"subtitle",publicName:"subtitle",isSignal:!0,isRequired:!1,transformFunction:null},primaryCta:{classPropertyName:"primaryCta",publicName:"primaryCta",isSignal:!0,isRequired:!1,transformFunction:null},secondaryCta:{classPropertyName:"secondaryCta",publicName:"secondaryCta",isSignal:!0,isRequired:!1,transformFunction:null},primaryHref:{classPropertyName:"primaryHref",publicName:"primaryHref",isSignal:!0,isRequired:!1,transformFunction:null},secondaryHref:{classPropertyName:"secondaryHref",publicName:"secondaryHref",isSignal:!0,isRequired:!1,transformFunction:null},imageDesktop:{classPropertyName:"imageDesktop",publicName:"imageDesktop",isSignal:!0,isRequired:!1,transformFunction:null},imageMobile:{classPropertyName:"imageMobile",publicName:"imageMobile",isSignal:!0,isRequired:!1,transformFunction:null},imageUrl:{classPropertyName:"imageUrl",publicName:"imageUrl",isSignal:!0,isRequired:!1,transformFunction:null},imageOverlay:{classPropertyName:"imageOverlay",publicName:"imageOverlay",isSignal:!0,isRequired:!1,transformFunction:null},imageMaskVariant:{classPropertyName:"imageMaskVariant",publicName:"imageMaskVariant",isSignal:!0,isRequired:!1,transformFunction:null},slides:{classPropertyName:"slides",publicName:"slides",isSignal:!0,isRequired:!1,transformFunction:null},activeIndex:{classPropertyName:"activeIndex",publicName:"activeIndex",isSignal:!0,isRequired:!1,transformFunction:null},appearance:{classPropertyName:"appearance",publicName:"appearance",isSignal:!0,isRequired:!1,transformFunction:null},transition:{classPropertyName:"transition",publicName:"transition",isSignal:!0,isRequired:!1,transformFunction:null},autoplay:{classPropertyName:"autoplay",publicName:"autoplay",isSignal:!0,isRequired:!1,transformFunction:null},autoplayMs:{classPropertyName:"autoplayMs",publicName:"autoplayMs",isSignal:!0,isRequired:!1,transformFunction:null},showDots:{classPropertyName:"showDots",publicName:"showDots",isSignal:!0,isRequired:!1,transformFunction:null},showArrows:{classPropertyName:"showArrows",publicName:"showArrows",isSignal:!0,isRequired:!1,transformFunction:null},dotsLabel:{classPropertyName:"dotsLabel",publicName:"dotsLabel",isSignal:!0,isRequired:!1,transformFunction:null},prevLabel:{classPropertyName:"prevLabel",publicName:"prevLabel",isSignal:!0,isRequired:!1,transformFunction:null},nextLabel:{classPropertyName:"nextLabel",publicName:"nextLabel",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{activeIndex:"activeIndexChange",primaryClick:"primaryClick",secondaryClick:"secondaryClick",slideChange:"slideChange"},host:{properties:{class:"hostClasses()","attr.data-appearance":"appearance()","attr.data-transition":"isCarousel() ? transition() : null","attr.data-dots":'isCarousel() && showDots() ? "" : null',"attr.data-arrows":'isCarousel() && showArrows() ? "" : null'}},ngImport:t,template:`
|
|
8356
8374
|
@if (isCarousel()) {
|
|
8357
8375
|
<div
|
|
8358
8376
|
class="relative min-h-(--size-hero-portal) w-full touch-pan-y"
|
|
@@ -9042,7 +9060,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
9042
9060
|
</div>
|
|
9043
9061
|
</div>
|
|
9044
9062
|
</section>
|
|
9045
|
-
`,changeDetection:h.OnPush,host:{class:"block","[attr.data-tone]":"tone()"},styles:[":host .dga-page-hero__head:after{content:\"\";display:table;clear:both}:host .dga-page-hero__actions{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;gap:var(--dga-spacing-sm, .5rem);margin-block-end:var(--dga-spacing-md, .75rem);width:100%}@media(min-width:1024px){:host .dga-page-hero__actions{float:inline-end;flex-direction:column;width:max-content;min-width:9.25rem;margin-inline-start:var(--dga-spacing-xl, 1.25rem)}}\n"]}]}],propDecorators:{title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!0}]}],description:[{type:t.Input,args:[{isSignal:!0,alias:"description",required:!1}]}],breadcrumbs:[{type:t.Input,args:[{isSignal:!0,alias:"breadcrumbs",required:!1}]}],breadcrumbLabel:[{type:t.Input,args:[{isSignal:!0,alias:"breadcrumbLabel",required:!1}]}],breadcrumbMaxItems:[{type:t.Input,args:[{isSignal:!0,alias:"breadcrumbMaxItems",required:!1}]}],breadcrumbTruncate:[{type:t.Input,args:[{isSignal:!0,alias:"breadcrumbTruncate",required:!1}]}],breadcrumbMoreLabel:[{type:t.Input,args:[{isSignal:!0,alias:"breadcrumbMoreLabel",required:!1}]}],tone:[{type:t.Input,args:[{isSignal:!0,alias:"tone",required:!1}]}],compact:[{type:t.Input,args:[{isSignal:!0,alias:"compact",required:!1}]}]}});const
|
|
9063
|
+
`,changeDetection:h.OnPush,host:{class:"block","[attr.data-tone]":"tone()"},styles:[":host .dga-page-hero__head:after{content:\"\";display:table;clear:both}:host .dga-page-hero__actions{display:flex;flex-direction:row;flex-wrap:wrap;align-items:stretch;gap:var(--dga-spacing-sm, .5rem);margin-block-end:var(--dga-spacing-md, .75rem);width:100%}@media(min-width:1024px){:host .dga-page-hero__actions{float:inline-end;flex-direction:column;width:max-content;min-width:9.25rem;margin-inline-start:var(--dga-spacing-xl, 1.25rem)}}\n"]}]}],propDecorators:{title:[{type:t.Input,args:[{isSignal:!0,alias:"title",required:!0}]}],description:[{type:t.Input,args:[{isSignal:!0,alias:"description",required:!1}]}],breadcrumbs:[{type:t.Input,args:[{isSignal:!0,alias:"breadcrumbs",required:!1}]}],breadcrumbLabel:[{type:t.Input,args:[{isSignal:!0,alias:"breadcrumbLabel",required:!1}]}],breadcrumbMaxItems:[{type:t.Input,args:[{isSignal:!0,alias:"breadcrumbMaxItems",required:!1}]}],breadcrumbTruncate:[{type:t.Input,args:[{isSignal:!0,alias:"breadcrumbTruncate",required:!1}]}],breadcrumbMoreLabel:[{type:t.Input,args:[{isSignal:!0,alias:"breadcrumbMoreLabel",required:!1}]}],tone:[{type:t.Input,args:[{isSignal:!0,alias:"tone",required:!1}]}],compact:[{type:t.Input,args:[{isSignal:!0,alias:"compact",required:!1}]}]}});const ii="--dga-announcement-offset",Qn={info:"primary",warning:"warning",success:"success",critical:"error",neutral:"muted",brand:"primary"};class fa{title=i("",...ngDevMode?[{debugName:"title"}]:[]);message=i("",...ngDevMode?[{debugName:"message"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);tone=i("info",...ngDevMode?[{debugName:"tone"}]:[]);density=i("compact",...ngDevMode?[{debugName:"density"}]:[]);align=i("start",...ngDevMode?[{debugName:"align"}]:[]);actionVariant=i("chip",...ngDevMode?[{debugName:"actionVariant"}]:[]);elevation=i("none",...ngDevMode?[{debugName:"elevation"}]:[]);icon=i("info",...ngDevMode?[{debugName:"icon"}]:[]);dismissible=i(!0,{...ngDevMode?{debugName:"dismissible"}:{},transform:m});dismissLabel=i("Dismiss",...ngDevMode?[{debugName:"dismissLabel"}]:[]);actionLabel=i("",...ngDevMode?[{debugName:"actionLabel"}]:[]);actionHref=i("",...ngDevMode?[{debugName:"actionHref"}]:[]);actionExternal=i(!1,{...ngDevMode?{debugName:"actionExternal"}:{},transform:m});sticky=i(!1,{...ngDevMode?{debugName:"sticky"}:{},transform:m});accent=i(!1,{...ngDevMode?{debugName:"accent"}:{},transform:m});initiallyDismissed=i(!1,{...ngDevMode?{debugName:"initiallyDismissed"}:{},transform:m});persist=i("none",...ngDevMode?[{debugName:"persist"}]:[]);persistKey=i("",...ngDevMode?[{debugName:"persistKey"}]:[]);dismissedChange=w();closed=w();action=w();dismissed=y(!1,...ngDevMode?[{debugName:"dismissed"}]:[]);doc=x(ja);hostEl=x(F);destroyRef=x(L);resizeObserver=null;constructor(){(this.initiallyDismissed()||this.readPersisted())&&this.dismissed.set(!0),T(()=>this.bindLayoutOffset()),this.destroyRef.onDestroy(()=>{this.resizeObserver?.disconnect(),this.resizeObserver=null,this.clearLayoutOffset()}),M(()=>{(!this.sticky()||this.dismissed())&&this.clearLayoutOffset()})}bindLayoutOffset(){if(typeof ResizeObserver>"u"){requestAnimationFrame(()=>this.syncLayoutOffset());return}this.resizeObserver=new ResizeObserver(()=>this.syncLayoutOffset()),this.resizeObserver.observe(this.hostEl.nativeElement)}syncLayoutOffset(){if(!this.sticky()||this.dismissed()){this.clearLayoutOffset();return}const e=Math.round(this.hostEl.nativeElement.getBoundingClientRect().height);this.doc.documentElement.style.setProperty(ii,`${e}px`)}clearLayoutOffset(){this.doc.documentElement.style.removeProperty(ii)}iconTone=n(()=>Qn[this.tone()],...ngDevMode?[{debugName:"iconTone"}]:[]);iconShellClasses=n(()=>f("inline-flex size-4xl shrink-0 items-center justify-center rounded-full",this.tone()==="info"&&"bg-info-light text-fg-info",this.tone()==="warning"&&"bg-warning-light text-fg-warning",this.tone()==="success"&&"bg-success-light text-fg-success",this.tone()==="critical"&&"bg-error-light text-fg-error",this.tone()==="neutral"&&"bg-neutral-light text-muted",this.tone()==="brand"&&"bg-primary-faint text-fg-primary"),...ngDevMode?[{debugName:"iconShellClasses"}]:[]);barClasses=n(()=>f("w-full border-b border-border",this.elevation()==="soft"&&"shadow-sm",this.accent()&&"border-s-4",this.tone()==="info"&&"bg-info-faint",this.tone()==="warning"&&"bg-warning-faint",this.tone()==="success"&&"bg-success-faint",this.tone()==="critical"&&"bg-error-faint",this.tone()==="neutral"&&"bg-sunken",this.tone()==="brand"&&"bg-primary-faint",this.accent()&&this.tone()==="info"&&"border-s-border-info",this.accent()&&this.tone()==="warning"&&"border-s-border-warning",this.accent()&&this.tone()==="success"&&"border-s-border-success",this.accent()&&this.tone()==="critical"&&"border-s-border-error",this.accent()&&this.tone()==="neutral"&&"border-s-border",this.accent()&&this.tone()==="brand"&&"border-s-border-primary"),...ngDevMode?[{debugName:"barClasses"}]:[]);dismiss(){this.dismissed.set(!0),this.writePersisted(!0),this.dismissedChange.emit(!0),this.closed.emit()}onAction(){this.action.emit()}show(){this.dismissed.set(!1),this.writePersisted(!1),this.dismissedChange.emit(!1)}storageKey(){const e=this.persistKey().trim();return e?`dga-announcement:${e}`:`dga-announcement:${`${this.title()}|${this.message()}|${this.actionHref()}`}`}storage(){if(typeof window>"u")return null;const e=this.persist();return e==="session"?window.sessionStorage:e==="local"?window.localStorage:null}readPersisted(){try{return this.storage()?.getItem(this.storageKey())==="1"}catch{return!1}}writePersisted(e){const a=this.storage();if(a)try{e?a.setItem(this.storageKey(),"1"):a.removeItem(this.storageKey())}catch{}}safeActionHref(){return K(this.actionHref())}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:fa,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:fa,isStandalone:!0,selector:"dga-announcement-bar",inputs:{title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},message:{classPropertyName:"message",publicName:"message",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},tone:{classPropertyName:"tone",publicName:"tone",isSignal:!0,isRequired:!1,transformFunction:null},density:{classPropertyName:"density",publicName:"density",isSignal:!0,isRequired:!1,transformFunction:null},align:{classPropertyName:"align",publicName:"align",isSignal:!0,isRequired:!1,transformFunction:null},actionVariant:{classPropertyName:"actionVariant",publicName:"actionVariant",isSignal:!0,isRequired:!1,transformFunction:null},elevation:{classPropertyName:"elevation",publicName:"elevation",isSignal:!0,isRequired:!1,transformFunction:null},icon:{classPropertyName:"icon",publicName:"icon",isSignal:!0,isRequired:!1,transformFunction:null},dismissible:{classPropertyName:"dismissible",publicName:"dismissible",isSignal:!0,isRequired:!1,transformFunction:null},dismissLabel:{classPropertyName:"dismissLabel",publicName:"dismissLabel",isSignal:!0,isRequired:!1,transformFunction:null},actionLabel:{classPropertyName:"actionLabel",publicName:"actionLabel",isSignal:!0,isRequired:!1,transformFunction:null},actionHref:{classPropertyName:"actionHref",publicName:"actionHref",isSignal:!0,isRequired:!1,transformFunction:null},actionExternal:{classPropertyName:"actionExternal",publicName:"actionExternal",isSignal:!0,isRequired:!1,transformFunction:null},sticky:{classPropertyName:"sticky",publicName:"sticky",isSignal:!0,isRequired:!1,transformFunction:null},accent:{classPropertyName:"accent",publicName:"accent",isSignal:!0,isRequired:!1,transformFunction:null},initiallyDismissed:{classPropertyName:"initiallyDismissed",publicName:"initiallyDismissed",isSignal:!0,isRequired:!1,transformFunction:null},persist:{classPropertyName:"persist",publicName:"persist",isSignal:!0,isRequired:!1,transformFunction:null},persistKey:{classPropertyName:"persistKey",publicName:"persistKey",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{dismissedChange:"dismissedChange",closed:"closed",action:"action"},host:{properties:{"attr.title":"null"},classAttribute:"block w-full"},ngImport:t,template:`
|
|
9046
9064
|
@if (!dismissed()) {
|
|
9047
9065
|
<div
|
|
9048
9066
|
[class]="barClasses()"
|
|
@@ -9536,7 +9554,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
9536
9554
|
} @else {
|
|
9537
9555
|
<span>{{ label() }}</span>
|
|
9538
9556
|
}
|
|
9539
|
-
`,changeDetection:h.OnPush,host:{"[class]":"classes()","[attr.aria-label]":"label()"}}]}],propDecorators:{label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!0}]}],src:[{type:t.Input,args:[{isSignal:!0,alias:"src",required:!1}]}]}});class xa{theme=x(
|
|
9557
|
+
`,changeDetection:h.OnPush,host:{"[class]":"classes()","[attr.aria-label]":"label()"}}]}],propDecorators:{label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!0}]}],src:[{type:t.Input,args:[{isSignal:!0,alias:"src",required:!1}]}]}});class xa{theme=x(Ai);darkLabel=i("تبديل الوضع الداكن",...ngDevMode?[{debugName:"darkLabel"}]:[]);lightLabel=i("تبديل الوضع الفاتح",...ngDevMode?[{debugName:"lightLabel"}]:[]);surface=i("default",...ngDevMode?[{debugName:"surface"}]:[]);isDark=n(()=>this.theme.themeChanges()==="dark",...ngDevMode?[{debugName:"isDark"}]:[]);label=n(()=>this.isDark()?this.lightLabel():this.darkLabel(),...ngDevMode?[{debugName:"label"}]:[]);btnSize=n(()=>this.surface()==="compact"?"sm":"md",...ngDevMode?[{debugName:"btnSize"}]:[]);iconSize=n(()=>this.surface()==="compact"?"sm":"md",...ngDevMode?[{debugName:"iconSize"}]:[]);actionClass=n(()=>f("shrink-0 rounded-sm !text-fg hover:!bg-neutral-light",this.surface()==="compact"?"!size-4xl":null),...ngDevMode?[{debugName:"actionClass"}]:[]);onToggle(e){this.theme.toggle(e.currentTarget)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:xa,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.1.0",version:"22.1.5",type:xa,isStandalone:!0,selector:"dga-theme-toggle",inputs:{darkLabel:{classPropertyName:"darkLabel",publicName:"darkLabel",isSignal:!0,isRequired:!1,transformFunction:null},lightLabel:{classPropertyName:"lightLabel",publicName:"lightLabel",isSignal:!0,isRequired:!1,transformFunction:null},surface:{classPropertyName:"surface",publicName:"surface",isSignal:!0,isRequired:!1,transformFunction:null}},host:{classAttribute:"inline-flex shrink-0"},ngImport:t,template:`
|
|
9540
9558
|
<dga-tooltip
|
|
9541
9559
|
class="inline-flex shrink-0"
|
|
9542
9560
|
[text]="label()"
|
|
@@ -9578,7 +9596,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
9578
9596
|
<dga-icon [name]="isDark() ? 'sun' : 'moon'" [size]="iconSize()" />
|
|
9579
9597
|
</button>
|
|
9580
9598
|
</dga-tooltip>
|
|
9581
|
-
`,host:{class:"inline-flex shrink-0"}}]}],propDecorators:{darkLabel:[{type:t.Input,args:[{isSignal:!0,alias:"darkLabel",required:!1}]}],lightLabel:[{type:t.Input,args:[{isSignal:!0,alias:"lightLabel",required:!1}]}],surface:[{type:t.Input,args:[{isSignal:!0,alias:"surface",required:!1}]}]}});let el=0;class wa{localeService=x(
|
|
9599
|
+
`,host:{class:"inline-flex shrink-0"}}]}],propDecorators:{darkLabel:[{type:t.Input,args:[{isSignal:!0,alias:"darkLabel",required:!1}]}],lightLabel:[{type:t.Input,args:[{isSignal:!0,alias:"lightLabel",required:!1}]}],surface:[{type:t.Input,args:[{isSignal:!0,alias:"surface",required:!1}]}]}});let el=0;class wa{localeService=x(hs);hostRef=x(F);destroyRef=x(L);tooltipLabel=i(void 0,...ngDevMode?[{debugName:"tooltipLabel"}]:[]);locales=this.localeService.locales;open=y(!1,...ngDevMode?[{debugName:"open"}]:[]);locale=n(()=>this.localeService.localeChanges(),...ngDevMode?[{debugName:"locale"}]:[]);seq=++el;listId=`dga-locale-list-${this.seq}`;triggerClass=f("shrink-0 rounded-sm !text-fg hover:!bg-neutral-light");menuClass=f("absolute end-0 top-full z-dropdown mt-xs min-w-[12rem]","max-h-[min(24rem,calc(100dvh-1rem))] overflow-y-auto","rounded-md border border-border bg-card py-xs shadow-lg");tooltip=n(()=>{const e=this.tooltipLabel()?.trim();if(e)return e;const a=this.locale(),s=this.locales.find(r=>r.code===a)?.nativeName??a;return a==="ar"||a.startsWith("ar")?`اللغة: ${s}`:`Language: ${s}`},...ngDevMode?[{debugName:"tooltip"}]:[]);constructor(){this.destroyRef.onDestroy(()=>this.open.set(!1))}toggleMenu(e){e.preventDefault(),e.stopPropagation(),this.open.update(a=>!a)}pick(e,a){a.preventDefault(),a.stopPropagation(),this.open.set(!1),e!==this.locale()&&this.localeService.setLocale(e)}onDocPointer(e){if(!this.open())return;const a=e.target;a&&!this.hostRef.nativeElement.contains(a)&&this.open.set(!1)}onEscape(){this.open.set(!1)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:wa,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:wa,isStandalone:!0,selector:"dga-locale-toggle",inputs:{tooltipLabel:{classPropertyName:"tooltipLabel",publicName:"tooltipLabel",isSignal:!0,isRequired:!1,transformFunction:null}},host:{listeners:{"document:pointerdown":"onDocPointer($event)","document:keydown.escape":"onEscape()"},classAttribute:"inline-flex shrink-0"},ngImport:t,template:`
|
|
9582
9600
|
<div class="relative inline-flex shrink-0">
|
|
9583
9601
|
<dga-tooltip
|
|
9584
9602
|
class="inline-flex shrink-0"
|
|
@@ -9690,7 +9708,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
9690
9708
|
</ul>
|
|
9691
9709
|
}
|
|
9692
9710
|
</div>
|
|
9693
|
-
`,host:{class:"inline-flex shrink-0"}}]}],ctorParameters:()=>[],propDecorators:{tooltipLabel:[{type:t.Input,args:[{isSignal:!0,alias:"tooltipLabel",required:!1}]}],onDocPointer:[{type:
|
|
9711
|
+
`,host:{class:"inline-flex shrink-0"}}]}],ctorParameters:()=>[],propDecorators:{tooltipLabel:[{type:t.Input,args:[{isSignal:!0,alias:"tooltipLabel",required:!1}]}],onDocPointer:[{type:O,args:["document:pointerdown",["$event"]]}],onEscape:[{type:O,args:["document:keydown.escape"]}]}});class ka{name=i.required(...ngDevMode?[{debugName:"name"}]:[]);subtitle=i("",...ngDevMode?[{debugName:"subtitle"}]:[]);src=i(void 0,...ngDevMode?[{debugName:"src"}]:[]);size=i("md",...ngDevMode?[{debugName:"size"}]:[]);classes=n(()=>f("inline-flex max-w-full items-center gap-lg"),...ngDevMode?[{debugName:"classes"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ka,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:ka,isStandalone:!0,selector:"dga-persona",inputs:{name:{classPropertyName:"name",publicName:"name",isSignal:!0,isRequired:!0,transformFunction:null},subtitle:{classPropertyName:"subtitle",publicName:"subtitle",isSignal:!0,isRequired:!1,transformFunction:null},src:{classPropertyName:"src",publicName:"src",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{class:"classes()"}},ngImport:t,template:`
|
|
9694
9712
|
<dga-avatar [src]="src()" [name]="name()" [size]="size()" [alt]="name()" />
|
|
9695
9713
|
<div class="min-w-0 flex flex-col gap-xxs">
|
|
9696
9714
|
<span class="truncate text-body-md font-medium text-display">{{ name() }}</span>
|
|
@@ -9738,7 +9756,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
9738
9756
|
} @else {
|
|
9739
9757
|
<code class="font-mono text-body-sm text-fg"><ng-content /></code>
|
|
9740
9758
|
}
|
|
9741
|
-
`,changeDetection:h.OnPush,host:{"[class]":"classes()","[attr.data-block]":"block() || null"}}]}],propDecorators:{block:[{type:t.Input,args:[{isSignal:!0,alias:"block",required:!1}]}],language:[{type:t.Input,args:[{isSignal:!0,alias:"language",required:!1}]}]}});const tl=/^(?:www\.|m\.)?(?:youtube(?:-nocookie)?\.com|youtu\.be)$/i,al=/^(?:www\.|player\.)?vimeo\.com$/i,sl=/\.(mp4|webm|ogg|ogv|m4v|mov|m3u8)(?:[?#]|$)/i,il=/^(javascript|data|vbscript):/i,
|
|
9759
|
+
`,changeDetection:h.OnPush,host:{"[class]":"classes()","[attr.data-block]":"block() || null"}}]}],propDecorators:{block:[{type:t.Input,args:[{isSignal:!0,alias:"block",required:!1}]}],language:[{type:t.Input,args:[{isSignal:!0,alias:"language",required:!1}]}]}});const tl=/^(?:www\.|m\.)?(?:youtube(?:-nocookie)?\.com|youtu\.be)$/i,al=/^(?:www\.|player\.)?vimeo\.com$/i,sl=/\.(mp4|webm|ogg|ogv|m4v|mov|m3u8)(?:[?#]|$)/i,il=/^(javascript|data|vbscript):/i,ri={"16:9":"aspect-video","4:3":"aspect-[4/3]","1:1":"aspect-square","9:16":"aspect-[9/16]","21:9":"aspect-[21/9]"};function rl(d){try{const e=new URL(d);if(!tl.test(e.hostname))return null;if(e.hostname.replace(/^www\./i,"").toLowerCase()==="youtu.be"){const l=e.pathname.split("/").filter(Boolean)[0];return l&&/^[\w-]{6,}$/i.test(l)?l:null}const a=e.searchParams.get("v");if(a&&/^[\w-]{6,}$/i.test(a))return a;const s=e.pathname.split("/").filter(Boolean),r=["embed","shorts","live","v"];for(let l=0;l<s.length-1;l++)if(r.includes(s[l].toLowerCase())&&/^[\w-]{6,}$/i.test(s[l+1]))return s[l+1];return null}catch{return/^[\w-]{6,}$/i.test(d.trim())?d.trim():null}}function nl(d){try{const e=new URL(d);if(!al.test(e.hostname))return null;const a=e.pathname.split("/").filter(Boolean);for(let s=a.length-1;s>=0;s--)if(/^\d{6,}$/.test(a[s]))return a[s];return null}catch{return/^\d{6,}$/.test(d.trim())?d.trim():null}}function ni(d,e="auto"){const a=d.trim();if(!a||il.test(a))return null;const s=e==="auto"?null:e;if(!s||s==="youtube"){const r=rl(a);if(r)return{provider:"youtube",id:r,fileUrl:null};if(s==="youtube")return null}if(!s||s==="vimeo"){const r=nl(a);if(r)return{provider:"vimeo",id:r,fileUrl:null};if(s==="vimeo")return null}if(!s||s==="html5")try{if(a.startsWith("/")||a.startsWith("./")||a.startsWith("../"))return{provider:"html5",id:a,fileUrl:a};const r=new URL(a,"https://local.invalid");if(!(a.startsWith("/")||r.protocol==="https:"||r.protocol==="http:"||r.protocol==="blob:"))return null;if(s==="html5"||sl.test(a)||r.protocol==="blob:")return{provider:"html5",id:a,fileUrl:a}}catch{return null}return null}class Ca{sanitizer=x(Wa);src=i.required(...ngDevMode?[{debugName:"src"}]:[]);provider=i("auto",...ngDevMode?[{debugName:"provider"}]:[]);poster=i("",...ngDevMode?[{debugName:"poster"}]:[]);title=i("",...ngDevMode?[{debugName:"title"}]:[]);controls=i(!0,{...ngDevMode?{debugName:"controls"}:{},transform:m});autoplay=i(!1,{...ngDevMode?{debugName:"autoplay"}:{},transform:m});muted=i(!1,{...ngDevMode?{debugName:"muted"}:{},transform:m});loop=i(!1,{...ngDevMode?{debugName:"loop"}:{},transform:m});playsInline=i(!0,{...ngDevMode?{debugName:"playsInline"}:{},transform:m});lazy=i(!0,{...ngDevMode?{debugName:"lazy"}:{},transform:m});privacy=i(!0,{...ngDevMode?{debugName:"privacy"}:{},transform:m});start=i(0,{...ngDevMode?{debugName:"start"}:{},transform:A});ratio=i("16:9",...ngDevMode?[{debugName:"ratio"}]:[]);rounded=i(!0,{...ngDevMode?{debugName:"rounded"}:{},transform:m});playLabel=i("تشغيل الفيديو",...ngDevMode?[{debugName:"playLabel"}]:[]);invalidLabel=i("تعذّر تحميل الفيديو",...ngDevMode?[{debugName:"invalidLabel"}]:[]);unsupportedLabel=i("متصفحك لا يدعم تشغيل الفيديو",...ngDevMode?[{debugName:"unsupportedLabel"}]:[]);played=w();paused=w();ended=w();failed=w();activatedChange=w();activated=y(!1,...ngDevMode?[{debugName:"activated"}]:[]);resolved=n(()=>ni(this.src(),this.provider()),...ngDevMode?[{debugName:"resolved"}]:[]);providerBadge=n(()=>{const e=this.resolved()?.provider;return e==="youtube"?"YouTube":e==="vimeo"?"Vimeo":""},...ngDevMode?[{debugName:"providerBadge"}]:[]);embedSrc=n(()=>{const e=this.resolved();return!e||e.provider==="html5"?null:this.buildEmbedUrl(e)},...ngDevMode?[{debugName:"embedSrc"}]:[]);safeEmbed=n(()=>{const e=this.embedSrc();return e?this.sanitizer.bypassSecurityTrustResourceUrl(e):null},...ngDevMode?[{debugName:"safeEmbed"}]:[]);shellClasses=n(()=>f("relative w-full overflow-hidden bg-black",ri[this.ratio()]??ri["16:9"],this.rounded()&&"rounded-lg"),...ngDevMode?[{debugName:"shellClasses"}]:[]);constructor(){M(()=>{const e=this.resolved();if(this.autoplay(),this.lazy(),!e){this.activated.set(!1);return}if(e.provider==="html5"||this.autoplay()||!this.lazy()){this.activated.set(!0);return}this.activated.set(!1)})}activate(){!this.resolved()||this.resolved().provider==="html5"||(this.activated.set(!0),this.activatedChange.emit(!0),this.played.emit())}buildEmbedUrl(e){const a=Math.max(0,Math.floor(Number(this.start())||0)),s=this.autoplay()||this.activated()?1:0,r=this.muted()||this.autoplay()?1:0,l=this.loop()?1:0,u=this.controls()?1:0;if(e.provider==="youtube"){const o=this.privacy()?"https://www.youtube-nocookie.com":"https://www.youtube.com",c=new URLSearchParams({rel:"0",modestbranding:"1",playsinline:"1",controls:String(u),autoplay:String(s),mute:String(r)});return a>0&&c.set("start",String(a)),l&&(c.set("loop","1"),c.set("playlist",e.id)),`${o}/embed/${encodeURIComponent(e.id)}?${c.toString()}`}if(e.provider==="vimeo"){const o=new URLSearchParams({title:"0",byline:"0",portrait:"0",dnt:this.privacy()?"1":"0",autoplay:String(s),muted:String(r),loop:String(l),controls:String(u)}),c=`https://player.vimeo.com/video/${encodeURIComponent(e.id)}?${o.toString()}`;return a>0?`${c}#t=${a}s`:c}return null}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ca,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ca,isStandalone:!0,selector:"dga-video-player",inputs:{src:{classPropertyName:"src",publicName:"src",isSignal:!0,isRequired:!0,transformFunction:null},provider:{classPropertyName:"provider",publicName:"provider",isSignal:!0,isRequired:!1,transformFunction:null},poster:{classPropertyName:"poster",publicName:"poster",isSignal:!0,isRequired:!1,transformFunction:null},title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!1,transformFunction:null},controls:{classPropertyName:"controls",publicName:"controls",isSignal:!0,isRequired:!1,transformFunction:null},autoplay:{classPropertyName:"autoplay",publicName:"autoplay",isSignal:!0,isRequired:!1,transformFunction:null},muted:{classPropertyName:"muted",publicName:"muted",isSignal:!0,isRequired:!1,transformFunction:null},loop:{classPropertyName:"loop",publicName:"loop",isSignal:!0,isRequired:!1,transformFunction:null},playsInline:{classPropertyName:"playsInline",publicName:"playsInline",isSignal:!0,isRequired:!1,transformFunction:null},lazy:{classPropertyName:"lazy",publicName:"lazy",isSignal:!0,isRequired:!1,transformFunction:null},privacy:{classPropertyName:"privacy",publicName:"privacy",isSignal:!0,isRequired:!1,transformFunction:null},start:{classPropertyName:"start",publicName:"start",isSignal:!0,isRequired:!1,transformFunction:null},ratio:{classPropertyName:"ratio",publicName:"ratio",isSignal:!0,isRequired:!1,transformFunction:null},rounded:{classPropertyName:"rounded",publicName:"rounded",isSignal:!0,isRequired:!1,transformFunction:null},playLabel:{classPropertyName:"playLabel",publicName:"playLabel",isSignal:!0,isRequired:!1,transformFunction:null},invalidLabel:{classPropertyName:"invalidLabel",publicName:"invalidLabel",isSignal:!0,isRequired:!1,transformFunction:null},unsupportedLabel:{classPropertyName:"unsupportedLabel",publicName:"unsupportedLabel",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{played:"played",paused:"paused",ended:"ended",failed:"failed",activatedChange:"activatedChange"},host:{properties:{"attr.data-ratio":"ratio()"},classAttribute:"dga-video-player block w-full"},ngImport:t,template:`
|
|
9742
9760
|
<div [class]="shellClasses()" [attr.data-provider]="resolved()?.provider ?? null">
|
|
9743
9761
|
@if (!resolved()) {
|
|
9744
9762
|
<div
|
|
@@ -10118,7 +10136,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
10118
10136
|
}
|
|
10119
10137
|
<ng-content />
|
|
10120
10138
|
</ol>
|
|
10121
|
-
`,changeDetection:h.OnPush,host:{class:"block"}}]}],propDecorators:{items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],compact:[{type:t.Input,args:[{isSignal:!0,alias:"compact",required:!1}]}]}});const
|
|
10139
|
+
`,changeDetection:h.OnPush,host:{class:"block"}}]}],propDecorators:{items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],compact:[{type:t.Input,args:[{isSignal:!0,alias:"compact",required:!1}]}]}});const li="M750 1119C730 1163 716 1211 711 1262L1136 1172C1156 1127 1169 1079 1174 1028L750 1119ZM1136 901C1156 857 1169 809 1174 758L843 828V693L1136 631C1156 587 1169 538 1174 488L843 558V72C793 100 748 138 711 183V586L579 614V6C528 34 483 72 447 117V642L151 705C131 750 117 798 112 849L447 777V948L88 1024C68 1068 55 1117 50 1167L425 1088C456 1081 482 1063 499 1038L568 936C575 926 579 913 579 899V749L711 721V992L1136 901Z",oi="50 0 1124 1268",Bl=1124/1268,ll={current:"text-current",primary:"text-fg-primary",muted:"text-muted","on-color":"text-on-color"};class Ke{path=li;viewBox=oi;size=i("em",...ngDevMode?[{debugName:"size"}]:[]);tone=i("current",...ngDevMode?[{debugName:"tone"}]:[]);appearance=i("plain",...ngDevMode?[{debugName:"appearance"}]:[]);amount=i(null,...ngDevMode?[{debugName:"amount"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);amountText=n(()=>{const e=this.amount();return e==null||e===""?"":String(e)},...ngDevMode?[{debugName:"amountText"}]:[]);hostClasses=n(()=>f("dga-riyal inline-flex items-baseline",ll[this.tone()]),...ngDevMode?[{debugName:"hostClasses"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ke,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ke,isStandalone:!0,selector:"dga-riyal",inputs:{size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},tone:{classPropertyName:"tone",publicName:"tone",isSignal:!0,isRequired:!1,transformFunction:null},appearance:{classPropertyName:"appearance",publicName:"appearance",isSignal:!0,isRequired:!1,transformFunction:null},amount:{classPropertyName:"amount",publicName:"amount",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{class:"hostClasses()","attr.data-size":"size()","attr.data-tone":"tone()","attr.data-appearance":"appearance()","attr.data-amount":'amountText() ? "true" : null',"attr.role":'label() && !amountText() ? "img" : null',"attr.aria-hidden":'!label() && !amountText() ? "true" : null'}},ngImport:t,template:`
|
|
10122
10140
|
<span class="dga-riyal-glyph" aria-hidden="true">
|
|
10123
10141
|
<svg
|
|
10124
10142
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -10176,7 +10194,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
10176
10194
|
<span class="dga-number-unit">{{ unit() }}</span>
|
|
10177
10195
|
}
|
|
10178
10196
|
}
|
|
10179
|
-
`,host:{class:"inline-flex max-w-full items-baseline tabular-nums tracking-tight","[attr.data-currency]":"currency() || null","[attr.data-unit]":"unit() || null","[attr.data-counter]":"counter() || null","[attr.data-animating]":"animating() || null"},changeDetection:h.OnPush,styles:[":host{gap:var(--dga-spacing-xs, .25rem);min-width:var(--dga-number-min-width, max-content);flex-wrap:nowrap;white-space:nowrap;transition:color .22s ease}:host .dga-number-riyal{flex:0 0 auto;min-width:max-content;max-width:none}:host ::ng-deep .dga-number-riyal .dga-riyal-amount{min-width:max-content;overflow:visible}:host .dga-number-unit{flex:0 0 auto;white-space:nowrap;font-size:.85em;font-weight:500;color:var(--dga-text-muted, var(--dga-color-neutral-500))}:host[data-animating]{color:var(--dga-text-primary)}:host .dga-number-value{display:inline-block;flex:0 0 auto;min-width:max-content;white-space:nowrap;font-variant-numeric:tabular-nums;transition:transform .18s cubic-bezier(.22,1,.36,1),filter .18s ease}:host[data-animating] .dga-number-value{transform:translateY(-1px);filter:saturate(1.05)}@media(prefers-reduced-motion:reduce){:host,:host .dga-number-value{transition:none!important;transform:none!important;filter:none!important}}\n"]}]}],propDecorators:{value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]}],currency:[{type:t.Input,args:[{isSignal:!0,alias:"currency",required:!1}]}],unit:[{type:t.Input,args:[{isSignal:!0,alias:"unit",required:!1}]}],free:[{type:t.Input,args:[{isSignal:!0,alias:"free",required:!1}]}],counter:[{type:t.Input,args:[{isSignal:!0,alias:"counter",required:!1}]}],start:[{type:t.Input,args:[{isSignal:!0,alias:"start",required:!1}]}],duration:[{type:t.Input,args:[{isSignal:!0,alias:"duration",required:!1}]}],decimals:[{type:t.Input,args:[{isSignal:!0,alias:"decimals",required:!1}]}]}});function ls(d){if(typeof d=="number")return{numeric:d,prefix:"",suffix:""};const e=String(d).trim().match(/^([+-]?)(\d*\.?\d+)(.*)$/);return e?{numeric:parseFloat(`${e[1]}${e[2]}`)||0,prefix:e[1]==="+"?"+":"",suffix:e[3]??""}:{numeric:0,prefix:"",suffix:String(d)}}var J;(function(d){class e{version;errorCorrectionLevel;static encodeText(o,c){const p=d.QrSegment.makeSegments(o);return e.encodeSegments(p,c)}static encodeBinary(o,c){const p=d.QrSegment.makeBytes(o);return e.encodeSegments([p],c)}static encodeSegments(o,c,p=1,g=40,b=-1,N=!0){if(!(e.MIN_VERSION<=p&&p<=g&&g<=e.MAX_VERSION)||b<-1||b>7)throw new RangeError("Invalid value");let C,_;for(C=p;;C++){const z=e.getNumDataCodewords(C,c)*8,H=l.getTotalBits(o,C);if(H<=z){_=H;break}if(C>=g)throw new RangeError("Data too long")}for(const z of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])N&&_<=e.getNumDataCodewords(C,z)*8&&(c=z);let I=[];for(const z of o){a(z.mode.modeBits,4,I),a(z.numChars,z.mode.numCharCountBits(C),I);for(const H of z.getData())I.push(H)}r(I.length==_);const B=e.getNumDataCodewords(C,c)*8;r(I.length<=B),a(0,Math.min(4,B-I.length),I),a(0,(8-I.length%8)%8,I),r(I.length%8==0);for(let z=236;I.length<B;z^=253)a(z,8,I);let me=[];for(;me.length*8<I.length;)me.push(0);return I.forEach((z,H)=>me[H>>>3]|=z<<7-(H&7)),new e(C,c,me,b)}size;mask;modules=[];isFunction=[];constructor(o,c,p,g){if(this.version=o,this.errorCorrectionLevel=c,o<e.MIN_VERSION||o>e.MAX_VERSION)throw new RangeError("Version value out of range");if(g<-1||g>7)throw new RangeError("Mask value out of range");this.size=o*4+17;let b=[];for(let C=0;C<this.size;C++)b.push(!1);for(let C=0;C<this.size;C++)this.modules.push(b.slice()),this.isFunction.push(b.slice());this.drawFunctionPatterns();const N=this.addEccAndInterleave(p);if(this.drawCodewords(N),g==-1){let C=1e9;for(let _=0;_<8;_++){this.applyMask(_),this.drawFormatBits(_);const I=this.getPenaltyScore();I<C&&(g=_,C=I),this.applyMask(_)}}r(0<=g&&g<=7),this.mask=g,this.applyMask(g),this.drawFormatBits(g),this.isFunction=[]}getModule(o,c){return 0<=o&&o<this.size&&0<=c&&c<this.size&&this.modules[c][o]}drawFunctionPatterns(){for(let p=0;p<this.size;p++)this.setFunctionModule(6,p,p%2==0),this.setFunctionModule(p,6,p%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const o=this.getAlignmentPatternPositions(),c=o.length;for(let p=0;p<c;p++)for(let g=0;g<c;g++)p==0&&g==0||p==0&&g==c-1||p==c-1&&g==0||this.drawAlignmentPattern(o[p],o[g]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(o){const c=this.errorCorrectionLevel.formatBits<<3|o;let p=c;for(let b=0;b<10;b++)p=p<<1^(p>>>9)*1335;const g=(c<<10|p)^21522;r(g>>>15==0);for(let b=0;b<=5;b++)this.setFunctionModule(8,b,s(g,b));this.setFunctionModule(8,7,s(g,6)),this.setFunctionModule(8,8,s(g,7)),this.setFunctionModule(7,8,s(g,8));for(let b=9;b<15;b++)this.setFunctionModule(14-b,8,s(g,b));for(let b=0;b<8;b++)this.setFunctionModule(this.size-1-b,8,s(g,b));for(let b=8;b<15;b++)this.setFunctionModule(8,this.size-15+b,s(g,b));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let o=this.version;for(let p=0;p<12;p++)o=o<<1^(o>>>11)*7973;const c=this.version<<12|o;r(c>>>18==0);for(let p=0;p<18;p++){const g=s(c,p),b=this.size-11+p%3,N=Math.floor(p/3);this.setFunctionModule(b,N,g),this.setFunctionModule(N,b,g)}}drawFinderPattern(o,c){for(let p=-4;p<=4;p++)for(let g=-4;g<=4;g++){const b=Math.max(Math.abs(g),Math.abs(p)),N=o+g,C=c+p;0<=N&&N<this.size&&0<=C&&C<this.size&&this.setFunctionModule(N,C,b!=2&&b!=4)}}drawAlignmentPattern(o,c){for(let p=-2;p<=2;p++)for(let g=-2;g<=2;g++)this.setFunctionModule(o+g,c+p,Math.max(Math.abs(g),Math.abs(p))!=1)}setFunctionModule(o,c,p){this.modules[c][o]=p,this.isFunction[c][o]=!0}addEccAndInterleave(o){const c=this.version,p=this.errorCorrectionLevel;if(o.length!=e.getNumDataCodewords(c,p))throw new RangeError("Invalid argument");const g=e.NUM_ERROR_CORRECTION_BLOCKS[p.ordinal][c],b=e.ECC_CODEWORDS_PER_BLOCK[p.ordinal][c],N=Math.floor(e.getNumRawDataModules(c)/8),C=g-N%g,_=Math.floor(N/g);let I=[];const B=e.reedSolomonComputeDivisor(b);for(let z=0,H=0;z<g;z++){let st=o.slice(H,H+_-b+(z<C?0:1));H+=st.length;const qi=e.reedSolomonComputeRemainder(st,B);z<C&&st.push(0),I.push(st.concat(qi))}let me=[];for(let z=0;z<I[0].length;z++)I.forEach((H,st)=>{(z!=_-b||st>=C)&&me.push(H[z])});return r(me.length==N),me}drawCodewords(o){if(o.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let c=0;for(let p=this.size-1;p>=1;p-=2){p==6&&(p=5);for(let g=0;g<this.size;g++)for(let b=0;b<2;b++){const N=p-b,_=(p+1&2)==0?this.size-1-g:g;!this.isFunction[_][N]&&c<o.length*8&&(this.modules[_][N]=s(o[c>>>3],7-(c&7)),c++)}}r(c==o.length*8)}applyMask(o){if(o<0||o>7)throw new RangeError("Mask value out of range");for(let c=0;c<this.size;c++)for(let p=0;p<this.size;p++){let g;switch(o){case 0:g=(p+c)%2==0;break;case 1:g=c%2==0;break;case 2:g=p%3==0;break;case 3:g=(p+c)%3==0;break;case 4:g=(Math.floor(p/3)+Math.floor(c/2))%2==0;break;case 5:g=p*c%2+p*c%3==0;break;case 6:g=(p*c%2+p*c%3)%2==0;break;case 7:g=((p+c)%2+p*c%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[c][p]&&g&&(this.modules[c][p]=!this.modules[c][p])}}getPenaltyScore(){let o=0;for(let b=0;b<this.size;b++){let N=!1,C=0,_=[0,0,0,0,0,0,0];for(let I=0;I<this.size;I++)this.modules[b][I]==N?(C++,C==5?o+=e.PENALTY_N1:C>5&&o++):(this.finderPenaltyAddHistory(C,_),N||(o+=this.finderPenaltyCountPatterns(_)*e.PENALTY_N3),N=this.modules[b][I],C=1);o+=this.finderPenaltyTerminateAndCount(N,C,_)*e.PENALTY_N3}for(let b=0;b<this.size;b++){let N=!1,C=0,_=[0,0,0,0,0,0,0];for(let I=0;I<this.size;I++)this.modules[I][b]==N?(C++,C==5?o+=e.PENALTY_N1:C>5&&o++):(this.finderPenaltyAddHistory(C,_),N||(o+=this.finderPenaltyCountPatterns(_)*e.PENALTY_N3),N=this.modules[I][b],C=1);o+=this.finderPenaltyTerminateAndCount(N,C,_)*e.PENALTY_N3}for(let b=0;b<this.size-1;b++)for(let N=0;N<this.size-1;N++){const C=this.modules[b][N];C==this.modules[b][N+1]&&C==this.modules[b+1][N]&&C==this.modules[b+1][N+1]&&(o+=e.PENALTY_N2)}let c=0;for(const b of this.modules)c=b.reduce((N,C)=>N+(C?1:0),c);const p=this.size*this.size,g=Math.ceil(Math.abs(c*20-p*10)/p)-1;return r(0<=g&&g<=9),o+=g*e.PENALTY_N4,r(0<=o&&o<=2568888),o}getAlignmentPatternPositions(){if(this.version==1)return[];{const o=Math.floor(this.version/7)+2,c=Math.floor((this.version*8+o*3+5)/(o*4-4))*2;let p=[6];for(let g=this.size-7;p.length<o;g-=c)p.splice(1,0,g);return p}}static getNumRawDataModules(o){if(o<e.MIN_VERSION||o>e.MAX_VERSION)throw new RangeError("Version number out of range");let c=(16*o+128)*o+64;if(o>=2){const p=Math.floor(o/7)+2;c-=(25*p-10)*p-55,o>=7&&(c-=36)}return r(208<=c&&c<=29648),c}static getNumDataCodewords(o,c){return Math.floor(e.getNumRawDataModules(o)/8)-e.ECC_CODEWORDS_PER_BLOCK[c.ordinal][o]*e.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][o]}static reedSolomonComputeDivisor(o){if(o<1||o>255)throw new RangeError("Degree out of range");let c=[];for(let g=0;g<o-1;g++)c.push(0);c.push(1);let p=1;for(let g=0;g<o;g++){for(let b=0;b<c.length;b++)c[b]=e.reedSolomonMultiply(c[b],p),b+1<c.length&&(c[b]^=c[b+1]);p=e.reedSolomonMultiply(p,2)}return c}static reedSolomonComputeRemainder(o,c){let p=c.map(g=>0);for(const g of o){const b=g^p.shift();p.push(0),c.forEach((N,C)=>p[C]^=e.reedSolomonMultiply(N,b))}return p}static reedSolomonMultiply(o,c){if(o>>>8||c>>>8)throw new RangeError("Byte out of range");let p=0;for(let g=7;g>=0;g--)p=p<<1^(p>>>7)*285,p^=(c>>>g&1)*o;return r(p>>>8==0),p}finderPenaltyCountPatterns(o){const c=o[1];r(c<=this.size*3);const p=c>0&&o[2]==c&&o[3]==c*3&&o[4]==c&&o[5]==c;return(p&&o[0]>=c*4&&o[6]>=c?1:0)+(p&&o[6]>=c*4&&o[0]>=c?1:0)}finderPenaltyTerminateAndCount(o,c,p){return o&&(this.finderPenaltyAddHistory(c,p),c=0),c+=this.size,this.finderPenaltyAddHistory(c,p),this.finderPenaltyCountPatterns(p)}finderPenaltyAddHistory(o,c){c[0]==0&&(o+=this.size),c.pop(),c.unshift(o)}static MIN_VERSION=1;static MAX_VERSION=40;static PENALTY_N1=3;static PENALTY_N2=3;static PENALTY_N3=40;static PENALTY_N4=10;static ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]];static NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]]}d.QrCode=e;function a(u,o,c){if(o<0||o>31||u>>>o)throw new RangeError("Value out of range");for(let p=o-1;p>=0;p--)c.push(u>>>p&1)}function s(u,o){return(u>>>o&1)!=0}function r(u){if(!u)throw new Error("Assertion error")}class l{mode;numChars;bitData;static makeBytes(o){let c=[];for(const p of o)a(p,8,c);return new l(l.Mode.BYTE,o.length,c)}static makeNumeric(o){if(!l.isNumeric(o))throw new RangeError("String contains non-numeric characters");let c=[];for(let p=0;p<o.length;){const g=Math.min(o.length-p,3);a(parseInt(o.substring(p,p+g),10),g*3+1,c),p+=g}return new l(l.Mode.NUMERIC,o.length,c)}static makeAlphanumeric(o){if(!l.isAlphanumeric(o))throw new RangeError("String contains unencodable characters in alphanumeric mode");let c=[],p;for(p=0;p+2<=o.length;p+=2){let g=l.ALPHANUMERIC_CHARSET.indexOf(o.charAt(p))*45;g+=l.ALPHANUMERIC_CHARSET.indexOf(o.charAt(p+1)),a(g,11,c)}return p<o.length&&a(l.ALPHANUMERIC_CHARSET.indexOf(o.charAt(p)),6,c),new l(l.Mode.ALPHANUMERIC,o.length,c)}static makeSegments(o){return o==""?[]:l.isNumeric(o)?[l.makeNumeric(o)]:l.isAlphanumeric(o)?[l.makeAlphanumeric(o)]:[l.makeBytes(l.toUtf8ByteArray(o))]}static makeEci(o){let c=[];if(o<0)throw new RangeError("ECI assignment value out of range");if(o<128)a(o,8,c);else if(o<16384)a(2,2,c),a(o,14,c);else if(o<1e6)a(6,3,c),a(o,21,c);else throw new RangeError("ECI assignment value out of range");return new l(l.Mode.ECI,0,c)}static isNumeric(o){return l.NUMERIC_REGEX.test(o)}static isAlphanumeric(o){return l.ALPHANUMERIC_REGEX.test(o)}constructor(o,c,p){if(this.mode=o,this.numChars=c,this.bitData=p,c<0)throw new RangeError("Invalid argument");this.bitData=p.slice()}getData(){return this.bitData.slice()}static getTotalBits(o,c){let p=0;for(const g of o){const b=g.mode.numCharCountBits(c);if(g.numChars>=1<<b)return 1/0;p+=4+b+g.bitData.length}return p}static toUtf8ByteArray(o){o=encodeURI(o);let c=[];for(let p=0;p<o.length;p++)o.charAt(p)!="%"?c.push(o.charCodeAt(p)):(c.push(parseInt(o.substring(p+1,p+3),16)),p+=2);return c}static NUMERIC_REGEX=/^[0-9]*$/;static ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/;static ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"}d.QrSegment=l})(J||(J={})),(function(d){var e;(function(a){class s{ordinal;formatBits;static LOW=new s(0,1);static MEDIUM=new s(1,0);static QUARTILE=new s(2,3);static HIGH=new s(3,2);constructor(l,u){this.ordinal=l,this.formatBits=u}}a.Ecc=s})(e=d.QrCode||(d.QrCode={}))})(J||(J={})),(function(d){var e;(function(a){class s{modeBits;numBitsCharCount;static NUMERIC=new s(1,[10,12,14]);static ALPHANUMERIC=new s(2,[9,11,13]);static BYTE=new s(4,[8,16,16]);static KANJI=new s(8,[8,10,12]);static ECI=new s(7,[0,0,0]);constructor(l,u){this.modeBits=l,this.numBitsCharCount=u}numCharCountBits(l){return this.numBitsCharCount[Math.floor((l+7)/17)]}}a.Mode=s})(e=d.QrSegment||(d.QrSegment={}))})(J||(J={}));const dl={L:J.QrCode.Ecc.LOW,M:J.QrCode.Ecc.MEDIUM,Q:J.QrCode.Ecc.QUARTILE,H:J.QrCode.Ecc.HIGH};function oi(d,e="M"){const a=J.QrCode.encodeText(d,dl[e]),s=a.size,r=Array.from({length:s},(l,u)=>Array.from({length:s},(o,c)=>a.getModule(c,u)));return{size:s,modules:r}}const di={sm:128,md:192,lg:256,xl:320},ci=new Set(["sm","md","lg","xl"]);class La{toasts=x(ue,{optional:!0});canvasEl=R("canvasEl",...ngDevMode?[{debugName:"canvasEl"}]:[]);value=i.required(...ngDevMode?[{debugName:"value"}]:[]);view=i("svg",...ngDevMode?[{debugName:"view"}]:[]);size=i("md",...ngDevMode?[{debugName:"size"}]:[]);color=i("var(--color-fg, #161616)",...ngDevMode?[{debugName:"color"}]:[]);background=i("var(--color-surface, #ffffff)",...ngDevMode?[{debugName:"background"}]:[]);errorCorrection=i("M",...ngDevMode?[{debugName:"errorCorrection"}]:[]);margin=i(2,{...ngDevMode?{debugName:"margin"}:{},transform:A});label=i("",...ngDevMode?[{debugName:"label"}]:[]);actions=i(!1,{...ngDevMode?{debugName:"actions"}:{},transform:m});animate=i("fade",...ngDevMode?[{debugName:"animate"}]:[]);downloadName=i("qr-code",...ngDevMode?[{debugName:"downloadName"}]:[]);ready=w();downloaded=w();copied=w();matrix=y(null,...ngDevMode?[{debugName:"matrix"}]:[]);playTick=y(0,...ngDevMode?[{debugName:"playTick"}]:[]);imgSrc=y("",...ngDevMode?[{debugName:"imgSrc"}]:[]);sizeToken=n(()=>{const e=this.size();return typeof e=="string"&&ci.has(e)?e:null},...ngDevMode?[{debugName:"sizeToken"}]:[]);pixelSize=n(()=>{const e=this.size();return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.round(e):typeof e=="string"&&ci.has(e)?di[e]:di.md},...ngDevMode?[{debugName:"pixelSize"}]:[]);sizeCss=n(()=>`${this.pixelSize()}px`,...ngDevMode?[{debugName:"sizeCss"}]:[]);svgViewBox=n(()=>{const e=this.matrix();if(!e)return"0 0 1 1";const a=e.size+this.margin()*2;return`0 0 ${a} ${a}`},...ngDevMode?[{debugName:"svgViewBox"}]:[]);svgPath=n(()=>{const e=this.matrix();return e?ui(e.modules,this.margin()):""},...ngDevMode?[{debugName:"svgPath"}]:[]);constructor(){M(()=>{const e=this.value()?.trim()??"",a=this.errorCorrection();if(!e){this.matrix.set(null),this.imgSrc.set("");return}try{const s=oi(e,a);this.matrix.set(s),this.ready.emit(s),this.playTick.update(r=>r+1)}catch{this.matrix.set(null),this.imgSrc.set("")}}),M(()=>{const e=this.matrix(),a=this.view(),s=this.color(),r=this.background(),l=this.margin(),u=this.pixelSize();if(this.playTick(),!e){this.imgSrc.set("");return}if(a==="img"){this.imgSrc.set(mi(e,s,r,l,u));return}a==="canvas"&&queueMicrotask(()=>{const o=this.canvasEl()?.nativeElement;o&&gi(o,e,s,r,l,u)})})}hostClasses(){return f("dga-qr")}frameClasses(){return f("dga-qr__frame")}actionsLabel(){return q()?"إجراءات رمز الاستجابة السريعة":"QR code actions"}downloadLabel(){return q()?"تنزيل":"Download"}copyLabel(){return q()?"نسخ الرابط":"Copy link"}async onCopy(){const e=this.value()?.trim();if(!e||!await ge.writeText(e))return;this.copied.emit(e);const s=q();this.toasts?.copied(s?"تم نسخ الرابط إلى الحافظة":"Link copied to clipboard",s?"تم النسخ":"Copied")}onDownload(){const e=this.matrix();if(!e)return;const a=(this.downloadName()||"qr-code").replace(/\.(svg|png)$/i,""),s=this.view();if(s==="svg"){const u=cl(e,this.color(),this.background(),this.margin());ul(new Blob([u],{type:"image/svg+xml;charset=utf-8"}),`${a}.svg`),this.downloaded.emit(`${a}.svg`);return}const r=s==="img"?this.imgSrc():mi(e,this.color(),this.background(),this.margin(),this.pixelSize());if(!r)return;const l=document.createElement("a");l.href=r,l.download=`${a}.png`,l.click(),this.downloaded.emit(`${a}.png`)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:La,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:La,isStandalone:!0,selector:"dga-qr",inputs:{value:{classPropertyName:"value",publicName:"value",isSignal:!0,isRequired:!0,transformFunction:null},view:{classPropertyName:"view",publicName:"view",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},color:{classPropertyName:"color",publicName:"color",isSignal:!0,isRequired:!1,transformFunction:null},background:{classPropertyName:"background",publicName:"background",isSignal:!0,isRequired:!1,transformFunction:null},errorCorrection:{classPropertyName:"errorCorrection",publicName:"errorCorrection",isSignal:!0,isRequired:!1,transformFunction:null},margin:{classPropertyName:"margin",publicName:"margin",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},actions:{classPropertyName:"actions",publicName:"actions",isSignal:!0,isRequired:!1,transformFunction:null},animate:{classPropertyName:"animate",publicName:"animate",isSignal:!0,isRequired:!1,transformFunction:null},downloadName:{classPropertyName:"downloadName",publicName:"downloadName",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{ready:"ready",downloaded:"downloaded",copied:"copied"},host:{properties:{class:"hostClasses()","attr.data-view":"view()","attr.data-size":"sizeToken()","attr.data-animate":"animate()","attr.data-actions":'actions() ? "" : null',"attr.role":'label() ? "img" : null',"attr.aria-label":"label() || null","style.--dga-qr-size":"sizeCss()","style.--dga-qr-fg":"color()","style.--dga-qr-bg":"background()"}},viewQueries:[{propertyName:"canvasEl",first:!0,predicate:["canvasEl"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
10197
|
+
`,host:{class:"inline-flex max-w-full items-baseline tabular-nums tracking-tight","[attr.data-currency]":"currency() || null","[attr.data-unit]":"unit() || null","[attr.data-counter]":"counter() || null","[attr.data-animating]":"animating() || null"},changeDetection:h.OnPush,styles:[":host{gap:var(--dga-spacing-xs, .25rem);min-width:var(--dga-number-min-width, max-content);flex-wrap:nowrap;white-space:nowrap;transition:color .22s ease}:host .dga-number-riyal{flex:0 0 auto;min-width:max-content;max-width:none}:host ::ng-deep .dga-number-riyal .dga-riyal-amount{min-width:max-content;overflow:visible}:host .dga-number-unit{flex:0 0 auto;white-space:nowrap;font-size:.85em;font-weight:500;color:var(--dga-text-muted, var(--dga-color-neutral-500))}:host[data-animating]{color:var(--dga-text-primary)}:host .dga-number-value{display:inline-block;flex:0 0 auto;min-width:max-content;white-space:nowrap;font-variant-numeric:tabular-nums;transition:transform .18s cubic-bezier(.22,1,.36,1),filter .18s ease}:host[data-animating] .dga-number-value{transform:translateY(-1px);filter:saturate(1.05)}@media(prefers-reduced-motion:reduce){:host,:host .dga-number-value{transition:none!important;transform:none!important;filter:none!important}}\n"]}]}],propDecorators:{value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!1}]}],currency:[{type:t.Input,args:[{isSignal:!0,alias:"currency",required:!1}]}],unit:[{type:t.Input,args:[{isSignal:!0,alias:"unit",required:!1}]}],free:[{type:t.Input,args:[{isSignal:!0,alias:"free",required:!1}]}],counter:[{type:t.Input,args:[{isSignal:!0,alias:"counter",required:!1}]}],start:[{type:t.Input,args:[{isSignal:!0,alias:"start",required:!1}]}],duration:[{type:t.Input,args:[{isSignal:!0,alias:"duration",required:!1}]}],decimals:[{type:t.Input,args:[{isSignal:!0,alias:"decimals",required:!1}]}]}});function ls(d){if(typeof d=="number")return{numeric:d,prefix:"",suffix:""};const e=String(d).trim().match(/^([+-]?)(\d*\.?\d+)(.*)$/);return e?{numeric:parseFloat(`${e[1]}${e[2]}`)||0,prefix:e[1]==="+"?"+":"",suffix:e[3]??""}:{numeric:0,prefix:"",suffix:String(d)}}var J;(function(d){class e{version;errorCorrectionLevel;static encodeText(o,c){const p=d.QrSegment.makeSegments(o);return e.encodeSegments(p,c)}static encodeBinary(o,c){const p=d.QrSegment.makeBytes(o);return e.encodeSegments([p],c)}static encodeSegments(o,c,p=1,g=40,b=-1,N=!0){if(!(e.MIN_VERSION<=p&&p<=g&&g<=e.MAX_VERSION)||b<-1||b>7)throw new RangeError("Invalid value");let C,_;for(C=p;;C++){const z=e.getNumDataCodewords(C,c)*8,H=l.getTotalBits(o,C);if(H<=z){_=H;break}if(C>=g)throw new RangeError("Data too long")}for(const z of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])N&&_<=e.getNumDataCodewords(C,z)*8&&(c=z);let I=[];for(const z of o){a(z.mode.modeBits,4,I),a(z.numChars,z.mode.numCharCountBits(C),I);for(const H of z.getData())I.push(H)}r(I.length==_);const B=e.getNumDataCodewords(C,c)*8;r(I.length<=B),a(0,Math.min(4,B-I.length),I),a(0,(8-I.length%8)%8,I),r(I.length%8==0);for(let z=236;I.length<B;z^=253)a(z,8,I);let me=[];for(;me.length*8<I.length;)me.push(0);return I.forEach((z,H)=>me[H>>>3]|=z<<7-(H&7)),new e(C,c,me,b)}size;mask;modules=[];isFunction=[];constructor(o,c,p,g){if(this.version=o,this.errorCorrectionLevel=c,o<e.MIN_VERSION||o>e.MAX_VERSION)throw new RangeError("Version value out of range");if(g<-1||g>7)throw new RangeError("Mask value out of range");this.size=o*4+17;let b=[];for(let C=0;C<this.size;C++)b.push(!1);for(let C=0;C<this.size;C++)this.modules.push(b.slice()),this.isFunction.push(b.slice());this.drawFunctionPatterns();const N=this.addEccAndInterleave(p);if(this.drawCodewords(N),g==-1){let C=1e9;for(let _=0;_<8;_++){this.applyMask(_),this.drawFormatBits(_);const I=this.getPenaltyScore();I<C&&(g=_,C=I),this.applyMask(_)}}r(0<=g&&g<=7),this.mask=g,this.applyMask(g),this.drawFormatBits(g),this.isFunction=[]}getModule(o,c){return 0<=o&&o<this.size&&0<=c&&c<this.size&&this.modules[c][o]}drawFunctionPatterns(){for(let p=0;p<this.size;p++)this.setFunctionModule(6,p,p%2==0),this.setFunctionModule(p,6,p%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const o=this.getAlignmentPatternPositions(),c=o.length;for(let p=0;p<c;p++)for(let g=0;g<c;g++)p==0&&g==0||p==0&&g==c-1||p==c-1&&g==0||this.drawAlignmentPattern(o[p],o[g]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(o){const c=this.errorCorrectionLevel.formatBits<<3|o;let p=c;for(let b=0;b<10;b++)p=p<<1^(p>>>9)*1335;const g=(c<<10|p)^21522;r(g>>>15==0);for(let b=0;b<=5;b++)this.setFunctionModule(8,b,s(g,b));this.setFunctionModule(8,7,s(g,6)),this.setFunctionModule(8,8,s(g,7)),this.setFunctionModule(7,8,s(g,8));for(let b=9;b<15;b++)this.setFunctionModule(14-b,8,s(g,b));for(let b=0;b<8;b++)this.setFunctionModule(this.size-1-b,8,s(g,b));for(let b=8;b<15;b++)this.setFunctionModule(8,this.size-15+b,s(g,b));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let o=this.version;for(let p=0;p<12;p++)o=o<<1^(o>>>11)*7973;const c=this.version<<12|o;r(c>>>18==0);for(let p=0;p<18;p++){const g=s(c,p),b=this.size-11+p%3,N=Math.floor(p/3);this.setFunctionModule(b,N,g),this.setFunctionModule(N,b,g)}}drawFinderPattern(o,c){for(let p=-4;p<=4;p++)for(let g=-4;g<=4;g++){const b=Math.max(Math.abs(g),Math.abs(p)),N=o+g,C=c+p;0<=N&&N<this.size&&0<=C&&C<this.size&&this.setFunctionModule(N,C,b!=2&&b!=4)}}drawAlignmentPattern(o,c){for(let p=-2;p<=2;p++)for(let g=-2;g<=2;g++)this.setFunctionModule(o+g,c+p,Math.max(Math.abs(g),Math.abs(p))!=1)}setFunctionModule(o,c,p){this.modules[c][o]=p,this.isFunction[c][o]=!0}addEccAndInterleave(o){const c=this.version,p=this.errorCorrectionLevel;if(o.length!=e.getNumDataCodewords(c,p))throw new RangeError("Invalid argument");const g=e.NUM_ERROR_CORRECTION_BLOCKS[p.ordinal][c],b=e.ECC_CODEWORDS_PER_BLOCK[p.ordinal][c],N=Math.floor(e.getNumRawDataModules(c)/8),C=g-N%g,_=Math.floor(N/g);let I=[];const B=e.reedSolomonComputeDivisor(b);for(let z=0,H=0;z<g;z++){let st=o.slice(H,H+_-b+(z<C?0:1));H+=st.length;const Li=e.reedSolomonComputeRemainder(st,B);z<C&&st.push(0),I.push(st.concat(Li))}let me=[];for(let z=0;z<I[0].length;z++)I.forEach((H,st)=>{(z!=_-b||st>=C)&&me.push(H[z])});return r(me.length==N),me}drawCodewords(o){if(o.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let c=0;for(let p=this.size-1;p>=1;p-=2){p==6&&(p=5);for(let g=0;g<this.size;g++)for(let b=0;b<2;b++){const N=p-b,_=(p+1&2)==0?this.size-1-g:g;!this.isFunction[_][N]&&c<o.length*8&&(this.modules[_][N]=s(o[c>>>3],7-(c&7)),c++)}}r(c==o.length*8)}applyMask(o){if(o<0||o>7)throw new RangeError("Mask value out of range");for(let c=0;c<this.size;c++)for(let p=0;p<this.size;p++){let g;switch(o){case 0:g=(p+c)%2==0;break;case 1:g=c%2==0;break;case 2:g=p%3==0;break;case 3:g=(p+c)%3==0;break;case 4:g=(Math.floor(p/3)+Math.floor(c/2))%2==0;break;case 5:g=p*c%2+p*c%3==0;break;case 6:g=(p*c%2+p*c%3)%2==0;break;case 7:g=((p+c)%2+p*c%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[c][p]&&g&&(this.modules[c][p]=!this.modules[c][p])}}getPenaltyScore(){let o=0;for(let b=0;b<this.size;b++){let N=!1,C=0,_=[0,0,0,0,0,0,0];for(let I=0;I<this.size;I++)this.modules[b][I]==N?(C++,C==5?o+=e.PENALTY_N1:C>5&&o++):(this.finderPenaltyAddHistory(C,_),N||(o+=this.finderPenaltyCountPatterns(_)*e.PENALTY_N3),N=this.modules[b][I],C=1);o+=this.finderPenaltyTerminateAndCount(N,C,_)*e.PENALTY_N3}for(let b=0;b<this.size;b++){let N=!1,C=0,_=[0,0,0,0,0,0,0];for(let I=0;I<this.size;I++)this.modules[I][b]==N?(C++,C==5?o+=e.PENALTY_N1:C>5&&o++):(this.finderPenaltyAddHistory(C,_),N||(o+=this.finderPenaltyCountPatterns(_)*e.PENALTY_N3),N=this.modules[I][b],C=1);o+=this.finderPenaltyTerminateAndCount(N,C,_)*e.PENALTY_N3}for(let b=0;b<this.size-1;b++)for(let N=0;N<this.size-1;N++){const C=this.modules[b][N];C==this.modules[b][N+1]&&C==this.modules[b+1][N]&&C==this.modules[b+1][N+1]&&(o+=e.PENALTY_N2)}let c=0;for(const b of this.modules)c=b.reduce((N,C)=>N+(C?1:0),c);const p=this.size*this.size,g=Math.ceil(Math.abs(c*20-p*10)/p)-1;return r(0<=g&&g<=9),o+=g*e.PENALTY_N4,r(0<=o&&o<=2568888),o}getAlignmentPatternPositions(){if(this.version==1)return[];{const o=Math.floor(this.version/7)+2,c=Math.floor((this.version*8+o*3+5)/(o*4-4))*2;let p=[6];for(let g=this.size-7;p.length<o;g-=c)p.splice(1,0,g);return p}}static getNumRawDataModules(o){if(o<e.MIN_VERSION||o>e.MAX_VERSION)throw new RangeError("Version number out of range");let c=(16*o+128)*o+64;if(o>=2){const p=Math.floor(o/7)+2;c-=(25*p-10)*p-55,o>=7&&(c-=36)}return r(208<=c&&c<=29648),c}static getNumDataCodewords(o,c){return Math.floor(e.getNumRawDataModules(o)/8)-e.ECC_CODEWORDS_PER_BLOCK[c.ordinal][o]*e.NUM_ERROR_CORRECTION_BLOCKS[c.ordinal][o]}static reedSolomonComputeDivisor(o){if(o<1||o>255)throw new RangeError("Degree out of range");let c=[];for(let g=0;g<o-1;g++)c.push(0);c.push(1);let p=1;for(let g=0;g<o;g++){for(let b=0;b<c.length;b++)c[b]=e.reedSolomonMultiply(c[b],p),b+1<c.length&&(c[b]^=c[b+1]);p=e.reedSolomonMultiply(p,2)}return c}static reedSolomonComputeRemainder(o,c){let p=c.map(g=>0);for(const g of o){const b=g^p.shift();p.push(0),c.forEach((N,C)=>p[C]^=e.reedSolomonMultiply(N,b))}return p}static reedSolomonMultiply(o,c){if(o>>>8||c>>>8)throw new RangeError("Byte out of range");let p=0;for(let g=7;g>=0;g--)p=p<<1^(p>>>7)*285,p^=(c>>>g&1)*o;return r(p>>>8==0),p}finderPenaltyCountPatterns(o){const c=o[1];r(c<=this.size*3);const p=c>0&&o[2]==c&&o[3]==c*3&&o[4]==c&&o[5]==c;return(p&&o[0]>=c*4&&o[6]>=c?1:0)+(p&&o[6]>=c*4&&o[0]>=c?1:0)}finderPenaltyTerminateAndCount(o,c,p){return o&&(this.finderPenaltyAddHistory(c,p),c=0),c+=this.size,this.finderPenaltyAddHistory(c,p),this.finderPenaltyCountPatterns(p)}finderPenaltyAddHistory(o,c){c[0]==0&&(o+=this.size),c.pop(),c.unshift(o)}static MIN_VERSION=1;static MAX_VERSION=40;static PENALTY_N1=3;static PENALTY_N2=3;static PENALTY_N3=40;static PENALTY_N4=10;static ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]];static NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]]}d.QrCode=e;function a(u,o,c){if(o<0||o>31||u>>>o)throw new RangeError("Value out of range");for(let p=o-1;p>=0;p--)c.push(u>>>p&1)}function s(u,o){return(u>>>o&1)!=0}function r(u){if(!u)throw new Error("Assertion error")}class l{mode;numChars;bitData;static makeBytes(o){let c=[];for(const p of o)a(p,8,c);return new l(l.Mode.BYTE,o.length,c)}static makeNumeric(o){if(!l.isNumeric(o))throw new RangeError("String contains non-numeric characters");let c=[];for(let p=0;p<o.length;){const g=Math.min(o.length-p,3);a(parseInt(o.substring(p,p+g),10),g*3+1,c),p+=g}return new l(l.Mode.NUMERIC,o.length,c)}static makeAlphanumeric(o){if(!l.isAlphanumeric(o))throw new RangeError("String contains unencodable characters in alphanumeric mode");let c=[],p;for(p=0;p+2<=o.length;p+=2){let g=l.ALPHANUMERIC_CHARSET.indexOf(o.charAt(p))*45;g+=l.ALPHANUMERIC_CHARSET.indexOf(o.charAt(p+1)),a(g,11,c)}return p<o.length&&a(l.ALPHANUMERIC_CHARSET.indexOf(o.charAt(p)),6,c),new l(l.Mode.ALPHANUMERIC,o.length,c)}static makeSegments(o){return o==""?[]:l.isNumeric(o)?[l.makeNumeric(o)]:l.isAlphanumeric(o)?[l.makeAlphanumeric(o)]:[l.makeBytes(l.toUtf8ByteArray(o))]}static makeEci(o){let c=[];if(o<0)throw new RangeError("ECI assignment value out of range");if(o<128)a(o,8,c);else if(o<16384)a(2,2,c),a(o,14,c);else if(o<1e6)a(6,3,c),a(o,21,c);else throw new RangeError("ECI assignment value out of range");return new l(l.Mode.ECI,0,c)}static isNumeric(o){return l.NUMERIC_REGEX.test(o)}static isAlphanumeric(o){return l.ALPHANUMERIC_REGEX.test(o)}constructor(o,c,p){if(this.mode=o,this.numChars=c,this.bitData=p,c<0)throw new RangeError("Invalid argument");this.bitData=p.slice()}getData(){return this.bitData.slice()}static getTotalBits(o,c){let p=0;for(const g of o){const b=g.mode.numCharCountBits(c);if(g.numChars>=1<<b)return 1/0;p+=4+b+g.bitData.length}return p}static toUtf8ByteArray(o){o=encodeURI(o);let c=[];for(let p=0;p<o.length;p++)o.charAt(p)!="%"?c.push(o.charCodeAt(p)):(c.push(parseInt(o.substring(p+1,p+3),16)),p+=2);return c}static NUMERIC_REGEX=/^[0-9]*$/;static ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/;static ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"}d.QrSegment=l})(J||(J={})),(function(d){var e;(function(a){class s{ordinal;formatBits;static LOW=new s(0,1);static MEDIUM=new s(1,0);static QUARTILE=new s(2,3);static HIGH=new s(3,2);constructor(l,u){this.ordinal=l,this.formatBits=u}}a.Ecc=s})(e=d.QrCode||(d.QrCode={}))})(J||(J={})),(function(d){var e;(function(a){class s{modeBits;numBitsCharCount;static NUMERIC=new s(1,[10,12,14]);static ALPHANUMERIC=new s(2,[9,11,13]);static BYTE=new s(4,[8,16,16]);static KANJI=new s(8,[8,10,12]);static ECI=new s(7,[0,0,0]);constructor(l,u){this.modeBits=l,this.numBitsCharCount=u}numCharCountBits(l){return this.numBitsCharCount[Math.floor((l+7)/17)]}}a.Mode=s})(e=d.QrSegment||(d.QrSegment={}))})(J||(J={}));const dl={L:J.QrCode.Ecc.LOW,M:J.QrCode.Ecc.MEDIUM,Q:J.QrCode.Ecc.QUARTILE,H:J.QrCode.Ecc.HIGH};function di(d,e="M"){const a=J.QrCode.encodeText(d,dl[e]),s=a.size,r=Array.from({length:s},(l,u)=>Array.from({length:s},(o,c)=>a.getModule(c,u)));return{size:s,modules:r}}const ci={sm:128,md:192,lg:256,xl:320},ui=new Set(["sm","md","lg","xl"]);class La{toasts=x(ue,{optional:!0});canvasEl=R("canvasEl",...ngDevMode?[{debugName:"canvasEl"}]:[]);value=i.required(...ngDevMode?[{debugName:"value"}]:[]);view=i("svg",...ngDevMode?[{debugName:"view"}]:[]);size=i("md",...ngDevMode?[{debugName:"size"}]:[]);color=i("var(--color-fg, #161616)",...ngDevMode?[{debugName:"color"}]:[]);background=i("var(--color-surface, #ffffff)",...ngDevMode?[{debugName:"background"}]:[]);errorCorrection=i("M",...ngDevMode?[{debugName:"errorCorrection"}]:[]);margin=i(2,{...ngDevMode?{debugName:"margin"}:{},transform:A});label=i("",...ngDevMode?[{debugName:"label"}]:[]);actions=i(!1,{...ngDevMode?{debugName:"actions"}:{},transform:m});animate=i("fade",...ngDevMode?[{debugName:"animate"}]:[]);downloadName=i("qr-code",...ngDevMode?[{debugName:"downloadName"}]:[]);ready=w();downloaded=w();copied=w();matrix=y(null,...ngDevMode?[{debugName:"matrix"}]:[]);playTick=y(0,...ngDevMode?[{debugName:"playTick"}]:[]);imgSrc=y("",...ngDevMode?[{debugName:"imgSrc"}]:[]);sizeToken=n(()=>{const e=this.size();return typeof e=="string"&&ui.has(e)?e:null},...ngDevMode?[{debugName:"sizeToken"}]:[]);pixelSize=n(()=>{const e=this.size();return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.round(e):typeof e=="string"&&ui.has(e)?ci[e]:ci.md},...ngDevMode?[{debugName:"pixelSize"}]:[]);sizeCss=n(()=>`${this.pixelSize()}px`,...ngDevMode?[{debugName:"sizeCss"}]:[]);svgViewBox=n(()=>{const e=this.matrix();if(!e)return"0 0 1 1";const a=e.size+this.margin()*2;return`0 0 ${a} ${a}`},...ngDevMode?[{debugName:"svgViewBox"}]:[]);svgPath=n(()=>{const e=this.matrix();return e?pi(e.modules,this.margin()):""},...ngDevMode?[{debugName:"svgPath"}]:[]);constructor(){M(()=>{const e=this.value()?.trim()??"",a=this.errorCorrection();if(!e){this.matrix.set(null),this.imgSrc.set("");return}try{const s=di(e,a);this.matrix.set(s),this.ready.emit(s),this.playTick.update(r=>r+1)}catch{this.matrix.set(null),this.imgSrc.set("")}}),M(()=>{const e=this.matrix(),a=this.view(),s=this.color(),r=this.background(),l=this.margin(),u=this.pixelSize();if(this.playTick(),!e){this.imgSrc.set("");return}if(a==="img"){this.imgSrc.set(fi(e,s,r,l,u));return}a==="canvas"&&queueMicrotask(()=>{const o=this.canvasEl()?.nativeElement;o&&mi(o,e,s,r,l,u)})})}hostClasses(){return f("dga-qr")}frameClasses(){return f("dga-qr__frame")}actionsLabel(){return q()?"إجراءات رمز الاستجابة السريعة":"QR code actions"}downloadLabel(){return q()?"تنزيل":"Download"}copyLabel(){return q()?"نسخ الرابط":"Copy link"}async onCopy(){const e=this.value()?.trim();if(!e||!await ge.writeText(e))return;this.copied.emit(e);const s=q();this.toasts?.copied(s?"تم نسخ الرابط إلى الحافظة":"Link copied to clipboard",s?"تم النسخ":"Copied")}onDownload(){const e=this.matrix();if(!e)return;const a=(this.downloadName()||"qr-code").replace(/\.(svg|png)$/i,""),s=this.view();if(s==="svg"){const u=cl(e,this.color(),this.background(),this.margin());ul(new Blob([u],{type:"image/svg+xml;charset=utf-8"}),`${a}.svg`),this.downloaded.emit(`${a}.svg`);return}const r=s==="img"?this.imgSrc():fi(e,this.color(),this.background(),this.margin(),this.pixelSize());if(!r)return;const l=document.createElement("a");l.href=r,l.download=`${a}.png`,l.click(),this.downloaded.emit(`${a}.png`)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:La,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:La,isStandalone:!0,selector:"dga-qr",inputs:{value:{classPropertyName:"value",publicName:"value",isSignal:!0,isRequired:!0,transformFunction:null},view:{classPropertyName:"view",publicName:"view",isSignal:!0,isRequired:!1,transformFunction:null},size:{classPropertyName:"size",publicName:"size",isSignal:!0,isRequired:!1,transformFunction:null},color:{classPropertyName:"color",publicName:"color",isSignal:!0,isRequired:!1,transformFunction:null},background:{classPropertyName:"background",publicName:"background",isSignal:!0,isRequired:!1,transformFunction:null},errorCorrection:{classPropertyName:"errorCorrection",publicName:"errorCorrection",isSignal:!0,isRequired:!1,transformFunction:null},margin:{classPropertyName:"margin",publicName:"margin",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},actions:{classPropertyName:"actions",publicName:"actions",isSignal:!0,isRequired:!1,transformFunction:null},animate:{classPropertyName:"animate",publicName:"animate",isSignal:!0,isRequired:!1,transformFunction:null},downloadName:{classPropertyName:"downloadName",publicName:"downloadName",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{ready:"ready",downloaded:"downloaded",copied:"copied"},host:{properties:{class:"hostClasses()","attr.data-view":"view()","attr.data-size":"sizeToken()","attr.data-animate":"animate()","attr.data-actions":'actions() ? "" : null',"attr.role":'label() ? "img" : null',"attr.aria-label":"label() || null","style.--dga-qr-size":"sizeCss()","style.--dga-qr-fg":"color()","style.--dga-qr-bg":"background()"}},viewQueries:[{propertyName:"canvasEl",first:!0,predicate:["canvasEl"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
10180
10198
|
@if (matrix()) {
|
|
10181
10199
|
<div [class]="frameClasses()" [attr.data-play]="playTick() || null">
|
|
10182
10200
|
@switch (view()) {
|
|
@@ -10304,7 +10322,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
10304
10322
|
</div>
|
|
10305
10323
|
}
|
|
10306
10324
|
}
|
|
10307
|
-
`,host:{"[class]":"hostClasses()","[attr.data-view]":"view()","[attr.data-size]":"sizeToken()","[attr.data-animate]":"animate()","[attr.data-actions]":'actions() ? "" : null',"[attr.role]":'label() ? "img" : null',"[attr.aria-label]":"label() || null","[style.--dga-qr-size]":"sizeCss()","[style.--dga-qr-fg]":"color()","[style.--dga-qr-bg]":"background()"},styles:[":host{--dga-qr-size: 12rem;display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-md, .5rem);max-width:100%}:host .dga-qr__frame{display:block;width:var(--dga-qr-size);height:var(--dga-qr-size);max-width:100%;aspect-ratio:1;border-radius:var(--radius-sm, .25rem);overflow:hidden;background:var(--dga-qr-bg, var(--color-surface, #fff));line-height:0}:host .dga-qr__svg,:host .dga-qr__img,:host .dga-qr__canvas{display:block;width:100%;height:100%}:host .dga-qr__actions{display:flex;flex-wrap:wrap;gap:var(--spacing-sm, .375rem)}:host[data-animate=fade] .dga-qr__frame[data-play]{animation:dga-qr-fade-in .36s ease-out both}:host[data-animate=scale] .dga-qr__frame[data-play]{animation:dga-qr-scale-in .38s cubic-bezier(.22,1,.36,1) both}:host[data-animate=reveal] .dga-qr__frame[data-play]{animation:dga-qr-reveal .48s ease-out both}@keyframes dga-qr-fade-in{0%{opacity:0}to{opacity:1}}@keyframes dga-qr-scale-in{0%{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}@keyframes dga-qr-reveal{0%{opacity:0;clip-path:inset(50% 50% 50% 50%)}to{opacity:1;clip-path:inset(0 0 0 0)}}@media(prefers-reduced-motion:reduce){:host[data-animate] .dga-qr__frame[data-play]{animation:none!important}}\n"]}]}],ctorParameters:()=>[],propDecorators:{canvasEl:[{type:t.ViewChild,args:["canvasEl",{isSignal:!0}]}],value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!0}]}],view:[{type:t.Input,args:[{isSignal:!0,alias:"view",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],color:[{type:t.Input,args:[{isSignal:!0,alias:"color",required:!1}]}],background:[{type:t.Input,args:[{isSignal:!0,alias:"background",required:!1}]}],errorCorrection:[{type:t.Input,args:[{isSignal:!0,alias:"errorCorrection",required:!1}]}],margin:[{type:t.Input,args:[{isSignal:!0,alias:"margin",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],actions:[{type:t.Input,args:[{isSignal:!0,alias:"actions",required:!1}]}],animate:[{type:t.Input,args:[{isSignal:!0,alias:"animate",required:!1}]}],downloadName:[{type:t.Input,args:[{isSignal:!0,alias:"downloadName",required:!1}]}],ready:[{type:t.Output,args:["ready"]}],downloaded:[{type:t.Output,args:["downloaded"]}],copied:[{type:t.Output,args:["copied"]}]}});function ui(d,e){const a=[];for(let s=0;s<d.length;s++){const r=d[s];for(let l=0;l<r.length;l++)r[l]&&a.push(`M${l+e} ${s+e}h1v1h-1z`)}return a.join("")}function cl(d,e,a,s){const r=d.size+s*2,l=ui(d.modules,s);return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${r} ${r}" shape-rendering="crispEdges"><rect width="100%" height="100%" fill="${pi(a)}"/><path fill="${pi(e)}" d="${l}"/></svg>`}function pi(d){return d.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<")}function gi(d,e,a,s,r,l){const u=e.size+r*2,o=Math.max(1,Math.floor(l/u)),c=u*o;d.width=c,d.height=c;const p=d.getContext("2d");if(p){p.fillStyle=fi(s)||"#ffffff",p.fillRect(0,0,c,c),p.fillStyle=fi(a)||"#161616";for(let g=0;g<e.size;g++)for(let b=0;b<e.size;b++)e.modules[g][b]&&p.fillRect((b+r)*o,(g+r)*o,o,o)}}function mi(d,e,a,s,r){if(typeof document>"u")return"";const l=document.createElement("canvas");return gi(l,d,e,a,s,r),l.toDataURL("image/png")}function fi(d){const e=d.trim();if(!e.startsWith("var("))return e;if(typeof document>"u")return"";const a=document.createElement("span");a.style.color=e,a.style.display="none",document.body.appendChild(a);const s=getComputedStyle(a).color;return document.body.removeChild(a),s||e}function ul(d,e){const a=URL.createObjectURL(d),s=document.createElement("a");s.href=a,s.download=e,s.click(),URL.revokeObjectURL(a)}const pl=["11011001100","11001101100","11001100110","10010011000","10010001100","10001001100","10011001000","10011000100","10001100100","11001001000","11001000100","11000100100","10110011100","10011011100","10011001110","10111001100","10011101100","10011100110","11001110010","11001011100","11001001110","11011100100","11001110100","11101101110","11101001100","11100101100","11100100110","11101100100","11100110100","11100110010","11011011000","11011000110","11000110110","10100011000","10001011000","10001000110","10110001000","10001101000","10001100010","11010001000","11000101000","11000100010","10110111000","10110001110","10001101110","10111011000","10111000110","10001110110","11101110110","11010001110","11000101110","11011101000","11011100010","11011101110","11101011000","11101000110","11100010110","11101101000","11101100010","11100011010","11101111010","11001000010","11110001010","10100110000","10100001100","10010110000","10010000110","10000101100","10000100110","10110010000","10110000100","10011010000","10011000010","10000110100","10000110010","11000010010","11001010000","11110111010","11000010100","10001111010","10100111100","10010111100","10010011110","10111100100","10011110100","10011110010","11110100100","11110010100","11110010010","11011011110","11011110110","11110110110","10101111000","10100011110","10001011110","10111101000","10111100010","11110101000","11110100010","10111011110","10111101110","11101011110","11110101110","11010000100","11010010000","11010011100","11000111010"],gl=104,ml=105,fl=100,bl=99,hl=106;function bi(d,e=10){const a=d??"";if(!a.length)throw new Error("Barcode value is empty");for(let o=0;o<a.length;o++){const c=a.charCodeAt(o);if(c<32||c>126)throw new Error(`Unsupported barcode character at ${o}`)}const s=vl(a);let r=s[0];for(let o=1;o<s.length;o++)r+=s[o]*o;s.push(r%103,hl);const l=[],u=Math.max(0,Math.floor(e));for(let o=0;o<u;o++)l.push(!1);for(const o of s){const c=pl[o];if(!c)throw new Error(`Missing Code 128 pattern for ${o}`);for(let p=0;p<c.length;p++)l.push(c.charAt(p)==="1")}for(let o=0;o<u;o++)l.push(!1);return{modules:l,text:a,quietZone:u}}function vl(d){const e=[];let a=0,s=hi(d,0)>=4?"C":"B";for(e.push(s==="C"?ml:gl);a<d.length;){if(s==="C"){if(a+1<d.length&&os(d,a)&&os(d,a+1)){e.push(Number(d.slice(a,a+2))),a+=2;continue}e.push(fl),s="B";continue}if(hi(d,a)>=4){e.push(bl),s="C";continue}e.push(d.charCodeAt(a)-32),a+=1}return e}function os(d,e){const a=d.charCodeAt(e);return a>=48&&a<=57}function hi(d,e){let a=0;for(let s=e;s<d.length&&os(d,s);s++)a+=1;return a}class Pa{value=i.required(...ngDevMode?[{debugName:"value"}]:[]);format=i("code128",...ngDevMode?[{debugName:"format"}]:[]);height=i(64,{...ngDevMode?{debugName:"height"}:{},transform:A});moduleWidth=i(2,{...ngDevMode?{debugName:"moduleWidth"}:{},transform:A});quietZone=i(10,{...ngDevMode?{debugName:"quietZone"}:{},transform:A});displayValue=i(!0,{...ngDevMode?{debugName:"displayValue"}:{},transform:m});color=i("var(--color-fg, #161616)",...ngDevMode?[{debugName:"color"}]:[]);background=i("var(--color-surface, #ffffff)",...ngDevMode?[{debugName:"background"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);actions=i(!1,{...ngDevMode?{debugName:"actions"}:{},transform:m});downloadName=i("barcode",...ngDevMode?[{debugName:"downloadName"}]:[]);ready=w();downloaded=w();matrix=y(null,...ngDevMode?[{debugName:"matrix"}]:[]);barHeight=n(()=>{const e=this.height();return Number.isFinite(e)&&e>0?Math.round(e):64},...ngDevMode?[{debugName:"barHeight"}]:[]);modulePx=n(()=>{const e=this.moduleWidth();return Number.isFinite(e)&&e>0?e:2},...ngDevMode?[{debugName:"modulePx"}]:[]);svgWidth=n(()=>{const e=this.matrix();return e?Math.round(e.modules.length*this.modulePx()):0},...ngDevMode?[{debugName:"svgWidth"}]:[]);svgViewBox=n(()=>{const e=this.matrix();return e?`0 0 ${e.modules.length} ${this.barHeight()}`:"0 0 1 1"},...ngDevMode?[{debugName:"svgViewBox"}]:[]);svgPath=n(()=>{const e=this.matrix();return e?vi(e.modules,this.barHeight()):""},...ngDevMode?[{debugName:"svgPath"}]:[]);constructor(){M(()=>{const e=this.value()?.trim()??"";this.format();const a=this.quietZone();if(!e){this.matrix.set(null);return}try{const s=bi(e,a);this.matrix.set(s),this.ready.emit(s)}catch{this.matrix.set(null)}})}hostClasses(){return f("dga-barcode")}actionsLabel(){return q()?"إجراءات الرمز الشريطي":"Barcode actions"}downloadLabel(){return q()?"تنزيل":"Download"}onDownload(){const e=this.matrix();if(!e)return;const a=(this.downloadName()||"barcode").replace(/\.svg$/i,""),s=yl(e,this.color(),this.background(),this.barHeight()),r=URL.createObjectURL(new Blob([s],{type:"image/svg+xml;charset=utf-8"})),l=document.createElement("a");l.href=r,l.download=`${a}.svg`,l.click(),URL.revokeObjectURL(r),this.downloaded.emit(`${a}.svg`)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Pa,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Pa,isStandalone:!0,selector:"dga-barcode",inputs:{value:{classPropertyName:"value",publicName:"value",isSignal:!0,isRequired:!0,transformFunction:null},format:{classPropertyName:"format",publicName:"format",isSignal:!0,isRequired:!1,transformFunction:null},height:{classPropertyName:"height",publicName:"height",isSignal:!0,isRequired:!1,transformFunction:null},moduleWidth:{classPropertyName:"moduleWidth",publicName:"moduleWidth",isSignal:!0,isRequired:!1,transformFunction:null},quietZone:{classPropertyName:"quietZone",publicName:"quietZone",isSignal:!0,isRequired:!1,transformFunction:null},displayValue:{classPropertyName:"displayValue",publicName:"displayValue",isSignal:!0,isRequired:!1,transformFunction:null},color:{classPropertyName:"color",publicName:"color",isSignal:!0,isRequired:!1,transformFunction:null},background:{classPropertyName:"background",publicName:"background",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},actions:{classPropertyName:"actions",publicName:"actions",isSignal:!0,isRequired:!1,transformFunction:null},downloadName:{classPropertyName:"downloadName",publicName:"downloadName",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{ready:"ready",downloaded:"downloaded"},host:{properties:{class:"hostClasses()","attr.data-format":"format()","attr.data-actions":'actions() ? "" : null',"attr.role":'label() ? "img" : null',"attr.aria-label":"label() || null","style.--dga-barcode-fg":"color()","style.--dga-barcode-bg":"background()"}},ngImport:t,template:`
|
|
10325
|
+
`,host:{"[class]":"hostClasses()","[attr.data-view]":"view()","[attr.data-size]":"sizeToken()","[attr.data-animate]":"animate()","[attr.data-actions]":'actions() ? "" : null',"[attr.role]":'label() ? "img" : null',"[attr.aria-label]":"label() || null","[style.--dga-qr-size]":"sizeCss()","[style.--dga-qr-fg]":"color()","[style.--dga-qr-bg]":"background()"},styles:[":host{--dga-qr-size: 12rem;display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-md, .5rem);max-width:100%}:host .dga-qr__frame{display:block;width:var(--dga-qr-size);height:var(--dga-qr-size);max-width:100%;aspect-ratio:1;border-radius:var(--radius-sm, .25rem);overflow:hidden;background:var(--dga-qr-bg, var(--color-surface, #fff));line-height:0}:host .dga-qr__svg,:host .dga-qr__img,:host .dga-qr__canvas{display:block;width:100%;height:100%}:host .dga-qr__actions{display:flex;flex-wrap:wrap;gap:var(--spacing-sm, .375rem)}:host[data-animate=fade] .dga-qr__frame[data-play]{animation:dga-qr-fade-in .36s ease-out both}:host[data-animate=scale] .dga-qr__frame[data-play]{animation:dga-qr-scale-in .38s cubic-bezier(.22,1,.36,1) both}:host[data-animate=reveal] .dga-qr__frame[data-play]{animation:dga-qr-reveal .48s ease-out both}@keyframes dga-qr-fade-in{0%{opacity:0}to{opacity:1}}@keyframes dga-qr-scale-in{0%{opacity:0;transform:scale(.92)}to{opacity:1;transform:scale(1)}}@keyframes dga-qr-reveal{0%{opacity:0;clip-path:inset(50% 50% 50% 50%)}to{opacity:1;clip-path:inset(0 0 0 0)}}@media(prefers-reduced-motion:reduce){:host[data-animate] .dga-qr__frame[data-play]{animation:none!important}}\n"]}]}],ctorParameters:()=>[],propDecorators:{canvasEl:[{type:t.ViewChild,args:["canvasEl",{isSignal:!0}]}],value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!0}]}],view:[{type:t.Input,args:[{isSignal:!0,alias:"view",required:!1}]}],size:[{type:t.Input,args:[{isSignal:!0,alias:"size",required:!1}]}],color:[{type:t.Input,args:[{isSignal:!0,alias:"color",required:!1}]}],background:[{type:t.Input,args:[{isSignal:!0,alias:"background",required:!1}]}],errorCorrection:[{type:t.Input,args:[{isSignal:!0,alias:"errorCorrection",required:!1}]}],margin:[{type:t.Input,args:[{isSignal:!0,alias:"margin",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],actions:[{type:t.Input,args:[{isSignal:!0,alias:"actions",required:!1}]}],animate:[{type:t.Input,args:[{isSignal:!0,alias:"animate",required:!1}]}],downloadName:[{type:t.Input,args:[{isSignal:!0,alias:"downloadName",required:!1}]}],ready:[{type:t.Output,args:["ready"]}],downloaded:[{type:t.Output,args:["downloaded"]}],copied:[{type:t.Output,args:["copied"]}]}});function pi(d,e){const a=[];for(let s=0;s<d.length;s++){const r=d[s];for(let l=0;l<r.length;l++)r[l]&&a.push(`M${l+e} ${s+e}h1v1h-1z`)}return a.join("")}function cl(d,e,a,s){const r=d.size+s*2,l=pi(d.modules,s);return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${r} ${r}" shape-rendering="crispEdges"><rect width="100%" height="100%" fill="${gi(a)}"/><path fill="${gi(e)}" d="${l}"/></svg>`}function gi(d){return d.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<")}function mi(d,e,a,s,r,l){const u=e.size+r*2,o=Math.max(1,Math.floor(l/u)),c=u*o;d.width=c,d.height=c;const p=d.getContext("2d");if(p){p.fillStyle=bi(s)||"#ffffff",p.fillRect(0,0,c,c),p.fillStyle=bi(a)||"#161616";for(let g=0;g<e.size;g++)for(let b=0;b<e.size;b++)e.modules[g][b]&&p.fillRect((b+r)*o,(g+r)*o,o,o)}}function fi(d,e,a,s,r){if(typeof document>"u")return"";const l=document.createElement("canvas");return mi(l,d,e,a,s,r),l.toDataURL("image/png")}function bi(d){const e=d.trim();if(!e.startsWith("var("))return e;if(typeof document>"u")return"";const a=document.createElement("span");a.style.color=e,a.style.display="none",document.body.appendChild(a);const s=getComputedStyle(a).color;return document.body.removeChild(a),s||e}function ul(d,e){const a=URL.createObjectURL(d),s=document.createElement("a");s.href=a,s.download=e,s.click(),URL.revokeObjectURL(a)}const pl=["11011001100","11001101100","11001100110","10010011000","10010001100","10001001100","10011001000","10011000100","10001100100","11001001000","11001000100","11000100100","10110011100","10011011100","10011001110","10111001100","10011101100","10011100110","11001110010","11001011100","11001001110","11011100100","11001110100","11101101110","11101001100","11100101100","11100100110","11101100100","11100110100","11100110010","11011011000","11011000110","11000110110","10100011000","10001011000","10001000110","10110001000","10001101000","10001100010","11010001000","11000101000","11000100010","10110111000","10110001110","10001101110","10111011000","10111000110","10001110110","11101110110","11010001110","11000101110","11011101000","11011100010","11011101110","11101011000","11101000110","11100010110","11101101000","11101100010","11100011010","11101111010","11001000010","11110001010","10100110000","10100001100","10010110000","10010000110","10000101100","10000100110","10110010000","10110000100","10011010000","10011000010","10000110100","10000110010","11000010010","11001010000","11110111010","11000010100","10001111010","10100111100","10010111100","10010011110","10111100100","10011110100","10011110010","11110100100","11110010100","11110010010","11011011110","11011110110","11110110110","10101111000","10100011110","10001011110","10111101000","10111100010","11110101000","11110100010","10111011110","10111101110","11101011110","11110101110","11010000100","11010010000","11010011100","11000111010"],gl=104,ml=105,fl=100,bl=99,hl=106;function hi(d,e=10){const a=d??"";if(!a.length)throw new Error("Barcode value is empty");for(let o=0;o<a.length;o++){const c=a.charCodeAt(o);if(c<32||c>126)throw new Error(`Unsupported barcode character at ${o}`)}const s=vl(a);let r=s[0];for(let o=1;o<s.length;o++)r+=s[o]*o;s.push(r%103,hl);const l=[],u=Math.max(0,Math.floor(e));for(let o=0;o<u;o++)l.push(!1);for(const o of s){const c=pl[o];if(!c)throw new Error(`Missing Code 128 pattern for ${o}`);for(let p=0;p<c.length;p++)l.push(c.charAt(p)==="1")}for(let o=0;o<u;o++)l.push(!1);return{modules:l,text:a,quietZone:u}}function vl(d){const e=[];let a=0,s=vi(d,0)>=4?"C":"B";for(e.push(s==="C"?ml:gl);a<d.length;){if(s==="C"){if(a+1<d.length&&os(d,a)&&os(d,a+1)){e.push(Number(d.slice(a,a+2))),a+=2;continue}e.push(fl),s="B";continue}if(vi(d,a)>=4){e.push(bl),s="C";continue}e.push(d.charCodeAt(a)-32),a+=1}return e}function os(d,e){const a=d.charCodeAt(e);return a>=48&&a<=57}function vi(d,e){let a=0;for(let s=e;s<d.length&&os(d,s);s++)a+=1;return a}class Pa{value=i.required(...ngDevMode?[{debugName:"value"}]:[]);format=i("code128",...ngDevMode?[{debugName:"format"}]:[]);height=i(64,{...ngDevMode?{debugName:"height"}:{},transform:A});moduleWidth=i(2,{...ngDevMode?{debugName:"moduleWidth"}:{},transform:A});quietZone=i(10,{...ngDevMode?{debugName:"quietZone"}:{},transform:A});displayValue=i(!0,{...ngDevMode?{debugName:"displayValue"}:{},transform:m});color=i("var(--color-fg, #161616)",...ngDevMode?[{debugName:"color"}]:[]);background=i("var(--color-surface, #ffffff)",...ngDevMode?[{debugName:"background"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);actions=i(!1,{...ngDevMode?{debugName:"actions"}:{},transform:m});downloadName=i("barcode",...ngDevMode?[{debugName:"downloadName"}]:[]);ready=w();downloaded=w();matrix=y(null,...ngDevMode?[{debugName:"matrix"}]:[]);barHeight=n(()=>{const e=this.height();return Number.isFinite(e)&&e>0?Math.round(e):64},...ngDevMode?[{debugName:"barHeight"}]:[]);modulePx=n(()=>{const e=this.moduleWidth();return Number.isFinite(e)&&e>0?e:2},...ngDevMode?[{debugName:"modulePx"}]:[]);svgWidth=n(()=>{const e=this.matrix();return e?Math.round(e.modules.length*this.modulePx()):0},...ngDevMode?[{debugName:"svgWidth"}]:[]);svgViewBox=n(()=>{const e=this.matrix();return e?`0 0 ${e.modules.length} ${this.barHeight()}`:"0 0 1 1"},...ngDevMode?[{debugName:"svgViewBox"}]:[]);svgPath=n(()=>{const e=this.matrix();return e?yi(e.modules,this.barHeight()):""},...ngDevMode?[{debugName:"svgPath"}]:[]);constructor(){M(()=>{const e=this.value()?.trim()??"";this.format();const a=this.quietZone();if(!e){this.matrix.set(null);return}try{const s=hi(e,a);this.matrix.set(s),this.ready.emit(s)}catch{this.matrix.set(null)}})}hostClasses(){return f("dga-barcode")}actionsLabel(){return q()?"إجراءات الرمز الشريطي":"Barcode actions"}downloadLabel(){return q()?"تنزيل":"Download"}onDownload(){const e=this.matrix();if(!e)return;const a=(this.downloadName()||"barcode").replace(/\.svg$/i,""),s=yl(e,this.color(),this.background(),this.barHeight()),r=URL.createObjectURL(new Blob([s],{type:"image/svg+xml;charset=utf-8"})),l=document.createElement("a");l.href=r,l.download=`${a}.svg`,l.click(),URL.revokeObjectURL(r),this.downloaded.emit(`${a}.svg`)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Pa,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Pa,isStandalone:!0,selector:"dga-barcode",inputs:{value:{classPropertyName:"value",publicName:"value",isSignal:!0,isRequired:!0,transformFunction:null},format:{classPropertyName:"format",publicName:"format",isSignal:!0,isRequired:!1,transformFunction:null},height:{classPropertyName:"height",publicName:"height",isSignal:!0,isRequired:!1,transformFunction:null},moduleWidth:{classPropertyName:"moduleWidth",publicName:"moduleWidth",isSignal:!0,isRequired:!1,transformFunction:null},quietZone:{classPropertyName:"quietZone",publicName:"quietZone",isSignal:!0,isRequired:!1,transformFunction:null},displayValue:{classPropertyName:"displayValue",publicName:"displayValue",isSignal:!0,isRequired:!1,transformFunction:null},color:{classPropertyName:"color",publicName:"color",isSignal:!0,isRequired:!1,transformFunction:null},background:{classPropertyName:"background",publicName:"background",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},actions:{classPropertyName:"actions",publicName:"actions",isSignal:!0,isRequired:!1,transformFunction:null},downloadName:{classPropertyName:"downloadName",publicName:"downloadName",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{ready:"ready",downloaded:"downloaded"},host:{properties:{class:"hostClasses()","attr.data-format":"format()","attr.data-actions":'actions() ? "" : null',"attr.role":'label() ? "img" : null',"attr.aria-label":"label() || null","style.--dga-barcode-fg":"color()","style.--dga-barcode-bg":"background()"}},ngImport:t,template:`
|
|
10308
10326
|
@if (matrix()) {
|
|
10309
10327
|
<div class="dga-barcode__frame">
|
|
10310
10328
|
<svg
|
|
@@ -10378,7 +10396,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
10378
10396
|
</div>
|
|
10379
10397
|
}
|
|
10380
10398
|
}
|
|
10381
|
-
`,host:{"[class]":"hostClasses()","[attr.data-format]":"format()","[attr.data-actions]":'actions() ? "" : null',"[attr.role]":'label() ? "img" : null',"[attr.aria-label]":"label() || null","[style.--dga-barcode-fg]":"color()","[style.--dga-barcode-bg]":"background()"},styles:[":host{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-md, .5rem);max-width:100%}:host .dga-barcode__frame{display:flex;flex-direction:column;align-items:center;gap:var(--spacing-sm, .375rem);max-width:100%;padding:var(--spacing-md, .5rem);border-radius:var(--radius-sm, .25rem);background:var(--dga-barcode-bg, var(--color-surface, #fff));line-height:0}:host .dga-barcode__svg{display:block;max-width:100%;height:auto}:host .dga-barcode__text{margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:var(--text-body-sm, .875rem);font-weight:500;letter-spacing:.04em;color:var(--dga-barcode-fg, var(--color-fg, #161616));line-height:1.25;unicode-bidi:isolate}:host .dga-barcode__actions{display:flex;flex-wrap:wrap;gap:var(--spacing-sm, .375rem)}\n"]}]}],ctorParameters:()=>[],propDecorators:{value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!0}]}],format:[{type:t.Input,args:[{isSignal:!0,alias:"format",required:!1}]}],height:[{type:t.Input,args:[{isSignal:!0,alias:"height",required:!1}]}],moduleWidth:[{type:t.Input,args:[{isSignal:!0,alias:"moduleWidth",required:!1}]}],quietZone:[{type:t.Input,args:[{isSignal:!0,alias:"quietZone",required:!1}]}],displayValue:[{type:t.Input,args:[{isSignal:!0,alias:"displayValue",required:!1}]}],color:[{type:t.Input,args:[{isSignal:!0,alias:"color",required:!1}]}],background:[{type:t.Input,args:[{isSignal:!0,alias:"background",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],actions:[{type:t.Input,args:[{isSignal:!0,alias:"actions",required:!1}]}],downloadName:[{type:t.Input,args:[{isSignal:!0,alias:"downloadName",required:!1}]}],ready:[{type:t.Output,args:["ready"]}],downloaded:[{type:t.Output,args:["downloaded"]}]}});function
|
|
10399
|
+
`,host:{"[class]":"hostClasses()","[attr.data-format]":"format()","[attr.data-actions]":'actions() ? "" : null',"[attr.role]":'label() ? "img" : null',"[attr.aria-label]":"label() || null","[style.--dga-barcode-fg]":"color()","[style.--dga-barcode-bg]":"background()"},styles:[":host{display:inline-flex;flex-direction:column;align-items:flex-start;gap:var(--spacing-md, .5rem);max-width:100%}:host .dga-barcode__frame{display:flex;flex-direction:column;align-items:center;gap:var(--spacing-sm, .375rem);max-width:100%;padding:var(--spacing-md, .5rem);border-radius:var(--radius-sm, .25rem);background:var(--dga-barcode-bg, var(--color-surface, #fff));line-height:0}:host .dga-barcode__svg{display:block;max-width:100%;height:auto}:host .dga-barcode__text{margin:0;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:var(--text-body-sm, .875rem);font-weight:500;letter-spacing:.04em;color:var(--dga-barcode-fg, var(--color-fg, #161616));line-height:1.25;unicode-bidi:isolate}:host .dga-barcode__actions{display:flex;flex-wrap:wrap;gap:var(--spacing-sm, .375rem)}\n"]}]}],ctorParameters:()=>[],propDecorators:{value:[{type:t.Input,args:[{isSignal:!0,alias:"value",required:!0}]}],format:[{type:t.Input,args:[{isSignal:!0,alias:"format",required:!1}]}],height:[{type:t.Input,args:[{isSignal:!0,alias:"height",required:!1}]}],moduleWidth:[{type:t.Input,args:[{isSignal:!0,alias:"moduleWidth",required:!1}]}],quietZone:[{type:t.Input,args:[{isSignal:!0,alias:"quietZone",required:!1}]}],displayValue:[{type:t.Input,args:[{isSignal:!0,alias:"displayValue",required:!1}]}],color:[{type:t.Input,args:[{isSignal:!0,alias:"color",required:!1}]}],background:[{type:t.Input,args:[{isSignal:!0,alias:"background",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],actions:[{type:t.Input,args:[{isSignal:!0,alias:"actions",required:!1}]}],downloadName:[{type:t.Input,args:[{isSignal:!0,alias:"downloadName",required:!1}]}],ready:[{type:t.Output,args:["ready"]}],downloaded:[{type:t.Output,args:["downloaded"]}]}});function yi(d,e){const a=[];let s=0;for(;s<d.length;){if(!d[s]){s+=1;continue}let r=0;for(;s+r<d.length&&d[s+r];)r+=1;a.push(`M${s} 0h${r}v${e}h-${r}z`),s+=r}return a.join("")}function yl(d,e,a,s){const r=yi(d.modules,s),l=d.modules.length;return`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 ${l} ${s}" width="${l}" height="${s}" shape-rendering="crispEdges"><rect width="100%" height="100%" fill="${xi(a)}"/><path fill="${xi(e)}" d="${r}"/></svg>`}function xi(d){return d.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<")}const xl=[/^https:\/\/(www\.)?google\.[a-z.]+\/maps\/embed(\?|\/|$)/i,/^https:\/\/(www\.)?google\.[a-z.]+\/maps\/d\/embed(\?|\/|$)/i,/^https:\/\/maps\.google\.[a-z.]+\/maps(\?|\/|$)/i,/^https:\/\/maps\.apple\.com\//i,/^https:\/\/(www\.)?openstreetmap\.org\/export\/embed\.html(\?|$)/i,/^https:\/\/([\w-]+\.)*gov\.sa\/[^\s#]*?(embed|map)[^\s#]*/i];function wi(d){const e=(d??"").trim();if(!e)return!1;let a;try{a=new URL(e)}catch{return!1}return a.protocol!=="https:"?!1:xl.some(s=>s.test(a.href))}const ki={video:"16 / 9",wide:"21 / 9",square:"1 / 1",portrait:"3 / 4"};class za{sanitizer=x(Wa);src=i.required(...ngDevMode?[{debugName:"src"}]:[]);title=i.required(...ngDevMode?[{debugName:"title"}]:[]);aspect=i("video",...ngDevMode?[{debugName:"aspect"}]:[]);sandbox=i("",...ngDevMode?[{debugName:"sandbox"}]:[]);height=i(null,{...ngDevMode?{debugName:"height"}:{},transform:e=>{if(e==null||e==="")return null;const a=A(e,NaN);return Number.isFinite(a)&&a>0?Math.round(a):null}});allowed=n(()=>wi(this.src()),...ngDevMode?[{debugName:"allowed"}]:[]);canEmbed=n(()=>this.allowed()&&!!this.src()?.trim(),...ngDevMode?[{debugName:"canEmbed"}]:[]);safeSrc=n(()=>{const e=this.canEmbed()?this.src().trim():"about:blank";return this.sanitizer.bypassSecurityTrustResourceUrl(e)},...ngDevMode?[{debugName:"safeSrc"}]:[]);aspectCss=n(()=>this.height()!=null?null:ki[this.aspect()]??ki.video,...ngDevMode?[{debugName:"aspectCss"}]:[]);shellStyle=n(()=>{const e=this.height(),a=this.aspectCss();return{height:e!=null?`${e}px`:null,aspectRatio:a}},...ngDevMode?[{debugName:"shellStyle"}]:[]);frameClasses(){return f("dga-map-embed__shell")}blockedTitle(){return q()?"تعذر تحميل الخريطة":"Map embed blocked"}blockedBody(){return q()?"يُسمح فقط بروابط التضمين من خرائط معتمدة (Google / Apple / OSM / gov.sa).":"Only allowlisted embed URLs are permitted (Google / Apple / OSM / gov.sa)."}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:za,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:za,isStandalone:!0,selector:"dga-map-embed",inputs:{src:{classPropertyName:"src",publicName:"src",isSignal:!0,isRequired:!0,transformFunction:null},title:{classPropertyName:"title",publicName:"title",isSignal:!0,isRequired:!0,transformFunction:null},aspect:{classPropertyName:"aspect",publicName:"aspect",isSignal:!0,isRequired:!1,transformFunction:null},sandbox:{classPropertyName:"sandbox",publicName:"sandbox",isSignal:!0,isRequired:!1,transformFunction:null},height:{classPropertyName:"height",publicName:"height",isSignal:!0,isRequired:!1,transformFunction:null}},host:{properties:{"attr.data-aspect":"aspect()","attr.data-allowed":'allowed() ? "" : null',"attr.data-blocked":'allowed() ? null : ""'},classAttribute:"dga-map-embed block w-full"},ngImport:t,template:`
|
|
10382
10400
|
<div [class]="frameClasses()" [style.height]="shellStyle().height" [style.aspect-ratio]="shellStyle().aspectRatio">
|
|
10383
10401
|
@if (canEmbed()) {
|
|
10384
10402
|
<iframe
|
|
@@ -10482,17 +10500,17 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
10482
10500
|
</li>
|
|
10483
10501
|
}
|
|
10484
10502
|
</ul>
|
|
10485
|
-
`,changeDetection:h.OnPush,host:{class:"block w-full","[attr.data-appearance]":"appearance()"},styles:[":host .dga-stat-strip__label{margin:0;font-size:var(--text-body-xs, .75rem);font-weight:500;color:var(--color-muted, #6b7280)}:host .dga-stat-strip__value{margin:var(--spacing-xxs, .125rem) 0 0;font-size:var(--text-display-sm, 1.25rem);font-weight:600;line-height:1.25;color:var(--color-display, #161616)}\n"]}]}],propDecorators:{items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!0}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],appearance:[{type:t.Input,args:[{isSignal:!0,alias:"appearance",required:!1}]}]}});class
|
|
10503
|
+
`,changeDetection:h.OnPush,host:{class:"block w-full","[attr.data-appearance]":"appearance()"},styles:[":host .dga-stat-strip__label{margin:0;font-size:var(--text-body-xs, .75rem);font-weight:500;color:var(--color-muted, #6b7280)}:host .dga-stat-strip__value{margin:var(--spacing-xxs, .125rem) 0 0;font-size:var(--text-display-sm, 1.25rem);font-weight:600;line-height:1.25;color:var(--color-display, #161616)}\n"]}]}],propDecorators:{items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!0}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],appearance:[{type:t.Input,args:[{isSignal:!0,alias:"appearance",required:!1}]}]}});class Ta{document=x(ja);destroyRef=x(L);items=i([],...ngDevMode?[{debugName:"items"}]:[]);heading=i("",...ngDevMode?[{debugName:"heading"}]:[]);label=i("",...ngDevMode?[{debugName:"label"}]:[]);multiple=i(!1,{...ngDevMode?{debugName:"multiple"}:{},transform:m});jsonLd=i(!0,{...ngDevMode?{debugName:"jsonLd"}:{},transform:m});sections=n(()=>this.items().map(e=>({id:e.id,title:e.question,content:e.answer,open:e.open})),...ngDevMode?[{debugName:"sections"}]:[]);scriptEl=null;constructor(){M(()=>{const e=this.jsonLd(),a=this.items();if(!e||!a.length){this.removeJsonLd();return}this.writeJsonLd(a)}),this.destroyRef.onDestroy(()=>this.removeJsonLd())}writeJsonLd(e){const a=this.document.head;if(!a)return;const s={"@context":"https://schema.org","@type":"FAQPage",mainEntity:e.map(r=>({"@type":"Question",name:r.question,acceptedAnswer:{"@type":"Answer",text:r.answer}}))};this.scriptEl||(this.scriptEl=this.document.createElement("script"),this.scriptEl.type="application/ld+json",this.scriptEl.setAttribute("data-dga-faq",""),a.appendChild(this.scriptEl)),this.scriptEl.textContent=JSON.stringify(s)}removeJsonLd(){this.scriptEl?.remove(),this.scriptEl=null}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ta,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ta,isStandalone:!0,selector:"dga-faq",inputs:{items:{classPropertyName:"items",publicName:"items",isSignal:!0,isRequired:!1,transformFunction:null},heading:{classPropertyName:"heading",publicName:"heading",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},multiple:{classPropertyName:"multiple",publicName:"multiple",isSignal:!0,isRequired:!1,transformFunction:null},jsonLd:{classPropertyName:"jsonLd",publicName:"jsonLd",isSignal:!0,isRequired:!1,transformFunction:null}},host:{attributes:{role:"region"},properties:{"attr.aria-label":"label() || heading() || null"},classAttribute:"flex w-full flex-col gap-xl"},ngImport:t,template:`
|
|
10486
10504
|
@if (heading()) {
|
|
10487
10505
|
<h2 class="m-0 text-display-sm font-semibold text-display">{{ heading() }}</h2>
|
|
10488
10506
|
}
|
|
10489
10507
|
<dga-accordion [sections]="sections()" [multiple]="multiple()" />
|
|
10490
|
-
`,isInline:!0,dependencies:[{kind:"component",type:be,selector:"dga-accordion",inputs:["multiple","sections"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:
|
|
10508
|
+
`,isInline:!0,dependencies:[{kind:"component",type:be,selector:"dga-accordion",inputs:["multiple","sections"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ta,decorators:[{type:v,args:[{selector:"dga-faq",standalone:!0,imports:[be],changeDetection:h.OnPush,template:`
|
|
10491
10509
|
@if (heading()) {
|
|
10492
10510
|
<h2 class="m-0 text-display-sm font-semibold text-display">{{ heading() }}</h2>
|
|
10493
10511
|
}
|
|
10494
10512
|
<dga-accordion [sections]="sections()" [multiple]="multiple()" />
|
|
10495
|
-
`,host:{class:"flex w-full flex-col gap-xl",role:"region","[attr.aria-label]":"label() || heading() || null"}}]}],ctorParameters:()=>[],propDecorators:{items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!1}]}],heading:[{type:t.Input,args:[{isSignal:!0,alias:"heading",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],multiple:[{type:t.Input,args:[{isSignal:!0,alias:"multiple",required:!1}]}],jsonLd:[{type:t.Input,args:[{isSignal:!0,alias:"jsonLd",required:!1}]}]}});const
|
|
10513
|
+
`,host:{class:"flex w-full flex-col gap-xl",role:"region","[attr.aria-label]":"label() || heading() || null"}}]}],ctorParameters:()=>[],propDecorators:{items:[{type:t.Input,args:[{isSignal:!0,alias:"items",required:!1}]}],heading:[{type:t.Input,args:[{isSignal:!0,alias:"heading",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],multiple:[{type:t.Input,args:[{isSignal:!0,alias:"multiple",required:!1}]}],jsonLd:[{type:t.Input,args:[{isSignal:!0,alias:"jsonLd",required:!1}]}]}});const Ni={ar:["محرم","صفر","ربيع الأول","ربيع الثاني","جمادى الأولى","جمادى الآخرة","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة"],en:["Muharram","Safar","Rabi I","Rabi II","Jumada I","Jumada II","Rajab","Sha'ban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"]},Si={ar:["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],en:["January","February","March","April","May","June","July","August","September","October","November","December"]},wl={ar:["أحد","إثن","ثلا","أرب","خمي","جمع","سبت"],en:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},kl=new Intl.DateTimeFormat("en-US-u-ca-islamic-umalqura",{day:"numeric",month:"numeric",year:"numeric",timeZone:"UTC"});function Ci(d){return d<10?`0${d}`:String(d)}function ze(d){return new Date(Date.UTC(d.getUTCFullYear(),d.getUTCMonth(),d.getUTCDate()))}function ds(d,e){return parseInt(d.find(a=>a.type===e)?.value??"0",10)}function W(d,e){const a=ze(d);if(e==="hijri"){const s=kl.formatToParts(a);return{year:ds(s,"year"),month:ds(s,"month"),day:ds(s,"day")}}return{year:a.getUTCFullYear(),month:a.getUTCMonth()+1,day:a.getUTCDate()}}function ot(d,e){const{year:a,month:s,day:r}=d;if(e==="gregorian")return new Date(Date.UTC(a,s-1,r));let l=Date.UTC(Math.max(622,Math.floor(a*.97+579)-3),0,1),u=Date.UTC(Math.floor(a*.97+579)+3,11,31);for(;l<=u;){const o=l+Math.floor((u-l)/2),c=new Date(o),p=W(c,"hijri"),g=p.year!==a?p.year-a:p.month!==s?p.month-s:p.day-r;if(g===0)return ze(c);g<0?l=o+864e5:u=o-864e5}return ze(new Date(l))}function cs(d,e,a){if(a==="gregorian")return new Date(Date.UTC(d,e,0)).getUTCDate();for(let s=30;s>=29;s--){const r=ot({year:d,month:e,day:s},"hijri"),l=W(r,"hijri");if(l.year===d&&l.month===e&&l.day===s)return s}return 29}function Di(d,e,a){let s=d.year,r=d.month+e;for(;r>12;)r-=12,s+=1;for(;r<1;)r+=12,s-=1;const l=cs(s,r,a);return{year:s,month:r,day:Math.min(d.day,l)}}function Nl(d){const e=/D{1,2}/.test(d),a=/M{1,2}/.test(d);return e?"day":a?"month":"year"}function Sl(d,e,a){const s=W(d,a);return e.replace(/YYYY|YY|MM|M|DD|D/g,r=>{switch(r){case"YYYY":return String(s.year);case"YY":return String(s.year).slice(-2);case"MM":return Ci(s.month);case"M":return String(s.month);case"DD":return Ci(s.day);case"D":return String(s.day);default:return r}})}function Ii(d,e,a){const s=d.trim();if(!s)return null;const r=/(YYYY|YY|MM|M|DD|D)/g;if(![...e.matchAll(r)].map(I=>I[1]).length)return null;let u="",o=0;for(const I of e.matchAll(r)){u+=Mi(e.slice(o,I.index));const B=I[1];B==="YYYY"?u+="(?<YYYY>\\d{4})":B==="YY"?u+="(?<YY>\\d{2})":B==="MM"||B==="DD"?u+=`(?<${B}>\\d{2})`:u+=`(?<${B}>\\d{1,2})`,o=(I.index??0)+B.length}u+=Mi(e.slice(o));const c=new RegExp(`^${u}$`).exec(s);if(!c?.groups)return null;let g=W(new Date,a).year;if(c.groups.YYYY)g=parseInt(c.groups.YYYY,10);else if(c.groups.YY){const I=parseInt(c.groups.YY,10);g=I>=70?1900+I:2e3+I}let b=1;(c.groups.MM||c.groups.M)&&(b=parseInt(c.groups.MM??c.groups.M,10));let N=1;if((c.groups.DD||c.groups.D)&&(N=parseInt(c.groups.DD??c.groups.D,10)),b<1||b>12||N<1||N>31)return null;const C=ot({year:g,month:b,day:N},a),_=W(C,a);return _.year!==g||_.month!==b||_.day!==N?null:C}function Mi(d){return d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Cl(d,e,a="gregorian"){if(!d||!e)return!1;const s=W(d,a),r=W(e,a);return s.year===r.year&&s.month===r.month&&s.day===r.day}function us(d,e,a="gregorian"){if(!d&&!e)return 0;if(!d)return-1;if(!e)return 1;const s=W(d,a),r=W(e,a);return s.year!==r.year?s.year-r.year:s.month!==r.month?s.month-r.month:s.day-r.day}function Dl(d,e,a,s="gregorian"){let r=ze(d);return e&&us(r,e,s)<0&&(r=ze(e)),a&&us(r,a,s)>0&&(r=ze(a)),r}function _i(d,e){const a=e==="ar"?"ar":"en";return d==="hijri"?Ni[a]:Si[a]}function qi(d,e,a){return ot({year:d,month:e,day:1},a).getUTCDay()}function es(){const d=new Date;return new Date(Date.UTC(d.getFullYear(),d.getMonth(),d.getDate()))}function Il(d,e,a){return d==null||d===""?null:d instanceof Date?ze(d):Ii(String(d),e,a)}class Oa{uiLocale=$();ar=n(()=>this.uiLocale().startsWith("ar"),...ngDevMode?[{debugName:"ar"}]:[]);events=i([],...ngDevMode?[{debugName:"events"}]:[]);month=S(es(),...ngDevMode?[{debugName:"month"}]:[]);selectedDay=S("",...ngDevMode?[{debugName:"selectedDay"}]:[]);calendar=S("gregorian",...ngDevMode?[{debugName:"calendar"}]:[]);daySelect=w();eventSelect=w();weekdays=n(()=>{const e=this.ar()?["أحد","إثن","ثلا","أرب","خمي","جمع","سبت"]:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];return this.ar()?[e[6],e[0],e[1],e[2],e[3],e[4],e[5]]:e},...ngDevMode?[{debugName:"weekdays"}]:[]);monthLabel=n(()=>{const e=W(this.month(),this.calendar());return`${_i(this.calendar(),this.ar()?"ar":"en")[e.month-1]??""} ${e.year}`},...ngDevMode?[{debugName:"monthLabel"}]:[]);prevLabel=n(()=>this.ar()?"الشهر السابق":"Previous month",...ngDevMode?[{debugName:"prevLabel"}]:[]);nextLabel=n(()=>this.ar()?"الشهر التالي":"Next month",...ngDevMode?[{debugName:"nextLabel"}]:[]);todayLabel=n(()=>this.ar()?"اليوم":"Today",...ngDevMode?[{debugName:"todayLabel"}]:[]);eventsLabel=n(()=>this.ar()?"أحداث اليوم":"Events for day",...ngDevMode?[{debugName:"eventsLabel"}]:[]);pickDayLabel=n(()=>this.ar()?"الأحداث":"Events",...ngDevMode?[{debugName:"pickDayLabel"}]:[]);pickDayHint=n(()=>this.ar()?"اختر يوماً لعرض الأحداث":"Select a day to view events",...ngDevMode?[{debugName:"pickDayHint"}]:[]);noEventsLabel=n(()=>this.ar()?"لا توجد أحداث في هذا اليوم":"No events on this day",...ngDevMode?[{debugName:"noEventsLabel"}]:[]);gregorianLabel=n(()=>this.ar()?"ميلادي":"Gregorian",...ngDevMode?[{debugName:"gregorianLabel"}]:[]);hijriLabel=n(()=>this.ar()?"هجري":"Hijri",...ngDevMode?[{debugName:"hijriLabel"}]:[]);calendarGroupLabel=n(()=>this.ar()?"نظام التقويم":"Calendar system",...ngDevMode?[{debugName:"calendarGroupLabel"}]:[]);selectedDayLabel=n(()=>{const e=this.selectedDay();if(!e)return"";const[a,s,r]=e.split("-").map(Number),l=new Date(Date.UTC(a,s-1,r));try{return new Intl.DateTimeFormat(this.ar()?"ar-SA":"en-GB",{weekday:"short",day:"numeric",month:"short",year:"numeric",timeZone:"UTC"}).format(l)}catch{return e}},...ngDevMode?[{debugName:"selectedDayLabel"}]:[]);eventsByDate=n(()=>{const e=new Map;for(const a of this.events()){const s=e.get(a.date)??[];s.push(a),e.set(a.date,s)}return e},...ngDevMode?[{debugName:"eventsByDate"}]:[]);todayIso=n(()=>ps(es()),...ngDevMode?[{debugName:"todayIso"}]:[]);cells=n(()=>{const e=this.calendar(),a=W(this.month(),e),s=a.year,r=a.month,l=qi(s,r,e),u=this.ar()?6:0,o=(l-u+7)%7,c=cs(s,r,e),p=this.eventsByDate(),g=this.todayIso(),b=[];for(let N=0;N<o;N++)b.push({key:`pad-${N}`,day:0,iso:"",inMonth:!1,count:0,tones:[],isToday:!1});for(let N=1;N<=c;N++){const C=ot({year:s,month:r,day:N},e),_=ps(C),I=p.get(_)??[];b.push({key:_,day:N,iso:_,inMonth:!0,count:I.length,tones:I.slice(0,3).map(B=>B.tone||""),isToday:_===g})}for(;b.length%7!==0;)b.push({key:`trail-${b.length}`,day:0,iso:"",inMonth:!1,count:0,tones:[],isToday:!1});return b},...ngDevMode?[{debugName:"cells"}]:[]);dayEvents=n(()=>{const e=this.selectedDay();return e?this.eventsByDate().get(e)??[]:[]},...ngDevMode?[{debugName:"dayEvents"}]:[]);shiftMonth(e){const a=this.calendar(),s=W(this.month(),a),r=Di({...s,day:1},e,a);this.month.set(ot(r,a))}goToday(){const e=es();this.month.set(e);const a=ps(e);this.selectedDay.set(a),this.daySelect.emit(a)}selectDay(e){e&&(this.selectedDay.set(e),this.daySelect.emit(e))}dayClass(e){return f("dga-ecal__day",e.inMonth&&"dga-ecal__day--in",e.isToday&&"dga-ecal__day--today",e.count>0&&"dga-ecal__day--has-events",e.iso&&e.iso===this.selectedDay()&&"dga-ecal__day--selected")}eventCountLabel(e){return this.ar()?`${e} أحداث`:`${e} events`}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Oa,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Oa,isStandalone:!0,selector:"dga-event-calendar",inputs:{events:{classPropertyName:"events",publicName:"events",isSignal:!0,isRequired:!1,transformFunction:null},month:{classPropertyName:"month",publicName:"month",isSignal:!0,isRequired:!1,transformFunction:null},selectedDay:{classPropertyName:"selectedDay",publicName:"selectedDay",isSignal:!0,isRequired:!1,transformFunction:null},calendar:{classPropertyName:"calendar",publicName:"calendar",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{month:"monthChange",selectedDay:"selectedDayChange",calendar:"calendarChange",daySelect:"daySelect",eventSelect:"eventSelect"},host:{classAttribute:"dga-event-calendar"},ngImport:t,template:`
|
|
10496
10514
|
<div class="dga-ecal">
|
|
10497
10515
|
<header class="dga-ecal__toolbar">
|
|
10498
10516
|
<div class="dga-ecal__nav">
|
|
@@ -10614,7 +10632,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
10614
10632
|
}
|
|
10615
10633
|
</section>
|
|
10616
10634
|
</div>
|
|
10617
|
-
`,isInline:!0,styles:[":host{display:block;width:100%;max-width:100%;box-sizing:border-box}.dga-ecal{--ecal-primary: var(--dga-bg-primary, var(--dga-color-primary-600, #0b6b4f));--ecal-primary-faint: var( --dga-bg-primary-faint, color-mix(in srgb, var(--ecal-primary) 12%, transparent) );--ecal-on: var(--dga-text-on-color, #fff);--ecal-surface: var(--dga-bg-elevated, var(--dga-bg-card, var(--dga-bg-default, #fff)));--ecal-border: var(--dga-border-neutral, var(--dga-color-neutral-300, #d1d5db));--ecal-fg: var(--dga-text-default, #111827);--ecal-muted: var(--dga-text-muted, #6b7280);--ecal-radius: var(--dga-radius-md, 8px);display:flex;width:100%;flex-direction:column;gap:var(--dga-space-md, 12px);padding:var(--dga-space-md, 12px);border:1px solid var(--ecal-border);border-radius:var(--ecal-radius);background:var(--ecal-surface);color:var(--ecal-fg);box-sizing:border-box}.dga-ecal__toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--dga-space-md, .75rem)}.dga-ecal__nav{display:flex;min-width:0;flex:1 1 12rem;align-items:center;justify-content:space-between;gap:var(--dga-space-sm, .5rem)}.dga-ecal__title{margin:0;min-width:0;font-size:1rem;font-weight:600;color:var(--ecal-fg);text-align:center}.dga-ecal__actions{display:flex;flex-wrap:wrap;flex-shrink:0;align-items:center;gap:var(--dga-space-sm, .5rem)}.dga-ecal__icon-btn{display:inline-flex;width:2rem;height:2rem;flex-shrink:0;align-items:center;justify-content:center;border:0;border-radius:999px;background:transparent;color:var(--ecal-fg);cursor:pointer;transition:background-color .14s ease,color .14s ease}.dga-ecal__icon-btn:hover{background:var(--ecal-primary-faint);color:var(--ecal-primary)}.dga-ecal__today-btn{min-height:2rem;padding:4px 12px;border:1px solid var(--ecal-border);border-radius:var(--dga-radius-sm, 4px);background:transparent;color:var(--ecal-fg);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer;transition:background-color .14s ease,border-color .14s ease,color .14s ease}.dga-ecal__today-btn:hover{border-color:var(--ecal-primary);background:var(--ecal-primary-faint);color:var(--ecal-primary)}.dga-ecal__cal-switch{display:inline-flex;flex-shrink:0;overflow:hidden;border:1px solid var(--ecal-border);border-radius:var(--dga-radius-sm, 4px);background:transparent}.dga-ecal__cal-btn{min-height:2rem;padding:4px 12px;border:0;background:transparent;color:var(--ecal-muted);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer;transition:background-color .14s ease,color .14s ease}.dga-ecal__cal-btn[aria-pressed=true]{background:var(--ecal-primary);color:var(--ecal-on)}.dga-ecal__panel{padding:0;background:transparent}.dga-ecal__weekdays,.dga-ecal__grid{display:grid;width:100%;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}.dga-ecal__weekdays{margin-bottom:4px}.dga-ecal__weekday{padding-block:2px;text-align:center;font-size:.75rem;font-weight:600;color:var(--ecal-muted)}.dga-ecal__day{position:relative;display:flex;min-height:3.15rem;align-items:flex-start;justify-content:center;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;font-size:.875rem;cursor:pointer}.dga-ecal__day:disabled{opacity:0;pointer-events:none}.dga-ecal__day-face{display:inline-flex;width:2.25rem;height:2.25rem;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;background:transparent;color:inherit;transition:background-color .14s ease,color .14s ease,border-color .14s ease}.dga-ecal__day:hover:not(:disabled):not(.dga-ecal__day--selected) .dga-ecal__day-face{background:var(--ecal-primary-faint)}.dga-ecal__day--today:not(.dga-ecal__day--selected) .dga-ecal__day-face{border-color:var(--ecal-primary)}.dga-ecal__day--selected .dga-ecal__day-face,.dga-ecal__day--selected:hover .dga-ecal__day-face{border-color:var(--ecal-primary);background:var(--ecal-primary);color:var(--ecal-on)}.dga-ecal__day-num{line-height:1;font-weight:500}.dga-ecal__dots{position:absolute;inset-inline:0;top:2.35rem;display:flex;align-items:center;justify-content:center;gap:3px;pointer-events:none}.dga-ecal__dot{width:.3rem;height:.3rem;border-radius:999px;background:var(--ecal-primary)}.dga-ecal__more{font-size:.625rem;font-weight:600;color:var(--ecal-muted);line-height:1}.dga-ecal__agenda{display:flex;flex-direction:column;gap:var(--dga-space-sm, 8px);margin-top:4px;padding-top:var(--dga-space-md, 12px);border-top:1px solid var(--ecal-border);background:transparent}.dga-ecal__agenda-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:.5rem}.dga-ecal__agenda-title{margin:0;font-size:.875rem;font-weight:700;color:var(--ecal-fg)}.dga-ecal__agenda-date{font-size:.75rem;font-weight:500;color:var(--ecal-muted)}.dga-ecal__events{display:flex;margin:0;padding:0;list-style:none;flex-direction:column;gap:.5rem}.dga-ecal__event{display:flex;width:100%;align-items:stretch;gap:0;overflow:hidden;padding:0;border:1px solid var(--ecal-border);border-radius:var(--dga-radius-sm, 4px);background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer;transition:background-color .14s ease,border-color .14s ease}.dga-ecal__event:hover{border-color:var(--ecal-primary);background:var(--ecal-primary-faint)}.dga-ecal__event-accent{width:.35rem;flex-shrink:0;background:var(--ecal-primary)}.dga-ecal__event-body{display:flex;min-width:0;flex:1;align-items:center;padding:.65rem .85rem}.dga-ecal__event-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;font-weight:600}.dga-ecal__empty{margin:0;padding:.35rem 0;font-size:.875rem;color:var(--ecal-muted)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"],dependencies:[{kind:"component",type:k,selector:"dga-icon",inputs:["name","glyph","size","tone","label"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:
|
|
10635
|
+
`,isInline:!0,styles:[":host{display:block;width:100%;max-width:100%;box-sizing:border-box}.dga-ecal{--ecal-primary: var(--dga-bg-primary, var(--dga-color-primary-600, #0b6b4f));--ecal-primary-faint: var( --dga-bg-primary-faint, color-mix(in srgb, var(--ecal-primary) 12%, transparent) );--ecal-on: var(--dga-text-on-color, #fff);--ecal-surface: var(--dga-bg-elevated, var(--dga-bg-card, var(--dga-bg-default, #fff)));--ecal-border: var(--dga-border-neutral, var(--dga-color-neutral-300, #d1d5db));--ecal-fg: var(--dga-text-default, #111827);--ecal-muted: var(--dga-text-muted, #6b7280);--ecal-radius: var(--dga-radius-md, 8px);display:flex;width:100%;flex-direction:column;gap:var(--dga-space-md, 12px);padding:var(--dga-space-md, 12px);border:1px solid var(--ecal-border);border-radius:var(--ecal-radius);background:var(--ecal-surface);color:var(--ecal-fg);box-sizing:border-box}.dga-ecal__toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--dga-space-md, .75rem)}.dga-ecal__nav{display:flex;min-width:0;flex:1 1 12rem;align-items:center;justify-content:space-between;gap:var(--dga-space-sm, .5rem)}.dga-ecal__title{margin:0;min-width:0;font-size:1rem;font-weight:600;color:var(--ecal-fg);text-align:center}.dga-ecal__actions{display:flex;flex-wrap:wrap;flex-shrink:0;align-items:center;gap:var(--dga-space-sm, .5rem)}.dga-ecal__icon-btn{display:inline-flex;width:2rem;height:2rem;flex-shrink:0;align-items:center;justify-content:center;border:0;border-radius:999px;background:transparent;color:var(--ecal-fg);cursor:pointer;transition:background-color .14s ease,color .14s ease}.dga-ecal__icon-btn:hover{background:var(--ecal-primary-faint);color:var(--ecal-primary)}.dga-ecal__today-btn{min-height:2rem;padding:4px 12px;border:1px solid var(--ecal-border);border-radius:var(--dga-radius-sm, 4px);background:transparent;color:var(--ecal-fg);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer;transition:background-color .14s ease,border-color .14s ease,color .14s ease}.dga-ecal__today-btn:hover{border-color:var(--ecal-primary);background:var(--ecal-primary-faint);color:var(--ecal-primary)}.dga-ecal__cal-switch{display:inline-flex;flex-shrink:0;overflow:hidden;border:1px solid var(--ecal-border);border-radius:var(--dga-radius-sm, 4px);background:transparent}.dga-ecal__cal-btn{min-height:2rem;padding:4px 12px;border:0;background:transparent;color:var(--ecal-muted);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer;transition:background-color .14s ease,color .14s ease}.dga-ecal__cal-btn[aria-pressed=true]{background:var(--ecal-primary);color:var(--ecal-on)}.dga-ecal__panel{padding:0;background:transparent}.dga-ecal__weekdays,.dga-ecal__grid{display:grid;width:100%;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}.dga-ecal__weekdays{margin-bottom:4px}.dga-ecal__weekday{padding-block:2px;text-align:center;font-size:.75rem;font-weight:600;color:var(--ecal-muted)}.dga-ecal__day{position:relative;display:flex;min-height:3.15rem;align-items:flex-start;justify-content:center;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;font-size:.875rem;cursor:pointer}.dga-ecal__day:disabled{opacity:0;pointer-events:none}.dga-ecal__day-face{display:inline-flex;width:2.25rem;height:2.25rem;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;background:transparent;color:inherit;transition:background-color .14s ease,color .14s ease,border-color .14s ease}.dga-ecal__day:hover:not(:disabled):not(.dga-ecal__day--selected) .dga-ecal__day-face{background:var(--ecal-primary-faint)}.dga-ecal__day--today:not(.dga-ecal__day--selected) .dga-ecal__day-face{border-color:var(--ecal-primary)}.dga-ecal__day--selected .dga-ecal__day-face,.dga-ecal__day--selected:hover .dga-ecal__day-face{border-color:var(--ecal-primary);background:var(--ecal-primary);color:var(--ecal-on)}.dga-ecal__day-num{line-height:1;font-weight:500}.dga-ecal__dots{position:absolute;inset-inline:0;top:2.35rem;display:flex;align-items:center;justify-content:center;gap:3px;pointer-events:none}.dga-ecal__dot{width:.3rem;height:.3rem;border-radius:999px;background:var(--ecal-primary)}.dga-ecal__more{font-size:.625rem;font-weight:600;color:var(--ecal-muted);line-height:1}.dga-ecal__agenda{display:flex;flex-direction:column;gap:var(--dga-space-sm, 8px);margin-top:4px;padding-top:var(--dga-space-md, 12px);border-top:1px solid var(--ecal-border);background:transparent}.dga-ecal__agenda-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:.5rem}.dga-ecal__agenda-title{margin:0;font-size:.875rem;font-weight:700;color:var(--ecal-fg)}.dga-ecal__agenda-date{font-size:.75rem;font-weight:500;color:var(--ecal-muted)}.dga-ecal__events{display:flex;margin:0;padding:0;list-style:none;flex-direction:column;gap:.5rem}.dga-ecal__event{display:flex;width:100%;align-items:stretch;gap:0;overflow:hidden;padding:0;border:1px solid var(--ecal-border);border-radius:var(--dga-radius-sm, 4px);background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer;transition:background-color .14s ease,border-color .14s ease}.dga-ecal__event:hover{border-color:var(--ecal-primary);background:var(--ecal-primary-faint)}.dga-ecal__event-accent{width:.35rem;flex-shrink:0;background:var(--ecal-primary)}.dga-ecal__event-body{display:flex;min-width:0;flex:1;align-items:center;padding:.65rem .85rem}.dga-ecal__event-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;font-weight:600}.dga-ecal__empty{margin:0;padding:.35rem 0;font-size:.875rem;color:var(--ecal-muted)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"],dependencies:[{kind:"component",type:k,selector:"dga-icon",inputs:["name","glyph","size","tone","label"]}],changeDetection:t.ChangeDetectionStrategy.OnPush})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Oa,decorators:[{type:v,args:[{selector:"dga-event-calendar",standalone:!0,imports:[k],changeDetection:h.OnPush,template:`
|
|
10618
10636
|
<div class="dga-ecal">
|
|
10619
10637
|
<header class="dga-ecal__toolbar">
|
|
10620
10638
|
<div class="dga-ecal__nav">
|
|
@@ -10736,7 +10754,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
10736
10754
|
}
|
|
10737
10755
|
</section>
|
|
10738
10756
|
</div>
|
|
10739
|
-
`,host:{class:"dga-event-calendar"},styles:[":host{display:block;width:100%;max-width:100%;box-sizing:border-box}.dga-ecal{--ecal-primary: var(--dga-bg-primary, var(--dga-color-primary-600, #0b6b4f));--ecal-primary-faint: var( --dga-bg-primary-faint, color-mix(in srgb, var(--ecal-primary) 12%, transparent) );--ecal-on: var(--dga-text-on-color, #fff);--ecal-surface: var(--dga-bg-elevated, var(--dga-bg-card, var(--dga-bg-default, #fff)));--ecal-border: var(--dga-border-neutral, var(--dga-color-neutral-300, #d1d5db));--ecal-fg: var(--dga-text-default, #111827);--ecal-muted: var(--dga-text-muted, #6b7280);--ecal-radius: var(--dga-radius-md, 8px);display:flex;width:100%;flex-direction:column;gap:var(--dga-space-md, 12px);padding:var(--dga-space-md, 12px);border:1px solid var(--ecal-border);border-radius:var(--ecal-radius);background:var(--ecal-surface);color:var(--ecal-fg);box-sizing:border-box}.dga-ecal__toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--dga-space-md, .75rem)}.dga-ecal__nav{display:flex;min-width:0;flex:1 1 12rem;align-items:center;justify-content:space-between;gap:var(--dga-space-sm, .5rem)}.dga-ecal__title{margin:0;min-width:0;font-size:1rem;font-weight:600;color:var(--ecal-fg);text-align:center}.dga-ecal__actions{display:flex;flex-wrap:wrap;flex-shrink:0;align-items:center;gap:var(--dga-space-sm, .5rem)}.dga-ecal__icon-btn{display:inline-flex;width:2rem;height:2rem;flex-shrink:0;align-items:center;justify-content:center;border:0;border-radius:999px;background:transparent;color:var(--ecal-fg);cursor:pointer;transition:background-color .14s ease,color .14s ease}.dga-ecal__icon-btn:hover{background:var(--ecal-primary-faint);color:var(--ecal-primary)}.dga-ecal__today-btn{min-height:2rem;padding:4px 12px;border:1px solid var(--ecal-border);border-radius:var(--dga-radius-sm, 4px);background:transparent;color:var(--ecal-fg);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer;transition:background-color .14s ease,border-color .14s ease,color .14s ease}.dga-ecal__today-btn:hover{border-color:var(--ecal-primary);background:var(--ecal-primary-faint);color:var(--ecal-primary)}.dga-ecal__cal-switch{display:inline-flex;flex-shrink:0;overflow:hidden;border:1px solid var(--ecal-border);border-radius:var(--dga-radius-sm, 4px);background:transparent}.dga-ecal__cal-btn{min-height:2rem;padding:4px 12px;border:0;background:transparent;color:var(--ecal-muted);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer;transition:background-color .14s ease,color .14s ease}.dga-ecal__cal-btn[aria-pressed=true]{background:var(--ecal-primary);color:var(--ecal-on)}.dga-ecal__panel{padding:0;background:transparent}.dga-ecal__weekdays,.dga-ecal__grid{display:grid;width:100%;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}.dga-ecal__weekdays{margin-bottom:4px}.dga-ecal__weekday{padding-block:2px;text-align:center;font-size:.75rem;font-weight:600;color:var(--ecal-muted)}.dga-ecal__day{position:relative;display:flex;min-height:3.15rem;align-items:flex-start;justify-content:center;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;font-size:.875rem;cursor:pointer}.dga-ecal__day:disabled{opacity:0;pointer-events:none}.dga-ecal__day-face{display:inline-flex;width:2.25rem;height:2.25rem;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;background:transparent;color:inherit;transition:background-color .14s ease,color .14s ease,border-color .14s ease}.dga-ecal__day:hover:not(:disabled):not(.dga-ecal__day--selected) .dga-ecal__day-face{background:var(--ecal-primary-faint)}.dga-ecal__day--today:not(.dga-ecal__day--selected) .dga-ecal__day-face{border-color:var(--ecal-primary)}.dga-ecal__day--selected .dga-ecal__day-face,.dga-ecal__day--selected:hover .dga-ecal__day-face{border-color:var(--ecal-primary);background:var(--ecal-primary);color:var(--ecal-on)}.dga-ecal__day-num{line-height:1;font-weight:500}.dga-ecal__dots{position:absolute;inset-inline:0;top:2.35rem;display:flex;align-items:center;justify-content:center;gap:3px;pointer-events:none}.dga-ecal__dot{width:.3rem;height:.3rem;border-radius:999px;background:var(--ecal-primary)}.dga-ecal__more{font-size:.625rem;font-weight:600;color:var(--ecal-muted);line-height:1}.dga-ecal__agenda{display:flex;flex-direction:column;gap:var(--dga-space-sm, 8px);margin-top:4px;padding-top:var(--dga-space-md, 12px);border-top:1px solid var(--ecal-border);background:transparent}.dga-ecal__agenda-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:.5rem}.dga-ecal__agenda-title{margin:0;font-size:.875rem;font-weight:700;color:var(--ecal-fg)}.dga-ecal__agenda-date{font-size:.75rem;font-weight:500;color:var(--ecal-muted)}.dga-ecal__events{display:flex;margin:0;padding:0;list-style:none;flex-direction:column;gap:.5rem}.dga-ecal__event{display:flex;width:100%;align-items:stretch;gap:0;overflow:hidden;padding:0;border:1px solid var(--ecal-border);border-radius:var(--dga-radius-sm, 4px);background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer;transition:background-color .14s ease,border-color .14s ease}.dga-ecal__event:hover{border-color:var(--ecal-primary);background:var(--ecal-primary-faint)}.dga-ecal__event-accent{width:.35rem;flex-shrink:0;background:var(--ecal-primary)}.dga-ecal__event-body{display:flex;min-width:0;flex:1;align-items:center;padding:.65rem .85rem}.dga-ecal__event-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;font-weight:600}.dga-ecal__empty{margin:0;padding:.35rem 0;font-size:.875rem;color:var(--ecal-muted)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"]}]}],propDecorators:{events:[{type:t.Input,args:[{isSignal:!0,alias:"events",required:!1}]}],month:[{type:t.Input,args:[{isSignal:!0,alias:"month",required:!1}]},{type:t.Output,args:["monthChange"]}],selectedDay:[{type:t.Input,args:[{isSignal:!0,alias:"selectedDay",required:!1}]},{type:t.Output,args:["selectedDayChange"]}],calendar:[{type:t.Input,args:[{isSignal:!0,alias:"calendar",required:!1}]},{type:t.Output,args:["calendarChange"]}],daySelect:[{type:t.Output,args:["daySelect"]}],eventSelect:[{type:t.Output,args:["eventSelect"]}]}});function ps(d){const e=d.getUTCFullYear(),a=String(d.getUTCMonth()+1).padStart(2,"0"),s=String(d.getUTCDate()).padStart(2,"0");return`${e}-${a}-${s}`}class ye{dgaCellDef=i.required(...ngDevMode?[{debugName:"dgaCellDef"}]:[]);template=x(ht);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ye,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:ye,isStandalone:!0,selector:"ng-template[dgaCellDef]",inputs:{dgaCellDef:{classPropertyName:"dgaCellDef",publicName:"dgaCellDef",isSignal:!0,isRequired:!0,transformFunction:null}},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ye,decorators:[{type:V,args:[{selector:"ng-template[dgaCellDef]",standalone:!0}]}],propDecorators:{dgaCellDef:[{type:t.Input,args:[{isSignal:!0,alias:"dgaCellDef",required:!0}]}]}});class xe{template=x(ht);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:xe,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"22.1.5",type:xe,isStandalone:!0,selector:"ng-template[dgaExpandDef]",ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:xe,decorators:[{type:V,args:[{selector:"ng-template[dgaExpandDef]",standalone:!0}]}]});class we{template=x(ht);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:we,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"22.1.5",type:we,isStandalone:!0,selector:"ng-template[dgaRowActions]",ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:we,decorators:[{type:V,args:[{selector:"ng-template[dgaRowActions]",standalone:!0}]}]});class ke{template=x(ht);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ke,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"22.1.5",type:ke,isStandalone:!0,selector:"ng-template[dgaCardDef]",ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ke,decorators:[{type:V,args:[{selector:"ng-template[dgaCardDef]",standalone:!0}]}]});class Aa{destroyRef=x(L);uiLocale=$();ar=n(()=>this.uiLocale().startsWith("ar"),...ngDevMode?[{debugName:"ar"}]:[]);columns=i([],...ngDevMode?[{debugName:"columns"}]:[]);rows=i([],...ngDevMode?[{debugName:"rows"}]:[]);selectable=i(!1,{...ngDevMode?{debugName:"selectable"}:{},transform:m});expandable=i(!1,{...ngDevMode?{debugName:"expandable"}:{},transform:m});serverSide=i(!1,{...ngDevMode?{debugName:"serverSide"}:{},transform:m});idKey=i("id",...ngDevMode?[{debugName:"idKey"}]:[]);selectedKeys=S([],...ngDevMode?[{debugName:"selectedKeys"}]:[]);sortKey=S("",...ngDevMode?[{debugName:"sortKey"}]:[]);sortDir=S("asc",...ngDevMode?[{debugName:"sortDir"}]:[]);columnFilters=S({},...ngDevMode?[{debugName:"columnFilters"}]:[]);expandedKeys=S([],...ngDevMode?[{debugName:"expandedKeys"}]:[]);label=i(void 0,...ngDevMode?[{debugName:"label"}]:[]);selectAllLabel=i(void 0,...ngDevMode?[{debugName:"selectAllLabel"}]:[]);emptyLabel=i(void 0,...ngDevMode?[{debugName:"emptyLabel"}]:[]);density=i("comfortable",...ngDevMode?[{debugName:"density"}]:[]);interactive=i(!0,{...ngDevMode?{debugName:"interactive"}:{},transform:m});loading=i(!1,{...ngDevMode?{debugName:"loading"}:{},transform:m});stickyHeader=i(!1,{...ngDevMode?{debugName:"stickyHeader"}:{},transform:m});hiddenKeys=S([],...ngDevMode?[{debugName:"hiddenKeys"}]:[]);page=S(1,...ngDevMode?[{debugName:"page"}]:[]);pageSize=S(0,...ngDevMode?[{debugName:"pageSize"}]:[]);total=i(void 0,...ngDevMode?[{debugName:"total"}]:[]);pageSizeOptions=i([5,10,25,50],...ngDevMode?[{debugName:"pageSizeOptions"}]:[]);filterDebounceMs=i(300,{...ngDevMode?{debugName:"filterDebounceMs"}:{},transform:A});error=i(null,...ngDevMode?[{debugName:"error"}]:[]);viewMode=S("auto",...ngDevMode?[{debugName:"viewMode"}]:[]);cardsBreakpoint=i("(max-width: 639px)",...ngDevMode?[{debugName:"cardsBreakpoint"}]:[]);cardTitleKey=i(void 0,...ngDevMode?[{debugName:"cardTitleKey"}]:[]);sortChange=w();filterChange=w();pagingChange=w();errorRetry=w();skeletonRows=[0,1,2,3,4];cellDefs=bt(ye,...ngDevMode?[{debugName:"cellDefs"}]:[]);expandDef=Ka(xe,...ngDevMode?[{debugName:"expandDef"}]:[]);rowActionsDef=Ka(we,...ngDevMode?[{debugName:"rowActionsDef"}]:[]);cardDef=Ka(ke,...ngDevMode?[{debugName:"cardDef"}]:[]);selectAllEl=R("selectAll",...ngDevMode?[{debugName:"selectAllEl"}]:[]);cellMap=y(new Map,...ngDevMode?[{debugName:"cellMap"}]:[]);mqMatches=y(!1,...ngDevMode?[{debugName:"mqMatches"}]:[]);cardsQuery=y("",...ngDevMode?[{debugName:"cardsQuery"}]:[]);filterTimer=null;skipPageEmit=!1;resolvedLabel=n(()=>this.label()??(this.ar()?"جدول البيانات":"Data table"),...ngDevMode?[{debugName:"resolvedLabel"}]:[]);resolvedSelectAllLabel=n(()=>this.selectAllLabel()??(this.ar()?"تحديد الكل في الصفحة":"Select all on page"),...ngDevMode?[{debugName:"resolvedSelectAllLabel"}]:[]);resolvedEmptyLabel=n(()=>this.emptyLabel()??(this.ar()?"لا توجد بيانات":"No data"),...ngDevMode?[{debugName:"resolvedEmptyLabel"}]:[]);selectedCountLabel=n(()=>{const e=this.selectedKeys().length;return this.ar()?`تم اختيار ${e}`:`${e} selected`},...ngDevMode?[{debugName:"selectedCountLabel"}]:[]);retryLabel=n(()=>this.ar()?"إعادة المحاولة":"Retry",...ngDevMode?[{debugName:"retryLabel"}]:[]);clearFiltersLabel=n(()=>this.ar()?"مسح التصفية":"Clear filters",...ngDevMode?[{debugName:"clearFiltersLabel"}]:[]);actionsLabel=n(()=>this.ar()?"إجراءات":"Actions",...ngDevMode?[{debugName:"actionsLabel"}]:[]);pageSizeLabel=n(()=>this.ar()?"لكل صفحة":"Per page",...ngDevMode?[{debugName:"pageSizeLabel"}]:[]);errorTitle=n(()=>this.ar()?"تعذر التحميل":"Failed to load",...ngDevMode?[{debugName:"errorTitle"}]:[]);cardsSearchLabel=n(()=>this.ar()?"بحث":"Search",...ngDevMode?[{debugName:"cardsSearchLabel"}]:[]);cardsSearchPlaceholder=n(()=>this.ar()?"ابحث في النتائج…":"Search results…",...ngDevMode?[{debugName:"cardsSearchPlaceholder"}]:[]);cardsSortLabel=n(()=>this.ar()?"فرز حسب":"Sort by",...ngDevMode?[{debugName:"cardsSortLabel"}]:[]);cardsSortPlaceholder=n(()=>this.ar()?"بدون فرز":"No sort",...ngDevMode?[{debugName:"cardsSortPlaceholder"}]:[]);cardsSortDirLabel=n(()=>this.sortDir()==="asc"?this.ar()?"تصاعدي — انقر للتبديل":"Ascending — click to toggle":this.ar()?"تنازلي — انقر للتبديل":"Descending — click to toggle",...ngDevMode?[{debugName:"cardsSortDirLabel"}]:[]);resolvedView=n(()=>{const e=this.viewMode();return e==="table"||e==="cards"?e:this.mqMatches()?"cards":"table"},...ngDevMode?[{debugName:"resolvedView"}]:[]);paginationEnabled=n(()=>this.pageSize()>0,...ngDevMode?[{debugName:"paginationEnabled"}]:[]);filteredCount=n(()=>this.serverSide()?this.total()??this.rows().length:this.filteredRows().length,...ngDevMode?[{debugName:"filteredCount"}]:[]);totalPages=n(()=>{const e=this.pageSize();return e<=0?1:Math.max(1,Math.ceil(this.filteredCount()/e))},...ngDevMode?[{debugName:"totalPages"}]:[]);rangeLabel=n(()=>{const e=this.pageSize(),a=this.filteredCount();if(e<=0||a===0)return this.ar()?`0 من ${a}`:`0 of ${a}`;const s=Math.min(this.page(),this.totalPages()),r=(s-1)*e+1,l=Math.min(s*e,a);return this.ar()?`${r}–${l} من ${a}`:`${r}–${l} of ${a}`},...ngDevMode?[{debugName:"rangeLabel"}]:[]);constructor(){M(()=>{const e=this.selectAllEl()?.nativeElement;e&&(e.indeterminate=this.someSelected())}),M(()=>{const e=new Map;for(const a of this.cellDefs())e.set(a.dgaCellDef(),a.template);this.cellMap.set(e)}),M(()=>{const e=this.totalPages();this.page()>e&&(this.skipPageEmit=!0,this.page.set(e))}),O(()=>{this.bindBreakpoint(),this.destroyRef.onDestroy(()=>{this.filterTimer&&clearTimeout(this.filterTimer)})})}bindBreakpoint(){if(typeof window>"u"||typeof window.matchMedia!="function")return;const e=window.matchMedia(this.cardsBreakpoint()),a=()=>this.mqMatches.set(e.matches);a(),e.addEventListener("change",a),this.destroyRef.onDestroy(()=>e.removeEventListener("change",a))}visibleColumns=n(()=>{const e=new Set(this.hiddenKeys());return this.columns().filter(a=>!e.has(a.key))},...ngDevMode?[{debugName:"visibleColumns"}]:[]);filterableColumns=n(()=>this.visibleColumns().filter(e=>e.filterable),...ngDevMode?[{debugName:"filterableColumns"}]:[]);sortableColumns=n(()=>this.visibleColumns().filter(e=>e.sortable),...ngDevMode?[{debugName:"sortableColumns"}]:[]);cardTitleColumn=n(()=>{const e=this.cardTitleKey(),a=this.visibleColumns();return e?a.find(s=>s.key===e)??a[0]??null:a[0]??null},...ngDevMode?[{debugName:"cardTitleColumn"}]:[]);cardBodyColumns=n(()=>{const e=this.cardTitleColumn();return this.visibleColumns().filter(a=>a.key!==e?.key)},...ngDevMode?[{debugName:"cardBodyColumns"}]:[]);selectPad=n(()=>this.density()==="compact"?"w-4xl px-lg py-xs":"w-4xl px-lg py-md",...ngDevMode?[{debugName:"selectPad"}]:[]);headerPad=n(()=>f("font-medium",this.density()==="compact"?"px-lg py-xs":"px-lg py-md"),...ngDevMode?[{debugName:"headerPad"}]:[]);bodyPad=n(()=>f("text-paragraph",this.density()==="compact"?"px-lg py-xs":"px-lg py-md"),...ngDevMode?[{debugName:"bodyPad"}]:[]);cardPad=n(()=>this.density()==="compact"?"px-md py-sm":"px-lg py-md",...ngDevMode?[{debugName:"cardPad"}]:[]);rowClasses=n(()=>f("border-t border-border-subtle transition-colors",this.interactive()&&"hover:bg-card-hovered"),...ngDevMode?[{debugName:"rowClasses"}]:[]);filteredRows=n(()=>{if(this.serverSide())return this.rows();let e=[...this.rows()];const a=this.columnFilters(),s=Object.entries(a).filter(([,c])=>c.trim());s.length&&(e=e.filter(c=>s.every(([p,g])=>{const b=c[p];return(b==null?"":String(b).toLowerCase()).includes(g.trim().toLowerCase())})));const r=this.cardsQuery().trim().toLowerCase();if(r){const c=this.visibleColumns();e=e.filter(p=>c.some(g=>{const b=p[g.key];return(b==null?"":String(b).toLowerCase()).includes(r)}))}const l=this.sortKey(),u=this.sortDir();if(!l)return e;const o=this.columns().find(c=>c.key===l);return e.sort((c,p)=>{const g=Ml(c[l],p[l],o);return u==="asc"?g:-g}),e},...ngDevMode?[{debugName:"filteredRows"}]:[]);displayRows=n(()=>{if(this.serverSide()||!this.paginationEnabled())return this.filteredRows();const e=this.pageSize(),s=(Math.min(Math.max(1,this.page()),this.totalPages())-1)*e;return this.filteredRows().slice(s,s+e)},...ngDevMode?[{debugName:"displayRows"}]:[]);allSelected=n(()=>{const e=this.rowKeys();if(!e.length)return!1;const a=new Set(this.selectedKeys());return e.every(s=>a.has(s))},...ngDevMode?[{debugName:"allSelected"}]:[]);someSelected=n(()=>{const e=this.rowKeys();if(!e.length)return!1;const a=new Set(this.selectedKeys()),s=e.filter(r=>a.has(r)).length;return s>0&&s<e.length},...ngDevMode?[{debugName:"someSelected"}]:[]);hasRowActions(){return!!this.rowActionsDef()}hasFilterOrSortChrome(){return this.filterableColumns().length>0||this.sortableColumns().length>0}hasActiveFilters(){return Object.values(this.columnFilters()).some(e=>!!e?.trim())||!!this.cardsQuery().trim()}onCardsSearch(e){this.cardsQuery.set(e),this.serverSide()||this.page.set(1),this.filterTimer&&clearTimeout(this.filterTimer);const a=Math.max(0,this.filterDebounceMs());this.filterTimer=setTimeout(()=>{this.filterChange.emit({filters:{...this.columnFilters()}}),this.filterTimer=null},a)}onCardsSortKey(e){if(!e){this.sortKey.set(""),this.sortChange.emit({key:"",dir:this.sortDir()});return}this.sortKey.set(e),this.sortDir.set("asc"),this.sortChange.emit({key:e,dir:"asc"})}emptyHint(){return this.hasActiveFilters()?this.ar()?"جرّب مسح عوامل التصفية لعرض المزيد من النتائج.":"Try clearing filters to see more results.":""}cellTemplate(e){return this.cellMap().get(e)??null}expandTemplate(){return this.expandDef()?.template??null}rowActionsTemplate(){return this.rowActionsDef()?.template??null}cardTemplate(){return this.cardDef()?.template??null}cellContext(e,a,s){return{$implicit:e,row:e,column:a,index:s}}headerCellClass(e){return f(this.headerPad(),this.pinClass(e))}bodyCellClass(e){return f(this.bodyPad(),this.pinClass(e))}pinClass(e){return e.pinned?f("sticky z-[1] bg-inherit",e.pinned==="start"&&"start-0",e.pinned==="end"&&"end-0"):""}filterPlaceholder(){return this.ar()?"تصفية…":"Filter…"}filterAria(e){return this.ar()?`تصفية ${e.label}`:`Filter ${e.label}`}rowKey(e){const a=e[this.idKey()];return a==null?"":String(a)}cellValue(e,a){const s=e[a];return s==null?"":String(s)}cardTitle(e){const a=this.cardTitleColumn();return a?this.cellValue(e,a.key)||this.rowKey(e):this.rowKey(e)}isSelected(e){return this.selectedKeys().includes(this.rowKey(e))}isExpanded(e){return this.expandedKeys().includes(this.rowKey(e))}expandLabel(e){const a=this.isExpanded(e);return this.ar()?a?`طي الصف ${this.rowKey(e)}`:`توسيع الصف ${this.rowKey(e)}`:a?`Collapse row ${this.rowKey(e)}`:`Expand row ${this.rowKey(e)}`}rowSelectLabel(e){return this.ar()?`تحديد الصف ${this.rowKey(e)}`:`Select row ${this.rowKey(e)}`}selectAllAria(){return this.allSelected()?"true":this.someSelected()?"mixed":"false"}emptyColspan(){return this.visibleColumns().length+(this.selectable()?1:0)+(this.expandable()?1:0)+(this.hasRowActions()?1:0)}ariaSort(e){return this.sortKey()!==e?"none":this.sortDir()==="asc"?"ascending":"descending"}sortGlyph(e){return this.sortKey()!==e?"↕":this.sortDir()==="asc"?"↑":"↓"}toggleSort(e){this.sortKey()===e?this.sortDir.set(this.sortDir()==="asc"?"desc":"asc"):(this.sortKey.set(e),this.sortDir.set("asc")),this.sortChange.emit({key:this.sortKey(),dir:this.sortDir()})}onFilter(e,a){const s={...this.columnFilters(),[e]:a};a||delete s[e],this.columnFilters.set(s),this.serverSide()||this.page.set(1),this.filterTimer&&clearTimeout(this.filterTimer);const r=Math.max(0,this.filterDebounceMs());this.filterTimer=setTimeout(()=>{this.filterChange.emit({filters:{...this.columnFilters()}}),this.filterTimer=null},r)}clearFilters(){this.columnFilters.set({}),this.cardsQuery.set(""),this.filterChange.emit({filters:{}}),this.serverSide()||this.page.set(1)}onPageSizeChange(e){this.pageSize.set(e),this.skipPageEmit=!0,this.page.set(1),this.pagingChange.emit({page:1,pageSize:e})}onPageModelChange(e){if(e!==this.page()){if(this.page.set(e),this.skipPageEmit){this.skipPageEmit=!1;return}this.pagingChange.emit({page:e,pageSize:this.pageSize()})}}toggleExpand(e){const a=this.rowKey(e);if(!a)return;const s=new Set(this.expandedKeys());s.has(a)?s.delete(a):s.add(a),this.expandedKeys.set([...s])}toggleRow(e){const a=this.rowKey(e);if(!a)return;const s=new Set(this.selectedKeys());s.has(a)?s.delete(a):s.add(a),this.selectedKeys.set([...s])}toggleAll(){const e=this.rowKeys();if(this.allSelected()){const s=new Set(e);this.selectedKeys.set(this.selectedKeys().filter(r=>!s.has(r)));return}const a=new Set(this.selectedKeys());for(const s of e)a.add(s);this.selectedKeys.set([...a])}rowKeys(){return this.displayRows().map(e=>this.rowKey(e)).filter(Boolean)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Aa,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Aa,isStandalone:!0,selector:"dga-table",inputs:{columns:{classPropertyName:"columns",publicName:"columns",isSignal:!0,isRequired:!1,transformFunction:null},rows:{classPropertyName:"rows",publicName:"rows",isSignal:!0,isRequired:!1,transformFunction:null},selectable:{classPropertyName:"selectable",publicName:"selectable",isSignal:!0,isRequired:!1,transformFunction:null},expandable:{classPropertyName:"expandable",publicName:"expandable",isSignal:!0,isRequired:!1,transformFunction:null},serverSide:{classPropertyName:"serverSide",publicName:"serverSide",isSignal:!0,isRequired:!1,transformFunction:null},idKey:{classPropertyName:"idKey",publicName:"idKey",isSignal:!0,isRequired:!1,transformFunction:null},selectedKeys:{classPropertyName:"selectedKeys",publicName:"selectedKeys",isSignal:!0,isRequired:!1,transformFunction:null},sortKey:{classPropertyName:"sortKey",publicName:"sortKey",isSignal:!0,isRequired:!1,transformFunction:null},sortDir:{classPropertyName:"sortDir",publicName:"sortDir",isSignal:!0,isRequired:!1,transformFunction:null},columnFilters:{classPropertyName:"columnFilters",publicName:"columnFilters",isSignal:!0,isRequired:!1,transformFunction:null},expandedKeys:{classPropertyName:"expandedKeys",publicName:"expandedKeys",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},selectAllLabel:{classPropertyName:"selectAllLabel",publicName:"selectAllLabel",isSignal:!0,isRequired:!1,transformFunction:null},emptyLabel:{classPropertyName:"emptyLabel",publicName:"emptyLabel",isSignal:!0,isRequired:!1,transformFunction:null},density:{classPropertyName:"density",publicName:"density",isSignal:!0,isRequired:!1,transformFunction:null},interactive:{classPropertyName:"interactive",publicName:"interactive",isSignal:!0,isRequired:!1,transformFunction:null},loading:{classPropertyName:"loading",publicName:"loading",isSignal:!0,isRequired:!1,transformFunction:null},stickyHeader:{classPropertyName:"stickyHeader",publicName:"stickyHeader",isSignal:!0,isRequired:!1,transformFunction:null},hiddenKeys:{classPropertyName:"hiddenKeys",publicName:"hiddenKeys",isSignal:!0,isRequired:!1,transformFunction:null},page:{classPropertyName:"page",publicName:"page",isSignal:!0,isRequired:!1,transformFunction:null},pageSize:{classPropertyName:"pageSize",publicName:"pageSize",isSignal:!0,isRequired:!1,transformFunction:null},total:{classPropertyName:"total",publicName:"total",isSignal:!0,isRequired:!1,transformFunction:null},pageSizeOptions:{classPropertyName:"pageSizeOptions",publicName:"pageSizeOptions",isSignal:!0,isRequired:!1,transformFunction:null},filterDebounceMs:{classPropertyName:"filterDebounceMs",publicName:"filterDebounceMs",isSignal:!0,isRequired:!1,transformFunction:null},error:{classPropertyName:"error",publicName:"error",isSignal:!0,isRequired:!1,transformFunction:null},viewMode:{classPropertyName:"viewMode",publicName:"viewMode",isSignal:!0,isRequired:!1,transformFunction:null},cardsBreakpoint:{classPropertyName:"cardsBreakpoint",publicName:"cardsBreakpoint",isSignal:!0,isRequired:!1,transformFunction:null},cardTitleKey:{classPropertyName:"cardTitleKey",publicName:"cardTitleKey",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{selectedKeys:"selectedKeysChange",sortKey:"sortKeyChange",sortDir:"sortDirChange",columnFilters:"columnFiltersChange",expandedKeys:"expandedKeysChange",hiddenKeys:"hiddenKeysChange",page:"pageChange",pageSize:"pageSizeChange",viewMode:"viewModeChange",sortChange:"sortChange",filterChange:"filterChange",pagingChange:"pagingChange",errorRetry:"errorRetry"},host:{attributes:{role:"region"},properties:{"attr.aria-label":"resolvedLabel()","attr.data-view":"resolvedView()"},classAttribute:"block w-full"},queries:[{propertyName:"cellDefs",predicate:ye,isSignal:!0},{propertyName:"expandDef",first:!0,predicate:xe,descendants:!0,isSignal:!0},{propertyName:"rowActionsDef",first:!0,predicate:we,descendants:!0,isSignal:!0},{propertyName:"cardDef",first:!0,predicate:ke,descendants:!0,isSignal:!0}],viewQueries:[{propertyName:"selectAllEl",first:!0,predicate:["selectAll"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
10757
|
+
`,host:{class:"dga-event-calendar"},styles:[":host{display:block;width:100%;max-width:100%;box-sizing:border-box}.dga-ecal{--ecal-primary: var(--dga-bg-primary, var(--dga-color-primary-600, #0b6b4f));--ecal-primary-faint: var( --dga-bg-primary-faint, color-mix(in srgb, var(--ecal-primary) 12%, transparent) );--ecal-on: var(--dga-text-on-color, #fff);--ecal-surface: var(--dga-bg-elevated, var(--dga-bg-card, var(--dga-bg-default, #fff)));--ecal-border: var(--dga-border-neutral, var(--dga-color-neutral-300, #d1d5db));--ecal-fg: var(--dga-text-default, #111827);--ecal-muted: var(--dga-text-muted, #6b7280);--ecal-radius: var(--dga-radius-md, 8px);display:flex;width:100%;flex-direction:column;gap:var(--dga-space-md, 12px);padding:var(--dga-space-md, 12px);border:1px solid var(--ecal-border);border-radius:var(--ecal-radius);background:var(--ecal-surface);color:var(--ecal-fg);box-sizing:border-box}.dga-ecal__toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:var(--dga-space-md, .75rem)}.dga-ecal__nav{display:flex;min-width:0;flex:1 1 12rem;align-items:center;justify-content:space-between;gap:var(--dga-space-sm, .5rem)}.dga-ecal__title{margin:0;min-width:0;font-size:1rem;font-weight:600;color:var(--ecal-fg);text-align:center}.dga-ecal__actions{display:flex;flex-wrap:wrap;flex-shrink:0;align-items:center;gap:var(--dga-space-sm, .5rem)}.dga-ecal__icon-btn{display:inline-flex;width:2rem;height:2rem;flex-shrink:0;align-items:center;justify-content:center;border:0;border-radius:999px;background:transparent;color:var(--ecal-fg);cursor:pointer;transition:background-color .14s ease,color .14s ease}.dga-ecal__icon-btn:hover{background:var(--ecal-primary-faint);color:var(--ecal-primary)}.dga-ecal__today-btn{min-height:2rem;padding:4px 12px;border:1px solid var(--ecal-border);border-radius:var(--dga-radius-sm, 4px);background:transparent;color:var(--ecal-fg);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer;transition:background-color .14s ease,border-color .14s ease,color .14s ease}.dga-ecal__today-btn:hover{border-color:var(--ecal-primary);background:var(--ecal-primary-faint);color:var(--ecal-primary)}.dga-ecal__cal-switch{display:inline-flex;flex-shrink:0;overflow:hidden;border:1px solid var(--ecal-border);border-radius:var(--dga-radius-sm, 4px);background:transparent}.dga-ecal__cal-btn{min-height:2rem;padding:4px 12px;border:0;background:transparent;color:var(--ecal-muted);font:inherit;font-size:.8125rem;font-weight:600;cursor:pointer;transition:background-color .14s ease,color .14s ease}.dga-ecal__cal-btn[aria-pressed=true]{background:var(--ecal-primary);color:var(--ecal-on)}.dga-ecal__panel{padding:0;background:transparent}.dga-ecal__weekdays,.dga-ecal__grid{display:grid;width:100%;grid-template-columns:repeat(7,minmax(0,1fr));gap:2px}.dga-ecal__weekdays{margin-bottom:4px}.dga-ecal__weekday{padding-block:2px;text-align:center;font-size:.75rem;font-weight:600;color:var(--ecal-muted)}.dga-ecal__day{position:relative;display:flex;min-height:3.15rem;align-items:flex-start;justify-content:center;padding:0;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;font-size:.875rem;cursor:pointer}.dga-ecal__day:disabled{opacity:0;pointer-events:none}.dga-ecal__day-face{display:inline-flex;width:2.25rem;height:2.25rem;align-items:center;justify-content:center;border:1px solid transparent;border-radius:999px;background:transparent;color:inherit;transition:background-color .14s ease,color .14s ease,border-color .14s ease}.dga-ecal__day:hover:not(:disabled):not(.dga-ecal__day--selected) .dga-ecal__day-face{background:var(--ecal-primary-faint)}.dga-ecal__day--today:not(.dga-ecal__day--selected) .dga-ecal__day-face{border-color:var(--ecal-primary)}.dga-ecal__day--selected .dga-ecal__day-face,.dga-ecal__day--selected:hover .dga-ecal__day-face{border-color:var(--ecal-primary);background:var(--ecal-primary);color:var(--ecal-on)}.dga-ecal__day-num{line-height:1;font-weight:500}.dga-ecal__dots{position:absolute;inset-inline:0;top:2.35rem;display:flex;align-items:center;justify-content:center;gap:3px;pointer-events:none}.dga-ecal__dot{width:.3rem;height:.3rem;border-radius:999px;background:var(--ecal-primary)}.dga-ecal__more{font-size:.625rem;font-weight:600;color:var(--ecal-muted);line-height:1}.dga-ecal__agenda{display:flex;flex-direction:column;gap:var(--dga-space-sm, 8px);margin-top:4px;padding-top:var(--dga-space-md, 12px);border-top:1px solid var(--ecal-border);background:transparent}.dga-ecal__agenda-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:.5rem}.dga-ecal__agenda-title{margin:0;font-size:.875rem;font-weight:700;color:var(--ecal-fg)}.dga-ecal__agenda-date{font-size:.75rem;font-weight:500;color:var(--ecal-muted)}.dga-ecal__events{display:flex;margin:0;padding:0;list-style:none;flex-direction:column;gap:.5rem}.dga-ecal__event{display:flex;width:100%;align-items:stretch;gap:0;overflow:hidden;padding:0;border:1px solid var(--ecal-border);border-radius:var(--dga-radius-sm, 4px);background:transparent;color:inherit;font:inherit;text-align:start;cursor:pointer;transition:background-color .14s ease,border-color .14s ease}.dga-ecal__event:hover{border-color:var(--ecal-primary);background:var(--ecal-primary-faint)}.dga-ecal__event-accent{width:.35rem;flex-shrink:0;background:var(--ecal-primary)}.dga-ecal__event-body{display:flex;min-width:0;flex:1;align-items:center;padding:.65rem .85rem}.dga-ecal__event-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;font-weight:600}.dga-ecal__empty{margin:0;padding:.35rem 0;font-size:.875rem;color:var(--ecal-muted)}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"]}]}],propDecorators:{events:[{type:t.Input,args:[{isSignal:!0,alias:"events",required:!1}]}],month:[{type:t.Input,args:[{isSignal:!0,alias:"month",required:!1}]},{type:t.Output,args:["monthChange"]}],selectedDay:[{type:t.Input,args:[{isSignal:!0,alias:"selectedDay",required:!1}]},{type:t.Output,args:["selectedDayChange"]}],calendar:[{type:t.Input,args:[{isSignal:!0,alias:"calendar",required:!1}]},{type:t.Output,args:["calendarChange"]}],daySelect:[{type:t.Output,args:["daySelect"]}],eventSelect:[{type:t.Output,args:["eventSelect"]}]}});function ps(d){const e=d.getUTCFullYear(),a=String(d.getUTCMonth()+1).padStart(2,"0"),s=String(d.getUTCDate()).padStart(2,"0");return`${e}-${a}-${s}`}class ye{dgaCellDef=i.required(...ngDevMode?[{debugName:"dgaCellDef"}]:[]);template=x(ht);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ye,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"17.1.0",version:"22.1.5",type:ye,isStandalone:!0,selector:"ng-template[dgaCellDef]",inputs:{dgaCellDef:{classPropertyName:"dgaCellDef",publicName:"dgaCellDef",isSignal:!0,isRequired:!0,transformFunction:null}},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ye,decorators:[{type:V,args:[{selector:"ng-template[dgaCellDef]",standalone:!0}]}],propDecorators:{dgaCellDef:[{type:t.Input,args:[{isSignal:!0,alias:"dgaCellDef",required:!0}]}]}});class xe{template=x(ht);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:xe,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"22.1.5",type:xe,isStandalone:!0,selector:"ng-template[dgaExpandDef]",ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:xe,decorators:[{type:V,args:[{selector:"ng-template[dgaExpandDef]",standalone:!0}]}]});class we{template=x(ht);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:we,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"22.1.5",type:we,isStandalone:!0,selector:"ng-template[dgaRowActions]",ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:we,decorators:[{type:V,args:[{selector:"ng-template[dgaRowActions]",standalone:!0}]}]});class ke{template=x(ht);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ke,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"22.1.5",type:ke,isStandalone:!0,selector:"ng-template[dgaCardDef]",ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:ke,decorators:[{type:V,args:[{selector:"ng-template[dgaCardDef]",standalone:!0}]}]});class Aa{destroyRef=x(L);uiLocale=$();ar=n(()=>this.uiLocale().startsWith("ar"),...ngDevMode?[{debugName:"ar"}]:[]);columns=i([],...ngDevMode?[{debugName:"columns"}]:[]);rows=i([],...ngDevMode?[{debugName:"rows"}]:[]);selectable=i(!1,{...ngDevMode?{debugName:"selectable"}:{},transform:m});expandable=i(!1,{...ngDevMode?{debugName:"expandable"}:{},transform:m});serverSide=i(!1,{...ngDevMode?{debugName:"serverSide"}:{},transform:m});idKey=i("id",...ngDevMode?[{debugName:"idKey"}]:[]);selectedKeys=S([],...ngDevMode?[{debugName:"selectedKeys"}]:[]);sortKey=S("",...ngDevMode?[{debugName:"sortKey"}]:[]);sortDir=S("asc",...ngDevMode?[{debugName:"sortDir"}]:[]);columnFilters=S({},...ngDevMode?[{debugName:"columnFilters"}]:[]);expandedKeys=S([],...ngDevMode?[{debugName:"expandedKeys"}]:[]);label=i(void 0,...ngDevMode?[{debugName:"label"}]:[]);selectAllLabel=i(void 0,...ngDevMode?[{debugName:"selectAllLabel"}]:[]);emptyLabel=i(void 0,...ngDevMode?[{debugName:"emptyLabel"}]:[]);density=i("comfortable",...ngDevMode?[{debugName:"density"}]:[]);interactive=i(!0,{...ngDevMode?{debugName:"interactive"}:{},transform:m});loading=i(!1,{...ngDevMode?{debugName:"loading"}:{},transform:m});stickyHeader=i(!1,{...ngDevMode?{debugName:"stickyHeader"}:{},transform:m});hiddenKeys=S([],...ngDevMode?[{debugName:"hiddenKeys"}]:[]);page=S(1,...ngDevMode?[{debugName:"page"}]:[]);pageSize=S(0,...ngDevMode?[{debugName:"pageSize"}]:[]);total=i(void 0,...ngDevMode?[{debugName:"total"}]:[]);pageSizeOptions=i([5,10,25,50],...ngDevMode?[{debugName:"pageSizeOptions"}]:[]);filterDebounceMs=i(300,{...ngDevMode?{debugName:"filterDebounceMs"}:{},transform:A});error=i(null,...ngDevMode?[{debugName:"error"}]:[]);viewMode=S("auto",...ngDevMode?[{debugName:"viewMode"}]:[]);cardsBreakpoint=i("(max-width: 639px)",...ngDevMode?[{debugName:"cardsBreakpoint"}]:[]);cardTitleKey=i(void 0,...ngDevMode?[{debugName:"cardTitleKey"}]:[]);sortChange=w();filterChange=w();pagingChange=w();errorRetry=w();skeletonRows=[0,1,2,3,4];cellDefs=bt(ye,...ngDevMode?[{debugName:"cellDefs"}]:[]);expandDef=Ka(xe,...ngDevMode?[{debugName:"expandDef"}]:[]);rowActionsDef=Ka(we,...ngDevMode?[{debugName:"rowActionsDef"}]:[]);cardDef=Ka(ke,...ngDevMode?[{debugName:"cardDef"}]:[]);selectAllEl=R("selectAll",...ngDevMode?[{debugName:"selectAllEl"}]:[]);cellMap=y(new Map,...ngDevMode?[{debugName:"cellMap"}]:[]);mqMatches=y(!1,...ngDevMode?[{debugName:"mqMatches"}]:[]);cardsQuery=y("",...ngDevMode?[{debugName:"cardsQuery"}]:[]);filterTimer=null;skipPageEmit=!1;resolvedLabel=n(()=>this.label()??(this.ar()?"جدول البيانات":"Data table"),...ngDevMode?[{debugName:"resolvedLabel"}]:[]);resolvedSelectAllLabel=n(()=>this.selectAllLabel()??(this.ar()?"تحديد الكل في الصفحة":"Select all on page"),...ngDevMode?[{debugName:"resolvedSelectAllLabel"}]:[]);resolvedEmptyLabel=n(()=>this.emptyLabel()??(this.ar()?"لا توجد بيانات":"No data"),...ngDevMode?[{debugName:"resolvedEmptyLabel"}]:[]);selectedCountLabel=n(()=>{const e=this.selectedKeys().length;return this.ar()?`تم اختيار ${e}`:`${e} selected`},...ngDevMode?[{debugName:"selectedCountLabel"}]:[]);retryLabel=n(()=>this.ar()?"إعادة المحاولة":"Retry",...ngDevMode?[{debugName:"retryLabel"}]:[]);clearFiltersLabel=n(()=>this.ar()?"مسح التصفية":"Clear filters",...ngDevMode?[{debugName:"clearFiltersLabel"}]:[]);actionsLabel=n(()=>this.ar()?"إجراءات":"Actions",...ngDevMode?[{debugName:"actionsLabel"}]:[]);pageSizeLabel=n(()=>this.ar()?"لكل صفحة":"Per page",...ngDevMode?[{debugName:"pageSizeLabel"}]:[]);errorTitle=n(()=>this.ar()?"تعذر التحميل":"Failed to load",...ngDevMode?[{debugName:"errorTitle"}]:[]);cardsSearchLabel=n(()=>this.ar()?"بحث":"Search",...ngDevMode?[{debugName:"cardsSearchLabel"}]:[]);cardsSearchPlaceholder=n(()=>this.ar()?"ابحث في النتائج…":"Search results…",...ngDevMode?[{debugName:"cardsSearchPlaceholder"}]:[]);cardsSortLabel=n(()=>this.ar()?"فرز حسب":"Sort by",...ngDevMode?[{debugName:"cardsSortLabel"}]:[]);cardsSortPlaceholder=n(()=>this.ar()?"بدون فرز":"No sort",...ngDevMode?[{debugName:"cardsSortPlaceholder"}]:[]);cardsSortDirLabel=n(()=>this.sortDir()==="asc"?this.ar()?"تصاعدي — انقر للتبديل":"Ascending — click to toggle":this.ar()?"تنازلي — انقر للتبديل":"Descending — click to toggle",...ngDevMode?[{debugName:"cardsSortDirLabel"}]:[]);resolvedView=n(()=>{const e=this.viewMode();return e==="table"||e==="cards"?e:this.mqMatches()?"cards":"table"},...ngDevMode?[{debugName:"resolvedView"}]:[]);paginationEnabled=n(()=>this.pageSize()>0,...ngDevMode?[{debugName:"paginationEnabled"}]:[]);filteredCount=n(()=>this.serverSide()?this.total()??this.rows().length:this.filteredRows().length,...ngDevMode?[{debugName:"filteredCount"}]:[]);totalPages=n(()=>{const e=this.pageSize();return e<=0?1:Math.max(1,Math.ceil(this.filteredCount()/e))},...ngDevMode?[{debugName:"totalPages"}]:[]);rangeLabel=n(()=>{const e=this.pageSize(),a=this.filteredCount();if(e<=0||a===0)return this.ar()?`0 من ${a}`:`0 of ${a}`;const s=Math.min(this.page(),this.totalPages()),r=(s-1)*e+1,l=Math.min(s*e,a);return this.ar()?`${r}–${l} من ${a}`:`${r}–${l} of ${a}`},...ngDevMode?[{debugName:"rangeLabel"}]:[]);constructor(){M(()=>{const e=this.selectAllEl()?.nativeElement;e&&(e.indeterminate=this.someSelected())}),M(()=>{const e=new Map;for(const a of this.cellDefs())e.set(a.dgaCellDef(),a.template);this.cellMap.set(e)}),M(()=>{const e=this.totalPages();this.page()>e&&(this.skipPageEmit=!0,this.page.set(e))}),T(()=>{this.bindBreakpoint(),this.destroyRef.onDestroy(()=>{this.filterTimer&&clearTimeout(this.filterTimer)})})}bindBreakpoint(){if(typeof window>"u"||typeof window.matchMedia!="function")return;const e=window.matchMedia(this.cardsBreakpoint()),a=()=>this.mqMatches.set(e.matches);a(),e.addEventListener("change",a),this.destroyRef.onDestroy(()=>e.removeEventListener("change",a))}visibleColumns=n(()=>{const e=new Set(this.hiddenKeys());return this.columns().filter(a=>!e.has(a.key))},...ngDevMode?[{debugName:"visibleColumns"}]:[]);filterableColumns=n(()=>this.visibleColumns().filter(e=>e.filterable),...ngDevMode?[{debugName:"filterableColumns"}]:[]);sortableColumns=n(()=>this.visibleColumns().filter(e=>e.sortable),...ngDevMode?[{debugName:"sortableColumns"}]:[]);cardTitleColumn=n(()=>{const e=this.cardTitleKey(),a=this.visibleColumns();return e?a.find(s=>s.key===e)??a[0]??null:a[0]??null},...ngDevMode?[{debugName:"cardTitleColumn"}]:[]);cardBodyColumns=n(()=>{const e=this.cardTitleColumn();return this.visibleColumns().filter(a=>a.key!==e?.key)},...ngDevMode?[{debugName:"cardBodyColumns"}]:[]);selectPad=n(()=>this.density()==="compact"?"w-4xl px-lg py-xs":"w-4xl px-lg py-md",...ngDevMode?[{debugName:"selectPad"}]:[]);headerPad=n(()=>f("font-medium",this.density()==="compact"?"px-lg py-xs":"px-lg py-md"),...ngDevMode?[{debugName:"headerPad"}]:[]);bodyPad=n(()=>f("text-paragraph",this.density()==="compact"?"px-lg py-xs":"px-lg py-md"),...ngDevMode?[{debugName:"bodyPad"}]:[]);cardPad=n(()=>this.density()==="compact"?"px-md py-sm":"px-lg py-md",...ngDevMode?[{debugName:"cardPad"}]:[]);rowClasses=n(()=>f("border-t border-border-subtle transition-colors",this.interactive()&&"hover:bg-card-hovered"),...ngDevMode?[{debugName:"rowClasses"}]:[]);filteredRows=n(()=>{if(this.serverSide())return this.rows();let e=[...this.rows()];const a=this.columnFilters(),s=Object.entries(a).filter(([,c])=>c.trim());s.length&&(e=e.filter(c=>s.every(([p,g])=>{const b=c[p];return(b==null?"":String(b).toLowerCase()).includes(g.trim().toLowerCase())})));const r=this.cardsQuery().trim().toLowerCase();if(r){const c=this.visibleColumns();e=e.filter(p=>c.some(g=>{const b=p[g.key];return(b==null?"":String(b).toLowerCase()).includes(r)}))}const l=this.sortKey(),u=this.sortDir();if(!l)return e;const o=this.columns().find(c=>c.key===l);return e.sort((c,p)=>{const g=Ml(c[l],p[l],o);return u==="asc"?g:-g}),e},...ngDevMode?[{debugName:"filteredRows"}]:[]);displayRows=n(()=>{if(this.serverSide()||!this.paginationEnabled())return this.filteredRows();const e=this.pageSize(),s=(Math.min(Math.max(1,this.page()),this.totalPages())-1)*e;return this.filteredRows().slice(s,s+e)},...ngDevMode?[{debugName:"displayRows"}]:[]);allSelected=n(()=>{const e=this.rowKeys();if(!e.length)return!1;const a=new Set(this.selectedKeys());return e.every(s=>a.has(s))},...ngDevMode?[{debugName:"allSelected"}]:[]);someSelected=n(()=>{const e=this.rowKeys();if(!e.length)return!1;const a=new Set(this.selectedKeys()),s=e.filter(r=>a.has(r)).length;return s>0&&s<e.length},...ngDevMode?[{debugName:"someSelected"}]:[]);hasRowActions(){return!!this.rowActionsDef()}hasFilterOrSortChrome(){return this.filterableColumns().length>0||this.sortableColumns().length>0}hasActiveFilters(){return Object.values(this.columnFilters()).some(e=>!!e?.trim())||!!this.cardsQuery().trim()}onCardsSearch(e){this.cardsQuery.set(e),this.serverSide()||this.page.set(1),this.filterTimer&&clearTimeout(this.filterTimer);const a=Math.max(0,this.filterDebounceMs());this.filterTimer=setTimeout(()=>{this.filterChange.emit({filters:{...this.columnFilters()}}),this.filterTimer=null},a)}onCardsSortKey(e){if(!e){this.sortKey.set(""),this.sortChange.emit({key:"",dir:this.sortDir()});return}this.sortKey.set(e),this.sortDir.set("asc"),this.sortChange.emit({key:e,dir:"asc"})}emptyHint(){return this.hasActiveFilters()?this.ar()?"جرّب مسح عوامل التصفية لعرض المزيد من النتائج.":"Try clearing filters to see more results.":""}cellTemplate(e){return this.cellMap().get(e)??null}expandTemplate(){return this.expandDef()?.template??null}rowActionsTemplate(){return this.rowActionsDef()?.template??null}cardTemplate(){return this.cardDef()?.template??null}cellContext(e,a,s){return{$implicit:e,row:e,column:a,index:s}}headerCellClass(e){return f(this.headerPad(),this.pinClass(e))}bodyCellClass(e){return f(this.bodyPad(),this.pinClass(e))}pinClass(e){return e.pinned?f("sticky z-[1] bg-inherit",e.pinned==="start"&&"start-0",e.pinned==="end"&&"end-0"):""}filterPlaceholder(){return this.ar()?"تصفية…":"Filter…"}filterAria(e){return this.ar()?`تصفية ${e.label}`:`Filter ${e.label}`}rowKey(e){const a=e[this.idKey()];return a==null?"":String(a)}cellValue(e,a){const s=e[a];return s==null?"":String(s)}cardTitle(e){const a=this.cardTitleColumn();return a?this.cellValue(e,a.key)||this.rowKey(e):this.rowKey(e)}isSelected(e){return this.selectedKeys().includes(this.rowKey(e))}isExpanded(e){return this.expandedKeys().includes(this.rowKey(e))}expandLabel(e){const a=this.isExpanded(e);return this.ar()?a?`طي الصف ${this.rowKey(e)}`:`توسيع الصف ${this.rowKey(e)}`:a?`Collapse row ${this.rowKey(e)}`:`Expand row ${this.rowKey(e)}`}rowSelectLabel(e){return this.ar()?`تحديد الصف ${this.rowKey(e)}`:`Select row ${this.rowKey(e)}`}selectAllAria(){return this.allSelected()?"true":this.someSelected()?"mixed":"false"}emptyColspan(){return this.visibleColumns().length+(this.selectable()?1:0)+(this.expandable()?1:0)+(this.hasRowActions()?1:0)}ariaSort(e){return this.sortKey()!==e?"none":this.sortDir()==="asc"?"ascending":"descending"}sortGlyph(e){return this.sortKey()!==e?"↕":this.sortDir()==="asc"?"↑":"↓"}toggleSort(e){this.sortKey()===e?this.sortDir.set(this.sortDir()==="asc"?"desc":"asc"):(this.sortKey.set(e),this.sortDir.set("asc")),this.sortChange.emit({key:this.sortKey(),dir:this.sortDir()})}onFilter(e,a){const s={...this.columnFilters(),[e]:a};a||delete s[e],this.columnFilters.set(s),this.serverSide()||this.page.set(1),this.filterTimer&&clearTimeout(this.filterTimer);const r=Math.max(0,this.filterDebounceMs());this.filterTimer=setTimeout(()=>{this.filterChange.emit({filters:{...this.columnFilters()}}),this.filterTimer=null},r)}clearFilters(){this.columnFilters.set({}),this.cardsQuery.set(""),this.filterChange.emit({filters:{}}),this.serverSide()||this.page.set(1)}onPageSizeChange(e){this.pageSize.set(e),this.skipPageEmit=!0,this.page.set(1),this.pagingChange.emit({page:1,pageSize:e})}onPageModelChange(e){if(e!==this.page()){if(this.page.set(e),this.skipPageEmit){this.skipPageEmit=!1;return}this.pagingChange.emit({page:e,pageSize:this.pageSize()})}}toggleExpand(e){const a=this.rowKey(e);if(!a)return;const s=new Set(this.expandedKeys());s.has(a)?s.delete(a):s.add(a),this.expandedKeys.set([...s])}toggleRow(e){const a=this.rowKey(e);if(!a)return;const s=new Set(this.selectedKeys());s.has(a)?s.delete(a):s.add(a),this.selectedKeys.set([...s])}toggleAll(){const e=this.rowKeys();if(this.allSelected()){const s=new Set(e);this.selectedKeys.set(this.selectedKeys().filter(r=>!s.has(r)));return}const a=new Set(this.selectedKeys());for(const s of e)a.add(s);this.selectedKeys.set([...a])}rowKeys(){return this.displayRows().map(e=>this.rowKey(e)).filter(Boolean)}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Aa,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Aa,isStandalone:!0,selector:"dga-table",inputs:{columns:{classPropertyName:"columns",publicName:"columns",isSignal:!0,isRequired:!1,transformFunction:null},rows:{classPropertyName:"rows",publicName:"rows",isSignal:!0,isRequired:!1,transformFunction:null},selectable:{classPropertyName:"selectable",publicName:"selectable",isSignal:!0,isRequired:!1,transformFunction:null},expandable:{classPropertyName:"expandable",publicName:"expandable",isSignal:!0,isRequired:!1,transformFunction:null},serverSide:{classPropertyName:"serverSide",publicName:"serverSide",isSignal:!0,isRequired:!1,transformFunction:null},idKey:{classPropertyName:"idKey",publicName:"idKey",isSignal:!0,isRequired:!1,transformFunction:null},selectedKeys:{classPropertyName:"selectedKeys",publicName:"selectedKeys",isSignal:!0,isRequired:!1,transformFunction:null},sortKey:{classPropertyName:"sortKey",publicName:"sortKey",isSignal:!0,isRequired:!1,transformFunction:null},sortDir:{classPropertyName:"sortDir",publicName:"sortDir",isSignal:!0,isRequired:!1,transformFunction:null},columnFilters:{classPropertyName:"columnFilters",publicName:"columnFilters",isSignal:!0,isRequired:!1,transformFunction:null},expandedKeys:{classPropertyName:"expandedKeys",publicName:"expandedKeys",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},selectAllLabel:{classPropertyName:"selectAllLabel",publicName:"selectAllLabel",isSignal:!0,isRequired:!1,transformFunction:null},emptyLabel:{classPropertyName:"emptyLabel",publicName:"emptyLabel",isSignal:!0,isRequired:!1,transformFunction:null},density:{classPropertyName:"density",publicName:"density",isSignal:!0,isRequired:!1,transformFunction:null},interactive:{classPropertyName:"interactive",publicName:"interactive",isSignal:!0,isRequired:!1,transformFunction:null},loading:{classPropertyName:"loading",publicName:"loading",isSignal:!0,isRequired:!1,transformFunction:null},stickyHeader:{classPropertyName:"stickyHeader",publicName:"stickyHeader",isSignal:!0,isRequired:!1,transformFunction:null},hiddenKeys:{classPropertyName:"hiddenKeys",publicName:"hiddenKeys",isSignal:!0,isRequired:!1,transformFunction:null},page:{classPropertyName:"page",publicName:"page",isSignal:!0,isRequired:!1,transformFunction:null},pageSize:{classPropertyName:"pageSize",publicName:"pageSize",isSignal:!0,isRequired:!1,transformFunction:null},total:{classPropertyName:"total",publicName:"total",isSignal:!0,isRequired:!1,transformFunction:null},pageSizeOptions:{classPropertyName:"pageSizeOptions",publicName:"pageSizeOptions",isSignal:!0,isRequired:!1,transformFunction:null},filterDebounceMs:{classPropertyName:"filterDebounceMs",publicName:"filterDebounceMs",isSignal:!0,isRequired:!1,transformFunction:null},error:{classPropertyName:"error",publicName:"error",isSignal:!0,isRequired:!1,transformFunction:null},viewMode:{classPropertyName:"viewMode",publicName:"viewMode",isSignal:!0,isRequired:!1,transformFunction:null},cardsBreakpoint:{classPropertyName:"cardsBreakpoint",publicName:"cardsBreakpoint",isSignal:!0,isRequired:!1,transformFunction:null},cardTitleKey:{classPropertyName:"cardTitleKey",publicName:"cardTitleKey",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{selectedKeys:"selectedKeysChange",sortKey:"sortKeyChange",sortDir:"sortDirChange",columnFilters:"columnFiltersChange",expandedKeys:"expandedKeysChange",hiddenKeys:"hiddenKeysChange",page:"pageChange",pageSize:"pageSizeChange",viewMode:"viewModeChange",sortChange:"sortChange",filterChange:"filterChange",pagingChange:"pagingChange",errorRetry:"errorRetry"},host:{attributes:{role:"region"},properties:{"attr.aria-label":"resolvedLabel()","attr.data-view":"resolvedView()"},classAttribute:"block w-full"},queries:[{propertyName:"cellDefs",predicate:ye,isSignal:!0},{propertyName:"expandDef",first:!0,predicate:xe,descendants:!0,isSignal:!0},{propertyName:"rowActionsDef",first:!0,predicate:we,descendants:!0,isSignal:!0},{propertyName:"cardDef",first:!0,predicate:ke,descendants:!0,isSignal:!0}],viewQueries:[{propertyName:"selectAllEl",first:!0,predicate:["selectAll"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
10740
10758
|
<div class="empty:hidden mb-md">
|
|
10741
10759
|
<ng-content select="[dgaTableToolbar]" />
|
|
10742
10760
|
</div>
|
|
@@ -11708,7 +11726,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
11708
11726
|
}
|
|
11709
11727
|
</div>
|
|
11710
11728
|
</div>
|
|
11711
|
-
`,host:{class:"block"}}]}],propDecorators:{columns:[{type:t.Input,args:[{isSignal:!0,alias:"columns",required:!1}]}],hiddenKeys:[{type:t.Input,args:[{isSignal:!0,alias:"hiddenKeys",required:!1}]},{type:t.Output,args:["hiddenKeysChange"]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}]}});class Ne{template=x(ht);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ne,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"22.1.5",type:Ne,isStandalone:!0,selector:"ng-template[dgaVirtualItem]",ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ne,decorators:[{type:V,args:[{selector:"ng-template[dgaVirtualItem]",standalone:!0}]}]});class Ea{injector=x(G);viewportRef=R("viewport",...ngDevMode?[{debugName:"viewportRef"}]:[]);itemDef=Ka(Ne,...ngDevMode?[{debugName:"itemDef"}]:[]);items=i([],...ngDevMode?[{debugName:"items"}]:[]);itemHeight=i(48,{...ngDevMode?{debugName:"itemHeight"}:{},transform:A});overscan=i(5,{...ngDevMode?{debugName:"overscan"}:{},transform:A});height=i("320px",...ngDevMode?[{debugName:"height"}]:[]);trackByKey=i(void 0,...ngDevMode?[{debugName:"trackByKey"}]:[]);loadingMore=i(!1,{...ngDevMode?{debugName:"loadingMore"}:{},transform:m});scrolledToEnd=w();scrollTop=y(0,...ngDevMode?[{debugName:"scrollTop"}]:[]);viewportHeight=y(320,...ngDevMode?[{debugName:"viewportHeight"}]:[]);endEmittedForLength=-1;totalHeight=n(()=>this.items().length*Math.max(1,this.itemHeight()),...ngDevMode?[{debugName:"totalHeight"}]:[]);startIndex=n(()=>{const e=Math.max(1,this.itemHeight()),a=Math.floor(this.scrollTop()/e)-this.overscan();return Math.max(0,a)},...ngDevMode?[{debugName:"startIndex"}]:[]);endIndex=n(()=>{const e=Math.max(1,this.itemHeight()),a=Math.ceil(this.viewportHeight()/e),s=this.startIndex()+a+this.overscan()*2;return Math.min(this.items().length,Math.max(this.startIndex(),s))},...ngDevMode?[{debugName:"endIndex"}]:[]);offsetY=n(()=>this.startIndex()*Math.max(1,this.itemHeight()),...ngDevMode?[{debugName:"offsetY"}]:[]);visibleRows=n(()=>{const e=this.items(),a=this.startIndex(),s=this.endIndex(),r=this.trackByKey(),l=[];for(let u=a;u<s;u++){const o=e[u];l.push({item:o,index:u,track:this.trackOf(o,u,r)})}return l},...ngDevMode?[{debugName:"visibleRows"}]:[]);constructor(){
|
|
11729
|
+
`,host:{class:"block"}}]}],propDecorators:{columns:[{type:t.Input,args:[{isSignal:!0,alias:"columns",required:!1}]}],hiddenKeys:[{type:t.Input,args:[{isSignal:!0,alias:"hiddenKeys",required:!1}]},{type:t.Output,args:["hiddenKeysChange"]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}]}});class Ne{template=x(ht);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ne,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"22.1.5",type:Ne,isStandalone:!0,selector:"ng-template[dgaVirtualItem]",ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ne,decorators:[{type:V,args:[{selector:"ng-template[dgaVirtualItem]",standalone:!0}]}]});class Ea{injector=x(G);viewportRef=R("viewport",...ngDevMode?[{debugName:"viewportRef"}]:[]);itemDef=Ka(Ne,...ngDevMode?[{debugName:"itemDef"}]:[]);items=i([],...ngDevMode?[{debugName:"items"}]:[]);itemHeight=i(48,{...ngDevMode?{debugName:"itemHeight"}:{},transform:A});overscan=i(5,{...ngDevMode?{debugName:"overscan"}:{},transform:A});height=i("320px",...ngDevMode?[{debugName:"height"}]:[]);trackByKey=i(void 0,...ngDevMode?[{debugName:"trackByKey"}]:[]);loadingMore=i(!1,{...ngDevMode?{debugName:"loadingMore"}:{},transform:m});scrolledToEnd=w();scrollTop=y(0,...ngDevMode?[{debugName:"scrollTop"}]:[]);viewportHeight=y(320,...ngDevMode?[{debugName:"viewportHeight"}]:[]);endEmittedForLength=-1;totalHeight=n(()=>this.items().length*Math.max(1,this.itemHeight()),...ngDevMode?[{debugName:"totalHeight"}]:[]);startIndex=n(()=>{const e=Math.max(1,this.itemHeight()),a=Math.floor(this.scrollTop()/e)-this.overscan();return Math.max(0,a)},...ngDevMode?[{debugName:"startIndex"}]:[]);endIndex=n(()=>{const e=Math.max(1,this.itemHeight()),a=Math.ceil(this.viewportHeight()/e),s=this.startIndex()+a+this.overscan()*2;return Math.min(this.items().length,Math.max(this.startIndex(),s))},...ngDevMode?[{debugName:"endIndex"}]:[]);offsetY=n(()=>this.startIndex()*Math.max(1,this.itemHeight()),...ngDevMode?[{debugName:"offsetY"}]:[]);visibleRows=n(()=>{const e=this.items(),a=this.startIndex(),s=this.endIndex(),r=this.trackByKey(),l=[];for(let u=a;u<s;u++){const o=e[u];l.push({item:o,index:u,track:this.trackOf(o,u,r)})}return l},...ngDevMode?[{debugName:"visibleRows"}]:[]);constructor(){T(()=>{const e=this.viewportRef()?.nativeElement;e&&(this.viewportHeight.set(e.clientHeight||320),this.scrollTop.set(e.scrollTop))},{injector:this.injector})}onScroll(){const e=this.viewportRef()?.nativeElement;e&&(this.scrollTop.set(e.scrollTop),this.viewportHeight.set(e.clientHeight),this.checkScrolledToEnd(e))}checkScrolledToEnd(e){const a=Math.max(1,this.itemHeight())*2;if(!(e.scrollTop+e.clientHeight>=e.scrollHeight-a))return;const r=this.items().length;r===0||r===this.endEmittedForLength||(this.endEmittedForLength=r,this.scrolledToEnd.emit())}trackOf(e,a,s){if(s&&e&&typeof e=="object"&&s in e){const r=e[s];return r!=null&&(typeof r=="string"||typeof r=="number")?r:`${String(r)}-${a}`}return a}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ea,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ea,isStandalone:!0,selector:"dga-virtual-list",inputs:{items:{classPropertyName:"items",publicName:"items",isSignal:!0,isRequired:!1,transformFunction:null},itemHeight:{classPropertyName:"itemHeight",publicName:"itemHeight",isSignal:!0,isRequired:!1,transformFunction:null},overscan:{classPropertyName:"overscan",publicName:"overscan",isSignal:!0,isRequired:!1,transformFunction:null},height:{classPropertyName:"height",publicName:"height",isSignal:!0,isRequired:!1,transformFunction:null},trackByKey:{classPropertyName:"trackByKey",publicName:"trackByKey",isSignal:!0,isRequired:!1,transformFunction:null},loadingMore:{classPropertyName:"loadingMore",publicName:"loadingMore",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{scrolledToEnd:"scrolledToEnd"},host:{properties:{"attr.data-loading":'loadingMore() ? "" : null'},classAttribute:"dga-virtual-list block w-full"},queries:[{propertyName:"itemDef",first:!0,predicate:Ne,descendants:!0,isSignal:!0}],viewQueries:[{propertyName:"viewportRef",first:!0,predicate:["viewport"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
11712
11730
|
<div
|
|
11713
11731
|
#viewport
|
|
11714
11732
|
class="dga-vl__viewport relative w-full overflow-auto overscroll-contain"
|
|
@@ -11837,7 +11855,7 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
11837
11855
|
PDF
|
|
11838
11856
|
</button>
|
|
11839
11857
|
</div>
|
|
11840
|
-
`,changeDetection:h.OnPush,host:{class:"inline-flex"}}]}],propDecorators:{columns:[{type:t.Input,args:[{isSignal:!0,alias:"columns",required:!1}]}],rows:[{type:t.Input,args:[{isSignal:!0,alias:"rows",required:!1}]}],selectedRows:[{type:t.Input,args:[{isSignal:!0,alias:"selectedRows",required:!1}]}],filename:[{type:t.Input,args:[{isSignal:!0,alias:"filename",required:!1}]}],scope:[{type:t.Input,args:[{isSignal:!0,alias:"scope",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],printTitle:[{type:t.Input,args:[{isSignal:!0,alias:"printTitle",required:!1}]}]}});class Se{uiLocale=$();slideRole=n(()=>this.uiLocale().startsWith("ar")?"شريحة":"slide",...ngDevMode?[{debugName:"slideRole"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Se,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"22.1.5",type:Se,isStandalone:!0,selector:"[dgaCarouselSlide]",host:{attributes:{role:"group"},properties:{"attr.aria-roledescription":"slideRole()"},styleAttribute:"flex: 0 0 calc((100% - var(--dga-carousel-peek, 0px) - var(--dga-carousel-gap, 16px) * (var(--dga-carousel-slides, 1) - 1)) / var(--dga-carousel-slides, 1));",classAttribute:"dga-carousel-slide self-stretch min-w-0 shrink-0 snap-start"},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Se,decorators:[{type:V,args:[{selector:"[dgaCarouselSlide]",standalone:!0,host:{class:"dga-carousel-slide self-stretch min-w-0 shrink-0 snap-start",role:"group","[attr.aria-roledescription]":"slideRole()",style:"flex: 0 0 calc((100% - var(--dga-carousel-peek, 0px) - var(--dga-carousel-gap, 16px) * (var(--dga-carousel-slides, 1) - 1)) / var(--dga-carousel-slides, 1));"}}]}]});class Ba{destroyRef=x(L);host=x(F);swipe=new ai;drag=null;track=R("track",...ngDevMode?[{debugName:"track"}]:[]);projected=bt(Se,{...ngDevMode?{debugName:"projected"}:{},read:F});slides=i([],...ngDevMode?[{debugName:"slides"}]:[]);index=S(0,...ngDevMode?[{debugName:"index"}]:[]);slidesMax=i(3,...ngDevMode?[{debugName:"slidesMax"}]:[]);slidesMid=i(2,...ngDevMode?[{debugName:"slidesMid"}]:[]);slidesMin=i(1,...ngDevMode?[{debugName:"slidesMin"}]:[]);peek=i(40,...ngDevMode?[{debugName:"peek"}]:[]);gap=i(16,...ngDevMode?[{debugName:"gap"}]:[]);label=i(void 0,...ngDevMode?[{debugName:"label"}]:[]);prevLabel=i(void 0,...ngDevMode?[{debugName:"prevLabel"}]:[]);nextLabel=i(void 0,...ngDevMode?[{debugName:"nextLabel"}]:[]);dotsLabel=i(void 0,...ngDevMode?[{debugName:"dotsLabel"}]:[]);emptyLabel=i(void 0,...ngDevMode?[{debugName:"emptyLabel"}]:[]);uiLocale=$();ar=n(()=>this.uiLocale().startsWith("ar"),...ngDevMode?[{debugName:"ar"}]:[]);slideRole=n(()=>this.ar()?"شريحة":"slide",...ngDevMode?[{debugName:"slideRole"}]:[]);resolvedLabel=n(()=>this.label()??(this.ar()?"عرض الشرائح":"Slideshow"),...ngDevMode?[{debugName:"resolvedLabel"}]:[]);resolvedPrevLabel=n(()=>this.prevLabel()??(this.ar()?"الشريحة السابقة":"Previous slide"),...ngDevMode?[{debugName:"resolvedPrevLabel"}]:[]);resolvedNextLabel=n(()=>this.nextLabel()??(this.ar()?"الشريحة التالية":"Next slide"),...ngDevMode?[{debugName:"resolvedNextLabel"}]:[]);resolvedDotsLabel=n(()=>this.dotsLabel()??(this.ar()?"مؤشرات الشرائح":"Slide indicators"),...ngDevMode?[{debugName:"resolvedDotsLabel"}]:[]);resolvedEmptyLabel=n(()=>this.emptyLabel()??(this.ar()?"لا توجد شرائح":"No slides"),...ngDevMode?[{debugName:"resolvedEmptyLabel"}]:[]);prevText=n(()=>this.ar()?"السابق":"Previous",...ngDevMode?[{debugName:"prevText"}]:[]);nextText=n(()=>this.ar()?"التالي":"Next",...ngDevMode?[{debugName:"nextText"}]:[]);pageIndex=y(0,...ngDevMode?[{debugName:"pageIndex"}]:[]);perView=y(1,...ngDevMode?[{debugName:"perView"}]:[]);slideCount=y(0,...ngDevMode?[{debugName:"slideCount"}]:[]);isSimple=n(()=>this.slides().length>0,...ngDevMode?[{debugName:"isSimple"}]:[]);current=n(()=>{const e=this.slides();return e.length?e[this.clampedIndex()]??null:null},...ngDevMode?[{debugName:"current"}]:[]);pages=n(()=>{const e=this.slideCount(),a=Math.max(1,this.perView()),s=Math.max(1,Math.ceil(e/a));return Array.from({length:s},(r,l)=>l)},...ngDevMode?[{debugName:"pages"}]:[]);constructor(){M(()=>{this.projected(),this.refreshMetrics()}),O(()=>{this.refreshMetrics();const e=this.track()?.nativeElement;if(!e||typeof ResizeObserver>"u")return;const a=new ResizeObserver(()=>this.refreshMetrics());a.observe(e),this.destroyRef.onDestroy(()=>a.disconnect());const s=window.matchMedia("(min-width: 640px)"),r=window.matchMedia("(min-width: 1024px)"),l=()=>this.refreshMetrics();s.addEventListener("change",l),r.addEventListener("change",l),this.destroyRef.onDestroy(()=>{s.removeEventListener("change",l),r.removeEventListener("change",l)})})}showControls(){return this.slideCount()>this.perView()}atStart(){return this.pageIndex()<=0}atEnd(){return this.pageIndex()>=this.pages().length-1}textNavClass(){return f("rounded-sm border border-border bg-surface px-lg py-xs text-body-sm text-fg","hover:bg-card-hovered disabled:pointer-events-none disabled:opacity-40","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-focus")}iconNavClass(e){return f("dga-carousel-nav-btn inline-flex size-4xl items-center justify-center rounded-full transition-colors","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-focus",e?"cursor-not-allowed bg-neutral-light text-muted":"cursor-pointer bg-primary text-on-color hover:opacity-90")}canNavigate(){return this.slides().length>1}clampedIndex(){const e=this.slides().length;return e<=0?0:Math.min(Math.max(0,this.index()),e-1)}dotLabel(e){return this.ar()?`الانتقال إلى الشريحة ${e+1}`:`Go to slide ${e+1}`}go(e){const a=this.slides().length;a<=0||this.index.set(Math.min(Math.max(0,e),a-1))}prev(){const e=this.slides().length;e<=0||this.index.set((this.clampedIndex()-1+e)%e)}next(){const e=this.slides().length;e<=0||this.index.set((this.clampedIndex()+1)%e)}goPage(e){const a=this.pages().length-1,s=Math.min(Math.max(0,e),Math.max(0,a));this.pageIndex.set(s),this.scrollToPage(s)}prevPage(){this.atStart()||this.goPage(this.pageIndex()-1)}nextPage(){this.atEnd()||this.goPage(this.pageIndex()+1)}onTrackScroll(){const e=this.track()?.nativeElement;if(!e)return;const a=e.scrollWidth-e.clientWidth,s=this.normalizedScrollLeft(e),r=this.pages().length-1;if(a<=0){this.pageIndex.set(0);return}if(s<=1){this.pageIndex.set(0);return}if(s>=a-1){this.pageIndex.set(Math.max(0,r));return}const l=this.pageScrollAmount(e);if(l<=0)return;const u=Math.round(s/l);this.pageIndex.set(Math.min(Math.max(0,u),Math.max(0,r)))}onSimplePointerDown(e){this.canNavigate()&&(ns(e.target)||this.swipe.start(e)&&e.currentTarget?.setPointerCapture?.(e.pointerId))}onSimplePointerMove(e){this.swipe.move(e)==="horizontal"&&e.preventDefault()}onSimplePointerUp(e){const a=this.swipe.end(e,this.isRtl());a&&(a==="next"?this.next():this.prev())}onSimplePointerCancel(e){this.swipe.cancel(e)}onTrackPointerDown(e){if(this.isSimple())return;const a=this.track()?.nativeElement;!a||!this.showControls()||e.pointerType==="mouse"&&e.button!==0||ns(e.target)||(this.drag={id:e.pointerId,x:e.clientX,scroll:a.scrollLeft,moved:!1},a.setPointerCapture(e.pointerId))}onTrackPointerMove(e){if(!this.drag||e.pointerId!==this.drag.id)return;const a=this.track()?.nativeElement;if(!a)return;const s=e.clientX-this.drag.x;!this.drag.moved&&Math.abs(s)>8&&(this.drag.moved=!0,a.classList.add("is-dragging")),this.drag.moved&&(e.preventDefault(),a.scrollLeft=this.drag.scroll-s)}onTrackPointerUp(e){if(!this.drag||e.pointerId!==this.drag.id)return;const a=this.track()?.nativeElement,s=this.drag.moved;if(this.drag=null,!a||(a.classList.remove("is-dragging"),!s))return;const r=l=>{l.preventDefault(),l.stopPropagation()};a.addEventListener("click",r,{capture:!0,once:!0}),this.onTrackScroll(),this.scrollToPage(this.pageIndex())}refreshMetrics(){if(this.isSimple())return;const e=this.resolvePerView();this.perView.set(e);const a=this.projected(),s=this.track()?.nativeElement,r=a.length?a.length:s?s.children.length:0;this.slideCount.set(r);const l=Math.max(0,Math.ceil(r/Math.max(1,e))-1);this.pageIndex()>l&&this.pageIndex.set(l)}resolvePerView(){return typeof window>"u"?this.slidesMin():window.matchMedia("(min-width: 1024px)").matches?this.slidesMax():window.matchMedia("(min-width: 640px)").matches?this.slidesMid():this.slidesMin()}pageScrollAmount(e){const a=Math.max(1,this.perView()),s=this.gap(),r=this.peek();return((e.clientWidth-r-s*(a-1))/a+s)*a}scrollToPage(e){const a=this.track()?.nativeElement;if(!a)return;const s=this.pageScrollAmount(a)*e,r=this.isRtl();a.scrollTo({left:r?-s:s,behavior:"smooth"})}isRtl(){const e=this.host.nativeElement.getAttribute("dir")||this.host.nativeElement.closest("[dir]")?.getAttribute("dir");return e?e.toLowerCase()==="rtl":Xa()}normalizedScrollLeft(e){return this.isRtl()?Math.abs(Math.min(0,e.scrollLeft)):e.scrollLeft}onKeydown(e){if(this.isSimple()){e.key==="ArrowRight"||e.key==="ArrowUp"?(e.preventDefault(),this.prev()):e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),this.next()):e.key==="Home"?(e.preventDefault(),this.go(0)):e.key==="End"&&(e.preventDefault(),this.go(this.slides().length-1));return}const a=this.isRtl();e.key==="ArrowRight"?(e.preventDefault(),a?this.nextPage():this.prevPage()):e.key==="ArrowLeft"?(e.preventDefault(),a?this.prevPage():this.nextPage()):e.key==="Home"?(e.preventDefault(),this.goPage(0)):e.key==="End"&&(e.preventDefault(),this.goPage(this.pages().length-1))}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ba,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ba,isStandalone:!0,selector:"dga-carousel",inputs:{slides:{classPropertyName:"slides",publicName:"slides",isSignal:!0,isRequired:!1,transformFunction:null},index:{classPropertyName:"index",publicName:"index",isSignal:!0,isRequired:!1,transformFunction:null},slidesMax:{classPropertyName:"slidesMax",publicName:"slidesMax",isSignal:!0,isRequired:!1,transformFunction:null},slidesMid:{classPropertyName:"slidesMid",publicName:"slidesMid",isSignal:!0,isRequired:!1,transformFunction:null},slidesMin:{classPropertyName:"slidesMin",publicName:"slidesMin",isSignal:!0,isRequired:!1,transformFunction:null},peek:{classPropertyName:"peek",publicName:"peek",isSignal:!0,isRequired:!1,transformFunction:null},gap:{classPropertyName:"gap",publicName:"gap",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},prevLabel:{classPropertyName:"prevLabel",publicName:"prevLabel",isSignal:!0,isRequired:!1,transformFunction:null},nextLabel:{classPropertyName:"nextLabel",publicName:"nextLabel",isSignal:!0,isRequired:!1,transformFunction:null},dotsLabel:{classPropertyName:"dotsLabel",publicName:"dotsLabel",isSignal:!0,isRequired:!1,transformFunction:null},emptyLabel:{classPropertyName:"emptyLabel",publicName:"emptyLabel",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{index:"indexChange"},host:{attributes:{tabindex:"0",role:"region"},listeners:{keydown:"onKeydown($event)"},properties:{"attr.aria-label":"resolvedLabel()","attr.data-index":"index()","attr.data-page":"pageIndex()","attr.data-mode":'isSimple() ? "simple" : "multi"',"style.--dga-carousel-slides":"perView()","style.--dga-carousel-peek.px":"peek()","style.--dga-carousel-gap.px":"gap()"},classAttribute:"block w-full outline-none"},queries:[{propertyName:"projected",predicate:Se,read:F,isSignal:!0}],viewQueries:[{propertyName:"track",first:!0,predicate:["track"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
11858
|
+
`,changeDetection:h.OnPush,host:{class:"inline-flex"}}]}],propDecorators:{columns:[{type:t.Input,args:[{isSignal:!0,alias:"columns",required:!1}]}],rows:[{type:t.Input,args:[{isSignal:!0,alias:"rows",required:!1}]}],selectedRows:[{type:t.Input,args:[{isSignal:!0,alias:"selectedRows",required:!1}]}],filename:[{type:t.Input,args:[{isSignal:!0,alias:"filename",required:!1}]}],scope:[{type:t.Input,args:[{isSignal:!0,alias:"scope",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],printTitle:[{type:t.Input,args:[{isSignal:!0,alias:"printTitle",required:!1}]}]}});class Se{uiLocale=$();slideRole=n(()=>this.uiLocale().startsWith("ar")?"شريحة":"slide",...ngDevMode?[{debugName:"slideRole"}]:[]);static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Se,deps:[],target:t.ɵɵFactoryTarget.Directive});static ɵdir=t.ɵɵngDeclareDirective({minVersion:"14.0.0",version:"22.1.5",type:Se,isStandalone:!0,selector:"[dgaCarouselSlide]",host:{attributes:{role:"group"},properties:{"attr.aria-roledescription":"slideRole()"},styleAttribute:"flex: 0 0 calc((100% - var(--dga-carousel-peek, 0px) - var(--dga-carousel-gap, 16px) * (var(--dga-carousel-slides, 1) - 1)) / var(--dga-carousel-slides, 1));",classAttribute:"dga-carousel-slide self-stretch min-w-0 shrink-0 snap-start"},ngImport:t})}t.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Se,decorators:[{type:V,args:[{selector:"[dgaCarouselSlide]",standalone:!0,host:{class:"dga-carousel-slide self-stretch min-w-0 shrink-0 snap-start",role:"group","[attr.aria-roledescription]":"slideRole()",style:"flex: 0 0 calc((100% - var(--dga-carousel-peek, 0px) - var(--dga-carousel-gap, 16px) * (var(--dga-carousel-slides, 1) - 1)) / var(--dga-carousel-slides, 1));"}}]}]});class Ba{destroyRef=x(L);host=x(F);swipe=new si;drag=null;track=R("track",...ngDevMode?[{debugName:"track"}]:[]);projected=bt(Se,{...ngDevMode?{debugName:"projected"}:{},read:F});slides=i([],...ngDevMode?[{debugName:"slides"}]:[]);index=S(0,...ngDevMode?[{debugName:"index"}]:[]);slidesMax=i(3,...ngDevMode?[{debugName:"slidesMax"}]:[]);slidesMid=i(2,...ngDevMode?[{debugName:"slidesMid"}]:[]);slidesMin=i(1,...ngDevMode?[{debugName:"slidesMin"}]:[]);peek=i(40,...ngDevMode?[{debugName:"peek"}]:[]);gap=i(16,...ngDevMode?[{debugName:"gap"}]:[]);label=i(void 0,...ngDevMode?[{debugName:"label"}]:[]);prevLabel=i(void 0,...ngDevMode?[{debugName:"prevLabel"}]:[]);nextLabel=i(void 0,...ngDevMode?[{debugName:"nextLabel"}]:[]);dotsLabel=i(void 0,...ngDevMode?[{debugName:"dotsLabel"}]:[]);emptyLabel=i(void 0,...ngDevMode?[{debugName:"emptyLabel"}]:[]);uiLocale=$();ar=n(()=>this.uiLocale().startsWith("ar"),...ngDevMode?[{debugName:"ar"}]:[]);slideRole=n(()=>this.ar()?"شريحة":"slide",...ngDevMode?[{debugName:"slideRole"}]:[]);resolvedLabel=n(()=>this.label()??(this.ar()?"عرض الشرائح":"Slideshow"),...ngDevMode?[{debugName:"resolvedLabel"}]:[]);resolvedPrevLabel=n(()=>this.prevLabel()??(this.ar()?"الشريحة السابقة":"Previous slide"),...ngDevMode?[{debugName:"resolvedPrevLabel"}]:[]);resolvedNextLabel=n(()=>this.nextLabel()??(this.ar()?"الشريحة التالية":"Next slide"),...ngDevMode?[{debugName:"resolvedNextLabel"}]:[]);resolvedDotsLabel=n(()=>this.dotsLabel()??(this.ar()?"مؤشرات الشرائح":"Slide indicators"),...ngDevMode?[{debugName:"resolvedDotsLabel"}]:[]);resolvedEmptyLabel=n(()=>this.emptyLabel()??(this.ar()?"لا توجد شرائح":"No slides"),...ngDevMode?[{debugName:"resolvedEmptyLabel"}]:[]);prevText=n(()=>this.ar()?"السابق":"Previous",...ngDevMode?[{debugName:"prevText"}]:[]);nextText=n(()=>this.ar()?"التالي":"Next",...ngDevMode?[{debugName:"nextText"}]:[]);pageIndex=y(0,...ngDevMode?[{debugName:"pageIndex"}]:[]);perView=y(1,...ngDevMode?[{debugName:"perView"}]:[]);slideCount=y(0,...ngDevMode?[{debugName:"slideCount"}]:[]);isSimple=n(()=>this.slides().length>0,...ngDevMode?[{debugName:"isSimple"}]:[]);current=n(()=>{const e=this.slides();return e.length?e[this.clampedIndex()]??null:null},...ngDevMode?[{debugName:"current"}]:[]);pages=n(()=>{const e=this.slideCount(),a=Math.max(1,this.perView()),s=Math.max(1,Math.ceil(e/a));return Array.from({length:s},(r,l)=>l)},...ngDevMode?[{debugName:"pages"}]:[]);constructor(){M(()=>{this.projected(),this.refreshMetrics()}),T(()=>{this.refreshMetrics();const e=this.track()?.nativeElement;if(!e||typeof ResizeObserver>"u")return;const a=new ResizeObserver(()=>this.refreshMetrics());a.observe(e),this.destroyRef.onDestroy(()=>a.disconnect());const s=window.matchMedia("(min-width: 640px)"),r=window.matchMedia("(min-width: 1024px)"),l=()=>this.refreshMetrics();s.addEventListener("change",l),r.addEventListener("change",l),this.destroyRef.onDestroy(()=>{s.removeEventListener("change",l),r.removeEventListener("change",l)})})}showControls(){return this.slideCount()>this.perView()}atStart(){return this.pageIndex()<=0}atEnd(){return this.pageIndex()>=this.pages().length-1}textNavClass(){return f("rounded-sm border border-border bg-surface px-lg py-xs text-body-sm text-fg","hover:bg-card-hovered disabled:pointer-events-none disabled:opacity-40","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-focus")}iconNavClass(e){return f("dga-carousel-nav-btn inline-flex size-4xl items-center justify-center rounded-full transition-colors","focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-focus",e?"cursor-not-allowed bg-neutral-light text-muted":"cursor-pointer bg-primary text-on-color hover:opacity-90")}canNavigate(){return this.slides().length>1}clampedIndex(){const e=this.slides().length;return e<=0?0:Math.min(Math.max(0,this.index()),e-1)}dotLabel(e){return this.ar()?`الانتقال إلى الشريحة ${e+1}`:`Go to slide ${e+1}`}go(e){const a=this.slides().length;a<=0||this.index.set(Math.min(Math.max(0,e),a-1))}prev(){const e=this.slides().length;e<=0||this.index.set((this.clampedIndex()-1+e)%e)}next(){const e=this.slides().length;e<=0||this.index.set((this.clampedIndex()+1)%e)}goPage(e){const a=this.pages().length-1,s=Math.min(Math.max(0,e),Math.max(0,a));this.pageIndex.set(s),this.scrollToPage(s)}prevPage(){this.atStart()||this.goPage(this.pageIndex()-1)}nextPage(){this.atEnd()||this.goPage(this.pageIndex()+1)}onTrackScroll(){const e=this.track()?.nativeElement;if(!e)return;const a=e.scrollWidth-e.clientWidth,s=this.normalizedScrollLeft(e),r=this.pages().length-1;if(a<=0){this.pageIndex.set(0);return}if(s<=1){this.pageIndex.set(0);return}if(s>=a-1){this.pageIndex.set(Math.max(0,r));return}const l=this.pageScrollAmount(e);if(l<=0)return;const u=Math.round(s/l);this.pageIndex.set(Math.min(Math.max(0,u),Math.max(0,r)))}onSimplePointerDown(e){this.canNavigate()&&(ns(e.target)||this.swipe.start(e)&&e.currentTarget?.setPointerCapture?.(e.pointerId))}onSimplePointerMove(e){this.swipe.move(e)==="horizontal"&&e.preventDefault()}onSimplePointerUp(e){const a=this.swipe.end(e,this.isRtl());a&&(a==="next"?this.next():this.prev())}onSimplePointerCancel(e){this.swipe.cancel(e)}onTrackPointerDown(e){if(this.isSimple())return;const a=this.track()?.nativeElement;!a||!this.showControls()||e.pointerType==="mouse"&&e.button!==0||ns(e.target)||(this.drag={id:e.pointerId,x:e.clientX,scroll:a.scrollLeft,moved:!1},a.setPointerCapture(e.pointerId))}onTrackPointerMove(e){if(!this.drag||e.pointerId!==this.drag.id)return;const a=this.track()?.nativeElement;if(!a)return;const s=e.clientX-this.drag.x;!this.drag.moved&&Math.abs(s)>8&&(this.drag.moved=!0,a.classList.add("is-dragging")),this.drag.moved&&(e.preventDefault(),a.scrollLeft=this.drag.scroll-s)}onTrackPointerUp(e){if(!this.drag||e.pointerId!==this.drag.id)return;const a=this.track()?.nativeElement,s=this.drag.moved;if(this.drag=null,!a||(a.classList.remove("is-dragging"),!s))return;const r=l=>{l.preventDefault(),l.stopPropagation()};a.addEventListener("click",r,{capture:!0,once:!0}),this.onTrackScroll(),this.scrollToPage(this.pageIndex())}refreshMetrics(){if(this.isSimple())return;const e=this.resolvePerView();this.perView.set(e);const a=this.projected(),s=this.track()?.nativeElement,r=a.length?a.length:s?s.children.length:0;this.slideCount.set(r);const l=Math.max(0,Math.ceil(r/Math.max(1,e))-1);this.pageIndex()>l&&this.pageIndex.set(l)}resolvePerView(){return typeof window>"u"?this.slidesMin():window.matchMedia("(min-width: 1024px)").matches?this.slidesMax():window.matchMedia("(min-width: 640px)").matches?this.slidesMid():this.slidesMin()}pageScrollAmount(e){const a=Math.max(1,this.perView()),s=this.gap(),r=this.peek();return((e.clientWidth-r-s*(a-1))/a+s)*a}scrollToPage(e){const a=this.track()?.nativeElement;if(!a)return;const s=this.pageScrollAmount(a)*e,r=this.isRtl();a.scrollTo({left:r?-s:s,behavior:"smooth"})}isRtl(){const e=this.host.nativeElement.getAttribute("dir")||this.host.nativeElement.closest("[dir]")?.getAttribute("dir");return e?e.toLowerCase()==="rtl":Xa()}normalizedScrollLeft(e){return this.isRtl()?Math.abs(Math.min(0,e.scrollLeft)):e.scrollLeft}onKeydown(e){if(this.isSimple()){e.key==="ArrowRight"||e.key==="ArrowUp"?(e.preventDefault(),this.prev()):e.key==="ArrowLeft"||e.key==="ArrowDown"?(e.preventDefault(),this.next()):e.key==="Home"?(e.preventDefault(),this.go(0)):e.key==="End"&&(e.preventDefault(),this.go(this.slides().length-1));return}const a=this.isRtl();e.key==="ArrowRight"?(e.preventDefault(),a?this.nextPage():this.prevPage()):e.key==="ArrowLeft"?(e.preventDefault(),a?this.prevPage():this.nextPage()):e.key==="Home"?(e.preventDefault(),this.goPage(0)):e.key==="End"&&(e.preventDefault(),this.goPage(this.pages().length-1))}static ɵfac=t.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"22.1.5",ngImport:t,type:Ba,deps:[],target:t.ɵɵFactoryTarget.Component});static ɵcmp=t.ɵɵngDeclareComponent({minVersion:"17.0.0",version:"22.1.5",type:Ba,isStandalone:!0,selector:"dga-carousel",inputs:{slides:{classPropertyName:"slides",publicName:"slides",isSignal:!0,isRequired:!1,transformFunction:null},index:{classPropertyName:"index",publicName:"index",isSignal:!0,isRequired:!1,transformFunction:null},slidesMax:{classPropertyName:"slidesMax",publicName:"slidesMax",isSignal:!0,isRequired:!1,transformFunction:null},slidesMid:{classPropertyName:"slidesMid",publicName:"slidesMid",isSignal:!0,isRequired:!1,transformFunction:null},slidesMin:{classPropertyName:"slidesMin",publicName:"slidesMin",isSignal:!0,isRequired:!1,transformFunction:null},peek:{classPropertyName:"peek",publicName:"peek",isSignal:!0,isRequired:!1,transformFunction:null},gap:{classPropertyName:"gap",publicName:"gap",isSignal:!0,isRequired:!1,transformFunction:null},label:{classPropertyName:"label",publicName:"label",isSignal:!0,isRequired:!1,transformFunction:null},prevLabel:{classPropertyName:"prevLabel",publicName:"prevLabel",isSignal:!0,isRequired:!1,transformFunction:null},nextLabel:{classPropertyName:"nextLabel",publicName:"nextLabel",isSignal:!0,isRequired:!1,transformFunction:null},dotsLabel:{classPropertyName:"dotsLabel",publicName:"dotsLabel",isSignal:!0,isRequired:!1,transformFunction:null},emptyLabel:{classPropertyName:"emptyLabel",publicName:"emptyLabel",isSignal:!0,isRequired:!1,transformFunction:null}},outputs:{index:"indexChange"},host:{attributes:{tabindex:"0",role:"region"},listeners:{keydown:"onKeydown($event)"},properties:{"attr.aria-label":"resolvedLabel()","attr.data-index":"index()","attr.data-page":"pageIndex()","attr.data-mode":'isSimple() ? "simple" : "multi"',"style.--dga-carousel-slides":"perView()","style.--dga-carousel-peek.px":"peek()","style.--dga-carousel-gap.px":"gap()"},classAttribute:"block w-full outline-none"},queries:[{propertyName:"projected",predicate:Se,read:F,isSignal:!0}],viewQueries:[{propertyName:"track",first:!0,predicate:["track"],descendants:!0,isSignal:!0}],ngImport:t,template:`
|
|
11841
11859
|
@if (isSimple()) {
|
|
11842
11860
|
<div
|
|
11843
11861
|
class="relative overflow-hidden rounded-md border border-border bg-surface touch-pan-y"
|
|
@@ -12103,4 +12121,4 @@ import{DOCUMENT as ja,NgOptimizedImage as U,NgTemplateOutlet as ae,APP_BASE_HREF
|
|
|
12103
12121
|
}
|
|
12104
12122
|
</div>
|
|
12105
12123
|
}
|
|
12106
|
-
`,changeDetection:h.OnPush,host:{class:"block w-full outline-none",tabindex:"0",role:"region","[attr.aria-label]":"resolvedLabel()","[attr.data-index]":"index()","[attr.data-page]":"pageIndex()","[attr.data-mode]":'isSimple() ? "simple" : "multi"',"[style.--dga-carousel-slides]":"perView()","[style.--dga-carousel-peek.px]":"peek()","[style.--dga-carousel-gap.px]":"gap()"},styles:[":host{display:block;width:100%}.dga-carousel-track{gap:var(--dga-carousel-gap, 16px);scroll-snap-type:x mandatory;scroll-padding-inline:0;touch-action:pan-y;cursor:grab;overscroll-behavior-x:contain}.dga-carousel-track.is-dragging{cursor:grabbing;scroll-snap-type:none;scroll-behavior:auto;-webkit-user-select:none;user-select:none}:host-context([dir=\"rtl\"]) .dga-carousel-nav-btn dga-icon{transform:rotate(180deg)}\n"]}]}],ctorParameters:()=>[],propDecorators:{track:[{type:t.ViewChild,args:["track",{isSignal:!0}]}],projected:[{type:t.ContentChildren,args:[t.forwardRef(()=>Se),{read:F,isSignal:!0}]}],slides:[{type:t.Input,args:[{isSignal:!0,alias:"slides",required:!1}]}],index:[{type:t.Input,args:[{isSignal:!0,alias:"index",required:!1}]},{type:t.Output,args:["indexChange"]}],slidesMax:[{type:t.Input,args:[{isSignal:!0,alias:"slidesMax",required:!1}]}],slidesMid:[{type:t.Input,args:[{isSignal:!0,alias:"slidesMid",required:!1}]}],slidesMin:[{type:t.Input,args:[{isSignal:!0,alias:"slidesMin",required:!1}]}],peek:[{type:t.Input,args:[{isSignal:!0,alias:"peek",required:!1}]}],gap:[{type:t.Input,args:[{isSignal:!0,alias:"gap",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],prevLabel:[{type:t.Input,args:[{isSignal:!0,alias:"prevLabel",required:!1}]}],nextLabel:[{type:t.Input,args:[{isSignal:!0,alias:"nextLabel",required:!1}]}],dotsLabel:[{type:t.Input,args:[{isSignal:!0,alias:"dotsLabel",required:!1}]}],emptyLabel:[{type:t.Input,args:[{isSignal:!0,alias:"emptyLabel",required:!1}]}],onKeydown:[{type:
|
|
12124
|
+
`,changeDetection:h.OnPush,host:{class:"block w-full outline-none",tabindex:"0",role:"region","[attr.aria-label]":"resolvedLabel()","[attr.data-index]":"index()","[attr.data-page]":"pageIndex()","[attr.data-mode]":'isSimple() ? "simple" : "multi"',"[style.--dga-carousel-slides]":"perView()","[style.--dga-carousel-peek.px]":"peek()","[style.--dga-carousel-gap.px]":"gap()"},styles:[":host{display:block;width:100%}.dga-carousel-track{gap:var(--dga-carousel-gap, 16px);scroll-snap-type:x mandatory;scroll-padding-inline:0;touch-action:pan-y;cursor:grab;overscroll-behavior-x:contain}.dga-carousel-track.is-dragging{cursor:grabbing;scroll-snap-type:none;scroll-behavior:auto;-webkit-user-select:none;user-select:none}:host-context([dir=\"rtl\"]) .dga-carousel-nav-btn dga-icon{transform:rotate(180deg)}\n"]}]}],ctorParameters:()=>[],propDecorators:{track:[{type:t.ViewChild,args:["track",{isSignal:!0}]}],projected:[{type:t.ContentChildren,args:[t.forwardRef(()=>Se),{read:F,isSignal:!0}]}],slides:[{type:t.Input,args:[{isSignal:!0,alias:"slides",required:!1}]}],index:[{type:t.Input,args:[{isSignal:!0,alias:"index",required:!1}]},{type:t.Output,args:["indexChange"]}],slidesMax:[{type:t.Input,args:[{isSignal:!0,alias:"slidesMax",required:!1}]}],slidesMid:[{type:t.Input,args:[{isSignal:!0,alias:"slidesMid",required:!1}]}],slidesMin:[{type:t.Input,args:[{isSignal:!0,alias:"slidesMin",required:!1}]}],peek:[{type:t.Input,args:[{isSignal:!0,alias:"peek",required:!1}]}],gap:[{type:t.Input,args:[{isSignal:!0,alias:"gap",required:!1}]}],label:[{type:t.Input,args:[{isSignal:!0,alias:"label",required:!1}]}],prevLabel:[{type:t.Input,args:[{isSignal:!0,alias:"prevLabel",required:!1}]}],nextLabel:[{type:t.Input,args:[{isSignal:!0,alias:"nextLabel",required:!1}]}],dotsLabel:[{type:t.Input,args:[{isSignal:!0,alias:"dotsLabel",required:!1}]}],emptyLabel:[{type:t.Input,args:[{isSignal:!0,alias:"emptyLabel",required:!1}]}],onKeydown:[{type:O,args:["keydown",["$event"]]}]}});const Ll=/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Pl=/^rgba?\(\s*[\d.]+\s*(?:,\s*[\d.]+%?\s*){2,3}\)$/i,zl=/^hsla?\(\s*[\d.]+\s*(?:,\s*[\d.]+%?\s*){2,3}\)$/i,Fl=/^var\(\s*--[a-z0-9-]+\s*(?:,\s*[^)]+)?\)$/i,Rl=/^[a-z][a-z0-9-]*$/i;function Tl(d,e="currentColor"){if(d==null)return e;const a=String(d).trim();return!a||a.length>128||/url\s*\(|expression\s*\(|javascript:/i.test(a)?e:Ll.test(a)||Pl.test(a)||zl.test(a)||Fl.test(a)||Rl.test(a)?a:e}export{Si as DGA_GREGORIAN_MONTHS,Ni as DGA_HIJRI_MONTHS,vt as DGA_IBAN_COUNTRY,nt as DGA_IBAN_LENGTH,or as DGA_ICON_NAMES,rs as DGA_ICON_OVERRIDES,ks as DGA_LOGICAL_ICON_NAMES,Ts as DGA_PHONE_COUNTRIES,li as DGA_RIYAL_SVG_PATH,oi as DGA_RIYAL_VIEWBOX,wl as DGA_WEEKDAYS,be as DgaAccordion,fe as DgaAccordionItem,$e as DgaAlert,fa as DgaAnnouncementBar,ca as DgaAppShell,ba as DgaAuthCard,Lt as DgaAutocomplete,Fe as DgaAvatar,le as DgaBadge,Pa as DgaBarcode,$t as DgaBottomSheet,Ie as DgaBreadcrumb,D as DgaButton,He as DgaCard,ke as DgaCardDef,ra as DgaCardMedia,Ba as DgaCarousel,Se as DgaCarouselSlideDirective,ye as DgaCellDef,ee as DgaCheckbox,Q as DgaChip,Ge as DgaChipInput,Mt as DgaChoiceGroup,oa as DgaClamp,Sa as DgaCode,Et as DgaCommand,Rt as DgaConfirm,mt as DgaContentSwitcher,ve as DgaContentSwitcherPanel,Vt as DgaContextMenu,At as DgaContextMenuTrigger,ge as DgaCopy,Ia as DgaDescriptionList,te as DgaDialog,xt as DgaDivider,Ee as DgaDrawer,ea as DgaDualNav,pe as DgaEmpty,Oa as DgaEventCalendar,xe as DgaExpandDef,da as DgaExpandable,ft as DgaExport,$a as DgaExportToolbar,Ta as DgaFaq,ut as DgaFeedback,_t as DgaField,Ht as DgaFilePreview,aa as DgaFilterBar,pa as DgaFooter,Dt as DgaFormControl,Ct as DgaFormEnd,St as DgaFormStart,la as DgaGrid,ga as DgaHero,Xe as DgaIbanInput,k as DgaIcon,Re as DgaIconBadge,dt as DgaIconFontService,ct as DgaIconRegistry,jt as DgaImagePopup,Ma as DgaInfoList,ce as DgaInput,oe as DgaKbd,de as DgaKbdGroup,It as DgaLabel,Y as DgaLink,Da as DgaList,wa as DgaLocaleToggle,ya as DgaLogoTile,za as DgaMapEmbed,Ve as DgaMenu,Fa as DgaMetric,Tt as DgaModal,Pt as DgaMultiselect,Ze as DgaNationalId,Oe as DgaNativeSelect,ta as DgaNavRail,Xt as DgaNotificationInbox,qa as DgaNumber,Ye as DgaNumberInput,Ut as DgaOffline,Ue as DgaOtp,pt as DgaPageFeedback,ma as DgaPageHero,je as DgaPagination,Je as DgaPassword,ka as DgaPersona,et as DgaPhoneInput,Bt as DgaPopover,va as DgaPreloader,Yt as DgaPrint,Nt as DgaProgress,La as DgaQr,Na as DgaQuote,Te as DgaRadio,Be as DgaRating,Ft as DgaRichText,Ke as DgaRiyal,we as DgaRowActionsDef,ia as DgaScrollTop,at as DgaSearchBar,na as DgaSection,j as DgaSelect,Wt as DgaShare,ha as DgaSideInfo,Qt as DgaSideNav,tt as DgaSignaturePad,kt as DgaSkeleton,Gt as DgaSkipLink,qt as DgaSlider,wt as DgaSpinner,Ra as DgaStatStrip,Zt as DgaStepper,We as DgaSwitch,he as DgaTab,Aa as DgaTable,Va as DgaTableColumnPicker,gt as DgaTabs,xa as DgaThemeToggle,zt as DgaTimePicker,_a as DgaTimeline,Ae as DgaToast,Ot as DgaToastOutlet,ue as DgaToastService,Jt as DgaToc,sa as DgaToolbar,E as DgaTooltip,ua as DgaTopBar,Kt as DgaTour,Ce as DgaTree,De as DgaTreeSelect,Qe as DgaUpload,Ca as DgaVideoPlayer,Ne as DgaVirtualItem,Ea as DgaVirtualList,yt as DgaWriting,Di as dgaAddMonths,Dl as dgaClampDate,Il as dgaCoerceDate,us as dgaCompareDays,Ua as dgaCurrentLocale,f as dgaCx,cs as dgaDaysInMonth,Ws as dgaDetectFilePreviewKind,hi as dgaEncodeBarcode,di as dgaEncodeQr,_s as dgaFilterTree,rt as dgaFindTreeItem,Ds as dgaFlattenTree,X as dgaFormStatusFromInvalid,Sl as dgaFormatDate,qs as dgaFormatIban,Fs as dgaFormatNationalId,W as dgaGetCalendarParts,wi as dgaIsAllowedMapEmbedUrl,q as dgaIsArabic,Xa as dgaIsRtl,Ls as dgaIsValidIban,zs as dgaIsValidNationalId,Nl as dgaModeFromFormat,_i as dgaMonthNames,qi as dgaMonthStartWeekday,Ps as dgaNationalIdKind,qe as dgaNormalizeIban,lt as dgaNormalizeNationalId,Ja as dgaNormalizeTime,Ii as dgaParseDate,ot as dgaPartsToDate,Rs as dgaPasswordStrength,P as dgaProvideValueAccessor,Us as dgaResolveAppHref,xs as dgaResolveLocalized,ni as dgaResolveVideoSource,Tl as dgaSafeCssColor,K as dgaSafeHref,Cl as dgaSameDay,es as dgaTodayUtc,Ms as dgaTreeAncestors,$ as dgaUiLocale,Is as dgaVisibleTreeNodes,dr as provideDgaIcons};
|