fix: Implement Network-First SW strategy, no-cache headers in Nginx for index.html/sw.js, and auto 401 token cleanup to fix post-redeploy stale cache issues

This commit is contained in:
Richard committed 2026-07-31 11:23:49 +02:00
1 parent 2403f1313f
commit ac71b38823
7 files changed
+75 -56

No files matched your search

@@ -6,7 +6,7 @@
* *
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/var jr=Symbol.for("react.element"),Ud=Symbol.for("react.portal"),Hd=Symbol.for("react.fragment"),Qd=Symbol.for("react.strict_mode"),Wd=Symbol.for("react.profiler"),Kd=Symbol.for("react.provider"),Gd=Symbol.for("react.context"),qd=Symbol.for("react.forward_ref"),Yd=Symbol.for("react.suspense"),Zd=Symbol.for("react.memo"),Jd=Symbol.for("react.lazy"),Ho=Symbol.iterator;function Xd(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<a){for(var u=Array(a),m=0;m<a;m++)u[m]=arguments[m+2];s.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:jr,type:e,key:i,ref:o,props:s,_owner:Ti.current}}function ef(e,t){return{$$typeof:jr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Pi(e){return typeof e=="object"&&e!==null&&e.$$typeof===jr}function tf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Wo=/\/+/g;function il(e,t){return typeof e=="object"&&e!==null&&e.key!=null?tf(""+e.key):t.toString(36)}function Jr(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case jr:case Ud:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+il(o,0):r,Qo(s)?(n="",e!=null&&(n=e.replace(Wo,"$&/")+"/"),Jr(s,t,n,"",function(m){return m})):s!=null&&(Pi(s)&&(s=ef(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Wo,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Qo(e))for(var a=0;a<e.length;a++){i=e[a];var u=r+il(i,a);o+=Jr(i,t,n,u,s)}else if(u=Xd(e),typeof u=="function")for(e=u.call(e),a=0;!(i=e.next()).done;)i=i.value,u=r+il(i,a++),o+=Jr(i,t,n,u,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Dr(e,t,n){if(e==null)return e;var r=[],s=0;return Jr(e,r,"","",function(i){return t.call(n,i,s++)}),r}function nf(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var _e={current:null},Xr={transition:null},rf={ReactCurrentDispatcher:_e,ReactCurrentBatchConfig:Xr,ReactCurrentOwner:Ti};function hu(){throw Error("act(...) is not supported in production builds of React.")}Q.Children={map:Dr,forEach:function(e,t,n){Dr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Dr(e,function(){t++}),t},toArray:function(e){return Dr(e,function(t){return t})||[]},only:function(e){if(!Pi(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Q.Component=Mn;Q.Fragment=Hd;Q.Profiler=Wd;Q.PureComponent=Ei;Q.StrictMode=Qd;Q.Suspense=Yd;Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rf;Q.act=hu;Q.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=uu({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Ti.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)fu.call(t,u)&&!mu.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var m=0;m<u;m++)a[m]=arguments[m+2];r.children=a}return{$$typeof:jr,type:e.type,key:s,ref:i,props:r,_owner:o}};Q.createContext=function(e){return e={$$typeof:Gd,_currentValue:e,_currentValue2:e,_threadCount:0,ProviderLine truncated */var jr=Symbol.for("react.element"),Ud=Symbol.for("react.portal"),Hd=Symbol.for("react.fragment"),Qd=Symbol.for("react.strict_mode"),Wd=Symbol.for("react.profiler"),Kd=Symbol.for("react.provider"),Gd=Symbol.for("react.context"),qd=Symbol.for("react.forward_ref"),Yd=Symbol.for("react.suspense"),Zd=Symbol.for("react.memo"),Jd=Symbol.for("react.lazy"),Ho=Symbol.iterator;function Xd(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 An(e,t,n){this.props=e,this.context=t,this.refs=cu,this.updater=n||au}An.prototype.isReactComponent={};An.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")};An.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function du(){}du.prototype=An.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,An.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<a){for(var u=Array(a),m=0;m<a;m++)u[m]=arguments[m+2];s.children=u}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:jr,type:e,key:i,ref:o,props:s,_owner:Ti.current}}function ef(e,t){return{$$typeof:jr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Pi(e){return typeof e=="object"&&e!==null&&e.$$typeof===jr}function tf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Wo=/\/+/g;function il(e,t){return typeof e=="object"&&e!==null&&e.key!=null?tf(""+e.key):t.toString(36)}function Jr(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case jr:case Ud:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+il(o,0):r,Qo(s)?(n="",e!=null&&(n=e.replace(Wo,"$&/")+"/"),Jr(s,t,n,"",function(m){return m})):s!=null&&(Pi(s)&&(s=ef(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Wo,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Qo(e))for(var a=0;a<e.length;a++){i=e[a];var u=r+il(i,a);o+=Jr(i,t,n,u,s)}else if(u=Xd(e),typeof u=="function")for(e=u.call(e),a=0;!(i=e.next()).done;)i=i.value,u=r+il(i,a++),o+=Jr(i,t,n,u,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Dr(e,t,n){if(e==null)return e;var r=[],s=0;return Jr(e,r,"","",function(i){return t.call(n,i,s++)}),r}function nf(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var _e={current:null},Xr={transition:null},rf={ReactCurrentDispatcher:_e,ReactCurrentBatchConfig:Xr,ReactCurrentOwner:Ti};function hu(){throw Error("act(...) is not supported in production builds of React.")}Q.Children={map:Dr,forEach:function(e,t,n){Dr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Dr(e,function(){t++}),t},toArray:function(e){return Dr(e,function(t){return t})||[]},only:function(e){if(!Pi(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Q.Component=An;Q.Fragment=Hd;Q.Profiler=Wd;Q.PureComponent=Ei;Q.StrictMode=Qd;Q.Suspense=Yd;Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rf;Q.act=hu;Q.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=uu({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Ti.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(u in t)fu.call(t,u)&&!mu.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&a!==void 0?a[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){a=Array(u);for(var m=0;m<u;m++)a[m]=arguments[m+2];r.children=a}return{$$typeof:jr,type:e.type,key:s,ref:i,props:r,_owner:o}};Q.createContext=function(e){return e={$$typeof:Gd,_currentValue:e,_currentValue2:e,_threadCount:0,ProviderLine truncated
* @license React * @license React
* react-jsx-runtime.production.min.js * react-jsx-runtime.production.min.js
* *
@@ -30,14 +30,14 @@
* *
* This source code is licensed under the MIT license found in the * This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/var mf=k,Ie=ff;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var wu=new Set,lr={};function rn(e,t){bn(e,t),bn(e+"Capture",t)}function bn(e,t){for(lr[e]=t,e=0;e<t.length;e++)wu.add(t[e])}var pt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ml=Object.prototype.hasOwnProperty,pf=/^[: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 hf(e){return Ml.call(Go,e)?!0:Ml.call(Ko,e)?!1:pf.test(e)?Go[e]=!0:(Ko[e]=!0,!1)}function xf(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 gf(e,t,n,r){if(t===null||typeof t>"u"||xf(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||!(2<t.length)||t[0]!=="o"&&t[0]!==" Line truncated */var mf=k,Ie=ff;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var wu=new Set,lr={};function rn(e,t){_n(e,t),_n(e+"Capture",t)}function _n(e,t){for(lr[e]=t,e=0;e<t.length;e++)wu.add(t[e])}var pt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ml=Object.prototype.hasOwnProperty,pf=/^[: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 hf(e){return Ml.call(Go,e)?!0:Ml.call(Ko,e)?!1:pf.test(e)?Go[e]=!0:(Ko[e]=!0,!1)}function xf(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 gf(e,t,n,r){if(t===null||typeof t>"u"||xf(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||!(2<t.length)||t[0]!=="o"&&t[0]!==" Line truncated
`+ol+e}var al=!1;function ul(e,t){if(!e||al)return"";al=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(m){var r=m}Reflect.construct(e,[],t)}else{try{t.call()}catch(m){r=m}e.call(t.prototype)}else{try{throw Error()}catch(m){r=m}e()}}catch(m){if(m&&r&&typeof m.stack=="string"){for(var s=m.stack.split(` `+ol+e}var al=!1;function ul(e,t){if(!e||al)return"";al=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(m){var r=m}Reflect.construct(e,[],t)}else{try{t.call()}catch(m){r=m}e.call(t.prototype)}else{try{throw Error()}catch(m){r=m}e()}}catch(m){if(m&&r&&typeof m.stack=="string"){for(var s=m.stack.split(`
`),i=r.stack.split(` `),i=r.stack.split(`
`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var u=` `),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var u=`
`+s[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",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 yf(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 Nu:return(e.displayName||"Context")+".Consumer";case ku: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 St:t=e._payload,e=e._init;try{return Ol(e(t))}catch{}}return null}function vf(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 ju(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wf(e){var t=ju(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=wf(e))}function bu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ju(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")?Vl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vl(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 Vl(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<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ot(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Fl(e,t){if(t.dan Line truncated `+s[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=o&&0<=a);break}}}finally{al=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Wn(e):""}function yf(e){switch(e.tag){case 5:return Wn(e.type);case 16:return Wn("Lazy");case 13:return Wn("Suspense");case 19:return Wn("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 Nu:return(e.displayName||"Context")+".Consumer";case ku: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 St:t=e._payload,e=e._init;try{return Ol(e(t))}catch{}}return null}function vf(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 ju(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wf(e){var t=ju(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=wf(e))}function bu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ju(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")?Vl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Vl(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 Vl(e,t,n){(t!=="number"||ds(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Kn=Array.isArray;function vn(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ot(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Fl(e,t){if(t.dan Line truncated
`).replace(Pm,"")}function Qr(e,t,n){if(t=wa(t),wa(e)!==t&&n)throw Error(_(425))}function vs(){}var ei=null,ti=null;function ni(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ri=typeof setTimeout=="function"?setTimeout:void 0,Lm=typeof clearTimeout=="function"?clearTimeout:void 0,ka=typeof Promise=="function"?Promise:void 0,zm=typeof queueMicrotask=="function"?queueMicrotask:typeof ka<"u"?function(e){return ka.resolve(null).then(e).catch(Mm)}:ri;function Mm(e){setTimeout(function(){throw e})}function Nl(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),cr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);cr(t)}function zt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Na(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Dn=Math.random().toString(36).slice(2),lt="__reactFiber$"+Dn,hr="__reactProps$"+Dn,ht="__reactContainer$"+Dn,si="__reactEvents$"+Dn,Am="__reactListeners$"+Dn,Dm="__reactHandles$"+Dn;function Kt(e){var t=e[lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ht]||n[lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Na(e);e!==null;){if(n=e[lt])return n;e=Na(e)}return t}e=n,n=e.parentNode}return null}function Er(e){return e=e[lt]||e[ht],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function fn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_(33))}function Vs(e){return e[hr]||null}var li=[],mn=-1;function Vt(e){return{current:e}}function te(e){0>mn||(e.current=li[mn],li[mn]=null,mn--)}function J(e,t){mn++,li[mn]=e.current,e.current=t}var It={},Ne=Vt(It),ze=Vt(!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 Me(e){return e=e.childContextTypes,e!=null}function ws(){te(ze),te(Ne)}function Sa(e,t,n){if(Ne.current!==It)throw Error(_(168));J(Ne,t),J(ze,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,vf(e)||"Unknown",s));return le({},n,r)}function ks(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||It,Jt=Ne.current,J(Ne,e),J(ze,ze.current),!0}function ja(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=pc(e,t,Jt),r.__reactInternalMemoizedMergedChildContext=e,te(ze),te(Ne),J(Ne,e)):te(ze),J(ze,n)}var ct=null,Fs=!1,Sl=!1;function hc(e){ct===null?ct=[e]:ct.push(e)}function Rm(e){Fs=!0,hc(e)}function Ft(){if(!Sl&&ct!==null){Sl=!0;var e=0,t=q;try{var n=ct;for(q=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ct=null,Fs=!1}catch(s){throw ct!==null&&(ct=ct.slice(e+1)),Vu(Ii,Ft),s}finally{q=t,Sl=!1}}return null}var pn=[],hn=0,Ns=null,Ss=0,Fe=[],Be=0,Xt=null,dt=1,ft="";function Qt(e,t){pn[hn++]=Ss,pn[hn++]=Ns,Ns=e,Ss=t}function xc(e,t,n){Fe[Be++]=dt,Fe[Be++]=ft,Fe[Be++]=Xt,Xt=e;var r=dt;e=ft;var s=32-Je(r)-1;r&=~(1<<s),n+=1;var i=32-Je(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,dt=1<<32-Je(t)+s|n<<s|r,ft=i+e}else dt=1<<i|n<<s|r,ft=e}function Ki(e){e.return!==null&&(Qt(e,1),xc(e,1,0))}function Gi(e){for(;e===Ns;)Ns=pn[--hn],pn[hn]=null,Ss=pn[--hn],pn[hn]=null;for(;e===Xt;)Xt=Fe[--Be],Fe[Be]=null,ft=Fe[--Be],Fe[Be]=null,dt=Fe[--Be],Fe[Be]=null}var Oe=null,Re=null,ne=!1,Ze=null;function gc(e,t){var n=He(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ba(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Oe=e,Re=zt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Oe=e,Re=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Xt!==null?{id:dt,overflow:ft}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=He(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Oe=e,Re=null,!0):!1;default:return!1}}function ii(e){return(e.mode&1)!==0&&(e.flags&128)===0}function oi(e){if(ne){var t=Re;if(t){var n=t;if(!ba(e,t)){if(ii(e))throw Error(_(418));t=zt(n.nextSibling);var r=Oe;t&&ba(e,t)?gc(r,n):(e.flags=e.flags&-4097|2,ne=!1,Oe=e)}}else{if(ii(e))throw Error(_(418));e.flags=e.flags&-4097|2,ne=!1,Oe=e}}}function _a(e){for(e=e.return;e! Line truncated `).replace(Pm,"")}function Qr(e,t,n){if(t=wa(t),wa(e)!==t&&n)throw Error(_(425))}function vs(){}var ei=null,ti=null;function ni(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ri=typeof setTimeout=="function"?setTimeout:void 0,Lm=typeof clearTimeout=="function"?clearTimeout:void 0,ka=typeof Promise=="function"?Promise:void 0,zm=typeof queueMicrotask=="function"?queueMicrotask:typeof ka<"u"?function(e){return ka.resolve(null).then(e).catch(Mm)}:ri;function Mm(e){setTimeout(function(){throw e})}function Nl(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),cr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);cr(t)}function zt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Na(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Rn=Math.random().toString(36).slice(2),lt="__reactFiber$"+Rn,hr="__reactProps$"+Rn,ht="__reactContainer$"+Rn,si="__reactEvents$"+Rn,Am="__reactListeners$"+Rn,Dm="__reactHandles$"+Rn;function Kt(e){var t=e[lt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ht]||n[lt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Na(e);e!==null;){if(n=e[lt])return n;e=Na(e)}return t}e=n,n=e.parentNode}return null}function Er(e){return e=e[lt]||e[ht],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function fn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_(33))}function Vs(e){return e[hr]||null}var li=[],mn=-1;function Vt(e){return{current:e}}function te(e){0>mn||(e.current=li[mn],li[mn]=null,mn--)}function J(e,t){mn++,li[mn]=e.current,e.current=t}var It={},Ne=Vt(It),ze=Vt(!1),Jt=It;function En(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 Me(e){return e=e.childContextTypes,e!=null}function ws(){te(ze),te(Ne)}function Sa(e,t,n){if(Ne.current!==It)throw Error(_(168));J(Ne,t),J(ze,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,vf(e)||"Unknown",s));return le({},n,r)}function ks(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||It,Jt=Ne.current,J(Ne,e),J(ze,ze.current),!0}function ja(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=pc(e,t,Jt),r.__reactInternalMemoizedMergedChildContext=e,te(ze),te(Ne),J(Ne,e)):te(ze),J(ze,n)}var ct=null,Fs=!1,Sl=!1;function hc(e){ct===null?ct=[e]:ct.push(e)}function Rm(e){Fs=!0,hc(e)}function Ft(){if(!Sl&&ct!==null){Sl=!0;var e=0,t=q;try{var n=ct;for(q=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ct=null,Fs=!1}catch(s){throw ct!==null&&(ct=ct.slice(e+1)),Vu(Ii,Ft),s}finally{q=t,Sl=!1}}return null}var pn=[],hn=0,Ns=null,Ss=0,Fe=[],Be=0,Xt=null,dt=1,ft="";function Qt(e,t){pn[hn++]=Ss,pn[hn++]=Ns,Ns=e,Ss=t}function xc(e,t,n){Fe[Be++]=dt,Fe[Be++]=ft,Fe[Be++]=Xt,Xt=e;var r=dt;e=ft;var s=32-Je(r)-1;r&=~(1<<s),n+=1;var i=32-Je(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,dt=1<<32-Je(t)+s|n<<s|r,ft=i+e}else dt=1<<i|n<<s|r,ft=e}function Ki(e){e.return!==null&&(Qt(e,1),xc(e,1,0))}function Gi(e){for(;e===Ns;)Ns=pn[--hn],pn[hn]=null,Ss=pn[--hn],pn[hn]=null;for(;e===Xt;)Xt=Fe[--Be],Fe[Be]=null,ft=Fe[--Be],Fe[Be]=null,dt=Fe[--Be],Fe[Be]=null}var Oe=null,Re=null,ne=!1,Ze=null;function gc(e,t){var n=He(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ba(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Oe=e,Re=zt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Oe=e,Re=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Xt!==null?{id:dt,overflow:ft}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=He(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Oe=e,Re=null,!0):!1;default:return!1}}function ii(e){return(e.mode&1)!==0&&(e.flags&128)===0}function oi(e){if(ne){var t=Re;if(t){var n=t;if(!ba(e,t)){if(ii(e))throw Error(_(418));t=zt(n.nextSibling);var r=Oe;t&&ba(e,t)?gc(r,n):(e.flags=e.flags&-4097|2,ne=!1,Oe=e)}}else{if(ii(e))throw Error(_(418));e.flags=e.flags&-4097|2,ne=!1,Oe=e}}}function _a(e){for(e=e.return;e! Line truncated
Error generating stack: `+i.message+` Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Cl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function di(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Qm=typeof WeakMap=="function"?WeakMap:Map;function Hc(e,t,n){n=mt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ls||(Ls=!0,ki=r),di(e,t)},n}function Qc(e,t,n){n=mt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){di(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){di(e,t),typeof r!="function"&&(At===null?At=new Set([this]):At.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Aa(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Qm;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=lp.bind(null,e,t,n),t.then(e,e))}function Da(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ra(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=mt(-1,1),t.tag=2,Mt(n,t,1))),n.lanes|=1),e)}var Wm=vt.ReactCurrentOwner,Le=!1;function je(e,t,n,r){t.child=e===null?wc(t,null,n,r):Cn(t,e.child,n,r)}function Oa(e,t,n,r,s){n=n.render;var i=t.ref;return Sn(t,s),r=lo(e,t,n,r,i,s),n=io(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gt(e,t,s)):(ne&&n&&Ki(t),t.flags|=1,je(e,t,r,s),t.child)}function Ia(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!go(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Wc(e,t,i,r,s)):(e=us(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:fr,n(o,r)&&e.ref===t.ref)return gt(e,t,s)}return t.flags|=1,e=Rt(i,r),e.ref=t.ref,e.return=t,t.child=e}function Wc(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(fr(i,r)&&e.ref===t.ref)if(Le=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Le=!0);else return t.lanes=e.lanes,gt(e,t,s)}return fi(e,t,n,r,s)}function Kc(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},J(yn,De),De|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,J(yn,De),De|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,J(yn,De),De|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,J(yn,De),De|=r;return je(e,t,s,n),t.child}function Gc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function fi(e,t,n,r,s){var i=Me(n)?Jt:Ne.current;return i=_n(t,i),Sn(t,s),n=lo(e,t,n,r,i,s),r=io(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gt(e,t,s)):(ne&&r&&Ki(t),t.flags|=1,je(e,t,n,s),t.child)}function $a(e,t,n,r,s){if(Me(n)){var i=!0;ks(t)}else i=!1;if(Sn(t,s),t.stateNode===null)is(e,t),Uc(t,n,r),ci(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var u=o.context,m=n.contextType;typeof m=="object"&&m!==null?m=We(m):(m=Me(n)?Jt:Ne.current,m=_n(t,m));var h=n.getDerivedStateFromProps,v=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";v||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||u!==m)&&Ma(t,o,r,m),jt=!1;var x=t.memoizedState;o.state=x,_s(t,r,o,s),u=t.memoizedState,a!==r||x!==u||ze.current||jt?(typeof h=="function"&&(ui(t,n,h,r),u=t.memoizedState),(a=jt||za(t,n,a,r,x,u,m))?(v||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=m,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Nc(e,t),a=t.memoizedProps,m=t.type===t.elementType?a:qe(t.type,a),o.props=m,v=t.pendingProps,x=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=We(u):(u=Me(n)?Jt:Ne.current,u=_n(t,u));var S=n.getDerivedStateFromProps;(h=typeof S=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==v||x!==u)&&Ma(t,o,r,u),jt=!1,x=t.memoizedState,o.state=x,_s(t,r,o,s);var N=t.memoizedState Line truncated `+i.stack}return{value:e,source:t,stack:s,digest:null}}function Cl(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function di(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Qm=typeof WeakMap=="function"?WeakMap:Map;function Hc(e,t,n){n=mt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ls||(Ls=!0,ki=r),di(e,t)},n}function Qc(e,t,n){n=mt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){di(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){di(e,t),typeof r!="function"&&(At===null?At=new Set([this]):At.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Aa(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Qm;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=lp.bind(null,e,t,n),t.then(e,e))}function Da(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Ra(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=mt(-1,1),t.tag=2,Mt(n,t,1))),n.lanes|=1),e)}var Wm=vt.ReactCurrentOwner,Le=!1;function je(e,t,n,r){t.child=e===null?wc(t,null,n,r):Tn(t,e.child,n,r)}function Oa(e,t,n,r,s){n=n.render;var i=t.ref;return Sn(t,s),r=lo(e,t,n,r,i,s),n=io(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gt(e,t,s)):(ne&&n&&Ki(t),t.flags|=1,je(e,t,r,s),t.child)}function Ia(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!go(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Wc(e,t,i,r,s)):(e=us(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:fr,n(o,r)&&e.ref===t.ref)return gt(e,t,s)}return t.flags|=1,e=Rt(i,r),e.ref=t.ref,e.return=t,t.child=e}function Wc(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(fr(i,r)&&e.ref===t.ref)if(Le=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Le=!0);else return t.lanes=e.lanes,gt(e,t,s)}return fi(e,t,n,r,s)}function Kc(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},J(yn,De),De|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,J(yn,De),De|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,J(yn,De),De|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,J(yn,De),De|=r;return je(e,t,s,n),t.child}function Gc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function fi(e,t,n,r,s){var i=Me(n)?Jt:Ne.current;return i=En(t,i),Sn(t,s),n=lo(e,t,n,r,i,s),r=io(),e!==null&&!Le?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,gt(e,t,s)):(ne&&r&&Ki(t),t.flags|=1,je(e,t,n,s),t.child)}function $a(e,t,n,r,s){if(Me(n)){var i=!0;ks(t)}else i=!1;if(Sn(t,s),t.stateNode===null)is(e,t),Uc(t,n,r),ci(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var u=o.context,m=n.contextType;typeof m=="object"&&m!==null?m=We(m):(m=Me(n)?Jt:Ne.current,m=En(t,m));var h=n.getDerivedStateFromProps,v=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";v||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||u!==m)&&Ma(t,o,r,m),jt=!1;var x=t.memoizedState;o.state=x,_s(t,r,o,s),u=t.memoizedState,a!==r||x!==u||ze.current||jt?(typeof h=="function"&&(ui(t,n,h,r),u=t.memoizedState),(a=jt||za(t,n,a,r,x,u,m))?(v||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=m,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Nc(e,t),a=t.memoizedProps,m=t.type===t.elementType?a:qe(t.type,a),o.props=m,v=t.pendingProps,x=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=We(u):(u=Me(n)?Jt:Ne.current,u=En(t,u));var S=n.getDerivedStateFromProps;(h=typeof S=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==v||x!==u)&&Ma(t,o,r,u),jt=!1,x=t.memoizedState,o.state=x,_s(t,r,o,s);var N=t.memoizedState Line truncated
* @license lucide-react v0.424.0 - ISC * @license lucide-react v0.424.0 - ISC
* *
* This source code is licensed under the ISC license. * This source code is licensed under the ISC license.
@@ -97,7 +97,7 @@ Error generating stack: `+i.message+`
* *
* This source code is licensed under the ISC license. * This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree. * See the LICENSE file in the root directory of this source tree.
*/const zn=B("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"}]]);/** */const Mn=B("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 * @license lucide-react v0.424.0 - ISC
* *
* This source code is licensed under the ISC license. * This source code is licensed under the ISC license.
@@ -267,6 +267,6 @@ Error generating stack: `+i.message+`
* *
* This source code is licensed under the ISC license. * This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree. * See the LICENSE file in the root directory of this source tree.
*/const _d=B("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Op({branding:e,user:t,activeTab:n,onChangeTab:r,themeMode:s,onChangeThemeMode:i,onLogout:o,onOpenAuth:a,onOpenCreateEvent:u,onOpenTemplates:m,onOpenProfile:h,onOpenAdmin:v,pwaInstallPrompt:x,onInstallPwa:S}){const N=(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: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: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(Cp,{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(Ap,{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(Ep,{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(jd,{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(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(Sr,{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,{Line truncated */const _d=B("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function Op({branding:e,user:t,activeTab:n,onChangeTab:r,themeMode:s,onChangeThemeMode:i,onLogout:o,onOpenAuth:a,onOpenCreateEvent:u,onOpenTemplates:m,onOpenProfile:h,onOpenAdmin:v,pwaInstallPrompt:x,onInstallPwa:S}){const N=(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: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: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(Cp,{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(Ap,{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(Ep,{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(jd,{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(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(Sr,{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,{Line truncated
Offene Angebote, DIY-Kultur & engagierte Schichten.`})]}),L&&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 Up({events:e,onSelectEvent:t,branding:n}){const[r,s]=k.useState(new Date),[i,o]=k.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)),v=()=>s(new Date(a,u+1,1)),x=()=>s(new Date),S=new Date(a,u,1).getDay(),N=S===0?6:S-1,w=new Date(a,u+1,0).getDate(),L=d=>{const y=String(u+1).padStart(2,"0"),j=String(d).padStart(2,"0");return`${a}-${y}-${j}`},f=d=>{const y=L(d);return e.filter(j=>y>=j.start_date&&y<=j.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(kp,{className:"w-4 h-4"})}),l.jsx("button",{onClick:v,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((d,y)=>l.jsx("div",{className:"min-h-[100px] sm:min-h-[110px] p-2 bg-subtle/50 text-muted opacity-30"},`offset-${y}`)),Array.from({length:w}).map((d,y)=>{const j=y+1,E=f(j),P=new Date().getFullYear()===a&&new Date().getMonth()===u&&new Date().getDate()===j;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:j}),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-${j}`)})]})]}),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-ma Line truncated Offene Angebote, DIY-Kultur & engagierte Schichten.`})]}),L&&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 Up({events:e,onSelectEvent:t,branding:n}){const[r,s]=k.useState(new Date),[i,o]=k.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)),v=()=>s(new Date(a,u+1,1)),x=()=>s(new Date),S=new Date(a,u,1).getDay(),N=S===0?6:S-1,w=new Date(a,u+1,0).getDate(),L=d=>{const y=String(u+1).padStart(2,"0"),j=String(d).padStart(2,"0");return`${a}-${y}-${j}`},f=d=>{const y=L(d);return e.filter(j=>y>=j.start_date&&y<=j.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(kp,{className:"w-4 h-4"})}),l.jsx("button",{onClick:v,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((d,y)=>l.jsx("div",{className:"min-h-[100px] sm:min-h-[110px] p-2 bg-subtle/50 text-muted opacity-30"},`offset-${y}`)),Array.from({length:w}).map((d,y)=>{const j=y+1,E=f(j),P=new Date().getFullYear()===a&&new Date().getMonth()===u&&new Date().getDate()===j;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:j}),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-${j}`)})]})]}),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-ma Line truncated
Offene Angebote, DIY-Kultur & engagierte Schichten.`),[Ht,el]=k.useState((e==null?void 0:e.show_support_box)??!0),[Ar,T]=k.useState((e==null?void 0:e.support_box_title)||"❤️ Unterstützen"),[R,Z]=k.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]=k.useState(!1),[wt,jo]=k.useState(!1),[bo,_o]=k.useState("smtp.beispiel.de"),[Eo,Co]=k.useState(587),[To,Po]=k.useState(""),[Lo,zo]=k.useState(""),[Mo,tl]=k.useState(!0),[Ao,nl]=k.useState(!1),[Do,Ro]=k.useState("noreply@schichtplaner.de"),[Oo,Ed]=k.useState(""),[rl,Cd]=k.useState(!1),[Io,$o]=k.useState(!1),[Vo,Fo]=k.useState(!1);k.useEffect(()=>{Bo()},[]);const Bo=async()=>{u(!0);try{try{const p=await V("/users/manage-users/");N(p.results||p)}catch{}try{const p=await V("/users/pending/");c(p.results||p)}catch{}try{const p=await V("/users/restriction-setting/");y(p.is_restriction_enabled),E(p.require_admin_approval),b(p.require_email_verification??!0)}catch{}try{const p=await V("/users/domain-rules/");O(p.results||p)}catch{}try{const p=await V("/events/");ge(p.results||p)}catch{}try{const p=await V("/templates/");ye(p.results||p)}catch{}try{const p=await V("/users/smtp-setting/");p&&(jo(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)}},Te=p=>{x(p),setTimeout(()=>x(""),4e3)},Td=async p=>{try{const F=await V(`/users/manage-users/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_admin_user:!p.is_admin_user})});N(S.map(kt=>kt.id===p.id?F:kt)),Te(`Admin-Rechte für ${p.username} aktualisiert.`)}catch(F){h(F.message||"Fehler beim Aktualisieren.")}},Pd=async p=>{try{const F=await V(`/users/manage-users/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_approved:!p.is_approved})});N(S.map(kt=>kt.id===p.id?F:kt)),Te(`Freischalt-Status für ${p.username} aktualisiert.`)}catch(F){h(F.message||"Fehler beim Aktualisieren.")}},Ld=async p=>{if(window.confirm(`Möchtest du das Benutzerkonto "${p.display_name||p.username}" (@${p.username}) wirklich dauerhaft löschen?`))try{await V(`/users/manage-users/${p.id}/`,{method:"DELETE"}),N(S.filter(F=>F.id!==p.id)),Te(`Benutzerkonto ${p.username} wurde gelöscht.`)}catch(F){h(F.message||"Fehler beim Löschen des Benutzers.")}},zd=async p=>{try{await V(`/users/${p}/approve/`,{method:"POST"}),c(f.filter(F=>F.id!==p)),Bo(),Te("Benutzer erfolgreich freigeschaltet.")}catch(F){h(F.message||"Freischalten fehlgeschlagen.")}},Md=async p=>{try{await V(`/users/${p}/approve/`,{method:"DELETE"}),c(f.filter(F=>F.id!==p)),Te("Benutzer abgelehnt und gelöscht.")}catch(F){h(F.message||"Ablehnen fehlgeschlagen.")}},sl=async(p,F)=>{try{const ll=await V("/users/restriction-setting/",{method:"POST",body:JSON.stringify({is_restriction_enabled:p==="restriction"?F:d,require_admin_approval:p==="approval"?F:j,require_email_verification:p==="email_verify"?F:P})});y(ll.is_restriction_enabled),E(ll.require_admin_approval),b(ll.require_email_verification),Te("Sicherheitseinstellungen aktualisiert.")}catch(kt){h(kt.message||"Aktualisierung fehlgeschlagen.")}},Ad=async p=>{if(p.preventDefault(),!!X.trim())try{const F=await V("/users/domain-rules/",{method:"POST",body:JSON.stringify({domain:X})});O([...U,F]),Y(""),Te(`Domain-Regel "${F.domain}" hinzugefügt.`)}catch(F){h(F.message||"Fehler beim Hinzufügen.")}},Dd=async p=>{try{await V(`/users/domain-rules/${p}/`,{method:"DELETE"}),O(U.filter(F=>F.id!==p)),Te("Domain-Regel entfernt.")}catch(F){h(F.message||"Fehler beim Löschen.")}},Rd=async p=>{if(p.preventDefault(),!!Ce.trim())try{await V("/skills/",{method:"POST",body:JSON.stringify({name:Ce,description:I,color:C})}),z(""),g(""),M(lu()),s(),Te("Qualifikation angelegt.")}catch(F){h(F.message||"Fehler beim Anlegen.")}},Od=async p=>{try{await V(`/skills/${p}/`,{method:"DELETE"}),s(),Te("Qualifikation gelöscht.")}catch(F){h(F.message||"Fehler beim Löschen.")}},Id=async p=>{try{await V(`/templates/${p}/`,{method:"DELETE"}),ye(Se.filter(F=>F.id!==p)),Te("Vorlage gelöscht.")}catch(F){h(F.message||"Fehler beim Löschen.")}},$d=async p=>{p.preventDefault(),K(!0);try{await V("/branding/",{method:"POST",body:JSON.stringify({app_name:$,logo_url:H,primary_color:tt,custom_banner_text:Lr,show_community_info_box:Bt,community_info_title:zr,community_info_text:Mr,show_support_box:Ht,support_box_title:Ar,support_box_text:R})}),t(),Te("Branding-Einstellungen erfolgreich gespeichert!")}catch(F){h(F.message||"Speichern des Brandings fehlgeschlagen.")}finally{K(!1)}},Vd=async p=>{p.preventDefault(),$o(!0);try{await V("/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})}),Te("✅ SMTP-Einstellungen erfolgreich gespeichert!")}catch(F){h(F.message||"Speichern der SMTP-Einstellungen fehlgeschlagen.")}finally{$o(!1)}}, Line truncated Offene Angebote, DIY-Kultur & engagierte Schichten.`),[Ht,el]=k.useState((e==null?void 0:e.show_support_box)??!0),[Ar,T]=k.useState((e==null?void 0:e.support_box_title)||"❤️ Unterstützen"),[R,Z]=k.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]=k.useState(!1),[wt,jo]=k.useState(!1),[bo,_o]=k.useState("smtp.beispiel.de"),[Eo,Co]=k.useState(587),[To,Po]=k.useState(""),[Lo,zo]=k.useState(""),[Mo,tl]=k.useState(!0),[Ao,nl]=k.useState(!1),[Do,Ro]=k.useState("noreply@schichtplaner.de"),[Oo,Ed]=k.useState(""),[rl,Cd]=k.useState(!1),[Io,$o]=k.useState(!1),[Vo,Fo]=k.useState(!1);k.useEffect(()=>{Bo()},[]);const Bo=async()=>{u(!0);try{try{const p=await V("/users/manage-users/");N(p.results||p)}catch{}try{const p=await V("/users/pending/");c(p.results||p)}catch{}try{const p=await V("/users/restriction-setting/");y(p.is_restriction_enabled),E(p.require_admin_approval),b(p.require_email_verification??!0)}catch{}try{const p=await V("/users/domain-rules/");O(p.results||p)}catch{}try{const p=await V("/events/");ge(p.results||p)}catch{}try{const p=await V("/templates/");ye(p.results||p)}catch{}try{const p=await V("/users/smtp-setting/");p&&(jo(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)}},Te=p=>{x(p),setTimeout(()=>x(""),4e3)},Td=async p=>{try{const F=await V(`/users/manage-users/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_admin_user:!p.is_admin_user})});N(S.map(kt=>kt.id===p.id?F:kt)),Te(`Admin-Rechte für ${p.username} aktualisiert.`)}catch(F){h(F.message||"Fehler beim Aktualisieren.")}},Pd=async p=>{try{const F=await V(`/users/manage-users/${p.id}/`,{method:"PATCH",body:JSON.stringify({is_approved:!p.is_approved})});N(S.map(kt=>kt.id===p.id?F:kt)),Te(`Freischalt-Status für ${p.username} aktualisiert.`)}catch(F){h(F.message||"Fehler beim Aktualisieren.")}},Ld=async p=>{if(window.confirm(`Möchtest du das Benutzerkonto "${p.display_name||p.username}" (@${p.username}) wirklich dauerhaft löschen?`))try{await V(`/users/manage-users/${p.id}/`,{method:"DELETE"}),N(S.filter(F=>F.id!==p.id)),Te(`Benutzerkonto ${p.username} wurde gelöscht.`)}catch(F){h(F.message||"Fehler beim Löschen des Benutzers.")}},zd=async p=>{try{await V(`/users/${p}/approve/`,{method:"POST"}),c(f.filter(F=>F.id!==p)),Bo(),Te("Benutzer erfolgreich freigeschaltet.")}catch(F){h(F.message||"Freischalten fehlgeschlagen.")}},Md=async p=>{try{await V(`/users/${p}/approve/`,{method:"DELETE"}),c(f.filter(F=>F.id!==p)),Te("Benutzer abgelehnt und gelöscht.")}catch(F){h(F.message||"Ablehnen fehlgeschlagen.")}},sl=async(p,F)=>{try{const ll=await V("/users/restriction-setting/",{method:"POST",body:JSON.stringify({is_restriction_enabled:p==="restriction"?F:d,require_admin_approval:p==="approval"?F:j,require_email_verification:p==="email_verify"?F:P})});y(ll.is_restriction_enabled),E(ll.require_admin_approval),b(ll.require_email_verification),Te("Sicherheitseinstellungen aktualisiert.")}catch(kt){h(kt.message||"Aktualisierung fehlgeschlagen.")}},Ad=async p=>{if(p.preventDefault(),!!X.trim())try{const F=await V("/users/domain-rules/",{method:"POST",body:JSON.stringify({domain:X})});O([...U,F]),Y(""),Te(`Domain-Regel "${F.domain}" hinzugefügt.`)}catch(F){h(F.message||"Fehler beim Hinzufügen.")}},Dd=async p=>{try{await V(`/users/domain-rules/${p}/`,{method:"DELETE"}),O(U.filter(F=>F.id!==p)),Te("Domain-Regel entfernt.")}catch(F){h(F.message||"Fehler beim Löschen.")}},Rd=async p=>{if(p.preventDefault(),!!Ce.trim())try{await V("/skills/",{method:"POST",body:JSON.stringify({name:Ce,description:I,color:C})}),z(""),g(""),M(lu()),s(),Te("Qualifikation angelegt.")}catch(F){h(F.message||"Fehler beim Anlegen.")}},Od=async p=>{try{await V(`/skills/${p}/`,{method:"DELETE"}),s(),Te("Qualifikation gelöscht.")}catch(F){h(F.message||"Fehler beim Löschen.")}},Id=async p=>{try{await V(`/templates/${p}/`,{method:"DELETE"}),ye(Se.filter(F=>F.id!==p)),Te("Vorlage gelöscht.")}catch(F){h(F.message||"Fehler beim Löschen.")}},$d=async p=>{p.preventDefault(),K(!0);try{await V("/branding/",{method:"POST",body:JSON.stringify({app_name:$,logo_url:H,primary_color:tt,custom_banner_text:Lr,show_community_info_box:Bt,community_info_title:zr,community_info_text:Mr,show_support_box:Ht,support_box_title:Ar,support_box_text:R})}),t(),Te("Branding-Einstellungen erfolgreich gespeichert!")}catch(F){h(F.message||"Speichern des Brandings fehlgeschlagen.")}finally{K(!1)}},Vd=async p=>{p.preventDefault(),$o(!0);try{await V("/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})}),Te("✅ SMTP-Einstellungen erfolgreich gespeichert!")}catch(F){h(F.message||"Speichern der SMTP-Einstellungen fehlgeschlagen.")}finally{$o(!1)}}, Line truncated
+4 -2
View File
@@ -12,7 +12,7 @@
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/gh/arooshbd2024/aCAPTCHA@main/api/captcha-v1.1.js" defer></script> <script src="https://cdn.jsdelivr.net/gh/arooshbd2024/aCAPTCHA@main/api/captcha-v1.1.js" defer></script>
<title>Schichtplaner — Veranstaltungsschichtpläne</title> <title>Schichtplaner — Veranstaltungsschichtpläne</title>
<script type="module" crossorigin src="/assets/index-DKRQSjit.js"></script> <script type="module" crossorigin src="/assets/index-DXooeo1R.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-jfrwfPo3.css"> <link rel="stylesheet" crossorigin href="/assets/index-jfrwfPo3.css">
</head> </head>
<body class="bg-paper text-main font-sans antialiased min-h-screen"> <body class="bg-paper text-main font-sans antialiased min-h-screen">
@@ -20,7 +20,9 @@
<script> <script>
if ('serviceWorker' in navigator) { if ('serviceWorker' in navigator) {
window.addEventListener('load', () => { window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js').catch(err => console.log('SW reg error:', err)); navigator.serviceWorker.register('/sw.js').then(reg => {
reg.update();
}).catch(err => console.log('SW reg error:', err));
}); });
} }
</script> </script>
+19 -22
View File
@@ -1,16 +1,6 @@
const CACHE_NAME = 'schichtplaner-v1'; const CACHE_NAME = 'schichtplaner-v2';
const ASSETS_TO_CACHE = [
'/',
'/index.html',
'/manifest.json'
];
self.addEventListener('install', (event) => { self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CACHE_NAME).then((cache) => {
return cache.addAll(ASSETS_TO_CACHE);
})
);
self.skipWaiting(); self.skipWaiting();
}); });
@@ -18,28 +8,35 @@ self.addEventListener('activate', (event) => {
event.waitUntil( event.waitUntil(
caches.keys().then((keys) => { caches.keys().then((keys) => {
return Promise.all( return Promise.all(
keys.map((key) => { keys.map((key) => caches.delete(key))
if (key !== CACHE_NAME) {
return caches.delete(key);
}
})
); );
}) }).then(() => self.clients.claim())
); );
self.clients.claim();
}); });
// Network-First Strategy for fresh deployments
self.addEventListener('fetch', (event) => { self.addEventListener('fetch', (event) => {
if (event.request.method !== 'GET' || event.request.url.includes('/api/')) { if (event.request.method !== 'GET' || event.request.url.includes('/api/')) {
return; return;
} }
event.respondWith( event.respondWith(
caches.match(event.request).then((cachedResponse) => { fetch(event.request)
if (cachedResponse) { .then((networkResponse) => {
return cachedResponse; if (networkResponse && networkResponse.status === 200 && networkResponse.type === 'basic') {
const responseToCache = networkResponse.clone();
caches.open(CACHE_NAME).then((cache) => {
cache.put(event.request, responseToCache);
});
} }
return fetch(event.request).catch(() => { return networkResponse;
})
.catch(() => {
return caches.match(event.request).then((cachedResponse) => {
if (cachedResponse) return cachedResponse;
if (event.request.mode === 'navigate') {
return caches.match('/index.html'); return caches.match('/index.html');
}
}); });
}) })
); );
+3 -1
View File
@@ -19,7 +19,9 @@
<script> <script>
if ('serviceWorker' in navigator) { if ('serviceWorker' in navigator) {
window.addEventListener('load', () => { window.addEventListener('load', () => {
navigator.serviceWorker.register('/sw.js').catch(err => console.log('SW reg error:', err)); navigator.serviceWorker.register('/sw.js').then(reg => {
reg.update();
}).catch(err => console.log('SW reg error:', err));
}); });
} }
</script> </script>
+18
View File
@@ -9,8 +9,22 @@ server {
gzip on; gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
# Prevent caching of index.html and sw.js so redeploys fetch new assets immediately
location ~* (index\.html|sw\.js|manifest\.json)$ {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires "0";
}
# Cache immutable static assets with hash (js, css, images) for performance
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff2)$ {
expires 1y;
add_header Cache-Control "public, max-age=31536000, immutable";
}
location / { location / {
try_files $uri $uri/ /index.html; try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache, no-store, must-revalidate";
} }
location /api/ { location /api/ {
@@ -31,5 +45,9 @@ server {
location /static/ { location /static/ {
proxy_pass http://backend:8000/static/; proxy_pass http://backend:8000/static/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
} }
} }
+19 -22
View File
@@ -1,16 +1,6 @@
const CACHE_NAME = 'schichtplaner-v1'; const CACHE_NAME = 'schichtplaner-v2';
const ASSETS_TO_CACHE = [
'/',
'/index.html',
'/manifest.json'
];
self.addEventListener('install', (event) => { self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CACHE_NAME).then((cache) => {
return cache.addAll(ASSETS_TO_CACHE);
})
);
self.skipWaiting(); self.skipWaiting();
}); });
@@ -18,28 +8,35 @@ self.addEventListener('activate', (event) => {
event.waitUntil( event.waitUntil(
caches.keys().then((keys) => { caches.keys().then((keys) => {
return Promise.all( return Promise.all(
keys.map((key) => { keys.map((key) => caches.delete(key))
if (key !== CACHE_NAME) {
return caches.delete(key);
}
})
); );
}) }).then(() => self.clients.claim())
); );
self.clients.claim();
}); });
// Network-First Strategy for fresh deployments
self.addEventListener('fetch', (event) => { self.addEventListener('fetch', (event) => {
if (event.request.method !== 'GET' || event.request.url.includes('/api/')) { if (event.request.method !== 'GET' || event.request.url.includes('/api/')) {
return; return;
} }
event.respondWith( event.respondWith(
caches.match(event.request).then((cachedResponse) => { fetch(event.request)
if (cachedResponse) { .then((networkResponse) => {
return cachedResponse; if (networkResponse && networkResponse.status === 200 && networkResponse.type === 'basic') {
const responseToCache = networkResponse.clone();
caches.open(CACHE_NAME).then((cache) => {
cache.put(event.request, responseToCache);
});
} }
return fetch(event.request).catch(() => { return networkResponse;
})
.catch(() => {
return caches.match(event.request).then((cachedResponse) => {
if (cachedResponse) return cachedResponse;
if (event.request.mode === 'navigate') {
return caches.match('/index.html'); return caches.match('/index.html');
}
}); });
}) })
); );
+3
View File
@@ -30,6 +30,9 @@ export const apiFetch = async (endpoint, options = {}) => {
} }
if (!response.ok) { if (!response.ok) {
if (response.status === 401) {
setAuthToken(null);
}
let errorMsg = 'Ein Fehler ist aufgetreten.'; let errorMsg = 'Ein Fehler ist aufgetreten.';
if (data) { if (data) {
if (typeof data.error === 'string') errorMsg = data.error; if (typeof data.error === 'string') errorMsg = data.error;