import { p as proxyCustomElement, H, h } from './p-BhqVmlhr.js';
import { g as guid } from './p-DEtoWGOc.js';
import { i as isValidDate, f as formatDate, d as defineCustomElement$7 } from './p-Cj35z9hD.js';
import { d as defineCustomElement$9 } from './p-BfkakbtL.js';
import { d as defineCustomElement$8 } from './p-Bu11LCUv.js';
import { d as defineCustomElement$6 } from './p-Bw2J9lll.js';
import { d as defineCustomElement$5 } from './p-DiC-xcof.js';
import { d as defineCustomElement$4 } from './p-Cv0O724A.js';
import { d as defineCustomElement$3 } from './p-4rdrCxSX.js';
import { d as defineCustomElement$2 } from './p-V_F6lX0v.js';
import { d as defineCustomElement$1 } from './p-B_lMJn5K.js';

const dgaDateFieldCss = "@import url(\"https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&display=swap\"); html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}:focus{outline:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:\"\";content:none}table{border-collapse:collapse;border-spacing:0}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{-webkit-appearance:none;-moz-appearance:none}input[type=search]{-webkit-appearance:none;-moz-appearance:none;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}textarea{overflow:auto;vertical-align:top;resize:vertical}audio,canvas,video{display:inline-block;zoom:1;max-width:100%}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}a:active,a:hover{outline:0}img{border:0;-ms-interpolation-mode:bicubic;}figure{margin:0}form{margin:0}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0;white-space:normal;*margin-left:-7px;}button,input,select,textarea{font-size:100%;margin:0;vertical-align:baseline;*vertical-align:middle;}button,input{line-height:normal}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer;*overflow:visible;}button[disabled],html input[disabled]{cursor:default}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0;*height:13px;*width:13px;}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0}html,button,input,select,textarea{color:#222}::-moz-selection{background:#b3d4fc;text-shadow:none}::selection{background:#b3d4fc;text-shadow:none}img{vertical-align:middle}fieldset{border:0;margin:0;padding:0}textarea{resize:vertical}.chromeframe{margin:0.2em 0;background:#ccc;color:#000;padding:0.2em 0}/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}*{box-sizing:border-box}body{margin:0}main{display:block}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0;}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px;}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}@font-face{font-family:\"IBMPlexSansArabic\";src:url(\"/assets/fonts/IBM-Plex-Sans-Arabic/IBMPlexSansArabic-Regular.woff2\") format(\"woff2\"), url(\"/assets/fonts/IBM-Plex-Sans-Arabic/IBMPlexSansArabic-Regular.woff\") format(\"woff\");font-weight:400;font-style:normal}@font-face{font-family:\"IBMPlexSansArabic\";src:url(\"/assets/fonts/IBM-Plex-Sans-Arabic/IBMPlexSansArabic-Medium.woff2\") format(\"woff2\"), url(\"/assets/fonts/IBM-Plex-Sans-Arabic/IBMPlexSansArabic-Medium.woff\") format(\"woff\");font-weight:500;font-style:normal}@font-face{font-family:\"IBMPlexSansArabic\";src:url(\"/assets/fonts/IBM-Plex-Sans-Arabic/IBMPlexSansArabic-SemiBold.woff2\") format(\"woff2\"), url(\"/assets/fonts/IBM-Plex-Sans-Arabic/IBMPlexSansArabic-SemiBold.woff\") format(\"woff\");font-weight:600;font-style:normal}@font-face{font-family:\"IBMPlexSansArabic\";src:url(\"/assets/fonts/IBM-Plex-Sans-Arabic/IBMPlexSansArabic-Bold.woff2\") format(\"woff2\"), url(\"/assets/fonts/IBM-Plex-Sans-Arabic/IBMPlexSansArabic-Bold.woff\") format(\"woff\");font-weight:700;font-style:normal;font-display:auto}body{font-family:\"IBMPlexSansArabic\"}a,a:active,a:focus{color:inherit;text-decoration:none}.display-2xl-regular{font:400 72px/90px \"IBMPlexSansArabic\"}.display-xl-regular{font:400 60px/72px \"IBMPlexSansArabic\"}.display-lg-regular{font:400 48px/60px \"IBMPlexSansArabic\"}.display-md-regular{font:400 36px/44px \"IBMPlexSansArabic\"}.display-sm-regular{font:400 30px/38px \"IBMPlexSansArabic\"}.display-xs-regular{font:400 24px/32px \"IBMPlexSansArabic\"}.text-xl-regular{font:400 20px/30px \"IBMPlexSansArabic\"}.text-lg-regular{font:400 18px/28px \"IBMPlexSansArabic\"}.text-md-regular,.input--lg .input__prefix-label,.input--lg .input__suffix-label,.input__prefix-label,.input__prefix-icon,.input__prefix-chevron,.input__suffix-label,.input__suffix-icon,.input__suffix-chevron,.input__field::placeholder,.input__field{font:400 16px/24px \"IBMPlexSansArabic\"}.text-sm-regular,.breadcrumb-dropdown-item,.input--md .input__prefix-label,.input--md .input__suffix-label,.input--md .input__field,.input--md .input__field::placeholder,.input--lg .input__field,.input--lg .input__field::placeholder,.input__prefix .dropdown__label--selection,.input__suffix .dropdown__label--selection,.dga-form-control>.dga-label{font:400 14px/20px \"IBMPlexSansArabic\"}.text-xs-regular{font:400 12px/18px \"IBMPlexSansArabic\"}.text-2xs-regular{font:400 10px/14px \"IBMPlexSansArabic\"}.display-2xl-medium{font:500 72px/90px \"IBMPlexSansArabic\"}.display-xl-medium{font:500 60px/72px \"IBMPlexSansArabic\"}.display-lg-medium{font:500 48px/60px \"IBMPlexSansArabic\"}.display-md-medium{font:500 36px/44px \"IBMPlexSansArabic\"}.display-sm-medium{font:500 30px/38px \"IBMPlexSansArabic\"}.display-xs-medium{font:500 24px/32px \"IBMPlexSansArabic\"}.text-xl-medium{font:500 20px/30px \"IBMPlexSansArabic\"}.text-lg-medium{font:500 18px/28px \"IBMPlexSansArabic\"}.text-md-medium{font:500 16px/24px \"IBMPlexSansArabic\"}.text-sm-medium{font:500 14px/20px \"IBMPlexSansArabic\"}.text-xs-medium{font:500 12px/18px \"IBMPlexSansArabic\"}.text-2xs-medium{font:500 10px/14px \"IBMPlexSansArabic\"}.display-2xl-semibold{font:600 72px/90px \"IBMPlexSansArabic\"}.display-xl-semibold{font:600 60px/72px \"IBMPlexSansArabic\"}.display-lg-semibold{font:600 48px/60px \"IBMPlexSansArabic\"}.display-md-semibold{font:600 36px/44px \"IBMPlexSansArabic\"}.display-sm-semibold{font:600 30px/38px \"IBMPlexSansArabic\"}.display-xs-semibold{font:600 24px/32px \"IBMPlexSansArabic\"}.text-xl-semibold{font:600 20px/30px \"IBMPlexSansArabic\"}.text-lg-semibold{font:600 18px/28px \"IBMPlexSansArabic\"}.text-md-semibold{font:600 16px/24px \"IBMPlexSansArabic\"}.text-sm-semibold{font:600 14px/20px \"IBMPlexSansArabic\"}.text-xs-semibold{font:600 12px/18px \"IBMPlexSansArabic\"}.text-2xs-semibold{font:600 10px/14px \"IBMPlexSansArabic\"}.display-2xl-bold{font:700 72px/90px \"IBMPlexSansArabic\"}.display-xl-bold{font:700 60px/72px \"IBMPlexSansArabic\"}.display-lg-bold{font:700 48px/60px \"IBMPlexSansArabic\"}.display-md-bold{font:700 36px/44px \"IBMPlexSansArabic\"}.display-sm-bold{font:700 30px/38px \"IBMPlexSansArabic\"}.display-xs-bold{font:700 24px/32px \"IBMPlexSansArabic\"}.text-xl-bold{font:700 20px/30px \"IBMPlexSansArabic\"}.text-lg-bold{font:700 18px/28px \"IBMPlexSansArabic\"}.text-md-bold{font:700 16px/24px \"IBMPlexSansArabic\"}.text-sm-bold{font:700 14px/20px \"IBMPlexSansArabic\"}.text-xs-bold{font:700 12px/18px \"IBMPlexSansArabic\"}.text-2xs-bold{font:700 10px/14px \"IBMPlexSansArabic\"}.dga-spacing-hor-0{height:0px}.dga-spacing-vert-0{width:0px}.dga-p-0{padding:0px}.dga-px-0{padding-inline:0px}.dga-py-0{padding-block:0px}.dga-pl-0{padding-left:0px}.dga-pr-0{padding-right:0px}.dga-pt-0{padding-top:0px}.dga-pb-0{padding-bottom:0px}.dga-mx-0{margin-inline:0px}.dga-my-0{margin-block:0px}.dga-ml-0{margin-left:0px}.dga-mr-0{margin-right:0px}.dga-mt-0{margin-top:0px}.dga-mb-0{margin-bottom:0px}.dga-spacing-hor-2{height:8px}.dga-spacing-vert-2{width:8px}.dga-p-2{padding:8px}.dga-px-2{padding-inline:8px}.dga-py-2{padding-block:8px}.dga-pl-2{padding-left:8px}.dga-pr-2{padding-right:8px}.dga-pt-2{padding-top:8px}.dga-pb-2{padding-bottom:8px}.dga-mx-2{margin-inline:8px}.dga-my-2{margin-block:8px}.dga-ml-2{margin-left:8px}.dga-mr-2{margin-right:8px}.dga-mt-2{margin-top:8px}.dga-mb-2{margin-bottom:8px}.dga-spacing-hor-4{height:16px}.dga-spacing-vert-4{width:16px}.dga-p-4{padding:16px}.dga-px-4{padding-inline:16px}.dga-py-4{padding-block:16px}.dga-pl-4{padding-left:16px}.dga-pr-4{padding-right:16px}.dga-pt-4{padding-top:16px}.dga-pb-4{padding-bottom:16px}.dga-mx-4{margin-inline:16px}.dga-my-4{margin-block:16px}.dga-ml-4{margin-left:16px}.dga-mr-4{margin-right:16px}.dga-mt-4{margin-top:16px}.dga-mb-4{margin-bottom:16px}.dga-spacing-hor-8{height:32px}.dga-spacing-vert-8{width:32px}.dga-p-8{padding:32px}.dga-px-8{padding-inline:32px}.dga-py-8{padding-block:32px}.dga-pl-8{padding-left:32px}.dga-pr-8{padding-right:32px}.dga-pt-8{padding-top:32px}.dga-pb-8{padding-bottom:32px}.dga-mx-8{margin-inline:32px}.dga-my-8{margin-block:32px}.dga-ml-8{margin-left:32px}.dga-mr-8{margin-right:32px}.dga-mt-8{margin-top:32px}.dga-mb-8{margin-bottom:32px}.dga-spacing-hor-12{height:48px}.dga-spacing-vert-12{width:48px}.dga-p-12{padding:48px}.dga-px-12{padding-inline:48px}.dga-py-12{padding-block:48px}.dga-pl-12{padding-left:48px}.dga-pr-12{padding-right:48px}.dga-pt-12{padding-top:48px}.dga-pb-12{padding-bottom:48px}.dga-mx-12{margin-inline:48px}.dga-my-12{margin-block:48px}.dga-ml-12{margin-left:48px}.dga-mr-12{margin-right:48px}.dga-mt-12{margin-top:48px}.dga-mb-12{margin-bottom:48px}.dga-spacing-hor-16{height:64px}.dga-spacing-vert-16{width:64px}.dga-p-16{padding:64px}.dga-px-16{padding-inline:64px}.dga-py-16{padding-block:64px}.dga-pl-16{padding-left:64px}.dga-pr-16{padding-right:64px}.dga-pt-16{padding-top:64px}.dga-pb-16{padding-bottom:64px}.dga-mx-16{margin-inline:64px}.dga-my-16{margin-block:64px}.dga-ml-16{margin-left:64px}.dga-mr-16{margin-right:64px}.dga-mt-16{margin-top:64px}.dga-mb-16{margin-bottom:64px}.dga-spacing-hor-24{height:96px}.dga-spacing-vert-24{width:96px}.dga-p-24{padding:96px}.dga-px-24{padding-inline:96px}.dga-py-24{padding-block:96px}.dga-pl-24{padding-left:96px}.dga-pr-24{padding-right:96px}.dga-pt-24{padding-top:96px}.dga-pb-24{padding-bottom:96px}.dga-mx-24{margin-inline:96px}.dga-my-24{margin-block:96px}.dga-ml-24{margin-left:96px}.dga-mr-24{margin-right:96px}.dga-mt-24{margin-top:96px}.dga-mb-24{margin-bottom:96px}.dga-spacing-hor-32{height:128px}.dga-spacing-vert-32{width:128px}.dga-p-32{padding:128px}.dga-px-32{padding-inline:128px}.dga-py-32{padding-block:128px}.dga-pl-32{padding-left:128px}.dga-pr-32{padding-right:128px}.dga-pt-32{padding-top:128px}.dga-pb-32{padding-bottom:128px}.dga-mx-32{margin-inline:128px}.dga-my-32{margin-block:128px}.dga-ml-32{margin-left:128px}.dga-mr-32{margin-right:128px}.dga-mt-32{margin-top:128px}.dga-mb-32{margin-bottom:128px}.dga-spacing-hor-40{height:160px}.dga-spacing-vert-40{width:160px}.dga-p-40{padding:160px}.dga-px-40{padding-inline:160px}.dga-py-40{padding-block:160px}.dga-pl-40{padding-left:160px}.dga-pr-40{padding-right:160px}.dga-pt-40{padding-top:160px}.dga-pb-40{padding-bottom:160px}.dga-mx-40{margin-inline:160px}.dga-my-40{margin-block:160px}.dga-ml-40{margin-left:160px}.dga-mr-40{margin-right:160px}.dga-mt-40{margin-top:160px}.dga-mb-40{margin-bottom:160px}.dga-spacing-hor-48{height:192px}.dga-spacing-vert-48{width:192px}.dga-p-48{padding:192px}.dga-px-48{padding-inline:192px}.dga-py-48{padding-block:192px}.dga-pl-48{padding-left:192px}.dga-pr-48{padding-right:192px}.dga-pt-48{padding-top:192px}.dga-pb-48{padding-bottom:192px}.dga-mx-48{margin-inline:192px}.dga-my-48{margin-block:192px}.dga-ml-48{margin-left:192px}.dga-mr-48{margin-right:192px}.dga-mt-48{margin-top:192px}.dga-mb-48{margin-bottom:192px}.dga-spacing-hor-56{height:224px}.dga-spacing-vert-56{width:224px}.dga-p-56{padding:224px}.dga-px-56{padding-inline:224px}.dga-py-56{padding-block:224px}.dga-pl-56{padding-left:224px}.dga-pr-56{padding-right:224px}.dga-pt-56{padding-top:224px}.dga-pb-56{padding-bottom:224px}.dga-mx-56{margin-inline:224px}.dga-my-56{margin-block:224px}.dga-ml-56{margin-left:224px}.dga-mr-56{margin-right:224px}.dga-mt-56{margin-top:224px}.dga-mb-56{margin-bottom:224px}.dga-spacing-hor-64{height:256px}.dga-spacing-vert-64{width:256px}.dga-p-64{padding:256px}.dga-px-64{padding-inline:256px}.dga-py-64{padding-block:256px}.dga-pl-64{padding-left:256px}.dga-pr-64{padding-right:256px}.dga-pt-64{padding-top:256px}.dga-pb-64{padding-bottom:256px}.dga-mx-64{margin-inline:256px}.dga-my-64{margin-block:256px}.dga-ml-64{margin-left:256px}.dga-mr-64{margin-right:256px}.dga-mt-64{margin-top:256px}.dga-mb-64{margin-bottom:256px}.dga-spacing-hor-72{height:288px}.dga-spacing-vert-72{width:288px}.dga-p-72{padding:288px}.dga-px-72{padding-inline:288px}.dga-py-72{padding-block:288px}.dga-pl-72{padding-left:288px}.dga-pr-72{padding-right:288px}.dga-pt-72{padding-top:288px}.dga-pb-72{padding-bottom:288px}.dga-mx-72{margin-inline:288px}.dga-my-72{margin-block:288px}.dga-ml-72{margin-left:288px}.dga-mr-72{margin-right:288px}.dga-mt-72{margin-top:288px}.dga-mb-72{margin-bottom:288px}.dga-spacing-hor-80{height:320px}.dga-spacing-vert-80{width:320px}.dga-p-80{padding:320px}.dga-px-80{padding-inline:320px}.dga-py-80{padding-block:320px}.dga-pl-80{padding-left:320px}.dga-pr-80{padding-right:320px}.dga-pt-80{padding-top:320px}.dga-pb-80{padding-bottom:320px}.dga-mx-80{margin-inline:320px}.dga-my-80{margin-block:320px}.dga-ml-80{margin-left:320px}.dga-mr-80{margin-right:320px}.dga-mt-80{margin-top:320px}.dga-mb-80{margin-bottom:320px}.dga-spacing-hor-88{height:352px}.dga-spacing-vert-88{width:352px}.dga-p-88{padding:352px}.dga-px-88{padding-inline:352px}.dga-py-88{padding-block:352px}.dga-pl-88{padding-left:352px}.dga-pr-88{padding-right:352px}.dga-pt-88{padding-top:352px}.dga-pb-88{padding-bottom:352px}.dga-mx-88{margin-inline:352px}.dga-my-88{margin-block:352px}.dga-ml-88{margin-left:352px}.dga-mr-88{margin-right:352px}.dga-mt-88{margin-top:352px}.dga-mb-88{margin-bottom:352px}.dga-spacing-hor-96{height:384px}.dga-spacing-vert-96{width:384px}.dga-p-96{padding:384px}.dga-px-96{padding-inline:384px}.dga-py-96{padding-block:384px}.dga-pl-96{padding-left:384px}.dga-pr-96{padding-right:384px}.dga-pt-96{padding-top:384px}.dga-pb-96{padding-bottom:384px}.dga-mx-96{margin-inline:384px}.dga-my-96{margin-block:384px}.dga-ml-96{margin-left:384px}.dga-mr-96{margin-right:384px}.dga-mt-96{margin-top:384px}.dga-mb-96{margin-bottom:384px}.dga-spacing-hor-104{height:416px}.dga-spacing-vert-104{width:416px}.dga-p-104{padding:416px}.dga-px-104{padding-inline:416px}.dga-py-104{padding-block:416px}.dga-pl-104{padding-left:416px}.dga-pr-104{padding-right:416px}.dga-pt-104{padding-top:416px}.dga-pb-104{padding-bottom:416px}.dga-mx-104{margin-inline:416px}.dga-my-104{margin-block:416px}.dga-ml-104{margin-left:416px}.dga-mr-104{margin-right:416px}.dga-mt-104{margin-top:416px}.dga-mb-104{margin-bottom:416px}.dga-spacing-hor-112{height:448px}.dga-spacing-vert-112{width:448px}.dga-p-112{padding:448px}.dga-px-112{padding-inline:448px}.dga-py-112{padding-block:448px}.dga-pl-112{padding-left:448px}.dga-pr-112{padding-right:448px}.dga-pt-112{padding-top:448px}.dga-pb-112{padding-bottom:448px}.dga-mx-112{margin-inline:448px}.dga-my-112{margin-block:448px}.dga-ml-112{margin-left:448px}.dga-mr-112{margin-right:448px}.dga-mt-112{margin-top:448px}.dga-mb-112{margin-bottom:448px}.dga-spacing-hor-120{height:480px}.dga-spacing-vert-120{width:480px}.dga-p-120{padding:480px}.dga-px-120{padding-inline:480px}.dga-py-120{padding-block:480px}.dga-pl-120{padding-left:480px}.dga-pr-120{padding-right:480px}.dga-pt-120{padding-top:480px}.dga-pb-120{padding-bottom:480px}.dga-mx-120{margin-inline:480px}.dga-my-120{margin-block:480px}.dga-ml-120{margin-left:480px}.dga-mr-120{margin-right:480px}.dga-mt-120{margin-top:480px}.dga-mb-120{margin-bottom:480px}.dga-radius-small{border-radius:2px}.dga-radius-small-t{border-radius:2px 2px 0 0}.dga-radius-small-tl{border-radius:2px 0px 0 0}.dga-radius-small-tr{border-radius:0px 2px 0 0}.dga-radius-small-b{border-radius:0 0 2px 2px}.dga-radius-small-bl{border-radius:0 0 2px 0px}.dga-radius-small-br{border-radius:0 0 0px 2px}.dga-radius-medium{border-radius:4px}.dga-radius-medium-t{border-radius:4px 4px 0 0}.dga-radius-medium-tl{border-radius:4px 0px 0 0}.dga-radius-medium-tr{border-radius:0px 4px 0 0}.dga-radius-medium-b{border-radius:0 0 4px 4px}.dga-radius-medium-bl{border-radius:0 0 4px 0px}.dga-radius-medium-br{border-radius:0 0 0px 4px}.dga-radius-large{border-radius:8px}.dga-radius-large-t{border-radius:8px 8px 0 0}.dga-radius-large-tl{border-radius:8px 0px 0 0}.dga-radius-large-tr{border-radius:0px 8px 0 0}.dga-radius-large-b{border-radius:0 0 8px 8px}.dga-radius-large-bl{border-radius:0 0 8px 0px}.dga-radius-large-br{border-radius:0 0 0px 8px}.dga-radius-xlarge{border-radius:12px}.dga-radius-xlarge-t{border-radius:12px 12px 0 0}.dga-radius-xlarge-tl{border-radius:12px 0px 0 0}.dga-radius-xlarge-tr{border-radius:0px 12px 0 0}.dga-radius-xlarge-b{border-radius:0 0 12px 12px}.dga-radius-xlarge-bl{border-radius:0 0 12px 0px}.dga-radius-xlarge-br{border-radius:0 0 0px 12px}.dga-radius-none{border-radius:0px}.dga-radius-circular{border-radius:100%}.dga-flex{display:flex}.dga-flex-column{display:flex;flex-direction:column}.dga-flex-center{display:flex;align-items:center;justify-content:center}.dga-flex-center-y{display:flex;align-items:center}.dga-flex-center-x{display:flex;justify-content:center}.dga-flex-between{display:flex;justify-content:space-between}.dga-flex-wrap{flex-wrap:wrap}.dga-flex-align-stretch{align-items:stretch}.dga-flex-align-start{align-items:flex-start}.dga-flex-align-end{align-items:flex-end}.dga-flex-justify-end{justify-content:flex-end}.dga-flex-justify-start{justify-content:flex-start}.dga-text-right{text-align:right}.dga-text-left{text-align:left}.dga-text-center{text-align:center}.dga-shadow-xs{box-shadow:var(--shadow-xs)}.dga-shadow-sm{box-shadow:var(--shadow-sm)}.dga-shadow-md,.input.focus{box-shadow:var(--shadow-md)}.dga-shadow-lg{box-shadow:var(--shadow-lg)}.dga-shadow-xl,.breadcrumb-dropdown{box-shadow:var(--shadow-xl)}.dga-shadow-2xl{box-shadow:var(--shadow-2xl)}.dga-shadow-3xl{box-shadow:var(--shadow-3xl)}.dga-ver-divider{width:1px;height:48px;background:hsla(var(--colors-alpha-black)/20%);margin-inline:var(--spacing-xl)}@media only screen and (max-width: 37.5em){.dga-xs-hide{display:none}}.dga-flex-justify-start{justify-content:start}.dga-flex-justify-end{justify-content:end}.dga-flex-justify-center{justify-content:center}.dga-flex-justify-between{justify-content:between}.dga-flex-justify-around{justify-content:around}.dga-flex-align-start{align-items:start}.dga-flex-align-end{align-items:end}.dga-flex-align-center{align-items:center}.dga-flex-align-stretch{align-items:stretch}.dga-form-control{display:flex;flex-direction:column;gap:8px;position:relative;width:320px;min-width:200px}.dga-form-control--fullwidth{width:100%}.dga-form-control>.dga-label{margin-bottom:8px;color:var(--form-field-text-label)}.input{display:flex;height:40px;width:100%;justify-content:flex-start;align-items:center;padding:var(--spacing-none) var(--spacing-2);border-radius:var(--radius-sm);gap:var(--spacing-xs);border:1px solid var(--form-field-border-default);background:var(--form-field-background-default);position:relative}.input:hover{border-color:var(--form-field-border-hovered)}.input::after{content:\"\";position:absolute;bottom:0;left:50%;width:0%;height:2px;transform:translateX(-50%);background-color:var(--form-field-border-pressed);transition:width 0.2s ease-in-out}.input__field{background-color:transparent;border:0;outline:0;height:100%;width:100%;color:var(--form-field-text-focused)}.input__field::placeholder{color:var(--form-field-text-placeholder);font-size:16px;font-style:normal;font-weight:400;line-height:24px}.input.focus::after{width:100%}.input.active::after{width:50%}.input--readonly,.input--readonly:hover,.input--disabled,.input--disabled:hover{border-color:var(--border-neutral-primary);box-shadow:none !important}.input--readonly::after,.input--disabled::after{display:none}.input--readonly .input__field,.input--readonly .input__field::placeholder,.input--disabled .input__field,.input--disabled .input__field::placeholder{color:var(--form-field-text-readonly)}.input--disabled{border-color:var(--border-disabled)}.input--disabled .input__field{color:var(--text-default-disabled)}.input--disabled .input__field,.input--disabled .input__field::placeholder{color:var(--text-default-disabled)}.input--disabled .input__icon span,.input--disabled .input__prefix--subtle-text,.input--disabled .input__prefix--solid-text{color:var(--text-default-disabled)}.input__icon{height:100%;display:inline-flex;align-items:center}.input__icon span{color:var(--form-field-border-hovered);font-size:20px}.input__feedback-icon{height:100%;display:inline-flex;align-items:center}.input__feedback-icon span{font-size:20px;position:relative;z-index:0}.input__feedback-icon--success{color:var(--text-success)}.input__feedback-icon--success span::after{background-color:var(--colors-brand-100)}.input__feedback-icon--error{color:var(--text-error)}.input__feedback-icon--error span::after{background-color:var(--text-error-100)}.input__feedback-icon--warning{color:var(--text-warning)}.input__feedback-icon--warning span::after{background-color:var(--colors-warning-100)}.input__feedback-icon--warning-triangle{color:var(--text-warning)}.input__feedback-icon--warning-triangle span::after{width:0 !important;height:0 !important;transform:scale(1) !important;border:12px solid rgba(0, 0, 0, 0);border-top:0;border-bottom:20px solid var(--colors-warning-100);border-radius:0px !important;left:-2px !important;top:-1px !important}.input__feedback-icon--ring span::after{content:\"\";display:block;width:100%;height:100%;transform:scale(1.16);position:absolute;top:0;left:0;border-radius:var(--radius-full);z-index:-1}.input__prefix,.input__suffix{display:inline-flex;height:100%;padding:var(--spacing-xxs) var(--spacing-2);justify-content:center;align-items:center;gap:var(--spacing-xs);mix-blend-mode:multiply;margin-left:calc(-1 * var(--spacing-2));margin-right:var(--spacing-2);border:0}.input__prefix-label,.input__prefix-icon,.input__prefix-chevron,.input__suffix-label,.input__suffix-icon,.input__suffix-chevron{color:var(--colors-text-primary)}.input__prefix .dropdown__label,.input__suffix .dropdown__label{display:none}.input__prefix .dropdown__label--selection,.input__suffix .dropdown__label--selection{display:inline-block;white-space:nowrap}.input__prefix .dropdown__label--selection~.input__prefix-label,.input__suffix .dropdown__label--selection~.input__prefix-label{display:none}.input__prefix-chevron,.input__suffix-chevron{font-size:30px !important;transform:rotate(0);transition:all 0.3s ease-in-out}.input__prefix.active,.input__suffix.active{background-color:var(--colors-gray-neutral-300)}.input__prefix--solid,.input__suffix--solid{background-color:var(--background-neutral-50)}.input__prefix--solid-text,.input__suffix--solid-text{background-color:var(--background-neutral-50)}.input__prefix--solid-text .input__prefix-label,.input__suffix--solid-text .input__prefix-label{color:var(--colors-text-quarterary)}.input__prefix--solid:hover,.input__suffix--solid:hover{background-color:var(--colors-gray-neutral-200)}.input__prefix--solid:focus,.input__suffix--solid:focus{background-color:transparent;border:4px solid var(--colors-base-black);border-radius:0}.input__prefix--solid.active,.input__suffix--solid.active{background-color:var(--colors-gray-neutral-300);border:0}.input__prefix--solid:disabled,.input__suffix--solid:disabled{background-color:var(--background-neutral-50)}.input__prefix--solid:disabled .input__prefix-label,.input__prefix--solid:disabled .input__prefix-icon,.input__prefix--solid:disabled .input__prefix-chevron,.input__suffix--solid:disabled .input__prefix-label,.input__suffix--solid:disabled .input__prefix-icon,.input__suffix--solid:disabled .input__prefix-chevron{color:var(--colors-gray-neutral-300)}.input__prefix--subtle,.input__suffix--subtle{background-color:transparent}.input__prefix--subtle-text,.input__suffix--subtle-text{background-color:transparent}.input__prefix--subtle-text .input__prefix-label,.input__suffix--subtle-text .input__prefix-label{color:var(--colors-text-quarterary)}.input__prefix--subtle:hover,.input__suffix--subtle:hover{background-color:var(--colors-gray-neutral-50)}.input__prefix--subtle:focus,.input__suffix--subtle:focus{background-color:transparent;border:4px solid var(--colors-base-black)}.input__prefix--subtle.active,.input__suffix--subtle.active{background-color:var(--colors-gray-neutral-200);border:0}.input__prefix--subtle:disabled .input__prefix-label,.input__prefix--subtle:disabled .input__prefix-icon,.input__prefix--subtle:disabled .input__prefix-chevron,.input__suffix--subtle:disabled .input__prefix-label,.input__suffix--subtle:disabled .input__prefix-icon,.input__suffix--subtle:disabled .input__prefix-chevron{color:var(--colors-gray-neutral-300)}.input__prefix.selected,.input__suffix.selected{background-color:var(--form-field-border-hovered)}.input__prefix.selected .input__prefix-icon,.input__prefix.selected .input__prefix-label,.input__prefix.selected .input__prefix-chevron,.input__suffix.selected .input__prefix-icon,.input__suffix.selected .input__prefix-label,.input__suffix.selected .input__prefix-chevron{color:var(--colors-text-primary_on-brand)}.input__prefix.selected .dropdown__label,.input__suffix.selected .dropdown__label{color:var(--colors-text-primary_on-brand)}.input__dropdown-btn.open+.input__dropdown-list{z-index:2;opacity:1;padding-block:var(--spacing-md);max-height:376px;pointer-events:auto;overflow-y:auto}.input__dropdown-btn.open .input__dropdown .input__prefix-chevron,.input__dropdown-btn.open .input__dropdown .input__suffix-chevron{transform:rotate(180deg)}.input__prefix{border-radius:var(--radius-sm) 0 0 var(--radius-sm)}.input__suffix{margin-right:calc(-1 * var(--spacing-2));margin-left:var(--spacing-xl);border-radius:0 var(--radius-sm) var(--radius-sm) 0}.input--lighter{border:0;background:var(--form-field-background-lighter, #fcfcfd)}.input--lighter:hover{border:1px solid var(--form-field-border-default)}.input--lighter.focus{border:1px solid var(--form-field-border-default)}.input--lighter.active{border:1px solid var(--form-field-border-default)}.input--darker{border:0;background-color:var(--form-field-background-darker, #f3f4f6)}.input--darker:hover{border:1px solid var(--form-field-border-default)}.input--darker.focus{border:1px solid var(--form-field-border-default);background-color:var(--form-field-background-default) !important}.input--darker.active{border:1px solid var(--form-field-border-default);background-color:var(--form-field-background-default) !important}.input.readOnly{border:1px solid var(--border-neutral-primary) !important;background-color:var(--form-field-background-default) !important;box-shadow:none !important}.input.readOnly::after{content:none}.input--error,.input--error:hover{border:1px solid var(--form-field-border-error) !important}.input--error::after{background-color:var(--form-field-border-error)}.input--lg{height:40px}.input--lg .input__field,.input--lg .input__field::placeholder{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.input--lg__feedback-icon span{font-size:20px}.input--lg .input__prefix-icon,.input--lg .input__suffix-icon{font-size:24px}.input--lg .input__prefix-chevron,.input--lg .input__suffix-chevron{font-size:20px}.input--md{height:32px}.input--md .input__field,.input--md .input__field::placeholder{font-size:16px;font-style:normal;font-weight:400;line-height:24px}.input--md__feedback-icon span{font-size:16px}.input--md .input__prefix-icon,.input--md .input__suffix-icon{font-size:20px}.input--md .input__prefix-chevron,.input--md .input__suffix-chevron{font-size:16px}.breadcrumb-dropdown{display:flex;flex-direction:column;list-style:none;width:153px;padding:var(--spacing-xs, 4px);flex-direction:column;align-items:flex-start;position:absolute;left:0;top:calc(100% + 4px);border-radius:var(--radius-sm);border:1px solid var(--border-neutral-secondary, #E5E7EB);background:var(--background-white, #FFF)}.breadcrumb-dropdown-item{display:flex;padding:var(--spacing-md, 8px);flex-direction:column;justify-content:center;align-items:flex-start;gap:var(--spacing-md, 8px);align-self:stretch;border-radius:var(--radius-sm, 4px);color:var(--link-neutral, #384250)}.breadcrumb-dropdown-item:hover{border-radius:var(--radius-xs);background:var(--button-background-neutral-hovered);mix-blend-mode:multiply}.breadcrumb-dropdown-item:active{border-radius:var(--radius-xs);background:var(--button-background-neutral-pressed, #E5E7EB);mix-blend-mode:multiply}.date-picker-dropdown{width:fit-content}";

const DgaDateField = /*@__PURE__*/ proxyCustomElement(class DgaDateField extends H {
    constructor() {
        super();
        this.__registerHost();
        this.placeholder = "DD/MM/YYYY";
        this.size = 'lg';
        this.variant = 'default';
        this.error = false;
        this.helperText = '';
        this.disabled = false;
        this.readonly = false;
        this.required = false;
        this.fullwidth = true;
        this.name = guid();
        this.value = '';
        this.isActive = false;
        this.isFocused = false;
        this.isDatepickerOpen = false;
        this.errorMessage = '';
        this.selectedDate = null;
        this.inputValue = '';
        this.handleInput = (event) => {
            var _a, _b;
            const input = event.target;
            this.inputValue = input.value;
            if (this.inputValue === '') {
                this.selectedDate = null;
                this.errorMessage = '';
                this.error = false;
                (_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, null);
                return;
            }
            if (isValidDate(this.inputValue)) {
                const [day, month, year] = this.inputValue.split('/').map(Number);
                this.selectedDate = new Date(year, month - 1, day);
                this.errorMessage = '';
                this.error = false;
                (_b = this.onChange) === null || _b === void 0 ? void 0 : _b.call(this, this.selectedDate);
            }
            else {
                this.errorMessage = 'Use DD/MM/YYYY format';
                this.error = true;
            }
        };
        this.handleFocus = () => {
            this.isFocused = true;
        };
        // Method to detect clicks outside
        this.handleClickOutside = (event) => {
            if (this.isDatepickerOpen &&
                this.inputContainerRef &&
                !this.inputContainerRef.contains(event.target) && // Click is outside input
                this.datepickerRef &&
                !this.datepickerRef.contains(event.target) // Click is outside datepicker popup
            ) {
                this.isDatepickerOpen = false;
                document.removeEventListener('click', this.handleClickOutside);
            }
        };
        // Modify handleOpenDatepickerPopup to add event listener
        this.handleOpenDatepickerPopup = () => {
            if (!this.readonly && !this.disabled) {
                this.isDatepickerOpen = true;
                document.addEventListener('click', this.handleClickOutside);
            }
        };
        // Modify handleDatepickerChange to remove event listener when selecting a date
        this.handleDatepickerChange = (event) => {
            var _a;
            this.selectedDate = event.detail;
            this.inputValue = formatDate(this.selectedDate);
            this.errorMessage = '';
            this.error = false;
            this.isDatepickerOpen = false;
            (_a = this.onChange) === null || _a === void 0 ? void 0 : _a.call(this, this.selectedDate);
            document.removeEventListener('click', this.handleClickOutside);
        };
        // Remove listener when closing due to blur
        this.handleBlur = () => {
            setTimeout(() => {
                var _a;
                if (!((_a = this.inputContainerRef) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement))) {
                    this.isFocused = false;
                    this.isDatepickerOpen = false;
                    document.removeEventListener('click', this.handleClickOutside);
                    if (this.selectedDate) {
                        this.inputValue = formatDate(this.selectedDate);
                    }
                }
            }, 200);
        };
    }
    valueChanged(newValue, oldValue) {
        if (newValue !== oldValue) {
            this.inputEl['value'] = newValue;
        }
    }
    render() {
        const inputClasses = {
            'input': true,
            [`input--${this.size}`]: true,
            'input--error': this.error,
            [`input--${this.variant}`]: this.variant !== 'default',
            'active': this.isActive,
            'focus': this.isFocused,
            'input--disabled': this.disabled,
            'readOnly': this.readonly
        };
        return (h("div", { key: '1e2e5f5355b2699eca2cd78dbcd1add24a068d41', class: { "dga-form-control": true, "dga-form-control--fullwidth": this.fullwidth } }, this.label &&
            h("dga-label", { key: '6b89aab074716fe6bc8bbcc5b616eec5bc0f020b', label: this.label, size: this.size, required: this.required, disabled: this.disabled }), h("div", { key: '26f9f2079286b18003a3a538b1e38d62242bcfcb', class: Object.keys(inputClasses).filter(key => inputClasses[key]).join(' '), ref: el => this.inputContainerRef = el }, this.icon && (h("span", { key: '487674f71c2582041e940b7f5159c1dd74ae8e7b', class: "input__icon" }, h("dga-icon", { key: 'f7ce4772c9864456ae135286723e2f3f2e068a9b', icon: this.icon.name, variant: this.icon.variant, type: this.icon.type, size: 20 }))), h("input", { key: '1dcfc477ec0ce375bcb083b451d1254c5d3108b2', ref: (el) => (this.inputEl = el), name: this.name, value: this.inputValue, type: "text", class: "input__field", placeholder: this.placeholder, disabled: this.disabled, readOnly: this.readonly, required: this.required, onFocus: this.handleFocus, onBlur: this.handleBlur, onInput: this.handleInput, onMouseDown: () => this.isActive = true, onMouseUp: () => this.isActive = false, onMouseOut: () => this.isActive = false }), h("dga-button-v2", { key: 'd8b0c1056641f1d07423c0d96190e08d7b7fd136', variant: "transparent", iconOnly: true, leadIcon: true, leadIconProps: { name: 'calendar-03', variant: 'stroke', type: 'rounded' }, onClick: this.handleOpenDatepickerPopup }), this.error && (h("span", { key: '075cd959b934124150470113674940e123f4aeb8', class: "input__feedback-icon input__feedback-icon--error" }, h("dga-icon", { key: '1a26ff272176dac1079dfc107d273aa6dba283fa', icon: "AlertCircleIcon", variant: "solid" })))), (this.errorMessage || this.helperText) &&
            h("dga-helper-text", { key: '70eaf94ae8665650733cc9146e32ad45e06281fc', helperText: this.errorMessage || this.helperText, error: this.error }), this.isDatepickerOpen &&
            h("div", { key: '9ef697761817368832e7ff9738ed52385250eecf', class: "date-picker-dropdown", ref: el => this.datepickerRef = el }, h("dga-datepicker", Object.assign({ key: '99a248ca9e8e6ea44e3720da79318f5acf4d0eb5' }, this.datepickerOptions, { value: this.selectedDate, onChange: this.handleDatepickerChange, style: { width: "fit-content", display: "block" } })))));
    }
    static get watchers() { return {
        "value": ["valueChanged"]
    }; }
    static get style() { return dgaDateFieldCss; }
}, [0, "dga-date-field", {
        "label": [1],
        "placeholder": [1],
        "size": [1],
        "variant": [1],
        "error": [4],
        "helperText": [1, "helper-text"],
        "icon": [16],
        "disabled": [4],
        "readonly": [4],
        "required": [4],
        "fullwidth": [4],
        "name": [1],
        "value": [1],
        "onChange": [16, "on-change"],
        "datepickerOptions": [16, "datepicker-options"],
        "isActive": [32],
        "isFocused": [32],
        "isDatepickerOpen": [32],
        "errorMessage": [32],
        "selectedDate": [32],
        "inputValue": [32]
    }, undefined, {
        "value": ["valueChanged"]
    }]);
function defineCustomElement() {
    if (typeof customElements === "undefined") {
        return;
    }
    const components = ["dga-date-field", "date-cell", "dga-button-v2", "dga-datepicker", "dga-helper-text", "dga-icon", "dga-icon-v2", "dga-label", "dga-text-input", "month-navigator"];
    components.forEach(tagName => { switch (tagName) {
        case "dga-date-field":
            if (!customElements.get(tagName)) {
                customElements.define(tagName, DgaDateField);
            }
            break;
        case "date-cell":
            if (!customElements.get(tagName)) {
                defineCustomElement$9();
            }
            break;
        case "dga-button-v2":
            if (!customElements.get(tagName)) {
                defineCustomElement$8();
            }
            break;
        case "dga-datepicker":
            if (!customElements.get(tagName)) {
                defineCustomElement$7();
            }
            break;
        case "dga-helper-text":
            if (!customElements.get(tagName)) {
                defineCustomElement$6();
            }
            break;
        case "dga-icon":
            if (!customElements.get(tagName)) {
                defineCustomElement$5();
            }
            break;
        case "dga-icon-v2":
            if (!customElements.get(tagName)) {
                defineCustomElement$4();
            }
            break;
        case "dga-label":
            if (!customElements.get(tagName)) {
                defineCustomElement$3();
            }
            break;
        case "dga-text-input":
            if (!customElements.get(tagName)) {
                defineCustomElement$2();
            }
            break;
        case "month-navigator":
            if (!customElements.get(tagName)) {
                defineCustomElement$1();
            }
            break;
    } });
}

export { DgaDateField as D, defineCustomElement as d };
