helix/build/index.js

68 lines
171 KiB
JavaScript
Raw Normal View History

function Wc(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const l in r)if(l!=="default"&&!(l in e)){const i=Object.getOwnPropertyDescriptor(r,l);i&&Object.defineProperty(e,l,i.get?i:{enumerable:!0,get:()=>r[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Vc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ys={exports:{}},dl={},ws={exports:{}},R={};/**
* @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 nr=Symbol.for("react.element"),Hc=Symbol.for("react.portal"),Qc=Symbol.for("react.fragment"),Kc=Symbol.for("react.strict_mode"),Yc=Symbol.for("react.profiler"),Xc=Symbol.for("react.provider"),Gc=Symbol.for("react.context"),Zc=Symbol.for("react.forward_ref"),Jc=Symbol.for("react.suspense"),qc=Symbol.for("react.memo"),bc=Symbol.for("react.lazy"),bo=Symbol.iterator;function ef(e){return e===null||typeof e!="object"?null:(e=bo&&e[bo]||e["@@iterator"],typeof e=="function"?e:null)}var xs={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ss=Object.assign,ks={};function fn(e,t,n){this.props=e,this.context=t,this.refs=ks,this.updater=n||xs}fn.prototype.isReactComponent={};fn.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")};fn.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Es(){}Es.prototype=fn.prototype;function no(e,t,n){this.props=e,this.context=t,this.refs=ks,this.updater=n||xs}var ro=no.prototype=new Es;ro.constructor=no;Ss(ro,fn.prototype);ro.isPureReactComponent=!0;var eu=Array.isArray,Cs=Object.prototype.hasOwnProperty,lo={current:null},_s={key:!0,ref:!0,__self:!0,__source:!0};function Ps(e,t,n){var r,l={},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)Cs.call(t,r)&&!_s.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];l.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)l[r]===void 0&&(l[r]=u[r]);return{$$typeof:nr,type:e,key:i,ref:o,props:l,_owner:lo.current}}function tf(e,t){return{$$typeof:nr,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function io(e){return typeof e=="object"&&e!==null&&e.$$typeof===nr}function nf(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var tu=/\/+/g;function Fl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?nf(""+e.key):t.toString(36)}function Nr(e,t,n,r,l){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 nr:case Hc:o=!0}}if(o)return o=e,l=l(o),e=r===""?"."+Fl(o,0):r,eu(l)?(n="",e!=null&&(n=e.replace(tu,"$&/")+"/"),Nr(l,t,n,"",function(c){return c})):l!=null&&(io(l)&&(l=tf(l,n+(!l.key||o&&o.key===l.key?"":(""+l.key).replace(tu,"$&/")+"/")+e)),t.push(l)),1;if(o=0,r=r===""?".":r+":",eu(e))for(var u=0;u<e.length;u++){i=e[u];var s=r+Fl(i,u);o+=Nr(i,t,n,s,l)}else if(s=ef(e),typeof s=="function")for(e=s.call(e),u=0;!(i=e.next()).done;)i=i.value,s=r+Fl(i,u++),o+=Nr(i,t,n,s,l);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 cr(e,t,n){if(e==null)return e;var r=[],l=0;return Nr(e,r,"","",function(i){return t.call(n,i,l++)}),r}function rf(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 se={current:null},jr={transition:null},lf={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:jr,ReactCurrentOwner:lo};function Ns(){throw Error("act(...) is not supported in production builds of React.")}R.Children={map:cr,forEach:function(e,t,n){cr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return cr(e,function(){t++}),t},toArray:function(e){return cr(e,function(t){return t})||[]},only:function(e){if(!io(e))throw Error("React.Children.only expected to receive a sing
* @license React
* react-jsx-runtime.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 sf=P,af=Symbol.for("react.element"),cf=Symbol.for("react.fragment"),ff=Object.prototype.hasOwnProperty,df=sf.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,pf={key:!0,ref:!0,__self:!0,__source:!0};function js(e,t,n){var r,l={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)ff.call(t,r)&&!pf.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:af,type:e,key:i,ref:o,props:l,_owner:df.current}}dl.Fragment=cf;dl.jsx=js;dl.jsxs=js;ys.exports=dl;var v=ys.exports,Ts={exports:{}},xe={},zs={exports:{}},Ls={};/**
* @license React
* scheduler.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.
*/(function(e){function t(_,z){var L=_.length;_.push(z);e:for(;0<L;){var Q=L-1>>>1,Z=_[Q];if(0<l(Z,z))_[Q]=z,_[L]=Z,L=Q;else break e}}function n(_){return _.length===0?null:_[0]}function r(_){if(_.length===0)return null;var z=_[0],L=_.pop();if(L!==z){_[0]=L;e:for(var Q=0,Z=_.length,sr=Z>>>1;Q<sr;){var xt=2*(Q+1)-1,Il=_[xt],St=xt+1,ar=_[St];if(0>l(Il,L))St<Z&&0>l(ar,Il)?(_[Q]=ar,_[St]=L,Q=St):(_[Q]=Il,_[xt]=L,Q=xt);else if(St<Z&&0>l(ar,L))_[Q]=ar,_[St]=L,Q=St;else break e}}return z}function l(_,z){var L=_.sortIndex-z.sortIndex;return L!==0?L:_.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,u=o.now();e.unstable_now=function(){return o.now()-u}}var s=[],c=[],m=1,p=null,h=3,y=!1,w=!1,x=!1,k=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,a=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(_){for(var z=n(c);z!==null;){if(z.callback===null)r(c);else if(z.startTime<=_)r(c),z.sortIndex=z.expirationTime,t(s,z);else break;z=n(c)}}function g(_){if(x=!1,d(_),!w)if(n(s)!==null)w=!0,Rl(E);else{var z=n(c);z!==null&&Ol(g,z.startTime-_)}}function E(_,z){w=!1,x&&(x=!1,f(T),T=-1),y=!0;var L=h;try{for(d(z),p=n(s);p!==null&&(!(p.expirationTime>z)||_&&!Te());){var Q=p.callback;if(typeof Q=="function"){p.callback=null,h=p.priorityLevel;var Z=Q(p.expirationTime<=z);z=e.unstable_now(),typeof Z=="function"?p.callback=Z:p===n(s)&&r(s),d(z)}else r(s);p=n(s)}if(p!==null)var sr=!0;else{var xt=n(c);xt!==null&&Ol(g,xt.startTime-z),sr=!1}return sr}finally{p=null,h=L,y=!1}}var N=!1,j=null,T=-1,H=5,O=-1;function Te(){return!(e.unstable_now()-O<H)}function mn(){if(j!==null){var _=e.unstable_now();O=_;var z=!0;try{z=j(!0,_)}finally{z?vn():(N=!1,j=null)}}else N=!1}var vn;if(typeof a=="function")vn=function(){a(mn)};else if(typeof MessageChannel<"u"){var qo=new MessageChannel,Bc=qo.port2;qo.port1.onmessage=mn,vn=function(){Bc.postMessage(null)}}else vn=function(){k(mn,0)};function Rl(_){j=_,N||(N=!0,vn())}function Ol(_,z){T=k(function(){_(e.unstable_now())},z)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(_){_.callback=null},e.unstable_continueExecution=function(){w||y||(w=!0,Rl(E))},e.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<_?Math.floor(1e3/_):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(s)},e.unstable_next=function(_){switch(h){case 1:case 2:case 3:var z=3;break;default:z=h}var L=h;h=z;try{return _()}finally{h=L}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(_,z){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var L=h;h=_;try{return z()}finally{h=L}},e.unstable_scheduleCallback=function(_,z,L){var Q=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?Q+L:Q):L=Q,_){case 1:var Z=-1;break;case 2:Z=250;break;case 5:Z=1073741823;break;case 4:Z=1e4;break;default:Z=5e3}return Z=L+Z,_={id:m++,callback:z,priorityLevel:_,startTime:L,expirationTime:Z,sortIndex:-1},L>Q?(_.sortIndex=L,t(c,_),n(s)===null&&_===n(c)&&(x?(f(T),T=-1):x=!0,Ol(g,L-Q))):(_.sortIndex=Z,t(s,_),w||y||(w=!0,Rl(E))),_},e.unstable_shouldYield=Te,e.unstable_wrapCallback=function(_){var z=h;return function(){var L=h;h=z;try{return _.apply(this,arguments)}finally{h=L}}}})(Ls);zs.exports=Ls;var hf=zs.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 mf=P,we=hf;function S(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 Rs=new Set,$n={};function It(e,t){rn(e,t),rn(e+"Capture",t)}function rn(e,t){for($n[e]=t,e=0;e<t.length;e++)Rs.add(t[e])}var Xe=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ui=Object.prototype.hasOwnProperty,vf=/^[: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]*$/,nu={},ru={};function gf(e){return ui.call(ru,e)?!0:ui.call(nu,e)?!1:vf.test(e)?ru[e]=!0:(nu[e]=!0,!1)}function yf(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 wf(e,t,n,r){if(t===null||typeof t>"u"||yf(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 ae(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var te={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){te[e]=new ae(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];te[t]=new ae(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){te[e]=new ae(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){te[e]=new ae(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){te[e]=new ae(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){te[e]=new ae(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){te[e]=new ae(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){te[e]=new ae(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){te[e]=new ae(e,5,!1,e.toLowerCase(),null,!1,!1)});var oo=/[\-:]([a-z])/g;function uo(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-
`+Ml+e}var Dl=!1;function Ul(e,t){if(!e||Dl)return"";Dl=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var l=c.stack.split(`
`),i=r.stack.split(`
`),o=l.length-1,u=i.length-1;1<=o&&0<=u&&l[o]!==i[u];)u--;for(;1<=o&&0<=u;o--,u--)if(l[o]!==i[u]){if(o!==1||u!==1)do if(o--,u--,0>u||l[o]!==i[u]){var s=`
`+l[o].replace(" at new "," at ");return e.displayName&&s.includes("<anonymous>")&&(s=s.replace("<anonymous>",e.displayName)),s}while(1<=o&&0<=u);break}}}finally{Dl=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?_n(e):""}function xf(e){switch(e.tag){case 5:return _n(e.type);case 16:return _n("Lazy");case 13:return _n("Suspense");case 19:return _n("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 fi(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 Ut:return"Fragment";case Dt:return"Portal";case si:return"Profiler";case ao:return"StrictMode";case ai:return"Suspense";case ci:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Is:return(e.displayName||"Context")+".Consumer";case Os:return(e._context.displayName||"Context")+".Provider";case co:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case fo:return t=e.displayName||null,t!==null?t:fi(e.type)||"Memo";case et:t=e._payload,e=e._init;try{return fi(e(t))}catch{}}return null}function Sf(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 fi(t);case 8:return t===ao?"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 mt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ms(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kf(e){var t=Ms(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 l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.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=kf(e))}function Ds(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ms(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ar(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 di(e,t){var n=t.checked;return W({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function iu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=mt(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 Us(e,t){t=t.checked,t!=null&&so(e,"checked",t,!1)}function pi(e,t){Us(e,t);var n=mt(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")?hi(e,t.type,n):t.hasOwnProperty("defaultValue")&&hi(e,t.type,mt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ou(e,t,n){if(t.hasOwnProperty("valu
`).replace(Rd,"")}function xr(e,t,n){if(t=Tu(t),Tu(e)!==t&&n)throw Error(S(425))}function Xr(){}var ji=null,Ti=null;function zi(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 Li=typeof setTimeout=="function"?setTimeout:void 0,Od=typeof clearTimeout=="function"?clearTimeout:void 0,zu=typeof Promise=="function"?Promise:void 0,Id=typeof queueMicrotask=="function"?queueMicrotask:typeof zu<"u"?function(e){return zu.resolve(null).then(e).catch(Fd)}:Li;function Fd(e){setTimeout(function(){throw e})}function Jl(e,t){var n=t,r=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(r===0){e.removeChild(l),Hn(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=l}while(n);Hn(t)}function ct(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 Lu(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 pn=Math.random().toString(36).slice(2),$e="__reactFiber$"+pn,Gn="__reactProps$"+pn,Ge="__reactContainer$"+pn,Ri="__reactEvents$"+pn,Md="__reactListeners$"+pn,Dd="__reactHandles$"+pn;function Ct(e){var t=e[$e];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ge]||n[$e]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Lu(e);e!==null;){if(n=e[$e])return n;e=Lu(e)}return t}e=n,n=e.parentNode}return null}function ir(e){return e=e[$e]||e[Ge],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Wt(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(S(33))}function gl(e){return e[Gn]||null}var Oi=[],Vt=-1;function yt(e){return{current:e}}function U(e){0>Vt||(e.current=Oi[Vt],Oi[Vt]=null,Vt--)}function M(e,t){Vt++,Oi[Vt]=e.current,e.current=t}var vt={},ie=yt(vt),de=yt(!1),Tt=vt;function ln(e,t){var n=e.type.contextTypes;if(!n)return vt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function pe(e){return e=e.childContextTypes,e!=null}function Gr(){U(de),U(ie)}function Ru(e,t,n){if(ie.current!==vt)throw Error(S(168));M(ie,t),M(de,n)}function Pa(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(S(108,Sf(e)||"Unknown",l));return W({},n,r)}function Zr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||vt,Tt=ie.current,M(ie,e),M(de,de.current),!0}function Ou(e,t,n){var r=e.stateNode;if(!r)throw Error(S(169));n?(e=Pa(e,t,Tt),r.__reactInternalMemoizedMergedChildContext=e,U(de),U(ie),M(ie,e)):U(de),M(de,n)}var He=null,yl=!1,ql=!1;function Na(e){He===null?He=[e]:He.push(e)}function Ud(e){yl=!0,Na(e)}function wt(){if(!ql&&He!==null){ql=!0;var e=0,t=F;try{var n=He;for(F=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}He=null,yl=!1}catch(l){throw He!==null&&(He=He.slice(e+1)),qs(ho,wt),l}finally{F=t,ql=!1}}return null}var Ht=[],Qt=0,Jr=null,qr=0,Ee=[],Ce=0,zt=null,Qe=1,Ke="";function kt(e,t){Ht[Qt++]=qr,Ht[Qt++]=Jr,Jr=e,qr=t}function ja(e,t,n){Ee[Ce++]=Qe,Ee[Ce++]=Ke,Ee[Ce++]=zt,zt=e;var r=Qe;e=Ke;var l=32-Ie(r)-1;r&=~(1<<l),n+=1;var i=32-Ie(t)+l;if(30<i){var o=l-l%5;i=(r&(1<<o)-1).toString(32),r>>=o,l-=o,Qe=1<<32-Ie(t)+l|n<<l|r,Ke=i+e}else Qe=1<<i|n<<l|r,Ke=e}function Eo(e){e.return!==null&&(kt(e,1),ja(e,1,0))}function Co(e){for(;e===Jr;)Jr=Ht[--Qt],Ht[Qt]=null,qr=Ht[--Qt],Ht[Qt]=null;for(;e===zt;)zt=Ee[--Ce],Ee[Ce]=null,Ke=Ee[--Ce],Ee[Ce]=null,Qe=Ee[--Ce],Ee[Ce]=null}var ye=null,ge=null,$=!1,Oe=null;function Ta(e,t){var n=_e(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.del
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:l,digest:null}}function ri(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $i(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Yd=typeof WeakMap=="function"?WeakMap:Map;function nc(e,t,n){n=Ye(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ol||(ol=!0,Gi=r),$i(e,t)},n}function rc(e,t,n){n=Ye(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){$i(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){$i(e,t),typeof r!="function"&&(dt===null?dt=new Set([this]):dt.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Vu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Yd;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=up.bind(null,e,t,n),t.then(e,e))}function Hu(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 Qu(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,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=Ye(-1,1),t.tag=2,ft(n,t,1))),n.lanes|=1),e)}var Xd=qe.ReactCurrentOwner,fe=!1;function oe(e,t,n,r){t.child=e===null?Ra(t,null,n,r):un(t,e.child,n,r)}function Ku(e,t,n,r,l){n=n.render;var i=t.ref;return bt(t,l),r=Fo(e,t,n,r,i,l),n=Mo(),e!==null&&!fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Je(e,t,l)):($&&n&&Eo(t),t.flags|=1,oe(e,t,r,l),t.child)}function Yu(e,t,n,r,l){if(e===null){var i=n.type;return typeof i=="function"&&!Ko(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,lc(e,t,i,r,l)):(e=Ur(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&l)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Kn,n(o,r)&&e.ref===t.ref)return Je(e,t,l)}return t.flags|=1,e=ht(i,r),e.ref=t.ref,e.return=t,t.child=e}function lc(e,t,n,r,l){if(e!==null){var i=e.memoizedProps;if(Kn(i,r)&&e.ref===t.ref)if(fe=!1,t.pendingProps=r=i,(e.lanes&l)!==0)e.flags&131072&&(fe=!0);else return t.lanes=e.lanes,Je(e,t,l)}return Ai(e,t,n,r,l)}function ic(e,t,n){var r=t.pendingProps,l=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},M(Xt,ve),ve|=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,M(Xt,ve),ve|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,M(Xt,ve),ve|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,M(Xt,ve),ve|=r;return oe(e,t,l,n),t.child}function oc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ai(e,t,n,r,l){var i=pe(n)?Tt:ie.current;return i=ln(t,i),bt(t,l),n=Fo(e,t,n,r,i,l),r=Mo(),e!==null&&!fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Je(e,t,l)):($&&r&&Eo(t),t.flags|=1,oe(e,t,n,l),t.child)}function Xu(e,t,n,r,l){if(pe(n)){var i=!0;Zr(t)}else i=!1;if(bt(t,l),t.stateNode===null)Fr(e,t),tc(t,n,r),Ui(t,n,r,l),r=!0;else if(e===null){var o=t.stateNode,u=t.memoizedProps;o.props=u;var s=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=Ne(c):(c=pe(n)?Tt:ie.current,c=ln(t,c));var m=n.getDerivedStateFromProps,p=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function";p||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==r||s!==c)&&Wu(t,o,r,c),tt=!1;var h=t.memoizedState;o.state=h,tl(t,r,o,l),s=t.memoizedState,u!==r||h!==s||de.current||tt?(typeof m=="function"&&(Di(t,n,m,r),s=t.memoizedState),(u=tt||Bu(t,n,u,r,h,s,c))?(p||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.compon
* @remix-run/router v1.23.0
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function cl(){return cl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cl.apply(this,arguments)}var ot;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ot||(ot={}));const ss="popstate";function wp(e){e===void 0&&(e={});function t(r,l){let{pathname:i,search:o,hash:u}=r.location;return bi("",{pathname:i,search:o,hash:u},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function n(r,l){return typeof l=="string"?l:Lc(l)}return Sp(t,n,null,e)}function me(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function zc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xp(){return Math.random().toString(36).substr(2,8)}function as(e,t){return{usr:e.state,key:e.key,idx:t}}function bi(e,t,n,r){return n===void 0&&(n=null),cl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?jl(t):t,{state:n,key:t&&t.key||r||xp()})}function Lc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function jl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Sp(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:i=!1}=r,o=l.history,u=ot.Pop,s=null,c=m();c==null&&(c=0,o.replaceState(cl({},o.state,{idx:c}),""));function m(){return(o.state||{idx:null}).idx}function p(){u=ot.Pop;let k=m(),f=k==null?null:k-c;c=k,s&&s({action:u,location:x.location,delta:f})}function h(k,f){u=ot.Push;let a=bi(x.location,k,f);c=m()+1;let d=as(a,c),g=x.createHref(a);try{o.pushState(d,"",g)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;l.location.assign(g)}i&&s&&s({action:u,location:x.location,delta:1})}function y(k,f){u=ot.Replace;let a=bi(x.location,k,f);c=m();let d=as(a,c),g=x.createHref(a);o.replaceState(d,"",g),i&&s&&s({action:u,location:x.location,delta:0})}function w(k){let f=l.location.origin!=="null"?l.location.origin:l.location.href,a=typeof k=="string"?k:Lc(k);return a=a.replace(/ $/,"%20"),me(f,"No window.location.(origin|href) available to create URL for href: "+a),new URL(a,f)}let x={get action(){return u},get location(){return e(l,o)},listen(k){if(s)throw new Error("A history only accepts one active listener");return l.addEventListener(ss,p),s=k,()=>{l.removeEventListener(ss,p),s=null}},createHref(k){return t(l,k)},createURL:w,encodeLocation(k){let f=w(k);return{pathname:f.pathname,search:f.search,hash:f.hash}},push:h,replace:y,go(k){return o.go(k)}};return x}var cs;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(cs||(cs={}));function kp(e,t,n){return n===void 0&&(n="/"),Ep(e,t,n)}function Ep(e,t,n,r){let l=typeof t=="string"?jl(t):t,i=Ic(l.pathname||"/",n);if(i==null)return null;let o=Rc(e);Cp(o);let u=null;for(let s=0;u==null&&s<o.length;++s){let c=Mp(i);u=Op(o[s],c)}return u}function Rc(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let l=(i,o,u)=>{let s={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};s.relativePath.startsWith("/")&&(me(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let c=tn([r,s.relativePath]),m=n.concat(s);i.children&&i.children.length>0&&(me(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Rc(i.children,t,m,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:Lp(c,i.index),routesMeta:m})};return e.forEach((i,o)=>{var u;if(i.path===""||!((u=i.path)!=null&&u.includes("?")))l(i,o);else for(let s of Oc(i.path))l(i,o,s)}),t}function Oc(e){let t=e.split("/");if(t.length=
* React Router v6.30.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/function fl(){return fl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},fl.apply(this,arguments)}const Ap=P.createContext(null),Bp=P.createContext(null),Mc=P.createContext(null),Tl=P.createContext(null),zl=P.createContext({outlet:null,matches:[],isDataRoute:!1}),Dc=P.createContext(null);function Jo(){return P.useContext(Tl)!=null}function Wp(){return Jo()||me(!1),P.useContext(Tl).location}function Vp(e,t){return Hp(e,t)}function Hp(e,t,n,r){Jo()||me(!1);let{navigator:l}=P.useContext(Mc),{matches:i}=P.useContext(zl),o=i[i.length-1],u=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let c=Wp(),m;if(t){var p;let k=typeof t=="string"?jl(t):t;s==="/"||(p=k.pathname)!=null&&p.startsWith(s)||me(!1),m=k}else m=c;let h=m.pathname||"/",y=h;if(s!=="/"){let k=s.replace(/^\//,"").split("/");y="/"+h.replace(/^\//,"").split("/").slice(k.length).join("/")}let w=kp(e,{pathname:y}),x=Gp(w&&w.map(k=>Object.assign({},k,{params:Object.assign({},u,k.params),pathname:tn([s,l.encodeLocation?l.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?s:tn([s,l.encodeLocation?l.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),i,n,r);return t&&x?P.createElement(Tl.Provider,{value:{location:fl({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:ot.Pop}},x):x}function Qp(){let e=bp(),t=Up(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return P.createElement(P.Fragment,null,P.createElement("h2",null,"Unexpected Application Error!"),P.createElement("h3",{style:{fontStyle:"italic"}},t),n?P.createElement("pre",{style:l},n):null,null)}const Kp=P.createElement(Qp,null);class Yp extends P.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?P.createElement(zl.Provider,{value:this.props.routeContext},P.createElement(Dc.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Xp(e){let{routeContext:t,match:n,children:r}=e,l=P.useContext(Ap);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),P.createElement(zl.Provider,{value:t},r)}function Gp(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,u=(l=n)==null?void 0:l.errors;if(u!=null){let m=o.findIndex(p=>p.route.id&&(u==null?void 0:u[p.route.id])!==void 0);m>=0||me(!1),o=o.slice(0,Math.min(o.length,m+1))}let s=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let m=0;m<o.length;m++){let p=o[m];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(c=m),p.route.id){let{loaderData:h,errors:y}=n,w=p.route.loader&&h[p.route.id]===void 0&&(!y||y[p.route.id]===void 0);if(p.route.lazy||w){s=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((m,p,h)=>{let y,w=!1,x=null,k=null;n&&(y=u&&p.route.id?u[p.route.id]:void 0,x=p.route.errorElement||Kp,s&&(c<0&&h===0?(eh("route-fallback"),w=!0,k=null):c===h&&(w=!0,k=p.route.hydrateFallbackElement||null)));let f=t.concat(o.slice(0,h+1)),a=()=>{let d;return y?d=x:w?d=k:p.route.Component?d=P.createElement(p.route.Component,null):p.route.element?d=p.route.element:d=m,P.crea
* React Router DOM v6.30.1
*
* Copyright (c) Remix Software Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* @license MIT
*/const lh="6";try{window.__reactRouterVersion=lh}catch{}const ih="startTransition",ps=uf[ih];function oh(e){let{basename:t,children:n,future:r,window:l}=e,i=P.useRef();i.current==null&&(i.current=wp({window:l,v5Compat:!0}));let o=i.current,[u,s]=P.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},m=P.useCallback(p=>{c&&ps?ps(()=>s(p)):s(p)},[s,c]);return P.useLayoutEffect(()=>o.listen(m),[o,m]),P.useEffect(()=>th(r),[r]),P.createElement(nh,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o,future:r})}var hs;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(hs||(hs={}));var ms;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ms||(ms={}));function to(){return v.jsx("div",{children:"Welcome to the Helix Admin Dashboard"})}const uh=()=>{var e;return((e=window.helixData)==null?void 0:e.restUrl)||"/wp-json/helix/v1/"},sh=()=>{var e;return((e=window.helixData)==null?void 0:e.nonce)||""},$c=async(e,t={})=>{const n=`${uh()}${e}`,r={headers:{"Content-Type":"application/json","X-WP-Nonce":sh()},credentials:"include"},l={...r,...t,headers:{...r.headers,...t.headers}};try{const i=await fetch(n,l);if(!i.ok){const o=await i.json().catch(()=>({}));throw new Error(o.message||`HTTP ${i.status}: ${i.statusText}`)}return await i.json()}catch(i){throw i}},ah=async()=>$c("settings"),ch=async e=>$c("settings",{method:"POST",body:JSON.stringify(e)}),fh=()=>{const[e,t]=P.useState({}),[n,r]=P.useState({}),[l,i]=P.useState(!0),[o,u]=P.useState(!1),[s,c]=P.useState(null),[m,p]=P.useState(!1),h=P.useCallback(async()=>{try{i(!0),c(null);const f=await ah(),a={};Object.keys(f).forEach(d=>{Object.keys(f[d]).forEach(g=>{a[g]=f[d][g].value})}),t(a),r(a),p(!1)}catch(f){c(f.message)}finally{i(!1)}},[]),y=P.useCallback((f,a)=>{t(d=>{const g={...d,[f]:a},E=Object.keys(g).some(N=>g[N]!==n[N]);return p(E),g})},[n]),w=P.useCallback(async()=>{try{u(!0),c(null);const f={};if(Object.keys(e).forEach(d=>{e[d]!==n[d]&&(f[d]=e[d])}),Object.keys(f).length===0)return{success:!0,message:"No changes to save"};const a=await ch(f);return r(e),p(!1),{success:!0,message:"Settings saved successfully",updated:a.updated,errors:a.errors}}catch(f){return c(f.message),{success:!1,message:f.message}}finally{u(!1)}},[e,n]),x=P.useCallback(()=>{t(n),p(!1),c(null)},[n]),k=P.useCallback(f=>{y(f,n[f])},[n,y]);return P.useEffect(()=>{h()},[h]),P.useEffect(()=>{const f=a=>{if(m)return a.preventDefault(),a.returnValue="You have unsaved changes. Are you sure you want to leave?",a.returnValue};return window.addEventListener("beforeunload",f),()=>window.removeEventListener("beforeunload",f)},[m]),{settings:e,loading:l,saving:o,error:s,hasUnsavedChanges:m,updateSetting:y,saveSettings:w,resetSettings:x,resetSetting:k,loadSettings:h}},dh=({activeTab:e,onTabChange:t,hasUnsavedChanges:n})=>{const r=[{id:"site",label:"Site Information",icon:"🏠"},{id:"content",label:"Content & Reading",icon:"📖"},{id:"writing",label:"Writing & Publishing",icon:""},{id:"media",label:"Media & Assets",icon:"🖼"},{id:"users",label:"Users & Membership",icon:"👥"},{id:"helix",label:"Helix Settings",icon:""}];return v.jsx("div",{className:"helix-settings-tabs",children:v.jsx("nav",{className:"helix-tabs-nav",role:"tablist",children:r.map(l=>v.jsxs("button",{type:"button",role:"tab","aria-selected":e===l.id,"aria-controls":`${l.id}-panel`,className:`helix-tab ${e===l.id?"active":""}`,onClick:()=>t(l.id),children:[v.jsx("span",{className:"helix-tab-icon",children:l.icon}),v.jsx("span",{className:"helix-tab-label",children:l.label}),n&&v.jsx("span",{className:"helix-tab-indicator",title:"Unsaved changes",children:""})]},l.id))})})},ph=({onSave:e,onReset:t,saving:n=!1,hasUnsavedChanges:r=!1,disabled:l=!1})=>v.jsxs("div",{className:"helix-save-buttons",children:[v.jsx("button",{type:"button",onClick:e,disabled:l||n||!r,className:`helix