Spaces:
Running
Running
File size: 167,484 Bytes
cde41f8 6367981 3d6dd72 6367981 3d6dd72 6367981 3d6dd72 6367981 3d6dd72 6367981 3d6dd72 6367981 3d6dd72 6367981 3d6dd72 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | import{r as bo,s as Uo,g as qo,c as R,j as D,R as Wo}from"./umi-ccd6abee.js";import"./parser-8777147e.js";import{W as Vo,a as O,b as Qo,E as $o,A as be}from"./index-e24bcc33.js";const gl=Vo/4,Ho=40;var yl={exports:{}},Kt={},vl={exports:{}},F={};/**
* @license React
* scheduler-unstable_mock.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 Qn(e,t){var r=e.length;e.push(t);e:for(;0<r;){var n=r-1>>>1,s=e[n];if(0<ar(s,t))e[n]=t,e[r]=s,r=n;else break e}}function De(e){return e.length===0?null:e[0]}function wr(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var n=0,s=e.length,i=s>>>1;n<i;){var l=2*(n+1)-1,o=e[l],u=l+1,d=e[u];if(0>ar(o,r))u<s&&0>ar(d,o)?(e[n]=d,e[u]=r,n=u):(e[n]=o,e[l]=r,n=l);else if(u<s&&0>ar(d,r))e[n]=d,e[u]=r,n=u;else break e}}return t}function ar(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}var Ie=[],Ve=[],Jo=1,pe=null,G=3,xr=!1,ct=!1,qt=!1,ue=0,ee=null,Fe=null,Ze=-1,ge=null,Tt=-1,Lt=!1,ae=!1,Ar=!1,$n=!1,Si=!1;function Hn(e){for(var t=De(Ve);t!==null;){if(t.callback===null)wr(Ve);else if(t.startTime<=e)wr(Ve),t.sortIndex=t.expirationTime,Qn(Ie,t);else break;t=De(Ve)}}function Ti(e){if(qt=!1,Hn(e),!ct)if(De(Ie)!==null)ct=!0,ee=Di;else{var t=De(Ve);t!==null&&(e=t.startTime-e,Fe=Ti,Ze=ue+e)}}function Di(e,t){ct=!1,qt&&(qt=!1,Fe=null,Ze=-1),xr=!0;var r=G;try{for(Hn(t),pe=De(Ie);pe!==null&&(!(pe.expirationTime>t)||e&&!wl());){var n=pe.callback;if(typeof n=="function"){pe.callback=null,G=pe.priorityLevel;var s=n(pe.expirationTime<=t);t=ue,typeof s=="function"?pe.callback=s:pe===De(Ie)&&wr(Ie),Hn(t)}else wr(Ie);pe=De(Ie)}if(pe!==null)var i=!0;else{var l=De(Ve);if(l!==null){var o=l.startTime-t;Fe=Ti,Ze=ue+o}i=!1}return i}finally{pe=null,G=r,xr=!1}}function wl(){return Tt===0&&ge===null||Tt!==-1&&ge!==null&&ge.length>=Tt||$n&&Ar?Lt=!0:!1}function xl(){if(ae)throw Error("Already flushing work.");if(ee!==null){var e=ee;ae=!0;try{var t=!0;do t=e(!0,ue);while(t);return t||(ee=null),!0}finally{ae=!1}}else return!1}F.reset=function(){if(ae)throw Error("Cannot reset while already flushing work.");ue=0,Fe=ee=null,Ze=-1,ge=null,Tt=-1,Ar=ae=Lt=!1};F.unstable_IdlePriority=5;F.unstable_ImmediatePriority=1;F.unstable_LowPriority=4;F.unstable_NormalPriority=3;F.unstable_Profiling=null;F.unstable_UserBlockingPriority=2;F.unstable_advanceTime=function(e){console.log.name==="disabledLog"||Si||(ue+=e,Fe!==null&&Ze<=ue&&(Fe(ue),Ze=-1,Fe=null))};F.unstable_cancelCallback=function(e){e.callback=null};F.unstable_clearYields=function(){if(ge===null)return[];var e=ge;return ge=null,e};F.unstable_continueExecution=function(){ct||xr||(ct=!0,ee=Di)};F.unstable_flushAll=function(){if(ge!==null)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");if(xl(),ge!==null)throw Error("While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])")};F.unstable_flushAllWithoutAsserting=xl;F.unstable_flushExpired=function(){if(ae)throw Error("Already flushing work.");if(ee!==null){ae=!0;try{ee(!1,ue)||(ee=null)}finally{ae=!1}}};F.unstable_flushNumberOfYields=function(e){if(ae)throw Error("Already flushing work.");if(ee!==null){var t=ee;Tt=e,ae=!0;try{e=!0;do e=t(!0,ue);while(e&&!Lt);e||(ee=null)}finally{Tt=-1,ae=Lt=!1}}};F.unstable_flushUntilNextPaint=function(){if(ae)throw Error("Already flushing work.");if(ee!==null){var e=ee;$n=!0,Ar=!1,ae=!0;try{var t=!0;do t=e(!0,ue);while(t&&!Lt);t||(ee=null)}finally{ae=Lt=$n=!1}}};F.unstable_forceFrameRate=function(){};F.unstable_getCurrentPriorityLevel=function(){return G};F.unstable_getFirstCallbackNode=function(){return De(Ie)};F.unstable_next=function(e){switch(G){case 1:case 2:case 3:var t=3;break;default:t=G}var r=G;G=t;try{return e()}finally{G=r}};F.unstable_now=function(){return ue};F.unstable_pauseExecution=function(){};F.unstable_requestPaint=function(){Ar=!0};F.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=G;G=e;try{return t()}finally{G=r}};F.unstable_scheduleCallback=function(e,t,r){var n=ue;switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?n+r:n):r=n,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=r+s,e={id:Jo++,callback:t,priorityLevel:e,startTime:r,expirationTime:s,sortIndex:-1},r>n?(e.sortIndex=r,Qn(Ve,e),De(Ie)===null&&e===De(Ve)&&(qt?(Fe=null,Ze=-1):qt=!0,Fe=Ti,Ze=ue+(r-n))):(e.sortIndex=s,Qn(Ie,e),ct||xr||(ct=!0,ee=Di)),e};F.unstable_setDisableYieldValue=function(e){Si=e};F.unstable_shouldYield=wl;F.unstable_wrapCallback=function(e){var t=G;return function(){var r=G;G=t;try{return e.apply(this,arguments)}finally{G=r}}};F.unstable_yieldValue=function(e){console.log.name==="disabledLog"||Si||(ge===null?ge=[e]:ge.push(e))};vl.exports=F;var Ko=vl.exports;/**
* @license React
* react-test-renderer.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 Sl=bo,Tl=Ko,Be=Uo;function hs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Yo(e,t,r){return t&&hs(e.prototype,t),r&&hs(e,r),e}var lt=Object.assign,et=Sl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Gt=Symbol.for("react.element"),zt=Symbol.for("react.portal"),vt=Symbol.for("react.fragment"),Ei=Symbol.for("react.strict_mode"),Jn=Symbol.for("react.profiler"),Dl=Symbol.for("react.provider"),El=Symbol.for("react.context"),Ni=Symbol.for("react.forward_ref"),Kn=Symbol.for("react.suspense"),Yn=Symbol.for("react.suspense_list"),Li=Symbol.for("react.memo"),Ue=Symbol.for("react.lazy"),Nl=Symbol.for("react.offscreen"),ds=Symbol.iterator;function kt(e){return e===null||typeof e!="object"?null:(e=ds&&e[ds]||e["@@iterator"],typeof e=="function"?e:null)}function Sr(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 vt:return"Fragment";case zt:return"Portal";case Jn:return"Profiler";case Ei:return"StrictMode";case Kn:return"Suspense";case Yn:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case El:return(e.displayName||"Context")+".Consumer";case Dl:return(e._context.displayName||"Context")+".Provider";case Ni:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Li:return t=e.displayName||null,t!==null?t:Sr(e.type)||"Memo";case Ue:t=e._payload,e=e._init;try{return Sr(e(t))}catch{}}return null}function Zo(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 Sr(t);case 8:return t===Ei?"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 br(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function fs(e){if(br(e)!==e)throw Error("Unable to find node on an unmounted component.")}function Ll(e){var t=e.alternate;if(!t){if(t=br(e),t===null)throw Error("Unable to find node on an unmounted component.");return t!==e?null:e}for(var r=e,n=t;;){var s=r.return;if(s===null)break;var i=s.alternate;if(i===null){if(n=s.return,n!==null){r=n;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===r)return fs(s),e;if(i===n)return fs(s),t;i=i.sibling}throw Error("Unable to find node on an unmounted component.")}if(r.return!==n.return)r=s,n=i;else{for(var l=!1,o=s.child;o;){if(o===r){l=!0,r=s,n=i;break}if(o===n){l=!0,n=s,r=i;break}o=o.sibling}if(!l){for(o=i.child;o;){if(o===r){l=!0,r=i,n=s;break}if(o===n){l=!0,n=i,r=s;break}o=o.sibling}if(!l)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(r.alternate!==n)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(r.tag!==3)throw Error("Unable to find node on an unmounted component.");return r.stateNode.current===r?e:t}function Ml(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Ml(e);if(t!==null)return t;e=e.sibling}return null}var Bt=Array.isArray,Mi=Be.unstable_scheduleCallback,ps=Be.unstable_cancelCallback,Go=Be.unstable_shouldYield,eu=Be.unstable_requestPaint,V=Be.unstable_now,Zn=Be.unstable_ImmediatePriority,tu=Be.unstable_UserBlockingPriority,Gn=Be.unstable_NormalPriority,ru=Be.unstable_IdlePriority,Ur=null,Pe=null;function nu(e){if(Pe&&typeof Pe.onCommitFiberRoot=="function")try{Pe.onCommitFiberRoot(Ur,e,void 0,(e.current.flags&128)===128)}catch{}}var pt=Math.clz32?Math.clz32:lu,iu=Math.log,su=Math.LN2;function lu(e){return e>>>=0,e===0?32:31-(iu(e)/su|0)|0}var er=64,tr=4194304;function rr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Tr(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,s=e.suspendedLanes,i=e.pingedLanes,l=r&268435455;if(l!==0){var o=l&~s;o!==0?n=rr(o):(i&=l,i!==0&&(n=rr(i)))}else l=r&~s,l!==0?n=rr(l):i!==0&&(n=rr(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&s)&&(s=n&-n,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0<t;)r=31-pt(t),s=1<<r,n|=e[r],t&=~s;return n}function ou(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ei(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ol(){var e=er;return er<<=1,!(er&4194240)&&(er=64),e}function Yr(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function qr(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pt(t),e[t]=r}function uu(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0<r;){var s=31-pt(r),i=1<<s;t[s]=0,n[s]=-1,e[s]=-1,r&=~i}}function Il(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var n=31-pt(r),s=1<<n;s&t|e[n]&t&&(e[n]|=t),r&=~s}}var $=0;function Cl(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}function Qe(){throw Error("The current renderer does not support hydration. This error is likely caused by a bug in React. Please file an issue.")}var ti={},au={},cu=new WeakMap;function Dr(e){switch(e.tag){case"INSTANCE":var t=e.rootContainerInstance.createNodeMock;return t=t({type:e.type,props:e.props}),typeof t=="object"&&t!==null&&cu.set(t,e),t;default:return e}}function Pl(e,t){var r=e.children.indexOf(t);r!==-1&&e.children.splice(r,1),e.children.push(t)}function kl(e,t,r){var n=e.children.indexOf(t);n!==-1&&e.children.splice(n,1),r=e.children.indexOf(r),e.children.splice(r,0,t)}var ms=setTimeout,hu=clearTimeout,Zr;function _t(e){if(Zr===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Zr=t&&t[1]||""}return`
`+Zr+e}var Gr=!1;function en(e,t){if(!e||Gr)return"";Gr=!0;var r=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(d){var n=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){n=d}e.call(t.prototype)}else{try{throw Error()}catch(d){n=d}e()}}catch(d){if(d&&n&&typeof d.stack=="string"){for(var s=d.stack.split(`
`),i=n.stack.split(`
`),l=s.length-1,o=i.length-1;1<=l&&0<=o&&s[l]!==i[o];)o--;for(;1<=l&&0<=o;l--,o--)if(s[l]!==i[o]){if(l!==1||o!==1)do if(l--,o--,0>o||s[l]!==i[o]){var u=`
`+s[l].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=l&&0<=o);break}}}finally{Gr=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?_t(e):""}var du=Object.prototype.hasOwnProperty,ri=[],wt=-1;function tt(e){return{current:e}}function _(e){0>wt||(e.current=ri[wt],ri[wt]=null,wt--)}function z(e,t){wt++,ri[wt]=e.current,e.current=t}var Ge={},te=tt(Ge),ce=tt(!1),ht=Ge;function Mt(e,t){var r=e.type.contextTypes;if(!r)return Ge;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in r)s[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function he(e){return e=e.childContextTypes,e!=null}function Er(){_(ce),_(te)}function gs(e,t,r){if(te.current!==Ge)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");z(te,t),z(ce,r)}function jl(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var s in n)if(!(s in t))throw Error((Zo(e)||"Unknown")+'.getChildContext(): key "'+s+'" is not defined in childContextTypes.');return lt({},r,n)}function Nr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ge,ht=te.current,z(te,e),z(ce,ce.current),!0}function ys(e,t,r){var n=e.stateNode;if(!n)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");r?(e=jl(e,t,ht),n.__reactInternalMemoizedMergedChildContext=e,_(ce),_(te),z(te,e)):_(ce),z(ce,r)}function fu(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ne=typeof Object.is=="function"?Object.is:fu,me=null,Wr=!1,tn=!1;function mt(){if(!tn&&me!==null){tn=!0;var e=0,t=$;try{var r=me;for($=1;e<r.length;e++){var n=r[e];do n=n(!0);while(n!==null)}me=null,Wr=!1}catch(s){throw me!==null&&(me=me.slice(e+1)),Mi(Zn,mt),s}finally{$=t,tn=!1}}return null}var rn=[],nr=0,vs=null,ir=[],yt=0,ws=null;function Oi(e){for(;e===vs;)vs=rn[--nr],rn[nr]=null,--nr,rn[nr]=null;for(;e===ws;)ws=ir[--yt],ir[yt]=null,--yt,ir[yt]=null,--yt,ir[yt]=null}var Xe=null,pu=et.ReactCurrentBatchConfig;function Lr(e,t){if(Ne(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(n=0;n<r.length;n++){var s=r[n];if(!du.call(t,s)||!Ne(e[s],t[s]))return!1}return!0}function mu(e){switch(e.tag){case 5:return _t(e.type);case 16:return _t("Lazy");case 13:return _t("Suspense");case 19:return _t("SuspenseList");case 0:case 2:case 15:return e=en(e.type,!1),e;case 11:return e=en(e.type.render,!1),e;case 1:return e=en(e.type,!0),e;default:return""}}function jt(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");var n=r.stateNode}if(!n)throw Error("Missing owner for string ref "+e+". This error is likely caused by a bug in React. Please file an issue.");var s=n,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(l){var o=s.refs;l===null?delete o[i]:o[i]=l},t._stringRef=i,t)}if(typeof e!="string")throw Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!r._owner)throw Error("Element ref was specified as a string ("+e+`) but no owner was set. This could happen for one of the following reasons:
1. You may be adding a ref to a function component
2. You may be adding a ref to a component that was not created inside a component's render method
3. You have multiple copies of React loaded
See https://reactjs.org/link/refs-must-have-owner for more information.`)}return e}function sr(e,t){throw e=Object.prototype.toString.call(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}function xs(e){var t=e._init;return t(e._payload)}function Rl(e){function t(x,f){if(e){var w=x.deletions;w===null?(x.deletions=[f],x.flags|=16):w.push(f)}}function r(x,f){if(!e)return null;for(;f!==null;)t(x,f),f=f.sibling;return null}function n(x,f){for(x=new Map;f!==null;)f.key!==null?x.set(f.key,f):x.set(f.index,f),f=f.sibling;return x}function s(x,f){return x=Ye(x,f),x.index=0,x.sibling=null,x}function i(x,f,w){return x.index=w,e?(w=x.alternate,w!==null?(w=w.index,w<f?(x.flags|=2,f):w):(x.flags|=2,f)):(x.flags|=1048576,f)}function l(x){return e&&x.alternate===null&&(x.flags|=2),x}function o(x,f,w,a){return f===null||f.tag!==6?(f=cn(w,x.mode,a),f.return=x,f):(f=s(f,w),f.return=x,f)}function u(x,f,w,a){var p=w.type;return p===vt?c(x,f,w.props.children,a,w.key):f!==null&&(f.elementType===p||typeof p=="object"&&p!==null&&p.$$typeof===Ue&&xs(p)===f.type)?(a=s(f,w.props),a.ref=jt(x,f,w),a.return=x,a):(a=gr(w.type,w.key,w.props,null,x.mode,a),a.ref=jt(x,f,w),a.return=x,a)}function d(x,f,w,a){return f===null||f.tag!==4||f.stateNode.containerInfo!==w.containerInfo||f.stateNode.implementation!==w.implementation?(f=hn(w,x.mode,a),f.return=x,f):(f=s(f,w.children||[]),f.return=x,f)}function c(x,f,w,a,p){return f===null||f.tag!==7?(f=at(w,x.mode,a,p),f.return=x,f):(f=s(f,w),f.return=x,f)}function g(x,f,w){if(typeof f=="string"&&f!==""||typeof f=="number")return f=cn(""+f,x.mode,w),f.return=x,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Gt:return w=gr(f.type,f.key,f.props,null,x.mode,w),w.ref=jt(x,null,f),w.return=x,w;case zt:return f=hn(f,x.mode,w),f.return=x,f;case Ue:var a=f._init;return g(x,a(f._payload),w)}if(Bt(f)||kt(f))return f=at(f,x.mode,w,null),f.return=x,f;sr(x,f)}return null}function v(x,f,w,a){var p=f!==null?f.key:null;if(typeof w=="string"&&w!==""||typeof w=="number")return p!==null?null:o(x,f,""+w,a);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Gt:return w.key===p?u(x,f,w,a):null;case zt:return w.key===p?d(x,f,w,a):null;case Ue:return p=w._init,v(x,f,p(w._payload),a)}if(Bt(w)||kt(w))return p!==null?null:c(x,f,w,a,null);sr(x,w)}return null}function E(x,f,w,a,p){if(typeof a=="string"&&a!==""||typeof a=="number")return x=x.get(w)||null,o(f,x,""+a,p);if(typeof a=="object"&&a!==null){switch(a.$$typeof){case Gt:return x=x.get(a.key===null?w:a.key)||null,u(f,x,a,p);case zt:return x=x.get(a.key===null?w:a.key)||null,d(f,x,a,p);case Ue:var m=a._init;return E(x,f,w,m(a._payload),p)}if(Bt(a)||kt(a))return x=x.get(w)||null,c(f,x,a,p,null);sr(f,a)}return null}function L(x,f,w,a){for(var p=null,m=null,S=f,h=f=0,y=null;S!==null&&h<w.length;h++){S.index>h?(y=S,S=null):y=S.sibling;var T=v(x,S,w[h],a);if(T===null){S===null&&(S=y);break}e&&S&&T.alternate===null&&t(x,S),f=i(T,f,h),m===null?p=T:m.sibling=T,m=T,S=y}if(h===w.length)return r(x,S),p;if(S===null){for(;h<w.length;h++)S=g(x,w[h],a),S!==null&&(f=i(S,f,h),m===null?p=S:m.sibling=S,m=S);return p}for(S=n(x,S);h<w.length;h++)y=E(S,x,h,w[h],a),y!==null&&(e&&y.alternate!==null&&S.delete(y.key===null?h:y.key),f=i(y,f,h),m===null?p=y:m.sibling=y,m=y);return e&&S.forEach(function(M){return t(x,M)}),p}function I(x,f,w,a){var p=kt(w);if(typeof p!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");if(w=p.call(w),w==null)throw Error("An iterable object provided no iterator.");for(var m=p=null,S=f,h=f=0,y=null,T=w.next();S!==null&&!T.done;h++,T=w.next()){S.index>h?(y=S,S=null):y=S.sibling;var M=v(x,S,T.value,a);if(M===null){S===null&&(S=y);break}e&&S&&M.alternate===null&&t(x,S),f=i(M,f,h),m===null?p=M:m.sibling=M,m=M,S=y}if(T.done)return r(x,S),p;if(S===null){for(;!T.done;h++,T=w.next())T=g(x,T.value,a),T!==null&&(f=i(T,f,h),m===null?p=T:m.sibling=T,m=T);return p}for(S=n(x,S);!T.done;h++,T=w.next())T=E(S,x,h,T.value,a),T!==null&&(e&&T.alternate!==null&&S.delete(T.key===null?h:T.key),f=i(T,f,h),m===null?p=T:m.sibling=T,m=T);return e&&S.forEach(function(C){return t(x,C)}),p}function j(x,f,w,a){if(typeof w=="object"&&w!==null&&w.type===vt&&w.key===null&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case Gt:e:{for(var p=w.key,m=f;m!==null;){if(m.key===p){if(p=w.type,p===vt){if(m.tag===7){r(x,m.sibling),f=s(m,w.props.children),f.return=x,x=f;break e}}else if(m.elementType===p||typeof p=="object"&&p!==null&&p.$$typeof===Ue&&xs(p)===m.type){r(x,m.sibling),f=s(m,w.props),f.ref=jt(x,m,w),f.return=x,x=f;break e}r(x,m);break}else t(x,m);m=m.sibling}w.type===vt?(f=at(w.props.children,x.mode,a,w.key),f.return=x,x=f):(a=gr(w.type,w.key,w.props,null,x.mode,a),a.ref=jt(x,f,w),a.return=x,x=a)}return l(x);case zt:e:{for(m=w.key;f!==null;){if(f.key===m)if(f.tag===4&&f.stateNode.containerInfo===w.containerInfo&&f.stateNode.implementation===w.implementation){r(x,f.sibling),f=s(f,w.children||[]),f.return=x,x=f;break e}else{r(x,f);break}else t(x,f);f=f.sibling}f=hn(w,x.mode,a),f.return=x,x=f}return l(x);case Ue:return m=w._init,j(x,f,m(w._payload),a)}if(Bt(w))return L(x,f,w,a);if(kt(w))return I(x,f,w,a);sr(x,w)}return typeof w=="string"&&w!==""||typeof w=="number"?(w=""+w,f!==null&&f.tag===6?(r(x,f.sibling),f=s(f,w),f.return=x,x=f):(r(x,f),f=cn(w,x.mode,a),f.return=x,x=f),l(x)):r(x,f)}return j}var Ot=Rl(!0),gu=Rl(!1),Mr=tt(null),Or=null,xt=null,Ii=null;function Ci(){Ii=xt=Or=null}function Pi(e){var t=Mr.current;_(Mr),e._currentValue2=t}function ni(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Dt(e,t){Or=e,Ii=xt=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(oe=!0),e.firstContext=null)}function we(e){var t=e._currentValue2;if(Ii!==e)if(e={context:e,memoizedValue:t,next:null},xt===null){if(Or===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");xt=e,Or.dependencies={lanes:0,firstContext:e}}else xt=xt.next=e;return t}var it=null;function ki(e){it===null?it=[e]:it.push(e)}function Xl(e,t,r,n){var s=t.interleaved;return s===null?(r.next=r,ki(t)):(r.next=s.next,s.next=r),t.interleaved=r,It(e,n)}function It(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var qe=!1;function ji(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fl(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function He(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ot(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,X&2){var s=n.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),n.pending=t,It(e,r)}return s=n.interleaved,s===null?(t.next=t,ki(n)):(t.next=s.next,s.next=t),n.interleaved=t,It(e,r)}function cr(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Il(e,r)}}function Ss(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var s=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var l={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?s=i=l:i=i.next=l,r=r.next}while(r!==null);i===null?s=i=t:i=i.next=t}else s=i=t;r={baseState:n.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ir(e,t,r,n){var s=e.updateQueue;qe=!1;var i=s.firstBaseUpdate,l=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var u=o,d=u.next;u.next=null,l===null?i=d:l.next=d,l=u;var c=e.alternate;c!==null&&(c=c.updateQueue,o=c.lastBaseUpdate,o!==l&&(o===null?c.firstBaseUpdate=d:o.next=d,c.lastBaseUpdate=u))}if(i!==null){var g=s.baseState;l=0,c=d=u=null,o=i;do{var v=o.lane,E=o.eventTime;if((n&v)===v){c!==null&&(c=c.next={eventTime:E,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var L=e,I=o;switch(v=t,E=r,I.tag){case 1:if(L=I.payload,typeof L=="function"){g=L.call(E,g,v);break e}g=L;break e;case 3:L.flags=L.flags&-65537|128;case 0:if(L=I.payload,v=typeof L=="function"?L.call(E,g,v):L,v==null)break e;g=lt({},g,v);break e;case 2:qe=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,v=s.effects,v===null?s.effects=[o]:v.push(o))}else E={eventTime:E,lane:v,tag:o.tag,payload:o.payload,callback:o.callback,next:null},c===null?(d=c=E,u=g):c=c.next=E,l|=v;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;v=o,o=v.next,v.next=null,s.lastBaseUpdate=v,s.shared.pending=null}}while(1);if(c===null&&(u=g),s.baseState=u,s.firstBaseUpdate=d,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do l|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);ft|=l,e.lanes=l,e.memoizedState=g}}function Ts(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var n=e[t],s=n.callback;if(s!==null){if(n.callback=null,typeof s!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+s);s.call(r)}}}var Yt={},ke=tt(Yt),Wt=tt(Yt),Vt=tt(Yt);function st(e){if(e===Yt)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return e}function Ri(e,t){z(Vt,t),z(Wt,e),z(ke,Yt),_(ke),z(ke,ti)}function Ct(){_(ke),_(Wt),_(Vt)}function zl(e){st(Vt.current),st(ke.current)!==ti&&(z(Wt,e),z(ke,ti))}function Xi(e){Wt.current===e&&(_(ke),_(Wt))}var A=tt(0);function Cr(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r.dehydrated===null||Qe()||Qe()))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var nn=[];function Fi(){for(var e=0;e<nn.length;e++)nn[e]._workInProgressVersionSecondary=null;nn.length=0}var hr=et.ReactCurrentDispatcher,sn=et.ReactCurrentBatchConfig,dt=0,b=null,W=null,H=null,Pr=!1,At=!1,yu=0;function Y(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function zi(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Ne(e[r],t[r]))return!1;return!0}function Bi(e,t,r,n,s,i){if(dt=i,b=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,hr.current=e===null||e.memoizedState===null?Su:Tu,e=r(n,s),At){i=0;do{if(At=!1,25<=i)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");i+=1,H=W=null,t.updateQueue=null,hr.current=Du,e=r(n,s)}while(At)}if(hr.current=kr,t=W!==null&&W.next!==null,dt=0,H=W=b=null,Pr=!1,t)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return e}function Oe(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return H===null?b.memoizedState=H=e:H=H.next=e,H}function xe(){if(W===null){var e=b.alternate;e=e!==null?e.memoizedState:null}else e=W.next;var t=H===null?b.memoizedState:H.next;if(t!==null)H=t,W=e;else{if(e===null)throw Error("Rendered more hooks than during the previous render.");W=e,e={memoizedState:W.memoizedState,baseState:W.baseState,baseQueue:W.baseQueue,queue:W.queue,next:null},H===null?b.memoizedState=H=e:H=H.next=e}return H}function Qt(e,t){return typeof t=="function"?t(e):t}function ln(e){var t=xe(),r=t.queue;if(r===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");r.lastRenderedReducer=e;var n=W,s=n.baseQueue,i=r.pending;if(i!==null){if(s!==null){var l=s.next;s.next=i.next,i.next=l}n.baseQueue=s=i,r.pending=null}if(s!==null){i=s.next,n=n.baseState;var o=l=null,u=null,d=i;do{var c=d.lane;if((dt&c)===c)u!==null&&(u=u.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),n=d.hasEagerState?d.eagerState:e(n,d.action);else{var g={lane:c,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};u===null?(o=u=g,l=n):u=u.next=g,b.lanes|=c,ft|=c}d=d.next}while(d!==null&&d!==i);u===null?l=n:u.next=o,Ne(n,t.memoizedState)||(oe=!0),t.memoizedState=n,t.baseState=l,t.baseQueue=u,r.lastRenderedState=n}if(e=r.interleaved,e!==null){s=e;do i=s.lane,b.lanes|=i,ft|=i,s=s.next;while(s!==e)}else s===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function on(e){var t=xe(),r=t.queue;if(r===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");r.lastRenderedReducer=e;var n=r.dispatch,s=r.pending,i=t.memoizedState;if(s!==null){r.pending=null;var l=s=s.next;do i=e(i,l.action),l=l.next;while(l!==s);Ne(i,t.memoizedState)||(oe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,n]}function Bl(){}function _l(e,t){var r=b,n=xe(),s=t(),i=!Ne(n.memoizedState,s);if(i&&(n.memoizedState=s,oe=!0),n=n.queue,_i(Ul.bind(null,r,n,e),[e]),n.getSnapshot!==t||i||H!==null&&H.memoizedState.tag&1){if(r.flags|=2048,$t(9,bl.bind(null,r,n,s,t),void 0,null),J===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");dt&30||Al(r,t,s)}return s}function Al(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=b.updateQueue,t===null?(t={lastEffect:null,stores:null},b.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function bl(e,t,r,n){t.value=r,t.getSnapshot=n,ql(t)&&Wl(e)}function Ul(e,t,r){return r(function(){ql(t)&&Wl(e)})}function ql(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Ne(e,r)}catch{return!0}}function Wl(e){var t=It(e,1);t!==null&&Ke(t,e,1,-1)}function Ds(e){var t=Oe();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:e},t.queue=e,e=e.dispatch=xu.bind(null,b,e),[t.memoizedState,e]}function $t(e,t,r,n){return e={tag:e,create:t,destroy:r,deps:n,next:null},t=b.updateQueue,t===null?(t={lastEffect:null,stores:null},b.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(n=r.next,r.next=e,e.next=n,t.lastEffect=e)),e}function Vl(){return xe().memoizedState}function dr(e,t,r,n){var s=Oe();b.flags|=e,s.memoizedState=$t(1|t,r,void 0,n===void 0?null:n)}function Vr(e,t,r,n){var s=xe();n=n===void 0?null:n;var i=void 0;if(W!==null){var l=W.memoizedState;if(i=l.destroy,n!==null&&zi(n,l.deps)){s.memoizedState=$t(t,r,i,n);return}}b.flags|=e,s.memoizedState=$t(1|t,r,i,n)}function Es(e,t){return dr(8390656,8,e,t)}function _i(e,t){return Vr(2048,8,e,t)}function Ql(e,t){return Vr(4,2,e,t)}function $l(e,t){return Vr(4,4,e,t)}function Hl(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Jl(e,t,r){return r=r!=null?r.concat([e]):null,Vr(4,4,Hl.bind(null,t,e),r)}function Ai(){}function Kl(e,t){var r=xe();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&zi(t,n[1])?n[0]:(r.memoizedState=[e,t],e)}function Yl(e,t){var r=xe();t=t===void 0?null:t;var n=r.memoizedState;return n!==null&&t!==null&&zi(t,n[1])?n[0]:(e=e(),r.memoizedState=[e,t],e)}function Zl(e,t,r){return dt&21?(Ne(r,t)||(r=Ol(),b.lanes|=r,ft|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,oe=!0),e.memoizedState=r)}function vu(e,t){var r=$;$=r!==0&&4>r?r:4,e(!0);var n=sn.transition;sn.transition={};try{e(!1),t()}finally{$=r,sn.transition=n}}function Gl(){return xe().memoizedState}function wu(e,t,r){var n=Et(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},eo(e))to(t,r);else if(r=Xl(e,t,r,n),r!==null){var s=Ee();Ke(r,e,n,s),ro(r,t,n)}}function xu(e,t,r){var n=Et(e),s={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(eo(e))to(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,o=i(l,r);if(s.hasEagerState=!0,s.eagerState=o,Ne(o,l)){var u=t.interleaved;u===null?(s.next=s,ki(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}r=Xl(e,t,s,n),r!==null&&(s=Ee(),Ke(r,e,n,s),ro(r,t,n))}}function eo(e){var t=e.alternate;return e===b||t!==null&&t===b}function to(e,t){At=Pr=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function ro(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,Il(e,r)}}var kr={readContext:we,useCallback:Y,useContext:Y,useEffect:Y,useImperativeHandle:Y,useInsertionEffect:Y,useLayoutEffect:Y,useMemo:Y,useReducer:Y,useRef:Y,useState:Y,useDebugValue:Y,useDeferredValue:Y,useTransition:Y,useMutableSource:Y,useSyncExternalStore:Y,useId:Y,unstable_isNewReconciler:!1},Su={readContext:we,useCallback:function(e,t){return Oe().memoizedState=[e,t===void 0?null:t],e},useContext:we,useEffect:Es,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,dr(4,4,Hl.bind(null,t,e),r)},useLayoutEffect:function(e,t){return dr(4,4,e,t)},useInsertionEffect:function(e,t){return dr(4,2,e,t)},useMemo:function(e,t){var r=Oe();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Oe();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=wu.bind(null,b,e),[n.memoizedState,e]},useRef:function(e){var t=Oe();return e={current:e},t.memoizedState=e},useState:Ds,useDebugValue:Ai,useDeferredValue:function(e){return Oe().memoizedState=e},useTransition:function(){var e=Ds(!1),t=e[0];return e=vu.bind(null,e[1]),Oe().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t){var r=b,n=Oe(),s=t();if(J===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");dt&30||Al(r,t,s),n.memoizedState=s;var i={value:s,getSnapshot:t};return n.queue=i,Es(Ul.bind(null,r,i,e),[e]),r.flags|=2048,$t(9,bl.bind(null,r,i,s,t),void 0,null),s},useId:function(){var e=Oe(),t=J.identifierPrefix,r=yu++;return t=":"+t+"r"+r.toString(32)+":",e.memoizedState=t},unstable_isNewReconciler:!1},Tu={readContext:we,useCallback:Kl,useContext:we,useEffect:_i,useImperativeHandle:Jl,useInsertionEffect:Ql,useLayoutEffect:$l,useMemo:Yl,useReducer:ln,useRef:Vl,useState:function(){return ln(Qt)},useDebugValue:Ai,useDeferredValue:function(e){var t=xe();return Zl(t,W.memoizedState,e)},useTransition:function(){var e=ln(Qt)[0],t=xe().memoizedState;return[e,t]},useMutableSource:Bl,useSyncExternalStore:_l,useId:Gl,unstable_isNewReconciler:!1},Du={readContext:we,useCallback:Kl,useContext:we,useEffect:_i,useImperativeHandle:Jl,useInsertionEffect:Ql,useLayoutEffect:$l,useMemo:Yl,useReducer:on,useRef:Vl,useState:function(){return on(Qt)},useDebugValue:Ai,useDeferredValue:function(e){var t=xe();return W===null?t.memoizedState=e:Zl(t,W.memoizedState,e)},useTransition:function(){var e=on(Qt)[0],t=xe().memoizedState;return[e,t]},useMutableSource:Bl,useSyncExternalStore:_l,useId:Gl,unstable_isNewReconciler:!1};function Te(e,t){if(e&&e.defaultProps){t=lt({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function ii(e,t,r,n){t=e.memoizedState,r=r(n,t),r=r==null?t:lt({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Qr={isMounted:function(e){return(e=e._reactInternals)?br(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var n=Ee(),s=Et(e),i=He(n,s);i.payload=t,r!=null&&(i.callback=r),t=ot(e,i,s),t!==null&&(Ke(t,e,s,n),cr(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var n=Ee(),s=Et(e),i=He(n,s);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=ot(e,i,s),t!==null&&(Ke(t,e,s,n),cr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Ee(),n=Et(e),s=He(r,n);s.tag=2,t!=null&&(s.callback=t),t=ot(e,s,n),t!==null&&(Ke(t,e,n,r),cr(t,e,n))}};function Ns(e,t,r,n,s,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,i,l):t.prototype&&t.prototype.isPureReactComponent?!Lr(r,n)||!Lr(s,i):!0}function no(e,t,r){var n=!1,s=Ge,i=t.contextType;return typeof i=="object"&&i!==null?i=we(i):(s=he(t)?ht:te.current,n=t.contextTypes,i=(n=n!=null)?Mt(e,s):Ge),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Qr,e.stateNode=t,t._reactInternals=e,n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Ls(e,t,r,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,n),t.state!==e&&Qr.enqueueReplaceState(t,t.state,null)}function si(e,t,r,n){var s=e.stateNode;s.props=r,s.state=e.memoizedState,s.refs={},ji(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=we(i):(i=he(t)?ht:te.current,s.context=Mt(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ii(e,t,i,r),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&Qr.enqueueReplaceState(s,s.state,null),Ir(e,r,s,n),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4)}function bi(e,t){try{var r="",n=t;do r+=mu(n),n=n.return;while(n);var s=r}catch(i){s=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function un(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function li(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Eu=typeof WeakMap=="function"?WeakMap:Map;function io(e,t,r){r=He(-1,r),r.tag=3,r.payload={element:null};var n=t.value;return r.callback=function(){Fr||(Fr=!0,mi=n),li(e,t)},r}function so(e,t,r){r=He(-1,r),r.tag=3;var n=e.type.getDerivedStateFromError;if(typeof n=="function"){var s=t.value;r.payload=function(){return n(s)},r.callback=function(){li(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){li(e,t),typeof n!="function"&&(Je===null?Je=new Set([this]):Je.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),r}function Ms(e,t,r){var n=e.pingCache;if(n===null){n=e.pingCache=new Eu;var s=new Set;n.set(t,s)}else s=n.get(t),s===void 0&&(s=new Set,n.set(t,s));s.has(r)||(s.add(r),e=_u.bind(null,e,t,r),t.then(e,e))}var Nu=et.ReactCurrentOwner,oe=!1;function ie(e,t,r,n){t.child=e===null?gu(t,null,r,n):Ot(t,e.child,r,n)}function Os(e,t,r,n,s){r=r.render;var i=t.ref;return Dt(t,s),n=Bi(e,t,r,n,i,s),e!==null&&!oe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,ze(e,t,s)):(t.flags|=1,ie(e,t,n,s),t.child)}function Is(e,t,r,n,s){if(e===null){var i=r.type;return typeof i=="function"&&!Ji(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,lo(e,t,i,n,s)):(e=gr(r.type,null,n,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var l=i.memoizedProps;if(r=r.compare,r=r!==null?r:Lr,r(l,n)&&e.ref===t.ref)return ze(e,t,s)}return t.flags|=1,e=Ye(i,n),e.ref=t.ref,e.return=t,t.child=e}function lo(e,t,r,n,s){if(e!==null){var i=e.memoizedProps;if(Lr(i,n)&&e.ref===t.ref)if(oe=!1,t.pendingProps=n=i,(e.lanes&s)!==0)e.flags&131072&&(oe=!0);else return t.lanes=e.lanes,ze(e,t,s)}return oi(e,t,r,n,s)}function oo(e,t,r){var n=t.pendingProps,s=n.children,i=e!==null?e.memoizedState:null;if(n.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},z(St,de),de|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,z(St,de),de|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},n=i!==null?i.baseLanes:r,z(St,de),de|=n}else i!==null?(n=i.baseLanes|r,t.memoizedState=null):n=r,z(St,de),de|=n;return ie(e,t,s,r),t.child}function uo(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512)}function oi(e,t,r,n,s){var i=he(r)?ht:te.current;return i=Mt(t,i),Dt(t,s),r=Bi(e,t,r,n,i,s),e!==null&&!oe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,ze(e,t,s)):(t.flags|=1,ie(e,t,r,s),t.child)}function Cs(e,t,r,n,s){if(he(r)){var i=!0;Nr(t)}else i=!1;if(Dt(t,s),t.stateNode===null)fr(e,t),no(t,r,n),si(t,r,n,s),n=!0;else if(e===null){var l=t.stateNode,o=t.memoizedProps;l.props=o;var u=l.context,d=r.contextType;typeof d=="object"&&d!==null?d=we(d):(d=he(r)?ht:te.current,d=Mt(t,d));var c=r.getDerivedStateFromProps,g=typeof c=="function"||typeof l.getSnapshotBeforeUpdate=="function";g||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==n||u!==d)&&Ls(t,l,n,d),qe=!1;var v=t.memoizedState;l.state=v,Ir(t,n,l,s),u=t.memoizedState,o!==n||v!==u||ce.current||qe?(typeof c=="function"&&(ii(t,r,c,n),u=t.memoizedState),(o=qe||Ns(t,r,o,n,v,u,d))?(g||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4)):(typeof l.componentDidMount=="function"&&(t.flags|=4),t.memoizedProps=n,t.memoizedState=u),l.props=n,l.state=u,l.context=d,n=o):(typeof l.componentDidMount=="function"&&(t.flags|=4),n=!1)}else{l=t.stateNode,Fl(e,t),o=t.memoizedProps,d=t.type===t.elementType?o:Te(t.type,o),l.props=d,g=t.pendingProps,v=l.context,u=r.contextType,typeof u=="object"&&u!==null?u=we(u):(u=he(r)?ht:te.current,u=Mt(t,u));var E=r.getDerivedStateFromProps;(c=typeof E=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==g||v!==u)&&Ls(t,l,n,u),qe=!1,v=t.memoizedState,l.state=v,Ir(t,n,l,s);var L=t.memoizedState;o!==g||v!==L||ce.current||qe?(typeof E=="function"&&(ii(t,r,E,n),L=t.memoizedState),(d=qe||Ns(t,r,d,n,v,L,u)||!1)?(c||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(n,L,u),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(n,L,u)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=L),l.props=n,l.state=L,l.context=u,n=d):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&v===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&v===e.memoizedState||(t.flags|=1024),n=!1)}return ui(e,t,r,n,i,s)}function ui(e,t,r,n,s,i){uo(e,t);var l=(t.flags&128)!==0;if(!n&&!l)return s&&ys(t,r,!1),ze(e,t,i);n=t.stateNode,Nu.current=t;var o=l&&typeof r.getDerivedStateFromError!="function"?null:n.render();return t.flags|=1,e!==null&&l?(t.child=Ot(t,e.child,null,i),t.child=Ot(t,null,o,i)):ie(e,t,o,i),t.memoizedState=n.state,s&&ys(t,r,!0),t.child}function ao(e){var t=e.stateNode;t.pendingContext?gs(e,t.pendingContext,t.pendingContext!==t.context):t.context&&gs(e,t.context,!1),Ri(e,t.containerInfo)}var ai={dehydrated:null,treeContext:null,retryLane:0};function ci(e){return{baseLanes:e,cachePool:null,transitions:null}}function co(e,t,r){var n=t.pendingProps,s=A.current,i=!1,l=(t.flags&128)!==0,o;if((o=l)||(o=e!==null&&e.memoizedState===null?!1:(s&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),z(A,s&1),e===null)return e=t.memoizedState,e!==null&&e.dehydrated!==null?(t.mode&1?Qe()?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(l=n.children,e=n.fallback,i?(n=t.mode,i=t.child,l={mode:"hidden",children:l},!(n&1)&&i!==null?(i.childLanes=0,i.pendingProps=l):i=Hr(l,n,0,null),e=at(e,n,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ci(r),t.memoizedState=ai,e):Ui(t,l));if(s=e.memoizedState,s!==null&&(o=s.dehydrated,o!==null))return Lu(e,t,l,n,o,s,r);if(i){i=n.fallback,l=t.mode,s=e.child,o=s.sibling;var u={mode:"hidden",children:n.children};return!(l&1)&&t.child!==s?(n=t.child,n.childLanes=0,n.pendingProps=u,t.deletions=null):(n=Ye(s,u),n.subtreeFlags=s.subtreeFlags&14680064),o!==null?i=Ye(o,i):(i=at(i,l,r,null),i.flags|=2),i.return=t,n.return=t,n.sibling=i,t.child=n,n=i,i=t.child,l=e.child.memoizedState,l=l===null?ci(r):{baseLanes:l.baseLanes|r,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~r,t.memoizedState=ai,n}return i=e.child,e=i.sibling,n=Ye(i,{mode:"visible",children:n.children}),!(t.mode&1)&&(n.lanes=r),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n}function Ui(e,t){return t=Hr({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function lr(e,t,r,n){return n!==null&&(Xe===null?Xe=[n]:Xe.push(n)),Ot(t,e.child,null,r),e=Ui(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Lu(e,t,r,n,s,i,l){if(r)return t.flags&256?(t.flags&=-257,i=un(Error("There was an error while hydrating this Suspense boundary. Switched to client rendering.")),lr(e,t,l,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=n.fallback,r=t.mode,n=Hr({mode:"visible",children:n.children},r,0,null),i=at(i,r,l,null),i.flags|=2,n.return=t,i.return=t,n.sibling=i,t.child=n,t.mode&1&&Ot(t,e.child,null,l),t.child.memoizedState=ci(l),t.memoizedState=ai,i);if(!(t.mode&1))return lr(e,t,l,null);if(Qe())return i=Qe().digest,i=un(Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),i,void 0),lr(e,t,l,i);if(r=(l&e.childLanes)!==0,oe||r){if(n=J,n!==null){switch(l&-l){case 4:r=2;break;case 16:r=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(n.suspendedLanes|l)?0:r,r!==0&&r!==i.retryLane&&(i.retryLane=r,It(e,r),Ke(n,e,r,-1))}return Hi(),i=un(Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition.")),lr(e,t,l,i)}return Qe()?(t.flags|=128,t.child=e.child,Au.bind(null,e),Qe(),null):(e=Ui(t,n.children),e.flags|=4096,e)}function Ps(e,t,r){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ni(e.return,t,r)}function an(e,t,r,n,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:r,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=n,i.tail=r,i.tailMode=s)}function ho(e,t,r){var n=t.pendingProps,s=n.revealOrder,i=n.tail;if(ie(e,t,n.children,r),n=A.current,n&2)n=n&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ps(e,r,t);else if(e.tag===19)Ps(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}n&=1}if(z(A,n),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(r=t.child,s=null;r!==null;)e=r.alternate,e!==null&&Cr(e)===null&&(s=r),r=r.sibling;r=s,r===null?(s=t.child,t.child=null):(s=r.sibling,r.sibling=null),an(t,!1,s,r,i);break;case"backwards":for(r=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Cr(e)===null){t.child=s;break}e=s.sibling,s.sibling=r,r=s,s=e}an(t,!0,r,null,i);break;case"together":an(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function fr(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ze(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),ft|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error("Resuming work not yet implemented.");if(t.child!==null){for(e=t.child,r=Ye(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Ye(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Mu(e,t,r){switch(t.tag){case 3:ao(t);break;case 5:zl(t);break;case 1:he(t.type)&&Nr(t);break;case 4:Ri(t,t.stateNode.containerInfo);break;case 10:var n=t.type._context,s=t.memoizedProps.value;z(Mr,n._currentValue2),n._currentValue2=s;break;case 13:if(n=t.memoizedState,n!==null)return n.dehydrated!==null?(z(A,A.current&1),t.flags|=128,null):r&t.child.childLanes?co(e,t,r):(z(A,A.current&1),e=ze(e,t,r),e!==null?e.sibling:null);z(A,A.current&1);break;case 19:if(n=(r&t.childLanes)!==0,e.flags&128){if(n)return ho(e,t,r);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),z(A,A.current),n)break;return null;case 22:case 23:return t.lanes=0,oo(e,t,r)}return ze(e,t,r)}var fo,hi,po,mo;fo=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6){var n=e,s=r.stateNode,i=n.children.indexOf(s);i!==-1&&n.children.splice(i,1),n.children.push(s)}else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};hi=function(){};po=function(e,t,r,n){e.memoizedProps!==n&&(st(ke.current),t.updateQueue=au)&&(t.flags|=4)};mo=function(e,t,r,n){r!==n&&(t.flags|=4)};function Rt(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var n=null;r!==null;)r.alternate!==null&&(n=r),r=r.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Z(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,n=0;if(t)for(var s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags&14680064,n|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)r|=s.lanes|s.childLanes,n|=s.subtreeFlags,n|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=n,e.childLanes=r,t}function Ou(e,t,r){var n=t.pendingProps;switch(Oi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Z(t),null;case 1:return he(t.type)&&Er(),Z(t),null;case 3:return r=t.stateNode,Ct(),_(ce),_(te),Fi(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),e!==null&&e.child!==null||e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Xe!==null&&(vi(Xe),Xe=null)),hi(e,t),Z(t),null;case 5:Xi(t),r=st(Vt.current);var s=t.type;if(e!==null&&t.stateNode!=null)po(e,t,s,n,r),e.ref!==t.ref&&(t.flags|=512);else{if(!n){if(t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return Z(t),null}st(ke.current),e={type:s,props:n,isHidden:!1,children:[],internalInstanceHandle:t,rootContainerInstance:r,tag:"INSTANCE"},fo(e,t,!1,!1),t.stateNode=e,t.ref!==null&&(t.flags|=512)}return Z(t),null;case 6:if(e&&t.stateNode!=null)mo(e,t,e.memoizedProps,n);else{if(typeof n!="string"&&t.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");st(Vt.current),st(ke.current),t.stateNode={text:n,isHidden:!1,tag:"TEXT"}}return Z(t),null;case 13:if(_(A),n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n!==null&&n.dehydrated!==null){if(e===null)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");!(t.flags&128)&&(t.memoizedState=null),t.flags|=4,Z(t),s=!1}else Xe!==null&&(vi(Xe),Xe=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(r=n!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||A.current&1?Q===0&&(Q=3):Hi())),t.updateQueue!==null&&(t.flags|=4),Z(t),null);case 4:return Ct(),hi(e,t),Z(t),null;case 10:return Pi(t.type._context),Z(t),null;case 17:return he(t.type)&&Er(),Z(t),null;case 19:if(_(A),s=t.memoizedState,s===null)return Z(t),null;n=(t.flags&128)!==0;var i=s.rendering;if(i===null)if(n)Rt(s,!1);else{if(Q!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Cr(e),i!==null){for(t.flags|=128,Rt(s,!1),e=i.updateQueue,e!==null&&(t.updateQueue=e,t.flags|=4),t.subtreeFlags=0,e=r,r=t.child;r!==null;)n=r,s=e,n.flags&=14680066,i=n.alternate,i===null?(n.childLanes=0,n.lanes=s,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=i.childLanes,n.lanes=i.lanes,n.child=i.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=i.memoizedProps,n.memoizedState=i.memoizedState,n.updateQueue=i.updateQueue,n.type=i.type,s=i.dependencies,n.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),r=r.sibling;return z(A,A.current&1|2),t.child}e=e.sibling}s.tail!==null&&V()>Jt&&(t.flags|=128,n=!0,Rt(s,!1),t.lanes=4194304)}else{if(!n)if(e=Cr(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,e!==null&&(t.updateQueue=e,t.flags|=4),Rt(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate)return Z(t),null}else 2*V()-s.renderingStartTime>Jt&&r!==1073741824&&(t.flags|=128,n=!0,Rt(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(e=s.last,e!==null?e.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=V(),t.sibling=null,e=A.current,z(A,n?e&1|2:e&1),t):(Z(t),null);case 22:case 23:return $i(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?de&1073741824&&(Z(t),t.subtreeFlags&6&&(t.flags|=8192)):Z(t),null;case 24:return null;case 25:return null}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function Iu(e,t){switch(Oi(t),t.tag){case 1:return he(t.type)&&Er(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ct(),_(ce),_(te),Fi(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xi(t),null;case 13:if(_(A),e=t.memoizedState,e!==null&&e.dehydrated!==null&&t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _(A),null;case 4:return Ct(),null;case 10:return Pi(t.type._context),null;case 22:case 23:return $i(),null;case 24:return null;default:return null}}var Cu=typeof WeakSet=="function"?WeakSet:Set,P=null;function jr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){le(e,t,n)}else r.current=null}function di(e,t,r){try{r()}catch(n){le(e,t,n)}}var ks=!1;function Pu(e,t){for(P=t;P!==null;)if(e=P,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,P=t;else for(;P!==null;){e=P;try{var r=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(r!==null){var n=r.memoizedProps,s=r.memoizedState,i=e.stateNode,l=i.getSnapshotBeforeUpdate(e.elementType===e.type?n:Te(e.type,n),s);i.__reactInternalSnapshotBeforeUpdate=l}break;case 3:e.stateNode.containerInfo.children.splice(0);break;case 5:case 6:case 4:case 17:break;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}}catch(o){le(e,e.return,o)}if(t=e.sibling,t!==null){t.return=e.return,P=t;break}P=e.return}return r=ks,ks=!1,r}function Rr(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var s=n=n.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&di(t,r,i)}s=s.next}while(s!==n)}}function qi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function go(e){var t=e.alternate;t!==null&&(e.alternate=null,go(t)),e.child=null,e.deletions=null,e.sibling=null,e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function yo(e){return e.tag===5||e.tag===3||e.tag===4}function js(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yo(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fi(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?kl(r,e,t):Pl(r,e);else if(n!==4&&(e=e.child,e!==null))for(fi(e,t,r),e=e.sibling;e!==null;)fi(e,t,r),e=e.sibling}function pi(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?kl(r,e,t):Pl(r,e);else if(n!==4&&(e=e.child,e!==null))for(pi(e,t,r),e=e.sibling;e!==null;)pi(e,t,r),e=e.sibling}var re=null;function rt(e,t,r){for(r=r.child;r!==null;)vo(e,t,r),r=r.sibling}function vo(e,t,r){if(Pe&&typeof Pe.onCommitFiberUnmount=="function")try{Pe.onCommitFiberUnmount(Ur,r)}catch{}switch(r.tag){case 5:jr(r,t);case 6:var n=re;re=null,rt(e,t,r),re=n,re!==null&&(e=re,r=e.children.indexOf(r.stateNode),e.children.splice(r,1));break;case 18:re!==null&&Qe(re,r.stateNode);break;case 4:n=re,re=r.stateNode.containerInfo,rt(e,t,r),re=n;break;case 0:case 11:case 14:case 15:if(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null)){var s=n=n.next;do{var i=s,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&di(r,t,l),s=s.next}while(s!==n)}rt(e,t,r);break;case 1:if(jr(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function")try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(o){le(r,t,o)}rt(e,t,r);break;case 21:rt(e,t,r);break;case 22:rt(e,t,r);break;default:rt(e,t,r)}}function Rs(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Cu),t.forEach(function(n){var s=bu.bind(null,e,n);r.has(n)||(r.add(n),n.then(s,s))})}}function Le(e,t){var r=t.deletions;if(r!==null)for(var n=0;n<r.length;n++){var s=r[n];try{var i=e,l=t,o=l;e:for(;o!==null;){switch(o.tag){case 5:re=o.stateNode;break e;case 3:re=o.stateNode.containerInfo;break e;case 4:re=o.stateNode.containerInfo;break e}o=o.return}if(re===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");vo(i,l,s),re=null;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(d){le(s,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)wo(t,e),t=t.sibling}function wo(e,t){var r=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Le(t,e),Me(e),n&4){try{Rr(3,e,e.return),qi(3,e)}catch(i){le(e,e.return,i)}try{Rr(5,e,e.return)}catch(i){le(e,e.return,i)}}break;case 1:Le(t,e),Me(e),n&512&&r!==null&&jr(r,r.return);break;case 5:if(Le(t,e),Me(e),n&512&&r!==null&&jr(r,r.return),n&4){var s=e.stateNode;if(s!=null&&(n=e.memoizedProps,t=e.type,r=e.updateQueue,e.updateQueue=null,r!==null))try{s.type=t,s.props=n}catch(i){le(e,e.return,i)}}break;case 6:if(Le(t,e),Me(e),n&4){if(e.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");s=e.stateNode,n=e.memoizedProps;try{s.text=n}catch(i){le(e,e.return,i)}}break;case 3:Le(t,e),Me(e);break;case 4:Le(t,e),Me(e);break;case 13:Le(t,e),Me(e),s=e.child,s.flags&8192&&(t=s.memoizedState!==null,s.stateNode.isHidden=t,!t||s.alternate!==null&&s.alternate.memoizedState!==null||(Qi=V())),n&4&&Rs(e);break;case 22:if(Le(t,e),Me(e),n&8192)e:for(n=e.memoizedState!==null,e.stateNode.isHidden=n,t=null,r=e;;){if(r.tag===5){if(t===null){t=r;try{s=r.stateNode,n?s.isHidden=!0:r.stateNode.isHidden=!1}catch(i){le(e,e.return,i)}}}else if(r.tag===6){if(t===null)try{r.stateNode.isHidden=!!n}catch(i){le(e,e.return,i)}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===e)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===e)break e;for(;r.sibling===null;){if(r.return===null||r.return===e)break e;t===r&&(t=null),r=r.return}t===r&&(t=null),r.sibling.return=r.return,r=r.sibling}break;case 19:Le(t,e),Me(e),n&4&&Rs(e);break;case 21:break;default:Le(t,e),Me(e)}}function Me(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(yo(r)){var n=r;break e}r=r.return}throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}switch(n.tag){case 5:var s=n.stateNode;n.flags&32&&(n.flags&=-33);var i=js(e);pi(e,i,s);break;case 3:case 4:var l=n.stateNode.containerInfo,o=js(e);fi(e,o,l);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}catch(u){le(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ku(e){for(P=e;P!==null;){var t=P,r=t.child;if(t.subtreeFlags&8772&&r!==null)r.return=t,P=r;else for(t=e;P!==null;){if(r=P,r.flags&8772){var n=r.alternate;try{if(r.flags&8772)switch(r.tag){case 0:case 11:case 15:qi(5,r);break;case 1:var s=r.stateNode;if(r.flags&4)if(n===null)s.componentDidMount();else{var i=r.elementType===r.type?n.memoizedProps:Te(r.type,n.memoizedProps);s.componentDidUpdate(i,n.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var l=r.updateQueue;l!==null&&Ts(r,l,s);break;case 3:var o=r.updateQueue;if(o!==null){if(n=null,r.child!==null)switch(r.child.tag){case 5:n=Dr(r.child.stateNode);break;case 1:n=r.child.stateNode}Ts(r,o,n)}break;case 5:break;case 6:break;case 4:break;case 12:break;case 13:break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(r.flags&512){n=void 0;var u=r.ref;if(u!==null){var d=r.stateNode;switch(r.tag){case 5:n=Dr(d);break;default:n=d}typeof u=="function"?u(n):u.current=n}}}catch(c){le(r,r.return,c)}}if(r===t){P=null;break}if(n=r.sibling,n!==null){n.return=r.return,P=n;break}P=r.return}}}var ju=Math.ceil,Xr=et.ReactCurrentDispatcher,Wi=et.ReactCurrentOwner,ye=et.ReactCurrentBatchConfig,X=0,J=null,U=null,K=0,de=0,St=tt(0),Q=0,Ht=null,ft=0,$r=0,Vi=0,bt=null,se=null,Qi=0,Jt=1/0,Re=null,Fr=!1,mi=null,Je=null,or=!1,$e=null,zr=0,Ut=0,gi=null,pr=-1,mr=0;function Ee(){return X&6?V():pr!==-1?pr:pr=V()}function Et(e){return e.mode&1?X&2&&K!==0?K&-K:pu.transition!==null?(mr===0&&(mr=Ol()),mr):(e=$,e!==0?e:16):1}function Ke(e,t,r,n){if(50<Ut)throw Ut=0,gi=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");qr(e,r,n),(!(X&2)||e!==J)&&(e===J&&(!(X&2)&&($r|=r),Q===4&&We(e,K)),ve(e,n),r===1&&X===0&&!(t.mode&1)&&(Jt=V()+500,Wr&&mt()))}function ve(e,t){for(var r=e.callbackNode,n=e.suspendedLanes,s=e.pingedLanes,i=e.expirationTimes,l=e.pendingLanes;0<l;){var o=31-pt(l),u=1<<o,d=i[o];d===-1?(!(u&n)||u&s)&&(i[o]=ou(u,t)):d<=t&&(e.expiredLanes|=u),l&=~u}if(n=Tr(e,e===J?K:0),n===0)r!==null&&ps(r),e.callbackNode=null,e.callbackPriority=0;else if(t=n&-n,e.callbackPriority!==t){if(r!=null&&ps(r),t===1)e.tag===0?(r=Xs.bind(null,e),Wr=!0,me===null?me=[r]:me.push(r)):(r=Xs.bind(null,e),me===null?me=[r]:me.push(r)),Mi(Zn,mt),r=null;else{switch(Cl(n)){case 1:r=Zn;break;case 4:r=tu;break;case 16:r=Gn;break;case 536870912:r=ru;break;default:r=Gn}r=Mo(r,xo.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function xo(e,t){if(pr=-1,mr=0,X&6)throw Error("Should not already be working.");var r=e.callbackNode;if(Nt()&&e.callbackNode!==r)return null;var n=Tr(e,e===J?K:0);if(n===0)return null;if(n&30||n&e.expiredLanes||t)t=Br(e,n);else{t=n;var s=X;X|=2;var i=To();(J!==e||K!==t)&&(Re=null,Jt=V()+500,ut(e,t));do try{zu();break}catch(o){So(e,o)}while(1);Ci(),Xr.current=i,X=s,U!==null?t=0:(J=null,K=0,t=Q)}if(t!==0){if(t===2&&(s=ei(e),s!==0&&(n=s,t=yi(e,s))),t===1)throw r=Ht,ut(e,0),We(e,n),ve(e,V()),r;if(t===6)We(e,n);else{if(s=e.current.alternate,!(n&30)&&!Ru(s)&&(t=Br(e,n),t===2&&(i=ei(e),i!==0&&(n=i,t=yi(e,i))),t===1))throw r=Ht,ut(e,0),We(e,n),ve(e,V()),r;switch(e.finishedWork=s,e.finishedLanes=n,t){case 0:case 1:throw Error("Root did not complete. This is a bug in React.");case 2:nt(e,se,Re);break;case 3:if(We(e,n),(n&130023424)===n&&(t=Qi+500-V(),10<t)){if(Tr(e,0)!==0)break;if(s=e.suspendedLanes,(s&n)!==n){Ee(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=ms(nt.bind(null,e,se,Re),t);break}nt(e,se,Re);break;case 4:if(We(e,n),(n&4194240)===n)break;for(t=e.eventTimes,s=-1;0<n;){var l=31-pt(n);i=1<<l,l=t[l],l>s&&(s=l),n&=~i}if(n=s,n=V()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*ju(n/1960))-n,10<n){e.timeoutHandle=ms(nt.bind(null,e,se,Re),n);break}nt(e,se,Re);break;case 5:nt(e,se,Re);break;default:throw Error("Unknown root exit status.")}}}return ve(e,V()),e.callbackNode===r?xo.bind(null,e):null}function yi(e,t){var r=bt;return e.current.memoizedState.isDehydrated&&(ut(e,t).flags|=256),e=Br(e,t),e!==2&&(t=se,se=r,t!==null&&vi(t)),e}function vi(e){se===null?se=e:se.push.apply(se,e)}function Ru(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var n=0;n<r.length;n++){var s=r[n],i=s.getSnapshot;s=s.value;try{if(!Ne(i(),s))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function We(e,t){for(t&=~Vi,t&=~$r,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-pt(t),n=1<<r;e[r]=-1,t&=~n}}function Xs(e){if(X&6)throw Error("Should not already be working.");Nt();var t=Tr(e,0);if(!(t&1))return ve(e,V()),null;var r=Br(e,t);if(e.tag!==0&&r===2){var n=ei(e);n!==0&&(t=n,r=yi(e,n))}if(r===1)throw r=Ht,ut(e,0),We(e,t),ve(e,V()),r;if(r===6)throw Error("Root did not complete. This is a bug in React.");return e.finishedWork=e.current.alternate,e.finishedLanes=t,nt(e,se,Re),ve(e,V()),null}function Xu(e){$e!==null&&$e.tag===0&&!(X&6)&&Nt();var t=X;X|=1;var r=ye.transition,n=$;try{if(ye.transition=null,$=1,e)return e()}finally{$=n,ye.transition=r,X=t,!(X&6)&&mt()}}function $i(){de=St.current,_(St)}function ut(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,hu(r)),U!==null)for(r=U.return;r!==null;){var n=r;switch(Oi(n),n.tag){case 1:n=n.type.childContextTypes,n!=null&&Er();break;case 3:Ct(),_(ce),_(te),Fi();break;case 5:Xi(n);break;case 4:Ct();break;case 13:_(A);break;case 19:_(A);break;case 10:Pi(n.type._context);break;case 22:case 23:$i()}r=r.return}if(J=e,U=e=Ye(e.current,null),K=de=t,Q=0,Ht=null,Vi=$r=ft=0,se=bt=null,it!==null){for(t=0;t<it.length;t++)if(r=it[t],n=r.interleaved,n!==null){r.interleaved=null;var s=n.next,i=r.pending;if(i!==null){var l=i.next;i.next=s,n.next=l}r.pending=n}it=null}return e}function So(e,t){do{var r=U;try{if(Ci(),hr.current=kr,Pr){for(var n=b.memoizedState;n!==null;){var s=n.queue;s!==null&&(s.pending=null),n=n.next}Pr=!1}if(dt=0,H=W=b=null,At=!1,Wi.current=null,r===null||r.return===null){Q=1,Ht=t,U=null;break}e:{var i=e,l=r.return,o=r,u=t;if(t=K,o.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=u,c=o,g=c.tag;if(!(c.mode&1)&&(g===0||g===11||g===15)){var v=c.alternate;v?(c.updateQueue=v.updateQueue,c.memoizedState=v.memoizedState,c.lanes=v.lanes):(c.updateQueue=null,c.memoizedState=null)}t:{c=l;do{var E;if(E=c.tag===13){var L=c.memoizedState;E=L!==null?L.dehydrated!==null:!0}if(E){var I=c;break t}c=c.return}while(c!==null);I=null}if(I!==null){if(I.flags&=-257,u=I,c=t,u.mode&1)u.flags|=65536,u.lanes=c;else if(u===l)u.flags|=65536;else{if(u.flags|=128,o.flags|=131072,o.flags&=-52805,o.tag===1)if(o.alternate===null)o.tag=17;else{var j=He(-1,1);j.tag=2,ot(o,j,1)}o.lanes|=1}I.mode&1&&Ms(i,d,t),t=I,i=d;var x=t.updateQueue;if(x===null){var f=new Set;f.add(i),t.updateQueue=f}else x.add(i);break e}else{if(!(t&1)){Ms(i,d,t),Hi();break e}u=Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.")}}i=u=bi(u,o),Q!==4&&(Q=2),bt===null?bt=[i]:bt.push(i),i=l;do{switch(i.tag){case 3:d=u,i.flags|=65536,t&=-t,i.lanes|=t;var w=io(i,d,t);Ss(i,w);break e;case 1:d=u;var a=i.type,p=i.stateNode;if(!(i.flags&128)&&(typeof a.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Je===null||!Je.has(p)))){i.flags|=65536,t&=-t,i.lanes|=t;var m=so(i,d,t);Ss(i,m);break e}}i=i.return}while(i!==null)}Eo(r)}catch(S){t=S,U===r&&r!==null&&(U=r=r.return);continue}break}while(1)}function To(){var e=Xr.current;return Xr.current=kr,e===null?kr:e}function Hi(){(Q===0||Q===3||Q===2)&&(Q=4),J===null||!(ft&268435455)&&!($r&268435455)||We(J,K)}function Br(e,t){var r=X;X|=2;var n=To();(J!==e||K!==t)&&(Re=null,ut(e,t));do try{Fu();break}catch(s){So(e,s)}while(1);if(Ci(),X=r,Xr.current=n,U!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return J=null,K=0,Q}function Fu(){for(;U!==null;)Do(U)}function zu(){for(;U!==null&&!Go();)Do(U)}function Do(e){var t=Lo(e.alternate,e,de);e.memoizedProps=e.pendingProps,t===null?Eo(e):U=t,Wi.current=null}function Eo(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Iu(r,t),r!==null){r.flags&=32767,U=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Q=6,U=null;return}}else if(r=Ou(r,t,de),r!==null){U=r;return}if(t=t.sibling,t!==null){U=t;return}U=t=e}while(t!==null);Q===0&&(Q=5)}function nt(e,t,r){var n=$,s=ye.transition;try{ye.transition=null,$=1,Bu(e,t,r,n)}finally{ye.transition=s,$=n}return null}function Bu(e,t,r,n){do Nt();while($e!==null);if(X&6)throw Error("Should not already be working.");r=e.finishedWork;var s=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(uu(e,i),e===J&&(U=J=null,K=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||or||(or=!0,Mo(Gn,function(){return Nt(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=ye.transition,ye.transition=null;var l=$;$=1;var o=X;X|=4,Wi.current=null,Pu(e,r),wo(r,e),e.current=r,ku(r),eu(),X=o,$=l,ye.transition=i}else e.current=r;if(or&&(or=!1,$e=e,zr=s),i=e.pendingLanes,i===0&&(Je=null),nu(r.stateNode),ve(e,V()),t!==null)for(n=e.onRecoverableError,r=0;r<t.length;r++)s=t[r],n(s.value,{componentStack:s.stack,digest:s.digest});if(Fr)throw Fr=!1,e=mi,mi=null,e;return zr&1&&e.tag!==0&&Nt(),i=e.pendingLanes,i&1?e===gi?Ut++:(Ut=0,gi=e):Ut=0,mt(),null}function Nt(){if($e!==null){var e=Cl(zr),t=ye.transition,r=$;try{if(ye.transition=null,$=16>e?16:e,$e===null)var n=!1;else{if(e=$e,$e=null,zr=0,X&6)throw Error("Cannot flush passive effects while already rendering.");var s=X;for(X|=4,P=e.current;P!==null;){var i=P,l=i.child;if(P.flags&16){var o=i.deletions;if(o!==null){for(var u=0;u<o.length;u++){var d=o[u];for(P=d;P!==null;){var c=P;switch(c.tag){case 0:case 11:case 15:Rr(8,c,i)}var g=c.child;if(g!==null)g.return=c,P=g;else for(;P!==null;){c=P;var v=c.sibling,E=c.return;if(go(c),c===d){P=null;break}if(v!==null){v.return=E,P=v;break}P=E}}}var L=i.alternate;if(L!==null){var I=L.child;if(I!==null){L.child=null;do{var j=I.sibling;I.sibling=null,I=j}while(I!==null)}}P=i}}if(i.subtreeFlags&2064&&l!==null)l.return=i,P=l;else e:for(;P!==null;){if(i=P,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Rr(9,i,i.return)}var x=i.sibling;if(x!==null){x.return=i.return,P=x;break e}P=i.return}}var f=e.current;for(P=f;P!==null;){l=P;var w=l.child;if(l.subtreeFlags&2064&&w!==null)w.return=l,P=w;else e:for(l=f;P!==null;){if(o=P,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:qi(9,o)}}catch(p){le(o,o.return,p)}if(o===l){P=null;break e}var a=o.sibling;if(a!==null){a.return=o.return,P=a;break e}P=o.return}}if(X=s,mt(),Pe&&typeof Pe.onPostCommitFiberRoot=="function")try{Pe.onPostCommitFiberRoot(Ur,e)}catch{}n=!0}return n}finally{$=r,ye.transition=t}}return!1}function Fs(e,t,r){t=bi(r,t),t=io(e,t,1),e=ot(e,t,1),t=Ee(),e!==null&&(qr(e,1,t),ve(e,t))}function le(e,t,r){if(e.tag===3)Fs(e,e,r);else for(t=e.return;t!==null;){if(t.tag===3){Fs(t,e,r);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Je===null||!Je.has(n))){e=bi(r,e),e=so(t,e,1),t=ot(t,e,1),e=Ee(),t!==null&&(qr(t,1,e),ve(t,e));break}}t=t.return}}function _u(e,t,r){var n=e.pingCache;n!==null&&n.delete(t),t=Ee(),e.pingedLanes|=e.suspendedLanes&r,J===e&&(K&r)===r&&(Q===4||Q===3&&(K&130023424)===K&&500>V()-Qi?ut(e,0):Vi|=r),ve(e,t)}function No(e,t){t===0&&(e.mode&1?(t=tr,tr<<=1,!(tr&130023424)&&(tr=4194304)):t=1);var r=Ee();e=It(e,t),e!==null&&(qr(e,t,r),ve(e,r))}function Au(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),No(e,r)}function bu(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,s=e.memoizedState;s!==null&&(r=s.retryLane);break;case 19:n=e.stateNode;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}n!==null&&n.delete(t),No(e,r)}var Lo;Lo=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ce.current)oe=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return oe=!1,Mu(e,t,r);oe=!!(e.flags&131072)}else oe=!1;switch(t.lanes=0,t.tag){case 2:var n=t.type;fr(e,t),e=t.pendingProps;var s=Mt(t,te.current);if(Dt(t,r),s=Bi(null,t,n,e,s,r),t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,he(n)){var i=!0;Nr(t)}else i=!1;t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,ji(t),s.updater=Qr,t.stateNode=s,s._reactInternals=t,si(t,n,e,r),t=ui(null,t,n,!0,i,r)}else t.tag=0,ie(null,t,s,r),t=t.child;return t;case 16:n=t.elementType;e:{switch(fr(e,t),e=t.pendingProps,s=n._init,n=s(n._payload),t.type=n,s=t.tag=qu(n),e=Te(n,e),s){case 0:t=oi(null,t,n,e,r);break e;case 1:t=Cs(null,t,n,e,r);break e;case 11:t=Os(null,t,n,e,r);break e;case 14:t=Is(null,t,n,Te(n.type,e),r);break e}throw Error("Element type is invalid. Received a promise that resolves to: "+n+". Lazy element type must resolve to a class or function.")}return t;case 0:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Te(n,s),oi(e,t,n,s,r);case 1:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Te(n,s),Cs(e,t,n,s,r);case 3:if(ao(t),e===null)throw Error("Should have a current fiber. This is a bug in React.");return s=t.pendingProps,n=t.memoizedState.element,Fl(e,t),Ir(t,s,null,r),s=t.memoizedState.element,s===n?t=ze(e,t,r):(ie(e,t,s,r),t=t.child),t;case 5:return zl(t),n=t.pendingProps.children,uo(e,t),ie(e,t,n,r),t.child;case 6:return null;case 13:return co(e,t,r);case 4:return Ri(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Ot(t,null,n,r):ie(e,t,n,r),t.child;case 11:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Te(n,s),Os(e,t,n,s,r);case 7:return ie(e,t,t.pendingProps,r),t.child;case 8:return ie(e,t,t.pendingProps.children,r),t.child;case 12:return ie(e,t,t.pendingProps.children,r),t.child;case 10:e:{n=t.type._context,s=t.pendingProps,i=t.memoizedProps;var l=s.value;if(z(Mr,n._currentValue2),n._currentValue2=l,i!==null)if(Ne(i.value,l)){if(i.children===s.children&&!ce.current){t=ze(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){l=i.child;for(var u=o.firstContext;u!==null;){if(u.context===n){if(i.tag===1){u=He(-1,r&-r),u.tag=2;var d=i.updateQueue;if(d!==null){d=d.shared;var c=d.pending;c===null?u.next=u:(u.next=c.next,c.next=u),d.pending=u}}i.lanes|=r,u=i.alternate,u!==null&&(u.lanes|=r),ni(i.return,r,t),o.lanes|=r;break}u=u.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");l.lanes|=r,o=l.alternate,o!==null&&(o.lanes|=r),ni(l,r,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}ie(e,t,s.children,r),t=t.child}return t;case 9:return s=t.type,n=t.pendingProps.children,Dt(t,r),s=we(s),n=n(s),t.flags|=1,ie(e,t,n,r),t.child;case 14:return n=t.type,s=Te(n,t.pendingProps),s=Te(n.type,s),Is(e,t,n,s,r);case 15:return lo(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,s=t.pendingProps,s=t.elementType===n?s:Te(n,s),fr(e,t),t.tag=1,he(n)?(e=!0,Nr(t)):e=!1,Dt(t,r),no(t,n,s),si(t,n,s,r),ui(null,t,n,!0,e,r);case 19:return ho(e,t,r);case 22:return oo(e,t,r)}throw Error("Unknown unit of work tag ("+t.tag+"). This error is likely caused by a bug in React. Please file an issue.")};function Mo(e,t){return Mi(e,t)}function Uu(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ce(e,t,r,n){return new Uu(e,t,r,n)}function Ji(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qu(e){if(typeof e=="function")return Ji(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ni)return 11;if(e===Li)return 14}return 2}function Ye(e,t){var r=e.alternate;return r===null?(r=Ce(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function gr(e,t,r,n,s,i){var l=2;if(n=e,typeof e=="function")Ji(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case vt:return at(r.children,s,i,t);case Ei:l=8,s|=8;break;case Jn:return e=Ce(12,r,t,s|2),e.elementType=Jn,e.lanes=i,e;case Kn:return e=Ce(13,r,t,s),e.elementType=Kn,e.lanes=i,e;case Yn:return e=Ce(19,r,t,s),e.elementType=Yn,e.lanes=i,e;case Nl:return Hr(r,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Dl:l=10;break e;case El:l=9;break e;case Ni:l=11;break e;case Li:l=14;break e;case Ue:l=16,n=null;break e}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+((e==null?e:typeof e)+"."))}return t=Ce(l,r,t,s),t.elementType=e,t.type=n,t.lanes=i,t}function at(e,t,r,n){return e=Ce(7,e,n,t),e.lanes=r,e}function Hr(e,t,r,n){return e=Ce(22,e,n,t),e.elementType=Nl,e.lanes=r,e.stateNode={isHidden:!1},e}function cn(e,t,r){return e=Ce(6,e,null,t),e.lanes=r,e}function hn(e,t,r){return t=Ce(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Wu(e,t,r,n,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yr(0),this.expirationTimes=Yr(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yr(0),this.identifierPrefix=n,this.onRecoverableError=s}function Vu(e,t,r,n,s,i,l){return e=new Wu(e,t,!1,i,l),t===1?(t=1,n===!0&&(t|=8)):t=0,n=Ce(3,null,null,t),e.current=n,n.stateNode=e,n.memoizedState={element:null,isDehydrated:!1,cache:null,transitions:null,pendingSuspenseBoundaries:null},ji(n),e}function dn(e,t,r,n){var s=t.current,i=Ee(),l=Et(s);e:if(r){r=r._reactInternals;t:{if(br(r)!==r||r.tag!==1)throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var o=r;do{switch(o.tag){case 3:o=o.stateNode.context;break t;case 1:if(he(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break t}}o=o.return}while(o!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}if(r.tag===1){var u=r.type;if(he(u)){r=jl(r,u,o);break e}}r=o}else r=Ge;return t.context===null?t.context=r:t.pendingContext=r,t=He(i,l),t.payload={element:e},n=n===void 0?null:n,n!==null&&(t.callback=n),e=ot(s,t,l),e!==null&&(Ke(e,s,l,i),cr(e,s,l)),l}function Qu(){return null}var $u=Sl.unstable_act,Hu={createNodeMock:function(){return null}};function yr(e){if(e.isHidden)return null;switch(e.tag){case"TEXT":return e.text;case"INSTANCE":var t=e.props,r=["children"];if(t==null)t={};else{var n={},s=Object.keys(t),i;for(i=0;i<s.length;i++){var l=s[i];0<=r.indexOf(l)||(n[l]=t[l])}t=n}if(r=null,e.children&&e.children.length)for(n=0;n<e.children.length;n++)s=yr(e.children[n]),s!==null&&(r===null?r=[s]:r.push(s));return e={type:e.type,props:t,children:r},Object.defineProperty(e,"$$typeof",{value:Symbol.for("react.test.json")}),e;default:throw Error("Unexpected node type in toJSON: "+e.tag)}}function Xt(e){return e?(e=Oo(e),e.length===0?null:e.length===1?_r(e[0]):Io(e.map(_r))):null}function Oo(e){for(var t=[];e!=null;)t.push(e),e=e.sibling;return t}function Io(e){var t=[];for(e=[{i:0,array:e}];e.length;)for(var r=e.pop();r.i<r.array.length;){var n=r.array[r.i];if(r.i+=1,Bt(n)){e.push(r),e.push({i:0,array:n});break}t.push(n)}return t}function _r(e){if(e==null)return null;switch(e.tag){case 3:return Xt(e.child);case 4:return Xt(e.child);case 1:return{nodeType:"component",type:e.type,props:lt({},e.memoizedProps),instance:e.stateNode,rendered:Xt(e.child)};case 0:case 15:return{nodeType:"component",type:e.type,props:lt({},e.memoizedProps),instance:null,rendered:Xt(e.child)};case 5:return{nodeType:"host",type:e.type,props:lt({},e.memoizedProps),instance:null,rendered:Io(Oo(e.child).map(_r))};case 6:return e.stateNode.text;case 7:case 10:case 9:case 8:case 12:case 11:case 14:case 17:case 21:return Xt(e.child);default:throw Error("toTree() does not yet know how to handle nodes with tag="+e.tag)}}var wi=new Set([0,1,5,11,14,15,3]);function xi(e){var t=[],r=e;if(r.child===null)return t;r.child.return=r,r=r.child;e:for(;;){var n=!1;if(wi.has(r.tag)?t.push(Ki(r)):r.tag===6?t.push(""+r.memoizedProps):n=!0,n&&r.child!==null)r.child.return=r,r=r.child;else{for(;r.sibling===null;){if(r.return===e)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}}return t}var Ju=function(){function e(r){if(!wi.has(r.tag))throw Error("Unexpected object passed to ReactTestInstance constructor (tag: "+r.tag+"). This is probably a bug in React.");this._fiber=r}var t=e.prototype;return t._currentFiber=function(){var r=Ll(this._fiber);if(r===null)throw Error("Can't read from currently-mounting component. This error is likely caused by a bug in React. Please file an issue.");return r},t.find=function(r){return fn(this.findAll(r,{deep:!1}),"matching custom predicate: "+r.toString())},t.findByType=function(r){return fn(this.findAllByType(r,{deep:!1}),'with node type: "'+(Sr(r)||"Unknown")+'"')},t.findByProps=function(r){return fn(this.findAllByProps(r,{deep:!1}),"with props: "+JSON.stringify(r))},t.findAll=function(r){return vr(this,r,1<arguments.length&&arguments[1]!==void 0?arguments[1]:null)},t.findAllByType=function(r){return vr(this,function(n){return n.type===r},1<arguments.length&&arguments[1]!==void 0?arguments[1]:null)},t.findAllByProps=function(r){return vr(this,function(n){var s;if(s=n.props)e:{for(var i in r)if(n.props[i]!==r[i]){s=!1;break e}s=!0}return s},1<arguments.length&&arguments[1]!==void 0?arguments[1]:null)},Yo(e,[{key:"instance",get:function(){return this._fiber.tag===5?Dr(this._fiber.stateNode):this._fiber.stateNode}},{key:"type",get:function(){return this._fiber.type}},{key:"props",get:function(){return this._currentFiber().memoizedProps}},{key:"parent",get:function(){for(var r=this._fiber.return;r!==null;){if(wi.has(r.tag)){if(r.tag===3&&2>xi(r).length)break;return Ki(r)}r=r.return}return null}},{key:"children",get:function(){return xi(this._currentFiber())}}]),e}();function vr(e,t,r){var n=r?r.deep:!0,s=[];return t(e)&&(s.push(e),!n)||e.children.forEach(function(i){typeof i!="string"&&s.push.apply(s,vr(i,t,r))}),s}function fn(e,t){if(e.length===1)return e[0];throw Error((e.length===0?"No instances found ":"Expected 1 but found "+e.length+" instances ")+t)}function Ku(e){console.error(e)}var pn=new WeakMap;function Ki(e){var t=pn.get(e);return t===void 0&&e.alternate!==null&&(t=pn.get(e.alternate)),t===void 0&&(t=new Ju(e),pn.set(e,t)),t}var Ft={findFiberByHostInstance:function(){throw Error("TestRenderer does not support findFiberByHostInstance()")},bundleType:0,version:"18.3.1",rendererPackageName:"react-test-renderer"},Yu={bundleType:Ft.bundleType,version:Ft.version,rendererPackageName:Ft.rendererPackageName,rendererConfig:Ft.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:et.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ll(e),e=e!==null?Ml(e):null,e===null?null:e.stateNode},findFiberByHostInstance:Ft.findFiberByHostInstance||Qu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ur=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ur.isDisabled&&ur.supportsFiber)try{Ur=ur.inject(Yu),Pe=ur}catch{}}Kt._Scheduler=Tl;Kt.act=$u;Kt.create=function(e,t){var r=Hu.createNodeMock,n=!1,s=!1;typeof t=="object"&&t!==null&&(typeof t.createNodeMock=="function"&&(r=t.createNodeMock),t.unstable_isConcurrent===!0&&(n=!0),t.unstable_strictMode===!0&&(s=!0));var i={children:[],createNodeMock:r,tag:"CONTAINER"},l=Vu(i,n?1:0,null,s,null,"",Ku);if(l==null)throw Error("something went wrong");return dn(e,l,null,null),e={_Scheduler:Tl,root:void 0,toJSON:function(){if(l==null||l.current==null||i==null||i.children.length===0)return null;if(i.children.length===1)return yr(i.children[0]);if(i.children.length===2&&i.children[0].isHidden===!0&&i.children[1].isHidden===!1)return yr(i.children[1]);var o=null;if(i.children&&i.children.length)for(var u=0;u<i.children.length;u++){var d=yr(i.children[u]);d!==null&&(o===null?o=[d]:o.push(d))}return o},toTree:function(){return l==null||l.current==null?null:_r(l.current)},update:function(o){l!=null&&l.current!=null&&dn(o,l,null,null)},unmount:function(){l!=null&&l.current!=null&&(dn(null,l,null,null),l=i=null)},getInstance:function(){if(l==null||l.current==null)return null;e:{var o=l.current;if(o.child)switch(o.child.tag){case 5:o=Dr(o.child.stateNode);break e;default:o=o.child.stateNode}else o=null}return o},unstable_flushSync:Xu},Object.defineProperty(e,"root",{configurable:!0,enumerable:!0,get:function(){if(l===null)throw Error("Can't access .root on unmounted test renderer");var o=xi(l.current);if(o.length===0)throw Error("Can't access .root on unmounted test renderer");return o.length===1?o[0]:Ki(l.current)}}),e};Kt.unstable_batchedUpdates=function(e,t){var r=X;X|=1;try{return e(t)}finally{X=r,X===0&&(Jt=V()+500,Wr&&mt())}};yl.exports=Kt;var Zu=yl.exports;const Gu=qo(Zu);var Ae={},je={},zs;function _e(){return zs||(zs=1,function(){var e,t,r,n,s,i,l,o={}.hasOwnProperty;e=function(u,...d){var c,g,v,E;if(s(Object.assign))Object.assign.apply(null,arguments);else for(c=0,v=d.length;c<v;c++)if(E=d[c],E!=null)for(g in E)o.call(E,g)&&(u[g]=E[g]);return u},s=function(u){return!!u&&Object.prototype.toString.call(u)==="[object Function]"},i=function(u){var d;return!!u&&((d=typeof u)=="function"||d==="object")},r=function(u){return s(Array.isArray)?Array.isArray(u):Object.prototype.toString.call(u)==="[object Array]"},n=function(u){var d;if(r(u))return!u.length;for(d in u)if(o.call(u,d))return!1;return!0},l=function(u){var d,c;return i(u)&&(c=Object.getPrototypeOf(u))&&(d=c.constructor)&&typeof d=="function"&&d instanceof d&&Function.prototype.toString.call(d)===Function.prototype.toString.call(Object)},t=function(u){return s(u.valueOf)?u.valueOf():u},je.assign=e,je.isFunction=s,je.isObject=i,je.isArray=r,je.isEmpty=n,je.isPlainObject=l,je.getValue=t}.call(R)),je}var mn={exports:{}},Bs;function Co(){return Bs||(Bs=1,function(){mn.exports=class{hasFeature(t,r){return!0}createDocumentType(t,r,n){throw new Error("This DOM method is not implemented.")}createDocument(t,r,n){throw new Error("This DOM method is not implemented.")}createHTMLDocument(t){throw new Error("This DOM method is not implemented.")}getFeature(t,r){throw new Error("This DOM method is not implemented.")}}}.call(R)),mn.exports}var gn={exports:{}},yn={exports:{}},vn={exports:{}},_s;function ea(){return _s||(_s=1,function(){vn.exports=class{constructor(){}handleError(t){throw new Error(t)}}}.call(R)),vn.exports}var wn={exports:{}},As;function ta(){return As||(As=1,function(){wn.exports=function(){class e{constructor(r){this.arr=r||[]}item(r){return this.arr[r]||null}contains(r){return this.arr.indexOf(r)!==-1}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.arr.length}}),e}.call(this)}.call(R)),wn.exports}var bs;function ra(){return bs||(bs=1,function(){var e,t;e=ea(),t=ta(),yn.exports=function(){class r{constructor(){this.defaultParams={"canonical-form":!1,"cdata-sections":!1,comments:!1,"datatype-normalization":!1,"element-content-whitespace":!0,entities:!0,"error-handler":new e,infoset:!0,"validate-if-schema":!1,namespaces:!0,"namespace-declarations":!0,"normalize-characters":!1,"schema-location":"","schema-type":"","split-cdata-sections":!0,validate:!1,"well-formed":!0},this.params=Object.create(this.defaultParams)}getParameter(s){return this.params.hasOwnProperty(s)?this.params[s]:null}canSetParameter(s,i){return!0}setParameter(s,i){return i!=null?this.params[s]=i:delete this.params[s]}}return Object.defineProperty(r.prototype,"parameterNames",{get:function(){return new t(Object.keys(this.defaultParams))}}),r}.call(this)}.call(R)),yn.exports}var xn={exports:{}},Sn={exports:{}},Tn={exports:{}},Us;function q(){return Us||(Us=1,function(){Tn.exports={Element:1,Attribute:2,Text:3,CData:4,EntityReference:5,EntityDeclaration:6,ProcessingInstruction:7,Comment:8,Document:9,DocType:10,DocumentFragment:11,NotationDeclaration:12,Declaration:201,Raw:202,AttributeDeclaration:203,ElementDeclaration:204,Dummy:205}}.call(R)),Tn.exports}var Dn={exports:{}},qs;function Po(){return qs||(qs=1,function(){var e;e=q(),Se(),Dn.exports=function(){class t{constructor(n,s,i){if(this.parent=n,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),s==null)throw new Error("Missing attribute name. "+this.debugInfo(s));this.name=this.stringify.name(s),this.value=this.stringify.attValue(i),this.type=e.Attribute,this.isId=!1,this.schemaTypeInfo=null}clone(){return Object.create(this)}toString(n){return this.options.writer.attribute(this,this.options.writer.filterOptions(n))}debugInfo(n){return n=n||this.name,n==null?"parent: <"+this.parent.name+">":"attribute: {"+n+"}, parent: <"+this.parent.name+">"}isEqualNode(n){return!(n.namespaceURI!==this.namespaceURI||n.prefix!==this.prefix||n.localName!==this.localName||n.value!==this.value)}}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(t.prototype,"ownerElement",{get:function(){return this.parent}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(t.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(t.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(t.prototype,"specified",{get:function(){return!0}}),t}.call(this)}.call(R)),Dn.exports}var En={exports:{}},Ws;function Yi(){return Ws||(Ws=1,function(){En.exports=function(){class e{constructor(r){this.nodes=r}clone(){return this.nodes=null}getNamedItem(r){return this.nodes[r]}setNamedItem(r){var n;return n=this.nodes[r.nodeName],this.nodes[r.nodeName]=r,n||null}removeNamedItem(r){var n;return n=this.nodes[r],delete this.nodes[r],n||null}item(r){return this.nodes[Object.keys(this.nodes)[r]]||null}getNamedItemNS(r,n){throw new Error("This DOM method is not implemented.")}setNamedItemNS(r){throw new Error("This DOM method is not implemented.")}removeNamedItemNS(r,n){throw new Error("This DOM method is not implemented.")}}return Object.defineProperty(e.prototype,"length",{get:function(){return Object.keys(this.nodes).length||0}}),e}.call(this)}.call(R)),En.exports}var Vs;function Zi(){return Vs||(Vs=1,function(){var e,t,r,n,s,i,l,o={}.hasOwnProperty;({isObject:l,isFunction:i,getValue:s}=_e()),n=Se(),e=q(),t=Po(),r=Yi(),Sn.exports=function(){class u extends n{constructor(c,g,v){var E,L,I,j;if(super(c),g==null)throw new Error("Missing element name. "+this.debugInfo());if(this.name=this.stringify.name(g),this.type=e.Element,this.attribs={},this.schemaTypeInfo=null,v!=null&&this.attribute(v),c.type===e.Document&&(this.isRoot=!0,this.documentObject=c,c.rootObject=this,c.children)){for(j=c.children,L=0,I=j.length;L<I;L++)if(E=j[L],E.type===e.DocType){E.name=this.name;break}}}clone(){var c,g,v,E;v=Object.create(this),v.isRoot&&(v.documentObject=null),v.attribs={},E=this.attribs;for(g in E)o.call(E,g)&&(c=E[g],v.attribs[g]=c.clone());return v.children=[],this.children.forEach(function(L){var I;return I=L.clone(),I.parent=v,v.children.push(I)}),v}attribute(c,g){var v,E;if(c!=null&&(c=s(c)),l(c))for(v in c)o.call(c,v)&&(E=c[v],this.attribute(v,E));else i(g)&&(g=g.apply()),this.options.keepNullAttributes&&g==null?this.attribs[c]=new t(this,c,""):g!=null&&(this.attribs[c]=new t(this,c,g));return this}removeAttribute(c){var g,v,E;if(c==null)throw new Error("Missing attribute name. "+this.debugInfo());if(c=s(c),Array.isArray(c))for(v=0,E=c.length;v<E;v++)g=c[v],delete this.attribs[g];else delete this.attribs[c];return this}toString(c){return this.options.writer.element(this,this.options.writer.filterOptions(c))}att(c,g){return this.attribute(c,g)}a(c,g){return this.attribute(c,g)}getAttribute(c){return this.attribs.hasOwnProperty(c)?this.attribs[c].value:null}setAttribute(c,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNode(c){return this.attribs.hasOwnProperty(c)?this.attribs[c]:null}setAttributeNode(c){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeAttributeNode(c){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(c){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNS(c,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}setAttributeNS(c,g,v){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeAttributeNS(c,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}getAttributeNodeNS(c,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}setAttributeNodeNS(c){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(c,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}hasAttribute(c){return this.attribs.hasOwnProperty(c)}hasAttributeNS(c,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}setIdAttribute(c,g){return this.attribs.hasOwnProperty(c)?this.attribs[c].isId:g}setIdAttributeNS(c,g,v){throw new Error("This DOM method is not implemented."+this.debugInfo())}setIdAttributeNode(c,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(c){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(c,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByClassName(c){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(c){var g,v,E;if(!super.isEqualNode(c)||c.namespaceURI!==this.namespaceURI||c.prefix!==this.prefix||c.localName!==this.localName||c.attribs.length!==this.attribs.length)return!1;for(g=v=0,E=this.attribs.length-1;0<=E?v<=E:v>=E;g=0<=E?++v:--v)if(!this.attribs[g].isEqualNode(c.attribs[g]))return!1;return!0}}return Object.defineProperty(u.prototype,"tagName",{get:function(){return this.name}}),Object.defineProperty(u.prototype,"namespaceURI",{get:function(){return""}}),Object.defineProperty(u.prototype,"prefix",{get:function(){return""}}),Object.defineProperty(u.prototype,"localName",{get:function(){return this.name}}),Object.defineProperty(u.prototype,"id",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"className",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"classList",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(u.prototype,"attributes",{get:function(){return(!this.attributeMap||!this.attributeMap.nodes)&&(this.attributeMap=new r(this.attribs)),this.attributeMap}}),u}.call(this)}.call(R)),Sn.exports}var Nn={exports:{}},Ln={exports:{}},Qs;function Jr(){return Qs||(Qs=1,function(){var e;e=Se(),Ln.exports=function(){class t extends e{constructor(n){super(n),this.value=""}clone(){return Object.create(this)}substringData(n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendData(n){throw new Error("This DOM method is not implemented."+this.debugInfo())}insertData(n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())}deleteData(n,s){throw new Error("This DOM method is not implemented."+this.debugInfo())}replaceData(n,s,i){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(n){return!(!super.isEqualNode(n)||n.data!==this.data)}}return Object.defineProperty(t.prototype,"data",{get:function(){return this.value},set:function(r){return this.value=r||""}}),Object.defineProperty(t.prototype,"length",{get:function(){return this.value.length}}),Object.defineProperty(t.prototype,"textContent",{get:function(){return this.value},set:function(r){return this.value=r||""}}),t}.call(this)}.call(R)),Ln.exports}var $s;function Gi(){return $s||($s=1,function(){var e,t;e=q(),t=Jr(),Nn.exports=class extends t{constructor(n,s){if(super(n),s==null)throw new Error("Missing CDATA text. "+this.debugInfo());this.name="#cdata-section",this.type=e.CData,this.value=this.stringify.cdata(s)}clone(){return Object.create(this)}toString(n){return this.options.writer.cdata(this,this.options.writer.filterOptions(n))}}}.call(R)),Nn.exports}var Mn={exports:{}},Hs;function es(){return Hs||(Hs=1,function(){var e,t;e=q(),t=Jr(),Mn.exports=class extends t{constructor(n,s){if(super(n),s==null)throw new Error("Missing comment text. "+this.debugInfo());this.name="#comment",this.type=e.Comment,this.value=this.stringify.comment(s)}clone(){return Object.create(this)}toString(n){return this.options.writer.comment(this,this.options.writer.filterOptions(n))}}}.call(R)),Mn.exports}var On={exports:{}},Js;function ts(){return Js||(Js=1,function(){var e,t,r;({isObject:r}=_e()),t=Se(),e=q(),On.exports=class extends t{constructor(s,i,l,o){super(s),r(i)&&({version:i,encoding:l,standalone:o}=i),i||(i="1.0"),this.type=e.Declaration,this.version=this.stringify.xmlVersion(i),l!=null&&(this.encoding=this.stringify.xmlEncoding(l)),o!=null&&(this.standalone=this.stringify.xmlStandalone(o))}toString(s){return this.options.writer.declaration(this,this.options.writer.filterOptions(s))}}}.call(R)),On.exports}var In={exports:{}},Cn={exports:{}},Ks;function rs(){return Ks||(Ks=1,function(){var e,t;t=Se(),e=q(),Cn.exports=class extends t{constructor(n,s,i,l,o,u){if(super(n),s==null)throw new Error("Missing DTD element name. "+this.debugInfo());if(i==null)throw new Error("Missing DTD attribute name. "+this.debugInfo(s));if(!l)throw new Error("Missing DTD attribute type. "+this.debugInfo(s));if(!o)throw new Error("Missing DTD attribute default. "+this.debugInfo(s));if(o.indexOf("#")!==0&&(o="#"+o),!o.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT. "+this.debugInfo(s));if(u&&!o.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT. "+this.debugInfo(s));this.elementName=this.stringify.name(s),this.type=e.AttributeDeclaration,this.attributeName=this.stringify.name(i),this.attributeType=this.stringify.dtdAttType(l),u&&(this.defaultValue=this.stringify.dtdAttDefault(u)),this.defaultValueType=o}toString(n){return this.options.writer.dtdAttList(this,this.options.writer.filterOptions(n))}}}.call(R)),Cn.exports}var Pn={exports:{}},Ys;function ns(){return Ys||(Ys=1,function(){var e,t,r;({isObject:r}=_e()),t=Se(),e=q(),Pn.exports=function(){class n extends t{constructor(i,l,o,u){if(super(i),o==null)throw new Error("Missing DTD entity name. "+this.debugInfo(o));if(u==null)throw new Error("Missing DTD entity value. "+this.debugInfo(o));if(this.pe=!!l,this.name=this.stringify.name(o),this.type=e.EntityDeclaration,!r(u))this.value=this.stringify.dtdEntityValue(u),this.internal=!0;else{if(!u.pubID&&!u.sysID)throw new Error("Public and/or system identifiers are required for an external entity. "+this.debugInfo(o));if(u.pubID&&!u.sysID)throw new Error("System identifier is required for a public external entity. "+this.debugInfo(o));if(this.internal=!1,u.pubID!=null&&(this.pubID=this.stringify.dtdPubID(u.pubID)),u.sysID!=null&&(this.sysID=this.stringify.dtdSysID(u.sysID)),u.nData!=null&&(this.nData=this.stringify.dtdNData(u.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity. "+this.debugInfo(o))}}toString(i){return this.options.writer.dtdEntity(this,this.options.writer.filterOptions(i))}}return Object.defineProperty(n.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(n.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(n.prototype,"notationName",{get:function(){return this.nData||null}}),Object.defineProperty(n.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(n.prototype,"xmlEncoding",{get:function(){return null}}),Object.defineProperty(n.prototype,"xmlVersion",{get:function(){return null}}),n}.call(this)}.call(R)),Pn.exports}var kn={exports:{}},Zs;function is(){return Zs||(Zs=1,function(){var e,t;t=Se(),e=q(),kn.exports=class extends t{constructor(n,s,i){if(super(n),s==null)throw new Error("Missing DTD element name. "+this.debugInfo());i||(i="(#PCDATA)"),Array.isArray(i)&&(i="("+i.join(",")+")"),this.name=this.stringify.name(s),this.type=e.ElementDeclaration,this.value=this.stringify.dtdElementValue(i)}toString(n){return this.options.writer.dtdElement(this,this.options.writer.filterOptions(n))}}}.call(R)),kn.exports}var jn={exports:{}},Gs;function ss(){return Gs||(Gs=1,function(){var e,t;t=Se(),e=q(),jn.exports=function(){class r extends t{constructor(s,i,l){if(super(s),i==null)throw new Error("Missing DTD notation name. "+this.debugInfo(i));if(!l.pubID&&!l.sysID)throw new Error("Public or system identifiers are required for an external entity. "+this.debugInfo(i));this.name=this.stringify.name(i),this.type=e.NotationDeclaration,l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID))}toString(s){return this.options.writer.dtdNotation(this,this.options.writer.filterOptions(s))}}return Object.defineProperty(r.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(r.prototype,"systemId",{get:function(){return this.sysID}}),r}.call(this)}.call(R)),jn.exports}var el;function ls(){return el||(el=1,function(){var e,t,r,n,s,i,l,o;({isObject:o}=_e()),l=Se(),e=q(),t=rs(),n=ns(),r=is(),s=ss(),i=Yi(),In.exports=function(){class u extends l{constructor(c,g,v){var E,L,I,j;if(super(c),this.type=e.DocType,c.children){for(j=c.children,L=0,I=j.length;L<I;L++)if(E=j[L],E.type===e.Element){this.name=E.name;break}}this.documentObject=c,o(g)&&({pubID:g,sysID:v}=g),v==null&&([v,g]=[g,v]),g!=null&&(this.pubID=this.stringify.dtdPubID(g)),v!=null&&(this.sysID=this.stringify.dtdSysID(v))}element(c,g){var v;return v=new r(this,c,g),this.children.push(v),this}attList(c,g,v,E,L){var I;return I=new t(this,c,g,v,E,L),this.children.push(I),this}entity(c,g){var v;return v=new n(this,!1,c,g),this.children.push(v),this}pEntity(c,g){var v;return v=new n(this,!0,c,g),this.children.push(v),this}notation(c,g){var v;return v=new s(this,c,g),this.children.push(v),this}toString(c){return this.options.writer.docType(this,this.options.writer.filterOptions(c))}ele(c,g){return this.element(c,g)}att(c,g,v,E,L){return this.attList(c,g,v,E,L)}ent(c,g){return this.entity(c,g)}pent(c,g){return this.pEntity(c,g)}not(c,g){return this.notation(c,g)}up(){return this.root()||this.documentObject}isEqualNode(c){return!(!super.isEqualNode(c)||c.name!==this.name||c.publicId!==this.publicId||c.systemId!==this.systemId)}}return Object.defineProperty(u.prototype,"entities",{get:function(){var d,c,g,v,E;for(v={},E=this.children,c=0,g=E.length;c<g;c++)d=E[c],d.type===e.EntityDeclaration&&!d.pe&&(v[d.name]=d);return new i(v)}}),Object.defineProperty(u.prototype,"notations",{get:function(){var d,c,g,v,E;for(v={},E=this.children,c=0,g=E.length;c<g;c++)d=E[c],d.type===e.NotationDeclaration&&(v[d.name]=d);return new i(v)}}),Object.defineProperty(u.prototype,"publicId",{get:function(){return this.pubID}}),Object.defineProperty(u.prototype,"systemId",{get:function(){return this.sysID}}),Object.defineProperty(u.prototype,"internalSubset",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),u}.call(this)}.call(R)),In.exports}var Rn={exports:{}},tl;function os(){return tl||(tl=1,function(){var e,t;e=q(),t=Se(),Rn.exports=class extends t{constructor(n,s){if(super(n),s==null)throw new Error("Missing raw text. "+this.debugInfo());this.type=e.Raw,this.value=this.stringify.raw(s)}clone(){return Object.create(this)}toString(n){return this.options.writer.raw(this,this.options.writer.filterOptions(n))}}}.call(R)),Rn.exports}var Xn={exports:{}},rl;function us(){return rl||(rl=1,function(){var e,t;e=q(),t=Jr(),Xn.exports=function(){class r extends t{constructor(s,i){if(super(s),i==null)throw new Error("Missing element text. "+this.debugInfo());this.name="#text",this.type=e.Text,this.value=this.stringify.text(i)}clone(){return Object.create(this)}toString(s){return this.options.writer.text(this,this.options.writer.filterOptions(s))}splitText(s){throw new Error("This DOM method is not implemented."+this.debugInfo())}replaceWholeText(s){throw new Error("This DOM method is not implemented."+this.debugInfo())}}return Object.defineProperty(r.prototype,"isElementContentWhitespace",{get:function(){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),Object.defineProperty(r.prototype,"wholeText",{get:function(){var n,s,i;for(i="",s=this.previousSibling;s;)i=s.data+i,s=s.previousSibling;for(i+=this.data,n=this.nextSibling;n;)i=i+n.data,n=n.nextSibling;return i}}),r}.call(this)}.call(R)),Xn.exports}var Fn={exports:{}},nl;function as(){return nl||(nl=1,function(){var e,t;e=q(),t=Jr(),Fn.exports=class extends t{constructor(n,s,i){if(super(n),s==null)throw new Error("Missing instruction target. "+this.debugInfo());this.type=e.ProcessingInstruction,this.target=this.stringify.insTarget(s),this.name=this.target,i&&(this.value=this.stringify.insValue(i))}clone(){return Object.create(this)}toString(n){return this.options.writer.processingInstruction(this,this.options.writer.filterOptions(n))}isEqualNode(n){return!(!super.isEqualNode(n)||n.target!==this.target)}}}.call(R)),Fn.exports}var zn={exports:{}},il;function ko(){return il||(il=1,function(){var e,t;t=Se(),e=q(),zn.exports=class extends t{constructor(n){super(n),this.type=e.Dummy}clone(){return Object.create(this)}toString(n){return""}}}.call(R)),zn.exports}var Bn={exports:{}},sl;function na(){return sl||(sl=1,function(){Bn.exports=function(){class e{constructor(r){this.nodes=r}clone(){return this.nodes=null}item(r){return this.nodes[r]||null}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.nodes.length||0}}),e}.call(this)}.call(R)),Bn.exports}var _n={exports:{}},ll;function ia(){return ll||(ll=1,function(){_n.exports={Disconnected:1,Preceding:2,Following:4,Contains:8,ContainedBy:16,ImplementationSpecific:32}}.call(R)),_n.exports}var ol;function Se(){return ol||(ol=1,function(){var e,t,r,n,s,i,l,o,u,d,c,g,v,E,L,I,j={}.hasOwnProperty,x=[].splice;({isObject:I,isFunction:L,isEmpty:E,getValue:v}=_e()),o=null,r=null,n=null,s=null,i=null,c=null,g=null,d=null,l=null,t=null,u=null,e=null,xn.exports=function(){class f{constructor(a){this.parent=a,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.value=null,this.children=[],this.baseURI=null,o||(o=Zi(),r=Gi(),n=es(),s=ts(),i=ls(),c=os(),g=us(),d=as(),l=ko(),t=q(),u=na(),Yi(),e=ia())}setParent(a){var p,m,S,h,y;for(this.parent=a,a&&(this.options=a.options,this.stringify=a.stringify),h=this.children,y=[],m=0,S=h.length;m<S;m++)p=h[m],y.push(p.setParent(this));return y}element(a,p,m){var S,h,y,T,M,C,N,B,k;if(C=null,p===null&&m==null&&([p,m]=[{},null]),p==null&&(p={}),p=v(p),I(p)||([m,p]=[p,m]),a!=null&&(a=v(a)),Array.isArray(a))for(y=0,N=a.length;y<N;y++)h=a[y],C=this.element(h);else if(L(a))C=this.element(a.apply());else if(I(a)){for(M in a)if(j.call(a,M))if(k=a[M],L(k)&&(k=k.apply()),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&M.indexOf(this.stringify.convertAttKey)===0)C=this.attribute(M.substr(this.stringify.convertAttKey.length),k);else if(!this.options.separateArrayItems&&Array.isArray(k)&&E(k))C=this.dummy();else if(I(k)&&E(k))C=this.element(M);else if(!this.options.keepNullNodes&&k==null)C=this.dummy();else if(!this.options.separateArrayItems&&Array.isArray(k))for(T=0,B=k.length;T<B;T++)h=k[T],S={},S[M]=h,C=this.element(S);else I(k)?!this.options.ignoreDecorators&&this.stringify.convertTextKey&&M.indexOf(this.stringify.convertTextKey)===0?C=this.element(k):(C=this.element(M),C.element(k)):C=this.element(M,k)}else!this.options.keepNullNodes&&m===null?C=this.dummy():!this.options.ignoreDecorators&&this.stringify.convertTextKey&&a.indexOf(this.stringify.convertTextKey)===0?C=this.text(m):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&a.indexOf(this.stringify.convertCDataKey)===0?C=this.cdata(m):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&a.indexOf(this.stringify.convertCommentKey)===0?C=this.comment(m):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&a.indexOf(this.stringify.convertRawKey)===0?C=this.raw(m):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&a.indexOf(this.stringify.convertPIKey)===0?C=this.instruction(a.substr(this.stringify.convertPIKey.length),m):C=this.node(a,p,m);if(C==null)throw new Error("Could not create any elements with: "+a+". "+this.debugInfo());return C}insertBefore(a,p,m){var S,h,y,T,M;if(a!=null&&a.type)return y=a,T=p,y.setParent(this),T?(h=children.indexOf(T),M=children.splice(h),children.push(y),Array.prototype.push.apply(children,M)):children.push(y),y;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(a));return h=this.parent.children.indexOf(this),M=this.parent.children.splice(h),S=this.parent.element(a,p,m),Array.prototype.push.apply(this.parent.children,M),S}insertAfter(a,p,m){var S,h,y;if(this.isRoot)throw new Error("Cannot insert elements at root level. "+this.debugInfo(a));return h=this.parent.children.indexOf(this),y=this.parent.children.splice(h+1),S=this.parent.element(a,p,m),Array.prototype.push.apply(this.parent.children,y),S}remove(){var a;if(this.isRoot)throw new Error("Cannot remove the root element. "+this.debugInfo());return a=this.parent.children.indexOf(this),x.apply(this.parent.children,[a,a-a+1].concat([])),this.parent}node(a,p,m){var S;return a!=null&&(a=v(a)),p||(p={}),p=v(p),I(p)||([m,p]=[p,m]),S=new o(this,a,p),m!=null&&S.text(m),this.children.push(S),S}text(a){var p;return I(a)&&this.element(a),p=new g(this,a),this.children.push(p),this}cdata(a){var p;return p=new r(this,a),this.children.push(p),this}comment(a){var p;return p=new n(this,a),this.children.push(p),this}commentBefore(a){var p,m;return p=this.parent.children.indexOf(this),m=this.parent.children.splice(p),this.parent.comment(a),Array.prototype.push.apply(this.parent.children,m),this}commentAfter(a){var p,m;return p=this.parent.children.indexOf(this),m=this.parent.children.splice(p+1),this.parent.comment(a),Array.prototype.push.apply(this.parent.children,m),this}raw(a){var p;return p=new c(this,a),this.children.push(p),this}dummy(){var a;return a=new l(this),a}instruction(a,p){var m,S,h,y,T;if(a!=null&&(a=v(a)),p!=null&&(p=v(p)),Array.isArray(a))for(y=0,T=a.length;y<T;y++)m=a[y],this.instruction(m);else if(I(a))for(m in a)j.call(a,m)&&(S=a[m],this.instruction(m,S));else L(p)&&(p=p.apply()),h=new d(this,a,p),this.children.push(h);return this}instructionBefore(a,p){var m,S;return m=this.parent.children.indexOf(this),S=this.parent.children.splice(m),this.parent.instruction(a,p),Array.prototype.push.apply(this.parent.children,S),this}instructionAfter(a,p){var m,S;return m=this.parent.children.indexOf(this),S=this.parent.children.splice(m+1),this.parent.instruction(a,p),Array.prototype.push.apply(this.parent.children,S),this}declaration(a,p,m){var S,h;return S=this.document(),h=new s(S,a,p,m),S.children.length===0?S.children.unshift(h):S.children[0].type===t.Declaration?S.children[0]=h:S.children.unshift(h),S.root()||S}dtd(a,p){var m,S,h,y,T,M,C,N,B,k;for(S=this.document(),h=new i(S,a,p),B=S.children,y=T=0,C=B.length;T<C;y=++T)if(m=B[y],m.type===t.DocType)return S.children[y]=h,h;for(k=S.children,y=M=0,N=k.length;M<N;y=++M)if(m=k[y],m.isRoot)return S.children.splice(y,0,h),h;return S.children.push(h),h}up(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent}root(){var a;for(a=this;a;){if(a.type===t.Document)return a.rootObject;if(a.isRoot)return a;a=a.parent}}document(){var a;for(a=this;a;){if(a.type===t.Document)return a;a=a.parent}}end(a){return this.document().end(a)}prev(){var a;if(a=this.parent.children.indexOf(this),a<1)throw new Error("Already at the first node. "+this.debugInfo());return this.parent.children[a-1]}next(){var a;if(a=this.parent.children.indexOf(this),a===-1||a===this.parent.children.length-1)throw new Error("Already at the last node. "+this.debugInfo());return this.parent.children[a+1]}importDocument(a){var p,m,S,h,y;if(m=a.root().clone(),m.parent=this,m.isRoot=!1,this.children.push(m),this.type===t.Document&&(m.isRoot=!0,m.documentObject=this,this.rootObject=m,this.children)){for(y=this.children,S=0,h=y.length;S<h;S++)if(p=y[S],p.type===t.DocType){p.name=m.name;break}}return this}debugInfo(a){var p,m;return a=a||this.name,a==null&&!((p=this.parent)!=null&&p.name)?"":a==null?"parent: <"+this.parent.name+">":(m=this.parent)!=null&&m.name?"node: <"+a+">, parent: <"+this.parent.name+">":"node: <"+a+">"}ele(a,p,m){return this.element(a,p,m)}nod(a,p,m){return this.node(a,p,m)}txt(a){return this.text(a)}dat(a){return this.cdata(a)}com(a){return this.comment(a)}ins(a,p){return this.instruction(a,p)}doc(){return this.document()}dec(a,p,m){return this.declaration(a,p,m)}e(a,p,m){return this.element(a,p,m)}n(a,p,m){return this.node(a,p,m)}t(a){return this.text(a)}d(a){return this.cdata(a)}c(a){return this.comment(a)}r(a){return this.raw(a)}i(a,p){return this.instruction(a,p)}u(){return this.up()}importXMLBuilder(a){return this.importDocument(a)}attribute(a,p){throw new Error("attribute() applies to element nodes only.")}att(a,p){return this.attribute(a,p)}a(a,p){return this.attribute(a,p)}removeAttribute(a){throw new Error("attribute() applies to element nodes only.")}replaceChild(a,p){throw new Error("This DOM method is not implemented."+this.debugInfo())}removeChild(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}appendChild(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}hasChildNodes(){return this.children.length!==0}cloneNode(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}normalize(){throw new Error("This DOM method is not implemented."+this.debugInfo())}isSupported(a,p){return!0}hasAttributes(){return this.attribs.length!==0}compareDocumentPosition(a){var p,m;return p=this,p===a?0:this.document()!==a.document()?(m=e.Disconnected|e.ImplementationSpecific,Math.random()<.5?m|=e.Preceding:m|=e.Following,m):p.isAncestor(a)?e.Contains|e.Preceding:p.isDescendant(a)?e.Contains|e.Following:p.isPreceding(a)?e.Preceding:e.Following}isSameNode(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupPrefix(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}isDefaultNamespace(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}lookupNamespaceURI(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}isEqualNode(a){var p,m,S;if(a.nodeType!==this.nodeType||a.children.length!==this.children.length)return!1;for(p=m=0,S=this.children.length-1;0<=S?m<=S:m>=S;p=0<=S?++m:--m)if(!this.children[p].isEqualNode(a.children[p]))return!1;return!0}getFeature(a,p){throw new Error("This DOM method is not implemented."+this.debugInfo())}setUserData(a,p,m){throw new Error("This DOM method is not implemented."+this.debugInfo())}getUserData(a){throw new Error("This DOM method is not implemented."+this.debugInfo())}contains(a){return a?a===this||this.isDescendant(a):!1}isDescendant(a){var p,m,S,h,y;for(y=this.children,S=0,h=y.length;S<h;S++)if(p=y[S],a===p||(m=p.isDescendant(a),m))return!0;return!1}isAncestor(a){return a.isDescendant(this)}isPreceding(a){var p,m;return p=this.treePosition(a),m=this.treePosition(this),p===-1||m===-1?!1:p<m}isFollowing(a){var p,m;return p=this.treePosition(a),m=this.treePosition(this),p===-1||m===-1?!1:p>m}treePosition(a){var p,m;return m=0,p=!1,this.foreachTreeNode(this.document(),function(S){if(m++,!p&&S===a)return p=!0}),p?m:-1}foreachTreeNode(a,p){var m,S,h,y,T;for(a||(a=this.document()),y=a.children,S=0,h=y.length;S<h;S++){if(m=y[S],T=p(m))return T;if(T=this.foreachTreeNode(m,p),T)return T}}}return Object.defineProperty(f.prototype,"nodeName",{get:function(){return this.name}}),Object.defineProperty(f.prototype,"nodeType",{get:function(){return this.type}}),Object.defineProperty(f.prototype,"nodeValue",{get:function(){return this.value}}),Object.defineProperty(f.prototype,"parentNode",{get:function(){return this.parent}}),Object.defineProperty(f.prototype,"childNodes",{get:function(){return(!this.childNodeList||!this.childNodeList.nodes)&&(this.childNodeList=new u(this.children)),this.childNodeList}}),Object.defineProperty(f.prototype,"firstChild",{get:function(){return this.children[0]||null}}),Object.defineProperty(f.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null}}),Object.defineProperty(f.prototype,"previousSibling",{get:function(){var w;return w=this.parent.children.indexOf(this),this.parent.children[w-1]||null}}),Object.defineProperty(f.prototype,"nextSibling",{get:function(){var w;return w=this.parent.children.indexOf(this),this.parent.children[w+1]||null}}),Object.defineProperty(f.prototype,"ownerDocument",{get:function(){return this.document()||null}}),Object.defineProperty(f.prototype,"textContent",{get:function(){var w,a,p,m,S;if(this.nodeType===t.Element||this.nodeType===t.DocumentFragment){for(S="",m=this.children,a=0,p=m.length;a<p;a++)w=m[a],w.textContent&&(S+=w.textContent);return S}else return null},set:function(w){throw new Error("This DOM method is not implemented."+this.debugInfo())}}),f}.call(this)}.call(R)),xn.exports}var An={exports:{}},ul;function jo(){return ul||(ul=1,function(){var e={}.hasOwnProperty;An.exports=function(){class t{constructor(n){var s,i,l;this.assertLegalChar=this.assertLegalChar.bind(this),this.assertLegalName=this.assertLegalName.bind(this),n||(n={}),this.options=n,this.options.version||(this.options.version="1.0"),i=n.stringify||{};for(s in i)e.call(i,s)&&(l=i[s],this[s]=l)}name(n){return this.options.noValidation?n:this.assertLegalName(""+n||"")}text(n){return this.options.noValidation?n:this.assertLegalChar(this.textEscape(""+n||""))}cdata(n){return this.options.noValidation?n:(n=""+n||"",n=n.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(n))}comment(n){if(this.options.noValidation)return n;if(n=""+n||"",n.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+n);return this.assertLegalChar(n)}raw(n){return this.options.noValidation?n:""+n||""}attValue(n){return this.options.noValidation?n:this.assertLegalChar(this.attEscape(n=""+n||""))}insTarget(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}insValue(n){if(this.options.noValidation)return n;if(n=""+n||"",n.match(/\?>/))throw new Error("Invalid processing instruction value: "+n);return this.assertLegalChar(n)}xmlVersion(n){if(this.options.noValidation)return n;if(n=""+n||"",!n.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+n);return n}xmlEncoding(n){if(this.options.noValidation)return n;if(n=""+n||"",!n.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+n);return this.assertLegalChar(n)}xmlStandalone(n){return this.options.noValidation?n:n?"yes":"no"}dtdPubID(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdSysID(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdElementValue(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdAttType(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdAttDefault(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdEntityValue(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}dtdNData(n){return this.options.noValidation?n:this.assertLegalChar(""+n||"")}assertLegalChar(n){var s,i;if(this.options.noValidation)return n;if(this.options.version==="1.0"){if(s=/[\0-\x08\x0B\f\x0E-\x1F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,this.options.invalidCharReplacement!==void 0)n=n.replace(s,this.options.invalidCharReplacement);else if(i=n.match(s))throw new Error(`Invalid character in string: ${n} at index ${i.index}`)}else if(this.options.version==="1.1"){if(s=/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/g,this.options.invalidCharReplacement!==void 0)n=n.replace(s,this.options.invalidCharReplacement);else if(i=n.match(s))throw new Error(`Invalid character in string: ${n} at index ${i.index}`)}return n}assertLegalName(n){var s;if(this.options.noValidation)return n;if(n=this.assertLegalChar(n),s=/^([:A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])([\x2D\.0-:A-Z_a-z\xB7\xC0-\xD6\xD8-\xF6\xF8-\u037D\u037F-\u1FFF\u200C\u200D\u203F\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]|[\uD800-\uDB7F][\uDC00-\uDFFF])*$/,!n.match(s))throw new Error(`Invalid character in name: ${n}`);return n}textEscape(n){var s;return this.options.noValidation?n:(s=this.options.noDoubleEncoding?/(?!&(lt|gt|amp|apos|quot);)&/g:/&/g,n.replace(s,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
"))}attEscape(n){var s;return this.options.noValidation?n:(s=this.options.noDoubleEncoding?/(?!&(lt|gt|amp|apos|quot);)&/g:/&/g,n.replace(s,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
"))}}return t.prototype.convertAttKey="@",t.prototype.convertPIKey="?",t.prototype.convertTextKey="#text",t.prototype.convertCDataKey="#cdata",t.prototype.convertCommentKey="#comment",t.prototype.convertRawKey="#raw",t}.call(this)}.call(R)),An.exports}var bn={exports:{}},Un={exports:{}},qn={exports:{}},al;function Kr(){return al||(al=1,function(){qn.exports={None:0,OpenTag:1,InsideTag:2,CloseTag:3}}.call(R)),qn.exports}var cl;function Ro(){return cl||(cl=1,function(){var e,t,r,n={}.hasOwnProperty;({assign:r}=_e()),e=q(),ts(),ls(),Gi(),es(),Zi(),os(),us(),as(),ko(),rs(),is(),ns(),ss(),t=Kr(),Un.exports=class{constructor(i){var l,o,u;i||(i={}),this.options=i,o=i.writer||{};for(l in o)n.call(o,l)&&(u=o[l],this["_"+l]=this[l],this[l]=u)}filterOptions(i){var l,o,u,d,c,g,v,E,L;return i||(i={}),i=r({},this.options,i),l={writer:this},l.pretty=i.pretty||!1,l.allowEmpty=i.allowEmpty||!1,l.indent=(o=i.indent)!=null?o:" ",l.newline=(u=i.newline)!=null?u:`
`,l.offset=(d=i.offset)!=null?d:0,l.width=(c=i.width)!=null?c:0,l.dontPrettyTextNodes=(g=(v=i.dontPrettyTextNodes)!=null?v:i.dontprettytextnodes)!=null?g:0,l.spaceBeforeSlash=(E=(L=i.spaceBeforeSlash)!=null?L:i.spacebeforeslash)!=null?E:"",l.spaceBeforeSlash===!0&&(l.spaceBeforeSlash=" "),l.suppressPrettyCount=0,l.user={},l.state=t.None,l}indent(i,l,o){var u;return!l.pretty||l.suppressPrettyCount?"":l.pretty&&(u=(o||0)+l.offset+1,u>0)?new Array(u).join(l.indent):""}endline(i,l,o){return!l.pretty||l.suppressPrettyCount?"":l.newline}attribute(i,l,o){var u;return this.openAttribute(i,l,o),l.pretty&&l.width>0?u=i.name+'="'+i.value+'"':u=" "+i.name+'="'+i.value+'"',this.closeAttribute(i,l,o),u}cdata(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+"<![CDATA[",l.state=t.InsideTag,u+=i.value,l.state=t.CloseTag,u+="]]>"+this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}comment(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+"<!-- ",l.state=t.InsideTag,u+=i.value,l.state=t.CloseTag,u+=" -->"+this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}declaration(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+"<?xml",l.state=t.InsideTag,u+=' version="'+i.version+'"',i.encoding!=null&&(u+=' encoding="'+i.encoding+'"'),i.standalone!=null&&(u+=' standalone="'+i.standalone+'"'),l.state=t.CloseTag,u+=l.spaceBeforeSlash+"?>",u+=this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}docType(i,l,o){var u,d,c,g,v;if(o||(o=0),this.openNode(i,l,o),l.state=t.OpenTag,g=this.indent(i,l,o),g+="<!DOCTYPE "+i.root().name,i.pubID&&i.sysID?g+=' PUBLIC "'+i.pubID+'" "'+i.sysID+'"':i.sysID&&(g+=' SYSTEM "'+i.sysID+'"'),i.children.length>0){for(g+=" [",g+=this.endline(i,l,o),l.state=t.InsideTag,v=i.children,d=0,c=v.length;d<c;d++)u=v[d],g+=this.writeChildNode(u,l,o+1);l.state=t.CloseTag,g+="]"}return l.state=t.CloseTag,g+=l.spaceBeforeSlash+">",g+=this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),g}element(i,l,o){var u,d,c,g,v,E,L,I,j,x,f,w,a,p,m,S,h,y,T;if(o||(o=0),w=!1,this.openNode(i,l,o),l.state=t.OpenTag,a=this.indent(i,l,o)+"<"+i.name,l.pretty&&l.width>0){I=a.length,m=i.attribs;for(f in m)n.call(m,f)&&(u=m[f],p=this.attribute(u,l,o),d=p.length,I+d>l.width?(T=this.indent(i,l,o+1)+p,a+=this.endline(i,l,o)+T,I=T.length):(T=" "+p,a+=T,I+=T.length))}else{S=i.attribs;for(f in S)n.call(S,f)&&(u=S[f],a+=this.attribute(u,l,o))}if(g=i.children.length,v=g===0?null:i.children[0],g===0||i.children.every(function(M){return(M.type===e.Text||M.type===e.Raw||M.type===e.CData)&&M.value===""}))l.allowEmpty?(a+=">",l.state=t.CloseTag,a+="</"+i.name+">"+this.endline(i,l,o)):(l.state=t.CloseTag,a+=l.spaceBeforeSlash+"/>"+this.endline(i,l,o));else if(l.pretty&&g===1&&(v.type===e.Text||v.type===e.Raw||v.type===e.CData)&&v.value!=null)a+=">",l.state=t.InsideTag,l.suppressPrettyCount++,w=!0,a+=this.writeChildNode(v,l,o+1),l.suppressPrettyCount--,w=!1,l.state=t.CloseTag,a+="</"+i.name+">"+this.endline(i,l,o);else{if(l.dontPrettyTextNodes){for(h=i.children,E=0,j=h.length;E<j;E++)if(c=h[E],(c.type===e.Text||c.type===e.Raw||c.type===e.CData)&&c.value!=null){l.suppressPrettyCount++,w=!0;break}}for(a+=">"+this.endline(i,l,o),l.state=t.InsideTag,y=i.children,L=0,x=y.length;L<x;L++)c=y[L],a+=this.writeChildNode(c,l,o+1);l.state=t.CloseTag,a+=this.indent(i,l,o)+"</"+i.name+">",w&&l.suppressPrettyCount--,a+=this.endline(i,l,o),l.state=t.None}return this.closeNode(i,l,o),a}writeChildNode(i,l,o){switch(i.type){case e.CData:return this.cdata(i,l,o);case e.Comment:return this.comment(i,l,o);case e.Element:return this.element(i,l,o);case e.Raw:return this.raw(i,l,o);case e.Text:return this.text(i,l,o);case e.ProcessingInstruction:return this.processingInstruction(i,l,o);case e.Dummy:return"";case e.Declaration:return this.declaration(i,l,o);case e.DocType:return this.docType(i,l,o);case e.AttributeDeclaration:return this.dtdAttList(i,l,o);case e.ElementDeclaration:return this.dtdElement(i,l,o);case e.EntityDeclaration:return this.dtdEntity(i,l,o);case e.NotationDeclaration:return this.dtdNotation(i,l,o);default:throw new Error("Unknown XML node type: "+i.constructor.name)}}processingInstruction(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+"<?",l.state=t.InsideTag,u+=i.target,i.value&&(u+=" "+i.value),l.state=t.CloseTag,u+=l.spaceBeforeSlash+"?>",u+=this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}raw(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o),l.state=t.InsideTag,u+=i.value,l.state=t.CloseTag,u+=this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}text(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o),l.state=t.InsideTag,u+=i.value,l.state=t.CloseTag,u+=this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}dtdAttList(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+"<!ATTLIST",l.state=t.InsideTag,u+=" "+i.elementName+" "+i.attributeName+" "+i.attributeType,i.defaultValueType!=="#DEFAULT"&&(u+=" "+i.defaultValueType),i.defaultValue&&(u+=' "'+i.defaultValue+'"'),l.state=t.CloseTag,u+=l.spaceBeforeSlash+">"+this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}dtdElement(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+"<!ELEMENT",l.state=t.InsideTag,u+=" "+i.name+" "+i.value,l.state=t.CloseTag,u+=l.spaceBeforeSlash+">"+this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}dtdEntity(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+"<!ENTITY",l.state=t.InsideTag,i.pe&&(u+=" %"),u+=" "+i.name,i.value?u+=' "'+i.value+'"':(i.pubID&&i.sysID?u+=' PUBLIC "'+i.pubID+'" "'+i.sysID+'"':i.sysID&&(u+=' SYSTEM "'+i.sysID+'"'),i.nData&&(u+=" NDATA "+i.nData)),l.state=t.CloseTag,u+=l.spaceBeforeSlash+">"+this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}dtdNotation(i,l,o){var u;return this.openNode(i,l,o),l.state=t.OpenTag,u=this.indent(i,l,o)+"<!NOTATION",l.state=t.InsideTag,u+=" "+i.name,i.pubID&&i.sysID?u+=' PUBLIC "'+i.pubID+'" "'+i.sysID+'"':i.pubID?u+=' PUBLIC "'+i.pubID+'"':i.sysID&&(u+=' SYSTEM "'+i.sysID+'"'),l.state=t.CloseTag,u+=l.spaceBeforeSlash+">"+this.endline(i,l,o),l.state=t.None,this.closeNode(i,l,o),u}openNode(i,l,o){}closeNode(i,l,o){}openAttribute(i,l,o){}closeAttribute(i,l,o){}}}.call(R)),Un.exports}var hl;function cs(){return hl||(hl=1,function(){var e;e=Ro(),bn.exports=class extends e{constructor(r){super(r)}document(r,n){var s,i,l,o,u;for(n=this.filterOptions(n),o="",u=r.children,i=0,l=u.length;i<l;i++)s=u[i],o+=this.writeChildNode(s,n,0);return n.pretty&&o.slice(-n.newline.length)===n.newline&&(o=o.slice(0,-n.newline.length)),o}}}.call(R)),bn.exports}var dl;function Xo(){return dl||(dl=1,function(){var e,t,r,n,s,i,l;({isPlainObject:l}=_e()),r=Co(),t=ra(),n=Se(),e=q(),i=jo(),s=cs(),gn.exports=function(){class o extends n{constructor(d){super(null),this.name="#document",this.type=e.Document,this.documentURI=null,this.domConfig=new t,d||(d={}),d.writer||(d.writer=new s),this.options=d,this.stringify=new i(d)}end(d){var c;return c={},d?l(d)&&(c=d,d=this.options.writer):d=this.options.writer,d.document(this,d.filterOptions(c))}toString(d){return this.options.writer.document(this,this.options.writer.filterOptions(d))}createElement(d){throw new Error("This DOM method is not implemented."+this.debugInfo())}createDocumentFragment(){throw new Error("This DOM method is not implemented."+this.debugInfo())}createTextNode(d){throw new Error("This DOM method is not implemented."+this.debugInfo())}createComment(d){throw new Error("This DOM method is not implemented."+this.debugInfo())}createCDATASection(d){throw new Error("This DOM method is not implemented."+this.debugInfo())}createProcessingInstruction(d,c){throw new Error("This DOM method is not implemented."+this.debugInfo())}createAttribute(d){throw new Error("This DOM method is not implemented."+this.debugInfo())}createEntityReference(d){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagName(d){throw new Error("This DOM method is not implemented."+this.debugInfo())}importNode(d,c){throw new Error("This DOM method is not implemented."+this.debugInfo())}createElementNS(d,c){throw new Error("This DOM method is not implemented."+this.debugInfo())}createAttributeNS(d,c){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByTagNameNS(d,c){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementById(d){throw new Error("This DOM method is not implemented."+this.debugInfo())}adoptNode(d){throw new Error("This DOM method is not implemented."+this.debugInfo())}normalizeDocument(){throw new Error("This DOM method is not implemented."+this.debugInfo())}renameNode(d,c,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}getElementsByClassName(d){throw new Error("This DOM method is not implemented."+this.debugInfo())}createEvent(d){throw new Error("This DOM method is not implemented."+this.debugInfo())}createRange(){throw new Error("This DOM method is not implemented."+this.debugInfo())}createNodeIterator(d,c,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}createTreeWalker(d,c,g){throw new Error("This DOM method is not implemented."+this.debugInfo())}}return Object.defineProperty(o.prototype,"implementation",{value:new r}),Object.defineProperty(o.prototype,"doctype",{get:function(){var u,d,c,g;for(g=this.children,d=0,c=g.length;d<c;d++)if(u=g[d],u.type===e.DocType)return u;return null}}),Object.defineProperty(o.prototype,"documentElement",{get:function(){return this.rootObject||null}}),Object.defineProperty(o.prototype,"inputEncoding",{get:function(){return null}}),Object.defineProperty(o.prototype,"strictErrorChecking",{get:function(){return!1}}),Object.defineProperty(o.prototype,"xmlEncoding",{get:function(){return this.children.length!==0&&this.children[0].type===e.Declaration?this.children[0].encoding:null}}),Object.defineProperty(o.prototype,"xmlStandalone",{get:function(){return this.children.length!==0&&this.children[0].type===e.Declaration?this.children[0].standalone==="yes":!1}}),Object.defineProperty(o.prototype,"xmlVersion",{get:function(){return this.children.length!==0&&this.children[0].type===e.Declaration?this.children[0].version:"1.0"}}),Object.defineProperty(o.prototype,"URL",{get:function(){return this.documentURI}}),Object.defineProperty(o.prototype,"origin",{get:function(){return null}}),Object.defineProperty(o.prototype,"compatMode",{get:function(){return null}}),Object.defineProperty(o.prototype,"characterSet",{get:function(){return null}}),Object.defineProperty(o.prototype,"contentType",{get:function(){return null}}),o}.call(this)}.call(R)),gn.exports}var Wn={exports:{}},fl;function sa(){return fl||(fl=1,function(){var e,t,r,n,s,i,l,o,u,d,c,g,v,E,L,I,j,x,f,w,a,p,m={}.hasOwnProperty;({isObject:a,isFunction:w,isPlainObject:p,getValue:f}=_e()),e=q(),g=Xo(),v=Zi(),n=Gi(),s=es(),L=os(),x=us(),E=as(),d=ts(),c=ls(),i=rs(),o=ns(),l=is(),u=ss(),r=Po(),j=jo(),I=cs(),t=Kr(),Wn.exports=class{constructor(h,y,T){var M;this.name="?xml",this.type=e.Document,h||(h={}),M={},h.writer?p(h.writer)&&(M=h.writer,h.writer=new I):h.writer=new I,this.options=h,this.writer=h.writer,this.writerOptions=this.writer.filterOptions(M),this.stringify=new j(h),this.onDataCallback=y||function(){},this.onEndCallback=T||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}createChildNode(h){var y,T,M,C,N,B,k,fe;switch(h.type){case e.CData:this.cdata(h.value);break;case e.Comment:this.comment(h.value);break;case e.Element:M={},k=h.attribs;for(T in k)m.call(k,T)&&(y=k[T],M[T]=y.value);this.node(h.name,M);break;case e.Dummy:this.dummy();break;case e.Raw:this.raw(h.value);break;case e.Text:this.text(h.value);break;case e.ProcessingInstruction:this.instruction(h.target,h.value);break;default:throw new Error("This XML node type is not supported in a JS object: "+h.constructor.name)}for(fe=h.children,N=0,B=fe.length;N<B;N++)C=fe[N],this.createChildNode(C),C.type===e.Element&&this.up();return this}dummy(){return this}node(h,y,T){if(h==null)throw new Error("Missing node name.");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node. "+this.debugInfo(h));return this.openCurrent(),h=f(h),y==null&&(y={}),y=f(y),a(y)||([T,y]=[y,T]),this.currentNode=new v(this,h,y),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,T!=null&&this.text(T),this}element(h,y,T){var M,C,N,B,k,fe;if(this.currentNode&&this.currentNode.type===e.DocType)this.dtdElement(...arguments);else if(Array.isArray(h)||a(h)||w(h))for(B=this.options.noValidation,this.options.noValidation=!0,fe=new g(this.options).element("TEMP_ROOT"),fe.element(h),this.options.noValidation=B,k=fe.children,C=0,N=k.length;C<N;C++)M=k[C],this.createChildNode(M),M.type===e.Element&&this.up();else this.node(h,y,T);return this}attribute(h,y){var T,M;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode. "+this.debugInfo(h));if(h!=null&&(h=f(h)),a(h))for(T in h)m.call(h,T)&&(M=h[T],this.attribute(T,M));else w(y)&&(y=y.apply()),this.options.keepNullAttributes&&y==null?this.currentNode.attribs[h]=new r(this,h,""):y!=null&&(this.currentNode.attribs[h]=new r(this,h,y));return this}text(h){var y;return this.openCurrent(),y=new x(this,h),this.onData(this.writer.text(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}cdata(h){var y;return this.openCurrent(),y=new n(this,h),this.onData(this.writer.cdata(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}comment(h){var y;return this.openCurrent(),y=new s(this,h),this.onData(this.writer.comment(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}raw(h){var y;return this.openCurrent(),y=new L(this,h),this.onData(this.writer.raw(y,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}instruction(h,y){var T,M,C,N,B;if(this.openCurrent(),h!=null&&(h=f(h)),y!=null&&(y=f(y)),Array.isArray(h))for(T=0,N=h.length;T<N;T++)M=h[T],this.instruction(M);else if(a(h))for(M in h)m.call(h,M)&&(C=h[M],this.instruction(M,C));else w(y)&&(y=y.apply()),B=new E(this,h,y),this.onData(this.writer.processingInstruction(B,this.writerOptions,this.currentLevel+1),this.currentLevel+1);return this}declaration(h,y,T){var M;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node.");return M=new d(this,h,y,T),this.onData(this.writer.declaration(M,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}doctype(h,y,T){if(this.openCurrent(),h==null)throw new Error("Missing root node name.");if(this.root)throw new Error("dtd() must come before the root node.");return this.currentNode=new c(this,y,T),this.currentNode.rootNodeName=h,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this}dtdElement(h,y){var T;return this.openCurrent(),T=new l(this,h,y),this.onData(this.writer.dtdElement(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}attList(h,y,T,M,C){var N;return this.openCurrent(),N=new i(this,h,y,T,M,C),this.onData(this.writer.dtdAttList(N,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}entity(h,y){var T;return this.openCurrent(),T=new o(this,!1,h,y),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}pEntity(h,y){var T;return this.openCurrent(),T=new o(this,!0,h,y),this.onData(this.writer.dtdEntity(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}notation(h,y){var T;return this.openCurrent(),T=new u(this,h,y),this.onData(this.writer.dtdNotation(T,this.writerOptions,this.currentLevel+1),this.currentLevel+1),this}up(){if(this.currentLevel<0)throw new Error("The document node has no parent.");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this}end(){for(;this.currentLevel>=0;)this.up();return this.onEnd()}openCurrent(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)}openNode(h){var y,T,M,C;if(!h.isOpen){if(!this.root&&this.currentLevel===0&&h.type===e.Element&&(this.root=h),T="",h.type===e.Element){this.writerOptions.state=t.OpenTag,T=this.writer.indent(h,this.writerOptions,this.currentLevel)+"<"+h.name,C=h.attribs;for(M in C)m.call(C,M)&&(y=C[M],T+=this.writer.attribute(y,this.writerOptions,this.currentLevel));T+=(h.children?">":"/>")+this.writer.endline(h,this.writerOptions,this.currentLevel),this.writerOptions.state=t.InsideTag}else this.writerOptions.state=t.OpenTag,T=this.writer.indent(h,this.writerOptions,this.currentLevel)+"<!DOCTYPE "+h.rootNodeName,h.pubID&&h.sysID?T+=' PUBLIC "'+h.pubID+'" "'+h.sysID+'"':h.sysID&&(T+=' SYSTEM "'+h.sysID+'"'),h.children?(T+=" [",this.writerOptions.state=t.InsideTag):(this.writerOptions.state=t.CloseTag,T+=">"),T+=this.writer.endline(h,this.writerOptions,this.currentLevel);return this.onData(T,this.currentLevel),h.isOpen=!0}}closeNode(h){var y;if(!h.isClosed)return y="",this.writerOptions.state=t.CloseTag,h.type===e.Element?y=this.writer.indent(h,this.writerOptions,this.currentLevel)+"</"+h.name+">"+this.writer.endline(h,this.writerOptions,this.currentLevel):y=this.writer.indent(h,this.writerOptions,this.currentLevel)+"]>"+this.writer.endline(h,this.writerOptions,this.currentLevel),this.writerOptions.state=t.None,this.onData(y,this.currentLevel),h.isClosed=!0}onData(h,y){return this.documentStarted=!0,this.onDataCallback(h,y+1)}onEnd(){return this.documentCompleted=!0,this.onEndCallback()}debugInfo(h){return h==null?"":"node: <"+h+">"}ele(){return this.element(...arguments)}nod(h,y,T){return this.node(h,y,T)}txt(h){return this.text(h)}dat(h){return this.cdata(h)}com(h){return this.comment(h)}ins(h,y){return this.instruction(h,y)}dec(h,y,T){return this.declaration(h,y,T)}dtd(h,y,T){return this.doctype(h,y,T)}e(h,y,T){return this.element(h,y,T)}n(h,y,T){return this.node(h,y,T)}t(h){return this.text(h)}d(h){return this.cdata(h)}c(h){return this.comment(h)}r(h){return this.raw(h)}i(h,y){return this.instruction(h,y)}att(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList(...arguments):this.attribute(...arguments)}a(){return this.currentNode&&this.currentNode.type===e.DocType?this.attList(...arguments):this.attribute(...arguments)}ent(h,y){return this.entity(h,y)}pent(h,y){return this.pEntity(h,y)}not(h,y){return this.notation(h,y)}}}.call(R)),Wn.exports}var Vn={exports:{}},pl;function la(){return pl||(pl=1,function(){var e,t,r,n={}.hasOwnProperty;e=q(),r=Ro(),t=Kr(),Vn.exports=class extends r{constructor(i,l){super(l),this.stream=i}endline(i,l,o){return i.isLastRootNode&&l.state===t.CloseTag?"":super.endline(i,l,o)}document(i,l){var o,u,d,c,g,v,E,L,I;for(E=i.children,u=d=0,g=E.length;d<g;u=++d)o=E[u],o.isLastRootNode=u===i.children.length-1;for(l=this.filterOptions(l),L=i.children,I=[],c=0,v=L.length;c<v;c++)o=L[c],I.push(this.writeChildNode(o,l,0));return I}cdata(i,l,o){return this.stream.write(super.cdata(i,l,o))}comment(i,l,o){return this.stream.write(super.comment(i,l,o))}declaration(i,l,o){return this.stream.write(super.declaration(i,l,o))}docType(i,l,o){var u,d,c,g;if(o||(o=0),this.openNode(i,l,o),l.state=t.OpenTag,this.stream.write(this.indent(i,l,o)),this.stream.write("<!DOCTYPE "+i.root().name),i.pubID&&i.sysID?this.stream.write(' PUBLIC "'+i.pubID+'" "'+i.sysID+'"'):i.sysID&&this.stream.write(' SYSTEM "'+i.sysID+'"'),i.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(i,l,o)),l.state=t.InsideTag,g=i.children,d=0,c=g.length;d<c;d++)u=g[d],this.writeChildNode(u,l,o+1);l.state=t.CloseTag,this.stream.write("]")}return l.state=t.CloseTag,this.stream.write(l.spaceBeforeSlash+">"),this.stream.write(this.endline(i,l,o)),l.state=t.None,this.closeNode(i,l,o)}element(i,l,o){var u,d,c,g,v,E,L,I,j,x,f,w,a,p,m;if(o||(o=0),this.openNode(i,l,o),l.state=t.OpenTag,x=this.indent(i,l,o)+"<"+i.name,l.pretty&&l.width>0){L=x.length,w=i.attribs;for(j in w)n.call(w,j)&&(u=w[j],f=this.attribute(u,l,o),d=f.length,L+d>l.width?(m=this.indent(i,l,o+1)+f,x+=this.endline(i,l,o)+m,L=m.length):(m=" "+f,x+=m,L+=m.length))}else{a=i.attribs;for(j in a)n.call(a,j)&&(u=a[j],x+=this.attribute(u,l,o))}if(this.stream.write(x),g=i.children.length,v=g===0?null:i.children[0],g===0||i.children.every(function(S){return(S.type===e.Text||S.type===e.Raw||S.type===e.CData)&&S.value===""}))l.allowEmpty?(this.stream.write(">"),l.state=t.CloseTag,this.stream.write("</"+i.name+">")):(l.state=t.CloseTag,this.stream.write(l.spaceBeforeSlash+"/>"));else if(l.pretty&&g===1&&(v.type===e.Text||v.type===e.Raw||v.type===e.CData)&&v.value!=null)this.stream.write(">"),l.state=t.InsideTag,l.suppressPrettyCount++,this.writeChildNode(v,l,o+1),l.suppressPrettyCount--,l.state=t.CloseTag,this.stream.write("</"+i.name+">");else{for(this.stream.write(">"+this.endline(i,l,o)),l.state=t.InsideTag,p=i.children,E=0,I=p.length;E<I;E++)c=p[E],this.writeChildNode(c,l,o+1);l.state=t.CloseTag,this.stream.write(this.indent(i,l,o)+"</"+i.name+">")}return this.stream.write(this.endline(i,l,o)),l.state=t.None,this.closeNode(i,l,o)}processingInstruction(i,l,o){return this.stream.write(super.processingInstruction(i,l,o))}raw(i,l,o){return this.stream.write(super.raw(i,l,o))}text(i,l,o){return this.stream.write(super.text(i,l,o))}dtdAttList(i,l,o){return this.stream.write(super.dtdAttList(i,l,o))}dtdElement(i,l,o){return this.stream.write(super.dtdElement(i,l,o))}dtdEntity(i,l,o){return this.stream.write(super.dtdEntity(i,l,o))}dtdNotation(i,l,o){return this.stream.write(super.dtdNotation(i,l,o))}}}.call(R)),Vn.exports}(function(){var e,t,r,n,s,i,l,o,u;({assign:o,isFunction:u}=_e()),r=Co(),n=Xo(),s=sa(),l=cs(),i=la(),e=q(),t=Kr(),Ae.create=function(d,c,g,v){var E,L;if(d==null)throw new Error("Root element needs a name.");return v=o({},c,g,v),E=new n(v),L=E.element(d),v.headless||(E.declaration(v),(v.pubID!=null||v.sysID!=null)&&E.dtd(v)),L},Ae.begin=function(d,c,g){return u(d)&&([c,g]=[d,c],d={}),c?new s(d,c,g):new n(d)},Ae.stringWriter=function(d){return new l(d)},Ae.streamWriter=function(d,c){return new i(d,c)},Ae.implementation=new r,Ae.nodeType=e,Ae.writerState=t}).call(R);const Fo=(e,t,r=!1)=>{const{type:n,props:s,children:i}=t,l=i||[],o=l[0];if(l.length===1&&typeof o=="string"){e.ele(n,s,o);return}let u=null;r?Object.keys(s).map(d=>{e.att(d,s[d])}):u=e.ele(n,s),l.forEach(d=>{if(typeof d=="string")throw new Error("Invaild XML");Fo(u||e,d)})},oa=e=>{const t=Gu.create(e).toJSON();if(!t)throw new Error("Element is invalid");const r=Ae.create(t.type);return Fo(r,t,!0),r.end({pretty:!0}),r.toString({pretty:!0})};function ua(e){return{alter:e.alter,step:"CDEFGAB"[(e.note+98)%7],octave:Math.floor(e.note/7)+4}}function aa(e){const t=[O.f,O.p,O.m,O.r,O.s,O.z],r=["p","pp","ppp","pppp","ppppp","pppppp","f","ff","fff","ffff","fffff","ffffff","m","mp","mf","sf","sfp","sfpp","fp","rf","rfz","sfz","sffz","fz","n","pf","sfzp","other-dynamics"],n=e.filter(i=>t.includes(i.type)),s=n.sort((i,l)=>i.x-l.x).map(i=>i.type).join("");if(n&&n.length>0){if(r.includes(s))return{type:s,direction:{"^":"above",_:"below"}[n[0].direction]};console.error("无法识别的力度记号",s)}}function ca(e){return{10:"1024th",9:"512th",8:"256th",7:"128th",6:"64th",5:"32nd",4:"16th",3:"eighth",2:"quarter",1:"half",0:"whole"}[e]}class _a{title;pageSize;unitSize;staffLayout;paperOptions;headers;voiceStaves;score;workTitle="";partBuilders=[];constructor(t){Object.assign(this,t);const r=this.voiceStaves;for(const[n,s]of this.partTemplate.entries()){const i=this.ensurePartBuilder(n,s);for(const l of s.map(o=>r[o]))for(const[o,u]of l.voices.entries())for(const[d,c]of u.measures.entries())i.ensureMeasureBuilder(d).addVoice({...c,voiceIndexOfStaff:o})}}get partTemplate(){return this.staffLayout.partGroups.map(t=>t.range[0]===t.range[1]?[t.range[0]]:t.range)}ensurePartBuilder(t,r){for(;this.partBuilders.length<=t;){const n=new ha({parent:this,template:r});this.partBuilders.push(n)}return this.partBuilders[t]}createPartListElement(){return D.jsx("part-list",{children:this.partBuilders.map(t=>D.jsx("score-part",{id:t.id,children:D.jsx("part-name",{"print-object":"no",children:t.name})}))})}toJSX(){const t=new Date;return`${t.getFullYear()}${String(t.getMonth()+1).padStart(2,"0")}${String(t.getDate()).padStart(2,"0")}`,D.jsxs("score-partwise",{version:"4.0",children:[D.jsx("work",{children:D.jsx("work-title",{children:this.workTitle})}),D.jsx("movement-title",{children:this.workTitle}),D.jsx("defaults",{children:D.jsxs("scaling",{children:[D.jsx("millimeters",{children:"8"}),D.jsx("tenths",{children:Ho})]})}),D.jsx("part-list",{children:this.partBuilders.map(r=>D.jsx("score-part",{id:r.id,children:D.jsx("part-name",{"print-object":"no",children:"MusicXML Part"})}))}),this.partBuilders.map(r=>r.toJSX())]})}toString(){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 4.0 Partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">
${oa(this.toJSX())}
`}}class ha{parent;name;measureBuilders=[];staffContexts=[];template;get id(){return`P${this.parent.partBuilders.indexOf(this)+1}`}get stavesCount(){return this.template.length}constructor(t){Object.assign(this,t)}ensureStaffContext(t){for(;this.staffContexts.length<=t;){const r=new pa({parent:this,index:t});this.staffContexts.push(r)}return this.staffContexts[t]}ensureMeasureBuilder(t){for(;this.measureBuilders.length<=t;){const r=new da({parent:this});this.measureBuilders.push(r)}return this.measureBuilders[t]}toJSX(){return D.jsx("part",{id:this.id,children:this.measureBuilders.map((t,r)=>t.toJSX())})}}class da{parent;voiceBuilders=[];beamCount=0;beamState;get index(){return this.parent.measureBuilders.indexOf(this)}get score(){return this.parent.parent.score}constructor(t){Object.assign(this,t)}addVoice(t){const r=new fa({parent:this,voice:t});this.voiceBuilders.push(r),t.contextedTerms.filter(i=>i.type===Qo.Clef).forEach(i=>{const l={[O.ClefC]:"C",[O.ClefF]:"F",[O.ClefG]:"G"}[i.tokenType];l||console.error("unknown Clef",i.tokenType);const o=this.parent.ensureStaffContext(i.staff);o.addClef(new zo({parent:o,measureIndex:this.index,tick:i.tick,number:i.staff-this.parent.template[0],sign:l,line:3-i.y})),o.addKey(new Bo({parent:o,measureIndex:this.index,fifths:t.keySignature})),o.addTime(new _o({parent:o,measureIndex:this.index,beats:t.timeSignature.numerator,beatType:t.timeSignature.denominator,timeSigNumeric:t.timeSigNumeric}))});const n={[O.OctaveShift8va]:8,[O.OctaveShift8vb]:-8,[O.OctaveShift0]:0},s=Object.keys(n);t.contextedTerms.forEach(i=>{s.includes(i.tokenType)&&this.parent.ensureStaffContext(i.staff).addOctaveShiftTerm(i,this.index)})}toJSX(){const t=this.score.pages.reduce((r,n)=>[...r,...n.systems.reduce((s,i)=>[...s,...i.measureBars],[])],[]);return this.beamCount=0,D.jsxs("measure",{number:this.index+1,width:Math.round(t[this.index]*10),children:[this.index===0&&D.jsx(D.Fragment,{children:this.parent.staffContexts.map(r=>{var n;return r.clefBuilders.length>0?D.jsx("attributes",{children:(n=r.clefBuilders)==null?void 0:n[0].toJSX()}):null})}),this.voiceBuilders.reduce((r,n,s)=>{var i,l;return r.push(...n.toJSX()),(l=(i=this.voiceBuilders[s+1])==null?void 0:i.toJSX)!=null&&l.call(i)&&r.push(D.jsx("backup",{children:D.jsx("duration",{children:n.voice.duration})})),r},[])]})}}class fa{parent;voice;get index(){return this.parent.voiceBuilders.indexOf(this)}constructor(t){Object.assign(this,t)}toJSX(){const t=[],r={[O.AccNatural]:0,[O.AccSharp]:1,[O.AccDoublesharp]:2,[O.AccFlat]:-1,[O.AccFlatflat]:-1,[O.KeyNatural]:0,[O.KeySharp]:1,[O.KeyFlat]:-1},n=Object.keys(r),s=this.voice.contextedTerms.reduce((l,o)=>{if(n.includes(o.tokenType)){const u=l.findIndex(d=>d.x===o.x&&d.y===o.y);u>-1?l.splice(u,1):l.push(o)}return l},[]),i=Object.entries(this.voice.tickMap).map(([l,o])=>[Number(l),o]).sort(([l],[o])=>l-o);return i.forEach(([l,o])=>{const u=s.filter(d=>d.tick===l);u.length>0&&u.forEach(d=>{var g;const c=(g=o.ys)==null?void 0:g.findIndex(v=>v===d.y);c>-1&&(o.pitches[c].accidental=r[d.tokenType])})}),i.forEach(([l,o],u)=>{var c,g,v,E,L;const d=this.parent.parent.ensureStaffContext(o.staff||0);if(o instanceof $o){const I=d.lookupDivisions(this.parent.index),j=d.lookupStaves(this.parent.index),x=d.lookupClef(this.parent.index,+l),f=d.lookupKey(this.parent.index),w=d.lookupTime(this.parent.index),a=[I,f,w,j,x].filter(Boolean).map(N=>N.toJSX());u===0&&this.index===0&&a.length>0&&t.push(D.jsx("attributes",{children:a}));const p=[],m=[];m.push(...new ya(o.accessories).toJSX()||[]),m.length>0&&p.push(D.jsx("technical",{children:m}));const S=[];o.accessories.some(N=>N.type===O.ScriptStaccato)&&S.push(D.jsx("staccato",{})),o.accessories.some(N=>N.type===O.ScriptSforzato)&&S.push(D.jsx("accent",{})),o.accessories.some(N=>N.type===O.ScriptStaccatissimo)&&S.push(D.jsx("spiccato",{})),o.accessories.some(N=>N.type===O.ScriptMarcato)&&S.push(D.jsx("strong-accent",{})),o.accessories.some(N=>N.type===O.ScriptTenuto)&&S.push(D.jsx("tenuto",{})),S.length>0&&p.push(D.jsx("articulations",{children:S}));const h=o.accessories.find(N=>N.type===O.ScriptFermata);h&&p.push(D.jsx("fermata",{type:{[be.Up]:"upright",[be.Down]:"inverted"}[h.direction]})),o.accessories.some(N=>N.type===O.SlurBegin)&&o.accessories.filter(N=>N.type===O.SlurBegin).forEach(N=>{p.push(D.jsx("slur",{"default-x":(o.x+N.x).toFixed(2),placement:{[be.Up]:"above",[be.Down]:"below"}[N.direction],type:"start"}))}),o.accessories.some(N=>N.type===O.SlurEnd)&&o.accessories.filter(N=>N.type===O.SlurEnd).forEach(N=>{p.push(D.jsx("slur",{"default-x":(o.x+N.x).toFixed(2),number:"1",placement:{[be.Up]:"above",[be.Down]:"below"}[N.direction],type:"stop"}))}),o.accessories.some(N=>N.type===O.TieBegin)&&o.accessories.filter(N=>N.type===O.TieBegin).forEach(N=>{p.push(D.jsx("tied",{type:"start"}))}),o.accessories.some(N=>N.type===O.TieEnd)&&o.accessories.filter(N=>N.type===O.TieEnd).forEach(N=>{p.push(D.jsx("tied",{type:"stop"}))});const y=[];o.accessories.some(N=>N.type===O.ScriptTurn)&&y.push(D.jsx("turn",{})),o.accessories.some(N=>N.type===O.ScriptTrill)&&y.push(D.jsx("trill-mark",{})),o.accessories.some(N=>N.type===O.ScriptMordent)&&y.push(D.jsx("mordent",{})),o.accessories.some(N=>N.type===O.ScriptPortato)&&y.push(D.jsx("inverted-mordent",{})),y.length>0&&p.push(D.jsx("ornaments",{children:y}));const T=ca(o.division);if(this.index===0){const N=o.staff-this.parent.parent.template[0]+1,B=aa(o.accessories);if(B){const ne=B.type;t.push(D.jsxs("direction",{placement:B.direction??"below",children:[D.jsx("direction-type",{children:D.jsx("dynamics",{children:Wo.createElement(ne)})}),D.jsx("staff",{children:N})]}))}const k=o.accessories.find(ne=>ne.type===O.WedgeCrescendo),fe=o.accessories.find(ne=>ne.type===O.WedgeDiminuendo),Pt=o.accessories.find(ne=>ne.type===O.WedgeClose);k&&t.push(D.jsxs("direction",{placement:"below",children:[D.jsx("direction-type",{children:D.jsx("wedge",{type:"crescendo"})}),D.jsx("staff",{children:N})]})),fe&&t.push(D.jsxs("direction",{placement:"below",children:[D.jsx("direction-type",{children:D.jsx("wedge",{type:"diminuendo"})}),D.jsx("staff",{children:N})]})),Pt&&t.push(D.jsxs("direction",{children:[D.jsx("direction-type",{children:D.jsx("wedge",{type:"stop"})}),D.jsx("staff",{children:N})]})),o.accessories.some(ne=>ne.type===O.PedalPed)&&t.push(D.jsxs("direction",{children:[D.jsx("direction-type",{children:D.jsx("pedal",{type:"start",sign:"yes"})}),D.jsx("staff",{children:N})]})),o.accessories.some(ne=>ne.type===O.PedalStar)&&t.push(D.jsxs("direction",{children:[D.jsx("direction-type",{children:D.jsx("pedal",{type:"stop",sign:"yes"})}),D.jsx("staff",{children:N})]}));const gt=(g=(c=d.lookupOctaveShift(this.parent.index))==null?void 0:c.getJSX)==null?void 0:g.call(c,o.tick);gt&&t.push(gt)}if(o.pitches){const N=o.pitches.length>1;(v=o.pitches)==null||v.forEach((B,k)=>{const{alter:fe,step:Pt,octave:gt}=ua(B),ne={u:"up",d:"down"}[o.stemDirection];if(!this.voice.empty){let Zt=null;switch(o.beam){case"Open":Zt=D.jsx("beam",{number:"1",children:"begin"}),this.parent.beamState=o.beam;break;case"Close":Zt=D.jsx("beam",{number:"1",children:"end"}),this.parent.beamCount+=1,this.parent.beamState=o.beam;break;default:this.parent.beamState==="Open"&&(Zt=D.jsx("beam",{number:"1",children:"continue"}));break}const Ao=o.staff-this.parent.parent.template[0]+1;t.push(D.jsxs("note",{children:[o.grace&&D.jsx("grace",{"steal-time-following":o.duration}),N&&k!==0&&D.jsx("chord",{}),!o.rest&&D.jsxs("pitch",{children:[D.jsx("step",{children:Pt}),fe!==0&&D.jsx("alter",{children:fe}),D.jsx("octave",{children:gt})]}),o.rest==="r"&&D.jsxs("rest",{children:[D.jsx("display-step",{children:Pt}),D.jsx("display-octave",{children:gt})]}),o.rest==="R"&&D.jsxs("rest",{measure:"yes",children:[D.jsx("display-step",{children:Pt}),D.jsx("display-octave",{children:gt})]}),o.grace?null:D.jsx("duration",{children:o.duration}),D.jsx("voice",{children:this.index+1}),D.jsx("type",{children:T}),Array(o.dots).fill(null).map(()=>D.jsx("dot",{})),new xa(B.accidental).toJSX(),o.timeWarp&&new va(o.timeWarp).toJSX(),ne?D.jsx("stem",{children:ne}):null,D.jsx("staff",{children:Ao}),Zt,k===0?p.length>0&&D.jsx("notations",{children:p}):null]}))}})}if(this.index===0&&u===i.length-1){const N=d.getCurrentTime(this.parent.index);if(N){const B=(L=(E=d.lookupOctaveShift(this.parent.index))==null?void 0:E.getJSX)==null?void 0:L.call(E,gl*N.beatType/4*N.beats);B&&t.push(B)}}const M=Math.max(...d.clefBuilders.map(N=>N.tick)),C=Math.max(...Object.keys(this.voice.tickMap).map(N=>+N));if(M>=C){const N=d.lookupClef(this.parent.index,M);N&&t.push(D.jsx("attributes",{children:N.toJSX()}))}}}),t}}class pa{parent;index;divisionsBuilder=new ma({value:gl});clefBuilders=[];keyBuilders=[];timeBuilders=[];octave;tied;beamCount=0;octaveShiftBuilders=[];constructor(t){Object.assign(this,t)}lookupDivisions(t){return t===0?this.divisionsBuilder:null}lookupStaves(t){return t===0?new ga({value:this.parent.stavesCount}):null}addClef(t){this.lookupClef(t.measureIndex,t.tick)||this.clefBuilders.length>0&&zo.equals(this.clefBuilders[this.clefBuilders.length-1],t)||this.clefBuilders.push(t)}lookupClef(t,r){const n=this.clefBuilders.filter(s=>s.measureIndex===t&&s.tick===r);return n.length>0?n[0]:null}addKey(t){this.lookupKey(t.measureIndex)||this.keyBuilders.length>0&&Bo.equals(this.keyBuilders[this.keyBuilders.length-1],t)||this.keyBuilders.push(t)}lookupKey(t){const r=this.keyBuilders.filter(n=>n.measureIndex===t);return r.length>0?r[0]:null}addTime(t){this.lookupTime(t.measureIndex)||this.timeBuilders.length>0&&_o.equals(this.timeBuilders[this.timeBuilders.length-1],t)||this.timeBuilders.push(t)}lookupTime(t){const r=this.timeBuilders.filter(n=>n.measureIndex===t);return r.length>0?r[0]:null}getCurrentTime(t){const r=this.timeBuilders.filter(n=>n.measureIndex<=t);return r.sort((n,s)=>n.measureIndex-s.measureIndex),r[r.length-1]}addOctaveShiftTerm(t,r){let n=this.octaveShiftBuilders.find(s=>s.measureIndex===r);n||(n=new Sa({parent:this,measureIndex:r}),this.octaveShiftBuilders.push(n)),n.addTerm(t)}lookupOctaveShift(t){const r=this.octaveShiftBuilders.filter(n=>n.measureIndex===t);return r.length>0?r[0]:null}}class zo{parent;measureIndex;tick;number;sign;line;size="full";afterBarline=!0;additional=!1;constructor(t){Object.assign(this,t)}static equals(t,r){return t&&r&&t.number===r.number&&t.sign===r.sign&&t.line===r.line&&t.size===r.size}toJSX(){return D.jsxs("clef",{number:this.number+1,size:this.size,additional:this.additional?"yes":"no","after-barline":this.afterBarline?"yes":"no",children:[D.jsx("sign",{children:this.sign}),D.jsx("line",{children:this.line})]})}}class Bo{parent;measureIndex;fifths;mode;constructor(t){Object.assign(this,t)}static equals(t,r){return t&&r&&t.fifths===r.fifths&&t.mode===r.mode}toJSX(){return D.jsxs("key",{children:[D.jsx("fifths",{children:this.fifths}),this.mode?D.jsx("mode",{children:this.mode}):null]})}}class _o{parent;measureIndex;beats;beatType;timeSigNumeric;constructor(t){Object.assign(this,t)}static equals(t,r){return t&&r&&t.beats===r.beats&&t.beatType===r.beatType}toJSX(){const t={};return this.beats===2&&this.beatType===2&&(t.symbol="cut"),this.beats===4&&this.beatType===4&&(t.symbol="common"),D.jsxs("time",{...t,children:[D.jsx("beats",{children:this.beats}),D.jsx("beat-type",{children:this.beatType})]})}}class ma{value;constructor(t){Object.assign(this,t)}toJSX(){return D.jsx("divisions",{children:this.value})}}class ga{value;constructor(t){Object.assign(this,t)}toJSX(){return D.jsx("staves",{children:this.value})}}const ml={[O.Zero]:0,[O.One]:1,[O.Two]:2,[O.Three]:3,[O.Four]:4,[O.Five]:5,[O.Six]:6,[O.Seven]:7,[O.Eight]:8,[O.Nine]:9};class ya{value;placement;data;constructor(t){this.data=t}toJSX(){const t=Object.keys(ml),r=this.data.filter(n=>t.includes(n.type));return r.length>0?r.map(n=>D.jsx("fingering",{placement:{[be.Up]:"above",[be.Down]:"below"}[n.direction],children:ml[n.type]})):null}}class va{timeWarp;constructor(t){this.timeWarp=t}toJSX(){return D.jsxs("time-modification",{children:[D.jsx("actual-notes",{children:this.timeWarp.denominator}),D.jsx("normal-notes",{children:this.timeWarp.numerator})]})}}const wa={"-2":"flat-flat","-1":"flat",0:"natural",1:"sharp",2:"double-sharp"};class xa{alter;constructor(t){this.alter=t}toJSX(){return typeof this.alter=="number"?D.jsx("accidental",{children:wa[this.alter]}):null}}class Sa{parent;measureIndex;number;terms=[];constructor(t){Object.assign(this,t)}addTerm(t){this.terms.find(r=>r.tick===t.tick)||this.terms.push(t)}getJSX(t){const r=this.terms.find(s=>s.tick===t);if(!r)return null;let n="up";switch(r.tokenType){case O.OctaveShift8vb:n="up";break;case O.OctaveShift8va:n="down";break;case O.OctaveShift0:n="stop";break}return D.jsxs("direction",{children:[D.jsx("direction-type",{children:D.jsx("octave-shift",{size:"8",type:n,number:"1"})}),D.jsx("staff",{children:this.parent.parent.template.indexOf(this.parent.index)+1})]})}validate(){if(this.terms.length===0)return!0;this.terms.sort((n,s)=>n.tick-s.tick);const t=[],r=[];for(let n of this.terms)[O.OctaveShift8va,O.OctaveShift8vb].includes(n.tokenType)&&r.push(n),O.OctaveShift0===n.tokenType&&(r.push(n),t.push([...r]),r.length=0);return t.some(n=>n.length!==2)||r.length===1?(console.error("八度记号配对错误"),!1):!0}toJSX(){}}export{_a as S};
|