From 782d4d72a326b714b2601ba8e4af0cc18e61c680 Mon Sep 17 00:00:00 2001 From: Richard Date: Fri, 31 Jul 2026 11:19:49 +0200 Subject: [PATCH] feat: Allow event owners to delete their own events and admins to delete any event with UI action buttons and confirmation dialog --- .../events/__pycache__/views.cpython-314.pyc | Bin 25549 -> 26040 bytes backend/apps/events/views.py | 6 + frontend/dist/assets/index-5idyA2ig.css | 1 + frontend/dist/assets/index-BnAMvh5e.js | 272 ++++++++++++++++++ frontend/dist/assets/index-CGy_Z7Jy.css | 1 - frontend/dist/assets/index-KtQZvLw-.js | 272 ------------------ frontend/dist/index.html | 4 +- frontend/src/App.jsx | 35 ++- frontend/src/components/ShiftMatrixTable.jsx | 14 +- frontend/src/pages/AdminPage.jsx | 16 ++ frontend/src/pages/EventEditorPage.jsx | 48 ++-- frontend/src/pages/HomePage.jsx | 13 +- 12 files changed, 382 insertions(+), 300 deletions(-) create mode 100644 frontend/dist/assets/index-5idyA2ig.css create mode 100644 frontend/dist/assets/index-BnAMvh5e.js delete mode 100644 frontend/dist/assets/index-CGy_Z7Jy.css delete mode 100644 frontend/dist/assets/index-KtQZvLw-.js diff --git a/backend/apps/events/__pycache__/views.cpython-314.pyc b/backend/apps/events/__pycache__/views.cpython-314.pyc index 68b32f9c993359f56e5de8d4ab8b32a688f87b14..7a8db86e1341aec5e94ac4cf0e652c60ef40b1f1 100644 GIT binary patch delta 2763 zcma)8eQaCR6@S<9S8OM7KAeQsp#e8-owlwMC&e*oVmn_=X%pkRp(x2*$9{2~@80(u z+Agfsv_Besbtcq%F|fTwhn|eCT&bf+2r;~Lws#wsBGQnKx1gzJ@@6K zDlpA@`suuL&pG#Z&pYQ_zwtU*{52`uURYoe*l&7de6+LkQsHHzP9^YLV;3QC#99We zoAOB&EEQ}3nZKEB={!Mj3Q^(``q0Dy_wC-OOE+KQCz(VH1bWxd(M=pb)$x`Ufi*>5T_Ky7>u@1KddQDD) zJ}Ze7_Sl#v1Q0?DBt3&I z>_>g5>V&`L*TF8Efq2;|tDwVjw~-}Ip!?vItrq4jg|KKVhF8oRhzFJ}*GVs2wpP0$ zXc9#D>cGV2A-lk9+qX#z$gCy8AgJwp5WNvR@T6^%0j1>Q#g3A1G9e+H5(WjCLsQ2h9u3YzV~y*M=TJm&>s3Q&e|J|8eHK+e zfTJ~KyET!$t9h~B2s1H7LhbF{JzXnCY~{~pbgrcjp%-U)41QYktnp!d4?t?mS;yLO z=qxI=^FYDY(?o&qY^@~^!>e1LuKEL8Q|%pCfPES9p@X9AnNAJIm{xjQ4`<4K%8#~v zq~8$zg~z-U0odVsb^9@Eju~0)N`| zpnVjr)@vgOz21$rDW-JmDL(H}D@(`U2lWsQpsD8yl+0 zd(hnQeIM_u|A+4f7!2VpC~j;aA27bP7`*3Qj~X!QgG)t*SD_+VUZ zKX)Eo#??iTTTdCe7=X`O{bXM81qXSgeS zHygi>>QNXBSJk|Ri}t;-SR`KWt&6usJ3_IJb~=b^qj)SM$r61Dz85Y}{}@#!NtC3_ z)TC-%5#nRwad)xyy?HH27@HGahA%BIUo@(O_H2()Q_K4(Dc&evwH3y&e_#4;f%6bliXn)I?!KjAe3}s<| zf=i2#>a9Kb9~1>Pap^yq>r=qQDO^H&HW~OCUUE1opFrsB0$&3mA{zzxtnwzn{dAh%yd<^gO_mp5MxgFa4Ug@OJK&ka#=!T5g5RVU34f5K~ zlSG+T;0ksW#V^c{OR?`L-URe>25$Q;mBTC8EQ=G<>;e=u^YvWt#6{rRKs{Lo+hB@} zDMtqnt<*pnuYq^s_3di|UoGmELRoo)-4dB3{_UbWkz*Zh{iVad5|qWN_b(YiiF@dL#YxA37oqx=iI&Q+PZFCG)XxXT+mDx>++nTra6*{(V-uE_O zU_fI8^bbRh8cfh27!wk|M%6753_%l31j9&-_>>3=Sq$+57>Z!Td+vkHfEeE&znpi@ z@1Fa+=bd}r=;!3brzCS;W`-$=JrTL5yTCu3`H?_|z>yJv;hg(mTGmY1mu4~^Bq7lV zqiOk2ls-$)3-UItn@WSM6|v1KMH29L#8v>YRT1`1(Nr!yPSi7*>pu@sR8 zIAXEG6;nQ>WQ>t2_%g#*96-u{ZwI-V4nbr*rIMYX5V|u<1${es+G3v;AnX*z0HH2S zwHi)l+KD4^Bh!^qs+qc|EU9uN+__mKnz^el+$+VUbuv}N47vpQcu4p4xyHN z;Kl4};!1px{SGN=VV;8q&7eqw^3($QD7uqrE$p4qKs<>HGo)m)1nRBMT+FAXDeGfV zH5`kuO%2f=Nu>dJ-davnIBd1$@Va6KnulOVXoE{uv5@bNvb5y>4V0Hg#i)!h0M)rQ zq&A`Eery(c(G!Q-l2chb(A@IN*BK&3oR7>A22&3p&Q7S>~!L+dlw;1(7iCw`~x!XP{t+j`;v;$^9Xn8Y(nq9>J%z%70Ta-J12Kk-x*O($F6YTXK91ev?R>&+ETqB#O#?{?j+feYSh z@=~I3SsT$kmtgzyO>?=@$+Gf$rB4Iw8_n3&HxO6pC=~iigdt2Bg9cy0;$s-hY6yjb zVVAQayu8`(4f%bv4c&sgDW<3jeIM!bxJTI#>*-Nw33}dx*L?YbsaB-uMd9Kn>r@c?wef4_L1vDU-^N55y=NHgTy}R_M(nSn6Ly#uJa;XYRw3>gR1==^FiS>F|}f@Y|f6qR0vV@*}$XSm*E6MjMZ1lWQy`3;^4w%$Jd z_rdCg_+j-*O;wL~L>>n02)q);XpFM7AE09dn%3AOf1!C3;Ti+cthY9AdtL|B$7N~h zoqdtb;fSP4`fnhKO?65Tcoi{+VrGDU1)KipS7ADwS(8WHi9gmnmQ22bmXO0C;Iiom z_r44lac6|{FdSM)E+)o9CPLcba?6Q)31giI5e7;!gWJEND16geR?vyL*CWBjAVhIP zF@<)cXG6mF$R6Xix0pRNtyQK{Tv4SSbs)aZW20{)<6VSdgxw58fg)EkM`Wdo#`@J* zUtEt)kz0|>XB-woOI;>YIo7qF=COS>V;_ykl#LDEPrO=rB*+#NpvptI6c9c{ILu(k zSW)e9I_VK^yIg3GGMg#k-xuXfu{n+1h#l=dav6@dH#)IZ#2kI_>URVe@QriP;tg>f zE!4+maiF819dC!0qR1+>Vg&nz;`ii-r+B|84s?2hftdA=KH0(?TAC{N_Osubtkb6| z!^;?ePdZ%WB>dhHA#$QE+=7j8NLodra8tTpEJqdh?gT4_5!zu{=U^IIqK8@%M>~f} z86U2zQCKs=IRqR{TBPu(4aBqOp|A2Q$MP#DlGw|H1?J1o F{SD+GOn(3X diff --git a/backend/apps/events/views.py b/backend/apps/events/views.py index aac134b..c755a12 100644 --- a/backend/apps/events/views.py +++ b/backend/apps/events/views.py @@ -29,6 +29,12 @@ class IsAdminOrEventCreator(permissions.BasePermission): def has_object_permission(self, request, view, obj): if request.method in permissions.SAFE_METHODS: return True + if not request.user or not request.user.is_authenticated: + return False + if request.user.is_admin_user or request.user.is_staff or request.user.is_superuser: + return True + if request.method == 'DELETE': + return obj.created_by == request.user return obj.is_user_manager_or_admin(request.user) class IsTaskAreaOwnerOrAdmin(permissions.BasePermission): diff --git a/frontend/dist/assets/index-5idyA2ig.css b/frontend/dist/assets/index-5idyA2ig.css new file mode 100644 index 0000000..831b10c --- /dev/null +++ b/frontend/dist/assets/index-5idyA2ig.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-6{bottom:1.5rem}.left-3{left:.75rem}.left-3\.5{left:.875rem}.right-3{right:.75rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-4{top:1rem}.z-40{z-index:40}.z-50{z-index:50}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-1{margin-bottom:.25rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-16{height:4rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-9{height:2.25rem}.max-h-\[70px\]{max-height:70px}.min-h-\[100px\]{min-height:100px}.min-h-screen{min-height:100vh}.w-1\/4{width:25%}.w-1\/6{width:16.666667%}.w-10{width:2.5rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-full{width:100%}.w-px{width:1px}.min-w-\[110px\]{min-width:110px}.min-w-\[260px\]{min-width:260px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-7xl{max-width:80rem}.max-w-\[130px\]{max-width:130px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.cursor-pointer{cursor:pointer}.auto-rows-fr{grid-auto-rows:minmax(0,1fr)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-500\/20{border-color:#f59e0b33}.border-amber-500\/30{border-color:#f59e0b4d}.border-amber-500\/40{border-color:#f59e0b66}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-500\/20{border-color:#3b82f633}.border-emerald-400{--tw-border-opacity: 1;border-color:rgb(52 211 153 / var(--tw-border-opacity, 1))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-emerald-500\/20{border-color:#10b98133}.border-emerald-500\/30{border-color:#10b9814d}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity, 1))}.border-indigo-500\/20{border-color:#6366f133}.border-indigo-500\/30{border-color:#6366f14d}.border-indigo-500\/40{border-color:#6366f166}.border-indigo-500\/50{border-color:#6366f180}.border-red-500\/20{border-color:#ef444433}.border-red-500\/30{border-color:#ef44444d}.border-red-600\/30{border-color:#dc26264d}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity, 1))}.border-slate-800\/80{border-color:#1e293bcc}.border-transparent{border-color:transparent}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-amber-500\/5{background-color:#f59e0b0d}.bg-black\/60{background-color:#0009}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-blue-600\/10{background-color:#2563eb1a}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-indigo-500\/10{background-color:#6366f11a}.bg-indigo-500\/20{background-color:#6366f133}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-600\/20{background-color:#dc262633}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-slate-900\/60{background-color:#0f172a99}.bg-slate-900\/90{background-color:#0f172ae6}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-slate-950\/60{background-color:#02061799}.bg-slate-950\/70{background-color:#020617b3}.bg-slate-950\/80{background-color:#020617cc}.fill-white{fill:#fff}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-10{padding-left:2.5rem}.pl-3{padding-left:.75rem}.pl-3\.5{padding-left:.875rem}.pl-9{padding-left:2.25rem}.pr-10{padding-right:2.5rem}.pr-16{padding-right:4rem}.pr-3\.5{padding-right:.875rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.font-serif{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-indigo-300{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.text-indigo-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.line-through{text-decoration-line:line-through}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/10{--tw-shadow-color: rgb(59 130 246 / .1);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-600\/30{--tw-shadow-color: rgb(37 99 235 / .3);--tw-shadow: var(--tw-shadow-colored)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}:root{--font-display: "Space Grotesk", system-ui, sans-serif;--font-body: "Plus Jakarta Sans", system-ui, sans-serif;--font-mono: "JetBrains Mono", monospace;--color-accent: #E05A47;--brand-primary: var(--color-accent)}:root,[data-theme=dark]{--color-paper: #0E0F12;--color-surface: #15161A;--color-surface-hover: #1C1D23;--color-border-grid: #282932;--color-border-subtle: #1F2026;--color-text: #F0F0EE;--color-text-muted: #9E9FAA;--color-text-dim: #5C5D66;--color-bg-subtle: #090A0C}[data-theme=light]{--color-paper: #F8F7F4;--color-surface: #FFFFFF;--color-surface-hover: #F0EEE8;--color-border-grid: #D8D5CB;--color-border-subtle: #E8E5DC;--color-text: #141518;--color-text-muted: #555660;--color-text-dim: #888994;--color-bg-subtle: #EFECE5}body{background-color:var(--color-paper);color:var(--color-text);font-family:var(--font-body);background-image:radial-gradient(rgba(120,120,120,.08) 1px,transparent 1px);background-size:28px 28px;overflow-x:clip;transition:background-color .15s ease,color .15s ease}.font-display,.font-serif{font-family:var(--font-display)!important;font-style:normal!important}.font-mono{font-family:var(--font-mono)!important}.font-sans{font-family:var(--font-body)!important}.bg-canvas,.bg-paper{background-color:var(--color-paper)!important}.bg-surface{background-color:var(--color-surface)!important}.bg-surface-hover{background-color:var(--color-surface-hover)!important}.bg-subtle{background-color:var(--color-bg-subtle)!important}.text-main{color:var(--color-text)!important}.text-muted{color:var(--color-text-muted)!important}.text-dim{color:var(--color-text-dim)!important}.border-grid{border-color:var(--color-border-grid)!important}.border-subtle{border-color:var(--color-border-subtle)!important}.input-field{background-color:var(--color-bg-subtle)!important;color:var(--color-text)!important;border-color:var(--color-border-grid)!important}.input-field:focus{border-color:var(--color-text-muted)!important;outline:none!important}.hallmark-panel{background-color:var(--color-surface);border:1px solid var(--color-border-grid);box-shadow:0 1px 3px #0000000d}.hallmark-card{background-color:var(--color-surface);border:1px solid var(--color-border-grid)}.hallmark-card:hover{border-color:var(--color-text-muted);background-color:var(--color-surface-hover)}.bg-brand-primary{background-color:var(--brand-primary)!important}.text-brand-primary{color:var(--brand-primary)!important}.border-brand-primary{border-color:var(--brand-primary)!important}@media print{body{background:#fff!important;color:#000!important;background-image:none!important}.no-print{display:none!important}.print-only{display:block!important}.hallmark-panel,.hallmark-card{background:none!important;border:1px solid #000!important;box-shadow:none!important}table{width:100%!important;border-collapse:collapse!important}th,td{border:1px solid #000!important;padding:6px!important;color:#000!important}}.hover\:border-red-500\/20:hover{border-color:#ef444433}.hover\:border-slate-700:hover{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.hover\:bg-amber-500\/20:hover{background-color:#f59e0b33}.hover\:bg-amber-500\/30:hover{background-color:#f59e0b4d}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-500\/20:hover{background-color:#3b82f633}.hover\:bg-emerald-500:hover{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-500\/20:hover{background-color:#10b98133}.hover\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.hover\:bg-indigo-500\/20:hover{background-color:#6366f133}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:bg-red-500\/20:hover{background-color:#ef444433}.hover\:bg-red-600\/30:hover{background-color:#dc26264d}.hover\:bg-slate-700:hover{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-900\/40:hover{background-color:#0f172a66}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\:text-indigo-300:hover{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:brightness-110:hover{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:border-slate-600:focus{--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:col-span-1{grid-column:span 1 / span 1}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:col-span-3{grid-column:span 3 / span 3}.sm\:col-span-4{grid-column:span 4 / span 4}.sm\:flex{display:flex}.sm\:min-h-\[110px\]{min-height:110px}.sm\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:p-10{padding:2.5rem}.sm\:p-8{padding:2rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-5xl{font-size:3rem;line-height:1}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:flex{display:flex}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}@media (min-width: 1024px){.lg\:col-span-3{grid-column:span 3 / span 3}.lg\:col-span-4{grid-column:span 4 / span 4}.lg\:inline{display:inline}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}} diff --git a/frontend/dist/assets/index-BnAMvh5e.js b/frontend/dist/assets/index-BnAMvh5e.js new file mode 100644 index 0000000..d19b4da --- /dev/null +++ b/frontend/dist/assets/index-BnAMvh5e.js @@ -0,0 +1,272 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function Bd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var iu={exports:{}},Ds={},ou={exports:{}},Q={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Sr=Symbol.for("react.element"),Vd=Symbol.for("react.portal"),Ud=Symbol.for("react.fragment"),Hd=Symbol.for("react.strict_mode"),Qd=Symbol.for("react.profiler"),Wd=Symbol.for("react.provider"),Kd=Symbol.for("react.context"),Gd=Symbol.for("react.forward_ref"),qd=Symbol.for("react.suspense"),Yd=Symbol.for("react.memo"),Zd=Symbol.for("react.lazy"),Ho=Symbol.iterator;function Jd(e){return e===null||typeof e!="object"?null:(e=Ho&&e[Ho]||e["@@iterator"],typeof e=="function"?e:null)}var au={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uu=Object.assign,cu={};function Mn(e,t,n){this.props=e,this.context=t,this.refs=cu,this.updater=n||au}Mn.prototype.isReactComponent={};Mn.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Mn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function du(){}du.prototype=Mn.prototype;function Ei(e,t,n){this.props=e,this.context=t,this.refs=cu,this.updater=n||au}var Ci=Ei.prototype=new du;Ci.constructor=Ei;uu(Ci,Mn.prototype);Ci.isPureReactComponent=!0;var Qo=Array.isArray,fu=Object.prototype.hasOwnProperty,Ti={current:null},mu={key:!0,ref:!0,__self:!0,__source:!0};function pu(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)fu.call(t,r)&&!mu.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1>>1,z=L[C];if(0>>1;C<$;){var D=2*(C+1)-1,H=L[D],ae=D+1,tt=L[ae];if(0>s(H,g))aes(tt,H)?(L[C]=tt,L[ae]=g,C=ae):(L[C]=H,L[D]=g,C=D);else if(aes(tt,g))L[C]=tt,L[ae]=g,C=ae;else break e}}return I}function s(L,I){var g=L.sortIndex-I.sortIndex;return g!==0?g:L.id-I.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var u=[],m=[],h=1,y=null,x=3,j=!1,k=!1,w=!1,A=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(L){for(var I=n(m);I!==null;){if(I.callback===null)r(m);else if(I.startTime<=L)r(m),I.sortIndex=I.expirationTime,t(u,I);else break;I=n(m)}}function v(L){if(w=!1,d(L),!k)if(n(u)!==null)k=!0,ye(S);else{var I=n(m);I!==null&&Ce(v,I.startTime-L)}}function S(L,I){k=!1,w&&(w=!1,f(b),b=-1),j=!0;var g=x;try{for(d(I),y=n(u);y!==null&&(!(y.expirationTime>I)||L&&!X());){var C=y.callback;if(typeof C=="function"){y.callback=null,x=y.priorityLevel;var z=C(y.expirationTime<=I);I=e.unstable_now(),typeof z=="function"?y.callback=z:y===n(u)&&r(u),d(I)}else r(u);y=n(u)}if(y!==null)var $=!0;else{var D=n(m);D!==null&&Ce(v,D.startTime-I),$=!1}return $}finally{y=null,x=g,j=!1}}var E=!1,P=null,b=-1,U=5,O=-1;function X(){return!(e.unstable_now()-OL||125C?(L.sortIndex=g,t(m,L),n(u)===null&&L===n(m)&&(w?(f(b),b=-1):w=!0,Ce(v,g-C))):(L.sortIndex=z,t(u,L),k||j||(k=!0,ye(S))),L},e.unstable_shouldYield=X,e.unstable_wrapCallback=function(L){var I=x;return function(){var g=x;x=I;try{return L.apply(this,arguments)}finally{x=g}}}})(vu);yu.exports=vu;var df=yu.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var ff=N,Ie=df;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ml=Object.prototype.hasOwnProperty,mf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ko={},Go={};function pf(e){return Ml.call(Go,e)?!0:Ml.call(Ko,e)?!1:mf.test(e)?Go[e]=!0:(Ko[e]=!0,!1)}function hf(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function xf(e,t,n,r){if(t===null||typeof t>"u"||hf(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ee(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new Ee(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new Ee(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new Ee(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new Ee(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xe[e]=new Ee(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new Ee(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xe[e]=new Ee(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xe[e]=new Ee(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xe[e]=new Ee(e,5,!1,e.toLowerCase(),null,!1,!1)});var Li=/[\-:]([a-z])/g;function zi(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Li,zi);xe[t]=new Ee(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Li,zi);xe[t]=new Ee(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Li,zi);xe[t]=new Ee(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new Ee(e,1,!1,e.toLowerCase(),null,!1,!1)});xe.xlinkHref=new Ee("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xe[e]=new Ee(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mi(e,t,n,r){var s=xe.hasOwnProperty(t)?xe[t]:null;(s!==null?s.type!==0:r||!(2a||s[o]!==i[a]){var u=` +`+s[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=a);break}}}finally{al=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Qn(e):""}function gf(e){switch(e.tag){case 5:return Qn(e.type);case 16:return Qn("Lazy");case 13:return Qn("Suspense");case 19:return Qn("SuspenseList");case 0:case 2:case 15:return e=ul(e.type,!1),e;case 11:return e=ul(e.type.render,!1),e;case 1:return e=ul(e.type,!0),e;default:return""}}function Ol(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case an:return"Fragment";case on:return"Portal";case Al:return"Profiler";case Ai:return"StrictMode";case Dl:return"Suspense";case Rl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ku:return(e.displayName||"Context")+".Consumer";case Nu:return(e._context.displayName||"Context")+".Provider";case Di:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ri:return t=e.displayName||null,t!==null?t:Ol(e.type)||"Memo";case jt:t=e._payload,e=e._init;try{return Ol(e(t))}catch{}}return null}function yf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ol(t);case 8:return t===Ai?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ot(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Su(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vf(e){var t=Su(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Or(e){e._valueTracker||(e._valueTracker=vf(e))}function bu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Su(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function ds(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Il(e,t){var n=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Yo(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Ot(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function _u(e,t){t=t.checked,t!=null&&Mi(e,"checked",t,!1)}function $l(e,t){_u(e,t);var n=Ot(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Fl(e,t.type,Ot(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zo(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Fl(e,t,n){(t!=="number"||ds(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wn=Array.isArray;function vn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Ir.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ir(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},wf=["Webkit","ms","Moz","O"];Object.keys(qn).forEach(function(e){wf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qn[t]=qn[e]})});function Pu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||qn.hasOwnProperty(e)&&qn[e]?(""+t).trim():t+"px"}function Lu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Pu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Nf=le({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ul(e,t){if(t){if(Nf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function Hl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ql=null;function Oi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wl=null,wn=null,Nn=null;function ea(e){if(e=Er(e)){if(typeof Wl!="function")throw Error(_(280));var t=e.stateNode;t&&(t=Fs(t),Wl(e.stateNode,e.type,t))}}function zu(e){wn?Nn?Nn.push(e):Nn=[e]:wn=e}function Mu(){if(wn){var e=wn,t=Nn;if(Nn=wn=null,ea(e),t)for(e=0;e>>=0,e===0?32:31-(zf(e)/Mf|0)|0}var $r=64,Fr=4194304;function Kn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function hs(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Kn(a):(i&=o,i!==0&&(r=Kn(i)))}else o=n&~s,o!==0?r=Kn(o):i!==0&&(r=Kn(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function br(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Je(t),e[t]=n}function Of(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Zn),ua=" ",ca=!1;function Xu(e,t){switch(e){case"keyup":return dm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ec(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var un=!1;function mm(e,t){switch(e){case"compositionend":return ec(t);case"keypress":return t.which!==32?null:(ca=!0,ua);case"textInput":return e=t.data,e===ua&&ca?null:e;default:return null}}function pm(e,t){if(un)return e==="compositionend"||!Qi&&Xu(e,t)?(e=Zu(),ts=Vi=Et=null,un=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=pa(n)}}function sc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?sc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lc(){for(var e=window,t=ds();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ds(e.document)}return t}function Wi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function jm(e){var t=lc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&sc(n.ownerDocument.documentElement,n)){if(r!==null&&Wi(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=ha(n,i);var o=ha(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,cn=null,Jl=null,Xn=null,Xl=!1;function xa(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xl||cn==null||cn!==ds(r)||(r=cn,"selectionStart"in r&&Wi(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xn&&fr(Xn,r)||(Xn=r,r=ys(Jl,"onSelect"),0mn||(e.current=li[mn],li[mn]=null,mn--)}function J(e,t){mn++,li[mn]=e.current,e.current=t}var It={},ke=Ft(It),Le=Ft(!1),Jt=It;function _n(e,t){var n=e.type.contextTypes;if(!n)return It;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ze(e){return e=e.childContextTypes,e!=null}function ws(){te(Le),te(ke)}function ja(e,t,n){if(ke.current!==It)throw Error(_(168));J(ke,t),J(Le,n)}function pc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(_(108,yf(e)||"Unknown",s));return le({},n,r)}function Ns(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||It,Jt=ke.current,J(ke,e),J(Le,Le.current),!0}function Sa(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=pc(e,t,Jt),r.__reactInternalMemoizedMergedChildContext=e,te(Le),te(ke),J(ke,e)):te(Le),J(Le,n)}var dt=null,Bs=!1,jl=!1;function hc(e){dt===null?dt=[e]:dt.push(e)}function Dm(e){Bs=!0,hc(e)}function Bt(){if(!jl&&dt!==null){jl=!0;var e=0,t=q;try{var n=dt;for(q=1;e>=o,s-=o,ft=1<<32-Je(t)+s|n<b?(U=P,P=null):U=P.sibling;var O=x(f,P,d[b],v);if(O===null){P===null&&(P=U);break}e&&P&&O.alternate===null&&t(f,P),c=i(O,c,b),E===null?S=O:E.sibling=O,E=O,P=U}if(b===d.length)return n(f,P),ne&&Qt(f,b),S;if(P===null){for(;bb?(U=P,P=null):U=P.sibling;var X=x(f,P,O.value,v);if(X===null){P===null&&(P=U);break}e&&P&&X.alternate===null&&t(f,P),c=i(X,c,b),E===null?S=X:E.sibling=X,E=X,P=U}if(O.done)return n(f,P),ne&&Qt(f,b),S;if(P===null){for(;!O.done;b++,O=d.next())O=y(f,O.value,v),O!==null&&(c=i(O,c,b),E===null?S=O:E.sibling=O,E=O);return ne&&Qt(f,b),S}for(P=r(f,P);!O.done;b++,O=d.next())O=j(P,f,b,O.value,v),O!==null&&(e&&O.alternate!==null&&P.delete(O.key===null?b:O.key),c=i(O,c,b),E===null?S=O:E.sibling=O,E=O);return e&&P.forEach(function(Y){return t(f,Y)}),ne&&Qt(f,b),S}function A(f,c,d,v){if(typeof d=="object"&&d!==null&&d.type===an&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case Rr:e:{for(var S=d.key,E=c;E!==null;){if(E.key===S){if(S=d.type,S===an){if(E.tag===7){n(f,E.sibling),c=s(E,d.props.children),c.return=f,f=c;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===jt&&Ea(S)===E.type){n(f,E.sibling),c=s(E,d.props),c.ref=Vn(f,E,d),c.return=f,f=c;break e}n(f,E);break}else t(f,E);E=E.sibling}d.type===an?(c=Zt(d.props.children,f.mode,v,d.key),c.return=f,f=c):(v=us(d.type,d.key,d.props,null,f.mode,v),v.ref=Vn(f,c,d),v.return=f,f=v)}return o(f);case on:e:{for(E=d.key;c!==null;){if(c.key===E)if(c.tag===4&&c.stateNode.containerInfo===d.containerInfo&&c.stateNode.implementation===d.implementation){n(f,c.sibling),c=s(c,d.children||[]),c.return=f,f=c;break e}else{n(f,c);break}else t(f,c);c=c.sibling}c=Ll(d,f.mode,v),c.return=f,f=c}return o(f);case jt:return E=d._init,A(f,c,E(d._payload),v)}if(Wn(d))return k(f,c,d,v);if(On(d))return w(f,c,d,v);Kr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,c!==null&&c.tag===6?(n(f,c.sibling),c=s(c,d),c.return=f,f=c):(n(f,c),c=Pl(d,f.mode,v),c.return=f,f=c),o(f)):n(f,c)}return A}var Cn=vc(!0),wc=vc(!1),Ss=Ft(null),bs=null,xn=null,Yi=null;function Zi(){Yi=xn=bs=null}function Ji(e){var t=Ss.current;te(Ss),e._currentValue=t}function ai(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function jn(e,t){bs=e,Yi=xn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pe=!0),e.firstContext=null)}function Qe(e){var t=e._currentValue;if(Yi!==e)if(e={context:e,memoizedValue:t,next:null},xn===null){if(bs===null)throw Error(_(308));xn=e,bs.dependencies={lanes:0,firstContext:e}}else xn=xn.next=e;return t}var Gt=null;function Xi(e){Gt===null?Gt=[e]:Gt.push(e)}function Nc(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Xi(t)):(n.next=s.next,s.next=n),t.interleaved=n,gt(e,r)}function gt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var St=!1;function eo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function pt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Mt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,W&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,gt(e,n)}return s=r.interleaved,s===null?(t.next=t,Xi(r)):(t.next=s.next,s.next=t),r.interleaved=t,gt(e,n)}function rs(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$i(e,n)}}function Ca(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _s(e,t,n,r){var s=e.updateQueue;St=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var u=a,m=u.next;u.next=null,o===null?i=m:o.next=m,o=u;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==o&&(a===null?h.firstBaseUpdate=m:a.next=m,h.lastBaseUpdate=u))}if(i!==null){var y=s.baseState;o=0,h=m=u=null,a=i;do{var x=a.lane,j=a.eventTime;if((r&x)===x){h!==null&&(h=h.next={eventTime:j,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var k=e,w=a;switch(x=t,j=n,w.tag){case 1:if(k=w.payload,typeof k=="function"){y=k.call(j,y,x);break e}y=k;break e;case 3:k.flags=k.flags&-65537|128;case 0:if(k=w.payload,x=typeof k=="function"?k.call(j,y,x):k,x==null)break e;y=le({},y,x);break e;case 2:St=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,x=s.effects,x===null?s.effects=[a]:x.push(a))}else j={eventTime:j,lane:x,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(m=h=j,u=y):h=h.next=j,o|=x;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;x=a,a=x.next,x.next=null,s.lastBaseUpdate=x,s.shared.pending=null}}while(!0);if(h===null&&(u=y),s.baseState=u,s.firstBaseUpdate=m,s.lastBaseUpdate=h,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);tn|=o,e.lanes=o,e.memoizedState=y}}function Ta(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=bl.transition;bl.transition={};try{e(!1),t()}finally{q=n,bl.transition=r}}function $c(){return We().memoizedState}function $m(e,t,n){var r=Dt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Fc(e))Bc(t,n);else if(n=Nc(e,t,n,r),n!==null){var s=be();Xe(n,e,r,s),Vc(n,t,r)}}function Fm(e,t,n){var r=Dt(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fc(e))Bc(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,et(a,o)){var u=t.interleaved;u===null?(s.next=s,Xi(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=Nc(e,t,s,r),n!==null&&(s=be(),Xe(n,e,r,s),Vc(n,t,r))}}function Fc(e){var t=e.alternate;return e===se||t!==null&&t===se}function Bc(e,t){er=Cs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,$i(e,n)}}var Ts={readContext:Qe,useCallback:ve,useContext:ve,useEffect:ve,useImperativeHandle:ve,useInsertionEffect:ve,useLayoutEffect:ve,useMemo:ve,useReducer:ve,useRef:ve,useState:ve,useDebugValue:ve,useDeferredValue:ve,useTransition:ve,useMutableSource:ve,useSyncExternalStore:ve,useId:ve,unstable_isNewReconciler:!1},Bm={readContext:Qe,useCallback:function(e,t){return st().memoizedState=[e,t===void 0?null:t],e},useContext:Qe,useEffect:La,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ls(4194308,4,Ac.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ls(4194308,4,e,t)},useInsertionEffect:function(e,t){return ls(4,2,e,t)},useMemo:function(e,t){var n=st();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=st();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=$m.bind(null,se,e),[r.memoizedState,e]},useRef:function(e){var t=st();return e={current:e},t.memoizedState=e},useState:Pa,useDebugValue:ao,useDeferredValue:function(e){return st().memoizedState=e},useTransition:function(){var e=Pa(!1),t=e[0];return e=Im.bind(null,e[1]),st().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=se,s=st();if(ne){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),me===null)throw Error(_(349));en&30||_c(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,La(Cc.bind(null,r,i,e),[e]),r.flags|=2048,wr(9,Ec.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=st(),t=me.identifierPrefix;if(ne){var n=mt,r=ft;n=(r&~(1<<32-Je(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=yr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[lt]=t,e[hr]=r,Jc(e,t,!1,!1),t.stateNode=e;e:{switch(o=Hl(n,r),n){case"dialog":ee("cancel",e),ee("close",e),s=r;break;case"iframe":case"object":case"embed":ee("load",e),s=r;break;case"video":case"audio":for(s=0;sLn&&(t.flags|=128,r=!0,Un(i,!1),t.lanes=4194304)}else{if(!r)if(e=Es(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Un(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ne)return we(t),null}else 2*oe()-i.renderingStartTime>Ln&&n!==1073741824&&(t.flags|=128,r=!0,Un(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=oe(),t.sibling=null,n=re.current,J(re,r?n&1|2:n&1),t):(we(t),null);case 22:case 23:return ho(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?De&1073741824&&(we(t),t.subtreeFlags&6&&(t.flags|=8192)):we(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function qm(e,t){switch(Gi(t),t.tag){case 1:return ze(t.type)&&ws(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Tn(),te(Le),te(ke),ro(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return no(t),null;case 13:if(te(re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));En()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(re),null;case 4:return Tn(),null;case 10:return Ji(t.type._context),null;case 22:case 23:return ho(),null;case 24:return null;default:return null}}var qr=!1,Ne=!1,Ym=typeof WeakSet=="function"?WeakSet:Set,M=null;function gn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ie(e,t,r)}else n.current=null}function gi(e,t,n){try{n()}catch(r){ie(e,t,r)}}var Va=!1;function Zm(e,t){if(ei=xs,e=lc(),Wi(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,u=-1,m=0,h=0,y=e,x=null;t:for(;;){for(var j;y!==n||s!==0&&y.nodeType!==3||(a=o+s),y!==i||r!==0&&y.nodeType!==3||(u=o+r),y.nodeType===3&&(o+=y.nodeValue.length),(j=y.firstChild)!==null;)x=y,y=j;for(;;){if(y===e)break t;if(x===n&&++m===s&&(a=o),x===i&&++h===r&&(u=o),(j=y.nextSibling)!==null)break;y=x,x=y.parentNode}y=j}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},xs=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var k=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(k!==null){var w=k.memoizedProps,A=k.memoizedState,f=t.stateNode,c=f.getSnapshotBeforeUpdate(t.elementType===t.type?w:Ge(t.type,w),A);f.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(v){ie(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return k=Va,Va=!1,k}function tr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&gi(t,n,i)}s=s.next}while(s!==r)}}function Hs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function yi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function td(e){var t=e.alternate;t!==null&&(e.alternate=null,td(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[lt],delete t[hr],delete t[si],delete t[Mm],delete t[Am])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function nd(e){return e.tag===5||e.tag===3||e.tag===4}function Ua(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function vi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=vs));else if(r!==4&&(e=e.child,e!==null))for(vi(e,t,n),e=e.sibling;e!==null;)vi(e,t,n),e=e.sibling}function wi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(wi(e,t,n),e=e.sibling;e!==null;)wi(e,t,n),e=e.sibling}var pe=null,qe=!1;function kt(e,t,n){for(n=n.child;n!==null;)rd(e,t,n),n=n.sibling}function rd(e,t,n){if(it&&typeof it.onCommitFiberUnmount=="function")try{it.onCommitFiberUnmount(Rs,n)}catch{}switch(n.tag){case 5:Ne||gn(n,t);case 6:var r=pe,s=qe;pe=null,kt(e,t,n),pe=r,qe=s,pe!==null&&(qe?(e=pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pe.removeChild(n.stateNode));break;case 18:pe!==null&&(qe?(e=pe,n=n.stateNode,e.nodeType===8?kl(e.parentNode,n):e.nodeType===1&&kl(e,n),cr(e)):kl(pe,n.stateNode));break;case 4:r=pe,s=qe,pe=n.stateNode.containerInfo,qe=!0,kt(e,t,n),pe=r,qe=s;break;case 0:case 11:case 14:case 15:if(!Ne&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&gi(n,t,o),s=s.next}while(s!==r)}kt(e,t,n);break;case 1:if(!Ne&&(gn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ie(n,t,a)}kt(e,t,n);break;case 21:kt(e,t,n);break;case 22:n.mode&1?(Ne=(r=Ne)||n.memoizedState!==null,kt(e,t,n),Ne=r):kt(e,t,n);break;default:kt(e,t,n)}}function Ha(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ym),t.forEach(function(r){var s=ip.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Ke(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=o),r&=~i}if(r=s,r=oe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Xm(r/1960))-r,10e?16:e,Ct===null)var r=!1;else{if(e=Ct,Ct=null,zs=0,W&6)throw Error(_(331));var s=W;for(W|=4,M=e.current;M!==null;){var i=M,o=i.child;if(M.flags&16){var a=i.deletions;if(a!==null){for(var u=0;uoe()-mo?Yt(e,0):fo|=n),Me(e,t)}function dd(e,t){t===0&&(e.mode&1?(t=Fr,Fr<<=1,!(Fr&130023424)&&(Fr=4194304)):t=1);var n=be();e=gt(e,t),e!==null&&(br(e,t,n),Me(e,n))}function lp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dd(e,n)}function ip(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),dd(e,n)}var fd;fd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Le.current)Pe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pe=!1,Km(e,t,n);Pe=!!(e.flags&131072)}else Pe=!1,ne&&t.flags&1048576&&xc(t,js,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;is(e,t),e=t.pendingProps;var s=_n(t,ke.current);jn(t,n),s=lo(null,t,r,e,s,n);var i=io();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ze(r)?(i=!0,Ns(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,eo(t),s.updater=Us,t.stateNode=s,s._reactInternals=t,ci(t,r,e,n),t=mi(null,t,r,!0,i,n)):(t.tag=0,ne&&i&&Ki(t),Se(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(is(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=ap(r),e=Ge(r,e),s){case 0:t=fi(null,t,r,e,n);break e;case 1:t=$a(null,t,r,e,n);break e;case 11:t=Oa(null,t,r,e,n);break e;case 14:t=Ia(null,t,r,Ge(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ge(r,s),fi(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ge(r,s),$a(e,t,r,s,n);case 3:e:{if(qc(t),e===null)throw Error(_(387));r=t.pendingProps,i=t.memoizedState,s=i.element,kc(e,t),_s(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Pn(Error(_(423)),t),t=Fa(e,t,r,n,s);break e}else if(r!==s){s=Pn(Error(_(424)),t),t=Fa(e,t,r,n,s);break e}else for(Re=zt(t.stateNode.containerInfo.firstChild),Oe=t,ne=!0,Ye=null,n=wc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(En(),r===s){t=yt(e,t,n);break e}Se(e,t,r,n)}t=t.child}return t;case 5:return jc(t),e===null&&oi(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,ni(r,s)?o=null:i!==null&&ni(r,i)&&(t.flags|=32),Gc(e,t),Se(e,t,o,n),t.child;case 6:return e===null&&oi(t),null;case 13:return Yc(e,t,n);case 4:return to(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Cn(t,null,r,n):Se(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ge(r,s),Oa(e,t,r,s,n);case 7:return Se(e,t,t.pendingProps,n),t.child;case 8:return Se(e,t,t.pendingProps.children,n),t.child;case 12:return Se(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,J(Ss,r._currentValue),r._currentValue=o,i!==null)if(et(i.value,o)){if(i.children===s.children&&!Le.current){t=yt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=pt(-1,n&-n),u.tag=2;var m=i.updateQueue;if(m!==null){m=m.shared;var h=m.pending;h===null?u.next=u:(u.next=h.next,h.next=u),m.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),ai(i.return,n,t),a.lanes|=n;break}u=u.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(_(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),ai(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Se(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,jn(t,n),s=Qe(s),r=r(s),t.flags|=1,Se(e,t,r,n),t.child;case 14:return r=t.type,s=Ge(r,t.pendingProps),s=Ge(r.type,s),Ia(e,t,r,s,n);case 15:return Wc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ge(r,s),is(e,t),t.tag=1,ze(r)?(e=!0,Ns(t)):e=!1,jn(t,n),Uc(t,r,s),ci(t,r,s,n),mi(null,t,r,!0,e,n);case 19:return Zc(e,t,n);case 22:return Kc(e,t,n)}throw Error(_(156,t.tag))};function md(e,t){return Fu(e,t)}function op(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ue(e,t,n,r){return new op(e,t,n,r)}function go(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ap(e){if(typeof e=="function")return go(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Di)return 11;if(e===Ri)return 14}return 2}function Rt(e,t){var n=e.alternate;return n===null?(n=Ue(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function us(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")go(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case an:return Zt(n.children,s,i,t);case Ai:o=8,s|=8;break;case Al:return e=Ue(12,n,t,s|2),e.elementType=Al,e.lanes=i,e;case Dl:return e=Ue(13,n,t,s),e.elementType=Dl,e.lanes=i,e;case Rl:return e=Ue(19,n,t,s),e.elementType=Rl,e.lanes=i,e;case ju:return Ws(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Nu:o=10;break e;case ku:o=9;break e;case Di:o=11;break e;case Ri:o=14;break e;case jt:o=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=Ue(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Zt(e,t,n,r){return e=Ue(7,e,r,t),e.lanes=n,e}function Ws(e,t,n,r){return e=Ue(22,e,r,t),e.elementType=ju,e.lanes=n,e.stateNode={isHidden:!1},e}function Pl(e,t,n){return e=Ue(6,e,null,t),e.lanes=n,e}function Ll(e,t,n){return t=Ue(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function up(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=dl(0),this.expirationTimes=dl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function yo(e,t,n,r,s,i,o,a,u){return e=new up(e,t,n,a,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ue(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},eo(i),e}function cp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gd)}catch(e){console.error(e)}}gd(),gu.exports=$e;var hp=gu.exports,Ja=hp;zl.createRoot=Ja.createRoot,zl.hydrateRoot=Ja.hydrateRoot;/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const xp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),yd=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */var gp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const yp=N.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},u)=>N.createElement("svg",{ref:u,...gp,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:yd("lucide",s),...a},[...o.map(([m,h])=>N.createElement(m,h)),...Array.isArray(i)?i:[i]]));/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const V=(e,t)=>{const n=N.forwardRef(({className:r,...s},i)=>N.createElement(yp,{ref:i,iconNode:t,className:yd(`lucide-${xp(e)}`,r),...s}));return n.displayName=`${e}`,n};/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vd=V("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wd=V("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const vp=V("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Xa=V("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Tr=V("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const wp=V("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Np=V("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zn=V("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ut=V("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kr=V("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kp=V("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Nd=V("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jp=V("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const eu=V("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Zs=V("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sp=V("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bp=V("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bi=V("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ko=V("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _p=V("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ep=V("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const tu=V("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jr=V("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Cp=V("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const at=V("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Tp=V("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const kd=V("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Pp=V("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const nu=V("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Lp=V("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const zp=V("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jd=V("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Sd=V("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Mp=V("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ap=V("TableProperties",[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Ze=V("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const jo=V("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const Dp=V("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const ru=V("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const cs=V("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const bd=V("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** + * @license lucide-react v0.424.0 - ISC + * + * This source code is licensed under the ISC license. + * See the LICENSE file in the root directory of this source tree. + */const _d=V("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Rp({branding:e,user:t,activeTab:n,onChangeTab:r,themeMode:s,onChangeThemeMode:i,onLogout:o,onOpenAuth:a,onOpenCreateEvent:u,onOpenTemplates:m,onOpenProfile:h,onOpenAdmin:y,pwaInstallPrompt:x,onInstallPwa:j}){const k=(e==null?void 0:e.primary_color)||"var(--brand-primary)",w=()=>{i(s==="dark"?"light":s==="light"?"auto":"dark")};return l.jsxs("header",{className:"bg-surface border-b border-grid sticky top-0 z-40",children:[l.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"flex items-center space-x-3 shrink-0",children:[l.jsx("div",{onClick:()=>r("home"),style:{backgroundColor:k},className:"w-8 h-8 rounded-sm flex items-center justify-center text-white font-bold cursor-pointer shadow-sm",children:e!=null&&e.logo_url?l.jsx("img",{src:e.logo_url,alt:"Logo",className:"w-4 h-4 object-contain"}):l.jsx(Tr,{className:"w-4 h-4"})}),l.jsxs("div",{onClick:()=>r("home"),className:"cursor-pointer",children:[l.jsx("h1",{className:"font-serif text-base font-bold tracking-tight text-main leading-none",children:(e==null?void 0:e.app_name)||"Schichtplaner"}),l.jsx("div",{className:"text-[10px] font-mono text-muted mt-1 uppercase tracking-wider flex items-center gap-1.5",children:t?l.jsxs("span",{className:"text-emerald-500 font-semibold",children:["[ ",t.display_name||t.username," ]"]}):l.jsx("span",{className:"text-amber-500 font-semibold",children:"[ GAST-MODUS ]"})})]})]}),l.jsxs("nav",{className:"hidden md:flex items-center gap-2",children:[l.jsxs("button",{onClick:()=>r("home"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="home"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[l.jsx(eu,{className:"w-3.5 h-3.5"})," Startseite"]}),l.jsxs("button",{onClick:()=>r("calendar"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="calendar"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[l.jsx(Xa,{className:"w-3.5 h-3.5"})," Kalender"]}),((t==null?void 0:t.is_admin_user)||(t==null?void 0:t.is_staff)||(t==null?void 0:t.is_superuser))&&l.jsxs("button",{onClick:()=>r("admin"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="admin"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[l.jsx(nu,{className:"w-3.5 h-3.5 text-indigo-400"})," Admin"]})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("button",{onClick:w,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5",title:`Design-Modus: ${s.toUpperCase()}`,children:s==="dark"?l.jsxs(l.Fragment,{children:[l.jsx(Ep,{className:"w-3.5 h-3.5 text-indigo-400"}),l.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"DARK"})]}):s==="light"?l.jsxs(l.Fragment,{children:[l.jsx(Mp,{className:"w-3.5 h-3.5 text-amber-500"}),l.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"LIGHT"})]}):l.jsxs(l.Fragment,{children:[l.jsx(_p,{className:"w-3.5 h-3.5 text-blue-500"}),l.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"AUTO"})]})}),x&&l.jsxs("button",{onClick:j,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-emerald-500/10 text-emerald-500 border border-emerald-500/20 hover:bg-emerald-500/20 transition flex items-center gap-1",children:[l.jsx(Sd,{className:"w-3 h-3"})," PWA"]}),t?l.jsxs(l.Fragment,{children:[l.jsxs("button",{onClick:u,style:{backgroundColor:k},className:"h-8 px-3 rounded-sm text-xs font-mono font-bold text-white transition flex items-center gap-1 shadow-sm hover:brightness-110",children:[l.jsx(at,{className:"w-3.5 h-3.5"})," Event"]}),l.jsxs("button",{onClick:m,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition hidden sm:flex items-center gap-1",title:"Vorlagen",children:[l.jsx(Zs,{className:"w-3.5 h-3.5 text-muted"})," Vorlagen"]}),l.jsxs("button",{onClick:h,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1",title:"Profil & Namen ändern",children:[l.jsx(jr,{className:"w-3.5 h-3.5 text-amber-500"})," Profil"]}),(t.is_admin_user||t.is_staff||t.is_superuser)&&l.jsxs("button",{onClick:()=>r("admin"),className:`h-8 px-2.5 rounded-sm text-xs font-mono transition flex items-center gap-1 border ${n==="admin"?"bg-indigo-500/20 text-indigo-300 border-indigo-500/40 font-bold":"bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border-indigo-500/30"}`,title:"Admin-Zentrale",children:[l.jsx(nu,{className:"w-3.5 h-3.5"})," Admin"]}),l.jsx("div",{className:"h-4 w-px bg-grid mx-1"}),l.jsx("button",{onClick:o,className:"h-8 w-8 rounded-sm text-muted hover:text-red-500 hover:bg-red-500/10 border border-transparent hover:border-red-500/20 transition flex items-center justify-center",title:"Abmelden",children:l.jsx(bp,{className:"w-3.5 h-3.5"})})]}):l.jsxs("button",{onClick:a,style:{backgroundColor:k},className:"h-8 px-3.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 flex items-center gap-1.5 shadow-sm",children:[l.jsx(cs,{className:"w-3.5 h-3.5"})," Anmelden"]})]})]}),l.jsxs("div",{className:"flex md:hidden items-center justify-around border-t border-grid py-2 bg-subtle text-xs font-mono",children:[l.jsxs("button",{onClick:()=>r("home"),className:`flex items-center gap-1 px-3 py-1.5 rounded-sm border ${n==="home"?"text-main font-bold bg-surface border-grid":"text-muted border-transparent"}`,children:[l.jsx(eu,{className:"w-3.5 h-3.5"})," Start"]}),l.jsxs("button",{onClick:()=>r("calendar"),className:`flex items-center gap-1 px-3 py-1.5 rounded-sm border ${n==="calendar"?"text-main font-bold bg-surface border-grid":"text-muted border-transparent"}`,children:[l.jsx(Xa,{className:"w-3.5 h-3.5"})," Termine"]}),l.jsxs("button",{onClick:()=>r("schedule"),className:`flex items-center gap-1 px-3 py-1.5 rounded-sm border ${n==="schedule"?"text-main font-bold bg-surface border-grid":"text-muted border-transparent"}`,children:[l.jsx(Ap,{className:"w-3.5 h-3.5"})," Schichtplan"]})]})]})}function Op({event:e,user:t,onSignupClick:n,onCancelClick:r,onRemoveUserFromShift:s,onGenerateClaimLink:i,onExportPdf:o,onPrintView:a,onEditEvent:u,onDeleteEvent:m}){var j,k,w;if(!e||!e.task_areas||e.task_areas.length===0)return l.jsxs("div",{className:"hallmark-panel rounded-sm p-12 text-center border border-grid font-mono",children:[l.jsx(kr,{className:"w-8 h-8 text-muted mx-auto mb-3"}),l.jsx("h3",{className:"font-serif text-xl font-bold text-main uppercase",children:"Keine Aufgabenfelder vorhanden"}),l.jsx("p",{className:"text-xs text-muted mt-1 mb-4",children:"[ Event hat noch keine definierten Aufgabenfelder oder Schichten ]"}),t&&(t.is_admin_user||t.is_staff||t.is_superuser||(e==null?void 0:e.created_by)===t.id||((j=e==null?void 0:e.created_by)==null?void 0:j.id)===t.id||(e==null?void 0:e.co_managers)&&e.co_managers.some(A=>typeof A=="object"?A.id===t.id:A===t.id))&&u&&l.jsxs("button",{onClick:()=>u(e),className:"px-4 py-2 rounded-sm bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border border-indigo-500/30 font-bold text-xs inline-flex items-center gap-2",children:[l.jsx(jr,{className:"w-4 h-4"})," SCHICHTEN & BEREICHE ANLEGEN"]})]});const h=!t,y=t&&(e==null?void 0:e.co_managers)&&e.co_managers.some(A=>typeof A=="object"?A.id===t.id:A===t.id),x=t&&(t.is_admin_user||t.is_staff||t.is_superuser||(e==null?void 0:e.created_by)===t.id||((k=e==null?void 0:e.created_by)==null?void 0:k.id)===t.id||y);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid flex flex-col md:flex-row md:items-center justify-between gap-4",children:[l.jsxs("div",{className:"space-y-1 font-mono",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted mb-1",children:[l.jsxs("span",{className:"bg-subtle px-2.5 py-0.5 rounded-sm border border-grid font-bold text-main",children:[new Date(e.start_date).toLocaleDateString("de-DE")," — ",new Date(e.end_date).toLocaleDateString("de-DE")]}),e.location&&l.jsxs("span",{className:"flex items-center gap-1 text-muted",children:[l.jsx(ko,{className:"w-3.5 h-3.5 shrink-0"}),e.location]}),e.is_active===!1&&l.jsx("span",{className:"px-2 py-0.5 rounded-sm bg-amber-500/10 text-amber-500 border border-amber-500/20 font-bold",children:"[ DEAKTIVIERT ]"})]}),l.jsx("h2",{className:"font-serif text-3xl sm:text-4xl font-bold uppercase tracking-tight text-main",children:e.title}),e.description&&l.jsx("p",{className:"text-xs font-sans text-muted max-w-2xl mt-1",children:e.description})]}),l.jsxs("div",{className:"flex items-center gap-2 no-print font-mono text-xs shrink-0",children:[x&&u&&l.jsxs("button",{onClick:()=>u(e),className:"px-3.5 py-1.5 rounded-sm bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border border-indigo-500/30 transition flex items-center gap-1.5 font-bold",title:"Schichten und Aufgabenbereiche für diese Veranstaltung bearbeiten",children:[l.jsx(jr,{className:"w-3.5 h-3.5"})," SCHICHTEN BEARBEITEN"]}),t&&(t.is_admin_user||t.is_staff||t.is_superuser||(e==null?void 0:e.created_by)===t.id||((w=e==null?void 0:e.created_by)==null?void 0:w.id)===t.id)&&m&&l.jsxs("button",{onClick:()=>m(e),className:"px-3.5 py-1.5 rounded-sm bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/30 transition flex items-center gap-1.5 font-bold",title:"Diese Veranstaltung unwiderruflich löschen",children:[l.jsx(Ze,{className:"w-3.5 h-3.5"})," LÖSCHEN"]}),l.jsxs("button",{onClick:a,className:"px-3.5 py-1.5 rounded-sm bg-surface hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5 font-bold",children:[l.jsx(Tp,{className:"w-3.5 h-3.5"})," DRUCKEN"]}),l.jsxs("button",{onClick:o,className:"px-3.5 py-1.5 rounded-sm bg-surface hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5 font-bold",children:[l.jsx(kp,{className:"w-3.5 h-3.5"})," PDF"]})]})]}),h&&l.jsxs("div",{className:"p-3.5 rounded-sm bg-amber-500/10 border border-amber-500/20 text-amber-500 text-xs font-mono flex items-center gap-2",children:[l.jsx(jd,{className:"w-4 h-4 shrink-0 text-amber-500"}),l.jsxs("span",{children:["[ GAST-DATENSCHUTZ ]: Belegungszahlen sichtbar, Namensanzeige aus Datenschutzgründen ",l.jsx("strong",{children:"anonymisiert"}),"."]})]}),l.jsx("div",{className:"hallmark-panel rounded-sm border border-grid overflow-hidden",children:l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-left border-collapse",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"bg-subtle border-b border-grid text-[11px] font-mono text-muted uppercase tracking-wider",children:[l.jsx("th",{className:"py-3.5 px-4 w-1/4",children:"Aufgabenfeld"}),l.jsx("th",{className:"py-3.5 px-4 w-1/4",children:"Schicht & Zeitraum"}),l.jsx("th",{className:"py-3.5 px-4 w-1/6",children:"Qualifikation"}),l.jsx("th",{className:"py-3.5 px-4 w-1/4",children:"Belegung & Personen"}),l.jsx("th",{className:"py-3.5 px-4 w-1/6 text-right",children:"Aktion"})]})}),l.jsx("tbody",{className:"divide-y divide-grid text-xs font-sans",children:e.task_areas.map(A=>!A.shifts||A.shifts.length===0?l.jsxs("tr",{children:[l.jsx("td",{className:"py-3.5 px-4 font-serif text-lg font-bold text-main uppercase",children:A.name}),l.jsx("td",{colSpan:4,className:"py-3.5 px-4 text-muted font-mono text-[11px]",children:"[ Keine Schichten angelegt ]"})]},`area-${A.id}`):A.shifts.map((f,c)=>{const d=c===0,v=f.is_full,E=!!(t?f.signups.find(b=>!b.is_guest&&b.display_name===t.display_name):null),P=f.required_skills&&f.required_skills.length>0;return l.jsxs("tr",{className:"hover:bg-surface-hover/60 transition",children:[d?l.jsxs("td",{rowSpan:A.shifts.length,className:"py-3.5 px-4 font-serif text-lg font-bold text-main uppercase bg-subtle/80 align-top border-r border-grid",children:[l.jsx("div",{children:A.name}),A.description&&l.jsx("div",{className:"text-[11px] font-sans font-normal text-muted mt-0.5",children:A.description})]}):null,l.jsxs("td",{className:"py-3.5 px-4",children:[l.jsxs("div",{className:"font-semibold text-main flex items-center gap-2 flex-wrap",children:[l.jsx("span",{children:f.title}),f.date&&l.jsxs("span",{className:"text-[10px] font-mono font-bold text-indigo-400 bg-indigo-500/10 px-2 py-0.5 rounded-sm border border-indigo-500/20",children:["📅 ",new Date(f.date+"T00:00:00").toLocaleDateString("de-DE",{weekday:"short",day:"2-digit",month:"2-digit"})]})]}),l.jsxs("div",{className:"text-[11px] font-mono text-muted flex items-center gap-1 mt-0.5",children:[l.jsx(kr,{className:"w-3 h-3 text-muted shrink-0"}),l.jsxs("span",{children:[f.start_time," — ",f.end_time," Uhr"]})]})]}),l.jsx("td",{className:"py-3.5 px-4 font-mono",children:P?l.jsx("div",{className:"flex flex-wrap gap-1",children:f.required_skills.map(b=>l.jsxs("span",{style:{backgroundColor:`${b.color}15`,borderColor:`${b.color}35`,color:b.color},className:"px-2 py-0.5 rounded-sm text-[10px] font-semibold border flex items-center gap-1",children:[l.jsx(vp,{className:"w-3 h-3 shrink-0"})," ",b.name]},b.id))}):l.jsx("span",{className:"text-[11px] text-muted",children:"—"})}),l.jsxs("td",{className:"py-3.5 px-4 font-mono",children:[l.jsx("div",{className:"flex items-center gap-2",children:l.jsxs("span",{className:`px-2 py-0.5 rounded-sm text-[11px] font-bold border ${v?"bg-red-500/10 text-red-500 border-red-500/20":"bg-emerald-500/10 text-emerald-500 border-emerald-500/20"}`,children:["[ ",f.signups_count," / ",f.max_participants," BELEGT ]"]})}),l.jsx("div",{className:"mt-2 space-y-1 font-sans",children:f.signups.map(b=>l.jsxs("div",{className:"text-[11px] text-muted flex items-center justify-between gap-2 p-1.5 rounded-sm bg-subtle border border-grid",children:[l.jsxs("div",{className:"flex items-center gap-1.5 truncate",children:[l.jsx(jo,{className:"w-3 h-3 text-muted shrink-0"}),l.jsx("span",{className:"truncate",children:b.display_name}),b.is_guest&&l.jsx("span",{className:"text-[9px] font-mono text-amber-500 px-1 rounded-sm bg-amber-500/10 border border-amber-500/20 font-bold",children:"GAST"})]}),l.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[t&&b.is_guest&&i&&l.jsxs("button",{onClick:()=>i(b),className:"text-indigo-400 hover:text-indigo-300 transition p-1 rounded-sm bg-indigo-500/10 hover:bg-indigo-500/20 border border-indigo-500/20 flex items-center gap-1 text-[10px] font-mono font-bold",title:"Konto-Einladungslink für diese Gast-Eintragung kopieren",children:[l.jsx(Dp,{className:"w-3 h-3"})," LINK"]}),x&&s&&l.jsx("button",{onClick:()=>s(f,b.id),className:"text-muted hover:text-red-500 transition p-1 rounded-sm hover:bg-red-500/10",title:"Person aus dieser Schicht entfernen",children:l.jsx(ru,{className:"w-3.5 h-3.5"})})]})]},b.id))})]}),l.jsx("td",{className:"py-3.5 px-4 text-right font-mono",children:E?l.jsxs("button",{onClick:()=>r(f),className:"px-3 py-1.5 rounded-sm text-xs font-semibold bg-red-500/10 hover:bg-red-500/20 text-red-500 border border-red-500/20 transition flex items-center gap-1 ml-auto",children:[l.jsx(ru,{className:"w-3.5 h-3.5"})," AUSTRAGEN"]}):v?l.jsx("span",{className:"text-xs text-muted font-bold",children:"[ VOLL ]"}):l.jsxs("button",{onClick:()=>n(f),style:{backgroundColor:"var(--brand-primary)"},className:"px-3.5 py-1.5 rounded-sm text-xs font-bold text-white transition hover:brightness-110 flex items-center gap-1 ml-auto shadow-sm",children:[l.jsx(ut,{className:"w-3.5 h-3.5"})," EINTRAGEN"]})})]},`shift-${f.id}`)}))})]})})})]})}function Ip({shift:e,onClose:t,onSubmit:n}){const[r,s]=N.useState(""),[i,o]=N.useState(""),[a,u]=N.useState(!1),[m,h]=N.useState(""),[y,x]=N.useState(!1);N.useEffect(()=>{const w=localStorage.getItem("guest_display_name")||"";w&&s(w)},[]);const j=()=>{const w="acaptcha-verified-"+Math.random().toString(36).substring(2,10);o(w),u(!0)},k=async w=>{if(w.preventDefault(),h(""),!r.trim()){h("Bitte gib deinen Namen ein.");return}if(!a||!i){h("Bitte löse zuerst das Captcha.");return}localStorage.setItem("guest_display_name",r.trim()),x(!0);try{await n({guest_name:r.trim(),captcha_token:i}),t()}catch(A){h(A.message||"Eintragen fehlgeschlagen.")}finally{x(!1)}};return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/80 backdrop-blur-sm",children:l.jsxs("div",{className:"glass-panel w-full max-w-md rounded-2xl border border-slate-800 p-6 shadow-2xl relative animate-in fade-in zoom-in-95 duration-200",children:[l.jsx("button",{onClick:t,className:"absolute top-4 right-4 p-2 text-slate-400 hover:text-white rounded-lg transition",children:l.jsx(_d,{className:"w-5 h-5"})}),l.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[l.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-500/10 text-blue-400 border border-blue-500/20 flex items-center justify-center",children:l.jsx(jo,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-bold text-lg text-white",children:"Als Gast eintragen"}),l.jsxs("p",{className:"text-xs text-slate-400",children:["Schicht: ",e==null?void 0:e.title," (",e==null?void 0:e.start_time," - ",e==null?void 0:e.end_time,")"]})]})]}),m&&l.jsxs("div",{className:"mb-4 p-3 rounded-xl bg-red-500/10 border border-red-500/20 text-red-400 text-xs flex items-center gap-2",children:[l.jsx(zn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:m})]}),l.jsxs("form",{onSubmit:k,className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-slate-300 mb-1",children:"Dein Name / Anzeigename"}),l.jsx("input",{type:"text",required:!0,value:r,onChange:w=>s(w.target.value),placeholder:"z. B. Alex Muster",className:"w-full px-3.5 py-2.5 rounded-xl bg-slate-900 border border-slate-800 text-white text-sm focus:outline-none focus:border-blue-500 transition"}),l.jsx("p",{className:"text-[11px] text-slate-500 mt-1",children:"Dein Name wird in deiner Sitzung gespeichert. Falls du später ein Konto mit diesem Namen erstellst, werden deine Gast-Schichten automatisch übertragen!"})]}),l.jsxs("div",{className:"p-4 rounded-xl bg-slate-900/90 border border-slate-800 space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"text-xs font-semibold text-slate-300 flex items-center gap-1.5",children:[l.jsx(zp,{className:"w-4 h-4 text-emerald-400"})," Security Check (acaptcha.vercel.app)"]}),l.jsx("a",{href:"https://acaptcha.vercel.app/",target:"_blank",rel:"noreferrer",className:"text-[10px] text-blue-400 hover:underline",children:"Website öffnen"})]}),l.jsxs("div",{className:"border border-dashed border-slate-700 rounded-lg p-3 text-center bg-slate-950/60",children:[l.jsx("iframe",{src:"https://acaptcha.vercel.app/",title:"acaptcha",className:"w-full h-16 border-0 rounded"}),l.jsx("div",{className:"mt-2 flex items-center justify-center gap-2",children:a?l.jsxs("div",{className:"text-xs font-medium text-emerald-400 flex items-center gap-1",children:[l.jsx(ut,{className:"w-4 h-4"})," Captcha erfolgreich verifiziert!"]}):l.jsxs("button",{type:"button",onClick:j,className:"px-3 py-1.5 text-xs font-semibold rounded-lg bg-emerald-600 hover:bg-emerald-500 text-white transition flex items-center gap-1",children:[l.jsx(ut,{className:"w-3.5 h-3.5"})," Captcha gelöst bestätigen"]})})]})]}),l.jsxs("div",{className:"pt-2 flex justify-end gap-2",children:[l.jsx("button",{type:"button",onClick:t,className:"px-4 py-2 rounded-xl text-xs font-semibold text-slate-400 hover:bg-slate-800 transition",children:"Abbrechen"}),l.jsx("button",{type:"submit",disabled:y,className:"px-5 py-2 rounded-xl text-xs font-bold bg-blue-600 hover:bg-blue-500 text-white transition shadow-lg shadow-blue-600/30 disabled:opacity-50",children:y?"Eintragen...":"Jetzt eintragen"})]})]})]})})}const $p="/api",_i=()=>localStorage.getItem("auth_token"),sr=e=>{e?localStorage.setItem("auth_token",e):localStorage.removeItem("auth_token")},F=async(e,t={})=>{const n=_i(),r={"Content-Type":"application/json",...n?{Authorization:`Token ${n}`}:{},...t.headers},s=await fetch(`${$p}${e}`,{...t,headers:r}),i=s.headers.get("content-type");let o=null;if(i&&i.includes("application/json")&&(o=await s.json()),!s.ok){let a="Ein Fehler ist aufgetreten.";throw o&&(typeof o.error=="string"?a=o.error:typeof o.detail=="string"?a=o.detail:o.email?a=Array.isArray(o.email)?o.email[0]:o.email:o.username?a=Array.isArray(o.username)?o.username[0]:o.username:o.non_field_errors&&(a=o.non_field_errors[0])),new Error(a)}return o},su=["#E05A47","#3B82F6","#10B981","#8B5CF6","#F59E0B","#EC4899","#06B6D4","#6366F1","#14B8A6","#F97316","#D97706","#059669","#7C3AED","#DB2777","#2563EB"],lu=()=>su[Math.floor(Math.random()*su.length)];function Fp({onClose:e,onSuccess:t,claimToken:n,prefilledGuestName:r}){const[s,i]=N.useState(!!(n||r)),[o,a]=N.useState(""),[u,m]=N.useState(""),[h,y]=N.useState(""),[x,j]=N.useState(r||""),[k,w]=N.useState(null),[A,f]=N.useState(""),[c,d]=N.useState(!1);N.useEffect(()=>{v()},[]);const v=async()=>{try{const E=await F("/users/restriction-setting/");w(E)}catch{}},S=async E=>{E.preventDefault(),f(""),d(!0);try{if(s){const P={username:o,email:u,password:h,display_name:x||o};n&&(P.claim_token=n);const b=await F("/users/register/",{method:"POST",body:JSON.stringify(P)});if(b.requires_verification||b.requires_approval||!b.token){t(null,b.message||"Konto erfolgreich registriert! Bitte schau in deine E-Mail zur Bestätigung oder warte auf die Admin-Freischaltung."),e();return}sr(b.token),t(b.user,b.message)}else{const P=await F("/users/login/",{method:"POST",body:JSON.stringify({username:o,password:h})});sr(P.token),t(P.user,"Erfolgreich angemeldet!")}e()}catch(P){f(P.message||"Authentifizierung fehlgeschlagen.")}finally{d(!1)}};return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm",children:l.jsxs("div",{className:"hallmark-panel w-full max-w-md rounded-sm border border-grid p-6 shadow-2xl relative animate-in fade-in zoom-in-95 duration-200",children:[l.jsx("button",{onClick:e,className:"absolute top-4 right-4 p-2 text-muted hover:text-main rounded-sm transition",children:l.jsx(_d,{className:"w-5 h-5"})}),l.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-blue-500/10 text-blue-500 border border-blue-500/20 flex items-center justify-center",children:l.jsx(cs,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-serif font-bold text-lg text-main",children:s?"Konto erstellen":"Anmelden"}),l.jsx("p",{className:"text-xs text-muted font-sans",children:s?"Erstelle einen Account für volle Funktionen & Schichteinsicht":"Melde dich an, um Events zu verwalten"})]})]}),r&&l.jsxs("div",{className:"mb-4 p-3 rounded-sm bg-amber-500/10 border border-amber-500/20 text-amber-500 text-xs flex items-center gap-2 font-mono",children:[l.jsx(Sd,{className:"w-4 h-4 shrink-0 text-amber-500"}),l.jsxs("span",{children:["Einladung für Gast: ",l.jsx("strong",{children:r}),". Die Schicht wird deinem neuen Konto zugewiesen!"]})]}),(k==null?void 0:k.is_restriction_enabled)&&s&&l.jsxs("div",{className:"mb-4 p-3 rounded-sm bg-indigo-500/10 border border-indigo-500/20 text-indigo-400 text-xs flex items-center gap-2 font-mono",children:[l.jsx(Lp,{className:"w-4 h-4 shrink-0 text-indigo-400"}),l.jsxs("span",{children:["Registrierungen beschränkt auf: ",l.jsx("strong",{children:k.active_domains.join(", ")})]})]}),A&&l.jsxs("div",{className:"mb-4 p-3 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs flex items-center gap-2 font-mono",children:[l.jsx(zn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:A})]}),!s&&!1,l.jsxs("form",{onSubmit:S,className:"space-y-4 font-sans",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"Benutzername"}),l.jsxs("div",{className:"relative",children:[l.jsx(cs,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),l.jsx("input",{type:"text",required:!0,value:o,onChange:E=>a(E.target.value),placeholder:"z. B. max_muster",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]}),s&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"E-Mail-Adresse"}),l.jsxs("div",{className:"relative",children:[l.jsx(bi,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),l.jsx("input",{type:"email",required:!0,value:u,onChange:E=>m(E.target.value),placeholder:"max@beispiel.de",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"Anzeigename (für Schichtlisten)"}),l.jsxs("div",{className:"relative",children:[l.jsx(cs,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),l.jsx("input",{type:"text",value:x,onChange:E=>j(E.target.value),placeholder:"z. B. Max M.",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"Passwort"}),l.jsxs("div",{className:"relative",children:[l.jsx(Sp,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),l.jsx("input",{type:"password",required:!0,value:h,onChange:E=>y(E.target.value),placeholder:"••••••••",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]}),l.jsx("button",{type:"submit",disabled:c,style:{backgroundColor:"var(--brand-primary)"},className:"w-full py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm",children:c?"Verarbeite...":s?"Registrieren":"Anmelden"})]}),l.jsx("div",{className:"mt-4 pt-4 border-t border-grid text-center",children:l.jsx("button",{type:"button",onClick:()=>{i(!s),f("")},className:"text-xs font-mono text-muted hover:text-main transition",children:s?"Bereits ein Konto? Hier anmelden":"Noch kein Konto? Jetzt registrieren"})})]})})}function Bp({events:e,user:t,onSelectEvent:n,onOpenCreateEvent:r,onToggleEventActive:s,onEditEvent:i,onDeleteEvent:o,branding:a}){const[u,m]=N.useState(""),[h,y]=N.useState("all"),x=new Date().toISOString().split("T")[0],j=e.filter(d=>d.title.toLowerCase().includes(u.toLowerCase())||d.description&&d.description.toLowerCase().includes(u.toLowerCase())||d.location&&d.location.toLowerCase().includes(u.toLowerCase())?h==="upcoming"?d.end_date>=x:!0:!1),k=(a==null?void 0:a.primary_color)||"var(--brand-primary)",w=(a==null?void 0:a.show_community_info_box)??!0,A=(a==null?void 0:a.show_support_box)??!0,f=w||A,c=t&&(t.is_admin_user||t.is_staff||t.is_superuser);return l.jsxs("div",{className:"space-y-8 animate-in fade-in duration-200",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 sm:p-10 space-y-6 max-w-5xl mx-auto relative border border-grid",children:[l.jsxs("div",{className:"space-y-2 border-b border-grid pb-6",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"font-mono text-[10px] uppercase tracking-widest text-muted border border-grid px-2.5 py-1 rounded-sm inline-block",children:(a==null?void 0:a.app_name)||"SCHICHT- & EVENTPORTAL"}),(a==null?void 0:a.custom_banner_text)&&l.jsxs("span",{className:"font-mono text-[10px] uppercase tracking-widest text-amber-500 bg-amber-500/10 border border-amber-500/20 px-2.5 py-1 rounded-sm inline-block font-bold",children:["📢 ",a.custom_banner_text]})]}),l.jsx("h2",{className:"font-serif text-3xl sm:text-5xl font-bold uppercase tracking-tight text-main leading-tight",children:"Veranstaltungen & Schichtkoordination"}),l.jsx("p",{className:"font-sans text-xs sm:text-sm text-muted max-w-2xl",children:"Hier findest du aktuelle Termine, Arbeitsgruppen, Bar- & Tresendienste und Schichtpläne der Initiative."})]}),l.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center justify-between gap-3",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsx(kd,{className:"w-4 h-4 absolute left-3.5 top-3 text-muted"}),l.jsx("input",{type:"text",value:u,onChange:d=>m(d.target.value),placeholder:"Veranstaltung, Ort oder Suchbegriff...",className:"w-full pl-10 pr-16 py-2 rounded-sm bg-subtle border border-grid text-main text-xs font-mono focus:outline-none focus:border-muted"}),u&&l.jsx("button",{onClick:()=>m(""),className:"absolute right-3 top-2.5 text-[10px] font-mono text-muted hover:text-main",children:"[ CLEAR ]"})]}),l.jsxs("div",{className:"flex items-center gap-1.5 font-mono text-xs shrink-0",children:[l.jsxs("button",{onClick:()=>y("all"),className:`px-3.5 py-1.5 rounded-sm transition border ${h==="all"?"bg-surface-hover text-main border-grid font-bold shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:["ALLE PROGRAMME (",e.length,")"]}),l.jsxs("button",{onClick:()=>y("upcoming"),className:`px-3.5 py-1.5 rounded-sm transition border ${h==="upcoming"?"bg-surface-hover text-main border-grid font-bold shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:["ANSTEHEND (",e.filter(d=>d.end_date>=x).length,")"]})]})]})]}),l.jsxs("div",{className:"max-w-5xl mx-auto grid grid-cols-1 lg:grid-cols-4 gap-6",children:[l.jsxs("div",{className:`${f?"lg:col-span-3":"lg:col-span-4"} space-y-4`,children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-3 font-mono",children:[l.jsxs("h3",{className:"font-serif text-xl font-bold uppercase tracking-wide text-main flex items-center gap-2",children:[l.jsx(Tr,{className:"w-4.5 h-4.5 text-muted"})," Termine & Schichten"]}),t&&l.jsxs("button",{onClick:r,style:{backgroundColor:k},className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold text-white transition flex items-center gap-1 hover:brightness-110 shadow-sm",children:[l.jsx(at,{className:"w-3.5 h-3.5"})," EVENT ANLEGEN"]})]}),j.length===0?l.jsx("div",{className:"hallmark-panel rounded-sm p-12 text-center text-xs font-mono text-muted border border-grid",children:u?`[ Keinen Eintrag für "${u}" gefunden ]`:"[ Keine Veranstaltungen vorhanden ]"}):l.jsx("div",{className:`grid grid-cols-1 sm:grid-cols-2 ${f?"":"lg:grid-cols-3"} gap-4`,children:j.map(d=>{var U,O,X,Y;const v=((U=d.task_areas)==null?void 0:U.length)||0,S=((O=d.task_areas)==null?void 0:O.reduce((G,ge)=>{var je;return G+(((je=ge.shifts)==null?void 0:je.length)||0)},0))||0,E=t&&d.co_managers&&d.co_managers.some(G=>typeof G=="object"?G.id===t.id:G===t.id),P=t&&(d.created_by===t.id||((X=d.created_by)==null?void 0:X.id)===t.id||E),b=c||P;return l.jsxs("div",{className:`hallmark-card rounded-sm p-5 border transition flex flex-col justify-between space-y-4 group overflow-hidden ${d.is_active===!1?"border-amber-500/40 opacity-80 bg-subtle":"border-grid"}`,children:[l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between text-[11px] font-mono text-muted gap-2",children:[l.jsxs("span",{className:"flex items-center gap-1 bg-subtle px-2 py-0.5 rounded-sm border border-grid font-bold shrink-0",children:[l.jsx(kr,{className:"w-3 h-3 text-muted"}),new Date(d.start_date).toLocaleDateString("de-DE")]}),d.is_active===!1?l.jsx("span",{className:"text-amber-500 font-bold px-1.5 py-0.5 rounded-sm bg-amber-500/10 border border-amber-500/20 shrink-0",children:"[ DEAKTIVIERT ]"}):d.location?l.jsxs("span",{className:"flex items-center gap-1 text-muted truncate max-w-[130px]",children:[l.jsx(ko,{className:"w-3 h-3 shrink-0"}),l.jsx("span",{className:"truncate",children:d.location})]}):null]}),l.jsx("h4",{className:"font-serif text-lg font-bold uppercase text-main group-hover:text-amber-500 transition line-clamp-2",children:d.title}),d.description&&l.jsx("p",{className:"text-xs text-muted font-sans line-clamp-2",children:d.description}),l.jsxs("div",{className:"text-[10px] font-mono text-muted flex items-center gap-1.5 pt-1",children:[l.jsxs("span",{children:[v," Bereiche"]}),l.jsx("span",{children:"/"}),l.jsxs("span",{children:[S," Schichten"]})]})]}),l.jsx("div",{className:"pt-3 border-t border-grid space-y-2 font-mono",children:l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[l.jsxs("button",{onClick:()=>n(d.id),className:"flex-1 min-w-[110px] py-1.5 px-3 rounded-sm text-xs font-mono font-bold bg-surface hover:bg-surface-hover text-main border border-grid transition flex items-center justify-center gap-1",children:["Schichtplan ",l.jsx(wd,{className:"w-3.5 h-3.5"})]}),b&&i&&l.jsxs("button",{onClick:()=>i(d),className:"py-1.5 px-2.5 rounded-sm text-[10px] font-mono font-bold bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/20 transition flex items-center gap-1 shrink-0",title:"Veranstaltung & Schichten bearbeiten",children:[l.jsx(jr,{className:"w-3.5 h-3.5"})," BEARBEITEN"]}),b&&s&&l.jsx("button",{onClick:()=>s(d),className:`py-1.5 px-2 rounded-sm text-[10px] font-mono font-bold transition flex items-center gap-1 border shrink-0 ${d.is_active!==!1?"bg-amber-500/10 text-amber-500 border-amber-500/20 hover:bg-amber-500/20":"bg-emerald-500/10 text-emerald-400 border-emerald-500/20 hover:bg-emerald-500/20"}`,title:d.is_active!==!1?"Deaktivieren":"Aktivieren",children:d.is_active!==!1?l.jsx(Nd,{className:"w-3.5 h-3.5"}):l.jsx(ut,{className:"w-3.5 h-3.5"})}),(c||t&&(d.created_by===t.id||((Y=d.created_by)==null?void 0:Y.id)===t.id))&&o&&l.jsx("button",{onClick:()=>o(d),className:"py-1.5 px-2 rounded-sm text-[10px] font-mono font-bold bg-red-500/10 text-red-400 border border-red-500/20 hover:bg-red-500/20 transition flex items-center gap-1 shrink-0",title:"Veranstaltung unwiderruflich löschen",children:l.jsx(Ze,{className:"w-3.5 h-3.5"})})]})})]},d.id)})})]}),f&&l.jsxs("div",{className:"space-y-4 font-mono text-xs",children:[w&&l.jsxs("div",{className:"hallmark-panel rounded-sm p-4 border border-grid space-y-3",children:[l.jsx("h4",{className:"font-serif text-sm font-bold uppercase tracking-wide text-main border-b border-grid pb-2",children:(a==null?void 0:a.community_info_title)||"📌 Verein & Infos"}),l.jsx("div",{className:"space-y-2 text-muted text-[11px] whitespace-pre-line",children:(a==null?void 0:a.community_info_text)||`Initiative e.V. Hausverein +Offene Angebote, DIY-Kultur & engagierte Schichten.`})]}),A&&l.jsxs("div",{className:"hallmark-panel rounded-sm p-4 border border-grid space-y-3",children:[l.jsx("h4",{className:"font-serif text-sm font-bold uppercase tracking-wide text-main border-b border-grid pb-2",children:(a==null?void 0:a.support_box_title)||"❤️ Unterstützen"}),l.jsx("p",{className:"text-[11px] text-muted whitespace-pre-line",children:(a==null?void 0:a.support_box_text)||"Hilf mit als Helfer*in an der Bar, beim Essen kochen oder beim Auf- & Abbau."})]})]})]})]})}function Vp({events:e,onSelectEvent:t,branding:n}){const[r,s]=N.useState(new Date),[i,o]=N.useState(null),a=r.getFullYear(),u=r.getMonth(),m=["JANUAR","FEBRUAR","MÄRZ","APRIL","MAI","JUNI","JULI","AUGUST","SEPTEMBER","OKTOBER","NOVEMBER","DEZEMBER"],h=()=>s(new Date(a,u-1,1)),y=()=>s(new Date(a,u+1,1)),x=()=>s(new Date),j=new Date(a,u,1).getDay(),k=j===0?6:j-1,w=new Date(a,u+1,0).getDate(),A=d=>{const v=String(u+1).padStart(2,"0"),S=String(d).padStart(2,"0");return`${a}-${v}-${S}`},f=d=>{const v=A(d);return e.filter(S=>v>=S.start_date&&v<=S.end_date)},c=(n==null?void 0:n.primary_color)||"var(--brand-primary)";return l.jsxs("div",{className:"space-y-6 max-w-5xl mx-auto animate-in fade-in duration-200",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid flex flex-col sm:flex-row sm:items-center justify-between gap-4 font-mono",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-subtle text-main border border-grid flex items-center justify-center font-bold",children:l.jsx(Tr,{className:"w-4 h-4 text-amber-500"})}),l.jsxs("div",{children:[l.jsxs("h2",{className:"font-serif text-3xl sm:text-4xl font-bold uppercase tracking-tight text-main leading-none",children:[m[u]," ",a]}),l.jsx("p",{className:"text-[10px] text-muted uppercase tracking-widest mt-1",children:"— INITIATIVE E.V. TERMIN- & SCHICHTÜBERSICHT —"})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:x,className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold bg-surface hover:bg-surface-hover text-main border border-grid transition",children:"[ HEUTE ]"}),l.jsx("button",{onClick:h,className:"p-1.5 rounded-sm text-muted hover:text-main bg-surface border border-grid transition",title:"Vorheriger Monat",children:l.jsx(wp,{className:"w-4 h-4"})}),l.jsx("button",{onClick:y,className:"p-1.5 rounded-sm text-muted hover:text-main bg-surface border border-grid transition",title:"Nächster Monat",children:l.jsx(Np,{className:"w-4 h-4"})})]})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm border border-grid overflow-hidden",children:[l.jsxs("div",{className:"grid grid-cols-7 bg-subtle border-b border-grid text-center text-xs font-mono text-muted font-bold py-3 uppercase",children:[l.jsx("div",{children:"MO"}),l.jsx("div",{children:"DI"}),l.jsx("div",{children:"MI"}),l.jsx("div",{children:"DO"}),l.jsx("div",{children:"FR"}),l.jsx("div",{children:"SA"}),l.jsx("div",{children:"SO"})]}),l.jsxs("div",{className:"grid grid-cols-7 auto-rows-fr divide-x divide-y divide-grid bg-surface text-xs font-mono",children:[Array.from({length:k}).map((d,v)=>l.jsx("div",{className:"min-h-[100px] sm:min-h-[110px] p-2 bg-subtle/50 text-muted opacity-30"},`offset-${v}`)),Array.from({length:w}).map((d,v)=>{const S=v+1,E=f(S),P=new Date().getFullYear()===a&&new Date().getMonth()===u&&new Date().getDate()===S;return l.jsxs("div",{className:`min-h-[100px] sm:min-h-[110px] p-2 flex flex-col justify-between transition ${P?"bg-surface-hover/80 font-bold":"hover:bg-surface-hover/50"}`,children:[l.jsxs("div",{className:"flex items-center justify-between mb-1",children:[l.jsx("span",{className:`w-5 h-5 rounded-sm flex items-center justify-center font-mono text-xs ${P?"bg-main text-paper font-bold shadow-sm":"text-muted"}`,children:S}),E.length>0&&l.jsxs("span",{className:"text-[9px] font-mono text-muted",children:[E.length," ",E.length===1?"Event":"Events"]})]}),l.jsx("div",{className:"space-y-1.5 overflow-y-auto max-h-[70px] no-scrollbar",children:E.map(b=>{const U=(i==null?void 0:i.id)===b.id;return l.jsx("button",{onClick:()=>o(b),style:{backgroundColor:U?c:`${c}15`,borderColor:`${c}40`,color:U?"#ffffff":c},className:`w-full text-left px-2 py-1 rounded-sm text-[10px] font-mono font-bold border truncate block hover:brightness-110 transition shadow-sm ${b.is_active===!1?"opacity-50 line-through":""}`,children:b.title},`evt-${b.id}`)})})]},`day-${S}`)})]})]}),i&&l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 border border-grid flex flex-col sm:flex-row sm:items-center justify-between gap-4 font-mono animate-in fade-in duration-200",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted",children:[l.jsxs("span",{className:"flex items-center gap-1 bg-subtle px-2 py-0.5 rounded-sm border border-grid font-bold text-main",children:[l.jsx(kr,{className:"w-3 h-3 text-muted"}),new Date(i.start_date).toLocaleDateString("de-DE")," — ",new Date(i.end_date).toLocaleDateString("de-DE")]}),i.location&&l.jsxs("span",{className:"flex items-center gap-1 text-muted",children:[l.jsx(ko,{className:"w-3 h-3"}),i.location]})]}),l.jsx("h3",{className:"font-serif text-2xl font-bold uppercase text-main",children:i.title}),i.description&&l.jsx("p",{className:"text-xs font-sans text-muted max-w-xl",children:i.description})]}),l.jsx("div",{className:"flex items-center gap-2 shrink-0",children:l.jsxs("button",{onClick:()=>t(i.id),style:{backgroundColor:c},className:"px-5 py-2 rounded-sm text-xs font-mono font-bold text-white transition flex items-center gap-1.5 hover:brightness-110 shadow-sm",children:["SCHICHTPLAN ÖFFNEN ",l.jsx(wd,{className:"w-4 h-4"})]})})]})]})}function Up({branding:e,onRefreshBranding:t,onRefreshEvents:n,skills:r,onRefreshSkills:s}){const[i,o]=N.useState("users"),[a,u]=N.useState(!0),[m,h]=N.useState(""),[y,x]=N.useState(""),[j,k]=N.useState([]),[w,A]=N.useState(""),[f,c]=N.useState([]),[d,v]=N.useState(!1),[S,E]=N.useState(!1),[P,b]=N.useState(!0),[U,O]=N.useState([]),[X,Y]=N.useState(""),[G,ge]=N.useState([]),[je,ye]=N.useState([]),[Ce,L]=N.useState(""),[I,g]=N.useState(""),[C,z]=N.useState(lu()),[$,D]=N.useState((e==null?void 0:e.app_name)||"Veranstaltungsschichtplaner"),[H,ae]=N.useState((e==null?void 0:e.logo_url)||""),[tt,Pr]=N.useState((e==null?void 0:e.primary_color)||"#E05A47"),[Lr,Js]=N.useState((e==null?void 0:e.custom_banner_text)||""),[Vt,Rn]=N.useState((e==null?void 0:e.show_community_info_box)??!0),[zr,Ut]=N.useState((e==null?void 0:e.community_info_title)||"📌 Verein & Infos"),[Mr,Xs]=N.useState((e==null?void 0:e.community_info_text)||`Initiative e.V. Hausverein +Offene Angebote, DIY-Kultur & engagierte Schichten.`),[Ht,el]=N.useState((e==null?void 0:e.show_support_box)??!0),[Ar,T]=N.useState((e==null?void 0:e.support_box_title)||"❤️ Unterstützen"),[R,Z]=N.useState((e==null?void 0:e.support_box_text)||"Hilf mit als Helfer*in an der Bar, beim Essen kochen oder beim Auf- & Abbau."),[nt,K]=N.useState(!1),[wt,So]=N.useState(!1),[bo,_o]=N.useState("smtp.beispiel.de"),[Eo,Co]=N.useState(587),[To,Po]=N.useState(""),[Lo,zo]=N.useState(""),[Mo,tl]=N.useState(!0),[Ao,nl]=N.useState(!1),[Do,Ro]=N.useState("noreply@schichtplaner.de"),[Oo,Ed]=N.useState(""),[rl,Cd]=N.useState(!1),[Io,$o]=N.useState(!1),[Fo,Bo]=N.useState(!1);N.useEffect(()=>{Vo()},[]);const Vo=async()=>{u(!0);try{try{const p=await F("/users/manage-users/");k(p.results||p)}catch{}try{const p=await F("/users/pending/");c(p.results||p)}catch{}try{const p=await F("/users/restriction-setting/");v(p.is_restriction_enabled),E(p.require_admin_approval),b(p.require_email_verification??!0)}catch{}try{const p=await F("/users/domain-rules/");O(p.results||p)}catch{}try{const p=await F("/events/");ge(p.results||p)}catch{}try{const p=await F("/templates/");ye(p.results||p)}catch{}try{const p=await F("/users/smtp-setting/");p&&(So(p.is_active??!1),_o(p.host||""),Co(p.port||587),Po(p.username||""),zo(p.password||""),tl(p.use_tls??!0),nl(p.use_ssl??!1),Ro(p.from_email||""))}catch{}}catch(p){h(p.message||"Laden der Admin-Daten fehlgeschlagen.")}finally{u(!1)}},Ae=p=>{x(p),setTimeout(()=>x(""),4e3)},Td=async p=>{try{const B=await F(`/users/manage-users/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_admin_user:!p.is_admin_user})});k(j.map(Nt=>Nt.id===p.id?B:Nt)),Ae(`Admin-Rechte für ${p.username} aktualisiert.`)}catch(B){h(B.message||"Fehler beim Aktualisieren.")}},Pd=async p=>{try{const B=await F(`/users/manage-users/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_approved:!p.is_approved})});k(j.map(Nt=>Nt.id===p.id?B:Nt)),Ae(`Freischalt-Status für ${p.username} aktualisiert.`)}catch(B){h(B.message||"Fehler beim Aktualisieren.")}},Ld=async p=>{try{await F(`/users/${p}/approve/`,{method:"POST"}),c(f.filter(B=>B.id!==p)),Vo(),Ae("Benutzer erfolgreich freigeschaltet.")}catch(B){h(B.message||"Freischalten fehlgeschlagen.")}},zd=async p=>{try{await F(`/users/${p}/approve/`,{method:"DELETE"}),c(f.filter(B=>B.id!==p)),Ae("Benutzer abgelehnt und gelöscht.")}catch(B){h(B.message||"Ablehnen fehlgeschlagen.")}},sl=async(p,B)=>{try{const ll=await F("/users/restriction-setting/",{method:"POST",body:JSON.stringify({is_restriction_enabled:p==="restriction"?B:d,require_admin_approval:p==="approval"?B:S,require_email_verification:p==="email_verify"?B:P})});v(ll.is_restriction_enabled),E(ll.require_admin_approval),b(ll.require_email_verification),Ae("Sicherheitseinstellungen aktualisiert.")}catch(Nt){h(Nt.message||"Aktualisierung fehlgeschlagen.")}},Md=async p=>{if(p.preventDefault(),!!X.trim())try{const B=await F("/users/domain-rules/",{method:"POST",body:JSON.stringify({domain:X})});O([...U,B]),Y(""),Ae(`Domain-Regel "${B.domain}" hinzugefügt.`)}catch(B){h(B.message||"Fehler beim Hinzufügen.")}},Ad=async p=>{try{await F(`/users/domain-rules/${p}/`,{method:"DELETE"}),O(U.filter(B=>B.id!==p)),Ae("Domain-Regel entfernt.")}catch(B){h(B.message||"Fehler beim Löschen.")}},Dd=async p=>{if(p.preventDefault(),!!Ce.trim())try{await F("/skills/",{method:"POST",body:JSON.stringify({name:Ce,description:I,color:C})}),L(""),g(""),z(lu()),s(),Ae("Qualifikation angelegt.")}catch(B){h(B.message||"Fehler beim Anlegen.")}},Rd=async p=>{try{await F(`/skills/${p}/`,{method:"DELETE"}),s(),Ae("Qualifikation gelöscht.")}catch(B){h(B.message||"Fehler beim Löschen.")}},Od=async p=>{try{await F(`/templates/${p}/`,{method:"DELETE"}),ye(je.filter(B=>B.id!==p)),Ae("Vorlage gelöscht.")}catch(B){h(B.message||"Fehler beim Löschen.")}},Id=async p=>{p.preventDefault(),K(!0);try{await F("/branding/",{method:"POST",body:JSON.stringify({app_name:$,logo_url:H,primary_color:tt,custom_banner_text:Lr,show_community_info_box:Vt,community_info_title:zr,community_info_text:Mr,show_support_box:Ht,support_box_title:Ar,support_box_text:R})}),t(),Ae("Branding-Einstellungen erfolgreich gespeichert!")}catch(B){h(B.message||"Speichern des Brandings fehlgeschlagen.")}finally{K(!1)}},$d=async p=>{p.preventDefault(),$o(!0);try{await F("/users/smtp-setting/",{method:"POST",body:JSON.stringify({is_active:wt,host:bo,port:parseInt(Eo)||587,username:To,password:Lo,use_tls:Mo,use_ssl:Ao,from_email:Do})}),Ae("✅ SMTP-Einstellungen erfolgreich gespeichert!")}catch(B){h(B.message||"Speichern der SMTP-Einstellungen fehlgeschlagen.")}finally{$o(!1)}},Fd=async()=>{Bo(!0);try{const p=await F("/users/smtp-setting/test/",{method:"POST",body:JSON.stringify({email:Oo})});Ae(`✅ ${p.message||"Test-E-Mail erfolgreich gesendet!"}`)}catch(p){h(p.message||"Test-E-Mail fehlgeschlagen.")}finally{Bo(!1)}},Uo=j.filter(p=>p.username.toLowerCase().includes(w.toLowerCase())||p.email.toLowerCase().includes(w.toLowerCase())||p.display_name&&p.display_name.toLowerCase().includes(w.toLowerCase()));return l.jsxs("div",{className:"space-y-6 max-w-5xl mx-auto animate-in fade-in duration-200 font-sans",children:[l.jsx("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid space-y-2",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-indigo-500/10 text-indigo-500 border border-indigo-500/20 flex items-center justify-center font-bold",children:l.jsx(jd,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-serif text-3xl font-bold uppercase tracking-tight text-main",children:"System Administration"}),l.jsx("p",{className:"text-xs text-muted font-mono mt-0.5",children:"Verwaltung von Benutzern, Freischaltungen, Events, Vorlagen, Branding & SMTP-Mailserver"})]})]})}),l.jsx("div",{className:"border-b border-grid pb-2",children:l.jsxs("div",{className:"flex items-center gap-1.5 font-mono text-xs overflow-x-auto no-scrollbar",children:[l.jsxs("button",{onClick:()=>o("users"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="users"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(bd,{className:"w-3.5 h-3.5 text-blue-400"})," [ 01: BENUTZER & SICHERHEIT (",j.length,") ]"]}),l.jsxs("button",{onClick:()=>o("events"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="events"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(Tr,{className:"w-3.5 h-3.5 text-emerald-400"})," [ 02: VERANSTALTUNGEN (",G.length,") ]"]}),l.jsxs("button",{onClick:()=>o("templates"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="templates"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(Zs,{className:"w-3.5 h-3.5 text-amber-400"})," [ 03: VORLAGEN & SKILLS ]"]}),l.jsxs("button",{onClick:()=>o("branding"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="branding"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(tu,{className:"w-3.5 h-3.5 text-indigo-400"})," [ 04: BRANDING & SYSTEM ]"]}),l.jsxs("button",{onClick:()=>o("smtp"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="smtp"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(bi,{className:"w-3.5 h-3.5 text-purple-400"})," [ 05: E-MAIL & SMTP ]"]})]})}),m&&l.jsxs("div",{className:"p-4 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs font-mono flex items-center gap-2",children:[l.jsx(zn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:m})]}),y&&l.jsxs("div",{className:"p-4 rounded-sm bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-xs font-mono flex items-center gap-2",children:[l.jsx(ut,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:y})]}),i==="users"&&l.jsxs("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:[f.length>0&&l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-amber-500/40 bg-amber-500/5 space-y-3",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-amber-500 flex items-center gap-2 border-b border-amber-500/20 pb-2",children:["⚠️ Ausstehende Registrierungen (",f.length,")"]}),l.jsx("div",{className:"space-y-2",children:f.map(p=>l.jsxs("div",{className:"p-3 rounded-sm bg-surface border border-grid flex items-center justify-between text-xs",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"font-bold text-main",children:[p.display_name," (@",p.username,")"]}),l.jsx("div",{className:"text-[11px] text-muted",children:p.email})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:()=>Ld(p.id),className:"px-3 py-1 rounded-sm bg-emerald-600 hover:bg-emerald-500 text-white font-bold text-xs",children:"[ FREISCHALTEN ]"}),l.jsx("button",{onClick:()=>zd(p.id),className:"px-3 py-1 rounded-sm bg-red-600/20 text-red-400 hover:bg-red-600/30 border border-red-600/30 font-bold text-xs",children:"[ ABLEHNEN ]"})]})]},p.id))})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-4 border border-grid flex items-center gap-3",children:[l.jsx(kd,{className:"w-4 h-4 text-muted shrink-0"}),l.jsx("input",{type:"text",value:w,onChange:p=>A(p.target.value),placeholder:"Nutzer suchen nach Name, Username oder E-Mail...",className:"w-full bg-subtle border border-grid px-3 py-1.5 rounded-sm text-xs font-mono text-main focus:outline-none focus:border-muted"}),w&&l.jsx("button",{onClick:()=>A(""),className:"text-xs text-muted hover:text-main font-mono shrink-0",children:"[ CLEAR ]"})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:["Benutzerkonten & Rechtestatus (",Uo.length,")"]}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-left border-collapse text-xs",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-grid text-muted uppercase text-[10px]",children:[l.jsx("th",{className:"pb-2 font-bold",children:"Nutzer"}),l.jsx("th",{className:"pb-2 font-bold",children:"E-Mail"}),l.jsx("th",{className:"pb-2 font-bold",children:"Freigeschaltet"}),l.jsx("th",{className:"pb-2 font-bold",children:"E-Mail Bestätigt"}),l.jsx("th",{className:"pb-2 font-bold",children:"Admin-Rolle"}),l.jsx("th",{className:"pb-2 font-bold text-right",children:"Aktionen"})]})}),l.jsx("tbody",{className:"divide-y divide-grid",children:Uo.map(p=>l.jsxs("tr",{className:"hover:bg-subtle/50 transition",children:[l.jsxs("td",{className:"py-2.5 font-bold text-main",children:[p.display_name||p.username,l.jsxs("span",{className:"text-[10px] text-muted font-normal block",children:["@",p.username]})]}),l.jsx("td",{className:"py-2.5 text-muted",children:p.email}),l.jsx("td",{className:"py-2.5",children:l.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${p.is_approved?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:p.is_approved?"JA":"NEIN"})}),l.jsx("td",{className:"py-2.5",children:l.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${p.is_email_verified?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-subtle text-muted border-grid"}`,children:p.is_email_verified?"VERIFIZIERT":"AUSSTEHEND"})}),l.jsx("td",{className:"py-2.5",children:l.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${p.is_admin_user||p.is_superuser?"bg-indigo-500/10 text-indigo-400 border-indigo-500/20":"bg-subtle text-muted border-grid"}`,children:p.is_superuser?"SUPERUSER":p.is_admin_user?"ADMIN":"USER"})}),l.jsxs("td",{className:"py-2.5 text-right space-x-1",children:[l.jsx("button",{onClick:()=>Pd(p),className:"px-2 py-1 rounded-sm text-[10px] bg-subtle hover:bg-surface-hover border border-grid text-main transition",children:p.is_approved?"Sperren":"Freischalten"}),l.jsx("button",{onClick:()=>Td(p),className:"px-2 py-1 rounded-sm text-[10px] bg-subtle hover:bg-surface-hover border border-grid text-indigo-400 transition",children:p.is_admin_user?"Admin entziehen":"Zu Admin machen"})]})]},p.id))})]})})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:"Sicherheit & Registrierungs-Einschränkungen"}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"font-bold text-main",children:"E-Mail Bestätigung (Opt-Out)"}),l.jsx("button",{onClick:()=>sl("email_verify",!P),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${P?"bg-emerald-600 text-white border-emerald-500":"bg-amber-500/10 text-amber-500 border-amber-500/20"}`,children:P?"[ PFLICHT ]":"[ DEAKTIVIERT ]"})]}),l.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Bei Pflicht muss die E-Mail vor der Anmeldung verifiziert werden. Bei Deaktivierung ist die Anmeldung direkt möglich."})]}),l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"font-bold text-main",children:"Domain-Einschränkung"}),l.jsx("button",{onClick:()=>sl("restriction",!d),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${d?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:d?"[ AKTIV ]":"[ INAKTIV ]"})]}),l.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Erlaubt nur Registrierungen von festgelegten E-Mail-Domains (z. B. `@verein.de`)."})]}),l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"font-bold text-main",children:"Admin-Freischaltpflicht"}),l.jsx("button",{onClick:()=>sl("approval",!S),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${S?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:S?"[ AKTIV ]":"[ INAKTIV ]"})]}),l.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Erfordert die manuelle Freischaltung durch einen Admin vor der ersten Anmeldung."})]})]}),d&&l.jsxs("div",{className:"space-y-3 pt-3 border-t border-grid",children:[l.jsx("h4",{className:"font-serif text-sm font-bold uppercase text-main",children:"Erlaubte E-Mail-Domains"}),l.jsxs("form",{onSubmit:Md,className:"flex gap-2",children:[l.jsx("input",{type:"text",placeholder:"z. B. verein.de oder @beispiel.org",value:X,onChange:p=>Y(p.target.value),className:"flex-1 px-3 py-1.5 rounded-sm input-field text-xs font-mono"}),l.jsxs("button",{type:"submit",className:"px-4 py-1.5 rounded-sm bg-indigo-600 hover:bg-indigo-500 text-white font-bold text-xs",children:[l.jsx(at,{className:"w-3.5 h-3.5 inline"})," Domain Hinzufügen"]})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:U.map(p=>l.jsxs("span",{className:"px-2.5 py-1 rounded-sm bg-subtle border border-grid text-xs flex items-center gap-2",children:[l.jsx("strong",{className:"text-main",children:p.domain}),l.jsx("button",{onClick:()=>Ad(p.id),className:"text-muted hover:text-red-400",children:l.jsx(Ze,{className:"w-3.5 h-3.5"})})]},p.id))})]})]})]}),i==="events"&&l.jsx("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:["Alle Veranstaltungen (",G.length,")"]}),l.jsx("div",{className:"space-y-3",children:G.map(p=>l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid flex items-center justify-between text-xs",children:[l.jsxs("div",{children:[l.jsx("h4",{className:"font-serif font-bold text-main text-sm",children:p.title}),l.jsxs("p",{className:"text-muted text-[11px]",children:[new Date(p.start_date).toLocaleDateString("de-DE")," — ",p.location||"Kein Ort"," | Erstellt von: ",p.created_by_name||"Admin"]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${p.is_active!==!1?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:p.is_active!==!1?"AKTIV":"DEAKTIVIERT"}),l.jsxs("button",{onClick:async()=>{if(window.confirm(`Möchtest du "${p.title}" und alle Schichten wirklich unwiderruflich löschen?`))try{await F(`/events/${p.id}/`,{method:"DELETE"}),n()}catch(B){alert(B.message)}},className:"px-2.5 py-1 rounded-sm text-[10px] font-bold bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/20 transition flex items-center gap-1",title:"Veranstaltung löschen",children:[l.jsx(Ze,{className:"w-3 h-3"})," LÖSCHEN"]})]})]},p.id))})]})}),i==="templates"&&l.jsxs("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:"Erforderliche Qualifikationen (Skills)"}),l.jsxs("form",{onSubmit:Dd,className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[l.jsx("input",{type:"text",placeholder:"Skill Name (z. B. Bar-Erfahrung)",required:!0,value:Ce,onChange:p=>L(p.target.value),className:"px-3 py-1.5 rounded-sm input-field text-xs font-mono"}),l.jsx("input",{type:"text",placeholder:"Beschreibung (optional)",value:I,onChange:p=>g(p.target.value),className:"px-3 py-1.5 rounded-sm input-field text-xs font-mono"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"color",value:C,onChange:p=>z(p.target.value),className:"w-8 h-8 rounded-sm border-0 cursor-pointer bg-subtle p-0.5"}),l.jsxs("button",{type:"submit",className:"flex-1 px-3 py-1.5 rounded-sm bg-emerald-600 hover:bg-emerald-500 text-white font-bold text-xs",children:[l.jsx(at,{className:"w-3.5 h-3.5 inline"})," Anlegen"]})]})]}),l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 pt-2",children:r.map(p=>l.jsxs("div",{className:"p-3 rounded-sm bg-subtle border border-grid flex items-center justify-between text-xs",children:[l.jsxs("div",{children:[l.jsx("span",{style:{color:p.color},className:"font-bold",children:p.name}),p.description&&l.jsx("p",{className:"text-[11px] text-muted",children:p.description})]}),l.jsx("button",{onClick:()=>Rd(p.id),className:"text-muted hover:text-red-400",children:l.jsx(Ze,{className:"w-3.5 h-3.5"})})]},p.id))})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:["Gespeicherte Event-Vorlagen (",je.length,")"]}),l.jsx("div",{className:"space-y-2",children:je.map(p=>l.jsxs("div",{className:"p-3 rounded-sm bg-subtle border border-grid flex items-center justify-between text-xs",children:[l.jsxs("div",{children:[l.jsx("div",{className:"font-bold text-main",children:p.name}),l.jsx("div",{className:"text-[11px] text-muted",children:p.description||"Keine Beschreibung"})]}),l.jsx("button",{onClick:()=>Od(p.id),className:"text-muted hover:text-red-400",children:l.jsx(Ze,{className:"w-4 h-4"})})]},p.id))})]})]}),i==="branding"&&l.jsx("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:l.jsxs("form",{onSubmit:Id,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-6",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2 flex items-center gap-2",children:[l.jsx(tu,{className:"w-5 h-5 text-indigo-400"})," Portal Branding & Erscheinungsbild"]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-xs",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Anwendungs-Name"}),l.jsx("input",{type:"text",required:!0,value:$,onChange:p=>D(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field font-bold"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Primärfarbe (Brand Accent)"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"color",value:tt,onChange:p=>Pr(p.target.value),className:"w-9 h-9 rounded-sm border-0 cursor-pointer bg-subtle p-0.5"}),l.jsx("input",{type:"text",value:tt,onChange:p=>Pr(p.target.value),className:"flex-1 px-3 py-1.5 rounded-sm input-field font-mono"})]})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-muted mb-1",children:"Logo Bild-URL (optional)"}),l.jsx("input",{type:"text",placeholder:"https://beispiel.de/logo.png",value:H,onChange:p=>ae(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-muted mb-1",children:"Ankündigung (Banner-Text)"}),l.jsx("textarea",{rows:2,placeholder:"z. B. Willkommen beim Sommerfest Schichtplaner!",value:Lr,onChange:p=>Js(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]})]}),l.jsx("h4",{className:"font-serif text-base font-bold uppercase text-main pt-4 border-t border-grid",children:"Startseiten Sidebar Boxen"}),l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-2",children:[l.jsx("span",{className:"font-bold text-xs uppercase text-main",children:"📌 Verein & Infos Box"}),l.jsx("button",{type:"button",onClick:()=>Rn(!Vt),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${Vt?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:Vt?"[ AN ]":"[ AUS ]"})]}),Vt&&l.jsxs("div",{className:"space-y-3 text-xs",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Titel"}),l.jsx("input",{type:"text",value:zr,onChange:p=>Ut(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Inhalt"}),l.jsx("textarea",{rows:3,value:Mr,onChange:p=>Xs(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]})]})]}),l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-2",children:[l.jsx("span",{className:"font-bold text-xs uppercase text-main",children:"❤️ Unterstützen Box"}),l.jsx("button",{type:"button",onClick:()=>el(!Ht),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${Ht?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:Ht?"[ AN ]":"[ AUS ]"})]}),Ht&&l.jsxs("div",{className:"space-y-3 text-xs",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Titel"}),l.jsx("input",{type:"text",value:Ar,onChange:p=>T(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Inhalt"}),l.jsx("textarea",{rows:3,value:R,onChange:p=>Z(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]})]})]}),l.jsx("div",{className:"pt-3 flex justify-end border-t border-grid",children:l.jsx("button",{type:"submit",disabled:nt,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm",children:nt?"Speichern...":"Einstellungen speichern"})})]})}),i==="smtp"&&l.jsx("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:l.jsxs("form",{onSubmit:$d,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-3",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main flex items-center gap-2",children:[l.jsx(bi,{className:"w-5 h-5 text-indigo-400"})," SMTP Server & E-Mail-Versand"]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs text-muted font-bold",children:"SMTP-Versand:"}),l.jsx("button",{type:"button",onClick:()=>So(!wt),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${wt?"bg-emerald-600 text-white border-emerald-500 shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:wt?"[ AKTIV ]":"[ INAKTIV (Dev Mode) ]"})]})]}),!wt&&l.jsxs("div",{className:"p-3.5 rounded-sm bg-amber-500/10 border border-amber-500/20 text-amber-500 text-xs flex items-center gap-2",children:[l.jsx(zn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:"Hinweis: Im inaktiven Modus werden Bestätigungs-Links in der Entwickler-Konsole / Logs ausgegeben."})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-xs",children:[l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Host / Server Adresse"}),l.jsx("input",{type:"text",placeholder:"z. B. smtp.domain.de oder mail.gmx.net",value:bo,onChange:p=>_o(p.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Port"}),l.jsx("input",{type:"number",placeholder:"587 oder 465",value:Eo,onChange:p=>Co(p.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Absender E-Mail-Adresse (From)"}),l.jsx("input",{type:"email",placeholder:"noreply@verein.de",value:Do,onChange:p=>Ro(p.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Benutzername / Login E-Mail"}),l.jsx("input",{type:"text",placeholder:"z. B. noreply@verein.de",value:To,onChange:p=>Po(p.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Passwort"}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:rl?"text":"password",placeholder:"••••••••",value:Lo,onChange:p=>zo(p.target.value),className:"w-full pl-3.5 pr-10 py-2 rounded-sm input-field font-mono"}),l.jsx("button",{type:"button",onClick:()=>Cd(!rl),className:"absolute right-3 top-2.5 text-muted hover:text-main",children:rl?l.jsx(Nd,{className:"w-4 h-4"}):l.jsx(jp,{className:"w-4 h-4"})})]})]}),l.jsxs("div",{className:"sm:col-span-2 flex items-center gap-6 pt-2",children:[l.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-main font-bold",children:[l.jsx("input",{type:"checkbox",checked:Mo,onChange:p=>{tl(p.target.checked),p.target.checked&&nl(!1)},className:"rounded-sm"}),l.jsx("span",{children:"STARTTLS verwenden (Empfohlen für Port 587)"})]}),l.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-main font-bold",children:[l.jsx("input",{type:"checkbox",checked:Ao,onChange:p=>{nl(p.target.checked),p.target.checked&&tl(!1)},className:"rounded-sm"}),l.jsx("span",{children:"SSL/TLS verwenden (Empfohlen für Port 465)"})]})]})]}),l.jsxs("div",{className:"pt-4 border-t border-grid flex flex-wrap items-center justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-[260px]",children:[l.jsx("input",{type:"email",placeholder:"Empfänger für Test-E-Mail...",value:Oo,onChange:p=>Ed(p.target.value),className:"px-3 py-1.5 rounded-sm input-field text-xs flex-1 font-mono"}),l.jsxs("button",{type:"button",disabled:Fo,onClick:Fd,className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/20 transition flex items-center gap-1.5 shrink-0",children:[l.jsx(Pp,{className:"w-3.5 h-3.5"}),Fo?"Sende...":"Test-Mail Senden"]})]}),l.jsxs("button",{type:"submit",disabled:Io,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-2",children:[l.jsx(ut,{className:"w-4 h-4"}),Io?"Speichern...":"SMTP-Einstellungen Speichern"]})]})]})})]})}function Hp({eventToEdit:e,skills:t,user:n,onBack:r,onSubmit:s,onDeleteEvent:i}){var I;const[o,a]=N.useState((e==null?void 0:e.title)||""),[u,m]=N.useState((e==null?void 0:e.description)||""),[h,y]=N.useState((e==null?void 0:e.location)||""),[x,j]=N.useState((e==null?void 0:e.start_date)||new Date().toISOString().split("T")[0]),[k,w]=N.useState((e==null?void 0:e.end_date)||new Date().toISOString().split("T")[0]),[A,f]=N.useState(e!=null&&e.co_managers?e.co_managers.map(g=>g.id):[]),[c,d]=N.useState([]),[v,S]=N.useState([]),[E,P]=N.useState(!1),[b,U]=N.useState("");N.useEffect(()=>{if(O(),e&&e.task_areas&&e.task_areas.length>0){const g=e.task_areas.map(C=>({id:C.id,name:C.name,description:C.description||"",shifts:(C.shifts||[]).map(z=>({id:z.id,title:z.title,date:z.date||(e?e.start_date:new Date().toISOString().split("T")[0]),start_time:z.start_time,end_time:z.end_time,max_participants:z.max_participants||1,required_skill_ids:z.required_skills?z.required_skills.map($=>$.id):[]}))}));S(g)}else e||S([{name:"Tresendienst",description:"Getränke- und Barverkauf",shifts:[{title:"Schicht 1",start_time:"18:00",end_time:"22:00",max_participants:2,required_skill_ids:[]}]},{name:"Essen kochen",description:"Zubereitung von Speisen",shifts:[{title:"Frühschicht",start_time:"15:00",end_time:"19:00",max_participants:3,required_skill_ids:[]}]},{name:"Aufbau & Aufräumen",description:"Tische, Stühle & Technik",shifts:[{title:"Aufbau",start_time:"12:00",end_time:"15:00",max_participants:4,required_skill_ids:[]}]}])},[e]);const O=async()=>{try{const g=await F("/users/all/");d(g.results||g)}catch{}},X=()=>{S([...v,{name:"",description:"",shifts:[{title:"Schicht 1",start_time:"10:00",end_time:"14:00",max_participants:1,required_skill_ids:[]}]}])},Y=g=>{S(v.filter((C,z)=>z!==g))},G=(g,C,z)=>{const $=[...v];$[g][C]=z,S($)},ge=g=>{const C=[...v];C[g].shifts.push({title:`Schicht ${C[g].shifts.length+1}`,date:x,start_time:"14:00",end_time:"18:00",max_participants:1,required_skill_ids:[]}),S(C)},je=(g,C)=>{const z=[...v];z[g].shifts=z[g].shifts.filter(($,D)=>D!==C),S(z)},ye=(g,C,z,$)=>{const D=[...v];D[g].shifts[C][z]=$,S(D)},Ce=(g,C,z)=>{const $=[...v],D=$[g].shifts[C].required_skill_ids||[];D.includes(z)?$[g].shifts[C].required_skill_ids=D.filter(H=>H!==z):$[g].shifts[C].required_skill_ids=[...D,z],S($)},L=async g=>{if(g.preventDefault(),U(""),!o.trim()){U("Bitte gib einen Veranstaltungstitel an.");return}P(!0);try{await s({id:e==null?void 0:e.id,title:o,description:u,location:h,start_date:x,end_date:k,co_manager_ids:A,task_areas:v})}catch(C){U(C.message||"Speichern der Veranstaltung fehlgeschlagen.")}finally{P(!1)}};return l.jsxs("div",{className:"space-y-6 max-w-4xl mx-auto animate-in fade-in duration-200 font-sans",children:[l.jsxs("div",{className:"flex items-center justify-between font-mono text-xs",children:[l.jsxs("button",{onClick:r,className:"px-3.5 py-1.5 rounded-sm bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-2 font-bold",children:[l.jsx(vd,{className:"w-4 h-4"})," [ ZURÜCK ZUR ÜBERSICHT ]"]}),l.jsxs("span",{className:"text-muted border border-grid px-2.5 py-0.5 rounded-sm",children:["MODE: ",e?"EVENT EDIT":"NEW EVENT"]})]}),l.jsx("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid space-y-2",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-blue-500/10 text-blue-500 border border-blue-500/20 flex items-center justify-center font-bold",children:e?l.jsx(jr,{className:"w-5 h-5"}):l.jsx(Tr,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-serif text-3xl font-bold uppercase tracking-tight text-main",children:e?"Veranstaltung & Schichten Bearbeiten":"Neue Veranstaltung Erstellen"}),l.jsx("p",{className:"text-xs text-muted font-mono mt-0.5",children:"Konfiguriere Stammdaten, Co-Verwalter, Aufgabenfelder, Schichtzeiten & Qualifikationen"})]})]})}),b&&l.jsxs("div",{className:"p-4 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs font-mono flex items-center gap-2",children:[l.jsx(zn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:b})]}),l.jsxs("form",{onSubmit:L,className:"space-y-6",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs",children:[l.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:"1. Stammdaten & Verwalter der Veranstaltung"}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Titel der Veranstaltung"}),l.jsx("input",{type:"text",required:!0,value:o,onChange:g=>a(g.target.value),placeholder:"z. B. Sommerfest 2026",className:"w-full px-3.5 py-2 rounded-sm input-field text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Startdatum"}),l.jsx("input",{type:"date",required:!0,value:x,onChange:g=>j(g.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Enddatum"}),l.jsx("input",{type:"date",required:!0,value:k,onChange:g=>w(g.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Ort (optional)"}),l.jsx("input",{type:"text",value:h,onChange:g=>y(g.target.value),placeholder:"z. B. Vereinsheim, Großer Saal",className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Beschreibung (optional)"}),l.jsx("textarea",{rows:2,value:u,onChange:g=>m(g.target.value),placeholder:"Details zur Veranstaltung...",className:"w-full px-3.5 py-2 rounded-sm input-field text-xs font-sans"})]}),c.length>0&&l.jsxs("div",{className:"sm:col-span-2 pt-3 border-t border-grid space-y-2",children:[l.jsxs("label",{className:"block text-main font-bold flex items-center gap-1.5",children:[l.jsx(bd,{className:"w-4 h-4 text-indigo-400"})," Co-Verwalter / Mit-Organisatoren (optional)"]}),l.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Wähle registrierte Benutzer aus, die dieses Event ebenfalls verwalten, bearbeiten und Gäste eintragen dürfen:"}),l.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:c.map(g=>{const C=A.includes(g.id);return l.jsxs("button",{type:"button",onClick:()=>{f(C?A.filter(z=>z!==g.id):[...A,g.id])},className:`px-3 py-1.5 rounded-sm text-xs font-mono font-bold transition flex items-center gap-1.5 border ${C?"bg-indigo-500/20 text-indigo-300 border-indigo-500/50 shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:[l.jsx(jo,{className:`w-3.5 h-3.5 ${C?"text-indigo-400":"opacity-40"}`}),l.jsx("span",{children:g.display_name||g.username})]},g.id)})})]})]})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-2",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main flex items-center gap-2",children:[l.jsx(Zs,{className:"w-4 h-4 text-blue-500"})," 2. Aufgabenfelder & Schichten"]}),l.jsxs("button",{type:"button",onClick:X,className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold bg-blue-500/10 text-blue-500 border border-blue-500/20 hover:bg-blue-500/20 transition flex items-center gap-1",children:[l.jsx(at,{className:"w-3.5 h-3.5"})," BEREICH HINZUFÜGEN"]})]}),v.map((g,C)=>l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsx("input",{type:"text",required:!0,placeholder:"Name des Aufgabenfeldes (z. B. Tresendienst)",value:g.name,onChange:z=>G(C,"name",z.target.value),className:"flex-1 px-3 py-1.5 rounded-sm input-field text-xs font-bold"}),l.jsx("button",{type:"button",onClick:()=>Y(C),className:"p-1.5 text-muted hover:text-red-400 transition",title:"Bereich entfernen",children:l.jsx(Ze,{className:"w-4 h-4"})})]}),l.jsxs("div",{className:"pl-3 border-l-2 border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between text-xs text-muted font-bold",children:[l.jsx("span",{children:"Schichten & Zeitfenster"}),l.jsxs("button",{type:"button",onClick:()=>ge(C),className:"text-blue-500 hover:underline flex items-center gap-1",children:[l.jsx(at,{className:"w-3 h-3"})," Schicht hinzufügen"]})]}),g.shifts.map((z,$)=>l.jsxs("div",{className:"p-3 rounded-sm bg-surface border border-grid space-y-2",children:[l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-12 gap-2 items-center text-xs",children:[l.jsx("input",{type:"text",placeholder:"Titel",value:z.title,onChange:D=>ye(C,$,"title",D.target.value),className:"sm:col-span-3 px-2.5 py-1 rounded-sm input-field text-xs"}),l.jsx("input",{type:"date",title:"Schichtdatum",min:x,max:k,value:z.date||x,onChange:D=>ye(C,$,"date",D.target.value),className:"sm:col-span-3 px-2 py-1 rounded-sm input-field text-xs font-mono text-indigo-400 font-bold"}),l.jsx("input",{type:"text",placeholder:"Start (14:00)",value:z.start_time,onChange:D=>ye(C,$,"start_time",D.target.value),className:"sm:col-span-2 px-2.5 py-1 rounded-sm input-field text-xs"}),l.jsx("input",{type:"text",placeholder:"Ende (18:00)",value:z.end_time,onChange:D=>ye(C,$,"end_time",D.target.value),className:"sm:col-span-2 px-2.5 py-1 rounded-sm input-field text-xs"}),l.jsx("div",{className:"sm:col-span-1 flex items-center gap-1",children:l.jsx("input",{type:"number",min:"1",title:"Max. Plätze",value:z.max_participants,onChange:D=>ye(C,$,"max_participants",parseInt(D.target.value)||1),className:"w-full px-1.5 py-1 rounded-sm input-field text-xs font-bold text-center"})}),l.jsx("button",{type:"button",onClick:()=>je(C,$),className:"sm:col-span-1 p-1 text-muted hover:text-red-400 text-center",title:"Schicht löschen",children:l.jsx(Ze,{className:"w-3.5 h-3.5 mx-auto"})})]}),t&&t.length>0&&l.jsxs("div",{className:"pt-2 border-t border-grid flex flex-wrap items-center gap-1.5",children:[l.jsx("span",{className:"text-[10px] text-muted font-bold mr-1",children:"Erforderlich:"}),t.map(D=>{const H=(z.required_skill_ids||[]).includes(D.id);return l.jsxs("button",{type:"button",onClick:()=>Ce(C,$,D.id),style:{backgroundColor:H?`${D.color}25`:"transparent",borderColor:H?D.color:"var(--color-border-grid)",color:H?D.color:"var(--color-text-muted)"},className:"px-2 py-0.5 rounded-sm text-[10px] border font-bold transition flex items-center gap-1",children:[l.jsx("span",{children:D.name}),H&&l.jsx(ut,{className:"w-3 h-3"})]},D.id)})]})]},$))]})]},C))]}),l.jsxs("div",{className:"flex items-center justify-between gap-3 pt-2 font-mono",children:[e&&i&&n&&(n.is_admin_user||n.is_staff||n.is_superuser||e.created_by===n.id||((I=e.created_by)==null?void 0:I.id)===n.id)?l.jsxs("button",{type:"button",onClick:()=>i(e),className:"px-4 py-2.5 rounded-sm text-xs font-bold bg-red-500/10 hover:bg-red-500/20 text-red-400 border border-red-500/20 transition flex items-center gap-1.5",children:[l.jsx(Ze,{className:"w-4 h-4"})," VERANSTALTUNG LÖSCHEN"]}):l.jsx("div",{}),l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("button",{type:"button",onClick:r,className:"px-5 py-2.5 rounded-sm text-xs font-semibold text-muted hover:bg-surface-hover transition border border-grid",children:"Abbrechen"}),l.jsxs("button",{type:"submit",disabled:E,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-2",children:[l.jsx(ut,{className:"w-4 h-4"}),E?"Speichern...":"Veranstaltung Speichern"]})]})]})]})]})}function Qp({onBack:e,onInstantiateTemplate:t,user:n,skills:r}){const[s,i]=N.useState([]),[o,a]=N.useState(!0),[u,m]=N.useState(""),[h,y]=N.useState(null),[x,j]=N.useState(""),[k,w]=N.useState(new Date().toISOString().split("T")[0]),[A,f]=N.useState(new Date().toISOString().split("T")[0]),[c,d]=N.useState(""),[v,S]=N.useState(!1),[E,P]=N.useState(!1),[b,U]=N.useState(""),[O,X]=N.useState(""),[Y,G]=N.useState([{name:"Tresendienst",description:"Getränkeausschank und Bar",shifts:[{title:"Frühschicht",start_time:"18:00",end_time:"22:00",max_participants:2,required_skill_ids:[]},{title:"Spätschicht",start_time:"22:00",end_time:"02:00",max_participants:3,required_skill_ids:[]}]}]);N.useEffect(()=>{ge()},[]);const ge=async()=>{a(!0);try{const g=await F("/templates/");i(g.results||g)}catch(g){m(g.message||"Laden der Vorlagen fehlgeschlagen.")}finally{a(!1)}},je=g=>{y(g),j(g.name)},ye=async g=>{if(g.preventDefault(),!!h){S(!0);try{await t(h.id,{title:x,start_date:k,end_date:A,location:c})}catch(C){m(C.message||"Erstellen der Veranstaltung aus Vorlage fehlgeschlagen.")}finally{S(!1)}}},Ce=async g=>{if(g.preventDefault(),!b.trim()){m("Bitte gib einen Vorlagen-Namen an.");return}S(!0);try{const C={name:b,description:O,template_data:{task_areas:Y.map(z=>({name:z.name,description:z.description,shifts:(z.shifts||[]).map($=>({title:$.title,start_time:$.start_time,end_time:$.end_time,max_participants:$.max_participants,required_skill_ids:$.required_skill_ids}))}))}};await F("/templates/",{method:"POST",body:JSON.stringify(C)}),P(!1),U(""),X(""),ge()}catch(C){m(C.message||"Erstellen der Vorlage fehlgeschlagen.")}finally{S(!1)}},L=()=>{G([...Y,{name:"Neuer Bereich",description:"",shifts:[{title:"Schicht 1",start_time:"14:00",end_time:"18:00",max_participants:2,required_skill_ids:[]}]}])},I=g=>{const C=[...Y];C[g].shifts.push({title:`Schicht ${C[g].shifts.length+1}`,start_time:"18:00",end_time:"22:00",max_participants:2,required_skill_ids:[]}),G(C)};return l.jsxs("div",{className:"space-y-6 max-w-4xl mx-auto animate-in fade-in duration-200 font-sans",children:[l.jsxs("div",{className:"flex items-center justify-between font-mono text-xs",children:[l.jsxs("button",{onClick:e,className:"px-3.5 py-1.5 rounded-sm bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-2 font-bold",children:[l.jsx(vd,{className:"w-4 h-4"})," [ ZURÜCK ZUR ÜBERSICHT ]"]}),l.jsxs("span",{className:"text-muted border border-grid px-2.5 py-0.5 rounded-sm uppercase",children:["SYSTEM VORLAGEN (",s.length,")"]})]}),l.jsx("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid space-y-4",children:l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 flex items-center justify-center font-bold",children:l.jsx(Zs,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-serif text-3xl font-bold uppercase tracking-tight text-main",children:"Veranstaltungs-Vorlagen Zentrale"}),l.jsx("p",{className:"text-xs text-muted font-mono mt-0.5",children:"Erstelle neue Veranstaltungen mit voreingestellten Schichten und Aufgabenbereichen"})]})]}),n&&l.jsxs("button",{onClick:()=>P(!E),className:"px-3.5 py-2 rounded-sm text-xs font-mono font-bold bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/20 transition flex items-center gap-1.5 shrink-0",children:[l.jsx(at,{className:"w-4 h-4"}),E?"Schließen":"Neue Vorlage Erstellen"]})]})}),u&&l.jsxs("div",{className:"p-4 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs font-mono flex items-center gap-2",children:[l.jsx(zn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:u})]}),E&&l.jsxs("form",{onSubmit:Ce,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs animate-in fade-in duration-200",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-indigo-400 border-b border-grid pb-2 flex items-center justify-between",children:[l.jsx("span",{children:"Neue Vorlage mit voreingestellten Schichten anlegen"}),l.jsxs("button",{type:"button",onClick:L,className:"text-xs font-mono font-bold bg-indigo-500/20 text-indigo-300 px-3 py-1 rounded-sm border border-indigo-500/30 flex items-center gap-1",children:[l.jsx(at,{className:"w-3.5 h-3.5"})," Bereich Hinzufügen"]})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Vorlagen Name"}),l.jsx("input",{type:"text",required:!0,placeholder:"z. B. Standard Kneipenabend / Bar-Event",value:b,onChange:g=>U(g.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm font-bold"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Beschreibung (optional)"}),l.jsx("input",{type:"text",placeholder:"z. B. Inklusive 2 Barschichten und Aufbau",value:O,onChange:g=>X(g.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]})]}),l.jsx("div",{className:"space-y-4 pt-2",children:Y.map((g,C)=>l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("input",{type:"text",required:!0,placeholder:"Bereichs-Name (z. B. Bar)",value:g.name,onChange:z=>{const $=[...Y];$[C].name=z.target.value,G($)},className:"flex-1 px-3 py-1 rounded-sm input-field text-xs font-bold"}),l.jsx("button",{type:"button",onClick:()=>{G(Y.filter((z,$)=>$!==C))},className:"text-muted hover:text-red-400 p-1",children:l.jsx(Ze,{className:"w-4 h-4"})})]}),l.jsxs("div",{className:"pl-3 border-l-2 border-grid space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between text-muted text-[11px] font-bold",children:[l.jsx("span",{children:"Voreingestellte Schichten"}),l.jsxs("button",{type:"button",onClick:()=>I(C),className:"text-indigo-400 hover:underline flex items-center gap-1",children:[l.jsx(at,{className:"w-3 h-3"})," Schicht hinzufügen"]})]}),g.shifts.map((z,$)=>l.jsxs("div",{className:"p-2.5 rounded-sm bg-surface border border-grid grid grid-cols-1 sm:grid-cols-12 gap-2 items-center text-xs",children:[l.jsx("input",{type:"text",placeholder:"Schichtname",value:z.title,onChange:D=>{const H=[...Y];H[C].shifts[$].title=D.target.value,G(H)},className:"sm:col-span-4 px-2 py-1 rounded-sm input-field text-xs"}),l.jsx("input",{type:"text",placeholder:"Start (18:00)",value:z.start_time,onChange:D=>{const H=[...Y];H[C].shifts[$].start_time=D.target.value,G(H)},className:"sm:col-span-2 px-2 py-1 rounded-sm input-field text-xs"}),l.jsx("input",{type:"text",placeholder:"Ende (22:00)",value:z.end_time,onChange:D=>{const H=[...Y];H[C].shifts[$].end_time=D.target.value,G(H)},className:"sm:col-span-2 px-2 py-1 rounded-sm input-field text-xs"}),l.jsxs("div",{className:"sm:col-span-3 flex items-center gap-1",children:[l.jsx("span",{className:"text-[10px] text-muted",children:"Plätze:"}),l.jsx("input",{type:"number",min:"1",value:z.max_participants,onChange:D=>{const H=[...Y];H[C].shifts[$].max_participants=parseInt(D.target.value)||1,G(H)},className:"w-full px-2 py-1 rounded-sm input-field text-xs font-bold"})]}),l.jsx("button",{type:"button",onClick:()=>{const D=[...Y];D[C].shifts=D[C].shifts.filter((H,ae)=>ae!==$),G(D)},className:"sm:col-span-1 p-1 text-muted hover:text-red-400 text-center",children:l.jsx(Ze,{className:"w-3.5 h-3.5 mx-auto"})})]},$))]})]},C))}),l.jsxs("div",{className:"pt-3 flex justify-end gap-2 border-t border-grid",children:[l.jsx("button",{type:"button",onClick:()=>P(!1),className:"px-4 py-2 rounded-sm text-xs font-semibold text-muted hover:bg-surface-hover transition border border-grid",children:"Abbrechen"}),l.jsxs("button",{type:"submit",disabled:v,style:{backgroundColor:"var(--brand-primary)"},className:"px-5 py-2 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-1.5",children:[l.jsx(ut,{className:"w-4 h-4"})," Vorlage Speichern"]})]})]}),l.jsxs("div",{className:"space-y-4 font-mono text-xs",children:[l.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main",children:"Verfügbare Vorlagen"}),o?l.jsx("div",{className:"hallmark-panel p-8 text-center text-muted",children:"Lade Vorlagen..."}):s.length===0?l.jsx("div",{className:"hallmark-panel p-8 text-center text-muted italic",children:'[ Noch keine Vorlagen gespeichert. Klicke oben auf "Neue Vorlage Erstellen" um Vorlagen mit voreingestellten Schichten anzulegen. ]'}):l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:s.map(g=>{var C;return l.jsxs("div",{onClick:()=>je(g),className:`hallmark-panel p-5 rounded-sm border cursor-pointer transition space-y-3 ${(h==null?void 0:h.id)===g.id?"bg-indigo-500/10 border-indigo-500 shadow-md":"bg-surface border-grid hover:border-muted"}`,children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h4",{className:"font-serif text-base font-bold text-main uppercase",children:g.name}),(h==null?void 0:h.id)===g.id&&l.jsx("span",{className:"text-[10px] font-mono text-indigo-400 bg-indigo-500/20 px-2 py-0.5 rounded-sm border border-indigo-500/30 font-bold",children:"[ AUSGEWÄHLT ]"})]}),g.description&&l.jsx("p",{className:"text-xs font-sans text-muted",children:g.description}),((C=g.template_data)==null?void 0:C.task_areas)&&g.template_data.task_areas.length>0&&l.jsxs("div",{className:"space-y-2 pt-2 border-t border-grid text-[11px]",children:[l.jsx("div",{className:"font-bold text-muted uppercase text-[10px]",children:"📌 Voreingestellte Schichten:"}),g.template_data.task_areas.map((z,$)=>{var D;return l.jsxs("div",{className:"bg-subtle p-2 rounded-sm border border-grid space-y-1",children:[l.jsxs("div",{className:"font-bold text-main flex items-center justify-between",children:[l.jsx("span",{children:z.name}),l.jsxs("span",{className:"text-[10px] text-muted font-normal",children:[((D=z.shifts)==null?void 0:D.length)||0," Schichten"]})]}),l.jsx("div",{className:"flex flex-wrap gap-1",children:(z.shifts||[]).map((H,ae)=>l.jsxs("span",{className:"px-2 py-0.5 rounded-sm bg-surface border border-grid text-[10px] flex items-center gap-1 font-mono",children:[l.jsx(kr,{className:"w-3 h-3 text-muted shrink-0"}),l.jsx("strong",{className:"text-main",children:H.title}),l.jsxs("span",{className:"text-muted",children:["(",H.start_time,"-",H.end_time,", ",H.max_participants," Plätze)"]})]},ae))})]},$)})]}),l.jsxs("div",{className:"text-[10px] text-muted pt-2 border-t border-grid flex items-center justify-between",children:[l.jsxs("span",{children:["Erstellt von: ",l.jsx("strong",{children:g.created_by_name||"Admin"})]}),l.jsx("span",{className:"text-indigo-400 font-bold",children:"Klick zum Auswählen"})]})]},g.id)})})]}),h&&l.jsxs("form",{onSubmit:ye,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs animate-in fade-in duration-200",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-indigo-400 border-b border-grid pb-2",children:['Neue Veranstaltung aus Vorlage "',h.name,'" Erstellen']}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Titel der Veranstaltung"}),l.jsx("input",{type:"text",required:!0,value:x,onChange:g=>j(g.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm font-bold"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Startdatum"}),l.jsx("input",{type:"date",required:!0,value:k,onChange:g=>w(g.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Enddatum"}),l.jsx("input",{type:"date",required:!0,value:A,onChange:g=>f(g.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Ort (optional)"}),l.jsx("input",{type:"text",value:c,onChange:g=>d(g.target.value),placeholder:"z. B. Großer Saal",className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]})]}),l.jsx("div",{className:"pt-3 flex justify-end border-t border-grid",children:l.jsxs("button",{type:"submit",disabled:v,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-2",children:[l.jsx(Cp,{className:"w-4 h-4 fill-white"}),v?"Erstellen...":"Veranstaltung Jetzt Aus Vorlage Erstellen"]})})]})]})}function Wp(){const[e,t]=N.useState(null),[n,r]=N.useState(null),[s,i]=N.useState([]),[o,a]=N.useState([]),[u,m]=N.useState(null),[h,y]=N.useState(null),[x,j]=N.useState(!0),[k,w]=N.useState("home"),[A,f]=N.useState(!1),[c,d]=N.useState(!1),[v,S]=N.useState(null),[E,P]=N.useState(!1),[b,U]=N.useState(!1),[O,X]=N.useState(localStorage.getItem("theme_mode")||"auto"),[Y,G]=N.useState(null),[ge,je]=N.useState(null);N.useEffect(()=>{window.addEventListener("beforeinstallprompt",T=>{T.preventDefault(),je(T)}),C()},[]),N.useEffect(()=>{localStorage.setItem("theme_mode",O);const T=()=>{let R=O;O==="auto"&&(R=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",R)};if(T(),O==="auto"){const R=window.matchMedia("(prefers-color-scheme: dark)"),Z=()=>T();return R.addEventListener("change",Z),()=>R.removeEventListener("change",Z)}},[O]),N.useEffect(()=>{n!=null&&n.primary_color&&(document.documentElement.style.setProperty("--brand-primary",n.primary_color),document.documentElement.style.setProperty("--brand-secondary",n.secondary_color||n.primary_color))},[n]);const[ye,Ce]=N.useState(null),[L,I]=N.useState(null),g=T=>{G(T),setTimeout(()=>G(null),5e3)},C=async()=>{j(!0);try{try{const K=await F("/branding/");r(K)}catch{}if(_i())try{const K=await F("/users/me/");t(K),!K.is_admin_user&&!K.is_staff&&!K.is_superuser&&k==="admin"&&w("home")}catch{sr(null),t(null),w("home")}const T=new URLSearchParams(window.location.search),R=T.get("verify_email");if(R)try{const K=await F("/users/verify-email/",{method:"POST",body:JSON.stringify({token:R})});sr(K.token),t(K.user),g(K.message||"✅ E-Mail-Adresse erfolgreich bestätigt!"),window.history.replaceState({},document.title,window.location.pathname)}catch(K){g(`⚠️ E-Mail Bestätigung: ${K.message}`)}const Z=T.get("claim_token"),nt=T.get("guest_name");Z&&nt&&(Ce(Z),I(nt),_i()||f(!0)),await $(),await D()}catch(T){console.error(T)}finally{j(!1)}},z=async T=>{try{const R=await F(`/users/signups/${T.id}/generate-claim-link/`,{method:"POST"}),Z=`${window.location.origin}/?claim_token=${R.token}&guest_name=${encodeURIComponent(R.guest_name)}`;navigator.clipboard?(await navigator.clipboard.writeText(Z),g(`✅ Einladungs-Link für ${R.guest_name} in Zwischenablage kopiert!`)):prompt(`Einladungs-Link für ${R.guest_name} kopieren:`,Z)}catch(R){alert(R.message||"Fehler beim Erstellen des Links.")}},$=async()=>{try{const T=await F("/skills/");i(T.results||T)}catch{}},D=async()=>{try{const T=await F("/events/"),R=T.results||T;a(R),R.length>0&&!u?(m(R[0].id),H(R[0].id)):u&&H(u)}catch{}},H=async T=>{try{const R=await F(`/events/${T}/matrix/`);y(R)}catch{}},ae=T=>{m(T),H(T),w("schedule")},tt=()=>{sr(null),t(null),w("home"),g("Erfolgreich abgemeldet."),u&&H(u)},Pr=(T,R)=>{t(T),T&&!T.is_admin_user&&!T.is_staff&&!T.is_superuser&&k==="admin"&&w("home"),g(R||"Erfolgreich angemeldet!"),u&&H(u)},Lr=async T=>{if(!e)S(T),d(!0);else try{const R=await F(`/shifts/${T.id}/signup/`,{method:"POST"});g(R.message||"Erfolgreich für Schicht eingetragen!"),u&&H(u)}catch(R){g(`Fehler: ${R.message}`)}},Js=async T=>{if(!v)return;const R=await F(`/shifts/${v.id}/signup/`,{method:"POST",body:JSON.stringify(T)});g(R.message||"Als Gast eingetragen!"),u&&H(u)},Vt=async T=>{try{const R=await F(`/shifts/${T.id}/signup/`,{method:"DELETE"});g(R.message||"Eintragung storniert."),u&&H(u)}catch(R){g(`Fehler: ${R.message}`)}},Rn=async T=>{if(!(!T||!T.id)&&window.confirm(`Möchtest du die Veranstaltung "${T.title}" und alle zugehörigen Schichten wirklich unwiderruflich löschen?`))try{await F(`/events/${T.id}/`,{method:"DELETE"}),g(`Veranstaltung "${T.title}" wurde erfolgreich gelöscht.`),u===T.id&&m(null),k==="event-editor"&&w("home"),D()}catch(R){g(`Fehler beim Löschen: ${R.message}`)}},[zr,Ut]=N.useState(null),Mr=async T=>{let R=T.id;R?await F(`/events/${R}/`,{method:"PATCH",body:JSON.stringify({title:T.title,description:T.description,location:T.location,start_date:T.start_date,end_date:T.end_date,co_manager_ids:T.co_manager_ids||[]})}):R=(await F("/events/",{method:"POST",body:JSON.stringify({title:T.title,description:T.description,location:T.location,start_date:T.start_date,end_date:T.end_date,co_manager_ids:T.co_manager_ids||[]})})).id;for(let Z of T.task_areas){if(!Z.name)continue;let nt=Z.id;nt?await F(`/task-areas/${nt}/`,{method:"PATCH",body:JSON.stringify({name:Z.name,description:Z.description||""})}):nt=(await F("/task-areas/",{method:"POST",body:JSON.stringify({event:R,name:Z.name,description:Z.description||""})})).id;for(let K of Z.shifts){const wt=K.date||T.start_date;K.id?await F(`/shifts/${K.id}/`,{method:"PATCH",body:JSON.stringify({title:K.title,date:wt,start_time:K.start_time,end_time:K.end_time,max_participants:K.max_participants,required_skill_ids:K.required_skill_ids||[]})}):await F("/shifts/",{method:"POST",body:JSON.stringify({task_area:nt,title:K.title,date:wt,start_time:K.start_time,end_time:K.end_time,max_participants:K.max_participants,required_skill_ids:K.required_skill_ids||[]})})}}g(T.id?"Veranstaltung & Schichten aktualisiert!":"Veranstaltung erfolgreich erstellt!"),await D(),ae(R)},Xs=async(T,R)=>{const Z=await F(`/templates/${T}/instantiate/`,{method:"POST",body:JSON.stringify(R)});g("Veranstaltung aus Vorlage erstellt!"),await D(),Z.id&&ae(Z.id)},Ht=()=>{u&&window.open(`/api/events/${u}/export_pdf/`,"_blank")},el=()=>{window.print()},Ar=()=>{ge&&(ge.prompt(),ge.userChoice.then(T=>{T.outcome==="accepted"&&g("PWA Installation gestartet!"),je(null)}))};return l.jsxs("div",{className:"min-h-screen bg-canvas text-main flex flex-col font-sans selection:bg-surface-hover transition-colors duration-200",children:[Y&&l.jsxs("div",{className:"fixed bottom-6 right-6 z-50 bg-emerald-600 text-white px-4 py-2.5 rounded-sm shadow-2xl font-mono text-xs flex items-center gap-2 border border-emerald-400 animate-in fade-in slide-in-from-bottom-3 duration-200",children:[l.jsx(ut,{className:"w-4 h-4"}),l.jsx("span",{children:Y})]}),l.jsx(Rp,{branding:n,user:e,activeTab:k,onChangeTab:w,themeMode:O,onChangeThemeMode:X,onLogout:tt,onOpenAuth:()=>f(!0),onOpenCreateEvent:()=>{Ut(null),w("event-editor")},onOpenTemplates:()=>w("templates"),onOpenProfile:()=>U(!0),onOpenAdmin:()=>w("admin"),pwaInstallPrompt:!!ge,onInstallPwa:Ar}),l.jsx("main",{className:"flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6",children:x?l.jsx("div",{className:"hallmark-panel p-16 text-center text-xs text-muted font-mono border border-grid",children:"Lade Daten..."}):k==="home"?l.jsx(Bp,{events:o,user:e,onSelectEvent:ae,onOpenCreateEvent:()=>{Ut(null),w("event-editor")},onToggleEventActive:async T=>{try{await F(`/events/${T.id}/`,{method:"PATCH",body:JSON.stringify({is_active:T.is_active===!1})}),D()}catch(R){alert(R.message||"Aktion fehlgeschlagen.")}},onEditEvent:T=>{Ut(T),w("event-editor")},onDeleteEvent:Rn,branding:n}):k==="calendar"?l.jsx(Vp,{events:o,onSelectEvent:ae,branding:n}):k==="admin"&&e&&(e.is_admin_user||e.is_staff||e.is_superuser)?l.jsx(Up,{branding:n,onRefreshBranding:async()=>{const T=await F("/branding/");r(T)},onRefreshEvents:D,skills:s,onRefreshSkills:$}):k==="event-editor"?l.jsx(Hp,{eventToEdit:zr,skills:s,user:e,onBack:()=>w("schedule"),onSubmit:Mr,onDeleteEvent:Rn}):k==="templates"?l.jsx(Qp,{onBack:()=>w("schedule"),onInstantiateTemplate:Xs,user:e,skills:s}):l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between gap-4 overflow-x-auto pb-2 no-scrollbar font-mono",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs font-bold text-muted uppercase tracking-wider whitespace-nowrap",children:"Ausgewähltes Event:"}),o.map(T=>{const R=u===T.id;return l.jsx("button",{onClick:()=>ae(T.id),style:{backgroundColor:R?(n==null?void 0:n.primary_color)||"var(--brand-primary)":void 0,borderColor:R?(n==null?void 0:n.primary_color)||"var(--brand-primary)":void 0},className:`px-3.5 py-1.5 rounded-sm text-xs font-bold transition whitespace-nowrap border ${R?"text-white shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:T.title},T.id)})]}),e&&l.jsxs("button",{onClick:()=>{Ut(null),w("event-editor")},className:"px-3.5 py-1.5 rounded-sm text-xs font-bold bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5 shrink-0",children:[l.jsx(at,{className:"w-4 h-4"})," Neues Event"]})]}),l.jsx(Op,{event:h,user:e,onSignupClick:Lr,onCancelClick:Vt,onEditEvent:T=>{Ut(T),w("event-editor")},onDeleteEvent:Rn,onRemoveUserFromShift:async(T,R)=>{try{const Z=await F(`/shifts/${T.id}/signup/${R}/`,{method:"DELETE"});g(Z.message||"Eintragung entfernt."),D(),u&&ae(u)}catch(Z){alert(Z.message||"Entfernen der Person fehlgeschlagen.")}},onGenerateClaimLink:z,onExportPdf:Ht,onPrintView:el})]})}),l.jsx("footer",{className:"border-t border-grid py-6 text-center text-xs text-muted font-mono no-print",children:l.jsxs("p",{children:[(n==null?void 0:n.app_name)||"Veranstaltungsschichtplaner"," • PWA Enabled • PostgreSQL & Docker Ready"]})}),A&&l.jsx(Fp,{onClose:()=>{f(!1),Ce(null),I(null)},onSuccess:Pr,claimToken:ye,prefilledGuestName:L}),c&&l.jsx(Ip,{shift:v,onClose:()=>d(!1),onSubmit:Js})]})}zl.createRoot(document.getElementById("root")).render(l.jsx(rf.StrictMode,{children:l.jsx(Wp,{})})); diff --git a/frontend/dist/assets/index-CGy_Z7Jy.css b/frontend/dist/assets/index-CGy_Z7Jy.css deleted file mode 100644 index a56e6e2..0000000 --- a/frontend/dist/assets/index-CGy_Z7Jy.css +++ /dev/null @@ -1 +0,0 @@ -*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-6{bottom:1.5rem}.left-3{left:.75rem}.left-3\.5{left:.875rem}.right-3{right:.75rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-2\.5{top:.625rem}.top-3{top:.75rem}.top-4{top:1rem}.z-40{z-index:40}.z-50{z-index:50}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-8{margin-top:2rem;margin-bottom:2rem}.mb-1{margin-bottom:.25rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mb-8{margin-bottom:2rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-16{height:4rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-8{height:2rem}.h-9{height:2.25rem}.max-h-\[70px\]{max-height:70px}.min-h-\[100px\]{min-height:100px}.min-h-screen{min-height:100vh}.w-1\/4{width:25%}.w-1\/6{width:16.666667%}.w-10{width:2.5rem}.w-2\.5{width:.625rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-full{width:100%}.w-px{width:1px}.min-w-\[110px\]{min-width:110px}.min-w-\[260px\]{min-width:260px}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-4xl{max-width:56rem}.max-w-5xl{max-width:64rem}.max-w-7xl{max-width:80rem}.max-w-\[130px\]{max-width:130px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xl{max-width:36rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.cursor-pointer{cursor:pointer}.auto-rows-fr{grid-auto-rows:minmax(0,1fr)}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-6{gap:1.5rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-3>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.75rem * var(--tw-space-x-reverse));margin-left:calc(.75rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.divide-x>:not([hidden])~:not([hidden]){--tw-divide-x-reverse: 0;border-right-width:calc(1px * var(--tw-divide-x-reverse));border-left-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-sm{border-radius:.125rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-0{border-width:0px}.border-b{border-bottom-width:1px}.border-l-2{border-left-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-500\/20{border-color:#f59e0b33}.border-amber-500\/30{border-color:#f59e0b4d}.border-amber-500\/40{border-color:#f59e0b66}.border-blue-500{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-blue-500\/20{border-color:#3b82f633}.border-emerald-400{--tw-border-opacity: 1;border-color:rgb(52 211 153 / var(--tw-border-opacity, 1))}.border-emerald-500{--tw-border-opacity: 1;border-color:rgb(16 185 129 / var(--tw-border-opacity, 1))}.border-emerald-500\/20{border-color:#10b98133}.border-emerald-500\/30{border-color:#10b9814d}.border-indigo-500{--tw-border-opacity: 1;border-color:rgb(99 102 241 / var(--tw-border-opacity, 1))}.border-indigo-500\/20{border-color:#6366f133}.border-indigo-500\/30{border-color:#6366f14d}.border-indigo-500\/40{border-color:#6366f166}.border-indigo-500\/50{border-color:#6366f180}.border-red-500\/20{border-color:#ef444433}.border-red-600\/30{border-color:#dc26264d}.border-slate-700{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.border-slate-800{--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity, 1))}.border-slate-800\/80{border-color:#1e293bcc}.border-transparent{border-color:transparent}.bg-amber-500\/10{background-color:#f59e0b1a}.bg-amber-500\/20{background-color:#f59e0b33}.bg-amber-500\/5{background-color:#f59e0b0d}.bg-black\/60{background-color:#0009}.bg-blue-500\/10{background-color:#3b82f61a}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-blue-600\/10{background-color:#2563eb1a}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-600{--tw-bg-opacity: 1;background-color:rgb(5 150 105 / var(--tw-bg-opacity, 1))}.bg-indigo-500\/10{background-color:#6366f11a}.bg-indigo-500\/20{background-color:#6366f133}.bg-indigo-600{--tw-bg-opacity: 1;background-color:rgb(79 70 229 / var(--tw-bg-opacity, 1))}.bg-red-500\/10{background-color:#ef44441a}.bg-red-600\/20{background-color:#dc262633}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-800{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-slate-900\/60{background-color:#0f172a99}.bg-slate-900\/90{background-color:#0f172ae6}.bg-slate-950{--tw-bg-opacity: 1;background-color:rgb(2 6 23 / var(--tw-bg-opacity, 1))}.bg-slate-950\/60{background-color:#02061799}.bg-slate-950\/70{background-color:#020617b3}.bg-slate-950\/80{background-color:#020617cc}.fill-white{fill:#fff}.object-contain{-o-object-fit:contain;object-fit:contain}.p-0\.5{padding:.125rem}.p-1{padding:.25rem}.p-1\.5{padding:.375rem}.p-12{padding:3rem}.p-16{padding:4rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-3\.5{padding:.875rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-3\.5{padding-left:.875rem;padding-right:.875rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-3\.5{padding-top:.875rem;padding-bottom:.875rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pb-6{padding-bottom:1.5rem}.pl-10{padding-left:2.5rem}.pl-3{padding-left:.75rem}.pl-3\.5{padding-left:.875rem}.pl-9{padding-left:2.25rem}.pr-10{padding-right:2.5rem}.pr-16{padding-right:4rem}.pr-3\.5{padding-right:.875rem}.pt-1{padding-top:.25rem}.pt-1\.5{padding-top:.375rem}.pt-2{padding-top:.5rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.font-serif{font-family:ui-serif,Georgia,Cambria,Times New Roman,Times,serif}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[9px\]{font-size:9px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.italic{font-style:italic}.leading-none{line-height:1}.leading-tight{line-height:1.25}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-300{--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.text-amber-400{--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-blue-400{--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-emerald-400{--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.text-emerald-500{--tw-text-opacity: 1;color:rgb(16 185 129 / var(--tw-text-opacity, 1))}.text-indigo-300{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.text-indigo-400{--tw-text-opacity: 1;color:rgb(129 140 248 / var(--tw-text-opacity, 1))}.text-indigo-500{--tw-text-opacity: 1;color:rgb(99 102 241 / var(--tw-text-opacity, 1))}.text-purple-400{--tw-text-opacity: 1;color:rgb(192 132 252 / var(--tw-text-opacity, 1))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-300{--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-950{--tw-text-opacity: 1;color:rgb(2 6 23 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.line-through{text-decoration-line:line-through}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-30{opacity:.3}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-80{opacity:.8}.shadow-2xl{--tw-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);--tw-shadow-colored: 0 25px 50px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-blue-500\/10{--tw-shadow-color: rgb(59 130 246 / .1);--tw-shadow: var(--tw-shadow-colored)}.shadow-blue-600\/30{--tw-shadow-color: rgb(37 99 235 / .3);--tw-shadow: var(--tw-shadow-colored)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}:root{--font-display: "Space Grotesk", system-ui, sans-serif;--font-body: "Plus Jakarta Sans", system-ui, sans-serif;--font-mono: "JetBrains Mono", monospace;--color-accent: #E05A47;--brand-primary: var(--color-accent)}:root,[data-theme=dark]{--color-paper: #0E0F12;--color-surface: #15161A;--color-surface-hover: #1C1D23;--color-border-grid: #282932;--color-border-subtle: #1F2026;--color-text: #F0F0EE;--color-text-muted: #9E9FAA;--color-text-dim: #5C5D66;--color-bg-subtle: #090A0C}[data-theme=light]{--color-paper: #F8F7F4;--color-surface: #FFFFFF;--color-surface-hover: #F0EEE8;--color-border-grid: #D8D5CB;--color-border-subtle: #E8E5DC;--color-text: #141518;--color-text-muted: #555660;--color-text-dim: #888994;--color-bg-subtle: #EFECE5}body{background-color:var(--color-paper);color:var(--color-text);font-family:var(--font-body);background-image:radial-gradient(rgba(120,120,120,.08) 1px,transparent 1px);background-size:28px 28px;overflow-x:clip;transition:background-color .15s ease,color .15s ease}.font-display,.font-serif{font-family:var(--font-display)!important;font-style:normal!important}.font-mono{font-family:var(--font-mono)!important}.font-sans{font-family:var(--font-body)!important}.bg-canvas,.bg-paper{background-color:var(--color-paper)!important}.bg-surface{background-color:var(--color-surface)!important}.bg-surface-hover{background-color:var(--color-surface-hover)!important}.bg-subtle{background-color:var(--color-bg-subtle)!important}.text-main{color:var(--color-text)!important}.text-muted{color:var(--color-text-muted)!important}.text-dim{color:var(--color-text-dim)!important}.border-grid{border-color:var(--color-border-grid)!important}.border-subtle{border-color:var(--color-border-subtle)!important}.input-field{background-color:var(--color-bg-subtle)!important;color:var(--color-text)!important;border-color:var(--color-border-grid)!important}.input-field:focus{border-color:var(--color-text-muted)!important;outline:none!important}.hallmark-panel{background-color:var(--color-surface);border:1px solid var(--color-border-grid);box-shadow:0 1px 3px #0000000d}.hallmark-card{background-color:var(--color-surface);border:1px solid var(--color-border-grid)}.hallmark-card:hover{border-color:var(--color-text-muted);background-color:var(--color-surface-hover)}.bg-brand-primary{background-color:var(--brand-primary)!important}.text-brand-primary{color:var(--brand-primary)!important}.border-brand-primary{border-color:var(--brand-primary)!important}@media print{body{background:#fff!important;color:#000!important;background-image:none!important}.no-print{display:none!important}.print-only{display:block!important}.hallmark-panel,.hallmark-card{background:none!important;border:1px solid #000!important;box-shadow:none!important}table{width:100%!important;border-collapse:collapse!important}th,td{border:1px solid #000!important;padding:6px!important;color:#000!important}}.hover\:border-red-500\/20:hover{border-color:#ef444433}.hover\:border-slate-700:hover{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.hover\:bg-amber-500\/20:hover{background-color:#f59e0b33}.hover\:bg-amber-500\/30:hover{background-color:#f59e0b4d}.hover\:bg-blue-500:hover{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.hover\:bg-blue-500\/20:hover{background-color:#3b82f633}.hover\:bg-emerald-500:hover{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.hover\:bg-emerald-500\/20:hover{background-color:#10b98133}.hover\:bg-indigo-500:hover{--tw-bg-opacity: 1;background-color:rgb(99 102 241 / var(--tw-bg-opacity, 1))}.hover\:bg-indigo-500\/20:hover{background-color:#6366f133}.hover\:bg-red-500\/10:hover{background-color:#ef44441a}.hover\:bg-red-500\/20:hover{background-color:#ef444433}.hover\:bg-red-600\/30:hover{background-color:#dc26264d}.hover\:bg-slate-700:hover{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-900\/40:hover{background-color:#0f172a66}.hover\:bg-white:hover{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.hover\:text-indigo-300:hover{--tw-text-opacity: 1;color:rgb(165 180 252 / var(--tw-text-opacity, 1))}.hover\:text-red-400:hover{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.hover\:text-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.hover\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:brightness-110:hover{--tw-brightness: brightness(1.1);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:border-slate-600:focus{--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:text-amber-500{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:col-span-1{grid-column:span 1 / span 1}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:col-span-3{grid-column:span 3 / span 3}.sm\:col-span-4{grid-column:span 4 / span 4}.sm\:flex{display:flex}.sm\:min-h-\[110px\]{min-height:110px}.sm\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:p-10{padding:2.5rem}.sm\:p-8{padding:2rem}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-5xl{font-size:3rem;line-height:1}.sm\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 768px){.md\:flex{display:flex}.md\:hidden{display:none}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}}@media (min-width: 1024px){.lg\:col-span-3{grid-column:span 3 / span 3}.lg\:col-span-4{grid-column:span 4 / span 4}.lg\:inline{display:inline}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:px-8{padding-left:2rem;padding-right:2rem}} diff --git a/frontend/dist/assets/index-KtQZvLw-.js b/frontend/dist/assets/index-KtQZvLw-.js deleted file mode 100644 index f604a7f..0000000 --- a/frontend/dist/assets/index-KtQZvLw-.js +++ /dev/null @@ -1,272 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function Bd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var iu={exports:{}},Ms={},ou={exports:{}},V={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Sr=Symbol.for("react.element"),Ud=Symbol.for("react.portal"),Vd=Symbol.for("react.fragment"),Hd=Symbol.for("react.strict_mode"),Qd=Symbol.for("react.profiler"),Wd=Symbol.for("react.provider"),Kd=Symbol.for("react.context"),Gd=Symbol.for("react.forward_ref"),qd=Symbol.for("react.suspense"),Yd=Symbol.for("react.memo"),Zd=Symbol.for("react.lazy"),Ho=Symbol.iterator;function Jd(e){return e===null||typeof e!="object"?null:(e=Ho&&e[Ho]||e["@@iterator"],typeof e=="function"?e:null)}var au={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uu=Object.assign,cu={};function Ln(e,t,n){this.props=e,this.context=t,this.refs=cu,this.updater=n||au}Ln.prototype.isReactComponent={};Ln.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ln.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function du(){}du.prototype=Ln.prototype;function Ei(e,t,n){this.props=e,this.context=t,this.refs=cu,this.updater=n||au}var Ci=Ei.prototype=new du;Ci.constructor=Ei;uu(Ci,Ln.prototype);Ci.isPureReactComponent=!0;var Qo=Array.isArray,fu=Object.prototype.hasOwnProperty,Ti={current:null},mu={key:!0,ref:!0,__self:!0,__source:!0};function pu(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)fu.call(t,r)&&!mu.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1>>1,M=k[L];if(0>>1;Ls(H,v))aes(et,H)?(k[L]=et,k[ae]=v,L=ae):(k[L]=H,k[K]=v,L=K);else if(aes(et,v))k[L]=et,k[ae]=v,L=ae;else break e}}return C}function s(k,C){var v=k.sortIndex-C.sortIndex;return v!==0?v:k.id-C.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var u=[],d=[],h=1,g=null,x=3,S=!1,N=!1,y=!1,O=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function f(k){for(var C=n(d);C!==null;){if(C.callback===null)r(d);else if(C.startTime<=k)r(d),C.sortIndex=C.expirationTime,t(u,C);else break;C=n(d)}}function w(k){if(y=!1,f(k),!N)if(n(u)!==null)N=!0,$e(_);else{var C=n(d);C!==null&&Ee(w,C.startTime-k)}}function _(k,C){N=!1,y&&(y=!1,m(P),P=-1),S=!0;var v=x;try{for(f(C),g=n(u);g!==null&&(!(g.expirationTime>C)||k&&!q());){var L=g.callback;if(typeof L=="function"){g.callback=null,x=g.priorityLevel;var M=L(g.expirationTime<=C);C=e.unstable_now(),typeof M=="function"?g.callback=M:g===n(u)&&r(u),f(C)}else r(u);g=n(u)}if(g!==null)var U=!0;else{var K=n(d);K!==null&&Ee(w,K.startTime-C),U=!1}return U}finally{g=null,x=v,S=!1}}var b=!1,T=null,P=-1,B=5,D=-1;function q(){return!(e.unstable_now()-Dk||125L?(k.sortIndex=v,t(d,k),n(u)===null&&k===n(d)&&(y?(m(P),P=-1):y=!0,Ee(w,v-L))):(k.sortIndex=M,t(u,k),N||S||(N=!0,$e(_))),k},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(k){var C=x;return function(){var v=x;x=C;try{return k.apply(this,arguments)}finally{x=v}}}})(vu);yu.exports=vu;var df=yu.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var ff=j,Oe=df;function E(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ml=Object.prototype.hasOwnProperty,mf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ko={},Go={};function pf(e){return Ml.call(Go,e)?!0:Ml.call(Ko,e)?!1:mf.test(e)?Go[e]=!0:(Ko[e]=!0,!1)}function hf(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function xf(e,t,n,r){if(t===null||typeof t>"u"||hf(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function be(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new be(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new be(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new be(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new be(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xe[e]=new be(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new be(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xe[e]=new be(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xe[e]=new be(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xe[e]=new be(e,5,!1,e.toLowerCase(),null,!1,!1)});var zi=/[\-:]([a-z])/g;function Li(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(zi,Li);xe[t]=new be(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(zi,Li);xe[t]=new be(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(zi,Li);xe[t]=new be(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new be(e,1,!1,e.toLowerCase(),null,!1,!1)});xe.xlinkHref=new be("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xe[e]=new be(e,1,!1,e.toLowerCase(),null,!0,!0)});function Mi(e,t,n,r){var s=xe.hasOwnProperty(t)?xe[t]:null;(s!==null?s.type!==0:r||!(2a||s[o]!==i[a]){var u=` -`+s[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=a);break}}}finally{al=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Qn(e):""}function gf(e){switch(e.tag){case 5:return Qn(e.type);case 16:return Qn("Lazy");case 13:return Qn("Suspense");case 19:return Qn("SuspenseList");case 0:case 2:case 15:return e=ul(e.type,!1),e;case 11:return e=ul(e.type.render,!1),e;case 1:return e=ul(e.type,!0),e;default:return""}}function Ol(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case on:return"Fragment";case ln:return"Portal";case Al:return"Profiler";case Ai:return"StrictMode";case Dl:return"Suspense";case Rl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ku:return(e.displayName||"Context")+".Consumer";case Nu:return(e._context.displayName||"Context")+".Provider";case Di:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ri:return t=e.displayName||null,t!==null?t:Ol(e.type)||"Memo";case kt:t=e._payload,e=e._init;try{return Ol(e(t))}catch{}}return null}function yf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ol(t);case 8:return t===Ai?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Rt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Su(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function vf(e){var t=Su(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dr(e){e._valueTracker||(e._valueTracker=vf(e))}function bu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Su(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function us(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Il(e,t){var n=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Yo(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Rt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function _u(e,t){t=t.checked,t!=null&&Mi(e,"checked",t,!1)}function Fl(e,t){_u(e,t);var n=Rt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?$l(e,t.type,n):t.hasOwnProperty("defaultValue")&&$l(e,t.type,Rt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Zo(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function $l(e,t,n){(t!=="number"||us(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wn=Array.isArray;function yn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=Rr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ir(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},wf=["Webkit","ms","Moz","O"];Object.keys(qn).forEach(function(e){wf.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qn[t]=qn[e]})});function Pu(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||qn.hasOwnProperty(e)&&qn[e]?(""+t).trim():t+"px"}function zu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Pu(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Nf=le({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Vl(e,t){if(t){if(Nf[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function Hl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Ql=null;function Oi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wl=null,vn=null,wn=null;function ea(e){if(e=Er(e)){if(typeof Wl!="function")throw Error(E(280));var t=e.stateNode;t&&(t=Is(t),Wl(e.stateNode,e.type,t))}}function Lu(e){vn?wn?wn.push(e):wn=[e]:vn=e}function Mu(){if(vn){var e=vn,t=wn;if(wn=vn=null,ea(e),t)for(e=0;e>>=0,e===0?32:31-(Lf(e)/Mf|0)|0}var Or=64,Ir=4194304;function Kn(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ms(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Kn(a):(i&=o,i!==0&&(r=Kn(i)))}else o=n&~s,o!==0?r=Kn(o):i!==0&&(r=Kn(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function br(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ze(t),e[t]=n}function Of(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Zn),ua=" ",ca=!1;function Xu(e,t){switch(e){case"keyup":return dm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ec(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var an=!1;function mm(e,t){switch(e){case"compositionend":return ec(t);case"keypress":return t.which!==32?null:(ca=!0,ua);case"textInput":return e=t.data,e===ua&&ca?null:e;default:return null}}function pm(e,t){if(an)return e==="compositionend"||!Qi&&Xu(e,t)?(e=Zu(),Xr=Ui=_t=null,an=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=pa(n)}}function sc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?sc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function lc(){for(var e=window,t=us();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=us(e.document)}return t}function Wi(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function jm(e){var t=lc(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&sc(n.ownerDocument.documentElement,n)){if(r!==null&&Wi(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=ha(n,i);var o=ha(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,un=null,Jl=null,Xn=null,Xl=!1;function xa(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xl||un==null||un!==us(r)||(r=un,"selectionStart"in r&&Wi(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Xn&&fr(Xn,r)||(Xn=r,r=xs(Jl,"onSelect"),0fn||(e.current=li[fn],li[fn]=null,fn--)}function X(e,t){fn++,li[fn]=e.current,e.current=t}var Ot={},Ne=Ft(Ot),Pe=Ft(!1),Zt=Ot;function bn(e,t){var n=e.type.contextTypes;if(!n)return Ot;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function ze(e){return e=e.childContextTypes,e!=null}function ys(){te(Pe),te(Ne)}function ja(e,t,n){if(Ne.current!==Ot)throw Error(E(168));X(Ne,t),X(Pe,n)}function pc(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(E(108,yf(e)||"Unknown",s));return le({},n,r)}function vs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ot,Zt=Ne.current,X(Ne,e),X(Pe,Pe.current),!0}function Sa(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=pc(e,t,Zt),r.__reactInternalMemoizedMergedChildContext=e,te(Pe),te(Ne),X(Ne,e)):te(Pe),X(Pe,n)}var ct=null,Fs=!1,jl=!1;function hc(e){ct===null?ct=[e]:ct.push(e)}function Dm(e){Fs=!0,hc(e)}function $t(){if(!jl&&ct!==null){jl=!0;var e=0,t=G;try{var n=ct;for(G=1;e>=o,s-=o,dt=1<<32-Ze(t)+s|n<P?(B=T,T=null):B=T.sibling;var D=x(m,T,f[P],w);if(D===null){T===null&&(T=B);break}e&&T&&D.alternate===null&&t(m,T),c=i(D,c,P),b===null?_=D:b.sibling=D,b=D,T=B}if(P===f.length)return n(m,T),ne&&Vt(m,P),_;if(T===null){for(;PP?(B=T,T=null):B=T.sibling;var q=x(m,T,D.value,w);if(q===null){T===null&&(T=B);break}e&&T&&q.alternate===null&&t(m,T),c=i(q,c,P),b===null?_=q:b.sibling=q,b=q,T=B}if(D.done)return n(m,T),ne&&Vt(m,P),_;if(T===null){for(;!D.done;P++,D=f.next())D=g(m,D.value,w),D!==null&&(c=i(D,c,P),b===null?_=D:b.sibling=D,b=D);return ne&&Vt(m,P),_}for(T=r(m,T);!D.done;P++,D=f.next())D=S(T,m,P,D.value,w),D!==null&&(e&&D.alternate!==null&&T.delete(D.key===null?P:D.key),c=i(D,c,P),b===null?_=D:b.sibling=D,b=D);return e&&T.forEach(function(Y){return t(m,Y)}),ne&&Vt(m,P),_}function O(m,c,f,w){if(typeof f=="object"&&f!==null&&f.type===on&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case Ar:e:{for(var _=f.key,b=c;b!==null;){if(b.key===_){if(_=f.type,_===on){if(b.tag===7){n(m,b.sibling),c=s(b,f.props.children),c.return=m,m=c;break e}}else if(b.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===kt&&Ea(_)===b.type){n(m,b.sibling),c=s(b,f.props),c.ref=Un(m,b,f),c.return=m,m=c;break e}n(m,b);break}else t(m,b);b=b.sibling}f.type===on?(c=qt(f.props.children,m.mode,w,f.key),c.return=m,m=c):(w=os(f.type,f.key,f.props,null,m.mode,w),w.ref=Un(m,c,f),w.return=m,m=w)}return o(m);case ln:e:{for(b=f.key;c!==null;){if(c.key===b)if(c.tag===4&&c.stateNode.containerInfo===f.containerInfo&&c.stateNode.implementation===f.implementation){n(m,c.sibling),c=s(c,f.children||[]),c.return=m,m=c;break e}else{n(m,c);break}else t(m,c);c=c.sibling}c=zl(f,m.mode,w),c.return=m,m=c}return o(m);case kt:return b=f._init,O(m,c,b(f._payload),w)}if(Wn(f))return N(m,c,f,w);if(On(f))return y(m,c,f,w);Qr(m,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,c!==null&&c.tag===6?(n(m,c.sibling),c=s(c,f),c.return=m,m=c):(n(m,c),c=Pl(f,m.mode,w),c.return=m,m=c),o(m)):n(m,c)}return O}var En=vc(!0),wc=vc(!1),ks=Ft(null),js=null,hn=null,Yi=null;function Zi(){Yi=hn=js=null}function Ji(e){var t=ks.current;te(ks),e._currentValue=t}function ai(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function kn(e,t){js=e,Yi=hn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Te=!0),e.firstContext=null)}function Qe(e){var t=e._currentValue;if(Yi!==e)if(e={context:e,memoizedValue:t,next:null},hn===null){if(js===null)throw Error(E(308));hn=e,js.dependencies={lanes:0,firstContext:e}}else hn=hn.next=e;return t}var Wt=null;function Xi(e){Wt===null?Wt=[e]:Wt.push(e)}function Nc(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Xi(t)):(n.next=s.next,s.next=n),t.interleaved=n,xt(e,r)}function xt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var jt=!1;function eo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function mt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Lt(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Q&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,xt(e,n)}return s=r.interleaved,s===null?(t.next=t,Xi(r)):(t.next=s.next,s.next=t),r.interleaved=t,xt(e,n)}function ts(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Fi(e,n)}}function Ca(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ss(e,t,n,r){var s=e.updateQueue;jt=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var u=a,d=u.next;u.next=null,o===null?i=d:o.next=d,o=u;var h=e.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==o&&(a===null?h.firstBaseUpdate=d:a.next=d,h.lastBaseUpdate=u))}if(i!==null){var g=s.baseState;o=0,h=d=u=null,a=i;do{var x=a.lane,S=a.eventTime;if((r&x)===x){h!==null&&(h=h.next={eventTime:S,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var N=e,y=a;switch(x=t,S=n,y.tag){case 1:if(N=y.payload,typeof N=="function"){g=N.call(S,g,x);break e}g=N;break e;case 3:N.flags=N.flags&-65537|128;case 0:if(N=y.payload,x=typeof N=="function"?N.call(S,g,x):N,x==null)break e;g=le({},g,x);break e;case 2:jt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,x=s.effects,x===null?s.effects=[a]:x.push(a))}else S={eventTime:S,lane:x,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(d=h=S,u=g):h=h.next=S,o|=x;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;x=a,a=x.next,x.next=null,s.lastBaseUpdate=x,s.shared.pending=null}}while(!0);if(h===null&&(u=g),s.baseState=u,s.firstBaseUpdate=d,s.lastBaseUpdate=h,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);en|=o,e.lanes=o,e.memoizedState=g}}function Ta(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=bl.transition;bl.transition={};try{e(!1),t()}finally{G=n,bl.transition=r}}function Fc(){return We().memoizedState}function Fm(e,t,n){var r=At(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},$c(e))Bc(t,n);else if(n=Nc(e,t,n,r),n!==null){var s=je();Je(n,e,r,s),Uc(n,t,r)}}function $m(e,t,n){var r=At(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if($c(e))Bc(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Xe(a,o)){var u=t.interleaved;u===null?(s.next=s,Xi(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=Nc(e,t,s,r),n!==null&&(s=je(),Je(n,e,r,s),Uc(n,t,r))}}function $c(e){var t=e.alternate;return e===se||t!==null&&t===se}function Bc(e,t){er=_s=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Uc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Fi(e,n)}}var Es={readContext:Qe,useCallback:ye,useContext:ye,useEffect:ye,useImperativeHandle:ye,useInsertionEffect:ye,useLayoutEffect:ye,useMemo:ye,useReducer:ye,useRef:ye,useState:ye,useDebugValue:ye,useDeferredValue:ye,useTransition:ye,useMutableSource:ye,useSyncExternalStore:ye,useId:ye,unstable_isNewReconciler:!1},Bm={readContext:Qe,useCallback:function(e,t){return nt().memoizedState=[e,t===void 0?null:t],e},useContext:Qe,useEffect:za,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,rs(4194308,4,Ac.bind(null,t,e),n)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){return rs(4,2,e,t)},useMemo:function(e,t){var n=nt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=nt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Fm.bind(null,se,e),[r.memoizedState,e]},useRef:function(e){var t=nt();return e={current:e},t.memoizedState=e},useState:Pa,useDebugValue:ao,useDeferredValue:function(e){return nt().memoizedState=e},useTransition:function(){var e=Pa(!1),t=e[0];return e=Im.bind(null,e[1]),nt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=se,s=nt();if(ne){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),me===null)throw Error(E(349));Xt&30||_c(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,za(Cc.bind(null,r,i,e),[e]),r.flags|=2048,wr(9,Ec.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=nt(),t=me.identifierPrefix;if(ne){var n=ft,r=dt;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=yr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[rt]=t,e[hr]=r,Jc(e,t,!1,!1),t.stateNode=e;e:{switch(o=Hl(n,r),n){case"dialog":ee("cancel",e),ee("close",e),s=r;break;case"iframe":case"object":case"embed":ee("load",e),s=r;break;case"video":case"audio":for(s=0;sPn&&(t.flags|=128,r=!0,Vn(i,!1),t.lanes=4194304)}else{if(!r)if(e=bs(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Vn(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ne)return ve(t),null}else 2*oe()-i.renderingStartTime>Pn&&n!==1073741824&&(t.flags|=128,r=!0,Vn(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=oe(),t.sibling=null,n=re.current,X(re,r?n&1|2:n&1),t):(ve(t),null);case 22:case 23:return ho(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ae&1073741824&&(ve(t),t.subtreeFlags&6&&(t.flags|=8192)):ve(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function qm(e,t){switch(Gi(t),t.tag){case 1:return ze(t.type)&&ys(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Cn(),te(Pe),te(Ne),ro(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return no(t),null;case 13:if(te(re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));_n()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return te(re),null;case 4:return Cn(),null;case 10:return Ji(t.type._context),null;case 22:case 23:return ho(),null;case 24:return null;default:return null}}var Kr=!1,we=!1,Ym=typeof WeakSet=="function"?WeakSet:Set,A=null;function xn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ie(e,t,r)}else n.current=null}function gi(e,t,n){try{n()}catch(r){ie(e,t,r)}}var Ua=!1;function Zm(e,t){if(ei=ps,e=lc(),Wi(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,u=-1,d=0,h=0,g=e,x=null;t:for(;;){for(var S;g!==n||s!==0&&g.nodeType!==3||(a=o+s),g!==i||r!==0&&g.nodeType!==3||(u=o+r),g.nodeType===3&&(o+=g.nodeValue.length),(S=g.firstChild)!==null;)x=g,g=S;for(;;){if(g===e)break t;if(x===n&&++d===s&&(a=o),x===i&&++h===r&&(u=o),(S=g.nextSibling)!==null)break;g=x,x=g.parentNode}g=S}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},ps=!1,A=t;A!==null;)if(t=A,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,A=e;else for(;A!==null;){t=A;try{var N=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(N!==null){var y=N.memoizedProps,O=N.memoizedState,m=t.stateNode,c=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ge(t.type,y),O);m.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var f=t.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(w){ie(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,A=e;break}A=t.return}return N=Ua,Ua=!1,N}function tr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&gi(t,n,i)}s=s.next}while(s!==r)}}function Us(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function yi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function td(e){var t=e.alternate;t!==null&&(e.alternate=null,td(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rt],delete t[hr],delete t[si],delete t[Mm],delete t[Am])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function nd(e){return e.tag===5||e.tag===3||e.tag===4}function Va(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||nd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function vi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gs));else if(r!==4&&(e=e.child,e!==null))for(vi(e,t,n),e=e.sibling;e!==null;)vi(e,t,n),e=e.sibling}function wi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(wi(e,t,n),e=e.sibling;e!==null;)wi(e,t,n),e=e.sibling}var pe=null,qe=!1;function Nt(e,t,n){for(n=n.child;n!==null;)rd(e,t,n),n=n.sibling}function rd(e,t,n){if(st&&typeof st.onCommitFiberUnmount=="function")try{st.onCommitFiberUnmount(As,n)}catch{}switch(n.tag){case 5:we||xn(n,t);case 6:var r=pe,s=qe;pe=null,Nt(e,t,n),pe=r,qe=s,pe!==null&&(qe?(e=pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pe.removeChild(n.stateNode));break;case 18:pe!==null&&(qe?(e=pe,n=n.stateNode,e.nodeType===8?kl(e.parentNode,n):e.nodeType===1&&kl(e,n),cr(e)):kl(pe,n.stateNode));break;case 4:r=pe,s=qe,pe=n.stateNode.containerInfo,qe=!0,Nt(e,t,n),pe=r,qe=s;break;case 0:case 11:case 14:case 15:if(!we&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&gi(n,t,o),s=s.next}while(s!==r)}Nt(e,t,n);break;case 1:if(!we&&(xn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ie(n,t,a)}Nt(e,t,n);break;case 21:Nt(e,t,n);break;case 22:n.mode&1?(we=(r=we)||n.memoizedState!==null,Nt(e,t,n),we=r):Nt(e,t,n);break;default:Nt(e,t,n)}}function Ha(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ym),t.forEach(function(r){var s=ip.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Ke(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=o),r&=~i}if(r=s,r=oe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Xm(r/1960))-r,10e?16:e,Et===null)var r=!1;else{if(e=Et,Et=null,Ps=0,Q&6)throw Error(E(331));var s=Q;for(Q|=4,A=e.current;A!==null;){var i=A,o=i.child;if(A.flags&16){var a=i.deletions;if(a!==null){for(var u=0;uoe()-mo?Gt(e,0):fo|=n),Le(e,t)}function dd(e,t){t===0&&(e.mode&1?(t=Ir,Ir<<=1,!(Ir&130023424)&&(Ir=4194304)):t=1);var n=je();e=xt(e,t),e!==null&&(br(e,t,n),Le(e,n))}function lp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dd(e,n)}function ip(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(t),dd(e,n)}var fd;fd=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pe.current)Te=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Te=!1,Km(e,t,n);Te=!!(e.flags&131072)}else Te=!1,ne&&t.flags&1048576&&xc(t,Ns,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ss(e,t),e=t.pendingProps;var s=bn(t,Ne.current);kn(t,n),s=lo(null,t,r,e,s,n);var i=io();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ze(r)?(i=!0,vs(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,eo(t),s.updater=Bs,t.stateNode=s,s._reactInternals=t,ci(t,r,e,n),t=mi(null,t,r,!0,i,n)):(t.tag=0,ne&&i&&Ki(t),ke(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ss(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=ap(r),e=Ge(r,e),s){case 0:t=fi(null,t,r,e,n);break e;case 1:t=Fa(null,t,r,e,n);break e;case 11:t=Oa(null,t,r,e,n);break e;case 14:t=Ia(null,t,r,Ge(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ge(r,s),fi(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ge(r,s),Fa(e,t,r,s,n);case 3:e:{if(qc(t),e===null)throw Error(E(387));r=t.pendingProps,i=t.memoizedState,s=i.element,kc(e,t),Ss(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Tn(Error(E(423)),t),t=$a(e,t,r,n,s);break e}else if(r!==s){s=Tn(Error(E(424)),t),t=$a(e,t,r,n,s);break e}else for(De=zt(t.stateNode.containerInfo.firstChild),Re=t,ne=!0,Ye=null,n=wc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(_n(),r===s){t=gt(e,t,n);break e}ke(e,t,r,n)}t=t.child}return t;case 5:return jc(t),e===null&&oi(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,ni(r,s)?o=null:i!==null&&ni(r,i)&&(t.flags|=32),Gc(e,t),ke(e,t,o,n),t.child;case 6:return e===null&&oi(t),null;case 13:return Yc(e,t,n);case 4:return to(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=En(t,null,r,n):ke(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ge(r,s),Oa(e,t,r,s,n);case 7:return ke(e,t,t.pendingProps,n),t.child;case 8:return ke(e,t,t.pendingProps.children,n),t.child;case 12:return ke(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,X(ks,r._currentValue),r._currentValue=o,i!==null)if(Xe(i.value,o)){if(i.children===s.children&&!Pe.current){t=gt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=mt(-1,n&-n),u.tag=2;var d=i.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?u.next=u:(u.next=h.next,h.next=u),d.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),ai(i.return,n,t),a.lanes|=n;break}u=u.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(E(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),ai(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}ke(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,kn(t,n),s=Qe(s),r=r(s),t.flags|=1,ke(e,t,r,n),t.child;case 14:return r=t.type,s=Ge(r,t.pendingProps),s=Ge(r.type,s),Ia(e,t,r,s,n);case 15:return Wc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Ge(r,s),ss(e,t),t.tag=1,ze(r)?(e=!0,vs(t)):e=!1,kn(t,n),Vc(t,r,s),ci(t,r,s,n),mi(null,t,r,!0,e,n);case 19:return Zc(e,t,n);case 22:return Kc(e,t,n)}throw Error(E(156,t.tag))};function md(e,t){return $u(e,t)}function op(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ve(e,t,n,r){return new op(e,t,n,r)}function go(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ap(e){if(typeof e=="function")return go(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Di)return 11;if(e===Ri)return 14}return 2}function Dt(e,t){var n=e.alternate;return n===null?(n=Ve(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function os(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")go(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case on:return qt(n.children,s,i,t);case Ai:o=8,s|=8;break;case Al:return e=Ve(12,n,t,s|2),e.elementType=Al,e.lanes=i,e;case Dl:return e=Ve(13,n,t,s),e.elementType=Dl,e.lanes=i,e;case Rl:return e=Ve(19,n,t,s),e.elementType=Rl,e.lanes=i,e;case ju:return Hs(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Nu:o=10;break e;case ku:o=9;break e;case Di:o=11;break e;case Ri:o=14;break e;case kt:o=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=Ve(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function qt(e,t,n,r){return e=Ve(7,e,r,t),e.lanes=n,e}function Hs(e,t,n,r){return e=Ve(22,e,r,t),e.elementType=ju,e.lanes=n,e.stateNode={isHidden:!1},e}function Pl(e,t,n){return e=Ve(6,e,null,t),e.lanes=n,e}function zl(e,t,n){return t=Ve(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function up(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=dl(0),this.expirationTimes=dl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dl(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function yo(e,t,n,r,s,i,o,a,u){return e=new up(e,t,n,a,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Ve(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},eo(i),e}function cp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gd)}catch(e){console.error(e)}}gd(),gu.exports=Ie;var hp=gu.exports,Ja=hp;Ll.createRoot=Ja.createRoot,Ll.hydrateRoot=Ja.hydrateRoot;/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const xp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),yd=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */var gp={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const yp=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...a},u)=>j.createElement("svg",{ref:u,...gp,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:yd("lucide",s),...a},[...o.map(([d,h])=>j.createElement(d,h)),...Array.isArray(i)?i:[i]]));/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const F=(e,t)=>{const n=j.forwardRef(({className:r,...s},i)=>j.createElement(yp,{ref:i,iconNode:t,className:yd(`lucide-${xp(e)}`,r),...s}));return n.displayName=`${e}`,n};/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vd=F("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wd=F("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const vp=F("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Xa=F("CalendarDays",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Tr=F("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const wp=F("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Np=F("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zn=F("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ot=F("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kr=F("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kp=F("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Nd=F("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jp=F("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const eu=F("House",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const qs=F("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Sp=F("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bp=F("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bi=F("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ko=F("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _p=F("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ep=F("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const tu=F("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jr=F("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Cp=F("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const it=F("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Tp=F("Printer",[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const kd=F("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Pp=F("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const nu=F("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const zp=F("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Lp=F("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jd=F("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Sd=F("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Mp=F("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Ap=F("TableProperties",[["path",{d:"M15 3v18",key:"14nvp0"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M21 9H3",key:"1338ky"}],["path",{d:"M21 15H3",key:"9uk58r"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Yt=F("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const jo=F("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const Dp=F("UserPlus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const ru=F("UserX",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"17",x2:"22",y1:"8",y2:"13",key:"3nzzx3"}],["line",{x1:"22",x2:"17",y1:"8",y2:"13",key:"1swrse"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const as=F("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const bd=F("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** - * @license lucide-react v0.424.0 - ISC - * - * This source code is licensed under the ISC license. - * See the LICENSE file in the root directory of this source tree. - */const _d=F("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Rp({branding:e,user:t,activeTab:n,onChangeTab:r,themeMode:s,onChangeThemeMode:i,onLogout:o,onOpenAuth:a,onOpenCreateEvent:u,onOpenTemplates:d,onOpenProfile:h,onOpenAdmin:g,pwaInstallPrompt:x,onInstallPwa:S}){const N=(e==null?void 0:e.primary_color)||"var(--brand-primary)",y=()=>{i(s==="dark"?"light":s==="light"?"auto":"dark")};return l.jsxs("header",{className:"bg-surface border-b border-grid sticky top-0 z-40",children:[l.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 h-16 flex items-center justify-between gap-4",children:[l.jsxs("div",{className:"flex items-center space-x-3 shrink-0",children:[l.jsx("div",{onClick:()=>r("home"),style:{backgroundColor:N},className:"w-8 h-8 rounded-sm flex items-center justify-center text-white font-bold cursor-pointer shadow-sm",children:e!=null&&e.logo_url?l.jsx("img",{src:e.logo_url,alt:"Logo",className:"w-4 h-4 object-contain"}):l.jsx(Tr,{className:"w-4 h-4"})}),l.jsxs("div",{onClick:()=>r("home"),className:"cursor-pointer",children:[l.jsx("h1",{className:"font-serif text-base font-bold tracking-tight text-main leading-none",children:(e==null?void 0:e.app_name)||"Schichtplaner"}),l.jsx("div",{className:"text-[10px] font-mono text-muted mt-1 uppercase tracking-wider flex items-center gap-1.5",children:t?l.jsxs("span",{className:"text-emerald-500 font-semibold",children:["[ ",t.display_name||t.username," ]"]}):l.jsx("span",{className:"text-amber-500 font-semibold",children:"[ GAST-MODUS ]"})})]})]}),l.jsxs("nav",{className:"hidden md:flex items-center gap-2",children:[l.jsxs("button",{onClick:()=>r("home"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="home"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[l.jsx(eu,{className:"w-3.5 h-3.5"})," Startseite"]}),l.jsxs("button",{onClick:()=>r("calendar"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="calendar"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[l.jsx(Xa,{className:"w-3.5 h-3.5"})," Kalender"]}),((t==null?void 0:t.is_admin_user)||(t==null?void 0:t.is_staff)||(t==null?void 0:t.is_superuser))&&l.jsxs("button",{onClick:()=>r("admin"),className:`px-3 py-1.5 rounded-sm text-xs font-mono transition flex items-center gap-1.5 border ${n==="admin"?"bg-surface-hover text-main font-bold border-grid":"text-muted hover:text-main border-transparent"}`,children:[l.jsx(nu,{className:"w-3.5 h-3.5 text-indigo-400"})," Admin"]})]}),l.jsxs("div",{className:"flex items-center space-x-2",children:[l.jsx("button",{onClick:y,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5",title:`Design-Modus: ${s.toUpperCase()}`,children:s==="dark"?l.jsxs(l.Fragment,{children:[l.jsx(Ep,{className:"w-3.5 h-3.5 text-indigo-400"}),l.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"DARK"})]}):s==="light"?l.jsxs(l.Fragment,{children:[l.jsx(Mp,{className:"w-3.5 h-3.5 text-amber-500"}),l.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"LIGHT"})]}):l.jsxs(l.Fragment,{children:[l.jsx(_p,{className:"w-3.5 h-3.5 text-blue-500"}),l.jsx("span",{className:"hidden lg:inline text-[11px] font-bold",children:"AUTO"})]})}),x&&l.jsxs("button",{onClick:S,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-emerald-500/10 text-emerald-500 border border-emerald-500/20 hover:bg-emerald-500/20 transition flex items-center gap-1",children:[l.jsx(Sd,{className:"w-3 h-3"})," PWA"]}),t?l.jsxs(l.Fragment,{children:[l.jsxs("button",{onClick:u,style:{backgroundColor:N},className:"h-8 px-3 rounded-sm text-xs font-mono font-bold text-white transition flex items-center gap-1 shadow-sm hover:brightness-110",children:[l.jsx(it,{className:"w-3.5 h-3.5"})," Event"]}),l.jsxs("button",{onClick:d,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition hidden sm:flex items-center gap-1",title:"Vorlagen",children:[l.jsx(qs,{className:"w-3.5 h-3.5 text-muted"})," Vorlagen"]}),l.jsxs("button",{onClick:h,className:"h-8 px-2.5 rounded-sm text-xs font-mono bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1",title:"Profil & Namen ändern",children:[l.jsx(jr,{className:"w-3.5 h-3.5 text-amber-500"})," Profil"]}),(t.is_admin_user||t.is_staff||t.is_superuser)&&l.jsxs("button",{onClick:()=>r("admin"),className:`h-8 px-2.5 rounded-sm text-xs font-mono transition flex items-center gap-1 border ${n==="admin"?"bg-indigo-500/20 text-indigo-300 border-indigo-500/40 font-bold":"bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border-indigo-500/30"}`,title:"Admin-Zentrale",children:[l.jsx(nu,{className:"w-3.5 h-3.5"})," Admin"]}),l.jsx("div",{className:"h-4 w-px bg-grid mx-1"}),l.jsx("button",{onClick:o,className:"h-8 w-8 rounded-sm text-muted hover:text-red-500 hover:bg-red-500/10 border border-transparent hover:border-red-500/20 transition flex items-center justify-center",title:"Abmelden",children:l.jsx(bp,{className:"w-3.5 h-3.5"})})]}):l.jsxs("button",{onClick:a,style:{backgroundColor:N},className:"h-8 px-3.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 flex items-center gap-1.5 shadow-sm",children:[l.jsx(as,{className:"w-3.5 h-3.5"})," Anmelden"]})]})]}),l.jsxs("div",{className:"flex md:hidden items-center justify-around border-t border-grid py-2 bg-subtle text-xs font-mono",children:[l.jsxs("button",{onClick:()=>r("home"),className:`flex items-center gap-1 px-3 py-1.5 rounded-sm border ${n==="home"?"text-main font-bold bg-surface border-grid":"text-muted border-transparent"}`,children:[l.jsx(eu,{className:"w-3.5 h-3.5"})," Start"]}),l.jsxs("button",{onClick:()=>r("calendar"),className:`flex items-center gap-1 px-3 py-1.5 rounded-sm border ${n==="calendar"?"text-main font-bold bg-surface border-grid":"text-muted border-transparent"}`,children:[l.jsx(Xa,{className:"w-3.5 h-3.5"})," Termine"]}),l.jsxs("button",{onClick:()=>r("schedule"),className:`flex items-center gap-1 px-3 py-1.5 rounded-sm border ${n==="schedule"?"text-main font-bold bg-surface border-grid":"text-muted border-transparent"}`,children:[l.jsx(Ap,{className:"w-3.5 h-3.5"})," Schichtplan"]})]})]})}function Op({event:e,user:t,onSignupClick:n,onCancelClick:r,onRemoveUserFromShift:s,onGenerateClaimLink:i,onExportPdf:o,onPrintView:a,onEditEvent:u}){var x,S;if(!e||!e.task_areas||e.task_areas.length===0)return l.jsxs("div",{className:"hallmark-panel rounded-sm p-12 text-center border border-grid font-mono",children:[l.jsx(kr,{className:"w-8 h-8 text-muted mx-auto mb-3"}),l.jsx("h3",{className:"font-serif text-xl font-bold text-main uppercase",children:"Keine Aufgabenfelder vorhanden"}),l.jsx("p",{className:"text-xs text-muted mt-1 mb-4",children:"[ Event hat noch keine definierten Aufgabenfelder oder Schichten ]"}),t&&(t.is_admin_user||t.is_staff||t.is_superuser||(e==null?void 0:e.created_by)===t.id||((x=e==null?void 0:e.created_by)==null?void 0:x.id)===t.id||(e==null?void 0:e.co_managers)&&e.co_managers.some(N=>typeof N=="object"?N.id===t.id:N===t.id))&&u&&l.jsxs("button",{onClick:()=>u(e),className:"px-4 py-2 rounded-sm bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border border-indigo-500/30 font-bold text-xs inline-flex items-center gap-2",children:[l.jsx(jr,{className:"w-4 h-4"})," SCHICHTEN & BEREICHE ANLEGEN"]})]});const d=!t,h=t&&(e==null?void 0:e.co_managers)&&e.co_managers.some(N=>typeof N=="object"?N.id===t.id:N===t.id),g=t&&(t.is_admin_user||t.is_staff||t.is_superuser||(e==null?void 0:e.created_by)===t.id||((S=e==null?void 0:e.created_by)==null?void 0:S.id)===t.id||h);return l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid flex flex-col md:flex-row md:items-center justify-between gap-4",children:[l.jsxs("div",{className:"space-y-1 font-mono",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted mb-1",children:[l.jsxs("span",{className:"bg-subtle px-2.5 py-0.5 rounded-sm border border-grid font-bold text-main",children:[new Date(e.start_date).toLocaleDateString("de-DE")," — ",new Date(e.end_date).toLocaleDateString("de-DE")]}),e.location&&l.jsxs("span",{className:"flex items-center gap-1 text-muted",children:[l.jsx(ko,{className:"w-3.5 h-3.5 shrink-0"}),e.location]}),e.is_active===!1&&l.jsx("span",{className:"px-2 py-0.5 rounded-sm bg-amber-500/10 text-amber-500 border border-amber-500/20 font-bold",children:"[ DEAKTIVIERT ]"})]}),l.jsx("h2",{className:"font-serif text-3xl sm:text-4xl font-bold uppercase tracking-tight text-main",children:e.title}),e.description&&l.jsx("p",{className:"text-xs font-sans text-muted max-w-2xl mt-1",children:e.description})]}),l.jsxs("div",{className:"flex items-center gap-2 no-print font-mono text-xs shrink-0",children:[g&&u&&l.jsxs("button",{onClick:()=>u(e),className:"px-3.5 py-1.5 rounded-sm bg-indigo-500/10 hover:bg-indigo-500/20 text-indigo-400 border border-indigo-500/30 transition flex items-center gap-1.5 font-bold",title:"Schichten und Aufgabenbereiche für diese Veranstaltung bearbeiten",children:[l.jsx(jr,{className:"w-3.5 h-3.5"})," SCHICHTEN BEARBEITEN"]}),l.jsxs("button",{onClick:a,className:"px-3.5 py-1.5 rounded-sm bg-surface hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5 font-bold",children:[l.jsx(Tp,{className:"w-3.5 h-3.5"})," DRUCKEN"]}),l.jsxs("button",{onClick:o,className:"px-3.5 py-1.5 rounded-sm bg-surface hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5 font-bold",children:[l.jsx(kp,{className:"w-3.5 h-3.5"})," PDF"]})]})]}),d&&l.jsxs("div",{className:"p-3.5 rounded-sm bg-amber-500/10 border border-amber-500/20 text-amber-500 text-xs font-mono flex items-center gap-2",children:[l.jsx(jd,{className:"w-4 h-4 shrink-0 text-amber-500"}),l.jsxs("span",{children:["[ GAST-DATENSCHUTZ ]: Belegungszahlen sichtbar, Namensanzeige aus Datenschutzgründen ",l.jsx("strong",{children:"anonymisiert"}),"."]})]}),l.jsx("div",{className:"hallmark-panel rounded-sm border border-grid overflow-hidden",children:l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-left border-collapse",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"bg-subtle border-b border-grid text-[11px] font-mono text-muted uppercase tracking-wider",children:[l.jsx("th",{className:"py-3.5 px-4 w-1/4",children:"Aufgabenfeld"}),l.jsx("th",{className:"py-3.5 px-4 w-1/4",children:"Schicht & Zeitraum"}),l.jsx("th",{className:"py-3.5 px-4 w-1/6",children:"Qualifikation"}),l.jsx("th",{className:"py-3.5 px-4 w-1/4",children:"Belegung & Personen"}),l.jsx("th",{className:"py-3.5 px-4 w-1/6 text-right",children:"Aktion"})]})}),l.jsx("tbody",{className:"divide-y divide-grid text-xs font-sans",children:e.task_areas.map(N=>!N.shifts||N.shifts.length===0?l.jsxs("tr",{children:[l.jsx("td",{className:"py-3.5 px-4 font-serif text-lg font-bold text-main uppercase",children:N.name}),l.jsx("td",{colSpan:4,className:"py-3.5 px-4 text-muted font-mono text-[11px]",children:"[ Keine Schichten angelegt ]"})]},`area-${N.id}`):N.shifts.map((y,O)=>{const m=O===0,c=y.is_full,w=!!(t?y.signups.find(b=>!b.is_guest&&b.display_name===t.display_name):null),_=y.required_skills&&y.required_skills.length>0;return l.jsxs("tr",{className:"hover:bg-surface-hover/60 transition",children:[m?l.jsxs("td",{rowSpan:N.shifts.length,className:"py-3.5 px-4 font-serif text-lg font-bold text-main uppercase bg-subtle/80 align-top border-r border-grid",children:[l.jsx("div",{children:N.name}),N.description&&l.jsx("div",{className:"text-[11px] font-sans font-normal text-muted mt-0.5",children:N.description})]}):null,l.jsxs("td",{className:"py-3.5 px-4",children:[l.jsxs("div",{className:"font-semibold text-main flex items-center gap-2 flex-wrap",children:[l.jsx("span",{children:y.title}),y.date&&l.jsxs("span",{className:"text-[10px] font-mono font-bold text-indigo-400 bg-indigo-500/10 px-2 py-0.5 rounded-sm border border-indigo-500/20",children:["📅 ",new Date(y.date+"T00:00:00").toLocaleDateString("de-DE",{weekday:"short",day:"2-digit",month:"2-digit"})]})]}),l.jsxs("div",{className:"text-[11px] font-mono text-muted flex items-center gap-1 mt-0.5",children:[l.jsx(kr,{className:"w-3 h-3 text-muted shrink-0"}),l.jsxs("span",{children:[y.start_time," — ",y.end_time," Uhr"]})]})]}),l.jsx("td",{className:"py-3.5 px-4 font-mono",children:_?l.jsx("div",{className:"flex flex-wrap gap-1",children:y.required_skills.map(b=>l.jsxs("span",{style:{backgroundColor:`${b.color}15`,borderColor:`${b.color}35`,color:b.color},className:"px-2 py-0.5 rounded-sm text-[10px] font-semibold border flex items-center gap-1",children:[l.jsx(vp,{className:"w-3 h-3 shrink-0"})," ",b.name]},b.id))}):l.jsx("span",{className:"text-[11px] text-muted",children:"—"})}),l.jsxs("td",{className:"py-3.5 px-4 font-mono",children:[l.jsx("div",{className:"flex items-center gap-2",children:l.jsxs("span",{className:`px-2 py-0.5 rounded-sm text-[11px] font-bold border ${c?"bg-red-500/10 text-red-500 border-red-500/20":"bg-emerald-500/10 text-emerald-500 border-emerald-500/20"}`,children:["[ ",y.signups_count," / ",y.max_participants," BELEGT ]"]})}),l.jsx("div",{className:"mt-2 space-y-1 font-sans",children:y.signups.map(b=>l.jsxs("div",{className:"text-[11px] text-muted flex items-center justify-between gap-2 p-1.5 rounded-sm bg-subtle border border-grid",children:[l.jsxs("div",{className:"flex items-center gap-1.5 truncate",children:[l.jsx(jo,{className:"w-3 h-3 text-muted shrink-0"}),l.jsx("span",{className:"truncate",children:b.display_name}),b.is_guest&&l.jsx("span",{className:"text-[9px] font-mono text-amber-500 px-1 rounded-sm bg-amber-500/10 border border-amber-500/20 font-bold",children:"GAST"})]}),l.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[t&&b.is_guest&&i&&l.jsxs("button",{onClick:()=>i(b),className:"text-indigo-400 hover:text-indigo-300 transition p-1 rounded-sm bg-indigo-500/10 hover:bg-indigo-500/20 border border-indigo-500/20 flex items-center gap-1 text-[10px] font-mono font-bold",title:"Konto-Einladungslink für diese Gast-Eintragung kopieren",children:[l.jsx(Dp,{className:"w-3 h-3"})," LINK"]}),g&&s&&l.jsx("button",{onClick:()=>s(y,b.id),className:"text-muted hover:text-red-500 transition p-1 rounded-sm hover:bg-red-500/10",title:"Person aus dieser Schicht entfernen",children:l.jsx(ru,{className:"w-3.5 h-3.5"})})]})]},b.id))})]}),l.jsx("td",{className:"py-3.5 px-4 text-right font-mono",children:w?l.jsxs("button",{onClick:()=>r(y),className:"px-3 py-1.5 rounded-sm text-xs font-semibold bg-red-500/10 hover:bg-red-500/20 text-red-500 border border-red-500/20 transition flex items-center gap-1 ml-auto",children:[l.jsx(ru,{className:"w-3.5 h-3.5"})," AUSTRAGEN"]}):c?l.jsx("span",{className:"text-xs text-muted font-bold",children:"[ VOLL ]"}):l.jsxs("button",{onClick:()=>n(y),style:{backgroundColor:"var(--brand-primary)"},className:"px-3.5 py-1.5 rounded-sm text-xs font-bold text-white transition hover:brightness-110 flex items-center gap-1 ml-auto shadow-sm",children:[l.jsx(ot,{className:"w-3.5 h-3.5"})," EINTRAGEN"]})})]},`shift-${y.id}`)}))})]})})})]})}function Ip({shift:e,onClose:t,onSubmit:n}){const[r,s]=j.useState(""),[i,o]=j.useState(""),[a,u]=j.useState(!1),[d,h]=j.useState(""),[g,x]=j.useState(!1);j.useEffect(()=>{const y=localStorage.getItem("guest_display_name")||"";y&&s(y)},[]);const S=()=>{const y="acaptcha-verified-"+Math.random().toString(36).substring(2,10);o(y),u(!0)},N=async y=>{if(y.preventDefault(),h(""),!r.trim()){h("Bitte gib deinen Namen ein.");return}if(!a||!i){h("Bitte löse zuerst das Captcha.");return}localStorage.setItem("guest_display_name",r.trim()),x(!0);try{await n({guest_name:r.trim(),captcha_token:i}),t()}catch(O){h(O.message||"Eintragen fehlgeschlagen.")}finally{x(!1)}};return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-950/80 backdrop-blur-sm",children:l.jsxs("div",{className:"glass-panel w-full max-w-md rounded-2xl border border-slate-800 p-6 shadow-2xl relative animate-in fade-in zoom-in-95 duration-200",children:[l.jsx("button",{onClick:t,className:"absolute top-4 right-4 p-2 text-slate-400 hover:text-white rounded-lg transition",children:l.jsx(_d,{className:"w-5 h-5"})}),l.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[l.jsx("div",{className:"w-10 h-10 rounded-xl bg-blue-500/10 text-blue-400 border border-blue-500/20 flex items-center justify-center",children:l.jsx(jo,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-bold text-lg text-white",children:"Als Gast eintragen"}),l.jsxs("p",{className:"text-xs text-slate-400",children:["Schicht: ",e==null?void 0:e.title," (",e==null?void 0:e.start_time," - ",e==null?void 0:e.end_time,")"]})]})]}),d&&l.jsxs("div",{className:"mb-4 p-3 rounded-xl bg-red-500/10 border border-red-500/20 text-red-400 text-xs flex items-center gap-2",children:[l.jsx(zn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:d})]}),l.jsxs("form",{onSubmit:N,className:"space-y-4",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-slate-300 mb-1",children:"Dein Name / Anzeigename"}),l.jsx("input",{type:"text",required:!0,value:r,onChange:y=>s(y.target.value),placeholder:"z. B. Alex Muster",className:"w-full px-3.5 py-2.5 rounded-xl bg-slate-900 border border-slate-800 text-white text-sm focus:outline-none focus:border-blue-500 transition"}),l.jsx("p",{className:"text-[11px] text-slate-500 mt-1",children:"Dein Name wird in deiner Sitzung gespeichert. Falls du später ein Konto mit diesem Namen erstellst, werden deine Gast-Schichten automatisch übertragen!"})]}),l.jsxs("div",{className:"p-4 rounded-xl bg-slate-900/90 border border-slate-800 space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsxs("span",{className:"text-xs font-semibold text-slate-300 flex items-center gap-1.5",children:[l.jsx(Lp,{className:"w-4 h-4 text-emerald-400"})," Security Check (acaptcha.vercel.app)"]}),l.jsx("a",{href:"https://acaptcha.vercel.app/",target:"_blank",rel:"noreferrer",className:"text-[10px] text-blue-400 hover:underline",children:"Website öffnen"})]}),l.jsxs("div",{className:"border border-dashed border-slate-700 rounded-lg p-3 text-center bg-slate-950/60",children:[l.jsx("iframe",{src:"https://acaptcha.vercel.app/",title:"acaptcha",className:"w-full h-16 border-0 rounded"}),l.jsx("div",{className:"mt-2 flex items-center justify-center gap-2",children:a?l.jsxs("div",{className:"text-xs font-medium text-emerald-400 flex items-center gap-1",children:[l.jsx(ot,{className:"w-4 h-4"})," Captcha erfolgreich verifiziert!"]}):l.jsxs("button",{type:"button",onClick:S,className:"px-3 py-1.5 text-xs font-semibold rounded-lg bg-emerald-600 hover:bg-emerald-500 text-white transition flex items-center gap-1",children:[l.jsx(ot,{className:"w-3.5 h-3.5"})," Captcha gelöst bestätigen"]})})]})]}),l.jsxs("div",{className:"pt-2 flex justify-end gap-2",children:[l.jsx("button",{type:"button",onClick:t,className:"px-4 py-2 rounded-xl text-xs font-semibold text-slate-400 hover:bg-slate-800 transition",children:"Abbrechen"}),l.jsx("button",{type:"submit",disabled:g,className:"px-5 py-2 rounded-xl text-xs font-bold bg-blue-600 hover:bg-blue-500 text-white transition shadow-lg shadow-blue-600/30 disabled:opacity-50",children:g?"Eintragen...":"Jetzt eintragen"})]})]})]})})}const Fp="/api",_i=()=>localStorage.getItem("auth_token"),sr=e=>{e?localStorage.setItem("auth_token",e):localStorage.removeItem("auth_token")},I=async(e,t={})=>{const n=_i(),r={"Content-Type":"application/json",...n?{Authorization:`Token ${n}`}:{},...t.headers},s=await fetch(`${Fp}${e}`,{...t,headers:r}),i=s.headers.get("content-type");let o=null;if(i&&i.includes("application/json")&&(o=await s.json()),!s.ok){let a="Ein Fehler ist aufgetreten.";throw o&&(typeof o.error=="string"?a=o.error:typeof o.detail=="string"?a=o.detail:o.email?a=Array.isArray(o.email)?o.email[0]:o.email:o.username?a=Array.isArray(o.username)?o.username[0]:o.username:o.non_field_errors&&(a=o.non_field_errors[0])),new Error(a)}return o},su=["#E05A47","#3B82F6","#10B981","#8B5CF6","#F59E0B","#EC4899","#06B6D4","#6366F1","#14B8A6","#F97316","#D97706","#059669","#7C3AED","#DB2777","#2563EB"],lu=()=>su[Math.floor(Math.random()*su.length)];function $p({onClose:e,onSuccess:t,claimToken:n,prefilledGuestName:r}){const[s,i]=j.useState(!!(n||r)),[o,a]=j.useState(""),[u,d]=j.useState(""),[h,g]=j.useState(""),[x,S]=j.useState(r||""),[N,y]=j.useState(null),[O,m]=j.useState(""),[c,f]=j.useState(!1);j.useEffect(()=>{w()},[]);const w=async()=>{try{const b=await I("/users/restriction-setting/");y(b)}catch{}},_=async b=>{b.preventDefault(),m(""),f(!0);try{if(s){const T={username:o,email:u,password:h,display_name:x||o};n&&(T.claim_token=n);const P=await I("/users/register/",{method:"POST",body:JSON.stringify(T)});if(P.requires_verification||P.requires_approval||!P.token){t(null,P.message||"Konto erfolgreich registriert! Bitte schau in deine E-Mail zur Bestätigung oder warte auf die Admin-Freischaltung."),e();return}sr(P.token),t(P.user,P.message)}else{const T=await I("/users/login/",{method:"POST",body:JSON.stringify({username:o,password:h})});sr(T.token),t(T.user,"Erfolgreich angemeldet!")}e()}catch(T){m(T.message||"Authentifizierung fehlgeschlagen.")}finally{f(!1)}};return l.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/60 backdrop-blur-sm",children:l.jsxs("div",{className:"hallmark-panel w-full max-w-md rounded-sm border border-grid p-6 shadow-2xl relative animate-in fade-in zoom-in-95 duration-200",children:[l.jsx("button",{onClick:e,className:"absolute top-4 right-4 p-2 text-muted hover:text-main rounded-sm transition",children:l.jsx(_d,{className:"w-5 h-5"})}),l.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-blue-500/10 text-blue-500 border border-blue-500/20 flex items-center justify-center",children:l.jsx(as,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h3",{className:"font-serif font-bold text-lg text-main",children:s?"Konto erstellen":"Anmelden"}),l.jsx("p",{className:"text-xs text-muted font-sans",children:s?"Erstelle einen Account für volle Funktionen & Schichteinsicht":"Melde dich an, um Events zu verwalten"})]})]}),r&&l.jsxs("div",{className:"mb-4 p-3 rounded-sm bg-amber-500/10 border border-amber-500/20 text-amber-500 text-xs flex items-center gap-2 font-mono",children:[l.jsx(Sd,{className:"w-4 h-4 shrink-0 text-amber-500"}),l.jsxs("span",{children:["Einladung für Gast: ",l.jsx("strong",{children:r}),". Die Schicht wird deinem neuen Konto zugewiesen!"]})]}),(N==null?void 0:N.is_restriction_enabled)&&s&&l.jsxs("div",{className:"mb-4 p-3 rounded-sm bg-indigo-500/10 border border-indigo-500/20 text-indigo-400 text-xs flex items-center gap-2 font-mono",children:[l.jsx(zp,{className:"w-4 h-4 shrink-0 text-indigo-400"}),l.jsxs("span",{children:["Registrierungen beschränkt auf: ",l.jsx("strong",{children:N.active_domains.join(", ")})]})]}),O&&l.jsxs("div",{className:"mb-4 p-3 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs flex items-center gap-2 font-mono",children:[l.jsx(zn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:O})]}),!s&&!1,l.jsxs("form",{onSubmit:_,className:"space-y-4 font-sans",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"Benutzername"}),l.jsxs("div",{className:"relative",children:[l.jsx(as,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),l.jsx("input",{type:"text",required:!0,value:o,onChange:b=>a(b.target.value),placeholder:"z. B. max_muster",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]}),s&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"E-Mail-Adresse"}),l.jsxs("div",{className:"relative",children:[l.jsx(bi,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),l.jsx("input",{type:"email",required:!0,value:u,onChange:b=>d(b.target.value),placeholder:"max@beispiel.de",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"Anzeigename (für Schichtlisten)"}),l.jsxs("div",{className:"relative",children:[l.jsx(as,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),l.jsx("input",{type:"text",value:x,onChange:b=>S(b.target.value),placeholder:"z. B. Max M.",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-xs font-semibold text-main mb-1 font-mono",children:"Passwort"}),l.jsxs("div",{className:"relative",children:[l.jsx(Sp,{className:"w-4 h-4 absolute left-3 top-3 text-muted"}),l.jsx("input",{type:"password",required:!0,value:h,onChange:b=>g(b.target.value),placeholder:"••••••••",className:"w-full pl-9 pr-3.5 py-2 rounded-sm input-field text-sm font-mono"})]})]}),l.jsx("button",{type:"submit",disabled:c,style:{backgroundColor:"var(--brand-primary)"},className:"w-full py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm",children:c?"Verarbeite...":s?"Registrieren":"Anmelden"})]}),l.jsx("div",{className:"mt-4 pt-4 border-t border-grid text-center",children:l.jsx("button",{type:"button",onClick:()=>{i(!s),m("")},className:"text-xs font-mono text-muted hover:text-main transition",children:s?"Bereits ein Konto? Hier anmelden":"Noch kein Konto? Jetzt registrieren"})})]})})}function Bp({events:e,user:t,onSelectEvent:n,onOpenCreateEvent:r,onToggleEventActive:s,onEditEvent:i,branding:o}){const[a,u]=j.useState(""),[d,h]=j.useState("all"),g=new Date().toISOString().split("T")[0],x=e.filter(c=>c.title.toLowerCase().includes(a.toLowerCase())||c.description&&c.description.toLowerCase().includes(a.toLowerCase())||c.location&&c.location.toLowerCase().includes(a.toLowerCase())?d==="upcoming"?c.end_date>=g:!0:!1),S=(o==null?void 0:o.primary_color)||"var(--brand-primary)",N=(o==null?void 0:o.show_community_info_box)??!0,y=(o==null?void 0:o.show_support_box)??!0,O=N||y,m=t&&(t.is_admin_user||t.is_staff||t.is_superuser);return l.jsxs("div",{className:"space-y-8 animate-in fade-in duration-200",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 sm:p-10 space-y-6 max-w-5xl mx-auto relative border border-grid",children:[l.jsxs("div",{className:"space-y-2 border-b border-grid pb-6",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"font-mono text-[10px] uppercase tracking-widest text-muted border border-grid px-2.5 py-1 rounded-sm inline-block",children:(o==null?void 0:o.app_name)||"SCHICHT- & EVENTPORTAL"}),(o==null?void 0:o.custom_banner_text)&&l.jsxs("span",{className:"font-mono text-[10px] uppercase tracking-widest text-amber-500 bg-amber-500/10 border border-amber-500/20 px-2.5 py-1 rounded-sm inline-block font-bold",children:["📢 ",o.custom_banner_text]})]}),l.jsx("h2",{className:"font-serif text-3xl sm:text-5xl font-bold uppercase tracking-tight text-main leading-tight",children:"Veranstaltungen & Schichtkoordination"}),l.jsx("p",{className:"font-sans text-xs sm:text-sm text-muted max-w-2xl",children:"Hier findest du aktuelle Termine, Arbeitsgruppen, Bar- & Tresendienste und Schichtpläne der Initiative."})]}),l.jsxs("div",{className:"flex flex-col sm:flex-row items-stretch sm:items-center justify-between gap-3",children:[l.jsxs("div",{className:"relative flex-1",children:[l.jsx(kd,{className:"w-4 h-4 absolute left-3.5 top-3 text-muted"}),l.jsx("input",{type:"text",value:a,onChange:c=>u(c.target.value),placeholder:"Veranstaltung, Ort oder Suchbegriff...",className:"w-full pl-10 pr-16 py-2 rounded-sm bg-subtle border border-grid text-main text-xs font-mono focus:outline-none focus:border-muted"}),a&&l.jsx("button",{onClick:()=>u(""),className:"absolute right-3 top-2.5 text-[10px] font-mono text-muted hover:text-main",children:"[ CLEAR ]"})]}),l.jsxs("div",{className:"flex items-center gap-1.5 font-mono text-xs shrink-0",children:[l.jsxs("button",{onClick:()=>h("all"),className:`px-3.5 py-1.5 rounded-sm transition border ${d==="all"?"bg-surface-hover text-main border-grid font-bold shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:["ALLE PROGRAMME (",e.length,")"]}),l.jsxs("button",{onClick:()=>h("upcoming"),className:`px-3.5 py-1.5 rounded-sm transition border ${d==="upcoming"?"bg-surface-hover text-main border-grid font-bold shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:["ANSTEHEND (",e.filter(c=>c.end_date>=g).length,")"]})]})]})]}),l.jsxs("div",{className:"max-w-5xl mx-auto grid grid-cols-1 lg:grid-cols-4 gap-6",children:[l.jsxs("div",{className:`${O?"lg:col-span-3":"lg:col-span-4"} space-y-4`,children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-3 font-mono",children:[l.jsxs("h3",{className:"font-serif text-xl font-bold uppercase tracking-wide text-main flex items-center gap-2",children:[l.jsx(Tr,{className:"w-4.5 h-4.5 text-muted"})," Termine & Schichten"]}),t&&l.jsxs("button",{onClick:r,style:{backgroundColor:S},className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold text-white transition flex items-center gap-1 hover:brightness-110 shadow-sm",children:[l.jsx(it,{className:"w-3.5 h-3.5"})," EVENT ANLEGEN"]})]}),x.length===0?l.jsx("div",{className:"hallmark-panel rounded-sm p-12 text-center text-xs font-mono text-muted border border-grid",children:a?`[ Keinen Eintrag für "${a}" gefunden ]`:"[ Keine Veranstaltungen vorhanden ]"}):l.jsx("div",{className:`grid grid-cols-1 sm:grid-cols-2 ${O?"":"lg:grid-cols-3"} gap-4`,children:x.map(c=>{var P,B,D;const f=((P=c.task_areas)==null?void 0:P.length)||0,w=((B=c.task_areas)==null?void 0:B.reduce((q,Y)=>{var Z;return q+(((Z=Y.shifts)==null?void 0:Z.length)||0)},0))||0,_=t&&c.co_managers&&c.co_managers.some(q=>typeof q=="object"?q.id===t.id:q===t.id),b=t&&(c.created_by===t.id||((D=c.created_by)==null?void 0:D.id)===t.id||_),T=m||b;return l.jsxs("div",{className:`hallmark-card rounded-sm p-5 border transition flex flex-col justify-between space-y-4 group overflow-hidden ${c.is_active===!1?"border-amber-500/40 opacity-80 bg-subtle":"border-grid"}`,children:[l.jsxs("div",{className:"space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between text-[11px] font-mono text-muted gap-2",children:[l.jsxs("span",{className:"flex items-center gap-1 bg-subtle px-2 py-0.5 rounded-sm border border-grid font-bold shrink-0",children:[l.jsx(kr,{className:"w-3 h-3 text-muted"}),new Date(c.start_date).toLocaleDateString("de-DE")]}),c.is_active===!1?l.jsx("span",{className:"text-amber-500 font-bold px-1.5 py-0.5 rounded-sm bg-amber-500/10 border border-amber-500/20 shrink-0",children:"[ DEAKTIVIERT ]"}):c.location?l.jsxs("span",{className:"flex items-center gap-1 text-muted truncate max-w-[130px]",children:[l.jsx(ko,{className:"w-3 h-3 shrink-0"}),l.jsx("span",{className:"truncate",children:c.location})]}):null]}),l.jsx("h4",{className:"font-serif text-lg font-bold uppercase text-main group-hover:text-amber-500 transition line-clamp-2",children:c.title}),c.description&&l.jsx("p",{className:"text-xs text-muted font-sans line-clamp-2",children:c.description}),l.jsxs("div",{className:"text-[10px] font-mono text-muted flex items-center gap-1.5 pt-1",children:[l.jsxs("span",{children:[f," Bereiche"]}),l.jsx("span",{children:"/"}),l.jsxs("span",{children:[w," Schichten"]})]})]}),l.jsx("div",{className:"pt-3 border-t border-grid space-y-2 font-mono",children:l.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[l.jsxs("button",{onClick:()=>n(c.id),className:"flex-1 min-w-[110px] py-1.5 px-3 rounded-sm text-xs font-mono font-bold bg-surface hover:bg-surface-hover text-main border border-grid transition flex items-center justify-center gap-1",children:["Schichtplan ",l.jsx(wd,{className:"w-3.5 h-3.5"})]}),T&&i&&l.jsxs("button",{onClick:()=>i(c),className:"py-1.5 px-2.5 rounded-sm text-[10px] font-mono font-bold bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/20 transition flex items-center gap-1 shrink-0",title:"Veranstaltung & Schichten bearbeiten",children:[l.jsx(jr,{className:"w-3.5 h-3.5"})," BEARBEITEN"]}),T&&s&&l.jsx("button",{onClick:()=>s(c),className:`py-1.5 px-2 rounded-sm text-[10px] font-mono font-bold transition flex items-center gap-1 border shrink-0 ${c.is_active!==!1?"bg-amber-500/10 text-amber-500 border-amber-500/20 hover:bg-amber-500/20":"bg-emerald-500/10 text-emerald-400 border-emerald-500/20 hover:bg-emerald-500/20"}`,title:c.is_active!==!1?"Deaktivieren":"Aktivieren",children:c.is_active!==!1?l.jsx(Nd,{className:"w-3.5 h-3.5"}):l.jsx(ot,{className:"w-3.5 h-3.5"})})]})})]},c.id)})})]}),O&&l.jsxs("div",{className:"space-y-4 font-mono text-xs",children:[N&&l.jsxs("div",{className:"hallmark-panel rounded-sm p-4 border border-grid space-y-3",children:[l.jsx("h4",{className:"font-serif text-sm font-bold uppercase tracking-wide text-main border-b border-grid pb-2",children:(o==null?void 0:o.community_info_title)||"📌 Verein & Infos"}),l.jsx("div",{className:"space-y-2 text-muted text-[11px] whitespace-pre-line",children:(o==null?void 0:o.community_info_text)||`Initiative e.V. Hausverein -Offene Angebote, DIY-Kultur & engagierte Schichten.`})]}),y&&l.jsxs("div",{className:"hallmark-panel rounded-sm p-4 border border-grid space-y-3",children:[l.jsx("h4",{className:"font-serif text-sm font-bold uppercase tracking-wide text-main border-b border-grid pb-2",children:(o==null?void 0:o.support_box_title)||"❤️ Unterstützen"}),l.jsx("p",{className:"text-[11px] text-muted whitespace-pre-line",children:(o==null?void 0:o.support_box_text)||"Hilf mit als Helfer*in an der Bar, beim Essen kochen oder beim Auf- & Abbau."})]})]})]})]})}function Up({events:e,onSelectEvent:t,branding:n}){const[r,s]=j.useState(new Date),[i,o]=j.useState(null),a=r.getFullYear(),u=r.getMonth(),d=["JANUAR","FEBRUAR","MÄRZ","APRIL","MAI","JUNI","JULI","AUGUST","SEPTEMBER","OKTOBER","NOVEMBER","DEZEMBER"],h=()=>s(new Date(a,u-1,1)),g=()=>s(new Date(a,u+1,1)),x=()=>s(new Date),S=new Date(a,u,1).getDay(),N=S===0?6:S-1,y=new Date(a,u+1,0).getDate(),O=f=>{const w=String(u+1).padStart(2,"0"),_=String(f).padStart(2,"0");return`${a}-${w}-${_}`},m=f=>{const w=O(f);return e.filter(_=>w>=_.start_date&&w<=_.end_date)},c=(n==null?void 0:n.primary_color)||"var(--brand-primary)";return l.jsxs("div",{className:"space-y-6 max-w-5xl mx-auto animate-in fade-in duration-200",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid flex flex-col sm:flex-row sm:items-center justify-between gap-4 font-mono",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-subtle text-main border border-grid flex items-center justify-center font-bold",children:l.jsx(Tr,{className:"w-4 h-4 text-amber-500"})}),l.jsxs("div",{children:[l.jsxs("h2",{className:"font-serif text-3xl sm:text-4xl font-bold uppercase tracking-tight text-main leading-none",children:[d[u]," ",a]}),l.jsx("p",{className:"text-[10px] text-muted uppercase tracking-widest mt-1",children:"— INITIATIVE E.V. TERMIN- & SCHICHTÜBERSICHT —"})]})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:x,className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold bg-surface hover:bg-surface-hover text-main border border-grid transition",children:"[ HEUTE ]"}),l.jsx("button",{onClick:h,className:"p-1.5 rounded-sm text-muted hover:text-main bg-surface border border-grid transition",title:"Vorheriger Monat",children:l.jsx(wp,{className:"w-4 h-4"})}),l.jsx("button",{onClick:g,className:"p-1.5 rounded-sm text-muted hover:text-main bg-surface border border-grid transition",title:"Nächster Monat",children:l.jsx(Np,{className:"w-4 h-4"})})]})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm border border-grid overflow-hidden",children:[l.jsxs("div",{className:"grid grid-cols-7 bg-subtle border-b border-grid text-center text-xs font-mono text-muted font-bold py-3 uppercase",children:[l.jsx("div",{children:"MO"}),l.jsx("div",{children:"DI"}),l.jsx("div",{children:"MI"}),l.jsx("div",{children:"DO"}),l.jsx("div",{children:"FR"}),l.jsx("div",{children:"SA"}),l.jsx("div",{children:"SO"})]}),l.jsxs("div",{className:"grid grid-cols-7 auto-rows-fr divide-x divide-y divide-grid bg-surface text-xs font-mono",children:[Array.from({length:N}).map((f,w)=>l.jsx("div",{className:"min-h-[100px] sm:min-h-[110px] p-2 bg-subtle/50 text-muted opacity-30"},`offset-${w}`)),Array.from({length:y}).map((f,w)=>{const _=w+1,b=m(_),T=new Date().getFullYear()===a&&new Date().getMonth()===u&&new Date().getDate()===_;return l.jsxs("div",{className:`min-h-[100px] sm:min-h-[110px] p-2 flex flex-col justify-between transition ${T?"bg-surface-hover/80 font-bold":"hover:bg-surface-hover/50"}`,children:[l.jsxs("div",{className:"flex items-center justify-between mb-1",children:[l.jsx("span",{className:`w-5 h-5 rounded-sm flex items-center justify-center font-mono text-xs ${T?"bg-main text-paper font-bold shadow-sm":"text-muted"}`,children:_}),b.length>0&&l.jsxs("span",{className:"text-[9px] font-mono text-muted",children:[b.length," ",b.length===1?"Event":"Events"]})]}),l.jsx("div",{className:"space-y-1.5 overflow-y-auto max-h-[70px] no-scrollbar",children:b.map(P=>{const B=(i==null?void 0:i.id)===P.id;return l.jsx("button",{onClick:()=>o(P),style:{backgroundColor:B?c:`${c}15`,borderColor:`${c}40`,color:B?"#ffffff":c},className:`w-full text-left px-2 py-1 rounded-sm text-[10px] font-mono font-bold border truncate block hover:brightness-110 transition shadow-sm ${P.is_active===!1?"opacity-50 line-through":""}`,children:P.title},`evt-${P.id}`)})})]},`day-${_}`)})]})]}),i&&l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 border border-grid flex flex-col sm:flex-row sm:items-center justify-between gap-4 font-mono animate-in fade-in duration-200",children:[l.jsxs("div",{className:"space-y-2",children:[l.jsxs("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted",children:[l.jsxs("span",{className:"flex items-center gap-1 bg-subtle px-2 py-0.5 rounded-sm border border-grid font-bold text-main",children:[l.jsx(kr,{className:"w-3 h-3 text-muted"}),new Date(i.start_date).toLocaleDateString("de-DE")," — ",new Date(i.end_date).toLocaleDateString("de-DE")]}),i.location&&l.jsxs("span",{className:"flex items-center gap-1 text-muted",children:[l.jsx(ko,{className:"w-3 h-3"}),i.location]})]}),l.jsx("h3",{className:"font-serif text-2xl font-bold uppercase text-main",children:i.title}),i.description&&l.jsx("p",{className:"text-xs font-sans text-muted max-w-xl",children:i.description})]}),l.jsx("div",{className:"flex items-center gap-2 shrink-0",children:l.jsxs("button",{onClick:()=>t(i.id),style:{backgroundColor:c},className:"px-5 py-2 rounded-sm text-xs font-mono font-bold text-white transition flex items-center gap-1.5 hover:brightness-110 shadow-sm",children:["SCHICHTPLAN ÖFFNEN ",l.jsx(wd,{className:"w-4 h-4"})]})})]})]})}function Vp({branding:e,onRefreshBranding:t,onRefreshEvents:n,skills:r,onRefreshSkills:s}){const[i,o]=j.useState("users"),[a,u]=j.useState(!0),[d,h]=j.useState(""),[g,x]=j.useState(""),[S,N]=j.useState([]),[y,O]=j.useState(""),[m,c]=j.useState([]),[f,w]=j.useState(!1),[_,b]=j.useState(!1),[T,P]=j.useState(!0),[B,D]=j.useState([]),[q,Y]=j.useState(""),[Z,_e]=j.useState([]),[ge,$e]=j.useState([]),[Ee,k]=j.useState(""),[C,v]=j.useState(""),[L,M]=j.useState(lu()),[U,K]=j.useState((e==null?void 0:e.app_name)||"Veranstaltungsschichtplaner"),[H,ae]=j.useState((e==null?void 0:e.logo_url)||""),[et,Pr]=j.useState((e==null?void 0:e.primary_color)||"#E05A47"),[zr,Ys]=j.useState((e==null?void 0:e.custom_banner_text)||""),[Bt,Zs]=j.useState((e==null?void 0:e.show_community_info_box)??!0),[vt,Js]=j.useState((e==null?void 0:e.community_info_title)||"📌 Verein & Infos"),[Lr,Xs]=j.useState((e==null?void 0:e.community_info_text)||`Initiative e.V. Hausverein -Offene Angebote, DIY-Kultur & engagierte Schichten.`),[Ut,el]=j.useState((e==null?void 0:e.show_support_box)??!0),[z,R]=j.useState((e==null?void 0:e.support_box_title)||"❤️ Unterstützen"),[J,at]=j.useState((e==null?void 0:e.support_box_text)||"Hilf mit als Helfer*in an der Bar, beim Essen kochen oder beim Auf- & Abbau."),[W,Dn]=j.useState(!1),[Rn,So]=j.useState(!1),[bo,_o]=j.useState("smtp.beispiel.de"),[Eo,Co]=j.useState(587),[To,Po]=j.useState(""),[zo,Lo]=j.useState(""),[Mo,tl]=j.useState(!0),[Ao,nl]=j.useState(!1),[Do,Ro]=j.useState("noreply@schichtplaner.de"),[Oo,Ed]=j.useState(""),[rl,Cd]=j.useState(!1),[Io,Fo]=j.useState(!1),[$o,Bo]=j.useState(!1);j.useEffect(()=>{Uo()},[]);const Uo=async()=>{u(!0);try{try{const p=await I("/users/manage-users/");N(p.results||p)}catch{}try{const p=await I("/users/pending/");c(p.results||p)}catch{}try{const p=await I("/users/restriction-setting/");w(p.is_restriction_enabled),b(p.require_admin_approval),P(p.require_email_verification??!0)}catch{}try{const p=await I("/users/domain-rules/");D(p.results||p)}catch{}try{const p=await I("/events/");_e(p.results||p)}catch{}try{const p=await I("/templates/");$e(p.results||p)}catch{}try{const p=await I("/users/smtp-setting/");p&&(So(p.is_active??!1),_o(p.host||""),Co(p.port||587),Po(p.username||""),Lo(p.password||""),tl(p.use_tls??!0),nl(p.use_ssl??!1),Ro(p.from_email||""))}catch{}}catch(p){h(p.message||"Laden der Admin-Daten fehlgeschlagen.")}finally{u(!1)}},Me=p=>{x(p),setTimeout(()=>x(""),4e3)},Td=async p=>{try{const $=await I(`/users/manage-users/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_admin_user:!p.is_admin_user})});N(S.map(wt=>wt.id===p.id?$:wt)),Me(`Admin-Rechte für ${p.username} aktualisiert.`)}catch($){h($.message||"Fehler beim Aktualisieren.")}},Pd=async p=>{try{const $=await I(`/users/manage-users/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_approved:!p.is_approved})});N(S.map(wt=>wt.id===p.id?$:wt)),Me(`Freischalt-Status für ${p.username} aktualisiert.`)}catch($){h($.message||"Fehler beim Aktualisieren.")}},zd=async p=>{try{await I(`/users/${p}/approve/`,{method:"POST"}),c(m.filter($=>$.id!==p)),Uo(),Me("Benutzer erfolgreich freigeschaltet.")}catch($){h($.message||"Freischalten fehlgeschlagen.")}},Ld=async p=>{try{await I(`/users/${p}/approve/`,{method:"DELETE"}),c(m.filter($=>$.id!==p)),Me("Benutzer abgelehnt und gelöscht.")}catch($){h($.message||"Ablehnen fehlgeschlagen.")}},sl=async(p,$)=>{try{const ll=await I("/users/restriction-setting/",{method:"POST",body:JSON.stringify({is_restriction_enabled:p==="restriction"?$:f,require_admin_approval:p==="approval"?$:_,require_email_verification:p==="email_verify"?$:T})});w(ll.is_restriction_enabled),b(ll.require_admin_approval),P(ll.require_email_verification),Me("Sicherheitseinstellungen aktualisiert.")}catch(wt){h(wt.message||"Aktualisierung fehlgeschlagen.")}},Md=async p=>{if(p.preventDefault(),!!q.trim())try{const $=await I("/users/domain-rules/",{method:"POST",body:JSON.stringify({domain:q})});D([...B,$]),Y(""),Me(`Domain-Regel "${$.domain}" hinzugefügt.`)}catch($){h($.message||"Fehler beim Hinzufügen.")}},Ad=async p=>{try{await I(`/users/domain-rules/${p}/`,{method:"DELETE"}),D(B.filter($=>$.id!==p)),Me("Domain-Regel entfernt.")}catch($){h($.message||"Fehler beim Löschen.")}},Dd=async p=>{if(p.preventDefault(),!!Ee.trim())try{await I("/skills/",{method:"POST",body:JSON.stringify({name:Ee,description:C,color:L})}),k(""),v(""),M(lu()),s(),Me("Qualifikation angelegt.")}catch($){h($.message||"Fehler beim Anlegen.")}},Rd=async p=>{try{await I(`/skills/${p}/`,{method:"DELETE"}),s(),Me("Qualifikation gelöscht.")}catch($){h($.message||"Fehler beim Löschen.")}},Od=async p=>{try{await I(`/templates/${p}/`,{method:"DELETE"}),$e(ge.filter($=>$.id!==p)),Me("Vorlage gelöscht.")}catch($){h($.message||"Fehler beim Löschen.")}},Id=async p=>{p.preventDefault(),Dn(!0);try{await I("/branding/",{method:"POST",body:JSON.stringify({app_name:U,logo_url:H,primary_color:et,custom_banner_text:zr,show_community_info_box:Bt,community_info_title:vt,community_info_text:Lr,show_support_box:Ut,support_box_title:z,support_box_text:J})}),t(),Me("Branding-Einstellungen erfolgreich gespeichert!")}catch($){h($.message||"Speichern des Brandings fehlgeschlagen.")}finally{Dn(!1)}},Fd=async p=>{p.preventDefault(),Fo(!0);try{await I("/users/smtp-setting/",{method:"POST",body:JSON.stringify({is_active:Rn,host:bo,port:parseInt(Eo)||587,username:To,password:zo,use_tls:Mo,use_ssl:Ao,from_email:Do})}),Me("✅ SMTP-Einstellungen erfolgreich gespeichert!")}catch($){h($.message||"Speichern der SMTP-Einstellungen fehlgeschlagen.")}finally{Fo(!1)}},$d=async()=>{Bo(!0);try{const p=await I("/users/smtp-setting/test/",{method:"POST",body:JSON.stringify({email:Oo})});Me(`✅ ${p.message||"Test-E-Mail erfolgreich gesendet!"}`)}catch(p){h(p.message||"Test-E-Mail fehlgeschlagen.")}finally{Bo(!1)}},Vo=S.filter(p=>p.username.toLowerCase().includes(y.toLowerCase())||p.email.toLowerCase().includes(y.toLowerCase())||p.display_name&&p.display_name.toLowerCase().includes(y.toLowerCase()));return l.jsxs("div",{className:"space-y-6 max-w-5xl mx-auto animate-in fade-in duration-200 font-sans",children:[l.jsx("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid space-y-2",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-indigo-500/10 text-indigo-500 border border-indigo-500/20 flex items-center justify-center font-bold",children:l.jsx(jd,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-serif text-3xl font-bold uppercase tracking-tight text-main",children:"System Administration"}),l.jsx("p",{className:"text-xs text-muted font-mono mt-0.5",children:"Verwaltung von Benutzern, Freischaltungen, Events, Vorlagen, Branding & SMTP-Mailserver"})]})]})}),l.jsx("div",{className:"border-b border-grid pb-2",children:l.jsxs("div",{className:"flex items-center gap-1.5 font-mono text-xs overflow-x-auto no-scrollbar",children:[l.jsxs("button",{onClick:()=>o("users"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="users"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(bd,{className:"w-3.5 h-3.5 text-blue-400"})," [ 01: BENUTZER & SICHERHEIT (",S.length,") ]"]}),l.jsxs("button",{onClick:()=>o("events"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="events"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(Tr,{className:"w-3.5 h-3.5 text-emerald-400"})," [ 02: VERANSTALTUNGEN (",Z.length,") ]"]}),l.jsxs("button",{onClick:()=>o("templates"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="templates"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(qs,{className:"w-3.5 h-3.5 text-amber-400"})," [ 03: VORLAGEN & SKILLS ]"]}),l.jsxs("button",{onClick:()=>o("branding"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="branding"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(tu,{className:"w-3.5 h-3.5 text-indigo-400"})," [ 04: BRANDING & SYSTEM ]"]}),l.jsxs("button",{onClick:()=>o("smtp"),className:`px-4 py-2 rounded-sm transition flex items-center gap-2 border ${i==="smtp"?"bg-surface-hover text-main font-bold border-grid shadow-sm":"bg-subtle text-muted border-transparent hover:text-main"}`,children:[l.jsx(bi,{className:"w-3.5 h-3.5 text-purple-400"})," [ 05: E-MAIL & SMTP ]"]})]})}),d&&l.jsxs("div",{className:"p-4 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs font-mono flex items-center gap-2",children:[l.jsx(zn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:d})]}),g&&l.jsxs("div",{className:"p-4 rounded-sm bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-xs font-mono flex items-center gap-2",children:[l.jsx(ot,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:g})]}),i==="users"&&l.jsxs("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:[m.length>0&&l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-amber-500/40 bg-amber-500/5 space-y-3",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-amber-500 flex items-center gap-2 border-b border-amber-500/20 pb-2",children:["⚠️ Ausstehende Registrierungen (",m.length,")"]}),l.jsx("div",{className:"space-y-2",children:m.map(p=>l.jsxs("div",{className:"p-3 rounded-sm bg-surface border border-grid flex items-center justify-between text-xs",children:[l.jsxs("div",{children:[l.jsxs("div",{className:"font-bold text-main",children:[p.display_name," (@",p.username,")"]}),l.jsx("div",{className:"text-[11px] text-muted",children:p.email})]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("button",{onClick:()=>zd(p.id),className:"px-3 py-1 rounded-sm bg-emerald-600 hover:bg-emerald-500 text-white font-bold text-xs",children:"[ FREISCHALTEN ]"}),l.jsx("button",{onClick:()=>Ld(p.id),className:"px-3 py-1 rounded-sm bg-red-600/20 text-red-400 hover:bg-red-600/30 border border-red-600/30 font-bold text-xs",children:"[ ABLEHNEN ]"})]})]},p.id))})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-4 border border-grid flex items-center gap-3",children:[l.jsx(kd,{className:"w-4 h-4 text-muted shrink-0"}),l.jsx("input",{type:"text",value:y,onChange:p=>O(p.target.value),placeholder:"Nutzer suchen nach Name, Username oder E-Mail...",className:"w-full bg-subtle border border-grid px-3 py-1.5 rounded-sm text-xs font-mono text-main focus:outline-none focus:border-muted"}),y&&l.jsx("button",{onClick:()=>O(""),className:"text-xs text-muted hover:text-main font-mono shrink-0",children:"[ CLEAR ]"})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:["Benutzerkonten & Rechtestatus (",Vo.length,")"]}),l.jsx("div",{className:"overflow-x-auto",children:l.jsxs("table",{className:"w-full text-left border-collapse text-xs",children:[l.jsx("thead",{children:l.jsxs("tr",{className:"border-b border-grid text-muted uppercase text-[10px]",children:[l.jsx("th",{className:"pb-2 font-bold",children:"Nutzer"}),l.jsx("th",{className:"pb-2 font-bold",children:"E-Mail"}),l.jsx("th",{className:"pb-2 font-bold",children:"Freigeschaltet"}),l.jsx("th",{className:"pb-2 font-bold",children:"E-Mail Bestätigt"}),l.jsx("th",{className:"pb-2 font-bold",children:"Admin-Rolle"}),l.jsx("th",{className:"pb-2 font-bold text-right",children:"Aktionen"})]})}),l.jsx("tbody",{className:"divide-y divide-grid",children:Vo.map(p=>l.jsxs("tr",{className:"hover:bg-subtle/50 transition",children:[l.jsxs("td",{className:"py-2.5 font-bold text-main",children:[p.display_name||p.username,l.jsxs("span",{className:"text-[10px] text-muted font-normal block",children:["@",p.username]})]}),l.jsx("td",{className:"py-2.5 text-muted",children:p.email}),l.jsx("td",{className:"py-2.5",children:l.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${p.is_approved?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:p.is_approved?"JA":"NEIN"})}),l.jsx("td",{className:"py-2.5",children:l.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${p.is_email_verified?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-subtle text-muted border-grid"}`,children:p.is_email_verified?"VERIFIZIERT":"AUSSTEHEND"})}),l.jsx("td",{className:"py-2.5",children:l.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${p.is_admin_user||p.is_superuser?"bg-indigo-500/10 text-indigo-400 border-indigo-500/20":"bg-subtle text-muted border-grid"}`,children:p.is_superuser?"SUPERUSER":p.is_admin_user?"ADMIN":"USER"})}),l.jsxs("td",{className:"py-2.5 text-right space-x-1",children:[l.jsx("button",{onClick:()=>Pd(p),className:"px-2 py-1 rounded-sm text-[10px] bg-subtle hover:bg-surface-hover border border-grid text-main transition",children:p.is_approved?"Sperren":"Freischalten"}),l.jsx("button",{onClick:()=>Td(p),className:"px-2 py-1 rounded-sm text-[10px] bg-subtle hover:bg-surface-hover border border-grid text-indigo-400 transition",children:p.is_admin_user?"Admin entziehen":"Zu Admin machen"})]})]},p.id))})]})})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:"Sicherheit & Registrierungs-Einschränkungen"}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"font-bold text-main",children:"E-Mail Bestätigung (Opt-Out)"}),l.jsx("button",{onClick:()=>sl("email_verify",!T),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${T?"bg-emerald-600 text-white border-emerald-500":"bg-amber-500/10 text-amber-500 border-amber-500/20"}`,children:T?"[ PFLICHT ]":"[ DEAKTIVIERT ]"})]}),l.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Bei Pflicht muss die E-Mail vor der Anmeldung verifiziert werden. Bei Deaktivierung ist die Anmeldung direkt möglich."})]}),l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"font-bold text-main",children:"Domain-Einschränkung"}),l.jsx("button",{onClick:()=>sl("restriction",!f),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${f?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:f?"[ AKTIV ]":"[ INAKTIV ]"})]}),l.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Erlaubt nur Registrierungen von festgelegten E-Mail-Domains (z. B. `@verein.de`)."})]}),l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("span",{className:"font-bold text-main",children:"Admin-Freischaltpflicht"}),l.jsx("button",{onClick:()=>sl("approval",!_),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${_?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:_?"[ AKTIV ]":"[ INAKTIV ]"})]}),l.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Erfordert die manuelle Freischaltung durch einen Admin vor der ersten Anmeldung."})]})]}),f&&l.jsxs("div",{className:"space-y-3 pt-3 border-t border-grid",children:[l.jsx("h4",{className:"font-serif text-sm font-bold uppercase text-main",children:"Erlaubte E-Mail-Domains"}),l.jsxs("form",{onSubmit:Md,className:"flex gap-2",children:[l.jsx("input",{type:"text",placeholder:"z. B. verein.de oder @beispiel.org",value:q,onChange:p=>Y(p.target.value),className:"flex-1 px-3 py-1.5 rounded-sm input-field text-xs font-mono"}),l.jsxs("button",{type:"submit",className:"px-4 py-1.5 rounded-sm bg-indigo-600 hover:bg-indigo-500 text-white font-bold text-xs",children:[l.jsx(it,{className:"w-3.5 h-3.5 inline"})," Domain Hinzufügen"]})]}),l.jsx("div",{className:"flex flex-wrap gap-2",children:B.map(p=>l.jsxs("span",{className:"px-2.5 py-1 rounded-sm bg-subtle border border-grid text-xs flex items-center gap-2",children:[l.jsx("strong",{className:"text-main",children:p.domain}),l.jsx("button",{onClick:()=>Ad(p.id),className:"text-muted hover:text-red-400",children:l.jsx(Yt,{className:"w-3.5 h-3.5"})})]},p.id))})]})]})]}),i==="events"&&l.jsx("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:["Alle Veranstaltungen (",Z.length,")"]}),l.jsx("div",{className:"space-y-3",children:Z.map(p=>l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid flex items-center justify-between text-xs",children:[l.jsxs("div",{children:[l.jsx("h4",{className:"font-serif font-bold text-main text-sm",children:p.title}),l.jsxs("p",{className:"text-muted text-[11px]",children:[new Date(p.start_date).toLocaleDateString("de-DE")," — ",p.location||"Kein Ort"," | Erstellt von: ",p.created_by_name||"Admin"]})]}),l.jsx("div",{className:"flex items-center gap-2",children:l.jsx("span",{className:`px-2 py-0.5 rounded-sm text-[10px] font-bold border ${p.is_active!==!1?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:p.is_active!==!1?"AKTIV":"DEAKTIVIERT"})})]},p.id))})]})}),i==="templates"&&l.jsxs("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:"Erforderliche Qualifikationen (Skills)"}),l.jsxs("form",{onSubmit:Dd,className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[l.jsx("input",{type:"text",placeholder:"Skill Name (z. B. Bar-Erfahrung)",required:!0,value:Ee,onChange:p=>k(p.target.value),className:"px-3 py-1.5 rounded-sm input-field text-xs font-mono"}),l.jsx("input",{type:"text",placeholder:"Beschreibung (optional)",value:C,onChange:p=>v(p.target.value),className:"px-3 py-1.5 rounded-sm input-field text-xs font-mono"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"color",value:L,onChange:p=>M(p.target.value),className:"w-8 h-8 rounded-sm border-0 cursor-pointer bg-subtle p-0.5"}),l.jsxs("button",{type:"submit",className:"flex-1 px-3 py-1.5 rounded-sm bg-emerald-600 hover:bg-emerald-500 text-white font-bold text-xs",children:[l.jsx(it,{className:"w-3.5 h-3.5 inline"})," Anlegen"]})]})]}),l.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 pt-2",children:r.map(p=>l.jsxs("div",{className:"p-3 rounded-sm bg-subtle border border-grid flex items-center justify-between text-xs",children:[l.jsxs("div",{children:[l.jsx("span",{style:{color:p.color},className:"font-bold",children:p.name}),p.description&&l.jsx("p",{className:"text-[11px] text-muted",children:p.description})]}),l.jsx("button",{onClick:()=>Rd(p.id),className:"text-muted hover:text-red-400",children:l.jsx(Yt,{className:"w-3.5 h-3.5"})})]},p.id))})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-5 border border-grid space-y-4",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:["Gespeicherte Event-Vorlagen (",ge.length,")"]}),l.jsx("div",{className:"space-y-2",children:ge.map(p=>l.jsxs("div",{className:"p-3 rounded-sm bg-subtle border border-grid flex items-center justify-between text-xs",children:[l.jsxs("div",{children:[l.jsx("div",{className:"font-bold text-main",children:p.name}),l.jsx("div",{className:"text-[11px] text-muted",children:p.description||"Keine Beschreibung"})]}),l.jsx("button",{onClick:()=>Od(p.id),className:"text-muted hover:text-red-400",children:l.jsx(Yt,{className:"w-4 h-4"})})]},p.id))})]})]}),i==="branding"&&l.jsx("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:l.jsxs("form",{onSubmit:Id,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-6",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2 flex items-center gap-2",children:[l.jsx(tu,{className:"w-5 h-5 text-indigo-400"})," Portal Branding & Erscheinungsbild"]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-xs",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Anwendungs-Name"}),l.jsx("input",{type:"text",required:!0,value:U,onChange:p=>K(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field font-bold"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Primärfarbe (Brand Accent)"}),l.jsxs("div",{className:"flex gap-2",children:[l.jsx("input",{type:"color",value:et,onChange:p=>Pr(p.target.value),className:"w-9 h-9 rounded-sm border-0 cursor-pointer bg-subtle p-0.5"}),l.jsx("input",{type:"text",value:et,onChange:p=>Pr(p.target.value),className:"flex-1 px-3 py-1.5 rounded-sm input-field font-mono"})]})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-muted mb-1",children:"Logo Bild-URL (optional)"}),l.jsx("input",{type:"text",placeholder:"https://beispiel.de/logo.png",value:H,onChange:p=>ae(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-muted mb-1",children:"Ankündigung (Banner-Text)"}),l.jsx("textarea",{rows:2,placeholder:"z. B. Willkommen beim Sommerfest Schichtplaner!",value:zr,onChange:p=>Ys(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]})]}),l.jsx("h4",{className:"font-serif text-base font-bold uppercase text-main pt-4 border-t border-grid",children:"Startseiten Sidebar Boxen"}),l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-2",children:[l.jsx("span",{className:"font-bold text-xs uppercase text-main",children:"📌 Verein & Infos Box"}),l.jsx("button",{type:"button",onClick:()=>Zs(!Bt),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${Bt?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:Bt?"[ AN ]":"[ AUS ]"})]}),Bt&&l.jsxs("div",{className:"space-y-3 text-xs",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Titel"}),l.jsx("input",{type:"text",value:vt,onChange:p=>Js(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Inhalt"}),l.jsx("textarea",{rows:3,value:Lr,onChange:p=>Xs(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]})]})]}),l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-2",children:[l.jsx("span",{className:"font-bold text-xs uppercase text-main",children:"❤️ Unterstützen Box"}),l.jsx("button",{type:"button",onClick:()=>el(!Ut),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${Ut?"bg-emerald-600 text-white border-emerald-500":"bg-surface text-muted border-grid"}`,children:Ut?"[ AN ]":"[ AUS ]"})]}),Ut&&l.jsxs("div",{className:"space-y-3 text-xs",children:[l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Titel"}),l.jsx("input",{type:"text",value:z,onChange:p=>R(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-muted mb-1",children:"Inhalt"}),l.jsx("textarea",{rows:3,value:J,onChange:p=>at(p.target.value),className:"w-full px-3 py-1.5 rounded-sm input-field"})]})]})]}),l.jsx("div",{className:"pt-3 flex justify-end border-t border-grid",children:l.jsx("button",{type:"submit",disabled:W,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm",children:W?"Speichern...":"Einstellungen speichern"})})]})}),i==="smtp"&&l.jsx("div",{className:"space-y-6 animate-in fade-in duration-150 font-mono",children:l.jsxs("form",{onSubmit:Fd,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-3",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main flex items-center gap-2",children:[l.jsx(bi,{className:"w-5 h-5 text-indigo-400"})," SMTP Server & E-Mail-Versand"]}),l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs text-muted font-bold",children:"SMTP-Versand:"}),l.jsx("button",{type:"button",onClick:()=>So(!Rn),className:`px-3 py-1 rounded-sm text-xs font-bold transition border ${Rn?"bg-emerald-600 text-white border-emerald-500 shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:Rn?"[ AKTIV ]":"[ INAKTIV (Dev Mode) ]"})]})]}),!Rn&&l.jsxs("div",{className:"p-3.5 rounded-sm bg-amber-500/10 border border-amber-500/20 text-amber-500 text-xs flex items-center gap-2",children:[l.jsx(zn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:"Hinweis: Im inaktiven Modus werden Bestätigungs-Links in der Entwickler-Konsole / Logs ausgegeben."})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-xs",children:[l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Host / Server Adresse"}),l.jsx("input",{type:"text",placeholder:"z. B. smtp.domain.de oder mail.gmx.net",value:bo,onChange:p=>_o(p.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Port"}),l.jsx("input",{type:"number",placeholder:"587 oder 465",value:Eo,onChange:p=>Co(p.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Absender E-Mail-Adresse (From)"}),l.jsx("input",{type:"email",placeholder:"noreply@verein.de",value:Do,onChange:p=>Ro(p.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Benutzername / Login E-Mail"}),l.jsx("input",{type:"text",placeholder:"z. B. noreply@verein.de",value:To,onChange:p=>Po(p.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field font-mono"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"SMTP Passwort"}),l.jsxs("div",{className:"relative",children:[l.jsx("input",{type:rl?"text":"password",placeholder:"••••••••",value:zo,onChange:p=>Lo(p.target.value),className:"w-full pl-3.5 pr-10 py-2 rounded-sm input-field font-mono"}),l.jsx("button",{type:"button",onClick:()=>Cd(!rl),className:"absolute right-3 top-2.5 text-muted hover:text-main",children:rl?l.jsx(Nd,{className:"w-4 h-4"}):l.jsx(jp,{className:"w-4 h-4"})})]})]}),l.jsxs("div",{className:"sm:col-span-2 flex items-center gap-6 pt-2",children:[l.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-main font-bold",children:[l.jsx("input",{type:"checkbox",checked:Mo,onChange:p=>{tl(p.target.checked),p.target.checked&&nl(!1)},className:"rounded-sm"}),l.jsx("span",{children:"STARTTLS verwenden (Empfohlen für Port 587)"})]}),l.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-main font-bold",children:[l.jsx("input",{type:"checkbox",checked:Ao,onChange:p=>{nl(p.target.checked),p.target.checked&&tl(!1)},className:"rounded-sm"}),l.jsx("span",{children:"SSL/TLS verwenden (Empfohlen für Port 465)"})]})]})]}),l.jsxs("div",{className:"pt-4 border-t border-grid flex flex-wrap items-center justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-[260px]",children:[l.jsx("input",{type:"email",placeholder:"Empfänger für Test-E-Mail...",value:Oo,onChange:p=>Ed(p.target.value),className:"px-3 py-1.5 rounded-sm input-field text-xs flex-1 font-mono"}),l.jsxs("button",{type:"button",disabled:$o,onClick:$d,className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/20 transition flex items-center gap-1.5 shrink-0",children:[l.jsx(Pp,{className:"w-3.5 h-3.5"}),$o?"Sende...":"Test-Mail Senden"]})]}),l.jsxs("button",{type:"submit",disabled:Io,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-2",children:[l.jsx(ot,{className:"w-4 h-4"}),Io?"Speichern...":"SMTP-Einstellungen Speichern"]})]})]})})]})}function Hp({eventToEdit:e,skills:t,user:n,onBack:r,onSubmit:s}){const[i,o]=j.useState((e==null?void 0:e.title)||""),[a,u]=j.useState((e==null?void 0:e.description)||""),[d,h]=j.useState((e==null?void 0:e.location)||""),[g,x]=j.useState((e==null?void 0:e.start_date)||new Date().toISOString().split("T")[0]),[S,N]=j.useState((e==null?void 0:e.end_date)||new Date().toISOString().split("T")[0]),[y,O]=j.useState(e!=null&&e.co_managers?e.co_managers.map(k=>k.id):[]),[m,c]=j.useState([]),[f,w]=j.useState([]),[_,b]=j.useState(!1),[T,P]=j.useState("");j.useEffect(()=>{if(B(),e&&e.task_areas&&e.task_areas.length>0){const k=e.task_areas.map(C=>({id:C.id,name:C.name,description:C.description||"",shifts:(C.shifts||[]).map(v=>({id:v.id,title:v.title,date:v.date||(e?e.start_date:new Date().toISOString().split("T")[0]),start_time:v.start_time,end_time:v.end_time,max_participants:v.max_participants||1,required_skill_ids:v.required_skills?v.required_skills.map(L=>L.id):[]}))}));w(k)}else e||w([{name:"Tresendienst",description:"Getränke- und Barverkauf",shifts:[{title:"Schicht 1",start_time:"18:00",end_time:"22:00",max_participants:2,required_skill_ids:[]}]},{name:"Essen kochen",description:"Zubereitung von Speisen",shifts:[{title:"Frühschicht",start_time:"15:00",end_time:"19:00",max_participants:3,required_skill_ids:[]}]},{name:"Aufbau & Aufräumen",description:"Tische, Stühle & Technik",shifts:[{title:"Aufbau",start_time:"12:00",end_time:"15:00",max_participants:4,required_skill_ids:[]}]}])},[e]);const B=async()=>{try{const k=await I("/users/all/");c(k.results||k)}catch{}},D=()=>{w([...f,{name:"",description:"",shifts:[{title:"Schicht 1",start_time:"10:00",end_time:"14:00",max_participants:1,required_skill_ids:[]}]}])},q=k=>{w(f.filter((C,v)=>v!==k))},Y=(k,C,v)=>{const L=[...f];L[k][C]=v,w(L)},Z=k=>{const C=[...f];C[k].shifts.push({title:`Schicht ${C[k].shifts.length+1}`,date:g,start_time:"14:00",end_time:"18:00",max_participants:1,required_skill_ids:[]}),w(C)},_e=(k,C)=>{const v=[...f];v[k].shifts=v[k].shifts.filter((L,M)=>M!==C),w(v)},ge=(k,C,v,L)=>{const M=[...f];M[k].shifts[C][v]=L,w(M)},$e=(k,C,v)=>{const L=[...f],M=L[k].shifts[C].required_skill_ids||[];M.includes(v)?L[k].shifts[C].required_skill_ids=M.filter(U=>U!==v):L[k].shifts[C].required_skill_ids=[...M,v],w(L)},Ee=async k=>{if(k.preventDefault(),P(""),!i.trim()){P("Bitte gib einen Veranstaltungstitel an.");return}b(!0);try{await s({id:e==null?void 0:e.id,title:i,description:a,location:d,start_date:g,end_date:S,co_manager_ids:y,task_areas:f})}catch(C){P(C.message||"Speichern der Veranstaltung fehlgeschlagen.")}finally{b(!1)}};return l.jsxs("div",{className:"space-y-6 max-w-4xl mx-auto animate-in fade-in duration-200 font-sans",children:[l.jsxs("div",{className:"flex items-center justify-between font-mono text-xs",children:[l.jsxs("button",{onClick:r,className:"px-3.5 py-1.5 rounded-sm bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-2 font-bold",children:[l.jsx(vd,{className:"w-4 h-4"})," [ ZURÜCK ZUR ÜBERSICHT ]"]}),l.jsxs("span",{className:"text-muted border border-grid px-2.5 py-0.5 rounded-sm",children:["MODE: ",e?"EVENT EDIT":"NEW EVENT"]})]}),l.jsx("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid space-y-2",children:l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-blue-500/10 text-blue-500 border border-blue-500/20 flex items-center justify-center font-bold",children:e?l.jsx(jr,{className:"w-5 h-5"}):l.jsx(Tr,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-serif text-3xl font-bold uppercase tracking-tight text-main",children:e?"Veranstaltung & Schichten Bearbeiten":"Neue Veranstaltung Erstellen"}),l.jsx("p",{className:"text-xs text-muted font-mono mt-0.5",children:"Konfiguriere Stammdaten, Co-Verwalter, Aufgabenfelder, Schichtzeiten & Qualifikationen"})]})]})}),T&&l.jsxs("div",{className:"p-4 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs font-mono flex items-center gap-2",children:[l.jsx(zn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:T})]}),l.jsxs("form",{onSubmit:Ee,className:"space-y-6",children:[l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs",children:[l.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main border-b border-grid pb-2",children:"1. Stammdaten & Verwalter der Veranstaltung"}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Titel der Veranstaltung"}),l.jsx("input",{type:"text",required:!0,value:i,onChange:k=>o(k.target.value),placeholder:"z. B. Sommerfest 2026",className:"w-full px-3.5 py-2 rounded-sm input-field text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Startdatum"}),l.jsx("input",{type:"date",required:!0,value:g,onChange:k=>x(k.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Enddatum"}),l.jsx("input",{type:"date",required:!0,value:S,onChange:k=>N(k.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Ort (optional)"}),l.jsx("input",{type:"text",value:d,onChange:k=>h(k.target.value),placeholder:"z. B. Vereinsheim, Großer Saal",className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Beschreibung (optional)"}),l.jsx("textarea",{rows:2,value:a,onChange:k=>u(k.target.value),placeholder:"Details zur Veranstaltung...",className:"w-full px-3.5 py-2 rounded-sm input-field text-xs font-sans"})]}),m.length>0&&l.jsxs("div",{className:"sm:col-span-2 pt-3 border-t border-grid space-y-2",children:[l.jsxs("label",{className:"block text-main font-bold flex items-center gap-1.5",children:[l.jsx(bd,{className:"w-4 h-4 text-indigo-400"})," Co-Verwalter / Mit-Organisatoren (optional)"]}),l.jsx("p",{className:"text-[11px] text-muted font-sans",children:"Wähle registrierte Benutzer aus, die dieses Event ebenfalls verwalten, bearbeiten und Gäste eintragen dürfen:"}),l.jsx("div",{className:"flex flex-wrap gap-2 pt-1",children:m.map(k=>{const C=y.includes(k.id);return l.jsxs("button",{type:"button",onClick:()=>{O(C?y.filter(v=>v!==k.id):[...y,k.id])},className:`px-3 py-1.5 rounded-sm text-xs font-mono font-bold transition flex items-center gap-1.5 border ${C?"bg-indigo-500/20 text-indigo-300 border-indigo-500/50 shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:[l.jsx(jo,{className:`w-3.5 h-3.5 ${C?"text-indigo-400":"opacity-40"}`}),l.jsx("span",{children:k.display_name||k.username})]},k.id)})})]})]})]}),l.jsxs("div",{className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs",children:[l.jsxs("div",{className:"flex items-center justify-between border-b border-grid pb-2",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-main flex items-center gap-2",children:[l.jsx(qs,{className:"w-4 h-4 text-blue-500"})," 2. Aufgabenfelder & Schichten"]}),l.jsxs("button",{type:"button",onClick:D,className:"px-3.5 py-1.5 rounded-sm text-xs font-mono font-bold bg-blue-500/10 text-blue-500 border border-blue-500/20 hover:bg-blue-500/20 transition flex items-center gap-1",children:[l.jsx(it,{className:"w-3.5 h-3.5"})," BEREICH HINZUFÜGEN"]})]}),f.map((k,C)=>l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsx("input",{type:"text",required:!0,placeholder:"Name des Aufgabenfeldes (z. B. Tresendienst)",value:k.name,onChange:v=>Y(C,"name",v.target.value),className:"flex-1 px-3 py-1.5 rounded-sm input-field text-xs font-bold"}),l.jsx("button",{type:"button",onClick:()=>q(C),className:"p-1.5 text-muted hover:text-red-400 transition",title:"Bereich entfernen",children:l.jsx(Yt,{className:"w-4 h-4"})})]}),l.jsxs("div",{className:"pl-3 border-l-2 border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between text-xs text-muted font-bold",children:[l.jsx("span",{children:"Schichten & Zeitfenster"}),l.jsxs("button",{type:"button",onClick:()=>Z(C),className:"text-blue-500 hover:underline flex items-center gap-1",children:[l.jsx(it,{className:"w-3 h-3"})," Schicht hinzufügen"]})]}),k.shifts.map((v,L)=>l.jsxs("div",{className:"p-3 rounded-sm bg-surface border border-grid space-y-2",children:[l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-12 gap-2 items-center text-xs",children:[l.jsx("input",{type:"text",placeholder:"Titel",value:v.title,onChange:M=>ge(C,L,"title",M.target.value),className:"sm:col-span-3 px-2.5 py-1 rounded-sm input-field text-xs"}),l.jsx("input",{type:"date",title:"Schichtdatum",min:g,max:S,value:v.date||g,onChange:M=>ge(C,L,"date",M.target.value),className:"sm:col-span-3 px-2 py-1 rounded-sm input-field text-xs font-mono text-indigo-400 font-bold"}),l.jsx("input",{type:"text",placeholder:"Start (14:00)",value:v.start_time,onChange:M=>ge(C,L,"start_time",M.target.value),className:"sm:col-span-2 px-2.5 py-1 rounded-sm input-field text-xs"}),l.jsx("input",{type:"text",placeholder:"Ende (18:00)",value:v.end_time,onChange:M=>ge(C,L,"end_time",M.target.value),className:"sm:col-span-2 px-2.5 py-1 rounded-sm input-field text-xs"}),l.jsx("div",{className:"sm:col-span-1 flex items-center gap-1",children:l.jsx("input",{type:"number",min:"1",title:"Max. Plätze",value:v.max_participants,onChange:M=>ge(C,L,"max_participants",parseInt(M.target.value)||1),className:"w-full px-1.5 py-1 rounded-sm input-field text-xs font-bold text-center"})}),l.jsx("button",{type:"button",onClick:()=>_e(C,L),className:"sm:col-span-1 p-1 text-muted hover:text-red-400 text-center",title:"Schicht löschen",children:l.jsx(Yt,{className:"w-3.5 h-3.5 mx-auto"})})]}),t&&t.length>0&&l.jsxs("div",{className:"pt-2 border-t border-grid flex flex-wrap items-center gap-1.5",children:[l.jsx("span",{className:"text-[10px] text-muted font-bold mr-1",children:"Erforderlich:"}),t.map(M=>{const U=(v.required_skill_ids||[]).includes(M.id);return l.jsxs("button",{type:"button",onClick:()=>$e(C,L,M.id),style:{backgroundColor:U?`${M.color}25`:"transparent",borderColor:U?M.color:"var(--color-border-grid)",color:U?M.color:"var(--color-text-muted)"},className:"px-2 py-0.5 rounded-sm text-[10px] border font-bold transition flex items-center gap-1",children:[l.jsx("span",{children:M.name}),U&&l.jsx(ot,{className:"w-3 h-3"})]},M.id)})]})]},L))]})]},C))]}),l.jsxs("div",{className:"flex items-center justify-end gap-3 pt-2 font-mono",children:[l.jsx("button",{type:"button",onClick:r,className:"px-5 py-2.5 rounded-sm text-xs font-semibold text-muted hover:bg-surface-hover transition border border-grid",children:"Abbrechen"}),l.jsxs("button",{type:"submit",disabled:_,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-2",children:[l.jsx(ot,{className:"w-4 h-4"}),_?"Speichern...":"Veranstaltung Speichern"]})]})]})]})}function Qp({onBack:e,onInstantiateTemplate:t,user:n,skills:r}){const[s,i]=j.useState([]),[o,a]=j.useState(!0),[u,d]=j.useState(""),[h,g]=j.useState(null),[x,S]=j.useState(""),[N,y]=j.useState(new Date().toISOString().split("T")[0]),[O,m]=j.useState(new Date().toISOString().split("T")[0]),[c,f]=j.useState(""),[w,_]=j.useState(!1),[b,T]=j.useState(!1),[P,B]=j.useState(""),[D,q]=j.useState(""),[Y,Z]=j.useState([{name:"Tresendienst",description:"Getränkeausschank und Bar",shifts:[{title:"Frühschicht",start_time:"18:00",end_time:"22:00",max_participants:2,required_skill_ids:[]},{title:"Spätschicht",start_time:"22:00",end_time:"02:00",max_participants:3,required_skill_ids:[]}]}]);j.useEffect(()=>{_e()},[]);const _e=async()=>{a(!0);try{const v=await I("/templates/");i(v.results||v)}catch(v){d(v.message||"Laden der Vorlagen fehlgeschlagen.")}finally{a(!1)}},ge=v=>{g(v),S(v.name)},$e=async v=>{if(v.preventDefault(),!!h){_(!0);try{await t(h.id,{title:x,start_date:N,end_date:O,location:c})}catch(L){d(L.message||"Erstellen der Veranstaltung aus Vorlage fehlgeschlagen.")}finally{_(!1)}}},Ee=async v=>{if(v.preventDefault(),!P.trim()){d("Bitte gib einen Vorlagen-Namen an.");return}_(!0);try{const L={name:P,description:D,template_data:{task_areas:Y.map(M=>({name:M.name,description:M.description,shifts:(M.shifts||[]).map(U=>({title:U.title,start_time:U.start_time,end_time:U.end_time,max_participants:U.max_participants,required_skill_ids:U.required_skill_ids}))}))}};await I("/templates/",{method:"POST",body:JSON.stringify(L)}),T(!1),B(""),q(""),_e()}catch(L){d(L.message||"Erstellen der Vorlage fehlgeschlagen.")}finally{_(!1)}},k=()=>{Z([...Y,{name:"Neuer Bereich",description:"",shifts:[{title:"Schicht 1",start_time:"14:00",end_time:"18:00",max_participants:2,required_skill_ids:[]}]}])},C=v=>{const L=[...Y];L[v].shifts.push({title:`Schicht ${L[v].shifts.length+1}`,start_time:"18:00",end_time:"22:00",max_participants:2,required_skill_ids:[]}),Z(L)};return l.jsxs("div",{className:"space-y-6 max-w-4xl mx-auto animate-in fade-in duration-200 font-sans",children:[l.jsxs("div",{className:"flex items-center justify-between font-mono text-xs",children:[l.jsxs("button",{onClick:e,className:"px-3.5 py-1.5 rounded-sm bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-2 font-bold",children:[l.jsx(vd,{className:"w-4 h-4"})," [ ZURÜCK ZUR ÜBERSICHT ]"]}),l.jsxs("span",{className:"text-muted border border-grid px-2.5 py-0.5 rounded-sm uppercase",children:["SYSTEM VORLAGEN (",s.length,")"]})]}),l.jsx("div",{className:"hallmark-panel rounded-sm p-6 sm:p-8 border border-grid space-y-4",children:l.jsxs("div",{className:"flex items-center justify-between gap-3",children:[l.jsxs("div",{className:"flex items-center gap-3",children:[l.jsx("div",{className:"w-10 h-10 rounded-sm bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 flex items-center justify-center font-bold",children:l.jsx(qs,{className:"w-5 h-5"})}),l.jsxs("div",{children:[l.jsx("h2",{className:"font-serif text-3xl font-bold uppercase tracking-tight text-main",children:"Veranstaltungs-Vorlagen Zentrale"}),l.jsx("p",{className:"text-xs text-muted font-mono mt-0.5",children:"Erstelle neue Veranstaltungen mit voreingestellten Schichten und Aufgabenbereichen"})]})]}),n&&l.jsxs("button",{onClick:()=>T(!b),className:"px-3.5 py-2 rounded-sm text-xs font-mono font-bold bg-indigo-500/10 text-indigo-400 border border-indigo-500/20 hover:bg-indigo-500/20 transition flex items-center gap-1.5 shrink-0",children:[l.jsx(it,{className:"w-4 h-4"}),b?"Schließen":"Neue Vorlage Erstellen"]})]})}),u&&l.jsxs("div",{className:"p-4 rounded-sm bg-red-500/10 border border-red-500/20 text-red-500 text-xs font-mono flex items-center gap-2",children:[l.jsx(zn,{className:"w-4 h-4 shrink-0"}),l.jsx("span",{children:u})]}),b&&l.jsxs("form",{onSubmit:Ee,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs animate-in fade-in duration-200",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-indigo-400 border-b border-grid pb-2 flex items-center justify-between",children:[l.jsx("span",{children:"Neue Vorlage mit voreingestellten Schichten anlegen"}),l.jsxs("button",{type:"button",onClick:k,className:"text-xs font-mono font-bold bg-indigo-500/20 text-indigo-300 px-3 py-1 rounded-sm border border-indigo-500/30 flex items-center gap-1",children:[l.jsx(it,{className:"w-3.5 h-3.5"})," Bereich Hinzufügen"]})]}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Vorlagen Name"}),l.jsx("input",{type:"text",required:!0,placeholder:"z. B. Standard Kneipenabend / Bar-Event",value:P,onChange:v=>B(v.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm font-bold"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Beschreibung (optional)"}),l.jsx("input",{type:"text",placeholder:"z. B. Inklusive 2 Barschichten und Aufbau",value:D,onChange:v=>q(v.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]})]}),l.jsx("div",{className:"space-y-4 pt-2",children:Y.map((v,L)=>l.jsxs("div",{className:"p-4 rounded-sm bg-subtle border border-grid space-y-3",children:[l.jsxs("div",{className:"flex items-center justify-between gap-2",children:[l.jsx("input",{type:"text",required:!0,placeholder:"Bereichs-Name (z. B. Bar)",value:v.name,onChange:M=>{const U=[...Y];U[L].name=M.target.value,Z(U)},className:"flex-1 px-3 py-1 rounded-sm input-field text-xs font-bold"}),l.jsx("button",{type:"button",onClick:()=>{Z(Y.filter((M,U)=>U!==L))},className:"text-muted hover:text-red-400 p-1",children:l.jsx(Yt,{className:"w-4 h-4"})})]}),l.jsxs("div",{className:"pl-3 border-l-2 border-grid space-y-2",children:[l.jsxs("div",{className:"flex items-center justify-between text-muted text-[11px] font-bold",children:[l.jsx("span",{children:"Voreingestellte Schichten"}),l.jsxs("button",{type:"button",onClick:()=>C(L),className:"text-indigo-400 hover:underline flex items-center gap-1",children:[l.jsx(it,{className:"w-3 h-3"})," Schicht hinzufügen"]})]}),v.shifts.map((M,U)=>l.jsxs("div",{className:"p-2.5 rounded-sm bg-surface border border-grid grid grid-cols-1 sm:grid-cols-12 gap-2 items-center text-xs",children:[l.jsx("input",{type:"text",placeholder:"Schichtname",value:M.title,onChange:K=>{const H=[...Y];H[L].shifts[U].title=K.target.value,Z(H)},className:"sm:col-span-4 px-2 py-1 rounded-sm input-field text-xs"}),l.jsx("input",{type:"text",placeholder:"Start (18:00)",value:M.start_time,onChange:K=>{const H=[...Y];H[L].shifts[U].start_time=K.target.value,Z(H)},className:"sm:col-span-2 px-2 py-1 rounded-sm input-field text-xs"}),l.jsx("input",{type:"text",placeholder:"Ende (22:00)",value:M.end_time,onChange:K=>{const H=[...Y];H[L].shifts[U].end_time=K.target.value,Z(H)},className:"sm:col-span-2 px-2 py-1 rounded-sm input-field text-xs"}),l.jsxs("div",{className:"sm:col-span-3 flex items-center gap-1",children:[l.jsx("span",{className:"text-[10px] text-muted",children:"Plätze:"}),l.jsx("input",{type:"number",min:"1",value:M.max_participants,onChange:K=>{const H=[...Y];H[L].shifts[U].max_participants=parseInt(K.target.value)||1,Z(H)},className:"w-full px-2 py-1 rounded-sm input-field text-xs font-bold"})]}),l.jsx("button",{type:"button",onClick:()=>{const K=[...Y];K[L].shifts=K[L].shifts.filter((H,ae)=>ae!==U),Z(K)},className:"sm:col-span-1 p-1 text-muted hover:text-red-400 text-center",children:l.jsx(Yt,{className:"w-3.5 h-3.5 mx-auto"})})]},U))]})]},L))}),l.jsxs("div",{className:"pt-3 flex justify-end gap-2 border-t border-grid",children:[l.jsx("button",{type:"button",onClick:()=>T(!1),className:"px-4 py-2 rounded-sm text-xs font-semibold text-muted hover:bg-surface-hover transition border border-grid",children:"Abbrechen"}),l.jsxs("button",{type:"submit",disabled:w,style:{backgroundColor:"var(--brand-primary)"},className:"px-5 py-2 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-1.5",children:[l.jsx(ot,{className:"w-4 h-4"})," Vorlage Speichern"]})]})]}),l.jsxs("div",{className:"space-y-4 font-mono text-xs",children:[l.jsx("h3",{className:"font-serif text-lg font-bold uppercase text-main",children:"Verfügbare Vorlagen"}),o?l.jsx("div",{className:"hallmark-panel p-8 text-center text-muted",children:"Lade Vorlagen..."}):s.length===0?l.jsx("div",{className:"hallmark-panel p-8 text-center text-muted italic",children:'[ Noch keine Vorlagen gespeichert. Klicke oben auf "Neue Vorlage Erstellen" um Vorlagen mit voreingestellten Schichten anzulegen. ]'}):l.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:s.map(v=>{var L;return l.jsxs("div",{onClick:()=>ge(v),className:`hallmark-panel p-5 rounded-sm border cursor-pointer transition space-y-3 ${(h==null?void 0:h.id)===v.id?"bg-indigo-500/10 border-indigo-500 shadow-md":"bg-surface border-grid hover:border-muted"}`,children:[l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h4",{className:"font-serif text-base font-bold text-main uppercase",children:v.name}),(h==null?void 0:h.id)===v.id&&l.jsx("span",{className:"text-[10px] font-mono text-indigo-400 bg-indigo-500/20 px-2 py-0.5 rounded-sm border border-indigo-500/30 font-bold",children:"[ AUSGEWÄHLT ]"})]}),v.description&&l.jsx("p",{className:"text-xs font-sans text-muted",children:v.description}),((L=v.template_data)==null?void 0:L.task_areas)&&v.template_data.task_areas.length>0&&l.jsxs("div",{className:"space-y-2 pt-2 border-t border-grid text-[11px]",children:[l.jsx("div",{className:"font-bold text-muted uppercase text-[10px]",children:"📌 Voreingestellte Schichten:"}),v.template_data.task_areas.map((M,U)=>{var K;return l.jsxs("div",{className:"bg-subtle p-2 rounded-sm border border-grid space-y-1",children:[l.jsxs("div",{className:"font-bold text-main flex items-center justify-between",children:[l.jsx("span",{children:M.name}),l.jsxs("span",{className:"text-[10px] text-muted font-normal",children:[((K=M.shifts)==null?void 0:K.length)||0," Schichten"]})]}),l.jsx("div",{className:"flex flex-wrap gap-1",children:(M.shifts||[]).map((H,ae)=>l.jsxs("span",{className:"px-2 py-0.5 rounded-sm bg-surface border border-grid text-[10px] flex items-center gap-1 font-mono",children:[l.jsx(kr,{className:"w-3 h-3 text-muted shrink-0"}),l.jsx("strong",{className:"text-main",children:H.title}),l.jsxs("span",{className:"text-muted",children:["(",H.start_time,"-",H.end_time,", ",H.max_participants," Plätze)"]})]},ae))})]},U)})]}),l.jsxs("div",{className:"text-[10px] text-muted pt-2 border-t border-grid flex items-center justify-between",children:[l.jsxs("span",{children:["Erstellt von: ",l.jsx("strong",{children:v.created_by_name||"Admin"})]}),l.jsx("span",{className:"text-indigo-400 font-bold",children:"Klick zum Auswählen"})]})]},v.id)})})]}),h&&l.jsxs("form",{onSubmit:$e,className:"hallmark-panel rounded-sm p-6 border border-grid space-y-4 font-mono text-xs animate-in fade-in duration-200",children:[l.jsxs("h3",{className:"font-serif text-lg font-bold uppercase text-indigo-400 border-b border-grid pb-2",children:['Neue Veranstaltung aus Vorlage "',h.name,'" Erstellen']}),l.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Titel der Veranstaltung"}),l.jsx("input",{type:"text",required:!0,value:x,onChange:v=>S(v.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-sm font-bold"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Startdatum"}),l.jsx("input",{type:"date",required:!0,value:N,onChange:v=>y(v.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]}),l.jsxs("div",{children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Enddatum"}),l.jsx("input",{type:"date",required:!0,value:O,onChange:v=>m(v.target.value),className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]}),l.jsxs("div",{className:"sm:col-span-2",children:[l.jsx("label",{className:"block text-main mb-1 font-bold",children:"Ort (optional)"}),l.jsx("input",{type:"text",value:c,onChange:v=>f(v.target.value),placeholder:"z. B. Großer Saal",className:"w-full px-3.5 py-2 rounded-sm input-field text-xs"})]})]}),l.jsx("div",{className:"pt-3 flex justify-end border-t border-grid",children:l.jsxs("button",{type:"submit",disabled:w,style:{backgroundColor:"var(--brand-primary)"},className:"px-6 py-2.5 rounded-sm text-xs font-mono font-bold text-white transition hover:brightness-110 shadow-sm flex items-center gap-2",children:[l.jsx(Cp,{className:"w-4 h-4 fill-white"}),w?"Erstellen...":"Veranstaltung Jetzt Aus Vorlage Erstellen"]})})]})]})}function Wp(){const[e,t]=j.useState(null),[n,r]=j.useState(null),[s,i]=j.useState([]),[o,a]=j.useState([]),[u,d]=j.useState(null),[h,g]=j.useState(null),[x,S]=j.useState(!0),[N,y]=j.useState("home"),[O,m]=j.useState(!1),[c,f]=j.useState(!1),[w,_]=j.useState(null),[b,T]=j.useState(!1),[P,B]=j.useState(!1),[D,q]=j.useState(localStorage.getItem("theme_mode")||"auto"),[Y,Z]=j.useState(null),[_e,ge]=j.useState(null);j.useEffect(()=>{window.addEventListener("beforeinstallprompt",z=>{z.preventDefault(),ge(z)}),L()},[]),j.useEffect(()=>{localStorage.setItem("theme_mode",D);const z=()=>{let R=D;D==="auto"&&(R=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",R)};if(z(),D==="auto"){const R=window.matchMedia("(prefers-color-scheme: dark)"),J=()=>z();return R.addEventListener("change",J),()=>R.removeEventListener("change",J)}},[D]),j.useEffect(()=>{n!=null&&n.primary_color&&(document.documentElement.style.setProperty("--brand-primary",n.primary_color),document.documentElement.style.setProperty("--brand-secondary",n.secondary_color||n.primary_color))},[n]);const[$e,Ee]=j.useState(null),[k,C]=j.useState(null),v=z=>{Z(z),setTimeout(()=>Z(null),5e3)},L=async()=>{S(!0);try{try{const W=await I("/branding/");r(W)}catch{}if(_i())try{const W=await I("/users/me/");t(W),!W.is_admin_user&&!W.is_staff&&!W.is_superuser&&N==="admin"&&y("home")}catch{sr(null),t(null),y("home")}const z=new URLSearchParams(window.location.search),R=z.get("verify_email");if(R)try{const W=await I("/users/verify-email/",{method:"POST",body:JSON.stringify({token:R})});sr(W.token),t(W.user),v(W.message||"✅ E-Mail-Adresse erfolgreich bestätigt!"),window.history.replaceState({},document.title,window.location.pathname)}catch(W){v(`⚠️ E-Mail Bestätigung: ${W.message}`)}const J=z.get("claim_token"),at=z.get("guest_name");J&&at&&(Ee(J),C(at),_i()||m(!0)),await U(),await K()}catch(z){console.error(z)}finally{S(!1)}},M=async z=>{try{const R=await I(`/users/signups/${z.id}/generate-claim-link/`,{method:"POST"}),J=`${window.location.origin}/?claim_token=${R.token}&guest_name=${encodeURIComponent(R.guest_name)}`;navigator.clipboard?(await navigator.clipboard.writeText(J),v(`✅ Einladungs-Link für ${R.guest_name} in Zwischenablage kopiert!`)):prompt(`Einladungs-Link für ${R.guest_name} kopieren:`,J)}catch(R){alert(R.message||"Fehler beim Erstellen des Links.")}},U=async()=>{try{const z=await I("/skills/");i(z.results||z)}catch{}},K=async()=>{try{const z=await I("/events/"),R=z.results||z;a(R),R.length>0&&!u?(d(R[0].id),H(R[0].id)):u&&H(u)}catch{}},H=async z=>{try{const R=await I(`/events/${z}/matrix/`);g(R)}catch{}},ae=z=>{d(z),H(z),y("schedule")},et=()=>{sr(null),t(null),y("home"),v("Erfolgreich abgemeldet."),u&&H(u)},Pr=(z,R)=>{t(z),z&&!z.is_admin_user&&!z.is_staff&&!z.is_superuser&&N==="admin"&&y("home"),v(R||"Erfolgreich angemeldet!"),u&&H(u)},zr=async z=>{if(!e)_(z),f(!0);else try{const R=await I(`/shifts/${z.id}/signup/`,{method:"POST"});v(R.message||"Erfolgreich für Schicht eingetragen!"),u&&H(u)}catch(R){v(`Fehler: ${R.message}`)}},Ys=async z=>{if(!w)return;const R=await I(`/shifts/${w.id}/signup/`,{method:"POST",body:JSON.stringify(z)});v(R.message||"Als Gast eingetragen!"),u&&H(u)},Bt=async z=>{try{const R=await I(`/shifts/${z.id}/signup/`,{method:"DELETE"});v(R.message||"Eintragung storniert."),u&&H(u)}catch(R){v(`Fehler: ${R.message}`)}},[Zs,vt]=j.useState(null),Js=async z=>{let R=z.id;R?await I(`/events/${R}/`,{method:"PATCH",body:JSON.stringify({title:z.title,description:z.description,location:z.location,start_date:z.start_date,end_date:z.end_date,co_manager_ids:z.co_manager_ids||[]})}):R=(await I("/events/",{method:"POST",body:JSON.stringify({title:z.title,description:z.description,location:z.location,start_date:z.start_date,end_date:z.end_date,co_manager_ids:z.co_manager_ids||[]})})).id;for(let J of z.task_areas){if(!J.name)continue;let at=J.id;at?await I(`/task-areas/${at}/`,{method:"PATCH",body:JSON.stringify({name:J.name,description:J.description||""})}):at=(await I("/task-areas/",{method:"POST",body:JSON.stringify({event:R,name:J.name,description:J.description||""})})).id;for(let W of J.shifts){const Dn=W.date||z.start_date;W.id?await I(`/shifts/${W.id}/`,{method:"PATCH",body:JSON.stringify({title:W.title,date:Dn,start_time:W.start_time,end_time:W.end_time,max_participants:W.max_participants,required_skill_ids:W.required_skill_ids||[]})}):await I("/shifts/",{method:"POST",body:JSON.stringify({task_area:at,title:W.title,date:Dn,start_time:W.start_time,end_time:W.end_time,max_participants:W.max_participants,required_skill_ids:W.required_skill_ids||[]})})}}v(z.id?"Veranstaltung & Schichten aktualisiert!":"Veranstaltung erfolgreich erstellt!"),await K(),ae(R)},Lr=async(z,R)=>{const J=await I(`/templates/${z}/instantiate/`,{method:"POST",body:JSON.stringify(R)});v("Veranstaltung aus Vorlage erstellt!"),await K(),J.id&&ae(J.id)},Xs=()=>{u&&window.open(`/api/events/${u}/export_pdf/`,"_blank")},Ut=()=>{window.print()},el=()=>{_e&&(_e.prompt(),_e.userChoice.then(z=>{z.outcome==="accepted"&&v("PWA Installation gestartet!"),ge(null)}))};return l.jsxs("div",{className:"min-h-screen bg-canvas text-main flex flex-col font-sans selection:bg-surface-hover transition-colors duration-200",children:[Y&&l.jsxs("div",{className:"fixed bottom-6 right-6 z-50 bg-emerald-600 text-white px-4 py-2.5 rounded-sm shadow-2xl font-mono text-xs flex items-center gap-2 border border-emerald-400 animate-in fade-in slide-in-from-bottom-3 duration-200",children:[l.jsx(ot,{className:"w-4 h-4"}),l.jsx("span",{children:Y})]}),l.jsx(Rp,{branding:n,user:e,activeTab:N,onChangeTab:y,themeMode:D,onChangeThemeMode:q,onLogout:et,onOpenAuth:()=>m(!0),onOpenCreateEvent:()=>{vt(null),y("event-editor")},onOpenTemplates:()=>y("templates"),onOpenProfile:()=>B(!0),onOpenAdmin:()=>y("admin"),pwaInstallPrompt:!!_e,onInstallPwa:el}),l.jsx("main",{className:"flex-1 max-w-7xl w-full mx-auto px-4 sm:px-6 lg:px-8 py-8 space-y-6",children:x?l.jsx("div",{className:"hallmark-panel p-16 text-center text-xs text-muted font-mono border border-grid",children:"Lade Daten..."}):N==="home"?l.jsx(Bp,{events:o,user:e,onSelectEvent:ae,onOpenCreateEvent:()=>{vt(null),y("event-editor")},onToggleEventActive:async z=>{try{await I(`/events/${z.id}/`,{method:"PATCH",body:JSON.stringify({is_active:z.is_active===!1})}),K()}catch(R){alert(R.message||"Aktion fehlgeschlagen.")}},onEditEvent:z=>{vt(z),y("event-editor")},branding:n}):N==="calendar"?l.jsx(Up,{events:o,onSelectEvent:ae,branding:n}):N==="admin"&&e&&(e.is_admin_user||e.is_staff||e.is_superuser)?l.jsx(Vp,{branding:n,onRefreshBranding:async()=>{const z=await I("/branding/");r(z)},onRefreshEvents:K,skills:s,onRefreshSkills:U}):N==="event-editor"?l.jsx(Hp,{eventToEdit:Zs,skills:s,onBack:()=>y("schedule"),onSubmit:Js}):N==="templates"?l.jsx(Qp,{onBack:()=>y("schedule"),onInstantiateTemplate:Lr,user:e,skills:s}):l.jsxs("div",{className:"space-y-6",children:[l.jsxs("div",{className:"flex items-center justify-between gap-4 overflow-x-auto pb-2 no-scrollbar font-mono",children:[l.jsxs("div",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-xs font-bold text-muted uppercase tracking-wider whitespace-nowrap",children:"Ausgewähltes Event:"}),o.map(z=>{const R=u===z.id;return l.jsx("button",{onClick:()=>ae(z.id),style:{backgroundColor:R?(n==null?void 0:n.primary_color)||"var(--brand-primary)":void 0,borderColor:R?(n==null?void 0:n.primary_color)||"var(--brand-primary)":void 0},className:`px-3.5 py-1.5 rounded-sm text-xs font-bold transition whitespace-nowrap border ${R?"text-white shadow-sm":"bg-subtle text-muted border-grid hover:text-main"}`,children:z.title},z.id)})]}),e&&l.jsxs("button",{onClick:()=>{vt(null),y("event-editor")},className:"px-3.5 py-1.5 rounded-sm text-xs font-bold bg-subtle hover:bg-surface-hover text-main border border-grid transition flex items-center gap-1.5 shrink-0",children:[l.jsx(it,{className:"w-4 h-4"})," Neues Event"]})]}),l.jsx(Op,{event:h,user:e,onSignupClick:zr,onCancelClick:Bt,onRemoveUserFromShift:async(z,R)=>{try{const J=await I(`/shifts/${z.id}/signup/${R}/`,{method:"DELETE"});v(J.message||"Eintragung entfernt."),K(),u&&ae(u)}catch(J){alert(J.message||"Entfernen der Person fehlgeschlagen.")}},onGenerateClaimLink:M,onExportPdf:Xs,onPrintView:Ut,onEditEvent:z=>{vt(z),y("event-editor")}})]})}),l.jsx("footer",{className:"border-t border-grid py-6 text-center text-xs text-muted font-mono no-print",children:l.jsxs("p",{children:[(n==null?void 0:n.app_name)||"Veranstaltungsschichtplaner"," • PWA Enabled • PostgreSQL & Docker Ready"]})}),O&&l.jsx($p,{onClose:()=>{m(!1),Ee(null),C(null)},onSuccess:Pr,claimToken:$e,prefilledGuestName:k}),c&&l.jsx(Ip,{shift:w,onClose:()=>f(!1),onSubmit:Ys})]})}Ll.createRoot(document.getElementById("root")).render(l.jsx(rf.StrictMode,{children:l.jsx(Wp,{})})); diff --git a/frontend/dist/index.html b/frontend/dist/index.html index bd5feaf..e386ea0 100644 --- a/frontend/dist/index.html +++ b/frontend/dist/index.html @@ -11,8 +11,8 @@ Schichtplaner — Veranstaltungsschichtpläne - - + +
diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 82ec7ed..32e1241 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -264,6 +264,29 @@ export default function App() { } }; + const handleDeleteEvent = async (eventObj) => { + if (!eventObj || !eventObj.id) return; + if (!window.confirm(`Möchtest du die Veranstaltung "${eventObj.title}" und alle zugehörigen Schichten wirklich unwiderruflich löschen?`)) { + return; + } + + try { + await apiFetch(`/events/${eventObj.id}/`, { + method: 'DELETE' + }); + showNotification(`Veranstaltung "${eventObj.title}" wurde erfolgreich gelöscht.`); + if (selectedEventId === eventObj.id) { + setSelectedEventId(null); + } + if (activeTab === 'event-editor') { + setActiveTab('home'); + } + refreshEvents(); + } catch (err) { + showNotification(`Fehler beim Löschen: ${err.message}`); + } + }; + const [eventToEdit, setEventToEdit] = useState(null); const handleSaveEventSubmit = async (eventPayload) => { @@ -444,6 +467,7 @@ export default function App() { setEventToEdit(evt); setActiveTab('event-editor'); }} + onDeleteEvent={handleDeleteEvent} branding={branding} /> ) : activeTab === 'calendar' ? ( @@ -467,8 +491,10 @@ export default function App() { setActiveTab('schedule')} onSubmit={handleSaveEventSubmit} + onDeleteEvent={handleDeleteEvent} /> ) : activeTab === 'templates' ? ( { + setEventToEdit(evt); + setActiveTab('event-editor'); + }} + onDeleteEvent={handleDeleteEvent} onRemoveUserFromShift={async (shift, signupId) => { try { const res = await apiFetch(`/shifts/${shift.id}/signup/${signupId}/`, { @@ -539,10 +570,6 @@ export default function App() { onGenerateClaimLink={handleGenerateClaimLink} onExportPdf={handleExportPdf} onPrintView={handlePrintView} - onEditEvent={(evt) => { - setEventToEdit(evt); - setActiveTab('event-editor'); - }} /> )} diff --git a/frontend/src/components/ShiftMatrixTable.jsx b/frontend/src/components/ShiftMatrixTable.jsx index 48f681f..a490959 100644 --- a/frontend/src/components/ShiftMatrixTable.jsx +++ b/frontend/src/components/ShiftMatrixTable.jsx @@ -1,7 +1,7 @@ /* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 */ /* Hallmark · component: shift-matrix-table · genre: editorial · theme: Atelier (Dark & Light) · studied-DNA: https://inihaus.de */ import React from 'react'; -import { Clock, UserCheck, Shield, Printer, Download, Award, CheckCircle2, UserX, UserPlus, MapPin, Edit3 } from 'lucide-react'; +import { Clock, UserCheck, Shield, Printer, Download, Award, CheckCircle2, UserX, UserPlus, MapPin, Edit3, Trash2 } from 'lucide-react'; export default function ShiftMatrixTable({ event, @@ -12,7 +12,8 @@ export default function ShiftMatrixTable({ onGenerateClaimLink, onExportPdf, onPrintView, - onEditEvent + onEditEvent, + onDeleteEvent }) { if (!event || !event.task_areas || event.task_areas.length === 0) { return ( @@ -71,6 +72,15 @@ export default function ShiftMatrixTable({ SCHICHTEN BEARBEITEN )} + {user && (user.is_admin_user || user.is_staff || user.is_superuser || event?.created_by === user.id || event?.created_by?.id === user.id) && onDeleteEvent && ( + + )} ))} diff --git a/frontend/src/pages/EventEditorPage.jsx b/frontend/src/pages/EventEditorPage.jsx index c5c8ba8..b92c1d1 100644 --- a/frontend/src/pages/EventEditorPage.jsx +++ b/frontend/src/pages/EventEditorPage.jsx @@ -4,7 +4,7 @@ import React, { useState, useEffect } from 'react'; import { ArrowLeft, Calendar, Layers, Plus, Trash2, Edit3, CheckCircle2, AlertCircle, Users, UserCheck } from 'lucide-react'; import { apiFetch } from '../api/client'; -export default function EventEditorPage({ eventToEdit, skills, user, onBack, onSubmit }) { +export default function EventEditorPage({ eventToEdit, skills, user, onBack, onSubmit, onDeleteEvent }) { const [title, setTitle] = useState(eventToEdit?.title || ''); const [description, setDescription] = useState(eventToEdit?.description || ''); const [location, setLocation] = useState(eventToEdit?.location || ''); @@ -434,23 +434,35 @@ export default function EventEditorPage({ eventToEdit, skills, user, onBack, onS {/* Submit Actions */} -
- - +
+ {eventToEdit && onDeleteEvent && user && (user.is_admin_user || user.is_staff || user.is_superuser || eventToEdit.created_by === user.id || eventToEdit.created_by?.id === user.id) ? ( + + ) :
} + +
+ + +
diff --git a/frontend/src/pages/HomePage.jsx b/frontend/src/pages/HomePage.jsx index 880db01..4e17525 100644 --- a/frontend/src/pages/HomePage.jsx +++ b/frontend/src/pages/HomePage.jsx @@ -1,7 +1,7 @@ /* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5 */ /* Hallmark · redesign: HomePage · studied-DNA: https://inihaus.de · macrostructure: Newsstand Feed */ import React, { useState } from 'react'; -import { Search, Calendar, MapPin, Clock, ArrowRight, Plus, EyeOff, CheckCircle2, Edit3, ShieldAlert } from 'lucide-react'; +import { Search, Calendar, MapPin, Clock, ArrowRight, Plus, EyeOff, CheckCircle2, Edit3, ShieldAlert, Trash2 } from 'lucide-react'; export default function HomePage({ events, @@ -10,6 +10,7 @@ export default function HomePage({ onOpenCreateEvent, onToggleEventActive, onEditEvent, + onDeleteEvent, branding }) { const [searchQuery, setSearchQuery] = useState(''); @@ -212,6 +213,16 @@ export default function HomePage({ {evt.is_active !== false ? : } )} + + {(isUserAdmin || (user && (evt.created_by === user.id || evt.created_by?.id === user.id))) && onDeleteEvent && ( + + )}