nexgui4 1.0.4 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- !function(e,t,g,n){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var C=Object.create,I=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,i=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__commonJSMin=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),__copyProps=(e,t,g,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var C,i=a(t),l=0,c=i.length;l<c;l++)C=i[l],s.call(e,C)||C===g||I(e,C,{get:(e=>t[e]).bind(null,C),enumerable:!(n=o(t,C))||n.enumerable});return e},__toESM=(e,t,g)=>(g=null!=e?C(i(e)):{},__copyProps(!t&&e&&e.__esModule?g:I(g,"default",{value:e,enumerable:!0}),e));let l=__toESM(t,1);t=__toESM(t);let c=__toESM(n,1);n=__toESM(n);var u=Symbol.for("immer-nothing"),d=Symbol.for("immer-draftable"),p=Symbol.for("immer-state");function die(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var m=Object,h=m.getPrototypeOf,y="constructor",b="prototype",v="configurable",x="enumerable",S="writable",w="value",isDraft=e=>!!e&&!!e[p];function isDraftable(e){return!!e&&(isPlainObject$2(e)||M(e)||!!e[d]||!!e[y]?.[d]||isMap(e)||isSet(e))}var E=m[b][y].toString(),R=new WeakMap;function isPlainObject$2(e){if(!e||!isObjectish(e))return!1;const t=h(e);if(null===t||t===m[b])return!0;const g=m.hasOwnProperty.call(t,y)&&t[y];if(g===Object)return!0;if(!isFunction(g))return!1;let n=R.get(g);return void 0===n&&(n=Function.toString.call(g),R.set(g,n)),n===E}function each(e,t,g=!0){0===getArchtype(e)?(g?Reflect.ownKeys(e):m.keys(e)).forEach(g=>{t(g,e[g],e)}):e.forEach((g,n)=>t(n,g,e))}function getArchtype(e){const t=e[p];return t?t.type_:M(e)?1:isMap(e)?2:isSet(e)?3:0}var has=(e,t,g=getArchtype(e))=>2===g?e.has(t):m[b].hasOwnProperty.call(e,t),get=(e,t,g=getArchtype(e))=>2===g?e.get(t):e[t],set=(e,t,g,n=getArchtype(e))=>{2===n?e.set(t,g):3===n?e.add(g):e[t]=g};function is$1(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}var M=Array.isArray,isMap=e=>e instanceof Map,isSet=e=>e instanceof Set,isObjectish=e=>"object"==typeof e,isFunction=e=>"function"==typeof e,isBoolean=e=>"boolean"==typeof e;function isArrayIndex(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var latest=e=>e.copy_||e.base_,getFinalValue=e=>e.modified_?e.copy_:e.base_;function shallowCopy(e,t){if(isMap(e))return new Map(e);if(isSet(e))return new Set(e);if(M(e))return Array[b].slice.call(e);const g=isPlainObject$2(e);if(!0===t||"class_only"===t&&!g){const t=m.getOwnPropertyDescriptors(e);delete t[p];let g=Reflect.ownKeys(t);for(let n=0;n<g.length;n++){const C=g[n],I=t[C];!1===I[S]&&(I[S]=!0,I[v]=!0),(I.get||I.set)&&(t[C]={[v]:!0,[S]:!0,[x]:I[x],[w]:e[C]})}return m.create(h(e),t)}{const t=h(e);if(null!==t&&g)return{...e};const n=m.create(t);return m.assign(n,e)}}function freeze(e,t=!1){return isFrozen(e)||isDraft(e)||!isDraftable(e)||(getArchtype(e)>1&&m.defineProperties(e,{set:T,add:T,clear:T,delete:T}),m.freeze(e),t&&each(e,(e,t)=>{freeze(t,!0)},!1)),e}function dontMutateFrozenCollections(){die(2)}var T={[w]:dontMutateFrozenCollections};function isFrozen(e){return null===e||!isObjectish(e)||m.isFrozen(e)}var P="MapSet",N="Patches",D="ArrayMethods",O={};function getPlugin(e){const t=O[e];return t||die(0,e),t}var j,isPluginLoaded=e=>!!O[e],getCurrentScope=()=>j,createScope=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:isPluginLoaded(P)?getPlugin(P):void 0,arrayMethodsPlugin_:isPluginLoaded(D)?getPlugin(D):void 0});function usePatchesInScope(e,t){t&&(e.patchPlugin_=getPlugin(N),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function revokeScope(e){leaveScope(e),e.drafts_.forEach(revokeDraft),e.drafts_=null}function leaveScope(e){e===j&&(j=e.parent_)}var enterScope=e=>j=createScope(j,e);function revokeDraft(e){const t=e[p];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function processResult(e,t){t.unfinalizedDrafts_=t.drafts_.length;const g=t.drafts_[0];if(void 0!==e&&e!==g){g[p].modified_&&(revokeScope(t),die(4)),isDraftable(e)&&(e=finalize(t,e));const{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(g[p].base_,e,t)}else e=finalize(t,g);return maybeFreeze(t,e,!0),revokeScope(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==u?e:void 0}function finalize(e,t){if(isFrozen(t))return t;const g=t[p];if(!g)return handleValue(t,e.handledSet_,e);if(!isSameScope(g,e))return t;if(!g.modified_)return g.base_;if(!g.finalized_){const{callbacks_:t}=g;if(t)for(;t.length>0;)t.pop()(e);generatePatchesAndFinalize(g,e)}return g.copy_}function maybeFreeze(e,t,g=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&freeze(t,g)}function markStateFinalized(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var isSameScope=(e,t)=>e.scope_===t,G=[];function updateDraftInParent(e,t,g,n){const C=latest(e),I=e.type_;if(void 0!==n&&get(C,n,I)===t)return void set(C,n,g,I);if(!e.draftLocations_){const t=e.draftLocations_=new Map;each(C,(e,g)=>{if(isDraft(g)){const n=t.get(g)||[];n.push(e),t.set(g,n)}})}const o=e.draftLocations_.get(t)??G;for(const a of o)set(C,a,g,I)}function registerChildFinalizationCallback(e,t,g){e.callbacks_.push(function(n){const C=t;if(!C||!isSameScope(C,n))return;n.mapSetPlugin_?.fixSetContents(C);const I=getFinalValue(C);updateDraftInParent(e,C.draft_??C,I,g),generatePatchesAndFinalize(C,n)})}function generatePatchesAndFinalize(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:g}=t;if(g){const n=g.getPath(e);n&&g.generatePatches_(e,n,t)}markStateFinalized(e)}}function handleCrossReference(e,t,g){const{scope_:n}=e;if(isDraft(g)){const C=g[p];isSameScope(C,n)&&C.callbacks_.push(function(){prepareCopy(e),updateDraftInParent(e,g,getFinalValue(C),t)})}else isDraftable(g)&&e.callbacks_.push(function(){const C=latest(e);3===e.type_?C.has(g)&&handleValue(g,n.handledSet_,n):get(C,t,e.type_)===g&&n.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&handleValue(get(e.copy_,t,e.type_),n.handledSet_,n)})}function handleValue(e,t,g){return!g.immer_.autoFreeze_&&g.unfinalizedDrafts_<1||isDraft(e)||t.has(e)||!isDraftable(e)||isFrozen(e)||(t.add(e),each(e,(n,C)=>{if(isDraft(C)){const t=C[p];isSameScope(t,g)&&(set(e,n,getFinalValue(t),e.type_),markStateFinalized(t))}else isDraftable(C)&&handleValue(C,t,g)})),e}function createProxyProxy(e,t){const g=M(e),n={type_:g?1:0,scope_:t?t.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let C=n,I=L;g&&(C=[n],I=B);const{revoke:o,proxy:a}=Proxy.revocable(C,I);return n.draft_=a,n.revoke_=o,[a,n]}var L={get(e,t){if(t===p)return e;let g=e.scope_.arrayMethodsPlugin_;const n=1===e.type_&&"string"==typeof t;if(n&&g?.isArrayOperationMethod(t))return g.createMethodInterceptor(e,t);const C=latest(e);if(!has(C,t,e.type_))return readPropFromProto(e,C,t);const I=C[t];if(e.finalized_||!isDraftable(I))return I;if(n&&e.operationMethod&&g?.isMutatingArrayMethod(e.operationMethod)&&isArrayIndex(t))return I;if(I===peek$1(e.base_,t)){prepareCopy(e);const g=1===e.type_?+t:t,n=createProxy(e.scope_,I,e,g);return e.copy_[g]=n}return I},has:(e,t)=>t in latest(e),ownKeys:e=>Reflect.ownKeys(latest(e)),set(e,t,g){const n=getDescriptorFromProto(latest(e),t);if(n?.set)return n.set.call(e.draft_,g),!0;if(!e.modified_){const n=peek$1(latest(e),t),C=n?.[p];if(C&&C.base_===g)return e.copy_[t]=g,e.assigned_.set(t,!1),!0;if(is$1(g,n)&&(void 0!==g||has(e.base_,t,e.type_)))return!0;prepareCopy(e),markChanged(e)}return e.copy_[t]===g&&(void 0!==g||t in e.copy_)||Number.isNaN(g)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=g,e.assigned_.set(t,!0),handleCrossReference(e,t,g)),!0},deleteProperty:(e,t)=>(prepareCopy(e),void 0!==peek$1(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),markChanged(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const g=latest(e),n=Reflect.getOwnPropertyDescriptor(g,t);return n?{[S]:!0,[v]:1!==e.type_||"length"!==t,[x]:n[x],[w]:g[t]}:n},defineProperty(){die(11)},getPrototypeOf:e=>h(e.base_),setPrototypeOf(){die(12)}},B={};for(let gc in L){let e=L[gc];B[gc]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}function peek$1(e,t){const g=e[p];return(g?latest(g):e)[t]}function readPropFromProto(e,t,g){const n=getDescriptorFromProto(t,g);return n?w in n?n[w]:n.get?.call(e.draft_):void 0}function getDescriptorFromProto(e,t){if(!(t in e))return;let g=h(e);for(;g;){const e=Object.getOwnPropertyDescriptor(g,t);if(e)return e;g=h(g)}}function markChanged(e){e.modified_||(e.modified_=!0,e.parent_&&markChanged(e.parent_))}function prepareCopy(e){e.copy_||(e.assigned_=new Map,e.copy_=shallowCopy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function createProxy(e,t,g,n){const[C,I]=isMap(t)?getPlugin(P).proxyMap_(t,g):isSet(t)?getPlugin(P).proxySet_(t,g):createProxyProxy(t,g);return(g?.scope_??getCurrentScope()).drafts_.push(C),I.callbacks_=g?.callbacks_??[],I.key_=n,g&&void 0!==n?registerChildFinalizationCallback(g,I,n):I.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(I);const{patchPlugin_:t}=e;I.modified_&&t&&t.generatePatches_(I,[],e)}),C}function current(e){return isDraft(e)||die(10,e),currentImpl(e)}function currentImpl(e){if(!isDraftable(e)||isFrozen(e))return e;const t=e[p];let g,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,g=shallowCopy(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else g=shallowCopy(e,!0);return each(g,(e,t)=>{set(g,e,currentImpl(t))},n),t&&(t.finalized_=!1),g}B.deleteProperty=function(e,t){return B.set.call(this,e,t,void 0)},B.set=function(e,t,g){return L.set.call(this,e[0],t,g,e[0])};var F,W=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,g)=>{if(isFunction(e)&&!isFunction(t)){const g=t;t=e;const n=this;return function(e=g,...C){return n.produce(e,e=>t.call(this,e,...C))}}let n;if(isFunction(t)||die(6),void 0===g||isFunction(g)||die(7),isDraftable(e)){const C=enterScope(this),I=createProxy(C,e,void 0);let o=!0;try{n=t(I),o=!1}finally{o?revokeScope(C):leaveScope(C)}return usePatchesInScope(C,g),processResult(n,C)}if(!e||!isObjectish(e)){if(n=t(e),void 0===n&&(n=e),n===u&&(n=void 0),this.autoFreeze_&&freeze(n,!0),g){const t=[],C=[];getPlugin(N).generateReplacementPatches_(e,n,{patches_:t,inversePatches_:C}),g(t,C)}return n}die(1,e)},this.produceWithPatches=(e,t)=>{if(isFunction(e))return(t,...g)=>this.produceWithPatches(t,t=>e(t,...g));let g,n;return[this.produce(e,t,(e,t)=>{g=e,n=t}),g,n]},isBoolean(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),isBoolean(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),isBoolean(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){isDraftable(e)||die(8),isDraft(e)&&(e=current(e));const t=enterScope(this),g=createProxy(t,e,void 0);return g[p].isManual_=!0,leaveScope(t),g}finishDraft(e,t){const g=e&&e[p];g&&g.isManual_||die(9);const{scope_:n}=g;return usePatchesInScope(n,t),processResult(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let g;for(g=t.length-1;g>=0;g--){const n=t[g];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}g>-1&&(t=t.slice(g+1));const n=getPlugin(N).applyPatches_;return isDraft(e)?n(e,t):this.produce(e,e=>n(e,t))}},V=W.produce,U=W.setAutoFreeze.bind(W),K=200,applyCap=(e,t)=>!Number.isFinite(t)||t<=0?e:e.length>t?e.slice(e.length-t):e,createFeedModel=({cap:e=K}={})=>{let t=[];return{add:g=>{t=applyCap(t.concat(g),e)},addEntries:g=>{Array.isArray(g)&&0!==g.length&&(t=applyCap(t.concat(g),e))},replaceEntries:g=>{t=applyCap(Array.isArray(g)?[...g]:[],e)},snapshot:()=>[...t],clear:()=>{t=[]},destroy:()=>{t=[]}}},H=3e3,Y=1e3,Z=5e3,createStreamModel=({onAppend:e=()=>{},onClear:t=()=>{}}={})=>{let g=0,n=0,C=[],I=[],o=null,a=null;const i=new Set,notify=()=>{n++,a=null,i.forEach(e=>e())},retainLiveTail=e=>e.length<3e3?e:e.slice(-Y),callCallback=(e,...t)=>{try{const g=e(...t);g&&"function"==typeof g.catch&&g.catch(()=>{})}catch{}},addLines=t=>{const n=[],a=[];let i=null;for(const e of t){if("main"!==(e.buffer??"main"))continue;const t={id:g++,html:e.html,timestamp:e.timestamp,isPrompt:e.isPrompt,isMonospace:e.isMonospace,shouldLog:e.shouldLog,buffer:e.buffer??"main"};n.push(t),t.isPrompt?i=t:a.push(t)}0!==n.length&&(C=retainLiveTail([...C,...n]),I=retainLiveTail([...I,...a]),i&&(o=i),callCallback(e,n),notify())};return{subscribe:e=>(i.add(e),()=>i.delete(e)),getSnapshot:()=>(a||(a={version:n,buffer:C,filteredBuffer:I,promptLine:o,totalLines:C.length}),a),addLines,clear:()=>{C=[],I=[],o=null,g=0,callCallback(t),notify()},getStats:()=>({totalLines:C.length,filteredLines:I.length,liveBufferCount:C.length,liveFilteredCount:I.length,version:n,subscribers:i.size,sessionTotalLines:g,nextId:g,liveBufferCapThreshold:H,liveBufferRetainCount:Y})}},Q=5e3,appendWithCap=(e,t,g)=>{if(0===t.length)return e;const n=e.concat(t);return!Number.isFinite(g)||g<=0?n:n.length>g?n.slice(n.length-g):n},createTranscriptModel=({cap:e=Q}={})=>{let t=0,g=0,n=[],C=null;const I=new Set,notify=()=>{g++,C=null,I.forEach(e=>e())},addLines=g=>{const C=[];for(const e of g)C.push({id:t++,html:e.html,timestamp:e.timestamp,isPrompt:Boolean(e.isPrompt),isMonospace:Boolean(e.isMonospace),shouldLog:e.shouldLog,hasMXP:(e.html||"").includes("mxp_send"),buffer:e.buffer});0!==C.length&&(n=appendWithCap(n,C,e),notify())};return{subscribe:e=>(I.add(e),()=>I.delete(e)),getSnapshot:()=>(C||(C={version:g,items:n,totalLines:n.length}),C),addLines,clear:()=>{n=[],t=0,notify()},getStats:()=>({totalLines:n.length,version:g,subscribers:I.size})}},X=Object.freeze({SYSTEM_PHASE:"nexgui4.system.phase",SYSTEM_READY:"nexgui4.system.ready",SYSTEM_DESTROYED:"nexgui4.system.destroyed"}),_=Object.freeze({TIMER_STARTED:"nexgui4.domain.timer.started",TIMER_UPDATED:"nexgui4.domain.timer.updated",TIMER_EXPIRED:"nexgui4.domain.timer.expired",TIMER_CLEARED:"nexgui4.domain.timer.cleared",STATS_UPDATED:"nexgui4.domain.stats.updated",TARGET_CHANGED:"nexgui4.domain.target.changed",STREAM_LINE:"nexgui4.domain.stream.line",PARTY_UPDATED:"nexgui4.domain.party.updated",PARTY_MEMBER_LEFT:"nexgui4.domain.party.member.left",ROOM_UPDATED:"nexgui4.domain.room.updated",DEFENCE_GAINED:"nexgui4.domain.defence.gained",DEFENCE_LOST:"nexgui4.domain.defence.lost",CHARACTER_UPDATED:"nexgui4.domain.character.updated",CLASS_CHANGED:"nexgui4.domain.character.class.changed"}),q=Object.freeze({STREAM_LINE:"nexgui4.ingress.stream.line",TIMER_STARTED:"nexgui4.ingress.timer.started",STATS_UPDATED:"nexgui4.ingress.stats.updated",TARGET_CHANGED:"nexgui4.ingress.target.changed",ROOM_UPDATED:"nexgui4.ingress.room.updated",DEFENCE_GAINED:"nexgui4.ingress.defence.gained",DEFENCE_LOST:"nexgui4.ingress.defence.lost",CLASS_CHANGED:"nexgui4.ingress.character.class.changed"}),J=Object.freeze({THEME_CHANGED:"nexgui4.ui.theme.changed",HOST_SETTINGS_CHANGED:"nexgui4.ui.host.settings.changed"}),$=Object.freeze({...X,..._,...J}),hasOwn$1=(e,t)=>Boolean(e)&&Object.prototype.hasOwnProperty.call(e,t),normalizeNumber$3=e=>{const t=Number(e);return Number.isFinite(t)?t:0},normalizeDuration=e=>Math.max(0,Math.abs(normalizeNumber$3(e))),normalizeDirection$1=(e,t="countdown")=>e&&"object"==typeof e?"countup"===e.direction||"countup"===e.mode||!1===e.countDown?"countup":"countdown":t,normalizePosition$1=(e,t="top")=>"string"==typeof e?"bottom"===e?"bottom":"top":e&&"object"==typeof e?"bottom"===e.position?"bottom":"top":t,normalizeStayVisible=(e,t=!0)=>e&&"object"==typeof e&&hasOwn$1(e,"stayVisible")?!0===e.stayVisible:t,normalizeGroupIds=(e,t=[])=>{if(!e||"object"!=typeof e)return[...t];const g=hasOwn$1(e,"groupIds")?e.groupIds:hasOwn$1(e,"groupId")?e.groupId:hasOwn$1(e,"group")?e.group:null;if(null==g)return[...t];const n=Array.isArray(g)?g:[g],C=new Set,I=[];for(const o of n){if("string"!=typeof o)continue;const e=o.trim();e&&!C.has(e)&&(C.add(e),I.push(e))}return I},isVisibleTimer=e=>!0===e.stayVisible||!0===e.enabled&&!0===e.running,areGroupIdsEqual=(e,t)=>e.length===t.length&&e.every((e,g)=>e===t[g]),areTimerSnapshotsEqual=(e,t)=>e.id===t.id&&e.durationMs===t.durationMs&&e.startedAt===t.startedAt&&e.label===t.label&&e.direction===t.direction&&e.position===t.position&&e.stayVisible===t.stayVisible&&e.enabled===t.enabled&&e.running===t.running&&e.elapsedMs===t.elapsedMs&&e.remainingMs===t.remainingMs&&areGroupIdsEqual(e.groupIds,t.groupIds),getIdleElapsedMs=e=>!0===e.stayVisible?e.durationMs:0,noopSetTimer=()=>null,noopClearTimer$1=()=>{},createTimerModel=({eventBus:e,now:t=()=>0,setTimer:g=noopSetTimer,clearTimer:n=noopClearTimer$1}={})=>{const C=new Map;let I=[];const getElapsedMs=e=>e.running&&null!=e.startedAt?Math.min(e.durationMs,Math.max(0,normalizeNumber$3(t())-normalizeNumber$3(e.startedAt))):e.elapsedMs,cloneTimer=e=>{const t=getElapsedMs(e);return{id:e.id,durationMs:e.durationMs,startedAt:e.startedAt,label:e.label,direction:e.direction,position:e.position,stayVisible:e.stayVisible,groupIds:[...e.groupIds],enabled:e.enabled,running:e.running,elapsedMs:t,remainingMs:Math.max(0,e.durationMs-t)}},clearScheduledExpiry=e=>{null!=e.timeoutId&&(n(e.timeoutId),e.timeoutId=null)},emitTimerUpdated=t=>{e.emit(_.TIMER_UPDATED,cloneTimer(t))},expire=t=>{const g=C.get(t);g&&(clearScheduledExpiry(g),g.elapsedMs=g.durationMs,g.startedAt=null,g.enabled=!1,g.running=!1,e.emit(_.TIMER_EXPIRED,{...cloneTimer(g),reason:"expired"}))},scheduleExpiry=e=>{clearScheduledExpiry(e),e.timeoutId=g(()=>expire(e.id),e.durationMs)},createDormantTimer=(e,t,g,n,C)=>{const I=t??C?.durationMs??0,o=normalizeStayVisible(n,C?.stayVisible??!0);return{id:e,durationMs:I,startedAt:null,label:"string"==typeof g?g:C?.label??"",direction:normalizeDirection$1(n,C?.direction??"countdown"),position:normalizePosition$1(n,C?.position??"top"),stayVisible:o,groupIds:normalizeGroupIds(n,C?.groupIds??[]),enabled:!1,running:!1,elapsedMs:o?I:0,timeoutId:null}},createTimer=(e,t,g,n)=>{const I=C.get(e);I&&clearScheduledExpiry(I);const o=createDormantTimer(e,normalizeDuration(t),g,n,I);return C.set(e,o),emitTimerUpdated(o),cloneTimer(o)},start=g=>{const n=C.get(g);if(!n)return null;clearScheduledExpiry(n),n.elapsedMs=0,n.startedAt=t(),n.enabled=!0,n.running=!0,scheduleExpiry(n);const I=cloneTimer(n);return e.emit(_.TIMER_STARTED,I),I},remove=t=>{const g=C.get(t);if(!g)return null;clearScheduledExpiry(g);const n=cloneTimer(g);return C.delete(t),e.emit(_.TIMER_EXPIRED,{...n,reason:"removed"}),n},list=(e={})=>{const t="string"==typeof e?e:e.groupId??null,g="object"==typeof e&&!0===e?.visibleOnly;return[...C.values()].map(e=>cloneTimer(e)).filter(e=>!(t&&!e.groupIds.includes(t)||g&&!isVisibleTimer(e)))},snapshot=()=>list({visibleOnly:!0});return{add:(e,t,g="",n)=>{const C=createTimer(e,t,g,n);return n&&"object"==typeof n&&!0===n.autoStart?start(e):C},clearAll:()=>{if(0===C.size)return 0;const t=C.size;return C.forEach(e=>clearScheduledExpiry(e)),C.clear(),e.emit(_.TIMER_CLEARED),t},destroy:()=>{C.forEach(e=>clearScheduledExpiry(e)),C.clear()},get:e=>{const t=C.get(e);return t?cloneTimer(t):null},list,read:()=>{const e=[...C.values()].map(e=>cloneTimer(e)).filter(e=>isVisibleTimer(e));return I.length===e.length&&I.every((t,g)=>areTimerSnapshotsEqual(t,e[g]))||(I=e),I},remove,reset:e=>{const t=C.get(e);return t?(clearScheduledExpiry(t),t.elapsedMs=getIdleElapsedMs(t),t.startedAt=null,t.enabled=!1,t.running=!1,emitTimerUpdated(t),cloneTimer(t)):null},snapshot,start,stop:e=>{const t=C.get(e);return t?(clearScheduledExpiry(t),t.elapsedMs=getElapsedMs(t),t.startedAt=null,t.enabled=!1,t.running=!1,emitTimerUpdated(t),cloneTimer(t)):null}}},isPlainObject$1=e=>"[object Object]"===Object.prototype.toString.call(e),toNumber=(e,t=0)=>{const g="number"==typeof e?e:"string"==typeof e&&e.trim().length>0?Number(e):NaN;return Number.isFinite(g)?g:t},toPercent=e=>{if("number"==typeof e&&Number.isFinite(e))return e;if("string"!=typeof e)return null;const t=Number.parseInt(e.replace("%","").trim(),10);return Number.isNaN(t)?null:t},toTrimmedString=e=>"string"==typeof e&&e.trim().length>0?e.trim():null,toBooleanFlag=e=>!0===e||1===e||"1"===e,stripAnsi=e=>"string"==typeof e?e.replace(/\u001b\[[0-9;]*m/g,"").trim():"",extractNamedValue=e=>Array.isArray(e)?toTrimmedString(e[0]):isPlainObject$1(e)?toTrimmedString(e.name):toTrimmedString(e),deepFreeze=e=>{if(!e||"object"!=typeof e||Object.isFrozen(e))return e;Object.freeze(e);for(const t of Object.values(e))deepFreeze(t);return e},parseFontSize=(e,t=14)=>{if("number"==typeof e&&Number.isFinite(e)&&e>0)return e;if("string"==typeof e){const t=Number.parseFloat(e);if(Number.isFinite(t)&&t>0)return t}return t},ee={hp:{current:0,max:0},mp:{current:0,max:0},ep:{current:0,max:0},wp:{current:0,max:0},nl:{current:0,max:0},gold:0,bank:0,xp:0,xpToNext:0},createStatsModel=({eventBus:e}={})=>{let t=structuredClone(ee);const read=()=>t;return{update:g=>{for(const e of Object.keys(g)){const n=g[e];null===n||"object"!=typeof n||Array.isArray(n)?t[e]=n:t[e]={...t[e],...n}}e.emit(_.STATS_UPDATED,read())},read,snapshot:()=>deepFreeze(structuredClone(t)),destroy:()=>{t=structuredClone(ee)}}},te=Object.freeze({goldCollection:!0,targetCalls:!0,affCalls:!0,callTargets:!1,callAffs:!1,gagChat:!1}),ge=Object.freeze([{key:"goldCollection",label:"Collect Gold",tooltip:"Legacy party automation flag for gold collection behaviour."},{key:"targetCalls",label:"Accept Targets",tooltip:"Accept leader target calls from party chat."},{key:"affCalls",label:"Accept Affs",tooltip:"Accept legacy affliction call messages from party chat."},{key:"callTargets",label:"Call Targets",tooltip:"Legacy toggle preserved for compatibility with party workflows."},{key:"callAffs",label:"Call Affs",tooltip:"Legacy toggle preserved for compatibility with party workflows."},{key:"gagChat",label:"Gag Chat",tooltip:"Hide party chat lines from the display stream."}]),re=Object.freeze(ge.map(({key:e})=>e)),isNonEmptyString=e=>"string"==typeof e&&e.trim().length>0,trimToEmpty=e=>isNonEmptyString(e)?e.trim():"",ne=trimToEmpty,normalizeLookupKey=e=>trimToEmpty(e).toLowerCase(),toDisplayName=e=>trimToEmpty(e).replace(/[_-]+/g," ").replace(/\s+/g," ").replace(/\b([a-z])/g,e=>e.toUpperCase()),capitalizeFirst=e=>{const t=trimToEmpty(e);return t?t.charAt(0).toUpperCase()+t.slice(1):""},cloneSettings=e=>({...te,...e}),cloneState=e=>({members:[...e.members],leader:e.leader,selfName:e.selfName,settings:cloneSettings(e.settings)}),normalizeMembers=e=>{const t=[],g=new Set;return(Array.isArray(e)?e:[]).forEach(e=>{const n=ne("string"==typeof e?e:e?.name);n&&!g.has(n)&&(g.add(n),t.push(n))}),t},reconcileLeader=(e,t)=>t.includes(e.leader)?e.leader:e.selfName&&t.includes(e.selfName)?e.selfName:t[0]??"",ensureSelfMember=(e,t)=>!e.selfName||t.includes(e.selfName)?t:[e.selfName,...t],createPartyModel=({eventBus:e}={})=>{let t={members:[],leader:"",selfName:"",settings:cloneSettings(te)};const emitUpdated=()=>{e.emit(_.PARTY_UPDATED,snapshot())},snapshot=()=>cloneState(t);return{update:e=>{const g=ensureSelfMember(t,normalizeMembers(e)),n=reconcileLeader(t,g);t.leader===n&&t.members.length===g.length&&t.members.every((e,t)=>e===g[t])||(t={...t,members:g,leader:n},emitUpdated())},addMember:e=>{const g=ne(e);g&&!t.members.includes(g)&&(t={...t,members:[...t.members,g],leader:t.leader||g},emitUpdated())},removeMember:g=>{const n=ne(g);if(!n||n===t.selfName||!t.members.includes(n))return;const C=t.members.filter(e=>e!==n);t={...t,members:C,leader:reconcileLeader(t,C)},e.emit(_.PARTY_MEMBER_LEFT,{name:n}),emitUpdated()},setLeader:e=>{const g=ne(e);g&&t.members.includes(g)&&t.leader!==g&&(t={...t,leader:g},emitUpdated())},setSelf:e=>{const g=ne(e);if(!g)return;const n=ensureSelfMember({...t,selfName:g},t.members.filter(e=>e!==g)),C=n.includes(t.leader)?t.leader:g;t.selfName===g&&t.leader===C&&t.members.length===n.length&&t.members.every((e,t)=>e===n[t])||(t={...t,selfName:g,members:n,leader:C},emitUpdated())},setSetting:(e,g)=>{if(!re.includes(e))throw new Error(`[nexGui4] Unknown party setting "${String(e)}".`);const n=!0===g;t.settings[e]!==n&&(t={...t,settings:{...t.settings,[e]:n}},emitUpdated())},read:()=>t,snapshot,destroy:()=>{t={members:[],leader:"",selfName:"",settings:cloneSettings(te)}}}},Ae={players:[],npcs:[],items:[],roomName:"",roomId:""},cloneRoomCollection=e=>Array.isArray(e)?structuredClone(e):[],createRoomModel=({eventBus:e}={})=>{let t=structuredClone(Ae);const read=()=>t;return{update:g=>{t={players:g.players?[...g.players]:[],npcs:cloneRoomCollection(g.npcs),items:cloneRoomCollection(g.items),roomName:g.roomName??"",roomId:g.roomId??""},e.emit(_.ROOM_UPDATED,read())},read,snapshot:()=>({players:[...t.players],npcs:cloneRoomCollection(t.npcs),items:cloneRoomCollection(t.items),roomName:t.roomName,roomId:t.roomId}),destroy:()=>{t=structuredClone(Ae)}}},Ce={name:"",class:"",level:0,target:null,targetDetails:{id:null,name:null,hpPercent:null,hpText:null,hpDelta:null,gender:null,currentAffs:[],limbs:{}},gender:null,balance:!1,equilibrium:!1,classBalanceType:null,classBalanceReady:null,currentAffs:[],limbs:{}},createCharacterModel=({eventBus:e}={})=>{let t={...Ce};const read=()=>t;return{update:g=>{t={...t,...g},e.emit(_.CHARACTER_UPDATED,read())},read,setClass:g=>{t={...t,class:g},e.emit(_.CLASS_CHANGED,{class:g})},setTarget:g=>{t={...t,target:g},e.emit(_.TARGET_CHANGED,{target:g})},snapshot:()=>deepFreeze(structuredClone(t)),destroy:()=>{t={...Ce}}}},createDefenceModel=({eventBus:e}={})=>{let t=[];return{gain:g=>{t.includes(g)||(t=[...t,g].sort()),e.emit(_.DEFENCE_GAINED,{name:g})},lose:g=>{t.includes(g)&&(t=t.filter(e=>e!==g)),e.emit(_.DEFENCE_LOST,{name:g})},reset:()=>{t=[]},read:()=>t,snapshot:()=>[...t],destroy:()=>{t=[]}}},normalizeClassBalanceType=e=>"string"==typeof e&&e.trim().length>0?e.trim():null,normalizeClassStatList=e=>Array.isArray(e)?e.reduce((e,t)=>{if("string"!=typeof t)return e;const g=t.trim();return g?(e.push(g),e):e},[]):[],resolveClassBalanceReady=({classStats:e,classBalanceType:t})=>{const g=normalizeClassBalanceType(t);if(!g)return null;const n=normalizeClassStatList(e).map(e=>e.toLowerCase()),C=`${g.toLowerCase()}: yes`,I=`${g.toLowerCase()}: no`;return!!n.includes(C)||!n.includes(I)&&null},createClassBalanceController=()=>{let e=null,t=[];const snapshot=()=>({classBalanceType:e,classBalanceReady:resolveClassBalanceReady({classStats:t,classBalanceType:e})});return{getType:()=>e,setType:t=>(e=normalizeClassBalanceType(t),snapshot()),updateFromVitals:e=>(t=normalizeClassStatList(e?.charstats),snapshot()),destroy:()=>{e=null,t=[]}}},Ie=Object.freeze(["m","mx"]),oe=new Set(Ie),isRoomNpcAttrib=e=>"string"==typeof e&&oe.has(e),isRoomNpcItem=e=>"object"==typeof e&&null!==e&&isRoomNpcAttrib(e.attrib),getRoomEntryId=e=>isPlainObject$1(e)&&null!=e.id?String(e.id):null,isRoomLocation=e=>"room"===toTrimmedString(e?.location)?.toLowerCase(),splitRoomEntries=e=>(Array.isArray(e)?structuredClone(e):[]).reduce((e,t)=>(isRoomNpcItem(t)?e.npcs.push(t):e.items.push(t),e),{items:[],npcs:[]}),extractRoomItemList=e=>Array.isArray(e?.items)?e.items:Array.isArray(e?.Items)?e.Items:Array.isArray(e?.room)?e.room:[],extractRoomItemEntry=e=>isPlainObject$1(e?.item)?e.item:isPlainObject$1(e?.Item)?e.Item:isPlainObject$1(e)?e:null,removeRoomItemEntry=(e,t)=>e.filter(e=>getRoomEntryId(e)!==t),upsertRoomItemEntry=(e,t)=>{const g=getRoomEntryId(t);if(!g)return[...e,structuredClone(t)];const n=structuredClone(e),C=n.findIndex(e=>getRoomEntryId(e)===g);return-1===C?(n.push(structuredClone(t)),n):(n[C]=structuredClone(t),n)},createRoomOccupantsModel=({roomModel:e,playerDirectory:t}={})=>{const rememberRoomPlayers=e=>{t?.rememberRoomPlayers?.(e)},apply=(t,g)=>{const n=e.snapshot();switch(t){case"Room.Info":{const t=Array.isArray(g?.Players)?g.Players:Array.isArray(g?.players)?g.players:[],C=t.map(e=>extractNamedValue(e)??toTrimmedString(e?.fullname)).filter(Boolean);return rememberRoomPlayers(t),e.update({...n,players:C,roomName:toTrimmedString(g?.name)??"",roomId:g?.num??g?.id??""}),!0}case"Room.AddPlayer":{const t=toTrimmedString(g?.name)??extractNamedValue(g)??toTrimmedString(g?.fullname);return!(!t||n.players.includes(t)||(rememberRoomPlayers([g]),e.update({...n,players:[...n.players,t]}),0))}case"Room.RemovePlayer":{const t=extractNamedValue(g);return!!t&&(e.update({...n,players:n.players.filter(e=>e!==t)}),!0)}case"Char.Items.List":return!!isRoomLocation(g)&&(e.update({...n,...splitRoomEntries(extractRoomItemList(g))}),!0);case"Char.Items.Add":case"Char.Items.Update":{if(!isRoomLocation(g))return!1;const t=extractRoomItemEntry(g);if(!t)return!1;const C=getRoomEntryId(t),I=null==C?n.npcs:removeRoomItemEntry(n.npcs,C),o=null==C?n.items:removeRoomItemEntry(n.items,C);return e.update({...n,npcs:isRoomNpcItem(t)?upsertRoomItemEntry(I,t):I,items:isRoomNpcItem(t)?o:upsertRoomItemEntry(o,t)}),!0}case"Char.Items.Remove":{if(!isRoomLocation(g))return!1;const t=getRoomEntryId(extractRoomItemEntry(g));return!!t&&(e.update({...n,npcs:removeRoomItemEntry(n.npcs,t),items:removeRoomItemEntry(n.items,t)}),!0)}default:return!1}};return Object.freeze({apply})},ae=Object.freeze({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),escapeHtml=e=>String(e??"").replace(/[&<>"']/g,e=>ae[e]),ie=Object.freeze({amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "}),stripHtml=e=>{if(!e||"string"!=typeof e)return e??"";let t=e.replace(/<[^>]+>/g,"");return t=t.replace(/&([^;]+);/g,(e,t)=>{if(ie[t])return ie[t];if(t.startsWith("#")){const e=t.startsWith("#x")?parseInt(t.substring(2),16):parseInt(t.substring(1),10);if(!isNaN(e))return String.fromCharCode(e)}return e}),t},se=Object.freeze({"a monolith sigil":{color:"red",text:"A MONOLITH SIGIL"},"a cube sigil":{color:"yellow",text:"A CUBE SIGIL"},"some gold sovereigns":{color:"gold",text:"GOLD COINS"}}),le=Object.freeze({angle:Object.freeze({open:"<",close:">"}),square:Object.freeze({open:"[",close:"]"}),curly:Object.freeze({open:"{",close:"}"}),round:Object.freeze({open:"(",close:")"})}),styleAttribute$2=e=>{const t=Object.entries(e).filter(([,e])=>e);return 0===t.length?"":` style="${t.map(([e,t])=>`${e}: ${t}`).join("; ")}"`},createTextSegment=(e,t,g={})=>({text:e,color:t,italic:Boolean(g.italic),bold:Boolean(g.bold)}),renderSegmentHtml=e=>`<span${styleAttribute$2({color:e.color,"font-style":e.italic?"italic":null,"font-weight":e.bold?"700":null})}>${escapeHtml(e.text)}</span>`,createStaticRule=(e,t,g,n)=>Object.freeze({family:"room-text",id:e,gate:t,pattern:g,createMarker:()=>n}),createDirectionalRule=(e,t,g,n,C,I,o,a)=>Object.freeze({family:"room-text",id:e,gate:t,pattern:g,createMarker:e=>({frame:n,frameColor:C,segments:[createTextSegment(I,o),createTextSegment(capitalizeFirst(e?.groups?.direction),a)]})}),createSigilRule=(e,t,g,n,C)=>createStaticRule(e,t,g,{frame:"curly",frameColor:"yellow",segments:[createTextSegment("Sigil: ","silver"),createTextSegment(n,C)]}),createRuneRule=(e,t,g,n)=>createStaticRule(e,t,g,{frame:"round",frameColor:"red",segments:[createTextSegment("Rune: ","silver"),createTextSegment(n,"aquamarine")]}),createConquestRule=(e,t,g,n,C)=>createStaticRule(e,t,g,{frame:null,frameColor:null,leftIcons:[{id:"shield-halved",colors:["silver",C],size:12}],rightIcons:[{id:"shield-halved",colors:[C,"silver"],size:12}],segments:[createTextSegment(" Conquest: ","slategray"),createTextSegment(n,C)]}),ce=Object.freeze([createStaticRule("totem","runic totem",/A runic totem is planted solidly in the ground\./,{frame:"angle",frameColor:"dodgerblue",segments:[createTextSegment("TOTEM","Tomato")]}),createStaticRule("frozenGround","slick with",/The ground is slick with ice\./,{frame:"angle",frameColor:"dodgerblue",segments:[createTextSegment("Frozen Ground","PowderBlue")]}),createStaticRule("graveHands","rotting flesh",/Hands of rotting flesh and white bone push up from the ground/,{frame:"angle",frameColor:"crimson",segments:[createTextSegment("Gravehands","Beige")]}),createDirectionalRule("icewall","icewall",/An icewall is here, blocking passage to the (?<direction>\w+)\./,"square","red","Icewall: ","dodgerblue","aquamarine"),createDirectionalRule("stonewall","wall of stone",/A large wall of stone stands here, blocking passage to the (?<direction>\w+)\./,"square","red","Stonewall: ","silver","aquamarine"),createSigilRule("cubeSigil","cube",/Resting on the ground is a cube-shaped silver sigil\./,"Cube","aquamarine"),createSigilRule("eyeSigil","obsidian",/An obsidian eye sigil is here\./,"Eye","lightgreen"),createSigilRule("monolithSigil","monolith",/A sigil in the shape of a small, rectangular monolith is on the ground\./,"Monolith","red"),createSigilRule("keySigil","key-shaped",/Lying flat on the ground is a key-shaped sigil\./,"Key","lightPink"),createRuneRule("kena","nightmares",/A rune that looks like something out of your nightmares has been sketched into the ground here\./,"Kena"),createRuneRule("uruz","lightning bolt",/A rune like a lightning bolt has been sketched into the ground here\./,"Uruz"),createRuneRule("fehu","closed eye",/A rune like a closed eye has been sketched into the ground here\./,"Fehu"),createRuneRule("pithikhan","square box",/A rune resembling a square box has been sketched into the ground here\./,"Pithikhan"),createRuneRule("inguz","stick man",/A rune that looks like a stick man has been sketched into the ground here\./,"Inguz"),createRuneRule("wunjo","open eye",/A rune like an open eye has been sketched into the ground here\./,"Wunjo"),createRuneRule("sowulu","a nail",/A rune that looks like a nail has been sketched into the ground here\./,"Sowulu"),createRuneRule("isaz","flurry of lighning",/A rune like a flurry of lightning bolts has been sketched into the ground here\./,"Isaz"),createRuneRule("dagaz","rising sun",/A rune like a rising sun has been sketched into the ground here\./,"Dagaz"),createRuneRule("raido","resembling a horse",/A rune resembling a horse has been sketched into the ground here\./,"Raido"),createRuneRule("nauthiz","resembling a leech",/A rune resembling a leech has been sketched into the ground here\./,"Nauthiz"),createRuneRule("mannaz","resembling a bell",/A rune resembling a bell has been sketched into the ground here\./,"Mannaz"),createRuneRule("othala","resembling a mountain",/A rune resembling a mountain range has been sketched into the ground here\./,"Othala"),createRuneRule("sleizak","resembling a viper",/A rune resembling a viper has been sketched into the ground here\./,"Sleizak"),createRuneRule("tiwaz","upward-pointing arrow",/A rune like an upward-pointing arrow has been sketched into the ground here\./,"Tiwaz"),createRuneRule("nairat","like a butterfly",/A rune shaped like a butterfly has been sketched into the ground here\./,"Nairat"),createRuneRule("eihwaz","like a yew",/A rune shaped like a yew has been sketched into the ground here\./,"Eihwaz"),createConquestRule("conquestAshtan","warp-touched",/Crackling ozone heralds warp-touched mirage, their coming the advent of change\./,"Ashtan ","#990099"),createConquestRule("conquestCyrene","draconic tracks",/Bound in ice, draconic tracks scribe a glittering path across the earth\./,"Cyrene ","#009999"),createConquestRule("conquestNeraeos","Cerulean waters",/Cerulean waters preside, fathom and depths stirred to roiling currents by the pervasive will of Neraeos Pelagia, Lord of the Sea\./,"Cyrene ","#009999"),createConquestRule("conquestEleusis","fecundity",/Nature's fecundity floods the surrounds with the clamour of life in a chittering refrain\./,"Eleusis ","#00e600"),createConquestRule("conquestHashan","leaden shadow",/Lines of leaden shadow coil underfoot, turning earth to metal by alchemical writ\./,"Hashan ","#999900"),createConquestRule("conquestMhaldor","red-hued",/A noxious, red-hued fog overwhelms the area with a thick, palpable vapour\./,"Mhaldor ","#e60000"),createConquestRule("conquestTargossas","mien",/Radiant light joins with calescent heat, suffusing the area with a harsh, blinding mien\./,"Targossas ","#ffffff"),createConquestRule("conquestUnderworld","ashen earth",/Soul's blood pools on ashen earth turned dust, an inviolable call to death's advance\./,"Underworld ","tomato")]),ue=new Map,de=new Set,notifyOverrideSubscribers=()=>{for(const e of de)e()},subscribeToRoomItemOverrides=e=>(de.add(e),()=>de.delete(e)),setUserRoomItemOverride=(e,t)=>{const g=normalizeLookupKey(e);g&&(ue.set(g,t),notifyOverrideSubscribers())},removeUserRoomItemOverride=e=>{const t=normalizeLookupKey(e);t&&(ue.delete(t),notifyOverrideSubscribers())},getUserRoomItemOverride=e=>{const t=normalizeLookupKey(e);return t?ue.get(t)??null:null},listUserRoomItemOverrides=()=>Array.from(ue.entries()),getRoomItemOverride=e=>{if("string"==typeof e){const t=normalizeLookupKey(e);return ue.get(t)??se[t]??null}if(!e||"object"!=typeof e)return null;const t=normalizeLookupKey(e.id),g=normalizeLookupKey(e.name);return ue.get(t)??ue.get(g)??se[t]??se[g]??null},renderRoomMarkerHtml=(e,t={})=>{const g=e.frame?le[e.frame]:null,n=t.iconRenderer,C=Array.isArray(e.leftIcons)?e.leftIcons.map(e=>n?.(e)??"").join(""):"",I=Array.isArray(e.rightIcons)?e.rightIcons.map(e=>n?.(e)??"").join(""):"";return[C,g?renderSegmentHtml(createTextSegment(g.open,e.frameColor,{bold:!0})):"",e.segments.map(renderSegmentHtml).join(""),g?renderSegmentHtml(createTextSegment(g.close,e.frameColor,{bold:!0})):"",I].join("")},matchRoomTextReplacements=e=>isNonEmptyString(e)?ce.flatMap(t=>{if(!e.includes(t.gate))return[];const g=e.match(t.pattern);return g?[{rule:t,match:g,marker:t.createMarker(g)}]:[]}):[],replaceRoomText=(e,t={})=>{if(!isNonEmptyString(e))return e;let g=e;for(const{rule:n,match:C,marker:I}of matchRoomTextReplacements(e))g=g.replace(n.pattern,renderRoomMarkerHtml(I,t));return g},createWormholeExitDescriptor=({warp:e,currentArea:t}={})=>{if(!e||"object"!=typeof e)return null;const g=t&&t===e.area?e.name:e.areaName;return isNonEmptyString(g)?{family:"room-exit",command:"worm warp",label:`Wormhole: (${g})`}:null},renderWormholeExitHtml=e=>e?`<span>, and <a class="mxp_send" href="#" rel="${escapeHtml(e.command)}">${escapeHtml(e.label)}</a>.</span>`:"",extractPartyChatPayload=e=>{if(!isPlainObject$1(e)||"party"!==toTrimmedString(e.channel)?.toLowerCase())return null;const t=toTrimmedString(e.talker),g=stripAnsi(e.text);return t&&g?{talker:t,message:g.match(/^\(Party\): (\w+) says, "(.+)"$/)?.[2]??g}:null},capitalizeLookupName=e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`,createPartyAutomationModel=({characterModel:e,partyModel:t,playerDirectory:g,sendCommand:n}={})=>{const send=e=>{"function"==typeof n&&n(e)},processChannelText=n=>{const C=extractPartyChatPayload(n);if(!C)return!1;const I=t.snapshot();if(!I.settings.targetCalls||C.talker!==I.leader)return!1;const o=C.message.match(/^Target: (.+)\.$/)??C.message.match(/^(?:Target|TARGET) (.+)\.$/);if(o){const t=toTrimmedString(o[1]);if(!t)return!1;const n=e.snapshot(),C=g.getPlayerProfile(n.name)?.city??"",I=g.getPlayerProfile(capitalizeLookupName(t))??g.getPlayerProfile(t);return!(I?.city&&C&&I.city===C||(send(`settarget ${t}`),send(`enemy ${t}`),0))}const a=C.message.match(/^Enemy (.+)\.$/);if(a){const e=toTrimmedString(a[1]);if(e)return send(`enemy ${e}`),!0}return!1},processEvent=(e,t)=>"Comm.Channel.Text"===e&&processChannelText(t);return Object.freeze({processChannelText,processEvent})},pe=(F={commands:["send","sendGmcp"],variables:["getVariable","setVariable"],target:["getTarget","setTarget"],output:["notice","gagCurrentBlock"],host:["getHostSettings","setHostSetting","getHostLayoutSnapshot","updateHostLayoutAttributes","focusInput","getConfiguredDefences"],events:["on","off"],lifecycle:["destroy"]},Object.freeze(Object.fromEntries(Object.entries(F).map(([e,t])=>[e,Object.freeze([...t])])))),me=Object.freeze(Object.values(pe).flat()),assertAdapterContract=e=>{const t=me;for(const g of t)if("function"!=typeof e?.[g])throw new Error(`[nexGui4] Adapter missing required method: "${g}"`);return e},createStoreImpl=e=>{let t;const g=new Set,setState=(e,n)=>{const C="function"==typeof e?e(t):e;if(!Object.is(C,t)){const e=t;t=(null!=n?n:"object"!=typeof C||null===C)?C:Object.assign({},t,C),g.forEach(g=>g(t,e))}},getState=()=>t,n={setState,getState,getInitialState:()=>C,subscribe:e=>(g.add(e),()=>g.delete(e))},C=t=e(setState,getState,n);return n},createStore=e=>e?createStoreImpl(e):createStoreImpl,identity$1=e=>e;function useStore(e,t=identity$1){const g=l.default.useSyncExternalStore(e.subscribe,l.default.useCallback(()=>t(e.getState()),[e,t]),l.default.useCallback(()=>t(e.getInitialState()),[e,t]));return l.default.useDebugValue(g),g}var createImpl=e=>{const t=createStore(e),useBoundStore=e=>useStore(t,e);return Object.assign(useBoundStore,t),useBoundStore},create=e=>e?createImpl(e):createImpl,normalizeConfiguredDefenceList=e=>{if(!Array.isArray(e))return[];const t=new Set;return e.reduce((e,g)=>{if("string"!=typeof g)return e;const n=g.trim();return!n||t.has(n)||(t.add(n),e.push(n)),e},[])},createDefenceStore=({defenceModel:e,eventBus:t,configuredDefences:g=[]})=>{const readDefences=()=>e.read?.()??e.snapshot(),n=create(()=>({defences:readDefences(),configuredDefences:normalizeConfiguredDefenceList(g),gainDefence:t=>e.gain(t),loseDefence:t=>e.lose(t),resetDefences:()=>{e.reset(),n.setState({defences:readDefences()})},setConfiguredDefences:e=>{n.setState({configuredDefences:normalizeConfiguredDefenceList(e)})}})),refreshDefences=()=>{n.setState({defences:readDefences()})};return t.on(_.DEFENCE_GAINED,refreshDefences),t.on(_.DEFENCE_LOST,refreshDefences),n},removeTrackedHandler=(e,t,g)=>{const n=e.get(t);if(n){if("string"==typeof g)n.delete(g);else for(const[e,t]of n.entries())if(t===g){n.delete(e);break}0===n.size&&e.delete(t)}},normalizeListenerIdSegment=e=>String(e).replace(/[^A-Za-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-"),createDefaultListenerId=(e,t)=>{const g=`nexGui4-${normalizeListenerIdSegment(e)||"event"}`;if(!t||0===t.size)return g;let n=t.size+1,C=`${g}-${n}`;for(;t.has(C);)n+=1,C=`${g}-${n}`;return C},fe="#00B1D2",he=`<span style="color:${fe};">[-</span><span style="color:#FDDB27;">nexGui</span><span style="color:${fe};">-] </span>`,renderNoticeHtml=(e,t)=>{if(t?.html)return he+String(e);const g=t&&"object"==typeof t?t.style:t,n=escapeHtml(e);return"string"==typeof g&&g.trim()?he+`<span style="color: ${escapeHtml(g.trim())};">${n}</span>`:he+n},getHostSettings=()=>nexusclient.settings?.()??{},getHostLayout=()=>nexusclient.ui?.()?.layout?.()??null,updateHostLayoutAttributes=e=>{const t=getHostLayout();t?.flexModel?.doAction&&"function"==typeof t.model&&t.flexModel.doAction({type:"FlexLayout_UpdateModelAttributes",data:{json:{...t.model()?.global??{},...e}}})},extractLegacyRuntimeConfiguredDefences=()=>normalizeConfiguredDefenceList(globalThis.nexGui?.defences),extractNexSysConfiguredDefences=()=>{const e=globalThis.nexSys?.defPrios,t=globalThis.nexSys?.defs;if("[object Object]"!==Object.prototype.toString.call(e)||"[object Object]"!==Object.prototype.toString.call(t))return[];const g=Object.entries(e.keepup??{}).filter(([,e])=>Boolean(e)).map(([e])=>e).filter(e=>Boolean(t?.[e]?.prio)),n=Object.entries(e.static??{}).filter(([,e])=>Boolean(e)).map(([e])=>e).filter(e=>Boolean(t?.[e]?.prio));return normalizeConfiguredDefenceList([...g,...n])},resolveConfiguredDefences=()=>{const e=extractLegacyRuntimeConfiguredDefences();return e.length>0?e:extractNexSysConfiguredDefences()},createNexusAdapter=({playerRelationships:e}={})=>{const t=new Map;return assertAdapterContract({send:t=>(e?.trackRelationshipCommand?.(t),nexusclient.send_commands(t)),sendGmcp:(e,t)=>nexusclient.datahandler().send_GMCP(e,t),getVariable:e=>nexusclient.variables().vars?.[e],setVariable:(e,t)=>{const g=nexusclient.variables();g.vars??={},g.vars[e]=t},getTarget:()=>null,setTarget:e=>{nexusclient.setTarget(e)},notice:(e,t)=>{if("function"==typeof nexusclient.add_html_line)return void nexusclient.add_html_line(renderNoticeHtml(e,t));const g=t&&"object"==typeof t?t.style:t;"function"==typeof nexusclient.writeLine&&nexusclient.writeLine(e,g)},getHostSettings,setHostSetting:(e,t)=>{getHostSettings()[e]=t},getHostLayoutSnapshot:()=>getHostLayout()?.model?.()?.global??{},updateHostLayoutAttributes,focusInput:()=>{nexusclient.focusInput?.()},getConfiguredDefences:resolveConfiguredDefences,gagCurrentBlock:()=>nexusclient.current_block?.forEach(e=>e.gag=!0),on:(e,g,n)=>{t.has(e)||t.set(e,new Map);const C=t.get(e),I=null!=n?.id?n:{...n,id:createDefaultListenerId(e,C)},o=eventStream.registerEvent(e,g,I);return t.get(e).set(o,g),()=>{eventStream.removeListener(e,o),removeTrackedHandler(t,e,o)}},off:(e,g)=>{eventStream.removeListener(e,g),removeTrackedHandler(t,e,g)},destroy:()=>{for(const[e,g]of t.entries())for(const t of g.keys())eventStream.removeListener(e,t);t.clear()}})},ye=Object.freeze({"(hidden)":"orange","(none)":"orange",ashtan:"#990099",cyrene:"#009999",eleusis:"#00e600",hashan:"#999900",mhaldor:"#e60000",targossas:"#ffffff",garden:"yellow",underworld:"tomato"}),normalizePlayerCityKey=e=>{if(!isNonEmptyString(e))return"";const t=e.trim().toLowerCase();return"(hidden)"===t||"(none)"===t?t:t.replace(/\(.+?\)/g,"").replace(/,.*$/g,"").trim()},getPlayerCityColor=(e,t="orange")=>{const g=normalizePlayerCityKey(e);return g?ye[g]??t:t},resolveRoomPlayerName=(e,t)=>isNonEmptyString(e)?e.trim():isPlainObject$1(e)?isNonEmptyString(e.name)?e.name.trim():isNonEmptyString(e.fullname)?t?.resolvePlayerNameFromFullname?.(e.fullname)??"":"":"",buildFallbackPlayerProfile=(e,t)=>{if(!isPlainObject$1(e))return null;const g={loaded:!0,name:t};return isNonEmptyString(e.city)&&(g.city=normalizePlayerCityKey(e.city)),isNonEmptyString(e.class)&&(g.class=e.class.trim()),isNonEmptyString(e.fullname)&&(g.fullname=e.fullname.trim()),"number"==typeof e.level&&Number.isFinite(e.level)?g.level=e.level:isNonEmptyString(e.level)&&(g.level=e.level.trim()),Object.keys(g).length>2?g:null},mergePlayerPresentationProfile=(e,t)=>e?t?{...t,...e,loaded:!0===e.loaded||!0===t.loaded}:e:t,resolvePlayerPresentationColor=({name:e,profile:t,playerDirectory:g}={})=>!0===t?.loaded&&isNonEmptyString(t.city)?getPlayerCityColor(t.city):g?.getPlayerColor?.(ne(e))??"grey",cloneProfileValue=e=>Array.isArray(e)||isPlainObject$1(e)?structuredClone(e):e,sanitizeProfilePatch=(e={})=>{if(!isPlainObject$1(e))return{};const t={};for(const[g,n]of Object.entries(e))"name"!==g&&"regex"!==g&&"user"!==g&&("loaded"!==g?"city"!==g?"fullname"!==g?"source"!==g?"loadedAt"!==g&&"remoteSyncedAt"!==g?null!=n&&("string"!=typeof n?("number"==typeof n||"boolean"==typeof n||Array.isArray(n)||isPlainObject$1(n))&&(t[g]=cloneProfileValue(n)):n.trim().length>0&&(t[g]=n.trim())):"number"==typeof n&&Number.isFinite(n)?t[g]=n:null===n&&(t[g]=null):"local"!==n&&"public"!==n&&"remote"!==n||(t.source=n):isNonEmptyString(n)&&(t.fullname=n.trim()):isNonEmptyString(n)&&(t.city=normalizePlayerCityKey(n)):t.loaded=!0===n);return t},resolveFetch$1=e=>"function"==typeof e?e:null,createPlayerDirectoryModel=({fetchImpl:e,now:t=()=>0}={})=>{const g=new Map,n=new Map,C=new Map,I=new Set;let o=0;const notifyListeners=()=>{o+=1,I.forEach(e=>{try{e()}catch{}})},upsertProfile=(e,t={})=>{const C=ne(e);if(!C)return;const I={...g.get(C)??{name:C,city:"",fullname:"",loaded:!1,source:"local",loadedAt:null,remoteSyncedAt:null},...sanitizeProfilePatch(t),name:C};g.set(C,I),isNonEmptyString(I.fullname)&&n.set(I.fullname.trim(),C),notifyListeners()},resolveStoredName=e=>{const t=ne(e);if(!t)return"";if(g.has(t))return t;const n=normalizeLookupKey(t);for(const C of g.keys())if(C.toLowerCase()===n)return C;return t},getStoredProfileByNormalizedName=e=>e&&g.has(e)?g.get(e)??null:null,getPlayerProfile=e=>{const t=getStoredProfileByNormalizedName(ne(e));return t?{...t}:null},fetchCharacterProfile=async g=>{const n=ne(g),I=resolveStoredName(g),o=normalizeLookupKey(g);if(!n)return null;if(C.has(o))return C.get(o);const a=resolveFetch$1(e);if("function"!=typeof a)return I?getPlayerProfile(I):null;const i=(async()=>{try{const e=await a(`https://api.achaea.com/characters/${n.toLowerCase()}.json`,{cache:"no-store"});if(!e.ok)return I?getPlayerProfile(I):null;const g=await e.json(),C=resolveStoredName(g?.name??n);return upsertProfile(C,{...g,loaded:!0,source:"public",loadedAt:t()}),getPlayerProfile(C)}catch{return I?getPlayerProfile(I):null}finally{C.delete(o)}})();return C.set(o,i),i},refreshPlayerProfile=async e=>{const t=await fetchCharacterProfile(e);if(t)return t;const g=resolveStoredName(e);return g?getPlayerProfile(g):null},subscribePlayerDirectory=e=>(I.add(e),()=>{I.delete(e)}),rememberPlayerStatus=({name:e,city:t,fullname:g,...n}={})=>{const C=ne(e);C&&upsertProfile(C,{...n,name:C,city:t,fullname:g,loaded:!0})},rememberChannelPlayers=e=>{Array.isArray(e)&&e.forEach(e=>{const t=ne(e?.name);t&&(upsertProfile(t,{fullname:e?.fullname}),g.get(t)?.loaded||fetchCharacterProfile(t))})},rememberRoomPlayers=e=>{Array.isArray(e)&&e.forEach(e=>{const t=ne(e?.name??e);t&&(upsertProfile(t,{fullname:e?.fullname}),g.get(t)?.loaded||fetchCharacterProfile(t))})},resolvePlayerNameFromFullname=e=>{if(!isNonEmptyString(e))return"";const t=e.trim();return n.get(t)||ne(t.split(/\s+/).at(-1))},getPlayerColorByNormalizedName=e=>{const t=getStoredProfileByNormalizedName(e);return t?.loaded&&t.city?getPlayerCityColor(t.city):"grey"},getPlayerColor=e=>getPlayerColorByNormalizedName(ne(e)),resetPlayerDirectory=()=>{g.clear(),n.clear(),C.clear(),notifyListeners()},hydrateFromCacheEntries=e=>{Array.isArray(e)&&e.forEach(e=>{const t=ne(e?.name);t&&upsertProfile(t,{...e,loaded:!0})})},hydrateFromRemoteEntries=e=>{if(!Array.isArray(e))return;const g=t();e.forEach(e=>{const t=ne(e?.name);t&&upsertProfile(t,{...e,loaded:!0,source:"remote",remoteSyncedAt:g})})},getAllPlayerProfiles=()=>Array.from(g.values()).map(e=>({...e})),getKnownPlayerNames=()=>Array.from(g.keys()),destroy=()=>{g.clear(),n.clear(),C.clear(),I.clear()};return Object.freeze({getAllPlayerProfiles,getKnownPlayerNames,getPlayerColor,getPlayerColorByNormalizedName,getPlayerProfile,getVersion:()=>o,hydrateFromCacheEntries,hydrateFromRemoteEntries,refreshPlayerProfile,rememberChannelPlayers,rememberPlayerStatus,rememberRoomPlayers,resetPlayerDirectory,resolvePlayerNameFromFullname,subscribePlayerDirectory,destroy})},be=createPlayerDirectoryModel(),getDefaultPlayerDirectoryModel=()=>be,getPlayerProfile=e=>be.getPlayerProfile(e),updateSetMembership=(e,t,g)=>{if(!t)return!1;const n=e.has(t);return g&&!n?(e.add(t),!0):!(g||!n||(e.delete(t),0))},normalizeNames=e=>Array.isArray(e)?new Set(e.map(e=>ne(e)).filter(Boolean)):new Set,replaceSetContents=(e,t)=>{const g=normalizeNames(t);let n=!1;return[...e].forEach(t=>{g.has(t)||(e.delete(t),n=!0)}),g.forEach(t=>{e.has(t)||(e.add(t),n=!0)}),n},createPlayerRelationshipsModel=()=>{const e=new Set,t=new Set,g=new Set,n=new Set;let C=0;const notifyListeners=()=>{C+=1,n.forEach(e=>{try{e()}catch{}})},subscribePlayerRelationships=e=>(n.add(e),()=>{n.delete(e)}),rememberEnemyPlayer=g=>{const n=ne(g),C=updateSetMembership(e,n,!0),I=updateSetMembership(t,n,!1);(C||I)&&notifyListeners()},rememberAllyPlayer=g=>{const n=ne(g),C=updateSetMembership(t,n,!0),I=updateSetMembership(e,n,!1);(C||I)&&notifyListeners()},forgetEnemyPlayer=t=>{updateSetMembership(e,ne(t),!1)&&notifyListeners()},forgetAllyPlayer=e=>{updateSetMembership(t,ne(e),!1)&&notifyListeners()},rememberCityEnemyPlayer=e=>{updateSetMembership(g,ne(e),!0)&&notifyListeners()},isEnemyPlayerByNormalizedName=t=>e.has(t),isAllyPlayerByNormalizedName=e=>t.has(e),isCityEnemyPlayerByNormalizedName=e=>g.has(e),isEnemyPlayer=e=>isEnemyPlayerByNormalizedName(ne(e)),isAllyPlayer=e=>isAllyPlayerByNormalizedName(ne(e)),isCityEnemyPlayer=e=>isCityEnemyPlayerByNormalizedName(ne(e)),replaceEnemyPlayers=g=>{const n=normalizeNames(g);let C=replaceSetContents(e,[...n]);n.forEach(e=>{C=updateSetMembership(t,e,!1)||C}),C&&notifyListeners()},replaceAllyPlayers=g=>{const n=normalizeNames(g);let C=replaceSetContents(t,[...n]);n.forEach(t=>{C=updateSetMembership(e,t,!1)||C}),C&&notifyListeners()},replaceCityEnemyPlayers=e=>{replaceSetContents(g,e)&&notifyListeners()},trackRelationshipCommand=e=>{if(!isNonEmptyString(e))return;const t=e.trim(),g=t.match(/^enemy\s+(.+)$/i);if(g)return void rememberEnemyPlayer(g[1]);const n=t.match(/^ally\s+(.+)$/i);if(n)return void rememberAllyPlayer(n[1]);const C=t.match(/^city enemy\s+(.+)$/i);C&&rememberCityEnemyPlayer(C[1])},resetPlayerRelationships=()=>{e.clear(),t.clear(),g.clear(),notifyListeners()},destroy=()=>{e.clear(),t.clear(),g.clear(),n.clear()};return Object.freeze({forgetAllyPlayer,forgetEnemyPlayer,getVersion:()=>C,isAllyPlayer,isAllyPlayerByNormalizedName,isCityEnemyPlayer,isCityEnemyPlayerByNormalizedName,isEnemyPlayer,isEnemyPlayerByNormalizedName,rememberAllyPlayer,rememberCityEnemyPlayer,rememberEnemyPlayer,replaceAllyPlayers,replaceCityEnemyPlayers,replaceEnemyPlayers,resetPlayerRelationships,subscribePlayerRelationships,trackRelationshipCommand,destroy})},ve=createPlayerRelationshipsModel(),getDefaultPlayerRelationshipsModel=()=>ve,xe=25,cloneDiagnosticValue=e=>Array.isArray(e)?e.map(e=>cloneDiagnosticValue(e)):isPlainObject$1(e)?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,cloneDiagnosticValue(t)])):e,toPublicEntry=({_signature:e,...t})=>cloneDiagnosticValue(t),buildSignature=({channel:e,action:t,status:g,name:n=null,detail:C=null})=>JSON.stringify([e,t,g,n,C]),createPlayerDirectoryDiagnosticsModel=({historyLimit:e=xe,now:t=()=>0}={})=>{let g=[],n={};const recordPlayerDirectoryDiagnostic=({channel:C,action:I,status:o,name:a=null,detail:i=null})=>{const s=buildSignature({channel:C,action:I,status:o,name:a,detail:i}),l=t(),c=g.at(-1);if(c?._signature===s)return c.at=l,c.count+=1,void(n[C]=toPublicEntry(c));g.push({at:l,channel:C,action:I,status:o,...a?{name:a}:{},...null==i?{}:{detail:cloneDiagnosticValue(i)},count:1,_signature:s}),g.length>e&&g.splice(0,g.length-e),n[C]=toPublicEntry(g.at(-1))},getPlayerDirectoryDiagnosticsSnapshot=()=>({latest:cloneDiagnosticValue(n),history:g.map(e=>toPublicEntry(e))}),resetPlayerDirectoryDiagnostics=()=>{g=[],n={}};return Object.freeze({getPlayerDirectoryDiagnosticsSnapshot,recordPlayerDirectoryDiagnostic,resetPlayerDirectoryDiagnostics,destroy:resetPlayerDirectoryDiagnostics})},Se=createPlayerDirectoryDiagnosticsModel(),getDefaultPlayerDirectoryDiagnosticsModel=()=>Se,recordPlayerDirectoryDiagnostic=e=>Se.recordPlayerDirectoryDiagnostic(e),we=Object.freeze({DISABLED:"disabled",OK:"ok",UNAVAILABLE:"unavailable",REJECTED:"rejected"}),httpStatusToRemoteStatus=e=>401===e||403===e?we.REJECTED:e>=500||0===e?we.UNAVAILABLE:e>=200&&e<300?we.OK:we.UNAVAILABLE,createNullRemotePlayerService=()=>({checkAvailability:async()=>we.DISABLED,hydrateDirectory:async()=>({ok:!1,remoteStatus:we.DISABLED}),upsertProfile:async()=>({ok:!1,remoteStatus:we.DISABLED}),deleteProfile:async()=>({ok:!1,remoteStatus:we.DISABLED})}),createLambdaRemotePlayerService=({apiUrl:e,apiKey:t="",fetchFn:g=null}={})=>{if("string"!=typeof e||!e.trim())return createNullRemotePlayerService();const n=e.trim(),C="function"==typeof g?g:null,call=async({method:e,params:g={},body:I})=>{const o=new URLSearchParams;for(const[t,n]of Object.entries(g))"filter"===t&&null!==n&&"object"==typeof n?o.set(t,JSON.stringify(n)):void 0!==n&&o.set(t,String(n));const a=o.toString()?`${n}?${o}`:n,i={"Content-Type":"application/json"};t&&(i["x-api-key"]=t);const s={method:e,headers:i};void 0!==I&&(s.body=JSON.stringify(I));const l=await C(a,s);return{status:l.status,ok:l.ok,response:l}};return{checkAvailability:async()=>{if("function"!=typeof C)return we.UNAVAILABLE;try{const{status:e}=await call({method:"GET",params:{check:"auth"}});return httpStatusToRemoteStatus(e)}catch{return we.UNAVAILABLE}},hydrateDirectory:async()=>{if("function"!=typeof C)return{ok:!1,remoteStatus:we.UNAVAILABLE};try{const{status:e,ok:t,response:g}=await call({method:"GET",params:{name:"ALL",collection:"characters"}}),n=httpStatusToRemoteStatus(e);if(!t)return{ok:!1,remoteStatus:n};const C=await g.json();return{ok:!0,entries:Array.isArray(C)?C:[],remoteStatus:we.OK}}catch{return{ok:!1,remoteStatus:we.UNAVAILABLE}}},upsertProfile:async e=>{if("function"!=typeof C)return{ok:!1,remoteStatus:we.UNAVAILABLE};try{const{status:t,ok:g}=await call({method:"POST",params:{collection:"characters"},body:{data:e}});return{ok:g,remoteStatus:httpStatusToRemoteStatus(t)}}catch{return{ok:!1,remoteStatus:we.UNAVAILABLE}}},deleteProfile:async e=>{if("function"!=typeof C)return{ok:!1,remoteStatus:we.UNAVAILABLE};try{const{status:t,ok:g}=await call({method:"DELETE",params:{name:e,collection:"characters"}});return{ok:g,remoteStatus:httpStatusToRemoteStatus(t)}}catch{return{ok:!1,remoteStatus:we.UNAVAILABLE}}}}},joinFontFamily=(...e)=>e.join(", "),Ee=joinFontFamily('"Roboto Mono"',"Consolas","monospace"),Re=Object.freeze([Object.freeze({label:"Roboto Mono",value:Ee}),Object.freeze({label:"Consolas",value:joinFontFamily("Consolas","Monaco","monospace")}),Object.freeze({label:"JetBrains Mono",value:joinFontFamily('"JetBrains Mono"',"Consolas","monospace")}),Object.freeze({label:"Fira Code",value:joinFontFamily('"Fira Code"',"Consolas","monospace")}),Object.freeze({label:"Source Code Pro",value:joinFontFamily('"Source Code Pro"',"Consolas","monospace")}),Object.freeze({label:"Courier New",value:joinFontFamily('"Courier New"',"monospace")})]),normalizeDisplayFontFamily=e=>"string"!=typeof e?Ee:e.trim()||Ee,normalizeDisplayFontSize=(e,t=14)=>{if("number"==typeof e&&Number.isFinite(e)&&e>0)return Math.round(e);if("string"==typeof e){const t=Number.parseFloat(e);if(Number.isFinite(t)&&t>0)return Math.round(t)}return t},readHostDisplayFontFamily=(e={})=>normalizeDisplayFontFamily("function"==typeof e?.get_font_family?e.get_font_family():e?.font_family),readHostDisplayFontSize=(e={})=>normalizeDisplayFontSize(e?.font_size),ke=1,clonePersistenceValue=e=>Array.isArray(e)?e.map(e=>clonePersistenceValue(e)):isPlainObject$1(e)?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,clonePersistenceValue(t)])):e,normalizeLeafValue=(e,t)=>"boolean"==typeof e?"boolean"==typeof t?t:e:"number"==typeof e?"number"==typeof t&&Number.isFinite(t)?t:e:"string"==typeof e?"string"==typeof t?t:e:clonePersistenceValue(e),applySchemaPatch=(e,t,g)=>{if(isPlainObject$1(g))for(const n of Object.keys(e)){if("version"===n||!Object.hasOwn(g,n))continue;const C=e[n],I=g[n];Array.isArray(C)?t[n]=Array.isArray(I)?clonePersistenceValue(I):clonePersistenceValue(C):isPlainObject$1(C)?applySchemaPatch(C,t[n],I):t[n]=normalizeLeafValue(C,I)}},createSchemaSnapshot=(e,...t)=>{const g=clonePersistenceValue(e);for(const n of t)applySchemaPatch(e,g,n);return Object.hasOwn(e,"version")&&(g.version=e.version),g},Me="nexGui4Settings",Te=Object.freeze({SETTINGS:"settings",GAME_STATS:"gameStats",UI:"ui",PLAYER_DIRECTORY:"playerDirectory"}),Pe=deepFreeze({version:ke,theme:{backgroundImage:"",fontSize:12,displayFontFamily:Ee,displayFontSize:14,backgroundOpacity:.5,hue:0},ui:{loginTracker:!1,msgReplace:!1,showCombatStream:!1,showSystemStream:!1,logoutDownload:!1,virtualizedLogs:!1,allyEnemyFormatting:!0,targetFormatting:!0,damageNumbers:!0,nativeDisplay:!1},party:{goldCollection:!0,targetCalls:!0,affCalls:!0,callTargets:!1,callAffs:!1,gagChat:!1}}),Ne=deepFreeze({version:ke,kills:0,month:{deaths:0,goldCap:0,month:0,startingGold:0,startingKills:0,startingXp:0,currentXp:0,xpValue:0,year:0}}),De=deepFreeze({version:ke,scrollbackModal:{width:600,height:400,x:0,y:0}}),normalizePersistenceFragment=(e,t)=>Array.isArray(e)?Array.isArray(t)?clonePersistenceValue(t):clonePersistenceValue(e):isPlainObject$1(e)?createSchemaSnapshot(e,t):normalizeLeafValue(e,t),migrateSettingsPersistence=e=>createSchemaSnapshot(Pe,e),migrateGameStatsPersistence=e=>createSchemaSnapshot(Ne,e),migrateUiPersistence=e=>createSchemaSnapshot(De,e),Oe="function"==typeof queueMicrotask?queueMicrotask:e=>Promise.resolve().then(e),resolvePlayerDirectory$1=e=>e??getDefaultPlayerDirectoryModel(),resolveDiagnostics=e=>e??getDefaultPlayerDirectoryDiagnosticsModel(),resolveCacheReader=(e,t)=>"function"==typeof e?e:"function"==typeof e?.readCache?e.readCache.bind(e):"function"==typeof e?.getVariable?t=>(e.getVariable("nexGui4Settings")||{})[Te.PLAYER_DIRECTORY]:"function"==typeof t?t:null,resolveCacheWriter=(e,t)=>"function"==typeof e?e:"function"==typeof e?.writeCache?e.writeCache.bind(e):"function"==typeof e?.setVariable?(t,g)=>{const n=e.getVariable("nexGui4Settings")||{};n[Te.PLAYER_DIRECTORY]=g,e.setVariable(Me,n)}:"function"==typeof t?t:null,parseStoredSnapshot=e=>Array.isArray(e)?e:null,createSnapshotSaver=(e,t)=>g=>{"function"==typeof g&&g(t,e.getAllPlayerProfiles().filter(e=>e.loaded&&(e.city||e.fullname)))},createPlayerDirectoryLifecycle=({playerDirectory:e,diagnostics:t,readCache:g,writeCache:n,storageKey:C=Te.PLAYER_DIRECTORY}={})=>{const I=resolvePlayerDirectory$1(e),o=resolveDiagnostics(t),a=createSnapshotSaver(I,C);let i=!1,s=null,l=!1,c=!1;const recordDiagnostic=e=>o.recordPlayerDirectoryDiagnostic(e),isDirectorySeeded=()=>i,resetSeededFlag=()=>{i=!1},warmDirectoryFromCache=e=>{const t=resolveCacheReader(e,g);try{const e=t?.(C),g=parseStoredSnapshot(e);null!==g&&g.length>0&&I.hydrateFromCacheEntries(g)}catch{}finally{i=!0}},saveDirectorySnapshot=e=>{a(resolveCacheWriter(e,n))},subscribePersistence=e=>{const t=resolveCacheWriter(e,n);if(s?.(),s=null,l=!1,c=!0,"function"!=typeof t||"function"!=typeof I.subscribePlayerDirectory)return()=>{};const scheduleSave=()=>{c&&!l&&(l=!0,Oe(()=>{l=!1,c&&saveDirectorySnapshot(t)}))};return s=I.subscribePlayerDirectory(scheduleSave),()=>{c=!1,s?.(),s=null}},refreshDirectoryFromRemote=async(e,t)=>{try{const g=await e.hydrateDirectory(),n=Array.isArray(g?.entries)?g.entries.length:0;recordDiagnostic({channel:"remote",action:"hydrateDirectory",status:g?.remoteStatus??we.UNAVAILABLE,detail:{ok:!0===g?.ok,entryCount:n}}),g.ok&&Array.isArray(g.entries)&&g.entries.length>0&&(I.hydrateFromRemoteEntries(g.entries),saveDirectorySnapshot(t))}catch{recordDiagnostic({channel:"remote",action:"hydrateDirectory",status:we.UNAVAILABLE,detail:{ok:!1,exception:!0}})}},reset=()=>{i=!1,l=!1,c=!1,s?.(),s=null,o.resetPlayerDirectoryDiagnostics?.()};return Object.freeze({destroy:reset,isDirectorySeeded,refreshDirectoryFromRemote,reset,resetSeededFlag,saveDirectorySnapshot,subscribePersistence,warmDirectoryFromCache})},je=createPlayerDirectoryLifecycle(),isDirectorySeeded=()=>je.isDirectorySeeded(),ACHAEA_CHARACTER_URL=e=>`https://api.achaea.com/characters/${e.toLowerCase()}.json`,ze=Object.freeze({OK:"ok",AUTHORITATIVE_FAILURE:"authoritative_failure",TRANSIENT_FAILURE:"transient_failure"}),fetchPublicProfileForSync=async(e,{fetchFn:t=null}={})=>{if("function"!=typeof t)return{outcome:ze.TRANSIENT_FAILURE,data:null};try{const g=await t(ACHAEA_CHARACTER_URL(e),{method:"GET",cache:"no-store"});if(!g.ok)return{outcome:g.status>=500?ze.TRANSIENT_FAILURE:ze.AUTHORITATIVE_FAILURE,data:null};const n=await g.json();return{outcome:ze.OK,data:n}}catch{return{outcome:ze.TRANSIENT_FAILURE,data:null}}},normalizeCrowdsourceCity=(e,t,{getPlayerProfile:g=getPlayerProfile}={})=>{if("Romeo"===t||"Juliet"===t)return"garden";const n="string"==typeof e?.city?e.city:"";if(""===n)return"garden";if("(hidden)"===n.toLowerCase()){const e=g(t)?.city??"";return e&&"(hidden)"!==e?e:"(none)"}return n},createCrowdsourceSyncHandler=({remoteService:e,getSelfName:t=()=>null,getPlayerProfile:g=getPlayerProfile,isSeeded:n=isDirectorySeeded,recordDiagnostic:C=recordPlayerDirectoryDiagnostic,fetchFn:I=null,fetchProfileForSync:o=e=>fetchPublicProfileForSync(e,{fetchFn:I}),maxConcurrent:a=3})=>{let i=[];const s=new Set,l=[],processOneName=async n=>{const I=t();if(I&&n===I)return;const{outcome:a,data:i}=await o(n);if(a===ze.OK&&i){const t=normalizeCrowdsourceCity(i,n,{getPlayerProfile:g}),o={...i,city:t};I&&(o.user=I);const a=await e.upsertProfile(o);return void(a?.ok||C({channel:"crowdsource",action:"upsertProfile",status:a?.remoteStatus??"unavailable",name:n}))}if(a===ze.AUTHORITATIVE_FAILURE){C({channel:"crowdsource",action:"publicProfileFetch",status:ze.AUTHORITATIVE_FAILURE,name:n});const t=await e.deleteProfile(n);return void C({channel:"crowdsource",action:"deleteProfile",status:t?.remoteStatus??"unavailable",name:n,detail:{ok:!0===t?.ok}})}C({channel:"crowdsource",action:"publicProfileFetch",status:ze.TRANSIENT_FAILURE,name:n})},drainQueue=()=>{for(;s.size<a&&l.length>0;){const e=l.shift();e&&!s.has(e)&&(s.add(e),processOneName(e).finally(()=>{s.delete(e),drainQueue()}))}},enqueue=e=>{for(const t of e)s.has(t)||l.includes(t)||l.push(t);drainQueue()};return e=>{if(!n())return;if(!Array.isArray(e))return;const t=e.map(e=>"string"==typeof e?.name?e.name.trim():"").filter(Boolean),g=t.filter(e=>!i.includes(e));i=[...t],g.length>0&&enqueue(g)}},isPresent=e=>null!=e&&String(e).length>0,classAttribute=e=>isPresent(e)?` class="${escapeHtml(e)}"`:"",styleAttribute$1=(e={})=>{const t=Object.entries(e??{}).filter(([,e])=>isPresent(e)).map(([e,t])=>`${escapeHtml(e)}:${escapeHtml(t)}`).join(";");return t?` style="${t};"`:""},titleAttribute=e=>isPresent(e)?` title="${escapeHtml(e)}"`:"",span=(e,{className:t=null,style:g=null}={})=>`<span${classAttribute(t)}${styleAttribute$1(g)}>${e}</span>`,textNode=e=>({kind:"text",text:e}),classTextNode=(e,t)=>({kind:"class-text",className:e,text:t}),styledTextNode=(e,{className:t=null,fg:g=null,bg:n=null}={})=>({kind:"styled-text",className:t,text:e,fg:g,bg:n}),relationshipNameNode=e=>({kind:"relationship-name",descriptor:e}),iconBandingNode=({icon:e,colors:t,size:g,children:n})=>({kind:"icon-banding",icon:e,colors:t,size:g,children:n}),Ge=Object.freeze({className:"ng-target-format",borderColor:"rgb(255, 0, 0)",boxShadow:"inset 0 0 0 1px rgb(255, 0, 0)",padding:"0 2px"}),Le=Object.freeze({ally:Object.freeze({className:"ng-brkt ng-brkt-ally",color:"#ffffff",open:"(",close:")"}),enemy:Object.freeze({className:"ng-brkt ng-brkt-enemy",color:"#ff0000",open:"(",close:")"})}),createRelationshipNameDescriptor=(e,t={})=>{if(!isNonEmptyString(e))return null;const g={family:"inline-name",text:e.trim(),color:t.color??"grey",italic:Boolean(t.isCityEnemy),target:Boolean(t.isTarget),bracket:null,targetStyle:Ge};return t.isAlly?g.bracket=Le.ally:t.isEnemy&&(g.bracket=Le.enemy),g},createPlayerRelationshipDescriptor=(e,t={})=>{if(!isNonEmptyString(e))return null;const g=e.trim(),n=isNonEmptyString(t.targetName)?t.targetName.trim():"",C=Boolean(t.isAlly),I=Boolean(t.isEnemy),o=Boolean(t.isCityEnemy),a=t.isTarget??(!1!==t.targetFormatting&&n.length>0&&n===g);return createRelationshipNameDescriptor(g,{color:t.color??"grey",isAlly:C,isEnemy:I,isCityEnemy:o,isTarget:a})},renderBracket=(e,t)=>`<span class="${e.className}"${styleAttribute$1({color:e.color,"font-weight":"bold"})}>${escapeHtml(t)}</span>`,renderRelationshipNameHtml=e=>{if(!e)return"";const t=`<span${styleAttribute$1({color:e.color,"font-style":e.italic?"italic":null})}>${escapeHtml(e.text)}</span>`,g=e.bracket?[renderBracket(e.bracket,e.bracket.open),t,renderBracket(e.bracket,e.bracket.close)].join(""):t;return e.target?`<span class="${e.targetStyle.className}"${styleAttribute$1({"box-shadow":e.targetStyle.boxShadow??`inset 0 0 0 1px ${e.targetStyle.borderColor}`,padding:e.targetStyle.padding})}>${g}</span>`:g},Be=Object.freeze({original:" ".repeat(8),adjusted:" ".repeat(6)}),Fe=new WeakMap,isAsciiUppercase=e=>{if("string"!=typeof e||0===e.length)return!1;const t=e.charCodeAt(0);return t>=65&&t<=90},isNameCharacter=e=>{if("string"!=typeof e||0===e.length)return!1;if("'"===e||"-"===e)return!0;const t=e.charCodeAt(0);return t>=65&&t<=90||t>=97&&t<=122},extractUniqueWords=e=>{const t="string"==typeof e?e.match(/[A-Z][A-Za-z'-]*/g):null;return t?[...new Set(t)]:[]},resolveDescriptorFactory=({createDescriptor:e,relationshipFormatter:t}={})=>"function"==typeof e?e:"function"==typeof t?t:"function"==typeof t?.createDescriptor?t.createDescriptor:null,resolveCompiledHighlighter=e=>{const t=e?.compiledHighlighter;return t&&Array.isArray(t.namesByLength)&&t.entries instanceof Map&&0!==t.entries.size?t:null},getCompiledInitialCharacters=e=>{const t=Fe.get(e);if(t)return t;const g=new Set;return e.entries.forEach((e,t)=>{"string"==typeof t&&t.length>0&&g.add(t.charAt(0))}),Fe.set(e,g),g},hasPotentialCompiledMatch=(e,t)=>{if("string"!=typeof e||0===e.length)return!1;const g=getCompiledInitialCharacters(t);for(let n=0;n<e.length;n+=1)if(g.has(e.charAt(n)))return!0;return!1},applyCompiledHighlighting=(e,t,g)=>{if(!hasPotentialCompiledMatch(e.text(),t))return!1;const n=e.formatted();if("string"!=typeof n||0===n.length)return!1;let C=0,I=0,o=null,a=!1;for(;C<n.length;){const e=n.charAt(C);if("<"===e){const e=n.indexOf(">",C+1);if(-1===e)break;C=e+1;continue}if(!isAsciiUppercase(e)){C+=1;continue}let i=C+1;for(;i<n.length&&isNameCharacter(n.charAt(i));)i+=1;const s=n.slice(C,i),l=t.entries.get(s);l?(null===o?o=[n.slice(0,C)]:o.push(n.slice(I,C)),o.push(l.html),I=i,C=i,g&&l.adjustsMonospacePadding&&(a=!0)):C=i}if(null===o)return!1;let i=o.join("")+n.slice(I);return a&&(i=i.replace(Be.original,Be.adjusted)),e.formatted=()=>i,!0},buildReplacementMapFromDescriptors=(e,t)=>{const g=new Map;return e.forEach(e=>{const n=t(e);n&&"grey"!==n.color&&g.set(e,{html:renderRelationshipNameHtml(n),bracketed:Boolean(n.bracket),adjustsMonospacePadding:Boolean(n.bracket)})}),g},applyInlineNameHighlighting=(e,{createDescriptor:t,relationshipFormatter:g,monospace:n=!1}={})=>{if(!e||e.nexSkillReplacement||"function"!=typeof e.text||"function"!=typeof e.formatted)return!1;const C=resolveCompiledHighlighter(g);if(C)return applyCompiledHighlighting(e,C,n);const I=resolveDescriptorFactory({createDescriptor:t,relationshipFormatter:g});if(!I)return!1;const o=buildReplacementMapFromDescriptors(extractUniqueWords(e.text()),I);if(0===o.size)return!1;const a=e.formatted();if("string"!=typeof a||0===a.length)return!1;let i=a,s=!1;for(const l of[...o.keys()].sort((e,t)=>t.length-e.length)){const e=o.get(l);e&&i.includes(l)&&(i=i.split(l).join(e.html),n&&e.adjustsMonospacePadding&&(i=i.replace(Be.original,Be.adjusted)),s=!0)}return!!s&&(e.formatted=()=>i,!0)},sortNamesByLengthDesc=(e,t)=>t.length-e.length,normalizeKnownNames=e=>{if(!Array.isArray(e))return[];const t=new Set,g=[];return e.forEach(e=>{const n=ne(e);n&&!t.has(n)&&(t.add(n),g.push(n))}),g},createCompiledInlineHighlighter=({knownNames:e=[],createDescriptor:t}={})=>{const g=new Map,n=normalizeKnownNames(e);return"function"!=typeof t||0===n.length?Object.freeze({namesByLength:Object.freeze([]),entries:g}):(n.forEach(e=>{const n=t(e);n&&"grey"!==n.color&&g.set(e,Object.freeze({html:renderRelationshipNameHtml(n),bracketed:Boolean(n.bracket),adjustsMonospacePadding:Boolean(n.bracket)}))}),Object.freeze({namesByLength:Object.freeze(n.filter(e=>g.has(e)).sort(sortNamesByLengthDesc)),entries:g}))},callPredicate=(e,t)=>{if("function"!=typeof e)return!1;try{return Boolean(e(t))}catch{return!1}},callColorResolver=(e,t)=>{if("function"!=typeof e)return"grey";try{return e(t)??"grey"}catch{return"grey"}},readKnownNames=e=>{if(Array.isArray(e))return e;if("function"!=typeof e)return[];try{const t=e();return Array.isArray(t)?t:[]}catch{return[]}},createRelationshipNameFormatter=(e={})=>{const t=ne(e.targetName),g=!1!==e.allyEnemyFormatting,n=!1!==e.targetFormatting,C=e.getPlayerColorByNormalizedName??e.getPlayerColor,I=e.isAllyPlayerByNormalizedName??e.isAllyPlayer,o=e.isEnemyPlayerByNormalizedName??e.isEnemyPlayer,a=e.isCityEnemyPlayerByNormalizedName??e.isCityEnemyPlayer,i=Array.isArray(e.knownPlayerNames)||"function"==typeof e.getKnownPlayerNames,s=readKnownNames(e.knownPlayerNames??e.getKnownPlayerNames),l=new Set(s.map(ne).filter(Boolean)),createDescriptor=(e,s={})=>{const c=ne(e),u=ne(s.text)||c;if(!c||!u)return null;const d=s.isAlly??(g&&callPredicate(I,c)),p=s.isEnemy??callPredicate(o,c),m=s.isCityEnemy??callPredicate(a,c),h=s.isTarget??(n&&(!i||l.has(c))&&t.length>0&&t===c);return createPlayerRelationshipDescriptor(u,{color:s.color??callColorResolver(C,c),isAlly:d,isEnemy:p,isCityEnemy:m,isTarget:h})},c=createCompiledInlineHighlighter({knownNames:s,createDescriptor});return Object.freeze({compiledHighlighter:c,createDescriptor,renderHtml:(e,t={})=>renderRelationshipNameHtml(createDescriptor(e,t))})},getUiSettings$3=e=>e?.persistenceStore?.getAll?.()?.ui??{},getCharacterState$2=e=>e?.stores?.character?.getState?.()??{},We=Object.freeze(["allyEnemyFormatting","targetFormatting","targetName","playerDirectory","playerDirectoryVersion","playerRelationships","playerRelationshipsVersion"]),Ve=new WeakMap,Ue=null,readModelVersion=e=>{if("function"!=typeof e?.getVersion)return null;try{return e.getVersion()}catch{return null}},createFormatterSignature=(e,t={})=>{const g=getUiSettings$3(e),n=getCharacterState$2(e),C=t.playerDirectory??e?.playerDirectory??null,I=t.playerRelationships??e?.playerRelationships??null;return{allyEnemyFormatting:!1!==g.allyEnemyFormatting,targetFormatting:!1!==g.targetFormatting,targetName:ne(t.targetName??n.target??null),playerDirectory:C,playerDirectoryVersion:readModelVersion(C),playerRelationships:I,playerRelationshipsVersion:readModelVersion(I)}},signaturesEqual$1=(e,t)=>null!==e&&null!==t&&We.every(g=>Object.is(e[g],t[g])),readCachedFormatter=e=>e&&"object"==typeof e?Ve.get(e)??null:Ue,writeCachedFormatter=(e,t)=>e&&"object"==typeof e?(Ve.set(e,t),t):(Ue=t,t),createFormatterFromSignature=e=>{const{playerDirectory:t,playerRelationships:g}=e;return createRelationshipNameFormatter({allyEnemyFormatting:e.allyEnemyFormatting,targetFormatting:e.targetFormatting,targetName:e.targetName,getKnownPlayerNames:t?.getKnownPlayerNames?.bind(t),getPlayerColor:t?.getPlayerColor?.bind(t),getPlayerColorByNormalizedName:t?.getPlayerColorByNormalizedName?.bind(t),isAllyPlayer:g?.isAllyPlayer?.bind(g),isAllyPlayerByNormalizedName:g?.isAllyPlayerByNormalizedName?.bind(g),isEnemyPlayer:g?.isEnemyPlayer?.bind(g),isEnemyPlayerByNormalizedName:g?.isEnemyPlayerByNormalizedName?.bind(g),isCityEnemyPlayer:g?.isCityEnemyPlayer?.bind(g),isCityEnemyPlayerByNormalizedName:g?.isCityEnemyPlayerByNormalizedName?.bind(g)})},clearRelationshipNameFormatterCache=e=>{e&&"object"==typeof e?Ve.delete(e):(void 0===e&&(Ve=new WeakMap),Ue=null)},createRelationshipNameFormatterFromContext=(e,t={})=>{const g=createFormatterSignature(e,t),n=readCachedFormatter(e);if(signaturesEqual$1(n?.signature??null,g))return n.formatter;const C=createFormatterFromSignature(g);return writeCachedFormatter(e,{signature:g,formatter:C}),C},applyContextInlineNameHighlighting=(e,{contextValue:t=null,monospace:g=!1}={})=>applyInlineNameHighlighting(e,{relationshipFormatter:createRelationshipNameFormatterFromContext(t),monospace:g}),highlightInlineNamesInText=(e,{contextValue:t=null}={})=>{const g={text:()=>e,formatted:()=>e};return applyContextInlineNameHighlighting(g,{contextValue:t})?{content:g.formatted(),isHtml:!0}:{content:e,isHtml:void 0}},Ke=deepFreeze([["a CRITICAL","2x"],["CRUSHING","4x"],["OBLITERATING","8x"],["ANNIHILATINGLY","16x"],["WORLD","32x"],["PLANE","64x"],["coalescence of power","MAYA"]]),He=deepFreeze({"physical cutting":"#708090","physical blunt":"#708090",magical:"#FFFFFF",poison:"#9ACD32",psychic:"#663399",fire:"#8B0000",cold:"#87CEFA",electricity:"#FFD700",asphyxiation:"#D2B48C",raw:"#FFB6C1",unblockable:"#FFB6C1"}),Ye=deepFreeze({attack:"orange",battlerage:"yellow",affliction:"red"}),Ze=deepFreeze({attainment:"yellow",gear:"plum"}),Qe=deepFreeze({eat:{id:"eat",fg:"gold",text:"Eat: ",banding:["{","}"]},smoke:{id:"smoke",fg:"orchid",text:"Smoke: ",banding:["{","}"]},apply:{id:"apply",fg:"aquamarine",text:"Apply: ",banding:["{","}"]},sip:{id:"sip",fg:"HotPink",text:"Sip: ",banding:["{","}"]},focus:{id:"focus",fg:"BlueViolet",text:"Focus",banding:["{","}"]},tattoo:{id:"tattoo",fg:"cornflowerBlue",text:"Tattoo: ",banding:["||","||"]},shield:{id:"shield",fg:"cyan",text:" Shield ",banding:{icon:"shield-cross",colors:["cyan","goldenrod"],size:16}},rebounding:{id:"rebounding",fg:"white",text:" Rebounding ",banding:{icon:"shield-cross",colors:["white","goldenrod"],size:16}},prismatic:{id:"prismatic",fg:"yellow",text:" Prismatic ",banding:{icon:"shield-cross",colors:["goldenrod","white"],size:16}},tree:{id:"tree",fg:"lawngreen",text:" Tree ",banding:{icon:"tree",colors:["green","brown"],size:16}},npcslain:{id:"npcslain",fg:"red",text:" SLAIN ",banding:{icon:"tombstone",colors:["grey","white"],size:18}}}),Xe=deepFreeze({id:"default",fg:"grey",text:"Action",bg:"",banding:["[","]"]}),toDamageSlug$1=e=>e.toLowerCase().replace(/\s+/g,"-"),getSkillColor=e=>Ze[e]??"orange",getSkillClass=e=>e&&Ze[e]?`ng-skill-${e}`:"ng-skill-default",getUserActionDefinition=e=>Qe[e]??{...Xe,id:e},getUserActionClass=e=>e&&Qe[e]?`ng-action-${e}`:"ng-action-default",getDamageClass=e=>e&&void 0!==He[e]?`ng-dmg-${toDamageSlug$1(e)}`:"ng-dmg-unknown",hpPercentToColor=e=>{if(null==e||!Number.isFinite(e))return"grey";const t=Math.max(0,Math.min(100,e)),g=1.2*t,n=(t<75?50:Math.abs(t-100)/2+25)/100,k=e=>(e+g/30)%12,C=1*Math.min(n,1-n),f=e=>n-C*Math.max(-1,Math.min(k(e)-3,Math.min(9-k(e),1))),toHex=e=>Math.round(255*e).toString(16).padStart(2,"0");return`#${toHex(f(0))}${toHex(f(8))}${toHex(f(4))}`},_e="You",createSegment=(e,t=null,g=!1)=>({text:e,fg:t,bg:null,bold:g}),resolvePatternLength$1=e=>{const t=trimToEmpty(e?.matchType),g=e?.patterns?.[t];return Array.isArray(g)?g.length:0},createNameDescriptor=(e,{relationshipFormatter:t,selfName:g,selfText:n,targetName:C})=>{const I=trimToEmpty(e);return I?"self"===I||g&&I===g?createRelationshipNameDescriptor(n,{color:"lightpink",isTarget:C===I}):"function"==typeof t?.createDescriptor?t.createDescriptor(I,{text:toDisplayName(I)}):createRelationshipNameDescriptor(toDisplayName(I),{color:"grey",isAlly:!1,isEnemy:!1,isCityEnemy:!1,isTarget:C===I}):null},createPreviewSegments=({actor:e,actionLabel:t,actionColor:g,target:n,info:C})=>{const I=[];if(e){const t=e.bracket?`${e.bracket.open}${e.text}${e.bracket.close}`:e.text;I.push(createSegment(t,e.color)),I.push(createSegment(" "))}if(isNonEmptyString(t)&&I.push(createSegment(t.trim(),g,!0)),n){I.push(createSegment(" "));const e=n.bracket?`${n.bracket.open}${n.text}${n.bracket.close}`:n.text;I.push(createSegment(e,n.color))}return isNonEmptyString(C)&&(I.push(createSegment(" ")),I.push(createSegment(`[${toDisplayName(C)}]`,"cadetblue"))),I},createReplacementDescriptor=(e,t,g={})=>{if("nexSkillMatch"!==e&&"nexSkillNpcMatch"!==e)return null;if(!t||"object"!=typeof t||Array.isArray(t))return null;const n=trimToEmpty(g.selfName),C=trimToEmpty(g.selfText)||_e,I=trimToEmpty(g.targetName),o=g.relationshipFormatter,a="nexSkillNpcMatch"===e?"npc":"user",i="user"===a?getUserActionDefinition(t.id):null,s=createNameDescriptor(t.user,{relationshipFormatter:o,selfName:n,selfText:C,targetName:I}),l=createNameDescriptor(t.target,{relationshipFormatter:o,selfName:n,selfText:C,targetName:I}),c=trimToEmpty(t.fullName)||toDisplayName(t.skill||t.id),u="npc"===a?Array.isArray(t.tags)&&t.tags.length>0?t.tags.map(toDisplayName).join(", "):c:trimToEmpty(i?.text)||c,d="npc"===a?"red":i?.fg??getSkillColor(t.skill),p=createPreviewSegments({actor:s,actionLabel:u,actionColor:d,target:l,info:t.info}),m=p.map(e=>e.text).join(""),h=Math.max(resolvePatternLength$1(t)-1,0);return{family:"skill",eventName:e,buffer:"combat",variant:a,id:trimToEmpty(t.id),matchType:trimToEmpty(t.matchType),skill:{id:trimToEmpty(t.skill),name:c,color:getSkillColor(t.skill)},actor:s,target:l,tags:Array.isArray(t.tags)?t.tags.map(trimToEmpty).filter(Boolean):[],info:isNonEmptyString(t.info)?t.info.trim():null,userAction:i,hostMutation:{replaceCurrentLine:!0,companionLineCount:h,tooltipSource:"npc"===a&&Array.isArray(t.tags)&&t.tags.includes("damage")&&"self"===t.target?"health-lost":null},preview:{tag:"npc"===a?"«npc»":"[act]",tagColor:d,text:m,segments:p},metadata:{actionTypeColors:Ye,critLabels:Ke,damageColors:He}}},qe=Object.freeze({fg:null,bg:null,bold:!1}),createPlainSegment=e=>({text:e,...qe}),extractName=e=>extractNamedValue(e),createStructuredLine=(e,t,g,n,C,I={})=>({type:"combat"===C?"combat":"system",buffer:C,segments:[createPlainSegment(n)],metadata:{event:e,tag:t,tagColor:g,details:I}}),pickDefined=(e,t=null)=>void 0===e?t:e,resolveSkillReplacementDetails=(e,t)=>{if(!isPlainObject$1(t))return null;const g=isPlainObject$1(t.sourcePayload)?t.sourcePayload:t,n=isPlainObject$1(t.replacement)?t.replacement:createReplacementDescriptor(e,g);return n?{replacement:n,context:t.context??t.replacementContext,crit:pickDefined(t.crit),damage:pickDefined(t.damage),healthLost:Array.isArray(t.healthLost)?t.healthLost:[],tooltip:pickDefined(t.tooltip),originalLine:pickDefined(t.originalLine),matchType:"string"==typeof t.matchType?t.matchType:n.matchType,actorId:"string"==typeof t.actorId?t.actorId:"string"==typeof g.user?g.user.trim():null,targetHpText:pickDefined(t.targetHpText),targetHpPercent:pickDefined(t.targetHpPercent),hpDeltaText:pickDefined(t.hpDeltaText),sourcePayload:g}:null},createSkillReplacementLine=(e,t)=>{const g=resolveSkillReplacementDetails(e,t);if(!g)return null;const{replacement:n}=g,C=n.preview??{};return{type:"replacement",buffer:"system"===n.buffer?"system":"combat",segments:Array.isArray(C.segments)?C.segments:[],metadata:{event:e,tag:"string"==typeof C.tag?C.tag:"",tagColor:"string"==typeof C.tagColor?C.tagColor:null,details:g}}},parsePercent$1=e=>{if(null==e)return null;const t=Number.parseInt(String(e).replace("%",""),10);return Number.isNaN(t)?null:t},extractTargetEventId=e=>{if(!isPlainObject$1(e))return null;const t=e.id??e.target;return"number"==typeof t&&Number.isFinite(t)?String(t):toTrimmedString(t)},extractTargetEventLabel=e=>toTrimmedString(e?.short_desc)??toTrimmedString(e?.name)??toTrimmedString(e?.text)??(extractTargetEventId(e)?`Target ${extractTargetEventId(e)}`:null),getTargetHpValue=e=>e?.hpperc??e?.hpPercent??e?.hp??null,hasNexsysTargetIdentityChange=e=>{const t=isPlainObject$1(e?.changedFields)?e.changedFields:null;return!t||["id","target","text","name","short_desc"].some(e=>Object.prototype.hasOwnProperty.call(t,e))},createTargetLine=(e,t,g)=>createStructuredLine(e,"[Target]","red",g,"combat",{id:extractTargetEventId(t),hpPercent:parsePercent$1(getTargetHpValue(t)),shortDescription:toTrimmedString(t?.short_desc)??toTrimmedString(t?.text)}),parseStreamEventLine=(e,t)=>{switch(e){case"Char.Defences.Add":{const g=extractName(t);return g?createStructuredLine(e,"+def","lawngreen",toDisplayName(g),"system",{name:g,direction:"gained",description:t&&"object"==typeof t&&!Array.isArray(t)?t.desc??null:null}):null}case"Char.Defences.Remove":{const g=extractName(t);return g?createStructuredLine(e,"-def","crimson",toDisplayName(g),"system",{name:g,direction:"lost"}):null}case"Char.Afflictions.Add":{const g=extractName(t);return g?createStructuredLine(e,"+aff","crimson",toDisplayName(g),"system",{name:g,direction:"gained",description:t&&"object"==typeof t&&!Array.isArray(t)?t.desc??null:null}):null}case"Char.Afflictions.Remove":{const g=extractName(t);return g?createStructuredLine(e,"-aff","lawngreen",toDisplayName(g),"system",{name:g,direction:"lost"}):null}case"nexsys4.system.target.changed":{if(!isPlainObject$1(t)||!hasNexsysTargetIdentityChange(t))return null;const g=extractTargetEventLabel(t);return g?createTargetLine(e,t,g):null}case"nexsys4.serverside.aff.priority.set":case"nexsys4.serverside.def.priority.set":{if(!isPlainObject$1(t))return null;const g="string"==typeof t.id&&t.id.trim().length>0?t.id.trim():null,n="number"==typeof t.priority&&Number.isFinite(t.priority)?t.priority:null;return g&&null!=n?createStructuredLine(e,`[Prio] ${n}`,"deepskyblue",toDisplayName(g),"system",{id:g,priority:n,accepted:!0===t.accepted,kind:e.includes(".aff.")?"affliction":"defence"}):null}case"nexSkillMatch":case"nexSkillNpcMatch":return createSkillReplacementLine(e,t);default:return null}},styleAttribute=e=>{const t=Object.entries(e).filter(([,e])=>e);return 0===t.length?"":` style="${t.map(([e,t])=>`${e}: ${t}`).join("; ")}"`},renderChunk=e=>`<span${styleAttribute({color:e.fg,"background-color":e.bg,"font-weight":e.bold?"700":null})}>${escapeHtml(e.text)}</span>`,renderSegmentsHtml=e=>e.map(renderChunk).join(""),resolveTimestamp=e=>e.timestamp??e.metadata?.timestamp??Date.now(),createDisplayLine=({html:e,timestamp:t,isPrompt:g=!1,isMonospace:n=!1,shouldLog:C=!0,buffer:I="main"})=>({id:null,html:e,timestamp:t,isPrompt:g,isMonospace:n,shouldLog:C,buffer:I}),renderStructuredRowHtml=(e,t)=>{const g=e.metadata?.tag??"";return[`<span class="nexgui4-stream-row nexgui4-stream-row--${t}" style="display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.5rem; align-items: baseline;">`,`<span class="nexgui4-stream-row__tag mono"${styleAttribute({color:e.metadata?.tagColor??null})}>${escapeHtml(g)}</span>`,`<span class="nexgui4-stream-row__payload">${renderSegmentsHtml(e.segments)}</span>`,"</span>"].join("")},renderColorLine=e=>{const t=resolveTimestamp(e);return createDisplayLine({html:`<span class="nexgui4-color-line">${renderSegmentsHtml(e.segments)}</span>`,timestamp:t,isPrompt:e.isPrompt??!1,isMonospace:e.isMonospace??!1,shouldLog:e.shouldLog??!0,buffer:"main"})},Je=Object.freeze({options:Object.freeze({msgReplace:!0,damageNumbers:!0}),target:Object.freeze({hpText:null,hpPercent:null,hpDeltaText:null}),styles:Object.freeze({getAfflictionStyle:()=>({fg:"grey",bg:null}),resolveCureInfoStyle:(e,t="cadetblue")=>({fg:t,bg:null})}),icons:Object.freeze({dualTone:null})}),capitalize$1=e=>"string"==typeof e&&e.length>0?e.charAt(0).toUpperCase()+e.slice(1):"",getRuntimeStyle=e=>({fg:"string"==typeof e?.fg?e.fg:null,bg:"string"==typeof e?.bg?e.bg:null}),resolveRenderContext=(e={})=>{const t=e.context??e.replacementContext??{};return{options:{...Je.options,...t.options??{}},target:{...Je.target,...t.target??{}},styles:{...Je.styles,...t.styles??{}},icons:{...Je.icons,...t.icons??{}}}},withSeparators=(e,t)=>e.flatMap((e,g)=>0===g?[e]:[t,e]),createTitle=e=>{const t="string"==typeof e.originalLine?e.originalLine:null,g=[t?`Source: ${t}`:null,"string"==typeof e.tooltip?e.tooltip:null].filter(Boolean);return g.length>0?g.join("\n---\n"):null},createActorNodes=e=>e?[relationshipNameNode(e)]:[],createUserActionNodes=(e,t,g)=>{const{id:n,text:C,banding:I}=e,o=[classTextNode(getUserActionClass(n),C)];if(t){const{fg:n,bg:C}=getRuntimeStyle(g.styles.resolveCureInfoStyle?.(t,e.fg));o.push(styledTextNode(capitalize$1(t),{className:"ng-info-text",fg:n??e.fg,bg:C}))}if(Array.isArray(I)){const[e,t]=I;return[classTextNode("ng-brkt",e),...o,classTextNode("ng-brkt",t)]}return[iconBandingNode({icon:I.icon,colors:I.colors,size:I.size,children:o})]},createTargetHpValueNodes=(e,t)=>{const g="number"==typeof e.targetHpPercent?e.targetHpPercent:"number"==typeof t.target.hpPercent?t.target.hpPercent:null,n="string"==typeof e.targetHpText?e.targetHpText:"string"==typeof t.target.hpText?t.target.hpText:null;return null!=g?[styledTextNode(`${g}%`,{fg:hpPercentToColor(g)})]:n?[classTextNode("ng-muted",n)]:[]},createDamageValueNodes=(e,t)=>{const g=e.damage;return g&&"string"==typeof g.damage?[classTextNode(getDamageClass(g.type),g.damage)]:createTargetHpValueNodes(e,t)},createUserSkillAttackNodes=(e,t,g)=>{const{skill:n,info:C,tags:I,target:o}=e,a=[classTextNode("ng-brkt","["),classTextNode(getSkillClass(n.id),n.name),classTextNode("ng-brkt","]")];C&&a.push(textNode(" "),classTextNode("ng-info-text",capitalize$1(C)));const i=Array.isArray(I)&&I.includes("pve")&&I.includes("damage")&&"string"==typeof o?.text&&o.text.includes(" "),s="firstPerson"===t.matchType||!t.actorId;if(i){const e="string"==typeof t.crit?t.crit:"Hit",n=s&&g.options.damageNumbers?createDamageValueNodes(t,g):createTargetHpValueNodes(t,g);a.push(classTextNode("ng-crit-separator",`: ${e} `)),n.length>0&&a.push(classTextNode("ng-dmg-bracket","("),...n,classTextNode("ng-dmg-bracket",")"))}return a},createUserActionColumnNodes=(e,t,g)=>{const{userAction:n,info:C}=e;return n&&Qe[n.id]?createUserActionNodes(n,C??null,g):createUserSkillAttackNodes(e,t,g)},createNpcActionColumnNodes=(e,t,g)=>{const{tags:n,target:C,skill:I}=e;if(!n||0===n.length)return[classTextNode("ng-muted",I.name)];const o=n.map(e=>{if("damage"===e&&"You"===C?.text)return classTextNode("ng-hp-loss","string"==typeof t.hpDeltaText&&t.hpDeltaText?t.hpDeltaText:"string"==typeof g.target.hpDeltaText&&g.target.hpDeltaText?g.target.hpDeltaText:"-0%");const{fg:n,bg:I}=getRuntimeStyle(g.styles.getAfflictionStyle?.(e));return styledTextNode(capitalize$1(e),{fg:n??"grey",bg:I})});return[classTextNode("ng-npc-bracket","«"),...withSeparators(o,classTextNode("ng-muted",", ")),classTextNode("ng-npc-bracket","»")]},createTargetColumnNodes=(e,t,g)=>{if(!e)return[];const n=relationshipNameNode(e);if(!e.text.includes(" ")||"grey"!==e.color)return[n];const C="number"==typeof t.targetHpPercent?t.targetHpPercent:"number"==typeof g.target.hpPercent?g.target.hpPercent:null,I="string"==typeof t.targetHpText?t.targetHpText:"string"==typeof g.target.hpText?g.target.hpText:null;return null!=C?[classTextNode("ng-dmg-bracket","("),styledTextNode(`${C}%`,{fg:hpPercentToColor(C)}),classTextNode("ng-dmg-bracket",") "),n]:I?[classTextNode("ng-dmg-bracket","("),classTextNode("ng-muted",I),classTextNode("ng-dmg-bracket",") "),n]:[n]},createReplacementViewModel=(e,t={})=>{if(!e||"object"!=typeof e)return null;const g=resolveRenderContext(t),n="npc"===e.variant?createNpcActionColumnNodes(e,t,g):createUserActionColumnNodes(e,t,g);return{family:"skill",eventName:e.eventName,variant:e.variant,layout:"replacement-row",title:createTitle(t),previewText:"string"==typeof e.preview?.text?e.preview.text:"",columns:{actor:createActorNodes(e.actor),action:n,target:createTargetColumnNodes(e.target,t,g)},assets:{dualToneIcons:g.icons.dualTone},metadata:{skillId:e.skill?.id??"",actionId:e.userAction?.id??null,matchType:"string"==typeof t.matchType?t.matchType:e.matchType,actorId:"string"==typeof t.actorId?t.actorId:null,tags:Array.isArray(e.tags)?[...e.tags]:[]}}},$e=new Map,normalizeColors=e=>Array.isArray(e)?1===e.length?[e[0],e[0]]:[e[0]??"currentColor",e[1]??e[0]??"currentColor"]:[e??"currentColor",e??"currentColor"],buildIconHtml=(e,t,g=16,n=null)=>{const C=normalizeColors(t),I=n?.[e];if(!Array.isArray(I))return"";const[o,a,,,i]=I;if(!Array.isArray(i)||i.length<2)return"";const s=`${e}-${C.join(",")}-${g}-${o}-${a}-${i.join("|")}`,l=$e.get(s);if(l)return l;const[c,u]=C,d=['<svg xmlns="http://www.w3.org/2000/svg" class="svg-inline--fa icon" aria-hidden="true" focusable="false"',` style="height:${escapeHtml(String(g))}px; --ng-fill-1:${escapeHtml(c)}; --ng-fill-2:${escapeHtml(u)};"`,` viewBox="0 0 ${escapeHtml(String(o))} ${escapeHtml(String(a))}">`,'<g class="fa-group">',`<path class="ng-icon-fill-1" d="${escapeHtml(i[0])}"></path>`,`<path class="ng-icon-fill-2" d="${escapeHtml(i[1])}"></path>`,"</g>","</svg>"].join("");return $e.set(s,d),d},buildIconBandingHtml=(e,t,g,n,C=null)=>{const I=buildIconHtml(e,t,g,C);return I?`${I}${n}${I}`:`«${n}»`},renderStyledTextNode=e=>span(escapeHtml(e.text),{className:e.className,style:{color:e.fg,"background-color":e.bg}}),renderReplacementHtmlNode=(e,t={})=>{if(!e||"object"!=typeof e)return"";switch(e.kind){case"text":return escapeHtml(e.text);case"class-text":return span(escapeHtml(e.text),{className:e.className});case"styled-text":return renderStyledTextNode(e);case"relationship-name":return renderRelationshipNameHtml(e.descriptor);case"icon-banding":return buildIconBandingHtml(e.icon,e.colors,e.size,renderReplacementHtmlNodes(e.children,t),t.dualToneIcons??null);case"group":return renderReplacementHtmlNodes(e.children,t);default:return""}},renderReplacementHtmlNodes=(e,t={})=>Array.isArray(e)?e.map(e=>renderReplacementHtmlNode(e,t)).join(""):"",renderColumn=(e,t)=>`<span class="nexgui4-replacement-row__${t}">${renderReplacementHtmlNodes(e?.columns?.[t],e?.assets)}</span>`,renderReplacementHtml=e=>[`<span class="nexgui4-replacement-row"${titleAttribute(e?.title)}>`,'<span class="nexgui4-replacement-row__buffer"></span>',renderColumn(e,"actor"),renderColumn(e,"action"),renderColumn(e,"target"),"</span>"].join(""),colorText=(e,t)=>e?span(escapeHtml(t),{style:{color:e}}):escapeHtml(t),renderFallbackPreviewHtml=e=>`<span class="nexgui4-replacement-row">${Array.isArray(e.segments)?e.segments.map(e=>e.fg?colorText(e.fg,e.text):escapeHtml(e.text)).join(""):""}</span>`,generateReplacementHtml=(e,t={})=>renderReplacementHtml(createReplacementViewModel(e,t)),renderReplacementLine=e=>{const t=resolveTimestamp(e),g=e.metadata?.details??{},n=g.replacement??null;return createDisplayLine({html:n?generateReplacementHtml(n,g):renderFallbackPreviewHtml(e),timestamp:t,isPrompt:!1,isMonospace:!1,shouldLog:e.shouldLog??!0,buffer:"system"===e.buffer?"system":"combat"})},et=/^Health lost: (\d+) \((.+?)\)\.$/,tt=/^Damage dealt: (\d+) \((.+?)\)\.$/,gt=Object.freeze({crit:null,damage:null,healthLost:Object.freeze([]),tooltip:null,originalLine:null,consumedLineIndexes:Object.freeze([])}),getLineText=e=>e?"function"==typeof e.parsed_line?.text?e.parsed_line.text():"string"==typeof e.line?e.line:"":"",resolvePatternLength=e=>{const t="string"==typeof e.matchType?e.matchType.trim():"",g=e.patterns?.[t];return Array.isArray(g)?g.length:0},isPveDamageAction=e=>Array.isArray(e.tags)&&e.tags.includes("pve")&&e.tags.includes("damage")&&"string"==typeof e.target&&e.target.includes(" "),isNpcDamageToSelf=e=>Array.isArray(e.tags)&&e.tags.includes("damage")&&"self"===e.target,isFirstPersonOrActorless=e=>"firstPerson"===("string"==typeof e.matchType?e.matchType.trim():"")||("string"==typeof e.user?0===e.user.trim().length:!e.user),shouldCollectDamageDealt=(e,t)=>Boolean(t?.damageNumbers)&&isFirstPersonOrActorless(e),collectCrit=(e,t)=>{const g=getLineText(e?.[t]);for(const[n,C]of Ke)if(g.includes(n))return{crit:C,consumedLineIndex:t};return{crit:"Hit",consumedLineIndex:null}},collectDamageDealt=(e,t)=>{const g=getLineText(e?.[t]).match(tt);return g?{damage:g[1],type:g[2],consumedLineIndex:t}:null},collectHealthLost=(e,t)=>{if(!Array.isArray(e))return{healthLost:[],consumedLineIndexes:[]};const g=[],n=[];for(let C=t;C<e.length-1;C++){const t=getLineText(e[C]).match(et);t&&(g.push({damage:t[1],type:t[2]}),n.push(C))}return{healthLost:g,consumedLineIndexes:n}},collectReplacementSideData=(e,t,g,n={})=>{if(!e||"object"!=typeof e||Array.isArray(e)||!Array.isArray(t)||!g||"number"!=typeof g.index)return{...gt,healthLost:[],consumedLineIndexes:[]};const C=e,I=new Set,o=getLineText(g)||null,a=resolvePatternLength(C),i=Math.max(a-1,0),s={crit:null,damage:null,healthLost:[],tooltip:null,originalLine:o};for(let l=1;l<=i;l++)I.add(g.index+l);if(isPveDamageAction(C)){const e=g.index+1,o=collectCrit(t,e);if(s.crit=o.crit,null!=o.consumedLineIndex&&I.add(o.consumedLineIndex),shouldCollectDamageDealt(C,n)){const g=collectDamageDealt(t,null!=o.consumedLineIndex?e+1:e);g&&(s.damage={damage:g.damage,type:g.type},I.add(g.consumedLineIndex))}}if(isNpcDamageToSelf(C)){const e=collectHealthLost(t,g.index+1);s.healthLost=e.healthLost,s.tooltip=e.healthLost.length>0?e.healthLost.map(({damage:e,type:t})=>`${e} (${t})`).join("\n"):null,e.consumedLineIndexes.forEach(e=>{I.add(e)})}return{...s,consumedLineIndexes:[...I].filter(e=>e!==g.index).sort((e,t)=>e-t)}},rt="You",nt="cadetblue",At=Object.freeze(["contextValue","persistenceStore","persistenceVersion","msgReplace","damageNumbers","selfName","targetName","hpText","hpPercent","hpDeltaText","playerDirectory","playerDirectoryVersion","playerRelationships","playerRelationshipsVersion","allyEnemyFormatting","targetFormatting","afflictionStyles","cureStyles","herbNames","herbMinerals","dualToneIcons"]),Ct=null,It=null,toNullableString=e=>isNonEmptyString(e)?e.trim():null,parsePercent=e=>{if("number"==typeof e&&Number.isFinite(e))return e;if("string"!=typeof e)return null;const t=e.match(/-?\d+(?:\.\d+)?/),g=t?Number(t[0]):NaN;return Number.isFinite(g)?g:null},getGlobals$1=()=>globalThis,getContextValue$2=()=>getGlobals$1().nexGui?.__contextValue??null,getCharacterState$1=e=>e?.stores?.character?.getState?.()??{},getUiSettings$2=e=>e?.persistenceStore?.getAll?.()?.ui??{},getPersistenceVersion=e=>"function"==typeof e?.persistenceStore?.getVersion?e.persistenceStore.getVersion():null,getModelVersion$2=e=>"function"==typeof e?.getVersion?e.getVersion():null,resolveUiSettings=(e,t)=>null!==t&&Ct?.contextValue===e&&Ct.persistenceStore===e?.persistenceStore&&Ct.persistenceVersion===t?Ct.uiSettings:getUiSettings$2(e),normalizeStyle=(e,t)=>({fg:toNullableString(e?.fg)??t,bg:toNullableString(e?.bg)}),createStyleResolvers=()=>({getAfflictionStyle:e=>normalizeStyle(getGlobals$1().nexSys?.prompt?.affAbbrev?.[e]??null,"grey"),resolveCureInfoStyle:(e,t=nt)=>{if(!isNonEmptyString(e))return{fg:t,bg:null};const g=getGlobals$1().nexSys,n=g?.tables?.herb_name_to_herb?.[e]??e,C=g?.prompt?.cureColors?.[n]??g?.prompt?.cureColors?.[g?.tables?.herb_to_mineral?.[n]]??null;return C?normalizeStyle(C,t):{fg:t,bg:null}}}),signaturesEqual=(e,t)=>null!==e&&null!==t&&At.every(g=>Object.is(e[g],t[g])),readContextInputs=()=>{const e=getGlobals$1(),t=getContextValue$2(),g=resolveUiSettings(t,getPersistenceVersion(t)),n=getPersistenceVersion(t),C=t?.stores?.settings?.getState?.()?.options??g,I=getCharacterState$1(t),o=I.targetDetails??{},a=e.GMCP?.Target??{},i=e.nexSys??null,s=i?.prompt??null,l=i?.tables??null,c=toNullableString(o.hpText)??toNullableString(o.hpperc)??toNullableString(a.HP)??toNullableString(a.hpperc)??toNullableString(a.lastHP),u=parsePercent(o.hpPercent??o.hpperc??a.HP??a.hpperc??a.lastHP),d=toNullableString(I.target)??toNullableString(a.Text)??toNullableString(a.text)??"",p=toNullableString(s?.vars?.diffhp?.text)??("number"==typeof a.hpChange?`${a.hpChange}%`:toNullableString(a.hpChange)),m=Boolean(C.msgReplace),h=Boolean(C.damageNumbers),y=toNullableString(I.name)??toNullableString(e.GMCP?.Char?.Status?.name)??"",b=e.window?.___FONT_AWESOME___?.styles?.fad??null;return{contextValue:t,persistenceStore:t?.persistenceStore??null,persistenceVersion:n,uiSettings:g,msgReplace:m,damageNumbers:h,selfName:y,targetName:d,hpText:c,hpPercent:u,hpDeltaText:p,playerDirectory:t?.playerDirectory??null,playerDirectoryVersion:getModelVersion$2(t?.playerDirectory),playerRelationships:t?.playerRelationships??null,playerRelationshipsVersion:getModelVersion$2(t?.playerRelationships),allyEnemyFormatting:g.allyEnemyFormatting,targetFormatting:g.targetFormatting,afflictionStyles:s?.affAbbrev??null,cureStyles:s?.cureColors??null,herbNames:l?.herb_name_to_herb??null,herbMinerals:l?.herb_to_mineral??null,dualToneIcons:b}},createContextFromInputs=e=>({options:{msgReplace:e.msgReplace,damageNumbers:e.damageNumbers},self:{name:e.selfName,label:rt},target:{name:e.targetName,hpText:e.hpText,hpPercent:e.hpPercent,hpDeltaText:e.hpDeltaText},styles:createStyleResolvers(),icons:{dualTone:e.dualToneIcons},playerDirectory:e.playerDirectory,playerRelationships:e.playerRelationships,relationshipFormatter:createRelationshipNameFormatterFromContext(e.contextValue,{targetName:e.targetName})}),clearMessageReplacementContextCache=()=>{Ct=null,It=null},createMessageReplacementContext=()=>{const e=readContextInputs();return signaturesEqual(Ct,e)&&It?It:(Ct=e,It=createContextFromInputs(e))},getGlobals=()=>globalThis,getHostBlock=()=>getGlobals().nexusclient?.current_block??null,getHostCurrentLine=()=>getGlobals().nexusclient?.current_line??null,createRenderContext=e=>({options:e.options,target:e.target,styles:e.styles,icons:e.icons}),createSkillReplacementPipelinePayload=(e,t,{context:g,sideData:n})=>{const C=createReplacementDescriptor(e,t,{relationshipFormatter:g.relationshipFormatter,selfName:g.self.name,selfText:g.self.label,targetName:g.target.name});return C?{kind:"nexgui4.skillReplacement",sourcePayload:t,replacement:C,context:createRenderContext(g),crit:n.crit,damage:n.damage,healthLost:n.healthLost,tooltip:n.tooltip,originalLine:n.originalLine,matchType:"string"==typeof t.matchType?t.matchType.trim():null,actorId:"string"==typeof t.user?t.user.trim():null,targetHpText:g.target.hpText,targetHpPercent:g.target.hpPercent,hpDeltaText:g.target.hpDeltaText}:null},renderPipelinePayloadForHost=(e,t)=>{const g=parseStreamEventLine(e,t);return g?renderReplacementLine(g).html:null},createSkillReplacementGagHandler=(e,t,{emitReplacement:g}={})=>n=>{if(!e())return;if(!n||"object"!=typeof n||Array.isArray(n))return;const C=n,I=getHostBlock(),o=getHostCurrentLine();if(!I||!o||"number"!=typeof o.index)return;const{index:a}=o,i=createMessageReplacementContext(),s=collectReplacementSideData(C,I,o,i.options),l=createSkillReplacementPipelinePayload(t,C,{context:i,sideData:s});if(!l)return;if(g?.(l),!o.parsed_line)return;const c=renderPipelinePayloadForHost(t,l);c&&(s.consumedLineIndexes.forEach(e=>{const t=I[e];t&&e!==a&&(t.gag=!0)}),o.parsed_line.nexSkillReplacement=!0,o.parsed_line.formatted=()=>c)},getOptions=()=>createMessageReplacementContext().options,isReplacementEnabled=()=>Boolean(getOptions().msgReplace),ot="nexGui4",normalizeNexGuiClassReflexName=e=>{const t=toTrimmedString(e)?.replace(/\s+/g,"").toLowerCase();return t?`nexGui.${t}`:null},readCurrentHostClassName=(e=globalThis.GMCP)=>toTrimmedString(e?.Char?.Status?.class),runNexGuiClassReflex=(e,{nexusClient:t=globalThis.nexusclient,packageName:g=ot}={})=>{const n=normalizeNexGuiClassReflexName(e);n&&t?.reflexes?.()?.run_function?.(n,{},g)},runNexGuiClassReflexForCurrentHostClass=(e={})=>runNexGuiClassReflex(readCurrentHostClassName(e.gmcp),e),at=new Set(["blindness","deafness","insomnia"]),it="https://api.achaea.com/characters.json",passthroughParser=e=>e,resolvePlayerDirectory=e=>e??getDefaultPlayerDirectoryModel(),getContextValue$1=()=>globalThis.nexGui?.__contextValue??null,resolvePlayerRelationships$1=e=>e??getContextValue$1()?.playerRelationships??getDefaultPlayerRelationshipsModel(),resolveFetch=e=>"function"==typeof e?e:"function"==typeof globalThis.fetch?globalThis.fetch.bind(globalThis):null,getUiSettings$1=()=>getContextValue$1()?.persistenceStore?.getAll?.()?.ui??{},getCharacterState=()=>getContextValue$1()?.stores?.character?.getState?.()??{},isLoginTrackerEnabled=()=>Boolean(getUiSettings$1()?.loginTracker),shouldEmitAffliction=e=>{const t=extractNamedValue(e);return!at.has(t)},extractChannelPlayerNames=e=>Array.isArray(e)?e.map(e=>e?.name).filter(isNonEmptyString).map(e=>e.trim()):[],fetchActiveCharacterNames=async(e=recordPlayerDirectoryDiagnostic,t=null)=>{if("function"!=typeof t)return e({channel:"presence",action:"charactersListFetch",status:"unavailable",detail:{fetchAvailable:!1}}),[];try{const g=await t(it,{cache:"no-store"});if(!g.ok)return e({channel:"presence",action:"charactersListFetch",status:"unavailable",detail:{httpStatus:g.status}}),[];const n=await g.json();return Array.isArray(n?.characters)?n.characters.map(e=>e?.name).filter(isNonEmptyString).map(e=>e.trim()):[]}catch{return e({channel:"presence",action:"charactersListFetch",status:"unavailable",detail:{exception:!0}}),[]}},createLoginTrackerNoticeHtml=(e,t,g,n)=>`<span>${createRelationshipNameFormatterFromContext(getContextValue$1(),{playerDirectory:g,playerRelationships:n}).renderHtml(e)} logged ${t}</span>`,emitBridgeEvent=({eventBus:e,topic:t,sourceEvent:g,payload:n,parser:C=passthroughParser,meta:I})=>{e.emit(t,{event:g,data:C(n),meta:I})},normalizeNexsysTargetChangedPayload=e=>isPlainObject$1(e)&&isPlainObject$1(e.current)?{...e.current,changedFields:isPlainObject$1(e.changedFields)?e.changedFields:{}}:e,parseCurrentHostClassChangedPayload=()=>({class:readCurrentHostClassName()}),createEmitHandler=(e,t)=>g=>{t.filter&&!t.filter(g)||(emitBridgeEvent({eventBus:e,topic:t.topic,sourceEvent:t.eventName,payload:g,parser:t.parser,meta:t.meta}),t.afterEmit?.(g))},createSkillReplacementEmitHandler=(e,t)=>createSkillReplacementGagHandler(isReplacementEnabled,t,{emitReplacement:g=>{emitBridgeEvent({eventBus:e,topic:q.STREAM_LINE,sourceEvent:t,payload:g,parser:passthroughParser,meta:{buffer:"combat",sourceModel:"replacement"}})}}),createLoginTrackerHandler=(e,t,g,n,C)=>{let I=[];return async o=>{if(!isLoginTrackerEnabled())return;const a=extractChannelPlayerNames(o),i=await fetchActiveCharacterNames(n,C),s=[...new Set([...a,...i])];if(0===I.length)return void(I=s);const l=[getCharacterState()?.name,globalThis.GMCP?.Char?.Status?.name].find(isNonEmptyString)?.trim(),c=I.filter(e=>!s.includes(e));s.filter(e=>!I.includes(e)).forEach(n=>{n!==l&&e.notice(createLoginTrackerNoticeHtml(n,"in",t,g),{html:!0})}),c.forEach(n=>{n!==l&&e.notice(createLoginTrackerNoticeHtml(n,"out",t,g),{html:!0})}),I=s}},st=[{eventName:"IRE.Target.Set",topic:q.TARGET_CHANGED,parser:passthroughParser},{eventName:"IRE.Target.Info",topic:q.TARGET_CHANGED,parser:passthroughParser},{eventName:"nexsys4.system.target.changed",topic:q.TARGET_CHANGED,parser:normalizeNexsysTargetChangedPayload},{eventName:"Room.RemovePlayer",topic:q.ROOM_UPDATED,parser:passthroughParser},{eventName:"Room.AddPlayer",topic:q.ROOM_UPDATED,parser:passthroughParser},{eventName:"Room.Info",topic:q.ROOM_UPDATED,parser:passthroughParser},{eventName:"Char.Items.List",topic:q.ROOM_UPDATED,parser:passthroughParser},{eventName:"Char.Items.Add",topic:q.ROOM_UPDATED,parser:passthroughParser},{eventName:"Char.Items.Remove",topic:q.ROOM_UPDATED,parser:passthroughParser},{eventName:"Char.Items.Update",topic:q.ROOM_UPDATED,parser:passthroughParser},{eventName:"Char.Defences.Add",topic:q.DEFENCE_GAINED,parser:passthroughParser},{eventName:"Char.Defences.Remove",topic:q.DEFENCE_LOST,parser:passthroughParser},{eventName:"Char.Afflictions.Add",topic:q.STREAM_LINE,parser:passthroughParser,filter:shouldEmitAffliction,meta:{buffer:"system"}},{eventName:"Char.Afflictions.Remove",topic:q.STREAM_LINE,parser:passthroughParser,filter:shouldEmitAffliction,meta:{buffer:"system"}},{eventName:"Char.Vitals",topic:q.STATS_UPDATED,parser:passthroughParser},{eventName:"nexsys4.system.class.changed",topic:q.CLASS_CHANGED,parser:parseCurrentHostClassChangedPayload,afterEmit:()=>runNexGuiClassReflexForCurrentHostClass()},{eventName:"Comm.Channel.Text",topic:q.STREAM_LINE,parser:passthroughParser},{eventName:"Char.Status",topic:q.STATS_UPDATED,parser:passthroughParser},{eventName:"IRE.Misc.Achievement",topic:q.STATS_UPDATED,parser:passthroughParser,meta:{sourceModel:"stats"}},{eventName:"IRE.Time.List",topic:q.STATS_UPDATED,parser:passthroughParser,meta:{sourceModel:"stats"}},{eventName:"nexSkillMatch",topic:q.TIMER_STARTED,parser:passthroughParser,meta:{sourceModel:"timers"}},{eventName:"nexsys4.serverside.aff.priority.set",topic:q.STREAM_LINE,parser:passthroughParser,meta:{buffer:"system"}},{eventName:"nexsys4.serverside.def.priority.set",topic:q.STREAM_LINE,parser:passthroughParser,meta:{buffer:"system"}}],createStartUpGagHandler=e=>function(){e.gagCurrentBlock()},registerGmcpBindings=({adapter:e,eventBus:t,playerDirectory:g,playerDirectoryLifecycle:n,playerRelationships:C,playerDirectoryDiagnostics:I,remoteService:o,fetchFn:a})=>{const i=resolvePlayerDirectory(g),s=resolvePlayerRelationships$1(C),l=I?.recordPlayerDirectoryDiagnostic??recordPlayerDirectoryDiagnostic,c=o??createNullRemotePlayerService(),u=resolveFetch(a),d=[],p=createStartUpGagHandler(e),m=createLoginTrackerHandler(e,i,s,l,u),h=createCrowdsourceSyncHandler({remoteService:c,getPlayerProfile:i.getPlayerProfile,isSeeded:n?.isDirectorySeeded,recordDiagnostic:l,fetchFn:u,getSelfName:()=>[getCharacterState()?.name,globalThis.GMCP?.Char?.Status?.name].find(isNonEmptyString)?.trim()??null});d.push(e.on("nexSkillMatch",createSkillReplacementEmitHandler(t,"nexSkillMatch"))),d.push(e.on("nexSkillNpcMatch",createSkillReplacementEmitHandler(t,"nexSkillNpcMatch")));for(const y of st){const g=createEmitHandler(t,y);d.push(e.on(y.eventName,g))}return d.push(e.on("Comm.Channel.Players",e=>{i.rememberChannelPlayers(e),h(e)})),d.push(e.on("Comm.Channel.Players",m)),d.push(e.on("IRE.Time.Update",()=>{e.sendGmcp("IRE.Time.Request")})),d.push(e.on("PromptEvent",p,{id:"nexGuiStartUpGag"})),d.push(e.on("nexGuiLoaded",()=>{e.off("PromptEvent","nexGuiStartUpGag"),e.notice("nexGui loaded using startup spam gag.")},{once:!0})),()=>{for(const e of d)e()}},emitStartupReadySignal=e=>{e.send("echo raiseEvent nexGuiLoaded")},createEventBus=({label:e="nexgui4.eventBus",debugEnabled:t=!1,traceLimit:g=500}={})=>{const n=new Map,C=[],pushTrace=(n,I)=>{const o={at:Date.now(),type:n,detail:I};return C.push(o),C.length>g&&C.splice(0,C.length-g),t&&console.log(`[${e}]`,n,I),o},on=(e,t)=>(n.has(e)||n.set(e,new Set),n.get(e).add(t),()=>off(e,t)),off=(e,t)=>n.get(e)?.delete(t);return{on,off,emit:(e,t)=>{pushTrace(e,t),n.get(e)?.forEach(e=>e(t))},clear:()=>{n.clear(),C.length=0},getTrace:()=>[...C],setDebugEnabled:e=>{t=e}}},parseStoredValue$1=e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return e}},isEquivalentValue=(e,t)=>JSON.stringify(e)===JSON.stringify(t),createPersistenceStore=({adapter:e,sliceKey:t=Te.SETTINGS,schema:g=Pe,migrate:n=migrateSettingsPersistence}={})=>{const C=assertAdapterContract(e);let I=0;const markChanged=()=>{I+=1},assertSchemaKey=e=>{if("string"!=typeof e||"version"===e||!Object.hasOwn(g,e))throw new Error(`[nexGui4] Unknown persistence key "${String(e)}" for slice "${t}"`)},readState=()=>{const e=C.getVariable("nexGui4Settings")||{},g=e[t],I=parseStoredValue$1(g),o=n(I);if(void 0===g||"string"==typeof g||!isEquivalentValue(I,o)){const g={...e,[t]:o};C.setVariable(Me,g),markChanged()}return o};return{get:e=>(assertSchemaKey(e),clonePersistenceValue(readState()[e])),set:(e,n)=>{assertSchemaKey(e);const I={...readState(),version:g.version,[e]:normalizePersistenceFragment(g[e],n)},o={...C.getVariable("nexGui4Settings")||{},[t]:I};return C.setVariable(Me,o),markChanged(),clonePersistenceValue(I[e])},getAll:()=>clonePersistenceValue(readState()),getVersion:()=>I,reset:()=>{const e=clonePersistenceValue(g),n={...C.getVariable("nexGui4Settings")||{},[t]:e};return C.setVariable(Me,n),markChanged(),clonePersistenceValue(e)}}},bindFunction=(e,t)=>"function"==typeof e?.[t]?e[t].bind(e):null,noopTimer=()=>null,noopClearTimer=()=>{},getPublicDualToneIcons=e=>e.window?.___FONT_AWESOME___?.styles?.fad??null,createBrowserRuntimePorts=(e=globalThis)=>Object.freeze({fetch:bindFunction(e,"fetch"),now:()=>Date.now(),setTimeout:bindFunction(e,"setTimeout")??noopTimer,clearTimeout:bindFunction(e,"clearTimeout")??noopClearTimer,setInterval:bindFunction(e,"setInterval")??noopTimer,clearInterval:bindFunction(e,"clearInterval")??noopClearTimer,getPublicDualToneIcons:()=>getPublicDualToneIcons(e)}),freezePhaseList=e=>Object.freeze([...e]),lt=Object.freeze({INIT:"INIT",PREPARING:"PREPARING",BOOTING:"BOOTING",MOUNTING_UI:"MOUNTING_UI",HYDRATING_LAYOUT:"HYDRATING_LAYOUT",RUNNING:"RUNNING",FAILED:"FAILED",DESTROYED:"DESTROYED"}),ct=Object.freeze({[lt.INIT]:freezePhaseList([lt.PREPARING,lt.DESTROYED]),[lt.PREPARING]:freezePhaseList([lt.BOOTING,lt.FAILED,lt.DESTROYED]),[lt.BOOTING]:freezePhaseList([lt.MOUNTING_UI,lt.FAILED,lt.DESTROYED]),[lt.MOUNTING_UI]:freezePhaseList([lt.HYDRATING_LAYOUT,lt.FAILED,lt.DESTROYED]),[lt.HYDRATING_LAYOUT]:freezePhaseList([lt.RUNNING,lt.FAILED,lt.DESTROYED]),[lt.RUNNING]:freezePhaseList([lt.FAILED,lt.DESTROYED]),[lt.FAILED]:freezePhaseList([lt.PREPARING,lt.DESTROYED]),[lt.DESTROYED]:freezePhaseList([])}),isPhaseTransitionAllowed=(e,t)=>ct[e]?.includes(t)??!1,ut=Object.freeze([lt.PREPARING,lt.BOOTING,lt.MOUNTING_UI,lt.HYDRATING_LAYOUT,lt.RUNNING]),dt=3,pt=250,toErrorMessage=e=>e instanceof Error&&e.message?e.message:"string"==typeof e&&e.length>0?e:"Unknown startup failure",getRetryDelayMs=(e,t)=>t*2**Math.max(0,e-1),createStartupOrchestrator=({adapter:e,eventBus:t,phaseHandlers:g={},maxAttempts:n=dt,retryDelayMs:C=pt,setTimeoutFn:I=setTimeout,clearTimeoutFn:o=clearTimeout})=>{let a=lt.INIT,i=0,s=null,l=null,c=null,u=!1;const getState=()=>({phase:a,attempts:i,lastError:s}),transitionTo=(e,g={})=>{if(!isPhaseTransitionAllowed(a,e))throw new Error(`[nexGui4] Invalid startup phase transition: ${a} -> ${e}`);const n=a;return a=e,t.emit($.SYSTEM_PHASE,{phase:e,previousPhase:n,attempt:g.attempt??i,...void 0!==g.error?{error:g.error}:{},...void 0!==g.retryDelayMs?{retryDelayMs:g.retryDelayMs}:{},...void 0!==g.permanent?{permanent:g.permanent}:{}}),e===lt.RUNNING&&t.emit($.SYSTEM_READY,{phase:e,previousPhase:n,attempt:g.attempt??i}),getState()},clearPendingRetry=()=>{c&&(o(c.timerId),c.resolve(),c=null)},waitForRetry=e=>new Promise(t=>{c={timerId:I(()=>{c=null,t()},e),resolve:t}}),runPhase=async n=>{const C=g[n];"function"==typeof C&&await C({phase:n,attempt:i,adapter:e,eventBus:t})},runAttempt=async()=>{i+=1;try{for(const e of ut){if(u)return getState();transitionTo(e,{attempt:i}),await runPhase(e)}return s=null,getState()}catch(t){s=t;const g=i<n,I=g?getRetryDelayMs(i,C):0;if(transitionTo(lt.FAILED,{attempt:i,error:t,...g?{retryDelayMs:I}:{permanent:!0}}),!g)throw e.notice(`[nexGui4] Startup failed after ${i} attempts: ${toErrorMessage(t)}`),t;return await waitForRetry(I),u?getState():runAttempt()}};return{start:()=>l||(u?Promise.reject(new Error("[nexGui4] Cannot start startupOrchestrator after destroy().")):a===lt.RUNNING?Promise.resolve(getState()):(l=runAttempt().finally(()=>{l=null}),l)),destroy:()=>(a===lt.DESTROYED||(u=!0,clearPendingRetry(),transitionTo(lt.DESTROYED,{attempt:i})),getState()),getState}},mt="nexgui4_scrollback",ft=1,ht="session_lines",toSortedLines=e=>Array.from(e.values()).sort((e,t)=>e.id-t.id),resolveIndexedDb=e=>void 0!==e?e:globalThis.indexedDB,resolveKeyRange=e=>void 0!==e?e:globalThis.IDBKeyRange,createIndexedDbManager=({dbName:e=mt,dbVersion:t=ft,storeName:g=ht,indexedDb:n,keyRange:C,logger:I=null}={})=>{const o=resolveIndexedDb(n),a=resolveKeyRange(C);let i=null,s=null,l=new Map,c=!o||!a,u=!1;const debug=(...e)=>I?.debug?.(...e),warn=(...e)=>I?.warn?.(...e),switchToFallback=e=>{i&&(i.close?.(),i=null),c=!0,warn("[nexGui4] IndexedDB unavailable; using in-memory scrollback storage.",e)},assertActive=()=>{if(u)throw new Error("[nexGui4] IndexedDB manager has been destroyed.")},initialize=()=>(assertActive(),c||i?Promise.resolve():s||(s=new Promise(n=>{let C=!1;const settleWithFallback=e=>{C||(C=!0,s=null,switchToFallback(e),n())},settleWithDb=e=>{C?e?.close?.():(C=!0,i=e,debug("[nexGui4] IndexedDB scrollback storage initialized."),n())};let I;try{I=o.open(e,t)}catch(a){return void settleWithFallback(a)}I.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(g)||t.createObjectStore(g,{keyPath:"id"})},I.onsuccess=e=>{settleWithDb(e.target.result)},I.onerror=e=>{settleWithFallback(e.target.error)},I.onblocked=e=>{settleWithFallback(e)}}),s)),ensureDb=async()=>(assertActive(),c?null:i||(await initialize(),i)),writeBatch=async e=>{if(assertActive(),0===e.length)return;if(c){for(const t of e)l.set(t.id,t);return}const t=await ensureDb();if(!c&&t)return new Promise((n,C)=>{const I=t.transaction([g],"readwrite"),o=I.objectStore(g);I.oncomplete=()=>{n()},I.onerror=e=>{C(e.target.error)},I.onabort=e=>{C(e.target.error)};for(const t of e)o.put(t)});await writeBatch(e)},readRange=async(e,t)=>{if(assertActive(),c)return toSortedLines(l).filter(g=>g.id>=e&&g.id<=t);const n=await ensureDb();return c||!n?readRange(e,t):new Promise((C,I)=>{const o=n.transaction([g],"readonly").objectStore(g),i=a.bound(e,t),s=o.getAll(i);s.onsuccess=()=>{C(s.result)},s.onerror=e=>{I(e.target.error)}})},readIds=async e=>{if(assertActive(),0===e.length)return[];if(c)return e.map(e=>l.get(e)).filter(Boolean);const t=await ensureDb();return c||!t?readIds(e):new Promise((n,C)=>{const I=t.transaction([g],"readonly"),o=I.objectStore(g),a=[];let i=!1;I.oncomplete=()=>{if(i)return;const t=new Map(a.map(e=>[e.id,e]));n(e.map(e=>t.get(e)).filter(Boolean))},I.onerror=e=>{i=!0,C(e.target.error)},I.onabort=e=>{i=!0,C(e.target.error)};for(const t of e){const e=o.get(t);e.onsuccess=()=>{void 0!==e.result&&a.push(e.result)}}})},readAll=async()=>{if(assertActive(),c)return toSortedLines(l);const e=await ensureDb();return c||!e?readAll():new Promise((t,n)=>{const C=e.transaction([g],"readonly").objectStore(g).getAll();C.onsuccess=()=>{t(C.result)},C.onerror=e=>{n(e.target.error)}})},clear=async()=>{if(assertActive(),c)return void l.clear();const e=await ensureDb();if(!c&&e)return new Promise((t,n)=>{const C=e.transaction([g],"readwrite").objectStore(g).clear();C.onsuccess=()=>{t()},C.onerror=e=>{n(e.target.error)}});await clear()},close=()=>{i?.close?.(),i=null,s=null},destroy=()=>{u||(close(),l=new Map,u=!0)};return{initialize,writeBatch,readRange,readIds,readAll,clear,close,destroy,isFallback:()=>c}},yt=Object.freeze([]),normalizeEntries=e=>(Array.isArray(e)?e:[]).filter(e=>e&&"number"==typeof e.id).map(e=>({...e})),estimateSearchBytes=(e,t)=>2*t+32*e,createScrollbackSessionStore=({storage:e=createIndexedDbManager(),writeBatchSize:t=500,writeDebounceMs:g=Z,setTimeoutFn:n=setTimeout,clearTimeoutFn:C=clearTimeout,logger:I=null}={})=>{let o=[],a=null,i=Promise.resolve(),s=[],l=0,c=!1,u=null;const reportAsyncError=e=>{I?.error?.("[nexGui4] Scrollback session operation failed.",e)},assertActive=()=>{if(c)throw new Error("[nexGui4] Scrollback session store has been destroyed.")},cancelFlushTimer=()=>{a&&(C(a),a=null)},enqueueOperation=e=>{const t=i.then(e);return i=t.catch(()=>{}),t},takePendingWrites=()=>{if(cancelFlushTimer(),0===o.length)return yt;const e=o;return o=[],e},enqueuePendingWrite=()=>{const t=takePendingWrites();return 0===t.length?i:enqueueOperation(()=>e.writeBatch(t))},scheduleFlush=()=>{a||0===o.length||(a=n(()=>{a=null,enqueuePendingWrite().catch(reportAsyncError)},g))},resetSearchRecords=()=>{s=[],l=0},appendSearchRecords=e=>{for(const t of e){const e=stripHtml(t.html).toLowerCase();s.push({id:t.id,isPrompt:Boolean(t.isPrompt),text:e}),l+=e.length}},flush=()=>(assertActive(),enqueuePendingWrite()),readRange=async(t,g)=>(assertActive(),await flush(),enqueueOperation(()=>e.readRange(t,g))),readIds=async t=>(assertActive(),await flush(),Array.isArray(t)&&0!==t.length?enqueueOperation(()=>e.readIds(t)):[]),readAll=async()=>(assertActive(),await flush(),enqueueOperation(()=>e.readAll())),search=async(t,{includePrompts:g=!0}={})=>{assertActive();const n=String(t??"").trim().toLowerCase();if(await flush(),!n)return[];const C=s.filter(e=>g||!e.isPrompt).filter(e=>e.text.includes(n)).map(e=>e.id);return 0===C.length?[]:enqueueOperation(()=>e.readIds(C))};return{initialize:()=>(assertActive(),enqueueOperation(()=>e.initialize?.()??Promise.resolve())),append:e=>{if(c)return;const g=normalizeEntries(e);0!==g.length&&(appendSearchRecords(g),o.push(...g),o.length>=t?enqueuePendingWrite().catch(reportAsyncError):scheduleFlush())},flush,clear:()=>(assertActive(),cancelFlushTimer(),o=[],resetSearchRecords(),enqueueOperation(()=>e.clear())),readRange,readIds,readAll,search,getStats:()=>({pendingCount:o.length,pendingFlushScheduled:Boolean(a),storageFallback:Boolean(e.isFallback?.()),searchLineCount:s.length,searchTextChars:l,estimatedSearchBytes:estimateSearchBytes(s.length,l),writeBatchSize:t,writeDebounceMs:g,destroyed:c}),destroy:()=>{if(u)return u;const t=enqueuePendingWrite();return c=!0,u=t.catch(reportAsyncError).finally(()=>{cancelFlushTimer(),o=[],resetSearchRecords(),"function"==typeof e.destroy?e.destroy():e.close?.()}),u}}},NOOP$6=()=>{},normalizeTargetValue=e=>"string"==typeof e&&e.trim().length>0?e.trim():null,createCharacterApi=({characterModel:e=null,setTarget:t=NOOP$6}={})=>{const getCharacterSnapshot=()=>e?.snapshot?.()??{},g=Object.freeze({get:()=>getCharacterSnapshot().target??null,set:g=>{const n=normalizeTargetValue(g);return t(n),e?.setTarget?.(n),getCharacterSnapshot().target??null},is:e=>normalizeLookupKey(getCharacterSnapshot().target)===normalizeLookupKey(e)}),n=Object.freeze({get:()=>getCharacterSnapshot().class??"",is:e=>normalizeLookupKey(getCharacterSnapshot().class)===normalizeLookupKey(e)});return Object.freeze({target:g,class:n})},EMPTY_ICON_HTML=()=>"",createColorsApi=({playerColor:e=()=>"grey",iconHtml:t=EMPTY_ICON_HTML}={})=>{const g="function"==typeof t?t:EMPTY_ICON_HTML;return Object.freeze({playerColor:t=>e(t),iconHtml:(e,t,n)=>g(e,t,n)})},NOOP$5=()=>{},toFrozenList$1=e=>Object.freeze(Array.isArray(e)?[...e]:[]),createCustomizeApi=({setConfiguredDefences:e=NOOP$5,setClassBalanceType:t=NOOP$5,mountNativeDisplay:g=NOOP$5,unmountNativeDisplay:n=NOOP$5}={})=>{const C=Object.freeze({set:t=>toFrozenList$1(e(t))}),I=Object.freeze({set:e=>t(e)}),o=Object.freeze({mount:()=>{g()},unmount:()=>{n()}});return Object.freeze({defences:C,classBalance:I,nativeDisplay:o})},NOOP$4=()=>!1,toFrozenList=e=>Object.freeze(Array.isArray(e)?[...e]:[]),createLayoutApi=({presetIds:e=[],applyPreset:t=NOOP$4,saveLayout:g=NOOP$4,restoreLayout:n=NOOP$4,hasSavedLayout:C=()=>!1}={})=>{const I=toFrozenList(e);return Object.freeze({list:()=>I,apply:e=>Boolean(t(e)),save:()=>Boolean(g()),restore:()=>Boolean(n()),hasSaved:()=>Boolean(C())})},NOOP$3=()=>({members:[],leader:"",selfName:""}),createPartyApi=({getSnapshot:e=NOOP$3}={})=>{const isMember=t=>{const g=normalizeLookupKey(t);return!!g&&e().members.some(e=>normalizeLookupKey(e)===g)};return Object.freeze({isMember})},bt=Object.freeze([]),normalizeLookupName=e=>"string"==typeof e&&e.trim().length>0?e.trim().toLowerCase():"",toReadOnlySnapshot=e=>e&&"object"==typeof e?deepFreeze(structuredClone(e)):e,createPlayersApi=({getPlayer:e=()=>null,listPlayers:t=()=>bt,getPlayerColor:g=()=>"grey",refreshPlayer:n=async()=>null}={})=>{const resolveProfile=g=>{const n=e(g);if(n)return n;const C=normalizeLookupName(g);return C?t().find(e=>normalizeLookupName(e?.name)===C)??null:null},get=e=>{const t=resolveProfile(e);return t?toReadOnlySnapshot(t):null},color=e=>g(e),fetch=async e=>{try{const t=await n(e);if(t)return toReadOnlySnapshot(t)}catch{}const t=resolveProfile(e);return t?toReadOnlySnapshot(t):null};return Object.freeze({get,color,fetch})},NOOP$2=()=>{},NOOP_LIST=()=>[],NOOP_GET=()=>null,vt=["text","color","background"],normalizeOverride=e=>{if(!e||"object"!=typeof e)return null;const t={};for(const g of vt)"string"==typeof e[g]&&e[g]&&(t[g]=e[g]);return Object.keys(t).length>0?Object.freeze(t):null},createRoomApi=({setItemOverride:e=NOOP$2,removeItemOverride:t=NOOP$2,listItemOverrides:g=NOOP_LIST,getItemOverride:n=NOOP_GET}={})=>{const C=Object.freeze({set:(t,g)=>{const n=normalizeOverride(g);return n?(e(t,n),n):null},remove:e=>{t(e)},get:e=>n(e),list:()=>Object.freeze(g().map(([e,t])=>Object.freeze({name:e,override:t})))});return Object.freeze({items:C})},isTranscriptModel=e=>Boolean(e&&"function"==typeof e.addLines&&"function"==typeof e.getSnapshot),assertHtml=e=>{if("string"!=typeof e||0===e.length)throw new TypeError('api.stream.add requires a non-empty "html" string.')},resolveTargetModel=(e,t,g)=>{if("system"===e)return t;if("combat"===e)return g;throw new RangeError('api.stream.add requires "stream" to be either "system" or "combat".')},toReadOnlyEntry=e=>e?Object.freeze({...e}):null,createStreamApi=({systemStream:e=null,combatStream:t=null,now:g=Date.now}={})=>{const add=({html:n,stream:C}={})=>{assertHtml(n);const I=resolveTargetModel(C,e,t);if(!isTranscriptModel(I))return null;const o=g();return I.addLines([{html:n,timestamp:o,isPrompt:!1,isMonospace:!1,shouldLog:!0,buffer:C}]),toReadOnlyEntry(I.getSnapshot().items.at(-1))};return Object.freeze({add})},createNoopTimerModel=()=>({add:()=>null,clearAll:()=>0,get:()=>null,list:()=>[],remove:()=>null,reset:()=>null,start:()=>null,stop:()=>null}),hasListFilters=e=>"string"==typeof e||null!==e&&"object"==typeof e,resolveGroupId=e=>"string"==typeof e?e:e&&"object"==typeof e&&"string"==typeof e.groupId?e.groupId:null,createTimersApi=({timerModel:e}={})=>{const t=e??createNoopTimerModel(),get=e=>t.get(e),list=e=>{if(!hasListFilters(e))throw new TypeError("api.timers.list requires filters; read nexGui.state.timers.list for the unfiltered snapshot.");return t.list(e)},start=e=>t.start(e),stop=e=>t.stop(e),reset=e=>t.reset(e),remove=e=>t.remove(e),add=(e,g,n="",C)=>t.add(e,g,n,C),clear=e=>{const g=resolveGroupId(e);if(!g)return t.clearAll();const n=t.list({groupId:g});for(const C of n)t.remove(C.id);return n.length};return Object.freeze({add,clear,get,list,remove,reset,start,stop})},toFrozenSnapshot=e=>e&&"object"==typeof e?deepFreeze(structuredClone(e)):e,xt=Object.freeze({name:"",class:"",level:0,target:null,targetDetails:Object.freeze({id:null,name:null,hpPercent:null,hpText:null,hpDelta:null,gender:null,currentAffs:Object.freeze([]),limbs:Object.freeze({})}),gender:null,balance:!1,equilibrium:!1,classBalanceType:null,classBalanceReady:null,currentAffs:Object.freeze([]),limbs:Object.freeze({})}),createCharacterState=({characterModel:e=null}={})=>()=>toFrozenSnapshot(e?.snapshot?.()??xt),createCustomizeState=({getConfiguredDefences:e=()=>[],classBalanceController:t=null}={})=>()=>{const g=e();return toFrozenSnapshot({defences:Array.isArray(g)?g:[],classBalance:t?.getType?.()??null})},St=Object.freeze({members:Object.freeze([]),leader:"",selfName:"",settings:Object.freeze({})}),createPartyState=({partyModel:e=null}={})=>()=>toFrozenSnapshot(e?.snapshot?.()??St),wt=Object.freeze({directory:Object.freeze([]),cityPalette:Object.freeze({})}),createPlayersState=({playerDirectory:e=null,cityPalette:t=wt.cityPalette}={})=>()=>toFrozenSnapshot({directory:e?.getAllPlayerProfiles?.()??[],cityPalette:t&&"object"==typeof t?t:{}}),Et=Object.freeze({ref:Object.freeze({id:"",name:""}),items:Object.freeze([]),occupants:Object.freeze({players:Object.freeze([]),npcs:Object.freeze([])})}),createRoomState=({roomModel:e=null}={})=>()=>{const t=e?.snapshot?.();return t?toFrozenSnapshot({ref:{id:t.roomId??"",name:t.roomName??""},items:Array.isArray(t.items)?t.items:[],occupants:{players:Array.isArray(t.players)?t.players:[],npcs:Array.isArray(t.npcs)?t.npcs:[]}}):Et},Rt=Object.freeze({instance:Object.freeze({kills:0,goldGained:0,xpPercent:0,xpValue:0,deaths:0,startedAt:0}),session:Object.freeze({kills:0,goldGained:0,xpPercent:0,xpValue:0,deaths:0,startedAt:0}),month:Object.freeze({kills:0,goldGained:0,xpPercent:0,xpValue:0,deaths:0,startedAt:0,goldCap:0,year:0,month:0})}),createStatsState=({playStatsModel:e=null}={})=>()=>toFrozenSnapshot(e?.snapshot?.()??Rt),createSystemState=({version:e="",isMounted:t=()=>!1,startupOrchestrator:g=null}={})=>()=>toFrozenSnapshot({version:e,mounted:Boolean(t()),phase:g?.getState?.().phase??"INIT"}),createTimersState=({timerModel:e=null}={})=>()=>toFrozenSnapshot({list:e?.list?.()??[]}),composePublicApi=({version:e,startupOrchestrator:t,isMounted:g,character:n,timerModel:C,players:I,colors:o,customize:a,layout:i,party:s,room:l,stats:c,stream:u}={})=>{const d=createPlayersApi(I),p=createColorsApi({playerColor:o?.playerColor??d.color,iconHtml:o?.iconHtml}),m={system:createSystemState({version:e,isMounted:g,startupOrchestrator:t}),character:createCharacterState({characterModel:n?.characterModel}),party:createPartyState({partyModel:s?.partyModel}),room:createRoomState({roomModel:l?.roomModel}),stats:createStatsState({playStatsModel:c?.playStatsModel}),players:createPlayersState({playerDirectory:I?.playerDirectory,cityPalette:o?.cityPalette}),timers:createTimersState({timerModel:C}),customize:createCustomizeState({getConfiguredDefences:a?.getConfiguredDefences,classBalanceController:a?.classBalanceController})},stateSnapshot=()=>Object.freeze({system:m.system(),character:m.character(),party:m.party(),room:m.room(),stats:m.stats(),players:m.players(),timers:m.timers(),customize:m.customize()}),h=Object.freeze({character:createCharacterApi(n),players:d,colors:p,timers:createTimersApi({timerModel:C}),customize:createCustomizeApi(a),layout:createLayoutApi(i),party:createPartyApi({getSnapshot:s?.getSnapshot}),room:createRoomApi(l),stream:createStreamApi(u)}),y={};return Object.defineProperty(y,"state",{enumerable:!0,get:stateSnapshot}),Object.defineProperty(y,"api",{value:h,enumerable:!0}),Object.freeze(y)},kt="feather-pointed",tab=(e,t={})=>({type:"tab",id:e,name:e,component:e,helpText:e,icon:kt,...t}),hostTab=e=>({type:"tab",...e}),rightBorder=(e={})=>({type:"border",location:"right",...e}),Mt={layout:{type:"row",id:"main",children:[{type:"row",id:"#f21df3e7-48ef-48f4-b77d-96a4cfc93903",weight:11.055408908360821,children:[{type:"tabset",id:"container_1",weight:6.080414549807837,children:[tab("nexDefences")]},{type:"tabset",id:"#fc94a4e0-6b58-42b5-826f-6e0c3bec80a7",weight:5.235912529001193,children:[tab("nexTimers")]},{type:"tabset",id:"#3251f844-bd3f-4ebb-aca9-9a4dfe9d0add",weight:5.49476101474438,children:[tab("nexTarget")]},{type:"tabset",id:"#5a449b58-0188-4ab9-9c98-023ed517a477",weight:5.316690055933218,children:[tab("nexStats",{borderWidth:725})]}]},{type:"row",id:"#70e4ecdf-81dc-40c6-b536-b62595eff99b",weight:54.4266284719302,children:[{type:"tabset",id:"#f85f4040-6d4a-49c7-94bd-7244f1a3b32d",weight:11.507047541573453,children:[hostTab({id:"all_comm",name:"All Comm",helpText:"Global Communication Window",component:"all_comm",icon:"message-lines"})]},{type:"tabset",id:"#fdd3f126-a4e3-4f24-9e2b-03b2f25825ec",weight:46.37955039657086,enableDrop:!1,enableTabStrip:!1,active:!0,children:[hostTab({id:"#90968890-c02d-44ac-947a-5651201350c8",component:"center"})]}]},{type:"row",id:"#105ad70c-29c2-4f15-b764-c2c124fd5e36",weight:41.18462928637565,children:[{type:"row",id:"#6c8d384b-ce25-444f-9ece-92e8d7c1c7f4",weight:26.295598569968487,children:[{type:"tabset",id:"#14f8b2aa-bc7c-4e2b-b6cb-b05931394b2a",weight:48.76712328767123,children:[tab("nexFeed")]},{type:"tabset",id:"#887e45a7-0b29-446f-862b-d6dde018fc96",weight:51.23287671232877,children:[tab("nexMetrics")]}]},{type:"row",id:"#64cee95d-aaef-477c-965e-76cdabd2a677",weight:35.830262173583016,children:[{type:"row",id:"#c365b5e0-6c0c-4de0-81f2-872ed286499d",weight:39.93115318416523,children:[{type:"tabset",id:"#01137e43-37f6-4f66-aa8a-b129d202fc29",weight:49.54337899543379,children:[tab("nexItems")]},{type:"tabset",id:"#e4c4c437-aba2-45ff-b168-f72896c253fa",weight:50.45662100456621,children:[tab("nexNpcs")]}]},{type:"tabset",id:"#59491b6a-bab3-415d-8367-25c562f46ae9",weight:60.06884681583477,selected:1,children:[hostTab({id:"map",name:"Map",helpText:"Map",component:"map",icon:"route"}),hostTab({id:"nexMap",name:"nexMap",helpText:"nexMap",component:"nexMap",icon:kt})]}]},{type:"tabset",id:"#63176cb9-c8b3-452a-afff-1e828d13e678",weight:6.009664560737805,children:[tab("nexPlayers")]},{type:"row",id:"#9e30489f-3eaf-4afe-90f6-23087c97698d",weight:19.364474695710708,children:[{type:"tabset",id:"#688e21f9-7929-4c29-92ce-9a9500c8fb63",weight:34.47319574635062,children:[tab("nexCombat")]},{type:"tabset",id:"#a79f5a9f-83b7-4f6a-b3c9-1c3e5843cc7e",weight:34.83104898939232,children:[tab("nexSystem")]}]}]}]},borders:[rightBorder({size:700,children:[tab("nexOptions",{borderWidth:300}),tab("nexParty",{borderWidth:300})]}),{type:"border",location:"left",children:[]},{type:"border",location:"top",children:[]},{type:"border",location:"bottom",children:[]}]},Tt={layout:{type:"row",id:"main",children:[{type:"row",id:"#70e4ecdf-81dc-40c6-b536-b62595eff99b",weight:57.26509774852639,children:[{type:"tabset",id:"#f85f4040-6d4a-49c7-94bd-7244f1a3b32d",weight:17.557736227615205,selected:1,children:[hostTab({id:"map",name:"Map",helpText:"Map",component:"map",icon:"route"}),hostTab({id:"nexMap",name:"nexMap",helpText:"nexMap",component:"nexMap",icon:kt})]},{type:"row",id:"#bcb4f90b-4716-4f9b-9b22-ffd8741be626",weight:7.090289581370549,children:[{type:"tabset",id:"#b54bf1ab-4145-4041-9e67-8e6b789724b1",weight:11.363636363636363,children:[tab("nexPlayers")]},{type:"tabset",id:"#3df7c443-17f5-406e-9a45-54879deb731e",weight:26.79425837320574,children:[tab("nexNpcs")]},{type:"tabset",id:"#5c7c36a2-9496-4e6f-a1df-c581f898f7ac",weight:36.8421052631579,active:!0,children:[tab("nexItems")]}]},{type:"tabset",id:"#1eaac23b-4eae-486d-8915-90a25f41f9e0",weight:2.6494514015995967,children:[hostTab({id:"all_comm",name:"All Comm",helpText:"Global Communication Window",component:"all_comm",icon:"message-lines"})]},{type:"tabset",id:"#fdd3f126-a4e3-4f24-9e2b-03b2f25825ec",weight:30.58912072755898,enableDrop:!1,enableTabStrip:!1,children:[hostTab({id:"#90968890-c02d-44ac-947a-5651201350c8",component:"center"})]}]}]},borders:[rightBorder({size:700,children:[tab("nexOptions",{borderWidth:300}),tab("nexParty",{borderWidth:300}),tab("nexMetrics"),tab("nexStats",{borderWidth:725}),tab("nexCombat"),tab("nexSystem"),tab("nexTarget"),tab("nexDefences"),tab("nexTimers"),tab("nexFeed")]})]},Pt=Object.freeze({kDesktop:Mt,mobile:Tt}),Nt=Object.freeze(Object.keys(Pt)),getLayoutPreset=e=>Pt[e]??null,createCharacterStore=({characterModel:e,eventBus:t})=>{const g=create(()=>({...e.read(),updateCharacter:t=>e.update(t),setClass:t=>e.setClass(t),setTarget:t=>e.setTarget(t)})),refreshCharacter=()=>{g.setState(e.read())};return t.on(_.CHARACTER_UPDATED,refreshCharacter),t.on(_.CLASS_CHANGED,refreshCharacter),t.on(_.TARGET_CHANGED,refreshCharacter),g},projectEntries=(e,t)=>e.length===t.length&&e.every((e,g)=>Object.is(e,t[g]))?e:t,createFeedStore=({feedModel:e})=>create((t,g)=>{const refresh=()=>{t({entries:projectEntries(g().entries,e.snapshot())})};return{entries:e.snapshot(),addEntry:t=>{e.add(t),refresh()},addEntries:t=>{if("function"==typeof e.addEntries)e.addEntries(t);else for(const g of t)e.add(g);refresh()},replaceEntries:t=>{if("function"==typeof e.replaceEntries)e.replaceEntries(t);else{e.clear();for(const g of t)e.add(g)}refresh()},clear:()=>{e.clear(),refresh()}}}),createPartyStore=({partyModel:e,eventBus:t})=>{const readParty=()=>e.read?.()??e.snapshot(),g=create(()=>({...readParty(),updateParty:t=>e.update(t),addMember:t=>e.addMember(t),removeMember:t=>e.removeMember(t),setLeader:t=>e.setLeader(t),setSelf:t=>e.setSelf(t),setSetting:(t,g)=>e.setSetting(t,g)})),refreshParty=()=>{g.setState(readParty())};return t.on(_.PARTY_UPDATED,refreshParty),t.on(_.PARTY_MEMBER_LEFT,refreshParty),g},Dt=/^You have gained (\d+) experience\.$/,Ot=/^You have made (\d+) out of 450000 gold this month\.$/,toFiniteNumber=(e,t=null)=>{const g="number"==typeof e?e:"string"==typeof e&&e.trim().length>0?Number(e):NaN;return Number.isFinite(g)?g:t},toInteger=(e,t=null)=>{const g=toFiniteNumber(e,NaN);return Number.isFinite(g)?Math.trunc(g):t},toStatusXp=e=>{if(!e||"object"!=typeof e)return null;const t="string"==typeof e.level?Number.parseInt(e.level,10):toInteger(e.level,null),g=toFiniteNumber("string"==typeof e.xp?e.xp.replace("%",""):e.xp,null);return null==t||null==g?null:t+g/100},makeScope=e=>({kills:0,goldGained:0,xpPercent:0,xpValue:0,deaths:0,startedAt:e}),makeMonthScope=e=>({...makeScope(e),goldCap:0,year:0,month:0}),cloneSnapshot=e=>structuredClone(e),normalizePersistedStats=e=>migrateGameStatsPersistence(e??Ne),createPlayStatsModel=({persistedGameStats:e,now:t=()=>Date.now()}={})=>{const g=t(),n=normalizePersistedStats(e),C=n.month??Ne.month,I=toInteger(C.xpValue??C.xp,0);let o=toInteger(n.kills,0),a=null,i=toFiniteNumber(C.currentXp,null);const s=new Set,l=new Set,c=g,u={instance:{initialized:!1,startingGold:null,startingKills:o,startingXp:null,startedAt:g},session:{initialized:!1,startingGold:null,startingKills:o,startingXp:null,startedAt:g},month:{initialized:toInteger(C.year,0)>0&&toInteger(C.month,0)>0,startingGold:toInteger(C.startingGold,null),startingKills:toInteger(C.startingKills,o),startingXp:toFiniteNumber(C.startingXp,null),startedAt:c}};let d={instance:makeScope(g),session:makeScope(g),month:{...makeMonthScope(c),goldCap:toInteger(C.goldCap,0),year:toInteger(C.year,0),month:toInteger(C.month,0),xpValue:I,deaths:toInteger(C.deaths,0)}};const read=()=>d,updateScope=(e,t)=>{if(!t||"object"!=typeof t)return;const g=d[e],n={...g,...t};Object.keys(t).some(e=>!Object.prototype.hasOwnProperty.call(g,e)||!Object.is(g[e],n[e]))&&(d={...d,[e]:n})},toPersistenceSnapshot=()=>({kills:o,month:{deaths:d.month.deaths,goldCap:d.month.goldCap,month:d.month.month,startingGold:u.month.startingGold??0,startingKills:u.month.startingKills??o,startingXp:u.month.startingXp??0,currentXp:i??0,xpValue:d.month.xpValue,year:d.month.year}}),emitRead=()=>{const e=read();s.forEach(t=>t(e))},emitPersistenceSnapshot=()=>{const e=toPersistenceSnapshot();l.forEach(t=>t(e))},emitChange=({persist:e=!1}={})=>{emitRead(),e&&emitPersistenceSnapshot()},ensureScopeBaseline=e=>{const t=u[e];t.initialized||null==a||null==i||(t.initialized=!0,t.startingGold=a,t.startingKills=o,t.startingXp=i)},refreshScope=e=>{const t=u[e];t.initialized&&null!=t.startingGold&&null!=t.startingXp&&null!=a&&null!=i&&updateScope(e,{kills:o-t.startingKills,goldGained:a-t.startingGold,xpPercent:Number((100*(i-t.startingXp)).toFixed(2))})},refreshAllScopes=()=>{ensureScopeBaseline("instance"),ensureScopeBaseline("session"),ensureScopeBaseline("month"),refreshScope("instance"),refreshScope("session"),refreshScope("month"),emitChange({persist:!0})},incrementXpValue=e=>{!Number.isFinite(e)||e<=0||(updateScope("instance",{xpValue:d.instance.xpValue+e}),updateScope("session",{xpValue:d.session.xpValue+e}),updateScope("month",{xpValue:d.month.xpValue+e}),emitChange({persist:!0}))},setMonthGoldCap=e=>{!Number.isFinite(e)||e<0||(updateScope("month",{goldCap:e}),emitChange({persist:!0}))};return{destroy:()=>{s.clear(),l.clear()},handleAchievement:e=>{if("TotalCreaturesKilled"!==e?.name)return{requestGoldCap:!1};const t=toInteger(e?.value,o);return null!=t&&(o=t,refreshAllScopes()),{requestGoldCap:!0}},handleStatus:e=>{a=toInteger(e?.gold,a),i=toStatusXp(e)??i,refreshAllScopes()},handleTimeList:e=>{const g=toInteger(e?.mon,null),n=toInteger(e?.year,null);if(null!=g){if(g!==d.month.month||null!=n&&n!==d.month.year){const e=t();return u.month={initialized:null!=a&&null!=i,startingGold:a,startingKills:o,startingXp:i,startedAt:e},d={...d,month:{...makeMonthScope(e),year:n??0,month:g}},void emitChange({persist:!0})}updateScope("month",{year:n??d.month.year,month:g}),emitChange({persist:!0})}},processStreamEntries:e=>{Array.isArray(e)&&0!==e.length&&e.forEach(e=>{if(e?.isPrompt)return;const t=stripHtml(e?.html).trim(),g=t.match(Dt);if(g)return void incrementXpValue(toInteger(g[1],0));const n=t.match(Ot);n&&setMonthGoldCap(toInteger(n[1],0))})},read,resetInstance:()=>{const e=t();u.instance={initialized:null!=a&&null!=i,startingGold:a,startingKills:o,startingXp:i,startedAt:e},d={...d,instance:makeScope(e)},emitChange()},snapshot:()=>cloneSnapshot(d),subscribe:e=>(s.add(e),()=>s.delete(e)),subscribePersistence:e=>(l.add(e),()=>l.delete(e)),toPersistenceSnapshot,updateInstance:e=>{updateScope("instance",e),emitChange()},updateMonth:e=>{updateScope("month",e),emitChange()},updateSession:e=>{updateScope("session",e),emitChange()}}},createPlayStatsStore=({playStatsModel:e}={})=>{const t=e??createPlayStatsModel(),g=create(()=>({...t.read(),updateInstance:e=>t.updateInstance(e),updateSession:e=>t.updateSession(e),updateMonth:e=>t.updateMonth(e),resetInstance:()=>t.resetInstance()})),refreshStats=()=>{g.setState(t.read())},n=t.subscribe(refreshStats);return Object.defineProperty(g,"destroy",{value:()=>{n()},enumerable:!1}),g},createRoomStore=({roomModel:e,eventBus:t})=>{const readRoom=()=>e.read?.()??e.snapshot(),g=create(()=>({...readRoom(),updateRoom:t=>e.update(t)})),refreshRoom=()=>{g.setState(readRoom())};return t.on(_.ROOM_UPDATED,refreshRoom),g},normalizeTarget=e=>{if(null==e)return null;if("string"==typeof e){const t=e.trim();return t.length>0?t:null}return"object"!=typeof e||Array.isArray(e)?e:"target"in e?normalizeTarget(e.target):null},createStatsStore=({statsModel:e,eventBus:t})=>{const g=create(()=>({...e.read(),target:null,updateStats:t=>e.update(t)})),refreshStats=()=>{g.setState(e.read())};return t.on(_.STATS_UPDATED,refreshStats),t.on(_.TARGET_CHANGED,e=>{g.setState({target:normalizeTarget(e)})}),g},immerImpl=e=>(t,g,n)=>(n.setState=(e,g,...n)=>t("function"==typeof e?V(e):e,g,...n),e(n.setState,g,n)),jt=immerImpl,zt=Object.freeze({purpleGalaxy:"https://cdn.pixabay.com/photo/2018/12/18/22/30/background-3883188_960_720.jpg",blueGalaxy:"https://cdn.pixabay.com/photo/2022/06/08/05/47/stars-7249785_960_720.jpg",orangeGalaxy:"https://cdn.pixabay.com/photo/2015/08/28/11/27/space-911785_960_720.jpg",greenGalaxy:"https://cdn.pixabay.com/photo/2017/08/15/08/23/stars-2643089_960_720.jpg",stars:"https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/stars.png",darkForest:"https://i.pinimg.com/originals/44/6e/3b/446e3b79395a287ca32f7977dd83b290.jpg"}),Gt=Object.freeze(Object.keys(zt)),Lt=new Map(Object.entries(zt).map(([e,t])=>[t,e])),canonicalizeBackgroundImageValue=e=>{if("string"!=typeof e)return"";const t=e.trim();return t?Object.hasOwn(zt,t)?t:Lt.get(t)??t:""},resolveBackgroundImageSource=e=>{const t=canonicalizeBackgroundImageValue(e);return zt[t]??t},Bt=deepFreeze({background:{primary:"#0d0d0d",panel:"#141414",header:"#1a1a1a",modal:"#1e1e1e"},text:{primary:"#FFF5D6",secondary:"#C0B090",muted:"#706050",accent:"#FFD700"},game:{hp:"#e05555",mp:"#5588e0",ep:"#55c055",wp:"#e0a035",nl:"#a055e0",timerActive:"#55aaff",timerCritical:"#ff5533"},spacing:{unit:4},radius:{panel:4,tag:2},theme:{backgroundImage:"",fontSize:12,displayFontFamily:Ee,displayFontSize:14,backgroundOpacity:.5,hue:0},replacement:{bracketAllyColor:"#ffffff",bracketEnemyColor:"#ff0000",targetBorderColor:"rgb(255, 0, 0)",selfNameColor:"lightpink",infoColor:"cadetblue",unknownNameColor:"grey",npcTagBracketColor:"red",damageNumberBracketColor:"#808080"}}),cloneTokens$1=e=>structuredClone(e),mergeTokenPatch=(e,t)=>{const g=cloneTokens$1(e);if(!isPlainObject$1(t))return g;const applyPatch=(e,t)=>{for(const[g,n]of Object.entries(t))void 0!==n&&(Array.isArray(n)?e[g]=structuredClone(n):isPlainObject$1(n)&&isPlainObject$1(e[g])?applyPatch(e[g],n):e[g]=structuredClone(n))};return applyPatch(g,t),g},normalizeThemeTokens=e=>{if(!isPlainObject$1(e))return e;const t={...e};return Object.hasOwn(e,"backgroundImage")&&(t.backgroundImage=canonicalizeBackgroundImageValue(e.backgroundImage)),Object.hasOwn(e,"displayFontFamily")&&(t.displayFontFamily=normalizeDisplayFontFamily(e.displayFontFamily)),Object.hasOwn(e,"displayFontSize")&&(t.displayFontSize=normalizeDisplayFontSize(e.displayFontSize)),{...t}},normalizeTokens=e=>({...e,theme:normalizeThemeTokens(e.theme)}),createThemeStore=({eventBus:e,persistenceStore:t}={})=>{const g=normalizeTokens(mergeTokenPatch(Bt,{theme:t&&"function"==typeof t.get?normalizeThemeTokens(t.get("theme")):void 0})),n=create(jt(()=>({tokens:g,updateTokens:g=>{const C=normalizeTokens(mergeTokenPatch(n.getState().tokens,g));t&&"function"==typeof t.set&&t.set("theme",C.theme),n.setState({tokens:C}),e.emit($.THEME_CHANGED,{tokens:cloneTokens$1(C)})},resetTokens:()=>{const g=cloneTokens$1(Bt);t&&"function"==typeof t.set&&t.set("theme",g.theme),n.setState({tokens:g}),e.emit($.THEME_CHANGED,{tokens:cloneTokens$1(g)})}})));return n},createTimerStore=({timerModel:e,eventBus:t})=>{const readTimers=()=>e.read?.()??e.snapshot(),g=create(()=>({timers:readTimers(),addTimer:(t,g,n="",C)=>e.add(t,g,n,C),removeTimer:t=>e.remove(t),clearAll:()=>e.clearAll()})),refreshTimers=()=>{g.setState({timers:readTimers()})};return t.on(_.TIMER_STARTED,refreshTimers),t.on(_.TIMER_UPDATED,refreshTimers),t.on(_.TIMER_EXPIRED,refreshTimers),t.on(_.TIMER_CLEARED,refreshTimers),g},createUiStore=({persistenceStore:e}={})=>create(jt(t=>({activeTab:{},modalOpen:null,settings:e?.get?.("ui")??{},netflixMode:!1,setActiveTab:(e,g)=>t(t=>{t.activeTab[e]=g}),openModal:e=>t({modalOpen:e}),closeModal:()=>t({modalOpen:null}),setSetting:(g,n)=>t(t=>{t.settings[g]=n,e?.set?.("ui",t.settings)}),setNetflixMode:e=>t(t=>{t.netflixMode=Boolean(e)})}))),createMessageRegistry=()=>{const e=new Map,listTypes=()=>[...e.keys()].sort((e,t)=>e.localeCompare(t));return{register:(t,g)=>(e.set(t,g),g),lookup:t=>e.get(t)??null,listTypes}},Ft=["#000000","#800000","#008000","#808000","#000080","#800080","#008080","#c0c0c0","#808080","#ff0000","#00ff00","#ffff00","#0000ff","#ff00ff","#00ffff","#ffffff"],Wt=[0,95,135,175,215,255],hex2=e=>e.toString(16).padStart(2,"0"),Vt={};for(let gc=0;gc<16;gc++)Vt[gc]=Ft[gc];for(let gc=16;gc<=231;gc++){const e=gc-16,t=Math.floor(e/36),g=Math.floor(e%36/6),n=e%6,C=Wt[t],I=Wt[g],o=Wt[n];Vt[gc]=`#${hex2(C)}${hex2(I)}${hex2(o)}`}for(let gc=232;gc<=255;gc++){const e=8+10*(gc-232);Vt[gc]=`#${hex2(e)}${hex2(e)}${hex2(e)}`}var Ut=/\x1b\[([0-9;]*)m|([^\x1b]+)/g,stdColor=(e,t)=>Vt[t?e+8:e],parseAnsi=e=>{const t=[];let g,n=null,C=null,I=!1;for(Ut.lastIndex=0;null!==(g=Ut.exec(e));){if(void 0!==g[2]){t.push({text:g[2],fg:n,bg:C,bold:I});continue}const e=g[1],o=0===e.length?[0]:e.split(";").map(Number);let a=0;for(;a<o.length;){const e=o[a];0===e?(n=null,C=null,I=!1):1===e?I=!0:e>=30&&e<=37?n=stdColor(e-30,I):e>=40&&e<=47?C=stdColor(e-40,!1):e>=90&&e<=97?n=Vt[e-90+8]:e>=100&&e<=107?C=Vt[e-100+8]:38===e&&5===o[a+1]&&void 0!==o[a+2]?(n=Vt[o[a+2]]??null,a+=2):48===e&&5===o[a+1]&&void 0!==o[a+2]&&(C=Vt[o[a+2]]??null,a+=2),a++}}return t},Kt=/\x1b\[[0-9;]*m/g,Ht=/^\d+h,\s*\d+m,\s*\d+e,\s*\d+w/,parsePromptLine=e=>{const t=e.replace(Kt,"").trim();return{isPrompt:Ht.test(t),text:t}},renderCombatLine=e=>{const t=resolveTimestamp(e);return createDisplayLine({html:renderStructuredRowHtml(e,"combat"),timestamp:t,isPrompt:!1,isMonospace:!1,shouldLog:e.shouldLog??!0,buffer:"combat"})},renderSystemLine=e=>{const t=resolveTimestamp(e);return createDisplayLine({html:renderStructuredRowHtml(e,"system"),timestamp:t,isPrompt:!1,isMonospace:!1,shouldLog:e.shouldLog??!0,buffer:"system"})},Yt=Object.freeze({main:renderColorLine,system:renderSystemLine,combat:renderCombatLine,replacement:renderReplacementLine}),isMessageInput=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)&&"string"==typeof e.event&&Object.prototype.hasOwnProperty.call(e,"payload")),parseRawLine=(e,t,g)=>{const n=t(e),C=g(e);return{type:"main",buffer:"main",segments:n,metadata:{text:C.text,source:"raw"},isPrompt:C.isPrompt,isMonospace:C.isPrompt,shouldLog:!0}},withTimestamp=(e,t)=>null!=e.timestamp||null!=e.metadata?.timestamp?e:{...e,timestamp:t()},validateDependencies=(e,t,g)=>{if(!e||"function"!=typeof e.addLines)throw new TypeError("createMessagePipeline requires a streamModel with addLines(lines).");if(null!=g&&"function"!=typeof g.addLines)throw new TypeError("createMessagePipeline side transcript models must expose addLines(lines).");if(!t||"function"!=typeof t.register||"function"!=typeof t.lookup)throw new TypeError("createMessagePipeline requires a registry with register(type, renderer) and lookup(type).")},createMessagePipeline=({streamModel:e,registry:t=createMessageRegistry(),parseAnsi:g=parseAnsi,parsePromptLine:n=parsePromptLine,parseStreamEventLine:C=parseStreamEventLine,renderColorLine:I=Yt.main,renderCombatLine:o=Yt.combat,renderReplacementLine:a=Yt.replacement,renderSystemLine:i=Yt.system,systemStreamModel:s=null,combatStreamModel:l=null,now:c=Date.now})=>{validateDependencies(e,t,s),validateDependencies(e,t,l),t.register("main",I),t.register("system",i),t.register("combat",o),t.register("replacement",a);const resolveTargetModel=t=>"system"===t?s??e:"combat"===t?l??e:e,renderAndStore=e=>{if(!e)return null;const g=t.lookup(e.type);if(!g)return null;const n=g(withTimestamp(e,c));return resolveTargetModel(n?.buffer??e.buffer).addLines([n]),n};function process(e,t){return"string"==typeof e&&1===arguments.length?renderAndStore(parseRawLine(e,g,n)):"string"==typeof e&&arguments.length>1?renderAndStore(C(e,t)):isMessageInput(e)?renderAndStore(C(e.event,e.payload)):null}return{process,registry:t}},normalizeGender$1=e=>{if("string"!=typeof e)return null;const t=e.trim().toLowerCase();return"female"===t?"female":"male"===t?"male":null},normalizeAfflictionName=e=>{if(Array.isArray(e))return normalizeAfflictionName(e[0]);if(isPlainObject$1(e))return normalizeAfflictionName(e.name??e.affliction??e.id);if("string"!=typeof e)return null;const t=e.trim().toLowerCase();return t.length>0?t:null},normalizeAfflictionList=e=>{if(Array.isArray(e)){const t=e.map(e=>normalizeAfflictionName(e)).filter(Boolean);return t.length>0?Array.from(new Set(t)):null}return isPlainObject$1(e)?normalizeAfflictionList(Object.keys(e)):null},normalizeLimbMap=e=>isPlainObject$1(e)?Object.fromEntries(Object.entries(e).map(([e,t])=>null!==t&&"object"==typeof t?[e,structuredClone(t)]:[e,{percent:toNumber(t)}])):null,buildCharacterDetailPatch=e=>{if(!isPlainObject$1(e))return null;const t={},g=normalizeGender$1(e.gender),n=normalizeAfflictionList(e.currentAffs??e.afflictions),C=normalizeLimbMap(e.limbs);return g&&(t.gender=g),n&&(t.currentAffs=n),C&&(t.limbs=C),Object.keys(t).length>0?t:null},applyCharacterAfflictionEvent=(e,t,g)=>{if("Char.Afflictions.Add"!==t&&"Char.Afflictions.Remove"!==t)return!1;const n=normalizeAfflictionName(g);if(!n)return!1;const C=e.snapshot(),I=Array.isArray(C.currentAffs)?C.currentAffs:[];return"Char.Afflictions.Add"===t?!I.includes(n)&&(e.update({currentAffs:[...I,n]}),!0):(e.update({currentAffs:I.filter(e=>e!==n)}),!0)},extractTargetLabel=e=>{if("string"==typeof e){const t=toTrimmedString(e);return!t||/^\d+$/.test(t)?null:t}return isPlainObject$1(e)?toTrimmedString(e.short_desc)??toTrimmedString(e.name)??toTrimmedString(e.fullname)??toTrimmedString(e.text):null},parseLevel=e=>{if("number"==typeof e&&Number.isFinite(e))return e;if("string"!=typeof e)return 0;const t=e.match(/\d+/);return t?Number.parseInt(t[0],10):0},buildVitalsStatsPatch=e=>isPlainObject$1(e)?{hp:{current:toNumber(e.hp),max:toNumber(e.maxhp)},mp:{current:toNumber(e.mp),max:toNumber(e.maxmp)},ep:{current:toNumber(e.ep),max:toNumber(e.maxep)},wp:{current:toNumber(e.wp),max:toNumber(e.maxwp)},nl:{current:toNumber(e.nl),max:toNumber(e.maxnl,100)}}:null,buildVitalsCharacterPatch=e=>isPlainObject$1(e)?{balance:toBooleanFlag(e.bal),equilibrium:toBooleanFlag(e.eq),...buildCharacterDetailPatch(e)??{}}:null,buildStatusSync=e=>{if(!isPlainObject$1(e))return null;const t=toPercent(e.xp),g=toTrimmedString(e.class);return{statsPatch:{gold:toNumber(e.gold),bank:toNumber(e.bank),...null==t?{}:{xp:t,xpToNext:Math.max(0,100-t)}},characterPatch:{...toTrimmedString(e.name)?{name:e.name.trim()}:{},level:parseLevel(e.level),...buildCharacterDetailPatch(e)??{}},className:g,target:extractTargetLabel(e.target),city:toTrimmedString(e.city)}},isBridgeEnvelope=e=>isPlainObject$1(e)&&"string"==typeof e.event&&Object.prototype.hasOwnProperty.call(e,"data"),createGmcpIngressController=({adapter:e,eventBus:t,timerModel:g,streamModel:n,systemStreamModel:C,combatStreamModel:I,statsModel:o,partyModel:a,roomModel:i,characterModel:s,defenceModel:l,classBalanceController:c,playerDirectory:u,roomOccupantsModel:d=createRoomOccupantsModel({roomModel:i,playerDirectory:u}),partyAutomationModel:p=createPartyAutomationModel({characterModel:s,partyModel:a,playerDirectory:u,sendCommand:t=>e.send(t)})}={})=>{const m=createMessagePipeline({streamModel:n,systemStreamModel:C,combatStreamModel:I}),h=[],subscribe=(e,g)=>{h.push(t.on(e,g))},processDisplayBridge=e=>{isBridgeEnvelope(e)&&m.process(e.event,e.data)};return subscribe(q.STREAM_LINE,e=>{isBridgeEnvelope(e)&&(applyCharacterAfflictionEvent(s,e.event,e.data),p.processEvent(e.event,e.data),processDisplayBridge(e))}),subscribe(q.TIMER_STARTED,e=>{if(!isBridgeEnvelope(e)||"nexSkillMatch"!==e.event)return;if("self"!==e.data?.user)return;const t=toTrimmedString(e.data?.id);if(!t)return;const n=g.get(t);n&&g.start(n.id)}),subscribe(q.DEFENCE_GAINED,e=>{if(!isBridgeEnvelope(e))return;const t=extractNamedValue(e.data);t&&l.gain(t),processDisplayBridge(e)}),subscribe(q.DEFENCE_LOST,e=>{if(!isBridgeEnvelope(e))return;const t=extractNamedValue(e.data);t&&l.lose(t),processDisplayBridge(e)}),subscribe(q.TARGET_CHANGED,e=>{isBridgeEnvelope(e)&&processDisplayBridge(e)}),subscribe(q.STATS_UPDATED,e=>{if(isBridgeEnvelope(e)){if("Char.Vitals"===e.event){const t=buildVitalsStatsPatch(e.data),g=buildVitalsCharacterPatch(e.data),n=c.updateFromVitals(e.data);t&&o.update(t),(g||n)&&s.update({...g??{},...n??{}})}if("Char.Status"===e.event){const t=buildStatusSync(e.data);if(!t)return;o.update(t.statsPatch),s.update(t.characterPatch),a.setSelf(t.characterPatch.name??e.data?.name),u.rememberPlayerStatus({...e.data,name:t.characterPatch.name??e.data?.name,city:t.city,fullname:e.data?.fullname}),t.className&&s.setClass(t.className),s.setTarget(t.target)}}}),subscribe(q.ROOM_UPDATED,e=>{isBridgeEnvelope(e)&&d.apply(e.event,e.data)}),subscribe(q.CLASS_CHANGED,e=>{if(!isBridgeEnvelope(e))return;const t=toTrimmedString(e.data?.class)??toTrimmedString(e.data);t&&s.setClass(t)}),Object.freeze({destroy:()=>{h.forEach(e=>e?.())}})},Zt=Object.freeze({}),areDisplayHostSettingsEqual=(e,t)=>e.showPrompts===t.showPrompts&&e.showTimestamps===t.showTimestamps,freezeDisplayHostSettings=e=>Object.freeze(e),readDisplayHostSettings=e=>{const t=e?.()??Zt;return freezeDisplayHostSettings({showPrompts:Boolean(t.show_prompts),showTimestamps:Boolean(t.show_timestamps)})},resolvePayloadSnapshot$2=(e,t)=>{if(!t||"object"!=typeof t||"string"!=typeof t.key)return null;if(!("value"in t))return null;switch(t.key){case"show_prompts":{const g=Boolean(t.value);return g===e.showPrompts?e:freezeDisplayHostSettings({...e,showPrompts:g})}case"single_prompt":{const g=!Boolean(t.value);return g===e.showPrompts?e:freezeDisplayHostSettings({...e,showPrompts:g})}case"show_timestamps":{const g=Boolean(t.value);return g===e.showTimestamps?e:freezeDisplayHostSettings({...e,showTimestamps:g})}default:return null}},createHostDisplaySettingsModel=({eventBus:e,readHostSettings:t})=>{if(!e||"function"!=typeof e.on)throw new Error("createHostDisplaySettingsModel requires an eventBus with on(topic, listener).");if("function"!=typeof t)throw new Error("createHostDisplaySettingsModel requires readHostSettings().");let g=readDisplayHostSettings(t);const n=new Set,notifyListeners=()=>{for(const e of n)e()},commitSnapshot=e=>(!e||areDisplayHostSettingsEqual(g,e)||(g=e,notifyListeners()),g),syncFromHost=()=>commitSnapshot(readDisplayHostSettings(t)),handleHostSettingsChanged=e=>{const t=resolvePayloadSnapshot$2(g,e);t&&commitSnapshot(t)},C=e.on($.HOST_SETTINGS_CHANGED,handleHostSettingsChanged),I=e.on($.SYSTEM_PHASE,syncFromHost),subscribe=e=>(n.add(e),()=>{n.delete(e)}),getSnapshot=()=>g,destroy=()=>{C?.(),I?.(),n.clear()};return Object.freeze({destroy,getSnapshot,subscribe})},Qt=Object.freeze({}),areHostSettingsEqual=(e,t)=>e.echo_input===t.echo_input&&e.echo_gmcp===t.echo_gmcp&&e.single_prompt===t.single_prompt&&e.show_timestamps===t.show_timestamps,freezeHostSettings=e=>Object.freeze(e),readHostSettingsFromHost=e=>{const t=e?.()??Qt;return freezeHostSettings({echo_input:Boolean(t.echo_input),echo_gmcp:Boolean(t.echo_gmcp),single_prompt:!Boolean(t.show_prompts),show_timestamps:Boolean(t.show_timestamps)})},resolvePayloadSnapshot$1=(e,t)=>{if(!t||"object"!=typeof t||"string"!=typeof t.key)return null;if(!("value"in t))return null;switch(t.key){case"echo_input":{const g=Boolean(t.value);return g===e.echo_input?e:freezeHostSettings({...e,echo_input:g})}case"echo_gmcp":{const g=Boolean(t.value);return g===e.echo_gmcp?e:freezeHostSettings({...e,echo_gmcp:g})}case"single_prompt":{const g=Boolean(t.value);return g===e.single_prompt?e:freezeHostSettings({...e,single_prompt:g})}case"show_prompts":{const g=!Boolean(t.value);return g===e.single_prompt?e:freezeHostSettings({...e,single_prompt:g})}case"show_timestamps":{const g=Boolean(t.value);return g===e.show_timestamps?e:freezeHostSettings({...e,show_timestamps:g})}default:return null}},createHostSettingsModel=({eventBus:e,readHostSettings:t})=>{if(!e||"function"!=typeof e.on)throw new Error("createHostSettingsModel requires an eventBus with on(topic, listener).");if("function"!=typeof t)throw new Error("createHostSettingsModel requires readHostSettings().");let g=readHostSettingsFromHost(t);const n=new Set,notifyListeners=()=>{for(const e of n)e()},commitSnapshot=e=>(!e||areHostSettingsEqual(g,e)||(g=e,notifyListeners()),g),syncFromHost=()=>commitSnapshot(readHostSettingsFromHost(t)),handleHostSettingsChanged=e=>{const t=resolvePayloadSnapshot$1(g,e);t&&commitSnapshot(t)},C=e.on($.HOST_SETTINGS_CHANGED,handleHostSettingsChanged),I=e.on($.SYSTEM_PHASE,syncFromHost),subscribe=e=>(n.add(e),()=>{n.delete(e)}),getSnapshot=()=>g,destroy=()=>{C?.(),I?.(),n.clear()};return Object.freeze({destroy,getSnapshot,subscribe})},Xt=Object.freeze({}),areHostLayoutsEqual=(e,t)=>e.display_tabstrip===t.display_tabstrip,freezeHostLayout=e=>Object.freeze(e),readHostLayoutFromHost=e=>{const t=e?.()??Xt;return freezeHostLayout({display_tabstrip:"boolean"!=typeof t.tabSetEnableTabStrip||t.tabSetEnableTabStrip})},resolvePayloadSnapshot=(e,t)=>{if(!t||"object"!=typeof t||"string"!=typeof t.key)return null;if(!("value"in t))return null;if("display_tabstrip"===t.key){const g=Boolean(t.value);return g===e.display_tabstrip?e:freezeHostLayout({...e,display_tabstrip:g})}return null},createHostLayoutModel=({eventBus:e,readHostLayout:t})=>{if(!e||"function"!=typeof e.on)throw new Error("createHostLayoutModel requires an eventBus with on(topic, listener).");if("function"!=typeof t)throw new Error("createHostLayoutModel requires readHostLayout().");let g=readHostLayoutFromHost(t);const n=new Set,notifyListeners=()=>{for(const e of n)e()},commitSnapshot=e=>(!e||areHostLayoutsEqual(g,e)||(g=e,notifyListeners()),g),syncFromHost=()=>commitSnapshot(readHostLayoutFromHost(t)),handleHostSettingsChanged=e=>{const t=resolvePayloadSnapshot(g,e);t?commitSnapshot(t):syncFromHost()},C=e.on($.HOST_SETTINGS_CHANGED,handleHostSettingsChanged),I=e.on($.SYSTEM_PHASE,syncFromHost),subscribe=e=>(n.add(e),()=>{n.delete(e)}),getSnapshot=()=>g,destroy=()=>{C?.(),I?.(),n.clear()};return Object.freeze({destroy,getSnapshot,subscribe})},hasPersistenceAdapter=e=>e&&"function"==typeof e.getVariable&&"function"==typeof e.setVariable,createPlayStatsPersistence=({adapter:e}={})=>{if(!hasPersistenceAdapter(e))return null;const t=createPersistenceStore({adapter:e,sliceKey:Te.GAME_STATS,schema:Ne,migrate:migrateGameStatsPersistence});return{read:()=>t.getAll(),write:e=>{t.set("kills",e?.kills??0),t.set("month",e?.month??{})}}},safeUnsubscribe=e=>{"function"==typeof e&&e()},resolveStreamEntries=(e,t)=>{const g=e.getSnapshot(),n=Array.isArray(g?.buffer)?g.buffer:[];if(0===n.length)return{entries:[],lastProcessedStreamId:-1};const C=n.filter(e=>e.id>t);return{entries:C,lastProcessedStreamId:C.length>0?C[C.length-1].id:t}},createPlayStatsController=({adapter:e,now:t,persistence:g=createPlayStatsPersistence({adapter:e}),streamModel:n}={})=>{const C=createPlayStatsModel({persistedGameStats:g?.read?.(),now:t}),I=[];let o=-1,a=!1;if(g&&"function"==typeof g.write&&I.push(C.subscribePersistence(e=>{g.write(e)})),e&&"function"==typeof e.on&&(I.push(e.on("Char.Status",C.handleStatus)),I.push(e.on("IRE.Misc.Achievement",t=>{C.handleAchievement(t)?.requestGoldCap&&"function"==typeof e.send&&e.send("goldcap")})),I.push(e.on("IRE.Time.List",C.handleTimeList))),n&&"function"==typeof n.subscribe&&"function"==typeof n.getSnapshot){const processStreamSnapshot=()=>{const e=resolveStreamEntries(n,o);o=e.lastProcessedStreamId,C.processStreamEntries(e.entries)};I.push(n.subscribe(processStreamSnapshot))}return{destroy:()=>{a||(a=!0,I.splice(0).forEach(safeUnsubscribe))},model:C}},_t=(0,l.createContext)(null),useNexGui=()=>{const e=(0,l.useContext)(_t);if(null===e)throw new Error("useNexGui must be used inside NexGuiContext.Provider");return e},NexGuiMountRoot=()=>null,createReactMountLifecycle=({contextValue:e,RootComponent:t=NexGuiMountRoot}={})=>{const n=new Map;let C=!1;const unmountContainer=e=>{const t=n.get(e);t&&(n.delete(e),t.unmount())},mount=I=>{if(C)throw new Error("[nexGui4] Cannot mount a destroyed nexGui instance.");if(!I||"object"!=typeof I||1!==I.nodeType)throw new TypeError("[nexGui4] mount(container) requires a DOM element container.");unmountContainer(I);const o=(0,g.createRoot)(I);return n.set(I,o),o.render((0,l.createElement)(_t.Provider,{value:e},(0,l.createElement)(t))),{unmount:()=>{unmountContainer(I)}}},destroy=()=>{if(!C){C=!0;for(const e of[...n.keys()])unmountContainer(e)}};return Object.freeze({mount,destroy,isMounted:()=>n.size>0})},NOOP$1=()=>{},normalizeCommand=e=>"function"==typeof e?e:NOOP$1,createPlatformTabsController=()=>{let e=NOOP$1,t=NOOP$1,g=NOOP$1,n=NOOP$1,C=NOOP$1,hasSavedLayout=()=>!1;const resetNativeDisplayCommands=()=>{e=NOOP$1,t=NOOP$1},resetLayoutCommands=()=>{g=NOOP$1,n=NOOP$1,C=NOOP$1,hasSavedLayout=()=>!1};return Object.freeze({mountNativeDisplay:(...t)=>e(...t),unmountNativeDisplay:(...e)=>t(...e),configureNativeDisplayCommands:(g={})=>{const n=normalizeCommand(g.mountNativeDisplay),C=normalizeCommand(g.unmountNativeDisplay);return e=n,t=C,()=>{e===n&&t===C&&resetNativeDisplayCommands()}},resetNativeDisplayCommands,applyLayoutPreset:(...e)=>g(...e),saveLayout:(...e)=>n(...e),restoreLayout:(...e)=>C(...e),hasSavedLayout:(...e)=>hasSavedLayout(...e),configureLayoutCommands:(e={})=>{const t=normalizeCommand(e.applyLayoutPreset),I=normalizeCommand(e.saveLayout),o=normalizeCommand(e.restoreLayout),a="function"==typeof e.hasSavedLayout?e.hasSavedLayout:()=>!1;return g=t,n=I,C=o,hasSavedLayout=a,()=>{g===t&&n===I&&C===o&&hasSavedLayout===a&&resetLayoutCommands()}},resetLayoutCommands})};U(!1);var qt="4.0.0",resolveRuntimePorts=(e={})=>{const t=createBrowserRuntimePorts(),g=e&&"object"==typeof e?e:{};return Object.freeze({...t,...g})},resolveConfiguredDefenceList=e=>normalizeConfiguredDefenceList(e.getConfiguredDefences?.()),seedInitialDisplayTheme=({adapter:e,persistenceStore:t})=>{if(void 0!==e.getVariable("nexGui4Settings")?.settings)return;const g=e.getHostSettings?.()??{},n=t.get("theme");t.set("theme",{...n,displayFontFamily:readHostDisplayFontFamily(g),displayFontSize:readHostDisplayFontSize(g)})},withRelationshipCommandTracking=(e,t)=>{const g=assertAdapterContract(e);if(!t||"function"!=typeof t.trackRelationshipCommand)return g;const n=Object.create(g),C=g.send.bind(g);return Object.defineProperty(n,"send",{value:e=>(t.trackRelationshipCommand(e),C(e)),enumerable:!0}),assertAdapterContract(n)},resolveAdapter=({adapter:e,playerRelationships:t}={})=>withRelationshipCommandTracking(e??createNexusAdapter(),t),createNexGui=({adapter:e,debugEnabled:t=!1,traceLimit:g=500,autoStart:n=!0,playerDirectory:C,playerRelationships:I,startupPhaseHandlers:o,remoteService:a,runtimePorts:i}={})=>{const s=resolveRuntimePorts(i),l=I??createPlayerRelationshipsModel(),c=resolveAdapter({adapter:e,playerRelationships:l}),u=createEventBus({label:"nexgui4",debugEnabled:t,traceLimit:g}),d=C??createPlayerDirectoryModel({fetchImpl:s.fetch,now:s.now}),p=createPlayerDirectoryDiagnosticsModel({now:s.now}),m=createPlayerDirectoryLifecycle({playerDirectory:d,diagnostics:p,readCache:()=>(c.getVariable("nexGui4Settings")||{})[Te.PLAYER_DIRECTORY],writeCache:(e,t)=>{const g=c.getVariable("nexGui4Settings")||{};g[Te.PLAYER_DIRECTORY]=t,c.setVariable(Me,g)}}),h=createPlatformTabsController(),y=createHostDisplaySettingsModel({eventBus:u,readHostSettings:()=>c.getHostSettings?.()??{}}),b=createHostSettingsModel({eventBus:u,readHostSettings:()=>c.getHostSettings?.()??{}}),v=createHostLayoutModel({eventBus:u,readHostLayout:()=>c.getHostLayoutSnapshot?.()??{}}),x=createTimerModel({eventBus:u,now:s.now,setTimer:s.setTimeout,clearTimer:s.clearTimeout}),S=createScrollbackSessionStore({storage:createIndexedDbManager(),setTimeoutFn:s.setTimeout,clearTimeoutFn:s.clearTimeout,logger:console}),w=createStreamModel({onAppend:e=>S.append(e),onClear:()=>{S.clear().catch(e=>{console.error("[nexGui4] Failed to clear scrollback session.",e)})}}),E=createTranscriptModel({cap:5e3}),R=createTranscriptModel({cap:5e3}),M=createStatsModel({eventBus:u}),T=createPartyModel({eventBus:u}),P=createRoomModel({eventBus:u}),N=createCharacterModel({eventBus:u}),D=createDefenceModel({eventBus:u}),O=createFeedModel({cap:5e3}),j=createClassBalanceController(),G=createRoomOccupantsModel({roomModel:P,playerDirectory:d}),L=createPlayStatsController({adapter:c,streamModel:w,now:s.now}),B=createPartyAutomationModel({characterModel:N,partyModel:T,playerDirectory:d,sendCommand:e=>c.send(e)}),F=resolveConfiguredDefenceList(c),W=createPersistenceStore({adapter:c,sliceKey:Te.SETTINGS});seedInitialDisplayTheme({adapter:c,persistenceStore:W});const V=createPersistenceStore({adapter:c,sliceKey:Te.UI,schema:De,migrate:migrateUiPersistence});for(const[$,te]of Object.entries(W.get("party")))T.setSetting($,te);u.on($.PARTY_UPDATED,({settings:e})=>{W.set("party",e)});const U=createGmcpIngressController({adapter:c,eventBus:u,timerModel:x,streamModel:w,systemStreamModel:E,combatStreamModel:R,statsModel:M,partyModel:T,roomModel:P,characterModel:N,defenceModel:D,classBalanceController:j,playerDirectory:d,roomOccupantsModel:G,partyAutomationModel:B}),K=createDefenceStore({defenceModel:D,eventBus:u,configuredDefences:F}),H=Object.freeze({timers:createTimerStore({timerModel:x,eventBus:u}),stream:w,stats:createStatsStore({statsModel:M,eventBus:u}),party:createPartyStore({partyModel:T,eventBus:u}),room:createRoomStore({roomModel:P,eventBus:u}),character:createCharacterStore({characterModel:N,eventBus:u}),defence:K,theme:createThemeStore({eventBus:u,persistenceStore:W}),ui:createUiStore({persistenceStore:W}),feed:createFeedStore({feedModel:O}),playStats:createPlayStatsStore({playStatsModel:L.model}),systemStream:E,combatStream:R}),Y=registerGmcpBindings({adapter:c,eventBus:u,playerDirectory:d,playerDirectoryLifecycle:m,playerRelationships:l,playerDirectoryDiagnostics:p,remoteService:a,fetchFn:s.fetch}),Z={adapter:c,eventBus:u,hostDisplaySettingsModel:y,hostSettingsModel:b,hostLayoutModel:v,playerDirectory:d,playerDirectoryLifecycle:m,playerDirectoryDiagnostics:p,playerRelationships:l,stores:H,streamModel:w,scrollbackSession:S,persistenceStore:W,scrollbackLayoutStore:V,platformTabs:h,formatInlineNames:e=>highlightInlineNamesInText(e,{contextValue:Z})},Q=createReactMountLifecycle({contextValue:Z});let X=!1,_=null;const initializeScrollbackSession=async()=>{try{if(await S.initialize(),X)return;await S.clear()}catch(e){if(X)return;console.warn("[nexGui4] Scrollback session startup degraded; continuing.",e)}},q=createStartupOrchestrator({adapter:c,eventBus:u,phaseHandlers:{...o,[lt.PREPARING]:async e=>{await initializeScrollbackSession(),await(o?.[lt.PREPARING]?.(e))}},setTimeoutFn:s.setTimeout,clearTimeoutFn:s.clearTimeout}),startRuntime=()=>(_??=q.start(),_.catch(()=>{}),_),mount=e=>{if(X)throw new Error("[nexGui4] Cannot mount a destroyed nexGui instance.");return Q.mount(e)},destroy=()=>{X||(X=!0,Q.destroy(),q.destroy(),y.destroy(),b.destroy(),v.destroy(),Y?.(),U.destroy(),L.destroy(),H.playStats.destroy?.(),u.emit($.SYSTEM_DESTROYED,{version:qt}),x.destroy(),O.destroy(),T.destroy(),P.destroy(),M.destroy(),N.destroy(),D.destroy(),L.model.destroy(),j.destroy(),S.destroy(),m.destroy?.(),d.destroy?.(),l.destroy?.(),clearRelationshipNameFormatterCache(Z),clearMessageReplacementContextCache(),h.resetNativeDisplayCommands(),h.resetLayoutCommands(),c.destroy(),u.clear())},J=composePublicApi({version:qt,startupOrchestrator:q,isMounted:()=>Q.isMounted(),character:{characterModel:N,setTarget:e=>{c.setTarget(e)}},timerModel:x,players:{playerDirectory:d,getPlayer:d.getPlayerProfile,listPlayers:d.getAllPlayerProfiles,getPlayerColor:d.getPlayerColor,refreshPlayer:d.refreshPlayerProfile},colors:{cityPalette:ye,iconHtml:(e,t,g)=>buildIconHtml(e,t,g,s.getPublicDualToneIcons?.()??null)},customize:{getConfiguredDefences:()=>H.defence.getState().configuredDefences,setConfiguredDefences:e=>(H.defence.getState().setConfiguredDefences(normalizeConfiguredDefenceList(e)),H.defence.getState().configuredDefences),classBalanceController:j,setClassBalanceType:e=>{const t=j.setType(e);return N.update(t),j.getType()},mountNativeDisplay:()=>h.mountNativeDisplay(),unmountNativeDisplay:()=>h.unmountNativeDisplay()},layout:{presetIds:Nt,applyPreset:e=>h.applyLayoutPreset(e),saveLayout:()=>h.saveLayout(),restoreLayout:()=>h.restoreLayout(),hasSavedLayout:()=>h.hasSavedLayout()},party:{partyModel:T,getSnapshot:()=>T.snapshot()},room:{roomModel:P,setItemOverride:setUserRoomItemOverride,removeItemOverride:removeUserRoomItemOverride,listItemOverrides:listUserRoomItemOverrides,getItemOverride:getUserRoomItemOverride},stats:{playStatsModel:L.model},stream:{systemStream:H.systemStream,combatStream:H.combatStream}}),ee={version:qt,mount,stores:H,debug:{getEventTrace:()=>u.getTrace(),setDebugEnabled:e=>u.setDebugEnabled(e),stream:{getStats:()=>({...w.getStats(),scrollbackSession:S.getStats()}),getScrollbackStats:()=>S.getStats(),getDbStats:async()=>{try{const e=await S.readAll(),t=S.getStats();return{fallback:t.storageFallback,count:e.length,firstId:e[0]?.id,lastId:e[e.length-1]?.id,scrollbackSession:t}}catch(e){return{error:e.message}}}},playerDirectory:{getSnapshot:()=>p.getPlayerDirectoryDiagnosticsSnapshot()}},destroy};return Object.defineProperty(ee,"state",{enumerable:!0,get:()=>J.state}),Object.defineProperty(ee,"api",{value:J.api,enumerable:!0}),Object.defineProperty(ee,"__contextValue",{value:Z,enumerable:!1}),Object.defineProperty(ee,"__start",{value:startRuntime,enumerable:!1}),n&&startRuntime(),ee};function formatMuiErrorMessage(e,...t){const g=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>g.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${g} for the full message.`}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var g=arguments[t];for(var n in g)({}).hasOwnProperty.call(g,n)&&(e[n]=g[n])}return e},_extends.apply(null,arguments)}var Jt=!1;function sheetForTag(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function createStyleElement(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var $t=function(){function StyleSheet(e){var t=this;this._insertTag=function(e){var g;g=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,g),t.tags.push(e)},this.isSpeedy=void 0===e.speedy?!Jt:e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var e=StyleSheet.prototype;return e.hydrate=function(e){e.forEach(this._insertTag)},e.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(createStyleElement(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var g=sheetForTag(t);try{g.insertRule(e,g.cssRules.length)}catch(n){}}else t.appendChild(document.createTextNode(e));this.ctr++},e.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},StyleSheet}(),eg="-ms-",tg="-moz-",gg="-webkit-",rg="comm",ng="rule",Ag="decl",Cg="@import",Ig="@keyframes",og="@layer",ag=Math.abs,ig=String.fromCharCode,sg=Object.assign;function hash$2(e,t){return 45^charat(e,0)?(((t<<2^charat(e,0))<<2^charat(e,1))<<2^charat(e,2))<<2^charat(e,3):0}function trim(e){return e.trim()}function match(e,t){return(e=t.exec(e))?e[0]:e}function replace(e,t,g){return e.replace(t,g)}function indexof(e,t){return e.indexOf(t)}function charat(e,t){return 0|e.charCodeAt(t)}function substr(e,t,g){return e.slice(t,g)}function strlen(e){return e.length}function sizeof(e){return e.length}function append(e,t){return t.push(e),e}function combine(e,t){return e.map(t).join("")}var lg=1,cg=1,ug=0,dg=0,pg=0,mg="";function node(e,t,g,n,C,I,o){return{value:e,root:t,parent:g,type:n,props:C,children:I,line:lg,column:cg,length:o,return:""}}function copy(e,t){return sg(node("",null,null,"",null,null,0),e,{length:-e.length},t)}function char(){return pg}function prev(){return pg=dg>0?charat(mg,--dg):0,cg--,10===pg&&(cg=1,lg--),pg}function next(){return pg=dg<ug?charat(mg,dg++):0,cg++,10===pg&&(cg=1,lg++),pg}function peek(){return charat(mg,dg)}function caret(){return dg}function slice(e,t){return substr(mg,e,t)}function token(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(e){return lg=cg=1,ug=strlen(mg=e),dg=0,[]}function dealloc(e){return mg="",e}function delimit(e){return trim(slice(dg-1,delimiter(91===e?e+2:40===e?e+1:e)))}function whitespace(e){for(;(pg=peek())&&pg<33;)next();return token(e)>2||token(pg)>3?"":" "}function escaping(e,t){for(;--t&&next()&&!(pg<48||pg>102||pg>57&&pg<65||pg>70&&pg<97););return slice(e,caret()+(t<6&&32==peek()&&32==next()))}function delimiter(e){for(;next();)switch(pg){case e:return dg;case 34:case 39:34!==e&&39!==e&&delimiter(pg);break;case 40:41===e&&delimiter(e);break;case 92:next()}return dg}function commenter(e,t){for(;next()&&e+pg!==57&&(e+pg!==84||47!==peek()););return"/*"+slice(t,dg-1)+"*"+ig(47===e?e:next())}function identifier(e){for(;!token(peek());)next();return slice(e,dg)}function compile(e){return dealloc(parse("",null,null,null,[""],e=alloc(e),0,[0],e))}function parse(e,t,g,n,C,I,o,a,i){for(var s=0,l=0,c=o,u=0,d=0,p=0,m=1,h=1,y=1,b=0,v="",x=C,S=I,w=n,E=v;h;)switch(p=b,b=next()){case 40:if(108!=p&&58==charat(E,c-1)){-1!=indexof(E+=replace(delimit(b),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:E+=delimit(b);break;case 9:case 10:case 13:case 32:E+=whitespace(p);break;case 92:E+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next(),caret()),t,g),i);break;default:E+="/"}break;case 123*m:a[s++]=strlen(E)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:h=0;case 59+l:-1==y&&(E=replace(E,/\f/g,"")),d>0&&strlen(E)-c&&append(d>32?declaration(E+";",n,g,c-1):declaration(replace(E," ","")+";",n,g,c-2),i);break;case 59:E+=";";default:if(append(w=ruleset(E,t,g,s,l,C,a,v,x=[],S=[],c),I),123===b)if(0===l)parse(E,t,w,w,x,I,c,a,S);else switch(99===u&&110===charat(E,3)?100:u){case 100:case 108:case 109:case 115:parse(e,w,w,n&&append(ruleset(e,w,w,0,0,C,a,v,C,x=[],c),S),C,S,c,a,n?x:S);break;default:parse(E,w,w,w,[""],S,0,a,S)}}s=l=d=0,m=y=1,v=E="",c=o;break;case 58:c=1+strlen(E),d=p;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==prev())continue;switch(E+=ig(b),b*m){case 38:y=l>0?1:(E+="\f",-1);break;case 44:a[s++]=(strlen(E)-1)*y,y=1;break;case 64:45===peek()&&(E+=delimit(next())),u=peek(),l=c=strlen(v=E+=identifier(caret())),b++;break;case 45:45===p&&2==strlen(E)&&(m=0)}}return I}function ruleset(e,t,g,n,C,I,o,a,i,s,l){for(var c=C-1,u=0===C?I:[""],d=sizeof(u),p=0,m=0,h=0;p<n;++p)for(var y=0,b=substr(e,c+1,c=ag(m=o[p])),v=e;y<d;++y)(v=trim(m>0?u[y]+" "+b:replace(b,/&\f/g,u[y])))&&(i[h++]=v);return node(e,t,g,0===C?ng:a,i,s,l)}function comment(e,t,g){return node(e,t,g,rg,ig(char()),substr(e,2,-2),0)}function declaration(e,t,g,n){return node(e,t,g,Ag,substr(e,0,n),substr(e,n+1,-1),n)}function serialize(e,t){for(var g="",n=sizeof(e),C=0;C<n;C++)g+=t(e[C],C,e,t)||"";return g}function stringify(e,t,g,n){switch(e.type){case og:if(e.children.length)break;case Cg:case Ag:return e.return=e.return||e.value;case rg:return"";case Ig:return e.return=e.value+"{"+serialize(e.children,n)+"}";case ng:e.value=e.props.join(",")}return strlen(g=serialize(e.children,n))?e.return=e.value+"{"+g+"}":""}function middleware(e){var t=sizeof(e);return function(g,n,C,I){for(var o="",a=0;a<t;a++)o+=e[a](g,n,C,I)||"";return o}}function rulesheet(e){return function(t){t.root||(t=t.return)&&e(t)}}function memoize(e){var t=Object.create(null);return function(g){return void 0===t[g]&&(t[g]=e(g)),t[g]}}var identifierWithPointTracking=function(e,t,g){for(var n=0,C=0;n=C,C=peek(),38===n&&12===C&&(t[g]=1),!token(C);)next();return slice(e,dg)},toRules=function(e,t){var g=-1,n=44;do{switch(token(n)){case 0:38===n&&12===peek()&&(t[g]=1),e[g]+=identifierWithPointTracking(dg-1,t,g);break;case 2:e[g]+=delimit(n);break;case 4:if(44===n){e[++g]=58===peek()?"&\f":"",t[g]=e[g].length;break}default:e[g]+=ig(n)}}while(n=next());return e},getRules=function(e,t){return dealloc(toRules(alloc(e),t))},fg=new WeakMap,compat=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,g=e.parent,n=e.column===g.column&&e.line===g.line;"rule"!==g.type;)if(!(g=g.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||fg.get(g))&&!n){fg.set(e,!0);for(var C=[],I=getRules(t,C),o=g.props,a=0,i=0;a<I.length;a++)for(var s=0;s<o.length;s++,i++)e.props[i]=C[a]?I[a].replace(/&\f/g,o[s]):o[s]+" "+I[a]}}},removeLabel=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function prefix(e,t){switch(hash$2(e,t)){case 5103:return gg+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return gg+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return gg+e+tg+e+eg+e+e;case 6828:case 4268:return gg+e+eg+e+e;case 6165:return gg+e+eg+"flex-"+e+e;case 5187:return gg+e+replace(e,/(\w+).+(:[^]+)/,gg+"box-$1$2"+eg+"flex-$1$2")+e;case 5443:return gg+e+eg+"flex-item-"+replace(e,/flex-|-self/,"")+e;case 4675:return gg+e+eg+"flex-line-pack"+replace(e,/align-content|flex-|-self/,"")+e;case 5548:return gg+e+eg+replace(e,"shrink","negative")+e;case 5292:return gg+e+eg+replace(e,"basis","preferred-size")+e;case 6060:return gg+"box-"+replace(e,"-grow","")+gg+e+eg+replace(e,"grow","positive")+e;case 4554:return gg+replace(e,/([^-])(transform)/g,"$1"+gg+"$2")+e;case 6187:return replace(replace(replace(e,/(zoom-|grab)/,gg+"$1"),/(image-set)/,gg+"$1"),e,"")+e;case 5495:case 3959:return replace(e,/(image-set\([^]*)/,gg+"$1$`$1");case 4968:return replace(replace(e,/(.+:)(flex-)?(.*)/,gg+"box-pack:$3"+eg+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+gg+e+e;case 4095:case 3583:case 4068:case 2532:return replace(e,/(.+)-inline(.+)/,gg+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen(e)-1-t>6)switch(charat(e,t+1)){case 109:if(45!==charat(e,t+4))break;case 102:return replace(e,/(.+:)(.+)-([^]+)/,"$1"+gg+"$2-$3$1"+tg+(108==charat(e,t+3)?"$3":"$2-$3"))+e;case 115:return~indexof(e,"stretch")?prefix(replace(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==charat(e,t+1))break;case 6444:switch(charat(e,strlen(e)-3-(~indexof(e,"!important")&&10))){case 107:return replace(e,":",":"+gg)+e;case 101:return replace(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gg+(45===charat(e,14)?"inline-":"")+"box$3$1"+gg+"$2$3$1"+eg+"$2box$3")+e}break;case 5936:switch(charat(e,t+11)){case 114:return gg+e+eg+replace(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gg+e+eg+replace(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gg+e+eg+replace(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gg+e+eg+e+e}return e}var hg=[function(e,t,g,n){if(e.length>-1&&!e.return)switch(e.type){case Ag:e.return=prefix(e.value,e.length);break;case Ig:return serialize([copy(e,{value:replace(e.value,"@","@"+gg)})],n);case ng:if(e.length)return combine(e.props,function(t){switch(match(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy(e,{props:[replace(t,/:(read-\w+)/,":"+tg+"$1")]})],n);case"::placeholder":return serialize([copy(e,{props:[replace(t,/:(plac\w+)/,":"+gg+"input-$1")]}),copy(e,{props:[replace(t,/:(plac\w+)/,":"+tg+"$1")]}),copy(e,{props:[replace(t,/:(plac\w+)/,eg+"input-$1")]})],n)}return""})}}],createCache=function(e){var t=e.key;if("css"===t){var g=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(g,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var n,C,I=e.stylisPlugins||hg,o={},a=[];n=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),g=1;g<t.length;g++)o[t[g]]=!0;a.push(e)});var i,s=[compat,removeLabel],l=[stringify,rulesheet(function(e){i.insert(e)})],c=middleware(s.concat(I,l)),stylis=function(e){return serialize(compile(e),c)};C=function(e,t,g,n){i=g,stylis(e?e+"{"+t.styles+"}":t.styles),n&&(u.inserted[t.name]=!0)};var u={key:t,sheet:new $t({key:t,container:n,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:o,registered:{},insert:C};return u.sheet.hydrate(a),u},yg=__commonJSMin(e=>{var t="function"==typeof Symbol&&Symbol.for,g=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,C=t?Symbol.for("react.fragment"):60107,I=t?Symbol.for("react.strict_mode"):60108,o=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,i=t?Symbol.for("react.context"):60110,s=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,c=t?Symbol.for("react.forward_ref"):60112,u=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,h=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,v=t?Symbol.for("react.scope"):60119;function z(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case g:switch(e=e.type){case s:case l:case C:case o:case I:case u:return e;default:switch(e=e&&e.$$typeof){case i:case c:case m:case p:case a:return e;default:return t}}case n:return t}}}function A(e){return z(e)===l}e.AsyncMode=s,e.ConcurrentMode=l,e.ContextConsumer=i,e.ContextProvider=a,e.Element=g,e.ForwardRef=c,e.Fragment=C,e.Lazy=m,e.Memo=p,e.Portal=n,e.Profiler=o,e.StrictMode=I,e.Suspense=u,e.isAsyncMode=function(e){return A(e)||z(e)===s},e.isConcurrentMode=A,e.isContextConsumer=function(e){return z(e)===i},e.isContextProvider=function(e){return z(e)===a},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===g},e.isForwardRef=function(e){return z(e)===c},e.isFragment=function(e){return z(e)===C},e.isLazy=function(e){return z(e)===m},e.isMemo=function(e){return z(e)===p},e.isPortal=function(e){return z(e)===n},e.isProfiler=function(e){return z(e)===o},e.isStrictMode=function(e){return z(e)===I},e.isSuspense=function(e){return z(e)===u},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===C||e===l||e===o||e===I||e===u||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===a||e.$$typeof===i||e.$$typeof===c||e.$$typeof===y||e.$$typeof===b||e.$$typeof===v||e.$$typeof===h)},e.typeOf=z}),bg=__commonJSMin((e,t)=>{t.exports=yg()}),vg=__commonJSMin((e,t)=>{var g=bg(),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},C={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},I={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function getStatics(e){return g.isMemo(e)?o:a[e.$$typeof]||n}a[g.ForwardRef]=I,a[g.Memo]=o;var i=Object.defineProperty,s=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,d=Object.prototype;function hoistNonReactStatics(e,t,g){if("string"!=typeof t){if(d){var n=u(t);n&&n!==d&&hoistNonReactStatics(e,n,g)}var I=s(t);l&&(I=I.concat(l(t)));for(var o=getStatics(e),a=getStatics(t),p=0;p<I.length;++p){var m=I[p];if(!(C[m]||g&&g[m]||a&&a[m]||o&&o[m])){var h=c(t,m);try{i(e,m,h)}catch(y){}}}}return e}t.exports=hoistNonReactStatics}),xg=!0;function getRegisteredStyles(e,t,g){var n="";return g.split(" ").forEach(function(g){void 0!==e[g]?t.push(e[g]+";"):g&&(n+=g+" ")}),n}var registerStyles=function(e,t,g){var n=e.key+"-"+t.name;!1!==g&&!1!==xg||void 0!==e.registered[n]||(e.registered[n]=t.styles)},insertStyles=function(e,t,g){registerStyles(e,t,g);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var C=t;do{e.insert(t===C?"."+n:"",C,e.sheet,!0),C=C.next}while(void 0!==C)}};function murmur2(e){for(var t,g=0,n=0,C=e.length;C>=4;++n,C-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),g=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&g)+(59797*(g>>>16)<<16);switch(C){case 3:g^=(255&e.charCodeAt(n+2))<<16;case 2:g^=(255&e.charCodeAt(n+1))<<8;case 1:g=1540483477*(65535&(g^=255&e.charCodeAt(n)))+(59797*(g>>>16)<<16)}return(((g=1540483477*(65535&(g^=g>>>13))+(59797*(g>>>16)<<16))^g>>>15)>>>0).toString(36)}var Sg={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},wg=!1,Eg=/[A-Z]|^ms/g,Rg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(e){return 45===e.charCodeAt(1)},isProcessableValue=function(e){return null!=e&&"boolean"!=typeof e},kg=memoize(function(e){return isCustomProperty(e)?e:e.replace(Eg,"-$&").toLowerCase()}),processStyleValue=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Rg,function(e,t,g){return Tg={name:t,styles:g,next:Tg},t})}return 1===Sg[e]||isCustomProperty(e)||"number"!=typeof t||0===t?t:t+"px"},Mg="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function handleInterpolation(e,t,g){if(null==g)return"";var n=g;if(void 0!==n.__emotion_styles)return n;switch(typeof g){case"boolean":return"";case"object":var C=g;if(1===C.anim)return Tg={name:C.name,styles:C.styles,next:Tg},C.name;var I=g;if(void 0!==I.styles){var o=I.next;if(void 0!==o)for(;void 0!==o;)Tg={name:o.name,styles:o.styles,next:Tg},o=o.next;return I.styles+";"}return createStringFromObject(e,t,g);case"function":if(void 0!==e){var a=Tg,i=g(e);return Tg=a,handleInterpolation(e,t,i)}}var s=g;if(null==t)return s;var l=t[s];return void 0!==l?l:s}function createStringFromObject(e,t,g){var n="";if(Array.isArray(g))for(var C=0;C<g.length;C++)n+=handleInterpolation(e,t,g[C])+";";else for(var I in g){var o=g[I];if("object"!=typeof o){var a=o;null!=t&&void 0!==t[a]?n+=I+"{"+t[a]+"}":isProcessableValue(a)&&(n+=kg(I)+":"+processStyleValue(I,a)+";")}else{if("NO_COMPONENT_SELECTOR"===I&&wg)throw new Error(Mg);if(!Array.isArray(o)||"string"!=typeof o[0]||null!=t&&void 0!==t[o[0]]){var i=handleInterpolation(e,t,o);switch(I){case"animation":case"animationName":n+=kg(I)+":"+i+";";break;default:n+=I+"{"+i+"}"}}else for(var s=0;s<o.length;s++)isProcessableValue(o[s])&&(n+=kg(I)+":"+processStyleValue(I,o[s])+";")}}return n}var Tg,Pg=/label:\s*([^\s;{]+)\s*(;|$)/g;function serializeStyles(e,t,g){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,C="";Tg=void 0;var I=e[0];null==I||void 0===I.raw?(n=!1,C+=handleInterpolation(g,t,I)):C+=I[0];for(var o=1;o<e.length;o++)C+=handleInterpolation(g,t,e[o]),n&&(C+=I[o]);Pg.lastIndex=0;for(var a,i="";null!==(a=Pg.exec(C));)i+="-"+a[1];return{name:murmur2(C)+i,styles:C,next:Tg}}var Ng,Dg,syncFallback=function(e){return e()},Og=!!t.useInsertionEffect&&t.useInsertionEffect,jg=Og||syncFallback,zg=Og||t.useLayoutEffect,Gg=t.createContext("undefined"!=typeof HTMLElement?createCache({key:"css"}):null),Lg=Gg.Provider,withEmotionCache=function(e){return(0,t.forwardRef)(function(g,n){return e(g,(0,t.useContext)(Gg),n)})},Bg=t.createContext({}),Fg={}.hasOwnProperty,Wg="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",createEmotionProps=function(e,t){var g={};for(var n in t)Fg.call(t,n)&&(g[n]=t[n]);return g[Wg]=e,g},Insertion$1=function(e){var t=e.cache,g=e.serialized,n=e.isStringTag;return registerStyles(t,g,n),jg(function(){return insertStyles(t,g,n)}),null},Vg=withEmotionCache(function(e,g,n){var C=e.css;"string"==typeof C&&void 0!==g.registered[C]&&(C=g.registered[C]);var I=e[Wg],o=[C],a="";"string"==typeof e.className?a=getRegisteredStyles(g.registered,o,e.className):null!=e.className&&(a=e.className+" ");var i=serializeStyles(o,void 0,t.useContext(Bg));a+=g.key+"-"+i.name;var s={};for(var l in e)Fg.call(e,l)&&"css"!==l&&l!==Wg&&(s[l]=e[l]);return s.className=a,n&&(s.ref=n),t.createElement(t.Fragment,null,t.createElement(Insertion$1,{cache:g,serialized:i,isStringTag:"string"==typeof I}),t.createElement(I,s))}),Ug=(vg(),function(e,g){var n=arguments;if(null==g||!Fg.call(g,"css"))return t.createElement.apply(void 0,n);var C=n.length,I=new Array(C);I[0]=Vg,I[1]=createEmotionProps(e,g);for(var o=2;o<C;o++)I[o]=n[o];return t.createElement.apply(null,I)});Ng=Ug||(Ug={}),Dg||(Dg=Ng.JSX||(Ng.JSX={}));var Kg=withEmotionCache(function(e,g){var n=serializeStyles([e.styles],void 0,t.useContext(Bg)),C=t.useRef();return zg(function(){var e=g.key+"-global",t=new g.sheet.constructor({key:e,nonce:g.sheet.nonce,container:g.sheet.container,speedy:g.sheet.isSpeedy}),I=!1,o=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return g.sheet.tags.length&&(t.before=g.sheet.tags[0]),null!==o&&(I=!0,o.setAttribute("data-emotion",e),t.hydrate([o])),C.current=[t,I],function(){t.flush()}},[g]),zg(function(){var e=C.current,t=e[0];e[1]?e[1]=!1:(void 0!==n.next&&insertStyles(g,n.next,!0),t.tags.length&&(t.before=t.tags[t.tags.length-1].nextElementSibling,t.flush()),g.insert("",n,t,!1))},[g,n.name]),null});function css(){for(var e=arguments.length,t=new Array(e),g=0;g<e;g++)t[g]=arguments[g];return serializeStyles(t)}function keyframes(){var e=css.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var Hg=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Yg=!1,Zg=memoize(function(e){return Hg.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),testOmitPropsOnComponent=function(e){return"theme"!==e},getDefaultShouldForwardProp=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Zg:testOmitPropsOnComponent},composeShouldForwardProps=function(e,t,g){var n;if(t){var C=t.shouldForwardProp;n=e.__emotion_forwardProp&&C?function(t){return e.__emotion_forwardProp(t)&&C(t)}:C}return"function"!=typeof n&&g&&(n=e.__emotion_forwardProp),n},Insertion=function(e){var t=e.cache,g=e.serialized,n=e.isStringTag;return registerStyles(t,g,n),jg(function(){return insertStyles(t,g,n)}),null},Qg=function createStyled(e,g){var n,C,I=e.__emotion_real===e,o=I&&e.__emotion_base||e;void 0!==g&&(n=g.label,C=g.target);var a=composeShouldForwardProps(e,g,I),i=a||getDefaultShouldForwardProp(o),s=!i("as");return function(){var l=arguments,c=I&&void 0!==e.__emotion_styles?e.__emotion_styles.slice(0):[];if(void 0!==n&&c.push("label:"+n+";"),null==l[0]||void 0===l[0].raw)c.push.apply(c,l);else{var u=l[0];c.push(u[0]);for(var d=l.length,p=1;p<d;p++)c.push(l[p],u[p])}var m=withEmotionCache(function(e,g,n){var I=s&&e.as||o,l="",u=[],d=e;if(null==e.theme){for(var p in d={},e)d[p]=e[p];d.theme=t.useContext(Bg)}"string"==typeof e.className?l=getRegisteredStyles(g.registered,u,e.className):null!=e.className&&(l=e.className+" ");var m=serializeStyles(c.concat(u),g.registered,d);l+=g.key+"-"+m.name,void 0!==C&&(l+=" "+C);var h=s&&void 0===a?getDefaultShouldForwardProp(I):i,y={};for(var b in e)s&&"as"===b||h(b)&&(y[b]=e[b]);return y.className=l,n&&(y.ref=n),t.createElement(t.Fragment,null,t.createElement(Insertion,{cache:g,serialized:m,isStringTag:"string"==typeof I}),t.createElement(I,y))});return m.displayName=void 0!==n?n:"Styled("+("string"==typeof o?o:o.displayName||o.name||"Component")+")",m.defaultProps=e.defaultProps,m.__emotion_real=m,m.__emotion_base=o,m.__emotion_styles=c,m.__emotion_forwardProp=a,Object.defineProperty(m,"toString",{value:function(){return void 0===C&&Yg?"NO_COMPONENT_SELECTOR":"."+C}}),m.withComponent=function(e,t){return createStyled(e,_extends({},g,t,{shouldForwardProp:composeShouldForwardProps(m,t,!0)})).apply(void 0,c)},m}},Xg=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],_g=Qg.bind(null);Xg.forEach(function(e){_g[e]=_g(e)});var qg,Jg=__commonJSMin((e,t)=>{var g="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=g}),$g=__commonJSMin((e,t)=>{var g=Jg();function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,t.exports=function(){function shim(e,t,n,C,I,o){if(o!==g){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}}),er=__commonJSMin((e,t)=>{t.exports=$g()()}),tr=__commonJSMin(e=>{var t=Symbol.for("react.transitional.element");function jsxProd(e,g,n){var C=null;if(void 0!==n&&(C=""+n),void 0!==g.key&&(C=""+g.key),"key"in g)for(var I in n={},g)"key"!==I&&(n[I]=g[I]);else n=g;return g=n.ref,{$$typeof:t,type:e,key:C,ref:void 0!==g?g:null,props:n}}Symbol.for("react.fragment"),e.jsx=jsxProd,e.jsxs=jsxProd}),gr=__commonJSMin((e,t)=>{t.exports=tr()})(),rr=new Map,nr={insert:void 0},createEmotionCache=(e,t)=>{const g=createCache(e);return g.sheet=new t({key:g.key,nonce:g.sheet.nonce,container:g.sheet.container,speedy:g.sheet.isSpeedy,prepend:g.sheet.prepend,insertionPoint:g.sheet.insertionPoint}),g};if("object"==typeof document&&!(qg=document.querySelector('[name="emotion-insertion-point"]'))){(qg=document.createElement("meta")).setAttribute("name","emotion-insertion-point"),qg.setAttribute("content","");const e=document.querySelector("head");e&&e.prepend(qg)}function getCache(e,t){if(e||t){class g extends $t{insert(e,t){return nr.insert?nr.insert(e,t):(this.key&&this.key.endsWith("global")&&(this.before=qg),super.insert(e,t))}}const n=createEmotionCache({key:"css",insertionPoint:e?qg:void 0},g);if(t){const e=n.insert;n.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),e(...t))}return n}}function StyledEngineProvider(e){const{injectFirst:t,enableCssLayer:g,children:n}=e,C=l.useMemo(()=>{const e=`${t}-${g}`;if("object"==typeof document&&rr.has(e))return rr.get(e);const n=getCache(t,g);return rr.set(e,n),n},[t,g]);return C?(0,gr.jsx)(Lg,{value:C,children:n}):n}function isEmpty$2(e){return null==e||0===Object.keys(e).length}function GlobalStyles$2(e){const{styles:t,defaultTheme:g={}}=e;return(0,gr.jsx)(Kg,{styles:"function"==typeof t?e=>t(isEmpty$2(e)?g:e):t})}function styled$2(e,t){return _g(e,t)}function internal_mutateStyles(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var Ar=[];function internal_serializeStyles(e){return Ar[0]=e,serializeStyles(Ar)}var Cr=__commonJSMin(e=>{Symbol.for("react.transitional.element"),Symbol.for("react.portal");var t=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),I=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),i=Symbol.for("react.suspense_list"),s=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),c=(Symbol.for("react.view_transition"),Symbol.for("react.client.reference"));e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===t||e===n||e===g||e===a||e===i||"object"==typeof e&&null!==e&&(e.$$typeof===l||e.$$typeof===s||e.$$typeof===I||e.$$typeof===C||e.$$typeof===o||e.$$typeof===c||void 0!==e.getModuleId)}}),Ir=__commonJSMin((e,t)=>{t.exports=Cr()})();function isPlainObject(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function deepClone(e){if(l.isValidElement(e)||(0,Ir.isValidElementType)(e)||!isPlainObject(e))return e;const t={};return Object.keys(e).forEach(g=>{t[g]=deepClone(e[g])}),t}function deepmerge(e,t,g={clone:!0}){const n=g.clone?{...e}:e;return isPlainObject(e)&&isPlainObject(t)&&Object.keys(t).forEach(C=>{l.isValidElement(t[C])||(0,Ir.isValidElementType)(t[C])?n[C]=t[C]:isPlainObject(t[C])&&Object.prototype.hasOwnProperty.call(e,C)&&isPlainObject(e[C])?n[C]=deepmerge(e[C],t[C],g):g.clone?n[C]=isPlainObject(t[C])?deepClone(t[C]):t[C]:n[C]=t[C]}),n}var sortBreakpointsValues=e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})};function createBreakpoints(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:g="px",step:n=5,...C}=e,I=sortBreakpointsValues(t),o=Object.keys(I);function up(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${g})`}function down(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${g})`}function between(e,C){const I=o.indexOf(C);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${g}) and (max-width:${(-1!==I&&"number"==typeof t[o[I]]?t[o[I]]:C)-n/100}${g})`}function only(e){return o.indexOf(e)+1<o.length?between(e,o[o.indexOf(e)+1]):up(e)}function not(e){const t=o.indexOf(e);return 0===t?up(o[1]):t===o.length-1?down(o[t]):between(e,o[o.indexOf(e)+1]).replace("@media","@media not all and")}const a=[];for(let i=0;i<o.length;i+=1)a.push(up(o[i]));return{keys:o,values:I,up,down,between,only,not,unit:g,internal_mediaKeys:a,...C}}var or=/min-width:\s*([0-9.]+)/;function sortContainerQueries(e,t){if(!e.containerQueries||!hasContainerQuery(t))return t;const g=[];for(const C in t)C.startsWith("@container")&&g.push(C);g.sort((e,t)=>+(e.match(or)?.[1]||0)-+(t.match(or)?.[1]||0));const n=t;for(let C=0;C<g.length;C+=1){const e=g[C],t=n[e];delete n[e],n[e]=t}return n}function hasContainerQuery(e){for(const t in e)if(t.startsWith("@container"))return!0;return!1}function isCqShorthand(e,t){return"@"===t||t.startsWith("@")&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function getContainerQuery(e,t){const g=t.match(/^@([^/]+)?\/?(.+)?$/);if(!g)return null;const[,n,C]=g,I=Number.isNaN(+n)?n||0:+n;return e.containerQueries(C).up(I)}function cssContainerQueries(e){const toContainerQuery=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function attachCq(t,g){t.up=(...t)=>toContainerQuery(e.breakpoints.up(...t),g),t.down=(...t)=>toContainerQuery(e.breakpoints.down(...t),g),t.between=(...t)=>toContainerQuery(e.breakpoints.between(...t),g),t.only=(...t)=>toContainerQuery(e.breakpoints.only(...t),g),t.not=(...t)=>{const n=toContainerQuery(e.breakpoints.not(...t),g);return n.includes("not all and")?n.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):n}}const t={},containerQueries=e=>(attachCq(t,e),t);return attachCq(containerQueries),{...e,containerQueries}}var ar={borderRadius:4};function isObjectEmpty$2(e){if(null==e)return!0;for(const t in e)return!1;return!0}function fastDeepAssign(e,t){const g=Array.isArray(t),n=Array.isArray(e);return isPrimitive(t)?t:isPrimitiveOrBuiltIn(e)?clone(t):g&&n?mergeArray(e,t):g!==n?clone(t):mergeObject(e,t)}function cloneArray(e){let t=0;const g=e.length,n=new Array(g);for(t=0;t<g;t+=1)n[t]=clone(e[t]);return n}function cloneObject(e){const t={};for(const g in e)t[g]=clone(e[g]);return t}function mergeArray(e,t){const g=e.length;for(let n=0;n<t.length;n+=1)e[g+n]=clone(t[n]);return e}function isMergeableObject(e){return!("object"!=typeof e||null===e||e instanceof RegExp||e instanceof Date)}function isPrimitive(e){return"object"!=typeof e||null===e}function isPrimitiveOrBuiltIn(e){return"object"!=typeof e||null===e||e instanceof RegExp||e instanceof Date}function clone(e){return isMergeableObject(e)?Array.isArray(e)?cloneArray(e):cloneObject(e):e}function mergeObject(e,t){for(const g in t)e[g]=g in e?fastDeepAssign(e[g],t[g]):clone(t[g]);return e}var ir={},sr={xs:0,sm:600,md:900,lg:1200,xl:1536},lr=createBreakpoints({values:sr}),cr={containerQueries:e=>({up:t=>{let g="number"==typeof t?t:sr[t]||t;return"number"==typeof g&&(g=`${g}px`),e?`@container ${e} (min-width:${g})`:`@container (min-width:${g})`}})};function handleBreakpoints(e,t,g){const n={};return iterateBreakpoints(n,e.theme,t,(e,t,C)=>{const I=g(t,C);e?n[e]=I:fastDeepAssign(n,I)})}function iterateBreakpoints(e,t,g,n){if(t??=ir,Array.isArray(g)){const C=t.breakpoints??lr;for(let t=0;t<g.length;t+=1)buildBreakpoint(e,C.up(C.keys[t]),g[t],void 0,n);return e}if("object"==typeof g){const C=t.breakpoints??lr,I=C.values??sr;for(const o in g)if(isCqShorthand(C.keys,o)){const C=getContainerQuery(t.containerQueries?t:cr,o);C&&buildBreakpoint(e,C,g[o],o,n)}else if(o in I)buildBreakpoint(e,C.up(o),g[o],o,n);else{const t=o;e[t]=g[t]}return e}return n(void 0,g),e}function buildBreakpoint(e,t,g,n,C){e[t]??={},C(t,g,n)}function createEmptyBreakpointObject(e=lr){const{internal_mediaKeys:t}=e,g={};for(let n=0;n<t.length;n+=1)g[t[n]]={};return g}function removeUnusedBreakpoints(e,t){const g=e.internal_mediaKeys;for(let n=0;n<g.length;n+=1){const e=g[n];isObjectEmpty$2(t[e])&&delete t[e]}return t}function mergeBreakpointsInOrder(e,...t){return removeUnusedBreakpoints(e,[createEmptyBreakpointObject(e),...t].reduce((e,t)=>deepmerge(e,t),{}))}function computeBreakpointsBase(e,t){if("object"!=typeof e)return{};const g={},n=Object.keys(t);return Array.isArray(e)?n.forEach((t,n)=>{n<e.length&&(g[t]=!0)}):n.forEach(t=>{null!=e[t]&&(g[t]=!0)}),g}function resolveBreakpointValues({values:e,breakpoints:t,base:g}){const n=g||computeBreakpointsBase(e,t),C=Object.keys(n);if(0===C.length)return e;let I;return C.reduce((t,g,n)=>(Array.isArray(e)?(t[g]=null!=e[n]?e[n]:e[I],I=n):"object"==typeof e?(t[g]=null!=e[g]?e[g]:e[I],I=g):t[g]=e,t),{})}function hasBreakpoint(e,t){if(Array.isArray(t))return!0;if("object"==typeof t&&null!==t){for(let n=0;n<e.keys.length;n+=1)if(e.keys[n]in t)return!0;const g=Object.keys(t);for(let t=0;t<g.length;t+=1)if(isCqShorthand(e.keys,g[t]))return!0}return!1}function capitalize(e){if("string"!=typeof e)throw new Error(formatMuiErrorMessage(7));return e.charAt(0).toUpperCase()+e.slice(1)}function getStyleValue2(e,t,g,n){let C;return C="function"==typeof e?e(g):Array.isArray(e)?e[g]||g:"string"==typeof g&&getPath(e,g,!0,n)||g,t&&(C=t(C,g,e)),C}function getPath(e,t,g=!0,n=void 0){if(!e||!t)return null;const C=t.split(".");if(e.vars&&g){const t=getPathImpl(e.vars,C,n);if(null!=t)return t}return getPathImpl(e,C,n)}function getPathImpl(e,t,g=void 0){let n,C=e,I=0;for(;I<t.length;){if(null==C)return C;n=C,C=C[t[I]],I+=1}if(g&&void 0===C){const e=t[t.length-1],C=`${g}${"default"===e?"":capitalize(e)}`;return n?.[C]}return C}function style$2(e){const{prop:t,cssProperty:g=e.prop,themeKey:n,transform:C}=e,fn=e=>{if(null==e[t])return null;const I=e[t],o=getPath(e.theme,n)||{};return handleBreakpoints(e,I,e=>{const n=getStyleValue2(o,C,e,t);return!1===g?n:{[g]:n}})};return fn.propTypes={},fn.filterProps=[t],fn}var ur={internal_cache:{}},dr={m:"margin",p:"padding"},pr={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},mr={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},fr={};for(const gc in dr)fr[gc]=[dr[gc]];for(const gc in dr)for(const e in pr){const t=dr[gc],g=pr[e],n=Array.isArray(g)?g.map(e=>t+e):[t+g];fr[gc+e]=n}for(const gc in mr)fr[gc]=fr[mr[gc]];var hr=new Set(["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"]),yr=new Set(["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"]),br=new Set([...hr,...yr]);function createUnaryUnit(e,t,g,n){const C=getPath(e,t,!0)??g;return"number"==typeof C||"string"==typeof C?e=>"string"==typeof e?e:"string"==typeof C?C.startsWith("var(")&&0===e?0:C.startsWith("var(")&&1===e?C:`calc(${e} * ${C})`:C*e:Array.isArray(C)?e=>{if("string"==typeof e)return e;const t=C[Math.abs(e)];return e>=0?t:"number"==typeof t?-t:"string"==typeof t&&t.startsWith("var(")?`calc(-1 * ${t})`:`-${t}`}:"function"==typeof C?C:()=>{}}function createUnarySpacing(e){return createUnaryUnit(e,"spacing",8,"spacing")}function getValue(e,t){return"string"==typeof t||null==t?t:e(t)}var vr=[""];function style$1(e,t){const g=e.theme??ur,n=g?.internal_cache?.unarySpacing??createUnarySpacing(g),C={};for(const I in e){if(!t.has(I))continue;const g=fr[I]??(vr[0]=I,vr),o=e[I];iterateBreakpoints(C,e.theme,o,(e,t)=>{const I=e?C[e]:C;for(let C=0;C<g.length;C+=1)I[g[C]]=getValue(n,t)})}return C}function margin(e){return style$1(e,hr)}function padding(e){return style$1(e,yr)}function spacing(e){return style$1(e,br)}function createSpacing(e=8,t=createUnarySpacing({spacing:e})){if(e.mui)return e;const spacing=(...e)=>(0===e.length?[1]:e).map(e=>{const g=t(e);return"number"==typeof g?`${g}px`:g}).join(" ");return spacing.mui=!0,spacing}function compose(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(g=>{e[g]=t}),e),{}),fn=e=>{const g={};for(const n in e)t[n]&&fastDeepAssign(g,t[n](e));return g};return fn.propTypes={},fn.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),fn}function borderTransform(e){return"number"!=typeof e?e:`${e}px solid`}function createBorderStyle(e,t){return style$2({prop:e,themeKey:"borders",transform:t})}margin.propTypes={},margin.filterProps=hr,padding.propTypes={},padding.filterProps=yr,spacing.propTypes={},spacing.filterProps=br;var xr=createBorderStyle("border",borderTransform),Sr=createBorderStyle("borderTop",borderTransform),wr=createBorderStyle("borderRight",borderTransform),Er=createBorderStyle("borderBottom",borderTransform),Rr=createBorderStyle("borderLeft",borderTransform),kr=createBorderStyle("borderColor"),Mr=createBorderStyle("borderTopColor"),Tr=createBorderStyle("borderRightColor"),Pr=createBorderStyle("borderBottomColor"),Nr=createBorderStyle("borderLeftColor"),Dr=createBorderStyle("outline",borderTransform),Or=createBorderStyle("outlineColor"),borderRadius=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=createUnaryUnit(e.theme,"shape.borderRadius",4,"borderRadius"),styleFromPropValue=e=>({borderRadius:getValue(t,e)});return handleBreakpoints(e,e.borderRadius,styleFromPropValue)}return null};borderRadius.propTypes={},borderRadius.filterProps=["borderRadius"],compose(xr,Sr,wr,Er,Rr,kr,Mr,Tr,Pr,Nr,borderRadius,Dr,Or);var gap=e=>{if(void 0!==e.gap&&null!==e.gap){const t=createUnaryUnit(e.theme,"spacing",8,"gap"),styleFromPropValue=e=>({gap:getValue(t,e)});return handleBreakpoints(e,e.gap,styleFromPropValue)}return null};gap.propTypes={},gap.filterProps=["gap"];var columnGap=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=createUnaryUnit(e.theme,"spacing",8,"columnGap"),styleFromPropValue=e=>({columnGap:getValue(t,e)});return handleBreakpoints(e,e.columnGap,styleFromPropValue)}return null};columnGap.propTypes={},columnGap.filterProps=["columnGap"];var rowGap=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=createUnaryUnit(e.theme,"spacing",8,"rowGap"),styleFromPropValue=e=>({rowGap:getValue(t,e)});return handleBreakpoints(e,e.rowGap,styleFromPropValue)}return null};function paletteTransform(e,t){return"grey"===t?t:e}function sizingTransform(e){return e<=1&&0!==e?100*e+"%":e}rowGap.propTypes={},rowGap.filterProps=["rowGap"],compose(gap,columnGap,rowGap,style$2({prop:"gridColumn"}),style$2({prop:"gridRow"}),style$2({prop:"gridAutoFlow"}),style$2({prop:"gridAutoColumns"}),style$2({prop:"gridAutoRows"}),style$2({prop:"gridTemplateColumns"}),style$2({prop:"gridTemplateRows"}),style$2({prop:"gridTemplateAreas"}),style$2({prop:"gridArea"})),compose(style$2({prop:"color",themeKey:"palette",transform:paletteTransform}),style$2({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:paletteTransform}),style$2({prop:"backgroundColor",themeKey:"palette",transform:paletteTransform}));var jr=style$2({prop:"width",transform:sizingTransform}),maxWidth=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const styleFromPropValue=t=>{const g=e.theme?.breakpoints?.values?.[t]||sr[t];return g?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${g}${e.theme.breakpoints.unit}`}:{maxWidth:g}:{maxWidth:sizingTransform(t)}};return handleBreakpoints(e,e.maxWidth,styleFromPropValue)}return null};maxWidth.filterProps=["maxWidth"];var zr=style$2({prop:"minWidth",transform:sizingTransform}),Gr=style$2({prop:"height",transform:sizingTransform}),Lr=style$2({prop:"maxHeight",transform:sizingTransform}),Br=style$2({prop:"minHeight",transform:sizingTransform}),Fr=(style$2({prop:"size",cssProperty:"width",transform:sizingTransform}),style$2({prop:"size",cssProperty:"height",transform:sizingTransform}),compose(jr,maxWidth,zr,Gr,Lr,Br,style$2({prop:"boxSizing"})),{border:{themeKey:"borders",transform:borderTransform},borderTop:{themeKey:"borders",transform:borderTransform},borderRight:{themeKey:"borders",transform:borderTransform},borderBottom:{themeKey:"borders",transform:borderTransform},borderLeft:{themeKey:"borders",transform:borderTransform},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:borderTransform},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:borderRadius},color:{themeKey:"palette",transform:paletteTransform},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:paletteTransform},backgroundColor:{themeKey:"palette",transform:paletteTransform},p:{style:padding},pt:{style:padding},pr:{style:padding},pb:{style:padding},pl:{style:padding},px:{style:padding},py:{style:padding},padding:{style:padding},paddingTop:{style:padding},paddingRight:{style:padding},paddingBottom:{style:padding},paddingLeft:{style:padding},paddingX:{style:padding},paddingY:{style:padding},paddingInline:{style:padding},paddingInlineStart:{style:padding},paddingInlineEnd:{style:padding},paddingBlock:{style:padding},paddingBlockStart:{style:padding},paddingBlockEnd:{style:padding},m:{style:margin},mt:{style:margin},mr:{style:margin},mb:{style:margin},ml:{style:margin},mx:{style:margin},my:{style:margin},margin:{style:margin},marginTop:{style:margin},marginRight:{style:margin},marginBottom:{style:margin},marginLeft:{style:margin},marginX:{style:margin},marginY:{style:margin},marginInline:{style:margin},marginInlineStart:{style:margin},marginInlineEnd:{style:margin},marginBlock:{style:margin},marginBlockStart:{style:margin},marginBlockEnd:{style:margin},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:gap},rowGap:{style:rowGap},columnGap:{style:columnGap},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:sizingTransform},maxWidth:{style:maxWidth},minWidth:{transform:sizingTransform},height:{transform:sizingTransform},maxHeight:{transform:sizingTransform},minHeight:{transform:sizingTransform},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}}),Wr={};function unstable_createStyleFunctionSx(){function styleFunctionSx(e){if(!e.sx)return null;const{sx:t,theme:g=Wr,nested:n}=e,C=g.unstable_sxConfig??Fr,I={sx:null,theme:g,nested:!0};function process(t){let o=t;if("function"==typeof t)o=t(g);else if("object"!=typeof t)return t;if(!o)return null;const a=g.breakpoints??lr,i=createEmptyBreakpointObject(a);for(const n in o){const t=callIfFn(o[n],g);null!=t&&("object"==typeof t?C[n]?setThemeValue(i,n,t,g,C):hasBreakpoint(a,t)?iterateBreakpoints(i,e.theme,t,(e,t)=>{i[e][n]=t}):(I.sx=t,i[n]=styleFunctionSx(I)):setThemeValue(i,n,t,g,C))}return!n&&g.modularCssLayers?{"@layer sx":sortContainerQueries(g,removeUnusedBreakpoints(a,i))}:sortContainerQueries(g,removeUnusedBreakpoints(a,i))}return Array.isArray(t)?t.map(process):process(t)}return styleFunctionSx.filterProps=["sx"],styleFunctionSx}var Vr=unstable_createStyleFunctionSx();function setThemeValue(e,t,g,n,C){const I=C[t];if(!I)return void(e[t]=g);if(null==g)return;const{themeKey:o}=I;if("typography"===o&&"inherit"===g)return void(e[t]=g);const{style:a}=I;if(a)return void fastDeepAssign(e,a({[t]:g,theme:n}));const{cssProperty:i=t,transform:s}=I,l=getPath(n,o);iterateBreakpoints(e,n,g,(g,n)=>{const C=getStyleValue2(l,s,n,t);!1===i?fastDeepAssign(g?e[g]:e,C):g?e[g][i]=C:e[i]=C})}function callIfFn(e,t){return"function"==typeof e?e(t):e}function applyStyles$1(e,t){const g=this;if(g.vars){if(!g.colorSchemes?.[e]||"function"!=typeof g.getColorSchemeSelector)return{};let n=g.getColorSchemeSelector(e);return"&"===n?t:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:t})}return g.palette.mode===e?t:{}}function createTheme$1(e={},...t){const{breakpoints:g={},palette:n={},spacing:C,shape:I={},...o}=e;let a=deepmerge({breakpoints:createBreakpoints(g),direction:"ltr",components:{},palette:{mode:"light",...n},spacing:createSpacing(C),shape:{...ar,...I}},o);return a=cssContainerQueries(a),a.applyStyles=applyStyles$1,a=t.reduce((e,t)=>deepmerge(e,t),a),a.unstable_sxConfig={...Fr,...o?.unstable_sxConfig},a.unstable_sx=function(e){return Vr({sx:e,theme:this})},a.internal_cache={},a}function isObjectEmpty$1(e){return 0===Object.keys(e).length}function useTheme$4(e=null){const t=l.useContext(Bg);return!t||isObjectEmpty$1(t)?e:t}var Ur=createTheme$1();function useTheme$3(e=Ur){return useTheme$4(e)}function wrapGlobalLayer(e){const t=internal_serializeStyles(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function GlobalStyles$1({styles:e,themeId:t,defaultTheme:g={}}){const n=useTheme$3(g),C=t&&n[t]||n;let I="function"==typeof e?e(C):e;return C.modularCssLayers&&(I=Array.isArray(I)?I.map(e=>wrapGlobalLayer("function"==typeof e?e(C):e)):wrapGlobalLayer(I)),(0,gr.jsx)(GlobalStyles$2,{styles:I})}var defaultGenerator=e=>e,Kr=(()=>{let e=defaultGenerator;return{configure(t){e=t},generate:t=>e(t),reset(){e=defaultGenerator}}})();function r(e){var t,g,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var C=e.length;for(t=0;t<C;t++)e[t]&&(g=r(e[t]))&&(n&&(n+=" "),n+=g)}else for(g in e)e[g]&&(n&&(n+=" "),n+=g);return n}function clsx(){for(var e,t,g=0,n="",C=arguments.length;g<C;g++)(e=arguments[g])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}function createBox(e={}){const{themeId:t,defaultTheme:g,defaultClassName:n="MuiBox-root",generateClassName:C}=e,I=styled$2("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Vr);return l.forwardRef(function(e,o){const a=useTheme$3(g),{className:i,component:s="div",...l}=e;return(0,gr.jsx)(I,{as:s,ref:o,className:clsx(i,C?C(n):n),theme:t&&a[t]||a,...l})})}var Hr={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function generateUtilityClass(e,t,g="Mui"){const n=Hr[t];return n?`${g}-${n}`:`${Kr.generate(e)}-${t}`}function generateUtilityClasses(e,t,g="Mui"){const n={};return t.forEach(t=>{n[t]=generateUtilityClass(e,t,g)}),n}function preprocessStyles(e){const{variants:t,...g}=e,n={variants:t,style:internal_serializeStyles(g),isProcessed:!0};return n.style===g||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=internal_serializeStyles(e.style))}),n}var Yr=createTheme$1();function shouldForwardProp(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function shallowLayer(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function defaultOverridesResolver(e){return e?(t,g)=>g[e]:null}function attachTheme(e,t,g){e.theme=isObjectEmpty$2(e.theme)?g:e.theme[t]||e.theme}function processStyle(e,t,g){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap(t=>processStyle(e,t,g));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=g?shallowLayer(n.style,g):n.style;else{const{variants:e,...C}=n;t=g?shallowLayer(internal_serializeStyles(C),g):C}return processStyleVariants(e,n.variants,[t],g)}return n?.isProcessed?g?shallowLayer(internal_serializeStyles(n.style),g):n.style:g?shallowLayer(internal_serializeStyles(n),g):n}function processStyleVariants(e,t,g=[],n=void 0){let C;e:for(let I=0;I<t.length;I+=1){const o=t[I];if("function"==typeof o.props){if(C??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(C))continue}else for(const t in o.props)if(e[t]!==o.props[t]&&e.ownerState?.[t]!==o.props[t])continue e;"function"==typeof o.style?(C??={...e,...e.ownerState,ownerState:e.ownerState},g.push(n?shallowLayer(internal_serializeStyles(o.style(C)),n):o.style(C))):g.push(n?shallowLayer(internal_serializeStyles(o.style),n):o.style)}return g}function createStyled(e={}){const{themeId:t,defaultTheme:g=Yr,rootShouldForwardProp:n=shouldForwardProp,slotShouldForwardProp:C=shouldForwardProp}=e;function styleAttachTheme(e){attachTheme(e,t,g)}const styled=(e,t={})=>{internal_mutateStyles(e,e=>e.filter(e=>e!==Vr));const{name:g,slot:I,skipVariantsResolver:o,skipSx:a,overridesResolver:i=defaultOverridesResolver(lowercaseFirstLetter(I)),...s}=t,l=g&&g.startsWith("Mui")||I?"components":"custom",c=void 0!==o?o:I&&"Root"!==I&&"root"!==I||!1,u=a||!1;let d=shouldForwardProp;"Root"===I||"root"===I?d=n:I?d=C:isStringTag(e)&&(d=void 0);const p=styled$2(e,{shouldForwardProp:d,label:generateStyledLabel(g,I),...s}),transformStyle=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return processStyle(t,e,t.theme.modularCssLayers?l:void 0)};if(isPlainObject(e)){const t=preprocessStyles(e);return function(e){return t.variants?processStyle(e,t,e.theme.modularCssLayers?l:void 0):e.theme.modularCssLayers?shallowLayer(t.style,l):t.style}}return e},muiStyledResolver=(...t)=>{const n=[],C=t.map(transformStyle),I=[];if(n.push(styleAttachTheme),g&&i&&I.push(function(e){const t=e.theme.components?.[g]?.styleOverrides;if(!t)return null;const n={};for(const g in t)n[g]=processStyle(e,t[g],e.theme.modularCssLayers?"theme":void 0);return i(e,n)}),g&&!c&&I.push(function(e){const t=e.theme?.components?.[g]?.variants;return t?processStyleVariants(e,t,[],e.theme.modularCssLayers?"theme":void 0):null}),u||I.push(Vr),Array.isArray(C[0])){const e=C.shift(),t=new Array(n.length).fill(""),g=new Array(I.length).fill("");let o;o=[...t,...e,...g],o.raw=[...t,...e.raw,...g],n.unshift(o)}const o=p(...n,...C,...I);return e.muiName&&(o.muiName=e.muiName),o};return p.withConfig&&(muiStyledResolver.withConfig=p.withConfig),muiStyledResolver};return styled}function generateStyledLabel(e,t){}function isStringTag(e){return"string"==typeof e&&e.charCodeAt(0)>96}function lowercaseFirstLetter(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}var Zr=createStyled();function resolveProps(e,t,g=!1){const n={...t};for(const C in e)if(Object.prototype.hasOwnProperty.call(e,C)){const I=C;if("components"===I||"slots"===I)n[I]={...e[I],...n[I]};else if("componentsProps"===I||"slotProps"===I){const C=e[I],o=t[I];if(o)if(C){n[I]={...o};for(const e in C)if(Object.prototype.hasOwnProperty.call(C,e)){const t=e;n[I][t]=resolveProps(C[t],o[t],g)}}else n[I]=o;else n[I]=C||{}}else"className"===I&&g&&void 0!==t.className?n.className=clsx(e?.className,t?.className):"style"===I&&g&&t.style?n.style={...e?.style,...t?.style}:void 0===n[I]&&(n[I]=e[I])}return n}function getThemeProps$1(e){const{theme:t,name:g,props:n}=e;return t&&t.components&&t.components[g]&&t.components[g].defaultProps?resolveProps(t.components[g].defaultProps,n):n}function useThemeProps({props:e,name:t,defaultTheme:g,themeId:n}){let C=useTheme$3(g);return n&&(C=C[n]||C),getThemeProps$1({theme:C,name:t,props:e})}var Qr="undefined"!=typeof window?l.useLayoutEffect:l.useEffect;function clamp$2(e,t=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,g))}function clampWrapper(e,t=0,g=1){return clamp$2(e,t,g)}function hexToRgb(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let g=e.match(t);return g&&1===g[0].length&&(g=g.map(e=>e+e)),g?`rgb${4===g.length?"a":""}(${g.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}function decomposeColor(e){if(e.type)return e;if("#"===e.charAt(0))return decomposeColor(hexToRgb(e));const t=e.indexOf("("),g=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(g))throw new Error(formatMuiErrorMessage(9,e));let n,C=e.substring(t+1,e.length-1);if("color"===g){if(C=C.split(" "),n=C.shift(),4===C.length&&"/"===C[3].charAt(0)&&(C[3]=C[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(n))throw new Error(formatMuiErrorMessage(10,n))}else C=C.split(",");return C=C.map(e=>parseFloat(e)),{type:g,values:C,colorSpace:n}}var colorChannel=e=>{const t=decomposeColor(e);return t.values.slice(0,3).map((e,g)=>t.type.includes("hsl")&&0!==g?`${e}%`:e).join(" ")},private_safeColorChannel=(e,t)=>{try{return colorChannel(e)}catch(g){return e}};function recomposeColor(e){const{type:t,colorSpace:g}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((e,t)=>t<3?parseInt(e,10):e):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),n=t.includes("color")?`${g} ${n.join(" ")}`:`${n.join(", ")}`,`${t}(${n})`}function hslToRgb(e){e=decomposeColor(e);const{values:t}=e,g=t[0],n=t[1]/100,C=t[2]/100,I=n*Math.min(C,1-C),f=(e,t=(e+g/30)%12)=>C-I*Math.max(Math.min(t-3,9-t,1),-1);let o="rgb";const a=[Math.round(255*f(0)),Math.round(255*f(8)),Math.round(255*f(4))];return"hsla"===e.type&&(o+="a",a.push(t[3])),recomposeColor({type:o,values:a})}function getLuminance(e){let t="hsl"===(e=decomposeColor(e)).type||"hsla"===e.type?decomposeColor(hslToRgb(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function getContrastRatio(e,t){const g=getLuminance(e),n=getLuminance(t);return(Math.max(g,n)+.05)/(Math.min(g,n)+.05)}function alpha(e,t){return e=decomposeColor(e),t=clampWrapper(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,recomposeColor(e)}function private_safeAlpha(e,t,g){try{return alpha(e,t)}catch(n){return e}}function darken(e,t){if(e=decomposeColor(e),t=clampWrapper(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let g=0;g<3;g+=1)e.values[g]*=1-t;return recomposeColor(e)}function private_safeDarken(e,t,g){try{return darken(e,t)}catch(n){return e}}function lighten(e,t){if(e=decomposeColor(e),t=clampWrapper(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let g=0;g<3;g+=1)e.values[g]+=(255-e.values[g])*t;else if(e.type.includes("color"))for(let g=0;g<3;g+=1)e.values[g]+=(1-e.values[g])*t;return recomposeColor(e)}function private_safeLighten(e,t,g){try{return lighten(e,t)}catch(n){return e}}function emphasize(e,t=.15){return getLuminance(e)>.5?darken(e,t):lighten(e,t)}function private_safeEmphasize(e,t,g){try{return emphasize(e,t)}catch(n){return e}}var Xr=l.createContext(null);function useTheme$2(){return l.useContext(Xr)}var _r="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function mergeOuterLocalTheme(e,t){return"function"==typeof t?t(e):{...e,...t}}function ThemeProvider$2(e){const{children:t,theme:g}=e,n=useTheme$2(),C=l.useMemo(()=>{const e=null===n?{...g}:mergeOuterLocalTheme(n,g);return null!=e&&(e[_r]=null!==n),e},[g,n]);return(0,gr.jsx)(Xr.Provider,{value:C,children:t})}var qr=l.createContext();function RtlProvider({value:e,...t}){return(0,gr.jsx)(qr.Provider,{value:e??!0,...t})}var useRtl=()=>l.useContext(qr)??!1,Jr=l.createContext(void 0);function DefaultPropsProvider({value:e,children:t}){return(0,gr.jsx)(Jr.Provider,{value:e,children:t})}function getThemeProps(e){const{theme:t,name:g,props:n}=e;if(!t||!t.components||!t.components[g])return n;const C=t.components[g];return C.defaultProps?resolveProps(C.defaultProps,n,t.components.mergeClassNameAndStyle):C.styleOverrides||C.variants?n:resolveProps(C,n,t.components.mergeClassNameAndStyle)}function useDefaultProps$1({props:e,name:t}){return getThemeProps({props:e,name:t,theme:{components:l.useContext(Jr)}})}var $r=0;function useGlobalId(e){const[t,g]=l.useState(e),n=e||t;return l.useEffect(()=>{null==t&&g(`mui-${$r+=1}`)},[t]),n}var en={...l}.useId;function useId$1(e){if(void 0!==en){const t=en();return e??t}return useGlobalId(e)}function useLayerOrder(e){const t=useTheme$4(),g=useId$1()||"",{modularCssLayers:n}=e;let C="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return C=n&&null===t?"string"==typeof n?n.replace(/mui(?!\.)/g,C):`@layer ${C};`:"",Qr(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(C){if(t&&t.hasAttribute?.("data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===g)return;const n=document.createElement("style");n.setAttribute("data-mui-layer-order",g),n.textContent=C,e.prepend(n)}else e.querySelector(`style[data-mui-layer-order="${g}"]`)?.remove()},[C,g]),C?(0,gr.jsx)(GlobalStyles$1,{styles:C}):null}var tn={};function useThemeScoping(e,t,g,n=!1){return l.useMemo(()=>{const C=e&&t[e]||t;if("function"==typeof g){const I=g(C),o=e?{...t,[e]:I}:I;return n?()=>o:o}return e?{...t,[e]:g}:{...t,...g}},[e,t,g,n])}function ThemeProvider$1(e){const{children:t,theme:g,themeId:n}=e,C=useTheme$4(tn),I=useTheme$2()||tn,o=useThemeScoping(n,C,g),a=useThemeScoping(n,I,g,!0),i="rtl"===(n?o[n]:o).direction,s=useLayerOrder(o);return(0,gr.jsx)(ThemeProvider$2,{theme:a,children:(0,gr.jsx)(Bg.Provider,{value:o,children:(0,gr.jsx)(RtlProvider,{value:i,children:(0,gr.jsxs)(DefaultPropsProvider,{value:n?o[n].components:o.components,children:[s,t]})})})})}var gn={theme:void 0};function unstable_memoTheme(e){let t,g;return function(n){let C=t;return void 0!==C&&n.theme===g||(gn.theme=n.theme,C=preprocessStyles(e(gn)),t=C,g=n.theme),C}}var rn="mode",nn="color-scheme",An="data-color-scheme";function InitColorSchemeScript(e){const{defaultMode:t="system",defaultLightColorScheme:g="light",defaultDarkColorScheme:n="dark",modeStorageKey:C=rn,colorSchemeStorageKey:I=nn,attribute:o=An,colorSchemeNode:a="document.documentElement",nonce:i}=e||{};let s="",l=o;if("class"===o&&(l=".%s"),"data"===o&&(l="[data-%s]"),l.startsWith(".")){const e=l.substring(1);s+=`${a}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));\n ${a}.classList.add('${e}'.replace('%s', colorScheme));`}const c=l.match(/\[([^[\]]+)\]/);if(c){const[e,t]=c[1].split("=");t||(s+=`${a}.removeAttribute('${e}'.replace('%s', light));\n ${a}.removeAttribute('${e}'.replace('%s', dark));`),s+=`\n ${a}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:'""'});`}else".%s"!==l&&(s+=`${a}.setAttribute('${l}', colorScheme);`);return(0,gr.jsx)("script",{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?i:"",dangerouslySetInnerHTML:{__html:`(function() {\ntry {\n let colorScheme = '';\n const mode = localStorage.getItem('${C}') || '${t}';\n const dark = localStorage.getItem('${I}-dark') || '${n}';\n const light = localStorage.getItem('${I}-light') || '${g}';\n if (mode === 'system') {\n // handle system mode\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = dark\n } else {\n colorScheme = light\n }\n }\n if (mode === 'light') {\n colorScheme = light;\n }\n if (mode === 'dark') {\n colorScheme = dark;\n }\n if (colorScheme) {\n ${s}\n }\n} catch(e){}})();`}},"mui-color-scheme-init")}function noop$7(){}var localStorageManager=({key:e,storageWindow:t})=>(t||"undefined"==typeof window||(t=window),{get(g){if("undefined"==typeof window)return;if(!t)return g;let n;try{n=t.localStorage.getItem(e)}catch{}return n||g},set:g=>{if(t)try{t.localStorage.setItem(e,g)}catch{}},subscribe:g=>{if(!t)return noop$7;const listener=t=>{const n=t.newValue;t.key===e&&g(n)};return t.addEventListener("storage",listener),()=>{t.removeEventListener("storage",listener)}}});function noop$6(){}function getSystemMode(e){if("undefined"!=typeof window&&"function"==typeof window.matchMedia&&"system"===e)return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function processState(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}function getColorScheme(e){return processState(e,t=>"light"===t?e.lightColorScheme:"dark"===t?e.darkColorScheme:void 0)}function useCurrentColorScheme(e){const{defaultMode:t="light",defaultLightColorScheme:g,defaultDarkColorScheme:n,supportedColorSchemes:C=[],modeStorageKey:I=rn,colorSchemeStorageKey:o=nn,storageWindow:a=("undefined"==typeof window?void 0:window),storageManager:i=localStorageManager,noSsr:s=!1}=e,c=C.join(","),u=C.length>1,d=l.useMemo(()=>i?.({key:I,storageWindow:a}),[i,I,a]),p=l.useMemo(()=>i?.({key:`${o}-light`,storageWindow:a}),[i,o,a]),m=l.useMemo(()=>i?.({key:`${o}-dark`,storageWindow:a}),[i,o,a]),[h,y]=l.useState(()=>{const e=d?.get(t)||t,C=p?.get(g)||g,I=m?.get(n)||n;return{mode:e,systemMode:getSystemMode(e),lightColorScheme:C,darkColorScheme:I}}),[b,v]=l.useState(s||!u);l.useEffect(()=>{v(!0)},[]);const x=getColorScheme(h),S=l.useCallback(e=>{y(g=>{if(e===g.mode)return g;const n=e??t;return d?.set(n),{...g,mode:n,systemMode:getSystemMode(n)}})},[d,t]),w=l.useCallback(e=>{e?"string"==typeof e?e&&!c.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):y(t=>{const g={...t};return processState(t,t=>{"light"===t&&(p?.set(e),g.lightColorScheme=e),"dark"===t&&(m?.set(e),g.darkColorScheme=e)}),g}):y(t=>{const C={...t},I=null===e.light?g:e.light,o=null===e.dark?n:e.dark;return I&&(c.includes(I)?(C.lightColorScheme=I,p?.set(I)):console.error(`\`${I}\` does not exist in \`theme.colorSchemes\`.`)),o&&(c.includes(o)?(C.darkColorScheme=o,m?.set(o)):console.error(`\`${o}\` does not exist in \`theme.colorSchemes\`.`)),C}):y(e=>(p?.set(g),m?.set(n),{...e,lightColorScheme:g,darkColorScheme:n}))},[c,p,m,g,n]),E=l.useCallback(e=>{"system"===h.mode&&y(t=>{const g=e?.matches?"dark":"light";return t.systemMode===g?t:{...t,systemMode:g}})},[h.mode]),R=l.useRef(E);return R.current=E,l.useEffect(()=>{if("function"!=typeof window.matchMedia||!u)return;const handler=(...e)=>R.current(...e),e=window.matchMedia("(prefers-color-scheme: dark)");return e.addListener(handler),handler(e),()=>{e.removeListener(handler)}},[u]),l.useEffect(()=>{if(u){const e=d?.subscribe(e=>{e&&!["light","dark","system"].includes(e)||S(e||t)})||noop$6,g=p?.subscribe(e=>{e&&!c.match(e)||w({light:e})})||noop$6,n=m?.subscribe(e=>{e&&!c.match(e)||w({dark:e})})||noop$6;return()=>{e(),g(),n()}}},[w,S,c,t,a,u,d,p,m]),{...h,mode:b?h.mode:void 0,systemMode:b?h.systemMode:void 0,colorScheme:b?x:void 0,setMode:S,setColorScheme:w}}var Cn="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function createCssVarsProvider(e){const{themeId:t,theme:g={},modeStorageKey:n=rn,colorSchemeStorageKey:C=nn,disableTransitionOnChange:I=!1,defaultColorScheme:o,resolveTheme:a}=e,i={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},s=l.createContext(void 0),useColorScheme=()=>l.useContext(s)||i,c={},u={};function CssVarsProvider(e){const{children:i,theme:d,modeStorageKey:p=n,colorSchemeStorageKey:m=C,disableTransitionOnChange:h=I,storageManager:y,storageWindow:b=("undefined"==typeof window?void 0:window),documentNode:v=("undefined"==typeof document?void 0:document),colorSchemeNode:x=("undefined"==typeof document?void 0:document.documentElement),disableNestedContext:S=!1,disableStyleSheetGeneration:w=!1,defaultMode:E="system",forceThemeRerender:R=!1,noSsr:M}=e,T=l.useRef(!1),P=useTheme$2(),N=l.useContext(s),D=!!N&&!S,O=l.useMemo(()=>d||("function"==typeof g?g():g),[d]),j=O[t],G=j||O,{colorSchemes:L=c,components:B=u,cssVarPrefix:F}=G,W=Object.keys(L).filter(e=>!!L[e]).join(","),V=l.useMemo(()=>W.split(","),[W]),U="string"==typeof o?o:o.light,K="string"==typeof o?o:o.dark,{mode:H,setMode:Y,systemMode:Z,lightColorScheme:Q,darkColorScheme:X,colorScheme:_,setColorScheme:q}=useCurrentColorScheme({supportedColorSchemes:V,defaultLightColorScheme:U,defaultDarkColorScheme:K,modeStorageKey:p,colorSchemeStorageKey:m,defaultMode:L[U]&&L[K]?E:L[G.defaultColorScheme]?.palette?.mode||G.palette?.mode,storageManager:y,storageWindow:b,noSsr:M});let J=H,$=_;D&&(J=N.mode,$=N.colorScheme);let ee=$||G.defaultColorScheme;G.vars&&!R&&(ee=G.defaultColorScheme);const te=l.useMemo(()=>{const e=G.generateThemeVars?.()||G.vars,t={...G,components:B,colorSchemes:L,cssVarPrefix:F,vars:e};if("function"==typeof t.generateSpacing&&(t.spacing=t.generateSpacing()),ee){const e=L[ee];e&&"object"==typeof e&&Object.keys(e).forEach(g=>{e[g]&&"object"==typeof e[g]?t[g]={...t[g],...e[g]}:t[g]=e[g]})}return a?a(t):t},[G,ee,B,L,F]),ge=G.colorSchemeSelector;Qr(()=>{if($&&x&&ge&&"media"!==ge){const e=ge;let t=ge;if("class"===e&&(t=".%s"),"data"===e&&(t="[data-%s]"),e?.startsWith("data-")&&!e.includes("%s")&&(t=`[${e}="%s"]`),t.startsWith("."))x.classList.remove(...V.map(e=>t.substring(1).replace("%s",e))),x.classList.add(t.substring(1).replace("%s",$));else{const e=t.replace("%s",$).match(/\[([^\]]+)\]/);if(e){const[t,g]=e[1].split("=");g||V.forEach(e=>{x.removeAttribute(t.replace($,e))}),x.setAttribute(t,g?g.replace(/"|'/g,""):"")}else x.setAttribute(t,$)}}},[$,ge,x,V]),l.useEffect(()=>{let e;if(h&&T.current&&v){const t=v.createElement("style");t.appendChild(v.createTextNode(Cn)),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[$,h,v]),l.useEffect(()=>(T.current=!0,()=>{T.current=!1}),[]);const re=l.useMemo(()=>({allColorSchemes:V,colorScheme:$,darkColorScheme:X,lightColorScheme:Q,mode:J,setColorScheme:q,setMode:Y,systemMode:Z}),[V,$,X,Q,J,q,Y,Z,te.colorSchemeSelector]);let ne=!0;(w||!1===G.cssVariables||D&&P?.cssVarPrefix===F)&&(ne=!1);const Ae=(0,gr.jsxs)(l.Fragment,{children:[(0,gr.jsx)(ThemeProvider$1,{themeId:j?t:void 0,theme:te,children:i}),ne&&(0,gr.jsx)(GlobalStyles$2,{styles:te.generateStyleSheets?.()||[]})]});return D?Ae:(0,gr.jsx)(s.Provider,{value:re,children:Ae})}const d="string"==typeof o?o:o.light,p="string"==typeof o?o:o.dark;return{CssVarsProvider,useColorScheme,getInitColorSchemeScript:e=>InitColorSchemeScript({colorSchemeStorageKey:C,defaultLightColorScheme:d,defaultDarkColorScheme:p,modeStorageKey:n,...e})}}function createGetCssVar$1(e=""){function appendVar(...t){if(!t.length)return"";const g=t[0];return"string"!=typeof g||g.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${g}`:`, var(--${e?`${e}-`:""}${g}${appendVar(...t.slice(1))})`}return(t,...g)=>`var(--${e?`${e}-`:""}${t}${appendVar(...g)})`}var assignNestedKeys=(e,t,g,n=[])=>{let C=e;t.forEach((e,I)=>{I===t.length-1?Array.isArray(C)?C[Number(e)]=g:C&&"object"==typeof C&&(C[e]=g):C&&"object"==typeof C&&(C[e]||(C[e]=n.includes(e)?[]:{}),C=C[e])})},walkObjectDeep=(e,t,g)=>{function recurse(e,n=[],C=[]){Object.entries(e).forEach(([e,I])=>{(!g||g&&!g([...n,e]))&&null!=I&&("object"==typeof I&&Object.keys(I).length>0?recurse(I,[...n,e],Array.isArray(I)?[...C,e]:C):t([...n,e],I,C))})}recurse(e)},getCssValue=(e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function cssVarsParser(e,t){const{prefix:g,shouldSkipGeneratingVar:n}=t||{},C={},I={},o={};return walkObjectDeep(e,(e,t,a)=>{if(!("string"!=typeof t&&"number"!=typeof t||n&&n(e,t))){const n=`--${g?`${g}-`:""}${e.join("-")}`,i=getCssValue(e,t);Object.assign(C,{[n]:i}),assignNestedKeys(I,e,`var(${n})`,a),assignNestedKeys(o,e,`var(${n}, ${i})`,a)}},e=>"vars"===e[0]),{css:C,vars:I,varsWithDefaults:o}}function prepareCssVars(e,t={}){const{getSelector:g=defaultGetSelector,disableCssColorScheme:n,colorSchemeSelector:C,enableContrastVars:I}=t,{colorSchemes:o={},components:a,defaultColorScheme:i="light",...s}=e,{vars:l,css:c,varsWithDefaults:u}=cssVarsParser(s,t);let d=u;const p={},{[i]:m,...h}=o;if(Object.entries(h||{}).forEach(([e,g])=>{const{vars:n,css:C,varsWithDefaults:I}=cssVarsParser(g,t);d=deepmerge(d,I),p[e]={css:C,vars:n}}),m){const{css:e,vars:g,varsWithDefaults:n}=cssVarsParser(m,t);d=deepmerge(d,n),p[i]={css:e,vars:g}}function defaultGetSelector(t,g){let n=C;if("class"===C&&(n=".%s"),"data"===C&&(n="[data-%s]"),C?.startsWith("data-")&&!C.includes("%s")&&(n=`[${C}="%s"]`),t){if("media"===n)return e.defaultColorScheme===t?":root":{[`@media (prefers-color-scheme: ${o[t]?.palette?.mode||t})`]:{":root":g}};if(n)return e.defaultColorScheme===t?`:root, ${n.replace("%s",String(t))}`:n.replace("%s",String(t))}return":root"}const generateStyleSheets=()=>{const t=[],C=e.defaultColorScheme||"light";function insertStyleSheet(e,g){Object.keys(g).length&&t.push("string"==typeof e?{[e]:{...g}}:e)}insertStyleSheet(g(void 0,{...c}),c);const{[C]:a,...i}=p;if(a){const{css:e}=a,t=o[C]?.palette?.mode,I=!n&&t?{colorScheme:t,...e}:{...e};insertStyleSheet(g(C,{...I}),I)}return Object.entries(i).forEach(([e,{css:t}])=>{const C=o[e]?.palette?.mode,I=!n&&C?{colorScheme:C,...t}:{...t};insertStyleSheet(g(e,{...I}),I)}),I&&t.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),t};return{vars:d,generateThemeVars:()=>{let e={...l};return Object.entries(p).forEach(([,{vars:t}])=>{e=deepmerge(e,t)}),e},generateStyleSheets}}function createGetColorSchemeSelector(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}function composeClasses(e,t,g=void 0){const n={};for(const C in e){const I=e[C];let o="",a=!0;for(let e=0;e<I.length;e+=1){const n=I[e];n&&(o+=(!0===a?"":" ")+t(n),a=!1,g&&g[n]&&(o+=" "+g[n]))}n[C]=o}return n}function isMuiElement(e,t){return l.isValidElement(e)&&-1!==t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)}var In=createTheme$1(),an=Zr("div",{name:"MuiStack",slot:"Root"});function useThemePropsDefault(e){return useThemeProps({props:e,name:"MuiStack",defaultTheme:In})}function joinChildren(e,t){const g=l.Children.toArray(e).filter(Boolean);return g.reduce((e,n,C)=>(e.push(n),C<g.length-1&&e.push(l.cloneElement(t,{key:`separator-${C}`})),e),[])}var getSideFromDirection=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[e]),style=({ownerState:e,theme:t})=>{let g={display:"flex",flexDirection:"column",...handleBreakpoints({theme:t},resolveBreakpointValues({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){const n=createUnarySpacing(t),C=Object.keys(t.breakpoints.values).reduce((t,g)=>(("object"==typeof e.spacing&&null!=e.spacing[g]||"object"==typeof e.direction&&null!=e.direction[g])&&(t[g]=!0),t),{}),I=resolveBreakpointValues({values:e.direction,base:C}),o=resolveBreakpointValues({values:e.spacing,base:C});"object"==typeof I&&Object.keys(I).forEach((e,t,g)=>{I[e]||(I[e]=t>0?I[g[t-1]]:"column")}),g=deepmerge(g,handleBreakpoints({theme:t},o,(t,g)=>e.useFlexGap?{gap:getValue(n,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${getSideFromDirection(g?I[g]:e.direction)}`]:getValue(n,t)}}))}return g=mergeBreakpointsInOrder(t.breakpoints,g),g};function createStack(e={}){const{createStyledComponent:t=an,useThemeProps:g=useThemePropsDefault,componentName:n="MuiStack"}=e,useUtilityClasses=()=>composeClasses({root:["root"]},e=>generateUtilityClass(n,e),{}),C=t(style);return l.forwardRef(function(e,t){const{component:n="div",direction:I="column",spacing:o=0,divider:a,children:i,className:s,useFlexGap:l=!1,...c}=g(e);return(0,gr.jsx)(C,{as:n,ownerState:{direction:I,spacing:o,useFlexGap:l},ref:t,className:clsx(useUtilityClasses().root,s),...c,children:a?joinChildren(i,a):i})})}var sn="$$material",ln={black:"#000",white:"#fff"},cn={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},un={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},dn={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},pn={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},mn={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},hn={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},yn={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function getLight(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ln.white,default:ln.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}var bn=getLight();function getDark(){return{text:{primary:ln.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:ln.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}var vn=getDark();function addLightOrDark(e,t,g,n){const C=n.light||n,I=n.dark||1.5*n;e[t]||(e.hasOwnProperty(g)?e[t]=e[g]:"light"===t?e.light=lighten(e.main,C):"dark"===t&&(e.dark=darken(e.main,I)))}function mixLightOrDark(e,t,g,n,C){const I=C.light||C,o=C.dark||1.5*C;t[g]||(t.hasOwnProperty(n)?t[g]=t[n]:"light"===g?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(100*I).toFixed(0)}%)`:"dark"===g&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(100*o).toFixed(0)}%)`))}function getDefaultPrimary(e="light"){return"dark"===e?{main:mn[200],light:mn[50],dark:mn[400]}:{main:mn[700],light:mn[400],dark:mn[800]}}function getDefaultSecondary(e="light"){return"dark"===e?{main:un[200],light:un[50],dark:un[400]}:{main:un[500],light:un[300],dark:un[700]}}function getDefaultError(e="light"){return"dark"===e?{main:dn[500],light:dn[300],dark:dn[700]}:{main:dn[700],light:dn[400],dark:dn[800]}}function getDefaultInfo(e="light"){return"dark"===e?{main:hn[400],light:hn[300],dark:hn[700]}:{main:hn[700],light:hn[500],dark:hn[900]}}function getDefaultSuccess(e="light"){return"dark"===e?{main:yn[400],light:yn[300],dark:yn[700]}:{main:yn[800],light:yn[500],dark:yn[900]}}function getDefaultWarning(e="light"){return"dark"===e?{main:pn[400],light:pn[300],dark:pn[700]}:{main:"#ed6c02",light:pn[500],dark:pn[900]}}function contrastColor(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function createPalette(e){const{mode:t="light",contrastThreshold:g=3,tonalOffset:n=.2,colorSpace:C,...I}=e,o=e.primary||getDefaultPrimary(t),a=e.secondary||getDefaultSecondary(t),i=e.error||getDefaultError(t),s=e.info||getDefaultInfo(t),l=e.success||getDefaultSuccess(t),c=e.warning||getDefaultWarning(t);function getContrastText(e){return C?contrastColor(e):getContrastRatio(e,vn.text.primary)>=g?vn.text.primary:bn.text.primary}const augmentColor=({color:e,name:t,mainShade:g=500,lightShade:I=300,darkShade:o=700})=>{if(!(e={...e}).main&&e[g]&&(e.main=e[g]),!e.hasOwnProperty("main"))throw new Error(formatMuiErrorMessage(11,t?` (${t})`:"",g));if("string"!=typeof e.main)throw new Error(formatMuiErrorMessage(12,t?` (${t})`:"",JSON.stringify(e.main)));return C?(mixLightOrDark(C,e,"light",I,n),mixLightOrDark(C,e,"dark",o,n)):(addLightOrDark(e,"light",I,n),addLightOrDark(e,"dark",o,n)),e.contrastText||(e.contrastText=getContrastText(e.main)),e};let u;return"light"===t?u=getLight():"dark"===t&&(u=getDark()),deepmerge({common:{...ln},mode:t,primary:augmentColor({color:o,name:"primary"}),secondary:augmentColor({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:augmentColor({color:i,name:"error"}),warning:augmentColor({color:c,name:"warning"}),info:augmentColor({color:s,name:"info"}),success:augmentColor({color:l,name:"success"}),grey:cn,contrastThreshold:g,getContrastText,augmentColor,tonalOffset:n,...u},I)}function prepareTypographyVars(e){const t={};return Object.entries(e).forEach(e=>{const[g,n]=e;"object"==typeof n&&(t[g]=`${n.fontStyle?`${n.fontStyle} `:""}${n.fontVariant?`${n.fontVariant} `:""}${n.fontWeight?`${n.fontWeight} `:""}${n.fontStretch?`${n.fontStretch} `:""}${n.fontSize||""}${n.lineHeight?`/${n.lineHeight} `:""}${n.fontFamily||""}`)}),t}function createMixins(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function round$2(e){return Math.round(1e5*e)/1e5}var xn={textTransform:"uppercase"},Sn='"Roboto", "Helvetica", "Arial", sans-serif';function createTypography(e,t){const{fontFamily:g=Sn,fontSize:n=14,fontWeightLight:C=300,fontWeightRegular:I=400,fontWeightMedium:o=500,fontWeightBold:a=700,htmlFontSize:i=16,allVariants:s,pxToRem:l,...c}="function"==typeof t?t(e):t,u=n/14,d=l||(e=>e/i*u+"rem"),buildVariant=(e,t,n,C,I)=>({fontFamily:g,fontWeight:e,fontSize:d(t),lineHeight:n,...g===Sn?{letterSpacing:`${round$2(C/t)}em`}:{},...I,...s});return deepmerge({htmlFontSize:i,pxToRem:d,fontFamily:g,fontSize:n,fontWeightLight:C,fontWeightRegular:I,fontWeightMedium:o,fontWeightBold:a,h1:buildVariant(C,96,1.167,-1.5),h2:buildVariant(C,60,1.2,-.5),h3:buildVariant(I,48,1.167,0),h4:buildVariant(I,34,1.235,.25),h5:buildVariant(I,24,1.334,0),h6:buildVariant(o,20,1.6,.15),subtitle1:buildVariant(I,16,1.75,.15),subtitle2:buildVariant(o,14,1.57,.1),body1:buildVariant(I,16,1.5,.15),body2:buildVariant(I,14,1.43,.15),button:buildVariant(o,14,1.75,.4,xn),caption:buildVariant(I,12,1.66,.4),overline:buildVariant(I,12,2.66,1,xn),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},c,{clone:!1})}var wn=.2,En=.14,Rn=.12;function createShadow(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${wn})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${En})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Rn})`].join(",")}var kn=["none",createShadow(0,2,1,-1,0,1,1,0,0,1,3,0),createShadow(0,3,1,-2,0,2,2,0,0,1,5,0),createShadow(0,3,3,-2,0,3,4,0,0,1,8,0),createShadow(0,2,4,-1,0,4,5,0,0,1,10,0),createShadow(0,3,5,-1,0,5,8,0,0,1,14,0),createShadow(0,3,5,-1,0,6,10,0,0,1,18,0),createShadow(0,4,5,-2,0,7,10,1,0,2,16,1),createShadow(0,5,5,-3,0,8,10,1,0,3,14,2),createShadow(0,5,6,-3,0,9,12,1,0,3,16,2),createShadow(0,6,6,-3,0,10,14,1,0,4,18,3),createShadow(0,6,7,-4,0,11,15,1,0,4,20,3),createShadow(0,7,8,-4,0,12,17,2,0,5,22,4),createShadow(0,7,8,-4,0,13,19,2,0,5,24,4),createShadow(0,7,9,-4,0,14,21,2,0,5,26,4),createShadow(0,8,9,-5,0,15,22,2,0,6,28,5),createShadow(0,8,10,-5,0,16,24,2,0,6,30,5),createShadow(0,8,11,-5,0,17,26,2,0,6,32,5),createShadow(0,9,11,-5,0,18,28,2,0,7,34,6),createShadow(0,9,12,-6,0,19,29,2,0,7,36,6),createShadow(0,10,13,-6,0,20,31,3,0,8,38,7),createShadow(0,10,13,-6,0,21,33,3,0,8,40,7),createShadow(0,10,14,-6,0,22,35,3,0,8,42,7),createShadow(0,11,14,-7,0,23,36,3,0,9,44,8),createShadow(0,11,15,-7,0,24,38,3,0,9,46,8)],Mn={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Tn={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function formatMs(e){return`${Math.round(e)}ms`}function getAutoHeightDuration(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function createTransitions(e){const t={...Mn,...e.easing},g={...Tn,...e.duration};return{getAutoHeightDuration,create:(e=["all"],n={})=>{const{duration:C=g.standard,easing:I=t.easeInOut,delay:o=0,...a}=n;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof C?C:formatMs(C)} ${I} ${"string"==typeof o?o:formatMs(o)}`).join(",")},...e,easing:t,duration:g}}var Pn={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function isSerializable(e){return isPlainObject(e)||void 0===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)}function stringifyTheme(e={}){const t={...e};function serializeTheme(e){const t=Object.entries(e);for(let g=0;g<t.length;g++){const[n,C]=t[g];!isSerializable(C)||n.startsWith("unstable_")||n.startsWith("internal_")?delete e[n]:isPlainObject(C)&&(e[n]={...C},serializeTheme(e[n]))}}return serializeTheme(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(t,null,2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`}function coefficientToPercentage(e){return"number"==typeof e?`${(100*e).toFixed(0)}%`:`calc((${e}) * 100%)`}var parseAddition=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let g=0;for(let n=0;n<t.length;n+=1)g+=+t[n];return g};function attachColorManipulators(e){Object.assign(e,{alpha(t,g){const n=this||e;return n.colorSpace?`oklch(from ${t} l c h / ${"string"==typeof g?`calc(${g})`:g})`:n.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${"string"==typeof g?`calc(${g})`:g})`:alpha(t,parseAddition(g))},lighten(t,g){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #fff ${coefficientToPercentage(g)})`:lighten(t,g)},darken(t,g){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #000 ${coefficientToPercentage(g)})`:darken(t,g)}})}function createThemeNoVars(e={},...t){const{breakpoints:g,mixins:n={},spacing:C,palette:I={},transitions:o={},typography:a={},shape:i,colorSpace:s,...l}=e;if(e.vars&&void 0===e.generateThemeVars)throw new Error(formatMuiErrorMessage(22));const c=createPalette({...I,colorSpace:s}),u=createTheme$1(e);let d=deepmerge(u,{mixins:createMixins(u.breakpoints,n),palette:c,shadows:kn.slice(),typography:createTypography(c,a),transitions:createTransitions(o),zIndex:{...Pn}});return d=deepmerge(d,l),d=t.reduce((e,t)=>deepmerge(e,t),d),d.unstable_sxConfig={...Fr,...l?.unstable_sxConfig},d.unstable_sx=function(e){return Vr({sx:e,theme:this})},d.toRuntimeSource=stringifyTheme,attachColorManipulators(d),d}function getOverlayAlpha(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}var Nn=[...Array(25)].map((e,t)=>{if(0===t)return"none";const g=getOverlayAlpha(t);return`linear-gradient(rgba(255 255 255 / ${g}), rgba(255 255 255 / ${g}))`});function getOpacity(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function getOverlays(e){return"dark"===e?Nn:[]}function createColorScheme(e){const{palette:t={mode:"light"},opacity:g,overlays:n,colorSpace:C,...I}=e,o=createPalette({...t,colorSpace:C});return{palette:o,opacity:{...getOpacity(o.mode),...g},overlays:n||getOverlays(o.mode),...I}}function shouldSkipGeneratingVar(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var excludeVariablesFromRoot=e=>[...[...Array(25)].map((t,g)=>`--${e?`${e}-`:""}overlays-${g}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],createGetSelector_default=e=>(t,g)=>{const n=e.rootSelector||":root",C=e.colorSchemeSelector;let I=C;if("class"===C&&(I=".%s"),"data"===C&&(I="[data-%s]"),C?.startsWith("data-")&&!C.includes("%s")&&(I=`[${C}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const C={};return excludeVariablesFromRoot(e.cssVarPrefix).forEach(e=>{C[e]=g[e],delete g[e]}),"media"===I?{[n]:g,"@media (prefers-color-scheme: dark)":{[n]:C}}:I?{[I.replace("%s",t)]:C,[`${n}, ${I.replace("%s",t)}`]:g}:{[n]:{...g,...C}}}if(I&&"media"!==I)return`${n}, ${I.replace("%s",String(t))}`}else if(t){if("media"===I)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:g}};if(I)return I.replace("%s",String(t))}return n};function assignNode(e,t){t.forEach(t=>{e[t]||(e[t]={})})}function setColor(e,t,g){!e[t]&&g&&(e[t]=g)}function toRgb(e){return"string"==typeof e&&e.startsWith("hsl")?hslToRgb(e):e}function setColorChannel(e,t){`${t}Channel`in e||(e[`${t}Channel`]=private_safeColorChannel(toRgb(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().\nTo suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function getSpacingVal(e){return"number"==typeof e?`${e}px`:"string"==typeof e||"function"==typeof e||Array.isArray(e)?e:"8px"}var silent=e=>{try{return e()}catch(t){}},createGetCssVar=(e="mui")=>createGetCssVar$1(e);function attachColorScheme$1(e,t,g,n,C){if(!g)return;g=!0===g?{}:g;const I="dark"===C?"dark":"light";if(!n)return void(t[C]=createColorScheme({...g,palette:{mode:I,...g?.palette},colorSpace:e}));const{palette:o,...a}=createThemeNoVars({...n,palette:{mode:I,...g?.palette},colorSpace:e});return t[C]={...g,palette:o,opacity:{...getOpacity(I),...g?.opacity},overlays:g?.overlays||getOverlays(I)},a}function createThemeWithVars(e={},...t){const{colorSchemes:g={light:!0},defaultColorScheme:n,disableCssColorScheme:C=!1,cssVarPrefix:I="mui",nativeColor:o=!1,shouldSkipGeneratingVar:a=shouldSkipGeneratingVar,colorSchemeSelector:i=(g.light&&g.dark?"media":void 0),rootSelector:s=":root",...l}=e,c=Object.keys(g)[0],u=n||(g.light&&"light"!==c?"light":c),d=createGetCssVar(I),{[u]:p,light:m,dark:h,...y}=g,b={...y};let v,x=p;if(("dark"===u&&!("dark"in g)||"light"===u&&!("light"in g))&&(x=!0),!x)throw new Error(formatMuiErrorMessage(21,u));o&&(v="oklch");const S=attachColorScheme$1(v,b,x,l,u);m&&!b.light&&attachColorScheme$1(v,b,m,void 0,"light"),h&&!b.dark&&attachColorScheme$1(v,b,h,void 0,"dark");let w={defaultColorScheme:u,...S,cssVarPrefix:I,colorSchemeSelector:i,rootSelector:s,getCssVar:d,colorSchemes:b,font:{...prepareTypographyVars(S.typography),...S.font},spacing:getSpacingVal(l.spacing)};Object.keys(w.colorSchemes).forEach(e=>{const t=w.colorSchemes[e].palette,setCssVarColor=e=>{const g=e.split("-"),n=g[1],C=g[2];return d(e,t[n][C])};function colorMix(e,t,g){if(v){let n;return e===private_safeAlpha&&(n=`transparent ${(100*(1-g)).toFixed(0)}%`),e===private_safeDarken&&(n=`#000 ${(100*g).toFixed(0)}%`),e===private_safeLighten&&(n=`#fff ${(100*g).toFixed(0)}%`),`color-mix(in ${v}, ${t}, ${n})`}return e(t,g)}if("light"===t.mode&&(setColor(t.common,"background","#fff"),setColor(t.common,"onBackground","#000")),"dark"===t.mode&&(setColor(t.common,"background","#000"),setColor(t.common,"onBackground","#fff")),assignNode(t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),"light"===t.mode){setColor(t.Alert,"errorColor",colorMix(private_safeDarken,o?d("palette-error-light"):t.error.light,.6)),setColor(t.Alert,"infoColor",colorMix(private_safeDarken,o?d("palette-info-light"):t.info.light,.6)),setColor(t.Alert,"successColor",colorMix(private_safeDarken,o?d("palette-success-light"):t.success.light,.6)),setColor(t.Alert,"warningColor",colorMix(private_safeDarken,o?d("palette-warning-light"):t.warning.light,.6)),setColor(t.Alert,"errorFilledBg",setCssVarColor("palette-error-main")),setColor(t.Alert,"infoFilledBg",setCssVarColor("palette-info-main")),setColor(t.Alert,"successFilledBg",setCssVarColor("palette-success-main")),setColor(t.Alert,"warningFilledBg",setCssVarColor("palette-warning-main")),setColor(t.Alert,"errorFilledColor",silent(()=>t.getContrastText(t.error.main))),setColor(t.Alert,"infoFilledColor",silent(()=>t.getContrastText(t.info.main))),setColor(t.Alert,"successFilledColor",silent(()=>t.getContrastText(t.success.main))),setColor(t.Alert,"warningFilledColor",silent(()=>t.getContrastText(t.warning.main))),setColor(t.Alert,"errorStandardBg",colorMix(private_safeLighten,o?d("palette-error-light"):t.error.light,.9)),setColor(t.Alert,"infoStandardBg",colorMix(private_safeLighten,o?d("palette-info-light"):t.info.light,.9)),setColor(t.Alert,"successStandardBg",colorMix(private_safeLighten,o?d("palette-success-light"):t.success.light,.9)),setColor(t.Alert,"warningStandardBg",colorMix(private_safeLighten,o?d("palette-warning-light"):t.warning.light,.9)),setColor(t.Alert,"errorIconColor",setCssVarColor("palette-error-main")),setColor(t.Alert,"infoIconColor",setCssVarColor("palette-info-main")),setColor(t.Alert,"successIconColor",setCssVarColor("palette-success-main")),setColor(t.Alert,"warningIconColor",setCssVarColor("palette-warning-main")),setColor(t.AppBar,"defaultBg",setCssVarColor("palette-grey-100")),setColor(t.Avatar,"defaultBg",setCssVarColor("palette-grey-400")),setColor(t.Button,"inheritContainedBg",setCssVarColor("palette-grey-300")),setColor(t.Button,"inheritContainedHoverBg",setCssVarColor("palette-grey-A100")),setColor(t.Chip,"defaultBorder",setCssVarColor("palette-grey-400")),setColor(t.Chip,"defaultAvatarColor",setCssVarColor("palette-grey-700")),setColor(t.Chip,"defaultIconColor",setCssVarColor("palette-grey-700")),setColor(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),setColor(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),setColor(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),setColor(t.LinearProgress,"primaryBg",colorMix(private_safeLighten,o?d("palette-primary-main"):t.primary.main,.62)),setColor(t.LinearProgress,"secondaryBg",colorMix(private_safeLighten,o?d("palette-secondary-main"):t.secondary.main,.62)),setColor(t.LinearProgress,"errorBg",colorMix(private_safeLighten,o?d("palette-error-main"):t.error.main,.62)),setColor(t.LinearProgress,"infoBg",colorMix(private_safeLighten,o?d("palette-info-main"):t.info.main,.62)),setColor(t.LinearProgress,"successBg",colorMix(private_safeLighten,o?d("palette-success-main"):t.success.main,.62)),setColor(t.LinearProgress,"warningBg",colorMix(private_safeLighten,o?d("palette-warning-light"):t.warning.main,.62)),setColor(t.Skeleton,"bg",v?colorMix(private_safeAlpha,o?d("palette-text-primary"):t.text.primary,.11):`rgba(${setCssVarColor("palette-text-primaryChannel")} / 0.11)`),setColor(t.Slider,"primaryTrack",colorMix(private_safeLighten,o?d("palette-primary-main"):t.primary.main,.62)),setColor(t.Slider,"secondaryTrack",colorMix(private_safeLighten,o?d("palette-secondary-main"):t.secondary.main,.62)),setColor(t.Slider,"errorTrack",colorMix(private_safeLighten,o?d("palette-error-main"):t.error.main,.62)),setColor(t.Slider,"infoTrack",colorMix(private_safeLighten,o?d("palette-info-main"):t.info.main,.62)),setColor(t.Slider,"successTrack",colorMix(private_safeLighten,o?d("palette-success-main"):t.success.main,.62)),setColor(t.Slider,"warningTrack",colorMix(private_safeLighten,o?d("palette-warning-main"):t.warning.main,.62));const e=v?colorMix(private_safeDarken,o?d("palette-background-default"):t.background.default,.6825):private_safeEmphasize(t.background.default,.8);setColor(t.SnackbarContent,"bg",e),setColor(t.SnackbarContent,"color",silent(()=>v?vn.text.primary:t.getContrastText(e))),setColor(t.SpeedDialAction,"fabHoverBg",private_safeEmphasize(t.background.paper,.15)),setColor(t.StepConnector,"border",setCssVarColor("palette-grey-400")),setColor(t.StepContent,"border",setCssVarColor("palette-grey-400")),setColor(t.Switch,"defaultColor",setCssVarColor("palette-common-white")),setColor(t.Switch,"defaultDisabledColor",setCssVarColor("palette-grey-100")),setColor(t.Switch,"primaryDisabledColor",colorMix(private_safeLighten,o?d("palette-primary-main"):t.primary.main,.62)),setColor(t.Switch,"secondaryDisabledColor",colorMix(private_safeLighten,o?d("palette-secondary-main"):t.secondary.main,.62)),setColor(t.Switch,"errorDisabledColor",colorMix(private_safeLighten,o?d("palette-error-main"):t.error.main,.62)),setColor(t.Switch,"infoDisabledColor",colorMix(private_safeLighten,o?d("palette-info-main"):t.info.main,.62)),setColor(t.Switch,"successDisabledColor",colorMix(private_safeLighten,o?d("palette-success-main"):t.success.main,.62)),setColor(t.Switch,"warningDisabledColor",colorMix(private_safeLighten,o?d("palette-warning-main"):t.warning.main,.62)),setColor(t.TableCell,"border",colorMix(private_safeLighten,private_safeAlpha(o?d("palette-divider"):t.divider,1),.88)),setColor(t.Tooltip,"bg",colorMix(private_safeAlpha,o?d("palette-grey-700"):t.grey[700],.92))}if("dark"===t.mode){setColor(t.Alert,"errorColor",colorMix(private_safeLighten,o?d("palette-error-light"):t.error.light,.6)),setColor(t.Alert,"infoColor",colorMix(private_safeLighten,o?d("palette-info-light"):t.info.light,.6)),setColor(t.Alert,"successColor",colorMix(private_safeLighten,o?d("palette-success-light"):t.success.light,.6)),setColor(t.Alert,"warningColor",colorMix(private_safeLighten,o?d("palette-warning-light"):t.warning.light,.6)),setColor(t.Alert,"errorFilledBg",setCssVarColor("palette-error-dark")),setColor(t.Alert,"infoFilledBg",setCssVarColor("palette-info-dark")),setColor(t.Alert,"successFilledBg",setCssVarColor("palette-success-dark")),setColor(t.Alert,"warningFilledBg",setCssVarColor("palette-warning-dark")),setColor(t.Alert,"errorFilledColor",silent(()=>t.getContrastText(t.error.dark))),setColor(t.Alert,"infoFilledColor",silent(()=>t.getContrastText(t.info.dark))),setColor(t.Alert,"successFilledColor",silent(()=>t.getContrastText(t.success.dark))),setColor(t.Alert,"warningFilledColor",silent(()=>t.getContrastText(t.warning.dark))),setColor(t.Alert,"errorStandardBg",colorMix(private_safeDarken,o?d("palette-error-light"):t.error.light,.9)),setColor(t.Alert,"infoStandardBg",colorMix(private_safeDarken,o?d("palette-info-light"):t.info.light,.9)),setColor(t.Alert,"successStandardBg",colorMix(private_safeDarken,o?d("palette-success-light"):t.success.light,.9)),setColor(t.Alert,"warningStandardBg",colorMix(private_safeDarken,o?d("palette-warning-light"):t.warning.light,.9)),setColor(t.Alert,"errorIconColor",setCssVarColor("palette-error-main")),setColor(t.Alert,"infoIconColor",setCssVarColor("palette-info-main")),setColor(t.Alert,"successIconColor",setCssVarColor("palette-success-main")),setColor(t.Alert,"warningIconColor",setCssVarColor("palette-warning-main")),setColor(t.AppBar,"defaultBg",setCssVarColor("palette-grey-900")),setColor(t.AppBar,"darkBg",setCssVarColor("palette-background-paper")),setColor(t.AppBar,"darkColor",setCssVarColor("palette-text-primary")),setColor(t.Avatar,"defaultBg",setCssVarColor("palette-grey-600")),setColor(t.Button,"inheritContainedBg",setCssVarColor("palette-grey-800")),setColor(t.Button,"inheritContainedHoverBg",setCssVarColor("palette-grey-700")),setColor(t.Chip,"defaultBorder",setCssVarColor("palette-grey-700")),setColor(t.Chip,"defaultAvatarColor",setCssVarColor("palette-grey-300")),setColor(t.Chip,"defaultIconColor",setCssVarColor("palette-grey-300")),setColor(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),setColor(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),setColor(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),setColor(t.LinearProgress,"primaryBg",colorMix(private_safeDarken,o?d("palette-primary-main"):t.primary.main,.5)),setColor(t.LinearProgress,"secondaryBg",colorMix(private_safeDarken,o?d("palette-secondary-main"):t.secondary.main,.5)),setColor(t.LinearProgress,"errorBg",colorMix(private_safeDarken,o?d("palette-error-main"):t.error.main,.5)),setColor(t.LinearProgress,"infoBg",colorMix(private_safeDarken,o?d("palette-info-main"):t.info.main,.5)),setColor(t.LinearProgress,"successBg",colorMix(private_safeDarken,o?d("palette-success-main"):t.success.main,.5)),setColor(t.LinearProgress,"warningBg",colorMix(private_safeDarken,o?d("palette-warning-main"):t.warning.main,.5)),setColor(t.Skeleton,"bg",v?colorMix(private_safeAlpha,o?d("palette-text-primary"):t.text.primary,.13):`rgba(${setCssVarColor("palette-text-primaryChannel")} / 0.13)`),setColor(t.Slider,"primaryTrack",colorMix(private_safeDarken,o?d("palette-primary-main"):t.primary.main,.5)),setColor(t.Slider,"secondaryTrack",colorMix(private_safeDarken,o?d("palette-secondary-main"):t.secondary.main,.5)),setColor(t.Slider,"errorTrack",colorMix(private_safeDarken,o?d("palette-error-main"):t.error.main,.5)),setColor(t.Slider,"infoTrack",colorMix(private_safeDarken,o?d("palette-info-main"):t.info.main,.5)),setColor(t.Slider,"successTrack",colorMix(private_safeDarken,o?d("palette-success-main"):t.success.main,.5)),setColor(t.Slider,"warningTrack",colorMix(private_safeDarken,o?d("palette-warning-light"):t.warning.main,.5));const e=v?colorMix(private_safeLighten,o?d("palette-background-default"):t.background.default,.985):private_safeEmphasize(t.background.default,.98);setColor(t.SnackbarContent,"bg",e),setColor(t.SnackbarContent,"color",silent(()=>v?bn.text.primary:t.getContrastText(e))),setColor(t.SpeedDialAction,"fabHoverBg",private_safeEmphasize(t.background.paper,.15)),setColor(t.StepConnector,"border",setCssVarColor("palette-grey-600")),setColor(t.StepContent,"border",setCssVarColor("palette-grey-600")),setColor(t.Switch,"defaultColor",setCssVarColor("palette-grey-300")),setColor(t.Switch,"defaultDisabledColor",setCssVarColor("palette-grey-600")),setColor(t.Switch,"primaryDisabledColor",colorMix(private_safeDarken,o?d("palette-primary-main"):t.primary.main,.55)),setColor(t.Switch,"secondaryDisabledColor",colorMix(private_safeDarken,o?d("palette-secondary-main"):t.secondary.main,.55)),setColor(t.Switch,"errorDisabledColor",colorMix(private_safeDarken,o?d("palette-error-main"):t.error.main,.55)),setColor(t.Switch,"infoDisabledColor",colorMix(private_safeDarken,o?d("palette-info-main"):t.info.main,.55)),setColor(t.Switch,"successDisabledColor",colorMix(private_safeDarken,o?d("palette-success-main"):t.success.main,.55)),setColor(t.Switch,"warningDisabledColor",colorMix(private_safeDarken,o?d("palette-warning-light"):t.warning.main,.55)),setColor(t.TableCell,"border",colorMix(private_safeDarken,private_safeAlpha(o?d("palette-divider"):t.divider,1),.68)),setColor(t.Tooltip,"bg",colorMix(private_safeAlpha,o?d("palette-grey-700"):t.grey[700],.92))}o||(setColorChannel(t.background,"default"),setColorChannel(t.background,"paper"),setColorChannel(t.common,"background"),setColorChannel(t.common,"onBackground"),setColorChannel(t,"divider")),Object.keys(t).forEach(e=>{const g=t[e];"tonalOffset"!==e&&!o&&g&&"object"==typeof g&&(g.main&&setColor(t[e],"mainChannel",private_safeColorChannel(toRgb(g.main))),g.light&&setColor(t[e],"lightChannel",private_safeColorChannel(toRgb(g.light))),g.dark&&setColor(t[e],"darkChannel",private_safeColorChannel(toRgb(g.dark))),g.contrastText&&setColor(t[e],"contrastTextChannel",private_safeColorChannel(toRgb(g.contrastText))),"text"===e&&(setColorChannel(t[e],"primary"),setColorChannel(t[e],"secondary")),"action"===e&&(g.active&&setColorChannel(t[e],"active"),g.selected&&setColorChannel(t[e],"selected")))})}),w=t.reduce((e,t)=>deepmerge(e,t),w);const E={prefix:I,disableCssColorScheme:C,shouldSkipGeneratingVar:a,getSelector:createGetSelector_default(w),enableContrastVars:o},{vars:R,generateThemeVars:M,generateStyleSheets:T}=prepareCssVars(w,E);return w.vars=R,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([e,t])=>{w[e]=t}),w.generateThemeVars=M,w.generateStyleSheets=T,w.generateSpacing=function(){return createSpacing(l.spacing,createUnarySpacing(this))},w.getColorSchemeSelector=createGetColorSchemeSelector(i),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=a,w.unstable_sxConfig={...Fr,...l?.unstable_sxConfig},w.unstable_sx=function(e){return Vr({sx:e,theme:this})},w.internal_cache={},w.toRuntimeSource=stringifyTheme,w}function attachColorScheme(e,t,g){e.colorSchemes&&g&&(e.colorSchemes[t]={...!0!==g&&g,palette:createPalette({...!0===g?{}:g.palette,mode:t})})}function createTheme(e={},...t){const{palette:g,cssVariables:n=!1,colorSchemes:C=(g?void 0:{light:!0}),defaultColorScheme:I=g?.mode,...o}=e,a=I||"light",i=C?.[a],s={...C,...g?{[a]:{..."boolean"!=typeof i&&i,palette:g}}:void 0};if(!1===n){if(!("colorSchemes"in e))return createThemeNoVars(e,...t);let n=g;"palette"in e||s[a]&&(!0!==s[a]?n=s[a].palette:"dark"===a&&(n={mode:"dark"}));const C=createThemeNoVars({...e,palette:n},...t);return C.defaultColorScheme=a,C.colorSchemes=s,"light"===C.palette.mode&&(C.colorSchemes.light={...!0!==s.light&&s.light,palette:C.palette},attachColorScheme(C,"dark",s.dark)),"dark"===C.palette.mode&&(C.colorSchemes.dark={...!0!==s.dark&&s.dark,palette:C.palette},attachColorScheme(C,"light",s.light)),C}return g||"light"in s||"light"!==a||(s.light=!0),createThemeWithVars({...o,colorSchemes:s,defaultColorScheme:a,..."boolean"!=typeof n&&n},...t)}var Dn=createTheme();function useTheme$1(){const e=useTheme$3(Dn);return e.$$material||e}function slotShouldForwardProp(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}var rootShouldForwardProp=e=>slotShouldForwardProp(e)&&"classes"!==e,On=createStyled({themeId:sn,defaultTheme:Dn,rootShouldForwardProp});function ThemeProviderNoVars({theme:e,...t}){const g="$$material"in e?e[sn]:void 0;return(0,gr.jsx)(ThemeProvider$1,{...t,themeId:g?sn:void 0,theme:g||e})}var jn={attribute:"data-mui-color-scheme",colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:zn,useColorScheme:Gn,getInitColorSchemeScript:Ln}=createCssVarsProvider({themeId:sn,theme:()=>createTheme({cssVariables:!0}),colorSchemeStorageKey:jn.colorSchemeStorageKey,modeStorageKey:jn.modeStorageKey,defaultColorScheme:{light:jn.defaultLightColorScheme,dark:jn.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:createTypography(e.palette,e.typography)};return t.unstable_sx=function(e){return Vr({sx:e,theme:this})},t}}),Bn=zn;function ThemeProvider({theme:e,...t}){const g=l.useMemo(()=>{if("function"==typeof e)return e;const t="$$material"in e?e[sn]:e;return"colorSchemes"in t?null:"vars"in t?e:{...e,vars:null}},[e]);return g?(0,gr.jsx)(ThemeProviderNoVars,{theme:g,...t}):(0,gr.jsx)(Bn,{theme:e,...t})}var Fn=generateUtilityClasses("MuiBox",["root"]),Wn=createBox({themeId:sn,defaultTheme:createTheme(),defaultClassName:Fn.root,generateClassName:Kr.generate}),cloneTokens=e=>structuredClone(e),buildHueFilter=e=>`hue-rotate(${e}deg)`,createMuiTheme=(e=Bt)=>{const t=e??Bt;return createTheme({spacing:t.spacing.unit,shape:{borderRadius:t.radius.panel},typography:{fontSize:t.theme.fontSize},palette:{mode:"dark",primary:{main:t.text.accent},background:{default:t.background.primary,paper:t.background.panel},text:{primary:t.text.primary,secondary:t.text.secondary,disabled:t.text.muted},hp:{main:t.game.hp},mp:{main:t.game.mp},ep:{main:t.game.ep},wp:{main:t.game.wp},nl:{main:t.game.nl},timerActive:{main:t.game.timerActive},timerCritical:{main:t.game.timerCritical}},components:{MuiTooltip:{defaultProps:{arrow:!0,placement:"top"}},MuiPaper:{defaultProps:{elevation:0}},MuiButton:{defaultProps:{size:"small"}},MuiSwitch:{defaultProps:{size:"small"}},MuiSlider:{defaultProps:{size:"small"}}},nexGui:{backgroundImage:resolveBackgroundImageSource(t.theme.backgroundImage),backgroundOpacity:t.theme.backgroundOpacity,backgroundFilter:buildHueFilter(t.theme.hue),radius:cloneTokens(t.radius),tokens:cloneTokens(t)}})};function GlobalStyles(e){return(0,gr.jsx)(GlobalStyles$1,{...e,defaultTheme:Dn,themeId:sn})}function globalCss(e){return function(t){return(0,gr.jsx)(GlobalStyles,{styles:"function"==typeof e?g=>e({theme:g,...t}):e})}}var Vn=unstable_memoTheme;function useDefaultProps(e){return useDefaultProps$1(e)}function getPaperUtilityClass(e){return generateUtilityClass("MuiPaper",e)}generateUtilityClasses("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var useUtilityClasses$38=e=>{const{square:t,elevation:g,variant:n,classes:C}=e;return composeClasses({root:["root",n,!t&&"rounded","elevation"===n&&`elevation${g}`]},getPaperUtilityClass,C)},Un=On("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,t[g.variant],!g.square&&t.rounded,"elevation"===g.variant&&t[`elevation${g.elevation}`]]}})(Vn(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Kn=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiPaper"}),n=useTheme$1(),{className:C,component:I="div",elevation:o=1,square:a=!1,variant:i="elevation",...s}=g,l={...g,component:I,elevation:o,square:a,variant:i};return(0,gr.jsx)(Un,{as:I,ownerState:l,className:clsx(useUtilityClasses$38(l).root,C),ref:t,...s,style:{..."elevation"===i&&{"--Paper-shadow":(n.vars||n).shadows[o],...n.vars&&{"--Paper-overlay":n.vars.overlays?.[o]},...!n.vars&&"dark"===n.palette.mode&&{"--Paper-overlay":`linear-gradient(${alpha("#fff",getOverlayAlpha(o))}, ${alpha("#fff",getOverlayAlpha(o))})`}},...s.style}})}),Hn=createStack({createStyledComponent:On("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>useDefaultProps({props:e,name:"MuiStack"})}),Yn=__toESM(er(),1),DefenceTagComponent=({name:e})=>React.createElement(Kn,{className:"defence-tag",elevation:3,sx:{fontFamily:"inherit",fontSize:"inherit",px:.75,py:"2px",textAlign:"center",width:"100%"}},e);DefenceTagComponent.displayName="DefenceTag",DefenceTagComponent.propTypes={name:Yn.default.string.isRequired};var Zn=(0,l.memo)(DefenceTagComponent);Zn.displayName="DefenceTag",Zn.propTypes=DefenceTagComponent.propTypes;var Qn=capitalize;function hasCorrectMainProperty(e){return"string"==typeof e.main}function checkSimplePaletteColorValues(e,t=[]){if(!hasCorrectMainProperty(e))return!1;for(const g of t)if(!e.hasOwnProperty(g)||"string"!=typeof e[g])return!1;return!0}function createSimplePaletteValueFilter(e=[]){return([,t])=>t&&checkSimplePaletteColorValues(t,e)}function getTypographyUtilityClass(e){return generateUtilityClass("MuiTypography",e)}generateUtilityClasses("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom"]);var useUtilityClasses$37=e=>{const{align:t,gutterBottom:g,noWrap:n,variant:C,classes:I}=e;return composeClasses({root:["root",C,"inherit"!==e.align&&`align${Qn(t)}`,g&&"gutterBottom",n&&"noWrap"]},getTypographyUtilityClass,I)},Xn=On("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.variant&&t[g.variant],"inherit"!==g.align&&t[`align${Qn(g.align)}`],g.noWrap&&t.noWrap,g.gutterBottom&&t.gutterBottom]}})(Vn(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([e,t])=>"inherit"!==e&&t&&"object"==typeof t).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>"string"==typeof e).map(([t])=>({props:{color:`text${Qn(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>"inherit"!==e.align,style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}}]}))),_n={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},qn=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiTypography"}),{color:n,align:C="inherit",className:I,component:o,gutterBottom:a=!1,noWrap:i=!1,variant:s="body1",variantMapping:l=_n,...c}=g,u={...g,align:C,color:n,className:I,component:o,gutterBottom:a,noWrap:i,variant:s,variantMapping:l};return(0,gr.jsx)(Xn,{as:o||l[s]||_n[s]||"span",ref:t,className:clsx(useUtilityClasses$37(u).root,I),...c,ownerState:u,style:{..."inherit"!==C&&{"--Typography-textAlign":C},...c.style}})}),getErrorMessage=e=>e instanceof Error&&e.message?e.message:"string"==typeof e&&e.length>0?e:"Unknown panel error.",Jn=class extends l.Component{static displayName="PanelErrorBoundary";static propTypes={children:Yn.default.node,panelName:Yn.default.node.isRequired};static getDerivedStateFromError(e){return{error:e}}constructor(e){super(e),this.state={error:null}}componentDidCatch(){}render(){const{children:e,panelName:t}=this.props,{error:g}=this.state;return g?React.createElement(Wn,{className:"nexgui4-panel-error-boundary",role:"alert",sx:{backgroundColor:"background.paper",border:1,borderColor:"divider",borderRadius:1,color:"text.primary",display:"flex",flex:1,flexDirection:"column",gap:1,minHeight:0,minWidth:0,p:1.5,width:"100%"}},React.createElement(qn,{component:"h2",sx:{fontSize:"0.95rem",fontWeight:700}},t),React.createElement(qn,{color:"text.secondary",variant:"body2"},"This panel failed to render."),React.createElement(qn,{sx:{fontFamily:"monospace",overflowWrap:"anywhere"},variant:"body2"},getErrorMessage(g))):e}},isIterable=e=>Symbol.iterator in e,hasIterableEntries=e=>"entries"in e,compareEntries=(e,t)=>{const g=e instanceof Map?e:new Map(e.entries()),n=t instanceof Map?t:new Map(t.entries());if(g.size!==n.size)return!1;for(const[C,I]of g)if(!n.has(C)||!Object.is(I,n.get(C)))return!1;return!0},compareIterables=(e,t)=>{const g=e[Symbol.iterator](),n=t[Symbol.iterator]();let C=g.next(),I=n.next();for(;!C.done&&!I.done;){if(!Object.is(C.value,I.value))return!1;C=g.next(),I=n.next()}return!!C.done&&!!I.done};function shallow(e,t){return!!Object.is(e,t)||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&Object.getPrototypeOf(e)===Object.getPrototypeOf(t)&&(isIterable(e)&&isIterable(t)?hasIterableEntries(e)&&hasIterableEntries(t)?compareEntries(e,t):compareIterables(e,t):compareEntries({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)}))}function useShallow(e){const t=l.default.useRef(void 0);return g=>{const n=e(g);return shallow(t.current,n)?t.current:t.current=n}}var selectDefenceSlice=e=>({configuredDefences:e.configuredDefences,defences:e.defences,gainDefence:e.gainDefence,loseDefence:e.loseDefence,resetDefences:e.resetDefences,setConfiguredDefences:e.setConfiguredDefences}),useDefence=()=>{const{stores:e}=useNexGui();return e.defence(useShallow(selectDefenceSlice))},getFlipTransform$10=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},DefencesPanelInner=()=>{const e=useTheme$1(),[t]=(0,l.useState)(()=>Math.floor(4*Math.random())),{configuredDefences:g,defences:n}=useDefence(),C=e?.nexGui?.backgroundImage??"",I=e?.nexGui?.backgroundOpacity??.5,o=e?.nexGui?.backgroundFilter??"none",a=new Set(n),i=g.filter(e=>!a.has(e)),s=i.length>0;return React.createElement(Wn,{className:"defences-panel",sx:{color:"text.primary",fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize,height:"100%",overflow:"hidden",position:"relative",width:"100%"}},C?React.createElement(Wn,{"aria-hidden":"true",className:"defences-panel__background",sx:{backgroundImage:`url(${C})`,backgroundPosition:"center",backgroundSize:"cover",filter:o,inset:0,opacity:I,position:"absolute",transform:getFlipTransform$10(t),zIndex:0}}):null,s?React.createElement(Wn,{className:"defences-panel__content",sx:{height:"100%",overflowY:"auto",p:1,position:"relative",width:"100%",zIndex:1}},React.createElement(Kn,{className:"defences-panel__surface",elevation:0,sx:{backgroundColor:alpha(e.palette.background.paper,.78),minHeight:"100%",p:1}},React.createElement(Hn,{spacing:.5,sx:{position:"relative",width:"100%"}},i.map(e=>React.createElement(Zn,{key:e,name:e}))))):null)};DefencesPanelInner.displayName="DefencesPanelInner";var DefencesPanel=()=>React.createElement(Jn,{panelName:"Defences"},React.createElement(DefencesPanelInner,null));function createLazyMeasurementsView(e,t,g){const n=new Array(e);return new Proxy(n,{get(n,C,I){if("string"==typeof C){const I=C.charCodeAt(0);if(I>=48&&I<=57){const I=+C;if(Number.isInteger(I)&&I>=0&&I<e){let e=n[I];if(!e){const C=t[2*I];e=n[I]={index:I,key:g(I),start:C,size:t[2*I+1],end:C+t[2*I+1],lane:0}}return e}}if("length"===C)return e}return Reflect.get(n,C,I)}})}function memo$17(e,t,g){let n,C=g.initialDeps??[],I=!0;function memoizedFunction(){const o=e();return o.length!==C.length||o.some((e,t)=>C[t]!==e)?(C=o,n=t(...o),!(null==g?void 0:g.onChange)||I&&g.skipInitialOnChange||g.onChange(n),I=!1,n):n}return memoizedFunction.updateDeps=e=>{C=e},memoizedFunction}function notUndefined(e,t){if(void 0===e)throw new Error("Unexpected undefined"+(t?`: ${t}`:""));return e}DefencesPanel.displayName="DefencesPanel";var $n,approxEqual=(e,t)=>Math.abs(e-t)<1.01,debounce$2=(e,t,g)=>{let n;return function(...C){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,C),g)}},isIOSWebKit=()=>{if(void 0!==$n)return $n;if("undefined"==typeof navigator)return $n=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return $n=!0;const e=navigator.maxTouchPoints;return $n="MacIntel"===navigator.platform&&void 0!==e&&e>0},getRect=e=>{const{offsetWidth:t,offsetHeight:g}=e;return{width:t,height:g}},defaultKeyExtractor=e=>e,defaultRangeExtractor=e=>{const t=Math.max(e.startIndex-e.overscan,0),g=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,n=new Array(g);for(let C=0;C<g;C++)n[C]=t+C;return n},observeElementRect=(e,t)=>{const g=e.scrollElement;if(!g)return;const n=e.targetWindow;if(!n)return;const handler=e=>{const{width:g,height:n}=e;t({width:Math.round(g),height:Math.round(n)})};if(handler(getRect(g)),!n.ResizeObserver)return()=>{};const C=new n.ResizeObserver(t=>{const run=()=>{const e=t[0];if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0];if(t)return void handler({width:t.inlineSize,height:t.blockSize})}handler(getRect(g))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(run):run()});return C.observe(g,{box:"border-box"}),()=>{C.unobserve(g)}},eA={passive:!0},tA="undefined"==typeof window||"onscrollend"in window,observeOffset=(e,t,g)=>{const n=e.scrollElement;if(!n)return;const C=e.targetWindow;if(!C)return;const I=e.options.useScrollendEvent&&tA;let o=0;const a=I?null:debounce$2(C,()=>t(o,!1),e.options.isScrollingResetDelay),createHandler=e=>()=>{o=g(n),a?.(),t(o,e)},i=createHandler(!0),s=createHandler(!1);return n.addEventListener("scroll",i,eA),I&&n.addEventListener("scrollend",s,eA),()=>{n.removeEventListener("scroll",i),I&&n.removeEventListener("scrollend",s)}},observeElementOffset=(e,t)=>observeOffset(e,t,t=>{const{horizontal:g,isRtl:n}=e.options;return g?t.scrollLeft*(n?-1:1):t.scrollTop}),measureElement=(e,t,g)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return Math.round(e[g.options.horizontal?"inlineSize":"blockSize"])}return e[g.options.horizontal?"offsetWidth":"offsetHeight"]},scrollWithAdjustments=(e,{adjustments:t=0,behavior:g},n)=>{var C,I;null==(I=null==(C=n.scrollElement)?void 0:C.scrollTo)||I.call(C,{[n.options.horizontal?"left":"top"]:e+t,behavior:g})},gA=scrollWithAdjustments,rA=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e,t,g;return(null==(g=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:g.call(t))??Date.now()},this.observer=(()=>{let e=null;const get=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{const run=()=>{const t=e.target,g=this.indexFromElement(t);if(t.isConnected)this.shouldMeasureDuringScroll(g)&&this.resizeItem(g,this.options.measureElement(t,e,this));else{this.observer.unobserve(t);for(const[e,g]of this.elementsCache)if(g===t){this.elementsCache.delete(e);break}}};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(run):run()})}):null);return{disconnect:()=>{var t;null==(t=get())||t.disconnect(),e=null},observe:e=>{var t;return null==(t=get())?void 0:t.observe(e,{box:"border-box"})},unobserve:e=>{var t;return null==(t=get())?void 0:t.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{var t,g;const n={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:defaultKeyExtractor,rangeExtractor:defaultRangeExtractor,onChange:()=>{},measureElement,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate"};for(const a in e){const t=e[a];void 0!==t&&(n[a]=t)}const C=this.options;let I=null,o=null;if(void 0!==C&&C.enabled&&n.enabled&&"end"===n.anchorTo&&null!==this.scrollElement){const e=C.count,a=n.count,i=this.getMeasurements(),s=e>0?(null==(t=i[0])?void 0:t.key)??C.getItemKey(0):null,l=e>0?(null==(g=i[e-1])?void 0:g.key)??C.getItemKey(e-1):null;if(a!==e||e>0&&a>0&&(n.getItemKey(0)!==s||n.getItemKey(a-1)!==l)){const t=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??i[0]:null;t&&(I=[t.key,this.getScrollOffset()-t.start]);const g=!0===n.followOnAppend?"auto":n.followOnAppend||null;g&&a>e&&this.isAtEnd(C.scrollEndThreshold)&&(0===e||n.getItemKey(a-1)!==l)&&(o=g)}}this.options=n,(I||o)&&(this.pendingScrollAnchor=[(null==I?void 0:I[0])??null,(null==I?void 0:I[1])??0,o])},this.notify=e=>{var t,g;null==(g=(t=this.options).onChange)||g.call(t,this,e)},this.maybeNotify=memo$17(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();if(this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{null!==this._intendedScrollOffset&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const e=this.scrollElement,onTouchStart=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},onTouchEnd=()=>{this._iosTouching=!1,isIOSWebKit()&&null!=this.targetWindow&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener("touchstart",onTouchStart,eA),e.addEventListener("touchend",onTouchEnd,eA),this.unsubs.push(()=>{e.removeEventListener("touchstart",onTouchStart),e.removeEventListener("touchend",onTouchEnd),null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const g=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,g&&this.scrollElement&&this.options.enabled){const[e,t,n]=g;if(null!==e){const{count:g,getItemKey:n}=this.options;let C=0;for(;C<g&&n(C)!==e;)C++;const I=C<g?this.getMeasurements()[C]:void 0;if(I){const e=I.start+t-this.getScrollOffset();approxEqual(e,0)||this.applyScrollAdjustment(e)}}n&&this.scrollToEnd({behavior:n})}},this._flushIosDeferredIfReady=()=>{if(0===this._iosDeferredAdjustment)return;if(this.isScrolling)return;if(this._iosTouching)return;if(this._iosJustTouchEnded)return;const e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;const g=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=g,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const g=new Map,n=new Map;for(let C=t-1;C>=0;C--){const t=e[C];if(g.has(t.lane))continue;const I=n.get(t.lane);if(null==I||t.end>I.end?n.set(t.lane,t):t.end<I.end&&g.set(t.lane,!0),g.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=memo$17(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,g,n,C,I,o)=>(void 0!==this.prevLanes&&this.prevLanes!==I&&(this.lanesChangedFlag=!0),this.prevLanes=I,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:g,getItemKey:n,enabled:C,lanes:I,laneAssignmentMode:o}),{key:!1}),this.getMeasurements=memo$17(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:g,getItemKey:n,enabled:C,lanes:I,laneAssignmentMode:o},a)=>{const i=this.itemSizeCache;if(!C)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(const u of this.laneAssignments.keys())u>=e&&this.laneAssignments.delete(u);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));const s=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),1===I){const C=this.options.gap,I=2*e;let o,a=this._flatMeasurements;if(!a||a.length<I){const e=new Float64Array(I);a&&s>0&&e.set(a.subarray(0,2*s)),a=e,this._flatMeasurements=a}if(0===s)o=t+g;else{const e=s-1;o=a[2*e]+a[2*e+1]+C}for(let t=s;t<e;t++){const e=n(t),g=i.get(e),I="number"==typeof g?g:this.options.estimateSize(t);a[2*t]=o,a[2*t+1]=I,o+=I+C}const l=createLazyMeasurementsView(e,a,n);return this.measurementsCache=l,l}const l=this.measurementsCache.slice(0,s),c=new Array(I).fill(void 0);for(let u=0;u<s;u++){const e=l[u];e&&(c[e.lane]=u)}for(let u=s;u<e;u++){const e=n(u),C=this.laneAssignments.get(u);let I,a;const s="estimate"===o||i.has(e);if(void 0!==C&&this.options.lanes>1){I=C;const e=c[I],n=void 0!==e?l[e]:void 0;a=n?n.end+this.options.gap:t+g}else{const e=1===this.options.lanes?l[u-1]:this.getFurthestMeasurement(l,u);a=e?e.end+this.options.gap:t+g,I=e?e.lane:u%this.options.lanes,this.options.lanes>1&&s&&this.laneAssignments.set(u,I)}const d=i.get(e),p="number"==typeof d?d:this.options.estimateSize(u),m=a+p;l[u]={index:u,start:a,size:p,end:m,key:e,lane:I},c[I]=u}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=memo$17(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,g,n)=>this.range=e.length>0&&t>0?calculateRange({measurements:e,outerSize:t,scrollOffset:g,lanes:n,flat:1===n&&null!=this._flatMeasurements?this._flatMeasurements:null}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=memo$17(()=>{let e=null,t=null;const g=this.calculateRange();return g&&(e=g.startIndex,t=g.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,g,n,C)=>null===n||null===C?[]:e({startIndex:n,endIndex:C,overscan:t,count:g}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,g=e.getAttribute(t);return g?parseInt(g,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;const g=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==g&&this.range){const t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),n=Math.max(0,g-t),C=Math.min(this.options.count-1,g+t);return e>=n&&e<=C}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});const t=this.indexFromElement(e),g=this.options.getItemKey(t),n=this.elementsCache.get(g);n!==e&&(n&&this.observer.unobserve(n),this.observer.observe(e),this.elementsCache.set(g,e)),this.isScrolling&&!this.scrollState||!this.shouldMeasureDuringScroll(t)||this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var g,n;if(e<0||e>=this.options.count)return;let C,I,o;const a=this._flatMeasurements;if(1===this.options.lanes&&null!==a)o=this.options.getItemKey(e),I=a[2*e],C=a[2*e+1];else{const t=this.measurementsCache[e];if(!t)return;o=t.key,I=t.start,C=t.size}const i=t-(this.itemSizeCache.get(o)??C);if(0!==i){const a="end"===this.options.anchorTo&&"smooth"!==(null==(g=this.scrollState)?void 0:g.behavior)&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,s=a?this.getTotalSize():0,l="smooth"!==(null==(n=this.scrollState)?void 0:n.behavior)&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:o,start:I,size:C,end:I+C,lane:0},i,this):I<this.getScrollOffset()+this.scrollAdjustments&&"backward"!==this.scrollDirection);(null===this.pendingMin||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(o,t),this.itemSizeCacheVersion++,a?this.applyScrollAdjustment(this.getTotalSize()-s):l&&this.applyScrollAdjustment(i),this.notify(!1)}},this.getVirtualItems=memo$17(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{const g=[];for(let n=0,C=e.length;n<C;n++){const C=t[e[n]];g.push(C)}return g},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0===t.length)return;const g=this._flatMeasurements,n=1===this.options.lanes&&null!=g;return notUndefined(t[findNearestBinarySearch(0,t.length-1,n?e=>g[2*e]:e=>notUndefined(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,g=0)=>{if(!this.scrollElement)return 0;const n=this.getSize(),C=this.getScrollOffset();"auto"===t&&(t=e>=C+n?"end":"start"),"center"===t?e+=(g-n)/2:"end"===t&&(e-=n);const I=this.getMaxScrollOffset();return Math.max(Math.min(I,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const g=this.getSize(),n=this.getScrollOffset(),C=this.measurementsCache[e];if(!C)return;if("auto"===t)if(C.end>=n+g-this.options.scrollPaddingEnd)t="end";else{if(!(C.start<=n+this.options.scrollPaddingStart))return[n,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];const I="end"===t?C.end+this.options.scrollPaddingEnd:C.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(I,t,C.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:g="auto"}={})=>{const n=this.getOffsetForAlignment(e,t),C=this.now();this.scrollState={index:null,align:t,behavior:g,startedAt:C,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:g}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:g="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=this.getOffsetForIndex(e,t);if(!n)return;const[C,I]=n,o=this.now();this.scrollState={index:e,align:I,behavior:g,startedAt:o,lastTargetOffset:C,stableFrames:0},this._scrollToOffset(C,{adjustments:void 0,behavior:g}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{const g=this.getScrollOffset()+e,n=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:n,lastTargetOffset:g,stableFrames:0},this._scrollToOffset(g,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e="auto"}={})=>{this.options.count>0?this.scrollToIndex(this.options.count-1,{align:"end",behavior:e}):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let g;if(0===t.length)g=this.options.paddingStart;else if(1===this.options.lanes){const n=t.length-1,C=this._flatMeasurements;g=null!=C?C[2*n]+C[2*n+1]:(null==(e=t[n])?void 0:e.end)??0}else{const e=Array(this.options.lanes).fill(null);let n=t.length-1;for(;n>=0&&e.some(e=>null===e);){const g=t[n];null===e[g.lane]&&(e[g.lane]=g.end),n--}g=Math.max(...e.filter(e=>null!==e))}return Math.max(g-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const e=[];if(0===this.itemSizeCache.size)return e;const t=this.getMeasurements();for(const g of t)g&&this.itemSizeCache.has(g.key)&&e.push({index:g.index,key:g.key,start:g.start,size:g.size,end:g.end,lane:g.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:g})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:g,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){0!==e&&(isIOSWebKit()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}))}scheduleScrollReconcile(){this.targetWindow?null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})):this.scrollState=null}reconcileScroll(){if(!this.scrollState)return;if(!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3)return void(this.scrollState=null);const e=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=e?e[0]:this.scrollState.lastTargetOffset,g=1,n=t!==this.scrollState.lastTargetOffset;if(!n&&approxEqual(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=g)return this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}),void(this.scrollState=null)}else if(this.scrollState.stableFrames=0,n){const e=this.getSize()||600,g=Math.abs(t-this.getScrollOffset()),n="smooth"===this.scrollState.behavior&&g>e;this.scrollState.lastTargetOffset=t,n||(this.scrollState.behavior="auto"),this._scrollToOffset(t,{adjustments:void 0,behavior:n?"smooth":"auto"})}this.scheduleScrollReconcile()}},findNearestBinarySearch=(e,t,g,n)=>{for(;e<=t;){const C=(e+t)/2|0,I=g(C);if(I<n)e=C+1;else{if(!(I>n))return C;t=C-1}}return e>0?e-1:0};function calculateRange({measurements:e,outerSize:t,scrollOffset:g,lanes:n,flat:C}){const I=e.length-1,o=C?e=>C[2*e]:t=>e[t].start,a=C?e=>C[2*e]+C[2*e+1]:t=>e[t].end;if(e.length<=n)return{startIndex:0,endIndex:I};let i=findNearestBinarySearch(0,I,o,g),s=i;if(1===n)for(;s<I&&a(s)<g+t;)s++;else if(n>1){const C=Array(n).fill(0);for(;s<I&&C.some(e=>e<g+t);){const t=e[s];C[t.lane]=t.end,s++}const o=Array(n).fill(g+t);for(;i>=0&&o.some(e=>e>=g);){const t=e[i];o[t.lane]=t.start,i--}i=Math.max(0,i-i%n),s=Math.min(I,s+(n-1-s%n))}return{startIndex:i,endIndex:s}}var nA="undefined"!=typeof document?l.useLayoutEffect:l.useEffect;function useVirtualizerBase({useFlushSync:e=!0,...t}){const g=l.useReducer(e=>e+1,0)[1],n={...t,onChange:(n,C)=>{var I;e&&C?(0,c.flushSync)(g):g(),null==(I=t.onChange)||I.call(t,n,C)}},[C]=l.useState(()=>new rA(n));return C.setOptions(n),nA(()=>C._didMount(),[]),nA(()=>C._willUpdate()),C}function useVirtualizer(e){return useVirtualizerBase({observeElementRect,observeElementOffset,scrollToFn:gA,...e})}var AA=1,CA=24,IA=8,noop$5=()=>{},denyScrollPositionAdjustment=()=>!1,defaultEstimateSize=()=>48,defaultGetItemKey=(e,t)=>e?.id??t,joinClassNames=(...e)=>e.filter(Boolean).join(" "),getVirtualItemEnd=e=>Number.isFinite(e?.end)?e.end:Number.isFinite(e?.size)?e.start+e.size:e?.start??0,getElementWidth=(e,t=null)=>{const g=t?.contentRect?.width??e.getBoundingClientRect?.().width??e.clientWidth;return Number.isFinite(g)?g:0},getVerticalScrollbarGutterWidth=e=>{if(!e)return 0;const t=Number(e.offsetWidth),g=Number(e.clientWidth);return Number.isFinite(t)&&Number.isFinite(g)?Math.max(0,t-g):0},isNearBottom=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=CA,isPinnedToDisplayTail=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=AA,TranscriptViewportComponent=({items:e,renderItem:t,getItemKey:g=defaultGetItemKey,itemKeyVersion:n=null,displayPinKey:C=null,estimateSize:I=defaultEstimateSize,overscan:o=5,fontFamily:a="inherit",fontSize:i,border:s=!1,mode:c="panel",onRequestHistory:u=noop$5,onScrollLockChange:d=noop$5,activeMatchIndex:p=-1,footer:m=null,fallbackToAllItems:h=!1,onSendCommand:y=noop$5,showScrollLockBadge:b=!1,viewportSx:v,viewportTestId:x="virtual-scroll-viewport"},S)=>{const w=(0,l.useRef)(null),E=(0,l.useRef)(null),R=(0,l.useRef)({animationFrame:0,width:null}),M=(0,l.useRef)(e),T=(0,l.useRef)(g),P=(0,l.useRef)({getItemKey:null,itemKeyRevision:null,lookup:null}),[N,D]=(0,l.useState)(!1),[O,j]=(0,l.useState)(0),[G,L]=(0,l.useState)(0),B="display"===c,F=parseFontSize(i);M.current=e,T.current=g;const W=n??e;P.current.getItemKey===g&&P.current.itemKeyRevision===W||(P.current={getItemKey:g,itemKeyRevision:W,lookup:e=>T.current(M.current[e],e)});const V=P.current.lookup,U=(0,l.useCallback)(()=>w.current,[]),K=useVirtualizer({count:e.length,initialRect:{height:400,width:0},getScrollElement:U,estimateSize:I,getItemKey:V,overscan:o,shouldAdjustScrollPositionOnItemSizeChange:B?void 0:denyScrollPositionAdjustment}),H=K.getTotalSize(),Y=K.getVirtualItems(),Z=Y[0]??null,Q=Y.at(-1)??null,X=Z?Math.max(0,Z.start):0,_=Q?Math.max(0,H-getVirtualItemEnd(Q)):0,q=h&&0===Y.length&&e.length>0,J=joinClassNames("nexgui4-transcript-spacer",!q&&(B?"nexgui4-transcript-spacer--display":"nexgui4-transcript-spacer--panel")),$=q?void 0:B?0===Y.length?{height:`${H}px`}:{paddingBottom:`${_}px`,paddingTop:`${X}px`}:{height:`${H}px`},ee=null==i?void 0:"number"==typeof i?`${i}px`:i,te=joinClassNames("nexgui4-transcript-scroll-viewport",B?"nexgui4-transcript-scroll-viewport--display":"nexgui4-transcript-scroll-viewport--panel"),ge={fontFamily:a,fontSize:ee},re={right:`${IA+O}px`},ne=(0,l.useCallback)(e=>{const t=getVerticalScrollbarGutterWidth(e);j(e=>e===t?e:t)},[]),Ae=(0,l.useCallback)(()=>{const e=w.current;e&&(e.scrollTop=e.scrollHeight)},[]);(0,l.useImperativeHandle)(S,()=>({scrollToBottom:Ae,scrollToIndex:(e,t)=>K.scrollToIndex(e,t)}),[K,Ae]),(0,l.useLayoutEffect)(()=>{if(!B)return void(E.current=null);const t=w.current;if(!t)return;const g={itemCount:e.length,scrollHeight:t.scrollHeight,totalSize:H},n=E.current;null!=n&&n.itemCount===g.itemCount&&n.scrollHeight===g.scrollHeight&&n.totalSize===g.totalSize&&isPinnedToDisplayTail(t)||(t.scrollTop=t.scrollHeight,E.current=g)},[C,G,B,e.length,H]),(0,l.useLayoutEffect)(()=>{B||N||0===e.length||K.scrollToIndex(e.length-1,{align:"end"})},[B,N,e.length,K]),(0,l.useLayoutEffect)(()=>{const e=K.measure,t=window.ResizeObserver,g=R.current;if(!B)return g.width=null,void(g.animationFrame&&(window.cancelAnimationFrame(g.animationFrame),g.animationFrame=0));const n=w.current;if(!n||"function"!=typeof e||"function"!=typeof t)return;g.width=getElementWidth(n);const scheduleMeasure=t=>{g.width!==t&&(g.width=t,g.animationFrame&&window.cancelAnimationFrame(g.animationFrame),g.animationFrame=window.requestAnimationFrame(()=>{g.animationFrame=0,e(),L(e=>e+1)}))},C=new t(e=>{scheduleMeasure(getElementWidth(n,e[0]))});return C.observe(n),()=>{C.disconnect(),g.animationFrame&&(window.cancelAnimationFrame(g.animationFrame),g.animationFrame=0)}},[B,K]),(0,l.useLayoutEffect)(()=>{if(B)return void j(0);const e=w.current;if(!e)return;ne(e);const t=window.ResizeObserver;if("function"!=typeof t)return;const g=new t(()=>{ne(e)});return g.observe(e),()=>{g.disconnect()}},[B,ne]),(0,l.useLayoutEffect)(()=>{B||ne(w.current)},[B,e.length,H,ne]),(0,l.useEffect)(()=>{0===e.length&&D(!1)},[e.length]),(0,l.useEffect)(()=>{d(N)},[N,d]);const Ce=(0,l.useCallback)(e=>{if(B)return;ne(e.currentTarget);const t=!isNearBottom(e.currentTarget);D(e=>e===t?e:t)},[B,ne]);(0,l.useEffect)(()=>{const e=w.current;if(!e)return;const handleWheel=e=>{!B||e.deltaY>=0||(e.preventDefault(),u())};return e.addEventListener("wheel",handleWheel,{passive:!1}),()=>e.removeEventListener("wheel",handleWheel)},[B,u]);const Ie=(0,l.useCallback)(e=>{if(!(e.target instanceof Element))return;const t=e.target.closest("a");if(!t||!e.currentTarget.contains(t))return;if(t.classList.contains("url_link"))return;const g=t.getAttribute("rel");g&&(e.preventDefault(),y(g))},[y]);return React.createElement(Wn,{component:"section",sx:{border:s?1:0,borderColor:"divider",borderRadius:s?1:0,display:"flex",flex:1,flexDirection:"column",minHeight:0,position:"relative"}},b&&N?React.createElement(Wn,{component:"div","data-testid":"scroll-lock-badge",role:"status",style:re,sx:{backgroundColor:"background.paper",border:1,borderColor:"divider",borderRadius:1,boxShadow:1,color:"text.secondary",fontSize:"0.75rem",px:1,py:.5,position:"absolute",top:8,zIndex:2}},"Scroll lock"):null,React.createElement(Wn,{className:te,component:"div",onClick:Ie,"data-testid":x,onScroll:Ce,ref:w,style:ge,sx:v},React.createElement("div",{className:J,"data-testid":"virtual-scroll-spacer",style:$},q?e.map((e,n)=>React.createElement("div",{className:"nexgui4-transcript-row","data-index":n,key:g(e,n)},t(e,{fontSize:F,index:n,isActiveMatch:n===p}))):Y.map(g=>{const n=e[g.index];return null==n?null:React.createElement("div",{className:joinClassNames("nexgui4-transcript-row",B?"nexgui4-transcript-row--display":"nexgui4-transcript-row--panel"),"data-index":g.index,key:g.key,ref:K.measureElement,style:B?void 0:{transform:`translateY(${g.start}px)`}},t(n,{fontSize:F,index:g.index,isActiveMatch:g.index===p}))})),m))};TranscriptViewportComponent.displayName="TranscriptViewport",TranscriptViewportComponent.propTypes={activeMatchIndex:Yn.default.number,border:Yn.default.bool,displayPinKey:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),estimateSize:Yn.default.func,fallbackToAllItems:Yn.default.bool,fontFamily:Yn.default.string,fontSize:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),footer:Yn.default.node,getItemKey:Yn.default.func,itemKeyVersion:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),items:Yn.default.array.isRequired,mode:Yn.default.oneOf(["panel","display"]),onRequestHistory:Yn.default.func,onSendCommand:Yn.default.func,onScrollLockChange:Yn.default.func,overscan:Yn.default.number,renderItem:Yn.default.func.isRequired,showScrollLockBadge:Yn.default.bool,viewportSx:Yn.default.oneOfType([Yn.default.array,Yn.default.func,Yn.default.object]),viewportTestId:Yn.default.string};var oA=(0,l.forwardRef)(TranscriptViewportComponent);oA.displayName="TranscriptViewport",oA.propTypes=TranscriptViewportComponent.propTypes;var padTwo=e=>String(e).padStart(2,"0"),padThree=e=>String(e).padStart(3,"0"),formatNumericTimestamp=(e,t=!0)=>{const g=new Date(e),n=[padTwo(g.getHours()),padTwo(g.getMinutes()),padTwo(g.getSeconds())].join(":");return t?`${n}.${padThree(g.getMilliseconds())}`:n},resolveLabel=(e,t)=>"string"==typeof e&&e.length>0?e:Number.isFinite(e)?formatNumericTimestamp(e,t):null,resolveDateTime=e=>Number.isFinite(e)?new Date(e).toISOString():void 0,TimestampComponent=({timestamp:e,fontFamily:t=Ee,fontSize:g,highlight:n=!1,className:C="ng-timestamp timestamp mono no_out",includeMilliseconds:I=!0})=>{const o=resolveLabel(e,I);return null===o?null:React.createElement("time",{className:C,dateTime:resolveDateTime(e),style:n?{backgroundColor:"yellow",fontFamily:t,fontSize:g}:{fontFamily:t,fontSize:g}},o)};TimestampComponent.displayName="Timestamp",TimestampComponent.propTypes={className:Yn.default.string,fontFamily:Yn.default.string,fontSize:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),highlight:Yn.default.bool,includeMilliseconds:Yn.default.bool,timestamp:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired};var aA=(0,l.memo)(TimestampComponent);aA.displayName="Timestamp",aA.propTypes=TimestampComponent.propTypes;var iA=Yn.default.shape({content:Yn.default.node,id:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),isHtml:Yn.default.bool,timestamp:Yn.default.number}),renderContent=(e,t)=>null==e||!1===e?null:(0,l.isValidElement)(e)?e:t?React.createElement(qn,{component:"span",sx:{color:"text.primary",display:"inline",lineHeight:1.5},variant:"body2",dangerouslySetInnerHTML:{__html:e}}):React.createElement(qn,{component:"span",sx:{color:"text.primary",display:"inline",lineHeight:1.5},variant:"body2"},e),FeedEntryComponent=({entry:e,fontSize:t})=>React.createElement(Wn,{className:"feed-entry","data-feed-entry-id":e.id??void 0,sx:{alignItems:"flex-start",columnGap:1,display:"flex",minWidth:0,py:.5,width:"100%"}},Number.isFinite(e.timestamp)?React.createElement(aA,{timestamp:e.timestamp,fontSize:t,includeMilliseconds:!1}):null,React.createElement(Wn,{className:"feed-entry__content",sx:{flex:1,minWidth:0,overflowWrap:"anywhere"}},renderContent(e.content,e.isHtml)));FeedEntryComponent.displayName="FeedEntry",FeedEntryComponent.propTypes={entry:iA.isRequired,fontSize:Yn.default.oneOfType([Yn.default.number,Yn.default.string])};var sA=(0,l.memo)(FeedEntryComponent);sA.displayName="FeedEntry",sA.propTypes=FeedEntryComponent.propTypes;var getFlipTransform$9=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},PanelBackgroundComponent=({backgroundClassName:e,children:t=null,component:g="div",contentClassName:n,contentSx:C,sx:I,...o})=>{const a=useTheme$1(),[i]=(0,l.useState)(()=>Math.floor(4*Math.random())),s=a?.nexGui?.backgroundImage??"",c=a?.nexGui?.backgroundOpacity??.5,u=a?.nexGui?.backgroundFilter??"none";return React.createElement(Wn,{component:g,sx:[{display:"flex",flex:1,height:"100%",minHeight:0,minWidth:0,overflow:"hidden",position:"relative",width:"100%"},I],...o},s?React.createElement(Wn,{"aria-hidden":"true",className:e,sx:{backgroundImage:`url(${s})`,backgroundPosition:"center",backgroundSize:"cover",filter:u,inset:0,opacity:c,position:"absolute",transform:getFlipTransform$9(i),zIndex:0}}):null,React.createElement(Wn,{className:n,sx:[{display:"flex",flex:1,minHeight:0,minWidth:0,position:"relative",zIndex:1},C]},t))};PanelBackgroundComponent.displayName="PanelBackground",PanelBackgroundComponent.propTypes={backgroundClassName:Yn.default.string,children:Yn.default.node,component:Yn.default.elementType,contentClassName:Yn.default.string,contentSx:Yn.default.oneOfType([Yn.default.array,Yn.default.func,Yn.default.object]),sx:Yn.default.oneOfType([Yn.default.array,Yn.default.func,Yn.default.object])};var lA=(0,l.memo)(PanelBackgroundComponent);lA.displayName="PanelBackground",lA.propTypes=PanelBackgroundComponent.propTypes;var noopSubscribe$1=()=>()=>{},getModelVersion$1=e=>"function"==typeof e?.getVersion?e.getVersion():0,selectEntries=e=>e.entries,colorEntry=(e,t)=>{if("string"!=typeof e?.content||0===e.content.length||"function"!=typeof t)return e;const{content:g,isHtml:n}=t(e.content);return g!==e.content||n?{...e,content:g,isHtml:n}:e},useFeed=()=>{const{stores:e,playerDirectory:t,playerRelationships:g,formatInlineNames:n}=useNexGui(),C=e.feed(selectEntries),I=(0,l.useMemo)(()=>({subscribe:e=>{const n=t?.subscribePlayerDirectory?.(e)??noopSubscribe$1(),C=g?.subscribePlayerRelationships?.(e)??noopSubscribe$1();return()=>{n?.(),C?.()}},getSnapshot:()=>`${getModelVersion$1(t)}:${getModelVersion$1(g)}`}),[t,g]),o=(0,l.useSyncExternalStore)(I.subscribe,I.getSnapshot,I.getSnapshot),a=(0,l.useRef)(null);return null===a.current&&(a.current=new WeakMap),{entries:(0,l.useMemo)(()=>{const e=a.current;return C.map(t=>{if(null===t||"object"!=typeof t)return t;const g=e.get(t);if(g&&g.version===o)return g.value;const C=colorEntry(t,n);return g&&g.value.content===C.content&&g.value.isHtml===C.isHtml?(e.set(t,{version:o,value:g.value}),g.value):(e.set(t,{version:o,value:C}),C)})},[C,o,n])}},GameFeedInner=()=>{const e=useTheme$1(),{entries:t}=useFeed(),g=t.at(-1)?.id??t.length,n=(0,l.useCallback)((e,{fontSize:t}={})=>React.createElement(sA,{entry:e,fontSize:t}),[]);return 0===t.length?React.createElement(lA,{backgroundClassName:"game-feed__background",className:"game-feed game-feed--empty",contentClassName:"game-feed__content",contentSx:{alignItems:"center",color:"text.secondary",justifyContent:"center",p:2}},React.createElement(qn,{variant:"body2"},"No feed entries")):React.createElement(lA,{backgroundClassName:"game-feed__background",className:"game-feed",contentClassName:"game-feed__content",contentSx:{minHeight:0}},React.createElement(oA,{itemKeyVersion:g,items:t,fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize,renderItem:n,showScrollLockBadge:!1,viewportSx:{p:1}}))};GameFeedInner.displayName="GameFeedInner";var GameFeed=()=>React.createElement(Jn,{panelName:"GameFeed"},React.createElement(GameFeedInner,null));GameFeed.displayName="GameFeed";var noop$4=()=>{},cA="nexgui4-structured-stream-panel__timestamp ng-timestamp timestamp mono no_out",uA=Yn.default.shape({hasMXP:Yn.default.bool.isRequired,html:Yn.default.string.isRequired,id:Yn.default.number.isRequired,timestamp:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired}),buildLineClassName$1=e=>["nexgui4-structured-stream-panel__line",e.isMonospace?"mono":null].filter(Boolean).join(" "),StructuredStreamRowComponent=({line:e,onSendCommand:t=noop$4})=>{const handleMXP=e=>{if(!(e.target instanceof Element))return;const g=e.target.closest("a");if(!g||!e.currentTarget.contains(g))return;if(g.classList.contains("url_link"))return;const n=g.getAttribute("rel");n&&(e.preventDefault(),t(n))};return React.createElement(Wn,{component:"div",className:buildLineClassName$1(e),"data-stream-entry-id":e.id,onClick:e.hasMXP?handleMXP:null,sx:{alignItems:"baseline",columnGap:"0.5rem",display:"grid",gridTemplateColumns:"12ch minmax(0, 1fr)",minWidth:0,width:"100%",zIndex:1,"& .nexgui4-structured-stream-panel__payload":{minWidth:0,overflowWrap:"anywhere"},"& .nexgui4-stream-row":{alignItems:"baseline",display:"grid",gridTemplateColumns:"auto minmax(0, 1fr)",columnGap:"0.5rem",width:"100%"},"& .nexgui4-replacement-row":{width:"100%"}}},React.createElement(aA,{className:cA,fontFamily:"inherit",timestamp:e.timestamp}),React.createElement(Wn,{component:"span",className:"nexgui4-structured-stream-panel__payload",dangerouslySetInnerHTML:{__html:e.html}}))};StructuredStreamRowComponent.displayName="StructuredStreamRow",StructuredStreamRowComponent.propTypes={line:uA.isRequired,onSendCommand:Yn.default.func};var dA=(0,l.memo)(StructuredStreamRowComponent);dA.displayName="StructuredStreamRow",dA.propTypes=StructuredStreamRowComponent.propTypes;var StructuredStreamPanelComponent=({items:e,itemKeyVersion:t=null,onSendCommand:g=noop$4})=>{const n=useTheme$1(),C=(0,l.useCallback)(e=>React.createElement(dA,{line:e,onSendCommand:g}),[g]);return React.createElement(lA,{backgroundClassName:"nexgui4-structured-stream-panel__background",component:"section",contentClassName:"nexgui4-structured-stream-panel__content",contentSx:{color:"text.primary",fontFamily:"inherit",fontSize:"inherit"},"data-testid":"structured-stream-panel"},React.createElement(oA,{fontFamily:n.typography.fontFamily,fontSize:n.typography.fontSize,itemKeyVersion:t,items:e,renderItem:C,showScrollLockBadge:!1,viewportSx:{p:"5px"}}))};StructuredStreamPanelComponent.displayName="StructuredStreamPanel",StructuredStreamPanelComponent.propTypes={itemKeyVersion:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),items:Yn.default.arrayOf(uA).isRequired,onSendCommand:Yn.default.func};var pA=(0,l.memo)(StructuredStreamPanelComponent);pA.displayName="StructuredStreamPanel",pA.propTypes=StructuredStreamPanelComponent.propTypes;var mA=new WeakMap,assertTranscriptModel=e=>{if(!e||"function"!=typeof e.subscribe||"function"!=typeof e.getSnapshot)throw new Error("useTranscript requires a transcript model with subscribe(listener) and getSnapshot().")},getTranscriptModelBindings=e=>{assertTranscriptModel(e);let t=mA.get(e);if(!t){const subscribe=t=>e.subscribe(t),getSnapshot=()=>e.getSnapshot();t=Object.freeze({subscribe,getSnapshot}),mA.set(e,t)}return t},useTranscript=e=>{const{subscribe:t,getSnapshot:g}=getTranscriptModelBindings(e),n=(0,l.useSyncExternalStore)(t,g,g);return{version:n.version,items:n.items,totalLines:n.totalLines}},CombatStreamInner=()=>{const{adapter:e,stores:t}=useNexGui(),{items:g,version:n}=useTranscript(t.combatStream),C=(0,l.useCallback)(t=>e.send(t),[e]);return React.createElement(pA,{itemKeyVersion:n,items:g,onSendCommand:C})};CombatStreamInner.displayName="CombatStreamInner";var CombatStream=()=>React.createElement(Jn,{panelName:"Combat Stream"},React.createElement(CombatStreamInner,null));function useForkRef(...e){const t=l.useRef(void 0),g=l.useCallback(t=>{const g=e.map(e=>{if(null==e)return null;if("function"==typeof e){const g=e,n=g(t);return"function"==typeof n?n:()=>{g(null)}}return e.current=t,()=>{e.current=null}});return()=>{g.forEach(e=>e?.())}},e);return l.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=g(e))},e)}function isHostComponent(e){return"string"==typeof e}function appendOwnerState(e,t,g){return void 0===e||isHostComponent(e)?t:{...t,ownerState:{...t.ownerState,...g}}}function isEventHandler(e,t){const g=e.charCodeAt(2);return"o"===e[0]&&"n"===e[1]&&g>=65&&g<=90&&"function"==typeof t}function extractEventHandlers(e){if(void 0===e)return{};const t={};for(const g of Object.keys(e))isEventHandler(g,e[g])&&(t[g]=e[g]);return t}function omitEventHandlers(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(g=>{t[g]=e[g]}),t}function mergeSlotProps$1(e){const{getSlotProps:t,additionalProps:g,externalSlotProps:n,externalForwardedProps:C,className:I}=e;if(!t){const e=clsx(g?.className,I,C?.className,n?.className),t={...g?.style,...C?.style,...n?.style},o={...g,...C,...n};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}const o=extractEventHandlers({...C,...n}),a=omitEventHandlers(n),i=omitEventHandlers(C),s=t(o),l=clsx(s?.className,g?.className,I,C?.className,n?.className),c={...s?.style,...g?.style,...C?.style,...n?.style},u={...s,...g,...i,...a};return l.length>0&&(u.className=l),Object.keys(c).length>0&&(u.style=c),{props:u,internalRef:s.ref}}function resolveComponentProps(e,t,g){return"function"==typeof e?e(t,g):e}function useSlotProps(e){const{elementType:t,externalSlotProps:g,ownerState:n,skipResolvingSlotProps:C=!1,...I}=e,o=C?{}:resolveComponentProps(g,n),{props:a,internalRef:i}=mergeSlotProps$1({...I,externalSlotProps:o});return appendOwnerState(t,{...a,ref:useForkRef(i,o?.ref,e.additionalProps?.ref)},n)}CombatStream.displayName="CombatStream";var fA=l.createContext(void 0);function useRovingTabIndexContext(){const e=l.useContext(fA);if(void 0===e)throw new Error("MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.");return e}var hA=Object.is;function fastObjectShallowCompare(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let g=0,n=0;for(const C in e){if(g+=1,!hA(e[C],t[C]))return!1;if(!(C in t))return!1}for(const C in t)n+=1;return g===n}function activeElement(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function ownerDocument(e){return e&&e.ownerDocument||document}function setRef(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function useEventCallback(e){const t=l.useRef(e);return Qr(()=>{t.current=e}),l.useRef((...e)=>(0,t.current)(...e)).current}var yA=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End"];function useRovingTabIndexRoot(e){const{activeItemId:t,getDefaultActiveItemId:g,orientation:n,isRtl:C=!1,isItemFocusable:I=isItemFocusable,wrap:o=!0}=e,[a,i]=l.useState(t),s=l.useRef(t);let c=a;t!==s.current&&(s.current=t,void 0!==t&&t!==a&&(c=t,i(t)));const u=l.useRef(null),d=l.useRef(new Map),[p,m]=l.useState(0),h=resolveActiveItemId(c,l.useMemo(()=>getOrderedItems(d.current),[p]),I,g),y=l.useRef(h);y.current=h;const b=l.useCallback(()=>{const e=getOrderedItems(d.current);return getItemById(e,resolveActiveItemId(y.current,e,I,g))},[g,I]),v=l.useCallback(()=>d.current,[]),x=useEventCallback(e=>{fastObjectShallowCompare(d.current.get(e.id)??null,e)||(d.current.set(e.id,e),m(e=>e+1))}),S=useEventCallback(e=>{d.current.delete(e)&&m(e=>e+1)}),w=useEventCallback(e=>{i(e)}),E=l.useCallback(e=>y.current===e,[]),R=l.useCallback((e,t,g,n)=>{const C=getNextActiveItem(getNavigableItemsSnapshot(d.current),e,t,g,n??I);return C?(C.element?.focus(),i(C.id),C):null},[I]),M=l.useCallback(e=>({onFocus:e=>{const t=getNavigableItemsSnapshot(d.current),g=findItemIndexByElement(t,e.target);-1!==g&&i(t[g].id)},onKeyDown:e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;if(!yA.includes(e.key))return;let t="horizontal"===n?"ArrowLeft":"ArrowUp",g="horizontal"===n?"ArrowRight":"ArrowDown";"horizontal"===n&&C&&(t="ArrowRight",g="ArrowLeft");const I=getNavigableItemsSnapshot(d.current),a=activeElement(ownerDocument(u.current)),i=a===u.current;let s=getCurrentActiveItemIndex(I,a,y.current),l="next";switch(e.key){case t:l="previous",e.preventDefault(),i&&(s=I.length);break;case g:e.preventDefault(),i&&(s=-1);break;case"Home":e.preventDefault(),s=-1;break;case"End":e.preventDefault(),l="previous",s=I.length;break;default:return}R(s,l,o)},ref:handleRefs(e,e=>{u.current=e})}),[R,C,n,o]),T=l.useCallback(e=>{const t=getNavigableItemsSnapshot(d.current),g=activeElement(ownerDocument(u.current));return R(g===u.current?-1:getCurrentActiveItemIndex(t,g,y.current),"next",!0,e)?.id??null},[R]);return l.useMemo(()=>({activeItemId:h,focusNext:T,getActiveItem:b,getContainerProps:M,getItemMap:v,isItemActive:E,registerItem:x,setActiveItemId:w,unregisterItem:S}),[h,T,b,M,v,E,x,w,S])}function useRovingTabIndexItem(e){const{activeItemId:t,registerItem:g,unregisterItem:n}=useRovingTabIndexContext(),C=l.useRef(null),I=l.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),o=l.useRef(I);o.current=I;const a=l.useCallback(t=>{C.current=t,null!=t?g({...o.current,element:t}):queueMicrotask(()=>{null==C.current&&n(e.id)})},[e.id,g,n]),i=useForkRef(e.ref,a);return Qr(()=>{C.current&&g({...I,element:C.current})},[I,g]),Qr(()=>{const t=e.id;return()=>{n(t)}},[e.id,n]),{ref:i,tabIndex:t===e.id?0:-1}}function resolveActiveItemId(e,t,g,n){return null!=e?resolveRequestedItemId(e,t,g):resolveDefaultItemId(t,g,n)}function resolveRequestedItemId(e,t,g){const n=findItemIndexById(t,e);return-1===n?getFirstFocusableItemId(t,g):g(t[n])?t[n].id:getNextActiveItem(t,n,"next",!1,g)?.id??null}function resolveDefaultItemId(e,t,g){const n=g?.(e);if(null!=n){const g=getItemById(e,n);if(g&&t(g))return g.id}return getFirstFocusableItemId(e,t)}function getCurrentActiveItemIndex(e,t,g){if(t){const g=findItemIndexByElement(e,t);if(-1!==g)return g}return findItemIndexById(e,g)}function getNextActiveItem(e,t,g,n,C){const I=e.length-1;if(-1===I)return null;let o=!1,a=getNextIndex(t,I,g,n);const i=a;for(;-1!==a;){if(a===i){if(o)return null;o=!0}const t=e[a];if(t&&C(t))return t;a=getNextIndex(a,I,g,n)}return null}function getFirstFocusableItemId(e,t){return e.find(e=>t(e))?.id??null}function getItemById(e,t){return null==t?null:e.find(e=>e.id===t)??null}function findItemIndexById(e,t){return null==t?-1:e.findIndex(e=>e.id===t)}function findItemIndexByElement(e,t){return t?e.findIndex(e=>e.element===t||e.element?.contains(t)):-1}function getOrderedItems(e){const t=Array.from(e.values());return t.every(e=>null==e.element)?t:[...t.filter(isConnectedItem).sort((e,t)=>sortByDocumentPosition(e.element,t.element)),...t.filter(e=>!isConnectedItem(e))]}function getNavigableItemsSnapshot(e){return getOrderedItems(e).filter(isConnectedItem)}function getNextIndex(e,t,g,n=!0){return"next"===g?e===t?n?0:-1:e+1:0===e?n?t:-1:e-1}function isItemFocusable(e){return!!e.element&&(!!e.focusableWhenDisabled||!e.disabled&&!e.element.hasAttribute("disabled")&&"true"!==e.element.getAttribute("aria-disabled")&&e.element.hasAttribute("tabindex"))}function isConnectedItem(e){return null!=e.element&&e.element.isConnected}function sortByDocumentPosition(e,t){if(e===t)return 0;const g=e.compareDocumentPosition(t);return g&Node.DOCUMENT_POSITION_FOLLOWING||g&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:g&Node.DOCUMENT_POSITION_PRECEDING||g&Node.DOCUMENT_POSITION_CONTAINS?1:0}function handleRefs(...e){return t=>{e.forEach(e=>{setRef(e??null,t)})}}function contains$1(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;const g=t.getRootNode?.();if(g&&g instanceof ShadowRoot){let g=t;for(;g;){if(e===g)return!0;g=g.parentNode??g.host??null}}return!1}var bA=contains$1,vA=ownerDocument,xA=activeElement;function getScrollbarSize(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}var SA=getScrollbarSize;function focusWithVisible(e,t){if(null!=t)try{e.focus({focusVisible:"keyboard"===t})}catch(g){e.focus()}else e.focus()}var wA=useEventCallback,EA=useForkRef,RA=Qr;function ownerWindow(e){return ownerDocument(e).defaultView||window}var kA=ownerWindow,MA=l.createContext({});function getListUtilityClass(e){return generateUtilityClass("MuiList",e)}generateUtilityClasses("MuiList",["root","padding","dense","subheader"]);var useUtilityClasses$36=e=>{const{classes:t,disablePadding:g,dense:n,subheader:C}=e;return composeClasses({root:["root",!g&&"padding",n&&"dense",C&&"subheader"]},getListUtilityClass,t)},TA=On("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,!g.disablePadding&&t.padding,g.dense&&t.dense,g.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0,isolation:"isolate"}}]}),PA=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiList"}),{children:n,className:C,component:I="ul",dense:o=!1,disablePadding:a=!1,subheader:i,...s}=g,c=l.useMemo(()=>({dense:o}),[o]),u={...g,component:I,dense:o,disablePadding:a},d=useUtilityClasses$36(u);return(0,gr.jsx)(MA.Provider,{value:c,children:(0,gr.jsxs)(TA,{as:I,className:clsx(d.root,C),ref:t,ownerState:u,...s,children:[i,n]})})});function getOpenInteractionType(e){return e?"mousedown"===e.type||"pointerdown"===e.type||"touchstart"===e.type?"pointer":"keydown"===e.type||"click"===e.type&&0===e.detail?"keyboard":null:null}function isEmpty$1(e){return null==e||"string"==typeof e&&!e.trim()}function areEqualValues(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}var NA=l.createContext(null);function useSelectFocusSource(){return l.useContext(NA)}var DA=NA.Provider,OA=l.createContext(void 0);function useMenuListContext(){const e=l.useContext(OA);if(void 0===e)throw new Error("MUI: MenuListContext is missing. MenuItems must be placed within Menu or MenuList.");return e}function getItemText(e){const t=e?.element??e;if(!t)return"";if(void 0!==e?.textValue)return e.textValue;let g=t.innerText;return void 0===g&&(g=t.textContent),g??""}function textCriteriaMatches(e,t){if(void 0===t)return!0;let g=getItemText(e);return g=g.trim().toLowerCase(),0!==g.length&&(t.repeating?g[0]===t.keys[0]:g.startsWith(t.keys.join("")))}function isItemFocusableWithTextCriteria(e,t){return!!textCriteriaMatches(e,t)&&isItemFocusable(e)}function focusInitialItem(e,t){focusWithVisible(e,t)}var jA=l.forwardRef(function(e,t){const{actions:g,autoFocus:n=!1,autoFocusItem:C=!1,children:I,className:o,disabledItemsFocusable:a=!1,disableListWrap:i=!1,onKeyDown:s,variant:c="selectedMenu",...u}=e,d=l.useRef(null),p=l.useRef(!1),[m,h]=l.useState(!1),y=useSelectFocusSource(),b=l.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null}),v=useRovingTabIndexRoot({activeItemId:void 0,getDefaultActiveItemId:l.useCallback(e=>"selectedMenu"===c?e.find(e=>e.selected&&isItemFocusable(e))?.id??e.find(e=>isItemFocusable(e))?.id??null:e.find(e=>isItemFocusable(e))?.id??null,[c]),orientation:"vertical",wrap:!i}),{activeItemId:x,focusNext:S,getActiveItem:w,getContainerProps:E,getItemMap:R}=v,M=wA((e=!1)=>{if(!d.current||!e&&p.current)return null;if(C){const e=w();if(e?.element){const t=Array.from(R().values()).some(e=>e.selected);return h("menu"===c&&t&&!e.selected&&null==y),focusInitialItem(e.element,y),p.current=!0,e.element}return n?(h(!1),d.current.focus(),d.current):null}return n?(h(!1),d.current.focus(),p.current=!0,d.current):(h(!1),null)});RA(()=>{if(!n&&!C)return p.current=!1,void h(!1);M()},[x,C,n,M]),l.useImperativeHandle(g,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const g=!d.current.style.width;if(e.clientHeight<d.current.clientHeight&&g){const g=`${SA(kA(e))}px`;d.current.style["rtl"===t?"paddingLeft":"paddingRight"]=g,d.current.style.width=`calc(100% + ${g})`}return d.current},focusInitialTarget:()=>{if(!d.current)return null;const e=xA(vA(d.current));return e&&bA(d.current,e)?e:M(!0)}}),[M]);const T=E(),P=EA(d,T.ref,t),N=l.useMemo(()=>({itemsFocusableWhenDisabled:a,suppressInitialFocusVisible:m,variant:c}),[a,m,c]);return(0,gr.jsx)(PA,{role:"menu",ref:P,className:o,onKeyDown:wA(e=>{if(m&&h(!1),(e.ctrlKey||e.metaKey||e.altKey)&&s)s(e);else{if(T.onKeyDown(e),1===e.key.length){const t=b.current,g=e.key.toLowerCase(),n=performance.now();t.keys.length>0&&(n-t.lastTime>500?(t.keys=[],t.repeating=!0,t.previousKeyMatched=!0):t.repeating&&g!==t.keys[0]&&(t.repeating=!1)),t.lastTime=n,t.keys.push(g);const C=xA(vA(d.current)),I=C&&!t.repeating&&textCriteriaMatches(C,t);t.previousKeyMatched&&(I||null!=S(e=>isItemFocusableWithTextCriteria(e,t)))?e.preventDefault():t.previousKeyMatched=!1}s&&s(e)}}),onFocus:T.onFocus,tabIndex:-1,...u,children:(0,gr.jsx)(OA.Provider,{value:N,children:(0,gr.jsx)(fA.Provider,{value:v,children:I})})})});function debounce$1(e,t=166){let g;function debounced(...n){const later=()=>{e.apply(this,n)};clearTimeout(g),g=setTimeout(later,t)}return debounced.clear=()=>{clearTimeout(g)},debounced}var zA=debounce$1,GA={};function useLazyRef(e,t){const g=l.useRef(GA);return g.current===GA&&(g.current=e(t)),g}var LA=[];function useOnMount(e){l.useEffect(e,LA)}var BA=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function useTimeout(){const e=useLazyRef(BA.create).current;return useOnMount(e.disposeEffect),e}function getReactElementRef(e){return parseInt(l.version,10)>=19?e?.props?.ref||null:e?.ref||null}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var g={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;g[n]=e[n]}return g}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_setPrototypeOf(e,t)}var FA={disabled:!1},WA=t.default.createContext(null),forceReflow=function(e){return e.scrollTop},VA="unmounted",UA="exited",KA="entering",HA="entered",YA="exiting",ZA=function(e){function Transition(t,g){var n,C=e.call(this,t,g)||this,I=g&&!g.isMounting?t.enter:t.appear;return C.appearStatus=null,t.in?I?(n=UA,C.appearStatus=KA):n=HA:n=t.unmountOnExit||t.mountOnEnter?VA:UA,C.state={status:n},C.nextCallback=null,C}_inheritsLoose(Transition,e),Transition.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:UA}:null};var g=Transition.prototype;return g.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},g.componentDidUpdate=function(e){var t=null;if(e!==this.props){var g=this.state.status;this.props.in?"entering"!==g&&"entered"!==g&&(t=KA):"entering"!==g&&"entered"!==g||(t=YA)}this.updateStatus(!1,t)},g.componentWillUnmount=function(){this.cancelNextCallback()},g.getTimeouts=function(){var e,t,g=this.props.timeout,n=e=t=g;return null!=g&&"number"!=typeof g&&(n=g.exit,e=g.enter,t=void 0!==g.appear?g.appear:e),{exit:n,enter:e,appear:t}},g.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),"entering"===t){if(this.props.unmountOnExit||this.props.mountOnEnter){var g=this.props.nodeRef?this.props.nodeRef.current:n.default.findDOMNode(this);g&&forceReflow(g)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:VA})},g.performEnter=function(e){var t=this,g=this.props.enter,C=this.context?this.context.isMounting:e,I=this.props.nodeRef?[C]:[n.default.findDOMNode(this),C],o=I[0],a=I[1],i=this.getTimeouts(),s=C?i.appear:i.enter;!e&&!g||FA.disabled?this.safeSetState({status:HA},function(){t.props.onEntered(o)}):(this.props.onEnter(o,a),this.safeSetState({status:KA},function(){t.props.onEntering(o,a),t.onTransitionEnd(s,function(){t.safeSetState({status:HA},function(){t.props.onEntered(o,a)})})}))},g.performExit=function(){var e=this,t=this.props.exit,g=this.getTimeouts(),C=this.props.nodeRef?void 0:n.default.findDOMNode(this);t&&!FA.disabled?(this.props.onExit(C),this.safeSetState({status:YA},function(){e.props.onExiting(C),e.onTransitionEnd(g.exit,function(){e.safeSetState({status:UA},function(){e.props.onExited(C)})})})):this.safeSetState({status:UA},function(){e.props.onExited(C)})},g.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},g.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},g.setNextCallback=function(e){var t=this,g=!0;return this.nextCallback=function(n){g&&(g=!1,t.nextCallback=null,e(n))},this.nextCallback.cancel=function(){g=!1},this.nextCallback},g.onTransitionEnd=function(e,t){this.setNextCallback(t);var g=this.props.nodeRef?this.props.nodeRef.current:n.default.findDOMNode(this),C=null==e&&!this.props.addEndListener;if(g&&!C){if(this.props.addEndListener){var I=this.props.nodeRef?[this.nextCallback]:[g,this.nextCallback],o=I[0],a=I[1];this.props.addEndListener(o,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},g.render=function(){var e=this.state.status;if("unmounted"===e)return null;var g=this.props,n=g.children;g.in,g.mountOnEnter,g.unmountOnExit,g.appear,g.enter,g.exit,g.timeout,g.addEndListener,g.onEnter,g.onEntering,g.onEntered,g.onExit,g.onExiting,g.onExited,g.nodeRef;var C=_objectWithoutPropertiesLoose(g,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return t.default.createElement(WA.Provider,{value:null},"function"==typeof n?n(e,C):t.default.cloneElement(t.default.Children.only(n),C))},Transition}(t.default.Component);function noop$3(){}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function getChildMapping(e,g){var mapper=function(e){return g&&(0,t.isValidElement)(e)?g(e):e},n=Object.create(null);return e&&t.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=mapper(e)}),n}function mergeChildMappings(e,t){function getValueForKey(g){return g in t?t[g]:e[g]}e=e||{},t=t||{};var g,n=Object.create(null),C=[];for(var I in e)I in t?C.length&&(n[I]=C,C=[]):C.push(I);var o={};for(var a in t){if(n[a])for(g=0;g<n[a].length;g++){var i=n[a][g];o[n[a][g]]=getValueForKey(i)}o[a]=getValueForKey(a)}for(g=0;g<C.length;g++)o[C[g]]=getValueForKey(C[g]);return o}function getProp(e,t,g){return null!=g[t]?g[t]:e.props[t]}function getInitialChildMapping(e,g){return getChildMapping(e.children,function(n){return(0,t.cloneElement)(n,{onExited:g.bind(null,n),in:!0,appear:getProp(n,"appear",e),enter:getProp(n,"enter",e),exit:getProp(n,"exit",e)})})}function getNextChildMapping(e,g,n){var C=getChildMapping(e.children),I=mergeChildMappings(g,C);return Object.keys(I).forEach(function(o){var a=I[o];if((0,t.isValidElement)(a)){var i=o in g,s=o in C,l=g[o],c=(0,t.isValidElement)(l)&&!l.props.in;!s||i&&!c?s||!i||c?s&&i&&(0,t.isValidElement)(l)&&(I[o]=(0,t.cloneElement)(a,{onExited:n.bind(null,a),in:l.props.in,exit:getProp(a,"exit",e),enter:getProp(a,"enter",e)})):I[o]=(0,t.cloneElement)(a,{in:!1}):I[o]=(0,t.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:getProp(a,"exit",e),enter:getProp(a,"enter",e)})}}),I}ZA.contextType=WA,ZA.propTypes={},ZA.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop$3,onEntering:noop$3,onEntered:noop$3,onExit:noop$3,onExiting:noop$3,onExited:noop$3},ZA.UNMOUNTED=VA,ZA.EXITED=UA,ZA.ENTERING=KA,ZA.ENTERED=HA,ZA.EXITING=YA;var QA=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},XA={component:"div",childFactory:function(e){return e}},_A=function(e){function TransitionGroup(t,g){var n=e.call(this,t,g)||this;return n.state={contextValue:{isMounting:!0},handleExited:n.handleExited.bind(_assertThisInitialized(n)),firstRender:!0},n}_inheritsLoose(TransitionGroup,e);var g=TransitionGroup.prototype;return g.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},g.componentWillUnmount=function(){this.mounted=!1},TransitionGroup.getDerivedStateFromProps=function(e,t){var g=t.children,n=t.handleExited;return{children:t.firstRender?getInitialChildMapping(e,n):getNextChildMapping(e,g,n),firstRender:!1}},g.handleExited=function(e,t){var g=getChildMapping(this.props.children);e.key in g||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var g=_extends({},t.children);return delete g[e.key],{children:g}}))},g.render=function(){var e=this.props,g=e.component,n=e.childFactory,C=_objectWithoutPropertiesLoose(e,["component","childFactory"]),I=this.state.contextValue,o=QA(this.state.children).map(n);return delete C.appear,delete C.enter,delete C.exit,null===g?t.default.createElement(WA.Provider,{value:I},o):t.default.createElement(WA.Provider,{value:I},t.default.createElement(g,C,o))},TransitionGroup}(t.default.Component);_A.propTypes={},_A.defaultProps=XA;var reflow=e=>e.scrollTop;function normalizedTransitionCallback(e,t){return g=>{if(t){const n=e.current;void 0===g?t(n):t(n,g)}}}function getTransitionChildStyle(e,t,g,n,C,I){const o="exited"!==e||t?g[e]||g.exited:n;return C||I?{...o,...C,...I}:o}function getTransitionProps(e,t){const{timeout:g,easing:n,style:C={}}=e;return{duration:C.transitionDuration??("number"==typeof g?g:g[t.mode]||0),easing:C.transitionTimingFunction??("object"==typeof n?n[t.mode]:n),delay:C.transitionDelay}}function getScale(e){return`scale(${e}, ${e**2})`}var qA={entering:{opacity:1,transform:getScale(1)},entered:{opacity:1,transform:"none"},exiting:{opacity:0,transform:getScale(.75)},exited:{opacity:0,transform:getScale(.75)}},JA={opacity:0,transform:getScale(.75),visibility:"hidden"},$A=l.forwardRef(function(e,t){const{addEndListener:g,appear:n=!0,children:C,easing:I,in:o,onEnter:a,onEntered:i,onEntering:s,onExit:c,onExited:u,onExiting:d,style:p,timeout:m="auto",...h}=e,y=useTimeout(),b=l.useRef(),v=useTheme$1(),x=l.useRef(null),S=EA(x,getReactElementRef(C),t),w=normalizedTransitionCallback(x,s),E=normalizedTransitionCallback(x,(e,t)=>{reflow(e);const{duration:g,delay:n,easing:C}=getTransitionProps({style:p,timeout:m,easing:I},{mode:"enter"});let o;"auto"===m?(o=v.transitions.getAutoHeightDuration(e.clientHeight),b.current=o):o=g,e.style.transition=[v.transitions.create("opacity",{duration:o,delay:n}),v.transitions.create("transform",{duration:.666*o,delay:n,easing:C})].join(","),a&&a(e,t)}),R=normalizedTransitionCallback(x,i),M=normalizedTransitionCallback(x,d),T=normalizedTransitionCallback(x,e=>{const{duration:t,delay:g,easing:n}=getTransitionProps({style:p,timeout:m,easing:I},{mode:"exit"});let C;"auto"===m?(C=v.transitions.getAutoHeightDuration(e.clientHeight),b.current=C):C=t,e.style.transition=[v.transitions.create("opacity",{duration:C,delay:g}),v.transitions.create("transform",{duration:.666*C,delay:g||.333*C,easing:n})].join(","),e.style.opacity=0,e.style.transform=getScale(.75),c&&c(e)}),P=normalizedTransitionCallback(x,e=>{e.style.transition="",u&&u(e)}),handleAddEndListener=e=>{"auto"===m&&y.start(b.current||0,e),g&&g(x.current,e)};return(0,gr.jsx)(ZA,{appear:n,in:o,nodeRef:x,onEnter:E,onEntered:R,onEntering:w,onExit:T,onExited:P,onExiting:M,addEndListener:handleAddEndListener,timeout:"auto"===m?null:m,...h,children:(e,{ownerState:t,...g})=>{const n=getTransitionChildStyle(e,o,qA,JA,p,C.props.style);return l.cloneElement(C,{style:n,ref:S,...g})}})});function isOverflowing(e){const t=ownerDocument(e);return t.body===e?ownerWindow(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ariaHidden(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function getPaddingRight(e){return parseFloat(ownerWindow(e).getComputedStyle(e).paddingRight)||0}function isAriaHiddenForbiddenOnElement(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),g="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||g}function ariaHiddenSiblings(e,t,g,n,C){const I=[t,g,...n];[].forEach.call(e.children,e=>{const t=!I.includes(e),g=!isAriaHiddenForbiddenOnElement(e);t&&g&&ariaHidden(e,C)})}function findIndexOf(e,t){let g=-1;return e.some((e,n)=>!!t(e)&&(g=n,!0)),g}function handleContainer(e,t){const g=[],n=e.container;if(!t.disableScrollLock){if(isOverflowing(n)){const e=getScrollbarSize(ownerWindow(n));g.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${getPaddingRight(n)+e}px`;const t=ownerDocument(n).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{g.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${getPaddingRight(t)+e}px`})}let e;if(n.parentNode instanceof DocumentFragment)e=ownerDocument(n).body;else{const t=n.parentElement,g=ownerWindow(n);e="HTML"===t?.nodeName&&"scroll"===g.getComputedStyle(t).overflowY?t:n}g.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{g.forEach(({value:e,el:t,property:g})=>{e?t.style.setProperty(g,e):t.style.removeProperty(g)})}}function getHiddenSiblings(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}$A&&($A.muiSupportAuto=!0);var eC=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let g=this.modals.indexOf(e);if(-1!==g)return g;g=this.modals.length,this.modals.push(e),e.modalRef&&ariaHidden(e.modalRef,!1);const n=getHiddenSiblings(t);ariaHiddenSiblings(t,e.mount,e.modalRef,n,!0);const C=findIndexOf(this.containers,e=>e.container===t);return-1!==C?(this.containers[C].modals.push(e),g):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:n}),g)}mount(e,t){const g=findIndexOf(this.containers,t=>t.modals.includes(e)),n=this.containers[g];n.restore||(n.restore=handleContainer(n,t))}remove(e,t=!0){const g=this.modals.indexOf(e);if(-1===g)return g;const n=findIndexOf(this.containers,t=>t.modals.includes(e)),C=this.containers[n];if(C.modals.splice(C.modals.indexOf(e),1),this.modals.splice(g,1),0===C.modals.length)C.restore&&C.restore(),e.modalRef&&ariaHidden(e.modalRef,t),ariaHiddenSiblings(C.container,e.mount,e.modalRef,C.hiddenSiblings,!1),this.containers.splice(n,1);else{const e=C.modals[C.modals.length-1];e.modalRef&&ariaHidden(e.modalRef,!1)}return g}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},tC="data-mui-focusable";function getFocusTarget(e){return e?e.hasAttribute("data-mui-focusable")?e:e.querySelector(`[${tC}]`):null}var gC=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function getTabIndex(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}function isNonTabbableRadio(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const getRadio=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let t=getRadio(`[name="${e.name}"]:checked`);return t||(t=getRadio(`[name="${e.name}"]`)),t!==e}function isNodeMatchingSelectorFocusable(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||isNonTabbableRadio(e))}function defaultGetTabbable(e){const t=[],g=[];return Array.from(e.querySelectorAll(gC)).forEach((e,n)=>{const C=getTabIndex(e);-1!==C&&isNodeMatchingSelectorFocusable(e)&&(0===C?t.push(e):g.push({documentOrder:n,tabIndex:C,node:e}))}),g.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function defaultIsEnabled(){return!0}function FocusTrap(e){const{children:t,disableAutoFocus:g=!1,disableEnforceFocus:n=!1,disableRestoreFocus:C=!1,getTabbable:I=defaultGetTabbable,isEnabled:o=defaultIsEnabled,open:a}=e,i=l.useRef(!1),s=l.useRef(null),c=l.useRef(null),u=l.useRef(null),d=l.useRef(null),p=l.useRef(!1),m=l.useRef(null),h=useForkRef(getReactElementRef(t),m),y=l.useRef(null);l.useEffect(()=>{a&&m.current&&(p.current=!g)},[g,a]),l.useEffect(()=>{if(i.current=!1,!a||!m.current)return;const e=xA(ownerDocument(m.current)),t=getFocusTarget(m.current)??m.current;return bA(m.current,e)||(t.hasAttribute("tabIndex")||t.setAttribute("tabIndex","-1"),p.current&&t.focus()),()=>{!C&&u.current&&(i.current=!0,u.current.focus(),u.current=null)}},[a]),l.useEffect(()=>{if(!a||!m.current)return;const e=ownerDocument(m.current),loopFocus=t=>{y.current=t,!n&&o()&&"Tab"===t.key&&xA(e)===m.current&&t.shiftKey&&(i.current=!0,c.current&&c.current.focus())},contain=()=>{const t=m.current;if(null===t)return;const g=xA(e);if(!e.hasFocus()||!o()||i.current)return void(i.current=!1);if(bA(t,g))return;if(n&&g!==s.current&&g!==c.current)return;if(g!==d.current)d.current=null;else if(null!==d.current)return;if(!p.current)return;let C=[];if(g!==s.current&&g!==c.current||(C=I(m.current)),C.length>0){const e=Boolean(y.current?.shiftKey&&"Tab"===y.current?.key),t=C[0],g=C[C.length-1];"string"!=typeof t&&"string"!=typeof g&&(e?g.focus():t.focus())}else t.focus()};e.addEventListener("focusin",contain),e.addEventListener("keydown",loopFocus,!0);const t=setInterval(()=>{const t=xA(e);t&&"BODY"===t.tagName&&contain()},50);return()=>{clearInterval(t),e.removeEventListener("focusin",contain),e.removeEventListener("keydown",loopFocus,!0)}},[g,n,C,o,a,I]);const onFocus=e=>{null===u.current&&(u.current=e.relatedTarget),p.current=!0,d.current=e.target;const g=t.props.onFocus;g&&g(e)},handleFocusSentinel=e=>{null===u.current&&(u.current=e.relatedTarget),p.current=!0};return(0,gr.jsxs)(l.Fragment,{children:[(0,gr.jsx)("div",{tabIndex:a?0:-1,onFocus:handleFocusSentinel,ref:s,"data-testid":"sentinelStart"}),l.cloneElement(t,{ref:h,onFocus}),(0,gr.jsx)("div",{tabIndex:a?0:-1,onFocus:handleFocusSentinel,ref:c,"data-testid":"sentinelEnd"})]})}function getContainer$1(e){return"function"==typeof e?e():e}var rC=l.forwardRef(function(e,t){const{children:g,container:n,disablePortal:C=!1}=e,[I,o]=l.useState(null),a=useForkRef(l.isValidElement(g)?getReactElementRef(g):null,t);if(Qr(()=>{C||o(getContainer$1(n)||document.body)},[n,C]),Qr(()=>{if(I&&!C)return setRef(t,I),()=>{setRef(t,null)}},[t,I,C]),C){if(l.isValidElement(g)){const e={ref:a};return l.cloneElement(g,e)}return g}return I?c.createPortal(g,I):I});function useSlot(e,t){const{className:g,elementType:n,ownerState:C,externalForwardedProps:I,internalForwardedProps:o,shouldForwardComponentProp:a=!1,...i}=t,{component:s,slots:l={[e]:void 0},slotProps:c={[e]:void 0},...u}=I,d=l[e]||n,p=resolveComponentProps(c[e],C),{props:{component:m,...h},internalRef:y}=mergeSlotProps$1({className:g,...i,externalForwardedProps:"root"===e?u:void 0,externalSlotProps:p}),b=useForkRef(y,p?.ref,t.ref),v="root"===e?m||s:m;return[d,appendOwnerState(d,{..."root"===e&&!s&&!l[e]&&o,..."root"!==e&&!l[e]&&o,...h,...v&&!a&&{as:v},...v&&a&&{component:v},ref:b},C)]}var nC={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},AC={opacity:0,visibility:"hidden"},CC=l.forwardRef(function(e,t){const g=useTheme$1(),n={enter:g.transitions.duration.enteringScreen,exit:g.transitions.duration.leavingScreen},{addEndListener:C,appear:I=!0,children:o,easing:a,in:i,onEnter:s,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:m,style:h,timeout:y=n,...b}=e,v=l.useRef(null),x=EA(v,getReactElementRef(o),t),S=normalizedTransitionCallback(v,u),w=normalizedTransitionCallback(v,(e,t)=>{reflow(e);const n=getTransitionProps({style:h,timeout:y,easing:a},{mode:"enter"});e.style.transition=g.transitions.create("opacity",n),s&&s(e,t)}),E=normalizedTransitionCallback(v,c),R=normalizedTransitionCallback(v,m),M=normalizedTransitionCallback(v,e=>{const t=getTransitionProps({style:h,timeout:y,easing:a},{mode:"exit"});e.style.transition=g.transitions.create("opacity",t),d&&d(e)}),T=normalizedTransitionCallback(v,e=>{e.style.transition="",p&&p(e)}),handleAddEndListener=e=>{C&&C(v.current,e)};return(0,gr.jsx)(ZA,{appear:I,in:i,nodeRef:v,onEnter:w,onEntered:E,onEntering:S,onExit:M,onExited:T,onExiting:R,addEndListener:handleAddEndListener,timeout:y,...b,children:(e,{ownerState:t,...g})=>{const n=getTransitionChildStyle(e,i,nC,AC,h,o.props.style);return l.cloneElement(o,{style:n,ref:x,...g})}})});function getBackdropUtilityClass(e){return generateUtilityClass("MuiBackdrop",e)}generateUtilityClasses("MuiBackdrop",["root","invisible"]);var useUtilityClasses$35=e=>{const{classes:t,invisible:g}=e;return composeClasses({root:["root",g&&"invisible"]},getBackdropUtilityClass,t)},IC=On("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),oC=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiBackdrop"}),{children:n,className:C,component:I="div",invisible:o=!1,open:a,slotProps:i={},slots:s={},transitionDuration:l,...c}=g,u={...g,component:I,invisible:o},d=useUtilityClasses$35(u),p={component:I,slots:s,slotProps:i},[m,h]=useSlot("root",{elementType:IC,externalForwardedProps:p,className:clsx(d.root,C),ownerState:u}),[y,b]=useSlot("transition",{elementType:CC,externalForwardedProps:p,ownerState:u});return(0,gr.jsx)(y,{in:a,timeout:l,...c,...b,children:(0,gr.jsx)(m,{...h,ref:t,children:n})})});function createChainedFunction(...e){return e.reduce((e,t)=>null==t?e:function(...g){e.apply(this,g),t.apply(this,g)},()=>{})}function getContainer(e){return"function"==typeof e?e():e}function getHasTransition(e){return!!e&&e.props.hasOwnProperty("in")}var noop$2=()=>{},aC=new eC;function useModal(e){const{container:t,disableScrollLock:g=!1,closeAfterTransition:n=!1,onTransitionEnter:C,onTransitionExited:I,children:o,onClose:a,open:i,rootRef:s}=e,c=l.useRef({}),u=l.useRef(null),d=l.useRef(null),p=useForkRef(d,s),[m,h]=l.useState(!i),y=getHasTransition(o);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const getDoc=()=>ownerDocument(u.current),getModal=()=>(c.current.modalRef=d.current,c.current.mount=u.current,c.current),handleMounted=()=>{aC.mount(getModal(),{disableScrollLock:g}),d.current&&(d.current.scrollTop=0)},v=useEventCallback(()=>{const e=getContainer(t)||getDoc().body;aC.add(getModal(),e),d.current&&handleMounted()}),isTopModal=()=>aC.isTopModal(getModal()),x=useEventCallback(e=>{u.current=e,e&&(i&&isTopModal()?handleMounted():d.current&&ariaHidden(d.current,b))}),S=l.useCallback(()=>{aC.remove(getModal(),b)},[b]);l.useEffect(()=>()=>{S()},[S]),l.useEffect(()=>{i?v():y&&n||S()},[i,S,y,n,v]);const createHandleKeyDown=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&isTopModal()&&(t.stopPropagation(),a&&a(t,"escapeKeyDown"))},createHandleBackdropClick=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&a&&a(t,"backdropClick")};return{getRootProps:(t={})=>{const g=extractEventHandlers(e);delete g.onTransitionEnter,delete g.onTransitionExited;const n={...g,...t};return{role:"presentation",...n,onKeyDown:createHandleKeyDown(n),ref:p}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:createHandleBackdropClick(t),open:i}},getTransitionProps:()=>{const handleExited=()=>{h(!0),I&&I(),n&&S()};return{onEnter:createChainedFunction(()=>{h(!1),C&&C()},o?.props.onEnter??noop$2),onExited:createChainedFunction(handleExited,o?.props.onExited??noop$2)}},rootRef:p,portalRef:x,isTopModal,exited:m,hasTransition:y}}function getModalUtilityClass(e){return generateUtilityClass("MuiModal",e)}generateUtilityClasses("MuiModal",["root","hidden","backdrop"]);var useUtilityClasses$34=e=>{const{open:t,exited:g,classes:n}=e;return composeClasses({root:["root",!t&&g&&"hidden"],backdrop:["backdrop"]},getModalUtilityClass,n)},iC=On("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,!g.open&&g.exited&&t.hidden]}})(Vn(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),sC=On(oC,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),lC=l.forwardRef(function(e,t){const g=useDefaultProps({name:"MuiModal",props:e}),{classes:n,className:C,closeAfterTransition:I=!1,children:o,container:a,component:i,disableAutoFocus:s=!1,disableEnforceFocus:c=!1,disablePortal:u=!1,disableRestoreFocus:d=!1,disableScrollLock:p=!1,hideBackdrop:m=!1,keepMounted:h=!1,onClose:y,onTransitionEnter:b,onTransitionExited:v,open:x,slotProps:S={},slots:w={},theme:E,...R}=g,M={...g,closeAfterTransition:I,disableAutoFocus:s,disableEnforceFocus:c,disablePortal:u,disableRestoreFocus:d,disableScrollLock:p,hideBackdrop:m,keepMounted:h},{getRootProps:T,getBackdropProps:P,getTransitionProps:N,portalRef:D,isTopModal:O,exited:j,hasTransition:G}=useModal({...M,rootRef:t}),L={...M,exited:j},B=useUtilityClasses$34(L),F={};if(void 0===o.props.tabIndex&&(F.tabIndex="-1"),G){const{onEnter:e,onExited:t}=N();F.onEnter=e,F.onExited=t}const W={slots:w,slotProps:S},[V,U]=useSlot("root",{ref:t,elementType:iC,externalForwardedProps:{...W,...R,component:i},getSlotProps:T,ownerState:L,className:clsx(C,B?.root,!L.open&&L.exited&&B?.hidden)}),[K,H]=useSlot("backdrop",{elementType:sC,externalForwardedProps:W,shouldForwardComponentProp:!0,getSlotProps:e=>P({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:B?.backdrop,ownerState:L});return h||x||G&&!j?(0,gr.jsx)(rC,{ref:D,container:a,disablePortal:u,children:(0,gr.jsxs)(V,{...U,children:[m?null:(0,gr.jsx)(K,{...H}),(0,gr.jsx)(FocusTrap,{disableEnforceFocus:c,disableAutoFocus:s,disableRestoreFocus:d,isEnabled:O,open:x,children:l.cloneElement(o,F)})]})}):null});function getPopoverUtilityClass(e){return generateUtilityClass("MuiPopover",e)}function mergeSlotProps(e,t){if(!e)return t;function extractHandlers(e,t){const g={};return Object.keys(t).forEach(n=>{isEventHandler(n,t[n])&&"function"==typeof e[n]&&(g[n]=(...g)=>{e[n](...g),t[n](...g)})}),g}if("function"==typeof e||"function"==typeof t)return g=>{const n="function"==typeof t?t(g):t,C="function"==typeof e?e({...g,...n}):e,I=clsx(g?.className,n?.className,C?.className),o=extractHandlers(C,n);return{...n,...C,...o,...!!I&&{className:I},...n?.style&&C?.style&&{style:{...n.style,...C.style}},...n?.sx&&C?.sx&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(C.sx)?C.sx:[C.sx]]}}};const g=t,n=extractHandlers(e,g),C=clsx(g?.className,e?.className);return{...t,...e,...n,...!!C&&{className:C},...g?.style&&e?.style&&{style:{...g.style,...e.style}},...g?.sx&&e?.sx&&{sx:[...Array.isArray(g.sx)?g.sx:[g.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function getOffsetTop(e,t){let g=0;return"number"==typeof t?g=t:"center"===t?g=e.height/2:"bottom"===t&&(g=e.height),g}function getOffsetLeft(e,t){let g=0;return"number"==typeof t?g=t:"center"===t?g=e.width/2:"right"===t&&(g=e.width),g}function getTransformOriginValue(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function resolveAnchorEl$1(e){return"function"==typeof e?e():e}generateUtilityClasses("MuiPopover",["root","paper"]);var useUtilityClasses$33=e=>{const{classes:t}=e;return composeClasses({root:["root"],paper:["paper"]},getPopoverUtilityClass,t)},cC=On(lC,{name:"MuiPopover",slot:"Root"})({}),uC=On(Kn,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),dC=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiPopover"}),{action:n,anchorEl:C,anchorOrigin:I={vertical:"top",horizontal:"left"},anchorPosition:o,anchorReference:a="anchorEl",children:i,className:s,container:c,disableAutoFocus:u=!1,elevation:d=8,marginThreshold:p=16,open:m,slots:h={},slotProps:y={},transformOrigin:b={vertical:"top",horizontal:"left"},transitionDuration:v="auto",disableScrollLock:x=!1,...S}=g,w=l.useRef(),E={...g,anchorOrigin:I,anchorReference:a,elevation:d,marginThreshold:p,transformOrigin:b,transitionDuration:v},R=useUtilityClasses$33(E),M=l.useCallback(()=>{if("anchorPosition"===a)return o;const e=resolveAnchorEl$1(C),t=(e&&1===e.nodeType?e:vA(w.current).body).getBoundingClientRect();return{top:t.top+getOffsetTop(t,I.vertical),left:t.left+getOffsetLeft(t,I.horizontal)}},[C,I.horizontal,I.vertical,o,a]),T=l.useCallback(e=>({vertical:getOffsetTop(e,b.vertical),horizontal:getOffsetLeft(e,b.horizontal)}),[b.horizontal,b.vertical]),P=l.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},g=T(t);if("none"===a)return{top:null,left:null,transformOrigin:getTransformOriginValue(g)};const n=M();let I=n.top-g.vertical,o=n.left-g.horizontal;const i=I+t.height,s=o+t.width,l=kA(resolveAnchorEl$1(C)),c=l.innerHeight-p,u=l.innerWidth-p;if(null!=p&&I<p){const e=I-p;I-=e,g.vertical+=e}else if(null!=p&&i>c){const e=i-c;I-=e,g.vertical+=e}if(null!=p&&o<p){const e=o-p;o-=e,g.horizontal+=e}else if(s>u){const e=s-u;o-=e,g.horizontal+=e}return{top:`${Math.round(I)}px`,left:`${Math.round(o)}px`,transformOrigin:getTransformOriginValue(g)}},[C,a,M,T,p]),[N,D]=l.useState(m),O=l.useCallback(()=>{const e=w.current;if(!e)return;const t=P(e);null!=t.top&&e.style.setProperty("top",t.top),null!=t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,D(!0)},[P]);l.useEffect(()=>(x&&window.addEventListener("scroll",O),()=>window.removeEventListener("scroll",O)),[C,x,O]);const handleEntering=()=>{O()},handleExited=()=>{D(!1)};l.useEffect(()=>{m&&O()}),l.useImperativeHandle(n,()=>m?{updatePosition:()=>{O()}}:null,[m,O]),l.useEffect(()=>{if(!m)return;const e=zA(()=>{O()}),t=kA(resolveAnchorEl$1(C));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[C,m,O]);let j=v;const G={slots:h,slotProps:y},[L,B]=useSlot("transition",{elementType:$A,externalForwardedProps:G,ownerState:E,getSlotProps:e=>({...e,onEntering:(t,g)=>{e.onEntering?.(t,g),handleEntering()},onExited:t=>{e.onExited?.(t),handleExited()}}),additionalProps:{appear:!0,in:m}});"auto"!==v||L.muiSupportAuto||(j=void 0);const F=c||(C?vA(resolveAnchorEl$1(C)).body:void 0),[W,{slots:V,slotProps:U,...K}]=useSlot("root",{ref:t,elementType:cC,externalForwardedProps:{...G,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:mergeSlotProps("function"==typeof y.backdrop?y.backdrop(E):y.backdrop,{invisible:!0})},container:F,open:m},ownerState:E,className:clsx(R.root,s)}),[H,Y]=useSlot("paper",{ref:w,className:R.paper,elementType:uC,externalForwardedProps:G,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:N?void 0:{opacity:0}},ownerState:E});return(0,gr.jsx)(W,{...K,...!isHostComponent(W)&&{slots:V,slotProps:U,disableAutoFocus:u,disableScrollLock:x},children:(0,gr.jsx)(L,{...B,timeout:j,children:(0,gr.jsx)(H,{...Y,children:i})})})});function getMenuUtilityClass(e){return generateUtilityClass("MuiMenu",e)}generateUtilityClasses("MuiMenu",["root","paper","list"]);var pC={vertical:"top",horizontal:"right"},mC={vertical:"top",horizontal:"left"},useUtilityClasses$32=e=>{const{classes:t}=e;return composeClasses({root:["root"],paper:["paper"],list:["list"]},getMenuUtilityClass,t)},fC=On(dC,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiMenu",slot:"Root"})({}),hC=On(uC,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),yC=On(jA,{name:"MuiMenu",slot:"List"})({outline:0}),bC=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiMenu"}),{autoFocus:n=!0,children:C,className:I,disableAutoFocusItem:o=!1,onClose:a,open:i,PopoverClasses:s,transitionDuration:c="auto",variant:u="selectedMenu",slots:d={},slotProps:p={},...m}=g,h=useRtl(),y={...g,autoFocus:n,disableAutoFocusItem:o,transitionDuration:c,variant:u},b=useUtilityClasses$32(y),v=n&&i,x=v&&!o,S=l.useRef(null),handleEntering=(e,t)=>{S.current&&(S.current.adjustStyleForScrollbar(e,{direction:h?"rtl":"ltr"}),v&&S.current.focusInitialTarget?.())},handleListKeyDown=e=>{"Tab"===e.key&&(e.preventDefault(),a&&a(e,"tabKeyDown"))},w={slots:d,slotProps:p},E=useSlotProps({elementType:d.root,externalSlotProps:p.root,ownerState:y,className:[b.root,I]}),[R,M]=useSlot("paper",{className:b.paper,elementType:hC,externalForwardedProps:w,shouldForwardComponentProp:!0,ownerState:y}),[T,P]=useSlot("list",{className:b.list,elementType:yC,shouldForwardComponentProp:!0,externalForwardedProps:w,getSlotProps:e=>({...e,onKeyDown:t=>{handleListKeyDown(t),e.onKeyDown?.(t)}}),ownerState:y}),N="function"==typeof p.transition?p.transition(y):p.transition;return(0,gr.jsx)(fC,{disableAutoFocus:n,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:h?"right":"left"},transformOrigin:h?pC:mC,slots:{root:d.root,paper:R,backdrop:d.backdrop,transition:d.transition},slotProps:{root:E,paper:M,backdrop:"function"==typeof p.backdrop?p.backdrop(y):p.backdrop,transition:{...N,onEntering:(...e)=>{handleEntering(...e),N?.onEntering?.(...e)}}},open:i,ref:t,transitionDuration:c,ownerState:y,...m,classes:s,children:(0,gr.jsx)(T,{actions:S,autoFocus:v,autoFocusItem:x,variant:u,...P,children:C})})});function isFocusVisible(e){try{return e.matches(":focus-visible")}catch(t){}return!1}function useFocusableWhenDisabled(e){const{focusableWhenDisabled:t,disabled:g,composite:n=!1,tabIndex:C=0,isNativeButton:I}=e,o=n&&!1!==t,a=n&&!1===t;return l.useMemo(()=>{const e={onKeyDown(e){g&&t&&"Tab"!==e.key&&e.preventDefault()}};return n||(e.tabIndex=C,!I&&g&&(e.tabIndex=t?C:-1)),(I&&(t||o)||!I&&g)&&(e["aria-disabled"]=g),!I||t&&!a||(e.disabled=g),e},[n,g,t,o,a,I,C])}var vC={};function useButtonBase(e){const{nativeButton:t,nativeButtonProp:g,internalNativeButton:n=t,allowInferredHostMismatch:C=!1,disabled:I,type:o,hasFormAction:a=!1,tabIndex:i=0,focusableWhenDisabled:s,stopEventPropagation:c=!1,onBeforeKeyDown:u,onBeforeKeyUp:d}=e,p=l.useRef(null),m=!0===s,h=useFocusableWhenDisabled({focusableWhenDisabled:m,disabled:I,isNativeButton:t,tabIndex:i}),y=l.useCallback(()=>{const e=p.current;return null==e?t:"BUTTON"===e.tagName||Boolean("A"===e.tagName&&e.href)},[t]),b=l.useMemo(()=>{const e=m?{}:{tabIndex:I?-1:i};return t?(e.type=void 0!==o||a?o:"button",m||(e.disabled=I)):(e.role="button",!m&&I&&(e["aria-disabled"]=I)),m?{...e,...h}:e},[I,m,h,a,t,i,o]);return{getButtonProps:l.useCallback((e=vC)=>{const{onClick:t,onKeyDown:g,onKeyUp:n,...C}=e,handleClick=e=>{c&&e.stopPropagation(),I?e.preventDefault():t?.(e)},handleKeyDown=e=>{m&&h.onKeyDown(e),I||(u?.(e),g?.(e),e.target!==e.currentTarget||y()||(" "!==e.key?"Enter"===e.key&&(e.preventDefault(),e.currentTarget.click()):e.preventDefault()))},handleKeyUp=e=>{I||(d?.(e),n?.(e),e.target!==e.currentTarget||y()||" "!==e.key||e.defaultPrevented||e.currentTarget.click())};return{...b,...C,onClick:handleClick,onKeyDown:handleKeyDown,onKeyUp:handleKeyUp}},[b,I,m,h,y,u,d,c]),rootRef:p}}var xC=class e{static create(){return new e}static use(){const t=useLazyRef(e.create).current,[g,n]=l.useState(!1);return t.shouldMount=g,t.setShouldMount=n,l.useEffect(t.mountEffect,[g]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=createControlledPromise(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function useLazyRipple(){return xC.use()}function createControlledPromise(){let e,t;const g=new Promise((g,n)=>{e=g,t=n});return g.resolve=e,g.reject=t,g}function Ripple(e){const{className:t,classes:g,pulsate:n=!1,rippleX:C,rippleY:I,rippleSize:o,in:a,onExited:i,timeout:s}=e,[c,u]=l.useState(!1),d=clsx(t,g.ripple,g.rippleVisible,n&&g.ripplePulsate),p={width:o,height:o,top:-o/2+I,left:-o/2+C},m=clsx(g.child,c&&g.childLeaving,n&&g.childPulsate);return a||c||u(!0),l.useEffect(()=>{if(!a&&null!=i){const e=setTimeout(i,s);return()=>{clearTimeout(e)}}},[i,a,s]),(0,gr.jsx)("span",{className:d,style:p,children:(0,gr.jsx)("span",{className:m})})}var SC=generateUtilityClasses("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),wC=550,EC=keyframes`
1
+ !function(e,t,g,n){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});var C=Object.create,o=Object.defineProperty,I=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,i=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,__commonJSMin=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),__copyProps=(e,t,g,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var C,i=a(t),l=0,c=i.length;l<c;l++)C=i[l],s.call(e,C)||C===g||o(e,C,{get:(e=>t[e]).bind(null,C),enumerable:!(n=I(t,C))||n.enumerable});return e},__toESM=(e,t,g)=>(g=null!=e?C(i(e)):{},__copyProps(!t&&e&&e.__esModule?g:o(g,"default",{value:e,enumerable:!0}),e));let l=__toESM(t,1);t=__toESM(t);let c=__toESM(n,1);n=__toESM(n);var u=Symbol.for("immer-nothing"),d=Symbol.for("immer-draftable"),p=Symbol.for("immer-state");function die(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var m=Object,h=m.getPrototypeOf,y="constructor",b="prototype",v="configurable",x="enumerable",S="writable",w="value",isDraft=e=>!!e&&!!e[p];function isDraftable(e){return!!e&&(isPlainObject$2(e)||M(e)||!!e[d]||!!e[y]?.[d]||isMap(e)||isSet(e))}var E=m[b][y].toString(),R=new WeakMap;function isPlainObject$2(e){if(!e||!isObjectish(e))return!1;const t=h(e);if(null===t||t===m[b])return!0;const g=m.hasOwnProperty.call(t,y)&&t[y];if(g===Object)return!0;if(!isFunction(g))return!1;let n=R.get(g);return void 0===n&&(n=Function.toString.call(g),R.set(g,n)),n===E}function each(e,t,g=!0){0===getArchtype(e)?(g?Reflect.ownKeys(e):m.keys(e)).forEach(g=>{t(g,e[g],e)}):e.forEach((g,n)=>t(n,g,e))}function getArchtype(e){const t=e[p];return t?t.type_:M(e)?1:isMap(e)?2:isSet(e)?3:0}var has=(e,t,g=getArchtype(e))=>2===g?e.has(t):m[b].hasOwnProperty.call(e,t),get=(e,t,g=getArchtype(e))=>2===g?e.get(t):e[t],set=(e,t,g,n=getArchtype(e))=>{2===n?e.set(t,g):3===n?e.add(g):e[t]=g};function is$1(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}var M=Array.isArray,isMap=e=>e instanceof Map,isSet=e=>e instanceof Set,isObjectish=e=>"object"==typeof e,isFunction=e=>"function"==typeof e,isBoolean=e=>"boolean"==typeof e;function isArrayIndex(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var latest=e=>e.copy_||e.base_,getFinalValue=e=>e.modified_?e.copy_:e.base_;function shallowCopy(e,t){if(isMap(e))return new Map(e);if(isSet(e))return new Set(e);if(M(e))return Array[b].slice.call(e);const g=isPlainObject$2(e);if(!0===t||"class_only"===t&&!g){const t=m.getOwnPropertyDescriptors(e);delete t[p];let g=Reflect.ownKeys(t);for(let n=0;n<g.length;n++){const C=g[n],o=t[C];!1===o[S]&&(o[S]=!0,o[v]=!0),(o.get||o.set)&&(t[C]={[v]:!0,[S]:!0,[x]:o[x],[w]:e[C]})}return m.create(h(e),t)}{const t=h(e);if(null!==t&&g)return{...e};const n=m.create(t);return m.assign(n,e)}}function freeze(e,t=!1){return isFrozen(e)||isDraft(e)||!isDraftable(e)||(getArchtype(e)>1&&m.defineProperties(e,{set:T,add:T,clear:T,delete:T}),m.freeze(e),t&&each(e,(e,t)=>{freeze(t,!0)},!1)),e}function dontMutateFrozenCollections(){die(2)}var T={[w]:dontMutateFrozenCollections};function isFrozen(e){return null===e||!isObjectish(e)||m.isFrozen(e)}var P="MapSet",N="Patches",D="ArrayMethods",O={};function getPlugin(e){const t=O[e];return t||die(0,e),t}var j,isPluginLoaded=e=>!!O[e],getCurrentScope=()=>j,createScope=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:isPluginLoaded(P)?getPlugin(P):void 0,arrayMethodsPlugin_:isPluginLoaded(D)?getPlugin(D):void 0});function usePatchesInScope(e,t){t&&(e.patchPlugin_=getPlugin(N),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function revokeScope(e){leaveScope(e),e.drafts_.forEach(revokeDraft),e.drafts_=null}function leaveScope(e){e===j&&(j=e.parent_)}var enterScope=e=>j=createScope(j,e);function revokeDraft(e){const t=e[p];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function processResult(e,t){t.unfinalizedDrafts_=t.drafts_.length;const g=t.drafts_[0];if(void 0!==e&&e!==g){g[p].modified_&&(revokeScope(t),die(4)),isDraftable(e)&&(e=finalize(t,e));const{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(g[p].base_,e,t)}else e=finalize(t,g);return maybeFreeze(t,e,!0),revokeScope(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==u?e:void 0}function finalize(e,t){if(isFrozen(t))return t;const g=t[p];if(!g)return handleValue(t,e.handledSet_,e);if(!isSameScope(g,e))return t;if(!g.modified_)return g.base_;if(!g.finalized_){const{callbacks_:t}=g;if(t)for(;t.length>0;)t.pop()(e);generatePatchesAndFinalize(g,e)}return g.copy_}function maybeFreeze(e,t,g=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&freeze(t,g)}function markStateFinalized(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var isSameScope=(e,t)=>e.scope_===t,G=[];function updateDraftInParent(e,t,g,n){const C=latest(e),o=e.type_;if(void 0!==n&&get(C,n,o)===t)return void set(C,n,g,o);if(!e.draftLocations_){const t=e.draftLocations_=new Map;each(C,(e,g)=>{if(isDraft(g)){const n=t.get(g)||[];n.push(e),t.set(g,n)}})}const I=e.draftLocations_.get(t)??G;for(const a of I)set(C,a,g,o)}function registerChildFinalizationCallback(e,t,g){e.callbacks_.push(function(n){const C=t;if(!C||!isSameScope(C,n))return;n.mapSetPlugin_?.fixSetContents(C);const o=getFinalValue(C);updateDraftInParent(e,C.draft_??C,o,g),generatePatchesAndFinalize(C,n)})}function generatePatchesAndFinalize(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){const{patchPlugin_:g}=t;if(g){const n=g.getPath(e);n&&g.generatePatches_(e,n,t)}markStateFinalized(e)}}function handleCrossReference(e,t,g){const{scope_:n}=e;if(isDraft(g)){const C=g[p];isSameScope(C,n)&&C.callbacks_.push(function(){prepareCopy(e),updateDraftInParent(e,g,getFinalValue(C),t)})}else isDraftable(g)&&e.callbacks_.push(function(){const C=latest(e);3===e.type_?C.has(g)&&handleValue(g,n.handledSet_,n):get(C,t,e.type_)===g&&n.drafts_.length>1&&!0===(e.assigned_.get(t)??!1)&&e.copy_&&handleValue(get(e.copy_,t,e.type_),n.handledSet_,n)})}function handleValue(e,t,g){return!g.immer_.autoFreeze_&&g.unfinalizedDrafts_<1||isDraft(e)||t.has(e)||!isDraftable(e)||isFrozen(e)||(t.add(e),each(e,(n,C)=>{if(isDraft(C)){const t=C[p];isSameScope(t,g)&&(set(e,n,getFinalValue(t),e.type_),markStateFinalized(t))}else isDraftable(C)&&handleValue(C,t,g)})),e}function createProxyProxy(e,t){const g=M(e),n={type_:g?1:0,scope_:t?t.scope_:getCurrentScope(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let C=n,o=L;g&&(C=[n],o=B);const{revoke:I,proxy:a}=Proxy.revocable(C,o);return n.draft_=a,n.revoke_=I,[a,n]}var L={get(e,t){if(t===p)return e;let g=e.scope_.arrayMethodsPlugin_;const n=1===e.type_&&"string"==typeof t;if(n&&g?.isArrayOperationMethod(t))return g.createMethodInterceptor(e,t);const C=latest(e);if(!has(C,t,e.type_))return readPropFromProto(e,C,t);const o=C[t];if(e.finalized_||!isDraftable(o))return o;if(n&&e.operationMethod&&g?.isMutatingArrayMethod(e.operationMethod)&&isArrayIndex(t))return o;if(o===peek$1(e.base_,t)){prepareCopy(e);const g=1===e.type_?+t:t,n=createProxy(e.scope_,o,e,g);return e.copy_[g]=n}return o},has:(e,t)=>t in latest(e),ownKeys:e=>Reflect.ownKeys(latest(e)),set(e,t,g){const n=getDescriptorFromProto(latest(e),t);if(n?.set)return n.set.call(e.draft_,g),!0;if(!e.modified_){const n=peek$1(latest(e),t),C=n?.[p];if(C&&C.base_===g)return e.copy_[t]=g,e.assigned_.set(t,!1),!0;if(is$1(g,n)&&(void 0!==g||has(e.base_,t,e.type_)))return!0;prepareCopy(e),markChanged(e)}return e.copy_[t]===g&&(void 0!==g||t in e.copy_)||Number.isNaN(g)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=g,e.assigned_.set(t,!0),handleCrossReference(e,t,g)),!0},deleteProperty:(e,t)=>(prepareCopy(e),void 0!==peek$1(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),markChanged(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const g=latest(e),n=Reflect.getOwnPropertyDescriptor(g,t);return n?{[S]:!0,[v]:1!==e.type_||"length"!==t,[x]:n[x],[w]:g[t]}:n},defineProperty(){die(11)},getPrototypeOf:e=>h(e.base_),setPrototypeOf(){die(12)}},B={};for(let gc in L){let e=L[gc];B[gc]=function(){const t=arguments;return t[0]=t[0][0],e.apply(this,t)}}function peek$1(e,t){const g=e[p];return(g?latest(g):e)[t]}function readPropFromProto(e,t,g){const n=getDescriptorFromProto(t,g);return n?w in n?n[w]:n.get?.call(e.draft_):void 0}function getDescriptorFromProto(e,t){if(!(t in e))return;let g=h(e);for(;g;){const e=Object.getOwnPropertyDescriptor(g,t);if(e)return e;g=h(g)}}function markChanged(e){e.modified_||(e.modified_=!0,e.parent_&&markChanged(e.parent_))}function prepareCopy(e){e.copy_||(e.assigned_=new Map,e.copy_=shallowCopy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function createProxy(e,t,g,n){const[C,o]=isMap(t)?getPlugin(P).proxyMap_(t,g):isSet(t)?getPlugin(P).proxySet_(t,g):createProxyProxy(t,g);return(g?.scope_??getCurrentScope()).drafts_.push(C),o.callbacks_=g?.callbacks_??[],o.key_=n,g&&void 0!==n?registerChildFinalizationCallback(g,o,n):o.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(o);const{patchPlugin_:t}=e;o.modified_&&t&&t.generatePatches_(o,[],e)}),C}function current(e){return isDraft(e)||die(10,e),currentImpl(e)}function currentImpl(e){if(!isDraftable(e)||isFrozen(e))return e;const t=e[p];let g,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,g=shallowCopy(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else g=shallowCopy(e,!0);return each(g,(e,t)=>{set(g,e,currentImpl(t))},n),t&&(t.finalized_=!1),g}B.deleteProperty=function(e,t){return B.set.call(this,e,t,void 0)},B.set=function(e,t,g){return L.set.call(this,e[0],t,g,e[0])};var F,W=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,g)=>{if(isFunction(e)&&!isFunction(t)){const g=t;t=e;const n=this;return function(e=g,...C){return n.produce(e,e=>t.call(this,e,...C))}}let n;if(isFunction(t)||die(6),void 0===g||isFunction(g)||die(7),isDraftable(e)){const C=enterScope(this),o=createProxy(C,e,void 0);let I=!0;try{n=t(o),I=!1}finally{I?revokeScope(C):leaveScope(C)}return usePatchesInScope(C,g),processResult(n,C)}if(!e||!isObjectish(e)){if(n=t(e),void 0===n&&(n=e),n===u&&(n=void 0),this.autoFreeze_&&freeze(n,!0),g){const t=[],C=[];getPlugin(N).generateReplacementPatches_(e,n,{patches_:t,inversePatches_:C}),g(t,C)}return n}die(1,e)},this.produceWithPatches=(e,t)=>{if(isFunction(e))return(t,...g)=>this.produceWithPatches(t,t=>e(t,...g));let g,n;return[this.produce(e,t,(e,t)=>{g=e,n=t}),g,n]},isBoolean(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),isBoolean(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),isBoolean(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){isDraftable(e)||die(8),isDraft(e)&&(e=current(e));const t=enterScope(this),g=createProxy(t,e,void 0);return g[p].isManual_=!0,leaveScope(t),g}finishDraft(e,t){const g=e&&e[p];g&&g.isManual_||die(9);const{scope_:n}=g;return usePatchesInScope(n,t),processResult(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let g;for(g=t.length-1;g>=0;g--){const n=t[g];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}g>-1&&(t=t.slice(g+1));const n=getPlugin(N).applyPatches_;return isDraft(e)?n(e,t):this.produce(e,e=>n(e,t))}},V=W.produce,U=W.setAutoFreeze.bind(W),K=200,applyCap=(e,t)=>!Number.isFinite(t)||t<=0?e:e.length>t?e.slice(e.length-t):e,createFeedModel=({cap:e=K}={})=>{let t=[];return{add:g=>{t=applyCap(t.concat(g),e)},addEntries:g=>{Array.isArray(g)&&0!==g.length&&(t=applyCap(t.concat(g),e))},replaceEntries:g=>{t=applyCap(Array.isArray(g)?[...g]:[],e)},snapshot:()=>[...t],clear:()=>{t=[]},destroy:()=>{t=[]}}},H=3e3,Y=1e3,Z=5e3,createStreamModel=({onAppend:e=()=>{},onClear:t=()=>{}}={})=>{let g=0,n=0,C=[],o=[],I=null,a=null;const i=new Set,notify=()=>{n++,a=null,i.forEach(e=>e())},retainLiveTail=e=>e.length<3e3?e:e.slice(-Y),callCallback=(e,...t)=>{try{const g=e(...t);g&&"function"==typeof g.catch&&g.catch(()=>{})}catch{}},addLines=t=>{const n=[],a=[];let i=null;for(const e of t){if("main"!==(e.buffer??"main"))continue;const t={id:g++,html:e.html,timestamp:e.timestamp,isPrompt:e.isPrompt,isMonospace:e.isMonospace,shouldLog:e.shouldLog,buffer:e.buffer??"main"};n.push(t),t.isPrompt?i=t:a.push(t)}0!==n.length&&(C=retainLiveTail([...C,...n]),o=retainLiveTail([...o,...a]),i&&(I=i),callCallback(e,n),notify())};return{subscribe:e=>(i.add(e),()=>i.delete(e)),getSnapshot:()=>(a||(a={version:n,buffer:C,filteredBuffer:o,promptLine:I,totalLines:C.length}),a),addLines,clear:()=>{C=[],o=[],I=null,g=0,callCallback(t),notify()},getStats:()=>({totalLines:C.length,filteredLines:o.length,liveBufferCount:C.length,liveFilteredCount:o.length,version:n,subscribers:i.size,sessionTotalLines:g,nextId:g,liveBufferCapThreshold:H,liveBufferRetainCount:Y})}},Q=5e3,appendWithCap=(e,t,g)=>{if(0===t.length)return e;const n=e.concat(t);return!Number.isFinite(g)||g<=0?n:n.length>g?n.slice(n.length-g):n},createTranscriptModel=({cap:e=Q}={})=>{let t=0,g=0,n=[],C=null;const o=new Set,notify=()=>{g++,C=null,o.forEach(e=>e())},addLines=g=>{const C=[];for(const e of g)C.push({id:t++,html:e.html,timestamp:e.timestamp,isPrompt:Boolean(e.isPrompt),isMonospace:Boolean(e.isMonospace),shouldLog:e.shouldLog,hasMXP:(e.html||"").includes("mxp_send"),buffer:e.buffer});0!==C.length&&(n=appendWithCap(n,C,e),notify())};return{subscribe:e=>(o.add(e),()=>o.delete(e)),getSnapshot:()=>(C||(C={version:g,items:n,totalLines:n.length}),C),addLines,clear:()=>{n=[],t=0,notify()},getStats:()=>({totalLines:n.length,version:g,subscribers:o.size})}},X=Object.freeze({SYSTEM_PHASE:"nexgui4.system.phase",SYSTEM_READY:"nexgui4.system.ready",SYSTEM_DESTROYED:"nexgui4.system.destroyed"}),_=Object.freeze({TIMER_STARTED:"nexgui4.domain.timer.started",TIMER_UPDATED:"nexgui4.domain.timer.updated",TIMER_EXPIRED:"nexgui4.domain.timer.expired",TIMER_CLEARED:"nexgui4.domain.timer.cleared",STATS_UPDATED:"nexgui4.domain.stats.updated",TARGET_CHANGED:"nexgui4.domain.target.changed",STREAM_LINE:"nexgui4.domain.stream.line",PARTY_UPDATED:"nexgui4.domain.party.updated",PARTY_MEMBER_LEFT:"nexgui4.domain.party.member.left",ROOM_UPDATED:"nexgui4.domain.room.updated",DEFENCE_GAINED:"nexgui4.domain.defence.gained",DEFENCE_LOST:"nexgui4.domain.defence.lost",DEFENCES_REPLACED:"nexgui4.domain.defence.replaced",CHARACTER_UPDATED:"nexgui4.domain.character.updated",CLASS_CHANGED:"nexgui4.domain.character.class.changed"}),q=Object.freeze({STREAM_LINE:"nexgui4.ingress.stream.line",TIMER_STARTED:"nexgui4.ingress.timer.started",STATS_UPDATED:"nexgui4.ingress.stats.updated",TARGET_CHANGED:"nexgui4.ingress.target.changed",ROOM_UPDATED:"nexgui4.ingress.room.updated",DEFENCE_GAINED:"nexgui4.ingress.defence.gained",DEFENCE_LOST:"nexgui4.ingress.defence.lost",CLASS_CHANGED:"nexgui4.ingress.character.class.changed"}),J=Object.freeze({THEME_CHANGED:"nexgui4.ui.theme.changed",HOST_SETTINGS_CHANGED:"nexgui4.ui.host.settings.changed"}),$=Object.freeze({...X,..._,...J}),hasOwn$1=(e,t)=>Boolean(e)&&Object.prototype.hasOwnProperty.call(e,t),normalizeNumber$3=e=>{const t=Number(e);return Number.isFinite(t)?t:0},normalizeDuration=e=>Math.max(0,Math.abs(normalizeNumber$3(e))),normalizeDirection$1=(e,t="countdown")=>e&&"object"==typeof e?"countup"===e.direction||"countup"===e.mode||!1===e.countDown?"countup":"countdown":t,normalizePosition$1=(e,t="top")=>"string"==typeof e?"bottom"===e?"bottom":"top":e&&"object"==typeof e?"bottom"===e.position?"bottom":"top":t,normalizeStayVisible=(e,t=!0)=>e&&"object"==typeof e&&hasOwn$1(e,"stayVisible")?!0===e.stayVisible:t,normalizeGroupIds=(e,t=[])=>{if(!e||"object"!=typeof e)return[...t];const g=hasOwn$1(e,"groupIds")?e.groupIds:hasOwn$1(e,"groupId")?e.groupId:hasOwn$1(e,"group")?e.group:null;if(null==g)return[...t];const n=Array.isArray(g)?g:[g],C=new Set,o=[];for(const I of n){if("string"!=typeof I)continue;const e=I.trim();e&&!C.has(e)&&(C.add(e),o.push(e))}return o},isVisibleTimer=e=>!0===e.stayVisible||!0===e.enabled&&!0===e.running,areGroupIdsEqual=(e,t)=>e.length===t.length&&e.every((e,g)=>e===t[g]),areTimerSnapshotsEqual=(e,t)=>e.id===t.id&&e.durationMs===t.durationMs&&e.startedAt===t.startedAt&&e.label===t.label&&e.direction===t.direction&&e.position===t.position&&e.stayVisible===t.stayVisible&&e.enabled===t.enabled&&e.running===t.running&&e.elapsedMs===t.elapsedMs&&e.remainingMs===t.remainingMs&&areGroupIdsEqual(e.groupIds,t.groupIds),getIdleElapsedMs=e=>!0===e.stayVisible?e.durationMs:0,noopSetTimer=()=>null,noopClearTimer$1=()=>{},createTimerModel=({eventBus:e,now:t=()=>0,setTimer:g=noopSetTimer,clearTimer:n=noopClearTimer$1}={})=>{const C=new Map;let o=[];const getElapsedMs=e=>e.running&&null!=e.startedAt?Math.min(e.durationMs,Math.max(0,normalizeNumber$3(t())-normalizeNumber$3(e.startedAt))):e.elapsedMs,cloneTimer=e=>{const t=getElapsedMs(e);return{id:e.id,durationMs:e.durationMs,startedAt:e.startedAt,label:e.label,direction:e.direction,position:e.position,stayVisible:e.stayVisible,groupIds:[...e.groupIds],enabled:e.enabled,running:e.running,elapsedMs:t,remainingMs:Math.max(0,e.durationMs-t)}},clearScheduledExpiry=e=>{null!=e.timeoutId&&(n(e.timeoutId),e.timeoutId=null)},emitTimerUpdated=t=>{e.emit(_.TIMER_UPDATED,cloneTimer(t))},expire=t=>{const g=C.get(t);g&&(clearScheduledExpiry(g),g.elapsedMs=g.durationMs,g.startedAt=null,g.enabled=!1,g.running=!1,e.emit(_.TIMER_EXPIRED,{...cloneTimer(g),reason:"expired"}))},scheduleExpiry=e=>{clearScheduledExpiry(e),e.timeoutId=g(()=>expire(e.id),e.durationMs)},createDormantTimer=(e,t,g,n,C)=>{const o=t??C?.durationMs??0,I=normalizeStayVisible(n,C?.stayVisible??!0);return{id:e,durationMs:o,startedAt:null,label:"string"==typeof g?g:C?.label??"",direction:normalizeDirection$1(n,C?.direction??"countdown"),position:normalizePosition$1(n,C?.position??"top"),stayVisible:I,groupIds:normalizeGroupIds(n,C?.groupIds??[]),enabled:!1,running:!1,elapsedMs:I?o:0,timeoutId:null}},createTimer=(e,t,g,n)=>{const o=C.get(e);o&&clearScheduledExpiry(o);const I=createDormantTimer(e,normalizeDuration(t),g,n,o);return C.set(e,I),emitTimerUpdated(I),cloneTimer(I)},start=g=>{const n=C.get(g);if(!n)return null;clearScheduledExpiry(n),n.elapsedMs=0,n.startedAt=t(),n.enabled=!0,n.running=!0,scheduleExpiry(n);const o=cloneTimer(n);return e.emit(_.TIMER_STARTED,o),o},remove=t=>{const g=C.get(t);if(!g)return null;clearScheduledExpiry(g);const n=cloneTimer(g);return C.delete(t),e.emit(_.TIMER_EXPIRED,{...n,reason:"removed"}),n},list=(e={})=>{const t="string"==typeof e?e:e.groupId??null,g="object"==typeof e&&!0===e?.visibleOnly;return[...C.values()].map(e=>cloneTimer(e)).filter(e=>!(t&&!e.groupIds.includes(t)||g&&!isVisibleTimer(e)))},snapshot=()=>list({visibleOnly:!0});return{add:(e,t,g="",n)=>{const C=createTimer(e,t,g,n);return n&&"object"==typeof n&&!0===n.autoStart?start(e):C},clearAll:()=>{if(0===C.size)return 0;const t=C.size;return C.forEach(e=>clearScheduledExpiry(e)),C.clear(),e.emit(_.TIMER_CLEARED),t},destroy:()=>{C.forEach(e=>clearScheduledExpiry(e)),C.clear()},get:e=>{const t=C.get(e);return t?cloneTimer(t):null},list,read:()=>{const e=[...C.values()].map(e=>cloneTimer(e)).filter(e=>isVisibleTimer(e));return o.length===e.length&&o.every((t,g)=>areTimerSnapshotsEqual(t,e[g]))||(o=e),o},remove,reset:e=>{const t=C.get(e);return t?(clearScheduledExpiry(t),t.elapsedMs=getIdleElapsedMs(t),t.startedAt=null,t.enabled=!1,t.running=!1,emitTimerUpdated(t),cloneTimer(t)):null},snapshot,start,stop:e=>{const t=C.get(e);return t?(clearScheduledExpiry(t),t.elapsedMs=getElapsedMs(t),t.startedAt=null,t.enabled=!1,t.running=!1,emitTimerUpdated(t),cloneTimer(t)):null}}},isPlainObject$1=e=>"[object Object]"===Object.prototype.toString.call(e),toNumber=(e,t=0)=>{const g="number"==typeof e?e:"string"==typeof e&&e.trim().length>0?Number(e):NaN;return Number.isFinite(g)?g:t},toPercent=e=>{if("number"==typeof e&&Number.isFinite(e))return e;if("string"!=typeof e)return null;const t=Number.parseInt(e.replace("%","").trim(),10);return Number.isNaN(t)?null:t},toTrimmedString=e=>"string"==typeof e&&e.trim().length>0?e.trim():null,toBooleanFlag=e=>!0===e||1===e||"1"===e,stripAnsi=e=>"string"==typeof e?e.replace(/\u001b\[[0-9;]*m/g,"").trim():"",extractNamedValue=e=>Array.isArray(e)?toTrimmedString(e[0]):isPlainObject$1(e)?toTrimmedString(e.name):toTrimmedString(e),deepFreeze=e=>{if(!e||"object"!=typeof e||Object.isFrozen(e))return e;Object.freeze(e);for(const t of Object.values(e))deepFreeze(t);return e},parseFontSize=(e,t=14)=>{if("number"==typeof e&&Number.isFinite(e)&&e>0)return e;if("string"==typeof e){const t=Number.parseFloat(e);if(Number.isFinite(t)&&t>0)return t}return t},ee={hp:{current:0,max:0},mp:{current:0,max:0},ep:{current:0,max:0},wp:{current:0,max:0},nl:{current:0,max:0},gold:0,bank:0,xp:0,xpToNext:0},createStatsModel=({eventBus:e}={})=>{let t=structuredClone(ee);const read=()=>t;return{update:g=>{for(const e of Object.keys(g)){const n=g[e];null===n||"object"!=typeof n||Array.isArray(n)?t[e]=n:t[e]={...t[e],...n}}e.emit(_.STATS_UPDATED,read())},read,snapshot:()=>deepFreeze(structuredClone(t)),destroy:()=>{t=structuredClone(ee)}}},te=Object.freeze({goldCollection:!0,targetCalls:!0,affCalls:!0,callTargets:!1,callAffs:!1,gagChat:!1}),ge=Object.freeze([{key:"goldCollection",label:"Collect Gold",tooltip:"Legacy party automation flag for gold collection behaviour."},{key:"targetCalls",label:"Accept Targets",tooltip:"Accept leader target calls from party chat."},{key:"affCalls",label:"Accept Affs",tooltip:"Accept legacy affliction call messages from party chat."},{key:"callTargets",label:"Call Targets",tooltip:"Legacy toggle preserved for compatibility with party workflows."},{key:"callAffs",label:"Call Affs",tooltip:"Legacy toggle preserved for compatibility with party workflows."},{key:"gagChat",label:"Gag Chat",tooltip:"Hide party chat lines from the display stream."}]),re=Object.freeze(ge.map(({key:e})=>e)),isNonEmptyString=e=>"string"==typeof e&&e.trim().length>0,trimToEmpty=e=>isNonEmptyString(e)?e.trim():"",ne=trimToEmpty,normalizeLookupKey=e=>trimToEmpty(e).toLowerCase(),toDisplayName=e=>trimToEmpty(e).replace(/[_-]+/g," ").replace(/\s+/g," ").replace(/\b([a-z])/g,e=>e.toUpperCase()),capitalizeFirst=e=>{const t=trimToEmpty(e);return t?t.charAt(0).toUpperCase()+t.slice(1):""},cloneSettings=e=>({...te,...e}),cloneState=e=>({members:[...e.members],leader:e.leader,selfName:e.selfName,settings:cloneSettings(e.settings)}),normalizeMembers=e=>{const t=[],g=new Set;return(Array.isArray(e)?e:[]).forEach(e=>{const n=ne("string"==typeof e?e:e?.name);n&&!g.has(n)&&(g.add(n),t.push(n))}),t},reconcileLeader=(e,t)=>t.includes(e.leader)?e.leader:e.selfName&&t.includes(e.selfName)?e.selfName:t[0]??"",ensureSelfMember=(e,t)=>!e.selfName||t.includes(e.selfName)?t:[e.selfName,...t],createPartyModel=({eventBus:e}={})=>{let t={members:[],leader:"",selfName:"",settings:cloneSettings(te)};const emitUpdated=()=>{e.emit(_.PARTY_UPDATED,snapshot())},snapshot=()=>cloneState(t);return{update:e=>{const g=ensureSelfMember(t,normalizeMembers(e)),n=reconcileLeader(t,g);t.leader===n&&t.members.length===g.length&&t.members.every((e,t)=>e===g[t])||(t={...t,members:g,leader:n},emitUpdated())},addMember:e=>{const g=ne(e);g&&!t.members.includes(g)&&(t={...t,members:[...t.members,g],leader:t.leader||g},emitUpdated())},removeMember:g=>{const n=ne(g);if(!n||n===t.selfName||!t.members.includes(n))return;const C=t.members.filter(e=>e!==n);t={...t,members:C,leader:reconcileLeader(t,C)},e.emit(_.PARTY_MEMBER_LEFT,{name:n}),emitUpdated()},setLeader:e=>{const g=ne(e);g&&t.members.includes(g)&&t.leader!==g&&(t={...t,leader:g},emitUpdated())},setSelf:e=>{const g=ne(e);if(!g)return;const n=ensureSelfMember({...t,selfName:g},t.members.filter(e=>e!==g)),C=n.includes(t.leader)?t.leader:g;t.selfName===g&&t.leader===C&&t.members.length===n.length&&t.members.every((e,t)=>e===n[t])||(t={...t,selfName:g,members:n,leader:C},emitUpdated())},setSetting:(e,g)=>{if(!re.includes(e))throw new Error(`[nexGui4] Unknown party setting "${String(e)}".`);const n=!0===g;t.settings[e]!==n&&(t={...t,settings:{...t.settings,[e]:n}},emitUpdated())},read:()=>t,snapshot,destroy:()=>{t={members:[],leader:"",selfName:"",settings:cloneSettings(te)}}}},Ae={players:[],npcs:[],items:[],roomName:"",roomId:""},cloneRoomCollection=e=>Array.isArray(e)?structuredClone(e):[],createRoomModel=({eventBus:e}={})=>{let t=structuredClone(Ae);const read=()=>t;return{update:g=>{t={players:g.players?[...g.players]:[],npcs:cloneRoomCollection(g.npcs),items:cloneRoomCollection(g.items),roomName:g.roomName??"",roomId:g.roomId??""},e.emit(_.ROOM_UPDATED,read())},read,snapshot:()=>({players:[...t.players],npcs:cloneRoomCollection(t.npcs),items:cloneRoomCollection(t.items),roomName:t.roomName,roomId:t.roomId}),destroy:()=>{t=structuredClone(Ae)}}},Ce={name:"",class:"",level:0,target:null,targetDetails:{id:null,name:null,hpPercent:null,hpText:null,hpDelta:null,gender:null,currentAffs:[],limbs:{}},gender:null,balance:!1,equilibrium:!1,classBalanceType:null,classBalanceReady:null,currentAffs:[],limbs:{}},createCharacterModel=({eventBus:e}={})=>{let t={...Ce};const read=()=>t;return{update:g=>{t={...t,...g},e.emit(_.CHARACTER_UPDATED,read())},read,setClass:g=>{t={...t,class:g},e.emit(_.CLASS_CHANGED,{class:g})},setTarget:g=>{t={...t,target:g},e.emit(_.TARGET_CHANGED,{target:g})},snapshot:()=>deepFreeze(structuredClone(t)),destroy:()=>{t={...Ce}}}},createDefenceModel=({eventBus:e}={})=>{let t=[];const replaceAll=(g=[])=>{t=Array.isArray(g)?[...new Set(g.map(e=>"string"==typeof e?e.trim():"").filter(Boolean))].sort():[],e.emit(_.DEFENCES_REPLACED,{defences:snapshot()})},snapshot=()=>[...t];return{gain:g=>{t.includes(g)||(t=[...t,g].sort()),e.emit(_.DEFENCE_GAINED,{name:g})},lose:g=>{t.includes(g)&&(t=t.filter(e=>e!==g)),e.emit(_.DEFENCE_LOST,{name:g})},replaceAll,reset:()=>{t=[]},read:()=>t,snapshot,destroy:()=>{t=[]}}},normalizeClassBalanceType=e=>"string"==typeof e&&e.trim().length>0?e.trim():null,normalizeClassStatList=e=>Array.isArray(e)?e.reduce((e,t)=>{if("string"!=typeof t)return e;const g=t.trim();return g?(e.push(g),e):e},[]):[],resolveClassBalanceReady=({classStats:e,classBalanceType:t})=>{const g=normalizeClassBalanceType(t);if(!g)return null;const n=normalizeClassStatList(e).map(e=>e.toLowerCase()),C=`${g.toLowerCase()}: yes`,o=`${g.toLowerCase()}: no`;return!!n.includes(C)||!n.includes(o)&&null},createClassBalanceController=()=>{let e=null,t=[];const snapshot=()=>({classBalanceType:e,classBalanceReady:resolveClassBalanceReady({classStats:t,classBalanceType:e})});return{getType:()=>e,setType:t=>(e=normalizeClassBalanceType(t),snapshot()),updateFromVitals:e=>(t=normalizeClassStatList(e?.charstats),snapshot()),destroy:()=>{e=null,t=[]}}},oe=Object.freeze(["m","mx"]),Ie=new Set(oe),isRoomNpcAttrib=e=>"string"==typeof e&&Ie.has(e),isRoomNpcItem=e=>"object"==typeof e&&null!==e&&isRoomNpcAttrib(e.attrib),getRoomEntryId=e=>isPlainObject$1(e)&&null!=e.id?String(e.id):null,isRoomLocation=e=>"room"===toTrimmedString(e?.location)?.toLowerCase(),splitRoomEntries=e=>(Array.isArray(e)?structuredClone(e):[]).reduce((e,t)=>(isRoomNpcItem(t)?e.npcs.push(t):e.items.push(t),e),{items:[],npcs:[]}),extractRoomItemList=e=>Array.isArray(e?.items)?e.items:Array.isArray(e?.Items)?e.Items:Array.isArray(e?.room)?e.room:[],extractRoomItemEntry=e=>isPlainObject$1(e?.item)?e.item:isPlainObject$1(e?.Item)?e.Item:isPlainObject$1(e)?e:null,removeRoomItemEntry=(e,t)=>e.filter(e=>getRoomEntryId(e)!==t),upsertRoomItemEntry=(e,t)=>{const g=getRoomEntryId(t);if(!g)return[...e,structuredClone(t)];const n=structuredClone(e),C=n.findIndex(e=>getRoomEntryId(e)===g);return-1===C?(n.push(structuredClone(t)),n):(n[C]=structuredClone(t),n)},createRoomOccupantsModel=({roomModel:e,playerDirectory:t}={})=>{const rememberRoomPlayers=e=>{t?.rememberRoomPlayers?.(e)},apply=(t,g)=>{const n=e.snapshot();switch(t){case"Room.Info":{const t=Array.isArray(g?.Players)?g.Players:Array.isArray(g?.players)?g.players:[],C=t.map(e=>extractNamedValue(e)??toTrimmedString(e?.fullname)).filter(Boolean);return rememberRoomPlayers(t),e.update({...n,players:C,roomName:toTrimmedString(g?.name)??"",roomId:g?.num??g?.id??""}),!0}case"Room.AddPlayer":{const t=toTrimmedString(g?.name)??extractNamedValue(g)??toTrimmedString(g?.fullname);return!(!t||n.players.includes(t)||(rememberRoomPlayers([g]),e.update({...n,players:[...n.players,t]}),0))}case"Room.RemovePlayer":{const t=extractNamedValue(g);return!!t&&(e.update({...n,players:n.players.filter(e=>e!==t)}),!0)}case"Char.Items.List":return!!isRoomLocation(g)&&(e.update({...n,...splitRoomEntries(extractRoomItemList(g))}),!0);case"Char.Items.Add":case"Char.Items.Update":{if(!isRoomLocation(g))return!1;const t=extractRoomItemEntry(g);if(!t)return!1;const C=getRoomEntryId(t),o=null==C?n.npcs:removeRoomItemEntry(n.npcs,C),I=null==C?n.items:removeRoomItemEntry(n.items,C);return e.update({...n,npcs:isRoomNpcItem(t)?upsertRoomItemEntry(o,t):o,items:isRoomNpcItem(t)?I:upsertRoomItemEntry(I,t)}),!0}case"Char.Items.Remove":{if(!isRoomLocation(g))return!1;const t=getRoomEntryId(extractRoomItemEntry(g));return!!t&&(e.update({...n,npcs:removeRoomItemEntry(n.npcs,t),items:removeRoomItemEntry(n.items,t)}),!0)}default:return!1}};return Object.freeze({apply})},ae=Object.freeze({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),escapeHtml=e=>String(e??"").replace(/[&<>"']/g,e=>ae[e]),ie=Object.freeze({amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "}),stripHtml=e=>{if(!e||"string"!=typeof e)return e??"";let t=e.replace(/<[^>]+>/g,"");return t=t.replace(/&([^;]+);/g,(e,t)=>{if(ie[t])return ie[t];if(t.startsWith("#")){const e=t.startsWith("#x")?parseInt(t.substring(2),16):parseInt(t.substring(1),10);if(!isNaN(e))return String.fromCharCode(e)}return e}),t},se=Object.freeze({"a monolith sigil":{color:"red",text:"A MONOLITH SIGIL"},"a cube sigil":{color:"yellow",text:"A CUBE SIGIL"},"some gold sovereigns":{color:"gold",text:"GOLD COINS"}}),le=Object.freeze({angle:Object.freeze({open:"<",close:">"}),square:Object.freeze({open:"[",close:"]"}),curly:Object.freeze({open:"{",close:"}"}),round:Object.freeze({open:"(",close:")"})}),styleAttribute$2=e=>{const t=Object.entries(e).filter(([,e])=>e);return 0===t.length?"":` style="${t.map(([e,t])=>`${e}: ${t}`).join("; ")}"`},createTextSegment=(e,t,g={})=>({text:e,color:t,italic:Boolean(g.italic),bold:Boolean(g.bold)}),renderSegmentHtml=e=>`<span${styleAttribute$2({color:e.color,"font-style":e.italic?"italic":null,"font-weight":e.bold?"700":null})}>${escapeHtml(e.text)}</span>`,createStaticRule=(e,t,g,n)=>Object.freeze({family:"room-text",id:e,gate:t,pattern:g,createMarker:()=>n}),createDirectionalRule=(e,t,g,n,C,o,I,a)=>Object.freeze({family:"room-text",id:e,gate:t,pattern:g,createMarker:e=>({frame:n,frameColor:C,segments:[createTextSegment(o,I),createTextSegment(capitalizeFirst(e?.groups?.direction),a)]})}),createSigilRule=(e,t,g,n,C)=>createStaticRule(e,t,g,{frame:"curly",frameColor:"yellow",segments:[createTextSegment("Sigil: ","silver"),createTextSegment(n,C)]}),createRuneRule=(e,t,g,n)=>createStaticRule(e,t,g,{frame:"round",frameColor:"red",segments:[createTextSegment("Rune: ","silver"),createTextSegment(n,"aquamarine")]}),createConquestRule=(e,t,g,n,C)=>createStaticRule(e,t,g,{frame:null,frameColor:null,leftIcons:[{id:"shield-halved",colors:["silver",C],size:12}],rightIcons:[{id:"shield-halved",colors:[C,"silver"],size:12}],segments:[createTextSegment(" Conquest: ","slategray"),createTextSegment(n,C)]}),ce=Object.freeze([createStaticRule("totem","runic totem",/A runic totem is planted solidly in the ground\./,{frame:"angle",frameColor:"dodgerblue",segments:[createTextSegment("TOTEM","Tomato")]}),createStaticRule("frozenGround","slick with",/The ground is slick with ice\./,{frame:"angle",frameColor:"dodgerblue",segments:[createTextSegment("Frozen Ground","PowderBlue")]}),createStaticRule("graveHands","rotting flesh",/Hands of rotting flesh and white bone push up from the ground/,{frame:"angle",frameColor:"crimson",segments:[createTextSegment("Gravehands","Beige")]}),createDirectionalRule("icewall","icewall",/An icewall is here, blocking passage to the (?<direction>\w+)\./,"square","red","Icewall: ","dodgerblue","aquamarine"),createDirectionalRule("stonewall","wall of stone",/A large wall of stone stands here, blocking passage to the (?<direction>\w+)\./,"square","red","Stonewall: ","silver","aquamarine"),createSigilRule("cubeSigil","cube",/Resting on the ground is a cube-shaped silver sigil\./,"Cube","aquamarine"),createSigilRule("eyeSigil","obsidian",/An obsidian eye sigil is here\./,"Eye","lightgreen"),createSigilRule("monolithSigil","monolith",/A sigil in the shape of a small, rectangular monolith is on the ground\./,"Monolith","red"),createSigilRule("keySigil","key-shaped",/Lying flat on the ground is a key-shaped sigil\./,"Key","lightPink"),createRuneRule("kena","nightmares",/A rune that looks like something out of your nightmares has been sketched into the ground here\./,"Kena"),createRuneRule("uruz","lightning bolt",/A rune like a lightning bolt has been sketched into the ground here\./,"Uruz"),createRuneRule("fehu","closed eye",/A rune like a closed eye has been sketched into the ground here\./,"Fehu"),createRuneRule("pithikhan","square box",/A rune resembling a square box has been sketched into the ground here\./,"Pithikhan"),createRuneRule("inguz","stick man",/A rune that looks like a stick man has been sketched into the ground here\./,"Inguz"),createRuneRule("wunjo","open eye",/A rune like an open eye has been sketched into the ground here\./,"Wunjo"),createRuneRule("sowulu","a nail",/A rune that looks like a nail has been sketched into the ground here\./,"Sowulu"),createRuneRule("isaz","flurry of lighning",/A rune like a flurry of lightning bolts has been sketched into the ground here\./,"Isaz"),createRuneRule("dagaz","rising sun",/A rune like a rising sun has been sketched into the ground here\./,"Dagaz"),createRuneRule("raido","resembling a horse",/A rune resembling a horse has been sketched into the ground here\./,"Raido"),createRuneRule("nauthiz","resembling a leech",/A rune resembling a leech has been sketched into the ground here\./,"Nauthiz"),createRuneRule("mannaz","resembling a bell",/A rune resembling a bell has been sketched into the ground here\./,"Mannaz"),createRuneRule("othala","resembling a mountain",/A rune resembling a mountain range has been sketched into the ground here\./,"Othala"),createRuneRule("sleizak","resembling a viper",/A rune resembling a viper has been sketched into the ground here\./,"Sleizak"),createRuneRule("tiwaz","upward-pointing arrow",/A rune like an upward-pointing arrow has been sketched into the ground here\./,"Tiwaz"),createRuneRule("nairat","like a butterfly",/A rune shaped like a butterfly has been sketched into the ground here\./,"Nairat"),createRuneRule("eihwaz","like a yew",/A rune shaped like a yew has been sketched into the ground here\./,"Eihwaz"),createConquestRule("conquestAshtan","warp-touched",/Crackling ozone heralds warp-touched mirage, their coming the advent of change\./,"Ashtan ","#990099"),createConquestRule("conquestCyrene","draconic tracks",/Bound in ice, draconic tracks scribe a glittering path across the earth\./,"Cyrene ","#009999"),createConquestRule("conquestNeraeos","Cerulean waters",/Cerulean waters preside, fathom and depths stirred to roiling currents by the pervasive will of Neraeos Pelagia, Lord of the Sea\./,"Cyrene ","#009999"),createConquestRule("conquestEleusis","fecundity",/Nature's fecundity floods the surrounds with the clamour of life in a chittering refrain\./,"Eleusis ","#00e600"),createConquestRule("conquestHashan","leaden shadow",/Lines of leaden shadow coil underfoot, turning earth to metal by alchemical writ\./,"Hashan ","#999900"),createConquestRule("conquestMhaldor","red-hued",/A noxious, red-hued fog overwhelms the area with a thick, palpable vapour\./,"Mhaldor ","#e60000"),createConquestRule("conquestTargossas","mien",/Radiant light joins with calescent heat, suffusing the area with a harsh, blinding mien\./,"Targossas ","#ffffff"),createConquestRule("conquestUnderworld","ashen earth",/Soul's blood pools on ashen earth turned dust, an inviolable call to death's advance\./,"Underworld ","tomato")]),ue=new Map,de=new Set,notifyOverrideSubscribers=()=>{for(const e of de)e()},subscribeToRoomItemOverrides=e=>(de.add(e),()=>de.delete(e)),setUserRoomItemOverride=(e,t)=>{const g=normalizeLookupKey(e);g&&(ue.set(g,t),notifyOverrideSubscribers())},removeUserRoomItemOverride=e=>{const t=normalizeLookupKey(e);t&&(ue.delete(t),notifyOverrideSubscribers())},getUserRoomItemOverride=e=>{const t=normalizeLookupKey(e);return t?ue.get(t)??null:null},listUserRoomItemOverrides=()=>Array.from(ue.entries()),getRoomItemOverride=e=>{if("string"==typeof e){const t=normalizeLookupKey(e);return ue.get(t)??se[t]??null}if(!e||"object"!=typeof e)return null;const t=normalizeLookupKey(e.id),g=normalizeLookupKey(e.name);return ue.get(t)??ue.get(g)??se[t]??se[g]??null},renderRoomMarkerHtml=(e,t={})=>{const g=e.frame?le[e.frame]:null,n=t.iconRenderer,C=Array.isArray(e.leftIcons)?e.leftIcons.map(e=>n?.(e)??"").join(""):"",o=Array.isArray(e.rightIcons)?e.rightIcons.map(e=>n?.(e)??"").join(""):"";return[C,g?renderSegmentHtml(createTextSegment(g.open,e.frameColor,{bold:!0})):"",e.segments.map(renderSegmentHtml).join(""),g?renderSegmentHtml(createTextSegment(g.close,e.frameColor,{bold:!0})):"",o].join("")},matchRoomTextReplacements=e=>isNonEmptyString(e)?ce.flatMap(t=>{if(!e.includes(t.gate))return[];const g=e.match(t.pattern);return g?[{rule:t,match:g,marker:t.createMarker(g)}]:[]}):[],replaceRoomText=(e,t={})=>{if(!isNonEmptyString(e))return e;let g=e;for(const{rule:n,match:C,marker:o}of matchRoomTextReplacements(e))g=g.replace(n.pattern,renderRoomMarkerHtml(o,t));return g},createWormholeExitDescriptor=({warp:e,currentArea:t}={})=>{if(!e||"object"!=typeof e)return null;const g=t&&t===e.area?e.name:e.areaName;return isNonEmptyString(g)?{family:"room-exit",command:"worm warp",label:`Wormhole: (${g})`}:null},renderWormholeExitHtml=e=>e?`<span>, and <a class="mxp_send" href="#" rel="${escapeHtml(e.command)}">${escapeHtml(e.label)}</a>.</span>`:"",extractPartyChatPayload=e=>{if(!isPlainObject$1(e)||"party"!==toTrimmedString(e.channel)?.toLowerCase())return null;const t=toTrimmedString(e.talker),g=stripAnsi(e.text);return t&&g?{talker:t,message:g.match(/^\(Party\): (\w+) says, "(.+)"$/)?.[2]??g}:null},capitalizeLookupName=e=>`${e.charAt(0).toUpperCase()}${e.slice(1)}`,createPartyAutomationModel=({characterModel:e,partyModel:t,playerDirectory:g,sendCommand:n}={})=>{const send=e=>{"function"==typeof n&&n(e)},processChannelText=n=>{const C=extractPartyChatPayload(n);if(!C)return!1;const o=t.snapshot();if(!o.settings.targetCalls||C.talker!==o.leader)return!1;const I=C.message.match(/^Target: (.+)\.$/)??C.message.match(/^(?:Target|TARGET) (.+)\.$/);if(I){const t=toTrimmedString(I[1]);if(!t)return!1;const n=e.snapshot(),C=g.getPlayerProfile(n.name)?.city??"",o=g.getPlayerProfile(capitalizeLookupName(t))??g.getPlayerProfile(t);return!(o?.city&&C&&o.city===C||(send(`settarget ${t}`),send(`enemy ${t}`),0))}const a=C.message.match(/^Enemy (.+)\.$/);if(a){const e=toTrimmedString(a[1]);if(e)return send(`enemy ${e}`),!0}return!1},processEvent=(e,t)=>"Comm.Channel.Text"===e&&processChannelText(t);return Object.freeze({processChannelText,processEvent})},pe=(F={commands:["send","sendGmcp"],variables:["getVariable","setVariable"],target:["getTarget","setTarget"],output:["notice","gagCurrentBlock"],host:["getHostSettings","setHostSetting","getHostLayoutSnapshot","updateHostLayoutAttributes","focusInput","getConfiguredDefences","getActiveDefences"],events:["on","off"],lifecycle:["destroy"]},Object.freeze(Object.fromEntries(Object.entries(F).map(([e,t])=>[e,Object.freeze([...t])])))),me=Object.freeze(Object.values(pe).flat()),assertAdapterContract=e=>{const t=me;for(const g of t)if("function"!=typeof e?.[g])throw new Error(`[nexGui4] Adapter missing required method: "${g}"`);return e},createStoreImpl=e=>{let t;const g=new Set,setState=(e,n)=>{const C="function"==typeof e?e(t):e;if(!Object.is(C,t)){const e=t;t=(null!=n?n:"object"!=typeof C||null===C)?C:Object.assign({},t,C),g.forEach(g=>g(t,e))}},getState=()=>t,n={setState,getState,getInitialState:()=>C,subscribe:e=>(g.add(e),()=>g.delete(e))},C=t=e(setState,getState,n);return n},createStore=e=>e?createStoreImpl(e):createStoreImpl,identity$1=e=>e;function useStore(e,t=identity$1){const g=l.default.useSyncExternalStore(e.subscribe,l.default.useCallback(()=>t(e.getState()),[e,t]),l.default.useCallback(()=>t(e.getInitialState()),[e,t]));return l.default.useDebugValue(g),g}var createImpl=e=>{const t=createStore(e),useBoundStore=e=>useStore(t,e);return Object.assign(useBoundStore,t),useBoundStore},create=e=>e?createImpl(e):createImpl,normalizeConfiguredDefenceList=e=>{if(!Array.isArray(e))return[];const t=new Set;return e.reduce((e,g)=>{if("string"!=typeof g)return e;const n=g.trim();return!n||t.has(n)||(t.add(n),e.push(n)),e},[])},createDefenceStore=({defenceModel:e,eventBus:t,configuredDefences:g=[]})=>{const readDefences=()=>e.read?.()??e.snapshot(),n=create(()=>({defences:readDefences(),configuredDefences:normalizeConfiguredDefenceList(g),gainDefence:t=>e.gain(t),loseDefence:t=>e.lose(t),resetDefences:()=>{e.reset(),n.setState({defences:readDefences()})},setConfiguredDefences:e=>{n.setState({configuredDefences:normalizeConfiguredDefenceList(e)})}})),refreshDefences=()=>{n.setState({defences:readDefences()})};return t.on(_.DEFENCE_GAINED,refreshDefences),t.on(_.DEFENCE_LOST,refreshDefences),t.on(_.DEFENCES_REPLACED,refreshDefences),n},isRecord=e=>"[object Object]"===Object.prototype.toString.call(e),extractDefenceName=e=>"string"==typeof e?e:isRecord(e)&&"string"==typeof e.name?e.name:null,removeTrackedHandler=(e,t,g)=>{const n=e.get(t);if(n){if("string"==typeof g)n.delete(g);else for(const[e,t]of n.entries())if(t===g){n.delete(e);break}0===n.size&&e.delete(t)}},normalizeListenerIdSegment=e=>String(e).replace(/[^A-Za-z0-9]+/g,"-").replace(/^-+|-+$/g,"").replace(/-{2,}/g,"-"),createDefaultListenerId=(e,t)=>{const g=`nexGui4-${normalizeListenerIdSegment(e)||"event"}`;if(!t||0===t.size)return g;let n=t.size+1,C=`${g}-${n}`;for(;t.has(C);)n+=1,C=`${g}-${n}`;return C},fe="#00B1D2",he=`<span style="color:${fe};">[-</span><span style="color:#FDDB27;">nexGui</span><span style="color:${fe};">-] </span>`,renderNoticeHtml=(e,t)=>{if(t?.html)return he+String(e);const g=t&&"object"==typeof t?t.style:t,n=escapeHtml(e);return"string"==typeof g&&g.trim()?he+`<span style="color: ${escapeHtml(g.trim())};">${n}</span>`:he+n},getHostSettings=()=>nexusclient.settings?.()??{},getHostLayout=()=>nexusclient.ui?.()?.layout?.()??null,updateHostLayoutAttributes=e=>{const t=getHostLayout();t?.flexModel?.doAction&&"function"==typeof t.model&&t.flexModel.doAction({type:"FlexLayout_UpdateModelAttributes",data:{json:{...t.model()?.global??{},...e}}})},extractLegacyRuntimeConfiguredDefences=()=>normalizeConfiguredDefenceList(globalThis.nexGui?.defences),extractNexSysConfiguredDefences=()=>{const e=globalThis.nexSys?.defPrios,t=globalThis.nexSys?.defs;if("[object Object]"!==Object.prototype.toString.call(e)||"[object Object]"!==Object.prototype.toString.call(t))return[];const g=Object.entries(e.keepup??{}).filter(([,e])=>Boolean(e)).map(([e])=>e).filter(e=>Boolean(t?.[e]?.prio)),n=Object.entries(e.static??{}).filter(([,e])=>Boolean(e)).map(([e])=>e).filter(e=>Boolean(t?.[e]?.prio));return normalizeConfiguredDefenceList([...g,...n])},resolveConfiguredDefences=()=>{const e=extractLegacyRuntimeConfiguredDefences();return e.length>0?e:extractNexSysConfiguredDefences()},extractActiveDefencesFromGmcpNode=e=>Array.isArray(e)?normalizeConfiguredDefenceList(e.map(extractDefenceName).filter(Boolean)):isRecord(e)?Array.isArray(e.defences)?extractActiveDefencesFromGmcpNode(e.defences):normalizeConfiguredDefenceList(Object.entries(e).map(([e,t])=>extractDefenceName(t)??e)):[],extractGmcpActiveDefences=()=>normalizeConfiguredDefenceList([...extractActiveDefencesFromGmcpNode(globalThis.GMCP?.Defences),...extractActiveDefencesFromGmcpNode(globalThis.GMCP?.Char?.Defences)]),extractNexSysActiveDefences=(e=[])=>{const t=globalThis.nexSys?.api?.defs?.have;return"function"!=typeof t?[]:normalizeConfiguredDefenceList(e).filter(e=>{try{return Boolean(t(e))}catch{return!1}})},resolveActiveDefences=(e=[])=>normalizeConfiguredDefenceList([...extractGmcpActiveDefences(),...extractNexSysActiveDefences(e)]),createNexusAdapter=({playerRelationships:e}={})=>{const t=new Map;return assertAdapterContract({send:t=>(e?.trackRelationshipCommand?.(t),nexusclient.send_commands(t)),sendGmcp:(e,t)=>nexusclient.datahandler().send_GMCP(e,t),getVariable:e=>nexusclient.variables().vars?.[e],setVariable:(e,t)=>{const g=nexusclient.variables();g.vars??={},g.vars[e]=t},getTarget:()=>null,setTarget:e=>{nexusclient.setTarget(e)},notice:(e,t)=>{if("function"==typeof nexusclient.add_html_line)return void nexusclient.add_html_line(renderNoticeHtml(e,t));const g=t&&"object"==typeof t?t.style:t;"function"==typeof nexusclient.writeLine&&nexusclient.writeLine(e,g)},getHostSettings,setHostSetting:(e,t)=>{getHostSettings()[e]=t},getHostLayoutSnapshot:()=>getHostLayout()?.model?.()?.global??{},updateHostLayoutAttributes,focusInput:()=>{nexusclient.focusInput?.()},getConfiguredDefences:resolveConfiguredDefences,getActiveDefences:resolveActiveDefences,gagCurrentBlock:()=>nexusclient.current_block?.forEach(e=>e.gag=!0),on:(e,g,n)=>{t.has(e)||t.set(e,new Map);const C=t.get(e),o=null!=n?.id?n:{...n,id:createDefaultListenerId(e,C)},I=eventStream.registerEvent(e,g,o);return t.get(e).set(I,g),()=>{eventStream.removeListener(e,I),removeTrackedHandler(t,e,I)}},off:(e,g)=>{eventStream.removeListener(e,g),removeTrackedHandler(t,e,g)},destroy:()=>{for(const[e,g]of t.entries())for(const t of g.keys())eventStream.removeListener(e,t);t.clear()}})},ye=Object.freeze({"(hidden)":"orange","(none)":"orange",ashtan:"#990099",cyrene:"#009999",eleusis:"#00e600",hashan:"#999900",mhaldor:"#e60000",targossas:"#ffffff",garden:"yellow",underworld:"tomato"}),normalizePlayerCityKey=e=>{if(!isNonEmptyString(e))return"";const t=e.trim().toLowerCase();return"(hidden)"===t||"(none)"===t?t:t.replace(/\(.+?\)/g,"").replace(/,.*$/g,"").trim()},getPlayerCityColor=(e,t="orange")=>{const g=normalizePlayerCityKey(e);return g?ye[g]??t:t},resolveRoomPlayerName=(e,t)=>isNonEmptyString(e)?e.trim():isPlainObject$1(e)?isNonEmptyString(e.name)?e.name.trim():isNonEmptyString(e.fullname)?t?.resolvePlayerNameFromFullname?.(e.fullname)??"":"":"",buildFallbackPlayerProfile=(e,t)=>{if(!isPlainObject$1(e))return null;const g={loaded:!0,name:t};return isNonEmptyString(e.city)&&(g.city=normalizePlayerCityKey(e.city)),isNonEmptyString(e.class)&&(g.class=e.class.trim()),isNonEmptyString(e.fullname)&&(g.fullname=e.fullname.trim()),"number"==typeof e.level&&Number.isFinite(e.level)?g.level=e.level:isNonEmptyString(e.level)&&(g.level=e.level.trim()),Object.keys(g).length>2?g:null},mergePlayerPresentationProfile=(e,t)=>e?t?{...t,...e,loaded:!0===e.loaded||!0===t.loaded}:e:t,resolvePlayerPresentationColor=({name:e,profile:t,playerDirectory:g}={})=>!0===t?.loaded&&isNonEmptyString(t.city)?getPlayerCityColor(t.city):g?.getPlayerColor?.(ne(e))??"grey",cloneProfileValue=e=>Array.isArray(e)||isPlainObject$1(e)?structuredClone(e):e,sanitizeProfilePatch=(e={})=>{if(!isPlainObject$1(e))return{};const t={};for(const[g,n]of Object.entries(e))"name"!==g&&"regex"!==g&&"user"!==g&&("loaded"!==g?"city"!==g?"fullname"!==g?"source"!==g?"loadedAt"!==g&&"remoteSyncedAt"!==g?null!=n&&("string"!=typeof n?("number"==typeof n||"boolean"==typeof n||Array.isArray(n)||isPlainObject$1(n))&&(t[g]=cloneProfileValue(n)):n.trim().length>0&&(t[g]=n.trim())):"number"==typeof n&&Number.isFinite(n)?t[g]=n:null===n&&(t[g]=null):"local"!==n&&"public"!==n&&"remote"!==n||(t.source=n):isNonEmptyString(n)&&(t.fullname=n.trim()):isNonEmptyString(n)&&(t.city=normalizePlayerCityKey(n)):t.loaded=!0===n);return t},resolveFetch$1=e=>"function"==typeof e?e:null,createPlayerDirectoryModel=({fetchImpl:e,now:t=()=>0}={})=>{const g=new Map,n=new Map,C=new Map,o=new Set;let I=0;const notifyListeners=()=>{I+=1,o.forEach(e=>{try{e()}catch{}})},upsertProfile=(e,t={})=>{const C=ne(e);if(!C)return;const o={...g.get(C)??{name:C,city:"",fullname:"",loaded:!1,source:"local",loadedAt:null,remoteSyncedAt:null},...sanitizeProfilePatch(t),name:C};g.set(C,o),isNonEmptyString(o.fullname)&&n.set(o.fullname.trim(),C),notifyListeners()},resolveStoredName=e=>{const t=ne(e);if(!t)return"";if(g.has(t))return t;const n=normalizeLookupKey(t);for(const C of g.keys())if(C.toLowerCase()===n)return C;return t},getStoredProfileByNormalizedName=e=>e&&g.has(e)?g.get(e)??null:null,getPlayerProfile=e=>{const t=getStoredProfileByNormalizedName(ne(e));return t?{...t}:null},fetchCharacterProfile=async g=>{const n=ne(g),o=resolveStoredName(g),I=normalizeLookupKey(g);if(!n)return null;if(C.has(I))return C.get(I);const a=resolveFetch$1(e);if("function"!=typeof a)return o?getPlayerProfile(o):null;const i=(async()=>{try{const e=await a(`https://api.achaea.com/characters/${n.toLowerCase()}.json`,{cache:"no-store"});if(!e.ok)return o?getPlayerProfile(o):null;const g=await e.json(),C=resolveStoredName(g?.name??n);return upsertProfile(C,{...g,loaded:!0,source:"public",loadedAt:t()}),getPlayerProfile(C)}catch{return o?getPlayerProfile(o):null}finally{C.delete(I)}})();return C.set(I,i),i},refreshPlayerProfile=async e=>{const t=await fetchCharacterProfile(e);if(t)return t;const g=resolveStoredName(e);return g?getPlayerProfile(g):null},subscribePlayerDirectory=e=>(o.add(e),()=>{o.delete(e)}),rememberPlayerStatus=({name:e,city:t,fullname:g,...n}={})=>{const C=ne(e);C&&upsertProfile(C,{...n,name:C,city:t,fullname:g,loaded:!0})},rememberChannelPlayers=e=>{Array.isArray(e)&&e.forEach(e=>{const t=ne(e?.name);t&&(upsertProfile(t,{fullname:e?.fullname}),g.get(t)?.loaded||fetchCharacterProfile(t))})},rememberRoomPlayers=e=>{Array.isArray(e)&&e.forEach(e=>{const t=ne(e?.name??e);t&&(upsertProfile(t,{fullname:e?.fullname}),g.get(t)?.loaded||fetchCharacterProfile(t))})},resolvePlayerNameFromFullname=e=>{if(!isNonEmptyString(e))return"";const t=e.trim();return n.get(t)||ne(t.split(/\s+/).at(-1))},getPlayerColorByNormalizedName=e=>{const t=getStoredProfileByNormalizedName(e);return t?.loaded&&t.city?getPlayerCityColor(t.city):"grey"},getPlayerColor=e=>getPlayerColorByNormalizedName(ne(e)),resetPlayerDirectory=()=>{g.clear(),n.clear(),C.clear(),notifyListeners()},hydrateFromCacheEntries=e=>{Array.isArray(e)&&e.forEach(e=>{const t=ne(e?.name);t&&upsertProfile(t,{...e,loaded:!0})})},hydrateFromRemoteEntries=e=>{if(!Array.isArray(e))return;const g=t();e.forEach(e=>{const t=ne(e?.name);t&&upsertProfile(t,{...e,loaded:!0,source:"remote",remoteSyncedAt:g})})},getAllPlayerProfiles=()=>Array.from(g.values()).map(e=>({...e})),getKnownPlayerNames=()=>Array.from(g.keys()),destroy=()=>{g.clear(),n.clear(),C.clear(),o.clear()};return Object.freeze({getAllPlayerProfiles,getKnownPlayerNames,getPlayerColor,getPlayerColorByNormalizedName,getPlayerProfile,getVersion:()=>I,hydrateFromCacheEntries,hydrateFromRemoteEntries,refreshPlayerProfile,rememberChannelPlayers,rememberPlayerStatus,rememberRoomPlayers,resetPlayerDirectory,resolvePlayerNameFromFullname,subscribePlayerDirectory,destroy})},be=createPlayerDirectoryModel(),getDefaultPlayerDirectoryModel=()=>be,getPlayerProfile=e=>be.getPlayerProfile(e),updateSetMembership=(e,t,g)=>{if(!t)return!1;const n=e.has(t);return g&&!n?(e.add(t),!0):!(g||!n||(e.delete(t),0))},normalizeNames=e=>Array.isArray(e)?new Set(e.map(e=>ne(e)).filter(Boolean)):new Set,replaceSetContents=(e,t)=>{const g=normalizeNames(t);let n=!1;return[...e].forEach(t=>{g.has(t)||(e.delete(t),n=!0)}),g.forEach(t=>{e.has(t)||(e.add(t),n=!0)}),n},createPlayerRelationshipsModel=()=>{const e=new Set,t=new Set,g=new Set,n=new Set;let C=0;const notifyListeners=()=>{C+=1,n.forEach(e=>{try{e()}catch{}})},subscribePlayerRelationships=e=>(n.add(e),()=>{n.delete(e)}),rememberEnemyPlayer=g=>{const n=ne(g),C=updateSetMembership(e,n,!0),o=updateSetMembership(t,n,!1);(C||o)&&notifyListeners()},rememberAllyPlayer=g=>{const n=ne(g),C=updateSetMembership(t,n,!0),o=updateSetMembership(e,n,!1);(C||o)&&notifyListeners()},forgetEnemyPlayer=t=>{updateSetMembership(e,ne(t),!1)&&notifyListeners()},forgetAllyPlayer=e=>{updateSetMembership(t,ne(e),!1)&&notifyListeners()},rememberCityEnemyPlayer=e=>{updateSetMembership(g,ne(e),!0)&&notifyListeners()},isEnemyPlayerByNormalizedName=t=>e.has(t),isAllyPlayerByNormalizedName=e=>t.has(e),isCityEnemyPlayerByNormalizedName=e=>g.has(e),isEnemyPlayer=e=>isEnemyPlayerByNormalizedName(ne(e)),isAllyPlayer=e=>isAllyPlayerByNormalizedName(ne(e)),isCityEnemyPlayer=e=>isCityEnemyPlayerByNormalizedName(ne(e)),replaceEnemyPlayers=g=>{const n=normalizeNames(g);let C=replaceSetContents(e,[...n]);n.forEach(e=>{C=updateSetMembership(t,e,!1)||C}),C&&notifyListeners()},replaceAllyPlayers=g=>{const n=normalizeNames(g);let C=replaceSetContents(t,[...n]);n.forEach(t=>{C=updateSetMembership(e,t,!1)||C}),C&&notifyListeners()},replaceCityEnemyPlayers=e=>{replaceSetContents(g,e)&&notifyListeners()},trackRelationshipCommand=e=>{if(!isNonEmptyString(e))return;const t=e.trim(),g=t.match(/^enemy\s+(.+)$/i);if(g)return void rememberEnemyPlayer(g[1]);const n=t.match(/^ally\s+(.+)$/i);if(n)return void rememberAllyPlayer(n[1]);const C=t.match(/^city enemy\s+(.+)$/i);C&&rememberCityEnemyPlayer(C[1])},resetPlayerRelationships=()=>{e.clear(),t.clear(),g.clear(),notifyListeners()},destroy=()=>{e.clear(),t.clear(),g.clear(),n.clear()};return Object.freeze({forgetAllyPlayer,forgetEnemyPlayer,getVersion:()=>C,isAllyPlayer,isAllyPlayerByNormalizedName,isCityEnemyPlayer,isCityEnemyPlayerByNormalizedName,isEnemyPlayer,isEnemyPlayerByNormalizedName,rememberAllyPlayer,rememberCityEnemyPlayer,rememberEnemyPlayer,replaceAllyPlayers,replaceCityEnemyPlayers,replaceEnemyPlayers,resetPlayerRelationships,subscribePlayerRelationships,trackRelationshipCommand,destroy})},ve=createPlayerRelationshipsModel(),getDefaultPlayerRelationshipsModel=()=>ve,xe=25,cloneDiagnosticValue=e=>Array.isArray(e)?e.map(e=>cloneDiagnosticValue(e)):isPlainObject$1(e)?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,cloneDiagnosticValue(t)])):e,toPublicEntry=({_signature:e,...t})=>cloneDiagnosticValue(t),buildSignature=({channel:e,action:t,status:g,name:n=null,detail:C=null})=>JSON.stringify([e,t,g,n,C]),createPlayerDirectoryDiagnosticsModel=({historyLimit:e=xe,now:t=()=>0}={})=>{let g=[],n={};const recordPlayerDirectoryDiagnostic=({channel:C,action:o,status:I,name:a=null,detail:i=null})=>{const s=buildSignature({channel:C,action:o,status:I,name:a,detail:i}),l=t(),c=g.at(-1);if(c?._signature===s)return c.at=l,c.count+=1,void(n[C]=toPublicEntry(c));g.push({at:l,channel:C,action:o,status:I,...a?{name:a}:{},...null==i?{}:{detail:cloneDiagnosticValue(i)},count:1,_signature:s}),g.length>e&&g.splice(0,g.length-e),n[C]=toPublicEntry(g.at(-1))},getPlayerDirectoryDiagnosticsSnapshot=()=>({latest:cloneDiagnosticValue(n),history:g.map(e=>toPublicEntry(e))}),resetPlayerDirectoryDiagnostics=()=>{g=[],n={}};return Object.freeze({getPlayerDirectoryDiagnosticsSnapshot,recordPlayerDirectoryDiagnostic,resetPlayerDirectoryDiagnostics,destroy:resetPlayerDirectoryDiagnostics})},Se=createPlayerDirectoryDiagnosticsModel(),getDefaultPlayerDirectoryDiagnosticsModel=()=>Se,recordPlayerDirectoryDiagnostic=e=>Se.recordPlayerDirectoryDiagnostic(e),we=Object.freeze({DISABLED:"disabled",OK:"ok",UNAVAILABLE:"unavailable",REJECTED:"rejected"}),httpStatusToRemoteStatus=e=>401===e||403===e?we.REJECTED:e>=500||0===e?we.UNAVAILABLE:e>=200&&e<300?we.OK:we.UNAVAILABLE,createNullRemotePlayerService=()=>({checkAvailability:async()=>we.DISABLED,hydrateDirectory:async()=>({ok:!1,remoteStatus:we.DISABLED}),upsertProfile:async()=>({ok:!1,remoteStatus:we.DISABLED}),deleteProfile:async()=>({ok:!1,remoteStatus:we.DISABLED})}),createLambdaRemotePlayerService=({apiUrl:e,apiKey:t="",fetchFn:g=null}={})=>{if("string"!=typeof e||!e.trim())return createNullRemotePlayerService();const n=e.trim(),C="function"==typeof g?g:null,call=async({method:e,params:g={},body:o})=>{const I=new URLSearchParams;for(const[t,n]of Object.entries(g))"filter"===t&&null!==n&&"object"==typeof n?I.set(t,JSON.stringify(n)):void 0!==n&&I.set(t,String(n));const a=I.toString()?`${n}?${I}`:n,i={"Content-Type":"application/json"};t&&(i["x-api-key"]=t);const s={method:e,headers:i};void 0!==o&&(s.body=JSON.stringify(o));const l=await C(a,s);return{status:l.status,ok:l.ok,response:l}};return{checkAvailability:async()=>{if("function"!=typeof C)return we.UNAVAILABLE;try{const{status:e}=await call({method:"GET",params:{check:"auth"}});return httpStatusToRemoteStatus(e)}catch{return we.UNAVAILABLE}},hydrateDirectory:async()=>{if("function"!=typeof C)return{ok:!1,remoteStatus:we.UNAVAILABLE};try{const{status:e,ok:t,response:g}=await call({method:"GET",params:{name:"ALL",collection:"characters"}}),n=httpStatusToRemoteStatus(e);if(!t)return{ok:!1,remoteStatus:n};const C=await g.json();return{ok:!0,entries:Array.isArray(C)?C:[],remoteStatus:we.OK}}catch{return{ok:!1,remoteStatus:we.UNAVAILABLE}}},upsertProfile:async e=>{if("function"!=typeof C)return{ok:!1,remoteStatus:we.UNAVAILABLE};try{const{status:t,ok:g}=await call({method:"POST",params:{collection:"characters"},body:{data:e}});return{ok:g,remoteStatus:httpStatusToRemoteStatus(t)}}catch{return{ok:!1,remoteStatus:we.UNAVAILABLE}}},deleteProfile:async e=>{if("function"!=typeof C)return{ok:!1,remoteStatus:we.UNAVAILABLE};try{const{status:t,ok:g}=await call({method:"DELETE",params:{name:e,collection:"characters"}});return{ok:g,remoteStatus:httpStatusToRemoteStatus(t)}}catch{return{ok:!1,remoteStatus:we.UNAVAILABLE}}}}},joinFontFamily=(...e)=>e.join(", "),Ee=joinFontFamily('"Roboto Mono"',"Consolas","monospace"),Re=Object.freeze([Object.freeze({label:"Roboto Mono",value:Ee}),Object.freeze({label:"Consolas",value:joinFontFamily("Consolas","Monaco","monospace")}),Object.freeze({label:"JetBrains Mono",value:joinFontFamily('"JetBrains Mono"',"Consolas","monospace")}),Object.freeze({label:"Fira Code",value:joinFontFamily('"Fira Code"',"Consolas","monospace")}),Object.freeze({label:"Source Code Pro",value:joinFontFamily('"Source Code Pro"',"Consolas","monospace")}),Object.freeze({label:"Courier New",value:joinFontFamily('"Courier New"',"monospace")})]),normalizeDisplayFontFamily=e=>"string"!=typeof e?Ee:e.trim()||Ee,normalizeDisplayFontSize=(e,t=14)=>{if("number"==typeof e&&Number.isFinite(e)&&e>0)return Math.round(e);if("string"==typeof e){const t=Number.parseFloat(e);if(Number.isFinite(t)&&t>0)return Math.round(t)}return t},readHostDisplayFontFamily=(e={})=>normalizeDisplayFontFamily("function"==typeof e?.get_font_family?e.get_font_family():e?.font_family),readHostDisplayFontSize=(e={})=>normalizeDisplayFontSize(e?.font_size),ke=1,clonePersistenceValue=e=>Array.isArray(e)?e.map(e=>clonePersistenceValue(e)):isPlainObject$1(e)?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,clonePersistenceValue(t)])):e,normalizeLeafValue=(e,t)=>"boolean"==typeof e?"boolean"==typeof t?t:e:"number"==typeof e?"number"==typeof t&&Number.isFinite(t)?t:e:"string"==typeof e?"string"==typeof t?t:e:clonePersistenceValue(e),applySchemaPatch=(e,t,g)=>{if(isPlainObject$1(g))for(const n of Object.keys(e)){if("version"===n||!Object.hasOwn(g,n))continue;const C=e[n],o=g[n];Array.isArray(C)?t[n]=Array.isArray(o)?clonePersistenceValue(o):clonePersistenceValue(C):isPlainObject$1(C)?applySchemaPatch(C,t[n],o):t[n]=normalizeLeafValue(C,o)}},createSchemaSnapshot=(e,...t)=>{const g=clonePersistenceValue(e);for(const n of t)applySchemaPatch(e,g,n);return Object.hasOwn(e,"version")&&(g.version=e.version),g},Me="nexGui4Settings",Te=Object.freeze({SETTINGS:"settings",GAME_STATS:"gameStats",UI:"ui",PLAYER_DIRECTORY:"playerDirectory"}),Pe=deepFreeze({version:ke,theme:{backgroundImage:"",fontSize:12,displayFontFamily:Ee,displayFontSize:14,backgroundOpacity:.5,hue:0},ui:{loginTracker:!1,msgReplace:!1,showCombatStream:!1,showSystemStream:!1,logoutDownload:!1,virtualizedLogs:!1,allyEnemyFormatting:!0,targetFormatting:!0,damageNumbers:!0,nativeDisplay:!1},party:{goldCollection:!0,targetCalls:!0,affCalls:!0,callTargets:!1,callAffs:!1,gagChat:!1}}),Ne=deepFreeze({version:ke,kills:0,month:{deaths:0,goldCap:0,month:0,startingGold:0,startingKills:0,startingXp:0,currentXp:0,xpValue:0,year:0}}),De=deepFreeze({version:ke,scrollbackModal:{width:600,height:400,x:0,y:0}}),normalizePersistenceFragment=(e,t)=>Array.isArray(e)?Array.isArray(t)?clonePersistenceValue(t):clonePersistenceValue(e):isPlainObject$1(e)?createSchemaSnapshot(e,t):normalizeLeafValue(e,t),migrateSettingsPersistence=e=>createSchemaSnapshot(Pe,e),migrateGameStatsPersistence=e=>createSchemaSnapshot(Ne,e),migrateUiPersistence=e=>createSchemaSnapshot(De,e),Oe="function"==typeof queueMicrotask?queueMicrotask:e=>Promise.resolve().then(e),resolvePlayerDirectory$1=e=>e??getDefaultPlayerDirectoryModel(),resolveDiagnostics=e=>e??getDefaultPlayerDirectoryDiagnosticsModel(),resolveCacheReader=(e,t)=>"function"==typeof e?e:"function"==typeof e?.readCache?e.readCache.bind(e):"function"==typeof e?.getVariable?t=>(e.getVariable("nexGui4Settings")||{})[Te.PLAYER_DIRECTORY]:"function"==typeof t?t:null,resolveCacheWriter=(e,t)=>"function"==typeof e?e:"function"==typeof e?.writeCache?e.writeCache.bind(e):"function"==typeof e?.setVariable?(t,g)=>{const n=e.getVariable("nexGui4Settings")||{};n[Te.PLAYER_DIRECTORY]=g,e.setVariable(Me,n)}:"function"==typeof t?t:null,parseStoredSnapshot=e=>Array.isArray(e)?e:null,createSnapshotSaver=(e,t)=>g=>{"function"==typeof g&&g(t,e.getAllPlayerProfiles().filter(e=>e.loaded&&(e.city||e.fullname)))},createPlayerDirectoryLifecycle=({playerDirectory:e,diagnostics:t,readCache:g,writeCache:n,storageKey:C=Te.PLAYER_DIRECTORY}={})=>{const o=resolvePlayerDirectory$1(e),I=resolveDiagnostics(t),a=createSnapshotSaver(o,C);let i=!1,s=null,l=!1,c=!1;const recordDiagnostic=e=>I.recordPlayerDirectoryDiagnostic(e),isDirectorySeeded=()=>i,resetSeededFlag=()=>{i=!1},warmDirectoryFromCache=e=>{const t=resolveCacheReader(e,g);try{const e=t?.(C),g=parseStoredSnapshot(e);null!==g&&g.length>0&&o.hydrateFromCacheEntries(g)}catch{}finally{i=!0}},saveDirectorySnapshot=e=>{a(resolveCacheWriter(e,n))},subscribePersistence=e=>{const t=resolveCacheWriter(e,n);if(s?.(),s=null,l=!1,c=!0,"function"!=typeof t||"function"!=typeof o.subscribePlayerDirectory)return()=>{};const scheduleSave=()=>{c&&!l&&(l=!0,Oe(()=>{l=!1,c&&saveDirectorySnapshot(t)}))};return s=o.subscribePlayerDirectory(scheduleSave),()=>{c=!1,s?.(),s=null}},refreshDirectoryFromRemote=async(e,t)=>{try{const g=await e.hydrateDirectory(),n=Array.isArray(g?.entries)?g.entries.length:0;recordDiagnostic({channel:"remote",action:"hydrateDirectory",status:g?.remoteStatus??we.UNAVAILABLE,detail:{ok:!0===g?.ok,entryCount:n}}),g.ok&&Array.isArray(g.entries)&&g.entries.length>0&&(o.hydrateFromRemoteEntries(g.entries),saveDirectorySnapshot(t))}catch{recordDiagnostic({channel:"remote",action:"hydrateDirectory",status:we.UNAVAILABLE,detail:{ok:!1,exception:!0}})}},reset=()=>{i=!1,l=!1,c=!1,s?.(),s=null,I.resetPlayerDirectoryDiagnostics?.()};return Object.freeze({destroy:reset,isDirectorySeeded,refreshDirectoryFromRemote,reset,resetSeededFlag,saveDirectorySnapshot,subscribePersistence,warmDirectoryFromCache})},je=createPlayerDirectoryLifecycle(),isDirectorySeeded=()=>je.isDirectorySeeded(),ACHAEA_CHARACTER_URL=e=>`https://api.achaea.com/characters/${e.toLowerCase()}.json`,ze=Object.freeze({OK:"ok",AUTHORITATIVE_FAILURE:"authoritative_failure",TRANSIENT_FAILURE:"transient_failure"}),fetchPublicProfileForSync=async(e,{fetchFn:t=null}={})=>{if("function"!=typeof t)return{outcome:ze.TRANSIENT_FAILURE,data:null};try{const g=await t(ACHAEA_CHARACTER_URL(e),{method:"GET",cache:"no-store"});if(!g.ok)return{outcome:g.status>=500?ze.TRANSIENT_FAILURE:ze.AUTHORITATIVE_FAILURE,data:null};const n=await g.json();return{outcome:ze.OK,data:n}}catch{return{outcome:ze.TRANSIENT_FAILURE,data:null}}},normalizeCrowdsourceCity=(e,t,{getPlayerProfile:g=getPlayerProfile}={})=>{if("Romeo"===t||"Juliet"===t)return"garden";const n="string"==typeof e?.city?e.city:"";if(""===n)return"garden";if("(hidden)"===n.toLowerCase()){const e=g(t)?.city??"";return e&&"(hidden)"!==e?e:"(none)"}return n},createCrowdsourceSyncHandler=({remoteService:e,getSelfName:t=()=>null,getPlayerProfile:g=getPlayerProfile,isSeeded:n=isDirectorySeeded,recordDiagnostic:C=recordPlayerDirectoryDiagnostic,fetchFn:o=null,fetchProfileForSync:I=e=>fetchPublicProfileForSync(e,{fetchFn:o}),maxConcurrent:a=3})=>{let i=[];const s=new Set,l=[],processOneName=async n=>{const o=t();if(o&&n===o)return;const{outcome:a,data:i}=await I(n);if(a===ze.OK&&i){const t=normalizeCrowdsourceCity(i,n,{getPlayerProfile:g}),I={...i,city:t};o&&(I.user=o);const a=await e.upsertProfile(I);return void(a?.ok||C({channel:"crowdsource",action:"upsertProfile",status:a?.remoteStatus??"unavailable",name:n}))}if(a===ze.AUTHORITATIVE_FAILURE){C({channel:"crowdsource",action:"publicProfileFetch",status:ze.AUTHORITATIVE_FAILURE,name:n});const t=await e.deleteProfile(n);return void C({channel:"crowdsource",action:"deleteProfile",status:t?.remoteStatus??"unavailable",name:n,detail:{ok:!0===t?.ok}})}C({channel:"crowdsource",action:"publicProfileFetch",status:ze.TRANSIENT_FAILURE,name:n})},drainQueue=()=>{for(;s.size<a&&l.length>0;){const e=l.shift();e&&!s.has(e)&&(s.add(e),processOneName(e).finally(()=>{s.delete(e),drainQueue()}))}},enqueue=e=>{for(const t of e)s.has(t)||l.includes(t)||l.push(t);drainQueue()};return e=>{if(!n())return;if(!Array.isArray(e))return;const t=e.map(e=>"string"==typeof e?.name?e.name.trim():"").filter(Boolean),g=t.filter(e=>!i.includes(e));i=[...t],g.length>0&&enqueue(g)}},isPresent=e=>null!=e&&String(e).length>0,classAttribute=e=>isPresent(e)?` class="${escapeHtml(e)}"`:"",styleAttribute$1=(e={})=>{const t=Object.entries(e??{}).filter(([,e])=>isPresent(e)).map(([e,t])=>`${escapeHtml(e)}:${escapeHtml(t)}`).join(";");return t?` style="${t};"`:""},titleAttribute=e=>isPresent(e)?` title="${escapeHtml(e)}"`:"",span=(e,{className:t=null,style:g=null}={})=>`<span${classAttribute(t)}${styleAttribute$1(g)}>${e}</span>`,textNode=e=>({kind:"text",text:e}),classTextNode=(e,t)=>({kind:"class-text",className:e,text:t}),styledTextNode=(e,{className:t=null,fg:g=null,bg:n=null}={})=>({kind:"styled-text",className:t,text:e,fg:g,bg:n}),relationshipNameNode=e=>({kind:"relationship-name",descriptor:e}),iconBandingNode=({icon:e,colors:t,size:g,children:n})=>({kind:"icon-banding",icon:e,colors:t,size:g,children:n}),Ge=Object.freeze({className:"ng-target-format",borderColor:"rgb(255, 0, 0)",boxShadow:"inset 0 0 0 1px rgb(255, 0, 0)",padding:"0 2px"}),Le=Object.freeze({ally:Object.freeze({className:"ng-brkt ng-brkt-ally",color:"#ffffff",open:"(",close:")"}),enemy:Object.freeze({className:"ng-brkt ng-brkt-enemy",color:"#ff0000",open:"(",close:")"})}),createRelationshipNameDescriptor=(e,t={})=>{if(!isNonEmptyString(e))return null;const g={family:"inline-name",text:e.trim(),color:t.color??"grey",italic:Boolean(t.isCityEnemy),target:Boolean(t.isTarget),bracket:null,targetStyle:Ge};return t.isAlly?g.bracket=Le.ally:t.isEnemy&&(g.bracket=Le.enemy),g},createPlayerRelationshipDescriptor=(e,t={})=>{if(!isNonEmptyString(e))return null;const g=e.trim(),n=isNonEmptyString(t.targetName)?t.targetName.trim():"",C=Boolean(t.isAlly),o=Boolean(t.isEnemy),I=Boolean(t.isCityEnemy),a=t.isTarget??(!1!==t.targetFormatting&&n.length>0&&n===g);return createRelationshipNameDescriptor(g,{color:t.color??"grey",isAlly:C,isEnemy:o,isCityEnemy:I,isTarget:a})},renderBracket=(e,t)=>`<span class="${e.className}"${styleAttribute$1({color:e.color,"font-weight":"bold"})}>${escapeHtml(t)}</span>`,renderRelationshipNameHtml=e=>{if(!e)return"";const t=`<span${styleAttribute$1({color:e.color,"font-style":e.italic?"italic":null})}>${escapeHtml(e.text)}</span>`,g=e.bracket?[renderBracket(e.bracket,e.bracket.open),t,renderBracket(e.bracket,e.bracket.close)].join(""):t;return e.target?`<span class="${e.targetStyle.className}"${styleAttribute$1({"box-shadow":e.targetStyle.boxShadow??`inset 0 0 0 1px ${e.targetStyle.borderColor}`,padding:e.targetStyle.padding})}>${g}</span>`:g},Be=Object.freeze({original:" ".repeat(8),adjusted:" ".repeat(6)}),Fe=new WeakMap,isAsciiUppercase=e=>{if("string"!=typeof e||0===e.length)return!1;const t=e.charCodeAt(0);return t>=65&&t<=90},isNameCharacter=e=>{if("string"!=typeof e||0===e.length)return!1;if("'"===e||"-"===e)return!0;const t=e.charCodeAt(0);return t>=65&&t<=90||t>=97&&t<=122},extractUniqueWords=e=>{const t="string"==typeof e?e.match(/[A-Z][A-Za-z'-]*/g):null;return t?[...new Set(t)]:[]},resolveDescriptorFactory=({createDescriptor:e,relationshipFormatter:t}={})=>"function"==typeof e?e:"function"==typeof t?t:"function"==typeof t?.createDescriptor?t.createDescriptor:null,resolveCompiledHighlighter=e=>{const t=e?.compiledHighlighter;return t&&Array.isArray(t.namesByLength)&&t.entries instanceof Map&&0!==t.entries.size?t:null},getCompiledInitialCharacters=e=>{const t=Fe.get(e);if(t)return t;const g=new Set;return e.entries.forEach((e,t)=>{"string"==typeof t&&t.length>0&&g.add(t.charAt(0))}),Fe.set(e,g),g},hasPotentialCompiledMatch=(e,t)=>{if("string"!=typeof e||0===e.length)return!1;const g=getCompiledInitialCharacters(t);for(let n=0;n<e.length;n+=1)if(g.has(e.charAt(n)))return!0;return!1},applyCompiledHighlighting=(e,t,g)=>{if(!hasPotentialCompiledMatch(e.text(),t))return!1;const n=e.formatted();if("string"!=typeof n||0===n.length)return!1;let C=0,o=0,I=null,a=!1;for(;C<n.length;){const e=n.charAt(C);if("<"===e){const e=n.indexOf(">",C+1);if(-1===e)break;C=e+1;continue}if(!isAsciiUppercase(e)){C+=1;continue}let i=C+1;for(;i<n.length&&isNameCharacter(n.charAt(i));)i+=1;const s=n.slice(C,i),l=t.entries.get(s);l?(null===I?I=[n.slice(0,C)]:I.push(n.slice(o,C)),I.push(l.html),o=i,C=i,g&&l.adjustsMonospacePadding&&(a=!0)):C=i}if(null===I)return!1;let i=I.join("")+n.slice(o);return a&&(i=i.replace(Be.original,Be.adjusted)),e.formatted=()=>i,!0},buildReplacementMapFromDescriptors=(e,t)=>{const g=new Map;return e.forEach(e=>{const n=t(e);n&&"grey"!==n.color&&g.set(e,{html:renderRelationshipNameHtml(n),bracketed:Boolean(n.bracket),adjustsMonospacePadding:Boolean(n.bracket)})}),g},applyInlineNameHighlighting=(e,{createDescriptor:t,relationshipFormatter:g,monospace:n=!1}={})=>{if(!e||e.nexSkillReplacement||"function"!=typeof e.text||"function"!=typeof e.formatted)return!1;const C=resolveCompiledHighlighter(g);if(C)return applyCompiledHighlighting(e,C,n);const o=resolveDescriptorFactory({createDescriptor:t,relationshipFormatter:g});if(!o)return!1;const I=buildReplacementMapFromDescriptors(extractUniqueWords(e.text()),o);if(0===I.size)return!1;const a=e.formatted();if("string"!=typeof a||0===a.length)return!1;let i=a,s=!1;for(const l of[...I.keys()].sort((e,t)=>t.length-e.length)){const e=I.get(l);e&&i.includes(l)&&(i=i.split(l).join(e.html),n&&e.adjustsMonospacePadding&&(i=i.replace(Be.original,Be.adjusted)),s=!0)}return!!s&&(e.formatted=()=>i,!0)},sortNamesByLengthDesc=(e,t)=>t.length-e.length,normalizeKnownNames=e=>{if(!Array.isArray(e))return[];const t=new Set,g=[];return e.forEach(e=>{const n=ne(e);n&&!t.has(n)&&(t.add(n),g.push(n))}),g},createCompiledInlineHighlighter=({knownNames:e=[],createDescriptor:t}={})=>{const g=new Map,n=normalizeKnownNames(e);return"function"!=typeof t||0===n.length?Object.freeze({namesByLength:Object.freeze([]),entries:g}):(n.forEach(e=>{const n=t(e);n&&"grey"!==n.color&&g.set(e,Object.freeze({html:renderRelationshipNameHtml(n),bracketed:Boolean(n.bracket),adjustsMonospacePadding:Boolean(n.bracket)}))}),Object.freeze({namesByLength:Object.freeze(n.filter(e=>g.has(e)).sort(sortNamesByLengthDesc)),entries:g}))},callPredicate=(e,t)=>{if("function"!=typeof e)return!1;try{return Boolean(e(t))}catch{return!1}},callColorResolver=(e,t)=>{if("function"!=typeof e)return"grey";try{return e(t)??"grey"}catch{return"grey"}},readKnownNames=e=>{if(Array.isArray(e))return e;if("function"!=typeof e)return[];try{const t=e();return Array.isArray(t)?t:[]}catch{return[]}},createRelationshipNameFormatter=(e={})=>{const t=ne(e.targetName),g=!1!==e.allyEnemyFormatting,n=!1!==e.targetFormatting,C=e.getPlayerColorByNormalizedName??e.getPlayerColor,o=e.isAllyPlayerByNormalizedName??e.isAllyPlayer,I=e.isEnemyPlayerByNormalizedName??e.isEnemyPlayer,a=e.isCityEnemyPlayerByNormalizedName??e.isCityEnemyPlayer,i=Array.isArray(e.knownPlayerNames)||"function"==typeof e.getKnownPlayerNames,s=readKnownNames(e.knownPlayerNames??e.getKnownPlayerNames),l=new Set(s.map(ne).filter(Boolean)),createDescriptor=(e,s={})=>{const c=ne(e),u=ne(s.text)||c;if(!c||!u)return null;const d=s.isAlly??(g&&callPredicate(o,c)),p=s.isEnemy??callPredicate(I,c),m=s.isCityEnemy??callPredicate(a,c),h=s.isTarget??(n&&(!i||l.has(c))&&t.length>0&&t===c);return createPlayerRelationshipDescriptor(u,{color:s.color??callColorResolver(C,c),isAlly:d,isEnemy:p,isCityEnemy:m,isTarget:h})},c=createCompiledInlineHighlighter({knownNames:s,createDescriptor});return Object.freeze({compiledHighlighter:c,createDescriptor,renderHtml:(e,t={})=>renderRelationshipNameHtml(createDescriptor(e,t))})},getUiSettings$3=e=>e?.persistenceStore?.getAll?.()?.ui??{},getCharacterState$2=e=>e?.stores?.character?.getState?.()??{},We=Object.freeze(["allyEnemyFormatting","targetFormatting","targetName","playerDirectory","playerDirectoryVersion","playerRelationships","playerRelationshipsVersion"]),Ve=new WeakMap,Ue=null,readModelVersion=e=>{if("function"!=typeof e?.getVersion)return null;try{return e.getVersion()}catch{return null}},createFormatterSignature=(e,t={})=>{const g=getUiSettings$3(e),n=getCharacterState$2(e),C=t.playerDirectory??e?.playerDirectory??null,o=t.playerRelationships??e?.playerRelationships??null;return{allyEnemyFormatting:!1!==g.allyEnemyFormatting,targetFormatting:!1!==g.targetFormatting,targetName:ne(t.targetName??n.target??null),playerDirectory:C,playerDirectoryVersion:readModelVersion(C),playerRelationships:o,playerRelationshipsVersion:readModelVersion(o)}},signaturesEqual$1=(e,t)=>null!==e&&null!==t&&We.every(g=>Object.is(e[g],t[g])),readCachedFormatter=e=>e&&"object"==typeof e?Ve.get(e)??null:Ue,writeCachedFormatter=(e,t)=>e&&"object"==typeof e?(Ve.set(e,t),t):(Ue=t,t),createFormatterFromSignature=e=>{const{playerDirectory:t,playerRelationships:g}=e;return createRelationshipNameFormatter({allyEnemyFormatting:e.allyEnemyFormatting,targetFormatting:e.targetFormatting,targetName:e.targetName,getKnownPlayerNames:t?.getKnownPlayerNames?.bind(t),getPlayerColor:t?.getPlayerColor?.bind(t),getPlayerColorByNormalizedName:t?.getPlayerColorByNormalizedName?.bind(t),isAllyPlayer:g?.isAllyPlayer?.bind(g),isAllyPlayerByNormalizedName:g?.isAllyPlayerByNormalizedName?.bind(g),isEnemyPlayer:g?.isEnemyPlayer?.bind(g),isEnemyPlayerByNormalizedName:g?.isEnemyPlayerByNormalizedName?.bind(g),isCityEnemyPlayer:g?.isCityEnemyPlayer?.bind(g),isCityEnemyPlayerByNormalizedName:g?.isCityEnemyPlayerByNormalizedName?.bind(g)})},clearRelationshipNameFormatterCache=e=>{e&&"object"==typeof e?Ve.delete(e):(void 0===e&&(Ve=new WeakMap),Ue=null)},createRelationshipNameFormatterFromContext=(e,t={})=>{const g=createFormatterSignature(e,t),n=readCachedFormatter(e);if(signaturesEqual$1(n?.signature??null,g))return n.formatter;const C=createFormatterFromSignature(g);return writeCachedFormatter(e,{signature:g,formatter:C}),C},applyContextInlineNameHighlighting=(e,{contextValue:t=null,monospace:g=!1}={})=>applyInlineNameHighlighting(e,{relationshipFormatter:createRelationshipNameFormatterFromContext(t),monospace:g}),highlightInlineNamesInText=(e,{contextValue:t=null}={})=>{const g={text:()=>e,formatted:()=>e};return applyContextInlineNameHighlighting(g,{contextValue:t})?{content:g.formatted(),isHtml:!0}:{content:e,isHtml:void 0}},Ke=deepFreeze([["a CRITICAL","2x"],["CRUSHING","4x"],["OBLITERATING","8x"],["ANNIHILATINGLY","16x"],["WORLD","32x"],["PLANE","64x"],["coalescence of power","MAYA"]]),He=deepFreeze({"physical cutting":"#708090","physical blunt":"#708090",magical:"#FFFFFF",poison:"#9ACD32",psychic:"#663399",fire:"#8B0000",cold:"#87CEFA",electricity:"#FFD700",asphyxiation:"#D2B48C",raw:"#FFB6C1",unblockable:"#FFB6C1"}),Ye=deepFreeze({attack:"orange",battlerage:"yellow",affliction:"red"}),Ze=deepFreeze({attainment:"yellow",gear:"plum"}),Qe=deepFreeze({eat:{id:"eat",fg:"gold",text:"Eat: ",banding:["{","}"]},smoke:{id:"smoke",fg:"orchid",text:"Smoke: ",banding:["{","}"]},apply:{id:"apply",fg:"aquamarine",text:"Apply: ",banding:["{","}"]},sip:{id:"sip",fg:"HotPink",text:"Sip: ",banding:["{","}"]},focus:{id:"focus",fg:"BlueViolet",text:"Focus",banding:["{","}"]},tattoo:{id:"tattoo",fg:"cornflowerBlue",text:"Tattoo: ",banding:["||","||"]},shield:{id:"shield",fg:"cyan",text:" Shield ",banding:{icon:"shield-cross",colors:["cyan","goldenrod"],size:16}},rebounding:{id:"rebounding",fg:"white",text:" Rebounding ",banding:{icon:"shield-cross",colors:["white","goldenrod"],size:16}},prismatic:{id:"prismatic",fg:"yellow",text:" Prismatic ",banding:{icon:"shield-cross",colors:["goldenrod","white"],size:16}},tree:{id:"tree",fg:"lawngreen",text:" Tree ",banding:{icon:"tree",colors:["green","brown"],size:16}},npcslain:{id:"npcslain",fg:"red",text:" SLAIN ",banding:{icon:"tombstone",colors:["grey","white"],size:18}}}),Xe=deepFreeze({id:"default",fg:"grey",text:"Action",bg:"",banding:["[","]"]}),toDamageSlug$1=e=>e.toLowerCase().replace(/\s+/g,"-"),getSkillColor=e=>Ze[e]??"orange",getSkillClass=e=>e&&Ze[e]?`ng-skill-${e}`:"ng-skill-default",getUserActionDefinition=e=>Qe[e]??{...Xe,id:e},getUserActionClass=e=>e&&Qe[e]?`ng-action-${e}`:"ng-action-default",getDamageClass=e=>e&&void 0!==He[e]?`ng-dmg-${toDamageSlug$1(e)}`:"ng-dmg-unknown",hpPercentToColor=e=>{if(null==e||!Number.isFinite(e))return"grey";const t=Math.max(0,Math.min(100,e)),g=1.2*t,n=(t<75?50:Math.abs(t-100)/2+25)/100,k=e=>(e+g/30)%12,C=1*Math.min(n,1-n),f=e=>n-C*Math.max(-1,Math.min(k(e)-3,Math.min(9-k(e),1))),toHex=e=>Math.round(255*e).toString(16).padStart(2,"0");return`#${toHex(f(0))}${toHex(f(8))}${toHex(f(4))}`},_e="You",createSegment=(e,t=null,g=!1)=>({text:e,fg:t,bg:null,bold:g}),resolvePatternLength$1=e=>{const t=trimToEmpty(e?.matchType),g=e?.patterns?.[t];return Array.isArray(g)?g.length:0},createNameDescriptor=(e,{relationshipFormatter:t,selfName:g,selfText:n,targetName:C})=>{const o=trimToEmpty(e);return o?"self"===o||g&&o===g?createRelationshipNameDescriptor(n,{color:"lightpink",isTarget:C===o}):"function"==typeof t?.createDescriptor?t.createDescriptor(o,{text:toDisplayName(o)}):createRelationshipNameDescriptor(toDisplayName(o),{color:"grey",isAlly:!1,isEnemy:!1,isCityEnemy:!1,isTarget:C===o}):null},createPreviewSegments=({actor:e,actionLabel:t,actionColor:g,target:n,info:C})=>{const o=[];if(e){const t=e.bracket?`${e.bracket.open}${e.text}${e.bracket.close}`:e.text;o.push(createSegment(t,e.color)),o.push(createSegment(" "))}if(isNonEmptyString(t)&&o.push(createSegment(t.trim(),g,!0)),n){o.push(createSegment(" "));const e=n.bracket?`${n.bracket.open}${n.text}${n.bracket.close}`:n.text;o.push(createSegment(e,n.color))}return isNonEmptyString(C)&&(o.push(createSegment(" ")),o.push(createSegment(`[${toDisplayName(C)}]`,"cadetblue"))),o},createReplacementDescriptor=(e,t,g={})=>{if("nexSkillMatch"!==e&&"nexSkillNpcMatch"!==e)return null;if(!t||"object"!=typeof t||Array.isArray(t))return null;const n=trimToEmpty(g.selfName),C=trimToEmpty(g.selfText)||_e,o=trimToEmpty(g.targetName),I=g.relationshipFormatter,a="nexSkillNpcMatch"===e?"npc":"user",i="user"===a?getUserActionDefinition(t.id):null,s=createNameDescriptor(t.user,{relationshipFormatter:I,selfName:n,selfText:C,targetName:o}),l=createNameDescriptor(t.target,{relationshipFormatter:I,selfName:n,selfText:C,targetName:o}),c=trimToEmpty(t.fullName)||toDisplayName(t.skill||t.id),u="npc"===a?Array.isArray(t.tags)&&t.tags.length>0?t.tags.map(toDisplayName).join(", "):c:trimToEmpty(i?.text)||c,d="npc"===a?"red":i?.fg??getSkillColor(t.skill),p=createPreviewSegments({actor:s,actionLabel:u,actionColor:d,target:l,info:t.info}),m=p.map(e=>e.text).join(""),h=Math.max(resolvePatternLength$1(t)-1,0);return{family:"skill",eventName:e,buffer:"combat",variant:a,id:trimToEmpty(t.id),matchType:trimToEmpty(t.matchType),skill:{id:trimToEmpty(t.skill),name:c,color:getSkillColor(t.skill)},actor:s,target:l,tags:Array.isArray(t.tags)?t.tags.map(trimToEmpty).filter(Boolean):[],info:isNonEmptyString(t.info)?t.info.trim():null,userAction:i,hostMutation:{replaceCurrentLine:!0,companionLineCount:h,tooltipSource:"npc"===a&&Array.isArray(t.tags)&&t.tags.includes("damage")&&"self"===t.target?"health-lost":null},preview:{tag:"npc"===a?"«npc»":"[act]",tagColor:d,text:m,segments:p},metadata:{actionTypeColors:Ye,critLabels:Ke,damageColors:He}}},qe=Object.freeze({fg:null,bg:null,bold:!1}),createPlainSegment=e=>({text:e,...qe}),extractName=e=>extractNamedValue(e),createStructuredLine=(e,t,g,n,C,o={})=>({type:"combat"===C?"combat":"system",buffer:C,segments:[createPlainSegment(n)],metadata:{event:e,tag:t,tagColor:g,details:o}}),pickDefined=(e,t=null)=>void 0===e?t:e,resolveSkillReplacementDetails=(e,t)=>{if(!isPlainObject$1(t))return null;const g=isPlainObject$1(t.sourcePayload)?t.sourcePayload:t,n=isPlainObject$1(t.replacement)?t.replacement:createReplacementDescriptor(e,g);return n?{replacement:n,context:t.context??t.replacementContext,crit:pickDefined(t.crit),damage:pickDefined(t.damage),healthLost:Array.isArray(t.healthLost)?t.healthLost:[],tooltip:pickDefined(t.tooltip),originalLine:pickDefined(t.originalLine),matchType:"string"==typeof t.matchType?t.matchType:n.matchType,actorId:"string"==typeof t.actorId?t.actorId:"string"==typeof g.user?g.user.trim():null,targetHpText:pickDefined(t.targetHpText),targetHpPercent:pickDefined(t.targetHpPercent),hpDeltaText:pickDefined(t.hpDeltaText),sourcePayload:g}:null},createSkillReplacementLine=(e,t)=>{const g=resolveSkillReplacementDetails(e,t);if(!g)return null;const{replacement:n}=g,C=n.preview??{};return{type:"replacement",buffer:"system"===n.buffer?"system":"combat",segments:Array.isArray(C.segments)?C.segments:[],metadata:{event:e,tag:"string"==typeof C.tag?C.tag:"",tagColor:"string"==typeof C.tagColor?C.tagColor:null,details:g}}},parsePercent$1=e=>{if(null==e)return null;const t=Number.parseInt(String(e).replace("%",""),10);return Number.isNaN(t)?null:t},extractTargetEventId=e=>{if(!isPlainObject$1(e))return null;const t=e.id??e.target;return"number"==typeof t&&Number.isFinite(t)?String(t):toTrimmedString(t)},extractTargetEventLabel=e=>toTrimmedString(e?.short_desc)??toTrimmedString(e?.name)??toTrimmedString(e?.text)??(extractTargetEventId(e)?`Target ${extractTargetEventId(e)}`:null),getTargetHpValue=e=>e?.hpperc??e?.hpPercent??e?.hp??null,hasNexsysTargetIdentityChange=e=>{const t=isPlainObject$1(e?.changedFields)?e.changedFields:null;return!t||["id","target","text","name","short_desc"].some(e=>Object.prototype.hasOwnProperty.call(t,e))},createTargetLine=(e,t,g)=>createStructuredLine(e,"[Target]","red",g,"combat",{id:extractTargetEventId(t),hpPercent:parsePercent$1(getTargetHpValue(t)),shortDescription:toTrimmedString(t?.short_desc)??toTrimmedString(t?.text)}),parseStreamEventLine=(e,t)=>{switch(e){case"Char.Defences.Add":{const g=extractName(t);return g?createStructuredLine(e,"+def","lawngreen",toDisplayName(g),"system",{name:g,direction:"gained",description:t&&"object"==typeof t&&!Array.isArray(t)?t.desc??null:null}):null}case"Char.Defences.Remove":{const g=extractName(t);return g?createStructuredLine(e,"-def","crimson",toDisplayName(g),"system",{name:g,direction:"lost"}):null}case"Char.Afflictions.Add":{const g=extractName(t);return g?createStructuredLine(e,"+aff","crimson",toDisplayName(g),"system",{name:g,direction:"gained",description:t&&"object"==typeof t&&!Array.isArray(t)?t.desc??null:null}):null}case"Char.Afflictions.Remove":{const g=extractName(t);return g?createStructuredLine(e,"-aff","lawngreen",toDisplayName(g),"system",{name:g,direction:"lost"}):null}case"nexsys4.system.target.changed":{if(!isPlainObject$1(t)||!hasNexsysTargetIdentityChange(t))return null;const g=extractTargetEventLabel(t);return g?createTargetLine(e,t,g):null}case"nexsys4.serverside.aff.priority.set":case"nexsys4.serverside.def.priority.set":{if(!isPlainObject$1(t))return null;const g="string"==typeof t.id&&t.id.trim().length>0?t.id.trim():null,n="number"==typeof t.priority&&Number.isFinite(t.priority)?t.priority:null;return g&&null!=n?createStructuredLine(e,`[Prio] ${n}`,"deepskyblue",toDisplayName(g),"system",{id:g,priority:n,accepted:!0===t.accepted,kind:e.includes(".aff.")?"affliction":"defence"}):null}case"nexSkillMatch":case"nexSkillNpcMatch":return createSkillReplacementLine(e,t);default:return null}},styleAttribute=e=>{const t=Object.entries(e).filter(([,e])=>e);return 0===t.length?"":` style="${t.map(([e,t])=>`${e}: ${t}`).join("; ")}"`},renderChunk=e=>`<span${styleAttribute({color:e.fg,"background-color":e.bg,"font-weight":e.bold?"700":null})}>${escapeHtml(e.text)}</span>`,renderSegmentsHtml=e=>e.map(renderChunk).join(""),resolveTimestamp=e=>e.timestamp??e.metadata?.timestamp??Date.now(),createDisplayLine=({html:e,timestamp:t,isPrompt:g=!1,isMonospace:n=!1,shouldLog:C=!0,buffer:o="main"})=>({id:null,html:e,timestamp:t,isPrompt:g,isMonospace:n,shouldLog:C,buffer:o}),renderStructuredRowHtml=(e,t)=>{const g=e.metadata?.tag??"";return[`<span class="nexgui4-stream-row nexgui4-stream-row--${t}" style="display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 0.5rem; align-items: baseline;">`,`<span class="nexgui4-stream-row__tag mono"${styleAttribute({color:e.metadata?.tagColor??null})}>${escapeHtml(g)}</span>`,`<span class="nexgui4-stream-row__payload">${renderSegmentsHtml(e.segments)}</span>`,"</span>"].join("")},renderColorLine=e=>{const t=resolveTimestamp(e);return createDisplayLine({html:`<span class="nexgui4-color-line">${renderSegmentsHtml(e.segments)}</span>`,timestamp:t,isPrompt:e.isPrompt??!1,isMonospace:e.isMonospace??!1,shouldLog:e.shouldLog??!0,buffer:"main"})},Je=Object.freeze({options:Object.freeze({msgReplace:!0,damageNumbers:!0}),target:Object.freeze({hpText:null,hpPercent:null,hpDeltaText:null}),styles:Object.freeze({getAfflictionStyle:()=>({fg:"grey",bg:null}),resolveCureInfoStyle:(e,t="cadetblue")=>({fg:t,bg:null})}),icons:Object.freeze({dualTone:null})}),capitalize$1=e=>"string"==typeof e&&e.length>0?e.charAt(0).toUpperCase()+e.slice(1):"",getRuntimeStyle=e=>({fg:"string"==typeof e?.fg?e.fg:null,bg:"string"==typeof e?.bg?e.bg:null}),resolveRenderContext=(e={})=>{const t=e.context??e.replacementContext??{};return{options:{...Je.options,...t.options??{}},target:{...Je.target,...t.target??{}},styles:{...Je.styles,...t.styles??{}},icons:{...Je.icons,...t.icons??{}}}},withSeparators=(e,t)=>e.flatMap((e,g)=>0===g?[e]:[t,e]),createTitle=e=>{const t="string"==typeof e.originalLine?e.originalLine:null,g=[t?`Source: ${t}`:null,"string"==typeof e.tooltip?e.tooltip:null].filter(Boolean);return g.length>0?g.join("\n---\n"):null},createActorNodes=e=>e?[relationshipNameNode(e)]:[],createUserActionNodes=(e,t,g)=>{const{id:n,text:C,banding:o}=e,I=[classTextNode(getUserActionClass(n),C)];if(t){const{fg:n,bg:C}=getRuntimeStyle(g.styles.resolveCureInfoStyle?.(t,e.fg));I.push(styledTextNode(capitalize$1(t),{className:"ng-info-text",fg:n??e.fg,bg:C}))}if(Array.isArray(o)){const[e,t]=o;return[classTextNode("ng-brkt",e),...I,classTextNode("ng-brkt",t)]}return[iconBandingNode({icon:o.icon,colors:o.colors,size:o.size,children:I})]},createTargetHpValueNodes=(e,t)=>{const g="number"==typeof e.targetHpPercent?e.targetHpPercent:"number"==typeof t.target.hpPercent?t.target.hpPercent:null,n="string"==typeof e.targetHpText?e.targetHpText:"string"==typeof t.target.hpText?t.target.hpText:null;return null!=g?[styledTextNode(`${g}%`,{fg:hpPercentToColor(g)})]:n?[classTextNode("ng-muted",n)]:[]},createDamageValueNodes=(e,t)=>{const g=e.damage;return g&&"string"==typeof g.damage?[classTextNode(getDamageClass(g.type),g.damage)]:createTargetHpValueNodes(e,t)},createUserSkillAttackNodes=(e,t,g)=>{const{skill:n,info:C,tags:o,target:I}=e,a=[classTextNode("ng-brkt","["),classTextNode(getSkillClass(n.id),n.name),classTextNode("ng-brkt","]")];C&&a.push(textNode(" "),classTextNode("ng-info-text",capitalize$1(C)));const i=Array.isArray(o)&&o.includes("pve")&&o.includes("damage")&&"string"==typeof I?.text&&I.text.includes(" "),s="firstPerson"===t.matchType||!t.actorId;if(i){const e="string"==typeof t.crit?t.crit:"Hit",n=s&&g.options.damageNumbers?createDamageValueNodes(t,g):createTargetHpValueNodes(t,g);a.push(classTextNode("ng-crit-separator",`: ${e} `)),n.length>0&&a.push(classTextNode("ng-dmg-bracket","("),...n,classTextNode("ng-dmg-bracket",")"))}return a},createUserActionColumnNodes=(e,t,g)=>{const{userAction:n,info:C}=e;return n&&Qe[n.id]?createUserActionNodes(n,C??null,g):createUserSkillAttackNodes(e,t,g)},createNpcActionColumnNodes=(e,t,g)=>{const{tags:n,target:C,skill:o}=e;if(!n||0===n.length)return[classTextNode("ng-muted",o.name)];const I=n.map(e=>{if("damage"===e&&"You"===C?.text)return classTextNode("ng-hp-loss","string"==typeof t.hpDeltaText&&t.hpDeltaText?t.hpDeltaText:"string"==typeof g.target.hpDeltaText&&g.target.hpDeltaText?g.target.hpDeltaText:"-0%");const{fg:n,bg:o}=getRuntimeStyle(g.styles.getAfflictionStyle?.(e));return styledTextNode(capitalize$1(e),{fg:n??"grey",bg:o})});return[classTextNode("ng-npc-bracket","«"),...withSeparators(I,classTextNode("ng-muted",", ")),classTextNode("ng-npc-bracket","»")]},createTargetColumnNodes=(e,t,g)=>{if(!e)return[];const n=relationshipNameNode(e);if(!e.text.includes(" ")||"grey"!==e.color)return[n];const C="number"==typeof t.targetHpPercent?t.targetHpPercent:"number"==typeof g.target.hpPercent?g.target.hpPercent:null,o="string"==typeof t.targetHpText?t.targetHpText:"string"==typeof g.target.hpText?g.target.hpText:null;return null!=C?[classTextNode("ng-dmg-bracket","("),styledTextNode(`${C}%`,{fg:hpPercentToColor(C)}),classTextNode("ng-dmg-bracket",") "),n]:o?[classTextNode("ng-dmg-bracket","("),classTextNode("ng-muted",o),classTextNode("ng-dmg-bracket",") "),n]:[n]},createReplacementViewModel=(e,t={})=>{if(!e||"object"!=typeof e)return null;const g=resolveRenderContext(t),n="npc"===e.variant?createNpcActionColumnNodes(e,t,g):createUserActionColumnNodes(e,t,g);return{family:"skill",eventName:e.eventName,variant:e.variant,layout:"replacement-row",title:createTitle(t),previewText:"string"==typeof e.preview?.text?e.preview.text:"",columns:{actor:createActorNodes(e.actor),action:n,target:createTargetColumnNodes(e.target,t,g)},assets:{dualToneIcons:g.icons.dualTone},metadata:{skillId:e.skill?.id??"",actionId:e.userAction?.id??null,matchType:"string"==typeof t.matchType?t.matchType:e.matchType,actorId:"string"==typeof t.actorId?t.actorId:null,tags:Array.isArray(e.tags)?[...e.tags]:[]}}},$e=new Map,normalizeColors=e=>Array.isArray(e)?1===e.length?[e[0],e[0]]:[e[0]??"currentColor",e[1]??e[0]??"currentColor"]:[e??"currentColor",e??"currentColor"],buildIconHtml=(e,t,g=16,n=null)=>{const C=normalizeColors(t),o=n?.[e];if(!Array.isArray(o))return"";const[I,a,,,i]=o;if(!Array.isArray(i)||i.length<2)return"";const s=`${e}-${C.join(",")}-${g}-${I}-${a}-${i.join("|")}`,l=$e.get(s);if(l)return l;const[c,u]=C,d=['<svg xmlns="http://www.w3.org/2000/svg" class="svg-inline--fa icon" aria-hidden="true" focusable="false"',` style="height:${escapeHtml(String(g))}px; --ng-fill-1:${escapeHtml(c)}; --ng-fill-2:${escapeHtml(u)};"`,` viewBox="0 0 ${escapeHtml(String(I))} ${escapeHtml(String(a))}">`,'<g class="fa-group">',`<path class="ng-icon-fill-1" d="${escapeHtml(i[0])}"></path>`,`<path class="ng-icon-fill-2" d="${escapeHtml(i[1])}"></path>`,"</g>","</svg>"].join("");return $e.set(s,d),d},buildIconBandingHtml=(e,t,g,n,C=null)=>{const o=buildIconHtml(e,t,g,C);return o?`${o}${n}${o}`:`«${n}»`},renderStyledTextNode=e=>span(escapeHtml(e.text),{className:e.className,style:{color:e.fg,"background-color":e.bg}}),renderReplacementHtmlNode=(e,t={})=>{if(!e||"object"!=typeof e)return"";switch(e.kind){case"text":return escapeHtml(e.text);case"class-text":return span(escapeHtml(e.text),{className:e.className});case"styled-text":return renderStyledTextNode(e);case"relationship-name":return renderRelationshipNameHtml(e.descriptor);case"icon-banding":return buildIconBandingHtml(e.icon,e.colors,e.size,renderReplacementHtmlNodes(e.children,t),t.dualToneIcons??null);case"group":return renderReplacementHtmlNodes(e.children,t);default:return""}},renderReplacementHtmlNodes=(e,t={})=>Array.isArray(e)?e.map(e=>renderReplacementHtmlNode(e,t)).join(""):"",renderColumn=(e,t)=>`<span class="nexgui4-replacement-row__${t}">${renderReplacementHtmlNodes(e?.columns?.[t],e?.assets)}</span>`,renderReplacementHtml=e=>[`<span class="nexgui4-replacement-row"${titleAttribute(e?.title)}>`,'<span class="nexgui4-replacement-row__buffer"></span>',renderColumn(e,"actor"),renderColumn(e,"action"),renderColumn(e,"target"),"</span>"].join(""),colorText=(e,t)=>e?span(escapeHtml(t),{style:{color:e}}):escapeHtml(t),renderFallbackPreviewHtml=e=>`<span class="nexgui4-replacement-row">${Array.isArray(e.segments)?e.segments.map(e=>e.fg?colorText(e.fg,e.text):escapeHtml(e.text)).join(""):""}</span>`,generateReplacementHtml=(e,t={})=>renderReplacementHtml(createReplacementViewModel(e,t)),renderReplacementLine=e=>{const t=resolveTimestamp(e),g=e.metadata?.details??{},n=g.replacement??null;return createDisplayLine({html:n?generateReplacementHtml(n,g):renderFallbackPreviewHtml(e),timestamp:t,isPrompt:!1,isMonospace:!1,shouldLog:e.shouldLog??!0,buffer:"system"===e.buffer?"system":"combat"})},et=/^Health lost: (\d+) \((.+?)\)\.$/,tt=/^Damage dealt: (\d+) \((.+?)\)\.$/,gt=Object.freeze({crit:null,damage:null,healthLost:Object.freeze([]),tooltip:null,originalLine:null,consumedLineIndexes:Object.freeze([])}),getLineText=e=>e?"function"==typeof e.parsed_line?.text?e.parsed_line.text():"string"==typeof e.line?e.line:"":"",resolvePatternLength=e=>{const t="string"==typeof e.matchType?e.matchType.trim():"",g=e.patterns?.[t];return Array.isArray(g)?g.length:0},isPveDamageAction=e=>Array.isArray(e.tags)&&e.tags.includes("pve")&&e.tags.includes("damage")&&"string"==typeof e.target&&e.target.includes(" "),isNpcDamageToSelf=e=>Array.isArray(e.tags)&&e.tags.includes("damage")&&"self"===e.target,isFirstPersonOrActorless=e=>"firstPerson"===("string"==typeof e.matchType?e.matchType.trim():"")||("string"==typeof e.user?0===e.user.trim().length:!e.user),shouldCollectDamageDealt=(e,t)=>Boolean(t?.damageNumbers)&&isFirstPersonOrActorless(e),collectCrit=(e,t)=>{const g=getLineText(e?.[t]);for(const[n,C]of Ke)if(g.includes(n))return{crit:C,consumedLineIndex:t};return{crit:"Hit",consumedLineIndex:null}},collectDamageDealt=(e,t)=>{const g=getLineText(e?.[t]).match(tt);return g?{damage:g[1],type:g[2],consumedLineIndex:t}:null},collectHealthLost=(e,t)=>{if(!Array.isArray(e))return{healthLost:[],consumedLineIndexes:[]};const g=[],n=[];for(let C=t;C<e.length-1;C++){const t=getLineText(e[C]).match(et);t&&(g.push({damage:t[1],type:t[2]}),n.push(C))}return{healthLost:g,consumedLineIndexes:n}},collectReplacementSideData=(e,t,g,n={})=>{if(!e||"object"!=typeof e||Array.isArray(e)||!Array.isArray(t)||!g||"number"!=typeof g.index)return{...gt,healthLost:[],consumedLineIndexes:[]};const C=e,o=new Set,I=getLineText(g)||null,a=resolvePatternLength(C),i=Math.max(a-1,0),s={crit:null,damage:null,healthLost:[],tooltip:null,originalLine:I};for(let l=1;l<=i;l++)o.add(g.index+l);if(isPveDamageAction(C)){const e=g.index+1,I=collectCrit(t,e);if(s.crit=I.crit,null!=I.consumedLineIndex&&o.add(I.consumedLineIndex),shouldCollectDamageDealt(C,n)){const g=collectDamageDealt(t,null!=I.consumedLineIndex?e+1:e);g&&(s.damage={damage:g.damage,type:g.type},o.add(g.consumedLineIndex))}}if(isNpcDamageToSelf(C)){const e=collectHealthLost(t,g.index+1);s.healthLost=e.healthLost,s.tooltip=e.healthLost.length>0?e.healthLost.map(({damage:e,type:t})=>`${e} (${t})`).join("\n"):null,e.consumedLineIndexes.forEach(e=>{o.add(e)})}return{...s,consumedLineIndexes:[...o].filter(e=>e!==g.index).sort((e,t)=>e-t)}},rt="You",nt="cadetblue",At=Object.freeze(["contextValue","persistenceStore","persistenceVersion","msgReplace","damageNumbers","selfName","targetName","hpText","hpPercent","hpDeltaText","playerDirectory","playerDirectoryVersion","playerRelationships","playerRelationshipsVersion","allyEnemyFormatting","targetFormatting","afflictionStyles","cureStyles","herbNames","herbMinerals","dualToneIcons"]),Ct=null,ot=null,toNullableString=e=>isNonEmptyString(e)?e.trim():null,parsePercent=e=>{if("number"==typeof e&&Number.isFinite(e))return e;if("string"!=typeof e)return null;const t=e.match(/-?\d+(?:\.\d+)?/),g=t?Number(t[0]):NaN;return Number.isFinite(g)?g:null},getGlobals$1=()=>globalThis,getContextValue$2=()=>getGlobals$1().nexGui?.__contextValue??null,getCharacterState$1=e=>e?.stores?.character?.getState?.()??{},getUiSettings$2=e=>e?.persistenceStore?.getAll?.()?.ui??{},getPersistenceVersion=e=>"function"==typeof e?.persistenceStore?.getVersion?e.persistenceStore.getVersion():null,getModelVersion$2=e=>"function"==typeof e?.getVersion?e.getVersion():null,resolveUiSettings=(e,t)=>null!==t&&Ct?.contextValue===e&&Ct.persistenceStore===e?.persistenceStore&&Ct.persistenceVersion===t?Ct.uiSettings:getUiSettings$2(e),normalizeStyle=(e,t)=>({fg:toNullableString(e?.fg)??t,bg:toNullableString(e?.bg)}),createStyleResolvers=()=>({getAfflictionStyle:e=>normalizeStyle(getGlobals$1().nexSys?.prompt?.affAbbrev?.[e]??null,"grey"),resolveCureInfoStyle:(e,t=nt)=>{if(!isNonEmptyString(e))return{fg:t,bg:null};const g=getGlobals$1().nexSys,n=g?.tables?.herb_name_to_herb?.[e]??e,C=g?.prompt?.cureColors?.[n]??g?.prompt?.cureColors?.[g?.tables?.herb_to_mineral?.[n]]??null;return C?normalizeStyle(C,t):{fg:t,bg:null}}}),signaturesEqual=(e,t)=>null!==e&&null!==t&&At.every(g=>Object.is(e[g],t[g])),readContextInputs=()=>{const e=getGlobals$1(),t=getContextValue$2(),g=resolveUiSettings(t,getPersistenceVersion(t)),n=getPersistenceVersion(t),C=t?.stores?.settings?.getState?.()?.options??g,o=getCharacterState$1(t),I=o.targetDetails??{},a=e.GMCP?.Target??{},i=e.nexSys??null,s=i?.prompt??null,l=i?.tables??null,c=toNullableString(I.hpText)??toNullableString(I.hpperc)??toNullableString(a.HP)??toNullableString(a.hpperc)??toNullableString(a.lastHP),u=parsePercent(I.hpPercent??I.hpperc??a.HP??a.hpperc??a.lastHP),d=toNullableString(o.target)??toNullableString(a.Text)??toNullableString(a.text)??"",p=toNullableString(s?.vars?.diffhp?.text)??("number"==typeof a.hpChange?`${a.hpChange}%`:toNullableString(a.hpChange)),m=Boolean(C.msgReplace),h=Boolean(C.damageNumbers),y=toNullableString(o.name)??toNullableString(e.GMCP?.Char?.Status?.name)??"",b=e.window?.___FONT_AWESOME___?.styles?.fad??null;return{contextValue:t,persistenceStore:t?.persistenceStore??null,persistenceVersion:n,uiSettings:g,msgReplace:m,damageNumbers:h,selfName:y,targetName:d,hpText:c,hpPercent:u,hpDeltaText:p,playerDirectory:t?.playerDirectory??null,playerDirectoryVersion:getModelVersion$2(t?.playerDirectory),playerRelationships:t?.playerRelationships??null,playerRelationshipsVersion:getModelVersion$2(t?.playerRelationships),allyEnemyFormatting:g.allyEnemyFormatting,targetFormatting:g.targetFormatting,afflictionStyles:s?.affAbbrev??null,cureStyles:s?.cureColors??null,herbNames:l?.herb_name_to_herb??null,herbMinerals:l?.herb_to_mineral??null,dualToneIcons:b}},createContextFromInputs=e=>({options:{msgReplace:e.msgReplace,damageNumbers:e.damageNumbers},self:{name:e.selfName,label:rt},target:{name:e.targetName,hpText:e.hpText,hpPercent:e.hpPercent,hpDeltaText:e.hpDeltaText},styles:createStyleResolvers(),icons:{dualTone:e.dualToneIcons},playerDirectory:e.playerDirectory,playerRelationships:e.playerRelationships,relationshipFormatter:createRelationshipNameFormatterFromContext(e.contextValue,{targetName:e.targetName})}),clearMessageReplacementContextCache=()=>{Ct=null,ot=null},createMessageReplacementContext=()=>{const e=readContextInputs();return signaturesEqual(Ct,e)&&ot?ot:(Ct=e,ot=createContextFromInputs(e))},getGlobals=()=>globalThis,getHostBlock=()=>getGlobals().nexusclient?.current_block??null,getHostCurrentLine=()=>getGlobals().nexusclient?.current_line??null,createRenderContext=e=>({options:e.options,target:e.target,styles:e.styles,icons:e.icons}),createSkillReplacementPipelinePayload=(e,t,{context:g,sideData:n})=>{const C=createReplacementDescriptor(e,t,{relationshipFormatter:g.relationshipFormatter,selfName:g.self.name,selfText:g.self.label,targetName:g.target.name});return C?{kind:"nexgui4.skillReplacement",sourcePayload:t,replacement:C,context:createRenderContext(g),crit:n.crit,damage:n.damage,healthLost:n.healthLost,tooltip:n.tooltip,originalLine:n.originalLine,matchType:"string"==typeof t.matchType?t.matchType.trim():null,actorId:"string"==typeof t.user?t.user.trim():null,targetHpText:g.target.hpText,targetHpPercent:g.target.hpPercent,hpDeltaText:g.target.hpDeltaText}:null},renderPipelinePayloadForHost=(e,t)=>{const g=parseStreamEventLine(e,t);return g?renderReplacementLine(g).html:null},createSkillReplacementGagHandler=(e,t,{emitReplacement:g}={})=>n=>{if(!e())return;if(!n||"object"!=typeof n||Array.isArray(n))return;const C=n,o=getHostBlock(),I=getHostCurrentLine();if(!o||!I||"number"!=typeof I.index)return;const{index:a}=I,i=createMessageReplacementContext(),s=collectReplacementSideData(C,o,I,i.options),l=createSkillReplacementPipelinePayload(t,C,{context:i,sideData:s});if(!l)return;if(g?.(l),!I.parsed_line)return;const c=renderPipelinePayloadForHost(t,l);c&&(s.consumedLineIndexes.forEach(e=>{const t=o[e];t&&e!==a&&(t.gag=!0)}),I.parsed_line.nexSkillReplacement=!0,I.parsed_line.formatted=()=>c)},getOptions=()=>createMessageReplacementContext().options,isReplacementEnabled=()=>Boolean(getOptions().msgReplace),It="nexGui4",normalizeNexGuiClassReflexName=e=>{const t=toTrimmedString(e)?.replace(/\s+/g,"").toLowerCase();return t?`nexGui.${t}`:null},readCurrentHostClassName=(e=globalThis.GMCP)=>toTrimmedString(e?.Char?.Status?.class),runNexGuiClassReflex=(e,{nexusClient:t=globalThis.nexusclient,packageName:g=It}={})=>{const n=normalizeNexGuiClassReflexName(e);n&&t?.reflexes?.()?.run_function?.(n,{},g)},runNexGuiClassReflexForCurrentHostClass=(e={})=>runNexGuiClassReflex(readCurrentHostClassName(e.gmcp),e),at=new Set(["blindness","deafness","insomnia"]),it="https://api.achaea.com/characters.json",passthroughParser=e=>e,resolvePlayerDirectory=e=>e??getDefaultPlayerDirectoryModel(),getContextValue$1=()=>globalThis.nexGui?.__contextValue??null,resolvePlayerRelationships$1=e=>e??getContextValue$1()?.playerRelationships??getDefaultPlayerRelationshipsModel(),resolveFetch=e=>"function"==typeof e?e:"function"==typeof globalThis.fetch?globalThis.fetch.bind(globalThis):null,getUiSettings$1=()=>getContextValue$1()?.persistenceStore?.getAll?.()?.ui??{},getCharacterState=()=>getContextValue$1()?.stores?.character?.getState?.()??{},isLoginTrackerEnabled=()=>Boolean(getUiSettings$1()?.loginTracker),shouldEmitAffliction=e=>{const t=extractNamedValue(e);return!at.has(t)},extractChannelPlayerNames=e=>Array.isArray(e)?e.map(e=>e?.name).filter(isNonEmptyString).map(e=>e.trim()):[],fetchActiveCharacterNames=async(e=recordPlayerDirectoryDiagnostic,t=null)=>{if("function"!=typeof t)return e({channel:"presence",action:"charactersListFetch",status:"unavailable",detail:{fetchAvailable:!1}}),[];try{const g=await t(it,{cache:"no-store"});if(!g.ok)return e({channel:"presence",action:"charactersListFetch",status:"unavailable",detail:{httpStatus:g.status}}),[];const n=await g.json();return Array.isArray(n?.characters)?n.characters.map(e=>e?.name).filter(isNonEmptyString).map(e=>e.trim()):[]}catch{return e({channel:"presence",action:"charactersListFetch",status:"unavailable",detail:{exception:!0}}),[]}},createLoginTrackerNoticeHtml=(e,t,g,n)=>`<span>${createRelationshipNameFormatterFromContext(getContextValue$1(),{playerDirectory:g,playerRelationships:n}).renderHtml(e)} logged ${t}</span>`,emitBridgeEvent=({eventBus:e,topic:t,sourceEvent:g,payload:n,parser:C=passthroughParser,meta:o})=>{e.emit(t,{event:g,data:C(n),meta:o})},normalizeNexsysTargetChangedPayload=e=>isPlainObject$1(e)&&isPlainObject$1(e.current)?{...e.current,changedFields:isPlainObject$1(e.changedFields)?e.changedFields:{}}:e,parseCurrentHostClassChangedPayload=()=>({class:readCurrentHostClassName()}),createEmitHandler=(e,t)=>g=>{t.filter&&!t.filter(g)||(emitBridgeEvent({eventBus:e,topic:t.topic,sourceEvent:t.eventName,payload:g,parser:t.parser,meta:t.meta}),t.afterEmit?.(g))},createSkillReplacementEmitHandler=(e,t)=>createSkillReplacementGagHandler(isReplacementEnabled,t,{emitReplacement:g=>{emitBridgeEvent({eventBus:e,topic:q.STREAM_LINE,sourceEvent:t,payload:g,parser:passthroughParser,meta:{buffer:"combat",sourceModel:"replacement"}})}}),createLoginTrackerHandler=(e,t,g,n,C)=>{let o=[];return async I=>{if(!isLoginTrackerEnabled())return;const a=extractChannelPlayerNames(I),i=await fetchActiveCharacterNames(n,C),s=[...new Set([...a,...i])];if(0===o.length)return void(o=s);const l=[getCharacterState()?.name,globalThis.GMCP?.Char?.Status?.name].find(isNonEmptyString)?.trim(),c=o.filter(e=>!s.includes(e));s.filter(e=>!o.includes(e)).forEach(n=>{n!==l&&e.notice(createLoginTrackerNoticeHtml(n,"in",t,g),{html:!0})}),c.forEach(n=>{n!==l&&e.notice(createLoginTrackerNoticeHtml(n,"out",t,g),{html:!0})}),o=s}},st=[{eventName:"IRE.Target.Set",topic:q.TARGET_CHANGED,parser:passthroughParser},{eventName:"IRE.Target.Info",topic:q.TARGET_CHANGED,parser:passthroughParser},{eventName:"nexsys4.system.target.changed",topic:q.TARGET_CHANGED,parser:normalizeNexsysTargetChangedPayload},{eventName:"Room.RemovePlayer",topic:q.ROOM_UPDATED,parser:passthroughParser},{eventName:"Room.AddPlayer",topic:q.ROOM_UPDATED,parser:passthroughParser},{eventName:"Room.Info",topic:q.ROOM_UPDATED,parser:passthroughParser},{eventName:"Char.Items.List",topic:q.ROOM_UPDATED,parser:passthroughParser},{eventName:"Char.Items.Add",topic:q.ROOM_UPDATED,parser:passthroughParser},{eventName:"Char.Items.Remove",topic:q.ROOM_UPDATED,parser:passthroughParser},{eventName:"Char.Items.Update",topic:q.ROOM_UPDATED,parser:passthroughParser},{eventName:"Char.Defences.Add",topic:q.DEFENCE_GAINED,parser:passthroughParser},{eventName:"Char.Defences.Remove",topic:q.DEFENCE_LOST,parser:passthroughParser},{eventName:"Char.Afflictions.Add",topic:q.STREAM_LINE,parser:passthroughParser,filter:shouldEmitAffliction,meta:{buffer:"system"}},{eventName:"Char.Afflictions.Remove",topic:q.STREAM_LINE,parser:passthroughParser,filter:shouldEmitAffliction,meta:{buffer:"system"}},{eventName:"Char.Vitals",topic:q.STATS_UPDATED,parser:passthroughParser},{eventName:"nexsys4.system.class.changed",topic:q.CLASS_CHANGED,parser:parseCurrentHostClassChangedPayload,afterEmit:()=>runNexGuiClassReflexForCurrentHostClass()},{eventName:"Comm.Channel.Text",topic:q.STREAM_LINE,parser:passthroughParser},{eventName:"Char.Status",topic:q.STATS_UPDATED,parser:passthroughParser},{eventName:"IRE.Misc.Achievement",topic:q.STATS_UPDATED,parser:passthroughParser,meta:{sourceModel:"stats"}},{eventName:"IRE.Time.List",topic:q.STATS_UPDATED,parser:passthroughParser,meta:{sourceModel:"stats"}},{eventName:"nexSkillMatch",topic:q.TIMER_STARTED,parser:passthroughParser,meta:{sourceModel:"timers"}},{eventName:"nexsys4.serverside.aff.priority.set",topic:q.STREAM_LINE,parser:passthroughParser,meta:{buffer:"system"}},{eventName:"nexsys4.serverside.def.priority.set",topic:q.STREAM_LINE,parser:passthroughParser,meta:{buffer:"system"}}],createStartUpGagHandler=e=>function(){e.gagCurrentBlock()},registerGmcpBindings=({adapter:e,eventBus:t,playerDirectory:g,playerDirectoryLifecycle:n,playerRelationships:C,playerDirectoryDiagnostics:o,remoteService:I,fetchFn:a})=>{const i=resolvePlayerDirectory(g),s=resolvePlayerRelationships$1(C),l=o?.recordPlayerDirectoryDiagnostic??recordPlayerDirectoryDiagnostic,c=I??createNullRemotePlayerService(),u=resolveFetch(a),d=[],p=createStartUpGagHandler(e),m=createLoginTrackerHandler(e,i,s,l,u),h=createCrowdsourceSyncHandler({remoteService:c,getPlayerProfile:i.getPlayerProfile,isSeeded:n?.isDirectorySeeded,recordDiagnostic:l,fetchFn:u,getSelfName:()=>[getCharacterState()?.name,globalThis.GMCP?.Char?.Status?.name].find(isNonEmptyString)?.trim()??null});d.push(e.on("nexSkillMatch",createSkillReplacementEmitHandler(t,"nexSkillMatch"))),d.push(e.on("nexSkillNpcMatch",createSkillReplacementEmitHandler(t,"nexSkillNpcMatch")));for(const y of st){const g=createEmitHandler(t,y);d.push(e.on(y.eventName,g))}return d.push(e.on("Comm.Channel.Players",e=>{i.rememberChannelPlayers(e),h(e)})),d.push(e.on("Comm.Channel.Players",m)),d.push(e.on("IRE.Time.Update",()=>{e.sendGmcp("IRE.Time.Request")})),d.push(e.on("PromptEvent",p,{id:"nexGuiStartUpGag"})),d.push(e.on("nexGuiLoaded",()=>{e.off("PromptEvent","nexGuiStartUpGag"),e.notice("nexGui loaded using startup spam gag.")},{once:!0})),()=>{for(const e of d)e()}},emitStartupReadySignal=e=>{e.send("echo raiseEvent nexGuiLoaded")},createEventBus=({label:e="nexgui4.eventBus",debugEnabled:t=!1,traceLimit:g=500}={})=>{const n=new Map,C=[],pushTrace=(n,o)=>{const I={at:Date.now(),type:n,detail:o};return C.push(I),C.length>g&&C.splice(0,C.length-g),t&&console.log(`[${e}]`,n,o),I},on=(e,t)=>(n.has(e)||n.set(e,new Set),n.get(e).add(t),()=>off(e,t)),off=(e,t)=>n.get(e)?.delete(t);return{on,off,emit:(e,t)=>{pushTrace(e,t),n.get(e)?.forEach(e=>e(t))},clear:()=>{n.clear(),C.length=0},getTrace:()=>[...C],setDebugEnabled:e=>{t=e}}},parseStoredValue$1=e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return e}},isEquivalentValue=(e,t)=>JSON.stringify(e)===JSON.stringify(t),createPersistenceStore=({adapter:e,sliceKey:t=Te.SETTINGS,schema:g=Pe,migrate:n=migrateSettingsPersistence}={})=>{const C=assertAdapterContract(e);let o=0;const markChanged=()=>{o+=1},assertSchemaKey=e=>{if("string"!=typeof e||"version"===e||!Object.hasOwn(g,e))throw new Error(`[nexGui4] Unknown persistence key "${String(e)}" for slice "${t}"`)},readState=()=>{const e=C.getVariable("nexGui4Settings")||{},g=e[t],o=parseStoredValue$1(g),I=n(o);if(void 0===g||"string"==typeof g||!isEquivalentValue(o,I)){const g={...e,[t]:I};C.setVariable(Me,g),markChanged()}return I};return{get:e=>(assertSchemaKey(e),clonePersistenceValue(readState()[e])),set:(e,n)=>{assertSchemaKey(e);const o={...readState(),version:g.version,[e]:normalizePersistenceFragment(g[e],n)},I={...C.getVariable("nexGui4Settings")||{},[t]:o};return C.setVariable(Me,I),markChanged(),clonePersistenceValue(o[e])},getAll:()=>clonePersistenceValue(readState()),getVersion:()=>o,reset:()=>{const e=clonePersistenceValue(g),n={...C.getVariable("nexGui4Settings")||{},[t]:e};return C.setVariable(Me,n),markChanged(),clonePersistenceValue(e)}}},bindFunction=(e,t)=>"function"==typeof e?.[t]?e[t].bind(e):null,noopTimer=()=>null,noopClearTimer=()=>{},getPublicDualToneIcons=e=>e.window?.___FONT_AWESOME___?.styles?.fad??null,createBrowserRuntimePorts=(e=globalThis)=>Object.freeze({fetch:bindFunction(e,"fetch"),now:()=>Date.now(),setTimeout:bindFunction(e,"setTimeout")??noopTimer,clearTimeout:bindFunction(e,"clearTimeout")??noopClearTimer,setInterval:bindFunction(e,"setInterval")??noopTimer,clearInterval:bindFunction(e,"clearInterval")??noopClearTimer,getPublicDualToneIcons:()=>getPublicDualToneIcons(e)}),freezePhaseList=e=>Object.freeze([...e]),lt=Object.freeze({INIT:"INIT",PREPARING:"PREPARING",BOOTING:"BOOTING",MOUNTING_UI:"MOUNTING_UI",HYDRATING_LAYOUT:"HYDRATING_LAYOUT",RUNNING:"RUNNING",FAILED:"FAILED",DESTROYED:"DESTROYED"}),ct=Object.freeze({[lt.INIT]:freezePhaseList([lt.PREPARING,lt.DESTROYED]),[lt.PREPARING]:freezePhaseList([lt.BOOTING,lt.FAILED,lt.DESTROYED]),[lt.BOOTING]:freezePhaseList([lt.MOUNTING_UI,lt.FAILED,lt.DESTROYED]),[lt.MOUNTING_UI]:freezePhaseList([lt.HYDRATING_LAYOUT,lt.FAILED,lt.DESTROYED]),[lt.HYDRATING_LAYOUT]:freezePhaseList([lt.RUNNING,lt.FAILED,lt.DESTROYED]),[lt.RUNNING]:freezePhaseList([lt.FAILED,lt.DESTROYED]),[lt.FAILED]:freezePhaseList([lt.PREPARING,lt.DESTROYED]),[lt.DESTROYED]:freezePhaseList([])}),isPhaseTransitionAllowed=(e,t)=>ct[e]?.includes(t)??!1,ut=Object.freeze([lt.PREPARING,lt.BOOTING,lt.MOUNTING_UI,lt.HYDRATING_LAYOUT,lt.RUNNING]),dt=3,pt=250,toErrorMessage=e=>e instanceof Error&&e.message?e.message:"string"==typeof e&&e.length>0?e:"Unknown startup failure",getRetryDelayMs=(e,t)=>t*2**Math.max(0,e-1),createStartupOrchestrator=({adapter:e,eventBus:t,phaseHandlers:g={},maxAttempts:n=dt,retryDelayMs:C=pt,setTimeoutFn:o=setTimeout,clearTimeoutFn:I=clearTimeout})=>{let a=lt.INIT,i=0,s=null,l=null,c=null,u=!1;const getState=()=>({phase:a,attempts:i,lastError:s}),transitionTo=(e,g={})=>{if(!isPhaseTransitionAllowed(a,e))throw new Error(`[nexGui4] Invalid startup phase transition: ${a} -> ${e}`);const n=a;return a=e,t.emit($.SYSTEM_PHASE,{phase:e,previousPhase:n,attempt:g.attempt??i,...void 0!==g.error?{error:g.error}:{},...void 0!==g.retryDelayMs?{retryDelayMs:g.retryDelayMs}:{},...void 0!==g.permanent?{permanent:g.permanent}:{}}),e===lt.RUNNING&&t.emit($.SYSTEM_READY,{phase:e,previousPhase:n,attempt:g.attempt??i}),getState()},clearPendingRetry=()=>{c&&(I(c.timerId),c.resolve(),c=null)},waitForRetry=e=>new Promise(t=>{c={timerId:o(()=>{c=null,t()},e),resolve:t}}),runPhase=async n=>{const C=g[n];"function"==typeof C&&await C({phase:n,attempt:i,adapter:e,eventBus:t})},runAttempt=async()=>{i+=1;try{for(const e of ut){if(u)return getState();transitionTo(e,{attempt:i}),await runPhase(e)}return s=null,getState()}catch(t){s=t;const g=i<n,o=g?getRetryDelayMs(i,C):0;if(transitionTo(lt.FAILED,{attempt:i,error:t,...g?{retryDelayMs:o}:{permanent:!0}}),!g)throw e.notice(`[nexGui4] Startup failed after ${i} attempts: ${toErrorMessage(t)}`),t;return await waitForRetry(o),u?getState():runAttempt()}};return{start:()=>l||(u?Promise.reject(new Error("[nexGui4] Cannot start startupOrchestrator after destroy().")):a===lt.RUNNING?Promise.resolve(getState()):(l=runAttempt().finally(()=>{l=null}),l)),destroy:()=>(a===lt.DESTROYED||(u=!0,clearPendingRetry(),transitionTo(lt.DESTROYED,{attempt:i})),getState()),getState}},mt="nexgui4_scrollback",ft=1,ht="session_lines",toSortedLines=e=>Array.from(e.values()).sort((e,t)=>e.id-t.id),resolveIndexedDb=e=>void 0!==e?e:globalThis.indexedDB,resolveKeyRange=e=>void 0!==e?e:globalThis.IDBKeyRange,createIndexedDbManager=({dbName:e=mt,dbVersion:t=ft,storeName:g=ht,indexedDb:n,keyRange:C,logger:o=null}={})=>{const I=resolveIndexedDb(n),a=resolveKeyRange(C);let i=null,s=null,l=new Map,c=!I||!a,u=!1;const debug=(...e)=>o?.debug?.(...e),warn=(...e)=>o?.warn?.(...e),switchToFallback=e=>{i&&(i.close?.(),i=null),c=!0,warn("[nexGui4] IndexedDB unavailable; using in-memory scrollback storage.",e)},assertActive=()=>{if(u)throw new Error("[nexGui4] IndexedDB manager has been destroyed.")},initialize=()=>(assertActive(),c||i?Promise.resolve():s||(s=new Promise(n=>{let C=!1;const settleWithFallback=e=>{C||(C=!0,s=null,switchToFallback(e),n())},settleWithDb=e=>{C?e?.close?.():(C=!0,i=e,debug("[nexGui4] IndexedDB scrollback storage initialized."),n())};let o;try{o=I.open(e,t)}catch(a){return void settleWithFallback(a)}o.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(g)||t.createObjectStore(g,{keyPath:"id"})},o.onsuccess=e=>{settleWithDb(e.target.result)},o.onerror=e=>{settleWithFallback(e.target.error)},o.onblocked=e=>{settleWithFallback(e)}}),s)),ensureDb=async()=>(assertActive(),c?null:i||(await initialize(),i)),writeBatch=async e=>{if(assertActive(),0===e.length)return;if(c){for(const t of e)l.set(t.id,t);return}const t=await ensureDb();if(!c&&t)return new Promise((n,C)=>{const o=t.transaction([g],"readwrite"),I=o.objectStore(g);o.oncomplete=()=>{n()},o.onerror=e=>{C(e.target.error)},o.onabort=e=>{C(e.target.error)};for(const t of e)I.put(t)});await writeBatch(e)},readRange=async(e,t)=>{if(assertActive(),c)return toSortedLines(l).filter(g=>g.id>=e&&g.id<=t);const n=await ensureDb();return c||!n?readRange(e,t):new Promise((C,o)=>{const I=n.transaction([g],"readonly").objectStore(g),i=a.bound(e,t),s=I.getAll(i);s.onsuccess=()=>{C(s.result)},s.onerror=e=>{o(e.target.error)}})},readIds=async e=>{if(assertActive(),0===e.length)return[];if(c)return e.map(e=>l.get(e)).filter(Boolean);const t=await ensureDb();return c||!t?readIds(e):new Promise((n,C)=>{const o=t.transaction([g],"readonly"),I=o.objectStore(g),a=[];let i=!1;o.oncomplete=()=>{if(i)return;const t=new Map(a.map(e=>[e.id,e]));n(e.map(e=>t.get(e)).filter(Boolean))},o.onerror=e=>{i=!0,C(e.target.error)},o.onabort=e=>{i=!0,C(e.target.error)};for(const t of e){const e=I.get(t);e.onsuccess=()=>{void 0!==e.result&&a.push(e.result)}}})},readAll=async()=>{if(assertActive(),c)return toSortedLines(l);const e=await ensureDb();return c||!e?readAll():new Promise((t,n)=>{const C=e.transaction([g],"readonly").objectStore(g).getAll();C.onsuccess=()=>{t(C.result)},C.onerror=e=>{n(e.target.error)}})},clear=async()=>{if(assertActive(),c)return void l.clear();const e=await ensureDb();if(!c&&e)return new Promise((t,n)=>{const C=e.transaction([g],"readwrite").objectStore(g).clear();C.onsuccess=()=>{t()},C.onerror=e=>{n(e.target.error)}});await clear()},close=()=>{i?.close?.(),i=null,s=null},destroy=()=>{u||(close(),l=new Map,u=!0)};return{initialize,writeBatch,readRange,readIds,readAll,clear,close,destroy,isFallback:()=>c}},yt=Object.freeze([]),normalizeEntries=e=>(Array.isArray(e)?e:[]).filter(e=>e&&"number"==typeof e.id).map(e=>({...e})),estimateSearchBytes=(e,t)=>2*t+32*e,createScrollbackSessionStore=({storage:e=createIndexedDbManager(),writeBatchSize:t=500,writeDebounceMs:g=Z,setTimeoutFn:n=setTimeout,clearTimeoutFn:C=clearTimeout,logger:o=null}={})=>{let I=[],a=null,i=Promise.resolve(),s=[],l=0,c=!1,u=null;const reportAsyncError=e=>{o?.error?.("[nexGui4] Scrollback session operation failed.",e)},assertActive=()=>{if(c)throw new Error("[nexGui4] Scrollback session store has been destroyed.")},cancelFlushTimer=()=>{a&&(C(a),a=null)},enqueueOperation=e=>{const t=i.then(e);return i=t.catch(()=>{}),t},takePendingWrites=()=>{if(cancelFlushTimer(),0===I.length)return yt;const e=I;return I=[],e},enqueuePendingWrite=()=>{const t=takePendingWrites();return 0===t.length?i:enqueueOperation(()=>e.writeBatch(t))},scheduleFlush=()=>{a||0===I.length||(a=n(()=>{a=null,enqueuePendingWrite().catch(reportAsyncError)},g))},resetSearchRecords=()=>{s=[],l=0},appendSearchRecords=e=>{for(const t of e){const e=stripHtml(t.html).toLowerCase();s.push({id:t.id,isPrompt:Boolean(t.isPrompt),text:e}),l+=e.length}},flush=()=>(assertActive(),enqueuePendingWrite()),readRange=async(t,g)=>(assertActive(),await flush(),enqueueOperation(()=>e.readRange(t,g))),readIds=async t=>(assertActive(),await flush(),Array.isArray(t)&&0!==t.length?enqueueOperation(()=>e.readIds(t)):[]),readAll=async()=>(assertActive(),await flush(),enqueueOperation(()=>e.readAll())),search=async(t,{includePrompts:g=!0}={})=>{assertActive();const n=String(t??"").trim().toLowerCase();if(await flush(),!n)return[];const C=s.filter(e=>g||!e.isPrompt).filter(e=>e.text.includes(n)).map(e=>e.id);return 0===C.length?[]:enqueueOperation(()=>e.readIds(C))};return{initialize:()=>(assertActive(),enqueueOperation(()=>e.initialize?.()??Promise.resolve())),append:e=>{if(c)return;const g=normalizeEntries(e);0!==g.length&&(appendSearchRecords(g),I.push(...g),I.length>=t?enqueuePendingWrite().catch(reportAsyncError):scheduleFlush())},flush,clear:()=>(assertActive(),cancelFlushTimer(),I=[],resetSearchRecords(),enqueueOperation(()=>e.clear())),readRange,readIds,readAll,search,getStats:()=>({pendingCount:I.length,pendingFlushScheduled:Boolean(a),storageFallback:Boolean(e.isFallback?.()),searchLineCount:s.length,searchTextChars:l,estimatedSearchBytes:estimateSearchBytes(s.length,l),writeBatchSize:t,writeDebounceMs:g,destroyed:c}),destroy:()=>{if(u)return u;const t=enqueuePendingWrite();return c=!0,u=t.catch(reportAsyncError).finally(()=>{cancelFlushTimer(),I=[],resetSearchRecords(),"function"==typeof e.destroy?e.destroy():e.close?.()}),u}}},NOOP$6=()=>{},normalizeTargetValue=e=>"string"==typeof e&&e.trim().length>0?e.trim():null,createCharacterApi=({characterModel:e=null,setTarget:t=NOOP$6}={})=>{const getCharacterSnapshot=()=>e?.snapshot?.()??{},g=Object.freeze({get:()=>getCharacterSnapshot().target??null,set:g=>{const n=normalizeTargetValue(g);return t(n),e?.setTarget?.(n),getCharacterSnapshot().target??null},is:e=>normalizeLookupKey(getCharacterSnapshot().target)===normalizeLookupKey(e)}),n=Object.freeze({get:()=>getCharacterSnapshot().class??"",is:e=>normalizeLookupKey(getCharacterSnapshot().class)===normalizeLookupKey(e)});return Object.freeze({target:g,class:n})},EMPTY_ICON_HTML=()=>"",createColorsApi=({playerColor:e=()=>"grey",iconHtml:t=EMPTY_ICON_HTML}={})=>{const g="function"==typeof t?t:EMPTY_ICON_HTML;return Object.freeze({playerColor:t=>e(t),iconHtml:(e,t,n)=>g(e,t,n)})},NOOP$5=()=>{},toFrozenList$1=e=>Object.freeze(Array.isArray(e)?[...e]:[]),createCustomizeApi=({setConfiguredDefences:e=NOOP$5,setClassBalanceType:t=NOOP$5,mountNativeDisplay:g=NOOP$5,unmountNativeDisplay:n=NOOP$5}={})=>{const C=Object.freeze({set:t=>toFrozenList$1(e(t))}),o=Object.freeze({set:e=>t(e)}),I=Object.freeze({mount:()=>{g()},unmount:()=>{n()}});return Object.freeze({defences:C,classBalance:o,nativeDisplay:I})},NOOP$4=()=>!1,toFrozenList=e=>Object.freeze(Array.isArray(e)?[...e]:[]),createLayoutApi=({presetIds:e=[],applyPreset:t=NOOP$4,saveLayout:g=NOOP$4,restoreLayout:n=NOOP$4,hasSavedLayout:C=()=>!1}={})=>{const o=toFrozenList(e);return Object.freeze({list:()=>o,apply:e=>Boolean(t(e)),save:()=>Boolean(g()),restore:()=>Boolean(n()),hasSaved:()=>Boolean(C())})},NOOP$3=()=>({members:[],leader:"",selfName:""}),createPartyApi=({getSnapshot:e=NOOP$3}={})=>{const isMember=t=>{const g=normalizeLookupKey(t);return!!g&&e().members.some(e=>normalizeLookupKey(e)===g)};return Object.freeze({isMember})},bt=Object.freeze([]),normalizeLookupName=e=>"string"==typeof e&&e.trim().length>0?e.trim().toLowerCase():"",toReadOnlySnapshot=e=>e&&"object"==typeof e?deepFreeze(structuredClone(e)):e,createPlayersApi=({getPlayer:e=()=>null,listPlayers:t=()=>bt,getPlayerColor:g=()=>"grey",refreshPlayer:n=async()=>null}={})=>{const resolveProfile=g=>{const n=e(g);if(n)return n;const C=normalizeLookupName(g);return C?t().find(e=>normalizeLookupName(e?.name)===C)??null:null},get=e=>{const t=resolveProfile(e);return t?toReadOnlySnapshot(t):null},color=e=>g(e),fetch=async e=>{try{const t=await n(e);if(t)return toReadOnlySnapshot(t)}catch{}const t=resolveProfile(e);return t?toReadOnlySnapshot(t):null};return Object.freeze({get,color,fetch})},NOOP$2=()=>{},NOOP_LIST=()=>[],NOOP_GET=()=>null,vt=["text","color","background"],normalizeOverride=e=>{if(!e||"object"!=typeof e)return null;const t={};for(const g of vt)"string"==typeof e[g]&&e[g]&&(t[g]=e[g]);return Object.keys(t).length>0?Object.freeze(t):null},createRoomApi=({setItemOverride:e=NOOP$2,removeItemOverride:t=NOOP$2,listItemOverrides:g=NOOP_LIST,getItemOverride:n=NOOP_GET}={})=>{const C=Object.freeze({set:(t,g)=>{const n=normalizeOverride(g);return n?(e(t,n),n):null},remove:e=>{t(e)},get:e=>n(e),list:()=>Object.freeze(g().map(([e,t])=>Object.freeze({name:e,override:t})))});return Object.freeze({items:C})},isTranscriptModel=e=>Boolean(e&&"function"==typeof e.addLines&&"function"==typeof e.getSnapshot),assertHtml=e=>{if("string"!=typeof e||0===e.length)throw new TypeError('api.stream.add requires a non-empty "html" string.')},resolveTargetModel=(e,t,g)=>{if("system"===e)return t;if("combat"===e)return g;throw new RangeError('api.stream.add requires "stream" to be either "system" or "combat".')},toReadOnlyEntry=e=>e?Object.freeze({...e}):null,createStreamApi=({systemStream:e=null,combatStream:t=null,now:g=Date.now}={})=>{const add=({html:n,stream:C}={})=>{assertHtml(n);const o=resolveTargetModel(C,e,t);if(!isTranscriptModel(o))return null;const I=g();return o.addLines([{html:n,timestamp:I,isPrompt:!1,isMonospace:!1,shouldLog:!0,buffer:C}]),toReadOnlyEntry(o.getSnapshot().items.at(-1))};return Object.freeze({add})},createNoopTimerModel=()=>({add:()=>null,clearAll:()=>0,get:()=>null,list:()=>[],remove:()=>null,reset:()=>null,start:()=>null,stop:()=>null}),hasListFilters=e=>"string"==typeof e||null!==e&&"object"==typeof e,resolveGroupId=e=>"string"==typeof e?e:e&&"object"==typeof e&&"string"==typeof e.groupId?e.groupId:null,createTimersApi=({timerModel:e}={})=>{const t=e??createNoopTimerModel(),get=e=>t.get(e),list=e=>{if(!hasListFilters(e))throw new TypeError("api.timers.list requires filters; read nexGui.state.timers.list for the unfiltered snapshot.");return t.list(e)},start=e=>t.start(e),stop=e=>t.stop(e),reset=e=>t.reset(e),remove=e=>t.remove(e),add=(e,g,n="",C)=>t.add(e,g,n,C),clear=e=>{const g=resolveGroupId(e);if(!g)return t.clearAll();const n=t.list({groupId:g});for(const C of n)t.remove(C.id);return n.length};return Object.freeze({add,clear,get,list,remove,reset,start,stop})},toFrozenSnapshot=e=>e&&"object"==typeof e?deepFreeze(structuredClone(e)):e,xt=Object.freeze({name:"",class:"",level:0,target:null,targetDetails:Object.freeze({id:null,name:null,hpPercent:null,hpText:null,hpDelta:null,gender:null,currentAffs:Object.freeze([]),limbs:Object.freeze({})}),gender:null,balance:!1,equilibrium:!1,classBalanceType:null,classBalanceReady:null,currentAffs:Object.freeze([]),limbs:Object.freeze({})}),createCharacterState=({characterModel:e=null}={})=>()=>toFrozenSnapshot(e?.snapshot?.()??xt),createCustomizeState=({getConfiguredDefences:e=()=>[],classBalanceController:t=null}={})=>()=>{const g=e();return toFrozenSnapshot({defences:Array.isArray(g)?g:[],classBalance:t?.getType?.()??null})},St=Object.freeze({members:Object.freeze([]),leader:"",selfName:"",settings:Object.freeze({})}),createPartyState=({partyModel:e=null}={})=>()=>toFrozenSnapshot(e?.snapshot?.()??St),wt=Object.freeze({directory:Object.freeze([]),cityPalette:Object.freeze({})}),createPlayersState=({playerDirectory:e=null,cityPalette:t=wt.cityPalette}={})=>()=>toFrozenSnapshot({directory:e?.getAllPlayerProfiles?.()??[],cityPalette:t&&"object"==typeof t?t:{}}),Et=Object.freeze({ref:Object.freeze({id:"",name:""}),items:Object.freeze([]),occupants:Object.freeze({players:Object.freeze([]),npcs:Object.freeze([])})}),createRoomState=({roomModel:e=null}={})=>()=>{const t=e?.snapshot?.();return t?toFrozenSnapshot({ref:{id:t.roomId??"",name:t.roomName??""},items:Array.isArray(t.items)?t.items:[],occupants:{players:Array.isArray(t.players)?t.players:[],npcs:Array.isArray(t.npcs)?t.npcs:[]}}):Et},Rt=Object.freeze({instance:Object.freeze({kills:0,goldGained:0,xpPercent:0,xpValue:0,deaths:0,startedAt:0}),session:Object.freeze({kills:0,goldGained:0,xpPercent:0,xpValue:0,deaths:0,startedAt:0}),month:Object.freeze({kills:0,goldGained:0,xpPercent:0,xpValue:0,deaths:0,startedAt:0,goldCap:0,year:0,month:0})}),createStatsState=({playStatsModel:e=null}={})=>()=>toFrozenSnapshot(e?.snapshot?.()??Rt),createSystemState=({version:e="",isMounted:t=()=>!1,startupOrchestrator:g=null}={})=>()=>toFrozenSnapshot({version:e,mounted:Boolean(t()),phase:g?.getState?.().phase??"INIT"}),createTimersState=({timerModel:e=null}={})=>()=>toFrozenSnapshot({list:e?.list?.()??[]}),composePublicApi=({version:e,startupOrchestrator:t,isMounted:g,character:n,timerModel:C,players:o,colors:I,customize:a,layout:i,party:s,room:l,stats:c,stream:u}={})=>{const d=createPlayersApi(o),p=createColorsApi({playerColor:I?.playerColor??d.color,iconHtml:I?.iconHtml}),m={system:createSystemState({version:e,isMounted:g,startupOrchestrator:t}),character:createCharacterState({characterModel:n?.characterModel}),party:createPartyState({partyModel:s?.partyModel}),room:createRoomState({roomModel:l?.roomModel}),stats:createStatsState({playStatsModel:c?.playStatsModel}),players:createPlayersState({playerDirectory:o?.playerDirectory,cityPalette:I?.cityPalette}),timers:createTimersState({timerModel:C}),customize:createCustomizeState({getConfiguredDefences:a?.getConfiguredDefences,classBalanceController:a?.classBalanceController})},stateSnapshot=()=>Object.freeze({system:m.system(),character:m.character(),party:m.party(),room:m.room(),stats:m.stats(),players:m.players(),timers:m.timers(),customize:m.customize()}),h=Object.freeze({character:createCharacterApi(n),players:d,colors:p,timers:createTimersApi({timerModel:C}),customize:createCustomizeApi(a),layout:createLayoutApi(i),party:createPartyApi({getSnapshot:s?.getSnapshot}),room:createRoomApi(l),stream:createStreamApi(u)}),y={};return Object.defineProperty(y,"state",{enumerable:!0,get:stateSnapshot}),Object.defineProperty(y,"api",{value:h,enumerable:!0}),Object.freeze(y)},kt="feather-pointed",tab=(e,t={})=>({type:"tab",id:e,name:e,component:e,helpText:e,icon:kt,...t}),hostTab=e=>({type:"tab",...e}),rightBorder=(e={})=>({type:"border",location:"right",...e}),Mt={layout:{type:"row",id:"main",children:[{type:"row",id:"#f21df3e7-48ef-48f4-b77d-96a4cfc93903",weight:11.055408908360821,children:[{type:"tabset",id:"container_1",weight:6.080414549807837,children:[tab("nexDefences")]},{type:"tabset",id:"#fc94a4e0-6b58-42b5-826f-6e0c3bec80a7",weight:5.235912529001193,children:[tab("nexTimers")]},{type:"tabset",id:"#3251f844-bd3f-4ebb-aca9-9a4dfe9d0add",weight:5.49476101474438,children:[tab("nexTarget")]},{type:"tabset",id:"#5a449b58-0188-4ab9-9c98-023ed517a477",weight:5.316690055933218,children:[tab("nexStats",{borderWidth:725})]}]},{type:"row",id:"#70e4ecdf-81dc-40c6-b536-b62595eff99b",weight:54.4266284719302,children:[{type:"tabset",id:"#f85f4040-6d4a-49c7-94bd-7244f1a3b32d",weight:11.507047541573453,children:[hostTab({id:"all_comm",name:"All Comm",helpText:"Global Communication Window",component:"all_comm",icon:"message-lines"})]},{type:"tabset",id:"#fdd3f126-a4e3-4f24-9e2b-03b2f25825ec",weight:46.37955039657086,enableDrop:!1,enableTabStrip:!1,active:!0,children:[hostTab({id:"#90968890-c02d-44ac-947a-5651201350c8",component:"center"})]}]},{type:"row",id:"#105ad70c-29c2-4f15-b764-c2c124fd5e36",weight:41.18462928637565,children:[{type:"row",id:"#6c8d384b-ce25-444f-9ece-92e8d7c1c7f4",weight:26.295598569968487,children:[{type:"tabset",id:"#14f8b2aa-bc7c-4e2b-b6cb-b05931394b2a",weight:48.76712328767123,children:[tab("nexFeed")]},{type:"tabset",id:"#887e45a7-0b29-446f-862b-d6dde018fc96",weight:51.23287671232877,children:[tab("nexMetrics")]}]},{type:"row",id:"#64cee95d-aaef-477c-965e-76cdabd2a677",weight:35.830262173583016,children:[{type:"row",id:"#c365b5e0-6c0c-4de0-81f2-872ed286499d",weight:39.93115318416523,children:[{type:"tabset",id:"#01137e43-37f6-4f66-aa8a-b129d202fc29",weight:49.54337899543379,children:[tab("nexItems")]},{type:"tabset",id:"#e4c4c437-aba2-45ff-b168-f72896c253fa",weight:50.45662100456621,children:[tab("nexNpcs")]}]},{type:"tabset",id:"#59491b6a-bab3-415d-8367-25c562f46ae9",weight:60.06884681583477,selected:1,children:[hostTab({id:"map",name:"Map",helpText:"Map",component:"map",icon:"route"}),hostTab({id:"nexMap",name:"nexMap",helpText:"nexMap",component:"nexMap",icon:kt})]}]},{type:"tabset",id:"#63176cb9-c8b3-452a-afff-1e828d13e678",weight:6.009664560737805,children:[tab("nexPlayers")]},{type:"row",id:"#9e30489f-3eaf-4afe-90f6-23087c97698d",weight:19.364474695710708,children:[{type:"tabset",id:"#688e21f9-7929-4c29-92ce-9a9500c8fb63",weight:34.47319574635062,children:[tab("nexCombat")]},{type:"tabset",id:"#a79f5a9f-83b7-4f6a-b3c9-1c3e5843cc7e",weight:34.83104898939232,children:[tab("nexSystem")]}]}]}]},borders:[rightBorder({size:700,children:[tab("nexOptions",{borderWidth:300}),tab("nexParty",{borderWidth:300})]}),{type:"border",location:"left",children:[]},{type:"border",location:"top",children:[]},{type:"border",location:"bottom",children:[]}]},Tt={layout:{type:"row",id:"main",children:[{type:"row",id:"#70e4ecdf-81dc-40c6-b536-b62595eff99b",weight:57.26509774852639,children:[{type:"tabset",id:"#f85f4040-6d4a-49c7-94bd-7244f1a3b32d",weight:17.557736227615205,selected:1,children:[hostTab({id:"map",name:"Map",helpText:"Map",component:"map",icon:"route"}),hostTab({id:"nexMap",name:"nexMap",helpText:"nexMap",component:"nexMap",icon:kt})]},{type:"row",id:"#bcb4f90b-4716-4f9b-9b22-ffd8741be626",weight:7.090289581370549,children:[{type:"tabset",id:"#b54bf1ab-4145-4041-9e67-8e6b789724b1",weight:11.363636363636363,children:[tab("nexPlayers")]},{type:"tabset",id:"#3df7c443-17f5-406e-9a45-54879deb731e",weight:26.79425837320574,children:[tab("nexNpcs")]},{type:"tabset",id:"#5c7c36a2-9496-4e6f-a1df-c581f898f7ac",weight:36.8421052631579,active:!0,children:[tab("nexItems")]}]},{type:"tabset",id:"#1eaac23b-4eae-486d-8915-90a25f41f9e0",weight:2.6494514015995967,children:[hostTab({id:"all_comm",name:"All Comm",helpText:"Global Communication Window",component:"all_comm",icon:"message-lines"})]},{type:"tabset",id:"#fdd3f126-a4e3-4f24-9e2b-03b2f25825ec",weight:30.58912072755898,enableDrop:!1,enableTabStrip:!1,children:[hostTab({id:"#90968890-c02d-44ac-947a-5651201350c8",component:"center"})]}]}]},borders:[rightBorder({size:700,children:[tab("nexOptions",{borderWidth:300}),tab("nexParty",{borderWidth:300}),tab("nexMetrics"),tab("nexStats",{borderWidth:725}),tab("nexCombat"),tab("nexSystem"),tab("nexTarget"),tab("nexDefences"),tab("nexTimers"),tab("nexFeed")]})]},Pt=Object.freeze({kDesktop:Mt,mobile:Tt}),Nt=Object.freeze(Object.keys(Pt)),getLayoutPreset=e=>Pt[e]??null,createCharacterStore=({characterModel:e,eventBus:t})=>{const g=create(()=>({...e.read(),updateCharacter:t=>e.update(t),setClass:t=>e.setClass(t),setTarget:t=>e.setTarget(t)})),refreshCharacter=()=>{g.setState(e.read())};return t.on(_.CHARACTER_UPDATED,refreshCharacter),t.on(_.CLASS_CHANGED,refreshCharacter),t.on(_.TARGET_CHANGED,refreshCharacter),g},projectEntries=(e,t)=>e.length===t.length&&e.every((e,g)=>Object.is(e,t[g]))?e:t,createFeedStore=({feedModel:e})=>create((t,g)=>{const refresh=()=>{t({entries:projectEntries(g().entries,e.snapshot())})};return{entries:e.snapshot(),addEntry:t=>{e.add(t),refresh()},addEntries:t=>{if("function"==typeof e.addEntries)e.addEntries(t);else for(const g of t)e.add(g);refresh()},replaceEntries:t=>{if("function"==typeof e.replaceEntries)e.replaceEntries(t);else{e.clear();for(const g of t)e.add(g)}refresh()},clear:()=>{e.clear(),refresh()}}}),createPartyStore=({partyModel:e,eventBus:t})=>{const readParty=()=>e.read?.()??e.snapshot(),g=create(()=>({...readParty(),updateParty:t=>e.update(t),addMember:t=>e.addMember(t),removeMember:t=>e.removeMember(t),setLeader:t=>e.setLeader(t),setSelf:t=>e.setSelf(t),setSetting:(t,g)=>e.setSetting(t,g)})),refreshParty=()=>{g.setState(readParty())};return t.on(_.PARTY_UPDATED,refreshParty),t.on(_.PARTY_MEMBER_LEFT,refreshParty),g},Dt=/^You have gained (\d+) experience\.$/,Ot=/^You have made (\d+) out of 450000 gold this month\.$/,toFiniteNumber=(e,t=null)=>{const g="number"==typeof e?e:"string"==typeof e&&e.trim().length>0?Number(e):NaN;return Number.isFinite(g)?g:t},toInteger=(e,t=null)=>{const g=toFiniteNumber(e,NaN);return Number.isFinite(g)?Math.trunc(g):t},toStatusXp=e=>{if(!e||"object"!=typeof e)return null;const t="string"==typeof e.level?Number.parseInt(e.level,10):toInteger(e.level,null),g=toFiniteNumber("string"==typeof e.xp?e.xp.replace("%",""):e.xp,null);return null==t||null==g?null:t+g/100},makeScope=e=>({kills:0,goldGained:0,xpPercent:0,xpValue:0,deaths:0,startedAt:e}),makeMonthScope=e=>({...makeScope(e),goldCap:0,year:0,month:0}),cloneSnapshot=e=>structuredClone(e),normalizePersistedStats=e=>migrateGameStatsPersistence(e??Ne),createPlayStatsModel=({persistedGameStats:e,now:t=()=>Date.now()}={})=>{const g=t(),n=normalizePersistedStats(e),C=n.month??Ne.month,o=toInteger(C.xpValue??C.xp,0);let I=toInteger(n.kills,0),a=null,i=toFiniteNumber(C.currentXp,null);const s=new Set,l=new Set,c=g,u={instance:{initialized:!1,startingGold:null,startingKills:I,startingXp:null,startedAt:g},session:{initialized:!1,startingGold:null,startingKills:I,startingXp:null,startedAt:g},month:{initialized:toInteger(C.year,0)>0&&toInteger(C.month,0)>0,startingGold:toInteger(C.startingGold,null),startingKills:toInteger(C.startingKills,I),startingXp:toFiniteNumber(C.startingXp,null),startedAt:c}};let d={instance:makeScope(g),session:makeScope(g),month:{...makeMonthScope(c),goldCap:toInteger(C.goldCap,0),year:toInteger(C.year,0),month:toInteger(C.month,0),xpValue:o,deaths:toInteger(C.deaths,0)}};const read=()=>d,updateScope=(e,t)=>{if(!t||"object"!=typeof t)return;const g=d[e],n={...g,...t};Object.keys(t).some(e=>!Object.prototype.hasOwnProperty.call(g,e)||!Object.is(g[e],n[e]))&&(d={...d,[e]:n})},toPersistenceSnapshot=()=>({kills:I,month:{deaths:d.month.deaths,goldCap:d.month.goldCap,month:d.month.month,startingGold:u.month.startingGold??0,startingKills:u.month.startingKills??I,startingXp:u.month.startingXp??0,currentXp:i??0,xpValue:d.month.xpValue,year:d.month.year}}),emitRead=()=>{const e=read();s.forEach(t=>t(e))},emitPersistenceSnapshot=()=>{const e=toPersistenceSnapshot();l.forEach(t=>t(e))},emitChange=({persist:e=!1}={})=>{emitRead(),e&&emitPersistenceSnapshot()},ensureScopeBaseline=e=>{const t=u[e];t.initialized||null==a||null==i||(t.initialized=!0,t.startingGold=a,t.startingKills=I,t.startingXp=i)},refreshScope=e=>{const t=u[e];t.initialized&&null!=t.startingGold&&null!=t.startingXp&&null!=a&&null!=i&&updateScope(e,{kills:I-t.startingKills,goldGained:a-t.startingGold,xpPercent:Number((100*(i-t.startingXp)).toFixed(2))})},refreshAllScopes=()=>{ensureScopeBaseline("instance"),ensureScopeBaseline("session"),ensureScopeBaseline("month"),refreshScope("instance"),refreshScope("session"),refreshScope("month"),emitChange({persist:!0})},incrementXpValue=e=>{!Number.isFinite(e)||e<=0||(updateScope("instance",{xpValue:d.instance.xpValue+e}),updateScope("session",{xpValue:d.session.xpValue+e}),updateScope("month",{xpValue:d.month.xpValue+e}),emitChange({persist:!0}))},setMonthGoldCap=e=>{!Number.isFinite(e)||e<0||(updateScope("month",{goldCap:e}),emitChange({persist:!0}))};return{destroy:()=>{s.clear(),l.clear()},handleAchievement:e=>{if("TotalCreaturesKilled"!==e?.name)return{requestGoldCap:!1};const t=toInteger(e?.value,I);return null!=t&&(I=t,refreshAllScopes()),{requestGoldCap:!0}},handleStatus:e=>{a=toInteger(e?.gold,a),i=toStatusXp(e)??i,refreshAllScopes()},handleTimeList:e=>{const g=toInteger(e?.mon,null),n=toInteger(e?.year,null);if(null!=g){if(g!==d.month.month||null!=n&&n!==d.month.year){const e=t();return u.month={initialized:null!=a&&null!=i,startingGold:a,startingKills:I,startingXp:i,startedAt:e},d={...d,month:{...makeMonthScope(e),year:n??0,month:g}},void emitChange({persist:!0})}updateScope("month",{year:n??d.month.year,month:g}),emitChange({persist:!0})}},processStreamEntries:e=>{Array.isArray(e)&&0!==e.length&&e.forEach(e=>{if(e?.isPrompt)return;const t=stripHtml(e?.html).trim(),g=t.match(Dt);if(g)return void incrementXpValue(toInteger(g[1],0));const n=t.match(Ot);n&&setMonthGoldCap(toInteger(n[1],0))})},read,resetInstance:()=>{const e=t();u.instance={initialized:null!=a&&null!=i,startingGold:a,startingKills:I,startingXp:i,startedAt:e},d={...d,instance:makeScope(e)},emitChange()},snapshot:()=>cloneSnapshot(d),subscribe:e=>(s.add(e),()=>s.delete(e)),subscribePersistence:e=>(l.add(e),()=>l.delete(e)),toPersistenceSnapshot,updateInstance:e=>{updateScope("instance",e),emitChange()},updateMonth:e=>{updateScope("month",e),emitChange()},updateSession:e=>{updateScope("session",e),emitChange()}}},createPlayStatsStore=({playStatsModel:e}={})=>{const t=e??createPlayStatsModel(),g=create(()=>({...t.read(),updateInstance:e=>t.updateInstance(e),updateSession:e=>t.updateSession(e),updateMonth:e=>t.updateMonth(e),resetInstance:()=>t.resetInstance()})),refreshStats=()=>{g.setState(t.read())},n=t.subscribe(refreshStats);return Object.defineProperty(g,"destroy",{value:()=>{n()},enumerable:!1}),g},createRoomStore=({roomModel:e,eventBus:t})=>{const readRoom=()=>e.read?.()??e.snapshot(),g=create(()=>({...readRoom(),updateRoom:t=>e.update(t)})),refreshRoom=()=>{g.setState(readRoom())};return t.on(_.ROOM_UPDATED,refreshRoom),g},normalizeTarget=e=>{if(null==e)return null;if("string"==typeof e){const t=e.trim();return t.length>0?t:null}return"object"!=typeof e||Array.isArray(e)?e:"target"in e?normalizeTarget(e.target):null},createStatsStore=({statsModel:e,eventBus:t})=>{const g=create(()=>({...e.read(),target:null,updateStats:t=>e.update(t)})),refreshStats=()=>{g.setState(e.read())};return t.on(_.STATS_UPDATED,refreshStats),t.on(_.TARGET_CHANGED,e=>{g.setState({target:normalizeTarget(e)})}),g},immerImpl=e=>(t,g,n)=>(n.setState=(e,g,...n)=>t("function"==typeof e?V(e):e,g,...n),e(n.setState,g,n)),jt=immerImpl,zt=Object.freeze({purpleGalaxy:"https://cdn.pixabay.com/photo/2018/12/18/22/30/background-3883188_960_720.jpg",blueGalaxy:"https://cdn.pixabay.com/photo/2022/06/08/05/47/stars-7249785_960_720.jpg",orangeGalaxy:"https://cdn.pixabay.com/photo/2015/08/28/11/27/space-911785_960_720.jpg",greenGalaxy:"https://cdn.pixabay.com/photo/2017/08/15/08/23/stars-2643089_960_720.jpg",stars:"https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/stars.png",darkForest:"https://i.pinimg.com/originals/44/6e/3b/446e3b79395a287ca32f7977dd83b290.jpg"}),Gt=Object.freeze(Object.keys(zt)),Lt=new Map(Object.entries(zt).map(([e,t])=>[t,e])),canonicalizeBackgroundImageValue=e=>{if("string"!=typeof e)return"";const t=e.trim();return t?Object.hasOwn(zt,t)?t:Lt.get(t)??t:""},resolveBackgroundImageSource=e=>{const t=canonicalizeBackgroundImageValue(e);return zt[t]??t},Bt=deepFreeze({background:{primary:"#0d0d0d",panel:"#141414",header:"#1a1a1a",modal:"#1e1e1e"},text:{primary:"#FFF5D6",secondary:"#C0B090",muted:"#706050",accent:"#FFD700"},game:{hp:"#e05555",mp:"#5588e0",ep:"#55c055",wp:"#e0a035",nl:"#a055e0",timerActive:"#55aaff",timerCritical:"#ff5533"},spacing:{unit:4},radius:{panel:4,tag:2},theme:{backgroundImage:"",fontSize:12,displayFontFamily:Ee,displayFontSize:14,backgroundOpacity:.5,hue:0},replacement:{bracketAllyColor:"#ffffff",bracketEnemyColor:"#ff0000",targetBorderColor:"rgb(255, 0, 0)",selfNameColor:"lightpink",infoColor:"cadetblue",unknownNameColor:"grey",npcTagBracketColor:"red",damageNumberBracketColor:"#808080"}}),cloneTokens$1=e=>structuredClone(e),mergeTokenPatch=(e,t)=>{const g=cloneTokens$1(e);if(!isPlainObject$1(t))return g;const applyPatch=(e,t)=>{for(const[g,n]of Object.entries(t))void 0!==n&&(Array.isArray(n)?e[g]=structuredClone(n):isPlainObject$1(n)&&isPlainObject$1(e[g])?applyPatch(e[g],n):e[g]=structuredClone(n))};return applyPatch(g,t),g},normalizeThemeTokens=e=>{if(!isPlainObject$1(e))return e;const t={...e};return Object.hasOwn(e,"backgroundImage")&&(t.backgroundImage=canonicalizeBackgroundImageValue(e.backgroundImage)),Object.hasOwn(e,"displayFontFamily")&&(t.displayFontFamily=normalizeDisplayFontFamily(e.displayFontFamily)),Object.hasOwn(e,"displayFontSize")&&(t.displayFontSize=normalizeDisplayFontSize(e.displayFontSize)),{...t}},normalizeTokens=e=>({...e,theme:normalizeThemeTokens(e.theme)}),createThemeStore=({eventBus:e,persistenceStore:t}={})=>{const g=normalizeTokens(mergeTokenPatch(Bt,{theme:t&&"function"==typeof t.get?normalizeThemeTokens(t.get("theme")):void 0})),n=create(jt(()=>({tokens:g,updateTokens:g=>{const C=normalizeTokens(mergeTokenPatch(n.getState().tokens,g));t&&"function"==typeof t.set&&t.set("theme",C.theme),n.setState({tokens:C}),e.emit($.THEME_CHANGED,{tokens:cloneTokens$1(C)})},resetTokens:()=>{const g=cloneTokens$1(Bt);t&&"function"==typeof t.set&&t.set("theme",g.theme),n.setState({tokens:g}),e.emit($.THEME_CHANGED,{tokens:cloneTokens$1(g)})}})));return n},createTimerStore=({timerModel:e,eventBus:t})=>{const readTimers=()=>e.read?.()??e.snapshot(),g=create(()=>({timers:readTimers(),addTimer:(t,g,n="",C)=>e.add(t,g,n,C),removeTimer:t=>e.remove(t),clearAll:()=>e.clearAll()})),refreshTimers=()=>{g.setState({timers:readTimers()})};return t.on(_.TIMER_STARTED,refreshTimers),t.on(_.TIMER_UPDATED,refreshTimers),t.on(_.TIMER_EXPIRED,refreshTimers),t.on(_.TIMER_CLEARED,refreshTimers),g},createUiStore=({persistenceStore:e}={})=>create(jt(t=>({activeTab:{},modalOpen:null,settings:e?.get?.("ui")??{},netflixMode:!1,setActiveTab:(e,g)=>t(t=>{t.activeTab[e]=g}),openModal:e=>t({modalOpen:e}),closeModal:()=>t({modalOpen:null}),setSetting:(g,n)=>t(t=>{t.settings[g]=n,e?.set?.("ui",t.settings)}),setNetflixMode:e=>t(t=>{t.netflixMode=Boolean(e)})}))),createMessageRegistry=()=>{const e=new Map,listTypes=()=>[...e.keys()].sort((e,t)=>e.localeCompare(t));return{register:(t,g)=>(e.set(t,g),g),lookup:t=>e.get(t)??null,listTypes}},Ft=["#000000","#800000","#008000","#808000","#000080","#800080","#008080","#c0c0c0","#808080","#ff0000","#00ff00","#ffff00","#0000ff","#ff00ff","#00ffff","#ffffff"],Wt=[0,95,135,175,215,255],hex2=e=>e.toString(16).padStart(2,"0"),Vt={};for(let gc=0;gc<16;gc++)Vt[gc]=Ft[gc];for(let gc=16;gc<=231;gc++){const e=gc-16,t=Math.floor(e/36),g=Math.floor(e%36/6),n=e%6,C=Wt[t],o=Wt[g],I=Wt[n];Vt[gc]=`#${hex2(C)}${hex2(o)}${hex2(I)}`}for(let gc=232;gc<=255;gc++){const e=8+10*(gc-232);Vt[gc]=`#${hex2(e)}${hex2(e)}${hex2(e)}`}var Ut=/\x1b\[([0-9;]*)m|([^\x1b]+)/g,stdColor=(e,t)=>Vt[t?e+8:e],parseAnsi=e=>{const t=[];let g,n=null,C=null,o=!1;for(Ut.lastIndex=0;null!==(g=Ut.exec(e));){if(void 0!==g[2]){t.push({text:g[2],fg:n,bg:C,bold:o});continue}const e=g[1],I=0===e.length?[0]:e.split(";").map(Number);let a=0;for(;a<I.length;){const e=I[a];0===e?(n=null,C=null,o=!1):1===e?o=!0:e>=30&&e<=37?n=stdColor(e-30,o):e>=40&&e<=47?C=stdColor(e-40,!1):e>=90&&e<=97?n=Vt[e-90+8]:e>=100&&e<=107?C=Vt[e-100+8]:38===e&&5===I[a+1]&&void 0!==I[a+2]?(n=Vt[I[a+2]]??null,a+=2):48===e&&5===I[a+1]&&void 0!==I[a+2]&&(C=Vt[I[a+2]]??null,a+=2),a++}}return t},Kt=/\x1b\[[0-9;]*m/g,Ht=/^\d+h,\s*\d+m,\s*\d+e,\s*\d+w/,parsePromptLine=e=>{const t=e.replace(Kt,"").trim();return{isPrompt:Ht.test(t),text:t}},renderCombatLine=e=>{const t=resolveTimestamp(e);return createDisplayLine({html:renderStructuredRowHtml(e,"combat"),timestamp:t,isPrompt:!1,isMonospace:!1,shouldLog:e.shouldLog??!0,buffer:"combat"})},renderSystemLine=e=>{const t=resolveTimestamp(e);return createDisplayLine({html:renderStructuredRowHtml(e,"system"),timestamp:t,isPrompt:!1,isMonospace:!1,shouldLog:e.shouldLog??!0,buffer:"system"})},Yt=Object.freeze({main:renderColorLine,system:renderSystemLine,combat:renderCombatLine,replacement:renderReplacementLine}),isMessageInput=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)&&"string"==typeof e.event&&Object.prototype.hasOwnProperty.call(e,"payload")),parseRawLine=(e,t,g)=>{const n=t(e),C=g(e);return{type:"main",buffer:"main",segments:n,metadata:{text:C.text,source:"raw"},isPrompt:C.isPrompt,isMonospace:C.isPrompt,shouldLog:!0}},withTimestamp=(e,t)=>null!=e.timestamp||null!=e.metadata?.timestamp?e:{...e,timestamp:t()},validateDependencies=(e,t,g)=>{if(!e||"function"!=typeof e.addLines)throw new TypeError("createMessagePipeline requires a streamModel with addLines(lines).");if(null!=g&&"function"!=typeof g.addLines)throw new TypeError("createMessagePipeline side transcript models must expose addLines(lines).");if(!t||"function"!=typeof t.register||"function"!=typeof t.lookup)throw new TypeError("createMessagePipeline requires a registry with register(type, renderer) and lookup(type).")},createMessagePipeline=({streamModel:e,registry:t=createMessageRegistry(),parseAnsi:g=parseAnsi,parsePromptLine:n=parsePromptLine,parseStreamEventLine:C=parseStreamEventLine,renderColorLine:o=Yt.main,renderCombatLine:I=Yt.combat,renderReplacementLine:a=Yt.replacement,renderSystemLine:i=Yt.system,systemStreamModel:s=null,combatStreamModel:l=null,now:c=Date.now})=>{validateDependencies(e,t,s),validateDependencies(e,t,l),t.register("main",o),t.register("system",i),t.register("combat",I),t.register("replacement",a);const resolveTargetModel=t=>"system"===t?s??e:"combat"===t?l??e:e,renderAndStore=e=>{if(!e)return null;const g=t.lookup(e.type);if(!g)return null;const n=g(withTimestamp(e,c));return resolveTargetModel(n?.buffer??e.buffer).addLines([n]),n};function process(e,t){return"string"==typeof e&&1===arguments.length?renderAndStore(parseRawLine(e,g,n)):"string"==typeof e&&arguments.length>1?renderAndStore(C(e,t)):isMessageInput(e)?renderAndStore(C(e.event,e.payload)):null}return{process,registry:t}},normalizeGender$1=e=>{if("string"!=typeof e)return null;const t=e.trim().toLowerCase();return"female"===t?"female":"male"===t?"male":null},normalizeAfflictionName=e=>{if(Array.isArray(e))return normalizeAfflictionName(e[0]);if(isPlainObject$1(e))return normalizeAfflictionName(e.name??e.affliction??e.id);if("string"!=typeof e)return null;const t=e.trim().toLowerCase();return t.length>0?t:null},normalizeAfflictionList=e=>{if(Array.isArray(e)){const t=e.map(e=>normalizeAfflictionName(e)).filter(Boolean);return t.length>0?Array.from(new Set(t)):null}return isPlainObject$1(e)?normalizeAfflictionList(Object.keys(e)):null},normalizeLimbMap=e=>isPlainObject$1(e)?Object.fromEntries(Object.entries(e).map(([e,t])=>null!==t&&"object"==typeof t?[e,structuredClone(t)]:[e,{percent:toNumber(t)}])):null,buildCharacterDetailPatch=e=>{if(!isPlainObject$1(e))return null;const t={},g=normalizeGender$1(e.gender),n=normalizeAfflictionList(e.currentAffs??e.afflictions),C=normalizeLimbMap(e.limbs);return g&&(t.gender=g),n&&(t.currentAffs=n),C&&(t.limbs=C),Object.keys(t).length>0?t:null},applyCharacterAfflictionEvent=(e,t,g)=>{if("Char.Afflictions.Add"!==t&&"Char.Afflictions.Remove"!==t)return!1;const n=normalizeAfflictionName(g);if(!n)return!1;const C=e.snapshot(),o=Array.isArray(C.currentAffs)?C.currentAffs:[];return"Char.Afflictions.Add"===t?!o.includes(n)&&(e.update({currentAffs:[...o,n]}),!0):(e.update({currentAffs:o.filter(e=>e!==n)}),!0)},extractTargetLabel=e=>{if("string"==typeof e){const t=toTrimmedString(e);return!t||/^\d+$/.test(t)?null:t}return isPlainObject$1(e)?toTrimmedString(e.short_desc)??toTrimmedString(e.name)??toTrimmedString(e.fullname)??toTrimmedString(e.text):null},parseLevel=e=>{if("number"==typeof e&&Number.isFinite(e))return e;if("string"!=typeof e)return 0;const t=e.match(/\d+/);return t?Number.parseInt(t[0],10):0},buildVitalsStatsPatch=e=>isPlainObject$1(e)?{hp:{current:toNumber(e.hp),max:toNumber(e.maxhp)},mp:{current:toNumber(e.mp),max:toNumber(e.maxmp)},ep:{current:toNumber(e.ep),max:toNumber(e.maxep)},wp:{current:toNumber(e.wp),max:toNumber(e.maxwp)},nl:{current:toNumber(e.nl),max:toNumber(e.maxnl,100)}}:null,buildVitalsCharacterPatch=e=>isPlainObject$1(e)?{balance:toBooleanFlag(e.bal),equilibrium:toBooleanFlag(e.eq),...buildCharacterDetailPatch(e)??{}}:null,buildStatusSync=e=>{if(!isPlainObject$1(e))return null;const t=toPercent(e.xp),g=toTrimmedString(e.class);return{statsPatch:{gold:toNumber(e.gold),bank:toNumber(e.bank),...null==t?{}:{xp:t,xpToNext:Math.max(0,100-t)}},characterPatch:{...toTrimmedString(e.name)?{name:e.name.trim()}:{},level:parseLevel(e.level),...buildCharacterDetailPatch(e)??{}},className:g,target:extractTargetLabel(e.target),city:toTrimmedString(e.city)}},isBridgeEnvelope=e=>isPlainObject$1(e)&&"string"==typeof e.event&&Object.prototype.hasOwnProperty.call(e,"data"),createGmcpIngressController=({adapter:e,eventBus:t,timerModel:g,streamModel:n,systemStreamModel:C,combatStreamModel:o,statsModel:I,partyModel:a,roomModel:i,characterModel:s,defenceModel:l,classBalanceController:c,playerDirectory:u,roomOccupantsModel:d=createRoomOccupantsModel({roomModel:i,playerDirectory:u}),partyAutomationModel:p=createPartyAutomationModel({characterModel:s,partyModel:a,playerDirectory:u,sendCommand:t=>e.send(t)})}={})=>{const m=createMessagePipeline({streamModel:n,systemStreamModel:C,combatStreamModel:o}),h=[],subscribe=(e,g)=>{h.push(t.on(e,g))},processDisplayBridge=e=>{isBridgeEnvelope(e)&&m.process(e.event,e.data)};return subscribe(q.STREAM_LINE,e=>{isBridgeEnvelope(e)&&(applyCharacterAfflictionEvent(s,e.event,e.data),p.processEvent(e.event,e.data),processDisplayBridge(e))}),subscribe(q.TIMER_STARTED,e=>{if(!isBridgeEnvelope(e)||"nexSkillMatch"!==e.event)return;if("self"!==e.data?.user)return;const t=toTrimmedString(e.data?.id);if(!t)return;const n=g.get(t);n&&g.start(n.id)}),subscribe(q.DEFENCE_GAINED,e=>{if(!isBridgeEnvelope(e))return;const t=extractNamedValue(e.data);t&&l.gain(t),processDisplayBridge(e)}),subscribe(q.DEFENCE_LOST,e=>{if(!isBridgeEnvelope(e))return;const t=extractNamedValue(e.data);t&&l.lose(t),processDisplayBridge(e)}),subscribe(q.TARGET_CHANGED,e=>{isBridgeEnvelope(e)&&processDisplayBridge(e)}),subscribe(q.STATS_UPDATED,e=>{if(isBridgeEnvelope(e)){if("Char.Vitals"===e.event){const t=buildVitalsStatsPatch(e.data),g=buildVitalsCharacterPatch(e.data),n=c.updateFromVitals(e.data);t&&I.update(t),(g||n)&&s.update({...g??{},...n??{}})}if("Char.Status"===e.event){const t=buildStatusSync(e.data);if(!t)return;I.update(t.statsPatch),s.update(t.characterPatch),a.setSelf(t.characterPatch.name??e.data?.name),u.rememberPlayerStatus({...e.data,name:t.characterPatch.name??e.data?.name,city:t.city,fullname:e.data?.fullname}),t.className&&s.setClass(t.className),s.setTarget(t.target)}}}),subscribe(q.ROOM_UPDATED,e=>{isBridgeEnvelope(e)&&d.apply(e.event,e.data)}),subscribe(q.CLASS_CHANGED,e=>{if(!isBridgeEnvelope(e))return;const t=toTrimmedString(e.data?.class)??toTrimmedString(e.data);t&&s.setClass(t)}),Object.freeze({destroy:()=>{h.forEach(e=>e?.())}})},Zt=Object.freeze({}),areDisplayHostSettingsEqual=(e,t)=>e.showPrompts===t.showPrompts&&e.showTimestamps===t.showTimestamps,freezeDisplayHostSettings=e=>Object.freeze(e),readDisplayHostSettings=e=>{const t=e?.()??Zt;return freezeDisplayHostSettings({showPrompts:Boolean(t.show_prompts),showTimestamps:Boolean(t.show_timestamps)})},resolvePayloadSnapshot$2=(e,t)=>{if(!t||"object"!=typeof t||"string"!=typeof t.key)return null;if(!("value"in t))return null;switch(t.key){case"show_prompts":{const g=Boolean(t.value);return g===e.showPrompts?e:freezeDisplayHostSettings({...e,showPrompts:g})}case"single_prompt":{const g=!Boolean(t.value);return g===e.showPrompts?e:freezeDisplayHostSettings({...e,showPrompts:g})}case"show_timestamps":{const g=Boolean(t.value);return g===e.showTimestamps?e:freezeDisplayHostSettings({...e,showTimestamps:g})}default:return null}},createHostDisplaySettingsModel=({eventBus:e,readHostSettings:t})=>{if(!e||"function"!=typeof e.on)throw new Error("createHostDisplaySettingsModel requires an eventBus with on(topic, listener).");if("function"!=typeof t)throw new Error("createHostDisplaySettingsModel requires readHostSettings().");let g=readDisplayHostSettings(t);const n=new Set,notifyListeners=()=>{for(const e of n)e()},commitSnapshot=e=>(!e||areDisplayHostSettingsEqual(g,e)||(g=e,notifyListeners()),g),syncFromHost=()=>commitSnapshot(readDisplayHostSettings(t)),handleHostSettingsChanged=e=>{const t=resolvePayloadSnapshot$2(g,e);t&&commitSnapshot(t)},C=e.on($.HOST_SETTINGS_CHANGED,handleHostSettingsChanged),o=e.on($.SYSTEM_PHASE,syncFromHost),subscribe=e=>(n.add(e),()=>{n.delete(e)}),getSnapshot=()=>g,destroy=()=>{C?.(),o?.(),n.clear()};return Object.freeze({destroy,getSnapshot,subscribe})},Qt=Object.freeze({}),areHostSettingsEqual=(e,t)=>e.echo_input===t.echo_input&&e.echo_gmcp===t.echo_gmcp&&e.single_prompt===t.single_prompt&&e.show_timestamps===t.show_timestamps,freezeHostSettings=e=>Object.freeze(e),readHostSettingsFromHost=e=>{const t=e?.()??Qt;return freezeHostSettings({echo_input:Boolean(t.echo_input),echo_gmcp:Boolean(t.echo_gmcp),single_prompt:!Boolean(t.show_prompts),show_timestamps:Boolean(t.show_timestamps)})},resolvePayloadSnapshot$1=(e,t)=>{if(!t||"object"!=typeof t||"string"!=typeof t.key)return null;if(!("value"in t))return null;switch(t.key){case"echo_input":{const g=Boolean(t.value);return g===e.echo_input?e:freezeHostSettings({...e,echo_input:g})}case"echo_gmcp":{const g=Boolean(t.value);return g===e.echo_gmcp?e:freezeHostSettings({...e,echo_gmcp:g})}case"single_prompt":{const g=Boolean(t.value);return g===e.single_prompt?e:freezeHostSettings({...e,single_prompt:g})}case"show_prompts":{const g=!Boolean(t.value);return g===e.single_prompt?e:freezeHostSettings({...e,single_prompt:g})}case"show_timestamps":{const g=Boolean(t.value);return g===e.show_timestamps?e:freezeHostSettings({...e,show_timestamps:g})}default:return null}},createHostSettingsModel=({eventBus:e,readHostSettings:t})=>{if(!e||"function"!=typeof e.on)throw new Error("createHostSettingsModel requires an eventBus with on(topic, listener).");if("function"!=typeof t)throw new Error("createHostSettingsModel requires readHostSettings().");let g=readHostSettingsFromHost(t);const n=new Set,notifyListeners=()=>{for(const e of n)e()},commitSnapshot=e=>(!e||areHostSettingsEqual(g,e)||(g=e,notifyListeners()),g),syncFromHost=()=>commitSnapshot(readHostSettingsFromHost(t)),handleHostSettingsChanged=e=>{const t=resolvePayloadSnapshot$1(g,e);t&&commitSnapshot(t)},C=e.on($.HOST_SETTINGS_CHANGED,handleHostSettingsChanged),o=e.on($.SYSTEM_PHASE,syncFromHost),subscribe=e=>(n.add(e),()=>{n.delete(e)}),getSnapshot=()=>g,destroy=()=>{C?.(),o?.(),n.clear()};return Object.freeze({destroy,getSnapshot,subscribe})},Xt=Object.freeze({}),areHostLayoutsEqual=(e,t)=>e.display_tabstrip===t.display_tabstrip,freezeHostLayout=e=>Object.freeze(e),readHostLayoutFromHost=e=>{const t=e?.()??Xt;return freezeHostLayout({display_tabstrip:"boolean"!=typeof t.tabSetEnableTabStrip||t.tabSetEnableTabStrip})},resolvePayloadSnapshot=(e,t)=>{if(!t||"object"!=typeof t||"string"!=typeof t.key)return null;if(!("value"in t))return null;if("display_tabstrip"===t.key){const g=Boolean(t.value);return g===e.display_tabstrip?e:freezeHostLayout({...e,display_tabstrip:g})}return null},createHostLayoutModel=({eventBus:e,readHostLayout:t})=>{if(!e||"function"!=typeof e.on)throw new Error("createHostLayoutModel requires an eventBus with on(topic, listener).");if("function"!=typeof t)throw new Error("createHostLayoutModel requires readHostLayout().");let g=readHostLayoutFromHost(t);const n=new Set,notifyListeners=()=>{for(const e of n)e()},commitSnapshot=e=>(!e||areHostLayoutsEqual(g,e)||(g=e,notifyListeners()),g),syncFromHost=()=>commitSnapshot(readHostLayoutFromHost(t)),handleHostSettingsChanged=e=>{const t=resolvePayloadSnapshot(g,e);t?commitSnapshot(t):syncFromHost()},C=e.on($.HOST_SETTINGS_CHANGED,handleHostSettingsChanged),o=e.on($.SYSTEM_PHASE,syncFromHost),subscribe=e=>(n.add(e),()=>{n.delete(e)}),getSnapshot=()=>g,destroy=()=>{C?.(),o?.(),n.clear()};return Object.freeze({destroy,getSnapshot,subscribe})},hasPersistenceAdapter=e=>e&&"function"==typeof e.getVariable&&"function"==typeof e.setVariable,createPlayStatsPersistence=({adapter:e}={})=>{if(!hasPersistenceAdapter(e))return null;const t=createPersistenceStore({adapter:e,sliceKey:Te.GAME_STATS,schema:Ne,migrate:migrateGameStatsPersistence});return{read:()=>t.getAll(),write:e=>{t.set("kills",e?.kills??0),t.set("month",e?.month??{})}}},safeUnsubscribe=e=>{"function"==typeof e&&e()},resolveStreamEntries=(e,t)=>{const g=e.getSnapshot(),n=Array.isArray(g?.buffer)?g.buffer:[];if(0===n.length)return{entries:[],lastProcessedStreamId:-1};const C=n.filter(e=>e.id>t);return{entries:C,lastProcessedStreamId:C.length>0?C[C.length-1].id:t}},createPlayStatsController=({adapter:e,now:t,persistence:g=createPlayStatsPersistence({adapter:e}),streamModel:n}={})=>{const C=createPlayStatsModel({persistedGameStats:g?.read?.(),now:t}),o=[];let I=-1,a=!1;if(g&&"function"==typeof g.write&&o.push(C.subscribePersistence(e=>{g.write(e)})),e&&"function"==typeof e.on&&(o.push(e.on("Char.Status",C.handleStatus)),o.push(e.on("IRE.Misc.Achievement",t=>{C.handleAchievement(t)?.requestGoldCap&&"function"==typeof e.send&&e.send("goldcap")})),o.push(e.on("IRE.Time.List",C.handleTimeList))),n&&"function"==typeof n.subscribe&&"function"==typeof n.getSnapshot){const processStreamSnapshot=()=>{const e=resolveStreamEntries(n,I);I=e.lastProcessedStreamId,C.processStreamEntries(e.entries)};o.push(n.subscribe(processStreamSnapshot))}return{destroy:()=>{a||(a=!0,o.splice(0).forEach(safeUnsubscribe))},model:C}},_t=(0,l.createContext)(null),useNexGui=()=>{const e=(0,l.useContext)(_t);if(null===e)throw new Error("useNexGui must be used inside NexGuiContext.Provider");return e},NexGuiMountRoot=()=>null,createReactMountLifecycle=({contextValue:e,RootComponent:t=NexGuiMountRoot}={})=>{const n=new Map;let C=!1;const unmountContainer=e=>{const t=n.get(e);t&&(n.delete(e),t.unmount())},mount=o=>{if(C)throw new Error("[nexGui4] Cannot mount a destroyed nexGui instance.");if(!o||"object"!=typeof o||1!==o.nodeType)throw new TypeError("[nexGui4] mount(container) requires a DOM element container.");unmountContainer(o);const I=(0,g.createRoot)(o);return n.set(o,I),I.render((0,l.createElement)(_t.Provider,{value:e},(0,l.createElement)(t))),{unmount:()=>{unmountContainer(o)}}},destroy=()=>{if(!C){C=!0;for(const e of[...n.keys()])unmountContainer(e)}};return Object.freeze({mount,destroy,isMounted:()=>n.size>0})},NOOP$1=()=>{},normalizeCommand=e=>"function"==typeof e?e:NOOP$1,createPlatformTabsController=()=>{let e=NOOP$1,t=NOOP$1,g=NOOP$1,n=NOOP$1,C=NOOP$1,hasSavedLayout=()=>!1;const resetNativeDisplayCommands=()=>{e=NOOP$1,t=NOOP$1},resetLayoutCommands=()=>{g=NOOP$1,n=NOOP$1,C=NOOP$1,hasSavedLayout=()=>!1};return Object.freeze({mountNativeDisplay:(...t)=>e(...t),unmountNativeDisplay:(...e)=>t(...e),configureNativeDisplayCommands:(g={})=>{const n=normalizeCommand(g.mountNativeDisplay),C=normalizeCommand(g.unmountNativeDisplay);return e=n,t=C,()=>{e===n&&t===C&&resetNativeDisplayCommands()}},resetNativeDisplayCommands,applyLayoutPreset:(...e)=>g(...e),saveLayout:(...e)=>n(...e),restoreLayout:(...e)=>C(...e),hasSavedLayout:(...e)=>hasSavedLayout(...e),configureLayoutCommands:(e={})=>{const t=normalizeCommand(e.applyLayoutPreset),o=normalizeCommand(e.saveLayout),I=normalizeCommand(e.restoreLayout),a="function"==typeof e.hasSavedLayout?e.hasSavedLayout:()=>!1;return g=t,n=o,C=I,hasSavedLayout=a,()=>{g===t&&n===o&&C===I&&hasSavedLayout===a&&resetLayoutCommands()}},resetLayoutCommands})};U(!1);var qt="4.0.0",resolveRuntimePorts=(e={})=>{const t=createBrowserRuntimePorts(),g=e&&"object"==typeof e?e:{};return Object.freeze({...t,...g})},resolveConfiguredDefenceList=e=>normalizeConfiguredDefenceList(e.getConfiguredDefences?.()),resolveActiveDefenceList=(e,t=[])=>normalizeConfiguredDefenceList(e.getActiveDefences?.(t)),seedInitialDisplayTheme=({adapter:e,persistenceStore:t})=>{if(void 0!==e.getVariable("nexGui4Settings")?.settings)return;const g=e.getHostSettings?.()??{},n=t.get("theme");t.set("theme",{...n,displayFontFamily:readHostDisplayFontFamily(g),displayFontSize:readHostDisplayFontSize(g)})},withRelationshipCommandTracking=(e,t)=>{const g=assertAdapterContract(e);if(!t||"function"!=typeof t.trackRelationshipCommand)return g;const n=Object.create(g),C=g.send.bind(g);return Object.defineProperty(n,"send",{value:e=>(t.trackRelationshipCommand(e),C(e)),enumerable:!0}),assertAdapterContract(n)},resolveAdapter=({adapter:e,playerRelationships:t}={})=>withRelationshipCommandTracking(e??createNexusAdapter(),t),createNexGui=({adapter:e,debugEnabled:t=!1,traceLimit:g=500,autoStart:n=!0,playerDirectory:C,playerRelationships:o,startupPhaseHandlers:I,remoteService:a,runtimePorts:i}={})=>{const s=resolveRuntimePorts(i),l=o??createPlayerRelationshipsModel(),c=resolveAdapter({adapter:e,playerRelationships:l}),u=createEventBus({label:"nexgui4",debugEnabled:t,traceLimit:g}),d=C??createPlayerDirectoryModel({fetchImpl:s.fetch,now:s.now}),p=createPlayerDirectoryDiagnosticsModel({now:s.now}),m=createPlayerDirectoryLifecycle({playerDirectory:d,diagnostics:p,readCache:()=>(c.getVariable("nexGui4Settings")||{})[Te.PLAYER_DIRECTORY],writeCache:(e,t)=>{const g=c.getVariable("nexGui4Settings")||{};g[Te.PLAYER_DIRECTORY]=t,c.setVariable(Me,g)}}),h=createPlatformTabsController(),y=createHostDisplaySettingsModel({eventBus:u,readHostSettings:()=>c.getHostSettings?.()??{}}),b=createHostSettingsModel({eventBus:u,readHostSettings:()=>c.getHostSettings?.()??{}}),v=createHostLayoutModel({eventBus:u,readHostLayout:()=>c.getHostLayoutSnapshot?.()??{}}),x=createTimerModel({eventBus:u,now:s.now,setTimer:s.setTimeout,clearTimer:s.clearTimeout}),S=createScrollbackSessionStore({storage:createIndexedDbManager(),setTimeoutFn:s.setTimeout,clearTimeoutFn:s.clearTimeout,logger:console}),w=createStreamModel({onAppend:e=>S.append(e),onClear:()=>{S.clear().catch(e=>{console.error("[nexGui4] Failed to clear scrollback session.",e)})}}),E=createTranscriptModel({cap:5e3}),R=createTranscriptModel({cap:5e3}),M=createStatsModel({eventBus:u}),T=createPartyModel({eventBus:u}),P=createRoomModel({eventBus:u}),N=createCharacterModel({eventBus:u}),D=createDefenceModel({eventBus:u}),O=createFeedModel({cap:5e3}),j=createClassBalanceController(),G=createRoomOccupantsModel({roomModel:P,playerDirectory:d}),L=createPlayStatsController({adapter:c,streamModel:w,now:s.now}),B=createPartyAutomationModel({characterModel:N,partyModel:T,playerDirectory:d,sendCommand:e=>c.send(e)}),F=resolveConfiguredDefenceList(c),W=resolveActiveDefenceList(c,F);D.replaceAll(W);const V=createPersistenceStore({adapter:c,sliceKey:Te.SETTINGS});seedInitialDisplayTheme({adapter:c,persistenceStore:V});const U=createPersistenceStore({adapter:c,sliceKey:Te.UI,schema:De,migrate:migrateUiPersistence});for(const[q,$]of Object.entries(V.get("party")))T.setSetting(q,$);u.on($.PARTY_UPDATED,({settings:e})=>{V.set("party",e)});const K=createGmcpIngressController({adapter:c,eventBus:u,timerModel:x,streamModel:w,systemStreamModel:E,combatStreamModel:R,statsModel:M,partyModel:T,roomModel:P,characterModel:N,defenceModel:D,classBalanceController:j,playerDirectory:d,roomOccupantsModel:G,partyAutomationModel:B}),H=createDefenceStore({defenceModel:D,eventBus:u,configuredDefences:F}),Y=Object.freeze({timers:createTimerStore({timerModel:x,eventBus:u}),stream:w,stats:createStatsStore({statsModel:M,eventBus:u}),party:createPartyStore({partyModel:T,eventBus:u}),room:createRoomStore({roomModel:P,eventBus:u}),character:createCharacterStore({characterModel:N,eventBus:u}),defence:H,theme:createThemeStore({eventBus:u,persistenceStore:V}),ui:createUiStore({persistenceStore:V}),feed:createFeedStore({feedModel:O}),playStats:createPlayStatsStore({playStatsModel:L.model}),systemStream:E,combatStream:R});let Z=!1,Q=null;const syncActiveDefencesFromHost=()=>{const e=Y.defence.getState().configuredDefences??[];D.replaceAll(resolveActiveDefenceList(c,e))},scheduleActiveDefenceResync=()=>{null!=Q&&s.clearTimeout(Q),Q=s.setTimeout(()=>{Q=null,Z||syncActiveDefencesFromHost()},0)};u.on(q.CLASS_CHANGED,scheduleActiveDefenceResync);const X=registerGmcpBindings({adapter:c,eventBus:u,playerDirectory:d,playerDirectoryLifecycle:m,playerRelationships:l,playerDirectoryDiagnostics:p,remoteService:a,fetchFn:s.fetch}),_={adapter:c,eventBus:u,hostDisplaySettingsModel:y,hostSettingsModel:b,hostLayoutModel:v,playerDirectory:d,playerDirectoryLifecycle:m,playerDirectoryDiagnostics:p,playerRelationships:l,stores:Y,streamModel:w,scrollbackSession:S,persistenceStore:V,scrollbackLayoutStore:U,platformTabs:h,formatInlineNames:e=>highlightInlineNamesInText(e,{contextValue:_})},J=createReactMountLifecycle({contextValue:_});let ee=null;const initializeScrollbackSession=async()=>{try{if(await S.initialize(),Z)return;await S.clear()}catch(e){if(Z)return;console.warn("[nexGui4] Scrollback session startup degraded; continuing.",e)}},te=createStartupOrchestrator({adapter:c,eventBus:u,phaseHandlers:{...I,[lt.PREPARING]:async e=>{await initializeScrollbackSession(),await(I?.[lt.PREPARING]?.(e))}},setTimeoutFn:s.setTimeout,clearTimeoutFn:s.clearTimeout}),startRuntime=()=>(ee??=te.start(),ee.catch(()=>{}),ee),mount=e=>{if(Z)throw new Error("[nexGui4] Cannot mount a destroyed nexGui instance.");return J.mount(e)},destroy=()=>{Z||(Z=!0,null!=Q&&(s.clearTimeout(Q),Q=null),J.destroy(),te.destroy(),y.destroy(),b.destroy(),v.destroy(),X?.(),K.destroy(),L.destroy(),Y.playStats.destroy?.(),u.emit($.SYSTEM_DESTROYED,{version:qt}),x.destroy(),O.destroy(),T.destroy(),P.destroy(),M.destroy(),N.destroy(),D.destroy(),L.model.destroy(),j.destroy(),S.destroy(),m.destroy?.(),d.destroy?.(),l.destroy?.(),clearRelationshipNameFormatterCache(_),clearMessageReplacementContextCache(),h.resetNativeDisplayCommands(),h.resetLayoutCommands(),c.destroy(),u.clear())},ge=composePublicApi({version:qt,startupOrchestrator:te,isMounted:()=>J.isMounted(),character:{characterModel:N,setTarget:e=>{c.setTarget(e)}},timerModel:x,players:{playerDirectory:d,getPlayer:d.getPlayerProfile,listPlayers:d.getAllPlayerProfiles,getPlayerColor:d.getPlayerColor,refreshPlayer:d.refreshPlayerProfile},colors:{cityPalette:ye,iconHtml:(e,t,g)=>buildIconHtml(e,t,g,s.getPublicDualToneIcons?.()??null)},customize:{getConfiguredDefences:()=>Y.defence.getState().configuredDefences,setConfiguredDefences:e=>(Y.defence.getState().setConfiguredDefences(normalizeConfiguredDefenceList(e)),Y.defence.getState().configuredDefences),classBalanceController:j,setClassBalanceType:e=>{const t=j.setType(e);return N.update(t),j.getType()},mountNativeDisplay:()=>h.mountNativeDisplay(),unmountNativeDisplay:()=>h.unmountNativeDisplay()},layout:{presetIds:Nt,applyPreset:e=>h.applyLayoutPreset(e),saveLayout:()=>h.saveLayout(),restoreLayout:()=>h.restoreLayout(),hasSavedLayout:()=>h.hasSavedLayout()},party:{partyModel:T,getSnapshot:()=>T.snapshot()},room:{roomModel:P,setItemOverride:setUserRoomItemOverride,removeItemOverride:removeUserRoomItemOverride,listItemOverrides:listUserRoomItemOverrides,getItemOverride:getUserRoomItemOverride},stats:{playStatsModel:L.model},stream:{systemStream:Y.systemStream,combatStream:Y.combatStream}}),re={version:qt,mount,stores:Y,debug:{getEventTrace:()=>u.getTrace(),setDebugEnabled:e=>u.setDebugEnabled(e),stream:{getStats:()=>({...w.getStats(),scrollbackSession:S.getStats()}),getScrollbackStats:()=>S.getStats(),getDbStats:async()=>{try{const e=await S.readAll(),t=S.getStats();return{fallback:t.storageFallback,count:e.length,firstId:e[0]?.id,lastId:e[e.length-1]?.id,scrollbackSession:t}}catch(e){return{error:e.message}}}},playerDirectory:{getSnapshot:()=>p.getPlayerDirectoryDiagnosticsSnapshot()}},destroy};return Object.defineProperty(re,"state",{enumerable:!0,get:()=>ge.state}),Object.defineProperty(re,"api",{value:ge.api,enumerable:!0}),Object.defineProperty(re,"__contextValue",{value:_,enumerable:!1}),Object.defineProperty(re,"__start",{value:startRuntime,enumerable:!1}),n&&startRuntime(),re};function formatMuiErrorMessage(e,...t){const g=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(e=>g.searchParams.append("args[]",e)),`Minified MUI error #${e}; visit ${g} for the full message.`}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var g=arguments[t];for(var n in g)({}).hasOwnProperty.call(g,n)&&(e[n]=g[n])}return e},_extends.apply(null,arguments)}var Jt=!1;function sheetForTag(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function createStyleElement(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var $t=function(){function StyleSheet(e){var t=this;this._insertTag=function(e){var g;g=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,g),t.tags.push(e)},this.isSpeedy=void 0===e.speedy?!Jt:e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var e=StyleSheet.prototype;return e.hydrate=function(e){e.forEach(this._insertTag)},e.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(createStyleElement(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var g=sheetForTag(t);try{g.insertRule(e,g.cssRules.length)}catch(n){}}else t.appendChild(document.createTextNode(e));this.ctr++},e.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},StyleSheet}(),eg="-ms-",tg="-moz-",gg="-webkit-",rg="comm",ng="rule",Ag="decl",Cg="@import",og="@keyframes",Ig="@layer",ag=Math.abs,ig=String.fromCharCode,sg=Object.assign;function hash$2(e,t){return 45^charat(e,0)?(((t<<2^charat(e,0))<<2^charat(e,1))<<2^charat(e,2))<<2^charat(e,3):0}function trim(e){return e.trim()}function match(e,t){return(e=t.exec(e))?e[0]:e}function replace(e,t,g){return e.replace(t,g)}function indexof(e,t){return e.indexOf(t)}function charat(e,t){return 0|e.charCodeAt(t)}function substr(e,t,g){return e.slice(t,g)}function strlen(e){return e.length}function sizeof(e){return e.length}function append(e,t){return t.push(e),e}function combine(e,t){return e.map(t).join("")}var lg=1,cg=1,ug=0,dg=0,pg=0,mg="";function node(e,t,g,n,C,o,I){return{value:e,root:t,parent:g,type:n,props:C,children:o,line:lg,column:cg,length:I,return:""}}function copy(e,t){return sg(node("",null,null,"",null,null,0),e,{length:-e.length},t)}function char(){return pg}function prev(){return pg=dg>0?charat(mg,--dg):0,cg--,10===pg&&(cg=1,lg--),pg}function next(){return pg=dg<ug?charat(mg,dg++):0,cg++,10===pg&&(cg=1,lg++),pg}function peek(){return charat(mg,dg)}function caret(){return dg}function slice(e,t){return substr(mg,e,t)}function token(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(e){return lg=cg=1,ug=strlen(mg=e),dg=0,[]}function dealloc(e){return mg="",e}function delimit(e){return trim(slice(dg-1,delimiter(91===e?e+2:40===e?e+1:e)))}function whitespace(e){for(;(pg=peek())&&pg<33;)next();return token(e)>2||token(pg)>3?"":" "}function escaping(e,t){for(;--t&&next()&&!(pg<48||pg>102||pg>57&&pg<65||pg>70&&pg<97););return slice(e,caret()+(t<6&&32==peek()&&32==next()))}function delimiter(e){for(;next();)switch(pg){case e:return dg;case 34:case 39:34!==e&&39!==e&&delimiter(pg);break;case 40:41===e&&delimiter(e);break;case 92:next()}return dg}function commenter(e,t){for(;next()&&e+pg!==57&&(e+pg!==84||47!==peek()););return"/*"+slice(t,dg-1)+"*"+ig(47===e?e:next())}function identifier(e){for(;!token(peek());)next();return slice(e,dg)}function compile(e){return dealloc(parse("",null,null,null,[""],e=alloc(e),0,[0],e))}function parse(e,t,g,n,C,o,I,a,i){for(var s=0,l=0,c=I,u=0,d=0,p=0,m=1,h=1,y=1,b=0,v="",x=C,S=o,w=n,E=v;h;)switch(p=b,b=next()){case 40:if(108!=p&&58==charat(E,c-1)){-1!=indexof(E+=replace(delimit(b),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:E+=delimit(b);break;case 9:case 10:case 13:case 32:E+=whitespace(p);break;case 92:E+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment(commenter(next(),caret()),t,g),i);break;default:E+="/"}break;case 123*m:a[s++]=strlen(E)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:h=0;case 59+l:-1==y&&(E=replace(E,/\f/g,"")),d>0&&strlen(E)-c&&append(d>32?declaration(E+";",n,g,c-1):declaration(replace(E," ","")+";",n,g,c-2),i);break;case 59:E+=";";default:if(append(w=ruleset(E,t,g,s,l,C,a,v,x=[],S=[],c),o),123===b)if(0===l)parse(E,t,w,w,x,o,c,a,S);else switch(99===u&&110===charat(E,3)?100:u){case 100:case 108:case 109:case 115:parse(e,w,w,n&&append(ruleset(e,w,w,0,0,C,a,v,C,x=[],c),S),C,S,c,a,n?x:S);break;default:parse(E,w,w,w,[""],S,0,a,S)}}s=l=d=0,m=y=1,v=E="",c=I;break;case 58:c=1+strlen(E),d=p;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==prev())continue;switch(E+=ig(b),b*m){case 38:y=l>0?1:(E+="\f",-1);break;case 44:a[s++]=(strlen(E)-1)*y,y=1;break;case 64:45===peek()&&(E+=delimit(next())),u=peek(),l=c=strlen(v=E+=identifier(caret())),b++;break;case 45:45===p&&2==strlen(E)&&(m=0)}}return o}function ruleset(e,t,g,n,C,o,I,a,i,s,l){for(var c=C-1,u=0===C?o:[""],d=sizeof(u),p=0,m=0,h=0;p<n;++p)for(var y=0,b=substr(e,c+1,c=ag(m=I[p])),v=e;y<d;++y)(v=trim(m>0?u[y]+" "+b:replace(b,/&\f/g,u[y])))&&(i[h++]=v);return node(e,t,g,0===C?ng:a,i,s,l)}function comment(e,t,g){return node(e,t,g,rg,ig(char()),substr(e,2,-2),0)}function declaration(e,t,g,n){return node(e,t,g,Ag,substr(e,0,n),substr(e,n+1,-1),n)}function serialize(e,t){for(var g="",n=sizeof(e),C=0;C<n;C++)g+=t(e[C],C,e,t)||"";return g}function stringify(e,t,g,n){switch(e.type){case Ig:if(e.children.length)break;case Cg:case Ag:return e.return=e.return||e.value;case rg:return"";case og:return e.return=e.value+"{"+serialize(e.children,n)+"}";case ng:e.value=e.props.join(",")}return strlen(g=serialize(e.children,n))?e.return=e.value+"{"+g+"}":""}function middleware(e){var t=sizeof(e);return function(g,n,C,o){for(var I="",a=0;a<t;a++)I+=e[a](g,n,C,o)||"";return I}}function rulesheet(e){return function(t){t.root||(t=t.return)&&e(t)}}function memoize(e){var t=Object.create(null);return function(g){return void 0===t[g]&&(t[g]=e(g)),t[g]}}var identifierWithPointTracking=function(e,t,g){for(var n=0,C=0;n=C,C=peek(),38===n&&12===C&&(t[g]=1),!token(C);)next();return slice(e,dg)},toRules=function(e,t){var g=-1,n=44;do{switch(token(n)){case 0:38===n&&12===peek()&&(t[g]=1),e[g]+=identifierWithPointTracking(dg-1,t,g);break;case 2:e[g]+=delimit(n);break;case 4:if(44===n){e[++g]=58===peek()?"&\f":"",t[g]=e[g].length;break}default:e[g]+=ig(n)}}while(n=next());return e},getRules=function(e,t){return dealloc(toRules(alloc(e),t))},fg=new WeakMap,compat=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,g=e.parent,n=e.column===g.column&&e.line===g.line;"rule"!==g.type;)if(!(g=g.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||fg.get(g))&&!n){fg.set(e,!0);for(var C=[],o=getRules(t,C),I=g.props,a=0,i=0;a<o.length;a++)for(var s=0;s<I.length;s++,i++)e.props[i]=C[a]?o[a].replace(/&\f/g,I[s]):I[s]+" "+o[a]}}},removeLabel=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function prefix(e,t){switch(hash$2(e,t)){case 5103:return gg+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return gg+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return gg+e+tg+e+eg+e+e;case 6828:case 4268:return gg+e+eg+e+e;case 6165:return gg+e+eg+"flex-"+e+e;case 5187:return gg+e+replace(e,/(\w+).+(:[^]+)/,gg+"box-$1$2"+eg+"flex-$1$2")+e;case 5443:return gg+e+eg+"flex-item-"+replace(e,/flex-|-self/,"")+e;case 4675:return gg+e+eg+"flex-line-pack"+replace(e,/align-content|flex-|-self/,"")+e;case 5548:return gg+e+eg+replace(e,"shrink","negative")+e;case 5292:return gg+e+eg+replace(e,"basis","preferred-size")+e;case 6060:return gg+"box-"+replace(e,"-grow","")+gg+e+eg+replace(e,"grow","positive")+e;case 4554:return gg+replace(e,/([^-])(transform)/g,"$1"+gg+"$2")+e;case 6187:return replace(replace(replace(e,/(zoom-|grab)/,gg+"$1"),/(image-set)/,gg+"$1"),e,"")+e;case 5495:case 3959:return replace(e,/(image-set\([^]*)/,gg+"$1$`$1");case 4968:return replace(replace(e,/(.+:)(flex-)?(.*)/,gg+"box-pack:$3"+eg+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+gg+e+e;case 4095:case 3583:case 4068:case 2532:return replace(e,/(.+)-inline(.+)/,gg+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen(e)-1-t>6)switch(charat(e,t+1)){case 109:if(45!==charat(e,t+4))break;case 102:return replace(e,/(.+:)(.+)-([^]+)/,"$1"+gg+"$2-$3$1"+tg+(108==charat(e,t+3)?"$3":"$2-$3"))+e;case 115:return~indexof(e,"stretch")?prefix(replace(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==charat(e,t+1))break;case 6444:switch(charat(e,strlen(e)-3-(~indexof(e,"!important")&&10))){case 107:return replace(e,":",":"+gg)+e;case 101:return replace(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gg+(45===charat(e,14)?"inline-":"")+"box$3$1"+gg+"$2$3$1"+eg+"$2box$3")+e}break;case 5936:switch(charat(e,t+11)){case 114:return gg+e+eg+replace(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gg+e+eg+replace(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gg+e+eg+replace(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gg+e+eg+e+e}return e}var hg=[function(e,t,g,n){if(e.length>-1&&!e.return)switch(e.type){case Ag:e.return=prefix(e.value,e.length);break;case og:return serialize([copy(e,{value:replace(e.value,"@","@"+gg)})],n);case ng:if(e.length)return combine(e.props,function(t){switch(match(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy(e,{props:[replace(t,/:(read-\w+)/,":"+tg+"$1")]})],n);case"::placeholder":return serialize([copy(e,{props:[replace(t,/:(plac\w+)/,":"+gg+"input-$1")]}),copy(e,{props:[replace(t,/:(plac\w+)/,":"+tg+"$1")]}),copy(e,{props:[replace(t,/:(plac\w+)/,eg+"input-$1")]})],n)}return""})}}],createCache=function(e){var t=e.key;if("css"===t){var g=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(g,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var n,C,o=e.stylisPlugins||hg,I={},a=[];n=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),g=1;g<t.length;g++)I[t[g]]=!0;a.push(e)});var i,s=[compat,removeLabel],l=[stringify,rulesheet(function(e){i.insert(e)})],c=middleware(s.concat(o,l)),stylis=function(e){return serialize(compile(e),c)};C=function(e,t,g,n){i=g,stylis(e?e+"{"+t.styles+"}":t.styles),n&&(u.inserted[t.name]=!0)};var u={key:t,sheet:new $t({key:t,container:n,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:I,registered:{},insert:C};return u.sheet.hydrate(a),u},yg=__commonJSMin(e=>{var t="function"==typeof Symbol&&Symbol.for,g=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,C=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,I=t?Symbol.for("react.profiler"):60114,a=t?Symbol.for("react.provider"):60109,i=t?Symbol.for("react.context"):60110,s=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,c=t?Symbol.for("react.forward_ref"):60112,u=t?Symbol.for("react.suspense"):60113,d=t?Symbol.for("react.suspense_list"):60120,p=t?Symbol.for("react.memo"):60115,m=t?Symbol.for("react.lazy"):60116,h=t?Symbol.for("react.block"):60121,y=t?Symbol.for("react.fundamental"):60117,b=t?Symbol.for("react.responder"):60118,v=t?Symbol.for("react.scope"):60119;function z(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case g:switch(e=e.type){case s:case l:case C:case I:case o:case u:return e;default:switch(e=e&&e.$$typeof){case i:case c:case m:case p:case a:return e;default:return t}}case n:return t}}}function A(e){return z(e)===l}e.AsyncMode=s,e.ConcurrentMode=l,e.ContextConsumer=i,e.ContextProvider=a,e.Element=g,e.ForwardRef=c,e.Fragment=C,e.Lazy=m,e.Memo=p,e.Portal=n,e.Profiler=I,e.StrictMode=o,e.Suspense=u,e.isAsyncMode=function(e){return A(e)||z(e)===s},e.isConcurrentMode=A,e.isContextConsumer=function(e){return z(e)===i},e.isContextProvider=function(e){return z(e)===a},e.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===g},e.isForwardRef=function(e){return z(e)===c},e.isFragment=function(e){return z(e)===C},e.isLazy=function(e){return z(e)===m},e.isMemo=function(e){return z(e)===p},e.isPortal=function(e){return z(e)===n},e.isProfiler=function(e){return z(e)===I},e.isStrictMode=function(e){return z(e)===o},e.isSuspense=function(e){return z(e)===u},e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===C||e===l||e===I||e===o||e===u||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===p||e.$$typeof===a||e.$$typeof===i||e.$$typeof===c||e.$$typeof===y||e.$$typeof===b||e.$$typeof===v||e.$$typeof===h)},e.typeOf=z}),bg=__commonJSMin((e,t)=>{t.exports=yg()}),vg=__commonJSMin((e,t)=>{var g=bg(),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},C={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},I={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function getStatics(e){return g.isMemo(e)?I:a[e.$$typeof]||n}a[g.ForwardRef]=o,a[g.Memo]=I;var i=Object.defineProperty,s=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,d=Object.prototype;function hoistNonReactStatics(e,t,g){if("string"!=typeof t){if(d){var n=u(t);n&&n!==d&&hoistNonReactStatics(e,n,g)}var o=s(t);l&&(o=o.concat(l(t)));for(var I=getStatics(e),a=getStatics(t),p=0;p<o.length;++p){var m=o[p];if(!(C[m]||g&&g[m]||a&&a[m]||I&&I[m])){var h=c(t,m);try{i(e,m,h)}catch(y){}}}}return e}t.exports=hoistNonReactStatics}),xg=!0;function getRegisteredStyles(e,t,g){var n="";return g.split(" ").forEach(function(g){void 0!==e[g]?t.push(e[g]+";"):g&&(n+=g+" ")}),n}var registerStyles=function(e,t,g){var n=e.key+"-"+t.name;!1!==g&&!1!==xg||void 0!==e.registered[n]||(e.registered[n]=t.styles)},insertStyles=function(e,t,g){registerStyles(e,t,g);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var C=t;do{e.insert(t===C?"."+n:"",C,e.sheet,!0),C=C.next}while(void 0!==C)}};function murmur2(e){for(var t,g=0,n=0,C=e.length;C>=4;++n,C-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),g=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&g)+(59797*(g>>>16)<<16);switch(C){case 3:g^=(255&e.charCodeAt(n+2))<<16;case 2:g^=(255&e.charCodeAt(n+1))<<8;case 1:g=1540483477*(65535&(g^=255&e.charCodeAt(n)))+(59797*(g>>>16)<<16)}return(((g=1540483477*(65535&(g^=g>>>13))+(59797*(g>>>16)<<16))^g>>>15)>>>0).toString(36)}var Sg={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},wg=!1,Eg=/[A-Z]|^ms/g,Rg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(e){return 45===e.charCodeAt(1)},isProcessableValue=function(e){return null!=e&&"boolean"!=typeof e},kg=memoize(function(e){return isCustomProperty(e)?e:e.replace(Eg,"-$&").toLowerCase()}),processStyleValue=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Rg,function(e,t,g){return Tg={name:t,styles:g,next:Tg},t})}return 1===Sg[e]||isCustomProperty(e)||"number"!=typeof t||0===t?t:t+"px"},Mg="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function handleInterpolation(e,t,g){if(null==g)return"";var n=g;if(void 0!==n.__emotion_styles)return n;switch(typeof g){case"boolean":return"";case"object":var C=g;if(1===C.anim)return Tg={name:C.name,styles:C.styles,next:Tg},C.name;var o=g;if(void 0!==o.styles){var I=o.next;if(void 0!==I)for(;void 0!==I;)Tg={name:I.name,styles:I.styles,next:Tg},I=I.next;return o.styles+";"}return createStringFromObject(e,t,g);case"function":if(void 0!==e){var a=Tg,i=g(e);return Tg=a,handleInterpolation(e,t,i)}}var s=g;if(null==t)return s;var l=t[s];return void 0!==l?l:s}function createStringFromObject(e,t,g){var n="";if(Array.isArray(g))for(var C=0;C<g.length;C++)n+=handleInterpolation(e,t,g[C])+";";else for(var o in g){var I=g[o];if("object"!=typeof I){var a=I;null!=t&&void 0!==t[a]?n+=o+"{"+t[a]+"}":isProcessableValue(a)&&(n+=kg(o)+":"+processStyleValue(o,a)+";")}else{if("NO_COMPONENT_SELECTOR"===o&&wg)throw new Error(Mg);if(!Array.isArray(I)||"string"!=typeof I[0]||null!=t&&void 0!==t[I[0]]){var i=handleInterpolation(e,t,I);switch(o){case"animation":case"animationName":n+=kg(o)+":"+i+";";break;default:n+=o+"{"+i+"}"}}else for(var s=0;s<I.length;s++)isProcessableValue(I[s])&&(n+=kg(o)+":"+processStyleValue(o,I[s])+";")}}return n}var Tg,Pg=/label:\s*([^\s;{]+)\s*(;|$)/g;function serializeStyles(e,t,g){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,C="";Tg=void 0;var o=e[0];null==o||void 0===o.raw?(n=!1,C+=handleInterpolation(g,t,o)):C+=o[0];for(var I=1;I<e.length;I++)C+=handleInterpolation(g,t,e[I]),n&&(C+=o[I]);Pg.lastIndex=0;for(var a,i="";null!==(a=Pg.exec(C));)i+="-"+a[1];return{name:murmur2(C)+i,styles:C,next:Tg}}var Ng,Dg,syncFallback=function(e){return e()},Og=!!t.useInsertionEffect&&t.useInsertionEffect,jg=Og||syncFallback,zg=Og||t.useLayoutEffect,Gg=t.createContext("undefined"!=typeof HTMLElement?createCache({key:"css"}):null),Lg=Gg.Provider,withEmotionCache=function(e){return(0,t.forwardRef)(function(g,n){return e(g,(0,t.useContext)(Gg),n)})},Bg=t.createContext({}),Fg={}.hasOwnProperty,Wg="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",createEmotionProps=function(e,t){var g={};for(var n in t)Fg.call(t,n)&&(g[n]=t[n]);return g[Wg]=e,g},Insertion$1=function(e){var t=e.cache,g=e.serialized,n=e.isStringTag;return registerStyles(t,g,n),jg(function(){return insertStyles(t,g,n)}),null},Vg=withEmotionCache(function(e,g,n){var C=e.css;"string"==typeof C&&void 0!==g.registered[C]&&(C=g.registered[C]);var o=e[Wg],I=[C],a="";"string"==typeof e.className?a=getRegisteredStyles(g.registered,I,e.className):null!=e.className&&(a=e.className+" ");var i=serializeStyles(I,void 0,t.useContext(Bg));a+=g.key+"-"+i.name;var s={};for(var l in e)Fg.call(e,l)&&"css"!==l&&l!==Wg&&(s[l]=e[l]);return s.className=a,n&&(s.ref=n),t.createElement(t.Fragment,null,t.createElement(Insertion$1,{cache:g,serialized:i,isStringTag:"string"==typeof o}),t.createElement(o,s))}),Ug=(vg(),function(e,g){var n=arguments;if(null==g||!Fg.call(g,"css"))return t.createElement.apply(void 0,n);var C=n.length,o=new Array(C);o[0]=Vg,o[1]=createEmotionProps(e,g);for(var I=2;I<C;I++)o[I]=n[I];return t.createElement.apply(null,o)});Ng=Ug||(Ug={}),Dg||(Dg=Ng.JSX||(Ng.JSX={}));var Kg=withEmotionCache(function(e,g){var n=serializeStyles([e.styles],void 0,t.useContext(Bg)),C=t.useRef();return zg(function(){var e=g.key+"-global",t=new g.sheet.constructor({key:e,nonce:g.sheet.nonce,container:g.sheet.container,speedy:g.sheet.isSpeedy}),o=!1,I=document.querySelector('style[data-emotion="'+e+" "+n.name+'"]');return g.sheet.tags.length&&(t.before=g.sheet.tags[0]),null!==I&&(o=!0,I.setAttribute("data-emotion",e),t.hydrate([I])),C.current=[t,o],function(){t.flush()}},[g]),zg(function(){var e=C.current,t=e[0];e[1]?e[1]=!1:(void 0!==n.next&&insertStyles(g,n.next,!0),t.tags.length&&(t.before=t.tags[t.tags.length-1].nextElementSibling,t.flush()),g.insert("",n,t,!1))},[g,n.name]),null});function css(){for(var e=arguments.length,t=new Array(e),g=0;g<e;g++)t[g]=arguments[g];return serializeStyles(t)}function keyframes(){var e=css.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var Hg=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Yg=!1,Zg=memoize(function(e){return Hg.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}),testOmitPropsOnComponent=function(e){return"theme"!==e},getDefaultShouldForwardProp=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Zg:testOmitPropsOnComponent},composeShouldForwardProps=function(e,t,g){var n;if(t){var C=t.shouldForwardProp;n=e.__emotion_forwardProp&&C?function(t){return e.__emotion_forwardProp(t)&&C(t)}:C}return"function"!=typeof n&&g&&(n=e.__emotion_forwardProp),n},Insertion=function(e){var t=e.cache,g=e.serialized,n=e.isStringTag;return registerStyles(t,g,n),jg(function(){return insertStyles(t,g,n)}),null},Qg=function createStyled(e,g){var n,C,o=e.__emotion_real===e,I=o&&e.__emotion_base||e;void 0!==g&&(n=g.label,C=g.target);var a=composeShouldForwardProps(e,g,o),i=a||getDefaultShouldForwardProp(I),s=!i("as");return function(){var l=arguments,c=o&&void 0!==e.__emotion_styles?e.__emotion_styles.slice(0):[];if(void 0!==n&&c.push("label:"+n+";"),null==l[0]||void 0===l[0].raw)c.push.apply(c,l);else{var u=l[0];c.push(u[0]);for(var d=l.length,p=1;p<d;p++)c.push(l[p],u[p])}var m=withEmotionCache(function(e,g,n){var o=s&&e.as||I,l="",u=[],d=e;if(null==e.theme){for(var p in d={},e)d[p]=e[p];d.theme=t.useContext(Bg)}"string"==typeof e.className?l=getRegisteredStyles(g.registered,u,e.className):null!=e.className&&(l=e.className+" ");var m=serializeStyles(c.concat(u),g.registered,d);l+=g.key+"-"+m.name,void 0!==C&&(l+=" "+C);var h=s&&void 0===a?getDefaultShouldForwardProp(o):i,y={};for(var b in e)s&&"as"===b||h(b)&&(y[b]=e[b]);return y.className=l,n&&(y.ref=n),t.createElement(t.Fragment,null,t.createElement(Insertion,{cache:g,serialized:m,isStringTag:"string"==typeof o}),t.createElement(o,y))});return m.displayName=void 0!==n?n:"Styled("+("string"==typeof I?I:I.displayName||I.name||"Component")+")",m.defaultProps=e.defaultProps,m.__emotion_real=m,m.__emotion_base=I,m.__emotion_styles=c,m.__emotion_forwardProp=a,Object.defineProperty(m,"toString",{value:function(){return void 0===C&&Yg?"NO_COMPONENT_SELECTOR":"."+C}}),m.withComponent=function(e,t){return createStyled(e,_extends({},g,t,{shouldForwardProp:composeShouldForwardProps(m,t,!0)})).apply(void 0,c)},m}},Xg=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],_g=Qg.bind(null);Xg.forEach(function(e){_g[e]=_g(e)});var qg,Jg=__commonJSMin((e,t)=>{var g="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=g}),$g=__commonJSMin((e,t)=>{var g=Jg();function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,t.exports=function(){function shim(e,t,n,C,o,I){if(I!==g){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function getShim(){return shim}shim.isRequired=shim;var e={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return e.PropTypes=e,e}}),er=__commonJSMin((e,t)=>{t.exports=$g()()}),tr=__commonJSMin(e=>{var t=Symbol.for("react.transitional.element");function jsxProd(e,g,n){var C=null;if(void 0!==n&&(C=""+n),void 0!==g.key&&(C=""+g.key),"key"in g)for(var o in n={},g)"key"!==o&&(n[o]=g[o]);else n=g;return g=n.ref,{$$typeof:t,type:e,key:C,ref:void 0!==g?g:null,props:n}}Symbol.for("react.fragment"),e.jsx=jsxProd,e.jsxs=jsxProd}),gr=__commonJSMin((e,t)=>{t.exports=tr()})(),rr=new Map,nr={insert:void 0},createEmotionCache=(e,t)=>{const g=createCache(e);return g.sheet=new t({key:g.key,nonce:g.sheet.nonce,container:g.sheet.container,speedy:g.sheet.isSpeedy,prepend:g.sheet.prepend,insertionPoint:g.sheet.insertionPoint}),g};if("object"==typeof document&&!(qg=document.querySelector('[name="emotion-insertion-point"]'))){(qg=document.createElement("meta")).setAttribute("name","emotion-insertion-point"),qg.setAttribute("content","");const e=document.querySelector("head");e&&e.prepend(qg)}function getCache(e,t){if(e||t){class g extends $t{insert(e,t){return nr.insert?nr.insert(e,t):(this.key&&this.key.endsWith("global")&&(this.before=qg),super.insert(e,t))}}const n=createEmotionCache({key:"css",insertionPoint:e?qg:void 0},g);if(t){const e=n.insert;n.insert=(...t)=>(t[1].styles.match(/^@layer\s+[^{]*$/)||(t[1].styles=`@layer mui {${t[1].styles}}`),e(...t))}return n}}function StyledEngineProvider(e){const{injectFirst:t,enableCssLayer:g,children:n}=e,C=l.useMemo(()=>{const e=`${t}-${g}`;if("object"==typeof document&&rr.has(e))return rr.get(e);const n=getCache(t,g);return rr.set(e,n),n},[t,g]);return C?(0,gr.jsx)(Lg,{value:C,children:n}):n}function isEmpty$2(e){return null==e||0===Object.keys(e).length}function GlobalStyles$2(e){const{styles:t,defaultTheme:g={}}=e;return(0,gr.jsx)(Kg,{styles:"function"==typeof t?e=>t(isEmpty$2(e)?g:e):t})}function styled$2(e,t){return _g(e,t)}function internal_mutateStyles(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}var Ar=[];function internal_serializeStyles(e){return Ar[0]=e,serializeStyles(Ar)}var Cr=__commonJSMin(e=>{Symbol.for("react.transitional.element"),Symbol.for("react.portal");var t=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),n=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),o=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),i=Symbol.for("react.suspense_list"),s=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),c=(Symbol.for("react.view_transition"),Symbol.for("react.client.reference"));e.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===t||e===n||e===g||e===a||e===i||"object"==typeof e&&null!==e&&(e.$$typeof===l||e.$$typeof===s||e.$$typeof===o||e.$$typeof===C||e.$$typeof===I||e.$$typeof===c||void 0!==e.getModuleId)}}),or=__commonJSMin((e,t)=>{t.exports=Cr()})();function isPlainObject(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function deepClone(e){if(l.isValidElement(e)||(0,or.isValidElementType)(e)||!isPlainObject(e))return e;const t={};return Object.keys(e).forEach(g=>{t[g]=deepClone(e[g])}),t}function deepmerge(e,t,g={clone:!0}){const n=g.clone?{...e}:e;return isPlainObject(e)&&isPlainObject(t)&&Object.keys(t).forEach(C=>{l.isValidElement(t[C])||(0,or.isValidElementType)(t[C])?n[C]=t[C]:isPlainObject(t[C])&&Object.prototype.hasOwnProperty.call(e,C)&&isPlainObject(e[C])?n[C]=deepmerge(e[C],t[C],g):g.clone?n[C]=isPlainObject(t[C])?deepClone(t[C]):t[C]:n[C]=t[C]}),n}var sortBreakpointsValues=e=>{const t=Object.keys(e).map(t=>({key:t,val:e[t]}))||[];return t.sort((e,t)=>e.val-t.val),t.reduce((e,t)=>({...e,[t.key]:t.val}),{})};function createBreakpoints(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:g="px",step:n=5,...C}=e,o=sortBreakpointsValues(t),I=Object.keys(o);function up(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${g})`}function down(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${g})`}function between(e,C){const o=I.indexOf(C);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${g}) and (max-width:${(-1!==o&&"number"==typeof t[I[o]]?t[I[o]]:C)-n/100}${g})`}function only(e){return I.indexOf(e)+1<I.length?between(e,I[I.indexOf(e)+1]):up(e)}function not(e){const t=I.indexOf(e);return 0===t?up(I[1]):t===I.length-1?down(I[t]):between(e,I[I.indexOf(e)+1]).replace("@media","@media not all and")}const a=[];for(let i=0;i<I.length;i+=1)a.push(up(I[i]));return{keys:I,values:o,up,down,between,only,not,unit:g,internal_mediaKeys:a,...C}}var Ir=/min-width:\s*([0-9.]+)/;function sortContainerQueries(e,t){if(!e.containerQueries||!hasContainerQuery(t))return t;const g=[];for(const C in t)C.startsWith("@container")&&g.push(C);g.sort((e,t)=>+(e.match(Ir)?.[1]||0)-+(t.match(Ir)?.[1]||0));const n=t;for(let C=0;C<g.length;C+=1){const e=g[C],t=n[e];delete n[e],n[e]=t}return n}function hasContainerQuery(e){for(const t in e)if(t.startsWith("@container"))return!0;return!1}function isCqShorthand(e,t){return"@"===t||t.startsWith("@")&&(e.some(e=>t.startsWith(`@${e}`))||!!t.match(/^@\d/))}function getContainerQuery(e,t){const g=t.match(/^@([^/]+)?\/?(.+)?$/);if(!g)return null;const[,n,C]=g,o=Number.isNaN(+n)?n||0:+n;return e.containerQueries(C).up(o)}function cssContainerQueries(e){const toContainerQuery=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function attachCq(t,g){t.up=(...t)=>toContainerQuery(e.breakpoints.up(...t),g),t.down=(...t)=>toContainerQuery(e.breakpoints.down(...t),g),t.between=(...t)=>toContainerQuery(e.breakpoints.between(...t),g),t.only=(...t)=>toContainerQuery(e.breakpoints.only(...t),g),t.not=(...t)=>{const n=toContainerQuery(e.breakpoints.not(...t),g);return n.includes("not all and")?n.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):n}}const t={},containerQueries=e=>(attachCq(t,e),t);return attachCq(containerQueries),{...e,containerQueries}}var ar={borderRadius:4};function isObjectEmpty$2(e){if(null==e)return!0;for(const t in e)return!1;return!0}function fastDeepAssign(e,t){const g=Array.isArray(t),n=Array.isArray(e);return isPrimitive(t)?t:isPrimitiveOrBuiltIn(e)?clone(t):g&&n?mergeArray(e,t):g!==n?clone(t):mergeObject(e,t)}function cloneArray(e){let t=0;const g=e.length,n=new Array(g);for(t=0;t<g;t+=1)n[t]=clone(e[t]);return n}function cloneObject(e){const t={};for(const g in e)t[g]=clone(e[g]);return t}function mergeArray(e,t){const g=e.length;for(let n=0;n<t.length;n+=1)e[g+n]=clone(t[n]);return e}function isMergeableObject(e){return!("object"!=typeof e||null===e||e instanceof RegExp||e instanceof Date)}function isPrimitive(e){return"object"!=typeof e||null===e}function isPrimitiveOrBuiltIn(e){return"object"!=typeof e||null===e||e instanceof RegExp||e instanceof Date}function clone(e){return isMergeableObject(e)?Array.isArray(e)?cloneArray(e):cloneObject(e):e}function mergeObject(e,t){for(const g in t)e[g]=g in e?fastDeepAssign(e[g],t[g]):clone(t[g]);return e}var ir={},sr={xs:0,sm:600,md:900,lg:1200,xl:1536},lr=createBreakpoints({values:sr}),cr={containerQueries:e=>({up:t=>{let g="number"==typeof t?t:sr[t]||t;return"number"==typeof g&&(g=`${g}px`),e?`@container ${e} (min-width:${g})`:`@container (min-width:${g})`}})};function handleBreakpoints(e,t,g){const n={};return iterateBreakpoints(n,e.theme,t,(e,t,C)=>{const o=g(t,C);e?n[e]=o:fastDeepAssign(n,o)})}function iterateBreakpoints(e,t,g,n){if(t??=ir,Array.isArray(g)){const C=t.breakpoints??lr;for(let t=0;t<g.length;t+=1)buildBreakpoint(e,C.up(C.keys[t]),g[t],void 0,n);return e}if("object"==typeof g){const C=t.breakpoints??lr,o=C.values??sr;for(const I in g)if(isCqShorthand(C.keys,I)){const C=getContainerQuery(t.containerQueries?t:cr,I);C&&buildBreakpoint(e,C,g[I],I,n)}else if(I in o)buildBreakpoint(e,C.up(I),g[I],I,n);else{const t=I;e[t]=g[t]}return e}return n(void 0,g),e}function buildBreakpoint(e,t,g,n,C){e[t]??={},C(t,g,n)}function createEmptyBreakpointObject(e=lr){const{internal_mediaKeys:t}=e,g={};for(let n=0;n<t.length;n+=1)g[t[n]]={};return g}function removeUnusedBreakpoints(e,t){const g=e.internal_mediaKeys;for(let n=0;n<g.length;n+=1){const e=g[n];isObjectEmpty$2(t[e])&&delete t[e]}return t}function mergeBreakpointsInOrder(e,...t){return removeUnusedBreakpoints(e,[createEmptyBreakpointObject(e),...t].reduce((e,t)=>deepmerge(e,t),{}))}function computeBreakpointsBase(e,t){if("object"!=typeof e)return{};const g={},n=Object.keys(t);return Array.isArray(e)?n.forEach((t,n)=>{n<e.length&&(g[t]=!0)}):n.forEach(t=>{null!=e[t]&&(g[t]=!0)}),g}function resolveBreakpointValues({values:e,breakpoints:t,base:g}){const n=g||computeBreakpointsBase(e,t),C=Object.keys(n);if(0===C.length)return e;let o;return C.reduce((t,g,n)=>(Array.isArray(e)?(t[g]=null!=e[n]?e[n]:e[o],o=n):"object"==typeof e?(t[g]=null!=e[g]?e[g]:e[o],o=g):t[g]=e,t),{})}function hasBreakpoint(e,t){if(Array.isArray(t))return!0;if("object"==typeof t&&null!==t){for(let n=0;n<e.keys.length;n+=1)if(e.keys[n]in t)return!0;const g=Object.keys(t);for(let t=0;t<g.length;t+=1)if(isCqShorthand(e.keys,g[t]))return!0}return!1}function capitalize(e){if("string"!=typeof e)throw new Error(formatMuiErrorMessage(7));return e.charAt(0).toUpperCase()+e.slice(1)}function getStyleValue2(e,t,g,n){let C;return C="function"==typeof e?e(g):Array.isArray(e)?e[g]||g:"string"==typeof g&&getPath(e,g,!0,n)||g,t&&(C=t(C,g,e)),C}function getPath(e,t,g=!0,n=void 0){if(!e||!t)return null;const C=t.split(".");if(e.vars&&g){const t=getPathImpl(e.vars,C,n);if(null!=t)return t}return getPathImpl(e,C,n)}function getPathImpl(e,t,g=void 0){let n,C=e,o=0;for(;o<t.length;){if(null==C)return C;n=C,C=C[t[o]],o+=1}if(g&&void 0===C){const e=t[t.length-1],C=`${g}${"default"===e?"":capitalize(e)}`;return n?.[C]}return C}function style$2(e){const{prop:t,cssProperty:g=e.prop,themeKey:n,transform:C}=e,fn=e=>{if(null==e[t])return null;const o=e[t],I=getPath(e.theme,n)||{};return handleBreakpoints(e,o,e=>{const n=getStyleValue2(I,C,e,t);return!1===g?n:{[g]:n}})};return fn.propTypes={},fn.filterProps=[t],fn}var ur={internal_cache:{}},dr={m:"margin",p:"padding"},pr={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},mr={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},fr={};for(const gc in dr)fr[gc]=[dr[gc]];for(const gc in dr)for(const e in pr){const t=dr[gc],g=pr[e],n=Array.isArray(g)?g.map(e=>t+e):[t+g];fr[gc+e]=n}for(const gc in mr)fr[gc]=fr[mr[gc]];var hr=new Set(["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"]),yr=new Set(["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"]),br=new Set([...hr,...yr]);function createUnaryUnit(e,t,g,n){const C=getPath(e,t,!0)??g;return"number"==typeof C||"string"==typeof C?e=>"string"==typeof e?e:"string"==typeof C?C.startsWith("var(")&&0===e?0:C.startsWith("var(")&&1===e?C:`calc(${e} * ${C})`:C*e:Array.isArray(C)?e=>{if("string"==typeof e)return e;const t=C[Math.abs(e)];return e>=0?t:"number"==typeof t?-t:"string"==typeof t&&t.startsWith("var(")?`calc(-1 * ${t})`:`-${t}`}:"function"==typeof C?C:()=>{}}function createUnarySpacing(e){return createUnaryUnit(e,"spacing",8,"spacing")}function getValue(e,t){return"string"==typeof t||null==t?t:e(t)}var vr=[""];function style$1(e,t){const g=e.theme??ur,n=g?.internal_cache?.unarySpacing??createUnarySpacing(g),C={};for(const o in e){if(!t.has(o))continue;const g=fr[o]??(vr[0]=o,vr),I=e[o];iterateBreakpoints(C,e.theme,I,(e,t)=>{const o=e?C[e]:C;for(let C=0;C<g.length;C+=1)o[g[C]]=getValue(n,t)})}return C}function margin(e){return style$1(e,hr)}function padding(e){return style$1(e,yr)}function spacing(e){return style$1(e,br)}function createSpacing(e=8,t=createUnarySpacing({spacing:e})){if(e.mui)return e;const spacing=(...e)=>(0===e.length?[1]:e).map(e=>{const g=t(e);return"number"==typeof g?`${g}px`:g}).join(" ");return spacing.mui=!0,spacing}function compose(...e){const t=e.reduce((e,t)=>(t.filterProps.forEach(g=>{e[g]=t}),e),{}),fn=e=>{const g={};for(const n in e)t[n]&&fastDeepAssign(g,t[n](e));return g};return fn.propTypes={},fn.filterProps=e.reduce((e,t)=>e.concat(t.filterProps),[]),fn}function borderTransform(e){return"number"!=typeof e?e:`${e}px solid`}function createBorderStyle(e,t){return style$2({prop:e,themeKey:"borders",transform:t})}margin.propTypes={},margin.filterProps=hr,padding.propTypes={},padding.filterProps=yr,spacing.propTypes={},spacing.filterProps=br;var xr=createBorderStyle("border",borderTransform),Sr=createBorderStyle("borderTop",borderTransform),wr=createBorderStyle("borderRight",borderTransform),Er=createBorderStyle("borderBottom",borderTransform),Rr=createBorderStyle("borderLeft",borderTransform),kr=createBorderStyle("borderColor"),Mr=createBorderStyle("borderTopColor"),Tr=createBorderStyle("borderRightColor"),Pr=createBorderStyle("borderBottomColor"),Nr=createBorderStyle("borderLeftColor"),Dr=createBorderStyle("outline",borderTransform),Or=createBorderStyle("outlineColor"),borderRadius=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=createUnaryUnit(e.theme,"shape.borderRadius",4,"borderRadius"),styleFromPropValue=e=>({borderRadius:getValue(t,e)});return handleBreakpoints(e,e.borderRadius,styleFromPropValue)}return null};borderRadius.propTypes={},borderRadius.filterProps=["borderRadius"],compose(xr,Sr,wr,Er,Rr,kr,Mr,Tr,Pr,Nr,borderRadius,Dr,Or);var gap=e=>{if(void 0!==e.gap&&null!==e.gap){const t=createUnaryUnit(e.theme,"spacing",8,"gap"),styleFromPropValue=e=>({gap:getValue(t,e)});return handleBreakpoints(e,e.gap,styleFromPropValue)}return null};gap.propTypes={},gap.filterProps=["gap"];var columnGap=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=createUnaryUnit(e.theme,"spacing",8,"columnGap"),styleFromPropValue=e=>({columnGap:getValue(t,e)});return handleBreakpoints(e,e.columnGap,styleFromPropValue)}return null};columnGap.propTypes={},columnGap.filterProps=["columnGap"];var rowGap=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=createUnaryUnit(e.theme,"spacing",8,"rowGap"),styleFromPropValue=e=>({rowGap:getValue(t,e)});return handleBreakpoints(e,e.rowGap,styleFromPropValue)}return null};function paletteTransform(e,t){return"grey"===t?t:e}function sizingTransform(e){return e<=1&&0!==e?100*e+"%":e}rowGap.propTypes={},rowGap.filterProps=["rowGap"],compose(gap,columnGap,rowGap,style$2({prop:"gridColumn"}),style$2({prop:"gridRow"}),style$2({prop:"gridAutoFlow"}),style$2({prop:"gridAutoColumns"}),style$2({prop:"gridAutoRows"}),style$2({prop:"gridTemplateColumns"}),style$2({prop:"gridTemplateRows"}),style$2({prop:"gridTemplateAreas"}),style$2({prop:"gridArea"})),compose(style$2({prop:"color",themeKey:"palette",transform:paletteTransform}),style$2({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:paletteTransform}),style$2({prop:"backgroundColor",themeKey:"palette",transform:paletteTransform}));var jr=style$2({prop:"width",transform:sizingTransform}),maxWidth=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const styleFromPropValue=t=>{const g=e.theme?.breakpoints?.values?.[t]||sr[t];return g?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${g}${e.theme.breakpoints.unit}`}:{maxWidth:g}:{maxWidth:sizingTransform(t)}};return handleBreakpoints(e,e.maxWidth,styleFromPropValue)}return null};maxWidth.filterProps=["maxWidth"];var zr=style$2({prop:"minWidth",transform:sizingTransform}),Gr=style$2({prop:"height",transform:sizingTransform}),Lr=style$2({prop:"maxHeight",transform:sizingTransform}),Br=style$2({prop:"minHeight",transform:sizingTransform}),Fr=(style$2({prop:"size",cssProperty:"width",transform:sizingTransform}),style$2({prop:"size",cssProperty:"height",transform:sizingTransform}),compose(jr,maxWidth,zr,Gr,Lr,Br,style$2({prop:"boxSizing"})),{border:{themeKey:"borders",transform:borderTransform},borderTop:{themeKey:"borders",transform:borderTransform},borderRight:{themeKey:"borders",transform:borderTransform},borderBottom:{themeKey:"borders",transform:borderTransform},borderLeft:{themeKey:"borders",transform:borderTransform},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:borderTransform},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:borderRadius},color:{themeKey:"palette",transform:paletteTransform},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:paletteTransform},backgroundColor:{themeKey:"palette",transform:paletteTransform},p:{style:padding},pt:{style:padding},pr:{style:padding},pb:{style:padding},pl:{style:padding},px:{style:padding},py:{style:padding},padding:{style:padding},paddingTop:{style:padding},paddingRight:{style:padding},paddingBottom:{style:padding},paddingLeft:{style:padding},paddingX:{style:padding},paddingY:{style:padding},paddingInline:{style:padding},paddingInlineStart:{style:padding},paddingInlineEnd:{style:padding},paddingBlock:{style:padding},paddingBlockStart:{style:padding},paddingBlockEnd:{style:padding},m:{style:margin},mt:{style:margin},mr:{style:margin},mb:{style:margin},ml:{style:margin},mx:{style:margin},my:{style:margin},margin:{style:margin},marginTop:{style:margin},marginRight:{style:margin},marginBottom:{style:margin},marginLeft:{style:margin},marginX:{style:margin},marginY:{style:margin},marginInline:{style:margin},marginInlineStart:{style:margin},marginInlineEnd:{style:margin},marginBlock:{style:margin},marginBlockStart:{style:margin},marginBlockEnd:{style:margin},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:gap},rowGap:{style:rowGap},columnGap:{style:columnGap},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:sizingTransform},maxWidth:{style:maxWidth},minWidth:{transform:sizingTransform},height:{transform:sizingTransform},maxHeight:{transform:sizingTransform},minHeight:{transform:sizingTransform},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}}),Wr={};function unstable_createStyleFunctionSx(){function styleFunctionSx(e){if(!e.sx)return null;const{sx:t,theme:g=Wr,nested:n}=e,C=g.unstable_sxConfig??Fr,o={sx:null,theme:g,nested:!0};function process(t){let I=t;if("function"==typeof t)I=t(g);else if("object"!=typeof t)return t;if(!I)return null;const a=g.breakpoints??lr,i=createEmptyBreakpointObject(a);for(const n in I){const t=callIfFn(I[n],g);null!=t&&("object"==typeof t?C[n]?setThemeValue(i,n,t,g,C):hasBreakpoint(a,t)?iterateBreakpoints(i,e.theme,t,(e,t)=>{i[e][n]=t}):(o.sx=t,i[n]=styleFunctionSx(o)):setThemeValue(i,n,t,g,C))}return!n&&g.modularCssLayers?{"@layer sx":sortContainerQueries(g,removeUnusedBreakpoints(a,i))}:sortContainerQueries(g,removeUnusedBreakpoints(a,i))}return Array.isArray(t)?t.map(process):process(t)}return styleFunctionSx.filterProps=["sx"],styleFunctionSx}var Vr=unstable_createStyleFunctionSx();function setThemeValue(e,t,g,n,C){const o=C[t];if(!o)return void(e[t]=g);if(null==g)return;const{themeKey:I}=o;if("typography"===I&&"inherit"===g)return void(e[t]=g);const{style:a}=o;if(a)return void fastDeepAssign(e,a({[t]:g,theme:n}));const{cssProperty:i=t,transform:s}=o,l=getPath(n,I);iterateBreakpoints(e,n,g,(g,n)=>{const C=getStyleValue2(l,s,n,t);!1===i?fastDeepAssign(g?e[g]:e,C):g?e[g][i]=C:e[i]=C})}function callIfFn(e,t){return"function"==typeof e?e(t):e}function applyStyles$1(e,t){const g=this;if(g.vars){if(!g.colorSchemes?.[e]||"function"!=typeof g.getColorSchemeSelector)return{};let n=g.getColorSchemeSelector(e);return"&"===n?t:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:t})}return g.palette.mode===e?t:{}}function createTheme$1(e={},...t){const{breakpoints:g={},palette:n={},spacing:C,shape:o={},...I}=e;let a=deepmerge({breakpoints:createBreakpoints(g),direction:"ltr",components:{},palette:{mode:"light",...n},spacing:createSpacing(C),shape:{...ar,...o}},I);return a=cssContainerQueries(a),a.applyStyles=applyStyles$1,a=t.reduce((e,t)=>deepmerge(e,t),a),a.unstable_sxConfig={...Fr,...I?.unstable_sxConfig},a.unstable_sx=function(e){return Vr({sx:e,theme:this})},a.internal_cache={},a}function isObjectEmpty$1(e){return 0===Object.keys(e).length}function useTheme$4(e=null){const t=l.useContext(Bg);return!t||isObjectEmpty$1(t)?e:t}var Ur=createTheme$1();function useTheme$3(e=Ur){return useTheme$4(e)}function wrapGlobalLayer(e){const t=internal_serializeStyles(e);return e!==t&&t.styles?(t.styles.match(/^@layer\s+[^{]*$/)||(t.styles=`@layer global{${t.styles}}`),t):e}function GlobalStyles$1({styles:e,themeId:t,defaultTheme:g={}}){const n=useTheme$3(g),C=t&&n[t]||n;let o="function"==typeof e?e(C):e;return C.modularCssLayers&&(o=Array.isArray(o)?o.map(e=>wrapGlobalLayer("function"==typeof e?e(C):e)):wrapGlobalLayer(o)),(0,gr.jsx)(GlobalStyles$2,{styles:o})}var defaultGenerator=e=>e,Kr=(()=>{let e=defaultGenerator;return{configure(t){e=t},generate:t=>e(t),reset(){e=defaultGenerator}}})();function r(e){var t,g,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var C=e.length;for(t=0;t<C;t++)e[t]&&(g=r(e[t]))&&(n&&(n+=" "),n+=g)}else for(g in e)e[g]&&(n&&(n+=" "),n+=g);return n}function clsx(){for(var e,t,g=0,n="",C=arguments.length;g<C;g++)(e=arguments[g])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}function createBox(e={}){const{themeId:t,defaultTheme:g,defaultClassName:n="MuiBox-root",generateClassName:C}=e,o=styled$2("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(Vr);return l.forwardRef(function(e,I){const a=useTheme$3(g),{className:i,component:s="div",...l}=e;return(0,gr.jsx)(o,{as:s,ref:I,className:clsx(i,C?C(n):n),theme:t&&a[t]||a,...l})})}var Hr={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function generateUtilityClass(e,t,g="Mui"){const n=Hr[t];return n?`${g}-${n}`:`${Kr.generate(e)}-${t}`}function generateUtilityClasses(e,t,g="Mui"){const n={};return t.forEach(t=>{n[t]=generateUtilityClass(e,t,g)}),n}function preprocessStyles(e){const{variants:t,...g}=e,n={variants:t,style:internal_serializeStyles(g),isProcessed:!0};return n.style===g||t&&t.forEach(e=>{"function"!=typeof e.style&&(e.style=internal_serializeStyles(e.style))}),n}var Yr=createTheme$1();function shouldForwardProp(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function shallowLayer(e,t){return t&&e&&"object"==typeof e&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function defaultOverridesResolver(e){return e?(t,g)=>g[e]:null}function attachTheme(e,t,g){e.theme=isObjectEmpty$2(e.theme)?g:e.theme[t]||e.theme}function processStyle(e,t,g){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap(t=>processStyle(e,t,g));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=g?shallowLayer(n.style,g):n.style;else{const{variants:e,...C}=n;t=g?shallowLayer(internal_serializeStyles(C),g):C}return processStyleVariants(e,n.variants,[t],g)}return n?.isProcessed?g?shallowLayer(internal_serializeStyles(n.style),g):n.style:g?shallowLayer(internal_serializeStyles(n),g):n}function processStyleVariants(e,t,g=[],n=void 0){let C;e:for(let o=0;o<t.length;o+=1){const I=t[o];if("function"==typeof I.props){if(C??={...e,...e.ownerState,ownerState:e.ownerState},!I.props(C))continue}else for(const t in I.props)if(e[t]!==I.props[t]&&e.ownerState?.[t]!==I.props[t])continue e;"function"==typeof I.style?(C??={...e,...e.ownerState,ownerState:e.ownerState},g.push(n?shallowLayer(internal_serializeStyles(I.style(C)),n):I.style(C))):g.push(n?shallowLayer(internal_serializeStyles(I.style),n):I.style)}return g}function createStyled(e={}){const{themeId:t,defaultTheme:g=Yr,rootShouldForwardProp:n=shouldForwardProp,slotShouldForwardProp:C=shouldForwardProp}=e;function styleAttachTheme(e){attachTheme(e,t,g)}const styled=(e,t={})=>{internal_mutateStyles(e,e=>e.filter(e=>e!==Vr));const{name:g,slot:o,skipVariantsResolver:I,skipSx:a,overridesResolver:i=defaultOverridesResolver(lowercaseFirstLetter(o)),...s}=t,l=g&&g.startsWith("Mui")||o?"components":"custom",c=void 0!==I?I:o&&"Root"!==o&&"root"!==o||!1,u=a||!1;let d=shouldForwardProp;"Root"===o||"root"===o?d=n:o?d=C:isStringTag(e)&&(d=void 0);const p=styled$2(e,{shouldForwardProp:d,label:generateStyledLabel(g,o),...s}),transformStyle=e=>{if(e.__emotion_real===e)return e;if("function"==typeof e)return function(t){return processStyle(t,e,t.theme.modularCssLayers?l:void 0)};if(isPlainObject(e)){const t=preprocessStyles(e);return function(e){return t.variants?processStyle(e,t,e.theme.modularCssLayers?l:void 0):e.theme.modularCssLayers?shallowLayer(t.style,l):t.style}}return e},muiStyledResolver=(...t)=>{const n=[],C=t.map(transformStyle),o=[];if(n.push(styleAttachTheme),g&&i&&o.push(function(e){const t=e.theme.components?.[g]?.styleOverrides;if(!t)return null;const n={};for(const g in t)n[g]=processStyle(e,t[g],e.theme.modularCssLayers?"theme":void 0);return i(e,n)}),g&&!c&&o.push(function(e){const t=e.theme?.components?.[g]?.variants;return t?processStyleVariants(e,t,[],e.theme.modularCssLayers?"theme":void 0):null}),u||o.push(Vr),Array.isArray(C[0])){const e=C.shift(),t=new Array(n.length).fill(""),g=new Array(o.length).fill("");let I;I=[...t,...e,...g],I.raw=[...t,...e.raw,...g],n.unshift(I)}const I=p(...n,...C,...o);return e.muiName&&(I.muiName=e.muiName),I};return p.withConfig&&(muiStyledResolver.withConfig=p.withConfig),muiStyledResolver};return styled}function generateStyledLabel(e,t){}function isStringTag(e){return"string"==typeof e&&e.charCodeAt(0)>96}function lowercaseFirstLetter(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}var Zr=createStyled();function resolveProps(e,t,g=!1){const n={...t};for(const C in e)if(Object.prototype.hasOwnProperty.call(e,C)){const o=C;if("components"===o||"slots"===o)n[o]={...e[o],...n[o]};else if("componentsProps"===o||"slotProps"===o){const C=e[o],I=t[o];if(I)if(C){n[o]={...I};for(const e in C)if(Object.prototype.hasOwnProperty.call(C,e)){const t=e;n[o][t]=resolveProps(C[t],I[t],g)}}else n[o]=I;else n[o]=C||{}}else"className"===o&&g&&void 0!==t.className?n.className=clsx(e?.className,t?.className):"style"===o&&g&&t.style?n.style={...e?.style,...t?.style}:void 0===n[o]&&(n[o]=e[o])}return n}function getThemeProps$1(e){const{theme:t,name:g,props:n}=e;return t&&t.components&&t.components[g]&&t.components[g].defaultProps?resolveProps(t.components[g].defaultProps,n):n}function useThemeProps({props:e,name:t,defaultTheme:g,themeId:n}){let C=useTheme$3(g);return n&&(C=C[n]||C),getThemeProps$1({theme:C,name:t,props:e})}var Qr="undefined"!=typeof window?l.useLayoutEffect:l.useEffect;function clamp$2(e,t=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,g))}function clampWrapper(e,t=0,g=1){return clamp$2(e,t,g)}function hexToRgb(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let g=e.match(t);return g&&1===g[0].length&&(g=g.map(e=>e+e)),g?`rgb${4===g.length?"a":""}(${g.map((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3).join(", ")})`:""}function decomposeColor(e){if(e.type)return e;if("#"===e.charAt(0))return decomposeColor(hexToRgb(e));const t=e.indexOf("("),g=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(g))throw new Error(formatMuiErrorMessage(9,e));let n,C=e.substring(t+1,e.length-1);if("color"===g){if(C=C.split(" "),n=C.shift(),4===C.length&&"/"===C[3].charAt(0)&&(C[3]=C[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(n))throw new Error(formatMuiErrorMessage(10,n))}else C=C.split(",");return C=C.map(e=>parseFloat(e)),{type:g,values:C,colorSpace:n}}var colorChannel=e=>{const t=decomposeColor(e);return t.values.slice(0,3).map((e,g)=>t.type.includes("hsl")&&0!==g?`${e}%`:e).join(" ")},private_safeColorChannel=(e,t)=>{try{return colorChannel(e)}catch(g){return e}};function recomposeColor(e){const{type:t,colorSpace:g}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((e,t)=>t<3?parseInt(e,10):e):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),n=t.includes("color")?`${g} ${n.join(" ")}`:`${n.join(", ")}`,`${t}(${n})`}function hslToRgb(e){e=decomposeColor(e);const{values:t}=e,g=t[0],n=t[1]/100,C=t[2]/100,o=n*Math.min(C,1-C),f=(e,t=(e+g/30)%12)=>C-o*Math.max(Math.min(t-3,9-t,1),-1);let I="rgb";const a=[Math.round(255*f(0)),Math.round(255*f(8)),Math.round(255*f(4))];return"hsla"===e.type&&(I+="a",a.push(t[3])),recomposeColor({type:I,values:a})}function getLuminance(e){let t="hsl"===(e=decomposeColor(e)).type||"hsla"===e.type?decomposeColor(hslToRgb(e)).values:e.values;return t=t.map(t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function getContrastRatio(e,t){const g=getLuminance(e),n=getLuminance(t);return(Math.max(g,n)+.05)/(Math.min(g,n)+.05)}function alpha(e,t){return e=decomposeColor(e),t=clampWrapper(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,recomposeColor(e)}function private_safeAlpha(e,t,g){try{return alpha(e,t)}catch(n){return e}}function darken(e,t){if(e=decomposeColor(e),t=clampWrapper(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let g=0;g<3;g+=1)e.values[g]*=1-t;return recomposeColor(e)}function private_safeDarken(e,t,g){try{return darken(e,t)}catch(n){return e}}function lighten(e,t){if(e=decomposeColor(e),t=clampWrapper(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let g=0;g<3;g+=1)e.values[g]+=(255-e.values[g])*t;else if(e.type.includes("color"))for(let g=0;g<3;g+=1)e.values[g]+=(1-e.values[g])*t;return recomposeColor(e)}function private_safeLighten(e,t,g){try{return lighten(e,t)}catch(n){return e}}function emphasize(e,t=.15){return getLuminance(e)>.5?darken(e,t):lighten(e,t)}function private_safeEmphasize(e,t,g){try{return emphasize(e,t)}catch(n){return e}}var Xr=l.createContext(null);function useTheme$2(){return l.useContext(Xr)}var _r="function"==typeof Symbol&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function mergeOuterLocalTheme(e,t){return"function"==typeof t?t(e):{...e,...t}}function ThemeProvider$2(e){const{children:t,theme:g}=e,n=useTheme$2(),C=l.useMemo(()=>{const e=null===n?{...g}:mergeOuterLocalTheme(n,g);return null!=e&&(e[_r]=null!==n),e},[g,n]);return(0,gr.jsx)(Xr.Provider,{value:C,children:t})}var qr=l.createContext();function RtlProvider({value:e,...t}){return(0,gr.jsx)(qr.Provider,{value:e??!0,...t})}var useRtl=()=>l.useContext(qr)??!1,Jr=l.createContext(void 0);function DefaultPropsProvider({value:e,children:t}){return(0,gr.jsx)(Jr.Provider,{value:e,children:t})}function getThemeProps(e){const{theme:t,name:g,props:n}=e;if(!t||!t.components||!t.components[g])return n;const C=t.components[g];return C.defaultProps?resolveProps(C.defaultProps,n,t.components.mergeClassNameAndStyle):C.styleOverrides||C.variants?n:resolveProps(C,n,t.components.mergeClassNameAndStyle)}function useDefaultProps$1({props:e,name:t}){return getThemeProps({props:e,name:t,theme:{components:l.useContext(Jr)}})}var $r=0;function useGlobalId(e){const[t,g]=l.useState(e),n=e||t;return l.useEffect(()=>{null==t&&g(`mui-${$r+=1}`)},[t]),n}var en={...l}.useId;function useId$1(e){if(void 0!==en){const t=en();return e??t}return useGlobalId(e)}function useLayerOrder(e){const t=useTheme$4(),g=useId$1()||"",{modularCssLayers:n}=e;let C="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return C=n&&null===t?"string"==typeof n?n.replace(/mui(?!\.)/g,C):`@layer ${C};`:"",Qr(()=>{const e=document.querySelector("head");if(!e)return;const t=e.firstChild;if(C){if(t&&t.hasAttribute?.("data-mui-layer-order")&&t.getAttribute("data-mui-layer-order")===g)return;const n=document.createElement("style");n.setAttribute("data-mui-layer-order",g),n.textContent=C,e.prepend(n)}else e.querySelector(`style[data-mui-layer-order="${g}"]`)?.remove()},[C,g]),C?(0,gr.jsx)(GlobalStyles$1,{styles:C}):null}var tn={};function useThemeScoping(e,t,g,n=!1){return l.useMemo(()=>{const C=e&&t[e]||t;if("function"==typeof g){const o=g(C),I=e?{...t,[e]:o}:o;return n?()=>I:I}return e?{...t,[e]:g}:{...t,...g}},[e,t,g,n])}function ThemeProvider$1(e){const{children:t,theme:g,themeId:n}=e,C=useTheme$4(tn),o=useTheme$2()||tn,I=useThemeScoping(n,C,g),a=useThemeScoping(n,o,g,!0),i="rtl"===(n?I[n]:I).direction,s=useLayerOrder(I);return(0,gr.jsx)(ThemeProvider$2,{theme:a,children:(0,gr.jsx)(Bg.Provider,{value:I,children:(0,gr.jsx)(RtlProvider,{value:i,children:(0,gr.jsxs)(DefaultPropsProvider,{value:n?I[n].components:I.components,children:[s,t]})})})})}var gn={theme:void 0};function unstable_memoTheme(e){let t,g;return function(n){let C=t;return void 0!==C&&n.theme===g||(gn.theme=n.theme,C=preprocessStyles(e(gn)),t=C,g=n.theme),C}}var rn="mode",nn="color-scheme",An="data-color-scheme";function InitColorSchemeScript(e){const{defaultMode:t="system",defaultLightColorScheme:g="light",defaultDarkColorScheme:n="dark",modeStorageKey:C=rn,colorSchemeStorageKey:o=nn,attribute:I=An,colorSchemeNode:a="document.documentElement",nonce:i}=e||{};let s="",l=I;if("class"===I&&(l=".%s"),"data"===I&&(l="[data-%s]"),l.startsWith(".")){const e=l.substring(1);s+=`${a}.classList.remove('${e}'.replace('%s', light), '${e}'.replace('%s', dark));\n ${a}.classList.add('${e}'.replace('%s', colorScheme));`}const c=l.match(/\[([^[\]]+)\]/);if(c){const[e,t]=c[1].split("=");t||(s+=`${a}.removeAttribute('${e}'.replace('%s', light));\n ${a}.removeAttribute('${e}'.replace('%s', dark));`),s+=`\n ${a}.setAttribute('${e}'.replace('%s', colorScheme), ${t?`${t}.replace('%s', colorScheme)`:'""'});`}else".%s"!==l&&(s+=`${a}.setAttribute('${l}', colorScheme);`);return(0,gr.jsx)("script",{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?i:"",dangerouslySetInnerHTML:{__html:`(function() {\ntry {\n let colorScheme = '';\n const mode = localStorage.getItem('${C}') || '${t}';\n const dark = localStorage.getItem('${o}-dark') || '${n}';\n const light = localStorage.getItem('${o}-light') || '${g}';\n if (mode === 'system') {\n // handle system mode\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = dark\n } else {\n colorScheme = light\n }\n }\n if (mode === 'light') {\n colorScheme = light;\n }\n if (mode === 'dark') {\n colorScheme = dark;\n }\n if (colorScheme) {\n ${s}\n }\n} catch(e){}})();`}},"mui-color-scheme-init")}function noop$7(){}var localStorageManager=({key:e,storageWindow:t})=>(t||"undefined"==typeof window||(t=window),{get(g){if("undefined"==typeof window)return;if(!t)return g;let n;try{n=t.localStorage.getItem(e)}catch{}return n||g},set:g=>{if(t)try{t.localStorage.setItem(e,g)}catch{}},subscribe:g=>{if(!t)return noop$7;const listener=t=>{const n=t.newValue;t.key===e&&g(n)};return t.addEventListener("storage",listener),()=>{t.removeEventListener("storage",listener)}}});function noop$6(){}function getSystemMode(e){if("undefined"!=typeof window&&"function"==typeof window.matchMedia&&"system"===e)return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function processState(e,t){return"light"===e.mode||"system"===e.mode&&"light"===e.systemMode?t("light"):"dark"===e.mode||"system"===e.mode&&"dark"===e.systemMode?t("dark"):void 0}function getColorScheme(e){return processState(e,t=>"light"===t?e.lightColorScheme:"dark"===t?e.darkColorScheme:void 0)}function useCurrentColorScheme(e){const{defaultMode:t="light",defaultLightColorScheme:g,defaultDarkColorScheme:n,supportedColorSchemes:C=[],modeStorageKey:o=rn,colorSchemeStorageKey:I=nn,storageWindow:a=("undefined"==typeof window?void 0:window),storageManager:i=localStorageManager,noSsr:s=!1}=e,c=C.join(","),u=C.length>1,d=l.useMemo(()=>i?.({key:o,storageWindow:a}),[i,o,a]),p=l.useMemo(()=>i?.({key:`${I}-light`,storageWindow:a}),[i,I,a]),m=l.useMemo(()=>i?.({key:`${I}-dark`,storageWindow:a}),[i,I,a]),[h,y]=l.useState(()=>{const e=d?.get(t)||t,C=p?.get(g)||g,o=m?.get(n)||n;return{mode:e,systemMode:getSystemMode(e),lightColorScheme:C,darkColorScheme:o}}),[b,v]=l.useState(s||!u);l.useEffect(()=>{v(!0)},[]);const x=getColorScheme(h),S=l.useCallback(e=>{y(g=>{if(e===g.mode)return g;const n=e??t;return d?.set(n),{...g,mode:n,systemMode:getSystemMode(n)}})},[d,t]),w=l.useCallback(e=>{e?"string"==typeof e?e&&!c.includes(e)?console.error(`\`${e}\` does not exist in \`theme.colorSchemes\`.`):y(t=>{const g={...t};return processState(t,t=>{"light"===t&&(p?.set(e),g.lightColorScheme=e),"dark"===t&&(m?.set(e),g.darkColorScheme=e)}),g}):y(t=>{const C={...t},o=null===e.light?g:e.light,I=null===e.dark?n:e.dark;return o&&(c.includes(o)?(C.lightColorScheme=o,p?.set(o)):console.error(`\`${o}\` does not exist in \`theme.colorSchemes\`.`)),I&&(c.includes(I)?(C.darkColorScheme=I,m?.set(I)):console.error(`\`${I}\` does not exist in \`theme.colorSchemes\`.`)),C}):y(e=>(p?.set(g),m?.set(n),{...e,lightColorScheme:g,darkColorScheme:n}))},[c,p,m,g,n]),E=l.useCallback(e=>{"system"===h.mode&&y(t=>{const g=e?.matches?"dark":"light";return t.systemMode===g?t:{...t,systemMode:g}})},[h.mode]),R=l.useRef(E);return R.current=E,l.useEffect(()=>{if("function"!=typeof window.matchMedia||!u)return;const handler=(...e)=>R.current(...e),e=window.matchMedia("(prefers-color-scheme: dark)");return e.addListener(handler),handler(e),()=>{e.removeListener(handler)}},[u]),l.useEffect(()=>{if(u){const e=d?.subscribe(e=>{e&&!["light","dark","system"].includes(e)||S(e||t)})||noop$6,g=p?.subscribe(e=>{e&&!c.match(e)||w({light:e})})||noop$6,n=m?.subscribe(e=>{e&&!c.match(e)||w({dark:e})})||noop$6;return()=>{e(),g(),n()}}},[w,S,c,t,a,u,d,p,m]),{...h,mode:b?h.mode:void 0,systemMode:b?h.systemMode:void 0,colorScheme:b?x:void 0,setMode:S,setColorScheme:w}}var Cn="*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function createCssVarsProvider(e){const{themeId:t,theme:g={},modeStorageKey:n=rn,colorSchemeStorageKey:C=nn,disableTransitionOnChange:o=!1,defaultColorScheme:I,resolveTheme:a}=e,i={allColorSchemes:[],colorScheme:void 0,darkColorScheme:void 0,lightColorScheme:void 0,mode:void 0,setColorScheme:()=>{},setMode:()=>{},systemMode:void 0},s=l.createContext(void 0),useColorScheme=()=>l.useContext(s)||i,c={},u={};function CssVarsProvider(e){const{children:i,theme:d,modeStorageKey:p=n,colorSchemeStorageKey:m=C,disableTransitionOnChange:h=o,storageManager:y,storageWindow:b=("undefined"==typeof window?void 0:window),documentNode:v=("undefined"==typeof document?void 0:document),colorSchemeNode:x=("undefined"==typeof document?void 0:document.documentElement),disableNestedContext:S=!1,disableStyleSheetGeneration:w=!1,defaultMode:E="system",forceThemeRerender:R=!1,noSsr:M}=e,T=l.useRef(!1),P=useTheme$2(),N=l.useContext(s),D=!!N&&!S,O=l.useMemo(()=>d||("function"==typeof g?g():g),[d]),j=O[t],G=j||O,{colorSchemes:L=c,components:B=u,cssVarPrefix:F}=G,W=Object.keys(L).filter(e=>!!L[e]).join(","),V=l.useMemo(()=>W.split(","),[W]),U="string"==typeof I?I:I.light,K="string"==typeof I?I:I.dark,{mode:H,setMode:Y,systemMode:Z,lightColorScheme:Q,darkColorScheme:X,colorScheme:_,setColorScheme:q}=useCurrentColorScheme({supportedColorSchemes:V,defaultLightColorScheme:U,defaultDarkColorScheme:K,modeStorageKey:p,colorSchemeStorageKey:m,defaultMode:L[U]&&L[K]?E:L[G.defaultColorScheme]?.palette?.mode||G.palette?.mode,storageManager:y,storageWindow:b,noSsr:M});let J=H,$=_;D&&(J=N.mode,$=N.colorScheme);let ee=$||G.defaultColorScheme;G.vars&&!R&&(ee=G.defaultColorScheme);const te=l.useMemo(()=>{const e=G.generateThemeVars?.()||G.vars,t={...G,components:B,colorSchemes:L,cssVarPrefix:F,vars:e};if("function"==typeof t.generateSpacing&&(t.spacing=t.generateSpacing()),ee){const e=L[ee];e&&"object"==typeof e&&Object.keys(e).forEach(g=>{e[g]&&"object"==typeof e[g]?t[g]={...t[g],...e[g]}:t[g]=e[g]})}return a?a(t):t},[G,ee,B,L,F]),ge=G.colorSchemeSelector;Qr(()=>{if($&&x&&ge&&"media"!==ge){const e=ge;let t=ge;if("class"===e&&(t=".%s"),"data"===e&&(t="[data-%s]"),e?.startsWith("data-")&&!e.includes("%s")&&(t=`[${e}="%s"]`),t.startsWith("."))x.classList.remove(...V.map(e=>t.substring(1).replace("%s",e))),x.classList.add(t.substring(1).replace("%s",$));else{const e=t.replace("%s",$).match(/\[([^\]]+)\]/);if(e){const[t,g]=e[1].split("=");g||V.forEach(e=>{x.removeAttribute(t.replace($,e))}),x.setAttribute(t,g?g.replace(/"|'/g,""):"")}else x.setAttribute(t,$)}}},[$,ge,x,V]),l.useEffect(()=>{let e;if(h&&T.current&&v){const t=v.createElement("style");t.appendChild(v.createTextNode(Cn)),v.head.appendChild(t),window.getComputedStyle(v.body),e=setTimeout(()=>{v.head.removeChild(t)},1)}return()=>{clearTimeout(e)}},[$,h,v]),l.useEffect(()=>(T.current=!0,()=>{T.current=!1}),[]);const re=l.useMemo(()=>({allColorSchemes:V,colorScheme:$,darkColorScheme:X,lightColorScheme:Q,mode:J,setColorScheme:q,setMode:Y,systemMode:Z}),[V,$,X,Q,J,q,Y,Z,te.colorSchemeSelector]);let ne=!0;(w||!1===G.cssVariables||D&&P?.cssVarPrefix===F)&&(ne=!1);const Ae=(0,gr.jsxs)(l.Fragment,{children:[(0,gr.jsx)(ThemeProvider$1,{themeId:j?t:void 0,theme:te,children:i}),ne&&(0,gr.jsx)(GlobalStyles$2,{styles:te.generateStyleSheets?.()||[]})]});return D?Ae:(0,gr.jsx)(s.Provider,{value:re,children:Ae})}const d="string"==typeof I?I:I.light,p="string"==typeof I?I:I.dark;return{CssVarsProvider,useColorScheme,getInitColorSchemeScript:e=>InitColorSchemeScript({colorSchemeStorageKey:C,defaultLightColorScheme:d,defaultDarkColorScheme:p,modeStorageKey:n,...e})}}function createGetCssVar$1(e=""){function appendVar(...t){if(!t.length)return"";const g=t[0];return"string"!=typeof g||g.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${g}`:`, var(--${e?`${e}-`:""}${g}${appendVar(...t.slice(1))})`}return(t,...g)=>`var(--${e?`${e}-`:""}${t}${appendVar(...g)})`}var assignNestedKeys=(e,t,g,n=[])=>{let C=e;t.forEach((e,o)=>{o===t.length-1?Array.isArray(C)?C[Number(e)]=g:C&&"object"==typeof C&&(C[e]=g):C&&"object"==typeof C&&(C[e]||(C[e]=n.includes(e)?[]:{}),C=C[e])})},walkObjectDeep=(e,t,g)=>{function recurse(e,n=[],C=[]){Object.entries(e).forEach(([e,o])=>{(!g||g&&!g([...n,e]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?recurse(o,[...n,e],Array.isArray(o)?[...C,e]:C):t([...n,e],o,C))})}recurse(e)},getCssValue=(e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some(t=>e.includes(t))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function cssVarsParser(e,t){const{prefix:g,shouldSkipGeneratingVar:n}=t||{},C={},o={},I={};return walkObjectDeep(e,(e,t,a)=>{if(!("string"!=typeof t&&"number"!=typeof t||n&&n(e,t))){const n=`--${g?`${g}-`:""}${e.join("-")}`,i=getCssValue(e,t);Object.assign(C,{[n]:i}),assignNestedKeys(o,e,`var(${n})`,a),assignNestedKeys(I,e,`var(${n}, ${i})`,a)}},e=>"vars"===e[0]),{css:C,vars:o,varsWithDefaults:I}}function prepareCssVars(e,t={}){const{getSelector:g=defaultGetSelector,disableCssColorScheme:n,colorSchemeSelector:C,enableContrastVars:o}=t,{colorSchemes:I={},components:a,defaultColorScheme:i="light",...s}=e,{vars:l,css:c,varsWithDefaults:u}=cssVarsParser(s,t);let d=u;const p={},{[i]:m,...h}=I;if(Object.entries(h||{}).forEach(([e,g])=>{const{vars:n,css:C,varsWithDefaults:o}=cssVarsParser(g,t);d=deepmerge(d,o),p[e]={css:C,vars:n}}),m){const{css:e,vars:g,varsWithDefaults:n}=cssVarsParser(m,t);d=deepmerge(d,n),p[i]={css:e,vars:g}}function defaultGetSelector(t,g){let n=C;if("class"===C&&(n=".%s"),"data"===C&&(n="[data-%s]"),C?.startsWith("data-")&&!C.includes("%s")&&(n=`[${C}="%s"]`),t){if("media"===n)return e.defaultColorScheme===t?":root":{[`@media (prefers-color-scheme: ${I[t]?.palette?.mode||t})`]:{":root":g}};if(n)return e.defaultColorScheme===t?`:root, ${n.replace("%s",String(t))}`:n.replace("%s",String(t))}return":root"}const generateStyleSheets=()=>{const t=[],C=e.defaultColorScheme||"light";function insertStyleSheet(e,g){Object.keys(g).length&&t.push("string"==typeof e?{[e]:{...g}}:e)}insertStyleSheet(g(void 0,{...c}),c);const{[C]:a,...i}=p;if(a){const{css:e}=a,t=I[C]?.palette?.mode,o=!n&&t?{colorScheme:t,...e}:{...e};insertStyleSheet(g(C,{...o}),o)}return Object.entries(i).forEach(([e,{css:t}])=>{const C=I[e]?.palette?.mode,o=!n&&C?{colorScheme:C,...t}:{...t};insertStyleSheet(g(e,{...o}),o)}),o&&t.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),t};return{vars:d,generateThemeVars:()=>{let e={...l};return Object.entries(p).forEach(([,{vars:t}])=>{e=deepmerge(e,t)}),e},generateStyleSheets}}function createGetColorSchemeSelector(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}function composeClasses(e,t,g=void 0){const n={};for(const C in e){const o=e[C];let I="",a=!0;for(let e=0;e<o.length;e+=1){const n=o[e];n&&(I+=(!0===a?"":" ")+t(n),a=!1,g&&g[n]&&(I+=" "+g[n]))}n[C]=I}return n}function isMuiElement(e,t){return l.isValidElement(e)&&-1!==t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)}var In=createTheme$1(),an=Zr("div",{name:"MuiStack",slot:"Root"});function useThemePropsDefault(e){return useThemeProps({props:e,name:"MuiStack",defaultTheme:In})}function joinChildren(e,t){const g=l.Children.toArray(e).filter(Boolean);return g.reduce((e,n,C)=>(e.push(n),C<g.length-1&&e.push(l.cloneElement(t,{key:`separator-${C}`})),e),[])}var getSideFromDirection=e=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[e]),style=({ownerState:e,theme:t})=>{let g={display:"flex",flexDirection:"column",...handleBreakpoints({theme:t},resolveBreakpointValues({values:e.direction,breakpoints:t.breakpoints.values}),e=>({flexDirection:e}))};if(e.spacing){const n=createUnarySpacing(t),C=Object.keys(t.breakpoints.values).reduce((t,g)=>(("object"==typeof e.spacing&&null!=e.spacing[g]||"object"==typeof e.direction&&null!=e.direction[g])&&(t[g]=!0),t),{}),o=resolveBreakpointValues({values:e.direction,base:C}),I=resolveBreakpointValues({values:e.spacing,base:C});"object"==typeof o&&Object.keys(o).forEach((e,t,g)=>{o[e]||(o[e]=t>0?o[g[t-1]]:"column")}),g=deepmerge(g,handleBreakpoints({theme:t},I,(t,g)=>e.useFlexGap?{gap:getValue(n,t)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${getSideFromDirection(g?o[g]:e.direction)}`]:getValue(n,t)}}))}return g=mergeBreakpointsInOrder(t.breakpoints,g),g};function createStack(e={}){const{createStyledComponent:t=an,useThemeProps:g=useThemePropsDefault,componentName:n="MuiStack"}=e,useUtilityClasses=()=>composeClasses({root:["root"]},e=>generateUtilityClass(n,e),{}),C=t(style);return l.forwardRef(function(e,t){const{component:n="div",direction:o="column",spacing:I=0,divider:a,children:i,className:s,useFlexGap:l=!1,...c}=g(e);return(0,gr.jsx)(C,{as:n,ownerState:{direction:o,spacing:I,useFlexGap:l},ref:t,className:clsx(useUtilityClasses().root,s),...c,children:a?joinChildren(i,a):i})})}var sn="$$material",ln={black:"#000",white:"#fff"},cn={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},un={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},dn={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},pn={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},mn={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},hn={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},yn={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function getLight(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:ln.white,default:ln.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}var bn=getLight();function getDark(){return{text:{primary:ln.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:ln.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}var vn=getDark();function addLightOrDark(e,t,g,n){const C=n.light||n,o=n.dark||1.5*n;e[t]||(e.hasOwnProperty(g)?e[t]=e[g]:"light"===t?e.light=lighten(e.main,C):"dark"===t&&(e.dark=darken(e.main,o)))}function mixLightOrDark(e,t,g,n,C){const o=C.light||C,I=C.dark||1.5*C;t[g]||(t.hasOwnProperty(n)?t[g]=t[n]:"light"===g?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(100*o).toFixed(0)}%)`:"dark"===g&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(100*I).toFixed(0)}%)`))}function getDefaultPrimary(e="light"){return"dark"===e?{main:mn[200],light:mn[50],dark:mn[400]}:{main:mn[700],light:mn[400],dark:mn[800]}}function getDefaultSecondary(e="light"){return"dark"===e?{main:un[200],light:un[50],dark:un[400]}:{main:un[500],light:un[300],dark:un[700]}}function getDefaultError(e="light"){return"dark"===e?{main:dn[500],light:dn[300],dark:dn[700]}:{main:dn[700],light:dn[400],dark:dn[800]}}function getDefaultInfo(e="light"){return"dark"===e?{main:hn[400],light:hn[300],dark:hn[700]}:{main:hn[700],light:hn[500],dark:hn[900]}}function getDefaultSuccess(e="light"){return"dark"===e?{main:yn[400],light:yn[300],dark:yn[700]}:{main:yn[800],light:yn[500],dark:yn[900]}}function getDefaultWarning(e="light"){return"dark"===e?{main:pn[400],light:pn[300],dark:pn[700]}:{main:"#ed6c02",light:pn[500],dark:pn[900]}}function contrastColor(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function createPalette(e){const{mode:t="light",contrastThreshold:g=3,tonalOffset:n=.2,colorSpace:C,...o}=e,I=e.primary||getDefaultPrimary(t),a=e.secondary||getDefaultSecondary(t),i=e.error||getDefaultError(t),s=e.info||getDefaultInfo(t),l=e.success||getDefaultSuccess(t),c=e.warning||getDefaultWarning(t);function getContrastText(e){return C?contrastColor(e):getContrastRatio(e,vn.text.primary)>=g?vn.text.primary:bn.text.primary}const augmentColor=({color:e,name:t,mainShade:g=500,lightShade:o=300,darkShade:I=700})=>{if(!(e={...e}).main&&e[g]&&(e.main=e[g]),!e.hasOwnProperty("main"))throw new Error(formatMuiErrorMessage(11,t?` (${t})`:"",g));if("string"!=typeof e.main)throw new Error(formatMuiErrorMessage(12,t?` (${t})`:"",JSON.stringify(e.main)));return C?(mixLightOrDark(C,e,"light",o,n),mixLightOrDark(C,e,"dark",I,n)):(addLightOrDark(e,"light",o,n),addLightOrDark(e,"dark",I,n)),e.contrastText||(e.contrastText=getContrastText(e.main)),e};let u;return"light"===t?u=getLight():"dark"===t&&(u=getDark()),deepmerge({common:{...ln},mode:t,primary:augmentColor({color:I,name:"primary"}),secondary:augmentColor({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:augmentColor({color:i,name:"error"}),warning:augmentColor({color:c,name:"warning"}),info:augmentColor({color:s,name:"info"}),success:augmentColor({color:l,name:"success"}),grey:cn,contrastThreshold:g,getContrastText,augmentColor,tonalOffset:n,...u},o)}function prepareTypographyVars(e){const t={};return Object.entries(e).forEach(e=>{const[g,n]=e;"object"==typeof n&&(t[g]=`${n.fontStyle?`${n.fontStyle} `:""}${n.fontVariant?`${n.fontVariant} `:""}${n.fontWeight?`${n.fontWeight} `:""}${n.fontStretch?`${n.fontStretch} `:""}${n.fontSize||""}${n.lineHeight?`/${n.lineHeight} `:""}${n.fontFamily||""}`)}),t}function createMixins(e,t){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...t}}function round$2(e){return Math.round(1e5*e)/1e5}var xn={textTransform:"uppercase"},Sn='"Roboto", "Helvetica", "Arial", sans-serif';function createTypography(e,t){const{fontFamily:g=Sn,fontSize:n=14,fontWeightLight:C=300,fontWeightRegular:o=400,fontWeightMedium:I=500,fontWeightBold:a=700,htmlFontSize:i=16,allVariants:s,pxToRem:l,...c}="function"==typeof t?t(e):t,u=n/14,d=l||(e=>e/i*u+"rem"),buildVariant=(e,t,n,C,o)=>({fontFamily:g,fontWeight:e,fontSize:d(t),lineHeight:n,...g===Sn?{letterSpacing:`${round$2(C/t)}em`}:{},...o,...s});return deepmerge({htmlFontSize:i,pxToRem:d,fontFamily:g,fontSize:n,fontWeightLight:C,fontWeightRegular:o,fontWeightMedium:I,fontWeightBold:a,h1:buildVariant(C,96,1.167,-1.5),h2:buildVariant(C,60,1.2,-.5),h3:buildVariant(o,48,1.167,0),h4:buildVariant(o,34,1.235,.25),h5:buildVariant(o,24,1.334,0),h6:buildVariant(I,20,1.6,.15),subtitle1:buildVariant(o,16,1.75,.15),subtitle2:buildVariant(I,14,1.57,.1),body1:buildVariant(o,16,1.5,.15),body2:buildVariant(o,14,1.43,.15),button:buildVariant(I,14,1.75,.4,xn),caption:buildVariant(o,12,1.66,.4),overline:buildVariant(o,12,2.66,1,xn),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},c,{clone:!1})}var wn=.2,En=.14,Rn=.12;function createShadow(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${wn})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${En})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Rn})`].join(",")}var kn=["none",createShadow(0,2,1,-1,0,1,1,0,0,1,3,0),createShadow(0,3,1,-2,0,2,2,0,0,1,5,0),createShadow(0,3,3,-2,0,3,4,0,0,1,8,0),createShadow(0,2,4,-1,0,4,5,0,0,1,10,0),createShadow(0,3,5,-1,0,5,8,0,0,1,14,0),createShadow(0,3,5,-1,0,6,10,0,0,1,18,0),createShadow(0,4,5,-2,0,7,10,1,0,2,16,1),createShadow(0,5,5,-3,0,8,10,1,0,3,14,2),createShadow(0,5,6,-3,0,9,12,1,0,3,16,2),createShadow(0,6,6,-3,0,10,14,1,0,4,18,3),createShadow(0,6,7,-4,0,11,15,1,0,4,20,3),createShadow(0,7,8,-4,0,12,17,2,0,5,22,4),createShadow(0,7,8,-4,0,13,19,2,0,5,24,4),createShadow(0,7,9,-4,0,14,21,2,0,5,26,4),createShadow(0,8,9,-5,0,15,22,2,0,6,28,5),createShadow(0,8,10,-5,0,16,24,2,0,6,30,5),createShadow(0,8,11,-5,0,17,26,2,0,6,32,5),createShadow(0,9,11,-5,0,18,28,2,0,7,34,6),createShadow(0,9,12,-6,0,19,29,2,0,7,36,6),createShadow(0,10,13,-6,0,20,31,3,0,8,38,7),createShadow(0,10,13,-6,0,21,33,3,0,8,40,7),createShadow(0,10,14,-6,0,22,35,3,0,8,42,7),createShadow(0,11,14,-7,0,23,36,3,0,9,44,8),createShadow(0,11,15,-7,0,24,38,3,0,9,46,8)],Mn={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Tn={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function formatMs(e){return`${Math.round(e)}ms`}function getAutoHeightDuration(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function createTransitions(e){const t={...Mn,...e.easing},g={...Tn,...e.duration};return{getAutoHeightDuration,create:(e=["all"],n={})=>{const{duration:C=g.standard,easing:o=t.easeInOut,delay:I=0,...a}=n;return(Array.isArray(e)?e:[e]).map(e=>`${e} ${"string"==typeof C?C:formatMs(C)} ${o} ${"string"==typeof I?I:formatMs(I)}`).join(",")},...e,easing:t,duration:g}}var Pn={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function isSerializable(e){return isPlainObject(e)||void 0===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)}function stringifyTheme(e={}){const t={...e};function serializeTheme(e){const t=Object.entries(e);for(let g=0;g<t.length;g++){const[n,C]=t[g];!isSerializable(C)||n.startsWith("unstable_")||n.startsWith("internal_")?delete e[n]:isPlainObject(C)&&(e[n]={...C},serializeTheme(e[n]))}}return serializeTheme(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(t,null,2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`}function coefficientToPercentage(e){return"number"==typeof e?`${(100*e).toFixed(0)}%`:`calc((${e}) * 100%)`}var parseAddition=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let g=0;for(let n=0;n<t.length;n+=1)g+=+t[n];return g};function attachColorManipulators(e){Object.assign(e,{alpha(t,g){const n=this||e;return n.colorSpace?`oklch(from ${t} l c h / ${"string"==typeof g?`calc(${g})`:g})`:n.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${"string"==typeof g?`calc(${g})`:g})`:alpha(t,parseAddition(g))},lighten(t,g){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #fff ${coefficientToPercentage(g)})`:lighten(t,g)},darken(t,g){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #000 ${coefficientToPercentage(g)})`:darken(t,g)}})}function createThemeNoVars(e={},...t){const{breakpoints:g,mixins:n={},spacing:C,palette:o={},transitions:I={},typography:a={},shape:i,colorSpace:s,...l}=e;if(e.vars&&void 0===e.generateThemeVars)throw new Error(formatMuiErrorMessage(22));const c=createPalette({...o,colorSpace:s}),u=createTheme$1(e);let d=deepmerge(u,{mixins:createMixins(u.breakpoints,n),palette:c,shadows:kn.slice(),typography:createTypography(c,a),transitions:createTransitions(I),zIndex:{...Pn}});return d=deepmerge(d,l),d=t.reduce((e,t)=>deepmerge(e,t),d),d.unstable_sxConfig={...Fr,...l?.unstable_sxConfig},d.unstable_sx=function(e){return Vr({sx:e,theme:this})},d.toRuntimeSource=stringifyTheme,attachColorManipulators(d),d}function getOverlayAlpha(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}var Nn=[...Array(25)].map((e,t)=>{if(0===t)return"none";const g=getOverlayAlpha(t);return`linear-gradient(rgba(255 255 255 / ${g}), rgba(255 255 255 / ${g}))`});function getOpacity(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function getOverlays(e){return"dark"===e?Nn:[]}function createColorScheme(e){const{palette:t={mode:"light"},opacity:g,overlays:n,colorSpace:C,...o}=e,I=createPalette({...t,colorSpace:C});return{palette:I,opacity:{...getOpacity(I.mode),...g},overlays:n||getOverlays(I.mode),...o}}function shouldSkipGeneratingVar(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var excludeVariablesFromRoot=e=>[...[...Array(25)].map((t,g)=>`--${e?`${e}-`:""}overlays-${g}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],createGetSelector_default=e=>(t,g)=>{const n=e.rootSelector||":root",C=e.colorSchemeSelector;let o=C;if("class"===C&&(o=".%s"),"data"===C&&(o="[data-%s]"),C?.startsWith("data-")&&!C.includes("%s")&&(o=`[${C}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const C={};return excludeVariablesFromRoot(e.cssVarPrefix).forEach(e=>{C[e]=g[e],delete g[e]}),"media"===o?{[n]:g,"@media (prefers-color-scheme: dark)":{[n]:C}}:o?{[o.replace("%s",t)]:C,[`${n}, ${o.replace("%s",t)}`]:g}:{[n]:{...g,...C}}}if(o&&"media"!==o)return`${n}, ${o.replace("%s",String(t))}`}else if(t){if("media"===o)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:g}};if(o)return o.replace("%s",String(t))}return n};function assignNode(e,t){t.forEach(t=>{e[t]||(e[t]={})})}function setColor(e,t,g){!e[t]&&g&&(e[t]=g)}function toRgb(e){return"string"==typeof e&&e.startsWith("hsl")?hslToRgb(e):e}function setColorChannel(e,t){`${t}Channel`in e||(e[`${t}Channel`]=private_safeColorChannel(toRgb(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().\nTo suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function getSpacingVal(e){return"number"==typeof e?`${e}px`:"string"==typeof e||"function"==typeof e||Array.isArray(e)?e:"8px"}var silent=e=>{try{return e()}catch(t){}},createGetCssVar=(e="mui")=>createGetCssVar$1(e);function attachColorScheme$1(e,t,g,n,C){if(!g)return;g=!0===g?{}:g;const o="dark"===C?"dark":"light";if(!n)return void(t[C]=createColorScheme({...g,palette:{mode:o,...g?.palette},colorSpace:e}));const{palette:I,...a}=createThemeNoVars({...n,palette:{mode:o,...g?.palette},colorSpace:e});return t[C]={...g,palette:I,opacity:{...getOpacity(o),...g?.opacity},overlays:g?.overlays||getOverlays(o)},a}function createThemeWithVars(e={},...t){const{colorSchemes:g={light:!0},defaultColorScheme:n,disableCssColorScheme:C=!1,cssVarPrefix:o="mui",nativeColor:I=!1,shouldSkipGeneratingVar:a=shouldSkipGeneratingVar,colorSchemeSelector:i=(g.light&&g.dark?"media":void 0),rootSelector:s=":root",...l}=e,c=Object.keys(g)[0],u=n||(g.light&&"light"!==c?"light":c),d=createGetCssVar(o),{[u]:p,light:m,dark:h,...y}=g,b={...y};let v,x=p;if(("dark"===u&&!("dark"in g)||"light"===u&&!("light"in g))&&(x=!0),!x)throw new Error(formatMuiErrorMessage(21,u));I&&(v="oklch");const S=attachColorScheme$1(v,b,x,l,u);m&&!b.light&&attachColorScheme$1(v,b,m,void 0,"light"),h&&!b.dark&&attachColorScheme$1(v,b,h,void 0,"dark");let w={defaultColorScheme:u,...S,cssVarPrefix:o,colorSchemeSelector:i,rootSelector:s,getCssVar:d,colorSchemes:b,font:{...prepareTypographyVars(S.typography),...S.font},spacing:getSpacingVal(l.spacing)};Object.keys(w.colorSchemes).forEach(e=>{const t=w.colorSchemes[e].palette,setCssVarColor=e=>{const g=e.split("-"),n=g[1],C=g[2];return d(e,t[n][C])};function colorMix(e,t,g){if(v){let n;return e===private_safeAlpha&&(n=`transparent ${(100*(1-g)).toFixed(0)}%`),e===private_safeDarken&&(n=`#000 ${(100*g).toFixed(0)}%`),e===private_safeLighten&&(n=`#fff ${(100*g).toFixed(0)}%`),`color-mix(in ${v}, ${t}, ${n})`}return e(t,g)}if("light"===t.mode&&(setColor(t.common,"background","#fff"),setColor(t.common,"onBackground","#000")),"dark"===t.mode&&(setColor(t.common,"background","#000"),setColor(t.common,"onBackground","#fff")),assignNode(t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),"light"===t.mode){setColor(t.Alert,"errorColor",colorMix(private_safeDarken,I?d("palette-error-light"):t.error.light,.6)),setColor(t.Alert,"infoColor",colorMix(private_safeDarken,I?d("palette-info-light"):t.info.light,.6)),setColor(t.Alert,"successColor",colorMix(private_safeDarken,I?d("palette-success-light"):t.success.light,.6)),setColor(t.Alert,"warningColor",colorMix(private_safeDarken,I?d("palette-warning-light"):t.warning.light,.6)),setColor(t.Alert,"errorFilledBg",setCssVarColor("palette-error-main")),setColor(t.Alert,"infoFilledBg",setCssVarColor("palette-info-main")),setColor(t.Alert,"successFilledBg",setCssVarColor("palette-success-main")),setColor(t.Alert,"warningFilledBg",setCssVarColor("palette-warning-main")),setColor(t.Alert,"errorFilledColor",silent(()=>t.getContrastText(t.error.main))),setColor(t.Alert,"infoFilledColor",silent(()=>t.getContrastText(t.info.main))),setColor(t.Alert,"successFilledColor",silent(()=>t.getContrastText(t.success.main))),setColor(t.Alert,"warningFilledColor",silent(()=>t.getContrastText(t.warning.main))),setColor(t.Alert,"errorStandardBg",colorMix(private_safeLighten,I?d("palette-error-light"):t.error.light,.9)),setColor(t.Alert,"infoStandardBg",colorMix(private_safeLighten,I?d("palette-info-light"):t.info.light,.9)),setColor(t.Alert,"successStandardBg",colorMix(private_safeLighten,I?d("palette-success-light"):t.success.light,.9)),setColor(t.Alert,"warningStandardBg",colorMix(private_safeLighten,I?d("palette-warning-light"):t.warning.light,.9)),setColor(t.Alert,"errorIconColor",setCssVarColor("palette-error-main")),setColor(t.Alert,"infoIconColor",setCssVarColor("palette-info-main")),setColor(t.Alert,"successIconColor",setCssVarColor("palette-success-main")),setColor(t.Alert,"warningIconColor",setCssVarColor("palette-warning-main")),setColor(t.AppBar,"defaultBg",setCssVarColor("palette-grey-100")),setColor(t.Avatar,"defaultBg",setCssVarColor("palette-grey-400")),setColor(t.Button,"inheritContainedBg",setCssVarColor("palette-grey-300")),setColor(t.Button,"inheritContainedHoverBg",setCssVarColor("palette-grey-A100")),setColor(t.Chip,"defaultBorder",setCssVarColor("palette-grey-400")),setColor(t.Chip,"defaultAvatarColor",setCssVarColor("palette-grey-700")),setColor(t.Chip,"defaultIconColor",setCssVarColor("palette-grey-700")),setColor(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),setColor(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),setColor(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),setColor(t.LinearProgress,"primaryBg",colorMix(private_safeLighten,I?d("palette-primary-main"):t.primary.main,.62)),setColor(t.LinearProgress,"secondaryBg",colorMix(private_safeLighten,I?d("palette-secondary-main"):t.secondary.main,.62)),setColor(t.LinearProgress,"errorBg",colorMix(private_safeLighten,I?d("palette-error-main"):t.error.main,.62)),setColor(t.LinearProgress,"infoBg",colorMix(private_safeLighten,I?d("palette-info-main"):t.info.main,.62)),setColor(t.LinearProgress,"successBg",colorMix(private_safeLighten,I?d("palette-success-main"):t.success.main,.62)),setColor(t.LinearProgress,"warningBg",colorMix(private_safeLighten,I?d("palette-warning-light"):t.warning.main,.62)),setColor(t.Skeleton,"bg",v?colorMix(private_safeAlpha,I?d("palette-text-primary"):t.text.primary,.11):`rgba(${setCssVarColor("palette-text-primaryChannel")} / 0.11)`),setColor(t.Slider,"primaryTrack",colorMix(private_safeLighten,I?d("palette-primary-main"):t.primary.main,.62)),setColor(t.Slider,"secondaryTrack",colorMix(private_safeLighten,I?d("palette-secondary-main"):t.secondary.main,.62)),setColor(t.Slider,"errorTrack",colorMix(private_safeLighten,I?d("palette-error-main"):t.error.main,.62)),setColor(t.Slider,"infoTrack",colorMix(private_safeLighten,I?d("palette-info-main"):t.info.main,.62)),setColor(t.Slider,"successTrack",colorMix(private_safeLighten,I?d("palette-success-main"):t.success.main,.62)),setColor(t.Slider,"warningTrack",colorMix(private_safeLighten,I?d("palette-warning-main"):t.warning.main,.62));const e=v?colorMix(private_safeDarken,I?d("palette-background-default"):t.background.default,.6825):private_safeEmphasize(t.background.default,.8);setColor(t.SnackbarContent,"bg",e),setColor(t.SnackbarContent,"color",silent(()=>v?vn.text.primary:t.getContrastText(e))),setColor(t.SpeedDialAction,"fabHoverBg",private_safeEmphasize(t.background.paper,.15)),setColor(t.StepConnector,"border",setCssVarColor("palette-grey-400")),setColor(t.StepContent,"border",setCssVarColor("palette-grey-400")),setColor(t.Switch,"defaultColor",setCssVarColor("palette-common-white")),setColor(t.Switch,"defaultDisabledColor",setCssVarColor("palette-grey-100")),setColor(t.Switch,"primaryDisabledColor",colorMix(private_safeLighten,I?d("palette-primary-main"):t.primary.main,.62)),setColor(t.Switch,"secondaryDisabledColor",colorMix(private_safeLighten,I?d("palette-secondary-main"):t.secondary.main,.62)),setColor(t.Switch,"errorDisabledColor",colorMix(private_safeLighten,I?d("palette-error-main"):t.error.main,.62)),setColor(t.Switch,"infoDisabledColor",colorMix(private_safeLighten,I?d("palette-info-main"):t.info.main,.62)),setColor(t.Switch,"successDisabledColor",colorMix(private_safeLighten,I?d("palette-success-main"):t.success.main,.62)),setColor(t.Switch,"warningDisabledColor",colorMix(private_safeLighten,I?d("palette-warning-main"):t.warning.main,.62)),setColor(t.TableCell,"border",colorMix(private_safeLighten,private_safeAlpha(I?d("palette-divider"):t.divider,1),.88)),setColor(t.Tooltip,"bg",colorMix(private_safeAlpha,I?d("palette-grey-700"):t.grey[700],.92))}if("dark"===t.mode){setColor(t.Alert,"errorColor",colorMix(private_safeLighten,I?d("palette-error-light"):t.error.light,.6)),setColor(t.Alert,"infoColor",colorMix(private_safeLighten,I?d("palette-info-light"):t.info.light,.6)),setColor(t.Alert,"successColor",colorMix(private_safeLighten,I?d("palette-success-light"):t.success.light,.6)),setColor(t.Alert,"warningColor",colorMix(private_safeLighten,I?d("palette-warning-light"):t.warning.light,.6)),setColor(t.Alert,"errorFilledBg",setCssVarColor("palette-error-dark")),setColor(t.Alert,"infoFilledBg",setCssVarColor("palette-info-dark")),setColor(t.Alert,"successFilledBg",setCssVarColor("palette-success-dark")),setColor(t.Alert,"warningFilledBg",setCssVarColor("palette-warning-dark")),setColor(t.Alert,"errorFilledColor",silent(()=>t.getContrastText(t.error.dark))),setColor(t.Alert,"infoFilledColor",silent(()=>t.getContrastText(t.info.dark))),setColor(t.Alert,"successFilledColor",silent(()=>t.getContrastText(t.success.dark))),setColor(t.Alert,"warningFilledColor",silent(()=>t.getContrastText(t.warning.dark))),setColor(t.Alert,"errorStandardBg",colorMix(private_safeDarken,I?d("palette-error-light"):t.error.light,.9)),setColor(t.Alert,"infoStandardBg",colorMix(private_safeDarken,I?d("palette-info-light"):t.info.light,.9)),setColor(t.Alert,"successStandardBg",colorMix(private_safeDarken,I?d("palette-success-light"):t.success.light,.9)),setColor(t.Alert,"warningStandardBg",colorMix(private_safeDarken,I?d("palette-warning-light"):t.warning.light,.9)),setColor(t.Alert,"errorIconColor",setCssVarColor("palette-error-main")),setColor(t.Alert,"infoIconColor",setCssVarColor("palette-info-main")),setColor(t.Alert,"successIconColor",setCssVarColor("palette-success-main")),setColor(t.Alert,"warningIconColor",setCssVarColor("palette-warning-main")),setColor(t.AppBar,"defaultBg",setCssVarColor("palette-grey-900")),setColor(t.AppBar,"darkBg",setCssVarColor("palette-background-paper")),setColor(t.AppBar,"darkColor",setCssVarColor("palette-text-primary")),setColor(t.Avatar,"defaultBg",setCssVarColor("palette-grey-600")),setColor(t.Button,"inheritContainedBg",setCssVarColor("palette-grey-800")),setColor(t.Button,"inheritContainedHoverBg",setCssVarColor("palette-grey-700")),setColor(t.Chip,"defaultBorder",setCssVarColor("palette-grey-700")),setColor(t.Chip,"defaultAvatarColor",setCssVarColor("palette-grey-300")),setColor(t.Chip,"defaultIconColor",setCssVarColor("palette-grey-300")),setColor(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),setColor(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),setColor(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),setColor(t.LinearProgress,"primaryBg",colorMix(private_safeDarken,I?d("palette-primary-main"):t.primary.main,.5)),setColor(t.LinearProgress,"secondaryBg",colorMix(private_safeDarken,I?d("palette-secondary-main"):t.secondary.main,.5)),setColor(t.LinearProgress,"errorBg",colorMix(private_safeDarken,I?d("palette-error-main"):t.error.main,.5)),setColor(t.LinearProgress,"infoBg",colorMix(private_safeDarken,I?d("palette-info-main"):t.info.main,.5)),setColor(t.LinearProgress,"successBg",colorMix(private_safeDarken,I?d("palette-success-main"):t.success.main,.5)),setColor(t.LinearProgress,"warningBg",colorMix(private_safeDarken,I?d("palette-warning-main"):t.warning.main,.5)),setColor(t.Skeleton,"bg",v?colorMix(private_safeAlpha,I?d("palette-text-primary"):t.text.primary,.13):`rgba(${setCssVarColor("palette-text-primaryChannel")} / 0.13)`),setColor(t.Slider,"primaryTrack",colorMix(private_safeDarken,I?d("palette-primary-main"):t.primary.main,.5)),setColor(t.Slider,"secondaryTrack",colorMix(private_safeDarken,I?d("palette-secondary-main"):t.secondary.main,.5)),setColor(t.Slider,"errorTrack",colorMix(private_safeDarken,I?d("palette-error-main"):t.error.main,.5)),setColor(t.Slider,"infoTrack",colorMix(private_safeDarken,I?d("palette-info-main"):t.info.main,.5)),setColor(t.Slider,"successTrack",colorMix(private_safeDarken,I?d("palette-success-main"):t.success.main,.5)),setColor(t.Slider,"warningTrack",colorMix(private_safeDarken,I?d("palette-warning-light"):t.warning.main,.5));const e=v?colorMix(private_safeLighten,I?d("palette-background-default"):t.background.default,.985):private_safeEmphasize(t.background.default,.98);setColor(t.SnackbarContent,"bg",e),setColor(t.SnackbarContent,"color",silent(()=>v?bn.text.primary:t.getContrastText(e))),setColor(t.SpeedDialAction,"fabHoverBg",private_safeEmphasize(t.background.paper,.15)),setColor(t.StepConnector,"border",setCssVarColor("palette-grey-600")),setColor(t.StepContent,"border",setCssVarColor("palette-grey-600")),setColor(t.Switch,"defaultColor",setCssVarColor("palette-grey-300")),setColor(t.Switch,"defaultDisabledColor",setCssVarColor("palette-grey-600")),setColor(t.Switch,"primaryDisabledColor",colorMix(private_safeDarken,I?d("palette-primary-main"):t.primary.main,.55)),setColor(t.Switch,"secondaryDisabledColor",colorMix(private_safeDarken,I?d("palette-secondary-main"):t.secondary.main,.55)),setColor(t.Switch,"errorDisabledColor",colorMix(private_safeDarken,I?d("palette-error-main"):t.error.main,.55)),setColor(t.Switch,"infoDisabledColor",colorMix(private_safeDarken,I?d("palette-info-main"):t.info.main,.55)),setColor(t.Switch,"successDisabledColor",colorMix(private_safeDarken,I?d("palette-success-main"):t.success.main,.55)),setColor(t.Switch,"warningDisabledColor",colorMix(private_safeDarken,I?d("palette-warning-light"):t.warning.main,.55)),setColor(t.TableCell,"border",colorMix(private_safeDarken,private_safeAlpha(I?d("palette-divider"):t.divider,1),.68)),setColor(t.Tooltip,"bg",colorMix(private_safeAlpha,I?d("palette-grey-700"):t.grey[700],.92))}I||(setColorChannel(t.background,"default"),setColorChannel(t.background,"paper"),setColorChannel(t.common,"background"),setColorChannel(t.common,"onBackground"),setColorChannel(t,"divider")),Object.keys(t).forEach(e=>{const g=t[e];"tonalOffset"!==e&&!I&&g&&"object"==typeof g&&(g.main&&setColor(t[e],"mainChannel",private_safeColorChannel(toRgb(g.main))),g.light&&setColor(t[e],"lightChannel",private_safeColorChannel(toRgb(g.light))),g.dark&&setColor(t[e],"darkChannel",private_safeColorChannel(toRgb(g.dark))),g.contrastText&&setColor(t[e],"contrastTextChannel",private_safeColorChannel(toRgb(g.contrastText))),"text"===e&&(setColorChannel(t[e],"primary"),setColorChannel(t[e],"secondary")),"action"===e&&(g.active&&setColorChannel(t[e],"active"),g.selected&&setColorChannel(t[e],"selected")))})}),w=t.reduce((e,t)=>deepmerge(e,t),w);const E={prefix:o,disableCssColorScheme:C,shouldSkipGeneratingVar:a,getSelector:createGetSelector_default(w),enableContrastVars:I},{vars:R,generateThemeVars:M,generateStyleSheets:T}=prepareCssVars(w,E);return w.vars=R,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach(([e,t])=>{w[e]=t}),w.generateThemeVars=M,w.generateStyleSheets=T,w.generateSpacing=function(){return createSpacing(l.spacing,createUnarySpacing(this))},w.getColorSchemeSelector=createGetColorSchemeSelector(i),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=a,w.unstable_sxConfig={...Fr,...l?.unstable_sxConfig},w.unstable_sx=function(e){return Vr({sx:e,theme:this})},w.internal_cache={},w.toRuntimeSource=stringifyTheme,w}function attachColorScheme(e,t,g){e.colorSchemes&&g&&(e.colorSchemes[t]={...!0!==g&&g,palette:createPalette({...!0===g?{}:g.palette,mode:t})})}function createTheme(e={},...t){const{palette:g,cssVariables:n=!1,colorSchemes:C=(g?void 0:{light:!0}),defaultColorScheme:o=g?.mode,...I}=e,a=o||"light",i=C?.[a],s={...C,...g?{[a]:{..."boolean"!=typeof i&&i,palette:g}}:void 0};if(!1===n){if(!("colorSchemes"in e))return createThemeNoVars(e,...t);let n=g;"palette"in e||s[a]&&(!0!==s[a]?n=s[a].palette:"dark"===a&&(n={mode:"dark"}));const C=createThemeNoVars({...e,palette:n},...t);return C.defaultColorScheme=a,C.colorSchemes=s,"light"===C.palette.mode&&(C.colorSchemes.light={...!0!==s.light&&s.light,palette:C.palette},attachColorScheme(C,"dark",s.dark)),"dark"===C.palette.mode&&(C.colorSchemes.dark={...!0!==s.dark&&s.dark,palette:C.palette},attachColorScheme(C,"light",s.light)),C}return g||"light"in s||"light"!==a||(s.light=!0),createThemeWithVars({...I,colorSchemes:s,defaultColorScheme:a,..."boolean"!=typeof n&&n},...t)}var Dn=createTheme();function useTheme$1(){const e=useTheme$3(Dn);return e.$$material||e}function slotShouldForwardProp(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}var rootShouldForwardProp=e=>slotShouldForwardProp(e)&&"classes"!==e,On=createStyled({themeId:sn,defaultTheme:Dn,rootShouldForwardProp});function ThemeProviderNoVars({theme:e,...t}){const g="$$material"in e?e[sn]:void 0;return(0,gr.jsx)(ThemeProvider$1,{...t,themeId:g?sn:void 0,theme:g||e})}var jn={attribute:"data-mui-color-scheme",colorSchemeStorageKey:"mui-color-scheme",defaultLightColorScheme:"light",defaultDarkColorScheme:"dark",modeStorageKey:"mui-mode"},{CssVarsProvider:zn,useColorScheme:Gn,getInitColorSchemeScript:Ln}=createCssVarsProvider({themeId:sn,theme:()=>createTheme({cssVariables:!0}),colorSchemeStorageKey:jn.colorSchemeStorageKey,modeStorageKey:jn.modeStorageKey,defaultColorScheme:{light:jn.defaultLightColorScheme,dark:jn.defaultDarkColorScheme},resolveTheme:e=>{const t={...e,typography:createTypography(e.palette,e.typography)};return t.unstable_sx=function(e){return Vr({sx:e,theme:this})},t}}),Bn=zn;function ThemeProvider({theme:e,...t}){const g=l.useMemo(()=>{if("function"==typeof e)return e;const t="$$material"in e?e[sn]:e;return"colorSchemes"in t?null:"vars"in t?e:{...e,vars:null}},[e]);return g?(0,gr.jsx)(ThemeProviderNoVars,{theme:g,...t}):(0,gr.jsx)(Bn,{theme:e,...t})}var Fn=generateUtilityClasses("MuiBox",["root"]),Wn=createBox({themeId:sn,defaultTheme:createTheme(),defaultClassName:Fn.root,generateClassName:Kr.generate}),cloneTokens=e=>structuredClone(e),buildHueFilter=e=>`hue-rotate(${e}deg)`,createMuiTheme=(e=Bt)=>{const t=e??Bt;return createTheme({spacing:t.spacing.unit,shape:{borderRadius:t.radius.panel},typography:{fontSize:t.theme.fontSize},palette:{mode:"dark",primary:{main:t.text.accent},background:{default:t.background.primary,paper:t.background.panel},text:{primary:t.text.primary,secondary:t.text.secondary,disabled:t.text.muted},hp:{main:t.game.hp},mp:{main:t.game.mp},ep:{main:t.game.ep},wp:{main:t.game.wp},nl:{main:t.game.nl},timerActive:{main:t.game.timerActive},timerCritical:{main:t.game.timerCritical}},components:{MuiTooltip:{defaultProps:{arrow:!0,placement:"top"}},MuiPaper:{defaultProps:{elevation:0}},MuiButton:{defaultProps:{size:"small"}},MuiSwitch:{defaultProps:{size:"small"}},MuiSlider:{defaultProps:{size:"small"}}},nexGui:{backgroundImage:resolveBackgroundImageSource(t.theme.backgroundImage),backgroundOpacity:t.theme.backgroundOpacity,backgroundFilter:buildHueFilter(t.theme.hue),radius:cloneTokens(t.radius),tokens:cloneTokens(t)}})};function GlobalStyles(e){return(0,gr.jsx)(GlobalStyles$1,{...e,defaultTheme:Dn,themeId:sn})}function globalCss(e){return function(t){return(0,gr.jsx)(GlobalStyles,{styles:"function"==typeof e?g=>e({theme:g,...t}):e})}}var Vn=unstable_memoTheme;function useDefaultProps(e){return useDefaultProps$1(e)}function getPaperUtilityClass(e){return generateUtilityClass("MuiPaper",e)}generateUtilityClasses("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var useUtilityClasses$38=e=>{const{square:t,elevation:g,variant:n,classes:C}=e;return composeClasses({root:["root",n,!t&&"rounded","elevation"===n&&`elevation${g}`]},getPaperUtilityClass,C)},Un=On("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,t[g.variant],!g.square&&t.rounded,"elevation"===g.variant&&t[`elevation${g.elevation}`]]}})(Vn(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),Kn=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiPaper"}),n=useTheme$1(),{className:C,component:o="div",elevation:I=1,square:a=!1,variant:i="elevation",...s}=g,l={...g,component:o,elevation:I,square:a,variant:i};return(0,gr.jsx)(Un,{as:o,ownerState:l,className:clsx(useUtilityClasses$38(l).root,C),ref:t,...s,style:{..."elevation"===i&&{"--Paper-shadow":(n.vars||n).shadows[I],...n.vars&&{"--Paper-overlay":n.vars.overlays?.[I]},...!n.vars&&"dark"===n.palette.mode&&{"--Paper-overlay":`linear-gradient(${alpha("#fff",getOverlayAlpha(I))}, ${alpha("#fff",getOverlayAlpha(I))})`}},...s.style}})}),Hn=createStack({createStyledComponent:On("div",{name:"MuiStack",slot:"Root"}),useThemeProps:e=>useDefaultProps({props:e,name:"MuiStack"})}),Yn=__toESM(er(),1),DefenceTagComponent=({name:e})=>React.createElement(Kn,{className:"defence-tag",elevation:3,sx:{fontFamily:"inherit",fontSize:"inherit",px:.75,py:"2px",textAlign:"center",width:"100%"}},e);DefenceTagComponent.displayName="DefenceTag",DefenceTagComponent.propTypes={name:Yn.default.string.isRequired};var Zn=(0,l.memo)(DefenceTagComponent);Zn.displayName="DefenceTag",Zn.propTypes=DefenceTagComponent.propTypes;var Qn=capitalize;function hasCorrectMainProperty(e){return"string"==typeof e.main}function checkSimplePaletteColorValues(e,t=[]){if(!hasCorrectMainProperty(e))return!1;for(const g of t)if(!e.hasOwnProperty(g)||"string"!=typeof e[g])return!1;return!0}function createSimplePaletteValueFilter(e=[]){return([,t])=>t&&checkSimplePaletteColorValues(t,e)}function getTypographyUtilityClass(e){return generateUtilityClass("MuiTypography",e)}generateUtilityClasses("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom"]);var useUtilityClasses$37=e=>{const{align:t,gutterBottom:g,noWrap:n,variant:C,classes:o}=e;return composeClasses({root:["root",C,"inherit"!==e.align&&`align${Qn(t)}`,g&&"gutterBottom",n&&"noWrap"]},getTypographyUtilityClass,o)},Xn=On("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.variant&&t[g.variant],"inherit"!==g.align&&t[`align${Qn(g.align)}`],g.noWrap&&t.noWrap,g.gutterBottom&&t.gutterBottom]}})(Vn(({theme:e})=>({margin:0,variants:[{props:{variant:"inherit"},style:{font:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}},...Object.entries(e.typography).filter(([e,t])=>"inherit"!==e&&t&&"object"==typeof t).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>"string"==typeof e).map(([t])=>({props:{color:`text${Qn(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>"inherit"!==e.align,style:{textAlign:"var(--Typography-textAlign)"}},{props:({ownerState:e})=>e.noWrap,style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:"0.35em"}}]}))),_n={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},qn=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiTypography"}),{color:n,align:C="inherit",className:o,component:I,gutterBottom:a=!1,noWrap:i=!1,variant:s="body1",variantMapping:l=_n,...c}=g,u={...g,align:C,color:n,className:o,component:I,gutterBottom:a,noWrap:i,variant:s,variantMapping:l};return(0,gr.jsx)(Xn,{as:I||l[s]||_n[s]||"span",ref:t,className:clsx(useUtilityClasses$37(u).root,o),...c,ownerState:u,style:{..."inherit"!==C&&{"--Typography-textAlign":C},...c.style}})}),getErrorMessage=e=>e instanceof Error&&e.message?e.message:"string"==typeof e&&e.length>0?e:"Unknown panel error.",Jn=class extends l.Component{static displayName="PanelErrorBoundary";static propTypes={children:Yn.default.node,panelName:Yn.default.node.isRequired};static getDerivedStateFromError(e){return{error:e}}constructor(e){super(e),this.state={error:null}}componentDidCatch(){}render(){const{children:e,panelName:t}=this.props,{error:g}=this.state;return g?React.createElement(Wn,{className:"nexgui4-panel-error-boundary",role:"alert",sx:{backgroundColor:"background.paper",border:1,borderColor:"divider",borderRadius:1,color:"text.primary",display:"flex",flex:1,flexDirection:"column",gap:1,minHeight:0,minWidth:0,p:1.5,width:"100%"}},React.createElement(qn,{component:"h2",sx:{fontSize:"0.95rem",fontWeight:700}},t),React.createElement(qn,{color:"text.secondary",variant:"body2"},"This panel failed to render."),React.createElement(qn,{sx:{fontFamily:"monospace",overflowWrap:"anywhere"},variant:"body2"},getErrorMessage(g))):e}},isIterable=e=>Symbol.iterator in e,hasIterableEntries=e=>"entries"in e,compareEntries=(e,t)=>{const g=e instanceof Map?e:new Map(e.entries()),n=t instanceof Map?t:new Map(t.entries());if(g.size!==n.size)return!1;for(const[C,o]of g)if(!n.has(C)||!Object.is(o,n.get(C)))return!1;return!0},compareIterables=(e,t)=>{const g=e[Symbol.iterator](),n=t[Symbol.iterator]();let C=g.next(),o=n.next();for(;!C.done&&!o.done;){if(!Object.is(C.value,o.value))return!1;C=g.next(),o=n.next()}return!!C.done&&!!o.done};function shallow(e,t){return!!Object.is(e,t)||"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&Object.getPrototypeOf(e)===Object.getPrototypeOf(t)&&(isIterable(e)&&isIterable(t)?hasIterableEntries(e)&&hasIterableEntries(t)?compareEntries(e,t):compareIterables(e,t):compareEntries({entries:()=>Object.entries(e)},{entries:()=>Object.entries(t)}))}function useShallow(e){const t=l.default.useRef(void 0);return g=>{const n=e(g);return shallow(t.current,n)?t.current:t.current=n}}var selectDefenceSlice=e=>({configuredDefences:e.configuredDefences,defences:e.defences,gainDefence:e.gainDefence,loseDefence:e.loseDefence,resetDefences:e.resetDefences,setConfiguredDefences:e.setConfiguredDefences}),useDefence=()=>{const{stores:e}=useNexGui();return e.defence(useShallow(selectDefenceSlice))},getFlipTransform$10=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},DefencesPanelInner=()=>{const e=useTheme$1(),[t]=(0,l.useState)(()=>Math.floor(4*Math.random())),{configuredDefences:g,defences:n}=useDefence(),C=e?.nexGui?.backgroundImage??"",o=e?.nexGui?.backgroundOpacity??.5,I=e?.nexGui?.backgroundFilter??"none",a=new Set(n),i=g.filter(e=>!a.has(e)),s=i.length>0;return React.createElement(Wn,{className:"defences-panel",sx:{color:"text.primary",fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize,height:"100%",overflow:"hidden",position:"relative",width:"100%"}},C?React.createElement(Wn,{"aria-hidden":"true",className:"defences-panel__background",sx:{backgroundImage:`url(${C})`,backgroundPosition:"center",backgroundSize:"cover",filter:I,inset:0,opacity:o,position:"absolute",transform:getFlipTransform$10(t),zIndex:0}}):null,s?React.createElement(Wn,{className:"defences-panel__content",sx:{height:"100%",overflowY:"auto",p:1,position:"relative",width:"100%",zIndex:1}},React.createElement(Kn,{className:"defences-panel__surface",elevation:0,sx:{backgroundColor:alpha(e.palette.background.paper,.78),minHeight:"100%",p:1}},React.createElement(Hn,{spacing:.5,sx:{position:"relative",width:"100%"}},i.map(e=>React.createElement(Zn,{key:e,name:e}))))):null)};DefencesPanelInner.displayName="DefencesPanelInner";var DefencesPanel=()=>React.createElement(Jn,{panelName:"Defences"},React.createElement(DefencesPanelInner,null));function createLazyMeasurementsView(e,t,g){const n=new Array(e);return new Proxy(n,{get(n,C,o){if("string"==typeof C){const o=C.charCodeAt(0);if(o>=48&&o<=57){const o=+C;if(Number.isInteger(o)&&o>=0&&o<e){let e=n[o];if(!e){const C=t[2*o];e=n[o]={index:o,key:g(o),start:C,size:t[2*o+1],end:C+t[2*o+1],lane:0}}return e}}if("length"===C)return e}return Reflect.get(n,C,o)}})}function memo$17(e,t,g){let n,C=g.initialDeps??[],o=!0;function memoizedFunction(){const I=e();return I.length!==C.length||I.some((e,t)=>C[t]!==e)?(C=I,n=t(...I),!(null==g?void 0:g.onChange)||o&&g.skipInitialOnChange||g.onChange(n),o=!1,n):n}return memoizedFunction.updateDeps=e=>{C=e},memoizedFunction}function notUndefined(e,t){if(void 0===e)throw new Error("Unexpected undefined"+(t?`: ${t}`:""));return e}DefencesPanel.displayName="DefencesPanel";var $n,approxEqual=(e,t)=>Math.abs(e-t)<1.01,debounce$2=(e,t,g)=>{let n;return function(...C){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,C),g)}},isIOSWebKit=()=>{if(void 0!==$n)return $n;if("undefined"==typeof navigator)return $n=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return $n=!0;const e=navigator.maxTouchPoints;return $n="MacIntel"===navigator.platform&&void 0!==e&&e>0},getRect=e=>{const{offsetWidth:t,offsetHeight:g}=e;return{width:t,height:g}},defaultKeyExtractor=e=>e,defaultRangeExtractor=e=>{const t=Math.max(e.startIndex-e.overscan,0),g=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,n=new Array(g);for(let C=0;C<g;C++)n[C]=t+C;return n},observeElementRect=(e,t)=>{const g=e.scrollElement;if(!g)return;const n=e.targetWindow;if(!n)return;const handler=e=>{const{width:g,height:n}=e;t({width:Math.round(g),height:Math.round(n)})};if(handler(getRect(g)),!n.ResizeObserver)return()=>{};const C=new n.ResizeObserver(t=>{const run=()=>{const e=t[0];if(null==e?void 0:e.borderBoxSize){const t=e.borderBoxSize[0];if(t)return void handler({width:t.inlineSize,height:t.blockSize})}handler(getRect(g))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(run):run()});return C.observe(g,{box:"border-box"}),()=>{C.unobserve(g)}},eA={passive:!0},tA="undefined"==typeof window||"onscrollend"in window,observeOffset=(e,t,g)=>{const n=e.scrollElement;if(!n)return;const C=e.targetWindow;if(!C)return;const o=e.options.useScrollendEvent&&tA;let I=0;const a=o?null:debounce$2(C,()=>t(I,!1),e.options.isScrollingResetDelay),createHandler=e=>()=>{I=g(n),a?.(),t(I,e)},i=createHandler(!0),s=createHandler(!1);return n.addEventListener("scroll",i,eA),o&&n.addEventListener("scrollend",s,eA),()=>{n.removeEventListener("scroll",i),o&&n.removeEventListener("scrollend",s)}},observeElementOffset=(e,t)=>observeOffset(e,t,t=>{const{horizontal:g,isRtl:n}=e.options;return g?t.scrollLeft*(n?-1:1):t.scrollTop}),measureElement=(e,t,g)=>{if(null==t?void 0:t.borderBoxSize){const e=t.borderBoxSize[0];if(e)return Math.round(e[g.options.horizontal?"inlineSize":"blockSize"])}return e[g.options.horizontal?"offsetWidth":"offsetHeight"]},scrollWithAdjustments=(e,{adjustments:t=0,behavior:g},n)=>{var C,o;null==(o=null==(C=n.scrollElement)?void 0:C.scrollTo)||o.call(C,{[n.options.horizontal?"left":"top"]:e+t,behavior:g})},gA=scrollWithAdjustments,rA=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e,t,g;return(null==(g=null==(t=null==(e=this.targetWindow)?void 0:e.performance)?void 0:t.now)?void 0:g.call(t))??Date.now()},this.observer=(()=>{let e=null;const get=()=>e||(this.targetWindow&&this.targetWindow.ResizeObserver?e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{const run=()=>{const t=e.target,g=this.indexFromElement(t);if(t.isConnected)this.shouldMeasureDuringScroll(g)&&this.resizeItem(g,this.options.measureElement(t,e,this));else{this.observer.unobserve(t);for(const[e,g]of this.elementsCache)if(g===t){this.elementsCache.delete(e);break}}};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(run):run()})}):null);return{disconnect:()=>{var t;null==(t=get())||t.disconnect(),e=null},observe:e=>{var t;return null==(t=get())?void 0:t.observe(e,{box:"border-box"})},unobserve:e=>{var t;return null==(t=get())?void 0:t.unobserve(e)}}})(),this.range=null,this.setOptions=e=>{var t,g;const n={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:defaultKeyExtractor,rangeExtractor:defaultRangeExtractor,onChange:()=>{},measureElement,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate"};for(const a in e){const t=e[a];void 0!==t&&(n[a]=t)}const C=this.options;let o=null,I=null;if(void 0!==C&&C.enabled&&n.enabled&&"end"===n.anchorTo&&null!==this.scrollElement){const e=C.count,a=n.count,i=this.getMeasurements(),s=e>0?(null==(t=i[0])?void 0:t.key)??C.getItemKey(0):null,l=e>0?(null==(g=i[e-1])?void 0:g.key)??C.getItemKey(e-1):null;if(a!==e||e>0&&a>0&&(n.getItemKey(0)!==s||n.getItemKey(a-1)!==l)){const t=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??i[0]:null;t&&(o=[t.key,this.getScrollOffset()-t.start]);const g=!0===n.followOnAppend?"auto":n.followOnAppend||null;g&&a>e&&this.isAtEnd(C.scrollEndThreshold)&&(0===e||n.getItemKey(a-1)!==l)&&(I=g)}}this.options=n,(o||I)&&(this.pendingScrollAnchor=[(null==o?void 0:o[0])??null,(null==o?void 0:o[1])??0,I])},this.notify=e=>{var t,g;null==(g=(t=this.options).onChange)||g.call(t,this,e)},this.maybeNotify=memo$17(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),null!=this.rafId&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t)return void this.maybeNotify();if(this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=(null==(e=this.scrollElement)?void 0:e.window)??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{null!==this._intendedScrollOffset&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0,this.scrollDirection=t?this.getScrollOffset()<e?"forward":"backward":null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const e=this.scrollElement,onTouchStart=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},onTouchEnd=()=>{this._iosTouching=!1,isIOSWebKit()&&null!=this.targetWindow&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener("touchstart",onTouchStart,eA),e.addEventListener("touchend",onTouchEnd,eA),this.unsubs.push(()=>{e.removeEventListener("touchstart",onTouchStart),e.removeEventListener("touchend",onTouchEnd),null!==this._iosTouchEndTimerId&&null!=this.targetWindow&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const g=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,g&&this.scrollElement&&this.options.enabled){const[e,t,n]=g;if(null!==e){const{count:g,getItemKey:n}=this.options;let C=0;for(;C<g&&n(C)!==e;)C++;const o=C<g?this.getMeasurements()[C]:void 0;if(o){const e=o.start+t-this.getScrollOffset();approxEqual(e,0)||this.applyScrollAdjustment(e)}}n&&this.scrollToEnd({behavior:n})}},this._flushIosDeferredIfReady=()=>{if(0===this._iosDeferredAdjustment)return;if(this.isScrolling)return;if(this._iosTouching)return;if(this._iosJustTouchEnded)return;const e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;const g=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=g,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??("function"==typeof this.options.initialOffset?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const g=new Map,n=new Map;for(let C=t-1;C>=0;C--){const t=e[C];if(g.has(t.lane))continue;const o=n.get(t.lane);if(null==o||t.end>o.end?n.set(t.lane,t):t.end<o.end&&g.set(t.lane,!0),g.size===this.options.lanes)break}return n.size===this.options.lanes?Array.from(n.values()).sort((e,t)=>e.end===t.end?e.index-t.index:e.end-t.end)[0]:void 0},this.getMeasurementOptions=memo$17(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode],(e,t,g,n,C,o,I)=>(void 0!==this.prevLanes&&this.prevLanes!==o&&(this.lanesChangedFlag=!0),this.prevLanes=o,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:g,getItemKey:n,enabled:C,lanes:o,laneAssignmentMode:I}),{key:!1}),this.getMeasurements=memo$17(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:g,getItemKey:n,enabled:C,lanes:o,laneAssignmentMode:I},a)=>{const i=this.itemSizeCache;if(!C)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(const u of this.laneAssignments.keys())u>=e&&this.laneAssignments.delete(u);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),0!==this.measurementsCache.length||this.lanesSettling||(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));const s=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),1===o){const C=this.options.gap,o=2*e;let I,a=this._flatMeasurements;if(!a||a.length<o){const e=new Float64Array(o);a&&s>0&&e.set(a.subarray(0,2*s)),a=e,this._flatMeasurements=a}if(0===s)I=t+g;else{const e=s-1;I=a[2*e]+a[2*e+1]+C}for(let t=s;t<e;t++){const e=n(t),g=i.get(e),o="number"==typeof g?g:this.options.estimateSize(t);a[2*t]=I,a[2*t+1]=o,I+=o+C}const l=createLazyMeasurementsView(e,a,n);return this.measurementsCache=l,l}const l=this.measurementsCache.slice(0,s),c=new Array(o).fill(void 0);for(let u=0;u<s;u++){const e=l[u];e&&(c[e.lane]=u)}for(let u=s;u<e;u++){const e=n(u),C=this.laneAssignments.get(u);let o,a;const s="estimate"===I||i.has(e);if(void 0!==C&&this.options.lanes>1){o=C;const e=c[o],n=void 0!==e?l[e]:void 0;a=n?n.end+this.options.gap:t+g}else{const e=1===this.options.lanes?l[u-1]:this.getFurthestMeasurement(l,u);a=e?e.end+this.options.gap:t+g,o=e?e.lane:u%this.options.lanes,this.options.lanes>1&&s&&this.laneAssignments.set(u,o)}const d=i.get(e),p="number"==typeof d?d:this.options.estimateSize(u),m=a+p;l[u]={index:u,start:a,size:p,end:m,key:e,lane:o},c[o]=u}return this.measurementsCache=l,l},{key:!1,debug:()=>this.options.debug}),this.calculateRange=memo$17(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,g,n)=>this.range=e.length>0&&t>0?calculateRange({measurements:e,outerSize:t,scrollOffset:g,lanes:n,flat:1===n&&null!=this._flatMeasurements?this._flatMeasurements:null}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=memo$17(()=>{let e=null,t=null;const g=this.calculateRange();return g&&(e=g.startIndex,t=g.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,g,n,C)=>null===n||null===C?[]:e({startIndex:n,endIndex:C,overscan:t,count:g}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,g=e.getAttribute(t);return g?parseInt(g,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{var t;if(!this.scrollState||"smooth"!==this.scrollState.behavior)return!0;const g=this.scrollState.index??(null==(t=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))?void 0:t.index);if(void 0!==g&&this.range){const t=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),n=Math.max(0,g-t),C=Math.min(this.options.count-1,g+t);return e>=n&&e<=C}return!0},this.measureElement=e=>{if(!e)return void this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});const t=this.indexFromElement(e),g=this.options.getItemKey(t),n=this.elementsCache.get(g);n!==e&&(n&&this.observer.unobserve(n),this.observer.observe(e),this.elementsCache.set(g,e)),this.isScrolling&&!this.scrollState||!this.shouldMeasureDuringScroll(t)||this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{var g,n;if(e<0||e>=this.options.count)return;let C,o,I;const a=this._flatMeasurements;if(1===this.options.lanes&&null!==a)I=this.options.getItemKey(e),o=a[2*e],C=a[2*e+1];else{const t=this.measurementsCache[e];if(!t)return;I=t.key,o=t.start,C=t.size}const i=t-(this.itemSizeCache.get(I)??C);if(0!==i){const a="end"===this.options.anchorTo&&"smooth"!==(null==(g=this.scrollState)?void 0:g.behavior)&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,s=a?this.getTotalSize():0,l="smooth"!==(null==(n=this.scrollState)?void 0:n.behavior)&&(void 0!==this.shouldAdjustScrollPositionOnItemSizeChange?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:I,start:o,size:C,end:o+C,lane:0},i,this):o<this.getScrollOffset()+this.scrollAdjustments&&"backward"!==this.scrollDirection);(null===this.pendingMin||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(I,t),this.itemSizeCacheVersion++,a?this.applyScrollAdjustment(this.getTotalSize()-s):l&&this.applyScrollAdjustment(i),this.notify(!1)}},this.getVirtualItems=memo$17(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{const g=[];for(let n=0,C=e.length;n<C;n++){const C=t[e[n]];g.push(C)}return g},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(0===t.length)return;const g=this._flatMeasurements,n=1===this.options.lanes&&null!=g;return notUndefined(t[findNearestBinarySearch(0,t.length-1,n?e=>g[2*e]:e=>notUndefined(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,g=0)=>{if(!this.scrollElement)return 0;const n=this.getSize(),C=this.getScrollOffset();"auto"===t&&(t=e>=C+n?"end":"start"),"center"===t?e+=(g-n)/2:"end"===t&&(e-=n);const o=this.getMaxScrollOffset();return Math.max(Math.min(o,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const g=this.getSize(),n=this.getScrollOffset(),C=this.measurementsCache[e];if(!C)return;if("auto"===t)if(C.end>=n+g-this.options.scrollPaddingEnd)t="end";else{if(!(C.start<=n+this.options.scrollPaddingStart))return[n,t];t="start"}if("end"===t&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];const o="end"===t?C.end+this.options.scrollPaddingEnd:C.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(o,t,C.size),t]},this.scrollToOffset=(e,{align:t="start",behavior:g="auto"}={})=>{const n=this.getOffsetForAlignment(e,t),C=this.now();this.scrollState={index:null,align:t,behavior:g,startedAt:C,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:g}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t="auto",behavior:g="auto"}={})=>{e=Math.max(0,Math.min(e,this.options.count-1));const n=this.getOffsetForIndex(e,t);if(!n)return;const[C,o]=n,I=this.now();this.scrollState={index:e,align:o,behavior:g,startedAt:I,lastTargetOffset:C,stableFrames:0},this._scrollToOffset(C,{adjustments:void 0,behavior:g}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t="auto"}={})=>{const g=this.getScrollOffset()+e,n=this.now();this.scrollState={index:null,align:"start",behavior:t,startedAt:n,lastTargetOffset:g,stableFrames:0},this._scrollToOffset(g,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e="auto"}={})=>{this.options.count>0?this.scrollToIndex(this.options.count-1,{align:"end",behavior:e}):this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let g;if(0===t.length)g=this.options.paddingStart;else if(1===this.options.lanes){const n=t.length-1,C=this._flatMeasurements;g=null!=C?C[2*n]+C[2*n+1]:(null==(e=t[n])?void 0:e.end)??0}else{const e=Array(this.options.lanes).fill(null);let n=t.length-1;for(;n>=0&&e.some(e=>null===e);){const g=t[n];null===e[g.lane]&&(e[g.lane]=g.end),n--}g=Math.max(...e.filter(e=>null!==e))}return Math.max(g-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const e=[];if(0===this.itemSizeCache.size)return e;const t=this.getMeasurements();for(const g of t)g&&this.itemSizeCache.has(g.key)&&e.push({index:g.index,key:g.key,start:g.start,size:g.size,end:g.end,lane:g.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:g})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:g,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){0!==e&&(isIOSWebKit()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?this._iosDeferredAdjustment+=e:this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}))}scheduleScrollReconcile(){this.targetWindow?null==this.rafId&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})):this.scrollState=null}reconcileScroll(){if(!this.scrollState)return;if(!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3)return void(this.scrollState=null);const e=null!=this.scrollState.index?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=e?e[0]:this.scrollState.lastTargetOffset,g=1,n=t!==this.scrollState.lastTargetOffset;if(!n&&approxEqual(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=g)return this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}),void(this.scrollState=null)}else if(this.scrollState.stableFrames=0,n){const e=this.getSize()||600,g=Math.abs(t-this.getScrollOffset()),n="smooth"===this.scrollState.behavior&&g>e;this.scrollState.lastTargetOffset=t,n||(this.scrollState.behavior="auto"),this._scrollToOffset(t,{adjustments:void 0,behavior:n?"smooth":"auto"})}this.scheduleScrollReconcile()}},findNearestBinarySearch=(e,t,g,n)=>{for(;e<=t;){const C=(e+t)/2|0,o=g(C);if(o<n)e=C+1;else{if(!(o>n))return C;t=C-1}}return e>0?e-1:0};function calculateRange({measurements:e,outerSize:t,scrollOffset:g,lanes:n,flat:C}){const o=e.length-1,I=C?e=>C[2*e]:t=>e[t].start,a=C?e=>C[2*e]+C[2*e+1]:t=>e[t].end;if(e.length<=n)return{startIndex:0,endIndex:o};let i=findNearestBinarySearch(0,o,I,g),s=i;if(1===n)for(;s<o&&a(s)<g+t;)s++;else if(n>1){const C=Array(n).fill(0);for(;s<o&&C.some(e=>e<g+t);){const t=e[s];C[t.lane]=t.end,s++}const I=Array(n).fill(g+t);for(;i>=0&&I.some(e=>e>=g);){const t=e[i];I[t.lane]=t.start,i--}i=Math.max(0,i-i%n),s=Math.min(o,s+(n-1-s%n))}return{startIndex:i,endIndex:s}}var nA="undefined"!=typeof document?l.useLayoutEffect:l.useEffect;function useVirtualizerBase({useFlushSync:e=!0,...t}){const g=l.useReducer(e=>e+1,0)[1],n={...t,onChange:(n,C)=>{var o;e&&C?(0,c.flushSync)(g):g(),null==(o=t.onChange)||o.call(t,n,C)}},[C]=l.useState(()=>new rA(n));return C.setOptions(n),nA(()=>C._didMount(),[]),nA(()=>C._willUpdate()),C}function useVirtualizer(e){return useVirtualizerBase({observeElementRect,observeElementOffset,scrollToFn:gA,...e})}var AA=1,CA=24,oA=8,noop$5=()=>{},denyScrollPositionAdjustment=()=>!1,defaultEstimateSize=()=>48,defaultGetItemKey=(e,t)=>e?.id??t,joinClassNames=(...e)=>e.filter(Boolean).join(" "),getVirtualItemEnd=e=>Number.isFinite(e?.end)?e.end:Number.isFinite(e?.size)?e.start+e.size:e?.start??0,getElementWidth=(e,t=null)=>{const g=t?.contentRect?.width??e.getBoundingClientRect?.().width??e.clientWidth;return Number.isFinite(g)?g:0},getVerticalScrollbarGutterWidth=e=>{if(!e)return 0;const t=Number(e.offsetWidth),g=Number(e.clientWidth);return Number.isFinite(t)&&Number.isFinite(g)?Math.max(0,t-g):0},isNearBottom=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=CA,isPinnedToDisplayTail=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=AA,TranscriptViewportComponent=({items:e,renderItem:t,getItemKey:g=defaultGetItemKey,itemKeyVersion:n=null,displayPinKey:C=null,estimateSize:o=defaultEstimateSize,overscan:I=5,fontFamily:a="inherit",fontSize:i,border:s=!1,mode:c="panel",onRequestHistory:u=noop$5,onScrollLockChange:d=noop$5,activeMatchIndex:p=-1,footer:m=null,fallbackToAllItems:h=!1,onSendCommand:y=noop$5,showScrollLockBadge:b=!1,viewportSx:v,viewportTestId:x="virtual-scroll-viewport"},S)=>{const w=(0,l.useRef)(null),E=(0,l.useRef)(null),R=(0,l.useRef)({animationFrame:0,width:null}),M=(0,l.useRef)(e),T=(0,l.useRef)(g),P=(0,l.useRef)({getItemKey:null,itemKeyRevision:null,lookup:null}),[N,D]=(0,l.useState)(!1),[O,j]=(0,l.useState)(0),[G,L]=(0,l.useState)(0),B="display"===c,F=parseFontSize(i);M.current=e,T.current=g;const W=n??e;P.current.getItemKey===g&&P.current.itemKeyRevision===W||(P.current={getItemKey:g,itemKeyRevision:W,lookup:e=>T.current(M.current[e],e)});const V=P.current.lookup,U=(0,l.useCallback)(()=>w.current,[]),K=useVirtualizer({count:e.length,initialRect:{height:400,width:0},getScrollElement:U,estimateSize:o,getItemKey:V,overscan:I,shouldAdjustScrollPositionOnItemSizeChange:B?void 0:denyScrollPositionAdjustment}),H=K.getTotalSize(),Y=K.getVirtualItems(),Z=Y[0]??null,Q=Y.at(-1)??null,X=Z?Math.max(0,Z.start):0,_=Q?Math.max(0,H-getVirtualItemEnd(Q)):0,q=h&&0===Y.length&&e.length>0,J=joinClassNames("nexgui4-transcript-spacer",!q&&(B?"nexgui4-transcript-spacer--display":"nexgui4-transcript-spacer--panel")),$=q?void 0:B?0===Y.length?{height:`${H}px`}:{paddingBottom:`${_}px`,paddingTop:`${X}px`}:{height:`${H}px`},ee=null==i?void 0:"number"==typeof i?`${i}px`:i,te=joinClassNames("nexgui4-transcript-scroll-viewport",B?"nexgui4-transcript-scroll-viewport--display":"nexgui4-transcript-scroll-viewport--panel"),ge={fontFamily:a,fontSize:ee},re={right:`${oA+O}px`},ne=(0,l.useCallback)(e=>{const t=getVerticalScrollbarGutterWidth(e);j(e=>e===t?e:t)},[]),Ae=(0,l.useCallback)(()=>{const e=w.current;e&&(e.scrollTop=e.scrollHeight)},[]);(0,l.useImperativeHandle)(S,()=>({scrollToBottom:Ae,scrollToIndex:(e,t)=>K.scrollToIndex(e,t)}),[K,Ae]),(0,l.useLayoutEffect)(()=>{if(!B)return void(E.current=null);const t=w.current;if(!t)return;const g={itemCount:e.length,scrollHeight:t.scrollHeight,totalSize:H},n=E.current;null!=n&&n.itemCount===g.itemCount&&n.scrollHeight===g.scrollHeight&&n.totalSize===g.totalSize&&isPinnedToDisplayTail(t)||(t.scrollTop=t.scrollHeight,E.current=g)},[C,G,B,e.length,H]),(0,l.useLayoutEffect)(()=>{B||N||0===e.length||K.scrollToIndex(e.length-1,{align:"end"})},[B,N,e.length,K]),(0,l.useLayoutEffect)(()=>{const e=K.measure,t=window.ResizeObserver,g=R.current;if(!B)return g.width=null,void(g.animationFrame&&(window.cancelAnimationFrame(g.animationFrame),g.animationFrame=0));const n=w.current;if(!n||"function"!=typeof e||"function"!=typeof t)return;g.width=getElementWidth(n);const scheduleMeasure=t=>{g.width!==t&&(g.width=t,g.animationFrame&&window.cancelAnimationFrame(g.animationFrame),g.animationFrame=window.requestAnimationFrame(()=>{g.animationFrame=0,e(),L(e=>e+1)}))},C=new t(e=>{scheduleMeasure(getElementWidth(n,e[0]))});return C.observe(n),()=>{C.disconnect(),g.animationFrame&&(window.cancelAnimationFrame(g.animationFrame),g.animationFrame=0)}},[B,K]),(0,l.useLayoutEffect)(()=>{if(B)return void j(0);const e=w.current;if(!e)return;ne(e);const t=window.ResizeObserver;if("function"!=typeof t)return;const g=new t(()=>{ne(e)});return g.observe(e),()=>{g.disconnect()}},[B,ne]),(0,l.useLayoutEffect)(()=>{B||ne(w.current)},[B,e.length,H,ne]),(0,l.useEffect)(()=>{0===e.length&&D(!1)},[e.length]),(0,l.useEffect)(()=>{d(N)},[N,d]);const Ce=(0,l.useCallback)(e=>{if(B)return;ne(e.currentTarget);const t=!isNearBottom(e.currentTarget);D(e=>e===t?e:t)},[B,ne]);(0,l.useEffect)(()=>{const e=w.current;if(!e)return;const handleWheel=e=>{!B||e.deltaY>=0||(e.preventDefault(),u())};return e.addEventListener("wheel",handleWheel,{passive:!1}),()=>e.removeEventListener("wheel",handleWheel)},[B,u]);const oe=(0,l.useCallback)(e=>{if(!(e.target instanceof Element))return;const t=e.target.closest("a");if(!t||!e.currentTarget.contains(t))return;if(t.classList.contains("url_link"))return;const g=t.getAttribute("rel");g&&(e.preventDefault(),y(g))},[y]);return React.createElement(Wn,{component:"section",sx:{border:s?1:0,borderColor:"divider",borderRadius:s?1:0,display:"flex",flex:1,flexDirection:"column",minHeight:0,position:"relative"}},b&&N?React.createElement(Wn,{component:"div","data-testid":"scroll-lock-badge",role:"status",style:re,sx:{backgroundColor:"background.paper",border:1,borderColor:"divider",borderRadius:1,boxShadow:1,color:"text.secondary",fontSize:"0.75rem",px:1,py:.5,position:"absolute",top:8,zIndex:2}},"Scroll lock"):null,React.createElement(Wn,{className:te,component:"div",onClick:oe,"data-testid":x,onScroll:Ce,ref:w,style:ge,sx:v},React.createElement("div",{className:J,"data-testid":"virtual-scroll-spacer",style:$},q?e.map((e,n)=>React.createElement("div",{className:"nexgui4-transcript-row","data-index":n,key:g(e,n)},t(e,{fontSize:F,index:n,isActiveMatch:n===p}))):Y.map(g=>{const n=e[g.index];return null==n?null:React.createElement("div",{className:joinClassNames("nexgui4-transcript-row",B?"nexgui4-transcript-row--display":"nexgui4-transcript-row--panel"),"data-index":g.index,key:g.key,ref:K.measureElement,style:B?void 0:{transform:`translateY(${g.start}px)`}},t(n,{fontSize:F,index:g.index,isActiveMatch:g.index===p}))})),m))};TranscriptViewportComponent.displayName="TranscriptViewport",TranscriptViewportComponent.propTypes={activeMatchIndex:Yn.default.number,border:Yn.default.bool,displayPinKey:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),estimateSize:Yn.default.func,fallbackToAllItems:Yn.default.bool,fontFamily:Yn.default.string,fontSize:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),footer:Yn.default.node,getItemKey:Yn.default.func,itemKeyVersion:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),items:Yn.default.array.isRequired,mode:Yn.default.oneOf(["panel","display"]),onRequestHistory:Yn.default.func,onSendCommand:Yn.default.func,onScrollLockChange:Yn.default.func,overscan:Yn.default.number,renderItem:Yn.default.func.isRequired,showScrollLockBadge:Yn.default.bool,viewportSx:Yn.default.oneOfType([Yn.default.array,Yn.default.func,Yn.default.object]),viewportTestId:Yn.default.string};var IA=(0,l.forwardRef)(TranscriptViewportComponent);IA.displayName="TranscriptViewport",IA.propTypes=TranscriptViewportComponent.propTypes;var padTwo=e=>String(e).padStart(2,"0"),padThree=e=>String(e).padStart(3,"0"),formatNumericTimestamp=(e,t=!0)=>{const g=new Date(e),n=[padTwo(g.getHours()),padTwo(g.getMinutes()),padTwo(g.getSeconds())].join(":");return t?`${n}.${padThree(g.getMilliseconds())}`:n},resolveLabel=(e,t)=>"string"==typeof e&&e.length>0?e:Number.isFinite(e)?formatNumericTimestamp(e,t):null,resolveDateTime=e=>Number.isFinite(e)?new Date(e).toISOString():void 0,TimestampComponent=({timestamp:e,fontFamily:t=Ee,fontSize:g,highlight:n=!1,className:C="ng-timestamp timestamp mono no_out",includeMilliseconds:o=!0})=>{const I=resolveLabel(e,o);return null===I?null:React.createElement("time",{className:C,dateTime:resolveDateTime(e),style:n?{backgroundColor:"yellow",fontFamily:t,fontSize:g}:{fontFamily:t,fontSize:g}},I)};TimestampComponent.displayName="Timestamp",TimestampComponent.propTypes={className:Yn.default.string,fontFamily:Yn.default.string,fontSize:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),highlight:Yn.default.bool,includeMilliseconds:Yn.default.bool,timestamp:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired};var aA=(0,l.memo)(TimestampComponent);aA.displayName="Timestamp",aA.propTypes=TimestampComponent.propTypes;var iA=Yn.default.shape({content:Yn.default.node,id:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),isHtml:Yn.default.bool,timestamp:Yn.default.number}),renderContent=(e,t)=>null==e||!1===e?null:(0,l.isValidElement)(e)?e:t?React.createElement(qn,{component:"span",sx:{color:"text.primary",display:"inline",lineHeight:1.5},variant:"body2",dangerouslySetInnerHTML:{__html:e}}):React.createElement(qn,{component:"span",sx:{color:"text.primary",display:"inline",lineHeight:1.5},variant:"body2"},e),FeedEntryComponent=({entry:e,fontSize:t})=>React.createElement(Wn,{className:"feed-entry","data-feed-entry-id":e.id??void 0,sx:{alignItems:"flex-start",columnGap:1,display:"flex",minWidth:0,py:.5,width:"100%"}},Number.isFinite(e.timestamp)?React.createElement(aA,{timestamp:e.timestamp,fontSize:t,includeMilliseconds:!1}):null,React.createElement(Wn,{className:"feed-entry__content",sx:{flex:1,minWidth:0,overflowWrap:"anywhere"}},renderContent(e.content,e.isHtml)));FeedEntryComponent.displayName="FeedEntry",FeedEntryComponent.propTypes={entry:iA.isRequired,fontSize:Yn.default.oneOfType([Yn.default.number,Yn.default.string])};var sA=(0,l.memo)(FeedEntryComponent);sA.displayName="FeedEntry",sA.propTypes=FeedEntryComponent.propTypes;var getFlipTransform$9=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},PanelBackgroundComponent=({backgroundClassName:e,children:t=null,component:g="div",contentClassName:n,contentSx:C,sx:o,...I})=>{const a=useTheme$1(),[i]=(0,l.useState)(()=>Math.floor(4*Math.random())),s=a?.nexGui?.backgroundImage??"",c=a?.nexGui?.backgroundOpacity??.5,u=a?.nexGui?.backgroundFilter??"none";return React.createElement(Wn,{component:g,sx:[{display:"flex",flex:1,height:"100%",minHeight:0,minWidth:0,overflow:"hidden",position:"relative",width:"100%"},o],...I},s?React.createElement(Wn,{"aria-hidden":"true",className:e,sx:{backgroundImage:`url(${s})`,backgroundPosition:"center",backgroundSize:"cover",filter:u,inset:0,opacity:c,position:"absolute",transform:getFlipTransform$9(i),zIndex:0}}):null,React.createElement(Wn,{className:n,sx:[{display:"flex",flex:1,minHeight:0,minWidth:0,position:"relative",zIndex:1},C]},t))};PanelBackgroundComponent.displayName="PanelBackground",PanelBackgroundComponent.propTypes={backgroundClassName:Yn.default.string,children:Yn.default.node,component:Yn.default.elementType,contentClassName:Yn.default.string,contentSx:Yn.default.oneOfType([Yn.default.array,Yn.default.func,Yn.default.object]),sx:Yn.default.oneOfType([Yn.default.array,Yn.default.func,Yn.default.object])};var lA=(0,l.memo)(PanelBackgroundComponent);lA.displayName="PanelBackground",lA.propTypes=PanelBackgroundComponent.propTypes;var noopSubscribe$1=()=>()=>{},getModelVersion$1=e=>"function"==typeof e?.getVersion?e.getVersion():0,selectEntries=e=>e.entries,colorEntry=(e,t)=>{if("string"!=typeof e?.content||0===e.content.length||"function"!=typeof t)return e;const{content:g,isHtml:n}=t(e.content);return g!==e.content||n?{...e,content:g,isHtml:n}:e},useFeed=()=>{const{stores:e,playerDirectory:t,playerRelationships:g,formatInlineNames:n}=useNexGui(),C=e.feed(selectEntries),o=(0,l.useMemo)(()=>({subscribe:e=>{const n=t?.subscribePlayerDirectory?.(e)??noopSubscribe$1(),C=g?.subscribePlayerRelationships?.(e)??noopSubscribe$1();return()=>{n?.(),C?.()}},getSnapshot:()=>`${getModelVersion$1(t)}:${getModelVersion$1(g)}`}),[t,g]),I=(0,l.useSyncExternalStore)(o.subscribe,o.getSnapshot,o.getSnapshot),a=(0,l.useRef)(null);return null===a.current&&(a.current=new WeakMap),{entries:(0,l.useMemo)(()=>{const e=a.current;return C.map(t=>{if(null===t||"object"!=typeof t)return t;const g=e.get(t);if(g&&g.version===I)return g.value;const C=colorEntry(t,n);return g&&g.value.content===C.content&&g.value.isHtml===C.isHtml?(e.set(t,{version:I,value:g.value}),g.value):(e.set(t,{version:I,value:C}),C)})},[C,I,n])}},GameFeedInner=()=>{const e=useTheme$1(),{entries:t}=useFeed(),g=t.at(-1)?.id??t.length,n=(0,l.useCallback)((e,{fontSize:t}={})=>React.createElement(sA,{entry:e,fontSize:t}),[]);return 0===t.length?React.createElement(lA,{backgroundClassName:"game-feed__background",className:"game-feed game-feed--empty",contentClassName:"game-feed__content",contentSx:{alignItems:"center",color:"text.secondary",justifyContent:"center",p:2}},React.createElement(qn,{variant:"body2"},"No feed entries")):React.createElement(lA,{backgroundClassName:"game-feed__background",className:"game-feed",contentClassName:"game-feed__content",contentSx:{minHeight:0}},React.createElement(IA,{itemKeyVersion:g,items:t,fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize,renderItem:n,showScrollLockBadge:!1,viewportSx:{p:1}}))};GameFeedInner.displayName="GameFeedInner";var GameFeed=()=>React.createElement(Jn,{panelName:"GameFeed"},React.createElement(GameFeedInner,null));GameFeed.displayName="GameFeed";var noop$4=()=>{},cA="nexgui4-structured-stream-panel__timestamp ng-timestamp timestamp mono no_out",uA=Yn.default.shape({hasMXP:Yn.default.bool.isRequired,html:Yn.default.string.isRequired,id:Yn.default.number.isRequired,timestamp:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired}),buildLineClassName$1=e=>["nexgui4-structured-stream-panel__line",e.isMonospace?"mono":null].filter(Boolean).join(" "),StructuredStreamRowComponent=({line:e,onSendCommand:t=noop$4})=>{const handleMXP=e=>{if(!(e.target instanceof Element))return;const g=e.target.closest("a");if(!g||!e.currentTarget.contains(g))return;if(g.classList.contains("url_link"))return;const n=g.getAttribute("rel");n&&(e.preventDefault(),t(n))};return React.createElement(Wn,{component:"div",className:buildLineClassName$1(e),"data-stream-entry-id":e.id,onClick:e.hasMXP?handleMXP:null,sx:{alignItems:"baseline",columnGap:"0.5rem",display:"grid",gridTemplateColumns:"12ch minmax(0, 1fr)",minWidth:0,width:"100%",zIndex:1,"& .nexgui4-structured-stream-panel__payload":{minWidth:0,overflowWrap:"anywhere"},"& .nexgui4-stream-row":{alignItems:"baseline",display:"grid",gridTemplateColumns:"auto minmax(0, 1fr)",columnGap:"0.5rem",width:"100%"},"& .nexgui4-replacement-row":{width:"100%"}}},React.createElement(aA,{className:cA,fontFamily:"inherit",timestamp:e.timestamp}),React.createElement(Wn,{component:"span",className:"nexgui4-structured-stream-panel__payload",dangerouslySetInnerHTML:{__html:e.html}}))};StructuredStreamRowComponent.displayName="StructuredStreamRow",StructuredStreamRowComponent.propTypes={line:uA.isRequired,onSendCommand:Yn.default.func};var dA=(0,l.memo)(StructuredStreamRowComponent);dA.displayName="StructuredStreamRow",dA.propTypes=StructuredStreamRowComponent.propTypes;var StructuredStreamPanelComponent=({items:e,itemKeyVersion:t=null,onSendCommand:g=noop$4})=>{const n=useTheme$1(),C=(0,l.useCallback)(e=>React.createElement(dA,{line:e,onSendCommand:g}),[g]);return React.createElement(lA,{backgroundClassName:"nexgui4-structured-stream-panel__background",component:"section",contentClassName:"nexgui4-structured-stream-panel__content",contentSx:{color:"text.primary",fontFamily:"inherit",fontSize:"inherit"},"data-testid":"structured-stream-panel"},React.createElement(IA,{fontFamily:n.typography.fontFamily,fontSize:n.typography.fontSize,itemKeyVersion:t,items:e,renderItem:C,showScrollLockBadge:!1,viewportSx:{p:"5px"}}))};StructuredStreamPanelComponent.displayName="StructuredStreamPanel",StructuredStreamPanelComponent.propTypes={itemKeyVersion:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),items:Yn.default.arrayOf(uA).isRequired,onSendCommand:Yn.default.func};var pA=(0,l.memo)(StructuredStreamPanelComponent);pA.displayName="StructuredStreamPanel",pA.propTypes=StructuredStreamPanelComponent.propTypes;var mA=new WeakMap,assertTranscriptModel=e=>{if(!e||"function"!=typeof e.subscribe||"function"!=typeof e.getSnapshot)throw new Error("useTranscript requires a transcript model with subscribe(listener) and getSnapshot().")},getTranscriptModelBindings=e=>{assertTranscriptModel(e);let t=mA.get(e);if(!t){const subscribe=t=>e.subscribe(t),getSnapshot=()=>e.getSnapshot();t=Object.freeze({subscribe,getSnapshot}),mA.set(e,t)}return t},useTranscript=e=>{const{subscribe:t,getSnapshot:g}=getTranscriptModelBindings(e),n=(0,l.useSyncExternalStore)(t,g,g);return{version:n.version,items:n.items,totalLines:n.totalLines}},CombatStreamInner=()=>{const{adapter:e,stores:t}=useNexGui(),{items:g,version:n}=useTranscript(t.combatStream),C=(0,l.useCallback)(t=>e.send(t),[e]);return React.createElement(pA,{itemKeyVersion:n,items:g,onSendCommand:C})};CombatStreamInner.displayName="CombatStreamInner";var CombatStream=()=>React.createElement(Jn,{panelName:"Combat Stream"},React.createElement(CombatStreamInner,null));function useForkRef(...e){const t=l.useRef(void 0),g=l.useCallback(t=>{const g=e.map(e=>{if(null==e)return null;if("function"==typeof e){const g=e,n=g(t);return"function"==typeof n?n:()=>{g(null)}}return e.current=t,()=>{e.current=null}});return()=>{g.forEach(e=>e?.())}},e);return l.useMemo(()=>e.every(e=>null==e)?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=g(e))},e)}function isHostComponent(e){return"string"==typeof e}function appendOwnerState(e,t,g){return void 0===e||isHostComponent(e)?t:{...t,ownerState:{...t.ownerState,...g}}}function isEventHandler(e,t){const g=e.charCodeAt(2);return"o"===e[0]&&"n"===e[1]&&g>=65&&g<=90&&"function"==typeof t}function extractEventHandlers(e){if(void 0===e)return{};const t={};for(const g of Object.keys(e))isEventHandler(g,e[g])&&(t[g]=e[g]);return t}function omitEventHandlers(e){if(void 0===e)return{};const t={};return Object.keys(e).filter(t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t])).forEach(g=>{t[g]=e[g]}),t}function mergeSlotProps$1(e){const{getSlotProps:t,additionalProps:g,externalSlotProps:n,externalForwardedProps:C,className:o}=e;if(!t){const e=clsx(g?.className,o,C?.className,n?.className),t={...g?.style,...C?.style,...n?.style},I={...g,...C,...n};return e.length>0&&(I.className=e),Object.keys(t).length>0&&(I.style=t),{props:I,internalRef:void 0}}const I=extractEventHandlers({...C,...n}),a=omitEventHandlers(n),i=omitEventHandlers(C),s=t(I),l=clsx(s?.className,g?.className,o,C?.className,n?.className),c={...s?.style,...g?.style,...C?.style,...n?.style},u={...s,...g,...i,...a};return l.length>0&&(u.className=l),Object.keys(c).length>0&&(u.style=c),{props:u,internalRef:s.ref}}function resolveComponentProps(e,t,g){return"function"==typeof e?e(t,g):e}function useSlotProps(e){const{elementType:t,externalSlotProps:g,ownerState:n,skipResolvingSlotProps:C=!1,...o}=e,I=C?{}:resolveComponentProps(g,n),{props:a,internalRef:i}=mergeSlotProps$1({...o,externalSlotProps:I});return appendOwnerState(t,{...a,ref:useForkRef(i,I?.ref,e.additionalProps?.ref)},n)}CombatStream.displayName="CombatStream";var fA=l.createContext(void 0);function useRovingTabIndexContext(){const e=l.useContext(fA);if(void 0===e)throw new Error("MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.");return e}var hA=Object.is;function fastObjectShallowCompare(e,t){if(e===t)return!0;if(!(e instanceof Object&&t instanceof Object))return!1;let g=0,n=0;for(const C in e){if(g+=1,!hA(e[C],t[C]))return!1;if(!(C in t))return!1}for(const C in t)n+=1;return g===n}function activeElement(e){let t=e.activeElement;for(;null!=t?.shadowRoot?.activeElement;)t=t.shadowRoot.activeElement;return t}function ownerDocument(e){return e&&e.ownerDocument||document}function setRef(e,t){"function"==typeof e?e(t):e&&(e.current=t)}function useEventCallback(e){const t=l.useRef(e);return Qr(()=>{t.current=e}),l.useRef((...e)=>(0,t.current)(...e)).current}var yA=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown","Home","End"];function useRovingTabIndexRoot(e){const{activeItemId:t,getDefaultActiveItemId:g,orientation:n,isRtl:C=!1,isItemFocusable:o=isItemFocusable,wrap:I=!0}=e,[a,i]=l.useState(t),s=l.useRef(t);let c=a;t!==s.current&&(s.current=t,void 0!==t&&t!==a&&(c=t,i(t)));const u=l.useRef(null),d=l.useRef(new Map),[p,m]=l.useState(0),h=resolveActiveItemId(c,l.useMemo(()=>getOrderedItems(d.current),[p]),o,g),y=l.useRef(h);y.current=h;const b=l.useCallback(()=>{const e=getOrderedItems(d.current);return getItemById(e,resolveActiveItemId(y.current,e,o,g))},[g,o]),v=l.useCallback(()=>d.current,[]),x=useEventCallback(e=>{fastObjectShallowCompare(d.current.get(e.id)??null,e)||(d.current.set(e.id,e),m(e=>e+1))}),S=useEventCallback(e=>{d.current.delete(e)&&m(e=>e+1)}),w=useEventCallback(e=>{i(e)}),E=l.useCallback(e=>y.current===e,[]),R=l.useCallback((e,t,g,n)=>{const C=getNextActiveItem(getNavigableItemsSnapshot(d.current),e,t,g,n??o);return C?(C.element?.focus(),i(C.id),C):null},[o]),M=l.useCallback(e=>({onFocus:e=>{const t=getNavigableItemsSnapshot(d.current),g=findItemIndexByElement(t,e.target);-1!==g&&i(t[g].id)},onKeyDown:e=>{if(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)return;if(!yA.includes(e.key))return;let t="horizontal"===n?"ArrowLeft":"ArrowUp",g="horizontal"===n?"ArrowRight":"ArrowDown";"horizontal"===n&&C&&(t="ArrowRight",g="ArrowLeft");const o=getNavigableItemsSnapshot(d.current),a=activeElement(ownerDocument(u.current)),i=a===u.current;let s=getCurrentActiveItemIndex(o,a,y.current),l="next";switch(e.key){case t:l="previous",e.preventDefault(),i&&(s=o.length);break;case g:e.preventDefault(),i&&(s=-1);break;case"Home":e.preventDefault(),s=-1;break;case"End":e.preventDefault(),l="previous",s=o.length;break;default:return}R(s,l,I)},ref:handleRefs(e,e=>{u.current=e})}),[R,C,n,I]),T=l.useCallback(e=>{const t=getNavigableItemsSnapshot(d.current),g=activeElement(ownerDocument(u.current));return R(g===u.current?-1:getCurrentActiveItemIndex(t,g,y.current),"next",!0,e)?.id??null},[R]);return l.useMemo(()=>({activeItemId:h,focusNext:T,getActiveItem:b,getContainerProps:M,getItemMap:v,isItemActive:E,registerItem:x,setActiveItemId:w,unregisterItem:S}),[h,T,b,M,v,E,x,w,S])}function useRovingTabIndexItem(e){const{activeItemId:t,registerItem:g,unregisterItem:n}=useRovingTabIndexContext(),C=l.useRef(null),o=l.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),I=l.useRef(o);I.current=o;const a=l.useCallback(t=>{C.current=t,null!=t?g({...I.current,element:t}):queueMicrotask(()=>{null==C.current&&n(e.id)})},[e.id,g,n]),i=useForkRef(e.ref,a);return Qr(()=>{C.current&&g({...o,element:C.current})},[o,g]),Qr(()=>{const t=e.id;return()=>{n(t)}},[e.id,n]),{ref:i,tabIndex:t===e.id?0:-1}}function resolveActiveItemId(e,t,g,n){return null!=e?resolveRequestedItemId(e,t,g):resolveDefaultItemId(t,g,n)}function resolveRequestedItemId(e,t,g){const n=findItemIndexById(t,e);return-1===n?getFirstFocusableItemId(t,g):g(t[n])?t[n].id:getNextActiveItem(t,n,"next",!1,g)?.id??null}function resolveDefaultItemId(e,t,g){const n=g?.(e);if(null!=n){const g=getItemById(e,n);if(g&&t(g))return g.id}return getFirstFocusableItemId(e,t)}function getCurrentActiveItemIndex(e,t,g){if(t){const g=findItemIndexByElement(e,t);if(-1!==g)return g}return findItemIndexById(e,g)}function getNextActiveItem(e,t,g,n,C){const o=e.length-1;if(-1===o)return null;let I=!1,a=getNextIndex(t,o,g,n);const i=a;for(;-1!==a;){if(a===i){if(I)return null;I=!0}const t=e[a];if(t&&C(t))return t;a=getNextIndex(a,o,g,n)}return null}function getFirstFocusableItemId(e,t){return e.find(e=>t(e))?.id??null}function getItemById(e,t){return null==t?null:e.find(e=>e.id===t)??null}function findItemIndexById(e,t){return null==t?-1:e.findIndex(e=>e.id===t)}function findItemIndexByElement(e,t){return t?e.findIndex(e=>e.element===t||e.element?.contains(t)):-1}function getOrderedItems(e){const t=Array.from(e.values());return t.every(e=>null==e.element)?t:[...t.filter(isConnectedItem).sort((e,t)=>sortByDocumentPosition(e.element,t.element)),...t.filter(e=>!isConnectedItem(e))]}function getNavigableItemsSnapshot(e){return getOrderedItems(e).filter(isConnectedItem)}function getNextIndex(e,t,g,n=!0){return"next"===g?e===t?n?0:-1:e+1:0===e?n?t:-1:e-1}function isItemFocusable(e){return!!e.element&&(!!e.focusableWhenDisabled||!e.disabled&&!e.element.hasAttribute("disabled")&&"true"!==e.element.getAttribute("aria-disabled")&&e.element.hasAttribute("tabindex"))}function isConnectedItem(e){return null!=e.element&&e.element.isConnected}function sortByDocumentPosition(e,t){if(e===t)return 0;const g=e.compareDocumentPosition(t);return g&Node.DOCUMENT_POSITION_FOLLOWING||g&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:g&Node.DOCUMENT_POSITION_PRECEDING||g&Node.DOCUMENT_POSITION_CONTAINS?1:0}function handleRefs(...e){return t=>{e.forEach(e=>{setRef(e??null,t)})}}function contains$1(e,t){if(!e||!t)return!1;if(e.contains(t))return!0;const g=t.getRootNode?.();if(g&&g instanceof ShadowRoot){let g=t;for(;g;){if(e===g)return!0;g=g.parentNode??g.host??null}}return!1}var bA=contains$1,vA=ownerDocument,xA=activeElement;function getScrollbarSize(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}var SA=getScrollbarSize;function focusWithVisible(e,t){if(null!=t)try{e.focus({focusVisible:"keyboard"===t})}catch(g){e.focus()}else e.focus()}var wA=useEventCallback,EA=useForkRef,RA=Qr;function ownerWindow(e){return ownerDocument(e).defaultView||window}var kA=ownerWindow,MA=l.createContext({});function getListUtilityClass(e){return generateUtilityClass("MuiList",e)}generateUtilityClasses("MuiList",["root","padding","dense","subheader"]);var useUtilityClasses$36=e=>{const{classes:t,disablePadding:g,dense:n,subheader:C}=e;return composeClasses({root:["root",!g&&"padding",n&&"dense",C&&"subheader"]},getListUtilityClass,t)},TA=On("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,!g.disablePadding&&t.padding,g.dense&&t.dense,g.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0,isolation:"isolate"}}]}),PA=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiList"}),{children:n,className:C,component:o="ul",dense:I=!1,disablePadding:a=!1,subheader:i,...s}=g,c=l.useMemo(()=>({dense:I}),[I]),u={...g,component:o,dense:I,disablePadding:a},d=useUtilityClasses$36(u);return(0,gr.jsx)(MA.Provider,{value:c,children:(0,gr.jsxs)(TA,{as:o,className:clsx(d.root,C),ref:t,ownerState:u,...s,children:[i,n]})})});function getOpenInteractionType(e){return e?"mousedown"===e.type||"pointerdown"===e.type||"touchstart"===e.type?"pointer":"keydown"===e.type||"click"===e.type&&0===e.detail?"keyboard":null:null}function isEmpty$1(e){return null==e||"string"==typeof e&&!e.trim()}function areEqualValues(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}var NA=l.createContext(null);function useSelectFocusSource(){return l.useContext(NA)}var DA=NA.Provider,OA=l.createContext(void 0);function useMenuListContext(){const e=l.useContext(OA);if(void 0===e)throw new Error("MUI: MenuListContext is missing. MenuItems must be placed within Menu or MenuList.");return e}function getItemText(e){const t=e?.element??e;if(!t)return"";if(void 0!==e?.textValue)return e.textValue;let g=t.innerText;return void 0===g&&(g=t.textContent),g??""}function textCriteriaMatches(e,t){if(void 0===t)return!0;let g=getItemText(e);return g=g.trim().toLowerCase(),0!==g.length&&(t.repeating?g[0]===t.keys[0]:g.startsWith(t.keys.join("")))}function isItemFocusableWithTextCriteria(e,t){return!!textCriteriaMatches(e,t)&&isItemFocusable(e)}function focusInitialItem(e,t){focusWithVisible(e,t)}var jA=l.forwardRef(function(e,t){const{actions:g,autoFocus:n=!1,autoFocusItem:C=!1,children:o,className:I,disabledItemsFocusable:a=!1,disableListWrap:i=!1,onKeyDown:s,variant:c="selectedMenu",...u}=e,d=l.useRef(null),p=l.useRef(!1),[m,h]=l.useState(!1),y=useSelectFocusSource(),b=l.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null}),v=useRovingTabIndexRoot({activeItemId:void 0,getDefaultActiveItemId:l.useCallback(e=>"selectedMenu"===c?e.find(e=>e.selected&&isItemFocusable(e))?.id??e.find(e=>isItemFocusable(e))?.id??null:e.find(e=>isItemFocusable(e))?.id??null,[c]),orientation:"vertical",wrap:!i}),{activeItemId:x,focusNext:S,getActiveItem:w,getContainerProps:E,getItemMap:R}=v,M=wA((e=!1)=>{if(!d.current||!e&&p.current)return null;if(C){const e=w();if(e?.element){const t=Array.from(R().values()).some(e=>e.selected);return h("menu"===c&&t&&!e.selected&&null==y),focusInitialItem(e.element,y),p.current=!0,e.element}return n?(h(!1),d.current.focus(),d.current):null}return n?(h(!1),d.current.focus(),p.current=!0,d.current):(h(!1),null)});RA(()=>{if(!n&&!C)return p.current=!1,void h(!1);M()},[x,C,n,M]),l.useImperativeHandle(g,()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const g=!d.current.style.width;if(e.clientHeight<d.current.clientHeight&&g){const g=`${SA(kA(e))}px`;d.current.style["rtl"===t?"paddingLeft":"paddingRight"]=g,d.current.style.width=`calc(100% + ${g})`}return d.current},focusInitialTarget:()=>{if(!d.current)return null;const e=xA(vA(d.current));return e&&bA(d.current,e)?e:M(!0)}}),[M]);const T=E(),P=EA(d,T.ref,t),N=l.useMemo(()=>({itemsFocusableWhenDisabled:a,suppressInitialFocusVisible:m,variant:c}),[a,m,c]);return(0,gr.jsx)(PA,{role:"menu",ref:P,className:I,onKeyDown:wA(e=>{if(m&&h(!1),(e.ctrlKey||e.metaKey||e.altKey)&&s)s(e);else{if(T.onKeyDown(e),1===e.key.length){const t=b.current,g=e.key.toLowerCase(),n=performance.now();t.keys.length>0&&(n-t.lastTime>500?(t.keys=[],t.repeating=!0,t.previousKeyMatched=!0):t.repeating&&g!==t.keys[0]&&(t.repeating=!1)),t.lastTime=n,t.keys.push(g);const C=xA(vA(d.current)),o=C&&!t.repeating&&textCriteriaMatches(C,t);t.previousKeyMatched&&(o||null!=S(e=>isItemFocusableWithTextCriteria(e,t)))?e.preventDefault():t.previousKeyMatched=!1}s&&s(e)}}),onFocus:T.onFocus,tabIndex:-1,...u,children:(0,gr.jsx)(OA.Provider,{value:N,children:(0,gr.jsx)(fA.Provider,{value:v,children:o})})})});function debounce$1(e,t=166){let g;function debounced(...n){const later=()=>{e.apply(this,n)};clearTimeout(g),g=setTimeout(later,t)}return debounced.clear=()=>{clearTimeout(g)},debounced}var zA=debounce$1,GA={};function useLazyRef(e,t){const g=l.useRef(GA);return g.current===GA&&(g.current=e(t)),g}var LA=[];function useOnMount(e){l.useEffect(e,LA)}var BA=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function useTimeout(){const e=useLazyRef(BA.create).current;return useOnMount(e.disposeEffect),e}function getReactElementRef(e){return parseInt(l.version,10)>=19?e?.props?.ref||null:e?.ref||null}function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var g={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;g[n]=e[n]}return g}function _setPrototypeOf(e,t){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_setPrototypeOf(e,t)}function _inheritsLoose(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_setPrototypeOf(e,t)}var FA={disabled:!1},WA=t.default.createContext(null),forceReflow=function(e){return e.scrollTop},VA="unmounted",UA="exited",KA="entering",HA="entered",YA="exiting",ZA=function(e){function Transition(t,g){var n,C=e.call(this,t,g)||this,o=g&&!g.isMounting?t.enter:t.appear;return C.appearStatus=null,t.in?o?(n=UA,C.appearStatus=KA):n=HA:n=t.unmountOnExit||t.mountOnEnter?VA:UA,C.state={status:n},C.nextCallback=null,C}_inheritsLoose(Transition,e),Transition.getDerivedStateFromProps=function(e,t){return e.in&&"unmounted"===t.status?{status:UA}:null};var g=Transition.prototype;return g.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},g.componentDidUpdate=function(e){var t=null;if(e!==this.props){var g=this.state.status;this.props.in?"entering"!==g&&"entered"!==g&&(t=KA):"entering"!==g&&"entered"!==g||(t=YA)}this.updateStatus(!1,t)},g.componentWillUnmount=function(){this.cancelNextCallback()},g.getTimeouts=function(){var e,t,g=this.props.timeout,n=e=t=g;return null!=g&&"number"!=typeof g&&(n=g.exit,e=g.enter,t=void 0!==g.appear?g.appear:e),{exit:n,enter:e,appear:t}},g.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),"entering"===t){if(this.props.unmountOnExit||this.props.mountOnEnter){var g=this.props.nodeRef?this.props.nodeRef.current:n.default.findDOMNode(this);g&&forceReflow(g)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&"exited"===this.state.status&&this.setState({status:VA})},g.performEnter=function(e){var t=this,g=this.props.enter,C=this.context?this.context.isMounting:e,o=this.props.nodeRef?[C]:[n.default.findDOMNode(this),C],I=o[0],a=o[1],i=this.getTimeouts(),s=C?i.appear:i.enter;!e&&!g||FA.disabled?this.safeSetState({status:HA},function(){t.props.onEntered(I)}):(this.props.onEnter(I,a),this.safeSetState({status:KA},function(){t.props.onEntering(I,a),t.onTransitionEnd(s,function(){t.safeSetState({status:HA},function(){t.props.onEntered(I,a)})})}))},g.performExit=function(){var e=this,t=this.props.exit,g=this.getTimeouts(),C=this.props.nodeRef?void 0:n.default.findDOMNode(this);t&&!FA.disabled?(this.props.onExit(C),this.safeSetState({status:YA},function(){e.props.onExiting(C),e.onTransitionEnd(g.exit,function(){e.safeSetState({status:UA},function(){e.props.onExited(C)})})})):this.safeSetState({status:UA},function(){e.props.onExited(C)})},g.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},g.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},g.setNextCallback=function(e){var t=this,g=!0;return this.nextCallback=function(n){g&&(g=!1,t.nextCallback=null,e(n))},this.nextCallback.cancel=function(){g=!1},this.nextCallback},g.onTransitionEnd=function(e,t){this.setNextCallback(t);var g=this.props.nodeRef?this.props.nodeRef.current:n.default.findDOMNode(this),C=null==e&&!this.props.addEndListener;if(g&&!C){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[g,this.nextCallback],I=o[0],a=o[1];this.props.addEndListener(I,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},g.render=function(){var e=this.state.status;if("unmounted"===e)return null;var g=this.props,n=g.children;g.in,g.mountOnEnter,g.unmountOnExit,g.appear,g.enter,g.exit,g.timeout,g.addEndListener,g.onEnter,g.onEntering,g.onEntered,g.onExit,g.onExiting,g.onExited,g.nodeRef;var C=_objectWithoutPropertiesLoose(g,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return t.default.createElement(WA.Provider,{value:null},"function"==typeof n?n(e,C):t.default.cloneElement(t.default.Children.only(n),C))},Transition}(t.default.Component);function noop$3(){}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function getChildMapping(e,g){var mapper=function(e){return g&&(0,t.isValidElement)(e)?g(e):e},n=Object.create(null);return e&&t.Children.map(e,function(e){return e}).forEach(function(e){n[e.key]=mapper(e)}),n}function mergeChildMappings(e,t){function getValueForKey(g){return g in t?t[g]:e[g]}e=e||{},t=t||{};var g,n=Object.create(null),C=[];for(var o in e)o in t?C.length&&(n[o]=C,C=[]):C.push(o);var I={};for(var a in t){if(n[a])for(g=0;g<n[a].length;g++){var i=n[a][g];I[n[a][g]]=getValueForKey(i)}I[a]=getValueForKey(a)}for(g=0;g<C.length;g++)I[C[g]]=getValueForKey(C[g]);return I}function getProp(e,t,g){return null!=g[t]?g[t]:e.props[t]}function getInitialChildMapping(e,g){return getChildMapping(e.children,function(n){return(0,t.cloneElement)(n,{onExited:g.bind(null,n),in:!0,appear:getProp(n,"appear",e),enter:getProp(n,"enter",e),exit:getProp(n,"exit",e)})})}function getNextChildMapping(e,g,n){var C=getChildMapping(e.children),o=mergeChildMappings(g,C);return Object.keys(o).forEach(function(I){var a=o[I];if((0,t.isValidElement)(a)){var i=I in g,s=I in C,l=g[I],c=(0,t.isValidElement)(l)&&!l.props.in;!s||i&&!c?s||!i||c?s&&i&&(0,t.isValidElement)(l)&&(o[I]=(0,t.cloneElement)(a,{onExited:n.bind(null,a),in:l.props.in,exit:getProp(a,"exit",e),enter:getProp(a,"enter",e)})):o[I]=(0,t.cloneElement)(a,{in:!1}):o[I]=(0,t.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:getProp(a,"exit",e),enter:getProp(a,"enter",e)})}}),o}ZA.contextType=WA,ZA.propTypes={},ZA.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:noop$3,onEntering:noop$3,onEntered:noop$3,onExit:noop$3,onExiting:noop$3,onExited:noop$3},ZA.UNMOUNTED=VA,ZA.EXITED=UA,ZA.ENTERING=KA,ZA.ENTERED=HA,ZA.EXITING=YA;var QA=Object.values||function(e){return Object.keys(e).map(function(t){return e[t]})},XA={component:"div",childFactory:function(e){return e}},_A=function(e){function TransitionGroup(t,g){var n=e.call(this,t,g)||this;return n.state={contextValue:{isMounting:!0},handleExited:n.handleExited.bind(_assertThisInitialized(n)),firstRender:!0},n}_inheritsLoose(TransitionGroup,e);var g=TransitionGroup.prototype;return g.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},g.componentWillUnmount=function(){this.mounted=!1},TransitionGroup.getDerivedStateFromProps=function(e,t){var g=t.children,n=t.handleExited;return{children:t.firstRender?getInitialChildMapping(e,n):getNextChildMapping(e,g,n),firstRender:!1}},g.handleExited=function(e,t){var g=getChildMapping(this.props.children);e.key in g||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState(function(t){var g=_extends({},t.children);return delete g[e.key],{children:g}}))},g.render=function(){var e=this.props,g=e.component,n=e.childFactory,C=_objectWithoutPropertiesLoose(e,["component","childFactory"]),o=this.state.contextValue,I=QA(this.state.children).map(n);return delete C.appear,delete C.enter,delete C.exit,null===g?t.default.createElement(WA.Provider,{value:o},I):t.default.createElement(WA.Provider,{value:o},t.default.createElement(g,C,I))},TransitionGroup}(t.default.Component);_A.propTypes={},_A.defaultProps=XA;var reflow=e=>e.scrollTop;function normalizedTransitionCallback(e,t){return g=>{if(t){const n=e.current;void 0===g?t(n):t(n,g)}}}function getTransitionChildStyle(e,t,g,n,C,o){const I="exited"!==e||t?g[e]||g.exited:n;return C||o?{...I,...C,...o}:I}function getTransitionProps(e,t){const{timeout:g,easing:n,style:C={}}=e;return{duration:C.transitionDuration??("number"==typeof g?g:g[t.mode]||0),easing:C.transitionTimingFunction??("object"==typeof n?n[t.mode]:n),delay:C.transitionDelay}}function getScale(e){return`scale(${e}, ${e**2})`}var qA={entering:{opacity:1,transform:getScale(1)},entered:{opacity:1,transform:"none"},exiting:{opacity:0,transform:getScale(.75)},exited:{opacity:0,transform:getScale(.75)}},JA={opacity:0,transform:getScale(.75),visibility:"hidden"},$A=l.forwardRef(function(e,t){const{addEndListener:g,appear:n=!0,children:C,easing:o,in:I,onEnter:a,onEntered:i,onEntering:s,onExit:c,onExited:u,onExiting:d,style:p,timeout:m="auto",...h}=e,y=useTimeout(),b=l.useRef(),v=useTheme$1(),x=l.useRef(null),S=EA(x,getReactElementRef(C),t),w=normalizedTransitionCallback(x,s),E=normalizedTransitionCallback(x,(e,t)=>{reflow(e);const{duration:g,delay:n,easing:C}=getTransitionProps({style:p,timeout:m,easing:o},{mode:"enter"});let I;"auto"===m?(I=v.transitions.getAutoHeightDuration(e.clientHeight),b.current=I):I=g,e.style.transition=[v.transitions.create("opacity",{duration:I,delay:n}),v.transitions.create("transform",{duration:.666*I,delay:n,easing:C})].join(","),a&&a(e,t)}),R=normalizedTransitionCallback(x,i),M=normalizedTransitionCallback(x,d),T=normalizedTransitionCallback(x,e=>{const{duration:t,delay:g,easing:n}=getTransitionProps({style:p,timeout:m,easing:o},{mode:"exit"});let C;"auto"===m?(C=v.transitions.getAutoHeightDuration(e.clientHeight),b.current=C):C=t,e.style.transition=[v.transitions.create("opacity",{duration:C,delay:g}),v.transitions.create("transform",{duration:.666*C,delay:g||.333*C,easing:n})].join(","),e.style.opacity=0,e.style.transform=getScale(.75),c&&c(e)}),P=normalizedTransitionCallback(x,e=>{e.style.transition="",u&&u(e)}),handleAddEndListener=e=>{"auto"===m&&y.start(b.current||0,e),g&&g(x.current,e)};return(0,gr.jsx)(ZA,{appear:n,in:I,nodeRef:x,onEnter:E,onEntered:R,onEntering:w,onExit:T,onExited:P,onExiting:M,addEndListener:handleAddEndListener,timeout:"auto"===m?null:m,...h,children:(e,{ownerState:t,...g})=>{const n=getTransitionChildStyle(e,I,qA,JA,p,C.props.style);return l.cloneElement(C,{style:n,ref:S,...g})}})});function isOverflowing(e){const t=ownerDocument(e);return t.body===e?ownerWindow(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function ariaHidden(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function getPaddingRight(e){return parseFloat(ownerWindow(e).getComputedStyle(e).paddingRight)||0}function isAriaHiddenForbiddenOnElement(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),g="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||g}function ariaHiddenSiblings(e,t,g,n,C){const o=[t,g,...n];[].forEach.call(e.children,e=>{const t=!o.includes(e),g=!isAriaHiddenForbiddenOnElement(e);t&&g&&ariaHidden(e,C)})}function findIndexOf(e,t){let g=-1;return e.some((e,n)=>!!t(e)&&(g=n,!0)),g}function handleContainer(e,t){const g=[],n=e.container;if(!t.disableScrollLock){if(isOverflowing(n)){const e=getScrollbarSize(ownerWindow(n));g.push({value:n.style.paddingRight,property:"padding-right",el:n}),n.style.paddingRight=`${getPaddingRight(n)+e}px`;const t=ownerDocument(n).querySelectorAll(".mui-fixed");[].forEach.call(t,t=>{g.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${getPaddingRight(t)+e}px`})}let e;if(n.parentNode instanceof DocumentFragment)e=ownerDocument(n).body;else{const t=n.parentElement,g=ownerWindow(n);e="HTML"===t?.nodeName&&"scroll"===g.getComputedStyle(t).overflowY?t:n}g.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{g.forEach(({value:e,el:t,property:g})=>{e?t.style.setProperty(g,e):t.style.removeProperty(g)})}}function getHiddenSiblings(e){const t=[];return[].forEach.call(e.children,e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)}),t}$A&&($A.muiSupportAuto=!0);var eC=class{constructor(){this.modals=[],this.containers=[]}add(e,t){let g=this.modals.indexOf(e);if(-1!==g)return g;g=this.modals.length,this.modals.push(e),e.modalRef&&ariaHidden(e.modalRef,!1);const n=getHiddenSiblings(t);ariaHiddenSiblings(t,e.mount,e.modalRef,n,!0);const C=findIndexOf(this.containers,e=>e.container===t);return-1!==C?(this.containers[C].modals.push(e),g):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:n}),g)}mount(e,t){const g=findIndexOf(this.containers,t=>t.modals.includes(e)),n=this.containers[g];n.restore||(n.restore=handleContainer(n,t))}remove(e,t=!0){const g=this.modals.indexOf(e);if(-1===g)return g;const n=findIndexOf(this.containers,t=>t.modals.includes(e)),C=this.containers[n];if(C.modals.splice(C.modals.indexOf(e),1),this.modals.splice(g,1),0===C.modals.length)C.restore&&C.restore(),e.modalRef&&ariaHidden(e.modalRef,t),ariaHiddenSiblings(C.container,e.mount,e.modalRef,C.hiddenSiblings,!1),this.containers.splice(n,1);else{const e=C.modals[C.modals.length-1];e.modalRef&&ariaHidden(e.modalRef,!1)}return g}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}},tC="data-mui-focusable";function getFocusTarget(e){return e?e.hasAttribute("data-mui-focusable")?e:e.querySelector(`[${tC}]`):null}var gC=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function getTabIndex(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}function isNonTabbableRadio(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const getRadio=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let t=getRadio(`[name="${e.name}"]:checked`);return t||(t=getRadio(`[name="${e.name}"]`)),t!==e}function isNodeMatchingSelectorFocusable(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||isNonTabbableRadio(e))}function defaultGetTabbable(e){const t=[],g=[];return Array.from(e.querySelectorAll(gC)).forEach((e,n)=>{const C=getTabIndex(e);-1!==C&&isNodeMatchingSelectorFocusable(e)&&(0===C?t.push(e):g.push({documentOrder:n,tabIndex:C,node:e}))}),g.sort((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex).map(e=>e.node).concat(t)}function defaultIsEnabled(){return!0}function FocusTrap(e){const{children:t,disableAutoFocus:g=!1,disableEnforceFocus:n=!1,disableRestoreFocus:C=!1,getTabbable:o=defaultGetTabbable,isEnabled:I=defaultIsEnabled,open:a}=e,i=l.useRef(!1),s=l.useRef(null),c=l.useRef(null),u=l.useRef(null),d=l.useRef(null),p=l.useRef(!1),m=l.useRef(null),h=useForkRef(getReactElementRef(t),m),y=l.useRef(null);l.useEffect(()=>{a&&m.current&&(p.current=!g)},[g,a]),l.useEffect(()=>{if(i.current=!1,!a||!m.current)return;const e=xA(ownerDocument(m.current)),t=getFocusTarget(m.current)??m.current;return bA(m.current,e)||(t.hasAttribute("tabIndex")||t.setAttribute("tabIndex","-1"),p.current&&t.focus()),()=>{!C&&u.current&&(i.current=!0,u.current.focus(),u.current=null)}},[a]),l.useEffect(()=>{if(!a||!m.current)return;const e=ownerDocument(m.current),loopFocus=t=>{y.current=t,!n&&I()&&"Tab"===t.key&&xA(e)===m.current&&t.shiftKey&&(i.current=!0,c.current&&c.current.focus())},contain=()=>{const t=m.current;if(null===t)return;const g=xA(e);if(!e.hasFocus()||!I()||i.current)return void(i.current=!1);if(bA(t,g))return;if(n&&g!==s.current&&g!==c.current)return;if(g!==d.current)d.current=null;else if(null!==d.current)return;if(!p.current)return;let C=[];if(g!==s.current&&g!==c.current||(C=o(m.current)),C.length>0){const e=Boolean(y.current?.shiftKey&&"Tab"===y.current?.key),t=C[0],g=C[C.length-1];"string"!=typeof t&&"string"!=typeof g&&(e?g.focus():t.focus())}else t.focus()};e.addEventListener("focusin",contain),e.addEventListener("keydown",loopFocus,!0);const t=setInterval(()=>{const t=xA(e);t&&"BODY"===t.tagName&&contain()},50);return()=>{clearInterval(t),e.removeEventListener("focusin",contain),e.removeEventListener("keydown",loopFocus,!0)}},[g,n,C,I,a,o]);const onFocus=e=>{null===u.current&&(u.current=e.relatedTarget),p.current=!0,d.current=e.target;const g=t.props.onFocus;g&&g(e)},handleFocusSentinel=e=>{null===u.current&&(u.current=e.relatedTarget),p.current=!0};return(0,gr.jsxs)(l.Fragment,{children:[(0,gr.jsx)("div",{tabIndex:a?0:-1,onFocus:handleFocusSentinel,ref:s,"data-testid":"sentinelStart"}),l.cloneElement(t,{ref:h,onFocus}),(0,gr.jsx)("div",{tabIndex:a?0:-1,onFocus:handleFocusSentinel,ref:c,"data-testid":"sentinelEnd"})]})}function getContainer$1(e){return"function"==typeof e?e():e}var rC=l.forwardRef(function(e,t){const{children:g,container:n,disablePortal:C=!1}=e,[o,I]=l.useState(null),a=useForkRef(l.isValidElement(g)?getReactElementRef(g):null,t);if(Qr(()=>{C||I(getContainer$1(n)||document.body)},[n,C]),Qr(()=>{if(o&&!C)return setRef(t,o),()=>{setRef(t,null)}},[t,o,C]),C){if(l.isValidElement(g)){const e={ref:a};return l.cloneElement(g,e)}return g}return o?c.createPortal(g,o):o});function useSlot(e,t){const{className:g,elementType:n,ownerState:C,externalForwardedProps:o,internalForwardedProps:I,shouldForwardComponentProp:a=!1,...i}=t,{component:s,slots:l={[e]:void 0},slotProps:c={[e]:void 0},...u}=o,d=l[e]||n,p=resolveComponentProps(c[e],C),{props:{component:m,...h},internalRef:y}=mergeSlotProps$1({className:g,...i,externalForwardedProps:"root"===e?u:void 0,externalSlotProps:p}),b=useForkRef(y,p?.ref,t.ref),v="root"===e?m||s:m;return[d,appendOwnerState(d,{..."root"===e&&!s&&!l[e]&&I,..."root"!==e&&!l[e]&&I,...h,...v&&!a&&{as:v},...v&&a&&{component:v},ref:b},C)]}var nC={entering:{opacity:1},entered:{opacity:1},exiting:{opacity:0},exited:{opacity:0}},AC={opacity:0,visibility:"hidden"},CC=l.forwardRef(function(e,t){const g=useTheme$1(),n={enter:g.transitions.duration.enteringScreen,exit:g.transitions.duration.leavingScreen},{addEndListener:C,appear:o=!0,children:I,easing:a,in:i,onEnter:s,onEntered:c,onEntering:u,onExit:d,onExited:p,onExiting:m,style:h,timeout:y=n,...b}=e,v=l.useRef(null),x=EA(v,getReactElementRef(I),t),S=normalizedTransitionCallback(v,u),w=normalizedTransitionCallback(v,(e,t)=>{reflow(e);const n=getTransitionProps({style:h,timeout:y,easing:a},{mode:"enter"});e.style.transition=g.transitions.create("opacity",n),s&&s(e,t)}),E=normalizedTransitionCallback(v,c),R=normalizedTransitionCallback(v,m),M=normalizedTransitionCallback(v,e=>{const t=getTransitionProps({style:h,timeout:y,easing:a},{mode:"exit"});e.style.transition=g.transitions.create("opacity",t),d&&d(e)}),T=normalizedTransitionCallback(v,e=>{e.style.transition="",p&&p(e)}),handleAddEndListener=e=>{C&&C(v.current,e)};return(0,gr.jsx)(ZA,{appear:o,in:i,nodeRef:v,onEnter:w,onEntered:E,onEntering:S,onExit:M,onExited:T,onExiting:R,addEndListener:handleAddEndListener,timeout:y,...b,children:(e,{ownerState:t,...g})=>{const n=getTransitionChildStyle(e,i,nC,AC,h,I.props.style);return l.cloneElement(I,{style:n,ref:x,...g})}})});function getBackdropUtilityClass(e){return generateUtilityClass("MuiBackdrop",e)}generateUtilityClasses("MuiBackdrop",["root","invisible"]);var useUtilityClasses$35=e=>{const{classes:t,invisible:g}=e;return composeClasses({root:["root",g&&"invisible"]},getBackdropUtilityClass,t)},oC=On("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),IC=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiBackdrop"}),{children:n,className:C,component:o="div",invisible:I=!1,open:a,slotProps:i={},slots:s={},transitionDuration:l,...c}=g,u={...g,component:o,invisible:I},d=useUtilityClasses$35(u),p={component:o,slots:s,slotProps:i},[m,h]=useSlot("root",{elementType:oC,externalForwardedProps:p,className:clsx(d.root,C),ownerState:u}),[y,b]=useSlot("transition",{elementType:CC,externalForwardedProps:p,ownerState:u});return(0,gr.jsx)(y,{in:a,timeout:l,...c,...b,children:(0,gr.jsx)(m,{...h,ref:t,children:n})})});function createChainedFunction(...e){return e.reduce((e,t)=>null==t?e:function(...g){e.apply(this,g),t.apply(this,g)},()=>{})}function getContainer(e){return"function"==typeof e?e():e}function getHasTransition(e){return!!e&&e.props.hasOwnProperty("in")}var noop$2=()=>{},aC=new eC;function useModal(e){const{container:t,disableScrollLock:g=!1,closeAfterTransition:n=!1,onTransitionEnter:C,onTransitionExited:o,children:I,onClose:a,open:i,rootRef:s}=e,c=l.useRef({}),u=l.useRef(null),d=l.useRef(null),p=useForkRef(d,s),[m,h]=l.useState(!i),y=getHasTransition(I);let b=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(b=!1);const getDoc=()=>ownerDocument(u.current),getModal=()=>(c.current.modalRef=d.current,c.current.mount=u.current,c.current),handleMounted=()=>{aC.mount(getModal(),{disableScrollLock:g}),d.current&&(d.current.scrollTop=0)},v=useEventCallback(()=>{const e=getContainer(t)||getDoc().body;aC.add(getModal(),e),d.current&&handleMounted()}),isTopModal=()=>aC.isTopModal(getModal()),x=useEventCallback(e=>{u.current=e,e&&(i&&isTopModal()?handleMounted():d.current&&ariaHidden(d.current,b))}),S=l.useCallback(()=>{aC.remove(getModal(),b)},[b]);l.useEffect(()=>()=>{S()},[S]),l.useEffect(()=>{i?v():y&&n||S()},[i,S,y,n,v]);const createHandleKeyDown=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&isTopModal()&&(t.stopPropagation(),a&&a(t,"escapeKeyDown"))},createHandleBackdropClick=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&a&&a(t,"backdropClick")};return{getRootProps:(t={})=>{const g=extractEventHandlers(e);delete g.onTransitionEnter,delete g.onTransitionExited;const n={...g,...t};return{role:"presentation",...n,onKeyDown:createHandleKeyDown(n),ref:p}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:createHandleBackdropClick(t),open:i}},getTransitionProps:()=>{const handleExited=()=>{h(!0),o&&o(),n&&S()};return{onEnter:createChainedFunction(()=>{h(!1),C&&C()},I?.props.onEnter??noop$2),onExited:createChainedFunction(handleExited,I?.props.onExited??noop$2)}},rootRef:p,portalRef:x,isTopModal,exited:m,hasTransition:y}}function getModalUtilityClass(e){return generateUtilityClass("MuiModal",e)}generateUtilityClasses("MuiModal",["root","hidden","backdrop"]);var useUtilityClasses$34=e=>{const{open:t,exited:g,classes:n}=e;return composeClasses({root:["root",!t&&g&&"hidden"],backdrop:["backdrop"]},getModalUtilityClass,n)},iC=On("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,!g.open&&g.exited&&t.hidden]}})(Vn(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]}))),sC=On(IC,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),lC=l.forwardRef(function(e,t){const g=useDefaultProps({name:"MuiModal",props:e}),{classes:n,className:C,closeAfterTransition:o=!1,children:I,container:a,component:i,disableAutoFocus:s=!1,disableEnforceFocus:c=!1,disablePortal:u=!1,disableRestoreFocus:d=!1,disableScrollLock:p=!1,hideBackdrop:m=!1,keepMounted:h=!1,onClose:y,onTransitionEnter:b,onTransitionExited:v,open:x,slotProps:S={},slots:w={},theme:E,...R}=g,M={...g,closeAfterTransition:o,disableAutoFocus:s,disableEnforceFocus:c,disablePortal:u,disableRestoreFocus:d,disableScrollLock:p,hideBackdrop:m,keepMounted:h},{getRootProps:T,getBackdropProps:P,getTransitionProps:N,portalRef:D,isTopModal:O,exited:j,hasTransition:G}=useModal({...M,rootRef:t}),L={...M,exited:j},B=useUtilityClasses$34(L),F={};if(void 0===I.props.tabIndex&&(F.tabIndex="-1"),G){const{onEnter:e,onExited:t}=N();F.onEnter=e,F.onExited=t}const W={slots:w,slotProps:S},[V,U]=useSlot("root",{ref:t,elementType:iC,externalForwardedProps:{...W,...R,component:i},getSlotProps:T,ownerState:L,className:clsx(C,B?.root,!L.open&&L.exited&&B?.hidden)}),[K,H]=useSlot("backdrop",{elementType:sC,externalForwardedProps:W,shouldForwardComponentProp:!0,getSlotProps:e=>P({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:B?.backdrop,ownerState:L});return h||x||G&&!j?(0,gr.jsx)(rC,{ref:D,container:a,disablePortal:u,children:(0,gr.jsxs)(V,{...U,children:[m?null:(0,gr.jsx)(K,{...H}),(0,gr.jsx)(FocusTrap,{disableEnforceFocus:c,disableAutoFocus:s,disableRestoreFocus:d,isEnabled:O,open:x,children:l.cloneElement(I,F)})]})}):null});function getPopoverUtilityClass(e){return generateUtilityClass("MuiPopover",e)}function mergeSlotProps(e,t){if(!e)return t;function extractHandlers(e,t){const g={};return Object.keys(t).forEach(n=>{isEventHandler(n,t[n])&&"function"==typeof e[n]&&(g[n]=(...g)=>{e[n](...g),t[n](...g)})}),g}if("function"==typeof e||"function"==typeof t)return g=>{const n="function"==typeof t?t(g):t,C="function"==typeof e?e({...g,...n}):e,o=clsx(g?.className,n?.className,C?.className),I=extractHandlers(C,n);return{...n,...C,...I,...!!o&&{className:o},...n?.style&&C?.style&&{style:{...n.style,...C.style}},...n?.sx&&C?.sx&&{sx:[...Array.isArray(n.sx)?n.sx:[n.sx],...Array.isArray(C.sx)?C.sx:[C.sx]]}}};const g=t,n=extractHandlers(e,g),C=clsx(g?.className,e?.className);return{...t,...e,...n,...!!C&&{className:C},...g?.style&&e?.style&&{style:{...g.style,...e.style}},...g?.sx&&e?.sx&&{sx:[...Array.isArray(g.sx)?g.sx:[g.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}function getOffsetTop(e,t){let g=0;return"number"==typeof t?g=t:"center"===t?g=e.height/2:"bottom"===t&&(g=e.height),g}function getOffsetLeft(e,t){let g=0;return"number"==typeof t?g=t:"center"===t?g=e.width/2:"right"===t&&(g=e.width),g}function getTransformOriginValue(e){return[e.horizontal,e.vertical].map(e=>"number"==typeof e?`${e}px`:e).join(" ")}function resolveAnchorEl$1(e){return"function"==typeof e?e():e}generateUtilityClasses("MuiPopover",["root","paper"]);var useUtilityClasses$33=e=>{const{classes:t}=e;return composeClasses({root:["root"],paper:["paper"]},getPopoverUtilityClass,t)},cC=On(lC,{name:"MuiPopover",slot:"Root"})({}),uC=On(Kn,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),dC=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiPopover"}),{action:n,anchorEl:C,anchorOrigin:o={vertical:"top",horizontal:"left"},anchorPosition:I,anchorReference:a="anchorEl",children:i,className:s,container:c,disableAutoFocus:u=!1,elevation:d=8,marginThreshold:p=16,open:m,slots:h={},slotProps:y={},transformOrigin:b={vertical:"top",horizontal:"left"},transitionDuration:v="auto",disableScrollLock:x=!1,...S}=g,w=l.useRef(),E={...g,anchorOrigin:o,anchorReference:a,elevation:d,marginThreshold:p,transformOrigin:b,transitionDuration:v},R=useUtilityClasses$33(E),M=l.useCallback(()=>{if("anchorPosition"===a)return I;const e=resolveAnchorEl$1(C),t=(e&&1===e.nodeType?e:vA(w.current).body).getBoundingClientRect();return{top:t.top+getOffsetTop(t,o.vertical),left:t.left+getOffsetLeft(t,o.horizontal)}},[C,o.horizontal,o.vertical,I,a]),T=l.useCallback(e=>({vertical:getOffsetTop(e,b.vertical),horizontal:getOffsetLeft(e,b.horizontal)}),[b.horizontal,b.vertical]),P=l.useCallback(e=>{const t={width:e.offsetWidth,height:e.offsetHeight},g=T(t);if("none"===a)return{top:null,left:null,transformOrigin:getTransformOriginValue(g)};const n=M();let o=n.top-g.vertical,I=n.left-g.horizontal;const i=o+t.height,s=I+t.width,l=kA(resolveAnchorEl$1(C)),c=l.innerHeight-p,u=l.innerWidth-p;if(null!=p&&o<p){const e=o-p;o-=e,g.vertical+=e}else if(null!=p&&i>c){const e=i-c;o-=e,g.vertical+=e}if(null!=p&&I<p){const e=I-p;I-=e,g.horizontal+=e}else if(s>u){const e=s-u;I-=e,g.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(I)}px`,transformOrigin:getTransformOriginValue(g)}},[C,a,M,T,p]),[N,D]=l.useState(m),O=l.useCallback(()=>{const e=w.current;if(!e)return;const t=P(e);null!=t.top&&e.style.setProperty("top",t.top),null!=t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,D(!0)},[P]);l.useEffect(()=>(x&&window.addEventListener("scroll",O),()=>window.removeEventListener("scroll",O)),[C,x,O]);const handleEntering=()=>{O()},handleExited=()=>{D(!1)};l.useEffect(()=>{m&&O()}),l.useImperativeHandle(n,()=>m?{updatePosition:()=>{O()}}:null,[m,O]),l.useEffect(()=>{if(!m)return;const e=zA(()=>{O()}),t=kA(resolveAnchorEl$1(C));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}},[C,m,O]);let j=v;const G={slots:h,slotProps:y},[L,B]=useSlot("transition",{elementType:$A,externalForwardedProps:G,ownerState:E,getSlotProps:e=>({...e,onEntering:(t,g)=>{e.onEntering?.(t,g),handleEntering()},onExited:t=>{e.onExited?.(t),handleExited()}}),additionalProps:{appear:!0,in:m}});"auto"!==v||L.muiSupportAuto||(j=void 0);const F=c||(C?vA(resolveAnchorEl$1(C)).body:void 0),[W,{slots:V,slotProps:U,...K}]=useSlot("root",{ref:t,elementType:cC,externalForwardedProps:{...G,...S},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:h.backdrop},slotProps:{backdrop:mergeSlotProps("function"==typeof y.backdrop?y.backdrop(E):y.backdrop,{invisible:!0})},container:F,open:m},ownerState:E,className:clsx(R.root,s)}),[H,Y]=useSlot("paper",{ref:w,className:R.paper,elementType:uC,externalForwardedProps:G,shouldForwardComponentProp:!0,additionalProps:{elevation:d,style:N?void 0:{opacity:0}},ownerState:E});return(0,gr.jsx)(W,{...K,...!isHostComponent(W)&&{slots:V,slotProps:U,disableAutoFocus:u,disableScrollLock:x},children:(0,gr.jsx)(L,{...B,timeout:j,children:(0,gr.jsx)(H,{...Y,children:i})})})});function getMenuUtilityClass(e){return generateUtilityClass("MuiMenu",e)}generateUtilityClasses("MuiMenu",["root","paper","list"]);var pC={vertical:"top",horizontal:"right"},mC={vertical:"top",horizontal:"left"},useUtilityClasses$32=e=>{const{classes:t}=e;return composeClasses({root:["root"],paper:["paper"],list:["list"]},getMenuUtilityClass,t)},fC=On(dC,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiMenu",slot:"Root"})({}),hC=On(uC,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),yC=On(jA,{name:"MuiMenu",slot:"List"})({outline:0}),bC=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiMenu"}),{autoFocus:n=!0,children:C,className:o,disableAutoFocusItem:I=!1,onClose:a,open:i,PopoverClasses:s,transitionDuration:c="auto",variant:u="selectedMenu",slots:d={},slotProps:p={},...m}=g,h=useRtl(),y={...g,autoFocus:n,disableAutoFocusItem:I,transitionDuration:c,variant:u},b=useUtilityClasses$32(y),v=n&&i,x=v&&!I,S=l.useRef(null),handleEntering=(e,t)=>{S.current&&(S.current.adjustStyleForScrollbar(e,{direction:h?"rtl":"ltr"}),v&&S.current.focusInitialTarget?.())},handleListKeyDown=e=>{"Tab"===e.key&&(e.preventDefault(),a&&a(e,"tabKeyDown"))},w={slots:d,slotProps:p},E=useSlotProps({elementType:d.root,externalSlotProps:p.root,ownerState:y,className:[b.root,o]}),[R,M]=useSlot("paper",{className:b.paper,elementType:hC,externalForwardedProps:w,shouldForwardComponentProp:!0,ownerState:y}),[T,P]=useSlot("list",{className:b.list,elementType:yC,shouldForwardComponentProp:!0,externalForwardedProps:w,getSlotProps:e=>({...e,onKeyDown:t=>{handleListKeyDown(t),e.onKeyDown?.(t)}}),ownerState:y}),N="function"==typeof p.transition?p.transition(y):p.transition;return(0,gr.jsx)(fC,{disableAutoFocus:n,onClose:a,anchorOrigin:{vertical:"bottom",horizontal:h?"right":"left"},transformOrigin:h?pC:mC,slots:{root:d.root,paper:R,backdrop:d.backdrop,transition:d.transition},slotProps:{root:E,paper:M,backdrop:"function"==typeof p.backdrop?p.backdrop(y):p.backdrop,transition:{...N,onEntering:(...e)=>{handleEntering(...e),N?.onEntering?.(...e)}}},open:i,ref:t,transitionDuration:c,ownerState:y,...m,classes:s,children:(0,gr.jsx)(T,{actions:S,autoFocus:v,autoFocusItem:x,variant:u,...P,children:C})})});function isFocusVisible(e){try{return e.matches(":focus-visible")}catch(t){}return!1}function useFocusableWhenDisabled(e){const{focusableWhenDisabled:t,disabled:g,composite:n=!1,tabIndex:C=0,isNativeButton:o}=e,I=n&&!1!==t,a=n&&!1===t;return l.useMemo(()=>{const e={onKeyDown(e){g&&t&&"Tab"!==e.key&&e.preventDefault()}};return n||(e.tabIndex=C,!o&&g&&(e.tabIndex=t?C:-1)),(o&&(t||I)||!o&&g)&&(e["aria-disabled"]=g),!o||t&&!a||(e.disabled=g),e},[n,g,t,I,a,o,C])}var vC={};function useButtonBase(e){const{nativeButton:t,nativeButtonProp:g,internalNativeButton:n=t,allowInferredHostMismatch:C=!1,disabled:o,type:I,hasFormAction:a=!1,tabIndex:i=0,focusableWhenDisabled:s,stopEventPropagation:c=!1,onBeforeKeyDown:u,onBeforeKeyUp:d}=e,p=l.useRef(null),m=!0===s,h=useFocusableWhenDisabled({focusableWhenDisabled:m,disabled:o,isNativeButton:t,tabIndex:i}),y=l.useCallback(()=>{const e=p.current;return null==e?t:"BUTTON"===e.tagName||Boolean("A"===e.tagName&&e.href)},[t]),b=l.useMemo(()=>{const e=m?{}:{tabIndex:o?-1:i};return t?(e.type=void 0!==I||a?I:"button",m||(e.disabled=o)):(e.role="button",!m&&o&&(e["aria-disabled"]=o)),m?{...e,...h}:e},[o,m,h,a,t,i,I]);return{getButtonProps:l.useCallback((e=vC)=>{const{onClick:t,onKeyDown:g,onKeyUp:n,...C}=e,handleClick=e=>{c&&e.stopPropagation(),o?e.preventDefault():t?.(e)},handleKeyDown=e=>{m&&h.onKeyDown(e),o||(u?.(e),g?.(e),e.target!==e.currentTarget||y()||(" "!==e.key?"Enter"===e.key&&(e.preventDefault(),e.currentTarget.click()):e.preventDefault()))},handleKeyUp=e=>{o||(d?.(e),n?.(e),e.target!==e.currentTarget||y()||" "!==e.key||e.defaultPrevented||e.currentTarget.click())};return{...b,...C,onClick:handleClick,onKeyDown:handleKeyDown,onKeyUp:handleKeyUp}},[b,o,m,h,y,u,d,c]),rootRef:p}}var xC=class e{static create(){return new e}static use(){const t=useLazyRef(e.create).current,[g,n]=l.useState(!1);return t.shouldMount=g,t.setShouldMount=n,l.useEffect(t.mountEffect,[g]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=createControlledPromise(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function useLazyRipple(){return xC.use()}function createControlledPromise(){let e,t;const g=new Promise((g,n)=>{e=g,t=n});return g.resolve=e,g.reject=t,g}function Ripple(e){const{className:t,classes:g,pulsate:n=!1,rippleX:C,rippleY:o,rippleSize:I,in:a,onExited:i,timeout:s}=e,[c,u]=l.useState(!1),d=clsx(t,g.ripple,g.rippleVisible,n&&g.ripplePulsate),p={width:I,height:I,top:-I/2+o,left:-I/2+C},m=clsx(g.child,c&&g.childLeaving,n&&g.childPulsate);return a||c||u(!0),l.useEffect(()=>{if(!a&&null!=i){const e=setTimeout(i,s);return()=>{clearTimeout(e)}}},[i,a,s]),(0,gr.jsx)("span",{className:d,style:p,children:(0,gr.jsx)("span",{className:m})})}var SC=generateUtilityClasses("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),wC=550,EC=keyframes`
2
2
  0% {
3
3
  transform: scale(0);
4
4
  opacity: 0.1;
@@ -71,7 +71,7 @@
71
71
  animation-iteration-count: infinite;
72
72
  animation-delay: 200ms;
73
73
  }
74
- `,PC=l.forwardRef(function(e,t){const{center:g=!1,classes:n={},className:C,...I}=useDefaultProps({props:e,name:"MuiTouchRipple"}),[o,a]=l.useState([]),i=l.useRef(0),s=l.useRef(null);l.useEffect(()=>{s.current&&(s.current(),s.current=null)},[o]);const c=l.useRef(!1),u=useTimeout(),d=l.useRef(null),p=l.useRef(null),m=l.useCallback(e=>{const{pulsate:t,rippleX:g,rippleY:C,rippleSize:I,cb:o}=e;a(e=>[...e,(0,gr.jsx)(TC,{classes:{ripple:clsx(n.ripple,SC.ripple),rippleVisible:clsx(n.rippleVisible,SC.rippleVisible),ripplePulsate:clsx(n.ripplePulsate,SC.ripplePulsate),child:clsx(n.child,SC.child),childLeaving:clsx(n.childLeaving,SC.childLeaving),childPulsate:clsx(n.childPulsate,SC.childPulsate)},timeout:wC,pulsate:t,rippleX:g,rippleY:C,rippleSize:I},i.current)]),i.current+=1,s.current=o},[n]),h=l.useCallback((e={},t={},n=()=>{})=>{const{pulsate:C=!1,center:I=g||t.pulsate,fakeElement:o=!1}=t;if("mousedown"===e?.type&&c.current)return void(c.current=!1);"touchstart"===e?.type&&(c.current=!0);const a=o?null:p.current,i=a?a.getBoundingClientRect():{width:0,height:0,left:0,top:0};let s,l,h;if(I||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)s=Math.round(i.width/2),l=Math.round(i.height/2);else{const{clientX:t,clientY:g}=e.touches&&e.touches.length>0?e.touches[0]:e;s=Math.round(t-i.left),l=Math.round(g-i.top)}if(I)h=Math.sqrt((2*i.width**2+i.height**2)/3),h%2==0&&(h+=1);else{const e=2*Math.max(Math.abs((a?a.clientWidth:0)-s),s)+2,t=2*Math.max(Math.abs((a?a.clientHeight:0)-l),l)+2;h=Math.sqrt(e**2+t**2)}e?.touches?null===d.current&&(d.current=()=>{m({pulsate:C,rippleX:s,rippleY:l,rippleSize:h,cb:n})},u.start(80,()=>{d.current&&(d.current(),d.current=null)})):m({pulsate:C,rippleX:s,rippleY:l,rippleSize:h,cb:n})},[g,m,u]),y=l.useCallback(()=>{h({},{pulsate:!0})},[h]),b=l.useCallback((e,t)=>{if(u.clear(),"touchend"===e?.type&&d.current)return d.current(),d.current=null,void u.start(0,()=>{b(e,t)});d.current=null,a(e=>e.length>0?e.slice(1):e),s.current=t},[u]);return l.useImperativeHandle(t,()=>({pulsate:y,start:h,stop:b}),[y,h,b]),(0,gr.jsx)(MC,{className:clsx(SC.root,n.root,C),ref:p,...I,children:(0,gr.jsx)(_A,{component:null,exit:!0,children:o})})});function getButtonBaseUtilityClass(e){return generateUtilityClass("MuiButtonBase",e)}var NC=generateUtilityClasses("MuiButtonBase",["root","disabled","focusVisible"]),useUtilityClasses$31=e=>{const{disabled:t,focusVisible:g,focusVisibleClassName:n,suppressFocusVisible:C,classes:I}=e,o=composeClasses({root:["root",t&&"disabled",g&&!C&&"focusVisible"]},getButtonBaseUtilityClass,I);return g&&!C&&n&&(o.root+=` ${n}`),o},DC=On("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${NC.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),OC=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiButtonBase"}),{action:n,centerRipple:C=!1,children:I,className:o,component:a="button",disabled:i=!1,disableRipple:s=!1,disableTouchRipple:c=!1,focusRipple:u=!1,focusVisibleClassName:d,focusableWhenDisabled:p,suppressFocusVisible:m=!1,internalNativeButton:h,LinkComponent:y="a",nativeButton:b,onBlur:v,onClick:x,onContextMenu:S,onDragLeave:w,onFocus:E,onFocusVisible:R,onKeyDown:M,onKeyUp:T,onMouseDown:P,onMouseLeave:N,onMouseUp:D,onTouchEnd:O,onTouchMove:j,onTouchStart:G,tabIndex:L=0,TouchRippleProps:B,touchRippleRef:F,type:W,...V}=g,U=Boolean(V.href||V.to),K=Boolean(V.formAction);let H=a;"button"===H&&U&&(H=y);const Y="string"==typeof H?"button"===H:h??!1,Z=b??Y,Q=useLazyRipple(),X=EA(Q.ref,F),[_,q]=l.useState(!1);(i||m)&&_&&q(!1);const J=wA(e=>{u&&!e.repeat&&_&&" "===e.key&&Q.stop(e,()=>{Q.start(e)})}),$=wA(e=>{u&&" "===e.key&&_&&!e.defaultPrevented&&Q.stop(e,()=>{Q.pulsate(e)})}),{getButtonProps:ee,rootRef:te}=useButtonBase({nativeButton:Z,nativeButtonProp:b,internalNativeButton:Y,allowInferredHostMismatch:U||"string"==typeof H,disabled:i,type:W,hasFormAction:K,tabIndex:L,onBeforeKeyDown:J,onBeforeKeyUp:$}),{onClick:ge,onKeyDown:re,onKeyUp:ne,...Ae}=ee({onClick:x,onKeyDown:M,onKeyUp:T});l.useImperativeHandle(n,()=>({focusVisible:()=>{q(!0),te.current.focus()}}),[te]);const Ce=Q.shouldMount&&!s&&!i;l.useEffect(()=>{_&&u&&!s&&Q.pulsate()},[s,u,_,Q]);const Ie=useRippleHandler(Q,"start",P,c),oe=useRippleHandler(Q,"stop",S,c),ae=useRippleHandler(Q,"stop",w,c),ie=useRippleHandler(Q,"stop",D,c),se=useRippleHandler(Q,"stop",e=>{_&&e.preventDefault(),N&&N(e)},c),le=useRippleHandler(Q,"start",G,c),ce=useRippleHandler(Q,"stop",O,c),ue=useRippleHandler(Q,"stop",j,c),de=useRippleHandler(Q,"stop",e=>{isFocusVisible(e.target)||q(!1),v&&v(e)},!1),pe=wA(e=>{te.current||(te.current=e.currentTarget),!m&&isFocusVisible(e.target)&&(q(!0),R&&R(e)),E&&E(e)}),me={};U&&(me.tabIndex=i?-1:L,i&&(me["aria-disabled"]=i),me.type=W);const fe=EA(t,te),he={...g,centerRipple:C,component:a,disabled:i,disableRipple:s,disableTouchRipple:c,focusRipple:u,suppressFocusVisible:m,tabIndex:L,focusVisible:_},ye=useUtilityClasses$31(he);return(0,gr.jsxs)(DC,{as:H,className:clsx(ye.root,o),ownerState:he,onBlur:de,onClick:ge,onContextMenu:oe,onFocus:pe,onKeyDown:re,onKeyUp:ne,onMouseDown:Ie,onMouseLeave:se,onMouseUp:ie,onDragLeave:ae,onTouchEnd:ce,onTouchMove:ue,onTouchStart:le,ref:fe,...U?me:Ae,...V,children:[I,Ce?(0,gr.jsx)(PC,{ref:X,center:C,...B}):null]})});function useRippleHandler(e,t,g,n=!1){return wA(C=>(g&&g(C),n||e[t](C),!0))}var jC=useId$1;function getDividerUtilityClass(e){return generateUtilityClass("MuiDivider",e)}var zC=generateUtilityClasses("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","vertical","withChildren","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),useUtilityClasses$30=e=>{const{absolute:t,children:g,classes:n,flexItem:C,orientation:I,textAlign:o,variant:a}=e;return composeClasses({root:["root",t&&"absolute",a,"vertical"===I&&"vertical",C&&"flexItem",g&&"withChildren","right"===o&&"vertical"!==I&&"textAlignRight","left"===o&&"vertical"!==I&&"textAlignLeft"],wrapper:["wrapper","vertical"===I&&"wrapperVertical"]},getDividerUtilityClass,n)},GC=On("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.absolute&&t.absolute,t[g.variant],"vertical"===g.orientation&&t.vertical,g.flexItem&&t.flexItem,g.children&&t.withChildren,"right"===g.textAlign&&"vertical"!==g.orientation&&t.textAlignRight,"left"===g.textAlign&&"vertical"!==g.orientation&&t.textAlignLeft]}})(Vn(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&"vertical"!==e.orientation,style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>"vertical"===e.orientation&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>"right"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>"left"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),LC=On("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.wrapper,"vertical"===g.orientation&&t.wrapperVertical]}})(Vn(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),BC=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiDivider"}),{absolute:n=!1,children:C,className:I,orientation:o="horizontal",component:a=(C||"vertical"===o?"div":"hr"),flexItem:i=!1,role:s=("hr"!==a?"separator":void 0),textAlign:l="center",variant:c="fullWidth",...u}=g,d={...g,absolute:n,component:a,flexItem:i,orientation:o,role:s,textAlign:l,variant:c},p=useUtilityClasses$30(d);return(0,gr.jsx)(GC,{as:a,className:clsx(p.root,I),role:s,ref:t,ownerState:d,"aria-orientation":"separator"!==s||"hr"===a&&"vertical"!==o?void 0:o,...u,children:C?(0,gr.jsx)(LC,{className:p.wrapper,ownerState:d,children:C}):null})}),FC=generateUtilityClasses("MuiListItemIcon",["root","alignItemsFlexStart"]),WC=generateUtilityClasses("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function getMenuItemUtilityClass(e){return generateUtilityClass("MuiMenuItem",e)}var VC=generateUtilityClasses("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),overridesResolver=(e,t)=>{const{ownerState:g}=e;return[t.root,g.dense&&t.dense,g.divider&&t.divider,!g.disableGutters&&t.gutters]},useUtilityClasses$29=e=>{const{disabled:t,dense:g,divider:n,disableGutters:C,selected:I,classes:o}=e,a=composeClasses({root:["root",g&&"dense",t&&"disabled",!C&&"gutters",n&&"divider",I&&"selected"]},getMenuItemUtilityClass,o);return{...o,...a}},UC=On(OC,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver})(Vn(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${VC.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${VC.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${VC.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${VC.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${VC.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${zC.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${zC.inset}`]:{marginLeft:52},[`& .${WC.root}`]:{marginTop:0,marginBottom:0},[`& .${WC.inset}`]:{paddingLeft:36},[`& .${FC.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${FC.root} svg`]:{fontSize:"1.25rem"}}}]}))),KC=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiMenuItem"}),{autoFocus:n=!1,component:C="li",dense:I=!1,divider:o=!1,disableGutters:a=!1,focusVisibleClassName:i,role:s="menuitem",tabIndex:c,className:u,...d}=g,p=useSelectFocusSource(),m=l.useContext(MA),h=l.useMemo(()=>({dense:I||m.dense||!1,disableGutters:a}),[m.dense,I,a]),y=useMenuListContext(),b=jC(),v=y.suppressInitialFocusVisible,x=y.itemsFocusableWhenDisabled,S=l.useRef(null);RA(()=>{n&&S.current&&focusWithVisible(S.current,p)},[n]);const w={...g,dense:h.dense,divider:o,disableGutters:a},E=useUtilityClasses$29(g),{root:R,...M}=E,T=useRovingTabIndexItem({id:b,ref:t,disabled:g.disabled,focusableWhenDisabled:x,selected:g.selected}),P=EA(S,T.ref);let N;return void 0!==c?N=c:"selectedMenu"===y.variant?N=T.tabIndex:g.disabled&&!x||(N=-1),(0,gr.jsx)(MA.Provider,{value:h,children:(0,gr.jsx)(UC,{ref:P,role:s,tabIndex:N,component:C,internalNativeButton:!1,focusableWhenDisabled:x,suppressFocusVisible:v,focusVisibleClassName:clsx(E.focusVisible,i),className:clsx(E.root,u),...d,ownerState:w,classes:M})})}),getRoomItemLookupEntry=e=>e&&"object"==typeof e?getRoomItemOverride(e):null,getRoomItemBackground=e=>getRoomItemLookupEntry(e)?.background??void 0,getRoomItemColor=e=>{const t=getRoomItemLookupEntry(e);return t?t.color:"t"===e?.attrib?"orange":void 0},getRoomItemLabel=e=>{if("string"==typeof e)return e;const t=getRoomItemLookupEntry(e);return t?t.text:e?.name},getRoomItemCommands=e=>{const t=["Probe"];return"string"==typeof e?.attrib&&e.attrib.includes("t")&&t.unshift("Get"),t},sortRoomItemsLikeNexGui3=e=>[...e].sort((e,t)=>{const g=getRoomItemLookupEntry(e);return getRoomItemLookupEntry(t)&&!g?-1:"t"!==t?.attrib||"t"===e?.attrib||g?1:-1}),selectRoomSlice=e=>({players:e.players,npcs:e.npcs,items:e.items,roomName:e.roomName,roomId:e.roomId,updateRoom:e.updateRoom}),useRoom=()=>{const{stores:e}=useNexGui();return e.room(useShallow(selectRoomSlice))},toDisplayItem=(e,t)=>"string"==typeof e?{commands:[],id:null,key:`room-item-string-${t}-${e}`,label:getRoomItemLabel(e),name:e,raw:e,rowBackground:void 0,rowColor:void 0}:e&&"object"==typeof e?{commands:null==e.id?[]:getRoomItemCommands(e),id:e.id??null,key:`room-item-${e.id??`${t}-${e.name??"unknown"}`}`,label:getRoomItemLabel(e)??e.name??"",name:e.name??"",raw:e,rowBackground:getRoomItemBackground(e),rowColor:getRoomItemColor(e)}:null,useRoomItemsViewModel=()=>{const{adapter:e}=useNexGui(),{items:t}=useRoom(),[g,n]=(0,l.useState)(0);(0,l.useEffect)(()=>subscribeToRoomItemOverrides(()=>n(e=>e+1)),[]);const C=(0,l.useMemo)(()=>sortRoomItemsLikeNexGui3((t??[]).filter(e=>!isRoomNpcItem(e))).map((e,t)=>toDisplayItem(e,t)).filter(Boolean),[t,g]),I=(0,l.useCallback)((t,g)=>{null!=g?.id&&e?.send?.(`${t} ${g.id}`)},[e]);return(0,l.useMemo)(()=>({items:C,sendItemCommand:I}),[C,I])},getFlipTransform$8=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},ItemsPanelInner=()=>{const e=useTheme$1(),{items:t,sendItemCommand:g}=useRoomItemsViewModel(),[n]=(0,l.useState)(()=>Math.floor(4*Math.random())),[C,I]=(0,l.useState)(null),[o,a]=(0,l.useState)(null),i=e?.nexGui?.backgroundImage??"",s=e?.nexGui?.backgroundOpacity??.5,c=e?.nexGui?.backgroundFilter??"none",u=Boolean(C),d=o?.commands??[],handleCloseMenu=()=>{I(null),a(null)},handleOpenMenu=(e,t)=>{t&&null!=t.id&&0!==t.commands.length&&(a(t),I(e.currentTarget))},handleCommandClick=e=>{null!=o?.id?(g(e,o),handleCloseMenu()):handleCloseMenu()};return React.createElement(Wn,{className:"items-panel",sx:{color:"text.primary",fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize,height:"100%",overflow:"hidden",position:"relative",width:"100%"}},i?React.createElement(Wn,{"aria-hidden":"true",className:"items-panel__background",sx:{backgroundImage:`url(${i})`,backgroundPosition:"center",backgroundSize:"cover",filter:c,height:"100%",inset:0,left:0,opacity:s,position:"absolute",top:0,transform:getFlipTransform$8(n),width:"100%",zIndex:0}}):null,React.createElement(Wn,{className:"items-panel__content","data-testid":"items-panel-content",sx:{display:"flex",flexDirection:"column-reverse",height:"100%",overflow:"auto",position:"relative",width:"100%",zIndex:1}},t.length>0?React.createElement(Wn,{className:"items-panel__rows",sx:{display:"table",m:"10px",maxWidth:"100%",p:"1px",position:"relative",textAlign:"left"}},t.map(e=>{const t=null!=e.id&&e.commands.length>0;return React.createElement(Wn,{key:e.key,className:["items-panel__row",t?"items-panel__row--interactive":""].filter(Boolean).join(" "),onClick:t?t=>handleOpenMenu(t,e):void 0,onContextMenu:t?t=>{t.preventDefault(),handleOpenMenu(t,e)}:void 0,sx:{backgroundColor:e.rowBackground??"transparent",cursor:t?"pointer":"inherit",display:"table-row"}},React.createElement(Wn,{component:"div",sx:{color:"cyan",display:"table-cell",padding:"0px 5px 0px 2px",whiteSpace:"nowrap"}},React.createElement(qn,{component:"span",sx:{color:"inherit",fontVariantNumeric:"tabular-nums"},variant:"body2"},e.id??"")),React.createElement(Wn,{component:"div",sx:{display:"table-cell",padding:0,width:"100%"}},React.createElement(qn,{component:"span",sx:{color:e.rowColor??"text.primary"},variant:"body2"},e.label)))})):null),React.createElement(bC,{anchorEl:C,onClose:handleCloseMenu,open:u,slotProps:{paper:{sx:{backgroundColor:"#000000",border:"1px solid #ffffff"}}}},d.map(e=>React.createElement(KC,{key:e,onClick:()=>handleCommandClick(e)},e))))};ItemsPanelInner.displayName="ItemsPanelInner";var ItemsPanel=()=>React.createElement(Jn,{panelName:"Items"},React.createElement(ItemsPanelInner,null));function getSvgIconUtilityClass(e){return generateUtilityClass("MuiSvgIcon",e)}ItemsPanel.displayName="ItemsPanel",generateUtilityClasses("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var useUtilityClasses$28=e=>{const{color:t,fontSize:g,classes:n}=e;return composeClasses({root:["root","inherit"!==t&&`color${Qn(t)}`,`fontSize${Qn(g)}`]},getSvgIconUtilityClass,n)},HC=On("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,"inherit"!==g.color&&t[`color${Qn(g.color)}`],t[`fontSize${Qn(g.fontSize)}`]]}})(Vn(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),YC=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiSvgIcon"}),{children:n,className:C,color:I="inherit",component:o="svg",fontSize:a="medium",htmlColor:i,inheritViewBox:s=!1,titleAccess:c,viewBox:u="0 0 24 24",...d}=g,p=l.isValidElement(n)&&"svg"===n.type,m={...g,color:I,component:o,fontSize:a,instanceFontSize:e.fontSize,inheritViewBox:s,viewBox:u,hasSvgAsChild:p},h={};return s||(h.viewBox=u),(0,gr.jsxs)(HC,{as:o,className:clsx(useUtilityClasses$28(m).root,C),focusable:"false",color:i,"aria-hidden":!c||void 0,role:c?"img":void 0,ref:t,...h,...d,...p&&n.props,ownerState:m,children:[p?n.props.children:n,c?(0,gr.jsx)("title",{children:c}):null]})});function createSvgIcon(e,t){function Component(t,g){return(0,gr.jsx)(YC,{"data-testid":void 0,ref:g,...t,children:e})}return Component.muiName=YC.muiName,l.memo(l.forwardRef(Component))}YC.muiName="SvgIcon";var ZC=isMuiElement;function useControlled(e){const{controlled:t,default:g,name:n,state:C="value"}=e,{current:I}=l.useRef(void 0!==t),[o,a]=l.useState(g);return[I?t:o,l.useCallback(e=>{I||a(e)},[])]}var QC=useControlled;function getCircularProgressUtilityClass(e){return generateUtilityClass("MuiCircularProgress",e)}generateUtilityClasses("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDisableShrink"]);var XC=44,_C=keyframes`
74
+ `,PC=l.forwardRef(function(e,t){const{center:g=!1,classes:n={},className:C,...o}=useDefaultProps({props:e,name:"MuiTouchRipple"}),[I,a]=l.useState([]),i=l.useRef(0),s=l.useRef(null);l.useEffect(()=>{s.current&&(s.current(),s.current=null)},[I]);const c=l.useRef(!1),u=useTimeout(),d=l.useRef(null),p=l.useRef(null),m=l.useCallback(e=>{const{pulsate:t,rippleX:g,rippleY:C,rippleSize:o,cb:I}=e;a(e=>[...e,(0,gr.jsx)(TC,{classes:{ripple:clsx(n.ripple,SC.ripple),rippleVisible:clsx(n.rippleVisible,SC.rippleVisible),ripplePulsate:clsx(n.ripplePulsate,SC.ripplePulsate),child:clsx(n.child,SC.child),childLeaving:clsx(n.childLeaving,SC.childLeaving),childPulsate:clsx(n.childPulsate,SC.childPulsate)},timeout:wC,pulsate:t,rippleX:g,rippleY:C,rippleSize:o},i.current)]),i.current+=1,s.current=I},[n]),h=l.useCallback((e={},t={},n=()=>{})=>{const{pulsate:C=!1,center:o=g||t.pulsate,fakeElement:I=!1}=t;if("mousedown"===e?.type&&c.current)return void(c.current=!1);"touchstart"===e?.type&&(c.current=!0);const a=I?null:p.current,i=a?a.getBoundingClientRect():{width:0,height:0,left:0,top:0};let s,l,h;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)s=Math.round(i.width/2),l=Math.round(i.height/2);else{const{clientX:t,clientY:g}=e.touches&&e.touches.length>0?e.touches[0]:e;s=Math.round(t-i.left),l=Math.round(g-i.top)}if(o)h=Math.sqrt((2*i.width**2+i.height**2)/3),h%2==0&&(h+=1);else{const e=2*Math.max(Math.abs((a?a.clientWidth:0)-s),s)+2,t=2*Math.max(Math.abs((a?a.clientHeight:0)-l),l)+2;h=Math.sqrt(e**2+t**2)}e?.touches?null===d.current&&(d.current=()=>{m({pulsate:C,rippleX:s,rippleY:l,rippleSize:h,cb:n})},u.start(80,()=>{d.current&&(d.current(),d.current=null)})):m({pulsate:C,rippleX:s,rippleY:l,rippleSize:h,cb:n})},[g,m,u]),y=l.useCallback(()=>{h({},{pulsate:!0})},[h]),b=l.useCallback((e,t)=>{if(u.clear(),"touchend"===e?.type&&d.current)return d.current(),d.current=null,void u.start(0,()=>{b(e,t)});d.current=null,a(e=>e.length>0?e.slice(1):e),s.current=t},[u]);return l.useImperativeHandle(t,()=>({pulsate:y,start:h,stop:b}),[y,h,b]),(0,gr.jsx)(MC,{className:clsx(SC.root,n.root,C),ref:p,...o,children:(0,gr.jsx)(_A,{component:null,exit:!0,children:I})})});function getButtonBaseUtilityClass(e){return generateUtilityClass("MuiButtonBase",e)}var NC=generateUtilityClasses("MuiButtonBase",["root","disabled","focusVisible"]),useUtilityClasses$31=e=>{const{disabled:t,focusVisible:g,focusVisibleClassName:n,suppressFocusVisible:C,classes:o}=e,I=composeClasses({root:["root",t&&"disabled",g&&!C&&"focusVisible"]},getButtonBaseUtilityClass,o);return g&&!C&&n&&(I.root+=` ${n}`),I},DC=On("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${NC.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),OC=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiButtonBase"}),{action:n,centerRipple:C=!1,children:o,className:I,component:a="button",disabled:i=!1,disableRipple:s=!1,disableTouchRipple:c=!1,focusRipple:u=!1,focusVisibleClassName:d,focusableWhenDisabled:p,suppressFocusVisible:m=!1,internalNativeButton:h,LinkComponent:y="a",nativeButton:b,onBlur:v,onClick:x,onContextMenu:S,onDragLeave:w,onFocus:E,onFocusVisible:R,onKeyDown:M,onKeyUp:T,onMouseDown:P,onMouseLeave:N,onMouseUp:D,onTouchEnd:O,onTouchMove:j,onTouchStart:G,tabIndex:L=0,TouchRippleProps:B,touchRippleRef:F,type:W,...V}=g,U=Boolean(V.href||V.to),K=Boolean(V.formAction);let H=a;"button"===H&&U&&(H=y);const Y="string"==typeof H?"button"===H:h??!1,Z=b??Y,Q=useLazyRipple(),X=EA(Q.ref,F),[_,q]=l.useState(!1);(i||m)&&_&&q(!1);const J=wA(e=>{u&&!e.repeat&&_&&" "===e.key&&Q.stop(e,()=>{Q.start(e)})}),$=wA(e=>{u&&" "===e.key&&_&&!e.defaultPrevented&&Q.stop(e,()=>{Q.pulsate(e)})}),{getButtonProps:ee,rootRef:te}=useButtonBase({nativeButton:Z,nativeButtonProp:b,internalNativeButton:Y,allowInferredHostMismatch:U||"string"==typeof H,disabled:i,type:W,hasFormAction:K,tabIndex:L,onBeforeKeyDown:J,onBeforeKeyUp:$}),{onClick:ge,onKeyDown:re,onKeyUp:ne,...Ae}=ee({onClick:x,onKeyDown:M,onKeyUp:T});l.useImperativeHandle(n,()=>({focusVisible:()=>{q(!0),te.current.focus()}}),[te]);const Ce=Q.shouldMount&&!s&&!i;l.useEffect(()=>{_&&u&&!s&&Q.pulsate()},[s,u,_,Q]);const oe=useRippleHandler(Q,"start",P,c),Ie=useRippleHandler(Q,"stop",S,c),ae=useRippleHandler(Q,"stop",w,c),ie=useRippleHandler(Q,"stop",D,c),se=useRippleHandler(Q,"stop",e=>{_&&e.preventDefault(),N&&N(e)},c),le=useRippleHandler(Q,"start",G,c),ce=useRippleHandler(Q,"stop",O,c),ue=useRippleHandler(Q,"stop",j,c),de=useRippleHandler(Q,"stop",e=>{isFocusVisible(e.target)||q(!1),v&&v(e)},!1),pe=wA(e=>{te.current||(te.current=e.currentTarget),!m&&isFocusVisible(e.target)&&(q(!0),R&&R(e)),E&&E(e)}),me={};U&&(me.tabIndex=i?-1:L,i&&(me["aria-disabled"]=i),me.type=W);const fe=EA(t,te),he={...g,centerRipple:C,component:a,disabled:i,disableRipple:s,disableTouchRipple:c,focusRipple:u,suppressFocusVisible:m,tabIndex:L,focusVisible:_},ye=useUtilityClasses$31(he);return(0,gr.jsxs)(DC,{as:H,className:clsx(ye.root,I),ownerState:he,onBlur:de,onClick:ge,onContextMenu:Ie,onFocus:pe,onKeyDown:re,onKeyUp:ne,onMouseDown:oe,onMouseLeave:se,onMouseUp:ie,onDragLeave:ae,onTouchEnd:ce,onTouchMove:ue,onTouchStart:le,ref:fe,...U?me:Ae,...V,children:[o,Ce?(0,gr.jsx)(PC,{ref:X,center:C,...B}):null]})});function useRippleHandler(e,t,g,n=!1){return wA(C=>(g&&g(C),n||e[t](C),!0))}var jC=useId$1;function getDividerUtilityClass(e){return generateUtilityClass("MuiDivider",e)}var zC=generateUtilityClasses("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","vertical","withChildren","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),useUtilityClasses$30=e=>{const{absolute:t,children:g,classes:n,flexItem:C,orientation:o,textAlign:I,variant:a}=e;return composeClasses({root:["root",t&&"absolute",a,"vertical"===o&&"vertical",C&&"flexItem",g&&"withChildren","right"===I&&"vertical"!==o&&"textAlignRight","left"===I&&"vertical"!==o&&"textAlignLeft"],wrapper:["wrapper","vertical"===o&&"wrapperVertical"]},getDividerUtilityClass,n)},GC=On("div",{name:"MuiDivider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.absolute&&t.absolute,t[g.variant],"vertical"===g.orientation&&t.vertical,g.flexItem&&t.flexItem,g.children&&t.withChildren,"right"===g.textAlign&&"vertical"!==g.orientation&&t.textAlignRight,"left"===g.textAlign&&"vertical"!==g.orientation&&t.textAlignLeft]}})(Vn(({theme:e})=>({margin:0,flexShrink:0,borderWidth:0,borderStyle:"solid",borderColor:(e.vars||e).palette.divider,borderBottomWidth:"thin",variants:[{props:{absolute:!0},style:{position:"absolute",bottom:0,left:0,width:"100%"}},{props:{variant:"inset"},style:{marginLeft:72}},{props:{variant:"middle",orientation:"horizontal"},style:{marginLeft:e.spacing(2),marginRight:e.spacing(2)}},{props:{variant:"middle",orientation:"vertical"},style:{marginTop:e.spacing(1),marginBottom:e.spacing(1)}},{props:{orientation:"vertical"},style:{height:"100%",borderBottomWidth:0,borderRightWidth:"thin"}},{props:{flexItem:!0},style:{alignSelf:"stretch",height:"auto"}},{props:({ownerState:e})=>!!e.children,style:{display:"flex",textAlign:"center",border:0,borderTopStyle:"solid",borderLeftStyle:"solid","&::before, &::after":{content:'""',alignSelf:"center"}}},{props:({ownerState:e})=>e.children&&"vertical"!==e.orientation,style:{"&::before, &::after":{width:"100%",borderTop:`thin solid ${(e.vars||e).palette.divider}`,borderTopStyle:"inherit"}}},{props:({ownerState:e})=>"vertical"===e.orientation&&e.children,style:{flexDirection:"column","&::before, &::after":{height:"100%",borderLeft:`thin solid ${(e.vars||e).palette.divider}`,borderLeftStyle:"inherit"}}},{props:({ownerState:e})=>"right"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"90%"},"&::after":{width:"10%"}}},{props:({ownerState:e})=>"left"===e.textAlign&&"vertical"!==e.orientation,style:{"&::before":{width:"10%"},"&::after":{width:"90%"}}}]}))),LC=On("span",{name:"MuiDivider",slot:"Wrapper",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.wrapper,"vertical"===g.orientation&&t.wrapperVertical]}})(Vn(({theme:e})=>({display:"inline-block",paddingLeft:`calc(${e.spacing(1)} * 1.2)`,paddingRight:`calc(${e.spacing(1)} * 1.2)`,whiteSpace:"nowrap",variants:[{props:{orientation:"vertical"},style:{paddingTop:`calc(${e.spacing(1)} * 1.2)`,paddingBottom:`calc(${e.spacing(1)} * 1.2)`}}]}))),BC=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiDivider"}),{absolute:n=!1,children:C,className:o,orientation:I="horizontal",component:a=(C||"vertical"===I?"div":"hr"),flexItem:i=!1,role:s=("hr"!==a?"separator":void 0),textAlign:l="center",variant:c="fullWidth",...u}=g,d={...g,absolute:n,component:a,flexItem:i,orientation:I,role:s,textAlign:l,variant:c},p=useUtilityClasses$30(d);return(0,gr.jsx)(GC,{as:a,className:clsx(p.root,o),role:s,ref:t,ownerState:d,"aria-orientation":"separator"!==s||"hr"===a&&"vertical"!==I?void 0:I,...u,children:C?(0,gr.jsx)(LC,{className:p.wrapper,ownerState:d,children:C}):null})}),FC=generateUtilityClasses("MuiListItemIcon",["root","alignItemsFlexStart"]),WC=generateUtilityClasses("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);function getMenuItemUtilityClass(e){return generateUtilityClass("MuiMenuItem",e)}var VC=generateUtilityClasses("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),overridesResolver=(e,t)=>{const{ownerState:g}=e;return[t.root,g.dense&&t.dense,g.divider&&t.divider,!g.disableGutters&&t.gutters]},useUtilityClasses$29=e=>{const{disabled:t,dense:g,divider:n,disableGutters:C,selected:o,classes:I}=e,a=composeClasses({root:["root",g&&"dense",t&&"disabled",!C&&"gutters",n&&"divider",o&&"selected"]},getMenuItemUtilityClass,I);return{...I,...a}},UC=On(OC,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver})(Vn(({theme:e})=>({...e.typography.body1,display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap","&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${VC.selected}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity),[`&.${VC.focusVisible}`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.focusOpacity}`)}},[`&.${VC.selected}:hover`]:{backgroundColor:e.alpha((e.vars||e).palette.primary.main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.primary.main,(e.vars||e).palette.action.selectedOpacity)}},[`&.${VC.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${VC.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${zC.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${zC.inset}`]:{marginLeft:52},[`& .${WC.root}`]:{marginTop:0,marginBottom:0},[`& .${WC.inset}`]:{paddingLeft:36},[`& .${FC.root}`]:{minWidth:36},variants:[{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:({ownerState:e})=>!e.dense,style:{[e.breakpoints.up("sm")]:{minHeight:"auto"}}},{props:({ownerState:e})=>e.dense,style:{minHeight:32,paddingTop:4,paddingBottom:4,...e.typography.body2,[`& .${FC.root} svg`]:{fontSize:"1.25rem"}}}]}))),KC=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiMenuItem"}),{autoFocus:n=!1,component:C="li",dense:o=!1,divider:I=!1,disableGutters:a=!1,focusVisibleClassName:i,role:s="menuitem",tabIndex:c,className:u,...d}=g,p=useSelectFocusSource(),m=l.useContext(MA),h=l.useMemo(()=>({dense:o||m.dense||!1,disableGutters:a}),[m.dense,o,a]),y=useMenuListContext(),b=jC(),v=y.suppressInitialFocusVisible,x=y.itemsFocusableWhenDisabled,S=l.useRef(null);RA(()=>{n&&S.current&&focusWithVisible(S.current,p)},[n]);const w={...g,dense:h.dense,divider:I,disableGutters:a},E=useUtilityClasses$29(g),{root:R,...M}=E,T=useRovingTabIndexItem({id:b,ref:t,disabled:g.disabled,focusableWhenDisabled:x,selected:g.selected}),P=EA(S,T.ref);let N;return void 0!==c?N=c:"selectedMenu"===y.variant?N=T.tabIndex:g.disabled&&!x||(N=-1),(0,gr.jsx)(MA.Provider,{value:h,children:(0,gr.jsx)(UC,{ref:P,role:s,tabIndex:N,component:C,internalNativeButton:!1,focusableWhenDisabled:x,suppressFocusVisible:v,focusVisibleClassName:clsx(E.focusVisible,i),className:clsx(E.root,u),...d,ownerState:w,classes:M})})}),getRoomItemLookupEntry=e=>e&&"object"==typeof e?getRoomItemOverride(e):null,getRoomItemBackground=e=>getRoomItemLookupEntry(e)?.background??void 0,getRoomItemColor=e=>{const t=getRoomItemLookupEntry(e);return t?t.color:"t"===e?.attrib?"orange":void 0},getRoomItemLabel=e=>{if("string"==typeof e)return e;const t=getRoomItemLookupEntry(e);return t?t.text:e?.name},getRoomItemCommands=e=>{const t=["Probe"];return"string"==typeof e?.attrib&&e.attrib.includes("t")&&t.unshift("Get"),t},sortRoomItemsLikeNexGui3=e=>[...e].sort((e,t)=>{const g=getRoomItemLookupEntry(e);return getRoomItemLookupEntry(t)&&!g?-1:"t"!==t?.attrib||"t"===e?.attrib||g?1:-1}),selectRoomSlice=e=>({players:e.players,npcs:e.npcs,items:e.items,roomName:e.roomName,roomId:e.roomId,updateRoom:e.updateRoom}),useRoom=()=>{const{stores:e}=useNexGui();return e.room(useShallow(selectRoomSlice))},toDisplayItem=(e,t)=>"string"==typeof e?{commands:[],id:null,key:`room-item-string-${t}-${e}`,label:getRoomItemLabel(e),name:e,raw:e,rowBackground:void 0,rowColor:void 0}:e&&"object"==typeof e?{commands:null==e.id?[]:getRoomItemCommands(e),id:e.id??null,key:`room-item-${e.id??`${t}-${e.name??"unknown"}`}`,label:getRoomItemLabel(e)??e.name??"",name:e.name??"",raw:e,rowBackground:getRoomItemBackground(e),rowColor:getRoomItemColor(e)}:null,useRoomItemsViewModel=()=>{const{adapter:e}=useNexGui(),{items:t}=useRoom(),[g,n]=(0,l.useState)(0);(0,l.useEffect)(()=>subscribeToRoomItemOverrides(()=>n(e=>e+1)),[]);const C=(0,l.useMemo)(()=>sortRoomItemsLikeNexGui3((t??[]).filter(e=>!isRoomNpcItem(e))).map((e,t)=>toDisplayItem(e,t)).filter(Boolean),[t,g]),o=(0,l.useCallback)((t,g)=>{null!=g?.id&&e?.send?.(`${t} ${g.id}`)},[e]);return(0,l.useMemo)(()=>({items:C,sendItemCommand:o}),[C,o])},getFlipTransform$8=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},ItemsPanelInner=()=>{const e=useTheme$1(),{items:t,sendItemCommand:g}=useRoomItemsViewModel(),[n]=(0,l.useState)(()=>Math.floor(4*Math.random())),[C,o]=(0,l.useState)(null),[I,a]=(0,l.useState)(null),i=e?.nexGui?.backgroundImage??"",s=e?.nexGui?.backgroundOpacity??.5,c=e?.nexGui?.backgroundFilter??"none",u=Boolean(C),d=I?.commands??[],handleCloseMenu=()=>{o(null),a(null)},handleOpenMenu=(e,t)=>{t&&null!=t.id&&0!==t.commands.length&&(a(t),o(e.currentTarget))},handleCommandClick=e=>{null!=I?.id?(g(e,I),handleCloseMenu()):handleCloseMenu()};return React.createElement(Wn,{className:"items-panel",sx:{color:"text.primary",fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize,height:"100%",overflow:"hidden",position:"relative",width:"100%"}},i?React.createElement(Wn,{"aria-hidden":"true",className:"items-panel__background",sx:{backgroundImage:`url(${i})`,backgroundPosition:"center",backgroundSize:"cover",filter:c,height:"100%",inset:0,left:0,opacity:s,position:"absolute",top:0,transform:getFlipTransform$8(n),width:"100%",zIndex:0}}):null,React.createElement(Wn,{className:"items-panel__content","data-testid":"items-panel-content",sx:{display:"flex",flexDirection:"column-reverse",height:"100%",overflow:"auto",position:"relative",width:"100%",zIndex:1}},t.length>0?React.createElement(Wn,{className:"items-panel__rows",sx:{display:"table",m:"10px",maxWidth:"100%",p:"1px",position:"relative",textAlign:"left"}},t.map(e=>{const t=null!=e.id&&e.commands.length>0;return React.createElement(Wn,{key:e.key,className:["items-panel__row",t?"items-panel__row--interactive":""].filter(Boolean).join(" "),onClick:t?t=>handleOpenMenu(t,e):void 0,onContextMenu:t?t=>{t.preventDefault(),handleOpenMenu(t,e)}:void 0,sx:{backgroundColor:e.rowBackground??"transparent",cursor:t?"pointer":"inherit",display:"table-row"}},React.createElement(Wn,{component:"div",sx:{color:"cyan",display:"table-cell",padding:"0px 5px 0px 2px",whiteSpace:"nowrap"}},React.createElement(qn,{component:"span",sx:{color:"inherit",fontVariantNumeric:"tabular-nums"},variant:"body2"},e.id??"")),React.createElement(Wn,{component:"div",sx:{display:"table-cell",padding:0,width:"100%"}},React.createElement(qn,{component:"span",sx:{color:e.rowColor??"text.primary"},variant:"body2"},e.label)))})):null),React.createElement(bC,{anchorEl:C,onClose:handleCloseMenu,open:u,slotProps:{paper:{sx:{backgroundColor:"#000000",border:"1px solid #ffffff"}}}},d.map(e=>React.createElement(KC,{key:e,onClick:()=>handleCommandClick(e)},e))))};ItemsPanelInner.displayName="ItemsPanelInner";var ItemsPanel=()=>React.createElement(Jn,{panelName:"Items"},React.createElement(ItemsPanelInner,null));function getSvgIconUtilityClass(e){return generateUtilityClass("MuiSvgIcon",e)}ItemsPanel.displayName="ItemsPanel",generateUtilityClasses("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var useUtilityClasses$28=e=>{const{color:t,fontSize:g,classes:n}=e;return composeClasses({root:["root","inherit"!==t&&`color${Qn(t)}`,`fontSize${Qn(g)}`]},getSvgIconUtilityClass,n)},HC=On("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,"inherit"!==g.color&&t[`color${Qn(g.color)}`],t[`fontSize${Qn(g.fontSize)}`]]}})(Vn(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]}))),YC=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiSvgIcon"}),{children:n,className:C,color:o="inherit",component:I="svg",fontSize:a="medium",htmlColor:i,inheritViewBox:s=!1,titleAccess:c,viewBox:u="0 0 24 24",...d}=g,p=l.isValidElement(n)&&"svg"===n.type,m={...g,color:o,component:I,fontSize:a,instanceFontSize:e.fontSize,inheritViewBox:s,viewBox:u,hasSvgAsChild:p},h={};return s||(h.viewBox=u),(0,gr.jsxs)(HC,{as:I,className:clsx(useUtilityClasses$28(m).root,C),focusable:"false",color:i,"aria-hidden":!c||void 0,role:c?"img":void 0,ref:t,...h,...d,...p&&n.props,ownerState:m,children:[p?n.props.children:n,c?(0,gr.jsx)("title",{children:c}):null]})});function createSvgIcon(e,t){function Component(t,g){return(0,gr.jsx)(YC,{"data-testid":void 0,ref:g,...t,children:e})}return Component.muiName=YC.muiName,l.memo(l.forwardRef(Component))}YC.muiName="SvgIcon";var ZC=isMuiElement;function useControlled(e){const{controlled:t,default:g,name:n,state:C="value"}=e,{current:o}=l.useRef(void 0!==t),[I,a]=l.useState(g);return[o?t:I,l.useCallback(e=>{o||a(e)},[])]}var QC=useControlled;function getCircularProgressUtilityClass(e){return generateUtilityClass("MuiCircularProgress",e)}generateUtilityClasses("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","track","circle","circleDisableShrink"]);var XC=44,_C=keyframes`
75
75
  0% {
76
76
  transform: rotate(0deg);
77
77
  }
@@ -98,7 +98,7 @@
98
98
  animation: ${_C} 1.4s linear infinite;
99
99
  `:null,$C="string"!=typeof qC?css`
100
100
  animation: ${qC} 1.4s ease-in-out infinite;
101
- `:null,useUtilityClasses$27=e=>{const{classes:t,variant:g,color:n,disableShrink:C}=e;return composeClasses({root:["root",g,`color${Qn(n)}`],svg:["svg"],track:["track"],circle:["circle",C&&"circleDisableShrink"]},getCircularProgressUtilityClass,t)},eI=On("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,t[g.variant],t[`color${Qn(g.color)}`]]}})(Vn(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:JC||{animation:`${_C} 1.4s linear infinite`}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),tI=On("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),gI=On("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.circle,g.disableShrink&&t.circleDisableShrink]}})(Vn(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:$C||{animation:`${qC} 1.4s ease-in-out infinite`}}]}))),rI=On("circle",{name:"MuiCircularProgress",slot:"Track"})(Vn(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),nI=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiCircularProgress"}),{className:n,color:C="primary",disableShrink:I=!1,enableTrackSlot:o=!1,min:a,max:i,size:s=40,style:l,thickness:c=3.6,value:u=g.min??0,variant:d="indeterminate",...p}=g,m=a??0,h=i??100,y={...g,color:C,disableShrink:I,size:s,thickness:c,value:u,variant:d,enableTrackSlot:o},b=useUtilityClasses$27(y),v={},x={},S={};if("determinate"===d){const e=2*Math.PI*((XC-c)/2),t=h-m;v.strokeDasharray=e.toFixed(3),v.strokeDashoffset=t>0?`${((h-u)/t*e).toFixed(3)}px`:`${e.toFixed(3)}px`,x.transform="rotate(-90deg)",S["aria-valuenow"]=u,S["aria-valuemin"]=m,S["aria-valuemax"]=h}return(0,gr.jsx)(eI,{className:clsx(b.root,n),style:{width:s,height:s,...x,...l},ownerState:y,ref:t,role:"progressbar",...S,...p,children:(0,gr.jsxs)(tI,{className:b.svg,ownerState:y,viewBox:`${XC/2} ${XC/2} ${XC} ${XC}`,children:[o?(0,gr.jsx)(rI,{className:b.track,ownerState:y,cx:XC,cy:XC,r:(XC-c)/2,fill:"none",strokeWidth:c,"aria-hidden":"true"}):null,(0,gr.jsx)(gI,{className:b.circle,style:v,ownerState:y,cx:XC,cy:XC,r:(XC-c)/2,fill:"none",strokeWidth:c})]})})});function getButtonUtilityClass(e){return generateUtilityClass("MuiButton",e)}var AI=generateUtilityClasses("MuiButton",["root","text","outlined","contained","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),CI=l.createContext({}),II=l.createContext(void 0),useUtilityClasses$26=e=>{const{color:t,disableElevation:g,fullWidth:n,size:C,variant:I,loading:o,loadingPosition:a,classes:i}=e,s=composeClasses({root:["root",o&&"loading",I,`size${Qn(C)}`,`color${Qn(t)}`,g&&"disableElevation",n&&"fullWidth",o&&`loadingPosition${Qn(a)}`],startIcon:["icon","startIcon"],endIcon:["icon","endIcon"],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},getButtonUtilityClass,i);return{...i,...s}},oI=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],aI=On(OC,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,t[g.variant],t[`size${Qn(g.size)}`],"inherit"===g.color&&t.colorInherit,g.disableElevation&&t.disableElevation,g.fullWidth&&t.fullWidth,g.loading&&t.loading]}})(Vn(({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],g="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${AI.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&"start"===e.loadingPosition,style:{"&::before":{content:'"\\200b"',width:0,overflow:"hidden"}}},{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${AI.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${AI.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${AI.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:g,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${AI.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${AI.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${AI.loading}`]:{color:"transparent"}}}]}})),iI=On("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.startIcon,g.loading&&t.startIconLoadingStart]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...oI]})),sI=On("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.endIcon,g.loading&&t.endIconLoadingEnd]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...oI]})),lI=On("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),cI=On("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),uI=l.forwardRef(function(e,t){const g=l.useContext(CI),n=l.useContext(II),C=useDefaultProps({props:resolveProps(g,e),name:"MuiButton"}),{children:I,color:o="primary",component:a="button",className:i,disabled:s=!1,disableElevation:c=!1,disableFocusRipple:u=!1,endIcon:d,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:y=null,loadingIndicator:b,loadingPosition:v="center",size:x="medium",startIcon:S,type:w,variant:E="text",...R}=C,M=jC(h),T=b??(0,gr.jsx)(nI,{"aria-labelledby":M,color:"inherit",size:16}),P={...C,color:o,component:a,disabled:s,disableElevation:c,disableFocusRipple:u,fullWidth:m,loading:y,loadingIndicator:T,loadingPosition:v,size:x,type:w,variant:E},N=useUtilityClasses$26(P),D=(S||y&&"start"===v)&&(0,gr.jsx)(iI,{className:N.startIcon,ownerState:P,children:S||(0,gr.jsx)(cI,{className:N.loadingIconPlaceholder,ownerState:P})}),O=(d||y&&"end"===v)&&(0,gr.jsx)(sI,{className:N.endIcon,ownerState:P,children:d||(0,gr.jsx)(cI,{className:N.loadingIconPlaceholder,ownerState:P})}),j=n||"",G="boolean"==typeof y?(0,gr.jsx)("span",{className:N.loadingWrapper,style:{display:"contents"},children:y&&(0,gr.jsx)(lI,{className:N.loadingIndicator,ownerState:P,children:T})}):null,{root:L,...B}=N;return(0,gr.jsxs)(aI,{ownerState:P,className:clsx(g.className,N.root,i,j),component:a,disabled:s||y,focusRipple:!u,focusVisibleClassName:clsx(N.focusVisible,p),ref:t,internalNativeButton:!0,type:w,id:y?M:h,...R,classes:B,children:[D,"end"!==v&&G,I,"end"===v&&G,O]})});function getDialogUtilityClass(e){return generateUtilityClass("MuiDialog",e)}generateUtilityClasses("MuiDialog",["root","backdrop","scrollPaper","scrollBody","container","paper","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var dI=l.createContext({}),pI=On(oC,{name:"MuiDialog",slot:"Backdrop"})({zIndex:-1}),useUtilityClasses$25=e=>{const{classes:t,scroll:g,maxWidth:n,fullWidth:C,fullScreen:I}=e;return composeClasses({root:["root"],backdrop:["backdrop"],container:["container",`scroll${Qn(g)}`],paper:["paper",`paperWidth${Qn(String(n))}`,C&&"paperFullWidth",I&&"paperFullScreen"]},getDialogUtilityClass,t)},mI=On(lC,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),fI=On("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.container,t[`scroll${Qn(g.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),hI=On(Kn,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.paper,t[`paperWidth${Qn(String(g.maxWidth))}`],g.fullWidth&&t.paperFullWidth,g.fullScreen&&t.paperFullScreen]}})(Vn(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`}},{props:{maxWidth:"xs",scroll:"body"},style:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`}})),...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(t=>({props:{maxWidth:t,scroll:"body"},style:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0}},{props:({ownerState:e})=>e.fullScreen&&"body"===e.scroll,style:{margin:0,maxWidth:"100%"}}]}))),yI=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiDialog"}),n=useTheme$1(),C={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{"aria-describedby":I,"aria-labelledby":o,"aria-modal":a=!0,children:i,className:s,fullScreen:c=!1,fullWidth:u=!1,maxWidth:d="sm",onClick:p,onClose:m,open:h,PaperComponent:y=Kn,role:b="dialog",scroll:v="paper",slots:x={},slotProps:S={},transitionDuration:w=C,...E}=g,R={...g,fullScreen:c,fullWidth:u,maxWidth:d,scroll:v},M=useUtilityClasses$25(R),T=l.useRef(),handleMouseDown=e=>{T.current=e.target===e.currentTarget},handleBackdropClick=e=>{p&&p(e),T.current&&(T.current=null,m&&m(e,"backdropClick"))},P=useId$1(o),N=l.useMemo(()=>({titleId:P}),[P]),D={slots:x,slotProps:S},[O,j]=useSlot("root",{elementType:mI,shouldForwardComponentProp:!0,externalForwardedProps:D,ownerState:R,className:clsx(M.root,s),ref:t}),[G,L]=useSlot("backdrop",{elementType:pI,shouldForwardComponentProp:!0,externalForwardedProps:D,ownerState:R,className:M.backdrop}),[B,F]=useSlot("paper",{elementType:hI,shouldForwardComponentProp:!0,externalForwardedProps:D,ownerState:R,className:M.paper,additionalProps:{elevation:24,role:b,"aria-describedby":I,"aria-labelledby":P,"aria-modal":a,tabIndex:-1,[tC]:""}}),[W,V]=useSlot("container",{elementType:fI,externalForwardedProps:D,ownerState:R,className:M.container}),[U,K]=useSlot("transition",{elementType:CC,externalForwardedProps:D,ownerState:R,additionalProps:{appear:!0,in:h,timeout:w,role:"presentation"}});return(0,gr.jsx)(O,{closeAfterTransition:!0,slots:{backdrop:G},slotProps:{backdrop:{transitionDuration:w,...L}},onClose:m,open:h,onClick:handleBackdropClick,...j,...E,children:(0,gr.jsx)(U,{...K,children:(0,gr.jsx)(W,{onMouseDown:handleMouseDown,...V,children:(0,gr.jsx)(B,{as:y,...F,children:(0,gr.jsx)(dI.Provider,{value:N,children:i})})})})})});function getDialogActionsUtilityClass(e){return generateUtilityClass("MuiDialogActions",e)}generateUtilityClasses("MuiDialogActions",["root","spacing"]);var useUtilityClasses$24=e=>{const{classes:t,disableSpacing:g}=e;return composeClasses({root:["root",!g&&"spacing"]},getDialogActionsUtilityClass,t)},bI=On("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,!g.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),vI=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiDialogActions"}),{className:n,disableSpacing:C=!1,...I}=g,o={...g,disableSpacing:C};return(0,gr.jsx)(bI,{className:clsx(useUtilityClasses$24(o).root,n),ownerState:o,ref:t,...I})});function getDialogContentUtilityClass(e){return generateUtilityClass("MuiDialogContent",e)}function getDialogTitleUtilityClass(e){return generateUtilityClass("MuiDialogTitle",e)}generateUtilityClasses("MuiDialogContent",["root","dividers"]);var xI=generateUtilityClasses("MuiDialogTitle",["root"]),useUtilityClasses$23=e=>{const{classes:t,dividers:g}=e;return composeClasses({root:["root",g&&"dividers"]},getDialogContentUtilityClass,t)},SI=On("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.dividers&&t.dividers]}})(Vn(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${xI.root} + &`]:{paddingTop:0}}}]}))),wI=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiDialogContent"}),{className:n,dividers:C=!1,...I}=g,o={...g,dividers:C};return(0,gr.jsx)(SI,{className:clsx(useUtilityClasses$23(o).root,n),ownerState:o,ref:t,...I})}),useUtilityClasses$22=e=>{const{classes:t}=e;return composeClasses({root:["root"]},getDialogTitleUtilityClass,t)},EI=On(qn,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),RI=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiDialogTitle"}),{className:n,id:C,...I}=g,o=g,a=useUtilityClasses$22(o),{titleId:i=C}=l.useContext(dI);return(0,gr.jsx)(EI,{component:"h2",className:clsx(a.root,n),ownerState:o,ref:t,variant:"h6",id:C??i,...I})}),kI=l.createContext(void 0);function useFormControl(){return l.useContext(kI)}function useFormControlState({props:e,states:t}){const g=l.useContext(kI),n={};return t.forEach(t=>{const C=e[t];n[t]=void 0===C&&g?g[t]:C}),[n,g]}function getFormControlLabelUtilityClasses(e){return generateUtilityClass("MuiFormControlLabel",e)}var MI=generateUtilityClasses("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),useUtilityClasses$21=e=>{const{classes:t,disabled:g,labelPlacement:n,error:C,required:I}=e;return composeClasses({root:["root",g&&"disabled",`labelPlacement${Qn(n)}`,C&&"error",I&&"required"],label:["label",g&&"disabled"],asterisk:["asterisk",C&&"error"]},getFormControlLabelUtilityClasses,t)},TI=On("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[{[`& .${MI.label}`]:t.label},t.root,t[`labelPlacement${Qn(g.labelPlacement)}`]]}})(Vn(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${MI.disabled}`]:{cursor:"default"},[`& .${MI.label}`]:{[`&.${MI.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:e})=>"start"===e||"top"===e||"bottom"===e,style:{marginLeft:16}}]}))),PI=On("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(Vn(({theme:e})=>({[`&.${MI.error}`]:{color:(e.vars||e).palette.error.main}}))),NI=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiFormControlLabel"}),{checked:n,className:C,control:I,disabled:o,disableTypography:a,inputRef:i,label:s,labelPlacement:c="end",name:u,onChange:d,required:p,slots:m={},slotProps:h={},value:y,...b}=g,[v,x]=useFormControlState({props:g,states:["error"]}),S=o??I.props.disabled??x?.disabled,w=p??I.props.required,E={disabled:S,required:w};["checked","name","onChange","value","inputRef"].forEach(e=>{void 0===I.props[e]&&void 0!==g[e]&&(E[e]=g[e])});const R={...g,disabled:S,labelPlacement:c,required:w,error:v.error},M=useUtilityClasses$21(R),[T,P]=useSlot("typography",{elementType:qn,externalForwardedProps:{slots:m,slotProps:h},ownerState:R});let N=s;return null==N||N.type===qn||a||(N=(0,gr.jsx)(T,{component:"span",...P,className:clsx(M.label,P?.className),children:N})),(0,gr.jsxs)(TI,{className:clsx(M.root,C),ownerState:R,ref:t,...b,children:[l.cloneElement(I,E),w?(0,gr.jsxs)("div",{children:[N,(0,gr.jsxs)(PI,{ownerState:R,"aria-hidden":!0,className:M.asterisk,children:[" ","*"]})]}):N]})});function getSwitchBaseUtilityClass(e){return generateUtilityClass("PrivateSwitchBase",e)}generateUtilityClasses("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var useUtilityClasses$20=e=>{const{classes:t,checked:g,disabled:n,edge:C}=e;return composeClasses({root:["root",g&&"checked",n&&"disabled",C&&`edge${Qn(C)}`],input:["input"]},getSwitchBaseUtilityClass,t)},DI=On(OC,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),OI=On("input",{name:"MuiSwitchBase",shouldForwardProp:rootShouldForwardProp})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),jI=l.forwardRef(function(e,t){const{autoFocus:g,checked:n,checkedIcon:C,defaultChecked:I,disabled:o,disableFocusRipple:a=!1,edge:i=!1,icon:s,id:l,name:c,onBlur:u,onChange:d,onFocus:p,readOnly:m,required:h=!1,tabIndex:y,type:b,value:v,slots:x={},slotProps:S={},...w}=e,{nativeButton:E,...R}=w,[M,T]=QC({controlled:n,default:Boolean(I),name:"SwitchBase",state:"checked"}),P=useFormControl(),handleFocus=e=>{p&&p(e),P&&P.onFocus&&P.onFocus(e)},handleBlur=e=>{u&&u(e),P&&P.onBlur&&P.onBlur(e)},handleInputChange=e=>{if(e.nativeEvent.defaultPrevented||m)return;const t=e.target.checked;T(t),d&&d(e,t)};let N=o;P&&void 0===N&&(N=P.disabled);const D="checkbox"===b||"radio"===b,O={...e,checked:M,disabled:N,disableFocusRipple:a,edge:i},j=useUtilityClasses$20(O),G={slots:x,slotProps:S},[L,B]=useSlot("root",{ref:t,elementType:DI,className:j.root,shouldForwardComponentProp:!0,externalForwardedProps:{...G,component:"span",...R},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),handleFocus(t)},onBlur:t=>{e.onBlur?.(t),handleBlur(t)}}),ownerState:O,additionalProps:{centerRipple:!0,focusRipple:!a,role:void 0,tabIndex:null}}),[F,W]=useSlot("input",{elementType:OI,className:j.input,externalForwardedProps:G,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),handleInputChange(t)}}),ownerState:O,additionalProps:{autoFocus:g,checked:n,defaultChecked:I,disabled:N,id:D?l:void 0,name:c,readOnly:m,required:h,tabIndex:y,type:b,..."checkbox"===b&&void 0===v?{}:{value:v}}});return(0,gr.jsxs)(L,{...B,children:[(0,gr.jsx)(F,{...W}),M?C:s]})});function getSwitchUtilityClass(e){return generateUtilityClass("MuiSwitch",e)}var zI=generateUtilityClasses("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),useUtilityClasses$19=e=>{const{classes:t,edge:g,size:n,color:C,checked:I,disabled:o}=e,a=composeClasses({root:["root",g&&`edge${Qn(g)}`,`size${Qn(n)}`],switchBase:["switchBase",`color${Qn(C)}`,I&&"checked",o&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},getSwitchUtilityClass,t);return{...t,...a}},GI=On("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.edge&&t[`edge${Qn(g.edge)}`],t[`size${Qn(g.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${zI.thumb}`]:{width:16,height:16},[`& .${zI.switchBase}`]:{padding:4,[`&.${zI.checked}`]:{transform:"translateX(16px)"}}}}]}),LI=On(jI,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.switchBase,{[`& .${zI.input}`]:t.input},"default"!==g.color&&t[`color${Qn(g.color)}`]]}})(Vn(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${zI.checked}`]:{transform:"translateX(20px)"},[`&.${zI.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${zI.checked} + .${zI.track}`]:{opacity:.5},[`&.${zI.disabled} + .${zI.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:""+("light"===e.palette.mode?.12:.2)},[`& .${zI.input}`]:{left:"-100%",width:"300%"}})),Vn(({theme:e})=>({"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(createSimplePaletteValueFilter(["light"])).map(([t])=>({props:{color:t},style:{[`&.${zI.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${zI.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.55)}`}},[`&.${zI.checked} + .${zI.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),BI=On("span",{name:"MuiSwitch",slot:"Track"})(Vn(({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),"@media (forced-colors: active)":{boxSizing:"border-box",border:"1px solid ButtonBorder"},backgroundColor:e.vars?e.vars.palette.common.onBackground:`${"light"===e.palette.mode?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:""+("light"===e.palette.mode?.38:.3)}))),FI=On("span",{name:"MuiSwitch",slot:"Thumb"})(Vn(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",boxSizing:"border-box",border:"1px solid transparent",width:20,height:20,borderRadius:"50%"}))),WI=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiSwitch"}),{className:n,color:C="primary",edge:I=!1,size:o="medium",sx:a,slots:i={},slotProps:s={},...l}=g,c={...g,color:C,edge:I,size:o},u=useUtilityClasses$19(c),d=s.input,p={slots:i,slotProps:s},[m,h]=useSlot("root",{className:clsx(u.root,n),elementType:GI,externalForwardedProps:p,ownerState:c,additionalProps:{sx:a}}),[y,b]=useSlot("thumb",{className:u.thumb,elementType:FI,externalForwardedProps:p,ownerState:c}),v=(0,gr.jsx)(y,{...b}),[x,S]=useSlot("track",{className:u.track,elementType:BI,externalForwardedProps:p,ownerState:c});return(0,gr.jsxs)(m,{...h,children:[(0,gr.jsx)(LI,{type:"checkbox",icon:v,checkedIcon:v,ref:t,ownerState:c,...l,classes:{...u,root:u.switchBase},slots:{...i.switchBase&&{root:i.switchBase},...i.input&&{input:i.input}},slotProps:{...s.switchBase&&{root:"function"==typeof s.switchBase?s.switchBase(c):s.switchBase},input:mergeSlotProps("function"==typeof d?d(c):d,{role:"switch"})}}),(0,gr.jsx)(x,{...S})]})});function getStyleValue(e){return parseInt(e,10)||0}var VI={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function isObjectEmpty(e){for(const t in e)return!1;return!0}function isEmpty(e){return isObjectEmpty(e)||0===e.outerHeightStyle&&!e.overflowing}var UI=l.forwardRef(function(e,t){const{onChange:g,maxRows:n,minRows:C=1,style:I,value:o,...a}=e,{current:i}=l.useRef(null!=o),s=l.useRef(null),c=useForkRef(t,s),u=l.useRef(null),d=l.useRef(null),p=l.useCallback(()=>{const t=s.current,g=d.current;if(!t||!g)return;const I=ownerWindow(t).getComputedStyle(t);if("0px"===I.width)return{outerHeightStyle:0,overflowing:!1};g.style.width=I.width,g.value=t.value||e.placeholder||"x","\n"===g.value.slice(-1)&&(g.value+=" ");const o=I.boxSizing,a=getStyleValue(I.paddingBottom)+getStyleValue(I.paddingTop),i=getStyleValue(I.borderBottomWidth)+getStyleValue(I.borderTopWidth),l=g.scrollHeight;g.value="x";const c=g.scrollHeight;let u=l;return C&&(u=Math.max(Number(C)*c,u)),n&&(u=Math.min(Number(n)*c,u)),u=Math.max(u,c),{outerHeightStyle:u+("border-box"===o?a+i:0),overflowing:Math.abs(u-l)<=1}},[n,C,e.placeholder]),m=useEventCallback(()=>{const e=s.current,t=p();if(!e||!t||isEmpty(t))return!1;const g=t.outerHeightStyle;return null!=u.current&&u.current!==g}),h=l.useCallback(()=>{const e=s.current,t=p();if(!e||!t||isEmpty(t))return;const g=t.outerHeightStyle;u.current!==g&&(u.current=g,e.style.height=`${g}px`),e.style.overflow=t.overflowing?"hidden":""},[p]),y=l.useRef(-1);Qr(()=>{const e=debounce$1(h),t=s?.current;if(!t)return;const g=ownerWindow(t);let n;return g.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(n=new ResizeObserver(()=>{m()&&(n.unobserve(t),cancelAnimationFrame(y.current),h(),y.current=requestAnimationFrame(()=>{n.observe(t)}))}),n.observe(t)),()=>{e.clear(),cancelAnimationFrame(y.current),g.removeEventListener("resize",e),n&&n.disconnect()}},[p,h,m]),Qr(()=>{h()});const handleChange=e=>{i||h();const t=e.target,n=t.value.length,C=t.value.endsWith("\n"),I=t.selectionStart===n;C&&I&&t.setSelectionRange(n,n),g&&g(e)};return(0,gr.jsxs)(l.Fragment,{children:[(0,gr.jsx)("textarea",{value:o,onChange:handleChange,ref:c,rows:C,style:I,...a}),(0,gr.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:d,tabIndex:-1,style:{...VI.shadow,...I,paddingTop:0,paddingBottom:0}})]})});function hasValue(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function isFilled(e,t=!1){return e&&(hasValue(e.value)&&""!==e.value||t&&hasValue(e.defaultValue)&&""!==e.defaultValue)}function isAdornedStart(e){return e.startAdornment}function getInputBaseUtilityClass(e){return generateUtilityClass("MuiInputBase",e)}var KI,HI=generateUtilityClasses("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputTypeSearch"]),YI="mui-auto-fill",ZI="mui-auto-fill-cancel",rootOverridesResolver=(e,t)=>{const{ownerState:g}=e;return[t.root,g.formControl&&t.formControl,g.startAdornment&&t.adornedStart,g.endAdornment&&t.adornedEnd,g.error&&t.error,"small"===g.size&&t.sizeSmall,g.multiline&&t.multiline,g.color&&t[`color${Qn(g.color)}`],g.fullWidth&&t.fullWidth,g.hiddenLabel&&t.hiddenLabel]},inputOverridesResolver=(e,t)=>{const{ownerState:g}=e;return[t.input,"search"===g.type&&t.inputTypeSearch]},useUtilityClasses$18=e=>{const{classes:t,color:g,disabled:n,error:C,endAdornment:I,focused:o,formControl:a,fullWidth:i,hiddenLabel:s,multiline:l,readOnly:c,size:u,startAdornment:d,type:p}=e;return composeClasses({root:["root",`color${Qn(g)}`,n&&"disabled",C&&"error",i&&"fullWidth",o&&"focused",a&&"formControl",u&&"medium"!==u&&`size${Qn(u)}`,l&&"multiline",d&&"adornedStart",I&&"adornedEnd",s&&"hiddenLabel",c&&"readOnly"],input:["input",n&&"disabled","search"===p&&"inputTypeSearch",c&&"readOnly"]},getInputBaseUtilityClass,t)},QI=On("div",{name:"MuiInputBase",slot:"Root",overridesResolver:rootOverridesResolver})(Vn(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${HI.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]}))),XI=On("input",{name:"MuiInputBase",slot:"Input",overridesResolver:inputOverridesResolver})(Vn(({theme:e})=>{const t="light"===e.palette.mode,g={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},n={opacity:"0 !important"},C=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":g,"&::-moz-placeholder":g,"&::-ms-input-placeholder":g,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${HI.formControl} &`]:{"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus::-webkit-input-placeholder":C,"&:focus::-moz-placeholder":C,"&:focus::-ms-input-placeholder":C},[`&.${HI.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:ZI,animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:YI}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),_I=globalCss({[`@keyframes ${YI}`]:{from:{animationName:YI}},[`@keyframes ${ZI}`]:{from:{animationName:ZI}}}),qI=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiInputBase"}),{"aria-describedby":n,"aria-label":C,autoComplete:I,autoFocus:o,className:a,color:i,defaultValue:s,disabled:c,disableInjectingGlobalStyles:u,endAdornment:d,error:p,fullWidth:m=!1,id:h,inputComponent:y="input",inputProps:b={},inputRef:v,margin:x,maxRows:S,minRows:w,multiline:E=!1,name:R,onBlur:M,onChange:T,onClick:P,onFocus:N,onKeyDown:D,onKeyUp:O,placeholder:j,readOnly:G,renderSuffix:L,rows:B,size:F,slotProps:W={},slots:V={},startAdornment:U,type:K="text",value:H,...Y}=g,Z=null!=b.value?b.value:H,{current:Q}=l.useRef(null!=Z),X=l.useRef(),_=l.useCallback(e=>{},[]),q=EA(X,v,b.ref,_),[J,$]=l.useState(!1),[ee,te]=useFormControlState({props:g,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ee.focused=te?te.focused:J,l.useEffect(()=>{!te&&c&&J&&($(!1),M&&M())},[te,c,J,M]);const ge=te&&te.onFilled,re=te&&te.onEmpty,ne=l.useCallback(e=>{isFilled(e)?ge&&ge():re&&re()},[ge,re]);RA(()=>{Q&&ne({value:Z})},[Z,ne,Q]),RA(()=>{if(!o)return;const e=X.current;if(!e)return;const t=vA(e),g=xA(t),n=null==g||g===t.body||g===t.documentElement;e===g?te&&te.onFocus?te.onFocus():$(!0):n&&e.focus()},[o]);const handleFocus=e=>{N&&N(e),b.onFocus&&b.onFocus(e),te&&te.onFocus?te.onFocus(e):$(!0)},handleBlur=e=>{M&&M(e),b.onBlur&&b.onBlur(e),te&&te.onBlur?te.onBlur(e):$(!1)},handleChange=(e,...t)=>{if(!Q){const t=e.target||X.current;if(null==t)throw new Error(formatMuiErrorMessage(1));ne({value:t.value})}b.onChange&&b.onChange(e,...t),T&&T(e,...t)};l.useEffect(()=>{ne(X.current)},[]);const handleClick=e=>{X.current&&e.currentTarget===e.target&&X.current.focus(),P&&P(e)};let Ae=y,Ce=b;E&&"input"===Ae&&(Ce=B?{type:void 0,minRows:B,maxRows:B,...Ce}:{type:void 0,maxRows:S,minRows:w,...Ce},Ae=UI);const handleAutoFill=e=>{ne(e.animationName===ZI?X.current:{value:"x"})};l.useEffect(()=>{te&&te.setAdornedStart(Boolean(U))},[te,U]);const Ie={...g,color:ee.color||"primary",disabled:ee.disabled,endAdornment:d,error:ee.error,focused:ee.focused,formControl:te,fullWidth:m,hiddenLabel:ee.hiddenLabel,multiline:E,size:ee.size,startAdornment:U,type:K},oe=useUtilityClasses$18(Ie),ae=V.root||QI,ie=W.root||{},se=V.input||XI;return Ce={...Ce,...W.input},(0,gr.jsxs)(l.Fragment,{children:[!u&&"function"==typeof _I&&(KI||(KI=(0,gr.jsx)(_I,{}))),(0,gr.jsxs)(ae,{...ie,ref:t,onClick:handleClick,...Y,...!isHostComponent(ae)&&{ownerState:{...Ie,...ie.ownerState}},className:clsx(oe.root,ie.className,a,G&&"MuiInputBase-readOnly"),children:[U,(0,gr.jsx)(kI.Provider,{value:null,children:(0,gr.jsx)(se,{"aria-invalid":ee.error,"aria-describedby":n,"aria-label":C,autoComplete:I,autoFocus:o,defaultValue:s,disabled:ee.disabled,id:h,onAnimationStart:handleAutoFill,name:R,placeholder:j,readOnly:G,required:ee.required,rows:B,value:Z,onKeyDown:D,onKeyUp:O,type:K,...Ce,...!isHostComponent(se)&&{as:Ae,ownerState:{...Ie,...Ce.ownerState}},ref:q,className:clsx(oe.input,Ce.className,G&&"MuiInputBase-readOnly"),onBlur:handleBlur,onChange:handleChange,onFocus:handleFocus})}),d,L?L({...ee,startAdornment:U}):null]})]})});function getInputLabelUtilityClasses(e){return generateUtilityClass("MuiInputLabel",e)}var JI=generateUtilityClasses("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);function getInputUtilityClass(e){return generateUtilityClass("MuiInput",e)}var $I={...HI,...generateUtilityClasses("MuiInput",["root","underline","input"])},useUtilityClasses$17=e=>{const{classes:t,disableUnderline:g}=e,n=composeClasses({root:["root",!g&&"underline"],input:["input"]},getInputUtilityClass,t);return{...t,...n}},eo=On(QI,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[...rootOverridesResolver(e,t),!g.disableUnderline&&t.underline]}})(Vn(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:e})=>e.formControl,style:{[`label + &, .${JI.root} + &`]:{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${$I.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${$I.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${$I.disabled}, .${$I.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${$I.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),to=On(XI,{name:"MuiInput",slot:"Input",overridesResolver:inputOverridesResolver})({}),go=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiInput"}),{disableUnderline:n=!1,fullWidth:C=!1,inputComponent:I="input",multiline:o=!1,notched:a,slotProps:i,slots:s={},type:l="text",...c}=g,u=useUtilityClasses$17(g),d={root:{ownerState:{disableUnderline:n}}},p=i?deepmerge(i,d):d;return(0,gr.jsx)(qI,{slots:{root:s.root??eo,input:s.input??to},slotProps:p,fullWidth:C,inputComponent:I,multiline:o,ref:t,type:l,...c,classes:u})});function getFilledInputUtilityClass(e){return generateUtilityClass("MuiFilledInput",e)}go.muiName="Input";var ro,no={...HI,...generateUtilityClasses("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},useUtilityClasses$16=e=>{const{classes:t,disableUnderline:g,startAdornment:n,endAdornment:C,size:I,hiddenLabel:o,multiline:a}=e,i=composeClasses({root:["root",!g&&"underline",n&&"adornedStart",C&&"adornedEnd","small"===I&&`size${Qn(I)}`,o&&"hiddenLabel",a&&"multiline"],input:["input"]},getFilledInputUtilityClass,t);return{...t,...i}},Ao=On(QI,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[...rootOverridesResolver(e,t),!g.disableUnderline&&t.underline]}})(Vn(({theme:e})=>{const t="light"===e.palette.mode,g=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",n=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",C=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",I=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:C,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n}},[`&.${no.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n},[`&.${no.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:I},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${no.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${no.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):g}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${no.disabled}, .${no.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${no.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}}]}})),Co=On(XI,{name:"MuiFilledInput",slot:"Input",overridesResolver:inputOverridesResolver})(Vn(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,"&:-webkit-autofill":{...!e.vars&&{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff"},borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit",...e.vars&&e.applyStyles("dark",{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"})},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Io=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiFilledInput"}),{disableUnderline:n=!1,fullWidth:C=!1,hiddenLabel:I,inputComponent:o="input",multiline:a=!1,notched:i,slotProps:s,slots:l={},type:c="text",...u}=g,d={...g,disableUnderline:n,fullWidth:C,inputComponent:o,multiline:a,type:c},p=useUtilityClasses$16(g),m={root:{ownerState:d},input:{ownerState:d}},h=s?deepmerge(m,s):m;return(0,gr.jsx)(qI,{slots:{root:l.root??Ao,input:l.input??Co},slotProps:h,fullWidth:C,inputComponent:o,multiline:a,ref:t,type:c,...u,classes:p})});Io.muiName="Input";var oo=On("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:rootShouldForwardProp})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),ao=On("legend",{name:"MuiNotchedOutlined",shouldForwardProp:rootShouldForwardProp})(Vn(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function NotchedOutline(e){const{children:t,classes:g,className:n,label:C,notched:I,...o}=e,a=null!=C&&""!==C,i={...e,notched:I,withLabel:a};return(0,gr.jsx)(oo,{"aria-hidden":!0,className:n,ownerState:i,...o,children:(0,gr.jsx)(ao,{ownerState:i,children:a?(0,gr.jsx)("span",{children:C}):ro||(ro=(0,gr.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}function getOutlinedInputUtilityClass(e){return generateUtilityClass("MuiOutlinedInput",e)}var io={...HI,...generateUtilityClasses("MuiOutlinedInput",["root","notchedOutline","input"])},useUtilityClasses$15=e=>{const{classes:t}=e,g=composeClasses({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},getOutlinedInputUtilityClass,t);return{...t,...g}},so=On(QI,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:rootOverridesResolver})(Vn(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${io.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${io.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${io.focused} .${io.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{[`&.${io.focused} .${io.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${io.error} .${io.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${io.disabled} .${io.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{padding:"8.5px 14px"}}]}})),lo=On(NotchedOutline,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Vn(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),co=On(XI,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:inputOverridesResolver})(Vn(({theme:e})=>({padding:"16.5px 14px","&:-webkit-autofill":{...!e.vars&&{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff"},borderRadius:"inherit",...e.vars&&e.applyStyles("dark",{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"})},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),uo=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiOutlinedInput"}),{fullWidth:n=!1,inputComponent:C="input",label:I,multiline:o=!1,notched:a,slots:i={},slotProps:s={},type:c="text",...u}=g,d=useUtilityClasses$15(g),[p,m]=useFormControlState({props:g,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),h={...g,color:p.color||"primary",disabled:p.disabled,error:p.error,focused:p.focused,formControl:m,fullWidth:n,hiddenLabel:p.hiddenLabel,multiline:o,size:p.size,type:c},y=i.root??so,b=i.input??co,[v,x]=useSlot("notchedOutline",{elementType:lo,className:d.notchedOutline,shouldForwardComponentProp:!0,ownerState:h,externalForwardedProps:{slots:i,slotProps:s},additionalProps:{label:null!=I&&""!==I&&p.required?(0,gr.jsxs)(l.Fragment,{children:[I," ","*"]}):I}});return(0,gr.jsx)(qI,{slots:{root:y,input:b},slotProps:s,renderSuffix:e=>(0,gr.jsx)(v,{...x,notched:void 0!==a?a:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:n,inputComponent:C,multiline:o,ref:t,type:c,...u,classes:{...d,notchedOutline:null}})});function getFormLabelUtilityClasses(e){return generateUtilityClass("MuiFormLabel",e)}uo.muiName="Input";var po=generateUtilityClasses("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),useUtilityClasses$14=e=>{const{classes:t,color:g,focused:n,disabled:C,error:I,filled:o,required:a}=e;return composeClasses({root:["root",`color${Qn(g)}`,C&&"disabled",I&&"error",o&&"filled",n&&"focused",a&&"required"],asterisk:["asterisk",I&&"error"]},getFormLabelUtilityClasses,t)},mo=On("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,"secondary"===g.color&&t.colorSecondary,g.filled&&t.filled]}})(Vn(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{[`&.${po.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${po.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${po.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),fo=On("span",{name:"MuiFormLabel",slot:"Asterisk"})(Vn(({theme:e})=>({[`&.${po.error}`]:{color:(e.vars||e).palette.error.main}}))),useUtilityClasses$13=e=>{const{classes:t,formControl:g,size:n,shrink:C,disableAnimation:I,variant:o,required:a}=e,i=composeClasses({root:["root",g&&"formControl",!I&&"animated",C&&"shrink",n&&"medium"!==n&&`size${Qn(n)}`,o],asterisk:[a&&"asterisk"]},getInputLabelUtilityClasses,t);return{...t,...i}},ho=On(l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiFormLabel"}),{children:n,className:C,color:I,component:o="label",disabled:a,error:i,filled:s,focused:l,required:c,...u}=g,[d]=useFormControlState({props:g,states:["color","required","focused","disabled","error","filled"]}),p={...g,color:d.color||"primary",component:o,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required},m=useUtilityClasses$14(p);return(0,gr.jsxs)(mo,{as:o,ownerState:p,className:clsx(m.root,C),ref:t,...u,children:[n,d.required&&(0,gr.jsxs)(fo,{ownerState:p,"aria-hidden":!0,className:m.asterisk,children:[" ","*"]})]})}),{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[{[`& .${po.asterisk}`]:t.asterisk},t.root,g.formControl&&t.formControl,"small"===g.size&&t.sizeSmall,g.shrink&&t.shrink,!g.disableAnimation&&t.animated,g.focused&&t.focused,t[g.variant]]}})(Vn(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:e,ownerState:t})=>"filled"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:t,size:g})=>"filled"===e&&t.shrink&&"small"===g,style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:e,ownerState:t})=>"outlined"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),yo=l.forwardRef(function(e,t){const g=useDefaultProps({name:"MuiInputLabel",props:e}),{disableAnimation:n=!1,margin:C,shrink:I,variant:o,className:a,...i}=g,[s,l]=useFormControlState({props:g,states:["size","variant","required","focused"]});let c=I;void 0===c&&l&&(c=l.filled||l.focused||l.adornedStart);const u={...g,disableAnimation:n,formControl:l,shrink:c,size:s.size,variant:s.variant,required:s.required,focused:s.focused},d=useUtilityClasses$13(u);return(0,gr.jsx)(ho,{"data-shrink":c,ref:t,className:clsx(d.root,a),...i,ownerState:u,classes:d})});function getFormControlUtilityClasses(e){return generateUtilityClass("MuiFormControl",e)}generateUtilityClasses("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var useUtilityClasses$12=e=>{const{classes:t,margin:g,fullWidth:n}=e;return composeClasses({root:["root","none"!==g&&`margin${Qn(g)}`,n&&"fullWidth"]},getFormControlUtilityClasses,t)},bo=On("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,t[`margin${Qn(g.margin)}`],g.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),vo=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiFormControl"}),{children:n,className:C,color:I="primary",component:o="div",disabled:a=!1,error:i=!1,focused:s,fullWidth:c=!1,hiddenLabel:u=!1,margin:d="none",required:p=!1,size:m="medium",variant:h="outlined",...y}=g,b={...g,color:I,component:o,disabled:a,error:i,fullWidth:c,hiddenLabel:u,margin:d,required:p,size:m,variant:h},v=useUtilityClasses$12(b),[x,S]=l.useState(()=>{let e=!1;return n&&l.Children.forEach(n,t=>{if(!ZC(t,["Input","Select"]))return;const g=ZC(t,["Select"])?t.props.input:t;g&&isAdornedStart(g.props)&&(e=!0)}),e}),[w,E]=l.useState(()=>{let e=!1;return n&&l.Children.forEach(n,t=>{ZC(t,["Input","Select"])&&(isFilled(t.props,!0)||isFilled(t.props.inputProps,!0))&&(e=!0)}),e}),[R,M]=l.useState(!1);a&&R&&M(!1);const T=void 0===s||a?R:s;let P;l.useRef(!1);const N=l.useCallback(()=>{E(!0)},[]),D=l.useCallback(()=>{E(!1)},[]),O=l.useMemo(()=>({adornedStart:x,setAdornedStart:S,color:I,disabled:a,error:i,filled:w,focused:T,fullWidth:c,hiddenLabel:u,size:m,onBlur:()=>{M(!1)},onFocus:()=>{M(!0)},onEmpty:D,onFilled:N,registerEffect:P,required:p,variant:h}),[x,I,a,i,w,T,c,u,P,D,N,p,m,h]);return(0,gr.jsx)(kI.Provider,{value:O,children:(0,gr.jsx)(bo,{as:o,ownerState:b,className:clsx(v.root,C),ref:t,...y,children:n})})});function getFormHelperTextUtilityClasses(e){return generateUtilityClass("MuiFormHelperText",e)}var xo,So=generateUtilityClasses("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),useUtilityClasses$11=e=>{const{classes:t,contained:g,size:n,disabled:C,error:I,filled:o,focused:a,required:i}=e;return composeClasses({root:["root",C&&"disabled",I&&"error",n&&`size${Qn(n)}`,g&&"contained",a&&"focused",o&&"filled",i&&"required"]},getFormHelperTextUtilityClasses,t)},wo=On("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.size&&t[`size${Qn(g.size)}`],g.contained&&t.contained,g.filled&&t.filled]}})(Vn(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${So.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${So.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),Eo=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiFormHelperText"}),{children:n,className:C,component:I="p",disabled:o,error:a,filled:i,focused:s,margin:l,required:c,variant:u,...d}=g,[p]=useFormControlState({props:g,states:["variant","size","disabled","error","filled","focused","required"]}),m={...g,component:I,contained:"filled"===p.variant||"outlined"===p.variant,variant:p.variant,size:p.size,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required};return delete m.ownerState,(0,gr.jsx)(wo,{as:I,className:clsx(useUtilityClasses$11(m).root,C),ref:t,...d,ownerState:m,children:" "===n?xo||(xo=(0,gr.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):n})});function getNativeSelectUtilityClasses(e){return generateUtilityClass("MuiNativeSelect",e)}var Ro=generateUtilityClasses("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),useUtilityClasses$10=e=>{const{classes:t,variant:g,disabled:n,multiple:C,open:I,error:o}=e;return composeClasses({select:["select",g,n&&"disabled",C&&"multiple",o&&"error"],icon:["icon",`icon${Qn(g)}`,I&&"iconOpen",n&&"disabled"]},getNativeSelectUtilityClasses,t)},ko=On("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Ro.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>"filled"!==e.variant&&"outlined"!==e.variant,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),Mo=On(ko,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:rootShouldForwardProp,overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.select,t[g.variant],g.error&&t.error,{[`&.${Ro.multiple}`]:t.multiple}]}})({}),To=On("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Ro.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),Po=On(To,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.icon,g.variant&&t[`icon${Qn(g.variant)}`],g.open&&t.iconOpen]}})({}),No=l.forwardRef(function(e,t){const{className:g,disabled:n,error:C,IconComponent:I,inputRef:o,variant:a="standard",...i}=e,s={...e,disabled:n,variant:a,error:C},c=useUtilityClasses$10(s);return(0,gr.jsxs)(l.Fragment,{children:[(0,gr.jsx)(Mo,{ownerState:s,className:clsx(c.select,g),disabled:n,ref:o||t,...i}),e.multiple?null:(0,gr.jsx)(Po,{as:I,ownerState:s,className:c.icon})]})});function getSelectUtilityClasses(e){return generateUtilityClass("MuiSelect",e)}var Do,Oo=generateUtilityClasses("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","nativeInput","error"]),jo=2,zo=400,Go=200;function isMouseEventInsideElement(e,t){if(!t)return!1;if(e.composedPath().includes(t))return!0;if(e.target?.nodeType&&t.contains(e.target))return!0;const g=t.getBoundingClientRect();return(0!==g.width||0!==g.height)&&e.clientX>=g.left-jo&&e.clientX<=g.right+jo&&e.clientY>=g.top-jo&&e.clientY<=g.bottom+jo}var Lo=On(ko,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[{[`&.${Oo.select}`]:t.select},{[`&.${Oo.select}`]:t[g.variant]},{[`&.${Oo.error}`]:t.error},{[`&.${Oo.multiple}`]:t.multiple}]}})({[`&.${Oo.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Bo=On(To,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.icon,g.open&&t.iconOpen]}})({}),Fo=On("input",{shouldForwardProp:e=>slotShouldForwardProp(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"}),useUtilityClasses$9=e=>{const{classes:t,variant:g,disabled:n,multiple:C,open:I,error:o}=e;return composeClasses({select:["select",g,n&&"disabled",C&&"multiple",o&&"error"],icon:["icon",I&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]},getSelectUtilityClasses,t)},Wo=l.forwardRef(function(e,t){const{"aria-describedby":g,"aria-label":n,autoFocus:C,autoWidth:I,children:o,className:a,defaultOpen:i,defaultValue:s,disabled:c,displayEmpty:u,error:d=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:y={},multiple:b,name:v,onBlur:x,onChange:S,onClose:w,onFocus:E,onKeyDown:R,onMouseDown:M,onOpen:T,open:P,readOnly:N,renderValue:D,required:O,SelectDisplayProps:j={},tabIndex:G,type:L,value:B,variant:F="standard",...W}=e,[V,U]=QC({controlled:B,default:s,name:"Select"}),[K,H]=QC({controlled:P,default:i,name:"Select"}),Y=l.useRef(null),Z=l.useRef(null),Q=l.useRef(null),X=l.useRef(!1),_=l.useRef(!1),q=l.useRef(null),J=l.useRef(!1),$=l.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),ee=useTimeout(),te=useTimeout(),[ge,re]=l.useState(null),{current:ne}=l.useRef(null!=P),[Ae,Ce]=l.useState(),[Ie,oe]=l.useState(null),ae=EA(t,m),ie=l.useCallback(e=>{Z.current=e,e&&re(e)},[]),se=ge?.parentNode;l.useImperativeHandle(ae,()=>({focus:()=>{Z.current.focus()},node:Y.current,value:V}),[V]);const le=null!==ge&&K;RA(()=>{X.current=le},[le]);const ce=l.useCallback(()=>{ee.clear(),te.clear()},[ee,te]),ue=l.useCallback(()=>{ce(),J.current=!1,$.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},[ce]),de=l.useCallback(()=>{q.current&&(q.current(),q.current=null)},[]);l.useEffect(()=>{le||(ue(),de())},[le,ue,de]),l.useEffect(()=>()=>{ue(),de()},[ue,de]),l.useEffect(()=>{if(!le||!se||I)return;if("undefined"==typeof ResizeObserver)return;const e=new ResizeObserver(()=>{Ce(se.clientWidth)});return e.observe(se),()=>{e.disconnect()}},[le,se,I]),l.useEffect(()=>{i&&K&&ge&&!ne&&(Ce(I?null:se.clientWidth),Z.current.focus())},[ge,I]),l.useEffect(()=>{C&&Z.current.focus()},[C]),l.useEffect(()=>{if(!h)return;const e=vA(Z.current).getElementById(h);if(e){const handler=()=>{getSelection().isCollapsed&&Z.current.focus()};return e.addEventListener("click",handler),()=>{e.removeEventListener("click",handler)}}},[h]);const pe=wA((e,t)=>{e||(ue(),de()),e?(oe(getOpenInteractionType(t)),T&&T(t)):(oe(null),w&&w(t)),ne||(X.current=e,Ce(I?null:se.clientWidth),H(e))}),scheduleMouseUpSelection=()=>{ue(),_.current?te.start(Go,()=>{$.current.allowUnselectedMouseUp=!0,ee.start(Go,()=>{$.current.allowSelectedMouseUp=!0})}):ee.start(zo,()=>{$.current.allowSelectedMouseUp=!0,$.current.allowUnselectedMouseUp=!0})},handleMouseDown=e=>{if(M?.(e),0!==e.button)return;e.preventDefault(),Z.current.focus();const t=vA(e.currentTarget);scheduleMouseUpSelection(),de();const handleMouseUp=e=>{q.current=null,Z.current&&(isMouseEventInsideElement(e,Z.current)||isMouseEventInsideElement(e,Q.current)||!X.current&&ne||pe(!1,e))};t.addEventListener("mouseup",handleMouseUp,{capture:!0,once:!0}),q.current=()=>{t.removeEventListener("mouseup",handleMouseUp,!0)},pe(!0,e)},handleClose=e=>{pe(!1,e)},me=l.Children.toArray(o),handleChange=e=>{const t=me.find(t=>t.props.value===e.target.value);void 0!==t&&(U(t.props.value),S&&S(e,t))},handleItemClick=e=>t=>{let g;if(J.current=!1,t.currentTarget.hasAttribute("tabindex")){if(b){g=Array.isArray(V)?V.slice():[];const t=V.indexOf(e.props.value);-1===t?g.push(e.props.value):g.splice(t,1)}else g=e.props.value;if(e.props.onClick&&e.props.onClick(t),V!==g&&(U(g),S)){const n=t.nativeEvent||t,C=new n.constructor(n.type,n);Object.defineProperty(C,"target",{writable:!0,value:{value:g,name:v}}),S(C,e)}b||pe(!1,t)}},handleItemMouseUp=(e,t)=>g=>{if(e.props.onMouseUp?.(g),J.current)return void(J.current=!1);const n=!$.current.allowSelectedMouseUp&&t,C=!$.current.allowUnselectedMouseUp&&!t;n||C||g.currentTarget.click()},handleKeyDown=e=>{N||([" ","ArrowUp","ArrowDown","Enter"].includes(e.key)&&(e.preventDefault(),pe(!0,e)),R?.(e))},handleBlur=e=>{!le&&x&&(Object.defineProperty(e,"target",{writable:!0,value:{value:V,name:v}}),x(e))};let fe,he;delete W["aria-invalid"];const ye=[];let be=!1,ve=!1;(isFilled({value:V})||u)&&(D?fe=D(V):be=!0);const xe=me.map(e=>{if(!l.isValidElement(e))return null;let t;if(b){if(!Array.isArray(V))throw new Error(formatMuiErrorMessage(2));t=V.some(t=>areEqualValues(t,e.props.value)),t&&be&&ye.push(e.props.children)}else t=areEqualValues(V,e.props.value),t&&be&&(he=e.props.children);return t&&(ve=!0),l.cloneElement(e,{"aria-selected":t?"true":"false",onMouseDown:t=>{J.current=!0,e.props.onMouseDown?.(t)},onPointerDown:t=>{J.current=!0,e.props.onPointerDown?.(t)},onClick:handleItemClick(e),onMouseUp:handleItemMouseUp(e,t),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})});RA(()=>{_.current=ve},[ve]),be&&(fe=b?0===ye.length?null:ye.reduce((e,t,g)=>(e.push(t),g<ye.length-1&&e.push(", "),e),[]):he);let Se,we=Ae;!I&&ne&&ge&&(we=se.clientWidth),Se=void 0!==G?G:c?null:0;const Ee=j.id||(v?`mui-component-select-${v}`:void 0),Re={...e,variant:F,value:V,open:le,error:d},ke=useUtilityClasses$9(Re),Me="function"==typeof y.slotProps?.paper?y.slotProps.paper(Re):y.slotProps?.paper,Te=EA(Me?.ref,Q),Pe="function"==typeof y.slotProps?.list?y.slotProps.list(Re):y.slotProps?.list,Ne=useId$1(),De=useId$1();return(0,gr.jsxs)(l.Fragment,{children:[(0,gr.jsx)(Lo,{as:"div",ref:ie,tabIndex:Se,role:"combobox","aria-controls":le?Ne:void 0,"aria-disabled":c?"true":void 0,"aria-expanded":le?"true":"false","aria-haspopup":"listbox","aria-label":n,"aria-labelledby":h,"aria-describedby":g,"aria-required":O?"true":void 0,"aria-invalid":d?"true":void 0,onKeyDown:handleKeyDown,onMouseDown:c||N?null:handleMouseDown,onBlur:handleBlur,onFocus:E,...j,ownerState:Re,className:clsx(j.className,ke.select,a),id:Ee,children:isEmpty$1(fe)?Do||(Do=(0,gr.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):fe}),(0,gr.jsx)(Fo,{"aria-invalid":d,value:Array.isArray(V)?V.join(","):V,name:v,ref:Y,"aria-hidden":!0,onChange:handleChange,tabIndex:-1,disabled:c,className:ke.nativeInput,autoFocus:C,required:O,...W,id:W.id??De,ownerState:Re}),(0,gr.jsx)(Bo,{as:p,className:ke.icon,ownerState:Re}),(0,gr.jsx)(DA,{value:Ie,children:(0,gr.jsx)(bC,{id:`menu-${v||""}`,anchorEl:se,open:le,onClose:handleClose,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...y,slotProps:{...y.slotProps,list:{"aria-labelledby":h,role:"listbox","aria-multiselectable":b?"true":void 0,disableListWrap:!0,id:Ne,...Pe},paper:{...Me,ref:Te,style:{minWidth:we,...Me?.style}}},children:xe})})]})}),Vo=createSvgIcon((0,gr.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),useUtilityClasses$8=e=>{const{classes:t}=e,g=composeClasses({root:["root"]},getSelectUtilityClasses,t);return{...t,...g}},Uo={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>rootShouldForwardProp(e)&&"variant"!==e},Ko=On(go,Uo)(""),Ho=On(uo,Uo)(""),Yo=On(Io,Uo)(""),Zo=l.forwardRef(function(e,t){const g=useDefaultProps({name:"MuiSelect",props:e}),{autoWidth:n=!1,children:C,classes:I={},className:o,defaultOpen:a=!1,displayEmpty:i=!1,IconComponent:s=Vo,id:c,input:u,inputProps:d,label:p,labelId:m,MenuProps:h,multiple:y=!1,native:b=!1,onClose:v,onOpen:x,open:S,renderValue:w,SelectDisplayProps:E,variant:R="outlined",...M}=g,T=b?No:Wo,[P]=useFormControlState({props:g,states:["variant","error"]}),N=P.variant||R,D={...g,variant:N,classes:I},O=useUtilityClasses$8(D),{root:j,...G}=O,L=u||{standard:(0,gr.jsx)(Ko,{ownerState:D}),outlined:(0,gr.jsx)(Ho,{label:p,ownerState:D}),filled:(0,gr.jsx)(Yo,{ownerState:D})}[N],B=EA(t,getReactElementRef(L));return(0,gr.jsx)(l.Fragment,{children:l.cloneElement(L,{inputComponent:T,inputProps:{children:C,error:P.error,IconComponent:s,variant:N,type:void 0,multiple:y,...b?{id:c}:{autoWidth:n,defaultOpen:a,displayEmpty:i,labelId:m,MenuProps:h,onClose:v,onOpen:x,open:S,renderValue:w,SelectDisplayProps:{id:c,...E}},...d,classes:d?deepmerge(G,d.classes):G,...u?u.props.inputProps:{}},...(y&&b||i)&&"outlined"===N?{notched:!0}:{},ref:B,className:clsx(L.props.className,o,O.root),...!u&&{variant:N},...M})})});function getTextFieldUtilityClass(e){return generateUtilityClass("MuiTextField",e)}Zo.muiName="Select",generateUtilityClasses("MuiTextField",["root"]);var Qo={standard:go,filled:Io,outlined:uo},useUtilityClasses$7=e=>{const{classes:t}=e;return composeClasses({root:["root"]},getTextFieldUtilityClass,t)},Xo=On(vo,{name:"MuiTextField",slot:"Root"})({}),_o=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiTextField"}),{autoComplete:n,autoFocus:C=!1,children:I,className:o,color:a="primary",defaultValue:i,disabled:s=!1,error:l=!1,fullWidth:c=!1,helperText:u,id:d,inputRef:p,label:m,maxRows:h,minRows:y,multiline:b=!1,name:v,onBlur:x,onChange:S,onFocus:w,placeholder:E,required:R=!1,rows:M,select:T=!1,slots:P={},slotProps:N={},type:D,value:O,variant:j="outlined",...G}=g,L={...g,autoFocus:C,color:a,disabled:s,error:l,fullWidth:c,multiline:b,required:R,select:T,variant:j},B=useUtilityClasses$7(L),F=useId$1(d),W=u&&F?`${F}-helper-text`:void 0,V=m&&F?`${F}-label`:void 0,U=Qo[j],K={slots:P,slotProps:N},[H,Y]=useSlot("select",{elementType:Zo,externalForwardedProps:K,ownerState:L}),Z=T&&Y.native,Q={},X=K.slotProps.inputLabel;"outlined"===j&&(X&&void 0!==X.shrink&&(Q.notched=X.shrink),Q.label=m),T&&(Z||(Q.id=void 0),Q["aria-describedby"]=void 0);const[_,q]=useSlot("root",{elementType:Xo,shouldForwardComponentProp:!0,externalForwardedProps:{...K,...G},ownerState:L,className:clsx(B.root,o),ref:t,additionalProps:{disabled:s,error:l,fullWidth:c,required:R,color:a,variant:j}}),[J,$]=useSlot("input",{elementType:U,externalForwardedProps:K,additionalProps:Q,ownerState:L}),[ee,te]=useSlot("inputLabel",{elementType:yo,externalForwardedProps:K,ownerState:L}),[ge,re]=useSlot("htmlInput",{elementType:"input",externalForwardedProps:K,ownerState:L}),[ne,Ae]=useSlot("formHelperText",{elementType:Eo,externalForwardedProps:K,ownerState:L}),Ce=(0,gr.jsx)(J,{"aria-describedby":W,autoComplete:n,autoFocus:C,defaultValue:i,fullWidth:c,multiline:b,name:v,rows:M,maxRows:h,minRows:y,type:D,value:O,id:F,inputRef:p,onBlur:x,onChange:S,onFocus:w,placeholder:E,inputProps:re,slots:{input:P.htmlInput?ge:void 0},...$});return(0,gr.jsxs)(_,{...q,children:[null!=m&&""!==m&&(0,gr.jsx)(ee,{htmlFor:T&&!Z?void 0:F,id:V,...T&&!Z&&{component:"div"},...te,children:m}),T?(0,gr.jsx)(H,{"aria-describedby":W,id:F,labelId:V,value:O,input:Ce,...Y,children:I}):Ce,u&&(0,gr.jsx)(ne,{id:W,...Ae,children:u})]})}),qo=600,Jo=400,clampScrollbackGeometryValue=(e,t,g)=>Math.min(Math.max(e,t),g),parseStoredValue=e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return e}},hasUsablePersistenceAdapter=e=>"function"==typeof e?.getVariable&&"function"==typeof e?.setVariable,hasSavedGeometry=e=>!!hasUsablePersistenceAdapter(e)&&isPlainObject$1(parseStoredValue((e.getVariable("nexGui4Settings")||{})[Te.UI])?.scrollbackModal),getScrollbackViewportBounds=()=>"undefined"==typeof window?{width:800,height:600}:{width:Math.max(320,window.innerWidth),height:Math.max(240,window.innerHeight)},getMinimumScrollbackGeometry=()=>{const e=getScrollbackViewportBounds();return{width:Math.min(qo,e.width),height:Math.min(Jo,e.height)}},getDefaultScrollbackGeometry=()=>{const e=getScrollbackViewportBounds(),t=getMinimumScrollbackGeometry(),g=clampScrollbackGeometryValue(Math.round(.7*e.width),t.width,e.width),n=clampScrollbackGeometryValue(Math.round(.7*e.height),t.height,e.height);return{x:Math.round((e.width-g)/2),y:Math.round((e.height-n)/2),width:g,height:n}},normalizeScrollbackGeometry=e=>{const t=getDefaultScrollbackGeometry(),g=getScrollbackViewportBounds(),n=getMinimumScrollbackGeometry(),C=clampScrollbackGeometryValue(Number(e?.width)||t.width,n.width,g.width),I=clampScrollbackGeometryValue(Number(e?.height)||t.height,n.height,g.height);return{x:clampScrollbackGeometryValue(Number(e?.x)||0,0,Math.max(0,g.width-C)),y:clampScrollbackGeometryValue(Number(e?.y)||0,0,Math.max(0,g.height-I)),width:C,height:I}},useScrollbackLayout=()=>{const e=(0,l.useContext)(_t),t=e?.adapter,g=e?.scrollbackLayoutStore,n=e?.persistenceStore?.getAll?.()?.ui??{},C=(0,l.useMemo)(()=>g&&hasSavedGeometry(t)?normalizeScrollbackGeometry(g.get("scrollbackModal")):getDefaultScrollbackGeometry(),[t,g]),I=(0,l.useCallback)(e=>{g?.set("scrollbackModal",normalizeScrollbackGeometry(e))},[g]);return{focusHostInput:(0,l.useCallback)(()=>{t?.focusInput?.()},[t]),initialGeometry:C,persistGeometry:I,useVirtualizedLogs:Boolean(n.virtualizedLogs)}},$o=.8,useScrollbackHydration=({items:e,open:t,scrollbackSession:g,getViewportElement:n,dispatchViewportScroll:C,setScrollLock:I,onViewportOpened:o})=>{const[a,i]=(0,l.useState)([]),[s,c]=(0,l.useState)(!1),[u,d]=(0,l.useState)(!0),p=(0,l.useRef)([]);p.current=a;const m=(0,l.useRef)({hasMore:!0,isLoading:!1});m.current={hasMore:u,isLoading:s},(0,l.useEffect)(()=>{if(!t)return i([]),void d(!0);i(t=>{if(0===e.length)return[];if(0===t.length)return[...e];const g=t[t.length-1]?.id??-1,n=e.filter(e=>e.id>g);return n.length>0?[...t,...n]:t})},[e,t]);const h=(0,l.useCallback)(async()=>{if(!m.current.hasMore||m.current.isLoading)return;const e=p.current[0]?.id;if(void 0===e||e<=0)return m.current={...m.current,hasMore:!1},void d(!1);if(!g?.readRange)return m.current={...m.current,hasMore:!1},void d(!1);m.current={...m.current,isLoading:!0},c(!0);try{const t=Math.max(0,e-500),C=e-1,I=await g.readRange(t,C);if(0===I.length)return m.current={...m.current,hasMore:!1},void d(!1);i(e=>{const t=new Set(e.map(e=>e.id));return[...I.filter(e=>!t.has(e.id)),...e]});const o=n();if(o){const e=o.scrollHeight,t=o.scrollTop;window.requestAnimationFrame(()=>{o.scrollTop=t+(o.scrollHeight-e)})}}catch(t){console.error("[nexGui4] Failed to load older lines",t)}finally{m.current={...m.current,isLoading:!1},c(!1)}},[n,g]);return(0,l.useEffect)(()=>{if(!t)return;let e=!0,g=null,a=null;const i=window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{if(!e)return;const t=n();if(!t)return;g=t;const i=Math.max(0,t.scrollHeight-t.clientHeight),s=t.clientHeight*$o,l=Math.max(0,i-s);t.scrollTop=l,C(t),I(l<i),o?.(),a=()=>{const{hasMore:e,isLoading:g}=m.current;t.scrollTop<300&&e&&!g&&h()},t.addEventListener("scroll",a,{passive:!0})})});return()=>{e=!1,window.cancelAnimationFrame(i),g&&a&&g.removeEventListener("scroll",a)}},[C,n,h,o,t,I]),{hydratedItems:a,hasMore:u,isLoadingMore:s}},useScrollbackSearch=({scrollbackSession:e,open:t,showPrompts:g,onCursorChange:n})=>{const[C,I]=(0,l.useState)(""),[o,a]=(0,l.useState)(""),[i,s]=(0,l.useState)([]),[c,u]=(0,l.useState)(!1),[d,p]=(0,l.useState)(-1),m=(0,l.useCallback)(()=>{I(""),a(""),p(-1)},[]);(0,l.useEffect)(()=>{t||(m(),s([]),u(!1))},[t,m]),(0,l.useEffect)(()=>{if(!o)return s([]),void u(!1);let t=!0;return u(!0),(async()=>{try{if(e?.search){const g=await e.search(o,{includePrompts:!0});return void(t&&s(g))}t&&s([])}catch(g){console.error("[nexGui4] Failed searching scrollback session",g)}finally{t&&u(!1)}})(),()=>{t=!1}},[o,e]);const h=(0,l.useMemo)(()=>o?g?i:i.filter(e=>!e.isPrompt):[],[o,i,g]),y=h.length;(0,l.useEffect)(()=>{t&&o&&0!==y?(p(0),n?.(0)):p(-1)},[o,n,t,y]);const b=(0,l.useCallback)(e=>{I(e.target.value)},[]),v=(0,l.useCallback)(e=>{if("Enter"!==e.key)return;const t=e.target.value??"";if(t!==o)return void a(t);if(0===y)return;const g=d+1>=y?0:d+1;p(g),n?.(g)},[o,n,d,y]),x=o.length>0,S=x&&C.length>0&&0===y;return{searchBarText:C,setSearchBarText:I,committedSearchTerm:o,searchResults:h,isSearching:c,isSearchActive:x,searchMatchCount:y,searchCursor:d,hasNoMatch:S,searchStatusText:c?"Searching...":S?"No match":y>0&&d>=0?`${d+1}/${y}`:"",resetSearch:m,handleSearchInput:b,handleSearchKeyDown:v}},ea=1500,useScrollbackSelection=({visibleItems:e})=>{const[t,g]=(0,l.useState)(null),[n,C]=(0,l.useState)(null),[I,o]=(0,l.useState)(!1),a=(0,l.useRef)({a:null,b:null});a.current={a:t,b:n};const i=(0,l.useCallback)(e=>{const{a:t,b:n}=a.current;t===e||n===e?(g(null),C(null)):null===t?g(e):null===n?C(e):(g(e),C(null))},[]),s=(0,l.useMemo)(()=>{if(null==t||null==n)return null;const g=Math.min(t,n),C=Math.max(t,n);return e.filter(e=>e.id>=g&&e.id<=C)},[t,n,e]);return{selectionA:t,selectionB:n,selectedRangeItems:s,copyConfirmed:I,handleLineSelect:i,handleCopyRange:(0,l.useCallback)(async()=>{if(!s?.length)return;const e=s.map(e=>stripHtml(e.html)).join("\n");try{await navigator.clipboard.writeText(e),o(!0),window.setTimeout(()=>o(!1),ea)}catch{}},[s]),isLineSelected:(0,l.useCallback)(e=>{const g=e===t||e===n;return null==t||null==n?{isEndpoint:g,inRange:!1}:{isEndpoint:g,inRange:e>=Math.min(t,n)&&e<=Math.max(t,n)}},[t,n])}},ta="nexgui4-log.html",ga="text/html;charset=utf-8",toDate=e=>{if(e instanceof Date)return Number.isNaN(e.getTime())?null:e;if("number"==typeof e&&Number.isFinite(e)){const t=new Date(e);return Number.isNaN(t.getTime())?null:t}return null},formatTimestamp$1=e=>{const t="string"==typeof e&&e.trim().length>0?e:null;if(t)return t;const g=toDate(e)??new Date,pad=(e,t=2)=>String(e).padStart(t,"0");return[pad(g.getHours()),pad(g.getMinutes()),pad(g.getSeconds())].join(":")+`.${pad(g.getMilliseconds(),3)}`},formatLogDate=(e=new Date)=>`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`,resolveCssFontSize$1=e=>null==e?"14px":"number"==typeof e?`${e}px`:String(e),collectPaletteCss=()=>{if("undefined"==typeof document)return"";try{return Array.from(document.getElementById("ng-palette")?.sheet?.cssRules??[]).map(e=>e.cssText).join("\n")}catch{return""}},collectNexGuiStyles=()=>"undefined"==typeof document?"":document.getElementById("nexGuicss")?.outerHTML??"",normalizeLogLine=(e,t)=>({html:String(e?.html??""),id:Number.isFinite(Number(e?.id))&&null!==e?.id?Number(e.id):t,isMonospace:Boolean(e?.isMonospace),isPrompt:Boolean(e?.isPrompt),shouldLog:Boolean(e?.shouldLog),timestamp:formatTimestamp$1(e?.timestamp)}),normalizeLogLines=e=>e.map((e,t)=>normalizeLogLine(e,t)),serializeJsonForInlineScript=e=>JSON.stringify(e).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"),buildLogTitle=e=>e&&String(e).trim().length>0?String(e):`nexGui4 Scrollback - ${formatLogDate()}`,buildBaseStyle=({fontFamily:e,fontSize:t})=>`\n html,\n body {\n background: black;\n color: #ccc;\n margin: 0;\n min-height: 100%;\n }\n\n body {\n box-sizing: border-box;\n font-family: ${e};\n font-size: ${t};\n padding: 12px;\n }\n\n .nexgui4-log-line {\n box-sizing: border-box;\n font-family: ${e};\n font-size: ${t};\n line-height: 1.2;\n overflow-wrap: anywhere;\n white-space: pre-wrap;\n }\n\n .nexgui4-log-line.mono,\n .nexgui4-log-line .mono {\n font-family: ${e};\n }\n\n .nexgui4-log-timestamp {\n color: #555;\n font-family: ${e};\n margin-right: 1ch;\n }\n\n .nexgui4-log-payload {\n min-width: 0;\n }\n`,buildHead=({title:e,fontFamily:t,fontSize:g})=>{const n=collectPaletteCss(),C=collectNexGuiStyles();return`<head>\n <meta charset="utf-8" />\n <title>${escapeHtml(e)}</title>\n <style>\n${buildBaseStyle({fontFamily:t,fontSize:g})}\n </style>\n <style id="ng-palette">${n}</style>\n ${C}\n </head>`},buildLogLineClassName=e=>["nexgui4-log-line",e.isPrompt?"prompt textline":"textline",e.isMonospace?"mono":null].filter(Boolean).join(" "),renderStaticLogRow=e=>`<div class="${buildLogLineClassName(e)}"><span class="nexgui4-log-timestamp timestamp mono no_out">${escapeHtml(e.timestamp)}&nbsp;</span><span class="nexgui4-log-payload">${e.html}</span></div>`,buildStandardHtmlLog=(e,{fontFamily:t=Ee,fontSize:g,title:n}={})=>{const C=resolveCssFontSize$1(g),I=buildLogTitle(n),o=normalizeLogLines(e).map(renderStaticLogRow).join("\n");return`<!doctype html>\n<html>\n ${buildHead({title:I,fontFamily:t,fontSize:C})}\n <body>\n${o}\n </body>\n</html>`},buildVirtualizedLogScript=(e,t)=>`\n (() => {\n const allLines = ${serializeJsonForInlineScript(e)};\n const viewport = document.getElementById("nexgui4-log-viewport");\n const spacer = document.getElementById("nexgui4-log-spacer");\n const rows = document.getElementById("nexgui4-log-rows");\n const searchInput = document.getElementById("nexgui4-log-search");\n const status = document.getElementById("nexgui4-log-search-status");\n const timestampToggle = document.getElementById("nexgui4-log-timestamps");\n const promptToggle = document.getElementById("nexgui4-log-prompts");\n\n let showTimestamps = true;\n let showPrompts = true;\n let displayLines = allLines;\n let heights = [];\n let offsets = [];\n let searchTerm = "";\n let searchMatches = [];\n let searchIndex = -1;\n let renderFrame = 0;\n const overscan = 8;\n const lineTextCache = new WeakMap();\n const textProbe = document.createElement("div");\n\n const estimate = Math.max(18, ${Math.max(18,t)});\n const escapeText = (value) =>\n String(value ?? "")\n .replaceAll("&", "&amp;")\n .replaceAll("<", "&lt;")\n .replaceAll(">", "&gt;")\n .replaceAll('"', "&quot;")\n .replaceAll("'", "&#39;");\n\n const readLineText = (line) => {\n if (lineTextCache.has(line)) {\n return lineTextCache.get(line);\n }\n\n textProbe.innerHTML = line.html ?? "";\n const text = (textProbe.textContent || "").toLowerCase();\n lineTextCache.set(line, text);\n return text;\n };\n\n const rebuildMetrics = () => {\n offsets = new Array(displayLines.length + 1);\n offsets[0] = 0;\n for (let index = 0; index < displayLines.length; index += 1) {\n offsets[index + 1] = offsets[index] + (heights[index] || estimate);\n }\n spacer.style.height = (offsets[offsets.length - 1] || 0) + "px";\n };\n\n const findIndexAt = (offset) => {\n let low = 0;\n let high = displayLines.length;\n while (low < high) {\n const mid = Math.floor((low + high) / 2);\n if (offsets[mid + 1] < offset) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return low;\n };\n\n const updateStatus = () => {\n if (!searchTerm) {\n status.textContent = "";\n return;\n }\n\n status.textContent = searchMatches.length\n ? "(" + (searchIndex + 1) + " of " + searchMatches.length + ") Line: " + searchMatches[searchIndex]\n : "No entry found";\n };\n\n const classNameForLine = (line) =>\n "nexgui4-log-line " +\n (line.isPrompt ? "prompt textline" : "textline") +\n (line.isMonospace ? " mono" : "");\n\n const render = () => {\n renderFrame = 0;\n const top = viewport.scrollTop;\n const bottom = top + viewport.clientHeight;\n const start = Math.max(0, findIndexAt(top) - overscan);\n const end = Math.min(displayLines.length, findIndexAt(bottom) + overscan + 1);\n const activeDisplayIndex = searchMatches[searchIndex] ?? -1;\n let html = "";\n\n for (let index = start; index < end; index += 1) {\n const line = displayLines[index];\n const timestamp = showTimestamps\n ? '<span class="nexgui4-log-timestamp timestamp mono no_out">' +\n escapeText(line.timestamp) +\n "&nbsp;</span>"\n : "";\n const activeClass = activeDisplayIndex === index ? " nexgui4-log-line--active" : "";\n\n html +=\n '<div class="' +\n classNameForLine(line) +\n activeClass +\n '" data-index="' +\n index +\n '" style="transform:translateY(' +\n offsets[index] +\n 'px)">' +\n timestamp +\n '<span class="nexgui4-log-payload">' +\n line.html +\n "</span></div>";\n }\n\n rows.innerHTML = html;\n window.requestAnimationFrame(measureRenderedRows);\n };\n\n const requestRender = () => {\n if (renderFrame) {\n return;\n }\n\n renderFrame = window.requestAnimationFrame(render);\n };\n\n const measureRenderedRows = () => {\n let changed = false;\n\n rows.querySelectorAll("[data-index]").forEach((row) => {\n const index = Number(row.getAttribute("data-index"));\n const measured = Math.ceil(row.getBoundingClientRect().height);\n\n if (Number.isFinite(index) && measured > 0 && Math.abs((heights[index] || estimate) - measured) > 1) {\n heights[index] = measured;\n changed = true;\n }\n });\n\n if (changed) {\n rebuildMetrics();\n requestRender();\n }\n };\n\n const rebuildDisplayLines = () => {\n displayLines = showPrompts ? allLines : allLines.filter((line) => !line.isPrompt);\n heights = new Array(displayLines.length);\n searchMatches = [];\n searchIndex = -1;\n\n if (searchTerm) {\n searchMatches = displayLines.reduce((matches, line, index) => {\n if (readLineText(line).includes(searchTerm)) {\n matches.push(index);\n }\n return matches;\n }, []);\n searchIndex = searchMatches.length > 0 ? 0 : -1;\n }\n\n rebuildMetrics();\n updateStatus();\n requestRender();\n };\n\n const scrollToActiveSearchMatch = () => {\n if (searchIndex < 0) {\n return;\n }\n\n viewport.scrollTop = Math.max(\n 0,\n offsets[searchMatches[searchIndex]] - viewport.clientHeight / 2,\n );\n requestRender();\n };\n\n const runSearch = () => {\n const nextTerm = searchInput.value.trim().toLowerCase();\n\n if (nextTerm !== searchTerm) {\n searchTerm = nextTerm;\n rebuildDisplayLines();\n } else if (searchMatches.length > 0) {\n searchIndex = (searchIndex + 1) % searchMatches.length;\n updateStatus();\n requestRender();\n }\n\n scrollToActiveSearchMatch();\n };\n\n viewport.addEventListener("scroll", requestRender, { passive: true });\n window.addEventListener("resize", () => {\n heights = new Array(displayLines.length);\n rebuildMetrics();\n requestRender();\n });\n searchInput.addEventListener("keydown", (event) => {\n if (event.key === "Enter") {\n runSearch();\n }\n });\n timestampToggle.addEventListener("change", () => {\n showTimestamps = timestampToggle.checked;\n heights = new Array(displayLines.length);\n rebuildMetrics();\n requestRender();\n });\n promptToggle.addEventListener("change", () => {\n showPrompts = promptToggle.checked;\n rebuildDisplayLines();\n });\n\n rebuildDisplayLines();\n viewport.scrollTop = Math.max(0, spacer.offsetHeight - viewport.clientHeight);\n requestRender();\n })();\n`,buildVirtualizedHtmlLog=(e,{fontFamily:t=Ee,fontSize:g,title:n}={})=>{const C=resolveCssFontSize$1(g),I=Number.parseFloat(C)||14,o=buildLogTitle(n),a=normalizeLogLines(e);return`<!doctype html>\n<html>\n ${buildHead({title:o,fontFamily:t,fontSize:C})}\n <body class="nexgui4-log-body--virtual">\n <div class="nexgui4-log-toolbar">\n <input id="nexgui4-log-search" aria-label="Search log" placeholder="Search" />\n <span id="nexgui4-log-search-status" aria-live="polite"></span>\n <label><input id="nexgui4-log-timestamps" type="checkbox" checked /> Timestamps</label>\n <label><input id="nexgui4-log-prompts" type="checkbox" checked /> Prompts</label>\n </div>\n <div id="nexgui4-log-viewport" class="nexgui4-log-viewport">\n <div id="nexgui4-log-spacer" class="nexgui4-log-spacer">\n <div id="nexgui4-log-rows" class="nexgui4-log-rows"></div>\n </div>\n </div>\n <style>\n .nexgui4-log-body--virtual {\n height: 100vh;\n overflow: hidden;\n padding: 0;\n }\n\n .nexgui4-log-toolbar {\n align-items: center;\n background: #050505;\n border-bottom: 1px solid #333;\n box-sizing: border-box;\n display: flex;\n gap: 12px;\n height: 42px;\n padding: 6px 10px;\n }\n\n .nexgui4-log-toolbar input[type="text"],\n #nexgui4-log-search {\n background: #111;\n border: 1px solid #444;\n color: #eee;\n font: inherit;\n padding: 4px 6px;\n width: 24ch;\n }\n\n #nexgui4-log-search-status {\n color: #aaa;\n min-width: 18ch;\n }\n\n .nexgui4-log-toolbar label {\n align-items: center;\n display: inline-flex;\n gap: 4px;\n white-space: nowrap;\n }\n\n .nexgui4-log-viewport {\n height: calc(100vh - 42px);\n overflow-y: auto;\n position: relative;\n }\n\n .nexgui4-log-spacer {\n position: relative;\n width: 100%;\n }\n\n .nexgui4-log-rows {\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n .nexgui4-log-rows .nexgui4-log-line {\n left: 0;\n padding: 0 12px;\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n .nexgui4-log-line--active {\n background: #e5e7eb;\n color: #111827;\n }\n </style>\n <script>\n${buildVirtualizedLogScript(a,1.5*I+26)}\n <\/script>\n </body>\n</html>`},buildHtmlLog=(e,t,g={})=>t?buildVirtualizedHtmlLog(e,g):buildStandardHtmlLog(e,g),downloadBuffer=(e,t,{fontFamily:g=Ee,fontSize:n,title:C}={})=>{if("undefined"==typeof document||"undefined"==typeof Blob||"undefined"==typeof URL||"function"!=typeof URL.createObjectURL||0===e.length)return;const I=buildHtmlLog(e,t,{fontFamily:g,fontSize:n,title:C}),o=URL.createObjectURL(new Blob([I],{type:ga})),a=document.createElement("a");a.href=o,a.download=ta,a.style.display="none",document.body.append(a),a.click(),a.remove(),URL.revokeObjectURL(o)},useScrollbackDownload=({scrollbackSession:e,visibleItems:t,isSearchActive:g,useVirtualizedLogs:n,fontFamily:C,fontSize:I})=>({handleDownload:(0,l.useCallback)(async()=>{let o=t;if(!g&&e?.readAll)try{const t=await e.readAll();t&&t.length>0&&(o=t)}catch(a){console.error("[nexGui4] Failed to read all lines for download",a)}downloadBuffer(o,n,{fontFamily:C,fontSize:I})},[C,I,g,e,n,t])}),ra=12,na=18,Aa={height:"--nexgui4-scrollback-height",width:"--nexgui4-scrollback-width",x:"--nexgui4-scrollback-left",y:"--nexgui4-scrollback-top"},Ca=[{direction:"n",sx:{cursor:"n-resize",height:ra,left:na,right:na,top:-6}},{direction:"s",sx:{bottom:-6,cursor:"s-resize",height:ra,left:na,right:na}},{direction:"e",sx:{bottom:na,cursor:"e-resize",right:-6,top:na,width:ra}},{direction:"w",sx:{bottom:na,cursor:"w-resize",left:-6,top:na,width:ra}},{direction:"ne",sx:{cursor:"ne-resize",height:na,right:-6,top:-6,width:na}},{direction:"nw",sx:{cursor:"nw-resize",height:na,left:-6,top:-6,width:na}},{direction:"se",sx:{bottom:-6,cursor:"se-resize",height:na,right:-6,width:na}},{direction:"sw",sx:{bottom:-6,cursor:"sw-resize",height:na,left:-6,width:na}}],areScrollbackGeometriesEqual=(e,t)=>e?.x===t?.x&&e?.y===t?.y&&e?.width===t?.width&&e?.height===t?.height,getScrollbackPaperGeometryStyle=e=>({[Aa.height]:`${e.height}px`,[Aa.width]:`${e.width}px`,[Aa.x]:`${e.x}px`,[Aa.y]:`${e.y}px`}),applyScrollbackPaperGeometry=(e,t)=>{e&&t&&Object.entries(getScrollbackPaperGeometryStyle(t)).forEach(([t,g])=>{e.style.setProperty(t,g)})},useScrollbackGeometry=({initialGeometry:e,persistGeometry:t,contentRef:g})=>{const n=(0,l.useRef)(null),C=(0,l.useRef)(e),I=(0,l.useRef)(e),[o,a]=(0,l.useState)(()=>getScrollbackPaperGeometryStyle(e)),i=(0,l.useCallback)(()=>n.current??g.current?.closest('[data-testid="scrollback-dialog-paper"]')??g.current?.closest(".MuiDialog-paper")??null,[g]),s=(0,l.useCallback)(e=>{const t=normalizeScrollbackGeometry("function"==typeof e?e(I.current):e);return I.current=t,applyScrollbackPaperGeometry(i(),t),t},[i]),c=(0,l.useCallback)(e=>{const t=s(e);return areScrollbackGeometriesEqual(C.current,t)||(C.current=t,a(getScrollbackPaperGeometryStyle(t))),t},[s]),u=(0,l.useCallback)((e,g)=>{const n=document.body.style.userSelect;document.body.style.userSelect="none";const handlePointerMove=e=>{g(e)},handlePointerUp=()=>{document.body.style.userSelect=n,document.removeEventListener("pointermove",handlePointerMove),document.removeEventListener("pointerup",handlePointerUp),t(c(I.current))};document.addEventListener("pointermove",handlePointerMove),document.addEventListener("pointerup",handlePointerUp),e.currentTarget.setPointerCapture?.(e.pointerId)},[c,t]);return{paperRef:n,paperGeometryStyle:o,handleDragPointerDown:(0,l.useCallback)(e=>{if(0!==e.button)return;e.preventDefault();const t=I.current,g=e.clientX-t.x,n=e.clientY-t.y;u(e,e=>{s({...t,x:e.clientX-g,y:e.clientY-n})})},[s,u]),handleResizePointerDown:(0,l.useCallback)(e=>t=>{if(0!==t.button)return;t.preventDefault(),t.stopPropagation();const g=I.current,n=t.clientX,C=t.clientY,o=g.x+g.width,a=g.y+g.height,i=getMinimumScrollbackGeometry();u(t,t=>{let I=g;if(e.includes("e")&&(I={...I,width:clampScrollbackGeometryValue(g.width+(t.clientX-n),i.width,getScrollbackViewportBounds().width-g.x)}),e.includes("s")&&(I={...I,height:clampScrollbackGeometryValue(g.height+(t.clientY-C),i.height,getScrollbackViewportBounds().height-g.y)}),e.includes("w")){const e=clampScrollbackGeometryValue(g.x+(t.clientX-n),0,o-i.width);I={...I,x:e,width:o-e}}if(e.includes("n")){const e=clampScrollbackGeometryValue(g.y+(t.clientY-C),0,a-i.height);I={...I,y:e,height:a-e}}s(I)})},[s,u]),reaffirmCommittedGeometry:(0,l.useCallback)(()=>{c(e=>e)},[c])}},Ia={id:Yn.default.number.isRequired,html:Yn.default.string.isRequired,timestamp:Yn.default.string.isRequired,isPrompt:Yn.default.bool.isRequired,isMonospace:Yn.default.bool.isRequired,shouldLog:Yn.default.bool.isRequired},oa=Yn.default.exact(Ia),buildLineClassName=e=>["nexgui4-virtual-scroll-line",e.isPrompt?"prompt textline":"textline",e.isMonospace?"mono":null,e.shouldLog?"nexguilog":null].filter(Boolean).join(" "),VirtualScrollLineComponent=({fontFamily:e,line:t,isActiveMatch:g=!1,timestampClassName:n,showTimestamp:C=!0})=>React.createElement("div",{className:buildLineClassName(t)},C?React.createElement(aA,{fontFamily:e,timestamp:t.timestamp,highlight:g,className:n}):null,React.createElement("span",{className:"nexgui4-virtual-scroll-line__payload",dangerouslySetInnerHTML:{__html:t.html}}));VirtualScrollLineComponent.displayName="VirtualScrollLine",VirtualScrollLineComponent.propTypes={fontFamily:Yn.default.string,isActiveMatch:Yn.default.bool,line:oa.isRequired,showTimestamp:Yn.default.bool,timestampClassName:Yn.default.string};var areVirtualScrollLinePropsEqual=(e,t)=>e.line.id===t.line.id&&e.fontFamily===t.fontFamily&&e.showTimestamp===t.showTimestamp&&e.isActiveMatch===t.isActiveMatch&&e.timestampClassName===t.timestampClassName,aa=(0,l.memo)(VirtualScrollLineComponent,areVirtualScrollLinePropsEqual);aa.displayName="VirtualScrollLine",aa.propTypes=VirtualScrollLineComponent.propTypes;var ia=Yn.default.oneOfType([oa,Yn.default.oneOf([null])]),PromptLineComponent=({fontFamily:e,promptLine:t=null,show:g=!1,showTimestamp:n=!0,timestampClassName:C})=>g&&t?React.createElement("div",{className:"nexgui4-prompt-line"},React.createElement(aa,{fontFamily:e,line:t,showTimestamp:n,timestampClassName:C})):null;PromptLineComponent.displayName="PromptLine",PromptLineComponent.propTypes={fontFamily:Yn.default.string,promptLine:ia,show:Yn.default.bool.isRequired,showTimestamp:Yn.default.bool,timestampClassName:Yn.default.string};var sa=(0,l.memo)(PromptLineComponent);sa.displayName="PromptLine",sa.propTypes=PromptLineComponent.propTypes;var la="mixed",ca="single-line",noop$1=()=>{},ua=Yn.default.oneOfType([oa,Yn.default.oneOf([null])]),estimateLineSize=(e,t)=>t===ca?Math.ceil(1.25*e):1.5*e+26,VirtualScrollBufferComponent=({items:e,promptLine:t=null,showPromptInline:g=!0,showTimestamp:n=!0,onSendCommand:C=noop$1,fontFamily:I=Ee,fontSize:o=14,itemKeyVersion:a=null,border:i=!0,onRequestScrollback:s=noop$1,onScrollLockChange:c=noop$1,activeMatchIndex:u=-1,timestampClassName:d,estimateSizeMode:p=la,overscan:m=5,renderItem:h},y)=>{const b=parseFontSize(o,14),v=(0,l.useCallback)(()=>estimateLineSize(b,p),[p,b]),x=(0,l.useCallback)((e,t)=>e?.id??t,[]),S=i?null:`${e.length}:${e.at(-1)?.id??""}:${g?"":t?.id??""}`,w=(0,l.useCallback)((e,{isActiveMatch:t})=>React.createElement(aa,{fontFamily:I,line:e,isActiveMatch:t,showTimestamp:n,timestampClassName:d}),[I,n,d]);return React.createElement(oA,{ref:y,activeMatchIndex:u,border:i,displayPinKey:S,estimateSize:v,fontFamily:I,fontSize:o,footer:React.createElement(sa,{fontFamily:I,promptLine:t,show:Boolean(t)&&!g,showTimestamp:n,timestampClassName:d}),getItemKey:x,itemKeyVersion:a,items:e,mode:i?"panel":"display",onRequestHistory:s,onSendCommand:C,onScrollLockChange:c,overscan:m,renderItem:h??w,showScrollLockBadge:i})};VirtualScrollBufferComponent.displayName="VirtualScrollBuffer",VirtualScrollBufferComponent.propTypes={activeMatchIndex:Yn.default.number,border:Yn.default.bool,estimateSizeMode:Yn.default.oneOf([la,ca]),fontFamily:Yn.default.string,fontSize:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),itemKeyVersion:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),items:Yn.default.arrayOf(oa).isRequired,onRequestScrollback:Yn.default.func,onScrollLockChange:Yn.default.func,onSendCommand:Yn.default.func,overscan:Yn.default.number,promptLine:ua,renderItem:Yn.default.func,showPromptInline:Yn.default.bool,showTimestamp:Yn.default.bool,timestampClassName:Yn.default.string};var da=(0,l.forwardRef)(VirtualScrollBufferComponent);da.displayName="VirtualScrollBuffer",da.propTypes=VirtualScrollBufferComponent.propTypes;var pa=Yn.default.oneOfType([oa,Yn.default.oneOf([null])]),noop=()=>{},ma=.8,fa=1,ha=2,ya=48,ba="nexgui4-scrollback-timestamp ng-timestamp timestamp mono no_out",resolveCssFontSize=e=>null==e?"14px":"number"==typeof e?`${e}px`:String(e),getScrollbackWheelDeltaPixels=(e,t)=>{const g=Number(e?.deltaY);if(!Number.isFinite(g)||0===g)return 0;if(e?.deltaMode===fa)return g*ya;if(e?.deltaMode===ha){const e=Number(t?.clientHeight);return g*Math.max(0,Number.isFinite(e)?e:0)*ma}return g},resolveDialogSurfaceBackground=e=>e.nexGui?.tokens?.background?.modal??e.palette.background.paper,resolveModalBackground=e=>e.palette.common.black,resolveHeaderBackground=e=>e.nexGui?.tokens?.background?.header??e.palette.background.default,va=(0,l.memo)(({isEndpoint:e,inRange:t,onClick:g})=>React.createElement(Wn,{"aria-label":"Select line for copy range",component:"button",onClick:g,sx:g=>({alignSelf:"flex-start",bgcolor:e?g.palette.primary.main:"transparent",borderRadius:"50%",borderStyle:"solid",borderWidth:2,borderColor:e?g.palette.primary.main:g.palette.divider,boxSizing:"border-box",cursor:"pointer",display:"block",flexShrink:0,height:12,lineHeight:1,mr:"6px",mt:"2px",opacity:e?1:t?.6:.25,outline:"none",p:0,transition:"opacity 0.12s, background-color 0.12s, border-color 0.12s",width:12,"&:hover":{borderColor:g.palette.primary.main,opacity:1},"&:focus-visible":{outline:`2px solid ${g.palette.primary.main}`,outlineOffset:2}})}));va.displayName="SelectionBubble",va.propTypes={inRange:Yn.default.bool.isRequired,isEndpoint:Yn.default.bool.isRequired,onClick:Yn.default.func.isRequired};var ScrollbackModalDialog=({open:e,onClose:t,items:g,filteredItems:n=g,itemKeyVersion:C=null,scrollbackSession:I=null,promptLine:o=null,onSendCommand:a=noop,fontFamily:i=Ee,fontSize:s=14,showTimestamp:c=!0})=>{const[u,d]=(0,l.useState)(!0),[p,m]=(0,l.useState)(c),[h,y]=(0,l.useState)(!1),{focusHostInput:b,initialGeometry:v,persistGeometry:x,useVirtualizedLogs:S}=useScrollbackLayout(),w=(0,l.useRef)(null),E=(0,l.useRef)(null),R=(0,l.useCallback)(()=>E.current?.querySelector('[data-testid="virtual-scroll-viewport"]')??null,[]),M=(0,l.useCallback)(e=>{e.dispatchEvent(new Event("scroll",{bubbles:!0}))},[]),T=(0,l.useCallback)(e=>{const t=R();if(!t)return!1;const g=Math.max(0,t.scrollHeight-t.clientHeight);return t.scrollTop=clampScrollbackGeometryValue(t.scrollTop+e,0,g),!0},[R]),P=(0,l.useCallback)(()=>{const e=R();e?(e.scrollTop=e.scrollHeight,M(e)):w.current?.scrollToBottom?.(),y(!1)},[M,R]),N=(0,l.useCallback)(e=>{e<0||(w.current?.scrollToIndex?.(e,{align:"center"}),y(!0))},[]),{hydratedItems:D,isLoadingMore:O}=useScrollbackHydration({items:g,open:e,scrollbackSession:I,getViewportElement:R,dispatchViewportScroll:M,setScrollLock:y}),{paperRef:j,paperGeometryStyle:G,handleDragPointerDown:L,handleResizePointerDown:B,reaffirmCommittedGeometry:F}=useScrollbackGeometry({initialGeometry:v,persistGeometry:x,contentRef:E}),{searchBarText:W,searchResults:V,isSearchActive:U,searchCursor:K,searchStatusText:H,hasNoMatch:Y,resetSearch:Z,handleSearchInput:Q,handleSearchKeyDown:X}=useScrollbackSearch({scrollbackSession:I,open:e,showPrompts:u,onCursorChange:N}),_=(0,l.useMemo)(()=>U?V:u?D:D.filter(e=>!e.isPrompt),[D,U,V,u]),q=U?K:-1,J=resolveCssFontSize(s),{selectionA:$,selectionB:ee,selectedRangeItems:te,copyConfirmed:ge,handleLineSelect:re,handleCopyRange:ne,isLineSelected:Ae}=useScrollbackSelection({visibleItems:_}),{handleDownload:Ce}=useScrollbackDownload({scrollbackSession:I,visibleItems:_,isSearchActive:U,useVirtualizedLogs:S,fontFamily:i,fontSize:s}),Ie=(0,l.useCallback)((e,{isActiveMatch:t})=>{const{isEndpoint:g,inRange:n}=Ae(e.id);return React.createElement(Wn,{sx:e=>({alignItems:"flex-start",bgcolor:n?g?e.palette.action.selected:e.palette.action.hover:void 0,display:"flex"})},React.createElement(va,{isEndpoint:g,inRange:n,onClick:()=>re(e.id)}),React.createElement(Wn,{sx:{flex:1,minWidth:0}},React.createElement(aa,{fontFamily:i,isActiveMatch:t,line:e,showTimestamp:p,timestampClassName:ba})))},[i,re,Ae,p]);(0,l.useEffect)(()=>{h||Z()},[Z,h]),(0,l.useEffect)(()=>{e?F():y(!1)},[e,F]),(0,l.useEffect)(()=>{if(!e)return;const t=R();if(!t)return;const handleWheel=e=>{if(e.ctrlKey)return;const g=getScrollbackWheelDeltaPixels(e,t);0!==g&&(e.preventDefault(),e.stopPropagation(),T(g))};return t.addEventListener("wheel",handleWheel,{passive:!1}),()=>{t.removeEventListener("wheel",handleWheel)}},[R,e,T]),(0,l.useEffect)(()=>{if(!e)return;const handleWindowKeyDown=e=>"PageUp"===e.key?(e.preventDefault(),e.stopPropagation(),void T(-(R()?.clientHeight??0)*ma)):"PageDown"===e.key?(e.preventDefault(),e.stopPropagation(),void T((R()?.clientHeight??0)*ma)):void("Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),t(),window.setTimeout(()=>{b()},0)));return window.addEventListener("keydown",handleWindowKeyDown,!0),()=>{window.removeEventListener("keydown",handleWindowKeyDown,!0)}},[b,R,t,e,T]);const oe=(0,l.useCallback)((e,t)=>{d(t)},[]),ae=(0,l.useCallback)((e,t)=>{m(t)},[]),ie=(0,l.useCallback)(()=>{P()},[P]),se=(0,l.useCallback)((e,g)=>{"backdropClick"!==g&&(t(),window.setTimeout(()=>{b()},0))},[b,t]),le=I?.getStats?.(),ce=U?_.length:le?.searchLineCount??_.length;return React.createElement(yI,{open:e,onClose:se,disableEnforceFocus:!0,disableAutoFocus:!0,maxWidth:!1,sx:e=>({pointerEvents:"auto",zIndex:e.zIndex.modal+10,"& .MuiDialog-container":{alignItems:"flex-start",justifyContent:"flex-start",pointerEvents:"none"},"& .MuiDialogTitle-root":{cursor:"grab",fontFamily:i,fontSize:J,userSelect:"none"},"& .MuiDialogTitle-root:active":{cursor:"grabbing"},"& .MuiButton-root, & .MuiInputBase-root, & .MuiInputLabel-root":{fontFamily:i,fontSize:J}}),slotProps:{backdrop:{invisible:!0},paper:{"data-testid":"scrollback-dialog-paper",ref:j,style:G,sx:e=>({backgroundImage:"none",backgroundColor:resolveDialogSurfaceBackground(e),border:1,borderColor:"divider",boxShadow:24,color:"text.primary",isolation:"isolate",position:"fixed",pointerEvents:"auto",left:`var(${Aa.x})`,top:`var(${Aa.y})`,width:`var(${Aa.width})`,height:`var(${Aa.height})`,m:0,maxWidth:"none",maxHeight:"none",display:"flex",flexDirection:"column",fontFamily:i,fontSize:J,overflow:"hidden",zIndex:e.zIndex.modal+11})}}},React.createElement(RI,{onPointerDown:L,sx:e=>({backgroundColor:resolveHeaderBackground(e),borderBottom:1,borderColor:"divider",backgroundImage:"none",p:1,touchAction:"none"})},"Scrollback Buffer"),React.createElement(wI,{ref:E,sx:e=>({backgroundColor:resolveModalBackground(e),backgroundImage:"none",color:"text.primary",display:"flex",flex:1,minHeight:0,overflow:"hidden",p:0,position:"relative"})},O?React.createElement(Wn,{sx:{position:"absolute",top:8,left:"50%",transform:"translateX(-50%)",zIndex:10,backgroundColor:"rgba(0, 0, 0, 0.7)",borderRadius:"4px",padding:"4px 8px",display:"flex",alignItems:"center",gap:"8px",color:"primary.main",fontSize:"0.75rem",border:"1px solid",borderColor:"divider"}},React.createElement(nI,{size:12,thickness:5}),"Loading history..."):null,React.createElement(da,{activeMatchIndex:q,border:!0,fontFamily:i,fontSize:s,itemKeyVersion:C,items:_,onSendCommand:a,onScrollLockChange:y,promptLine:o,ref:w,renderItem:Ie,showPromptInline:!0,showTimestamp:p,timestampClassName:ba})),React.createElement(vI,null,React.createElement(_o,{size:"small",label:"Search",value:W,onInput:Q,onKeyDown:X,error:Y,slotProps:{htmlInput:{"aria-label":"Search scrollback"}},sx:{width:"20ch"}}),H?React.createElement(Wn,{"aria-live":"polite",component:"div",role:"status",sx:e=>({color:Y?e.palette.error.main:e.palette.text.secondary,fontSize:e.typography.pxToRem(12),lineHeight:1.2,whiteSpace:"nowrap"})},H):null,React.createElement(Wn,{sx:{flex:1}}),React.createElement(NI,{control:React.createElement(WI,{checked:u,onChange:oe,size:"small"}),label:"Show Prompts",sx:{mr:1,userSelect:"none"}}),React.createElement(NI,{control:React.createElement(WI,{checked:p,onChange:ae,size:"small"}),label:"Show Timestamps",sx:{mr:1,userSelect:"none"}}),null!=te?React.createElement(uI,{color:ge?"success":"primary",onClick:ne,size:"small",variant:"outlined"},ge?"Copied!":`Copy (${te.length})`):null,h?React.createElement(uI,{onClick:ie,size:"small",variant:"outlined"},"Bottom"):null,React.createElement(uI,{onClick:Ce,size:"small",variant:"outlined"},"Download (#",ce,")"),React.createElement(uI,{onClick:se,size:"small"},"Close")),Ca.map(e=>React.createElement(Wn,{component:"span","data-testid":`scrollback-resize-handle-${e.direction}`,key:e.direction,onPointerDown:B(e.direction),sx:{position:"absolute",touchAction:"none",zIndex:2,...e.sx}})))};ScrollbackModalDialog.displayName="ScrollbackModalDialog";var xa={fontFamily:Yn.default.string,fontSize:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),filteredItems:Yn.default.arrayOf(oa),itemKeyVersion:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),scrollbackSession:Yn.default.object,items:Yn.default.arrayOf(oa).isRequired,onClose:Yn.default.func.isRequired,onSendCommand:Yn.default.func,open:Yn.default.bool.isRequired,promptLine:pa,showTimestamp:Yn.default.bool};ScrollbackModalDialog.propTypes=xa;var ScrollbackModalComponent=e=>e.open?React.createElement(ScrollbackModalDialog,e):null;ScrollbackModalComponent.displayName="ScrollbackModal",ScrollbackModalComponent.propTypes=xa;var Sa=(0,l.memo)(ScrollbackModalComponent);Sa.displayName="ScrollbackModal",Sa.propTypes=ScrollbackModalComponent.propTypes;var identity=e=>e,useHostDisplaySetting=(e=identity,t=Object.is)=>{const{hostDisplaySettingsModel:g}=useNexGui();if(!g||"function"!=typeof g.subscribe||"function"!=typeof g.getSnapshot)throw new Error("useHostDisplaySetting requires NexGuiContext hostDisplaySettingsModel with subscribe(listener) and getSnapshot().");const n=(0,l.useMemo)(()=>{let n=e(g.getSnapshot());const getSnapshot=()=>{const C=e(g.getSnapshot());return t(n,C)||(n=C),n},subscribe=C=>g.subscribe(()=>{const I=e(g.getSnapshot());t(n,I)||(n=I,C())});return Object.freeze({getSnapshot,subscribe})},[g,t,e]);return(0,l.useSyncExternalStore)(n.subscribe,n.getSnapshot,n.getSnapshot)},useHostDisplaySettings=()=>useHostDisplaySetting(),wa=Object.freeze({}),Ea=Object.freeze({}),createHostBridge=e=>Object.freeze({getSettings:()=>e?.getHostSettings?.()??wa,setSetting:(t,g)=>{e?.setHostSetting?.(t,g)},getLayoutSnapshot:()=>e?.getHostLayoutSnapshot?.()??Ea,updateLayoutAttributes:t=>{e?.updateHostLayoutAttributes?.(t)},focusInput:()=>{e?.focusInput?.()}}),useHostBridge=()=>{const{adapter:e}=useNexGui();return(0,l.useMemo)(()=>createHostBridge(e),[e])},useHostFocus=()=>{const e=useHostBridge();return(0,l.useCallback)(()=>{e.focusInput()},[e])},Ra=new WeakMap,assertStreamModel=e=>{if(!e||"function"!=typeof e.subscribe||"function"!=typeof e.getSnapshot)throw new Error("useStream requires NexGuiContext streamModel with subscribe(listener) and getSnapshot().")},getStreamModelBindings=e=>{assertStreamModel(e);let t=Ra.get(e);if(!t){const subscribe=t=>e.subscribe(t),getSnapshot=()=>e.getSnapshot();t=Object.freeze({subscribe,getSnapshot}),Ra.set(e,t)}return t},useStreamSnapshot=()=>{const{streamModel:e}=useNexGui(),{subscribe:t,getSnapshot:g}=getStreamModelBindings(e);return(0,l.useSyncExternalStore)(t,g,g)},selectUiSlice=e=>({activeTab:e.activeTab,modalOpen:e.modalOpen,setActiveTab:e.setActiveTab,openModal:e.openModal,closeModal:e.closeModal}),useUi=()=>{const{stores:e}=useNexGui();return e.ui(useShallow(selectUiSlice))},ka="scrollback",getPromptShownTailStartIndex=(e,t,g)=>{const n=Math.max(0,e.length-g);let C=0;for(let I=e.length-1;I>=n;I--)if(!e[I]?.isPrompt&&(C++,C===t))return I;return n},selectMainDisplayLiveTailItems=({allItems:e,filteredItems:t,showPrompts:g,nonPromptLimit:n=100,totalItemLimit:C=100})=>{const I=g?e:t;if(I.length<=n)return I;if(!g)return I.slice(-n);const o=getPromptShownTailStartIndex(I,n,C);return 0===o?I:I.slice(o)},useMainDisplayViewModel=()=>{const{adapter:e,scrollbackSession:t}=useNexGui(),g=useHostFocus(),{showPrompts:n,showTimestamps:C}=useHostDisplaySettings(),{buffer:I,filteredBuffer:o,promptLine:a,version:i}=useStreamSnapshot(),{modalOpen:s,openModal:c,closeModal:u}=useUi(),d=(0,l.useMemo)(()=>selectMainDisplayLiveTailItems({allItems:I,filteredItems:o,showPrompts:n}),[I,o,n]),p=n?null:a,m=d.at(-1),h=`${n?"all":"filtered"}:${d.length}:${m?.id??"none"}`,y=(0,l.useCallback)(()=>{s!==ka&&c(ka)},[s,c]),b=(0,l.useCallback)(()=>{u()},[u]),v=(0,l.useCallback)(t=>{e?.send?.(t)},[e]);return{allItems:I,closeScrollback:b,displayItems:d,displayItemKeyVersion:h,displayPromptLine:p,filteredItems:o,focusHostInput:g,openScrollback:y,promptLine:a,scrollbackOpen:s===ka,sendCommand:v,showTimestamps:C,scrollbackItemKeyVersion:i,scrollbackSession:t}},selectThemeSlice=e=>({tokens:e.tokens,updateTokens:e.updateTokens,resetTokens:e.resetTokens}),useTheme=()=>{const{stores:e}=useNexGui(),t=e.theme(useShallow(selectThemeSlice)),g=(0,l.useMemo)(()=>createMuiTheme(t.tokens),[t.tokens]);return(0,l.useMemo)(()=>({...t,theme:g}),[t,g])},Ma="nexgui4-main-display-timestamp ng-timestamp timestamp mono no_out",Ta=10,MainDisplayInner=()=>{const e=(0,l.useRef)(null),{tokens:t}=useTheme(),{allItems:g,closeScrollback:n,displayItems:C,displayItemKeyVersion:I,displayPromptLine:o,filteredItems:a,focusHostInput:i,openScrollback:s,promptLine:c,scrollbackItemKeyVersion:u,scrollbackOpen:d,scrollbackSession:p,sendCommand:m,showTimestamps:h}=useMainDisplayViewModel(),y=t.theme.displayFontFamily,b=t.theme.displayFontSize,v=(0,l.useCallback)(()=>{s()},[s]),x=(0,l.useCallback)(()=>{n(),e.current?.scrollToBottom(),i()},[n,i]);return React.createElement(Wn,{className:"main-display main-display__content",sx:{display:"flex",flex:1,minHeight:0,minWidth:0,overflow:"hidden",position:"relative",width:"100%"}},React.createElement(Wn,{"data-testid":"main-display-buffer",sx:{display:"flex",flex:1,minHeight:0,position:"relative"}},React.createElement(da,{ref:e,border:!1,estimateSizeMode:"single-line",fontFamily:y,fontSize:b,itemKeyVersion:I,items:C,onRequestScrollback:v,onSendCommand:m,overscan:Ta,promptLine:o,showPromptInline:!1,showTimestamp:h,timestampClassName:Ma})),React.createElement(Sa,{fontFamily:y,fontSize:b,filteredItems:a,items:g,itemKeyVersion:u,scrollbackSession:p,onClose:x,onSendCommand:m,open:d,promptLine:c,showTimestamp:h}))};MainDisplayInner.displayName="MainDisplayInner";var MainDisplay=()=>React.createElement(Jn,{panelName:"Main Display"},React.createElement(MainDisplayInner,null));function getLinearProgressUtilityClass(e){return generateUtilityClass("MuiLinearProgress",e)}MainDisplay.displayName="MainDisplay",generateUtilityClasses("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","bar","bar1","bar2"]);var Pa=4,Na=keyframes`
101
+ `:null,useUtilityClasses$27=e=>{const{classes:t,variant:g,color:n,disableShrink:C}=e;return composeClasses({root:["root",g,`color${Qn(n)}`],svg:["svg"],track:["track"],circle:["circle",C&&"circleDisableShrink"]},getCircularProgressUtilityClass,t)},eo=On("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,t[g.variant],t[`color${Qn(g.color)}`]]}})(Vn(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:JC||{animation:`${_C} 1.4s linear infinite`}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),to=On("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),go=On("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.circle,g.disableShrink&&t.circleDisableShrink]}})(Vn(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:$C||{animation:`${qC} 1.4s ease-in-out infinite`}}]}))),ro=On("circle",{name:"MuiCircularProgress",slot:"Track"})(Vn(({theme:e})=>({stroke:"currentColor",opacity:(e.vars||e).palette.action.activatedOpacity}))),no=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiCircularProgress"}),{className:n,color:C="primary",disableShrink:o=!1,enableTrackSlot:I=!1,min:a,max:i,size:s=40,style:l,thickness:c=3.6,value:u=g.min??0,variant:d="indeterminate",...p}=g,m=a??0,h=i??100,y={...g,color:C,disableShrink:o,size:s,thickness:c,value:u,variant:d,enableTrackSlot:I},b=useUtilityClasses$27(y),v={},x={},S={};if("determinate"===d){const e=2*Math.PI*((XC-c)/2),t=h-m;v.strokeDasharray=e.toFixed(3),v.strokeDashoffset=t>0?`${((h-u)/t*e).toFixed(3)}px`:`${e.toFixed(3)}px`,x.transform="rotate(-90deg)",S["aria-valuenow"]=u,S["aria-valuemin"]=m,S["aria-valuemax"]=h}return(0,gr.jsx)(eo,{className:clsx(b.root,n),style:{width:s,height:s,...x,...l},ownerState:y,ref:t,role:"progressbar",...S,...p,children:(0,gr.jsxs)(to,{className:b.svg,ownerState:y,viewBox:`${XC/2} ${XC/2} ${XC} ${XC}`,children:[I?(0,gr.jsx)(ro,{className:b.track,ownerState:y,cx:XC,cy:XC,r:(XC-c)/2,fill:"none",strokeWidth:c,"aria-hidden":"true"}):null,(0,gr.jsx)(go,{className:b.circle,style:v,ownerState:y,cx:XC,cy:XC,r:(XC-c)/2,fill:"none",strokeWidth:c})]})})});function getButtonUtilityClass(e){return generateUtilityClass("MuiButton",e)}var Ao=generateUtilityClasses("MuiButton",["root","text","outlined","contained","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),Co=l.createContext({}),oo=l.createContext(void 0),useUtilityClasses$26=e=>{const{color:t,disableElevation:g,fullWidth:n,size:C,variant:o,loading:I,loadingPosition:a,classes:i}=e,s=composeClasses({root:["root",I&&"loading",o,`size${Qn(C)}`,`color${Qn(t)}`,g&&"disableElevation",n&&"fullWidth",I&&`loadingPosition${Qn(a)}`],startIcon:["icon","startIcon"],endIcon:["icon","endIcon"],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},getButtonUtilityClass,i);return{...i,...s}},Io=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],ao=On(OC,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,t[g.variant],t[`size${Qn(g.size)}`],"inherit"===g.color&&t.colorInherit,g.disableElevation&&t.disableElevation,g.fullWidth&&t.fullWidth,g.loading&&t.loading]}})(Vn(({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],g="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${Ao.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.startIcon||e.loading&&"start"===e.loadingPosition,style:{"&::before":{content:'"\\200b"',width:0,overflow:"hidden"}}},{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${Ao.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${Ao.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${Ao.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:g,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${Ao.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${Ao.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${Ao.loading}`]:{color:"transparent"}}}]}})),io=On("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.startIcon,g.loading&&t.startIconLoadingStart]}})(({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...Io]})),so=On("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.endIcon,g.loading&&t.endIconLoadingEnd]}})(({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...Io]})),lo=On("span",{name:"MuiButton",slot:"LoadingIndicator"})(({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]})),co=On("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),uo=l.forwardRef(function(e,t){const g=l.useContext(Co),n=l.useContext(oo),C=useDefaultProps({props:resolveProps(g,e),name:"MuiButton"}),{children:o,color:I="primary",component:a="button",className:i,disabled:s=!1,disableElevation:c=!1,disableFocusRipple:u=!1,endIcon:d,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:y=null,loadingIndicator:b,loadingPosition:v="center",size:x="medium",startIcon:S,type:w,variant:E="text",...R}=C,M=jC(h),T=b??(0,gr.jsx)(no,{"aria-labelledby":M,color:"inherit",size:16}),P={...C,color:I,component:a,disabled:s,disableElevation:c,disableFocusRipple:u,fullWidth:m,loading:y,loadingIndicator:T,loadingPosition:v,size:x,type:w,variant:E},N=useUtilityClasses$26(P),D=(S||y&&"start"===v)&&(0,gr.jsx)(io,{className:N.startIcon,ownerState:P,children:S||(0,gr.jsx)(co,{className:N.loadingIconPlaceholder,ownerState:P})}),O=(d||y&&"end"===v)&&(0,gr.jsx)(so,{className:N.endIcon,ownerState:P,children:d||(0,gr.jsx)(co,{className:N.loadingIconPlaceholder,ownerState:P})}),j=n||"",G="boolean"==typeof y?(0,gr.jsx)("span",{className:N.loadingWrapper,style:{display:"contents"},children:y&&(0,gr.jsx)(lo,{className:N.loadingIndicator,ownerState:P,children:T})}):null,{root:L,...B}=N;return(0,gr.jsxs)(ao,{ownerState:P,className:clsx(g.className,N.root,i,j),component:a,disabled:s||y,focusRipple:!u,focusVisibleClassName:clsx(N.focusVisible,p),ref:t,internalNativeButton:!0,type:w,id:y?M:h,...R,classes:B,children:[D,"end"!==v&&G,o,"end"===v&&G,O]})});function getDialogUtilityClass(e){return generateUtilityClass("MuiDialog",e)}generateUtilityClasses("MuiDialog",["root","backdrop","scrollPaper","scrollBody","container","paper","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]);var po=l.createContext({}),mo=On(IC,{name:"MuiDialog",slot:"Backdrop"})({zIndex:-1}),useUtilityClasses$25=e=>{const{classes:t,scroll:g,maxWidth:n,fullWidth:C,fullScreen:o}=e;return composeClasses({root:["root"],backdrop:["backdrop"],container:["container",`scroll${Qn(g)}`],paper:["paper",`paperWidth${Qn(String(n))}`,C&&"paperFullWidth",o&&"paperFullScreen"]},getDialogUtilityClass,t)},fo=On(lC,{name:"MuiDialog",slot:"Root"})({"@media print":{position:"absolute !important"}}),ho=On("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.container,t[`scroll${Qn(g.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),yo=On(Kn,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.paper,t[`paperWidth${Qn(String(g.maxWidth))}`],g.fullWidth&&t.paperFullWidth,g.fullScreen&&t.paperFullScreen]}})(Vn(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:e})=>!e.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:"px"===e.breakpoints.unit?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`}},{props:{maxWidth:"xs",scroll:"body"},style:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+64)]:{maxWidth:"calc(100% - 64px)"}}},...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`}})),...Object.keys(e.breakpoints.values).filter(e=>"xs"!==e).map(t=>({props:{maxWidth:t,scroll:"body"},style:{[e.breakpoints.down(e.breakpoints.values[t]+64)]:{maxWidth:"calc(100% - 64px)"}}})),{props:({ownerState:e})=>e.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:e})=>e.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0}},{props:({ownerState:e})=>e.fullScreen&&"body"===e.scroll,style:{margin:0,maxWidth:"100%"}}]}))),bo=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiDialog"}),n=useTheme$1(),C={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{"aria-describedby":o,"aria-labelledby":I,"aria-modal":a=!0,children:i,className:s,fullScreen:c=!1,fullWidth:u=!1,maxWidth:d="sm",onClick:p,onClose:m,open:h,PaperComponent:y=Kn,role:b="dialog",scroll:v="paper",slots:x={},slotProps:S={},transitionDuration:w=C,...E}=g,R={...g,fullScreen:c,fullWidth:u,maxWidth:d,scroll:v},M=useUtilityClasses$25(R),T=l.useRef(),handleMouseDown=e=>{T.current=e.target===e.currentTarget},handleBackdropClick=e=>{p&&p(e),T.current&&(T.current=null,m&&m(e,"backdropClick"))},P=useId$1(I),N=l.useMemo(()=>({titleId:P}),[P]),D={slots:x,slotProps:S},[O,j]=useSlot("root",{elementType:fo,shouldForwardComponentProp:!0,externalForwardedProps:D,ownerState:R,className:clsx(M.root,s),ref:t}),[G,L]=useSlot("backdrop",{elementType:mo,shouldForwardComponentProp:!0,externalForwardedProps:D,ownerState:R,className:M.backdrop}),[B,F]=useSlot("paper",{elementType:yo,shouldForwardComponentProp:!0,externalForwardedProps:D,ownerState:R,className:M.paper,additionalProps:{elevation:24,role:b,"aria-describedby":o,"aria-labelledby":P,"aria-modal":a,tabIndex:-1,[tC]:""}}),[W,V]=useSlot("container",{elementType:ho,externalForwardedProps:D,ownerState:R,className:M.container}),[U,K]=useSlot("transition",{elementType:CC,externalForwardedProps:D,ownerState:R,additionalProps:{appear:!0,in:h,timeout:w,role:"presentation"}});return(0,gr.jsx)(O,{closeAfterTransition:!0,slots:{backdrop:G},slotProps:{backdrop:{transitionDuration:w,...L}},onClose:m,open:h,onClick:handleBackdropClick,...j,...E,children:(0,gr.jsx)(U,{...K,children:(0,gr.jsx)(W,{onMouseDown:handleMouseDown,...V,children:(0,gr.jsx)(B,{as:y,...F,children:(0,gr.jsx)(po.Provider,{value:N,children:i})})})})})});function getDialogActionsUtilityClass(e){return generateUtilityClass("MuiDialogActions",e)}generateUtilityClasses("MuiDialogActions",["root","spacing"]);var useUtilityClasses$24=e=>{const{classes:t,disableSpacing:g}=e;return composeClasses({root:["root",!g&&"spacing"]},getDialogActionsUtilityClass,t)},vo=On("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,!g.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),xo=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiDialogActions"}),{className:n,disableSpacing:C=!1,...o}=g,I={...g,disableSpacing:C};return(0,gr.jsx)(vo,{className:clsx(useUtilityClasses$24(I).root,n),ownerState:I,ref:t,...o})});function getDialogContentUtilityClass(e){return generateUtilityClass("MuiDialogContent",e)}function getDialogTitleUtilityClass(e){return generateUtilityClass("MuiDialogTitle",e)}generateUtilityClasses("MuiDialogContent",["root","dividers"]);var So=generateUtilityClasses("MuiDialogTitle",["root"]),useUtilityClasses$23=e=>{const{classes:t,dividers:g}=e;return composeClasses({root:["root",g&&"dividers"]},getDialogContentUtilityClass,t)},wo=On("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.dividers&&t.dividers]}})(Vn(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:e})=>e.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:e})=>!e.dividers,style:{[`.${So.root} + &`]:{paddingTop:0}}}]}))),Eo=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiDialogContent"}),{className:n,dividers:C=!1,...o}=g,I={...g,dividers:C};return(0,gr.jsx)(wo,{className:clsx(useUtilityClasses$23(I).root,n),ownerState:I,ref:t,...o})}),useUtilityClasses$22=e=>{const{classes:t}=e;return composeClasses({root:["root"]},getDialogTitleUtilityClass,t)},Ro=On(qn,{name:"MuiDialogTitle",slot:"Root"})({padding:"16px 24px",flex:"0 0 auto"}),ko=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiDialogTitle"}),{className:n,id:C,...o}=g,I=g,a=useUtilityClasses$22(I),{titleId:i=C}=l.useContext(po);return(0,gr.jsx)(Ro,{component:"h2",className:clsx(a.root,n),ownerState:I,ref:t,variant:"h6",id:C??i,...o})}),Mo=l.createContext(void 0);function useFormControl(){return l.useContext(Mo)}function useFormControlState({props:e,states:t}){const g=l.useContext(Mo),n={};return t.forEach(t=>{const C=e[t];n[t]=void 0===C&&g?g[t]:C}),[n,g]}function getFormControlLabelUtilityClasses(e){return generateUtilityClass("MuiFormControlLabel",e)}var To=generateUtilityClasses("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),useUtilityClasses$21=e=>{const{classes:t,disabled:g,labelPlacement:n,error:C,required:o}=e;return composeClasses({root:["root",g&&"disabled",`labelPlacement${Qn(n)}`,C&&"error",o&&"required"],label:["label",g&&"disabled"],asterisk:["asterisk",C&&"error"]},getFormControlLabelUtilityClasses,t)},Po=On("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[{[`& .${To.label}`]:t.label},t.root,t[`labelPlacement${Qn(g.labelPlacement)}`]]}})(Vn(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${To.disabled}`]:{cursor:"default"},[`& .${To.label}`]:{[`&.${To.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:e})=>"start"===e||"top"===e||"bottom"===e,style:{marginLeft:16}}]}))),No=On("span",{name:"MuiFormControlLabel",slot:"Asterisk"})(Vn(({theme:e})=>({[`&.${To.error}`]:{color:(e.vars||e).palette.error.main}}))),Do=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiFormControlLabel"}),{checked:n,className:C,control:o,disabled:I,disableTypography:a,inputRef:i,label:s,labelPlacement:c="end",name:u,onChange:d,required:p,slots:m={},slotProps:h={},value:y,...b}=g,[v,x]=useFormControlState({props:g,states:["error"]}),S=I??o.props.disabled??x?.disabled,w=p??o.props.required,E={disabled:S,required:w};["checked","name","onChange","value","inputRef"].forEach(e=>{void 0===o.props[e]&&void 0!==g[e]&&(E[e]=g[e])});const R={...g,disabled:S,labelPlacement:c,required:w,error:v.error},M=useUtilityClasses$21(R),[T,P]=useSlot("typography",{elementType:qn,externalForwardedProps:{slots:m,slotProps:h},ownerState:R});let N=s;return null==N||N.type===qn||a||(N=(0,gr.jsx)(T,{component:"span",...P,className:clsx(M.label,P?.className),children:N})),(0,gr.jsxs)(Po,{className:clsx(M.root,C),ownerState:R,ref:t,...b,children:[l.cloneElement(o,E),w?(0,gr.jsxs)("div",{children:[N,(0,gr.jsxs)(No,{ownerState:R,"aria-hidden":!0,className:M.asterisk,children:[" ","*"]})]}):N]})});function getSwitchBaseUtilityClass(e){return generateUtilityClass("PrivateSwitchBase",e)}generateUtilityClasses("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var useUtilityClasses$20=e=>{const{classes:t,checked:g,disabled:n,edge:C}=e;return composeClasses({root:["root",g&&"checked",n&&"disabled",C&&`edge${Qn(C)}`],input:["input"]},getSwitchBaseUtilityClass,t)},Oo=On(OC,{name:"MuiSwitchBase"})({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>"start"===e&&"small"!==t.size,style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>"end"===e&&"small"!==t.size,style:{marginRight:-12}}]}),jo=On("input",{name:"MuiSwitchBase",shouldForwardProp:rootShouldForwardProp})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),zo=l.forwardRef(function(e,t){const{autoFocus:g,checked:n,checkedIcon:C,defaultChecked:o,disabled:I,disableFocusRipple:a=!1,edge:i=!1,icon:s,id:l,name:c,onBlur:u,onChange:d,onFocus:p,readOnly:m,required:h=!1,tabIndex:y,type:b,value:v,slots:x={},slotProps:S={},...w}=e,{nativeButton:E,...R}=w,[M,T]=QC({controlled:n,default:Boolean(o),name:"SwitchBase",state:"checked"}),P=useFormControl(),handleFocus=e=>{p&&p(e),P&&P.onFocus&&P.onFocus(e)},handleBlur=e=>{u&&u(e),P&&P.onBlur&&P.onBlur(e)},handleInputChange=e=>{if(e.nativeEvent.defaultPrevented||m)return;const t=e.target.checked;T(t),d&&d(e,t)};let N=I;P&&void 0===N&&(N=P.disabled);const D="checkbox"===b||"radio"===b,O={...e,checked:M,disabled:N,disableFocusRipple:a,edge:i},j=useUtilityClasses$20(O),G={slots:x,slotProps:S},[L,B]=useSlot("root",{ref:t,elementType:Oo,className:j.root,shouldForwardComponentProp:!0,externalForwardedProps:{...G,component:"span",...R},getSlotProps:e=>({...e,onFocus:t=>{e.onFocus?.(t),handleFocus(t)},onBlur:t=>{e.onBlur?.(t),handleBlur(t)}}),ownerState:O,additionalProps:{centerRipple:!0,focusRipple:!a,role:void 0,tabIndex:null}}),[F,W]=useSlot("input",{elementType:jo,className:j.input,externalForwardedProps:G,getSlotProps:e=>({...e,onChange:t=>{e.onChange?.(t),handleInputChange(t)}}),ownerState:O,additionalProps:{autoFocus:g,checked:n,defaultChecked:o,disabled:N,id:D?l:void 0,name:c,readOnly:m,required:h,tabIndex:y,type:b,..."checkbox"===b&&void 0===v?{}:{value:v}}});return(0,gr.jsxs)(L,{...B,children:[(0,gr.jsx)(F,{...W}),M?C:s]})});function getSwitchUtilityClass(e){return generateUtilityClass("MuiSwitch",e)}var Go=generateUtilityClasses("MuiSwitch",["root","edgeStart","edgeEnd","switchBase","colorPrimary","colorSecondary","sizeSmall","sizeMedium","checked","disabled","input","thumb","track"]),useUtilityClasses$19=e=>{const{classes:t,edge:g,size:n,color:C,checked:o,disabled:I}=e,a=composeClasses({root:["root",g&&`edge${Qn(g)}`,`size${Qn(n)}`],switchBase:["switchBase",`color${Qn(C)}`,o&&"checked",I&&"disabled"],thumb:["thumb"],track:["track"],input:["input"]},getSwitchUtilityClass,t);return{...t,...a}},Lo=On("span",{name:"MuiSwitch",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.edge&&t[`edge${Qn(g.edge)}`],t[`size${Qn(g.size)}`]]}})({display:"inline-flex",width:58,height:38,overflow:"hidden",padding:12,boxSizing:"border-box",position:"relative",flexShrink:0,zIndex:0,verticalAlign:"middle","@media print":{colorAdjust:"exact"},variants:[{props:{edge:"start"},style:{marginLeft:-8}},{props:{edge:"end"},style:{marginRight:-8}},{props:{size:"small"},style:{width:40,height:24,padding:7,[`& .${Go.thumb}`]:{width:16,height:16},[`& .${Go.switchBase}`]:{padding:4,[`&.${Go.checked}`]:{transform:"translateX(16px)"}}}}]}),Bo=On(zo,{name:"MuiSwitch",slot:"SwitchBase",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.switchBase,{[`& .${Go.input}`]:t.input},"default"!==g.color&&t[`color${Qn(g.color)}`]]}})(Vn(({theme:e})=>({position:"absolute",top:0,left:0,zIndex:1,color:e.vars?e.vars.palette.Switch.defaultColor:`${"light"===e.palette.mode?e.palette.common.white:e.palette.grey[300]}`,transition:e.transitions.create(["left","transform"],{duration:e.transitions.duration.shortest}),[`&.${Go.checked}`]:{transform:"translateX(20px)"},[`&.${Go.disabled}`]:{color:e.vars?e.vars.palette.Switch.defaultDisabledColor:`${"light"===e.palette.mode?e.palette.grey[100]:e.palette.grey[600]}`},[`&.${Go.checked} + .${Go.track}`]:{opacity:.5},[`&.${Go.disabled} + .${Go.track}`]:{opacity:e.vars?e.vars.opacity.switchTrackDisabled:""+("light"===e.palette.mode?.12:.2)},[`& .${Go.input}`]:{left:"-100%",width:"300%"}})),Vn(({theme:e})=>({"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},variants:[...Object.entries(e.palette).filter(createSimplePaletteValueFilter(["light"])).map(([t])=>({props:{color:t},style:{[`&.${Go.checked}`]:{color:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${Go.disabled}`]:{color:e.vars?e.vars.palette.Switch[`${t}DisabledColor`]:`${"light"===e.palette.mode?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.55)}`}},[`&.${Go.checked} + .${Go.track}`]:{backgroundColor:(e.vars||e).palette[t].main}}}))]}))),Fo=On("span",{name:"MuiSwitch",slot:"Track"})(Vn(({theme:e})=>({height:"100%",width:"100%",borderRadius:7,zIndex:-1,transition:e.transitions.create(["opacity","background-color"],{duration:e.transitions.duration.shortest}),"@media (forced-colors: active)":{boxSizing:"border-box",border:"1px solid ButtonBorder"},backgroundColor:e.vars?e.vars.palette.common.onBackground:`${"light"===e.palette.mode?e.palette.common.black:e.palette.common.white}`,opacity:e.vars?e.vars.opacity.switchTrack:""+("light"===e.palette.mode?.38:.3)}))),Wo=On("span",{name:"MuiSwitch",slot:"Thumb"})(Vn(({theme:e})=>({boxShadow:(e.vars||e).shadows[1],backgroundColor:"currentColor",boxSizing:"border-box",border:"1px solid transparent",width:20,height:20,borderRadius:"50%"}))),Vo=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiSwitch"}),{className:n,color:C="primary",edge:o=!1,size:I="medium",sx:a,slots:i={},slotProps:s={},...l}=g,c={...g,color:C,edge:o,size:I},u=useUtilityClasses$19(c),d=s.input,p={slots:i,slotProps:s},[m,h]=useSlot("root",{className:clsx(u.root,n),elementType:Lo,externalForwardedProps:p,ownerState:c,additionalProps:{sx:a}}),[y,b]=useSlot("thumb",{className:u.thumb,elementType:Wo,externalForwardedProps:p,ownerState:c}),v=(0,gr.jsx)(y,{...b}),[x,S]=useSlot("track",{className:u.track,elementType:Fo,externalForwardedProps:p,ownerState:c});return(0,gr.jsxs)(m,{...h,children:[(0,gr.jsx)(Bo,{type:"checkbox",icon:v,checkedIcon:v,ref:t,ownerState:c,...l,classes:{...u,root:u.switchBase},slots:{...i.switchBase&&{root:i.switchBase},...i.input&&{input:i.input}},slotProps:{...s.switchBase&&{root:"function"==typeof s.switchBase?s.switchBase(c):s.switchBase},input:mergeSlotProps("function"==typeof d?d(c):d,{role:"switch"})}}),(0,gr.jsx)(x,{...S})]})});function getStyleValue(e){return parseInt(e,10)||0}var Uo={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function isObjectEmpty(e){for(const t in e)return!1;return!0}function isEmpty(e){return isObjectEmpty(e)||0===e.outerHeightStyle&&!e.overflowing}var Ko=l.forwardRef(function(e,t){const{onChange:g,maxRows:n,minRows:C=1,style:o,value:I,...a}=e,{current:i}=l.useRef(null!=I),s=l.useRef(null),c=useForkRef(t,s),u=l.useRef(null),d=l.useRef(null),p=l.useCallback(()=>{const t=s.current,g=d.current;if(!t||!g)return;const o=ownerWindow(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};g.style.width=o.width,g.value=t.value||e.placeholder||"x","\n"===g.value.slice(-1)&&(g.value+=" ");const I=o.boxSizing,a=getStyleValue(o.paddingBottom)+getStyleValue(o.paddingTop),i=getStyleValue(o.borderBottomWidth)+getStyleValue(o.borderTopWidth),l=g.scrollHeight;g.value="x";const c=g.scrollHeight;let u=l;return C&&(u=Math.max(Number(C)*c,u)),n&&(u=Math.min(Number(n)*c,u)),u=Math.max(u,c),{outerHeightStyle:u+("border-box"===I?a+i:0),overflowing:Math.abs(u-l)<=1}},[n,C,e.placeholder]),m=useEventCallback(()=>{const e=s.current,t=p();if(!e||!t||isEmpty(t))return!1;const g=t.outerHeightStyle;return null!=u.current&&u.current!==g}),h=l.useCallback(()=>{const e=s.current,t=p();if(!e||!t||isEmpty(t))return;const g=t.outerHeightStyle;u.current!==g&&(u.current=g,e.style.height=`${g}px`),e.style.overflow=t.overflowing?"hidden":""},[p]),y=l.useRef(-1);Qr(()=>{const e=debounce$1(h),t=s?.current;if(!t)return;const g=ownerWindow(t);let n;return g.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(n=new ResizeObserver(()=>{m()&&(n.unobserve(t),cancelAnimationFrame(y.current),h(),y.current=requestAnimationFrame(()=>{n.observe(t)}))}),n.observe(t)),()=>{e.clear(),cancelAnimationFrame(y.current),g.removeEventListener("resize",e),n&&n.disconnect()}},[p,h,m]),Qr(()=>{h()});const handleChange=e=>{i||h();const t=e.target,n=t.value.length,C=t.value.endsWith("\n"),o=t.selectionStart===n;C&&o&&t.setSelectionRange(n,n),g&&g(e)};return(0,gr.jsxs)(l.Fragment,{children:[(0,gr.jsx)("textarea",{value:I,onChange:handleChange,ref:c,rows:C,style:o,...a}),(0,gr.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:d,tabIndex:-1,style:{...Uo.shadow,...o,paddingTop:0,paddingBottom:0}})]})});function hasValue(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function isFilled(e,t=!1){return e&&(hasValue(e.value)&&""!==e.value||t&&hasValue(e.defaultValue)&&""!==e.defaultValue)}function isAdornedStart(e){return e.startAdornment}function getInputBaseUtilityClass(e){return generateUtilityClass("MuiInputBase",e)}var Ho,Yo=generateUtilityClasses("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputTypeSearch"]),Zo="mui-auto-fill",Qo="mui-auto-fill-cancel",rootOverridesResolver=(e,t)=>{const{ownerState:g}=e;return[t.root,g.formControl&&t.formControl,g.startAdornment&&t.adornedStart,g.endAdornment&&t.adornedEnd,g.error&&t.error,"small"===g.size&&t.sizeSmall,g.multiline&&t.multiline,g.color&&t[`color${Qn(g.color)}`],g.fullWidth&&t.fullWidth,g.hiddenLabel&&t.hiddenLabel]},inputOverridesResolver=(e,t)=>{const{ownerState:g}=e;return[t.input,"search"===g.type&&t.inputTypeSearch]},useUtilityClasses$18=e=>{const{classes:t,color:g,disabled:n,error:C,endAdornment:o,focused:I,formControl:a,fullWidth:i,hiddenLabel:s,multiline:l,readOnly:c,size:u,startAdornment:d,type:p}=e;return composeClasses({root:["root",`color${Qn(g)}`,n&&"disabled",C&&"error",i&&"fullWidth",I&&"focused",a&&"formControl",u&&"medium"!==u&&`size${Qn(u)}`,l&&"multiline",d&&"adornedStart",o&&"adornedEnd",s&&"hiddenLabel",c&&"readOnly"],input:["input",n&&"disabled","search"===p&&"inputTypeSearch",c&&"readOnly"]},getInputBaseUtilityClass,t)},Xo=On("div",{name:"MuiInputBase",slot:"Root",overridesResolver:rootOverridesResolver})(Vn(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${Yo.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]}))),_o=On("input",{name:"MuiInputBase",slot:"Input",overridesResolver:inputOverridesResolver})(Vn(({theme:e})=>{const t="light"===e.palette.mode,g={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},n={opacity:"0 !important"},C=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":g,"&::-moz-placeholder":g,"&::-ms-input-placeholder":g,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${Yo.formControl} &`]:{"&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus::-webkit-input-placeholder":C,"&:focus::-moz-placeholder":C,"&:focus::-ms-input-placeholder":C},[`&.${Yo.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:Qo,animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:Zo}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),qo=globalCss({[`@keyframes ${Zo}`]:{from:{animationName:Zo}},[`@keyframes ${Qo}`]:{from:{animationName:Qo}}}),Jo=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiInputBase"}),{"aria-describedby":n,"aria-label":C,autoComplete:o,autoFocus:I,className:a,color:i,defaultValue:s,disabled:c,disableInjectingGlobalStyles:u,endAdornment:d,error:p,fullWidth:m=!1,id:h,inputComponent:y="input",inputProps:b={},inputRef:v,margin:x,maxRows:S,minRows:w,multiline:E=!1,name:R,onBlur:M,onChange:T,onClick:P,onFocus:N,onKeyDown:D,onKeyUp:O,placeholder:j,readOnly:G,renderSuffix:L,rows:B,size:F,slotProps:W={},slots:V={},startAdornment:U,type:K="text",value:H,...Y}=g,Z=null!=b.value?b.value:H,{current:Q}=l.useRef(null!=Z),X=l.useRef(),_=l.useCallback(e=>{},[]),q=EA(X,v,b.ref,_),[J,$]=l.useState(!1),[ee,te]=useFormControlState({props:g,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ee.focused=te?te.focused:J,l.useEffect(()=>{!te&&c&&J&&($(!1),M&&M())},[te,c,J,M]);const ge=te&&te.onFilled,re=te&&te.onEmpty,ne=l.useCallback(e=>{isFilled(e)?ge&&ge():re&&re()},[ge,re]);RA(()=>{Q&&ne({value:Z})},[Z,ne,Q]),RA(()=>{if(!I)return;const e=X.current;if(!e)return;const t=vA(e),g=xA(t),n=null==g||g===t.body||g===t.documentElement;e===g?te&&te.onFocus?te.onFocus():$(!0):n&&e.focus()},[I]);const handleFocus=e=>{N&&N(e),b.onFocus&&b.onFocus(e),te&&te.onFocus?te.onFocus(e):$(!0)},handleBlur=e=>{M&&M(e),b.onBlur&&b.onBlur(e),te&&te.onBlur?te.onBlur(e):$(!1)},handleChange=(e,...t)=>{if(!Q){const t=e.target||X.current;if(null==t)throw new Error(formatMuiErrorMessage(1));ne({value:t.value})}b.onChange&&b.onChange(e,...t),T&&T(e,...t)};l.useEffect(()=>{ne(X.current)},[]);const handleClick=e=>{X.current&&e.currentTarget===e.target&&X.current.focus(),P&&P(e)};let Ae=y,Ce=b;E&&"input"===Ae&&(Ce=B?{type:void 0,minRows:B,maxRows:B,...Ce}:{type:void 0,maxRows:S,minRows:w,...Ce},Ae=Ko);const handleAutoFill=e=>{ne(e.animationName===Qo?X.current:{value:"x"})};l.useEffect(()=>{te&&te.setAdornedStart(Boolean(U))},[te,U]);const oe={...g,color:ee.color||"primary",disabled:ee.disabled,endAdornment:d,error:ee.error,focused:ee.focused,formControl:te,fullWidth:m,hiddenLabel:ee.hiddenLabel,multiline:E,size:ee.size,startAdornment:U,type:K},Ie=useUtilityClasses$18(oe),ae=V.root||Xo,ie=W.root||{},se=V.input||_o;return Ce={...Ce,...W.input},(0,gr.jsxs)(l.Fragment,{children:[!u&&"function"==typeof qo&&(Ho||(Ho=(0,gr.jsx)(qo,{}))),(0,gr.jsxs)(ae,{...ie,ref:t,onClick:handleClick,...Y,...!isHostComponent(ae)&&{ownerState:{...oe,...ie.ownerState}},className:clsx(Ie.root,ie.className,a,G&&"MuiInputBase-readOnly"),children:[U,(0,gr.jsx)(Mo.Provider,{value:null,children:(0,gr.jsx)(se,{"aria-invalid":ee.error,"aria-describedby":n,"aria-label":C,autoComplete:o,autoFocus:I,defaultValue:s,disabled:ee.disabled,id:h,onAnimationStart:handleAutoFill,name:R,placeholder:j,readOnly:G,required:ee.required,rows:B,value:Z,onKeyDown:D,onKeyUp:O,type:K,...Ce,...!isHostComponent(se)&&{as:Ae,ownerState:{...oe,...Ce.ownerState}},ref:q,className:clsx(Ie.input,Ce.className,G&&"MuiInputBase-readOnly"),onBlur:handleBlur,onChange:handleChange,onFocus:handleFocus})}),d,L?L({...ee,startAdornment:U}):null]})]})});function getInputLabelUtilityClasses(e){return generateUtilityClass("MuiInputLabel",e)}var $o=generateUtilityClasses("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);function getInputUtilityClass(e){return generateUtilityClass("MuiInput",e)}var eI={...Yo,...generateUtilityClasses("MuiInput",["root","underline","input"])},useUtilityClasses$17=e=>{const{classes:t,disableUnderline:g}=e,n=composeClasses({root:["root",!g&&"underline"],input:["input"]},getInputUtilityClass,t);return{...t,...n}},tI=On(Xo,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[...rootOverridesResolver(e,t),!g.disableUnderline&&t.underline]}})(Vn(({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:e})=>e.formControl,style:{[`label + &, .${$o.root} + &`]:{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${eI.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${eI.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${eI.disabled}, .${eI.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${eI.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}}))]}})),gI=On(_o,{name:"MuiInput",slot:"Input",overridesResolver:inputOverridesResolver})({}),rI=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiInput"}),{disableUnderline:n=!1,fullWidth:C=!1,inputComponent:o="input",multiline:I=!1,notched:a,slotProps:i,slots:s={},type:l="text",...c}=g,u=useUtilityClasses$17(g),d={root:{ownerState:{disableUnderline:n}}},p=i?deepmerge(i,d):d;return(0,gr.jsx)(Jo,{slots:{root:s.root??tI,input:s.input??gI},slotProps:p,fullWidth:C,inputComponent:o,multiline:I,ref:t,type:l,...c,classes:u})});function getFilledInputUtilityClass(e){return generateUtilityClass("MuiFilledInput",e)}rI.muiName="Input";var nI,AI={...Yo,...generateUtilityClasses("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},useUtilityClasses$16=e=>{const{classes:t,disableUnderline:g,startAdornment:n,endAdornment:C,size:o,hiddenLabel:I,multiline:a}=e,i=composeClasses({root:["root",!g&&"underline",n&&"adornedStart",C&&"adornedEnd","small"===o&&`size${Qn(o)}`,I&&"hiddenLabel",a&&"multiline"],input:["input"]},getFilledInputUtilityClass,t);return{...t,...i}},CI=On(Xo,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[...rootOverridesResolver(e,t),!g.disableUnderline&&t.underline]}})(Vn(({theme:e})=>{const t="light"===e.palette.mode,g=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",n=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",C=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",o=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:C,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n}},[`&.${AI.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:n},[`&.${AI.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:o},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${AI.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${AI.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):g}`,left:0,bottom:0,content:'""',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${AI.disabled}, .${AI.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${AI.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}})),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}}]}})),oI=On(_o,{name:"MuiFilledInput",slot:"Input",overridesResolver:inputOverridesResolver})(Vn(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,"&:-webkit-autofill":{...!e.vars&&{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff"},borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit",...e.vars&&e.applyStyles("dark",{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"})},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),II=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiFilledInput"}),{disableUnderline:n=!1,fullWidth:C=!1,hiddenLabel:o,inputComponent:I="input",multiline:a=!1,notched:i,slotProps:s,slots:l={},type:c="text",...u}=g,d={...g,disableUnderline:n,fullWidth:C,inputComponent:I,multiline:a,type:c},p=useUtilityClasses$16(g),m={root:{ownerState:d},input:{ownerState:d}},h=s?deepmerge(m,s):m;return(0,gr.jsx)(Jo,{slots:{root:l.root??CI,input:l.input??oI},slotProps:h,fullWidth:C,inputComponent:I,multiline:a,ref:t,type:c,...u,classes:p})});II.muiName="Input";var aI=On("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:rootShouldForwardProp})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),iI=On("legend",{name:"MuiNotchedOutlined",shouldForwardProp:rootShouldForwardProp})(Vn(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function NotchedOutline(e){const{children:t,classes:g,className:n,label:C,notched:o,...I}=e,a=null!=C&&""!==C,i={...e,notched:o,withLabel:a};return(0,gr.jsx)(aI,{"aria-hidden":!0,className:n,ownerState:i,...I,children:(0,gr.jsx)(iI,{ownerState:i,children:a?(0,gr.jsx)("span",{children:C}):nI||(nI=(0,gr.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}function getOutlinedInputUtilityClass(e){return generateUtilityClass("MuiOutlinedInput",e)}var sI={...Yo,...generateUtilityClasses("MuiOutlinedInput",["root","notchedOutline","input"])},useUtilityClasses$15=e=>{const{classes:t}=e,g=composeClasses({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},getOutlinedInputUtilityClass,t);return{...t,...g}},lI=On(Xo,{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:rootOverridesResolver})(Vn(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${sI.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${sI.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${sI.focused} .${sI.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{[`&.${sI.focused} .${sI.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${sI.error} .${sI.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${sI.disabled} .${sI.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{padding:"8.5px 14px"}}]}})),cI=On(NotchedOutline,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Vn(({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),uI=On(_o,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:inputOverridesResolver})(Vn(({theme:e})=>({padding:"16.5px 14px","&:-webkit-autofill":{...!e.vars&&{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff"},borderRadius:"inherit",...e.vars&&e.applyStyles("dark",{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"})},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]}))),dI=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiOutlinedInput"}),{fullWidth:n=!1,inputComponent:C="input",label:o,multiline:I=!1,notched:a,slots:i={},slotProps:s={},type:c="text",...u}=g,d=useUtilityClasses$15(g),[p,m]=useFormControlState({props:g,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),h={...g,color:p.color||"primary",disabled:p.disabled,error:p.error,focused:p.focused,formControl:m,fullWidth:n,hiddenLabel:p.hiddenLabel,multiline:I,size:p.size,type:c},y=i.root??lI,b=i.input??uI,[v,x]=useSlot("notchedOutline",{elementType:cI,className:d.notchedOutline,shouldForwardComponentProp:!0,ownerState:h,externalForwardedProps:{slots:i,slotProps:s},additionalProps:{label:null!=o&&""!==o&&p.required?(0,gr.jsxs)(l.Fragment,{children:[o," ","*"]}):o}});return(0,gr.jsx)(Jo,{slots:{root:y,input:b},slotProps:s,renderSuffix:e=>(0,gr.jsx)(v,{...x,notched:void 0!==a?a:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:n,inputComponent:C,multiline:I,ref:t,type:c,...u,classes:{...d,notchedOutline:null}})});function getFormLabelUtilityClasses(e){return generateUtilityClass("MuiFormLabel",e)}dI.muiName="Input";var pI=generateUtilityClasses("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),useUtilityClasses$14=e=>{const{classes:t,color:g,focused:n,disabled:C,error:o,filled:I,required:a}=e;return composeClasses({root:["root",`color${Qn(g)}`,C&&"disabled",o&&"error",I&&"filled",n&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]},getFormLabelUtilityClasses,t)},mI=On("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,"secondary"===g.color&&t.colorSecondary,g.filled&&t.filled]}})(Vn(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{[`&.${pI.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${pI.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${pI.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),fI=On("span",{name:"MuiFormLabel",slot:"Asterisk"})(Vn(({theme:e})=>({[`&.${pI.error}`]:{color:(e.vars||e).palette.error.main}}))),useUtilityClasses$13=e=>{const{classes:t,formControl:g,size:n,shrink:C,disableAnimation:o,variant:I,required:a}=e,i=composeClasses({root:["root",g&&"formControl",!o&&"animated",C&&"shrink",n&&"medium"!==n&&`size${Qn(n)}`,I],asterisk:[a&&"asterisk"]},getInputLabelUtilityClasses,t);return{...t,...i}},hI=On(l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiFormLabel"}),{children:n,className:C,color:o,component:I="label",disabled:a,error:i,filled:s,focused:l,required:c,...u}=g,[d]=useFormControlState({props:g,states:["color","required","focused","disabled","error","filled"]}),p={...g,color:d.color||"primary",component:I,disabled:d.disabled,error:d.error,filled:d.filled,focused:d.focused,required:d.required},m=useUtilityClasses$14(p);return(0,gr.jsxs)(mI,{as:I,ownerState:p,className:clsx(m.root,C),ref:t,...u,children:[n,d.required&&(0,gr.jsxs)(fI,{ownerState:p,"aria-hidden":!0,className:m.asterisk,children:[" ","*"]})]})}),{shouldForwardProp:e=>rootShouldForwardProp(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[{[`& .${pI.asterisk}`]:t.asterisk},t.root,g.formControl&&t.formControl,"small"===g.size&&t.sizeSmall,g.shrink&&t.shrink,!g.disableAnimation&&t.animated,g.focused&&t.focused,t[g.variant]]}})(Vn(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:e,ownerState:t})=>"filled"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:t,size:g})=>"filled"===e&&t.shrink&&"small"===g,style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:e,ownerState:t})=>"outlined"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),yI=l.forwardRef(function(e,t){const g=useDefaultProps({name:"MuiInputLabel",props:e}),{disableAnimation:n=!1,margin:C,shrink:o,variant:I,className:a,...i}=g,[s,l]=useFormControlState({props:g,states:["size","variant","required","focused"]});let c=o;void 0===c&&l&&(c=l.filled||l.focused||l.adornedStart);const u={...g,disableAnimation:n,formControl:l,shrink:c,size:s.size,variant:s.variant,required:s.required,focused:s.focused},d=useUtilityClasses$13(u);return(0,gr.jsx)(hI,{"data-shrink":c,ref:t,className:clsx(d.root,a),...i,ownerState:u,classes:d})});function getFormControlUtilityClasses(e){return generateUtilityClass("MuiFormControl",e)}generateUtilityClasses("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var useUtilityClasses$12=e=>{const{classes:t,margin:g,fullWidth:n}=e;return composeClasses({root:["root","none"!==g&&`margin${Qn(g)}`,n&&"fullWidth"]},getFormControlUtilityClasses,t)},bI=On("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,t[`margin${Qn(g.margin)}`],g.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),vI=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiFormControl"}),{children:n,className:C,color:o="primary",component:I="div",disabled:a=!1,error:i=!1,focused:s,fullWidth:c=!1,hiddenLabel:u=!1,margin:d="none",required:p=!1,size:m="medium",variant:h="outlined",...y}=g,b={...g,color:o,component:I,disabled:a,error:i,fullWidth:c,hiddenLabel:u,margin:d,required:p,size:m,variant:h},v=useUtilityClasses$12(b),[x,S]=l.useState(()=>{let e=!1;return n&&l.Children.forEach(n,t=>{if(!ZC(t,["Input","Select"]))return;const g=ZC(t,["Select"])?t.props.input:t;g&&isAdornedStart(g.props)&&(e=!0)}),e}),[w,E]=l.useState(()=>{let e=!1;return n&&l.Children.forEach(n,t=>{ZC(t,["Input","Select"])&&(isFilled(t.props,!0)||isFilled(t.props.inputProps,!0))&&(e=!0)}),e}),[R,M]=l.useState(!1);a&&R&&M(!1);const T=void 0===s||a?R:s;let P;l.useRef(!1);const N=l.useCallback(()=>{E(!0)},[]),D=l.useCallback(()=>{E(!1)},[]),O=l.useMemo(()=>({adornedStart:x,setAdornedStart:S,color:o,disabled:a,error:i,filled:w,focused:T,fullWidth:c,hiddenLabel:u,size:m,onBlur:()=>{M(!1)},onFocus:()=>{M(!0)},onEmpty:D,onFilled:N,registerEffect:P,required:p,variant:h}),[x,o,a,i,w,T,c,u,P,D,N,p,m,h]);return(0,gr.jsx)(Mo.Provider,{value:O,children:(0,gr.jsx)(bI,{as:I,ownerState:b,className:clsx(v.root,C),ref:t,...y,children:n})})});function getFormHelperTextUtilityClasses(e){return generateUtilityClass("MuiFormHelperText",e)}var xI,SI=generateUtilityClasses("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]),useUtilityClasses$11=e=>{const{classes:t,contained:g,size:n,disabled:C,error:o,filled:I,focused:a,required:i}=e;return composeClasses({root:["root",C&&"disabled",o&&"error",n&&`size${Qn(n)}`,g&&"contained",a&&"focused",I&&"filled",i&&"required"]},getFormHelperTextUtilityClasses,t)},wI=On("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.size&&t[`size${Qn(g.size)}`],g.contained&&t.contained,g.filled&&t.filled]}})(Vn(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${SI.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${SI.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]}))),EI=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiFormHelperText"}),{children:n,className:C,component:o="p",disabled:I,error:a,filled:i,focused:s,margin:l,required:c,variant:u,...d}=g,[p]=useFormControlState({props:g,states:["variant","size","disabled","error","filled","focused","required"]}),m={...g,component:o,contained:"filled"===p.variant||"outlined"===p.variant,variant:p.variant,size:p.size,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required};return delete m.ownerState,(0,gr.jsx)(wI,{as:o,className:clsx(useUtilityClasses$11(m).root,C),ref:t,...d,ownerState:m,children:" "===n?xI||(xI=(0,gr.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):n})});function getNativeSelectUtilityClasses(e){return generateUtilityClass("MuiNativeSelect",e)}var RI=generateUtilityClasses("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),useUtilityClasses$10=e=>{const{classes:t,variant:g,disabled:n,multiple:C,open:o,error:I}=e;return composeClasses({select:["select",g,n&&"disabled",C&&"multiple",I&&"error"],icon:["icon",`icon${Qn(g)}`,o&&"iconOpen",n&&"disabled"]},getNativeSelectUtilityClasses,t)},kI=On("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${RI.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>"filled"!==e.variant&&"outlined"!==e.variant,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),MI=On(kI,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:rootShouldForwardProp,overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.select,t[g.variant],g.error&&t.error,{[`&.${RI.multiple}`]:t.multiple}]}})({}),TI=On("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${RI.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),PI=On(TI,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.icon,g.variant&&t[`icon${Qn(g.variant)}`],g.open&&t.iconOpen]}})({}),NI=l.forwardRef(function(e,t){const{className:g,disabled:n,error:C,IconComponent:o,inputRef:I,variant:a="standard",...i}=e,s={...e,disabled:n,variant:a,error:C},c=useUtilityClasses$10(s);return(0,gr.jsxs)(l.Fragment,{children:[(0,gr.jsx)(MI,{ownerState:s,className:clsx(c.select,g),disabled:n,ref:I||t,...i}),e.multiple?null:(0,gr.jsx)(PI,{as:o,ownerState:s,className:c.icon})]})});function getSelectUtilityClasses(e){return generateUtilityClass("MuiSelect",e)}var DI,OI=generateUtilityClasses("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","nativeInput","error"]),jI=2,zI=400,GI=200;function isMouseEventInsideElement(e,t){if(!t)return!1;if(e.composedPath().includes(t))return!0;if(e.target?.nodeType&&t.contains(e.target))return!0;const g=t.getBoundingClientRect();return(0!==g.width||0!==g.height)&&e.clientX>=g.left-jI&&e.clientX<=g.right+jI&&e.clientY>=g.top-jI&&e.clientY<=g.bottom+jI}var LI=On(kI,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[{[`&.${OI.select}`]:t.select},{[`&.${OI.select}`]:t[g.variant]},{[`&.${OI.error}`]:t.error},{[`&.${OI.multiple}`]:t.multiple}]}})({[`&.${OI.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),BI=On(TI,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.icon,g.open&&t.iconOpen]}})({}),FI=On("input",{shouldForwardProp:e=>slotShouldForwardProp(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"}),useUtilityClasses$9=e=>{const{classes:t,variant:g,disabled:n,multiple:C,open:o,error:I}=e;return composeClasses({select:["select",g,n&&"disabled",C&&"multiple",I&&"error"],icon:["icon",o&&"iconOpen",n&&"disabled"],nativeInput:["nativeInput"]},getSelectUtilityClasses,t)},WI=l.forwardRef(function(e,t){const{"aria-describedby":g,"aria-label":n,autoFocus:C,autoWidth:o,children:I,className:a,defaultOpen:i,defaultValue:s,disabled:c,displayEmpty:u,error:d=!1,IconComponent:p,inputRef:m,labelId:h,MenuProps:y={},multiple:b,name:v,onBlur:x,onChange:S,onClose:w,onFocus:E,onKeyDown:R,onMouseDown:M,onOpen:T,open:P,readOnly:N,renderValue:D,required:O,SelectDisplayProps:j={},tabIndex:G,type:L,value:B,variant:F="standard",...W}=e,[V,U]=QC({controlled:B,default:s,name:"Select"}),[K,H]=QC({controlled:P,default:i,name:"Select"}),Y=l.useRef(null),Z=l.useRef(null),Q=l.useRef(null),X=l.useRef(!1),_=l.useRef(!1),q=l.useRef(null),J=l.useRef(!1),$=l.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}),ee=useTimeout(),te=useTimeout(),[ge,re]=l.useState(null),{current:ne}=l.useRef(null!=P),[Ae,Ce]=l.useState(),[oe,Ie]=l.useState(null),ae=EA(t,m),ie=l.useCallback(e=>{Z.current=e,e&&re(e)},[]),se=ge?.parentNode;l.useImperativeHandle(ae,()=>({focus:()=>{Z.current.focus()},node:Y.current,value:V}),[V]);const le=null!==ge&&K;RA(()=>{X.current=le},[le]);const ce=l.useCallback(()=>{ee.clear(),te.clear()},[ee,te]),ue=l.useCallback(()=>{ce(),J.current=!1,$.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1}},[ce]),de=l.useCallback(()=>{q.current&&(q.current(),q.current=null)},[]);l.useEffect(()=>{le||(ue(),de())},[le,ue,de]),l.useEffect(()=>()=>{ue(),de()},[ue,de]),l.useEffect(()=>{if(!le||!se||o)return;if("undefined"==typeof ResizeObserver)return;const e=new ResizeObserver(()=>{Ce(se.clientWidth)});return e.observe(se),()=>{e.disconnect()}},[le,se,o]),l.useEffect(()=>{i&&K&&ge&&!ne&&(Ce(o?null:se.clientWidth),Z.current.focus())},[ge,o]),l.useEffect(()=>{C&&Z.current.focus()},[C]),l.useEffect(()=>{if(!h)return;const e=vA(Z.current).getElementById(h);if(e){const handler=()=>{getSelection().isCollapsed&&Z.current.focus()};return e.addEventListener("click",handler),()=>{e.removeEventListener("click",handler)}}},[h]);const pe=wA((e,t)=>{e||(ue(),de()),e?(Ie(getOpenInteractionType(t)),T&&T(t)):(Ie(null),w&&w(t)),ne||(X.current=e,Ce(o?null:se.clientWidth),H(e))}),scheduleMouseUpSelection=()=>{ue(),_.current?te.start(GI,()=>{$.current.allowUnselectedMouseUp=!0,ee.start(GI,()=>{$.current.allowSelectedMouseUp=!0})}):ee.start(zI,()=>{$.current.allowSelectedMouseUp=!0,$.current.allowUnselectedMouseUp=!0})},handleMouseDown=e=>{if(M?.(e),0!==e.button)return;e.preventDefault(),Z.current.focus();const t=vA(e.currentTarget);scheduleMouseUpSelection(),de();const handleMouseUp=e=>{q.current=null,Z.current&&(isMouseEventInsideElement(e,Z.current)||isMouseEventInsideElement(e,Q.current)||!X.current&&ne||pe(!1,e))};t.addEventListener("mouseup",handleMouseUp,{capture:!0,once:!0}),q.current=()=>{t.removeEventListener("mouseup",handleMouseUp,!0)},pe(!0,e)},handleClose=e=>{pe(!1,e)},me=l.Children.toArray(I),handleChange=e=>{const t=me.find(t=>t.props.value===e.target.value);void 0!==t&&(U(t.props.value),S&&S(e,t))},handleItemClick=e=>t=>{let g;if(J.current=!1,t.currentTarget.hasAttribute("tabindex")){if(b){g=Array.isArray(V)?V.slice():[];const t=V.indexOf(e.props.value);-1===t?g.push(e.props.value):g.splice(t,1)}else g=e.props.value;if(e.props.onClick&&e.props.onClick(t),V!==g&&(U(g),S)){const n=t.nativeEvent||t,C=new n.constructor(n.type,n);Object.defineProperty(C,"target",{writable:!0,value:{value:g,name:v}}),S(C,e)}b||pe(!1,t)}},handleItemMouseUp=(e,t)=>g=>{if(e.props.onMouseUp?.(g),J.current)return void(J.current=!1);const n=!$.current.allowSelectedMouseUp&&t,C=!$.current.allowUnselectedMouseUp&&!t;n||C||g.currentTarget.click()},handleKeyDown=e=>{N||([" ","ArrowUp","ArrowDown","Enter"].includes(e.key)&&(e.preventDefault(),pe(!0,e)),R?.(e))},handleBlur=e=>{!le&&x&&(Object.defineProperty(e,"target",{writable:!0,value:{value:V,name:v}}),x(e))};let fe,he;delete W["aria-invalid"];const ye=[];let be=!1,ve=!1;(isFilled({value:V})||u)&&(D?fe=D(V):be=!0);const xe=me.map(e=>{if(!l.isValidElement(e))return null;let t;if(b){if(!Array.isArray(V))throw new Error(formatMuiErrorMessage(2));t=V.some(t=>areEqualValues(t,e.props.value)),t&&be&&ye.push(e.props.children)}else t=areEqualValues(V,e.props.value),t&&be&&(he=e.props.children);return t&&(ve=!0),l.cloneElement(e,{"aria-selected":t?"true":"false",onMouseDown:t=>{J.current=!0,e.props.onMouseDown?.(t)},onPointerDown:t=>{J.current=!0,e.props.onPointerDown?.(t)},onClick:handleItemClick(e),onMouseUp:handleItemMouseUp(e,t),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})});RA(()=>{_.current=ve},[ve]),be&&(fe=b?0===ye.length?null:ye.reduce((e,t,g)=>(e.push(t),g<ye.length-1&&e.push(", "),e),[]):he);let Se,we=Ae;!o&&ne&&ge&&(we=se.clientWidth),Se=void 0!==G?G:c?null:0;const Ee=j.id||(v?`mui-component-select-${v}`:void 0),Re={...e,variant:F,value:V,open:le,error:d},ke=useUtilityClasses$9(Re),Me="function"==typeof y.slotProps?.paper?y.slotProps.paper(Re):y.slotProps?.paper,Te=EA(Me?.ref,Q),Pe="function"==typeof y.slotProps?.list?y.slotProps.list(Re):y.slotProps?.list,Ne=useId$1(),De=useId$1();return(0,gr.jsxs)(l.Fragment,{children:[(0,gr.jsx)(LI,{as:"div",ref:ie,tabIndex:Se,role:"combobox","aria-controls":le?Ne:void 0,"aria-disabled":c?"true":void 0,"aria-expanded":le?"true":"false","aria-haspopup":"listbox","aria-label":n,"aria-labelledby":h,"aria-describedby":g,"aria-required":O?"true":void 0,"aria-invalid":d?"true":void 0,onKeyDown:handleKeyDown,onMouseDown:c||N?null:handleMouseDown,onBlur:handleBlur,onFocus:E,...j,ownerState:Re,className:clsx(j.className,ke.select,a),id:Ee,children:isEmpty$1(fe)?DI||(DI=(0,gr.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):fe}),(0,gr.jsx)(FI,{"aria-invalid":d,value:Array.isArray(V)?V.join(","):V,name:v,ref:Y,"aria-hidden":!0,onChange:handleChange,tabIndex:-1,disabled:c,className:ke.nativeInput,autoFocus:C,required:O,...W,id:W.id??De,ownerState:Re}),(0,gr.jsx)(BI,{as:p,className:ke.icon,ownerState:Re}),(0,gr.jsx)(DA,{value:oe,children:(0,gr.jsx)(bC,{id:`menu-${v||""}`,anchorEl:se,open:le,onClose:handleClose,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...y,slotProps:{...y.slotProps,list:{"aria-labelledby":h,role:"listbox","aria-multiselectable":b?"true":void 0,disableListWrap:!0,id:Ne,...Pe},paper:{...Me,ref:Te,style:{minWidth:we,...Me?.style}}},children:xe})})]})}),VI=createSvgIcon((0,gr.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),useUtilityClasses$8=e=>{const{classes:t}=e,g=composeClasses({root:["root"]},getSelectUtilityClasses,t);return{...t,...g}},UI={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>rootShouldForwardProp(e)&&"variant"!==e},KI=On(rI,UI)(""),HI=On(dI,UI)(""),YI=On(II,UI)(""),ZI=l.forwardRef(function(e,t){const g=useDefaultProps({name:"MuiSelect",props:e}),{autoWidth:n=!1,children:C,classes:o={},className:I,defaultOpen:a=!1,displayEmpty:i=!1,IconComponent:s=VI,id:c,input:u,inputProps:d,label:p,labelId:m,MenuProps:h,multiple:y=!1,native:b=!1,onClose:v,onOpen:x,open:S,renderValue:w,SelectDisplayProps:E,variant:R="outlined",...M}=g,T=b?NI:WI,[P]=useFormControlState({props:g,states:["variant","error"]}),N=P.variant||R,D={...g,variant:N,classes:o},O=useUtilityClasses$8(D),{root:j,...G}=O,L=u||{standard:(0,gr.jsx)(KI,{ownerState:D}),outlined:(0,gr.jsx)(HI,{label:p,ownerState:D}),filled:(0,gr.jsx)(YI,{ownerState:D})}[N],B=EA(t,getReactElementRef(L));return(0,gr.jsx)(l.Fragment,{children:l.cloneElement(L,{inputComponent:T,inputProps:{children:C,error:P.error,IconComponent:s,variant:N,type:void 0,multiple:y,...b?{id:c}:{autoWidth:n,defaultOpen:a,displayEmpty:i,labelId:m,MenuProps:h,onClose:v,onOpen:x,open:S,renderValue:w,SelectDisplayProps:{id:c,...E}},...d,classes:d?deepmerge(G,d.classes):G,...u?u.props.inputProps:{}},...(y&&b||i)&&"outlined"===N?{notched:!0}:{},ref:B,className:clsx(L.props.className,I,O.root),...!u&&{variant:N},...M})})});function getTextFieldUtilityClass(e){return generateUtilityClass("MuiTextField",e)}ZI.muiName="Select",generateUtilityClasses("MuiTextField",["root"]);var QI={standard:rI,filled:II,outlined:dI},useUtilityClasses$7=e=>{const{classes:t}=e;return composeClasses({root:["root"]},getTextFieldUtilityClass,t)},XI=On(vI,{name:"MuiTextField",slot:"Root"})({}),_I=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiTextField"}),{autoComplete:n,autoFocus:C=!1,children:o,className:I,color:a="primary",defaultValue:i,disabled:s=!1,error:l=!1,fullWidth:c=!1,helperText:u,id:d,inputRef:p,label:m,maxRows:h,minRows:y,multiline:b=!1,name:v,onBlur:x,onChange:S,onFocus:w,placeholder:E,required:R=!1,rows:M,select:T=!1,slots:P={},slotProps:N={},type:D,value:O,variant:j="outlined",...G}=g,L={...g,autoFocus:C,color:a,disabled:s,error:l,fullWidth:c,multiline:b,required:R,select:T,variant:j},B=useUtilityClasses$7(L),F=useId$1(d),W=u&&F?`${F}-helper-text`:void 0,V=m&&F?`${F}-label`:void 0,U=QI[j],K={slots:P,slotProps:N},[H,Y]=useSlot("select",{elementType:ZI,externalForwardedProps:K,ownerState:L}),Z=T&&Y.native,Q={},X=K.slotProps.inputLabel;"outlined"===j&&(X&&void 0!==X.shrink&&(Q.notched=X.shrink),Q.label=m),T&&(Z||(Q.id=void 0),Q["aria-describedby"]=void 0);const[_,q]=useSlot("root",{elementType:XI,shouldForwardComponentProp:!0,externalForwardedProps:{...K,...G},ownerState:L,className:clsx(B.root,I),ref:t,additionalProps:{disabled:s,error:l,fullWidth:c,required:R,color:a,variant:j}}),[J,$]=useSlot("input",{elementType:U,externalForwardedProps:K,additionalProps:Q,ownerState:L}),[ee,te]=useSlot("inputLabel",{elementType:yI,externalForwardedProps:K,ownerState:L}),[ge,re]=useSlot("htmlInput",{elementType:"input",externalForwardedProps:K,ownerState:L}),[ne,Ae]=useSlot("formHelperText",{elementType:EI,externalForwardedProps:K,ownerState:L}),Ce=(0,gr.jsx)(J,{"aria-describedby":W,autoComplete:n,autoFocus:C,defaultValue:i,fullWidth:c,multiline:b,name:v,rows:M,maxRows:h,minRows:y,type:D,value:O,id:F,inputRef:p,onBlur:x,onChange:S,onFocus:w,placeholder:E,inputProps:re,slots:{input:P.htmlInput?ge:void 0},...$});return(0,gr.jsxs)(_,{...q,children:[null!=m&&""!==m&&(0,gr.jsx)(ee,{htmlFor:T&&!Z?void 0:F,id:V,...T&&!Z&&{component:"div"},...te,children:m}),T?(0,gr.jsx)(H,{"aria-describedby":W,id:F,labelId:V,value:O,input:Ce,...Y,children:o}):Ce,u&&(0,gr.jsx)(ne,{id:W,...Ae,children:u})]})}),qI=600,JI=400,clampScrollbackGeometryValue=(e,t,g)=>Math.min(Math.max(e,t),g),parseStoredValue=e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return e}},hasUsablePersistenceAdapter=e=>"function"==typeof e?.getVariable&&"function"==typeof e?.setVariable,hasSavedGeometry=e=>!!hasUsablePersistenceAdapter(e)&&isPlainObject$1(parseStoredValue((e.getVariable("nexGui4Settings")||{})[Te.UI])?.scrollbackModal),getScrollbackViewportBounds=()=>"undefined"==typeof window?{width:800,height:600}:{width:Math.max(320,window.innerWidth),height:Math.max(240,window.innerHeight)},getMinimumScrollbackGeometry=()=>{const e=getScrollbackViewportBounds();return{width:Math.min(qI,e.width),height:Math.min(JI,e.height)}},getDefaultScrollbackGeometry=()=>{const e=getScrollbackViewportBounds(),t=getMinimumScrollbackGeometry(),g=clampScrollbackGeometryValue(Math.round(.7*e.width),t.width,e.width),n=clampScrollbackGeometryValue(Math.round(.7*e.height),t.height,e.height);return{x:Math.round((e.width-g)/2),y:Math.round((e.height-n)/2),width:g,height:n}},normalizeScrollbackGeometry=e=>{const t=getDefaultScrollbackGeometry(),g=getScrollbackViewportBounds(),n=getMinimumScrollbackGeometry(),C=clampScrollbackGeometryValue(Number(e?.width)||t.width,n.width,g.width),o=clampScrollbackGeometryValue(Number(e?.height)||t.height,n.height,g.height);return{x:clampScrollbackGeometryValue(Number(e?.x)||0,0,Math.max(0,g.width-C)),y:clampScrollbackGeometryValue(Number(e?.y)||0,0,Math.max(0,g.height-o)),width:C,height:o}},useScrollbackLayout=()=>{const e=(0,l.useContext)(_t),t=e?.adapter,g=e?.scrollbackLayoutStore,n=e?.persistenceStore?.getAll?.()?.ui??{},C=(0,l.useMemo)(()=>g&&hasSavedGeometry(t)?normalizeScrollbackGeometry(g.get("scrollbackModal")):getDefaultScrollbackGeometry(),[t,g]),o=(0,l.useCallback)(e=>{g?.set("scrollbackModal",normalizeScrollbackGeometry(e))},[g]);return{focusHostInput:(0,l.useCallback)(()=>{t?.focusInput?.()},[t]),initialGeometry:C,persistGeometry:o,useVirtualizedLogs:Boolean(n.virtualizedLogs)}},$I=.8,useScrollbackHydration=({items:e,open:t,scrollbackSession:g,getViewportElement:n,dispatchViewportScroll:C,setScrollLock:o,onViewportOpened:I})=>{const[a,i]=(0,l.useState)([]),[s,c]=(0,l.useState)(!1),[u,d]=(0,l.useState)(!0),p=(0,l.useRef)([]);p.current=a;const m=(0,l.useRef)({hasMore:!0,isLoading:!1});m.current={hasMore:u,isLoading:s},(0,l.useEffect)(()=>{if(!t)return i([]),void d(!0);i(t=>{if(0===e.length)return[];if(0===t.length)return[...e];const g=t[t.length-1]?.id??-1,n=e.filter(e=>e.id>g);return n.length>0?[...t,...n]:t})},[e,t]);const h=(0,l.useCallback)(async()=>{if(!m.current.hasMore||m.current.isLoading)return;const e=p.current[0]?.id;if(void 0===e||e<=0)return m.current={...m.current,hasMore:!1},void d(!1);if(!g?.readRange)return m.current={...m.current,hasMore:!1},void d(!1);m.current={...m.current,isLoading:!0},c(!0);try{const t=Math.max(0,e-500),C=e-1,o=await g.readRange(t,C);if(0===o.length)return m.current={...m.current,hasMore:!1},void d(!1);i(e=>{const t=new Set(e.map(e=>e.id));return[...o.filter(e=>!t.has(e.id)),...e]});const I=n();if(I){const e=I.scrollHeight,t=I.scrollTop;window.requestAnimationFrame(()=>{I.scrollTop=t+(I.scrollHeight-e)})}}catch(t){console.error("[nexGui4] Failed to load older lines",t)}finally{m.current={...m.current,isLoading:!1},c(!1)}},[n,g]);return(0,l.useEffect)(()=>{if(!t)return;let e=!0,g=null,a=null;const i=window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{if(!e)return;const t=n();if(!t)return;g=t;const i=Math.max(0,t.scrollHeight-t.clientHeight),s=t.clientHeight*$I,l=Math.max(0,i-s);t.scrollTop=l,C(t),o(l<i),I?.(),a=()=>{const{hasMore:e,isLoading:g}=m.current;t.scrollTop<300&&e&&!g&&h()},t.addEventListener("scroll",a,{passive:!0})})});return()=>{e=!1,window.cancelAnimationFrame(i),g&&a&&g.removeEventListener("scroll",a)}},[C,n,h,I,t,o]),{hydratedItems:a,hasMore:u,isLoadingMore:s}},useScrollbackSearch=({scrollbackSession:e,open:t,showPrompts:g,onCursorChange:n})=>{const[C,o]=(0,l.useState)(""),[I,a]=(0,l.useState)(""),[i,s]=(0,l.useState)([]),[c,u]=(0,l.useState)(!1),[d,p]=(0,l.useState)(-1),m=(0,l.useCallback)(()=>{o(""),a(""),p(-1)},[]);(0,l.useEffect)(()=>{t||(m(),s([]),u(!1))},[t,m]),(0,l.useEffect)(()=>{if(!I)return s([]),void u(!1);let t=!0;return u(!0),(async()=>{try{if(e?.search){const g=await e.search(I,{includePrompts:!0});return void(t&&s(g))}t&&s([])}catch(g){console.error("[nexGui4] Failed searching scrollback session",g)}finally{t&&u(!1)}})(),()=>{t=!1}},[I,e]);const h=(0,l.useMemo)(()=>I?g?i:i.filter(e=>!e.isPrompt):[],[I,i,g]),y=h.length;(0,l.useEffect)(()=>{t&&I&&0!==y?(p(0),n?.(0)):p(-1)},[I,n,t,y]);const b=(0,l.useCallback)(e=>{o(e.target.value)},[]),v=(0,l.useCallback)(e=>{if("Enter"!==e.key)return;const t=e.target.value??"";if(t!==I)return void a(t);if(0===y)return;const g=d+1>=y?0:d+1;p(g),n?.(g)},[I,n,d,y]),x=I.length>0,S=x&&C.length>0&&0===y;return{searchBarText:C,setSearchBarText:o,committedSearchTerm:I,searchResults:h,isSearching:c,isSearchActive:x,searchMatchCount:y,searchCursor:d,hasNoMatch:S,searchStatusText:c?"Searching...":S?"No match":y>0&&d>=0?`${d+1}/${y}`:"",resetSearch:m,handleSearchInput:b,handleSearchKeyDown:v}},ea=1500,useScrollbackSelection=({visibleItems:e})=>{const[t,g]=(0,l.useState)(null),[n,C]=(0,l.useState)(null),[o,I]=(0,l.useState)(!1),a=(0,l.useRef)({a:null,b:null});a.current={a:t,b:n};const i=(0,l.useCallback)(e=>{const{a:t,b:n}=a.current;t===e||n===e?(g(null),C(null)):null===t?g(e):null===n?C(e):(g(e),C(null))},[]),s=(0,l.useMemo)(()=>{if(null==t||null==n)return null;const g=Math.min(t,n),C=Math.max(t,n);return e.filter(e=>e.id>=g&&e.id<=C)},[t,n,e]);return{selectionA:t,selectionB:n,selectedRangeItems:s,copyConfirmed:o,handleLineSelect:i,handleCopyRange:(0,l.useCallback)(async()=>{if(!s?.length)return;const e=s.map(e=>stripHtml(e.html)).join("\n");try{await navigator.clipboard.writeText(e),I(!0),window.setTimeout(()=>I(!1),ea)}catch{}},[s]),isLineSelected:(0,l.useCallback)(e=>{const g=e===t||e===n;return null==t||null==n?{isEndpoint:g,inRange:!1}:{isEndpoint:g,inRange:e>=Math.min(t,n)&&e<=Math.max(t,n)}},[t,n])}},ta="nexgui4-log.html",ga="text/html;charset=utf-8",toDate=e=>{if(e instanceof Date)return Number.isNaN(e.getTime())?null:e;if("number"==typeof e&&Number.isFinite(e)){const t=new Date(e);return Number.isNaN(t.getTime())?null:t}return null},formatTimestamp$1=e=>{const t="string"==typeof e&&e.trim().length>0?e:null;if(t)return t;const g=toDate(e)??new Date,pad=(e,t=2)=>String(e).padStart(t,"0");return[pad(g.getHours()),pad(g.getMinutes()),pad(g.getSeconds())].join(":")+`.${pad(g.getMilliseconds(),3)}`},formatLogDate=(e=new Date)=>`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`,resolveCssFontSize$1=e=>null==e?"14px":"number"==typeof e?`${e}px`:String(e),collectPaletteCss=()=>{if("undefined"==typeof document)return"";try{return Array.from(document.getElementById("ng-palette")?.sheet?.cssRules??[]).map(e=>e.cssText).join("\n")}catch{return""}},collectNexGuiStyles=()=>"undefined"==typeof document?"":document.getElementById("nexGuicss")?.outerHTML??"",normalizeLogLine=(e,t)=>({html:String(e?.html??""),id:Number.isFinite(Number(e?.id))&&null!==e?.id?Number(e.id):t,isMonospace:Boolean(e?.isMonospace),isPrompt:Boolean(e?.isPrompt),shouldLog:Boolean(e?.shouldLog),timestamp:formatTimestamp$1(e?.timestamp)}),normalizeLogLines=e=>e.map((e,t)=>normalizeLogLine(e,t)),serializeJsonForInlineScript=e=>JSON.stringify(e).replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/&/g,"\\u0026").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"),buildLogTitle=e=>e&&String(e).trim().length>0?String(e):`nexGui4 Scrollback - ${formatLogDate()}`,buildBaseStyle=({fontFamily:e,fontSize:t})=>`\n html,\n body {\n background: black;\n color: #ccc;\n margin: 0;\n min-height: 100%;\n }\n\n body {\n box-sizing: border-box;\n font-family: ${e};\n font-size: ${t};\n padding: 12px;\n }\n\n .nexgui4-log-line {\n box-sizing: border-box;\n font-family: ${e};\n font-size: ${t};\n line-height: 1.2;\n overflow-wrap: anywhere;\n white-space: pre-wrap;\n }\n\n .nexgui4-log-line.mono,\n .nexgui4-log-line .mono {\n font-family: ${e};\n }\n\n .nexgui4-log-timestamp {\n color: #555;\n font-family: ${e};\n margin-right: 1ch;\n }\n\n .nexgui4-log-payload {\n min-width: 0;\n }\n`,buildHead=({title:e,fontFamily:t,fontSize:g})=>{const n=collectPaletteCss(),C=collectNexGuiStyles();return`<head>\n <meta charset="utf-8" />\n <title>${escapeHtml(e)}</title>\n <style>\n${buildBaseStyle({fontFamily:t,fontSize:g})}\n </style>\n <style id="ng-palette">${n}</style>\n ${C}\n </head>`},buildLogLineClassName=e=>["nexgui4-log-line",e.isPrompt?"prompt textline":"textline",e.isMonospace?"mono":null].filter(Boolean).join(" "),renderStaticLogRow=e=>`<div class="${buildLogLineClassName(e)}"><span class="nexgui4-log-timestamp timestamp mono no_out">${escapeHtml(e.timestamp)}&nbsp;</span><span class="nexgui4-log-payload">${e.html}</span></div>`,buildStandardHtmlLog=(e,{fontFamily:t=Ee,fontSize:g,title:n}={})=>{const C=resolveCssFontSize$1(g),o=buildLogTitle(n),I=normalizeLogLines(e).map(renderStaticLogRow).join("\n");return`<!doctype html>\n<html>\n ${buildHead({title:o,fontFamily:t,fontSize:C})}\n <body>\n${I}\n </body>\n</html>`},buildVirtualizedLogScript=(e,t)=>`\n (() => {\n const allLines = ${serializeJsonForInlineScript(e)};\n const viewport = document.getElementById("nexgui4-log-viewport");\n const spacer = document.getElementById("nexgui4-log-spacer");\n const rows = document.getElementById("nexgui4-log-rows");\n const searchInput = document.getElementById("nexgui4-log-search");\n const status = document.getElementById("nexgui4-log-search-status");\n const timestampToggle = document.getElementById("nexgui4-log-timestamps");\n const promptToggle = document.getElementById("nexgui4-log-prompts");\n\n let showTimestamps = true;\n let showPrompts = true;\n let displayLines = allLines;\n let heights = [];\n let offsets = [];\n let searchTerm = "";\n let searchMatches = [];\n let searchIndex = -1;\n let renderFrame = 0;\n const overscan = 8;\n const lineTextCache = new WeakMap();\n const textProbe = document.createElement("div");\n\n const estimate = Math.max(18, ${Math.max(18,t)});\n const escapeText = (value) =>\n String(value ?? "")\n .replaceAll("&", "&amp;")\n .replaceAll("<", "&lt;")\n .replaceAll(">", "&gt;")\n .replaceAll('"', "&quot;")\n .replaceAll("'", "&#39;");\n\n const readLineText = (line) => {\n if (lineTextCache.has(line)) {\n return lineTextCache.get(line);\n }\n\n textProbe.innerHTML = line.html ?? "";\n const text = (textProbe.textContent || "").toLowerCase();\n lineTextCache.set(line, text);\n return text;\n };\n\n const rebuildMetrics = () => {\n offsets = new Array(displayLines.length + 1);\n offsets[0] = 0;\n for (let index = 0; index < displayLines.length; index += 1) {\n offsets[index + 1] = offsets[index] + (heights[index] || estimate);\n }\n spacer.style.height = (offsets[offsets.length - 1] || 0) + "px";\n };\n\n const findIndexAt = (offset) => {\n let low = 0;\n let high = displayLines.length;\n while (low < high) {\n const mid = Math.floor((low + high) / 2);\n if (offsets[mid + 1] < offset) {\n low = mid + 1;\n } else {\n high = mid;\n }\n }\n return low;\n };\n\n const updateStatus = () => {\n if (!searchTerm) {\n status.textContent = "";\n return;\n }\n\n status.textContent = searchMatches.length\n ? "(" + (searchIndex + 1) + " of " + searchMatches.length + ") Line: " + searchMatches[searchIndex]\n : "No entry found";\n };\n\n const classNameForLine = (line) =>\n "nexgui4-log-line " +\n (line.isPrompt ? "prompt textline" : "textline") +\n (line.isMonospace ? " mono" : "");\n\n const render = () => {\n renderFrame = 0;\n const top = viewport.scrollTop;\n const bottom = top + viewport.clientHeight;\n const start = Math.max(0, findIndexAt(top) - overscan);\n const end = Math.min(displayLines.length, findIndexAt(bottom) + overscan + 1);\n const activeDisplayIndex = searchMatches[searchIndex] ?? -1;\n let html = "";\n\n for (let index = start; index < end; index += 1) {\n const line = displayLines[index];\n const timestamp = showTimestamps\n ? '<span class="nexgui4-log-timestamp timestamp mono no_out">' +\n escapeText(line.timestamp) +\n "&nbsp;</span>"\n : "";\n const activeClass = activeDisplayIndex === index ? " nexgui4-log-line--active" : "";\n\n html +=\n '<div class="' +\n classNameForLine(line) +\n activeClass +\n '" data-index="' +\n index +\n '" style="transform:translateY(' +\n offsets[index] +\n 'px)">' +\n timestamp +\n '<span class="nexgui4-log-payload">' +\n line.html +\n "</span></div>";\n }\n\n rows.innerHTML = html;\n window.requestAnimationFrame(measureRenderedRows);\n };\n\n const requestRender = () => {\n if (renderFrame) {\n return;\n }\n\n renderFrame = window.requestAnimationFrame(render);\n };\n\n const measureRenderedRows = () => {\n let changed = false;\n\n rows.querySelectorAll("[data-index]").forEach((row) => {\n const index = Number(row.getAttribute("data-index"));\n const measured = Math.ceil(row.getBoundingClientRect().height);\n\n if (Number.isFinite(index) && measured > 0 && Math.abs((heights[index] || estimate) - measured) > 1) {\n heights[index] = measured;\n changed = true;\n }\n });\n\n if (changed) {\n rebuildMetrics();\n requestRender();\n }\n };\n\n const rebuildDisplayLines = () => {\n displayLines = showPrompts ? allLines : allLines.filter((line) => !line.isPrompt);\n heights = new Array(displayLines.length);\n searchMatches = [];\n searchIndex = -1;\n\n if (searchTerm) {\n searchMatches = displayLines.reduce((matches, line, index) => {\n if (readLineText(line).includes(searchTerm)) {\n matches.push(index);\n }\n return matches;\n }, []);\n searchIndex = searchMatches.length > 0 ? 0 : -1;\n }\n\n rebuildMetrics();\n updateStatus();\n requestRender();\n };\n\n const scrollToActiveSearchMatch = () => {\n if (searchIndex < 0) {\n return;\n }\n\n viewport.scrollTop = Math.max(\n 0,\n offsets[searchMatches[searchIndex]] - viewport.clientHeight / 2,\n );\n requestRender();\n };\n\n const runSearch = () => {\n const nextTerm = searchInput.value.trim().toLowerCase();\n\n if (nextTerm !== searchTerm) {\n searchTerm = nextTerm;\n rebuildDisplayLines();\n } else if (searchMatches.length > 0) {\n searchIndex = (searchIndex + 1) % searchMatches.length;\n updateStatus();\n requestRender();\n }\n\n scrollToActiveSearchMatch();\n };\n\n viewport.addEventListener("scroll", requestRender, { passive: true });\n window.addEventListener("resize", () => {\n heights = new Array(displayLines.length);\n rebuildMetrics();\n requestRender();\n });\n searchInput.addEventListener("keydown", (event) => {\n if (event.key === "Enter") {\n runSearch();\n }\n });\n timestampToggle.addEventListener("change", () => {\n showTimestamps = timestampToggle.checked;\n heights = new Array(displayLines.length);\n rebuildMetrics();\n requestRender();\n });\n promptToggle.addEventListener("change", () => {\n showPrompts = promptToggle.checked;\n rebuildDisplayLines();\n });\n\n rebuildDisplayLines();\n viewport.scrollTop = Math.max(0, spacer.offsetHeight - viewport.clientHeight);\n requestRender();\n })();\n`,buildVirtualizedHtmlLog=(e,{fontFamily:t=Ee,fontSize:g,title:n}={})=>{const C=resolveCssFontSize$1(g),o=Number.parseFloat(C)||14,I=buildLogTitle(n),a=normalizeLogLines(e);return`<!doctype html>\n<html>\n ${buildHead({title:I,fontFamily:t,fontSize:C})}\n <body class="nexgui4-log-body--virtual">\n <div class="nexgui4-log-toolbar">\n <input id="nexgui4-log-search" aria-label="Search log" placeholder="Search" />\n <span id="nexgui4-log-search-status" aria-live="polite"></span>\n <label><input id="nexgui4-log-timestamps" type="checkbox" checked /> Timestamps</label>\n <label><input id="nexgui4-log-prompts" type="checkbox" checked /> Prompts</label>\n </div>\n <div id="nexgui4-log-viewport" class="nexgui4-log-viewport">\n <div id="nexgui4-log-spacer" class="nexgui4-log-spacer">\n <div id="nexgui4-log-rows" class="nexgui4-log-rows"></div>\n </div>\n </div>\n <style>\n .nexgui4-log-body--virtual {\n height: 100vh;\n overflow: hidden;\n padding: 0;\n }\n\n .nexgui4-log-toolbar {\n align-items: center;\n background: #050505;\n border-bottom: 1px solid #333;\n box-sizing: border-box;\n display: flex;\n gap: 12px;\n height: 42px;\n padding: 6px 10px;\n }\n\n .nexgui4-log-toolbar input[type="text"],\n #nexgui4-log-search {\n background: #111;\n border: 1px solid #444;\n color: #eee;\n font: inherit;\n padding: 4px 6px;\n width: 24ch;\n }\n\n #nexgui4-log-search-status {\n color: #aaa;\n min-width: 18ch;\n }\n\n .nexgui4-log-toolbar label {\n align-items: center;\n display: inline-flex;\n gap: 4px;\n white-space: nowrap;\n }\n\n .nexgui4-log-viewport {\n height: calc(100vh - 42px);\n overflow-y: auto;\n position: relative;\n }\n\n .nexgui4-log-spacer {\n position: relative;\n width: 100%;\n }\n\n .nexgui4-log-rows {\n left: 0;\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n .nexgui4-log-rows .nexgui4-log-line {\n left: 0;\n padding: 0 12px;\n position: absolute;\n top: 0;\n width: 100%;\n }\n\n .nexgui4-log-line--active {\n background: #e5e7eb;\n color: #111827;\n }\n </style>\n <script>\n${buildVirtualizedLogScript(a,1.5*o+26)}\n <\/script>\n </body>\n</html>`},buildHtmlLog=(e,t,g={})=>t?buildVirtualizedHtmlLog(e,g):buildStandardHtmlLog(e,g),downloadBuffer=(e,t,{fontFamily:g=Ee,fontSize:n,title:C}={})=>{if("undefined"==typeof document||"undefined"==typeof Blob||"undefined"==typeof URL||"function"!=typeof URL.createObjectURL||0===e.length)return;const o=buildHtmlLog(e,t,{fontFamily:g,fontSize:n,title:C}),I=URL.createObjectURL(new Blob([o],{type:ga})),a=document.createElement("a");a.href=I,a.download=ta,a.style.display="none",document.body.append(a),a.click(),a.remove(),URL.revokeObjectURL(I)},useScrollbackDownload=({scrollbackSession:e,visibleItems:t,isSearchActive:g,useVirtualizedLogs:n,fontFamily:C,fontSize:o})=>({handleDownload:(0,l.useCallback)(async()=>{let I=t;if(!g&&e?.readAll)try{const t=await e.readAll();t&&t.length>0&&(I=t)}catch(a){console.error("[nexGui4] Failed to read all lines for download",a)}downloadBuffer(I,n,{fontFamily:C,fontSize:o})},[C,o,g,e,n,t])}),ra=12,na=18,Aa={height:"--nexgui4-scrollback-height",width:"--nexgui4-scrollback-width",x:"--nexgui4-scrollback-left",y:"--nexgui4-scrollback-top"},Ca=[{direction:"n",sx:{cursor:"n-resize",height:ra,left:na,right:na,top:-6}},{direction:"s",sx:{bottom:-6,cursor:"s-resize",height:ra,left:na,right:na}},{direction:"e",sx:{bottom:na,cursor:"e-resize",right:-6,top:na,width:ra}},{direction:"w",sx:{bottom:na,cursor:"w-resize",left:-6,top:na,width:ra}},{direction:"ne",sx:{cursor:"ne-resize",height:na,right:-6,top:-6,width:na}},{direction:"nw",sx:{cursor:"nw-resize",height:na,left:-6,top:-6,width:na}},{direction:"se",sx:{bottom:-6,cursor:"se-resize",height:na,right:-6,width:na}},{direction:"sw",sx:{bottom:-6,cursor:"sw-resize",height:na,left:-6,width:na}}],areScrollbackGeometriesEqual=(e,t)=>e?.x===t?.x&&e?.y===t?.y&&e?.width===t?.width&&e?.height===t?.height,getScrollbackPaperGeometryStyle=e=>({[Aa.height]:`${e.height}px`,[Aa.width]:`${e.width}px`,[Aa.x]:`${e.x}px`,[Aa.y]:`${e.y}px`}),applyScrollbackPaperGeometry=(e,t)=>{e&&t&&Object.entries(getScrollbackPaperGeometryStyle(t)).forEach(([t,g])=>{e.style.setProperty(t,g)})},useScrollbackGeometry=({initialGeometry:e,persistGeometry:t,contentRef:g})=>{const n=(0,l.useRef)(null),C=(0,l.useRef)(e),o=(0,l.useRef)(e),[I,a]=(0,l.useState)(()=>getScrollbackPaperGeometryStyle(e)),i=(0,l.useCallback)(()=>n.current??g.current?.closest('[data-testid="scrollback-dialog-paper"]')??g.current?.closest(".MuiDialog-paper")??null,[g]),s=(0,l.useCallback)(e=>{const t=normalizeScrollbackGeometry("function"==typeof e?e(o.current):e);return o.current=t,applyScrollbackPaperGeometry(i(),t),t},[i]),c=(0,l.useCallback)(e=>{const t=s(e);return areScrollbackGeometriesEqual(C.current,t)||(C.current=t,a(getScrollbackPaperGeometryStyle(t))),t},[s]),u=(0,l.useCallback)((e,g)=>{const n=document.body.style.userSelect;document.body.style.userSelect="none";const handlePointerMove=e=>{g(e)},handlePointerUp=()=>{document.body.style.userSelect=n,document.removeEventListener("pointermove",handlePointerMove),document.removeEventListener("pointerup",handlePointerUp),t(c(o.current))};document.addEventListener("pointermove",handlePointerMove),document.addEventListener("pointerup",handlePointerUp),e.currentTarget.setPointerCapture?.(e.pointerId)},[c,t]);return{paperRef:n,paperGeometryStyle:I,handleDragPointerDown:(0,l.useCallback)(e=>{if(0!==e.button)return;e.preventDefault();const t=o.current,g=e.clientX-t.x,n=e.clientY-t.y;u(e,e=>{s({...t,x:e.clientX-g,y:e.clientY-n})})},[s,u]),handleResizePointerDown:(0,l.useCallback)(e=>t=>{if(0!==t.button)return;t.preventDefault(),t.stopPropagation();const g=o.current,n=t.clientX,C=t.clientY,I=g.x+g.width,a=g.y+g.height,i=getMinimumScrollbackGeometry();u(t,t=>{let o=g;if(e.includes("e")&&(o={...o,width:clampScrollbackGeometryValue(g.width+(t.clientX-n),i.width,getScrollbackViewportBounds().width-g.x)}),e.includes("s")&&(o={...o,height:clampScrollbackGeometryValue(g.height+(t.clientY-C),i.height,getScrollbackViewportBounds().height-g.y)}),e.includes("w")){const e=clampScrollbackGeometryValue(g.x+(t.clientX-n),0,I-i.width);o={...o,x:e,width:I-e}}if(e.includes("n")){const e=clampScrollbackGeometryValue(g.y+(t.clientY-C),0,a-i.height);o={...o,y:e,height:a-e}}s(o)})},[s,u]),reaffirmCommittedGeometry:(0,l.useCallback)(()=>{c(e=>e)},[c])}},oa={id:Yn.default.number.isRequired,html:Yn.default.string.isRequired,timestamp:Yn.default.string.isRequired,isPrompt:Yn.default.bool.isRequired,isMonospace:Yn.default.bool.isRequired,shouldLog:Yn.default.bool.isRequired},Ia=Yn.default.exact(oa),buildLineClassName=e=>["nexgui4-virtual-scroll-line",e.isPrompt?"prompt textline":"textline",e.isMonospace?"mono":null,e.shouldLog?"nexguilog":null].filter(Boolean).join(" "),VirtualScrollLineComponent=({fontFamily:e,line:t,isActiveMatch:g=!1,timestampClassName:n,showTimestamp:C=!0})=>React.createElement("div",{className:buildLineClassName(t)},C?React.createElement(aA,{fontFamily:e,timestamp:t.timestamp,highlight:g,className:n}):null,React.createElement("span",{className:"nexgui4-virtual-scroll-line__payload",dangerouslySetInnerHTML:{__html:t.html}}));VirtualScrollLineComponent.displayName="VirtualScrollLine",VirtualScrollLineComponent.propTypes={fontFamily:Yn.default.string,isActiveMatch:Yn.default.bool,line:Ia.isRequired,showTimestamp:Yn.default.bool,timestampClassName:Yn.default.string};var areVirtualScrollLinePropsEqual=(e,t)=>e.line.id===t.line.id&&e.fontFamily===t.fontFamily&&e.showTimestamp===t.showTimestamp&&e.isActiveMatch===t.isActiveMatch&&e.timestampClassName===t.timestampClassName,aa=(0,l.memo)(VirtualScrollLineComponent,areVirtualScrollLinePropsEqual);aa.displayName="VirtualScrollLine",aa.propTypes=VirtualScrollLineComponent.propTypes;var ia=Yn.default.oneOfType([Ia,Yn.default.oneOf([null])]),PromptLineComponent=({fontFamily:e,promptLine:t=null,show:g=!1,showTimestamp:n=!0,timestampClassName:C})=>g&&t?React.createElement("div",{className:"nexgui4-prompt-line"},React.createElement(aa,{fontFamily:e,line:t,showTimestamp:n,timestampClassName:C})):null;PromptLineComponent.displayName="PromptLine",PromptLineComponent.propTypes={fontFamily:Yn.default.string,promptLine:ia,show:Yn.default.bool.isRequired,showTimestamp:Yn.default.bool,timestampClassName:Yn.default.string};var sa=(0,l.memo)(PromptLineComponent);sa.displayName="PromptLine",sa.propTypes=PromptLineComponent.propTypes;var la="mixed",ca="single-line",noop$1=()=>{},ua=Yn.default.oneOfType([Ia,Yn.default.oneOf([null])]),estimateLineSize=(e,t)=>t===ca?Math.ceil(1.25*e):1.5*e+26,VirtualScrollBufferComponent=({items:e,promptLine:t=null,showPromptInline:g=!0,showTimestamp:n=!0,onSendCommand:C=noop$1,fontFamily:o=Ee,fontSize:I=14,itemKeyVersion:a=null,border:i=!0,onRequestScrollback:s=noop$1,onScrollLockChange:c=noop$1,activeMatchIndex:u=-1,timestampClassName:d,estimateSizeMode:p=la,overscan:m=5,renderItem:h},y)=>{const b=parseFontSize(I,14),v=(0,l.useCallback)(()=>estimateLineSize(b,p),[p,b]),x=(0,l.useCallback)((e,t)=>e?.id??t,[]),S=i?null:`${e.length}:${e.at(-1)?.id??""}:${g?"":t?.id??""}`,w=(0,l.useCallback)((e,{isActiveMatch:t})=>React.createElement(aa,{fontFamily:o,line:e,isActiveMatch:t,showTimestamp:n,timestampClassName:d}),[o,n,d]);return React.createElement(IA,{ref:y,activeMatchIndex:u,border:i,displayPinKey:S,estimateSize:v,fontFamily:o,fontSize:I,footer:React.createElement(sa,{fontFamily:o,promptLine:t,show:Boolean(t)&&!g,showTimestamp:n,timestampClassName:d}),getItemKey:x,itemKeyVersion:a,items:e,mode:i?"panel":"display",onRequestHistory:s,onSendCommand:C,onScrollLockChange:c,overscan:m,renderItem:h??w,showScrollLockBadge:i})};VirtualScrollBufferComponent.displayName="VirtualScrollBuffer",VirtualScrollBufferComponent.propTypes={activeMatchIndex:Yn.default.number,border:Yn.default.bool,estimateSizeMode:Yn.default.oneOf([la,ca]),fontFamily:Yn.default.string,fontSize:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),itemKeyVersion:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),items:Yn.default.arrayOf(Ia).isRequired,onRequestScrollback:Yn.default.func,onScrollLockChange:Yn.default.func,onSendCommand:Yn.default.func,overscan:Yn.default.number,promptLine:ua,renderItem:Yn.default.func,showPromptInline:Yn.default.bool,showTimestamp:Yn.default.bool,timestampClassName:Yn.default.string};var da=(0,l.forwardRef)(VirtualScrollBufferComponent);da.displayName="VirtualScrollBuffer",da.propTypes=VirtualScrollBufferComponent.propTypes;var pa=Yn.default.oneOfType([Ia,Yn.default.oneOf([null])]),noop=()=>{},ma=.8,fa=1,ha=2,ya=48,ba="nexgui4-scrollback-timestamp ng-timestamp timestamp mono no_out",resolveCssFontSize=e=>null==e?"14px":"number"==typeof e?`${e}px`:String(e),getScrollbackWheelDeltaPixels=(e,t)=>{const g=Number(e?.deltaY);if(!Number.isFinite(g)||0===g)return 0;if(e?.deltaMode===fa)return g*ya;if(e?.deltaMode===ha){const e=Number(t?.clientHeight);return g*Math.max(0,Number.isFinite(e)?e:0)*ma}return g},resolveDialogSurfaceBackground=e=>e.nexGui?.tokens?.background?.modal??e.palette.background.paper,resolveModalBackground=e=>e.palette.common.black,resolveHeaderBackground=e=>e.nexGui?.tokens?.background?.header??e.palette.background.default,va=(0,l.memo)(({isEndpoint:e,inRange:t,onClick:g})=>React.createElement(Wn,{"aria-label":"Select line for copy range",component:"button",onClick:g,sx:g=>({alignSelf:"flex-start",bgcolor:e?g.palette.primary.main:"transparent",borderRadius:"50%",borderStyle:"solid",borderWidth:2,borderColor:e?g.palette.primary.main:g.palette.divider,boxSizing:"border-box",cursor:"pointer",display:"block",flexShrink:0,height:12,lineHeight:1,mr:"6px",mt:"2px",opacity:e?1:t?.6:.25,outline:"none",p:0,transition:"opacity 0.12s, background-color 0.12s, border-color 0.12s",width:12,"&:hover":{borderColor:g.palette.primary.main,opacity:1},"&:focus-visible":{outline:`2px solid ${g.palette.primary.main}`,outlineOffset:2}})}));va.displayName="SelectionBubble",va.propTypes={inRange:Yn.default.bool.isRequired,isEndpoint:Yn.default.bool.isRequired,onClick:Yn.default.func.isRequired};var ScrollbackModalDialog=({open:e,onClose:t,items:g,filteredItems:n=g,itemKeyVersion:C=null,scrollbackSession:o=null,promptLine:I=null,onSendCommand:a=noop,fontFamily:i=Ee,fontSize:s=14,showTimestamp:c=!0})=>{const[u,d]=(0,l.useState)(!0),[p,m]=(0,l.useState)(c),[h,y]=(0,l.useState)(!1),{focusHostInput:b,initialGeometry:v,persistGeometry:x,useVirtualizedLogs:S}=useScrollbackLayout(),w=(0,l.useRef)(null),E=(0,l.useRef)(null),R=(0,l.useCallback)(()=>E.current?.querySelector('[data-testid="virtual-scroll-viewport"]')??null,[]),M=(0,l.useCallback)(e=>{e.dispatchEvent(new Event("scroll",{bubbles:!0}))},[]),T=(0,l.useCallback)(e=>{const t=R();if(!t)return!1;const g=Math.max(0,t.scrollHeight-t.clientHeight);return t.scrollTop=clampScrollbackGeometryValue(t.scrollTop+e,0,g),!0},[R]),P=(0,l.useCallback)(()=>{const e=R();e?(e.scrollTop=e.scrollHeight,M(e)):w.current?.scrollToBottom?.(),y(!1)},[M,R]),N=(0,l.useCallback)(e=>{e<0||(w.current?.scrollToIndex?.(e,{align:"center"}),y(!0))},[]),{hydratedItems:D,isLoadingMore:O}=useScrollbackHydration({items:g,open:e,scrollbackSession:o,getViewportElement:R,dispatchViewportScroll:M,setScrollLock:y}),{paperRef:j,paperGeometryStyle:G,handleDragPointerDown:L,handleResizePointerDown:B,reaffirmCommittedGeometry:F}=useScrollbackGeometry({initialGeometry:v,persistGeometry:x,contentRef:E}),{searchBarText:W,searchResults:V,isSearchActive:U,searchCursor:K,searchStatusText:H,hasNoMatch:Y,resetSearch:Z,handleSearchInput:Q,handleSearchKeyDown:X}=useScrollbackSearch({scrollbackSession:o,open:e,showPrompts:u,onCursorChange:N}),_=(0,l.useMemo)(()=>U?V:u?D:D.filter(e=>!e.isPrompt),[D,U,V,u]),q=U?K:-1,J=resolveCssFontSize(s),{selectionA:$,selectionB:ee,selectedRangeItems:te,copyConfirmed:ge,handleLineSelect:re,handleCopyRange:ne,isLineSelected:Ae}=useScrollbackSelection({visibleItems:_}),{handleDownload:Ce}=useScrollbackDownload({scrollbackSession:o,visibleItems:_,isSearchActive:U,useVirtualizedLogs:S,fontFamily:i,fontSize:s}),oe=(0,l.useCallback)((e,{isActiveMatch:t})=>{const{isEndpoint:g,inRange:n}=Ae(e.id);return React.createElement(Wn,{sx:e=>({alignItems:"flex-start",bgcolor:n?g?e.palette.action.selected:e.palette.action.hover:void 0,display:"flex"})},React.createElement(va,{isEndpoint:g,inRange:n,onClick:()=>re(e.id)}),React.createElement(Wn,{sx:{flex:1,minWidth:0}},React.createElement(aa,{fontFamily:i,isActiveMatch:t,line:e,showTimestamp:p,timestampClassName:ba})))},[i,re,Ae,p]);(0,l.useEffect)(()=>{h||Z()},[Z,h]),(0,l.useEffect)(()=>{e?F():y(!1)},[e,F]),(0,l.useEffect)(()=>{if(!e)return;const t=R();if(!t)return;const handleWheel=e=>{if(e.ctrlKey)return;const g=getScrollbackWheelDeltaPixels(e,t);0!==g&&(e.preventDefault(),e.stopPropagation(),T(g))};return t.addEventListener("wheel",handleWheel,{passive:!1}),()=>{t.removeEventListener("wheel",handleWheel)}},[R,e,T]),(0,l.useEffect)(()=>{if(!e)return;const handleWindowKeyDown=e=>"PageUp"===e.key?(e.preventDefault(),e.stopPropagation(),void T(-(R()?.clientHeight??0)*ma)):"PageDown"===e.key?(e.preventDefault(),e.stopPropagation(),void T((R()?.clientHeight??0)*ma)):void("Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),t(),window.setTimeout(()=>{b()},0)));return window.addEventListener("keydown",handleWindowKeyDown,!0),()=>{window.removeEventListener("keydown",handleWindowKeyDown,!0)}},[b,R,t,e,T]);const Ie=(0,l.useCallback)((e,t)=>{d(t)},[]),ae=(0,l.useCallback)((e,t)=>{m(t)},[]),ie=(0,l.useCallback)(()=>{P()},[P]),se=(0,l.useCallback)((e,g)=>{"backdropClick"!==g&&(t(),window.setTimeout(()=>{b()},0))},[b,t]),le=o?.getStats?.(),ce=U?_.length:le?.searchLineCount??_.length;return React.createElement(bo,{open:e,onClose:se,disableEnforceFocus:!0,disableAutoFocus:!0,maxWidth:!1,sx:e=>({pointerEvents:"auto",zIndex:e.zIndex.modal+10,"& .MuiDialog-container":{alignItems:"flex-start",justifyContent:"flex-start",pointerEvents:"none"},"& .MuiDialogTitle-root":{cursor:"grab",fontFamily:i,fontSize:J,userSelect:"none"},"& .MuiDialogTitle-root:active":{cursor:"grabbing"},"& .MuiButton-root, & .MuiInputBase-root, & .MuiInputLabel-root":{fontFamily:i,fontSize:J}}),slotProps:{backdrop:{invisible:!0},paper:{"data-testid":"scrollback-dialog-paper",ref:j,style:G,sx:e=>({backgroundImage:"none",backgroundColor:resolveDialogSurfaceBackground(e),border:1,borderColor:"divider",boxShadow:24,color:"text.primary",isolation:"isolate",position:"fixed",pointerEvents:"auto",left:`var(${Aa.x})`,top:`var(${Aa.y})`,width:`var(${Aa.width})`,height:`var(${Aa.height})`,m:0,maxWidth:"none",maxHeight:"none",display:"flex",flexDirection:"column",fontFamily:i,fontSize:J,overflow:"hidden",zIndex:e.zIndex.modal+11})}}},React.createElement(ko,{onPointerDown:L,sx:e=>({backgroundColor:resolveHeaderBackground(e),borderBottom:1,borderColor:"divider",backgroundImage:"none",p:1,touchAction:"none"})},"Scrollback Buffer"),React.createElement(Eo,{ref:E,sx:e=>({backgroundColor:resolveModalBackground(e),backgroundImage:"none",color:"text.primary",display:"flex",flex:1,minHeight:0,overflow:"hidden",p:0,position:"relative"})},O?React.createElement(Wn,{sx:{position:"absolute",top:8,left:"50%",transform:"translateX(-50%)",zIndex:10,backgroundColor:"rgba(0, 0, 0, 0.7)",borderRadius:"4px",padding:"4px 8px",display:"flex",alignItems:"center",gap:"8px",color:"primary.main",fontSize:"0.75rem",border:"1px solid",borderColor:"divider"}},React.createElement(no,{size:12,thickness:5}),"Loading history..."):null,React.createElement(da,{activeMatchIndex:q,border:!0,fontFamily:i,fontSize:s,itemKeyVersion:C,items:_,onSendCommand:a,onScrollLockChange:y,promptLine:I,ref:w,renderItem:oe,showPromptInline:!0,showTimestamp:p,timestampClassName:ba})),React.createElement(xo,null,React.createElement(_I,{size:"small",label:"Search",value:W,onInput:Q,onKeyDown:X,error:Y,slotProps:{htmlInput:{"aria-label":"Search scrollback"}},sx:{width:"20ch"}}),H?React.createElement(Wn,{"aria-live":"polite",component:"div",role:"status",sx:e=>({color:Y?e.palette.error.main:e.palette.text.secondary,fontSize:e.typography.pxToRem(12),lineHeight:1.2,whiteSpace:"nowrap"})},H):null,React.createElement(Wn,{sx:{flex:1}}),React.createElement(Do,{control:React.createElement(Vo,{checked:u,onChange:Ie,size:"small"}),label:"Show Prompts",sx:{mr:1,userSelect:"none"}}),React.createElement(Do,{control:React.createElement(Vo,{checked:p,onChange:ae,size:"small"}),label:"Show Timestamps",sx:{mr:1,userSelect:"none"}}),null!=te?React.createElement(uo,{color:ge?"success":"primary",onClick:ne,size:"small",variant:"outlined"},ge?"Copied!":`Copy (${te.length})`):null,h?React.createElement(uo,{onClick:ie,size:"small",variant:"outlined"},"Bottom"):null,React.createElement(uo,{onClick:Ce,size:"small",variant:"outlined"},"Download (#",ce,")"),React.createElement(uo,{onClick:se,size:"small"},"Close")),Ca.map(e=>React.createElement(Wn,{component:"span","data-testid":`scrollback-resize-handle-${e.direction}`,key:e.direction,onPointerDown:B(e.direction),sx:{position:"absolute",touchAction:"none",zIndex:2,...e.sx}})))};ScrollbackModalDialog.displayName="ScrollbackModalDialog";var xa={fontFamily:Yn.default.string,fontSize:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),filteredItems:Yn.default.arrayOf(Ia),itemKeyVersion:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),scrollbackSession:Yn.default.object,items:Yn.default.arrayOf(Ia).isRequired,onClose:Yn.default.func.isRequired,onSendCommand:Yn.default.func,open:Yn.default.bool.isRequired,promptLine:pa,showTimestamp:Yn.default.bool};ScrollbackModalDialog.propTypes=xa;var ScrollbackModalComponent=e=>e.open?React.createElement(ScrollbackModalDialog,e):null;ScrollbackModalComponent.displayName="ScrollbackModal",ScrollbackModalComponent.propTypes=xa;var Sa=(0,l.memo)(ScrollbackModalComponent);Sa.displayName="ScrollbackModal",Sa.propTypes=ScrollbackModalComponent.propTypes;var identity=e=>e,useHostDisplaySetting=(e=identity,t=Object.is)=>{const{hostDisplaySettingsModel:g}=useNexGui();if(!g||"function"!=typeof g.subscribe||"function"!=typeof g.getSnapshot)throw new Error("useHostDisplaySetting requires NexGuiContext hostDisplaySettingsModel with subscribe(listener) and getSnapshot().");const n=(0,l.useMemo)(()=>{let n=e(g.getSnapshot());const getSnapshot=()=>{const C=e(g.getSnapshot());return t(n,C)||(n=C),n},subscribe=C=>g.subscribe(()=>{const o=e(g.getSnapshot());t(n,o)||(n=o,C())});return Object.freeze({getSnapshot,subscribe})},[g,t,e]);return(0,l.useSyncExternalStore)(n.subscribe,n.getSnapshot,n.getSnapshot)},useHostDisplaySettings=()=>useHostDisplaySetting(),wa=Object.freeze({}),Ea=Object.freeze({}),createHostBridge=e=>Object.freeze({getSettings:()=>e?.getHostSettings?.()??wa,setSetting:(t,g)=>{e?.setHostSetting?.(t,g)},getLayoutSnapshot:()=>e?.getHostLayoutSnapshot?.()??Ea,updateLayoutAttributes:t=>{e?.updateHostLayoutAttributes?.(t)},focusInput:()=>{e?.focusInput?.()}}),useHostBridge=()=>{const{adapter:e}=useNexGui();return(0,l.useMemo)(()=>createHostBridge(e),[e])},useHostFocus=()=>{const e=useHostBridge();return(0,l.useCallback)(()=>{e.focusInput()},[e])},Ra=new WeakMap,assertStreamModel=e=>{if(!e||"function"!=typeof e.subscribe||"function"!=typeof e.getSnapshot)throw new Error("useStream requires NexGuiContext streamModel with subscribe(listener) and getSnapshot().")},getStreamModelBindings=e=>{assertStreamModel(e);let t=Ra.get(e);if(!t){const subscribe=t=>e.subscribe(t),getSnapshot=()=>e.getSnapshot();t=Object.freeze({subscribe,getSnapshot}),Ra.set(e,t)}return t},useStreamSnapshot=()=>{const{streamModel:e}=useNexGui(),{subscribe:t,getSnapshot:g}=getStreamModelBindings(e);return(0,l.useSyncExternalStore)(t,g,g)},selectUiSlice=e=>({activeTab:e.activeTab,modalOpen:e.modalOpen,setActiveTab:e.setActiveTab,openModal:e.openModal,closeModal:e.closeModal}),useUi=()=>{const{stores:e}=useNexGui();return e.ui(useShallow(selectUiSlice))},ka="scrollback",getPromptShownTailStartIndex=(e,t,g)=>{const n=Math.max(0,e.length-g);let C=0;for(let o=e.length-1;o>=n;o--)if(!e[o]?.isPrompt&&(C++,C===t))return o;return n},selectMainDisplayLiveTailItems=({allItems:e,filteredItems:t,showPrompts:g,nonPromptLimit:n=100,totalItemLimit:C=100})=>{const o=g?e:t;if(o.length<=n)return o;if(!g)return o.slice(-n);const I=getPromptShownTailStartIndex(o,n,C);return 0===I?o:o.slice(I)},useMainDisplayViewModel=()=>{const{adapter:e,scrollbackSession:t}=useNexGui(),g=useHostFocus(),{showPrompts:n,showTimestamps:C}=useHostDisplaySettings(),{buffer:o,filteredBuffer:I,promptLine:a,version:i}=useStreamSnapshot(),{modalOpen:s,openModal:c,closeModal:u}=useUi(),d=(0,l.useMemo)(()=>selectMainDisplayLiveTailItems({allItems:o,filteredItems:I,showPrompts:n}),[o,I,n]),p=n?null:a,m=d.at(-1),h=`${n?"all":"filtered"}:${d.length}:${m?.id??"none"}`,y=(0,l.useCallback)(()=>{s!==ka&&c(ka)},[s,c]),b=(0,l.useCallback)(()=>{u()},[u]),v=(0,l.useCallback)(t=>{e?.send?.(t)},[e]);return{allItems:o,closeScrollback:b,displayItems:d,displayItemKeyVersion:h,displayPromptLine:p,filteredItems:I,focusHostInput:g,openScrollback:y,promptLine:a,scrollbackOpen:s===ka,sendCommand:v,showTimestamps:C,scrollbackItemKeyVersion:i,scrollbackSession:t}},selectThemeSlice=e=>({tokens:e.tokens,updateTokens:e.updateTokens,resetTokens:e.resetTokens}),useTheme=()=>{const{stores:e}=useNexGui(),t=e.theme(useShallow(selectThemeSlice)),g=(0,l.useMemo)(()=>createMuiTheme(t.tokens),[t.tokens]);return(0,l.useMemo)(()=>({...t,theme:g}),[t,g])},Ma="nexgui4-main-display-timestamp ng-timestamp timestamp mono no_out",Ta=10,MainDisplayInner=()=>{const e=(0,l.useRef)(null),{tokens:t}=useTheme(),{allItems:g,closeScrollback:n,displayItems:C,displayItemKeyVersion:o,displayPromptLine:I,filteredItems:a,focusHostInput:i,openScrollback:s,promptLine:c,scrollbackItemKeyVersion:u,scrollbackOpen:d,scrollbackSession:p,sendCommand:m,showTimestamps:h}=useMainDisplayViewModel(),y=t.theme.displayFontFamily,b=t.theme.displayFontSize,v=(0,l.useCallback)(()=>{s()},[s]),x=(0,l.useCallback)(()=>{n(),e.current?.scrollToBottom(),i()},[n,i]);return React.createElement(Wn,{className:"main-display main-display__content",sx:{display:"flex",flex:1,minHeight:0,minWidth:0,overflow:"hidden",position:"relative",width:"100%"}},React.createElement(Wn,{"data-testid":"main-display-buffer",sx:{display:"flex",flex:1,minHeight:0,position:"relative"}},React.createElement(da,{ref:e,border:!1,estimateSizeMode:"single-line",fontFamily:y,fontSize:b,itemKeyVersion:o,items:C,onRequestScrollback:v,onSendCommand:m,overscan:Ta,promptLine:I,showPromptInline:!1,showTimestamp:h,timestampClassName:Ma})),React.createElement(Sa,{fontFamily:y,fontSize:b,filteredItems:a,items:g,itemKeyVersion:u,scrollbackSession:p,onClose:x,onSendCommand:m,open:d,promptLine:c,showTimestamp:h}))};MainDisplayInner.displayName="MainDisplayInner";var MainDisplay=()=>React.createElement(Jn,{panelName:"Main Display"},React.createElement(MainDisplayInner,null));function getLinearProgressUtilityClass(e){return generateUtilityClass("MuiLinearProgress",e)}MainDisplay.displayName="MainDisplay",generateUtilityClasses("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","bar","bar1","bar2"]);var Pa=4,Na=keyframes`
102
102
  0% {
103
103
  left: -35%;
104
104
  right: 100%;
@@ -149,4 +149,4 @@
149
149
  }
150
150
  `,Ga="string"!=typeof za?css`
151
151
  animation: ${za} 3s infinite linear;
152
- `:null,useUtilityClasses$6=e=>{const{classes:t,variant:g,color:n}=e;return composeClasses({root:["root",`color${Qn(n)}`,g],dashed:["dashed"],bar1:["bar","bar1"],bar2:["bar","bar2","buffer"===g&&`color${Qn(n)}`]},getLinearProgressUtilityClass,t)},getColorShade=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.5),La=On("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,t[`color${Qn(g.color)}`],t[g.variant]]}})(Vn(({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{backgroundColor:getColorShade(e,t)}})),{props:({ownerState:e})=>"inherit"===e.color&&"buffer"!==e.variant,style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),Ba=On("span",{name:"MuiLinearProgress",slot:"Dashed"})(Vn(({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>{const g=getColorShade(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${g} 0%, ${g} 16%, transparent 42%)`}}})]})),Ga||{animation:`${za} 3s infinite linear`}),Fa=On("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>[t.bar,t.bar1]})(Vn(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:"determinate"},style:{transition:`transform .${Pa}s linear`}},{props:{variant:"buffer"},style:{zIndex:1,transition:`transform .${Pa}s linear`}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:Da||{animation:`${Na} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),Wa=On("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>[t.bar,t.bar2]})(Vn(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"!==e.color,style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"===e.color,style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:getColorShade(e,t),transition:`transform .${Pa}s linear`}})),{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:ja||{animation:`${Oa} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),Va=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiLinearProgress"}),{className:n,color:C="primary",max:I,min:o,value:a,valueBuffer:i,variant:s="indeterminate",...l}=g,c={...g,color:C,variant:s},u=o??0,d=I??100,p=useUtilityClasses$6(c),m=useRtl(),h={},y={bar1:{},bar2:{}};if(("determinate"===s||"buffer"===s)&&void 0!==a){const e=d-u;let t=(a-u)/e*100-100;m&&(t=-t),y.bar1.transform=e>0?`translateX(${t}%)`:"translateX(-100%)",h["aria-valuenow"]=a,h["aria-valuemin"]=u,h["aria-valuemax"]=d}if("buffer"===s&&void 0!==i){const e=d-u;let t=(i-u)/e*100-100;m&&(t=-t),y.bar2.transform=e>0?`translateX(${t}%)`:"translateX(-100%)"}return(0,gr.jsxs)(La,{className:clsx(p.root,n),ownerState:c,role:"progressbar",...h,ref:t,...l,children:["buffer"===s?(0,gr.jsx)(Ba,{className:p.dashed,ownerState:c}):null,(0,gr.jsx)(Fa,{className:p.bar1,ownerState:c,style:y.bar1}),"determinate"===s?null:(0,gr.jsx)(Wa,{className:p.bar2,ownerState:c,style:y.bar2})]})});function getTabUtilityClass(e){return generateUtilityClass("MuiTab",e)}var Ua=generateUtilityClasses("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","icon"]),useUtilityClasses$5=e=>{const{classes:t,textColor:g,fullWidth:n,wrapped:C,icon:I,label:o,selected:a,disabled:i}=e;return composeClasses({root:["root",I&&o&&"labelIcon",`textColor${Qn(g)}`,n&&"fullWidth",C&&"wrapped",a&&"selected",i&&"disabled"],icon:["icon"]},getTabUtilityClass,t)},Ka=On(OC,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.label&&g.icon&&t.labelIcon,t[`textColor${Qn(g.textColor)}`],g.fullWidth&&t.fullWidth,g.wrapped&&t.wrapped,{[`& .${Ua.icon}`]:t.icon}]}})(Vn(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&("top"===e.iconPosition||"bottom"===e.iconPosition),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&"top"!==e.iconPosition&&"bottom"!==e.iconPosition,style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"top"===t,style:{[`& > .${Ua.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${Ua.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${Ua.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${Ua.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Ua.selected}`]:{opacity:1},[`&.${Ua.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Ua.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Ua.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Ua.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Ua.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),Ha=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiTab"}),{className:n,disabled:C=!1,disableFocusRipple:I=!1,fullWidth:o,icon:a,iconPosition:i="top",indicator:s,label:c,onChange:u,onClick:d,onFocus:p,selected:m,selectionFollowsFocus:h,textColor:y="inherit",value:b,wrapped:v=!1,...x}=g,S=useRovingTabIndexContext(),w=useRovingTabIndexItem({id:b,ref:t,disabled:C,selected:m}),E=0===S.getItemMap().size&&m?0:w.tabIndex,R={...g,disabled:C,disableFocusRipple:I,selected:m,icon:!!a,iconPosition:i,label:!!c,fullWidth:o,textColor:y,wrapped:v},M=useUtilityClasses$5(R),T=a&&c&&l.isValidElement(a)?l.cloneElement(a,{className:clsx(M.icon,a.props.className)}):a,handleClick=e=>{!m&&u&&u(e,b),d&&d(e)},handleFocus=e=>{h&&!m&&u&&u(e,b),p&&p(e)};return(0,gr.jsxs)(Ka,{internalNativeButton:!0,focusRipple:!I,className:clsx(M.root,n),ref:w.ref,role:"tab","aria-selected":m,disabled:C,onClick:handleClick,onFocus:handleFocus,tabIndex:E,ownerState:R,...x,children:["top"===i||"start"===i?(0,gr.jsxs)(l.Fragment,{children:[T,c]}):(0,gr.jsxs)(l.Fragment,{children:[c,T]}),s]})});function easeInOutSin(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function animate(e,t,g,n={},C=()=>{}){const{ease:I=easeInOutSin,duration:o=300}=n;let a=null;const i=t[e];let s=!1;const cancel=()=>{s=!0},step=n=>{if(s)return void C(new Error("Animation cancelled"));null===a&&(a=n);const l=Math.min(1,(n-a)/o);t[e]=I(l)*(g-i)+i,l>=1?requestAnimationFrame(()=>{C(null)}):requestAnimationFrame(step)};return i===g?(C(new Error("Element already at target position")),cancel):(requestAnimationFrame(step),cancel)}var Ya={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll",pointerEvents:"none"};function ScrollbarSize(e){const{onChange:t,...g}=e,n=l.useRef(),C=l.useRef(null),setMeasurements=()=>{n.current=C.current.offsetHeight-C.current.clientHeight};return RA(()=>{const e=zA(()=>{const e=n.current;setMeasurements(),e!==n.current&&t(n.current)}),g=kA(C.current);return g.addEventListener("resize",e),()=>{e.clear(),g.removeEventListener("resize",e)}},[t]),l.useEffect(()=>{setMeasurements(),t(n.current)},[t]),(0,gr.jsx)("div",{style:Ya,...g,ref:C})}var Za=createSvgIcon((0,gr.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Qa=createSvgIcon((0,gr.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function getTabScrollButtonUtilityClass(e){return generateUtilityClass("MuiTabScrollButton",e)}var Xa=generateUtilityClasses("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),useUtilityClasses$4=e=>{const{classes:t,orientation:g,disabled:n}=e;return composeClasses({root:["root",g,n&&"disabled"]},getTabScrollButtonUtilityClass,t)},_a=On(OC,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.orientation&&t[g.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${Xa.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),qa=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiTabScrollButton"}),{className:n,slots:C={},slotProps:I={},direction:o,orientation:a,disabled:i,...s}=g,{nativeButton:l,...c}=s,u=useRtl(),d={isRtl:u,...g},p=useUtilityClasses$4(d),m=C.StartScrollButtonIcon??Za,h=C.EndScrollButtonIcon??Qa,y=useSlotProps({elementType:m,externalSlotProps:I.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),b=useSlotProps({elementType:h,externalSlotProps:I.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return(0,gr.jsx)(_a,{component:"div",className:clsx(p.root,n),ref:t,role:null,ownerState:d,tabIndex:null,...c,style:{...c.style,..."vertical"===a&&{"--TabScrollButton-svgRotate":`rotate(${u?-90:90}deg)`}},children:"left"===o?(0,gr.jsx)(m,{...y}):(0,gr.jsx)(h,{...b})})});function getTabsUtilityClass(e){return generateUtilityClass("MuiTabs",e)}var Ja=generateUtilityClasses("MuiTabs",["root","vertical","list","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),useUtilityClasses$3=e=>{const{vertical:t,fixed:g,hideScrollbar:n,scrollableX:C,scrollableY:I,centered:o,scrollButtonsHideMobile:a,classes:i}=e;return composeClasses({root:["root",t&&"vertical"],scroller:["scroller",g&&"fixed",n&&"hideScrollbar",C&&"scrollableX",I&&"scrollableY"],list:["list",t&&"vertical",o&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[C&&"scrollableX"],hideScrollbar:[n&&"hideScrollbar"]},getTabsUtilityClass,i)},$a=On("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[{[`& .${Ja.scrollButtons}`]:t.scrollButtons},{[`& .${Ja.scrollButtons}`]:g.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,g.vertical&&t.vertical]}})(Vn(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${Ja.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),ei=On("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.scroller,g.fixed&&t.fixed,g.hideScrollbar&&t.hideScrollbar,g.scrollableX&&t.scrollableX,g.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),ti=On("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.list,g.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),gi=On("span",{name:"MuiTabs",slot:"Indicator"})(Vn(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),ri=On(ScrollbarSize)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),ni={},Ai=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiTabs"}),n=useTheme$1(),C=useRtl(),{"aria-label":I,"aria-labelledby":o,action:a,centered:i=!1,children:s,className:c,component:u="div",allowScrollButtonsMobile:d=!1,indicatorColor:p="primary",onChange:m,orientation:h="horizontal",scrollButtons:y="auto",selectionFollowsFocus:b,slots:v={},slotProps:x={},textColor:S="primary",value:w,variant:E="standard",visibleScrollbar:R=!1,...M}=g,T="scrollable"===E,P="vertical"===h,N=P?"scrollTop":"scrollLeft",D=P?"top":"left",O=P?"bottom":"right",j=P?"clientHeight":"clientWidth",G=P?"height":"width",L={...g,component:u,allowScrollButtonsMobile:d,indicatorColor:p,orientation:h,vertical:P,scrollButtons:y,textColor:S,variant:E,visibleScrollbar:R,fixed:!T,hideScrollbar:T&&!R,scrollableX:T&&!P,scrollableY:T&&P,centered:i&&!T,scrollButtonsHideMobile:!d},B=useUtilityClasses$3(L),F=useSlotProps({elementType:v.startScrollButtonIcon,externalSlotProps:x.startScrollButtonIcon,ownerState:L}),W=useSlotProps({elementType:v.endScrollButtonIcon,externalSlotProps:x.endScrollButtonIcon,ownerState:L}),[V,U]=l.useState(!1),[K,H]=l.useState(ni),[Y,Z]=l.useState(!1),[Q,X]=l.useState(!1),[_,q]=l.useState(!1),J=!1===w?null:w,[$,ee]=l.useState(!1),[te,ge]=l.useState({overflow:"hidden",scrollbarWidth:0}),re=new Map,ne=l.useRef(null),Ae=l.useRef(null),Ce={slots:v,slotProps:x},getTabsMeta=()=>{const e=ne.current;let t,g;if(e){const g=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:g.top,bottom:g.bottom,left:g.left,right:g.right}}if(e&&!1!==w){const e=Ae.current.children;if(e.length>0){const t=e[re.get(w)];g=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:g}},Ie=wA(()=>{const{tabsMeta:e,tabMeta:t}=getTabsMeta();let g,n=0;P?(g="top",t&&e&&(n=t.top-e.top+e.scrollTop)):(g=C?"right":"left",t&&e&&(n=(C?-1:1)*(t[g]-e[g]+e.scrollLeft)));const I={[g]:n,[G]:t?t[G]:0};if("number"!=typeof K[g]||"number"!=typeof K[G])H(I);else{const e=Math.abs(K[g]-I[g]),t=Math.abs(K[G]-I[G]);(e>=1||t>=1)&&H(I)}}),scroll=(e,{animation:t=!0}={})=>{t?animate(N,ne.current,e,{duration:n.transitions.duration.standard}):ne.current[N]=e},moveTabsScroll=e=>{let t=ne.current[N];t+=P?e:e*(C?-1:1),scroll(t)},getScrollSize=()=>{const e=ne.current[j];let t=0;const g=Array.from(Ae.current.children);for(let n=0;n<g.length;n+=1){const C=g[n];if(t+C[j]>e){0===n&&(t=e);break}t+=C[j]}return t},handleStartScrollClick=()=>{moveTabsScroll(-1*getScrollSize())},handleEndScrollClick=()=>{moveTabsScroll(getScrollSize())},[oe,{onChange:ae,...ie}]=useSlot("scrollbar",{className:clsx(B.scrollableX,B.hideScrollbar),elementType:ri,shouldForwardComponentProp:!0,externalForwardedProps:Ce,ownerState:L}),se=l.useCallback(e=>{ae?.(e),ge({overflow:null,scrollbarWidth:e})},[ae]),[le,ce]=useSlot("scrollButtons",{className:B.scrollButtons,elementType:qa,externalForwardedProps:Ce,ownerState:L,additionalProps:{orientation:h,slots:{StartScrollButtonIcon:v.startScrollButtonIcon,EndScrollButtonIcon:v.endScrollButtonIcon},slotProps:{startScrollButtonIcon:F,endScrollButtonIcon:W}}}),getConditionalElements=()=>{const e={};e.scrollbarSizeListener=T?(0,gr.jsx)(oe,{...ie,onChange:se}):null;const t=T&&("auto"===y&&(Y||Q)||!0===y);return e.scrollButtonStart=t?(0,gr.jsx)(le,{direction:C?"right":"left",onClick:handleStartScrollClick,disabled:!Y,...ce}):null,e.scrollButtonEnd=t?(0,gr.jsx)(le,{direction:C?"left":"right",onClick:handleEndScrollClick,disabled:!Q,...ce}):null,e},ue=wA(e=>{const{tabsMeta:t,tabMeta:g}=getTabsMeta();g&&t&&(g[D]<t[D]?scroll(t[N]+(g[D]-t[D]),{animation:e}):g[O]>t[O]&&scroll(t[N]+(g[O]-t[O]),{animation:e}))}),de=wA(()=>{T&&!1!==y&&q(!_)});l.useEffect(()=>{const e=zA(()=>{ne.current&&Ie()});let t;const handleMutation=g=>{g.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),de()},g=kA(ne.current);let n;return g.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(Ae.current.children).forEach(e=>{t.observe(e)})),"undefined"!=typeof MutationObserver&&(n=new MutationObserver(handleMutation),n.observe(Ae.current,{childList:!0})),()=>{e.clear(),g.removeEventListener("resize",e),n?.disconnect(),t?.disconnect()}},[Ie,de]),l.useEffect(()=>{const e=Array.from(Ae.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&T&&!1!==y){const g=e[0],n=e[t-1],C={root:ne.current,threshold:.99},I=new IntersectionObserver(e=>{Z(!e[0].isIntersecting)},C);I.observe(g);const o=new IntersectionObserver(e=>{X(!e[0].isIntersecting)},C);return o.observe(n),()=>{I.disconnect(),o.disconnect()}}},[T,y,_,s?.length]),l.useEffect(()=>{U(!0)},[]),l.useEffect(()=>{Ie()}),l.useEffect(()=>{ue(ni!==K)},[ue,K]),l.useImperativeHandle(a,()=>({updateIndicator:Ie,updateScrollButtons:de}),[Ie,de]);const[pe,me]=useSlot("indicator",{className:B.indicator,elementType:gi,externalForwardedProps:Ce,ownerState:L,additionalProps:{style:K}}),fe=(0,gr.jsx)(pe,{...me}),he=useRovingTabIndexRoot({activeItemId:$?void 0:J,orientation:h,isRtl:C}),ye=he.getContainerProps(),be=l.Children.toArray(s).filter(l.isValidElement).map((e,t)=>{const g=void 0===e.props.value?t:e.props.value;return re.set(g,t),{child:e,index:t,childValue:g}}).map(({child:e,childValue:t})=>{const g=t===w;return l.cloneElement(e,{fullWidth:"fullWidth"===E,indicator:g&&!V&&fe,selected:g,selectionFollowsFocus:b,onChange:m,textColor:S,value:t})}),ve=getConditionalElements(),[xe,Se]=useSlot("root",{ref:t,className:clsx(B.root,c),elementType:$a,externalForwardedProps:{...Ce,...M,component:u},ownerState:L}),[we,Ee]=useSlot("scroller",{ref:ne,className:B.scroller,elementType:ei,externalForwardedProps:Ce,ownerState:L,additionalProps:{style:{overflow:te.overflow,[P?"margin"+(C?"Left":"Right"):"marginBottom"]:R?void 0:-te.scrollbarWidth}}}),Re=EA(ye.ref,Ae),handleKeyDown=e=>{const t=Ae.current;"tab"===xA(vA(t))?.getAttribute("role")&&ye.onKeyDown(e)},[ke,Me]=useSlot("list",{ref:Re,className:B.list,elementType:ti,externalForwardedProps:Ce,ownerState:L,getSlotProps:e=>({...e,onBlur:t=>{bA(t.currentTarget,t.relatedTarget)||ee(!1),e.onBlur?.(t)},onKeyDown:t=>{handleKeyDown(t),e.onKeyDown?.(t)},onFocus:t=>{ee(!0),ye.onFocus(t),e.onFocus?.(t)}})});return(0,gr.jsxs)(xe,{...Se,children:[ve.scrollButtonStart,ve.scrollbarSizeListener,(0,gr.jsxs)(we,{...Ee,children:[(0,gr.jsx)(ke,{"aria-label":I,"aria-labelledby":o,"aria-orientation":"vertical"===h?"vertical":null,role:"tablist",...Me,children:(0,gr.jsx)(fA.Provider,{value:he,children:be})}),V&&fe]}),ve.scrollButtonEnd]})}),selectPlayStatsSlice=e=>({instance:e.instance,session:e.session,month:e.month,updateInstance:e.updateInstance,updateSession:e.updateSession,updateMonth:e.updateMonth,resetInstance:e.resetInstance}),usePlayStats=()=>{const{stores:e}=useNexGui();return e.playStats(useShallow(selectPlayStatsSlice))},Ci="metrics",Ii=Object.freeze(["instance","session","month"]),oi=Object.freeze({instance:"Instance",session:"Session",month:"Month"}),ai=1e3,ii=35e4,si=45e4,getFlipTransform$7=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},formatNumber$1=e=>e.toLocaleString("en-US"),formatPercent=e=>`${e.toFixed(2)}%`,formatElapsed=(e,t=Date.now())=>{const g=Math.max(0,t-e),n=Math.floor(g/1e3),C=Math.floor(n/3600),I=Math.floor(n%3600/60);return[C>0?`${C}h`:null,C>0||I>0?`${I}m`:null,n%60+"s"].filter(Boolean).join(" ")},formatPerHour=(e,t,g=Date.now())=>{const n=Math.max(0,g-t)/36e5,C=parseInt(e/n,10);return C>0?formatNumber$1(C):"0"},resolveActiveTabId$2=e=>"string"==typeof e&&Ii.includes(e)?e:"number"==typeof e?Ii[e]??"month":"month",li={kills:Yn.default.number.isRequired,goldGained:Yn.default.number.isRequired,xpPercent:Yn.default.number.isRequired,xpValue:Yn.default.number.isRequired,deaths:Yn.default.number.isRequired,startedAt:Yn.default.number.isRequired},ci=Yn.default.shape(li),ui=Yn.default.shape({...li,goldCap:Yn.default.number.isRequired,year:Yn.default.number,month:Yn.default.number}),StatTable=({rows:e})=>React.createElement(Wn,{component:"table",sx:{borderCollapse:"collapse","& td":{pb:.5,pr:2,verticalAlign:"top"},"& td:last-of-type":{fontVariantNumeric:"tabular-nums"}}},React.createElement("tbody",null,e.map((e,t)=>React.createElement("tr",{key:`${e.label}-${t}`},React.createElement("td",null,e.label),React.createElement("td",null,e.value)))));StatTable.displayName="MetricsPanelStatTable",StatTable.propTypes={rows:Yn.default.arrayOf(Yn.default.shape({label:Yn.default.string.isRequired,value:Yn.default.node.isRequired})).isRequired};var LinearProgressWithLabel=({label:e,value:t})=>React.createElement(Wn,{sx:{mt:2}},React.createElement(Wn,{sx:{fontSize:"9px",mb:.25}},e),React.createElement(Wn,{sx:{alignItems:"center",display:"flex"}},React.createElement(Wn,{sx:{mr:1,width:"100%"}},React.createElement(Va,{"aria-label":e,sx:{borderRadius:5,height:5},value:t,variant:"determinate"})),React.createElement(Wn,{sx:{minWidth:35}},React.createElement(qn,{color:"text.secondary",variant:"body2"},`${t}%`))));LinearProgressWithLabel.displayName="MetricsPanelLinearProgressWithLabel",LinearProgressWithLabel.propTypes={label:Yn.default.string.isRequired,value:Yn.default.number.isRequired};var MonthGoldCap=({goldCap:e})=>React.createElement(Wn,{sx:{mt:1}},React.createElement(LinearProgressWithLabel,{label:"Soft Gold Cap",value:e<=ii?parseInt(e/ii*100,10):100}),React.createElement(LinearProgressWithLabel,{label:"Hard Gold Cap",value:e<=si?parseInt(e/si*100,10):100}));MonthGoldCap.displayName="MetricsPanelMonthGoldCap",MonthGoldCap.propTypes={goldCap:Yn.default.number.isRequired};var ScopeContent=({now:e,onReset:t,scope:g,scopeKey:n})=>{const C=(0,l.useMemo)(()=>{const t=[{label:"Total Kills:",value:formatNumber$1(g.kills)},{label:"Total Gold:",value:formatNumber$1(g.goldGained)},{label:"Total XP:",value:formatPercent(g.xpPercent)},{label:"Total XP:",value:formatNumber$1(g.xpValue)},{label:"Total Deaths:",value:formatNumber$1(g.deaths)}];return"month"!==n?[...t,{label:"Time:",value:formatElapsed(g.startedAt,e)},{label:"XP/Hr:",value:formatPerHour(g.xpValue,g.startedAt,e)},{label:"Gold/Hr:",value:formatPerHour(g.goldGained,g.startedAt,e)}]:[...t,{label:"Gold Cap:",value:formatNumber$1(g.goldCap)}]},[e,g,n]);return React.createElement(Wn,null,React.createElement(StatTable,{rows:C}),"instance"===n?React.createElement(uI,{onClick:t,sx:{mt:1},variant:"outlined"},"Reset"):null,"month"===n?React.createElement(MonthGoldCap,{goldCap:g.goldCap}):null)};ScopeContent.displayName="MetricsPanelScopeContent",ScopeContent.propTypes={now:Yn.default.number.isRequired,onReset:Yn.default.func.isRequired,scope:Yn.default.oneOfType([ci,ui]).isRequired,scopeKey:Yn.default.oneOf(["instance","session","month"]).isRequired};var MetricsPanelInner=()=>{const e=useTheme$1(),{activeTab:t,setActiveTab:g}=useUi(),{instance:n,session:C,month:I,resetInstance:o}=usePlayStats(),[a]=(0,l.useState)(()=>Math.floor(4*Math.random())),[i,s]=(0,l.useState)(()=>Date.now()),c=e?.nexGui?.backgroundImage??"",u=e?.nexGui?.backgroundOpacity??.5,d=e?.nexGui?.backgroundFilter??"none",p=resolveActiveTabId$2(t[Ci]),m={instance:n,session:C,month:I};(0,l.useEffect)(()=>{if("month"===p)return void s(Date.now());s(Date.now());const e=window.setInterval(()=>{s(Date.now())},ai);return()=>{window.clearInterval(e)}},[p]);const handleTabChange=(e,t)=>{const n=Ii.indexOf(t);n>=0&&g(Ci,n)};return React.createElement(Wn,{className:"metrics-panel",sx:{color:"text.primary",height:"100%",overflow:"hidden",position:"relative",width:"100%"}},c?React.createElement(Wn,{"aria-hidden":"true",className:"metrics-panel__background",sx:{backgroundImage:`url(${c})`,backgroundPosition:"center",backgroundSize:"cover",filter:d,inset:0,opacity:u,position:"absolute",transform:getFlipTransform$7(a),zIndex:0}}):null,React.createElement(Wn,{className:"metrics-panel__content",sx:{display:"flex",flexDirection:"column",fontFamily:e.typography.fontFamily,fontSize:e.nexusFontSize??e.typography.fontSize,height:"100%",position:"relative",width:"100%",zIndex:1}},React.createElement(Wn,{sx:{borderBottom:1,borderColor:"divider"}},React.createElement(Ai,{"aria-label":"stats tabs",onChange:handleTabChange,value:p},Ii.map(e=>React.createElement(Ha,{key:e,label:oi[e],value:e})))),React.createElement(Wn,{sx:{flex:1,overflowY:"auto",p:2}},React.createElement(qn,{component:"div",sx:{color:"text.primary",fontFamily:"inherit",fontSize:"inherit",position:"relative"}},React.createElement(ScopeContent,{now:i,onReset:o,scope:m[p],scopeKey:p})))))};MetricsPanelInner.displayName="MetricsPanelInner";var MetricsPanel=()=>React.createElement(Jn,{panelName:"Metrics"},React.createElement(MetricsPanelInner,null));MetricsPanel.displayName="MetricsPanel";var di={id:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired,name:Yn.default.string.isRequired},pi=Yn.default.shape(di),RoomNpcRowComponent=({indent:e=0,interactive:t=!1,isTarget:g=!1,npc:n,onContextMenu:C,onSelect:I})=>{const o=e>0?e:0,a=e>0?e:2;return React.createElement(Wn,{className:["room-npc-row",t?"room-npc-row--interactive":"",g?"room-npc-row--target":""].filter(Boolean).join(" "),onClick:t?()=>I?.(n):void 0,onContextMenu:t?e=>{C?.(e,n)}:void 0,sx:{cursor:t?"pointer":"inherit",display:"table-row",outline:g?"1px solid red":""}},React.createElement(Wn,{component:"div",sx:{color:"cyan",display:"table-cell",padding:`0px 5px 0px ${a}px`,whiteSpace:"nowrap"}},React.createElement(qn,{component:"span",sx:{color:"inherit",fontVariantNumeric:"tabular-nums"},variant:"body2"},n.id)),React.createElement(Wn,{component:"div",sx:{display:"table-cell",padding:`0px 5px 0px ${o}px`,width:"100%"}},React.createElement(qn,{component:"span",sx:{color:"text.primary"},variant:"body2"},n.name)))};RoomNpcRowComponent.displayName="RoomNpcRow",RoomNpcRowComponent.propTypes={npc:pi.isRequired,indent:Yn.default.number,interactive:Yn.default.bool,isTarget:Yn.default.bool,onContextMenu:Yn.default.func,onSelect:Yn.default.func};var mi=(0,l.memo)(RoomNpcRowComponent);mi.displayName="RoomNpcRow",mi.propTypes=RoomNpcRowComponent.propTypes;var selectCharacterSlice=e=>({name:e.name,class:e.class,level:e.level,target:e.target,targetDetails:e.targetDetails,gender:e.gender,balance:e.balance,equilibrium:e.equilibrium,currentAffs:e.currentAffs,limbs:e.limbs,updateCharacter:e.updateCharacter,setClass:e.setClass,setTarget:e.setTarget}),useCharacter=()=>{const{stores:e}=useNexGui();return e.character(useShallow(selectCharacterSlice))},fi=[/a dervish/,/a sharp-toothed gremlin/,/a chaos orb/,/a bloodleech/,/a minion of chaos/,/a worm/,/a green slime/,/a soulmaster/,/a humbug/,/a chimera/,/a bubonis/,/a chaos storm/,/a chaos hound/,/a withered crone/,/a pathfinder/,/a doppleganger/,/an ethereal firelord/,/a simpering sycophant/,/a water weird/,/an eldritch abomination/,/Khaseem/],hi=[/a shipmate/,/a spectral shipmate/],yi=[/a swarthy swashbuckler/],bi=new Set(["guard","person-military-pointing"]),vi=new Set(["face-angry-horns","fiend","monster"]),xi=new Set(["humanoid","person"]),getFlipTransform$6=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},partition=(e,t)=>e.reduce((e,g,n,C)=>(t(g,n,C)?e[0].push(g):e[1].push(g),e),[[],[]]),toNpcEntry=e=>e&&"object"==typeof e&&"string"==typeof e.name?{...e,id:e.id??e.name}:"string"==typeof e?{attrib:"m",id:e,name:e}:null,matchesPatternList=(e,t)=>"string"==typeof e&&t.some(t=>t.test(e)),isVisibleNpc=e=>"m"===e?.attrib||"mx"===e?.attrib,isGuardNpc=e=>bi.has(e?.icon??"")&&"mx"===e?.attrib,isEntityNpc=e=>vi.has(e?.icon??"")&&matchesPatternList(e?.name,fi),isShipmateNpc=e=>matchesPatternList(e?.name,hi),isSwashbucklerNpc=e=>xi.has(e?.icon??"")&&matchesPatternList(e?.name,yi),NpcGroupHeader=({count:e,expanded:t,onToggle:g,title:n})=>e<1?null:React.createElement(Wn,{className:"npcs-panel__group-header",onClick:g,sx:{cursor:"pointer",display:"table-row"}},React.createElement(Wn,{component:"div",sx:{color:"cyan",display:"table-cell",fontFamily:"monospace",padding:"0px 5px 0px 0px",pl:"1rem",whiteSpace:"nowrap"}},React.createElement(qn,{component:"span",sx:{color:"inherit",fontFamily:"inherit"},variant:"body2"},t?"-":"+ ")),React.createElement(Wn,{component:"div",sx:{display:"table-cell"}},React.createElement(qn,{component:"span",sx:{color:"text.primary"},variant:"body2"},"(",e,") ",n)));NpcGroupHeader.displayName="NpcGroupHeader",NpcGroupHeader.propTypes={count:Yn.default.number.isRequired,expanded:Yn.default.bool.isRequired,onToggle:Yn.default.func.isRequired,title:Yn.default.string.isRequired};var NpcsPanelInner=()=>{const e=useTheme$1(),{adapter:t}=useNexGui(),{npcs:g}=useRoom(),{target:n,targetDetails:C}=useCharacter(),[I]=(0,l.useState)(()=>Math.floor(4*Math.random())),[o,a]=(0,l.useState)(!1),[i,s]=(0,l.useState)(!1),[c,u]=(0,l.useState)(!1),[d,p]=(0,l.useState)(!1),m=e?.nexGui?.backgroundImage??"",h=e?.nexGui?.backgroundOpacity??.5,y=e?.nexGui?.backgroundFilter??"none",b=null!=C?.id?String(C.id):null,v=(0,l.useMemo)(()=>(g??[]).map(e=>toNpcEntry(e)).filter(Boolean),[g]),x=(0,l.useMemo)(()=>{let e=[],t=[],g=[],n=[],C=v;return[e,C]=partition(C,isGuardNpc),[t,C]=partition(C,isEntityNpc),[g,C]=partition(C,isShipmateNpc),[n,C]=partition(C,isSwashbucklerNpc),{guards:e,entities:t,shipmates:g,swashbucklers:n,npcs:C.filter(isVisibleNpc)}},[v]),handleNpcSelect=e=>{null!=e?.id&&t.send(`settarget ${e.id}`)},handleNpcContextMenu=e=>{e.preventDefault(),t.notice?.("RIGHT CLICK RIGHT CLICK RIGHT CLICK")};return React.createElement(Wn,{className:"npcs-panel",sx:{height:"100%",overflow:"hidden",position:"relative",width:"100%"}},m?React.createElement(Wn,{"aria-hidden":"true",className:"npcs-panel__background",sx:{backgroundImage:`url(${m})`,backgroundPosition:"center",backgroundSize:"cover",filter:y,inset:0,opacity:h,position:"absolute",transform:getFlipTransform$6(I),zIndex:0}}):null,React.createElement(Wn,{className:"npcs-panel__content",sx:{background:`linear-gradient(180deg, ${alpha("#050505",.18)} 0%, ${alpha("#050505",.36)} 100%)`,color:"text.primary",height:"100%",overflow:"auto",position:"relative",width:"100%",zIndex:1}},React.createElement(Wn,{className:"npcs-panel__rows",sx:{cursor:"pointer",display:"table",fontSize:e.typography.fontSize,m:"10px",maxWidth:"100%",p:"1px",position:"relative",textAlign:"left"}},React.createElement(NpcGroupHeader,{count:x.guards.length,expanded:i,onToggle:()=>s(e=>!e),title:"City Guards"}),i?x.guards.map(e=>React.createElement(mi,{key:`guard-${e.id}`,indent:12,npc:e})):null,React.createElement(NpcGroupHeader,{count:x.entities.length,expanded:o,onToggle:()=>a(e=>!e),title:"Entities"}),o?x.entities.map(e=>React.createElement(mi,{key:`entity-${e.id}`,indent:12,npc:e})):null,React.createElement(NpcGroupHeader,{count:x.shipmates.length,expanded:c,onToggle:()=>u(e=>!e),title:"Shipmates"}),c?x.shipmates.map(e=>React.createElement(mi,{key:`shipmate-${e.id}`,indent:12,npc:e})):null,React.createElement(NpcGroupHeader,{count:x.swashbucklers.length,expanded:d,onToggle:()=>p(e=>!e),title:"Swashbucklers"}),d?x.swashbucklers.map(e=>React.createElement(mi,{key:`swashbuckler-${e.id}`,indent:12,npc:e})):null,x.npcs.map(e=>React.createElement(mi,{key:`npc-${e.id}`,interactive:!0,isTarget:b?String(e.id)===b:e.name===n,npc:e,onContextMenu:handleNpcContextMenu,onSelect:handleNpcSelect})))))};NpcsPanelInner.displayName="NpcsPanelInner";var NpcsPanel=()=>React.createElement(Jn,{panelName:"NPCs"},React.createElement(NpcsPanelInner,null));NpcsPanel.displayName="NpcsPanel";var Si=Object.freeze([]),wi=Yn.default.shape({content:Yn.default.node,id:Yn.default.string.isRequired,label:Yn.default.node.isRequired}),resolveActiveTabId$1=(e,t)=>e.some(e=>e.id===t)?t:e[0]?.id??!1,getFlipTransform$5=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},TabContainerComponent=({tabs:e=Si,activeTab:t=null,backgroundImage:g="",backgroundOpacity:n=.5,backgroundFilter:C="none",onTabChange:I})=>{const[o]=(0,l.useState)(()=>Math.floor(4*Math.random())),a=resolveActiveTabId$1(e,t),i=e.find(e=>e.id===a)??null;return 0===e.length?null:React.createElement(Wn,{className:"nexgui4-tab-container",sx:{display:"flex",flex:1,flexDirection:"column",height:"100%",minHeight:0,minWidth:0,overflow:"hidden",position:"relative",width:"100%"}},g?React.createElement(Wn,{"aria-hidden":"true",className:"nexgui4-tab-container__background",sx:{backgroundImage:`url(${g})`,backgroundPosition:"center",backgroundSize:"cover",filter:C,inset:0,opacity:n,position:"absolute",transform:getFlipTransform$5(o),zIndex:0}}):null,React.createElement(Wn,{className:"nexgui4-tab-container__surface",sx:{display:"flex",flex:1,flexDirection:"column",minHeight:0,minWidth:0,position:"relative",zIndex:1}},React.createElement(Ai,{allowScrollButtonsMobile:!0,"aria-label":"Panel tabs",className:"nexgui4-tab-container__tabs",onChange:(e,t)=>I(t),scrollButtons:"auto",sx:{borderBottom:1,borderColor:"divider",minHeight:40,"& .MuiTab-root":{minHeight:40,textTransform:"none"}},value:a,variant:"scrollable"},e.map(e=>React.createElement(Ha,{"aria-controls":`nexgui4-tab-panel-${e.id}`,id:`nexgui4-tab-${e.id}`,key:e.id,label:e.label,value:e.id}))),React.createElement(Wn,{"aria-labelledby":i?`nexgui4-tab-${i.id}`:void 0,className:"nexgui4-tab-container__tabpanel",id:i?`nexgui4-tab-panel-${i.id}`:void 0,role:"tabpanel",sx:{display:"flex",flex:1,minHeight:0,minWidth:0,overflow:"auto",p:2,position:"relative",zIndex:1}},i?.content??null)))};TabContainerComponent.displayName="TabContainer",TabContainerComponent.propTypes={activeTab:Yn.default.oneOfType([Yn.default.string,Yn.default.oneOf([null])]),backgroundFilter:Yn.default.string,backgroundImage:Yn.default.string,backgroundOpacity:Yn.default.number,onTabChange:Yn.default.func.isRequired,tabs:Yn.default.arrayOf(wi)};var Ei=(0,l.memo)(TabContainerComponent);Ei.displayName="TabContainer",Ei.propTypes=TabContainerComponent.propTypes;var Ri="bottom",ki="right",Mi="left",Ti="auto",Pi=["top",Ri,ki,Mi],Ni="start",Di="clippingParents",Oi="viewport",ji="popper",zi="reference",Gi=Pi.reduce(function(e,t){return e.concat([t+"-"+Ni,t+"-end"])},[]),Li=[].concat(Pi,[Ti]).reduce(function(e,t){return e.concat([t,t+"-"+Ni,t+"-end"])},[]),Bi=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function getNodeName(e){return e?(e.nodeName||"").toLowerCase():null}function getWindow(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function isElement(e){return e instanceof getWindow(e).Element||e instanceof Element}function isHTMLElement$1(e){return e instanceof getWindow(e).HTMLElement||e instanceof HTMLElement}function isShadowRoot(e){return"undefined"!=typeof ShadowRoot&&(e instanceof getWindow(e).ShadowRoot||e instanceof ShadowRoot)}function applyStyles(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var g=t.styles[e]||{},n=t.attributes[e]||{},C=t.elements[e];isHTMLElement$1(C)&&getNodeName(C)&&(Object.assign(C.style,g),Object.keys(n).forEach(function(e){var t=n[e];!1===t?C.removeAttribute(e):C.setAttribute(e,!0===t?"":t)}))})}function effect$2(e){var t=e.state,g={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,g.popper),t.styles=g,t.elements.arrow&&Object.assign(t.elements.arrow.style,g.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],C=t.attributes[e]||{},I=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:g[e]).reduce(function(e,t){return e[t]="",e},{});isHTMLElement$1(n)&&getNodeName(n)&&(Object.assign(n.style,I),Object.keys(C).forEach(function(e){n.removeAttribute(e)}))})}}var Fi={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(e){return e.split("-")[0]}var Wi=Math.max,Vi=Math.min,Ui=Math.round;function getUAString(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(e,t,g){void 0===t&&(t=!1),void 0===g&&(g=!1);var n=e.getBoundingClientRect(),C=1,I=1;t&&isHTMLElement$1(e)&&(C=e.offsetWidth>0&&Ui(n.width)/e.offsetWidth||1,I=e.offsetHeight>0&&Ui(n.height)/e.offsetHeight||1);var o=(isElement(e)?getWindow(e):window).visualViewport,a=!isLayoutViewport()&&g,i=(n.left+(a&&o?o.offsetLeft:0))/C,s=(n.top+(a&&o?o.offsetTop:0))/I,l=n.width/C,c=n.height/I;return{width:l,height:c,top:s,right:i+l,bottom:s+c,left:i,x:i,y:s}}function getLayoutRect(e){var t=getBoundingClientRect(e),g=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-g)<=1&&(g=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:g,height:n}}function contains(e,t){var g=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(g&&isShadowRoot(g)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function getComputedStyle(e){return getWindow(e).getComputedStyle(e)}function isTableElement(e){return["table","td","th"].indexOf(getNodeName(e))>=0}function getDocumentElement(e){return((isElement(e)?e.ownerDocument:e.document)||window.document).documentElement}function getParentNode(e){return"html"===getNodeName(e)?e:e.assignedSlot||e.parentNode||(isShadowRoot(e)?e.host:null)||getDocumentElement(e)}function getTrueOffsetParent(e){return isHTMLElement$1(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function getContainingBlock(e){var t=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement$1(e)&&"fixed"===getComputedStyle(e).position)return null;var g=getParentNode(e);for(isShadowRoot(g)&&(g=g.host);isHTMLElement$1(g)&&["html","body"].indexOf(getNodeName(g))<0;){var n=getComputedStyle(g);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return g;g=g.parentNode}return null}function getOffsetParent(e){for(var t=getWindow(e),g=getTrueOffsetParent(e);g&&isTableElement(g)&&"static"===getComputedStyle(g).position;)g=getTrueOffsetParent(g);return g&&("html"===getNodeName(g)||"body"===getNodeName(g)&&"static"===getComputedStyle(g).position)?t:g||getContainingBlock(e)||t}function getMainAxisFromPlacement(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function within(e,t,g){return Wi(e,Vi(t,g))}function withinMaxClamp(e,t,g){var n=within(e,t,g);return n>g?g:n}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(e){return Object.assign({},getFreshSideObject(),e)}function expandToHashMap(e,t){return t.reduce(function(t,g){return t[g]=e,t},{})}var toPaddingObject=function(e,t){return mergePaddingObject("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:expandToHashMap(e,Pi))};function arrow(e){var t,g=e.state,n=e.name,C=e.options,I=g.elements.arrow,o=g.modifiersData.popperOffsets,a=getBasePlacement(g.placement),i=getMainAxisFromPlacement(a),s=["left","right"].indexOf(a)>=0?"height":"width";if(I&&o){var l=toPaddingObject(C.padding,g),c=getLayoutRect(I),u="y"===i?"top":Mi,d="y"===i?Ri:ki,p=g.rects.reference[s]+g.rects.reference[i]-o[i]-g.rects.popper[s],m=o[i]-g.rects.reference[i],h=getOffsetParent(I),y=h?"y"===i?h.clientHeight||0:h.clientWidth||0:0,b=p/2-m/2,v=l[u],x=y-c[s]-l[d],S=y/2-c[s]/2+b,w=within(v,S,x),E=i;g.modifiersData[n]=((t={})[E]=w,t.centerOffset=w-S,t)}}function effect$1(e){var t=e.state,g=e.options.element,n=void 0===g?"[data-popper-arrow]":g;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&contains(t.elements.popper,n)&&(t.elements.arrow=n)}function getVariation(e){return e.split("-")[1]}var Ki={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(e,t){var g=e.x,n=e.y,C=t.devicePixelRatio||1;return{x:Ui(g*C)/C||0,y:Ui(n*C)/C||0}}function mapToStyles(e){var t,g=e.popper,n=e.popperRect,C=e.placement,I=e.variation,o=e.offsets,a=e.position,i=e.gpuAcceleration,s=e.adaptive,l=e.roundOffsets,c=e.isFixed,u=o.x,d=void 0===u?0:u,p=o.y,m=void 0===p?0:p,h="function"==typeof l?l({x:d,y:m}):{x:d,y:m};d=h.x,m=h.y;var y=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),v=Mi,x="top",S=window;if(s){var w=getOffsetParent(g),E="clientHeight",R="clientWidth";w===getWindow(g)&&"static"!==getComputedStyle(w=getDocumentElement(g)).position&&"absolute"===a&&(E="scrollHeight",R="scrollWidth"),("top"===C||("left"===C||"right"===C)&&"end"===I)&&(x=Ri,m-=(c&&w===S&&S.visualViewport?S.visualViewport.height:w[E])-n.height,m*=i?1:-1),"left"!==C&&("top"!==C&&"bottom"!==C||"end"!==I)||(v=ki,d-=(c&&w===S&&S.visualViewport?S.visualViewport.width:w[R])-n.width,d*=i?1:-1)}var M,T=Object.assign({position:a},s&&Ki),P=!0===l?roundOffsetsByDPR({x:d,y:m},getWindow(g)):{x:d,y:m};return d=P.x,m=P.y,i?Object.assign({},T,((M={})[x]=b?"0":"",M[v]=y?"0":"",M.transform=(S.devicePixelRatio||1)<=1?"translate("+d+"px, "+m+"px)":"translate3d("+d+"px, "+m+"px, 0)",M)):Object.assign({},T,((t={})[x]=b?m+"px":"",t[v]=y?d+"px":"",t.transform="",t))}function computeStyles(e){var t=e.state,g=e.options,n=g.gpuAcceleration,C=void 0===n||n,I=g.adaptive,o=void 0===I||I,a=g.roundOffsets,i=void 0===a||a,s={placement:getBasePlacement(t.placement),variation:getVariation(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:C,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mapToStyles(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:i})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mapToStyles(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Hi={passive:!0};function effect(e){var t=e.state,g=e.instance,n=e.options,C=n.scroll,I=void 0===C||C,o=n.resize,a=void 0===o||o,i=getWindow(t.elements.popper),s=[].concat(t.scrollParents.reference,t.scrollParents.popper);return I&&s.forEach(function(e){e.addEventListener("scroll",g.update,Hi)}),a&&i.addEventListener("resize",g.update,Hi),function(){I&&s.forEach(function(e){e.removeEventListener("scroll",g.update,Hi)}),a&&i.removeEventListener("resize",g.update,Hi)}}var Yi={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,function(e){return Yi[e]})}var Zi={start:"end",end:"start"};function getOppositeVariationPlacement(e){return e.replace(/start|end/g,function(e){return Zi[e]})}function getWindowScroll(e){var t=getWindow(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getWindowScroll(e).scrollLeft}function getViewportRect(e,t){var g=getWindow(e),n=getDocumentElement(e),C=g.visualViewport,I=n.clientWidth,o=n.clientHeight,a=0,i=0;if(C){I=C.width,o=C.height;var s=isLayoutViewport();(s||!s&&"fixed"===t)&&(a=C.offsetLeft,i=C.offsetTop)}return{width:I,height:o,x:a+getWindowScrollBarX(e),y:i}}function getDocumentRect(e){var t,g=getDocumentElement(e),n=getWindowScroll(e),C=null==(t=e.ownerDocument)?void 0:t.body,I=Wi(g.scrollWidth,g.clientWidth,C?C.scrollWidth:0,C?C.clientWidth:0),o=Wi(g.scrollHeight,g.clientHeight,C?C.scrollHeight:0,C?C.clientHeight:0),a=-n.scrollLeft+getWindowScrollBarX(e),i=-n.scrollTop;return"rtl"===getComputedStyle(C||g).direction&&(a+=Wi(g.clientWidth,C?C.clientWidth:0)-I),{width:I,height:o,x:a,y:i}}function isScrollParent(e){var t=getComputedStyle(e),g=t.overflow,n=t.overflowX,C=t.overflowY;return/auto|scroll|overlay|hidden/.test(g+C+n)}function getScrollParent(e){return["html","body","#document"].indexOf(getNodeName(e))>=0?e.ownerDocument.body:isHTMLElement$1(e)&&isScrollParent(e)?e:getScrollParent(getParentNode(e))}function listScrollParents(e,t){var g;void 0===t&&(t=[]);var n=getScrollParent(e),C=n===(null==(g=e.ownerDocument)?void 0:g.body),I=getWindow(n),o=C?[I].concat(I.visualViewport||[],isScrollParent(n)?n:[]):n,a=t.concat(o);return C?a:a.concat(listScrollParents(getParentNode(o)))}function rectToClientRect(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function getInnerBoundingClientRect(e,t){var g=getBoundingClientRect(e,!1,"fixed"===t);return g.top=g.top+e.clientTop,g.left=g.left+e.clientLeft,g.bottom=g.top+e.clientHeight,g.right=g.left+e.clientWidth,g.width=e.clientWidth,g.height=e.clientHeight,g.x=g.left,g.y=g.top,g}function getClientRectFromMixedType(e,t,g){return"viewport"===t?rectToClientRect(getViewportRect(e,g)):isElement(t)?getInnerBoundingClientRect(t,g):rectToClientRect(getDocumentRect(getDocumentElement(e)))}function getClippingParents(e){var t=listScrollParents(getParentNode(e)),g=["absolute","fixed"].indexOf(getComputedStyle(e).position)>=0&&isHTMLElement$1(e)?getOffsetParent(e):e;return isElement(g)?t.filter(function(e){return isElement(e)&&contains(e,g)&&"body"!==getNodeName(e)}):[]}function getClippingRect(e,t,g,n){var C="clippingParents"===t?getClippingParents(e):[].concat(t),I=[].concat(C,[g]),o=I[0],a=I.reduce(function(t,g){var C=getClientRectFromMixedType(e,g,n);return t.top=Wi(C.top,t.top),t.right=Vi(C.right,t.right),t.bottom=Vi(C.bottom,t.bottom),t.left=Wi(C.left,t.left),t},getClientRectFromMixedType(e,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function computeOffsets(e){var t,g=e.reference,n=e.element,C=e.placement,I=C?getBasePlacement(C):null,o=C?getVariation(C):null,a=g.x+g.width/2-n.width/2,i=g.y+g.height/2-n.height/2;switch(I){case"top":t={x:a,y:g.y-n.height};break;case Ri:t={x:a,y:g.y+g.height};break;case ki:t={x:g.x+g.width,y:i};break;case Mi:t={x:g.x-n.width,y:i};break;default:t={x:g.x,y:g.y}}var s=I?getMainAxisFromPlacement(I):null;if(null!=s){var l="y"===s?"height":"width";switch(o){case Ni:t[s]=t[s]-(g[l]/2-n[l]/2);break;case"end":t[s]=t[s]+(g[l]/2-n[l]/2)}}return t}function detectOverflow(e,t){void 0===t&&(t={});var g=t,n=g.placement,C=void 0===n?e.placement:n,I=g.strategy,o=void 0===I?e.strategy:I,a=g.boundary,i=void 0===a?Di:a,s=g.rootBoundary,l=void 0===s?Oi:s,c=g.elementContext,u=void 0===c?ji:c,d=g.altBoundary,p=void 0!==d&&d,m=g.padding,h=void 0===m?0:m,y=mergePaddingObject("number"!=typeof h?h:expandToHashMap(h,Pi)),b="popper"===u?zi:ji,v=e.rects.popper,x=e.elements[p?b:u],S=getClippingRect(isElement(x)?x:x.contextElement||getDocumentElement(e.elements.popper),i,l,o),w=getBoundingClientRect(e.elements.reference),E=computeOffsets({reference:w,element:v,strategy:"absolute",placement:C}),R=rectToClientRect(Object.assign({},v,E)),M="popper"===u?R:w,T={top:S.top-M.top+y.top,bottom:M.bottom-S.bottom+y.bottom,left:S.left-M.left+y.left,right:M.right-S.right+y.right},P=e.modifiersData.offset;if("popper"===u&&P){var N=P[C];Object.keys(T).forEach(function(e){var t=["right","bottom"].indexOf(e)>=0?1:-1,g=["top","bottom"].indexOf(e)>=0?"y":"x";T[e]+=N[g]*t})}return T}function computeAutoPlacement(e,t){void 0===t&&(t={});var g=t,n=g.placement,C=g.boundary,I=g.rootBoundary,o=g.padding,a=g.flipVariations,i=g.allowedAutoPlacements,s=void 0===i?Li:i,l=getVariation(n),c=l?a?Gi:Gi.filter(function(e){return getVariation(e)===l}):Pi,u=c.filter(function(e){return s.indexOf(e)>=0});0===u.length&&(u=c);var d=u.reduce(function(t,g){return t[g]=detectOverflow(e,{placement:g,boundary:C,rootBoundary:I,padding:o})[getBasePlacement(g)],t},{});return Object.keys(d).sort(function(e,t){return d[e]-d[t]})}function getExpandedFallbackPlacements(e){if("auto"===getBasePlacement(e))return[];var t=getOppositePlacement(e);return[getOppositeVariationPlacement(e),t,getOppositeVariationPlacement(t)]}function flip(e){var t=e.state,g=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var C=g.mainAxis,I=void 0===C||C,o=g.altAxis,a=void 0===o||o,i=g.fallbackPlacements,s=g.padding,l=g.boundary,c=g.rootBoundary,u=g.altBoundary,d=g.flipVariations,p=void 0===d||d,m=g.allowedAutoPlacements,h=t.options.placement,y=getBasePlacement(h)===h,b=i||(y||!p?[getOppositePlacement(h)]:getExpandedFallbackPlacements(h)),v=[h].concat(b).reduce(function(e,g){return e.concat("auto"===getBasePlacement(g)?computeAutoPlacement(t,{placement:g,boundary:l,rootBoundary:c,padding:s,flipVariations:p,allowedAutoPlacements:m}):g)},[]),x=t.rects.reference,S=t.rects.popper,w=new Map,E=!0,R=v[0],M=0;M<v.length;M++){var T=v[M],P=getBasePlacement(T),N=getVariation(T)===Ni,D=["top",Ri].indexOf(P)>=0,O=D?"width":"height",j=detectOverflow(t,{placement:T,boundary:l,rootBoundary:c,altBoundary:u,padding:s}),G=D?N?ki:Mi:N?Ri:"top";x[O]>S[O]&&(G=getOppositePlacement(G));var L=getOppositePlacement(G),B=[];if(I&&B.push(j[P]<=0),a&&B.push(j[G]<=0,j[L]<=0),B.every(function(e){return e})){R=T,E=!1;break}w.set(T,B)}if(E)for(var _loop=function(e){var t=v.find(function(t){var g=w.get(t);if(g)return g.slice(0,e).every(function(e){return e})});if(t)return R=t,"break"},F=p?3:1;F>0&&"break"!==_loop(F);F--);t.placement!==R&&(t.modifiersData[n]._skip=!0,t.placement=R,t.reset=!0)}}function getSideOffsets(e,t,g){return void 0===g&&(g={x:0,y:0}),{top:e.top-t.height-g.y,right:e.right-t.width+g.x,bottom:e.bottom-t.height+g.y,left:e.left-t.width-g.x}}function isAnySideFullyClipped(e){return["top",ki,Ri,Mi].some(function(t){return e[t]>=0})}function hide(e){var t=e.state,g=e.name,n=t.rects.reference,C=t.rects.popper,I=t.modifiersData.preventOverflow,o=detectOverflow(t,{elementContext:"reference"}),a=detectOverflow(t,{altBoundary:!0}),i=getSideOffsets(o,n),s=getSideOffsets(a,C,I),l=isAnySideFullyClipped(i),c=isAnySideFullyClipped(s);t.modifiersData[g]={referenceClippingOffsets:i,popperEscapeOffsets:s,isReferenceHidden:l,hasPopperEscaped:c},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":c})}function distanceAndSkiddingToXY(e,t,g){var n=getBasePlacement(e),C=["left","top"].indexOf(n)>=0?-1:1,I="function"==typeof g?g(Object.assign({},t,{placement:e})):g,o=I[0],a=I[1];return o=o||0,a=(a||0)*C,["left","right"].indexOf(n)>=0?{x:a,y:o}:{x:o,y:a}}function offset(e){var t=e.state,g=e.options,n=e.name,C=g.offset,I=void 0===C?[0,0]:C,o=Li.reduce(function(e,g){return e[g]=distanceAndSkiddingToXY(g,t.rects,I),e},{}),a=o[t.placement],i=a.x,s=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=s),t.modifiersData[n]=o}function popperOffsets(e){var t=e.state,g=e.name;t.modifiersData[g]=computeOffsets({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}function getAltAxis(e){return"x"===e?"y":"x"}function preventOverflow(e){var t=e.state,g=e.options,n=e.name,C=g.mainAxis,I=void 0===C||C,o=g.altAxis,a=void 0!==o&&o,i=g.boundary,s=g.rootBoundary,l=g.altBoundary,c=g.padding,u=g.tether,d=void 0===u||u,p=g.tetherOffset,m=void 0===p?0:p,h=detectOverflow(t,{boundary:i,rootBoundary:s,padding:c,altBoundary:l}),y=getBasePlacement(t.placement),b=getVariation(t.placement),v=!b,x=getMainAxisFromPlacement(y),S=getAltAxis(x),w=t.modifiersData.popperOffsets,E=t.rects.reference,R=t.rects.popper,M="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,T="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(w){if(I){var D,O="y"===x?"top":Mi,j="y"===x?Ri:ki,G="y"===x?"height":"width",L=w[x],B=L+h[O],F=L-h[j],W=d?-R[G]/2:0,V="start"===b?E[G]:R[G],U="start"===b?-R[G]:-E[G],K=t.elements.arrow,H=d&&K?getLayoutRect(K):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:getFreshSideObject(),Z=Y[O],Q=Y[j],X=within(0,E[G],H[G]),_=v?E[G]/2-W-X-Z-T.mainAxis:V-X-Z-T.mainAxis,q=v?-E[G]/2+W+X+Q+T.mainAxis:U+X+Q+T.mainAxis,J=t.elements.arrow&&getOffsetParent(t.elements.arrow),$=J?"y"===x?J.clientTop||0:J.clientLeft||0:0,ee=null!=(D=null==P?void 0:P[x])?D:0,te=L+q-ee,ge=within(d?Vi(B,L+_-ee-$):B,L,d?Wi(F,te):F);w[x]=ge,N[x]=ge-L}if(a){var re,ne="x"===x?"top":Mi,Ae="x"===x?Ri:ki,Ce=w[S],Ie="y"===S?"height":"width",oe=Ce+h[ne],ae=Ce-h[Ae],ie=-1!==["top",Mi].indexOf(y),se=null!=(re=null==P?void 0:P[S])?re:0,le=ie?oe:Ce-E[Ie]-R[Ie]-se+T.altAxis,ce=ie?Ce+E[Ie]+R[Ie]-se-T.altAxis:ae,ue=d&&ie?withinMaxClamp(le,Ce,ce):within(d?le:oe,Ce,d?ce:ae);w[S]=ue,N[S]=ue-Ce}t.modifiersData[n]=N}}function getHTMLElementScroll(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function getNodeScroll(e){return e!==getWindow(e)&&isHTMLElement$1(e)?getHTMLElementScroll(e):getWindowScroll(e)}function isElementScaled(e){var t=e.getBoundingClientRect(),g=Ui(t.width)/e.offsetWidth||1,n=Ui(t.height)/e.offsetHeight||1;return 1!==g||1!==n}function getCompositeRect(e,t,g){void 0===g&&(g=!1);var n=isHTMLElement$1(t),C=isHTMLElement$1(t)&&isElementScaled(t),I=getDocumentElement(t),o=getBoundingClientRect(e,C,g),a={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(n||!n&&!g)&&(("body"!==getNodeName(t)||isScrollParent(I))&&(a=getNodeScroll(t)),isHTMLElement$1(t)?((i=getBoundingClientRect(t,!0)).x+=t.clientLeft,i.y+=t.clientTop):I&&(i.x=getWindowScrollBarX(I))),{x:o.left+a.scrollLeft-i.x,y:o.top+a.scrollTop-i.y,width:o.width,height:o.height}}function order(e){var t=new Map,g=new Set,n=[];function sort(e){g.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!g.has(e)){var n=t.get(e);n&&sort(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){g.has(e.name)||sort(e)}),n}function orderModifiers(e){var t=order(e);return Bi.reduce(function(e,g){return e.concat(t.filter(function(e){return e.phase===g}))},[])}function debounce(e){var t;return function(){return t||(t=new Promise(function(g){Promise.resolve().then(function(){t=void 0,g(e())})})),t}}function mergeByName(e){var t=e.reduce(function(e,t){var g=e[t.name];return e[t.name]=g?Object.assign({},g,t,{options:Object.assign({},g.options,t.options),data:Object.assign({},g.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var Qi={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var e=arguments.length,t=new Array(e),g=0;g<e;g++)t[g]=arguments[g];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function popperGenerator(e){void 0===e&&(e={});var t=e,g=t.defaultModifiers,n=void 0===g?[]:g,C=t.defaultOptions,I=void 0===C?Qi:C;return function(e,t,g){void 0===g&&(g=I);var C={placement:"bottom",orderedModifiers:[],options:Object.assign({},Qi,I),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],a=!1,i={state:C,setOptions:function(g){var o="function"==typeof g?g(C.options):g;cleanupModifierEffects(),C.options=Object.assign({},I,C.options,o),C.scrollParents={reference:isElement(e)?listScrollParents(e):e.contextElement?listScrollParents(e.contextElement):[],popper:listScrollParents(t)};var a=orderModifiers(mergeByName([].concat(n,C.options.modifiers)));return C.orderedModifiers=a.filter(function(e){return e.enabled}),runModifierEffects(),i.update()},forceUpdate:function(){if(!a){var e=C.elements,t=e.reference,g=e.popper;if(areValidElements(t,g)){C.rects={reference:getCompositeRect(t,getOffsetParent(g),"fixed"===C.options.strategy),popper:getLayoutRect(g)},C.reset=!1,C.placement=C.options.placement,C.orderedModifiers.forEach(function(e){return C.modifiersData[e.name]=Object.assign({},e.data)});for(var n=0;n<C.orderedModifiers.length;n++)if(!0!==C.reset){var I=C.orderedModifiers[n],o=I.fn,s=I.options,l=void 0===s?{}:s,c=I.name;"function"==typeof o&&(C=o({state:C,options:l,name:c,instance:i})||C)}else C.reset=!1,n=-1}}},update:debounce(function(){return new Promise(function(e){i.forceUpdate(),e(C)})}),destroy:function(){cleanupModifierEffects(),a=!0}};if(!areValidElements(e,t))return i;function runModifierEffects(){C.orderedModifiers.forEach(function(e){var t=e.name,g=e.options,n=void 0===g?{}:g,I=e.effect;if("function"==typeof I){var a=I({state:C,name:t,instance:i,options:n});o.push(a||function(){})}})}function cleanupModifierEffects(){o.forEach(function(e){return e()}),o=[]}return i.setOptions(g).then(function(e){!a&&g.onFirstUpdate&&g.onFirstUpdate(e)}),i}}var Xi=popperGenerator({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect,data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}},Fi,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset},{name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide}]});function getPopperUtilityClass(e){return generateUtilityClass("MuiPopper",e)}function flipPlacement(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function resolveAnchorEl(e){return"function"==typeof e?e():e}function isHTMLElement(e){return void 0!==e.nodeType}generateUtilityClasses("MuiPopper",["root"]);var useUtilityClasses$2=e=>{const{classes:t}=e;return composeClasses({root:["root"]},getPopperUtilityClass,t)},_i={},qi=l.forwardRef(function(e,t){const{anchorEl:g,children:n,direction:C,disablePortal:I,modifiers:o,open:a,placement:i,popperOptions:s,popperRef:c,slotProps:u={},slots:d={},TransitionProps:p,ownerState:m,...h}=e,y=l.useRef(null),b=useForkRef(y,t),v=l.useRef(null),x=useForkRef(v,c),S=l.useRef(x);Qr(()=>{S.current=x},[x]),l.useImperativeHandle(c,()=>v.current,[]);const w=flipPlacement(i,C),[E,R]=l.useState(w),[M,T]=l.useState(resolveAnchorEl(g));l.useEffect(()=>{v.current&&v.current.forceUpdate()}),l.useEffect(()=>{g&&T(resolveAnchorEl(g))},[g]),Qr(()=>{if(!M||!a)return;const handlePopperUpdate=e=>{R(e.placement)};let e=[{name:"preventOverflow",options:{altBoundary:I}},{name:"flip",options:{altBoundary:I}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{handlePopperUpdate(e)}}];null!=o&&(e=e.concat(o)),s&&null!=s.modifiers&&(e=e.concat(s.modifiers));const t=Xi(M,y.current,{placement:w,...s,modifiers:e});S.current(t);const g=y.current;return()=>{if(g){const{style:e}=g,n=e.position,C=e.top,I=e.left,o=e.transform;t.destroy(),e.position=n,e.top=C,e.left=I,e.transform=o}else t.destroy();S.current(null)}},[M,I,o,a,s,w]);const P={placement:E};null!==p&&(P.TransitionProps=p);const N=useUtilityClasses$2(e),D=d.root??"div";return(0,gr.jsx)(D,{...useSlotProps({elementType:D,externalSlotProps:u.root,externalForwardedProps:h,additionalProps:{role:"tooltip",ref:b},ownerState:e,className:N.root}),children:"function"==typeof n?n(P):n})}),Ji=l.forwardRef(function(e,t){const{anchorEl:g,children:n,container:C,direction:I="ltr",disablePortal:o=!1,keepMounted:a=!1,modifiers:i,open:s,placement:c="bottom",popperOptions:u=_i,popperRef:d,style:p,transition:m=!1,slotProps:h={},slots:y={},...b}=e,[v,x]=l.useState(!0),handleEnter=()=>{x(!1)},handleExited=()=>{x(!0)};if(!a&&!s&&(!m||v))return null;let S;if(C)S=C;else if(g){const e=resolveAnchorEl(g);S=e&&isHTMLElement(e)?ownerDocument(e).body:ownerDocument(null).body}const w=s||!a||m&&!v?void 0:"none",E=m?{in:s,onEnter:handleEnter,onExited:handleExited}:void 0;return(0,gr.jsx)(rC,{disablePortal:o,container:S,children:(0,gr.jsx)(qi,{anchorEl:g,direction:I,disablePortal:o,modifiers:i,ref:t,open:m?!v:s,placement:c,popperOptions:u,popperRef:d,slotProps:h,slots:y,...b,style:{position:"fixed",top:0,left:0,display:w,...p},TransitionProps:E,children:n})})}),$i=On(Ji,{name:"MuiPopper",slot:"Root"})({}),es=l.forwardRef(function(e,t){const g=useRtl(),{anchorEl:n,component:C,container:I,disablePortal:o,keepMounted:a,modifiers:i,open:s,placement:l,popperOptions:c,popperRef:u,transition:d,slots:p,slotProps:m,...h}=useDefaultProps({props:e,name:"MuiPopper"}),y={anchorEl:n,container:I,disablePortal:o,keepMounted:a,modifiers:i,open:s,placement:l,popperOptions:c,popperRef:u,transition:d,...h};return(0,gr.jsx)($i,{as:C,direction:g?"rtl":"ltr",slots:p,slotProps:m,...y,ref:t})});function getTooltipUtilityClass(e){return generateUtilityClass("MuiTooltip",e)}var ts=generateUtilityClasses("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function round(e){return Math.round(1e5*e)/1e5}var useUtilityClasses$1=e=>{const{classes:t,disableInteractive:g,arrow:n,touch:C,placement:I}=e;return composeClasses({popper:["popper",!g&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",C&&"touch",`tooltipPlacement${Qn(I.split("-")[0])}`],arrow:["arrow"]},getTooltipUtilityClass,t)},gs=On(es,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.popper,!g.disableInteractive&&t.popperInteractive,g.arrow&&t.popperArrow,!g.open&&t.popperClose]}})(Vn(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e,open:t})=>t&&!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${ts.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${ts.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${ts.arrow}`]:{height:"1em",width:"0.71em",insetInlineStart:0,marginInlineStart:"-0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${ts.arrow}`]:{height:"1em",width:"0.71em",insetInlineEnd:0,marginInlineEnd:"-0.71em","&::before":{transformOrigin:"0 0"}}}}]}))),rs=On("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.tooltip,g.touch&&t.touch,g.arrow&&t.tooltipArrow,t[`tooltipPlacement${Qn(g.placement.split("-")[0])}`]]}})(Vn(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${ts.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center",marginInlineEnd:"14px"},[`.${ts.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center",marginInlineStart:"14px"},[`.${ts.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${ts.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",marginBlock:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${round(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>e.touch,style:{[`.${ts.popper}[data-popper-placement*="left"] &`]:{marginInlineEnd:"24px"},[`.${ts.popper}[data-popper-placement*="right"] &`]:{marginInlineStart:"24px"},[`.${ts.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"},[`.${ts.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),ns=On("span",{name:"MuiTooltip",slot:"Arrow"})(Vn(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}))),As=!1,Cs=new BA,Is={x:0,y:0};function composeEventHandler(e,t){return(g,...n)=>{t&&t(g,...n),e(g,...n)}}var os=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiTooltip"}),{arrow:n=!1,children:C,classes:I,describeChild:o=!1,disableFocusListener:a=!1,disableHoverListener:i=!1,disableInteractive:s=!1,disableTouchListener:c=!1,enterDelay:u=100,enterNextDelay:d=0,enterTouchDelay:p=700,followCursor:m=!1,id:h,leaveDelay:y=0,leaveTouchDelay:b=1500,onClose:v,onOpen:x,open:S,placement:w="bottom",slotProps:E={},slots:R={},title:M,...T}=g,P=l.isValidElement(C)?C:(0,gr.jsx)("span",{children:C}),N=useTheme$1(),[D,O]=l.useState(),[j,G]=l.useState(null),L=l.useRef(!1),B=s||m,F=useTimeout(),W=useTimeout(),V=useTimeout(),U=useTimeout(),[K,H]=QC({controlled:S,default:!1,name:"Tooltip",state:"open"});let Y=K;const Z=jC(h),Q=l.useRef(),X=wA(()=>{void 0!==Q.current&&(document.body.style.WebkitUserSelect=Q.current,Q.current=void 0),U.clear()});l.useEffect(()=>X,[X]);const handleOpen=e=>{Cs.clear(),As=!0,H(!0),x&&!Y&&x(e)},_=wA(e=>{Cs.start(800+y,()=>{As=!1}),H(!1),v&&Y&&v(e),F.start(N.transitions.duration.shortest,()=>{L.current=!1})}),handleMouseOver=e=>{L.current&&"touchstart"!==e.type||(D&&D.removeAttribute("title"),W.clear(),V.clear(),u||As&&d?W.start(As?d:u,()=>{handleOpen(e)}):handleOpen(e))},handleMouseLeave=e=>{W.clear(),V.start(y,()=>{_(e)})},[,q]=l.useState(!1),handleBlur=e=>{const t=e?.target??D;if(!t||t.disabled||!isFocusVisible(t)){q(!1);const g=e??new Event("blur");!e&&t&&(Object.defineProperty(g,"target",{value:t}),Object.defineProperty(g,"currentTarget",{value:t})),handleMouseLeave(g)}},handleFocus=e=>{if(D||O(e.currentTarget),isFocusVisible(e.target)){const handleNativeBlur=e=>{e.target.disabled&&handleBlur(e),e.target.removeEventListener("blur",handleNativeBlur)};e.target.addEventListener("blur",handleNativeBlur),q(!0),handleMouseOver(e)}},detectTouchStart=e=>{L.current=!0;const t=P.props;t.onTouchStart&&t.onTouchStart(e)},handleTouchStart=e=>{detectTouchStart(e),V.clear(),F.clear(),X(),Q.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",U.start(p,()=>{document.body.style.WebkitUserSelect=Q.current,handleMouseOver(e)})},handleTouchEnd=e=>{P.props.onTouchEnd&&P.props.onTouchEnd(e),X(),V.start(b,()=>{_(e)})};l.useEffect(()=>{if(Y)return document.addEventListener("keydown",handleKeyDown),()=>{document.removeEventListener("keydown",handleKeyDown)};function handleKeyDown(e){"Escape"===e.key&&_(e)}},[_,Y]);const J=EA(getReactElementRef(P),O,t);M||0===M||(Y=!1);const $=l.useRef(),handleMouseMove=e=>{const t=P.props;t.onMouseMove&&t.onMouseMove(e),Is={x:e.clientX,y:e.clientY},$.current&&$.current.update()},ee={},te="string"==typeof M;o?(ee.title=Y||!te||i?null:M,ee["aria-describedby"]=Y?Z:null):(ee["aria-label"]=te?M:null,ee["aria-labelledby"]=Y&&!te?Z:null);const ge={...ee,...T,...P.props,className:clsx(T.className,P.props.className),onTouchStart:detectTouchStart,ref:J,...m?{onMouseMove:handleMouseMove}:{}},re={};c||(ge.onTouchStart=handleTouchStart,ge.onTouchEnd=handleTouchEnd),i||(ge.onMouseOver=composeEventHandler(handleMouseOver,ge.onMouseOver),ge.onMouseLeave=composeEventHandler(handleMouseLeave,ge.onMouseLeave),B||(re.onMouseOver=handleMouseOver,re.onMouseLeave=handleMouseLeave)),a||(ge.onFocus=composeEventHandler(handleFocus,ge.onFocus),ge.onBlur=composeEventHandler(handleBlur,ge.onBlur),B||(re.onFocus=handleFocus,re.onBlur=handleBlur));const ne={...g,arrow:n,disableInteractive:B,placement:w,touch:L.current},Ae="function"==typeof E.popper?E.popper(ne):E.popper,Ce=l.useMemo(()=>{let e=[{name:"arrow",enabled:Boolean(j),options:{element:j,padding:4}}];return Ae?.popperOptions?.modifiers&&(e=e.concat(Ae.popperOptions.modifiers)),{...Ae?.popperOptions,modifiers:e}},[j,Ae?.popperOptions]),Ie=useUtilityClasses$1(ne),oe={slots:R,slotProps:{arrow:E.arrow,popper:Ae,tooltip:E.tooltip,transition:E.transition}},[ae,ie]=useSlot("popper",{elementType:gs,externalForwardedProps:oe,ownerState:ne,className:Ie.popper}),[se,le]=useSlot("transition",{elementType:$A,externalForwardedProps:oe,ownerState:ne}),[ce,ue]=useSlot("tooltip",{elementType:rs,className:Ie.tooltip,externalForwardedProps:oe,ownerState:ne}),[de,pe]=useSlot("arrow",{elementType:ns,className:Ie.arrow,externalForwardedProps:oe,ownerState:ne,ref:G});return(0,gr.jsxs)(l.Fragment,{children:[l.cloneElement(P,ge),(0,gr.jsx)(ae,{as:es,placement:w,anchorEl:m?{getBoundingClientRect:()=>({top:Is.y,left:Is.x,right:Is.x,bottom:Is.y,width:0,height:0})}:D,popperRef:$,open:!!D&&Y,id:Z,transition:!0,...re,...ie,popperOptions:Ce,children:({TransitionProps:e})=>(0,gr.jsx)(se,{timeout:N.transitions.duration.shorter,...e,...le,children:(0,gr.jsxs)(ce,{...ue,children:[M,n?(0,gr.jsx)(de,{...pe}):null]})})})]})}),as="title",is="popover",ss={cursor:"help",display:"inline-flex",maxWidth:"100%"},renderLabel=(e,t,g)=>{const n=React.createElement(qn,{component:"span",variant:"body2"},e);return t?g===as?React.createElement(Wn,{component:"span",sx:ss,title:t},n):React.createElement(os,{describeChild:!0,placement:"top-start",title:t},React.createElement(Wn,{component:"span",sx:ss},n)):n},ConfigToggleComponent=({label:e,value:t,onChange:g,tooltip:n="",tooltipMode:C=is})=>React.createElement(NI,{control:React.createElement(WI,{checked:t,onChange:()=>g(!t)}),label:renderLabel(e,n,C),sx:{alignItems:"center",gap:1,justifyContent:"space-between",m:0,width:"100%","& .MuiFormControlLabel-label":{flex:1}}});ConfigToggleComponent.displayName="ConfigToggle",ConfigToggleComponent.propTypes={label:Yn.default.string.isRequired,onChange:Yn.default.func.isRequired,tooltip:Yn.default.string,tooltipMode:Yn.default.oneOf([is,as]),value:Yn.default.bool.isRequired};var ls=(0,l.memo)(ConfigToggleComponent);ls.displayName="ConfigToggle",ls.propTypes=ConfigToggleComponent.propTypes;var NOOP=()=>{},resolveCommand=e=>"function"==typeof e?e:NOOP,createNativeDisplayCommands=e=>Object.freeze({mount:resolveCommand(e?.mountNativeDisplay),unmount:resolveCommand(e?.unmountNativeDisplay)}),useNativeDisplayCommands=()=>{const{platformTabs:e}=useNexGui();return(0,l.useMemo)(()=>createNativeDisplayCommands(e),[e])},cs="sfx/arcade sound",us="nexGui4.netflixMode",ds="nexGui4.netflixMode",ps="https://images.ctfassets.net/y2ske730sjqp/821Wg4N9hJD8vs5FBcCGg/9eaf66123397cc61be14e40174123c40/Vector__3_.svg?w=460",ms="netflixModeEmoteColor",fs="netflixModeScenarios",hs="#afffff",ys=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/,resolveNetflixEmoteColor=e=>"string"==typeof e&&ys.test(e.trim())?e.trim():hs,resolveNetflixScenarioEnabled=(e,t)=>{const g=e?.[t];return"boolean"!=typeof g||g},renderNetflixNoticeHtml=e=>`<span style="height:15px;overflow:hidden"><img src="${ps}" style="height:16px"/> Mode ${e}.</span>`,resolveSelfName=e=>{const t=e?.getState?.()?.name;if(isNonEmptyString(t))return t.trim().toLowerCase();const g=globalThis.GMCP?.Char?.Status?.name;return isNonEmptyString(g)?g.trim().toLowerCase():null},bs=Object.freeze([{id:"nameMentioned",label:"Name Mentioned",predicate:(e,{selfName:t})=>!(!t||"string"!=typeof e?.text)&&e.text.toLowerCase().includes(t)},{id:"saysChannel",label:"Says",predicate:e=>"says"===e?.channel},{id:"tellsChannel",label:"Tells",predicate:e=>"tells"===e?.channel}]),vs=Object.freeze([{id:"emote",label:"Emote",regex:/^/,resolveFg:({emoteColor:e})=>e}]),xs=Object.freeze([{id:"affGot",label:"Aff Got",eventName:"nexsys4.aff.got"},{id:"defLost",label:"Def Lost",eventName:"nexsys4.def.lost"},{id:"damage",label:"Damage",eventName:"nexsys4.system.health.changed"},{id:"roomChanged",label:"Room Changed",eventName:"nexsys4.system.room.changed"}]),Ss=Object.freeze([...bs.map(({id:e,label:t})=>({id:e,label:t,source:"commChannel"})),...xs.map(({id:e,label:t})=>({id:e,label:t,source:"event"})),...vs.map(({id:e,label:t})=>({id:e,label:t,source:"trigger"}))]),playNetflixSound=()=>{nexusclient.ui?.()?.sounds?.()?.play_sound?.(cs)},evaluateCommChannelPayload=(e,t,g)=>{for(const n of bs)if(resolveNetflixScenarioEnabled(g,n.id)&&n.predicate(e??{},t))return!0;return!1},attachCommChannelListener=(e,t)=>{const handler=g=>{const n=resolveSelfName(e),C=t();evaluateCommChannelPayload(g,{selfName:n},C)&&playNetflixSound()};return eventStream.registerEvent("Comm.Channel.Text",handler,{id:us}),()=>{eventStream.removeListener("Comm.Channel.Text",us)}},attachTriggerScenarios=(e,t)=>{for(const g of vs){if(!resolveNetflixScenarioEnabled(t,g.id))continue;const n=g.resolveFg?.({emoteColor:e})??g.fg;nexAction.triggers.add({id:`${ds}.${g.id}`,regex:g.regex,tags:[ds],fg:n,action:playNetflixSound})}return()=>{nexAction.triggers.remove([ds])}},areTriggerScenarioOverridesEqual=(e,t)=>{for(const g of vs)if(resolveNetflixScenarioEnabled(e,g.id)!==resolveNetflixScenarioEnabled(t,g.id))return!1;return!0},attachEventScenarios=e=>{const t=[];for(const g of xs){const n=`${us}.eventScenario.${g.id}`,handler=t=>{resolveNetflixScenarioEnabled(e(),g.id)&&(g.predicate&&!g.predicate(t)||playNetflixSound())};eventStream.registerEvent(g.eventName,handler,{id:n}),t.push(()=>eventStream.removeListener(g.eventName,n))}return()=>{for(const e of t)e()}},readEmoteColorFromUiState=e=>resolveNetflixEmoteColor(e?.settings?.[ms]),readScenarioOverridesFromUiState=e=>e?.settings?.netflixModeScenarios??null,createNetflixModeController=({adapter:e,uiStore:t,characterStore:g})=>{if(!t||"function"!=typeof t.getState||"function"!=typeof t.subscribe)return()=>{};let n=null,C=null,I=null,o=!1,a=null,i=null;const getScenarioOverrides=()=>readScenarioOverridesFromUiState(t.getState()),enable=(t,s)=>{o||(n=attachCommChannelListener(g,getScenarioOverrides),C=attachTriggerScenarios(t,s),I=attachEventScenarios(getScenarioOverrides),a=t,i=s,o=!0,e?.notice?.(renderNetflixNoticeHtml("Enabled"),{html:!0}))},disable=()=>{o&&(n?.(),C?.(),I?.(),n=null,C=null,I=null,a=null,i=null,o=!1,e?.notice?.(renderNetflixNoticeHtml("Disabled"),{html:!0}))},reattachTriggers=(e,t)=>{C?.(),C=attachTriggerScenarios(e,t),a=e,i=t},sync=e=>{const t=readEmoteColorFromUiState(e),g=readScenarioOverridesFromUiState(e);if(e?.netflixMode){if(!o)return void enable(t,g);const e=t!==a,n=!areTriggerScenarioOverridesEqual(g,i);(e||n)&&reattachTriggers(t,g)}else disable()};sync(t.getState());const s=t.subscribe((e,t)=>{const g=Boolean(e?.netflixMode),n=Boolean(t?.netflixMode),C=readEmoteColorFromUiState(e),I=readEmoteColorFromUiState(t),o=readScenarioOverridesFromUiState(e),a=readScenarioOverridesFromUiState(t);g===n&&C===I&&o===a||sync(e)});return()=>{s(),o&&(n?.(),C?.(),I?.(),n=null,C=null,I=null,a=null,i=null,o=!1)}},useNetflixModeSettings=()=>{const{stores:e}=useNexGui(),t=e.ui(e=>e.netflixMode),g=e.ui(e=>e.setNetflixMode),n=e.ui(e=>e.settings?.[ms]),C=e.ui(e=>e.settings?.[fs]),I=e.ui(e=>e.setSetting),o=(0,l.useCallback)(e=>{I(ms,resolveNetflixEmoteColor(e))},[I]),a=(0,l.useCallback)((t,g)=>{I(fs,{...e.ui.getState().settings?.netflixModeScenarios??{},[t]:Boolean(g)})},[I,e]),i=(0,l.useMemo)(()=>Ss.map(({id:e,label:t})=>({id:e,label:t,enabled:resolveNetflixScenarioEnabled(C,e),setEnabled:t=>a(e,t)})),[C,a]);return{enabled:Boolean(t),setEnabled:g,emoteColor:resolveNetflixEmoteColor(n),defaultEmoteColor:hs,setEmoteColor:o,logoUrl:ps,scenarios:i}},usePersistence=()=>{const{persistenceStore:e}=useNexGui();return e},ws=[{key:"loginTracker",label:"Login Tracker",tooltip:"Show formatted login/logout notices by diffing the who list against Achaea's public character roster. Uses ally/enemy and target name formatting, and excludes your own character."},{key:"logoutDownload",label:"Auto-Download Log on Logout",tooltip:"Automatically download the scrollback buffer as an HTML log when you disconnect."},{key:"virtualizedLogs",label:"Virtualized HTML Logs",tooltip:"Download logs as an interactive virtualized HTML viewer for long sessions."}],NetflixModeSection=()=>{const{enabled:e,setEnabled:t,emoteColor:g,setEmoteColor:n,logoUrl:C,scenarios:I}=useNetflixModeSettings();return React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:1}},React.createElement(qn,{gutterBottom:!0,sx:{alignItems:"center",display:"flex",gap:.75},variant:"subtitle2"},React.createElement(Wn,{alt:"Netflix",component:"img",src:C,sx:{display:"block",height:14,width:"auto"}}),"Mode"),React.createElement(ls,{label:"Enabled",onChange:t,tooltip:"Play an attention chime on enabled catches below. Resets to off each session.",tooltipMode:"title",value:e}),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:.25,pl:1}},React.createElement(qn,{color:"text.secondary",sx:{mb:.25},variant:"caption"},"Catches"),I.map(e=>React.createElement(ls,{key:e.id,label:e.label,onChange:e.setEnabled,tooltipMode:"title",value:e.enabled}))),React.createElement(Wn,{sx:{alignItems:"center",display:"flex",gap:1.5},title:"Color used by the emote attention trigger. Set this to your configured emote line color so the trigger matches emotes in your room."},React.createElement(qn,{sx:{minWidth:96},variant:"body2"},"Emote Color"),React.createElement(Wn,{component:"input","aria-label":"Netflix Mode emote color",onChange:e=>n(e.target.value),sx:{background:"transparent",border:"1px solid rgba(255,255,255,0.2)",borderRadius:1,cursor:"pointer",height:28,padding:0,width:40},type:"color",value:g}),React.createElement(qn,{sx:{fontFamily:"monospace"},variant:"caption"},g)))};NetflixModeSection.displayName="NetflixModeSection";var OptionsAdvancedInner=()=>{const e=usePersistence(),t=useNativeDisplayCommands(),[g,n]=(0,l.useState)(()=>e.get("ui")??{}),[C,I]=(0,l.useState)(!1),handleToggle=(t,C)=>{const I={...g,[t]:C};e.set("ui",I),n(I)},handleNativeDisplay=e=>{handleToggle("nativeDisplay",e),e?t.mount():t.unmount()};return React.createElement(Wn,{className:"options-advanced",sx:{display:"flex",flexDirection:"column",gap:1.5,p:1.5}},React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Advanced Options"),React.createElement(BC,{sx:{mb:1}}),React.createElement(Wn,{sx:{columnGap:3,display:"grid",gridTemplateColumns:{xs:"minmax(0, 1fr)",md:"repeat(2, minmax(0, 1fr))"},rowGap:1.5}},React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:.5,minWidth:0}},ws.map(({key:e,label:t,tooltip:n})=>React.createElement(ls,{key:e,label:t,onChange:t=>handleToggle(e,t),tooltip:n,tooltipMode:"title",value:Boolean(g[e])})),React.createElement(BC,{sx:{my:1}}),React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Experimental"),React.createElement(ls,{label:"Native Display Override",onChange:handleNativeDisplay,tooltip:"Mount the nexGui display in the Nexus output area instead of a panel tab. Applies immediately; the tab panel is hidden on the next reload.",tooltipMode:"title",value:Boolean(g.nativeDisplay)}),React.createElement(BC,{sx:{my:1}}),React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Debug"),React.createElement(ls,{label:"Event Bus Debug Mode",onChange:I,tooltip:"Log all internal events to the browser console. Session-only.",tooltipMode:"title",value:C})),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:.5,minWidth:0}},React.createElement(NetflixModeSection,null))))};OptionsAdvancedInner.displayName="OptionsAdvancedInner";var OptionsAdvanced=()=>React.createElement(Jn,{panelName:"Options Advanced"},React.createElement(OptionsAdvancedInner,null));OptionsAdvanced.displayName="OptionsAdvanced";var Es={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function areArraysEqual(e,t,g=(e,t)=>e===t){return e.length===t.length&&e.every((e,n)=>g(e,t[n]))}var Rs=2,ks=[],Ms={};function getNewValue(e,t,g,n,C){return 1===g?Math.min(e+t,C):Math.max(e-t,n)}function asc(e,t){return e-t}function findClosest(e,t,g=-1){const{index:n}=e.reduce((e,g,n)=>{const C=Math.abs(t-g);return null==e||C<=e.distance?{distance:C,index:n}:e},null)??Ms;return null==n?n:g>=0&&e[g]===e[n]?g:n}function trackFinger(e,t){if(null!=t.current&&e.changedTouches){const g=e;for(let e=0;e<g.changedTouches.length;e+=1){const n=g.changedTouches[e];if(n.identifier===t.current)return{x:n.clientX,y:n.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function valueToPercent(e,t,g){return 100*(e-t)/(g-t)}function percentToValue(e,t,g){return(g-t)*e+t}function getDecimalPrecision(e){if(Math.abs(e)<1){const t=e.toExponential().split("e-"),g=t[0].split(".")[1];return(g?g.length:0)+parseInt(t[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function roundValueToStep(e,t,g){const n=Math.round((e-g)/t)*t+g;return Number(n.toFixed(getDecimalPrecision(t)))}function setValueIndex(e,t,g){const n=e.slice();return n[g]=t,n.sort(asc)}function focusThumb(e,t,g,n){const C=xA(ownerDocument(e.current));if(!bA(e.current,C)||Number(C?.getAttribute("data-index"))!==t){const g=e.current?.querySelector(`[type="range"][data-index="${t}"]`);null!=g&&(null==n?g.focus({preventScroll:!0}):g.focus({preventScroll:!0,focusVisible:n}))}g&&g(t)}function areValuesEqual(e,t){return"number"==typeof e&&"number"==typeof t?e===t:"object"==typeof e&&"object"==typeof t&&areArraysEqual(e,t)}var Ts={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},Identity$1=e=>e;function useSlider(e){const{"aria-labelledby":t,defaultValue:g,disabled:n=!1,disableSwap:C=!1,isRtl:I=!1,marks:o=!1,max:a=100,min:i=0,name:s,onChange:c,onChangeCommitted:u,orientation:d="horizontal",rootRef:p,scale:m=Identity$1,step:h=1,shiftStep:y=10,tabIndex:b,value:v}=e,x=l.useRef(void 0),S=l.useRef(null),[w,E]=l.useState(-1),[R,M]=l.useState(-1),[T,P]=l.useState(!1),N=l.useRef(0),D=l.useRef(-1),O=l.useRef(!1),j=l.useRef(-1),G=useEventCallback(()=>{null!=S.current&&(cancelAnimationFrame(S.current),S.current=null)}),L=l.useRef(null),[B,F]=useControlled({controlled:v,default:g??i,name:"Slider"}),W=useEventCallback((e,t,g)=>{const n="nativeEvent"in e?e.nativeEvent:e,C=new n.constructor(n.type,n);Object.defineProperty(C,"target",{writable:!0,value:{value:t,name:s}}),L.current=t,c?.(C,t,g)}),V=Array.isArray(B),U=l.useMemo(()=>{if("number"==typeof B)return[clamp$2(B,i,a)];if(null==B)return[i];const e=B.slice().sort(asc);for(let t=0;t<e.length;t+=1){const g=e[t];e[t]=null==g?i:clamp$2(g,i,a)}return e},[B,i,a]),K=l.useMemo(()=>{if(!0===o&&null!=h){const e=new Array(Math.floor((a-i)/h)+1);for(let t=0;t<e.length;t+=1)e[t]={value:i+h*t};return e}return Array.isArray(o)?o:ks},[o,h,i,a]),H=l.useMemo(()=>{const e=new Array(K.length);for(let t=0;t<K.length;t+=1)e[t]=K[t].value;return e},[K]),[Y,Z]=l.useState(-1),Q=l.useRef(null),X=useForkRef(p,Q),createHandleHiddenInputFocus=e=>t=>{const g=Number(t.currentTarget.getAttribute("data-index"));isFocusVisible(t.target)&&Z(g),M(g),e?.onFocus?.(t)},createHandleHiddenInputBlur=e=>t=>{isFocusVisible(t.target)||Z(-1),M(-1),e?.onBlur?.(t)},changeValue=(e,t)=>{const g=Number(e.currentTarget.getAttribute("data-index")),n=U[g],I=H.indexOf(n);let o=t;if(K&&null==h){const e=H[H.length-1];o=o>=e?e:o<=H[0]?H[0]:o<n?H[I-1]:H[I+1]}if(o=clamp$2(o,i,a),V){C&&(o=clamp$2(o,U[g-1]||-1/0,U[g+1]||1/0));const e=o;o=setValueIndex(U,o,g);let t=g;C||(t=o.indexOf(e)),focusThumb(Q,t)}F(o),Z(g),c&&!areValuesEqual(o,B)&&W(e,o,g),u&&u(e,L.current??o)},createHandleHiddenInputKeyDown=e=>t=>{if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(t.key)){t.preventDefault();const e=U[Number(t.currentTarget.getAttribute("data-index"))];let g=null;if(null!=h){const n=t.shiftKey?y:h;switch(t.key){case"ArrowUp":g=getNewValue(e,n,1,i,a);break;case"ArrowRight":g=getNewValue(e,n,I?-1:1,i,a);break;case"ArrowDown":g=getNewValue(e,n,-1,i,a);break;case"ArrowLeft":g=getNewValue(e,n,I?1:-1,i,a);break;case"PageUp":g=getNewValue(e,y,1,i,a);break;case"PageDown":g=getNewValue(e,y,-1,i,a);break;case"Home":g=i;break;case"End":g=a}}else if(K){const n=H[H.length-1],C=H.indexOf(e),o=[I?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];[I?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"].includes(t.key)?g=0===C?H[0]:H[C-1]:o.includes(t.key)&&(g=C===H.length-1?n:H[C+1])}null!=g&&changeValue(t,g)}e?.onKeyDown?.(t)};Qr(()=>{const e=xA(ownerDocument(Q.current));n&&bA(Q.current,e)&&null!=e&&"blur"in e&&e.blur()},[n]),n&&-1!==w&&E(-1),n&&-1!==Y&&Z(-1);const createHandleHiddenInputChange=e=>t=>{e.onChange?.(t),changeValue(t,t.currentTarget.valueAsNumber)},_=l.useRef(void 0);let q=d;I&&"horizontal"===d&&(q+="-reverse");const getValueAtFinger=e=>{const{current:t}=Q;if(!t)return null;const{width:g,height:n,bottom:I,left:o}=t.getBoundingClientRect();let s,l;s=q.startsWith("vertical")?(I-e.y)/n:(e.x-o)/g,q.includes("-reverse")&&(s=1-s),l=percentToValue(s,i,a),l=h?roundValueToStep(l,h,i):H[findClosest(H,l)],l=clamp$2(l,i,a);let c=0;if(V){const e=-1!==_.current;c=e?_.current:findClosest(U,l,D.current),C&&(l=clamp$2(l,U[c-1]||-1/0,U[c+1]||1/0));const t=l;l=setValueIndex(U,l,c),C&&e||(c=l.indexOf(t),_.current=c)}return{newValue:l,activeIndex:c}},J=useEventCallback(e=>{if("pointerId"in e&&e.pointerId!==j.current)return;const t=trackFinger(e,x);if(!t)return;if(N.current+=1,"pointermove"===e.type&&0===e.buttons)return void $(e);const g=getValueAtFinger(t);g&&(focusThumb(Q,g.activeIndex,E,!1),D.current=g.activeIndex,F(g.newValue),!T&&N.current>Rs&&P(!0),c&&!areValuesEqual(g.newValue,B)&&W(e,g.newValue,g.activeIndex))}),$=useEventCallback(e=>{if("pointerId"in e&&e.pointerId!==j.current)return;const t=trackFinger(e,x);if(P(!1),!t)return;const g=getValueAtFinger(t);E(-1),"touchend"===e.type&&M(-1),g&&u&&u(e,L.current??g.newValue),"pointerType"in e&&Q.current?.hasPointerCapture(e.pointerId)&&Q.current.releasePointerCapture(e.pointerId),x.current=void 0,j.current=-1,te()}),ee=useEventCallback(e=>{if(n)return;if(O.current){O.current=!1;const t=e.changedTouches[0];return void(null!=t&&(x.current=t.identifier))}const t=e.changedTouches[0];null!=t&&(x.current=t.identifier);const g=trackFinger(e,x);if(!1!==g){_.current=-1;const t=getValueAtFinger(g);t&&(focusThumb(Q,t.activeIndex,E,!1),D.current=t.activeIndex,F(t.newValue),c&&!areValuesEqual(t.newValue,B)&&W(e,t.newValue,t.activeIndex))}N.current=0;const C=ownerDocument(Q.current);C.addEventListener("touchmove",J,{passive:!0}),C.addEventListener("touchend",$,{passive:!0})}),te=l.useCallback(()=>{const e=ownerDocument(Q.current);e.removeEventListener("pointermove",J),e.removeEventListener("pointerup",$),e.removeEventListener("touchmove",J),e.removeEventListener("touchend",$)},[$,J]);l.useEffect(()=>{const e=Q.current;if(e)return e.addEventListener("touchstart",ee,{passive:!0}),()=>{e.removeEventListener("touchstart",ee),G(),te()}},[te,ee,G]),l.useEffect(()=>{n&&(te(),G())},[n,te,G]);const createHandlePointerDown=e=>t=>{if(e.onPointerDown?.(t),"touch"===t.pointerType&&(O.current=!0),n||t.defaultPrevented||0!==t.button)return;const g=trackFinger(t,x);if(!1!==g){_.current=-1;const e=getValueAtFinger(g);if(e){const g=Q.current?.querySelector(`input[type="range"][data-index="${e.activeIndex}"]`),n=ownerDocument(Q.current),C=null!=g&&g===xA(n);E(e.activeIndex),D.current=e.activeIndex,C?t.preventDefault():(G(),S.current=requestAnimationFrame(()=>{S.current=null,focusThumb(Q,e.activeIndex,void 0,!1)})),F(e.newValue),c&&!areValuesEqual(e.newValue,B)&&W(t,e.newValue,e.activeIndex)}}N.current=0,j.current=t.pointerId;const C=ownerDocument(Q.current);try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}C.addEventListener("pointermove",J,{passive:!0}),C.addEventListener("pointerup",$)},ge=valueToPercent(V?U[0]:i,i,a),re=valueToPercent(U[U.length-1],i,a)-ge,createHandleMouseOver=e=>t=>{e.onMouseOver?.(t),M(Number(t.currentTarget.getAttribute("data-index")))},createHandleMouseLeave=e=>t=>{e.onMouseLeave?.(t),M(-1)},getThumbStyle=e=>{let t;return V?w===e?t=2:D.current===e&&(t=1):w===e&&(t=1),{pointerEvents:-1!==w&&w!==e?"none":void 0,zIndex:t}};let ne;return"vertical"===d&&(ne=I?"vertical-rl":"vertical-lr"),{active:w,axis:q,axisProps:Ts,dragging:T,focusedThumbIndex:Y,getHiddenInputProps:(g=Ms)=>{const C=extractEventHandlers(g),o={onChange:createHandleHiddenInputChange(C),onFocus:createHandleHiddenInputFocus(C),onBlur:createHandleHiddenInputBlur(C),onKeyDown:createHandleHiddenInputKeyDown(C)},l={...C,...o};return{tabIndex:b,"aria-labelledby":t,"aria-orientation":d,"aria-valuemax":m(a),"aria-valuemin":m(i),name:s,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":e.step??void 0,disabled:n,...g,...l,style:{...Es,direction:I?"rtl":"ltr",width:"100%",height:"100%",writingMode:ne}}},getRootProps:(e=Ms)=>{const t=extractEventHandlers(e),g={onPointerDown:createHandlePointerDown(t)},n={...t,...g};return{...e,ref:X,...n}},getThumbProps:(e=Ms)=>{const t=extractEventHandlers(e),g={onMouseOver:createHandleMouseOver(t),onMouseLeave:createHandleMouseLeave(t)};return{...e,...t,...g}},marks:K,open:R,range:V,rootRef:X,trackLeap:re,trackOffset:ge,values:U,getThumbStyle}}function getSliderUtilityClass(e){return generateUtilityClass("MuiSlider",e)}var Ps=generateUtilityClasses("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","track","trackInverted","trackFalse","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),useValueLabelClasses=e=>{const{open:t}=e;return{offset:clsx(t&&Ps.valueLabelOpen),circle:Ps.valueLabelCircle,label:Ps.valueLabelLabel}};function SliderValueLabel$1(e){const{children:t,className:g,value:n}=e,C=useValueLabelClasses(e);return t?l.cloneElement(t,{className:t.props.className},(0,gr.jsxs)(l.Fragment,{children:[t.props.children,(0,gr.jsx)("span",{className:clsx(C.offset,g),"aria-hidden":!0,children:(0,gr.jsx)("span",{className:C.circle,children:(0,gr.jsx)("span",{className:C.label,children:n})})})]})):null}function Identity(e){return e}var Ns=On("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,t[`color${Qn(g.color)}`],"medium"!==g.size&&t[`size${Qn(g.size)}`],g.marked&&t.marked,"vertical"===g.orientation&&t.vertical,"inverted"===g.track&&t.trackInverted,!1===g.track&&t.trackFalse]}})(Vn(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Ps.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Ps.dragging}`]:{[`& .${Ps.thumb}, & .${Ps.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),Ds=On("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,"@media (forced-colors: active)":{border:"1px solid transparent",boxSizing:"border-box"},variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),Os=On("span",{name:"MuiSlider",slot:"Track"})(Vn(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{"@media (forced-colors: none)":{border:"none"}}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:e.lighten(e.palette[t].main,.62),borderColor:e.lighten(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:e.darken(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:e.darken(e.palette[t].main,.5)})}}}))]}))),js=On("span",{name:"MuiSlider",slot:"Thumb"})(Vn(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"@media (forced-colors: active)":{border:"1px solid ButtonBorder"},"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${Ps.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${Ps.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Ps.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),zs=On(SliderValueLabel$1,{name:"MuiSlider",slot:"ValueLabel"})(Vn(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${Ps.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${Ps.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]}))),Gs=On("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>slotShouldForwardProp(e)&&"markActive"!==e,overridesResolver:(e,t)=>{const{markActive:g}=e;return[t.mark,g&&t.markActive]}})(Vn(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),Ls=On("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>slotShouldForwardProp(e)&&"markLabelActive"!==e})(Vn(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),useUtilityClasses=e=>{const{disabled:t,dragging:g,marked:n,orientation:C,track:I,classes:o,color:a,size:i}=e;return composeClasses({root:["root",t&&"disabled",g&&"dragging",n&&"marked","vertical"===C&&"vertical","inverted"===I&&"trackInverted",!1===I&&"trackFalse",a&&`color${Qn(a)}`,i&&`size${Qn(i)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled"],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]},getSliderUtilityClass,o)},Forward=({children:e})=>e,Bs=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiSlider"}),n=useRtl(),{"aria-label":C,"aria-valuetext":I,"aria-labelledby":o,color:a="primary",classes:i,className:s,disableSwap:c=!1,disabled:u=!1,getAriaLabel:d,getAriaValueText:p,marks:m=!1,max:h=100,min:y=0,name:b,onChange:v,onChangeCommitted:x,orientation:S="horizontal",shiftStep:w=10,size:E="medium",step:R=1,scale:M=Identity,slotProps:T={},slots:P={},tabIndex:N,track:D="normal",value:O,valueLabelDisplay:j="off",valueLabelFormat:G=Identity,...L}=g,B={...g,isRtl:n,max:h,min:y,classes:i,disabled:u,disableSwap:c,orientation:S,marks:m,color:a,size:E,step:R,shiftStep:w,scale:M,track:D,valueLabelDisplay:j,valueLabelFormat:G},{axisProps:F,getRootProps:W,getHiddenInputProps:V,getThumbProps:U,open:K,active:H,axis:Y,focusedThumbIndex:Z,range:Q,dragging:X,marks:_,values:q,trackOffset:J,trackLeap:$,getThumbStyle:ee}=useSlider({...B,rootRef:t});B.marked=_.length>0&&_.some(e=>e.label),B.dragging=X,B.focusedThumbIndex=Z;const te=useUtilityClasses(B),ge={slots:P,slotProps:T},[re,ne]=useSlot("root",{elementType:Ns,getSlotProps:W,externalForwardedProps:{...ge,...L},ownerState:B,className:[te.root,s]}),[Ae,Ce]=useSlot("rail",{elementType:Ds,externalForwardedProps:ge,ownerState:B,className:te.rail}),[Ie,oe]=useSlot("track",{elementType:Os,externalForwardedProps:ge,additionalProps:{style:{...F[Y].offset(J),...F[Y].leap($)}},ownerState:B,className:te.track}),[ae,ie]=useSlot("thumb",{elementType:js,getSlotProps:U,externalForwardedProps:ge,ownerState:B,className:te.thumb}),[se,le]=useSlot("valueLabel",{elementType:zs,externalForwardedProps:ge,ownerState:B,className:te.valueLabel}),[ce,ue]=useSlot("mark",{elementType:Gs,externalForwardedProps:ge,ownerState:B,className:te.mark}),[de,pe]=useSlot("markLabel",{elementType:Ls,externalForwardedProps:ge,ownerState:B,className:te.markLabel}),[me,fe]=useSlot("input",{elementType:"input",getSlotProps:V,externalForwardedProps:ge,ownerState:B});return(0,gr.jsxs)(re,{...ne,children:[(0,gr.jsx)(Ae,{...Ce}),(0,gr.jsx)(Ie,{...oe}),_.filter(e=>e.value>=y&&e.value<=h).map((e,t)=>{const g=valueToPercent(e.value,y,h),n=F[Y].offset(g);let C;return C=!1===D?q.includes(e.value):"normal"===D&&(Q?e.value>=q[0]&&e.value<=q[q.length-1]:e.value<=q[0])||"inverted"===D&&(Q?e.value<=q[0]||e.value>=q[q.length-1]:e.value>=q[0]),(0,gr.jsxs)(l.Fragment,{children:[(0,gr.jsx)(ce,{"data-index":t,...ue,...!isHostComponent(ce)&&{markActive:C},style:{...n,...ue.style},className:clsx(ue.className,C&&te.markActive)}),null!=e.label?(0,gr.jsx)(de,{"aria-hidden":!0,"data-index":t,...pe,...!isHostComponent(de)&&{markLabelActive:C},style:{...n,...pe.style},className:clsx(te.markLabel,pe.className,C&&te.markLabelActive),children:e.label}):null]},t)}),q.map((e,t)=>{const g=valueToPercent(e,y,h),n=F[Y].offset(g),a="off"===j?Forward:se;return(0,gr.jsx)(a,{...!isHostComponent(a)&&{valueLabelFormat:G,valueLabelDisplay:j,value:"function"==typeof G?G(M(e),t):G,index:t,open:K===t||H===t||"on"===j,disabled:u},...le,children:(0,gr.jsx)(ae,{"data-index":t,...ie,className:clsx(te.thumb,ie.className,H===t&&te.active,Z===t&&te.focusVisible),style:{...n,...ee(t),...ie.style},children:(0,gr.jsx)(me,{"data-index":t,"aria-label":d?d(t):C,"aria-valuenow":M(e),"aria-labelledby":o,"aria-valuetext":p?p(M(e),t):I,value:q[t],...fe})})},t)})]})}),resolveSliderValue$1=e=>Array.isArray(e)?e[0]??0:e,OptionsDisplayInner=()=>{const{tokens:e,updateTokens:t}=useTheme(),g=usePersistence(),[n,C]=(0,l.useState)(()=>g.get("ui")??{}),I=(0,l.useMemo)(()=>{const t=e.theme.displayFontFamily;return Re.some(({value:e})=>e===t)?Re:[{label:t,value:t},...Re]},[e.theme.displayFontFamily]),handleUiToggle=(e,t)=>{const I={...n,[e]:t};g.set("ui",I),C(I)},handleDisplayFontFamily=e=>{t({theme:{displayFontFamily:e.target.value}})},handleDisplayFontSize=(e,g)=>{t({theme:{displayFontSize:resolveSliderValue$1(g)}})};return React.createElement(Wn,{className:"options-display",sx:{display:"flex",flexDirection:"column",gap:1.5,p:1.5}},React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Main Display / Scrollback Style"),React.createElement(BC,null),React.createElement(vo,{fullWidth:!0,size:"small"},React.createElement(yo,{id:"display-font-family-select-label"},"Font Family"),React.createElement(Zo,{label:"Font Family",labelId:"display-font-family-select-label",onChange:handleDisplayFontFamily,value:e.theme.displayFontFamily},I.map(e=>React.createElement(KC,{key:e.value,value:e.value},e.label)))),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:1}},React.createElement(qn,{variant:"caption",color:"text.secondary"},"Display Font Size: ",e.theme.displayFontSize,"px"),React.createElement(Bs,{"aria-label":"Display font size",max:20,min:8,onChange:handleDisplayFontSize,step:1,value:e.theme.displayFontSize})),React.createElement(BC,{sx:{mt:.5}}),React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Formatting"),React.createElement(ls,{label:"Ally / Enemy Formatting",onChange:e=>handleUiToggle("allyEnemyFormatting",e),tooltip:"Apply ally and enemy markers to recognised player names in panels and game output.",tooltipMode:"title",value:Boolean(n.allyEnemyFormatting)}),React.createElement(ls,{label:"Target Formatting",onChange:e=>handleUiToggle("targetFormatting",e),tooltip:"Highlight your current target in game output.",tooltipMode:"title",value:Boolean(n.targetFormatting)}))};OptionsDisplayInner.displayName="OptionsDisplayInner";var OptionsDisplay=()=>React.createElement(Jn,{panelName:"Options Display"},React.createElement(OptionsDisplayInner,null));OptionsDisplay.displayName="OptionsDisplay";var Fs=Object.freeze([{key:"showCombatStream",label:"Combat Stream",tooltip:"Route combat messages to a separate stream panel."},{key:"showSystemStream",label:"System Stream",tooltip:"Route system messages to a separate stream panel."},{key:"damageNumbers",label:"Damage Numbers",tooltip:"Show damage number overlays on combat output."},{key:"msgReplace",label:"Message Replace",tooltip:"Apply structured replacement rows for skill actions (nexSkillMatch / nexSkillNpcMatch). Inline name highlighting is controlled separately by the Ally/Enemy Formatting toggle."}]),useGameOptionToggles=()=>{const{stores:e}=useNexGui(),t=e.ui(e=>e.settings),g=e.ui(e=>e.setSetting);return(0,l.useMemo)(()=>Fs.map(e=>({key:e.key,label:e.label,tooltip:e.tooltip,value:Boolean(t[e.key]),onChange:t=>g(e.key,t)})),[g,t])},Ws=Object.freeze([{key:"echo_input",label:"Echo Input",tooltip:"Mirror your typed commands into the game output stream.",setValue:(e,t)=>{e.setSetting("echo_input",t)}},{key:"echo_gmcp",label:"Display GMCP",tooltip:"Show inbound GMCP payloads in the output stream.",setValue:(e,t)=>{e.setSetting("echo_gmcp",t)}},{key:"single_prompt",label:"Single Prompt",tooltip:"Collapse the duplicate Nexus prompt line into a single prompt.",setValue:(e,t)=>{e.setSetting("show_prompts",!t)}},{key:"show_timestamps",label:"Display Timestamps",tooltip:"Show Nexus timestamps in the main output stream.",setValue:(e,t)=>{e.setSetting("show_timestamps",t)}},{key:"display_tabstrip",label:"Display Tabstrip",tooltip:"Show the FlexLayout tab strip for docked Nexus tabs.",setValue:(e,t)=>{e.updateLayoutAttributes({tabSetEnableTabStrip:t})}}]),useHostSettingsToggles=()=>{const{eventBus:e,hostSettingsModel:t,hostLayoutModel:g}=useNexGui(),n=useHostBridge(),C=(0,l.useSyncExternalStore)(t.subscribe,t.getSnapshot),I=(0,l.useSyncExternalStore)(g.subscribe,g.getSnapshot),o=(0,l.useCallback)(({key:t,setValue:g},C)=>{g(n,C),e.emit($.HOST_SETTINGS_CHANGED,{key:t,value:C})},[e,n]);return(0,l.useMemo)(()=>Ws.map(e=>({key:e.key,label:e.label,tooltip:e.tooltip,value:"display_tabstrip"===e.key?Boolean(I.display_tabstrip):Boolean(C[e.key]),onChange:t=>o(e,t)})),[C,I,o])},OptionsGameInner=()=>{const e=useHostSettingsToggles(),t=useGameOptionToggles();return React.createElement(Wn,{className:"options-game",sx:{display:"flex",flexDirection:"column",gap:.5,p:1.5}},React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Game Options"),React.createElement(BC,{sx:{mb:1}}),React.createElement(Wn,{sx:{columnGap:3,display:"grid",gridTemplateColumns:{xs:"minmax(0, 1fr)",md:"repeat(2, minmax(0, 1fr))"},rowGap:1.5}},React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:.5,minWidth:0}},React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Nexus Config"),e.map(({key:e,label:t,tooltip:g,value:n,onChange:C})=>React.createElement(ls,{key:e,label:t,onChange:C,tooltip:g,tooltipMode:"title",value:n}))),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:.5,minWidth:0}},React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"nexGui Config"),t.map(({key:e,label:t,tooltip:g,value:n,onChange:C})=>React.createElement(ls,{key:e,label:t,onChange:C,tooltip:g,tooltipMode:"title",value:n})))))};OptionsGameInner.displayName="OptionsGameInner";var OptionsGame=()=>React.createElement(Jn,{panelName:"Options Game"},React.createElement(OptionsGameInner,null));OptionsGame.displayName="OptionsGame";var Vs="__none__",Us="__custom__",resolveSliderValue=e=>Array.isArray(e)?e[0]??0:e,OptionsStyleInner=()=>{const{tokens:e,updateTokens:t}=useTheme(),g=canonicalizeBackgroundImageValue(e.theme.backgroundImage),n=Gt.includes(g)?g:g?Us:Vs,handleFontSize=(e,g)=>{t({theme:{fontSize:resolveSliderValue(g)}})},handleOpacity=(e,g)=>{t({theme:{backgroundOpacity:resolveSliderValue(g)}})},handleHue=(e,g)=>{t({theme:{hue:resolveSliderValue(g)}})},handleCustomBgImage=e=>{t({theme:{backgroundImage:e.target.value}})},handleBackgroundImageSelect=e=>{const{value:g}=e.target;g!==Vs?g!==Us?t({theme:{backgroundImage:g}}):n!==Us&&t({theme:{backgroundImage:""}}):t({theme:{backgroundImage:""}})};return React.createElement(Wn,{className:"options-style",sx:{display:"flex",flexDirection:"column",gap:1.5,p:1.5}},React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Panel Display Style"),React.createElement(BC,null),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:1}},React.createElement(qn,{variant:"caption",color:"text.secondary"},"Panel Font Size: ",e.theme.fontSize,"px"),React.createElement(Bs,{"aria-label":"Panel font size",max:20,min:8,onChange:handleFontSize,step:1,value:e.theme.fontSize})),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:1}},React.createElement(qn,{variant:"caption",color:"text.secondary"},"Background Opacity: ",Math.round(100*e.theme.backgroundOpacity),"%"),React.createElement(Bs,{"aria-label":"Background opacity",max:1,min:0,onChange:handleOpacity,step:.01,value:e.theme.backgroundOpacity})),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:1}},React.createElement(qn,{variant:"caption",color:"text.secondary"},"Hue Shift: ",e.theme.hue,"°"),React.createElement(Bs,{"aria-label":"Hue shift",max:360,min:0,onChange:handleHue,step:1,value:e.theme.hue})),React.createElement(vo,{fullWidth:!0,size:"small"},React.createElement(yo,{id:"background-image-select-label"},"Background Image"),React.createElement(Zo,{label:"Background Image",labelId:"background-image-select-label",onChange:handleBackgroundImageSelect,value:n},React.createElement(KC,{value:Vs},"None"),Gt.map(e=>React.createElement(KC,{key:e,value:e},e)),React.createElement(KC,{value:Us},"Custom URL"))),React.createElement(_o,{InputLabelProps:{shrink:!0},fullWidth:!0,label:"Background Image URL",onChange:handleCustomBgImage,placeholder:"https://...",size:"small",value:e.theme.backgroundImage,variant:"outlined"}))};OptionsStyleInner.displayName="OptionsStyleInner";var OptionsStyle=()=>React.createElement(Jn,{panelName:"Options Panels"},React.createElement(OptionsStyleInner,null));OptionsStyle.displayName="OptionsStyle";var Ks="options",Hs=Object.freeze([{content:React.createElement(OptionsGame,null),id:"game",label:"Game"},{content:React.createElement(OptionsStyle,null),id:"style",label:"Panels"},{content:React.createElement(OptionsDisplay,null),id:"display",label:"Display"},{content:React.createElement(OptionsAdvanced,null),id:"advanced",label:"Advanced"}]),resolveActiveTabId=e=>"string"==typeof e?e:"number"==typeof e?Hs[e]?.id??Hs[0].id:Hs[0].id,OptionsPanelInner=()=>{const e=useTheme(),{activeTab:t,setActiveTab:g}=useUi(),n=e.theme?.nexGui?.backgroundImage??"",C=e.theme?.nexGui?.backgroundOpacity??.5,I=e.theme?.nexGui?.backgroundFilter??"none",handleTabChange=e=>{const t=Hs.findIndex(t=>t.id===e);t>=0&&g(Ks,t)};return React.createElement(Ei,{activeTab:resolveActiveTabId(t[Ks]),backgroundFilter:I,backgroundImage:n,backgroundOpacity:C,onTabChange:handleTabChange,tabs:Hs})};OptionsPanelInner.displayName="OptionsPanelInner";var OptionsPanel=()=>React.createElement(Jn,{panelName:"Options"},React.createElement(OptionsPanelInner,null));OptionsPanel.displayName="OptionsPanel";var PartyMemberRowComponent=({name:e,color:t="text.primary",disabled:g=!1,onClick:n=null})=>{const C="function"==typeof n&&!g;return React.createElement(Wn,{className:"party-member-row",onClick:C?()=>n(e):void 0,role:C?"button":void 0,sx:{alignItems:"center",cursor:C?"pointer":"default",display:"flex",minHeight:24,px:.5},tabIndex:C?0:void 0},React.createElement(qn,{component:"span",sx:{color:t,fontWeight:500,lineHeight:1.35},variant:"body2"},e))};PartyMemberRowComponent.displayName="PartyMemberRow",PartyMemberRowComponent.propTypes={color:Yn.default.string,disabled:Yn.default.bool,name:Yn.default.string.isRequired,onClick:Yn.default.func};var Ys=(0,l.memo)(PartyMemberRowComponent);Ys.displayName="PartyMemberRow",Ys.propTypes=PartyMemberRowComponent.propTypes;var selectPartySlice=e=>({members:e.members,leader:e.leader,selfName:e.selfName,settings:e.settings,updateParty:e.updateParty,addMember:e.addMember,removeMember:e.removeMember,setLeader:e.setLeader,setSelf:e.setSelf,setSetting:e.setSetting}),useParty=()=>{const{stores:e}=useNexGui();return e.party(useShallow(selectPartySlice))},noopSubscribe=()=>()=>{},fallbackFalse=()=>!1,fallbackNull=()=>null,fallbackName=()=>"",fallbackColor=()=>"grey",getModelVersion=e=>"function"==typeof e?.getVersion?e.getVersion():0,createDirectoryBinding=(e,t)=>{const subscribe=g=>{const n=e?.subscribePlayerDirectory?.(g)??noopSubscribe(),C=t?.subscribePlayerRelationships?.(g)??noopSubscribe();return()=>{n?.(),C?.()}},getSnapshot=()=>`${getModelVersion(e)}:${getModelVersion(t)}`;return Object.freeze({getSnapshot,subscribe})},usePlayerDirectory=()=>{const{playerDirectory:e,playerRelationships:t}=useNexGui(),g=(0,l.useMemo)(()=>createDirectoryBinding(e,t),[e,t]),n=(0,l.useSyncExternalStore)(g.subscribe,g.getSnapshot,g.getSnapshot);return(0,l.useMemo)(()=>Object.freeze({version:n,getPlayerColor:e?.getPlayerColor?.bind(e)??fallbackColor,getPlayerProfile:e?.getPlayerProfile?.bind(e)??fallbackNull,isAllyPlayer:t?.isAllyPlayer?.bind(t)??fallbackFalse,isCityEnemyPlayer:t?.isCityEnemyPlayer?.bind(t)??fallbackFalse,isEnemyPlayer:t?.isEnemyPlayer?.bind(t)??fallbackFalse,resolvePlayerNameFromFullname:e?.resolvePlayerNameFromFullname?.bind(e)??fallbackName}),[e,t,n])},usePartyViewModel=()=>{const e=usePlayerDirectory(),{members:t,leader:g,selfName:n,settings:C,setLeader:I,addMember:o,removeMember:a,setSetting:i}=useParty();return(0,l.useMemo)(()=>{e.version;const s=t.map(t=>({color:e.getPlayerColor(t),disabled:t===n,name:t})),l=t.map(t=>({color:e.getPlayerColor(t),name:t})),c=ge.map(({key:e,label:t,tooltip:g})=>({key:e,label:t,tooltip:g,value:Boolean(C?.[e]),onChange:t=>i(e,t)}));return{addMember:o,leader:g&&t.includes(g)?g:"",leaderColor:g?e.getPlayerColor(g):null,leaderOptions:l,memberRows:s,members:t,removeMember:a,selfName:n,setLeader:I,toggles:c}},[o,g,t,e,a,n,I,i,C])},getFlipTransform$4=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},PartyPanelInner=()=>{const e=useTheme$1(),[t]=(0,l.useState)(()=>Math.floor(4*Math.random())),[g,n]=(0,l.useState)(""),{addMember:C,leader:I,leaderColor:o,leaderOptions:a,memberRows:i,members:s,removeMember:c,setLeader:u,toggles:d}=usePartyViewModel(),p=e?.nexGui?.backgroundImage??"",m=e?.nexGui?.backgroundOpacity??.5,h=e?.nexGui?.backgroundFilter??"none",y=(0,l.useCallback)(e=>{"Enter"===e.key&&g.trim()&&(C(g.trim()),n(""))},[C,g]);return React.createElement(Wn,{className:"party-panel",sx:{height:"100%",overflow:"hidden",position:"relative",width:"100%"}},p?React.createElement(Wn,{"aria-hidden":"true",className:"party-panel__background",sx:{backgroundImage:`url(${p})`,backgroundPosition:"center",backgroundSize:"cover",filter:h,inset:0,opacity:m,position:"absolute",transform:getFlipTransform$4(t),zIndex:0}}):null,React.createElement(Wn,{className:"party-panel__content",sx:{background:`linear-gradient(180deg, ${alpha("#050505",.28)} 0%, ${alpha("#050505",.56)} 100%)`,display:"grid",gridTemplateColumns:"1fr 1fr",gap:2,height:"100%",overflowY:"auto",p:1.25,position:"relative",width:"100%",zIndex:1}},React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:.5,minWidth:0}},React.createElement(_o,{label:"Add member",onChange:e=>n(e.target.value),onKeyDown:y,size:"small",sx:{mb:.5,width:"15ch"},value:g}),React.createElement(qn,{component:"span",sx:{color:"text.secondary",fontSize:11,fontWeight:700,letterSpacing:.4,pb:.25,textTransform:"uppercase"}},"Party Members"),s.length>0?i.map(e=>React.createElement(Ys,{color:e.color,disabled:e.disabled,key:e.name,name:e.name,onClick:c})):React.createElement(qn,{color:"text.secondary",variant:"body2"},"No party members")),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:1}},React.createElement(vo,{fullWidth:!0,size:"small"},React.createElement(yo,{id:"nexgui4-party-leader-label"},"Party Leader"),React.createElement(Zo,{disabled:0===s.length,label:"Party Leader",labelId:"nexgui4-party-leader-label",onChange:e=>u(e.target.value),sx:{color:o??"text.primary",minWidth:"18ch"},value:I},a.map(e=>React.createElement(KC,{key:e.name,sx:{color:e.color},value:e.name},e.name)))),React.createElement(BC,{sx:{my:.5}}),React.createElement(qn,{component:"span",sx:{color:"text.secondary",fontSize:11,fontWeight:700,letterSpacing:.4,textTransform:"uppercase"}},"Party Behaviour"),d.map(({key:e,label:t,tooltip:g,value:n,onChange:C})=>React.createElement(ls,{key:e,label:t,onChange:C,tooltip:g,value:n})))))};PartyPanelInner.displayName="PartyPanelInner";var PartyPanel=()=>React.createElement(Jn,{panelName:"Party"},React.createElement(PartyPanelInner,null));PartyPanel.displayName="PartyPanel";var Zs={color:Yn.default.string.isRequired,isAlly:Yn.default.bool,isEnemy:Yn.default.bool,isTarget:Yn.default.bool,name:Yn.default.string.isRequired},Qs=Yn.default.exact(Zs),RoomPlayerRowComponent=({onHover:e,onLeave:t,onSelect:g,player:n})=>{const C=n.isEnemy?"#ff0000":"#ffffff",I=n.isAlly||n.isEnemy;return React.createElement(Wn,{className:"room-player-row",onClick:()=>g(n.name),onMouseEnter:e,onMouseLeave:t,sx:{alignItems:"center",cursor:"pointer",display:"inline-flex",gap:.125,margin:"2px 4px",minHeight:e=>`${Number(e.typography.fontSize)+8}px`,outline:n.isTarget?"1px solid red":"",px:.25,py:.125,position:"relative",zIndex:1}},I?React.createElement(qn,{component:"span",sx:{color:C,fontWeight:700},variant:"body2"},"("):null,React.createElement(qn,{component:"span",sx:{color:n.color,fontWeight:700},variant:"body2"},n.name),I?React.createElement(qn,{component:"span",sx:{color:C,fontWeight:700},variant:"body2"},")"):null)};RoomPlayerRowComponent.displayName="RoomPlayerRow",RoomPlayerRowComponent.propTypes={onHover:Yn.default.func.isRequired,onLeave:Yn.default.func.isRequired,onSelect:Yn.default.func.isRequired,player:Qs.isRequired};var Xs=(0,l.memo)(RoomPlayerRowComponent);Xs.displayName="RoomPlayerRow",Xs.propTypes=RoomPlayerRowComponent.propTypes;var _s=new Set(["regex","user","time","loaded"]),formatCellValue=e=>Array.isArray(e)?e.join(", "):null!==e&&"object"==typeof e?JSON.stringify(e):String(e),qs=Yn.default.objectOf(Yn.default.oneOfType([Yn.default.string,Yn.default.number,Yn.default.bool,Yn.default.array,Yn.default.object])),PlayerPopoverComponent=({anchorEl:e=null,onClose:t,player:g})=>{const n=(0,l.useMemo)(()=>Object.entries(g??{}).flatMap(([e,t])=>_s.has(e)||null==t?[]:React.createElement("tr",{key:e},React.createElement("td",{style:{color:"cyan",padding:"0 5px 0 2px"}},e),React.createElement("td",{style:{padding:0}},formatCellValue(t)))),[g]);return g?React.createElement(dC,{anchorEl:e,anchorOrigin:{horizontal:"left",vertical:"top"},disableRestoreFocus:!0,onClose:t,open:Boolean(e),sx:{pointerEvents:"none"},slotProps:{paper:{sx:{backgroundColor:"#000000",border:"1px solid #ffffff"}}},transformOrigin:{horizontal:"right",vertical:"bottom"}},React.createElement("table",{style:{background:"black",borderSpacing:"0px",fontSize:"13px",margin:"10px",maxWidth:"100%",padding:"1px",textAlign:"left"}},React.createElement("thead",null,React.createElement("tr",null,React.createElement("th",{style:{width:"auto"}}),React.createElement("th",{style:{width:"auto"}}))),React.createElement("tbody",null,n))):null};PlayerPopoverComponent.displayName="PlayerPopover",PlayerPopoverComponent.propTypes={anchorEl:Yn.default.instanceOf(Element),onClose:Yn.default.func.isRequired,player:qs},PlayerPopoverComponent.defaultProps={player:null};var Js=(0,l.memo)(PlayerPopoverComponent);Js.displayName="PlayerPopover",Js.propTypes=PlayerPopoverComponent.propTypes;var resolvePlayerProfile=(e,t,g)=>mergePlayerPresentationProfile(g.getPlayerProfile(t),buildFallbackPlayerProfile(e,t)),useRoomPlayersViewModel=()=>{const{adapter:e}=useNexGui(),{players:t}=useRoom(),{name:g,target:n}=useCharacter(),{members:C}=useParty(),I=usePlayerDirectory(),o=(0,l.useMemo)(()=>{I.version;const e=new Set((C??[]).filter(e=>"string"==typeof e&&e.length>0&&e!==g)),o=I.getPlayerProfile(g)?.city??"";return[...t??[]].map(t=>{const g=resolveRoomPlayerName(t,I);if(!g)return null;const C=resolvePlayerProfile(t,g,I),a=!0===C?.loaded,i=I.isEnemyPlayer(g),s=I.isAllyPlayer(g)||e.has(g);let l=5;return a&&(l=i?0:s?1:C.city===o?2:"garden"===C.city?3:4),{color:resolvePlayerPresentationColor({name:g,profile:C,playerDirectory:I}),isAlly:s,isEnemy:i,isTarget:g===n,loaded:a,name:g,profile:C,priority:l}}).filter(Boolean).sort((e,t)=>e.priority!==t.priority?e.priority-t.priority:e.name.localeCompare(t.name))},[C,I,t,g,n]),a=(0,l.useCallback)(t=>{e?.send?.(`settarget ${t}`)},[e]);return(0,l.useMemo)(()=>({players:o,selectPlayer:a}),[o,a])},getFlipTransform$3=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},PlayersPanelInner=()=>{const e=useTheme$1(),{players:t,selectPlayer:g}=useRoomPlayersViewModel(),[n]=(0,l.useState)(()=>Math.floor(4*Math.random())),[C,I]=(0,l.useState)(null),[o,a]=(0,l.useState)(""),i=e?.nexGui?.backgroundImage??"",s=e?.nexGui?.backgroundOpacity??.5,c=e?.nexGui?.backgroundFilter??"none",u=o?t.find(e=>e.name===o)?.profile??null:null;(0,l.useEffect)(()=>{C&&(o&&t.some(e=>e.name===o)||(I(null),a("")))},[C,o,t]);const handleClosePopover=()=>{I(null),a("")};return 0===t.length?React.createElement(Wn,{className:"players-panel players-panel--empty",sx:{alignItems:"center",color:"text.secondary",display:"flex",flex:1,justifyContent:"center",p:2}},React.createElement(qn,{variant:"body2"},"No players in room")):React.createElement(Wn,{className:"players-panel",sx:{height:"100%",overflow:"hidden",position:"relative",width:"100%"}},i?React.createElement(Wn,{"aria-hidden":"true",className:"players-panel__background",sx:{backgroundImage:`url(${i})`,backgroundPosition:"center",backgroundSize:"cover",filter:c,inset:0,opacity:s,position:"absolute",transform:getFlipTransform$3(n),zIndex:0}}):null,React.createElement(Wn,{className:"players-panel__content",sx:{alignContent:"flex-start",background:`linear-gradient(180deg, ${alpha("#050505",.28)} 0%, ${alpha("#050505",.56)} 100%)`,color:"text.primary",display:"flex",flexDirection:"row",flexWrap:"wrap",height:"100%",overflowY:"auto",position:"relative",width:"100%",zIndex:1}},t.map((e,t)=>React.createElement(Xs,{key:`${e.name}-${t}`,onHover:t=>{e.loaded?(I(t.currentTarget),a(e.name)):handleClosePopover()},onLeave:handleClosePopover,onSelect:g,player:e}))),React.createElement(Js,{anchorEl:C,onClose:handleClosePopover,player:u?.loaded?u:null}))};PlayersPanelInner.displayName="PlayersPanelInner";var PlayersPanel=()=>React.createElement(Jn,{panelName:"Players"},React.createElement(PlayersPanelInner,null));PlayersPanel.displayName="PlayersPanel";var $s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAADUCAYAAACh36CaAAAACXBIWXMAAA7EAAAOxAGVKw4bAAA4HGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS41LWMwMjEgNzkuMTU0OTExLCAyMDEzLzEwLzI5LTExOjQ3OjE2ICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZ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PgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjY1NTM1PC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xNDE8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjEyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz6NaNPuAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAVqSURBVHja7Nt/TNRlHMDxz07vjjt+DqVAHJJmYaxWkQj+GP7MCbg0c5WuNdOtVVstbKw/ZLMWTnNaKrOmqBCRLuEYiCHoJbaFyB1igIaIDg7CBGbyQzAiP/3RMK1kXP35fX+3977/fJ9/nr32PHf3fE9UVYi8iUkg0BBoCDQEGgINEWgINAQaAg2BhsjIaO6+QkOCJXpqpDwcGS4h44Ls05+MmvP6K8tWfZi6bvXWtLdemB37xNPhoeOtPlaLjA8OlOAg/3vGg8ZgaEwmk/j52iRyYqjMmv548ttrV+7ZszXVVZS1uf1k3s6rZQe3N+/b/n556purdj86JSLZbB4rFosZNEZfacIeCH5k96aU+q7aYtXOStXOMzrYfFJ7Lx3Xm5eOq3ZUql47rR0/FGlG+ru1gf6+k0BjbDRRR7I//lV/b9AbPx7TVrdDPe58bXU7/sr15737Yqnq7Yuan5neIyKRoDEomnfWrizSW/XaVl2gHpfjXix/y+PK15/OFqj21+obry4vAI0x0YSfcmQM6s8V6nHljwjmbjh67bR++/WOWyISBhqDofHztcfXObO1//KJUYEZrv/yCa0p2682H0s8aAyGxm7zWXi2dL8OXHF6icaprpJMtVrM80BjPDQz/guagStOrfpmr1rMY2NAYzA0Ex4c/1itM1tver09OdVdknnbajFPBo2B0AT4+yY8t3hOZWXxnsGbTd6h6W0s0wvlX2pcTPRhi3nsctAYBI3JZIrNSE/p62s6rlfPFXqFpqv+qHbUFeuS+XGH7TZrEmiMsz35rFu1tGao9ZTXaHoay7Thu1x9KCIsVUQmgMY4aKI+3/xep3ad8QpMq9uhHX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9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6d2hlbj4yMDE1LTA0LTA2VDExOjI4OjM0LTA3OjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ0MgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgPC9yZGY6U2VxPgogICAgICAgICA8L3htcE1NOkhpc3Rvcnk+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjk2MDAwMC8xMDAwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+OTYwMDAwLzEwMDAwPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjY1NTM1PC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xNDE8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjEyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz5sInMIAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAllSURBVHja7N35c1X1Gcfxh8YFiMGAICBV6ajjqBSqMC6MIpZYtS5AFRRxGxF0jIBVJNYWEVyYEbHWiis6KqBCck8SQkggYYeQ5C5kRQgBk3uzkgUCJCpqPv0hEnJvbpzpdNofmvcz8/4Hzrxyzsn3fs85JsmI/p04CAQaAg2BhkBDoCECDYGGQEOgIdAQgYZAQ6Ah0BBoiEBDoCHQEGgINAQaDgKBhkBDoCHQEGiIQEOgIdAQaAg0RKAh0BBoCDQEGiLQEGj+Rw3q2WtY74jTpv0qIuKeqKjIaREREePNr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KByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKBz6X15rejmpXenZAAAAAElFTkSuQmCC",rl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAADUCAYAAACh36CaAAAACXBIWXMAAA7EAAAOxAGVKw4bAAA4HGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS41LWMwMjEgNzkuMTU0OTExLCAyMDEzLzEwLzI5LTExOjQ3OjE2ICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIKICAgICAgICAgICAgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIgogICAgICAgICAgICB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIKICAgICAgICAgICAgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9i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ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjEyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz7RAlCYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYA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5OjIyLTA3OjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ0MgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgPC9yZGY6U2VxPgogICAgICAgICA8L3htcE1NOkhpc3Rvcnk+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjk2MDAwMC8xMDAwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+OTYwMDAwLzEwMDAwPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjY1NTM1PC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xNDE8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjEyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz40H0NbAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAmNSURBVHja7N1pdFT1GcfxJ4IEEDyALO5LQDTUY92rtZSKLbVWLQW7HKyAIIjaWj1QBFuWFlmqFFyAlMjiOYBsmZlISFiSCAlLlplJDAbExEAyWSAbAZJAEOXXF5Bhhkms2r5ivv9zvi/nzTyfM3Pn3vu/Y5KM6NvEm0CgIdAQaAg0BBoi0BBoCDQEGgINEWgINAQaAg2Bhgg0BBoCDYGGQEOg4U0g0BBoCDQEGgINEWgINAQaAg2Bhgg0BBoCDYGGQEMEGroo0PwfVlSH9pEjO13W4emIiIih7dpdOjoysl1vBg2a1taAAQ/c+ZlzyUy5lszSzEljtWj2eH2wcNo4Bg2aC9clZrZ65sQxUuVuqT5XqsqUqrPOlTm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IDxleGlmOlBpeGVsWERpbWVuc2lvbj4xNDE8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjEyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgC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htcC5paWQ6MWJhMjM4ODItZGYyNi0wZDQ5LThjNTgtMzMzNThlYzBkMTZjPC9zdEV2dDppbnN0YW5jZUlEPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6d2hlbj4yMDE1LTA0LTA2VDExOjM1OjU2LTA3OjAwPC9zdEV2dDp3aGVuPgogICAgICAgICAgICAgICAgICA8c3RFdnQ6c29mdHdhcmVBZ2VudD5BZG9iZSBQaG90b3Nob3AgQ0MgKFdpbmRvd3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgPC9yZGY6U2VxPgogICAgICAgICA8L3htcE1NOkhpc3Rvcnk+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjk2MDAwMC8xMDAwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+OTYwMDAwLzEwMDAwPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjY1NTM1PC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xNDE8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjEyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz7d8hayAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAuGSURBVHja7N15cBRlHsbxHxIXCy9UEAEVXBFUxFW28EJdVlfx2AVXYLkVQdYtoKAUD3QV5VQOXYKAHEaIiBxJ92QyyYQkJARIIMn0TO6LcCTTmUlCJjMJCQn3s39wWArhSgYzw5OqbyV/JKmpqU91v9Pv+3YLAGHsUuKbwIiGEQ0jGkY0jGgYIxpGNIxoGNEwomGMaBjRMKJhRMOIhjGiYUTDiIYRDSMaRjR8ExjRMKJ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OX9XD5o0tBUFZ7aJvCbKb2SlDR4r5fcrHUUOXE8G2H+SToZOpodsJbxtxltTe5/TX3mceO51Nqyj/X0ybzdf/J1YUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGPR/A9LPIYPjR/AAAAAASUVORK5CYII=",sl=Object.freeze([{key:"head",label:"H:"},{key:"torso",label:"T:"},{key:"leftarm",label:"LA:"},{key:"rightarm",label:"RA:"},{key:"leftleg",label:"LL:"},{key:"rightleg",label:"RL:"}]),normalizeValue=e=>{const t=Number(e);return Number.isFinite(t)?`${Math.round(t)}`:"0"},ll=Yn.default.shape({head:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired,torso:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired,leftarm:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired,rightarm:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired,leftleg:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired,rightleg:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired}),LimbColumnComponent=({values:e})=>React.createElement(Wn,{"aria-hidden":"true",className:"nexus-man__limb-column",sx:{color:"text.primary",display:"flex",flexDirection:"column",fontSize:13,lineHeight:1.5,minWidth:"8ch",width:"8ch"}},sl.map(({key:t,label:g})=>React.createElement(Wn,{className:`nexus-man__limb-row nexus-man__limb-row--${t}`,key:t,sx:{display:"flex",justifyContent:"space-between",width:"8ch"}},React.createElement(qn,{component:"span",sx:{color:"text.primary",fontFamily:"inherit",fontSize:"inherit",width:"3ch"}},g),React.createElement(qn,{component:"span",sx:{color:"text.primary",fontFamily:"inherit",fontSize:"inherit",textAlign:"left",width:"5ch"}},normalizeValue(e[t])))));LimbColumnComponent.displayName="LimbColumn",LimbColumnComponent.propTypes={values:ll.isRequired};var cl=(0,l.memo)(LimbColumnComponent);cl.displayName="LimbColumn",cl.propTypes=LimbColumnComponent.propTypes;var ul=Object.freeze({male:Object.freeze({head:el,torso:il,leftarm:gl,rightarm:Cl,leftleg:nl,rightleg:ol}),female:Object.freeze({head:$s,torso:al,leftarm:tl,rightarm:Al,leftleg:rl,rightleg:Il})}),dl=Object.freeze([{key:"leftleg",label:"left leg"},{key:"rightleg",label:"right leg"},{key:"torso",label:"torso"},{key:"head",label:"head"},{key:"leftarm",label:"left arm"},{key:"rightarm",label:"right arm"}]),pl=Yn.default.shape({percent:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),value:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),damagePercent:Yn.default.oneOfType([Yn.default.number,Yn.default.string])}),normalizeGender=e=>"string"==typeof e&&"female"===e.trim().toLowerCase()?"female":"male",normalizeAfflictions=e=>Array.isArray(e)?e.map(e=>"string"==typeof e?e.trim().toLowerCase():`${e??""}`.trim().toLowerCase()).filter(e=>e.length>0):[],toNumericValue=e=>{const t=Number(e);return Number.isFinite(t)?t:0},getLimbEntry=(e,t)=>{const g=[t];"leftarm"===t?g.push("leftArm"):"rightarm"===t?g.push("rightArm"):"leftleg"===t?g.push("leftLeg"):"rightleg"===t&&g.push("rightLeg");for(const n of g)if(e?.[n])return e[n];return{}},buildLimbValues=e=>({head:toNumericValue(getLimbEntry(e,"head").percent??getLimbEntry(e,"head").value),torso:toNumericValue(getLimbEntry(e,"torso").percent??getLimbEntry(e,"torso").value),leftarm:toNumericValue(getLimbEntry(e,"leftarm").percent??getLimbEntry(e,"leftarm").value),rightarm:toNumericValue(getLimbEntry(e,"rightarm").percent??getLimbEntry(e,"rightarm").value),leftleg:toNumericValue(getLimbEntry(e,"leftleg").percent??getLimbEntry(e,"leftleg").value),rightleg:toNumericValue(getLimbEntry(e,"rightleg").percent??getLimbEntry(e,"rightleg").value)}),getLimbState=(e,t)=>{if("torso"===t){if(e.includes("mildtrauma"))return"mild-trauma";if(e.includes("serioustrauma"))return"serious-trauma"}return e.includes(`broken${t}`)?"broken":e.includes(`damaged${t}`)?"damaged":e.includes(`mangled${t}`)?"mangled":"healthy"},getFilterReference=(e,t)=>"broken"===e?`url(#${t.yellow})`:"damaged"===e||"mild-trauma"===e?`url(#${t.orange})`:"mangled"===e||"serious-trauma"===e?`url(#${t.red})`:"",NexusManComponent=({currentAffs:e=[],gender:t="male",limbs:g={}})=>{const n=(0,l.useId)().replace(/[:]/g,""),C={yellow:`${n}-yellowShift`,orange:`${n}-orangeShift`,red:`${n}-redShift`},I=normalizeGender(t),o=ul[I],a=normalizeAfflictions(e),i=buildLimbValues(g);return React.createElement(Wn,{"aria-label":"NexusMan body status display",className:"nexus-man","data-gender":I,role:"img",sx:{alignItems:"center",display:"flex",flexDirection:"row",gap:1,justifyContent:"center",width:"100%"}},React.createElement("svg",{"aria-hidden":"true",height:"0",width:"0"},React.createElement("defs",null,React.createElement("filter",{id:C.yellow},React.createElement("feColorMatrix",{type:"matrix",values:"1 0 0 0 0\n 0 1 0 0 0\n 0 0 0 0 0\n 0 0 0 1 0"})),React.createElement("filter",{id:C.orange},React.createElement("feColorMatrix",{type:"matrix",values:"1 1 0 0 0\n 0 0.45 0 0 0\n 0 0 0 0 0\n 0 0 0 1 0"})),React.createElement("filter",{id:C.red},React.createElement("feColorMatrix",{type:"matrix",values:"1 0 0 0 0\n 0 0 0 0 0\n 0 0 0 0 0\n 0 0 0 1 0"})))),React.createElement(Wn,{className:"nexus-man__figure",sx:{flex:"1 1 auto",height:"100%",maxWidth:"202px",minHeight:"120px",overflow:"hidden",position:"relative",width:"100%"}},dl.map(({key:e,label:t})=>{const g=getLimbState(a,e),n=getFilterReference(g,C);return React.createElement(Wn,{alt:"","aria-hidden":"true",className:`nexus-man__layer nexus-man__layer--${e}`,component:"img","data-damage-state":g,"data-limb":e,key:e,src:o[e],sx:{filter:n,height:"100%",left:0,objectFit:"contain",position:"absolute",top:0,width:"100%"},title:t})})),React.createElement(cl,{values:i}))};NexusManComponent.displayName="NexusMan",NexusManComponent.propTypes={currentAffs:Yn.default.arrayOf(Yn.default.string),gender:Yn.default.oneOf(["male","female"]),limbs:Yn.default.objectOf(pl)};var ml=(0,l.memo)(NexusManComponent);ml.displayName="NexusMan",ml.propTypes=NexusManComponent.propTypes;var fl=Object.freeze(["hp","mp","ep","wp","nl"]),clamp$1=(e,t,g)=>Math.min(g,Math.max(t,e)),normalizeNumber$2=e=>{const t=Number(e);return Number.isFinite(t)?t:0},formatNumber=e=>normalizeNumber$2(e).toLocaleString(),getBaseColor=(e,t)=>e?.palette?.[t]?.main??e?.nexGui?.tokens?.game?.[t]??Bt.game[t],getPercentage=(e,t)=>{const g=normalizeNumber$2(e),n=normalizeNumber$2(t);return n<=0?0:clamp$1(g/n*100,0,100)},getHpColor=e=>e<=25?"#d9534f":e<=50?"#d9832e":e<=75?"#b7b33d":"#2fa35a",getGaugeColor=(e,t,g)=>"hp"===t?getHpColor(g):getBaseColor(e,t),StatBarComponent=({type:e,current:t,max:g,label:n=e.toUpperCase()})=>{const C=useTheme$1(),I=normalizeNumber$2(t),o=normalizeNumber$2(g),a=getPercentage(I,o),i=getGaugeColor(C,e,a),s=`${Math.round(a)}%`;return React.createElement(Wn,{className:`stat-bar stat-bar--${e}`,sx:{minWidth:0,width:"100%"}},React.createElement(Wn,{"aria-label":n,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":Math.round(a),className:`stat-bar__progress stat-bar__progress--${e}`,role:"progressbar",sx:{backgroundColor:alpha(i,.14),border:`1px solid ${alpha(i,.48)}`,borderRadius:1,minHeight:22,overflow:"hidden",position:"relative",width:"100%"}},React.createElement(Wn,{"aria-hidden":"true",sx:{backgroundColor:i,bottom:0,left:0,opacity:.68,position:"absolute",top:0,transition:"width 180ms ease",width:`${a}%`}}),React.createElement(Wn,{sx:{alignItems:"center",color:"text.primary",display:"flex",gap:1,justifyContent:"space-between",minHeight:22,px:.75,position:"relative",zIndex:1}},React.createElement(qn,{component:"span",sx:{color:"text.primary",fontSize:11,fontWeight:700,letterSpacing:.5,textTransform:"uppercase"}},n),React.createElement(qn,{component:"span",sx:{color:"text.primary",fontSize:11,fontVariantNumeric:"tabular-nums",textShadow:"0 0 3px rgba(0, 0, 0, 0.85)"}},formatNumber(I)," / ",formatNumber(o)," (",s,")"))))};StatBarComponent.displayName="StatBar",StatBarComponent.propTypes={current:Yn.default.number.isRequired,label:Yn.default.string,max:Yn.default.number.isRequired,type:Yn.default.oneOf(fl).isRequired};var hl=(0,l.memo)(StatBarComponent);hl.displayName="StatBar",hl.propTypes=StatBarComponent.propTypes;var selectStatsSlice=e=>({hp:e.hp,mp:e.mp,ep:e.ep,wp:e.wp,nl:e.nl,gold:e.gold,bank:e.bank,xp:e.xp,xpToNext:e.xpToNext,target:e.target,updateStats:e.updateStats}),useStats=()=>{const{stores:e}=useNexGui();return e.stats(useShallow(selectStatsSlice))},yl=Object.freeze([{type:"hp",label:"HP"},{type:"mp",label:"MP"},{type:"ep",label:"EP"},{type:"wp",label:"WP"},{type:"nl",label:"NL"}]),getFlipTransform$2=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},Indicator=({className:e,label:t,ready:g})=>React.createElement(Wn,{className:e,sx:{alignItems:"center",backgroundColor:g?"rgba(18, 42, 26, 0.82)":"rgba(24, 24, 24, 0.82)",border:"1px solid",borderColor:g?"rgba(102, 221, 144, 0.7)":"rgba(192, 176, 144, 0.22)",borderRadius:999,color:g?"#66dd90":"text.disabled",display:"inline-flex",gap:.5,px:1,py:.25}},React.createElement(Wn,{"aria-hidden":"true",sx:{backgroundColor:g?"#66dd90":"rgba(192, 176, 144, 0.35)",borderRadius:"50%",boxShadow:g?"0 0 8px rgba(102, 221, 144, 0.5)":"none",flexShrink:0,height:6,width:6}}),React.createElement(qn,{component:"span",sx:{color:"inherit",fontSize:11,fontWeight:700,letterSpacing:.5,textTransform:"uppercase"}},t)),StatsPanelInner=()=>{const e=useTheme$1(),[t]=(0,l.useState)(()=>Math.floor(4*Math.random())),{hp:g,mp:n,ep:C,wp:I,nl:o}=useStats(),{balance:a,currentAffs:i,equilibrium:s,gender:c,limbs:u}=useCharacter(),d=e?.nexGui?.backgroundImage??"",p=e?.nexGui?.backgroundOpacity??.5,m=e?.nexGui?.backgroundFilter??"none";return React.createElement(Wn,{className:"stats-panel",sx:{height:"100%",overflow:"hidden",position:"relative",width:"100%"}},d?React.createElement(Wn,{"aria-hidden":"true",className:"stats-panel__background",sx:{backgroundImage:`url(${d})`,backgroundPosition:"center",backgroundSize:"cover",filter:m,inset:0,opacity:p,position:"absolute",transform:getFlipTransform$2(t),zIndex:0}}):null,React.createElement(Wn,{className:"stats-panel__content",sx:{background:`linear-gradient(180deg, ${alpha("#050505",.3)} 0%, ${alpha("#050505",.55)} 100%)`,display:"flex",flexDirection:"column",gap:1,height:"100%",p:1,position:"relative",width:"100%",zIndex:1}},React.createElement(Wn,{className:"stats-panel__body",sx:{alignItems:"center",display:"flex",justifyContent:"center",minHeight:120}},React.createElement(ml,{currentAffs:i,gender:c??"male",limbs:u})),React.createElement(Wn,{className:"stats-panel__indicators",sx:{display:"flex",gap:1,justifyContent:"center"}},React.createElement(Indicator,{className:"stats-panel__balance stats-panel__balance--"+(a?"ready":"waiting"),label:"Balance",ready:a}),React.createElement(Indicator,{className:"stats-panel__equilibrium stats-panel__equilibrium--"+(s?"ready":"waiting"),label:"Equilibrium",ready:s})),React.createElement(Wn,{className:"stats-panel__bars",sx:{display:"flex",flex:"1 1 auto",flexDirection:"column",gap:.75,justifyContent:"flex-end"}},yl.map(({type:e,label:t})=>{const a={hp:g,mp:n,ep:C,wp:I,nl:o}[e]??{current:0,max:0};return React.createElement(hl,{current:a.current??0,key:e,label:t,max:a.max??0,type:e})}))))};Indicator.displayName="StatsPanelIndicator",Indicator.propTypes={className:Yn.default.string.isRequired,label:Yn.default.string.isRequired,ready:Yn.default.bool.isRequired},StatsPanelInner.displayName="StatsPanelInner";var StatsPanel=()=>React.createElement(Jn,{panelName:"Stats"},React.createElement(StatsPanelInner,null));StatsPanel.displayName="StatsPanel";var SystemStreamInner=()=>{const{adapter:e,stores:t}=useNexGui(),{items:g,version:n}=useTranscript(t.systemStream),C=(0,l.useCallback)(t=>e.send(t),[e]);return React.createElement(pA,{itemKeyVersion:n,items:g,onSendCommand:C})};SystemStreamInner.displayName="SystemStreamInner";var SystemStream=()=>React.createElement(Jn,{panelName:"System Stream"},React.createElement(SystemStreamInner,null));SystemStream.displayName="SystemStream";var getFlipTransform$1=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},TargetPanelInner=()=>{const e=useTheme$1(),[t]=(0,l.useState)(()=>Math.floor(4*Math.random())),g=e?.nexGui?.backgroundImage??"",n=e?.nexGui?.backgroundOpacity??.5,C=e?.nexGui?.backgroundFilter??"none";return React.createElement(Wn,{className:"target-panel",sx:{height:"100%",overflow:"hidden",position:"relative",width:"100%"}},g?React.createElement(Wn,{"aria-hidden":"true",className:"target-panel__background",sx:{backgroundImage:`url(${g})`,backgroundPosition:"center",backgroundSize:"cover",filter:C,inset:0,opacity:n,position:"absolute",transform:getFlipTransform$1(t),zIndex:0}}):null,React.createElement(Wn,{className:"target-panel__content",sx:{background:`linear-gradient(180deg, ${alpha("#050505",.18)} 0%, ${alpha("#050505",.36)} 100%)`,display:"flex",flexDirection:"column",height:"100%",minHeight:0,position:"relative",width:"100%",zIndex:1}},React.createElement(Wn,{className:"target-panel__body",sx:{alignItems:"center",display:"flex",flex:1,justifyContent:"center",minHeight:0,p:1}},React.createElement(ml,{currentAffs:[],gender:"male",limbs:{}}))))};TargetPanelInner.displayName="TargetPanelInner";var TargetPanel=()=>React.createElement(Jn,{panelName:"Target"},React.createElement(TargetPanelInner,null));TargetPanel.displayName="TargetPanel";var clamp=(e,t,g)=>Math.min(g,Math.max(t,e)),normalizeNumber$1=e=>{const t=Number(e);return Number.isFinite(t)?t:0},normalizeDirection=(e,t)=>"countup"===e||!1===t?"countup":"countdown",getElapsedMs=(e,t)=>Math.max(0,normalizeNumber$1(t)-normalizeNumber$1(e)),getElapsedPercentage=(e,t)=>{const g=Math.max(0,Math.abs(normalizeNumber$1(t)));return g<=0?100:clamp(e/g*100,0,100)},formatTimerValue=e=>{const t=Math.max(0,normalizeNumber$1(e))/1e3;return t<10?`${t.toFixed(1)}s`:t<=60?`${t.toFixed(0)}s`:`${Math.floor(t/60)}m ${(t%60).toFixed(0)}s`},hslToHex=(e,t=100,g=50)=>{const n=g/100,k=t=>(t+e/30)%12,C=t/100*Math.min(n,1-n),f=e=>n-C*Math.max(-1,Math.min(k(e)-3,Math.min(9-k(e),1)));return"#"+[f(0),f(8),f(4)].map(e=>Math.round(255*e).toString(16).padStart(2,"0")).join("")},getGradientColor=e=>hslToHex(1.2*clamp(normalizeNumber$1(e),0,100),100,e<75?50:Math.abs(e-100)/2+25),getProgressValue=(e,t,g)=>{const n=getElapsedPercentage(e,t);return"countup"===g?n:clamp(100-n,0,100)},TimerBarComponent=({id:e,label:t,durationMs:g,startedAt:n,elapsedMs:C=0,now:I,tickIntervalMs:o,running:a=!0,direction:i="countdown",countDown:s})=>{const l=useTheme$1(),c=Math.max(0,Math.abs(normalizeNumber$1(g))),u=normalizeDirection(i,s),d=clamp(!1!==a&&null!=n?getElapsedMs(n,I):normalizeNumber$1(C),0,c),p=getProgressValue(d,c,u),m=formatTimerValue(c-d),h=t?.trim()||e,y=getGradientColor(p),b=Math.max(22,normalizeNumber$1(l?.typography?.fontSize)+10),v=`${h} (${m})`,x=Math.max(0,normalizeNumber$1(o)),S=0===p||100===p?"none":`transform ${x}ms linear, background-color ${x}ms linear`;return React.createElement(Wn,{className:`timer-bar timer-bar--${u}`,"data-timer-id":e,sx:{border:"1.5px solid #aaa",borderRadius:"6px",fontSize:l.typography.fontSize,margin:"3px 0",overflow:"hidden",position:"relative",width:"100%"}},React.createElement(Va,{"aria-label":h,"aria-valuetext":v,className:`timer-bar__progress timer-bar__progress--${u}`,sx:{backgroundColor:"transparent",height:b,"& .MuiLinearProgress-bar":{backgroundColor:y,borderRadius:"4px",transition:S}},value:p,variant:"determinate"}),React.createElement(Wn,{sx:{alignItems:"center",color:"#FFF5D6",display:"flex",inset:0,px:1.25,pointerEvents:"none",position:"absolute"}},React.createElement(qn,{component:"span",sx:{color:"inherit",fontSize:"inherit",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",textShadow:"-1px -1px 1px #000, 1px -1px 1px #000, -1px 1px 1px #000, 1px 1px 1px #000",whiteSpace:"nowrap"},variant:"body2"},v)))};TimerBarComponent.displayName="TimerBar",TimerBarComponent.propTypes={countDown:Yn.default.bool,direction:Yn.default.oneOf(["countup","countdown"]),durationMs:Yn.default.number.isRequired,elapsedMs:Yn.default.number,id:Yn.default.string.isRequired,label:Yn.default.string.isRequired,now:Yn.default.number.isRequired,running:Yn.default.bool,startedAt:Yn.default.number,tickIntervalMs:Yn.default.number.isRequired};var bl=(0,l.memo)(TimerBarComponent);bl.displayName="TimerBar",bl.propTypes=TimerBarComponent.propTypes;var vl=[],normalizeNumber=e=>{const t=Number(e);return Number.isFinite(t)?t:0},isRunningTimer=e=>!1!==e?.running&&null!=e?.startedAt,getRemainingMs=(e,t)=>{const g=Math.max(0,Math.abs(normalizeNumber(e.durationMs))),n=Math.max(0,normalizeNumber(t)-normalizeNumber(e.startedAt));return Math.max(0,g-n)},getClockState=(e,t)=>{let g=1/0,n=!1;for(const C of e??[])isRunningTimer(C)&&(n=!0,g=Math.min(g,getRemainingMs(C,t)));return{isTicking:n,tickIntervalMs:n&&g<1e4?100:500}},useTimerClock=(e=vl)=>{const[t,g]=(0,l.useState)(()=>Date.now()),{isTicking:n,tickIntervalMs:C}=(0,l.useMemo)(()=>getClockState(e,t),[t,e]);return(0,l.useEffect)(()=>{if(!n)return;const tick=()=>g(Date.now());tick();const e=setInterval(tick,C);return()=>clearInterval(e)},[n,C]),(0,l.useMemo)(()=>({now:t,tickIntervalMs:C,isTicking:n}),[n,t,C])},selectTimerView=({id:e,durationMs:t,startedAt:g,label:n,direction:C,position:I,stayVisible:o,enabled:a,running:i,elapsedMs:s,remainingMs:l})=>({id:e,durationMs:t,startedAt:g,label:n,direction:C,position:I,stayVisible:o,enabled:a,running:i,elapsedMs:s,remainingMs:l}),selectTimersSlice=e=>({timerEntries:e.timers,addTimer:e.addTimer,removeTimer:e.removeTimer,clearAll:e.clearAll}),useTimers=()=>{const{stores:e}=useNexGui(),{timerEntries:t,addTimer:g,removeTimer:n,clearAll:C}=e.timers(useShallow(selectTimersSlice)),I=(0,l.useMemo)(()=>t.map(selectTimerView),[t]);return(0,l.useMemo)(()=>({timers:I,addTimer:g,removeTimer:n,clearAll:C}),[g,C,n,I])},getFlipTransform=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},normalizePosition=e=>"bottom"===e?"bottom":"top",partitionTimers=e=>e.reduce((e,t)=>(e[normalizePosition(t.position)].push(t),e),{top:[],bottom:[]}),TimersPanelInner=()=>{const e=useTheme$1(),{timers:t}=useTimers(),[g]=(0,l.useState)(()=>Math.floor(4*Math.random())),n=e?.nexGui?.backgroundImage??"",C=e?.nexGui?.backgroundOpacity??.5,I=e?.nexGui?.backgroundFilter??"none",{now:o,tickIntervalMs:a}=useTimerClock(t),{top:i,bottom:s}=(0,l.useMemo)(()=>partitionTimers(t),[t]);return React.createElement(Wn,{className:"timers-panel",sx:{color:"text.primary",fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize,height:"100%",overflow:"hidden",position:"relative",width:"100%"}},n?React.createElement(Wn,{"aria-hidden":"true",className:"timers-panel__background",sx:{backgroundImage:`url(${n})`,backgroundPosition:"center",backgroundSize:"cover",filter:I,inset:0,opacity:C,position:"absolute",transform:getFlipTransform(g),zIndex:0}}):null,React.createElement(Wn,{className:"timers-panel__content","data-testid":"timers-panel",sx:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between",overflowY:"auto",p:1,position:"relative",width:"100%",zIndex:1}},React.createElement(Wn,{className:"timers-panel__stack timers-panel__stack--top","data-testid":"timers-panel-top",sx:{display:"flex",flexDirection:"column"}},i.map(e=>React.createElement(bl,{key:e.id,countDown:e.countDown,direction:e.direction,durationMs:e.durationMs,elapsedMs:e.elapsedMs,id:e.id,label:e.label,now:o,running:e.running,startedAt:e.startedAt,tickIntervalMs:a}))),React.createElement(Wn,{className:"timers-panel__stack timers-panel__stack--bottom","data-testid":"timers-panel-bottom",sx:{display:"flex",flexDirection:"column"}},s.map(e=>React.createElement(bl,{key:e.id,countDown:e.countDown,direction:e.direction,durationMs:e.durationMs,elapsedMs:e.elapsedMs,id:e.id,label:e.label,now:o,running:e.running,startedAt:e.startedAt,tickIntervalMs:a})))))};TimersPanelInner.displayName="TimersPanelInner";var TimersPanel=()=>React.createElement(Jn,{panelName:"Timers"},React.createElement(TimersPanelInner,null));TimersPanel.displayName="TimersPanel";var xl=Object.freeze(["nexTimers","nexParty","nexPlayers","nexNpcs","nexItems","nexStats","nexSystem","nexCombat","nexDefences","nexFeed","nexTarget","nexOptions","nexMetrics"]),getTabComponents=()=>({nexTimers:TimersPanel,nexParty:PartyPanel,nexPlayers:PlayersPanel,nexNpcs:NpcsPanel,nexItems:ItemsPanel,nexStats:StatsPanel,nexSystem:SystemStream,nexCombat:CombatStream,nexDefences:DefencesPanel,nexFeed:GameFeed,nexTarget:TargetPanel,nexOptions:OptionsPanel,nexMetrics:MetricsPanel}),getLayout$1=()=>nexusclient.ui().layout(),getStoredLayout=e=>nexusclient._ui?._layout??e,createTabNode=e=>({type:"tab",id:e,name:e,component:e,icon:"feather-pointed",helpText:e}),resolveContextValue=e=>{const t=e??globalThis.nexGui?.__contextValue;if(!t)throw new Error("[nexGui4] initializeTabs requires a NexGuiContext value from the active runtime.");return t},selectThemeTokens=e=>e.tokens,NexusTabRoot=({Component:e,contextValue:t})=>{const g=t.stores.theme(selectThemeTokens),n=l.useMemo(()=>createMuiTheme(g),[g]);return l.createElement(_t.Provider,{value:t},l.createElement(StyledEngineProvider,{injectFirst:!0},l.createElement(ThemeProvider,{theme:n},l.createElement(Wn,{className:"nexgui4-panel-root",sx:{display:"flex",flex:1,height:"100%",minHeight:0,minWidth:0,width:"100%"}},l.createElement(e)))))},registerTabFactory=(e,t,g,n)=>{e.nexoverrides[t]=e=>l.createElement(NexusTabRoot,{Component:g,contextValue:n})},generateTabs=({skipIds:e=[]}={})=>{const t=getLayout$1().flexModel,g=t.getNodeById("map");if(!g)return console.warn("[nexGui4] generateTabs(): map node not found in layout model."),[...xl];const n=g.getParent?.()?.getId?.()||"root";return xl.forEach(g=>{e.includes(g)||t.getNodeById(g)||t.doAction({type:"FlexLayout_AddNode",data:{json:createTabNode(g),toNode:n,location:"center"}})}),[...xl]},mountNativeDisplay=({contextValue:e}={})=>{const t=resolveContextValue(e),g=getLayout$1();void 0===g.nexoverrides&&(g.nexoverrides={}),g.nexoverrides.output_main=e=>l.createElement(NexusTabRoot,{Component:MainDisplay,contextValue:t});try{nexusclient.buffer().limit=100}catch{}},unmountNativeDisplay=()=>{const e=getLayout$1();delete e?.nexoverrides?.output_main;try{nexusclient.buffer().limit=0}catch{}},initializeTabs=({contextValue:e}={})=>{const t=resolveContextValue(e),g=getLayout$1(),n=getStoredLayout(g),C=g.flexModel;return void 0===g.get_tab_object_original&&(g.get_tab_object_original=g.get_tab_object),void 0===n.get_tab_object_original&&(n.get_tab_object_original=g.get_tab_object_original),void 0===g.nexoverrides&&(g.nexoverrides={}),Object.entries(getTabComponents()).forEach(([e,n])=>{registerTabFactory(g,e,n,t)}),g.get_tab_object=function(e,t){return this.nexoverrides[e]?this.nexoverrides[e](t):nexusclient._ui._layout.get_tab_object_original(e,t)},C.doAction({data:{tabNode:"map"},type:"FlexLayout_SelectTab"}),g.nexoverrides},Sl="nexGuiLayout",getLayout=()=>nexusclient.ui().layout(),setModelPreservingGlobal=({layout:e,borders:t})=>{const g=getLayout(),n=g.flexModel.toJson();g.set_model({global:n.global,borders:t,layout:e})},applyLayoutPreset=e=>{const t=getLayoutPreset(e);return!!t&&(setModelPreservingGlobal(t),!0)},saveCurrentLayout=()=>{const e=getLayout().model();return nexusclient.variables().vars[Sl]={layout:JSON.stringify(e.layout),borders:JSON.stringify(e.borders)},!0},readSavedLayout=()=>{const e=nexusclient.variables?.()?.vars?.[Sl];if(!e?.layout||!e?.borders)return null;try{return{layout:JSON.parse(e.layout),borders:JSON.parse(e.borders)}}catch{return null}},hasSavedLayout=()=>null!==readSavedLayout(),restoreSavedLayout=()=>{const e=readSavedLayout();return!!e&&(setModelPreservingGlobal(e),!0)},getRawText=e=>e?"function"==typeof e.parsed_line?.text?e.parsed_line.text():"string"==typeof e.line?e.line:"":"",getFormattedHtml=e=>e?"function"==typeof e.parsed_line?.formatted?e.parsed_line.formatted():getRawText(e):"",patchFormatted=(e,t)=>{e?.parsed_line&&"object"==typeof e.parsed_line&&(e.parsed_line.formatted=()=>t)},createIconRenderer=()=>{const e=createMessageReplacementContext();return t=>buildIconHtml(t.id,t.colors,t.size,e.icons.dualTone)},lineContains=(e,t)=>!!getRawText(e).includes(t)||!("string"!=typeof e?.line||!e.line.includes(t)),findBlockIndex=(e,t)=>e.findIndex(e=>lineContains(e,t)),applyRoomReplacements=e=>{if(!Array.isArray(e)||0===e.length)return;const t=findBlockIndex(e,"<RName");if(t<0)return;const g=e[t],n=e[t+1];if(!n)return;const C=getFormattedHtml(n),I=replaceRoomText(C,{iconRenderer:createIconRenderer()});if(I!==C&&patchFormatted(n,I),(getRawText(g)||getFormattedHtml(g)).includes("Flying above"))return;const o=globalThis.nexMap;if(!o?.status?.loaded)return;const a=findBlockIndex(e,"<RExits");if(a<0)return;const i=globalThis.GMCP?.Room?.Info?.num;if(!i)return;const s="function"==typeof o.warpTarget?o.warpTarget(i):null;if(!s)return;const l=createWormholeExitDescriptor({warp:s,currentArea:o.status?.currentArea});if(!l)return;const c=e[a];let u=getFormattedHtml(c);u=u.replace(" and",""),u=u.replace(".",renderWormholeExitHtml(l)),patchFormatted(c,u)},registerEvents=e=>{const t=[];return((e,g,n={})=>{const C=`nexGui4-${e.replace(/\W+/g,"-")}`;eventStream.registerEvent(e,g,{...n,id:C,tags:["nexGui4"]}),t.push({eventName:e,id:C})})("Room.Info",e=>{nexAction.triggers.enable("nexGui4.roomReplacements")}),()=>{t.forEach(({eventName:e,id:t})=>{eventStream.removeListener?.(e,t)})}},safeCall$2=(e,t,...g)=>"function"==typeof e?e.call(t,...g):void 0,getHostLineText=e=>e&&"object"==typeof e?e.parsed_line?safeCall$2(e.parsed_line.text,e.parsed_line)??"":"string"==typeof e.line?e.line:e.html_line&&"string"==typeof e.html_text?stripHtml(e.html_text):"":"",isLikelyPartyName=e=>/^[A-Za-z][A-Za-z'-]*$/.test(e),normalizePartyMembersLine=e=>e.replace(/\.$/,"").split(", ").map(e=>e.trim()).filter(Boolean),extractRealmPartyMembers=(e,t)=>e.map(e=>t?.resolvePlayerNameFromFullname?.(e)).filter(isLikelyPartyName),resolvePlayerRelationships=e=>e?.playerRelationships??getDefaultPlayerRelationshipsModel(),registerTriggers=e=>{const t=resolvePlayerRelationships(e);return nexAction.triggers.add({id:"nexGui4.party.chatGag",regex:/^\(Party\): \w+ says, ".+"$/,tags:["nexGui4"],action:()=>{(e?.stores?.party?.getState?.()??null)?.settings?.gagChat&&(nexusclient.current_line.gag=!0)}}),nexAction.triggers.add({id:"nexGui4.party.memberJoined",regex:/^\(Party\): (\w+) has joined your party\.$/,tags:["nexGui4"],action:t=>{(e?.stores?.party?.getState?.()??null)?.addMember?.(t[1])}}),nexAction.triggers.add({id:"nexGui4.party.memberLeft",regex:/^\(Party\): (\w+) has left your party\.$/,tags:["nexGui4"],action:t=>{(e?.stores?.party?.getState?.()??null)?.removeMember?.(t[1])}}),nexAction.triggers.add({id:"nexGui4.party.listHeader",regex:"Your party has the following members:",tags:["nexGui4"],action:()=>{const t=e?.stores?.party?.getState?.()??null,g=nexusclient.current_block??[],n=g.indexOf(nexusclient.current_line);if(n<0)return;const C=g[n+2],I=getHostLineText(C);t?.updateParty?.(normalizePartyMembersLine(I))}}),nexAction.triggers.add({id:"nexGui4.party.realmsHeader",regex:"The following members of your party are in the realms:",tags:["nexGui4"],action:()=>{const t=e?.stores?.party?.getState?.()??null,g=nexusclient.current_block??[],n=g.indexOf(nexusclient.current_line);if(n<0)return;const C=g.slice(n+1).map(getHostLineText);t?.updateParty?.(extractRealmPartyMembers(C,e?.playerDirectory))}}),nexAction.triggers.add({id:"nexGui4.party.noParty",regex:"You are not the member of any party",tags:["nexGui4"],action:()=>{(e?.stores?.party?.getState?.()??null)?.updateParty?.([])}}),nexAction.triggers.add({id:"nexGui4.party.leftParty",regex:"You have left your party",tags:["nexGui4"],action:()=>{(e?.stores?.party?.getState?.()??null)?.updateParty?.([])}}),nexAction.triggers.add({id:"nexGui4.party.joinedParty",regex:/^You have joined \w+'s party\.$/,tags:["nexGui4"],action:()=>{e?.adapter?.send?.("party members")}}),nexAction.triggers.add({id:"nexGui4.rel.cityEnemiesHeader",regex:/^Enemies of .+ of \w+:$/,tags:["nexGui4"],action:()=>{const e=nexusclient.current_block??[],g=e.indexOf(nexusclient.current_line);if(g<0)return;const n=e[g+1],C=getHostLineText(n).replaceAll(" ","").split(",").map(e=>e.trim()).filter(isLikelyPartyName);t.replaceCityEnemyPlayers(C)}}),nexAction.triggers.add({id:"nexGui4.rel.enemiesHeader",regex:"You have the following enemies:",tags:["nexGui4"],action:()=>{const e=nexusclient.current_block??[],g=e.indexOf(nexusclient.current_line);if(g<0)return;const n=e.slice(g).map(getHostLineText),C=[];for(let t=1;t<n.length-1;t+=1){const e=n[t];e&&!e.includes(" ")&&C.push(e)}t.replaceEnemyPlayers(C.filter(isLikelyPartyName))}}),nexAction.triggers.add({id:"nexGui4.rel.noEnemies",regex:"You have no enemies.",tags:["nexGui4"],action:()=>{t.replaceEnemyPlayers([])}}),nexAction.triggers.add({id:"nexGui4.rel.noEnemiesForgive",regex:"In a moment of forgiveness, you declare that you have no enemies.",tags:["nexGui4"],action:()=>{t.replaceEnemyPlayers([])}}),nexAction.triggers.add({id:"nexGui4.rel.enemyRemoved",regex:/^You declare that (\w+) will no longer be one of your enemies\.$/,tags:["nexGui4"],action:e=>{t.forgetEnemyPlayer(e[1])}}),nexAction.triggers.add({id:"nexGui4.rel.enemyAdded",regex:/^(\w+) is now one of your enemies\.$/,tags:["nexGui4"],action:e=>{t.rememberEnemyPlayer(e[1])}}),nexAction.triggers.add({id:"nexGui4.rel.alliesHeader",regex:"You have the following allies:",tags:["nexGui4"],action:()=>{const e=nexusclient.current_block??[],g=e.indexOf(nexusclient.current_line);if(g<0)return;const n=e.slice(g).map(getHostLineText),C=[];for(let t=1;t<n.length-1;t+=1){const e=n[t];if(!e)continue;if(e.includes("You have"))break;let g;g=e.includes("lust")?e.split(" ")[7]?.trim():e.split(" ")[0]?.trim(),isLikelyPartyName(g)&&C.push(g)}t.replaceAllyPlayers(C)}}),nexAction.triggers.add({id:"nexGui4.rel.allyRemoved",regex:/^You declare that (\w+) will no longer be one of your allies\.$/,tags:["nexGui4"],action:e=>{t.forgetAllyPlayer(e[1])}}),nexAction.triggers.add({id:"nexGui4.rel.allyAdded",regex:/^(\w+) is now one of your allies\.$/,tags:["nexGui4"],action:e=>{t.rememberAllyPlayer(e[1])}}),nexAction.triggers.add({id:"nexGui4.roomReplacements",regex:/^/,tags:["nexGui4"],action:()=>{applyRoomReplacements(nexusclient.current_block??[]),nexAction.triggers.disable("nexGui4.roomReplacements")},enabled:!1}),()=>{nexAction.triggers.remove(["nexGui4"])}},wl="scrollback",El="__nexGuiInlineHighlightingContext",Rl="__nexGuiInitialHostBufferSynced",kl=null,Ml=null,getRuntime=()=>globalThis.nexGui??null,getContextValue=e=>e??getRuntime()?.__contextValue??null,getUiStoreState=e=>e?.stores?.ui?.getState?.()??null,getStreamModel=e=>e?.streamModel??e?.stores?.stream??null,getScrollbackSession=e=>e?.scrollbackSession??null,getUiSettings=e=>e?.persistenceStore?.getAll?.()?.ui??{},formatTimestamp=(e=!1,t=Date.now())=>{const g=new Date(t),n=String(g.getHours()).padStart(2,"0"),C=String(g.getMinutes()).padStart(2,"0"),I=String(g.getSeconds()).padStart(2,"0");return e?`${n}:${C}:${I}.${String(g.getMilliseconds()).padStart(3,"0")}`:`${n}:${C}:${I}`},safeCall$1=(e,t,...g)=>"function"==typeof e?e.call(t,...g):void 0,readRuntimeInlineHighlightingContext=e=>e?.[El]??e?.__contextValue??null,writeRuntimeInlineHighlightingContext=(e,t)=>{if(!e||"object"!=typeof e)return;const g=readRuntimeInlineHighlightingContext(e);Object.is(g,t)||(g&&g!==t&&clearRelationshipNameFormatterCache(g),Object.prototype.hasOwnProperty.call(e,El)?e[El]=t:Object.defineProperty(e,El,{value:t,writable:!0,enumerable:!1,configurable:!0}))},ensureRuntimeColors=e=>{const t=getRuntime();if(!t)return{inLineHighlighting:t=>applyContextInlineNameHighlighting(t,{contextValue:e})};if(writeRuntimeInlineHighlightingContext(t,e),t.colors&&"function"==typeof t.colors.inLineHighlighting)return t.colors;const g=Object.freeze({inLineHighlighting:e=>applyContextInlineNameHighlighting(e,{contextValue:readRuntimeInlineHighlightingContext(t)})});return Object.defineProperty(t,"colors",{value:g,enumerable:!1,configurable:!0}),g},toArray=e=>Array.isArray(e)?e:[],createExtraBreakLine=()=>({html:"<span> </span>",timestamp:Date.now(),isPrompt:!1,isMonospace:!1,shouldLog:!1,buffer:"main"}),getCurrentPromptHtml=e=>{const t=getStreamModel(e)?.getSnapshot?.()?.promptLine;return"string"==typeof t?.html?t.html:null},convertHostLine=(e,t="main",g=null)=>{if(!e||"object"!=typeof e)return null;if(e.html_line&&"string"==typeof e.html_text&&e.html_text.length>0)return e.gag?null:{html:e.html_text,timestamp:e.timestamp_ms,isPrompt:!1,isMonospace:!1,shouldLog:Boolean(e.log),buffer:t};if(!e.parsed_line)return null;const n=safeCall$1(e.parsed_line.text,e.parsed_line)??"";return!n.length||e.gag?null:(g?.inLineHighlighting(e.parsed_line),{html:safeCall$1(e.parsed_line.formatted,e.parsed_line)??n,timestamp:e.timestamp_ms,isPrompt:Boolean(e.is_prompt),isMonospace:Boolean(e.monospace),shouldLog:Boolean(e.log),buffer:t})},convertHostLines=(e,t,g=null,n=null)=>{const C=toArray(e);if(0===C.length)return[];const I=C.map(e=>convertHostLine(e,"main",g)).filter(Boolean);if(0===I.length)return[];if(!I.some(e=>!e.isPrompt)){const e=I[I.length-1];return e&&e.html!==n?I:[]}return t?[createExtraBreakLine(),...I]:I},appendConvertedLines=(e,t)=>{Array.isArray(t)&&0!==t.length&&getStreamModel(e)?.addLines?.(t)},hasInitialHostBufferSync=e=>Boolean(e?.[Rl]),markInitialHostBufferSynced=e=>{e&&"object"==typeof e&&(Object.prototype.hasOwnProperty.call(e,Rl)?e[Rl]=!0:Object.defineProperty(e,Rl,{value:!0,writable:!0,enumerable:!1,configurable:!0}))},syncInitialHostBuffer=(e,t,g=null)=>{if(hasInitialHostBufferSync(e))return;markInitialHostBufferSynced(e);const n=toArray(t?.lines);0!==n.length&&appendConvertedLines(e,convertHostLines(n,Boolean(nexusclient.settings?.().extra_break),g,getCurrentPromptHtml(e)))},getNextStreamSessionId=e=>{const t=getStreamModel(e),g=t?.getStats?.(),n=Number(g?.nextId??g?.sessionTotalLines);if(Number.isFinite(n))return Math.max(0,Math.floor(n));const C=(t?.getSnapshot?.()?.buffer??[]).at(-1)?.id;return Number.isFinite(C)?Math.max(0,Math.floor(C+1)):0},downloadScrollbackSessionSlice=async(e,t)=>{if("undefined"==typeof document||"undefined"==typeof Blob||"undefined"==typeof URL||"function"!=typeof URL.createObjectURL)return;const g=getScrollbackSession(e);if(!g?.readRange)return;const n=getUiSettings(e),C=Boolean(n.virtualizedLogs);let I=[];try{I=await g.readRange(Math.max(0,Math.floor(Number(t)||0)),Number.MAX_SAFE_INTEGER)}catch(o){return void console.error("[nexGui4] Failed reading scrollback log export",o)}0!==I.length&&downloadBuffer(I,C)},undoFooterLayout=()=>{if("undefined"==typeof document)return;const e=document.getElementById("status_vars");e&&["status-target","status-bank","status-gold","status-level","status-ping"].forEach(t=>{const g=document.getElementById(t);g&&e.prepend(g)})},isScrollbackRendererEnabled=()=>!1!==globalThis.nexusclient?.variables?.()?.vars?.nexGuiSettings?.options?.nexGuiRenderer,isScrollbackOpen=e=>getUiStoreState(e)?.modalOpen===wl,openScrollback=e=>getUiStoreState(e)?.openModal?.(wl),closeScrollback=e=>getUiStoreState(e)?.closeModal?.(),saveOriginalMethod=(e,t,g,{nullish:n=!1}={})=>{const C=`${g}_original`,I=Object.prototype.hasOwnProperty.call(t,C);return n?t[C]??=t[g]:void 0===t[C]&&(t[C]=t[g]),e.push(()=>{void 0!==t[C]&&(t[g]=t[C]),I||delete t[C]}),t[C]},removePatches=()=>{kl?.(),kl=null,Ml=null},applyPatches=({contextValue:e}={})=>{const t=Ml;if(removePatches(),"undefined"==typeof nexusclient)throw new Error("[nexGui4] applyPatches requires the live nexusclient host.");const g=getContextValue(e);if(!g)throw new Error("[nexGui4] applyPatches requires a live NexGui context value.");t&&t!==g&&clearRelationshipNameFormatterCache(t),Ml=g;const n=ensureRuntimeColors(g),C=[],I={logStartSessionId:null},o=nexusclient.ui().layout(),a=nexusclient._ui?._layout??o,i=nexusclient.datahandler(),s=nexusclient.platform(),l=nexusclient.serverapi(),c=nexusclient.log(),u=nexusclient.buffer();syncInitialHostBuffer(g,u,n);const d=Object.prototype.hasOwnProperty.call(i,"handle_GMCP_original"),p=Object.prototype.hasOwnProperty.call(o,"get_tab_object_original"),m=Object.prototype.hasOwnProperty.call(a,"get_tab_object_original"),h=Object.prototype.hasOwnProperty.call(o,"nexoverrides"),y=new Map(xl.filter(e=>Object.prototype.hasOwnProperty.call(o.nexoverrides??{},e)).map(e=>[e,o.nexoverrides[e]]));initializeTabs({contextValue:g}),C.push(()=>{const e=getRuntime();e&&"object"==typeof e&&delete e[El],void 0!==o.get_tab_object_original&&(o.get_tab_object=o.get_tab_object_original),xl.forEach(e=>{o.nexoverrides&&(y.has(e)?o.nexoverrides[e]=y.get(e):delete o.nexoverrides[e])}),!h&&o.nexoverrides&&0===Object.keys(o.nexoverrides).length&&delete o.nexoverrides,p||delete o.get_tab_object_original,m||delete a.get_tab_object_original});const b=saveOriginalMethod(C,nexusclient,"process_lines");nexusclient.process_lines=function(e){const t=safeCall$1(b,this,e);return this.gagged||appendConvertedLines(g,convertHostLines(e,Boolean(nexusclient.settings?.().extra_break),n,getCurrentPromptHtml(g))),t};const v=saveOriginalMethod(C,nexusclient,"_add_line");nexusclient._add_line=function(e,t){const n=!this.current_block,C=safeCall$1(v,this,e,t);if(!n)return C;appendConvertedLines(g,[convertHostLine(e,t??"main")].filter(Boolean))},"undefined"==typeof nexSys&&(saveOriginalMethod(C,u,"add_block"),u.add_block=function(e){let t=0,g=0;for(let C=0;C<e.length;++C){const n=e[C];n.log&&g++,n.gag||!n.parsed_line&&!n.html_line||(!n.is_prompt||t?(!n.parsed_line||safeCall$1(n.parsed_line.text,n.parsed_line)||0!==t&&C!==e.length-1)&&(safeCall$1(this._fill_tab_completion,this,n),t++,this.lineid++,n.id=this.lineid,this.lines.push(n),this.unread=!0):n.gag=!0)}const n=safeCall$1(this.prune_lines,this);(t||g||n)&&safeCall$1(this.on_lines_changed,this)});const x=saveOriginalMethod(C,c,"enable");c.enable=function(){const e=safeCall$1(x,this),t=getNextStreamSessionId(g);return I.logStartSessionId=Math.max(0,t-100),e};const S=saveOriginalMethod(C,c,"disable");c.disable=function(){const e=safeCall$1(S,this),t=getUiSettings(g);if(null!=I.logStartSessionId||t.logoutDownload){const e=I.logStartSessionId??0;I.logStartSessionId=null,downloadScrollbackSessionSlice(g,e)}return e};const w=saveOriginalMethod(C,l,"on_disconnect");l.on_disconnect=function(){this.__anonymous=!1,this.__game=null,this.__name=null,undoFooterLayout();const e=getUiSettings(g);if(null!=I.logStartSessionId||e.logoutDownload){const e=I.logStartSessionId??0;I.logStartSessionId=null,downloadScrollbackSessionSlice(g,e)}return safeCall$1(w,this)},saveOriginalMethod(C,s,"on_key_down",{nullish:!0}),s.on_key_down=function(e,t,n,C){return n&&C&&76===e||33===e&&isScrollbackRendererEnabled()&&!isScrollbackOpen(g)?(openScrollback(g),!0):(27===e&&closeScrollback(g),safeCall$1(this.on_key_down_original,this,e,t,n,C))},void 0===i.handle_GMCP_original&&(i.handle_GMCP_original=i.handle_GMCP),C.push(()=>{void 0!==i.handle_GMCP_original&&(i.handle_GMCP=i.handle_GMCP_original,d||delete i.handle_GMCP_original)}),i.handle_GMCP=function(e,t){if("Comm.Channel.Text"===e){const e="string"==typeof t?(()=>{try{return JSON.parse(t)}catch{return null}})():t;if("says"===e?.channel&&"string"==typeof e.talker&&e.talker.indexOf(" ")>-1&&-1===e.talker.indexOf("Discord"))return;if(e?.talker===globalThis.GMCP?.Char?.Status?.name&&"string"==typeof e.text&&e.text.includes("Duanathar."))return}return safeCall$1(this.handle_GMCP_original,this,e,t)};const E=saveOriginalMethod(C,o,"write_channel");o.write_channel=function(e,t){if(!t||"function"!=typeof this.channel_id_from_cmd||"function"!=typeof this.channel_record)return safeCall$1(E,this,e,t);ensureRuntimeColors(g).inLineHighlighting(t);const n=Date.now(),C=[{parsed_line:t,timestamp_ms:formatTimestamp(!0,n),timestamp:formatTimestamp(!1,n)}],I=this.channel_id_from_cmd(e),o=this.channel_record(I);if(o)try{o.buffer.add_block(C)}catch{}try{this._nexus.comm_buffer().add_block(C)}catch{}};const R=registerTriggers(g),M=registerEvents(g);return C.push(R),C.push(M),kl=()=>{for(;C.length>0;)C.pop()?.();Ml=null,kl=null},removePatches},installGlobalNexGui=e=>(globalThis.nexGui?.destroy?.(),globalThis.nexGui=e,e),Tl="nexgui4-styles",Pl=new Map,getStyleElement=()=>{if("undefined"==typeof document||"function"!=typeof document.getElementById||!document.head)return null;const e=document.getElementById(Tl);if(e)return e;const t=document.createElement("style");return t.id=Tl,document.head.appendChild(t),t},registerNexguiStyles=(e,t)=>{if(!e||"string"!=typeof t)return;const g=getStyleElement();g&&(Pl.set(e,t.trim()),g.textContent=Array.from(Pl.values()).filter(Boolean).join("\n\n"))},Nl="replacement-base",Dl=Bt.replacement,toDamageSlug=e=>e.toLowerCase().replace(/\s+/g,"-"),buildCatalogRules=()=>[".ng-skill-default { color: orange; }",Object.entries(Ze).map(([e,t])=>`.ng-skill-${e} { color: ${t}; }`).join("\n"),".ng-action-default { color: grey; }",Object.entries(Qe).map(([e,t])=>`.ng-action-${e} { color: ${t.fg}; }`).join("\n"),".ng-dmg-unknown { color: grey; }",Object.entries(He).map(([e,t])=>`.ng-dmg-${toDamageSlug(e)} { color: ${t}; }`).join("\n"),".ng-muted { color: grey; }",".ng-npc-bracket { color: red; font-weight: bold; }",".ng-crit-separator { color: white; }",".ng-dmg-bracket { color: #808080; }",".ng-hp-loss { color: tomato; }",".ng-info-text { color: cadetblue; font-style: italic; }"].filter(Boolean).join("\n"),Ol=`\n/* nexGui4 replacement visual primitives — injected by replacementStyles.js */\n.ng-brkt { font-weight: bold; }\n.ng-brkt-ally { color: ${Dl.bracketAllyColor}; }\n.ng-brkt-enemy { color: ${Dl.bracketEnemyColor}; }\n.ng-italic { font-style: italic; }\n.ng-target-format {\n box-decoration-break: clone;\n -webkit-box-decoration-break: clone;\n box-shadow: inset 0 0 0 1px ${Dl.targetBorderColor};\n padding: 0 2px;\n position: relative;\n z-index: 1;\n}\n.ng-icon-fill-1 { fill: var(--ng-fill-1); }\n.ng-icon-fill-2 { fill: var(--ng-fill-2); }\n\n/* Legacy message replacement row classes retained for compatibility. */\n.ng-seg { display: table-cell; color: #aaa; }\n.ng-msgline { display: inline-table; width: calc(100% - 15ch); }\n.ng-w-0 { width: 0; }\n.ng-w-5 { width: 5%; }\n.ng-w-30 { width: 30%; }\n.ng-w-35 { width: 35%; }\n\n/* Flex layout for structured skill replacement rows */\n.nexgui4-replacement-row {\n display: inline-flex;\n width: calc(100% - 15ch); /* account for timestamp */\n min-width: 0;\n overflow: hidden;\n vertical-align: top;\n}\n.nexgui4-replacement-row__buffer {\n flex: 0 0 5%;\n}\n.nexgui4-replacement-row__actor {\n flex: 0 0 30%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.nexgui4-replacement-row__action {\n flex: 0 0 35%;\n}\n.nexgui4-replacement-row__target {\n flex: 1;\n min-width: 0;\n}\n\n${buildCatalogRules()}\n`.trim(),injectReplacementBaseStyles=()=>{registerNexguiStyles(Nl,Ol)},jl="transcript-viewport",zl="\n/* nexGui4 transcript viewport primitives. */\n.nexgui4-transcript-scroll-viewport {\n flex: 1;\n min-height: 0;\n overflow-anchor: none;\n overflow-y: auto;\n position: relative;\n margin: 5px;\n}\n\n.nexgui4-transcript-scroll-viewport--display {\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n\n.nexgui4-transcript-scroll-viewport--display::-webkit-scrollbar {\n display: none;\n}\n\n.nexgui4-transcript-spacer {\n width: 100%;\n}\n\n.nexgui4-transcript-spacer--display {\n box-sizing: border-box;\n}\n\n.nexgui4-transcript-spacer--panel {\n position: relative;\n}\n\n.nexgui4-transcript-row {\n width: 100%;\n}\n\n.nexgui4-transcript-row--panel {\n left: 0;\n position: absolute;\n top: 0;\n}\n\n.nexgui4-virtual-scroll-line {\n align-items: baseline;\n contain: layout style paint;\n display: flex;\n font-family: inherit;\n min-width: 0;\n}\n\n.nexgui4-virtual-scroll-line.nexguilog {\n display: flex !important;\n}\n\n.nexgui4-main-display-timestamp.timestamp,\n.nexgui4-scrollback-timestamp.timestamp,\n.nexgui4-structured-stream-panel__timestamp.timestamp {\n display: inline !important;\n}\n\n.nexgui4-virtual-scroll-line__payload {\n flex: 1;\n min-width: 0;\n overflow-wrap: anywhere;\n white-space: pre-wrap;\n}\n\n.nexgui4-prompt-line {\n position: static;\n width: 100%;\n}\n".trim(),injectTranscriptStyles=()=>{registerNexguiStyles(jl,zl)},Gl={"shield-halved":[512,512,["shield-alt"],"f3ed",["M256 0c.2 0 .5 0 .7 0c4.6 0 9.2 1 13.4 2.9L458.4 82.8c22 9.3 38.4 31 38.3 57.2c-.5 99.2-41.3 280.7-213.6 363.2c-8.3 4-17.4 6-26.4 6V0H256z","M256.7 0c-.2 0-.5 0-.7 0c-4.6 0-9.2 1-13.4 2.9L54.3 82.8c-22 9.3-38.4 31-38.3 57.2c.5 99.2 41.3 280.7 213.6 363.2c8.3 4 17.4 6 26.4 6V0h.7z"]],"shield-cross":[512,512,[9960],"f712",["M224 10.8L54.3 82.8c-22 9.3-38.4 31-38.3 57.2c0 6.4 .2 13 .6 20H192c17.7 0 32-14.3 32-32V10.8zM24.7 224C43.7 319.9 97.4 437.2 224 500.4V256c0-17.7-14.3-32-32-32H24.7zM288 500.4C414.6 437.2 468.3 319.9 487.3 224H320c-17.7 0-32 14.3-32 32V500.4zM495.4 160c.4-7 .6-13.7 .6-20c.1-26.2-16.3-47.9-38.3-57.2L288 10.8V128c0 17.7 14.3 32 32 32H495.4z","M288 10.8L269.4 2.9C265.2 1 260.7 0 256 0s-9.2 1-13.4 2.9L224 10.8V128c0 17.7-14.3 32-32 32H16.6c1.1 19.4 3.6 41.1 8.1 64H192c17.7 0 32 14.3 32 32V500.4c1.9 .9 3.7 1.8 5.6 2.7c16.7 8 36.1 8 52.8 0c1.9-.9 3.8-1.8 5.6-2.7V256c0-17.7 14.3-32 32-32H487.3c4.5-22.9 7.1-44.6 8.1-64H320c-17.7 0-32-14.3-32-32V10.8z"]],tree:[448,512,[127794],"f1bb",["M210.6 5.9L62 169.4c-3.9 4.2-6 9.8-6 15.5C56 197.7 66.3 208 79.1 208H104L30.6 281.4c-4.2 4.2-6.6 10-6.6 16C24 309.9 34.1 320 46.6 320H80L5.4 409.5C1.9 413.7 0 419 0 424.5c0 13 10.5 23.5 23.5 23.5H192V224c0-17.7 14.3-32 32-32s32 14.3 32 32V448H424.5c13 0 23.5-10.5 23.5-23.5c0-5.5-1.9-10.8-5.4-15L368 320h33.4c12.5 0 22.6-10.1 22.6-22.6c0-6-2.4-11.8-6.6-16L344 208h24.9c12.7 0 23.1-10.3 23.1-23.1c0-5.7-2.1-11.3-6-15.5L237.4 5.9C234 2.1 229.1 0 224 0s-10 2.1-13.4 5.9z","M224 192c17.7 0 32 14.3 32 32V480c0 17.7-14.3 32-32 32s-32-14.3-32-32V224c0-17.7 14.3-32 32-32z"]],droplet:[384,512,[128167,"tint"],"f043",["M192 512C86 512 0 426 0 320C0 228.8 130.2 57.7 166.6 11.7C172.6 4.2 181.5 0 191.1 0h1.8c9.6 0 18.5 4.2 24.5 11.7C253.8 57.7 384 228.8 384 320c0 106-86 192-192 192zM96 336c0-8.8-7.2-16-16-16s-16 7.2-16 16c0 61.9 50.1 112 112 112c8.8 0 16-7.2 16-16s-7.2-16-16-16c-44.2 0-80-35.8-80-80z","M80 320c8.8 0 16 7.2 16 16c0 44.2 35.8 80 80 80c8.8 0 16 7.2 16 16s-7.2 16-16 16c-61.9 0-112-50.1-112-112c0-8.8 7.2-16 16-16z"]],tombstone:[448,512,[],"f720",["M224 0C118 0 32 86 32 192V448H416V192C416 86 330 0 224 0zm24 152v40h48c13.3 0 24 10.7 24 24s-10.7 24-24 24H248V360c0 13.3-10.7 24-24 24s-24-10.7-24-24V240H152c-13.3 0-24-10.7-24-24s10.7-24 24-24h48V152c0-13.3 10.7-24 24-24s24 10.7 24 24z","M248 152c0-13.3-10.7-24-24-24s-24 10.7-24 24v40H152c-13.3 0-24 10.7-24 24s10.7 24 24 24h48V360c0 13.3 10.7 24 24 24s24-10.7 24-24V240h48c13.3 0 24-10.7 24-24s-10.7-24-24-24H248V152zM32 448c-17.7 0-32 14.3-32 32s14.3 32 32 32H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"]],feather:[512,512,[129718],"f52d",["M97.9 448h84c49.7 0 97.9-14.4 139-41c11.1-7.2 5.5-23-7.8-23c-5.1 0-9.2-4.1-9.2-9.2c0-4.1 2.7-7.6 6.5-8.8l81-24.3c2.5-.8 4.8-2.1 6.7-4l22.4-22.4c10.1-10.1 2.9-27.3-11.3-27.3l-32.2 0c-5.1 0-9.2-4.1-9.2-9.2c0-4.1 2.7-7.6 6.5-8.8l112-33.6c4-1.2 7.4-3.9 9.3-7.7C506.4 207.6 512 184.1 512 160c0-41-16.3-80.3-45.3-109.3l-5.5-5.5C432.3 16.3 393 0 352 0s-80.3 16.3-109.3 45.3L139 149C91 197 64 262.1 64 330v84L311 167c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L97.9 448z","M24 512c-6.2 0-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9L311 167c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L41 505c-4.7 4.7-10.8 7-17 7z"]],"fish-fins":[576,512,[],"e4f2",["M182 150.4C221.3 120.9 273.7 96 336 96s114.7 24.9 154 54.4c39.2 29.4 67.2 64.7 81.6 89.5c5.8 9.9 5.8 22.2 0 32.1c-14.4 24.8-42.5 60.1-81.6 89.5C450.7 391.1 398.3 416 336 416s-114.7-24.9-154-54.4c-15.3-11.5-29-23.9-40.7-36.3L48.1 379.6c-12.5 7.3-28.4 5.3-38.7-4.9S-3 348.7 4.2 336.1L50 256 4.2 175.9c-7.2-12.6-5-28.4 5.3-38.6s26.1-12.2 38.7-4.9l93.1 54.3c11.8-12.3 25.4-24.8 40.7-36.3zM448 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z","M238.9 36.9C227.7 44 222 57.3 224.6 70.3l9.7 48.6C264.1 105.1 298.2 96 336 96c5.7 0 11.3 .2 16.8 .6L275.2 38.4c-10.6-8-25-8.5-36.3-1.5zm-4.6 356.2l-9.7 48.6c-2.6 13 3.1 26.3 14.3 33.3s25.6 6.5 36.3-1.5l77.6-58.2c-5.5 .4-11.1 .6-16.8 .6c-37.8 0-71.9-9.1-101.7-22.9z"]]},Ll="host-surface",Bl="character_module_class",Fl="100%",Wl="15%",Vl="\nhtml { -webkit-font-smoothing: subpixel-antialiased; }\n.flexlayout__splitter { background-color: grey; }\n.flexlayout__tab { background-color: #000 !important; }\n.output { padding: 5px; }\n.nexguilog { display: none; }\n\n.ng-timestamp { margin-right: 1ch; }\n\n.ng-virtual-list {\n background: black;\n width: 100%;\n overflow-y: auto;\n contain: strict;\n padding-bottom: 0;\n}\n\n.ng-virtual-list--border { border-bottom: 1px solid #ccc; }\n\n.ng-virtual-anchor {\n overflow-anchor: none;\n width: 100%;\n color: white;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n\n.ng-ListItem { contain: layout inline-size; }\n\n.nexgui4-tab-container {\n isolation: isolate;\n overflow: hidden;\n position: relative;\n}\n\n.nexgui4-tab-container__background {\n inset: 0;\n pointer-events: none;\n position: absolute;\n z-index: 0;\n}\n\n.nexgui4-tab-container__surface,\n.nexgui4-tab-container__tabs,\n.nexgui4-tab-container__tabpanel {\n position: relative;\n z-index: 1;\n}\n".trim(),injectHostStyles=()=>{registerNexguiStyles(Ll,Vl)},setClassBalanceIconReadyState=e=>{if("undefined"==typeof document)return;const t=document.getElementById(Bl);t&&(t.style.opacity=!0===e?Fl:!1===e?Wl:"")},bindClassBalanceIcon=({characterStore:e}={})=>{if(!e||"function"!=typeof e.getState||"function"!=typeof e.subscribe)return()=>{};const sync=(t=e.getState())=>{setClassBalanceIconReadyState(t?.classBalanceReady??null)};return sync(),e.subscribe(e=>{sync(e)})},injectFontAwesomeIcons=()=>{"undefined"!=typeof window&&window.___FONT_AWESOME___?.styles?.fad&&Object.assign(window.___FONT_AWESOME___.styles.fad,Gl)},Ul=300,Kl=null,forceFooterHostElementsVisible=e=>{e?.setHostSetting?.("show_gauges",!0),e?.setHostSetting?.("show_balances",!0)},applyFooterLayout=()=>{if("undefined"==typeof document)return;const e=document.getElementsByClassName("bottom_view")[0];e&&(e.style.padding="0px",e.children[2]&&(e.children[2].style.margin="0px"));const t=document.getElementById("status_vars");if(t){for(let g=0;g<t.children.length;g++)Object.assign(t.children[g].style,{fontSize:"14.4px",marginTop:"auto",marginBottom:"auto",verticalAlign:"middle"});Object.assign(t.style,{justifyContent:"flex-start",alignItems:"center",marginTop:0,marginBottom:0});const e=document.getElementById("component_balances");e&&(t.prepend(e),e.style.minWidth="50px",e.style.marginTop="5px",e.style.gap="2px")}const g=document.getElementById("extra_icons");g&&(Object.assign(g.style,{display:"flex",justifyContent:"end",gap:"10px"}),["status-bank","status-gold","status-level","status-ping"].forEach(e=>{const t=document.getElementById(e);t&&g.prepend(t)}));const n=document.getElementById("status-ping");n&&(n.style.minWidth="57px");const C=document.getElementById("left_icons");if(C){Object.assign(C.style,{minWidth:"300px",maxWidth:"500px"}),C.children[0]&&(C.children[0].style.visibility="hidden",C.children[0].style.width="0px");const e=document.getElementById("status-target");e&&(C.prepend(e),e.style.fontSize="12px",e.style.fontWeight="bold")}const I=document.getElementById("footer");if(I&&g){const e=document.getElementById("gauges");if(e){I.insertBefore(e,g),Object.assign(e.style,{display:"flex",transform:"scaleY(0.85)",minWidth:0,flexGrow:100,alignItems:"center"});for(const t of e.children)t.children[1]&&(t.children[1].style.fontSize="12px"),t.style.flexGrow=1}}document.getElementById(Bl)?.remove();const o=document.createElement("div");o.id=Bl,o.className="balance class-balance",o.style.flexGrow="1",o.innerHTML=`<svg aria-hidden="true" focusable="false" data-prefix="fad" data-icon="hourglass" class="svg-inline--fa fa-star fa-w-18" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" color="#33FFD4" style="font-size: 20px;"><g class="fa-group"><path class="fa-secondary" fill="currentColor" d="${window.___FONT_AWESOME___?.styles?.fa?.hourglass?.[4]??""}"></path><path class="fa-primary" fill="currentColor" d=""></path></g></svg>`,document.getElementById("component_balances")?.appendChild(o),document.getElementById("balance_balance")?.setAttribute("style","flex-grow: 1"),document.getElementById("balance_equilibrium")?.setAttribute("style","flex-grow: 1")},configureFlexLayout=()=>{if("undefined"==typeof nexusclient)return;const e=nexusclient.ui().layout(),t=e.model()?.global??{},g="boolean"!=typeof t.tabSetEnableTabStrip||t.tabSetEnableTabStrip;e.flexModel.doAction({type:"FlexLayout_UpdateModelAttributes",data:{json:{splitterSize:2,tabSetEnableTabStrip:g,tabEnableClose:!1,tabSetEnableMaximize:!1,borderEnableAutoHide:!0,borderEnableDrop:!0}}}),["right","left","top","bottom"].forEach(t=>{e.model().borders.find(e=>e.location===t)||e.model().borders.push({type:"border",location:t,children:[]})});const borderLeaveEvent=()=>{Kl&&(document.getElementsByClassName("MuiPopover-root MuiMenu-root MuiModal-root").length||e.flexModel.doAction({type:"FlexLayout_SelectTab",data:{tabNode:Kl}}))},n=document.getElementsByClassName("flexlayout__tab_border_right");for(let I=0;I<n.length;I++)n[I].addEventListener("mouseleave",borderLeaveEvent);const borderMouseOverEvent=t=>{const g=t.target.title;g&&(e.flexModel.getNodeById(g)?.isVisible()||(Kl=g,e.flexModel.doAction({type:"FlexLayout_SelectTab",data:{tabNode:Kl}})))},C=document.getElementsByClassName("flexlayout__border_button_right");for(let I=0;I<C.length;I++){const t=C[I];t.addEventListener("mouseenter",borderMouseOverEvent);const g=e.model().borders[0]?.children.find(e=>e.id===t.title);g&&g.borderWidth<Ul&&(g.borderWidth=Ul)}},Hl="nexGui4",Yl="https://unpkg.com/nexgui4/dist/nexGui4.nxs",Zl="khaseem",Ql=1e4,Xl=[{key:"classCustomizations",names:["nexGui.classCustomizations","classCustomizations"]},{key:"userSettings",names:["nexGui.userSettings","userSettings"]}],_l=new Set(Xl.flatMap(({names:e})=>e.map(e=>e.toLowerCase()))),toLowerName=e=>String(e??"").trim().toLowerCase(),clonePackageItem=e=>{if(!e||"object"!=typeof e)return null;if("function"==typeof structuredClone)try{return structuredClone(e)}catch{}try{return JSON.parse(JSON.stringify(e))}catch{return e}},safeCall=e=>{try{return e()}catch{return null}},getReflexes=e=>safeCall(()=>e?.reflexes?.())??null,getPackageRegistry=e=>{const t=safeCall(()=>e?.packages?.());if("function"==typeof t?.get)return t;const g=safeCall(()=>getReflexes(e)?.packages?.());return"function"==typeof g?.get?g:null},getNexGuiPackage=(e,t=Hl)=>safeCall(()=>getPackageRegistry(e)?.get(t))??null,findPackageItemByNames=(e,t)=>{if(!Array.isArray(e))return null;const g=new Set(t.map(toLowerName));return e.find(e=>g.has(toLowerName(e?.name)))??null},captureCustomizationGroups=e=>Xl.map(({key:t,names:g})=>{const n=findPackageItemByNames(e?.items,g);return n?{key:t,names:g,data:clonePackageItem(n)}:null}).filter(Boolean),applyCustomizationGroup=(e,t,g)=>{const n=findPackageItemByNames(e?.items,t.names);return!(!n||!t.data||("function"==typeof n.apply?(n.apply(t.data,g),0):"object"!=typeof n||"object"!=typeof t.data||(Object.assign(n,clonePackageItem(t.data)),0)))},enableRuntimePackageGroups=e=>{Array.isArray(e?.items)&&e.items.filter(e=>"group"===e?.type&&!_l.has(toLowerName(e.name))).forEach(e=>{e.enabled=!0})},reportUpdateError=({adapter:e,consoleObj:t,message:g,nexusClient:n})=>{t.error(g),"function"!=typeof e?.notice?"function"!=typeof n?.display?n?.display_notice?.(g,"red"):n.display(g):e.notice(g,"red")},createAbortSignal=({AbortControllerCtor:e,setTimeoutFn:t,timeoutMs:g})=>{if(!e||g<=0)return{signal:void 0,timeout:null};const n=new e,C=t(()=>n.abort(),g);return{signal:n.signal,timeout:C}},updateNxs=async({adapter:e=null,clearTimeoutFn:t=clearTimeout,consoleObj:g=console,fetchFn:n=globalThis.fetch,nexusClient:C=globalThis.nexusclient,packageName:I=Hl,setTimeoutFn:o=setTimeout,skipCharacterName:a=Zl,timeoutMs:i=Ql,url:s=Yl}={})=>{if(toLowerName(C?.charname)===toLowerName(a))return null;const l=getPackageRegistry(C);if(!l)return null;let c=null;try{if("function"!=typeof n)throw new Error("fetch is not available.");const e=l.get(I);if(!e||"function"!=typeof e.apply)throw new Error(`${I} package is not installed in Nexus.`);const t=captureCustomizationGroups(e),{signal:g,timeout:a}=createAbortSignal({AbortControllerCtor:globalThis.AbortController,setTimeoutFn:o,timeoutMs:i});c=a;const u=await n(s,{cache:"no-store",...g?{signal:g}:{}});if(!u?.ok)throw new Error(`${I} update failed: ${u?.status??"unknown"} ${u?.statusText??""}`.trim());const d=await u.json(),p=getReflexes(C),m=getNexGuiPackage(C,I);m.apply(d,p);const h=getNexGuiPackage(C,I)??m;return t.forEach(e=>{applyCustomizationGroup(h,e,p)}),enableRuntimePackageGroups(h),d}catch(u){return reportUpdateError({adapter:e,consoleObj:g,message:"AbortError"===u?.name?`${I} update timed out. Check your connection.`:`${I} update error: ${u?.message??String(u)}`,nexusClient:C}),null}finally{null!==c&&t(c)}},ql="https://api.achaea.com/gamefeed.json",Jl=5e3,normalizeFetchedEntries=e=>Array.isArray(e)?e.filter(Boolean):[],parseTimestamp=e=>{if("string"!=typeof e||0===e.trim().length)return;const t=e.trim(),g=t.match(/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2}):(\d{2})$/);if(g){const[,e,t,n,C,I,o]=g;return Date.UTC(Number(e),Number(t)-1,Number(n),Number(C),Number(I),Number(o),0)}const n=t.includes("T")?t:t.replace(" ","T"),C=/(?:Z|[+-]\d{2}:?\d{2})$/i.test(n),I=Date.parse(C?n:`${n}Z`);return Number.isFinite(I)?I:void 0},toStoreEntry=e=>({content:e.description??e.caption??null,id:e.id??void 0,timestamp:parseTimestamp(e.date)}),mapEntries=e=>e.map(e=>toStoreEntry(e)),applySnapshot=(e,t)=>{const g=e?.getState?.();if(!g)return;const n=mapEntries(t);if("function"!=typeof g.replaceEntries){g.clear();for(const e of n)g.addEntry(e)}else g.replaceEntries(n)},appendEntries=(e,t)=>{const g=e?.getState?.();if(!g)return;const n=mapEntries(t);if("function"!=typeof g.addEntries)for(const C of n)g.addEntry(C);else g.addEntries(n)},createGameFeedPoller=({feedStore:e,fetchFn:t=null,setIntervalFn:g=null,clearIntervalFn:n=null,intervalMs:C=Jl,url:I=ql})=>{let o=null,a=null,i=!1,s=null;const syncFromRemote=async()=>{if("function"!=typeof t)return[];try{const g=await t(I,{cache:"no-store"});if(!g?.ok)return[];const n=normalizeFetchedEntries(await g.json());if(!i||0===n.length)return n;const C=n.at(-1)?.id??null;if(null==C)return applySnapshot(e,n),n;if(null==s)return applySnapshot(e,n),s=C,n;if(C===s)return[];const o=n.findIndex(e=>e?.id===s);return o<0?applySnapshot(e,n):appendEntries(e,n.slice(o+1)),s=C,n}catch{return[]}},pollOnce=()=>a||(a=syncFromRemote().finally(()=>{a=null}),a);return{start:()=>{i||(i=!0,pollOnce(),"function"==typeof g&&(o=g(()=>{pollOnce()},C)))},stop:()=>{i=!1,null!==o&&"function"==typeof n&&(n(o),o=null)},pollOnce}},$l="https://2a9fwzdazf.execute-api.us-east-2.amazonaws.com/nexGui/cdb",ec="zr1te94RPZ4yaMJCc6j134eAxDsCpkmm48py1GaD",resolveRemoteService=({remoteService:e,remotePlayerService:t,fetchFn:g}={})=>{if(e)return e;const n=t??{apiUrl:$l,apiKey:ec};return createLambdaRemotePlayerService({...n,fetchFn:n.fetchFn??g})},bootstrapNexus=(e={})=>{const{adapter:t,autoStart:g,startupPhaseHandlers:n,remoteService:C,remotePlayerService:I,feedPollingEnabled:o=!0,runtimePorts:a,...i}=e,s=a??createBrowserRuntimePorts(),l=createNexusAdapter(),c=resolveRemoteService({remoteService:C,remotePlayerService:I,fetchFn:s.fetch});let u,d=!1,p=!1,m=!1,h=!1,y=!1,b=!1,v=!1,x=!1,S=null,removeLivePatches=()=>{},removeClassBalanceBinding=()=>{},removeNetflixModeController=()=>{},removeNativeDisplayCommands=()=>{},removeLayoutCommands=()=>{};const ensureFeedPoller=()=>o?(S??=createGameFeedPoller({feedStore:u.stores.feed,fetchFn:s.fetch,setIntervalFn:s.setInterval,clearIntervalFn:s.clearInterval}),S):null;return u=createNexGui({adapter:l,autoStart:!1,remoteService:c,startupPhaseHandlers:{[lt.BOOTING]:async()=>{const e=updateNxs({adapter:l,fetchFn:s.fetch,setTimeoutFn:s.setTimeout,clearTimeoutFn:s.clearTimeout});injectHostStyles(),injectTranscriptStyles(),injectReplacementBaseStyles(),injectFontAwesomeIcons();const t=u.__contextValue,g=t?.persistenceStore?.get("ui")?.nativeDisplay??!1;if(d||(generateTabs(),d=!0),p||(forceFooterHostElementsVisible(l),configureFlexLayout(),applyFooterLayout(),p=!0),h||(removeClassBalanceBinding=bindClassBalanceIcon({characterStore:u.stores.character}),h=!0),y||(removeNetflixModeController=createNetflixModeController({adapter:l,uiStore:u.stores.ui,characterStore:u.stores.character}),y=!0),m||(removeLivePatches=applyPatches({contextValue:t}),m=!0,g&&t.platformTabs.mountNativeDisplay()),!v){const e=l.destroy.bind(l);l.destroy=()=>{S?.stop(),removeNativeDisplayCommands(),removeLayoutCommands(),removeClassBalanceBinding(),h=!1,removeNetflixModeController(),y=!1,m&&(removeLivePatches(),m=!1),e()},v=!0}x||(l.send("stat"),l.send("pwho"),l.send("enemies"),l.send("allies"),l.send("city enemies"),l.send("date"),l.send("ql"),x=!0),t.playerDirectoryLifecycle.warmDirectoryFromCache(),b||(t.playerDirectoryLifecycle.subscribePersistence(),b=!0),t.playerDirectoryLifecycle.refreshDirectoryFromRemote(c),ensureFeedPoller()?.start(),await e}},runtimePorts:s,...i}),removeNativeDisplayCommands=u.__contextValue.platformTabs.configureNativeDisplayCommands({mountNativeDisplay:()=>mountNativeDisplay({contextValue:u.__contextValue}),unmountNativeDisplay:()=>{unmountNativeDisplay()}}),removeLayoutCommands=u.__contextValue.platformTabs.configureLayoutCommands({applyLayoutPreset,saveLayout:saveCurrentLayout,restoreLayout:restoreSavedLayout,hasSavedLayout}),installGlobalNexGui(u),u.__start().catch(()=>{}).then(()=>{emitStartupReadySignal(l),runNexGuiClassReflexForCurrentHostClass()}),u},createMockAdapter=({playerRelationships:e}={})=>{const t=[],g=new Map,n=new Map,C={echo_input:!1,echo_gmcp:!1,show_prompts:!0,show_timestamps:!1},I={tabSetEnableTabStrip:!1};let o=0,a=0;const getListenerBucket=e=>(n.has(e)||n.set(e,new Map),n.get(e)),resolveListenerId=(e,t={})=>t.id??"listener-"+ ++a,removeListener=(e,t)=>{const g=n.get(e);if(!g)return!1;if("string"==typeof t)return g.delete(t);for(const[n,C]of g.entries())if(C.handler===t)return g.delete(n),!0;return!1},i=assertAdapterContract({send:g=>{e?.trackRelationshipCommand?.(g),t.push(g)},sendGmcp:(e,g)=>t.push({gmcp:e,data:g}),getVariable:e=>g.get(e),setVariable:(e,t)=>g.set(e,t),getTarget:()=>g.get("_target")??null,setTarget:e=>g.set("_target",e),notice:()=>{},getHostSettings:()=>C,setHostSetting:(e,t)=>{C[e]=t},getHostLayoutSnapshot:()=>I,updateHostLayoutAttributes:e=>{Object.assign(I,e)},focusInput:()=>{},getConfiguredDefences:()=>[],gagCurrentBlock:()=>{o+=1},on:(e,t,g)=>{const n=resolveListenerId(t,g);return getListenerBucket(e).set(n,{handler:t,once:Boolean(g?.once)}),()=>removeListener(e,n)},off:(e,t)=>removeListener(e,t),destroy:()=>{n.clear()}});return i._test={getSentCommands:()=>[...t],clearCommands:()=>{t.length=0},getGaggedBlockCount:()=>o,triggerEvent:(e,t)=>{const g=n.get(e);if(g)for(const[n,C]of[...g.entries()])C.handler(t),C.once&&g.delete(n)},setVariable:(e,t)=>g.set(e,t)},i},bootstrapPlayground=(e={})=>{const{feedPollingEnabled:t=!0,startupPhaseHandlers:g={},runtimePorts:n,...C}=e,I=n??createBrowserRuntimePorts(),o=createMockAdapter();let a,i=null;const ensureFeedPoller=()=>t?(i??=createGameFeedPoller({feedStore:a.stores.feed,fetchFn:I.fetch,setIntervalFn:I.setInterval,clearIntervalFn:I.clearInterval}),i):null;a=createNexGui({adapter:o,runtimePorts:I,startupPhaseHandlers:{...g,[lt.BOOTING]:async e=>{await(g[lt.BOOTING]?.(e)),injectTranscriptStyles(),ensureFeedPoller()?.start()}},...C});const s=a.destroy.bind(a);return a.destroy=()=>{i?.stop(),s()},a},tc=Object.freeze({NexGuiContext:_t,applyInlineNameHighlighting,createMuiTheme,createReplacementDescriptor,generateReplacementHtml,injectReplacementBaseStyles,isRoomNpcItem,nexGuiIcons:Gl,panels:Object.freeze({CombatStream,DefencesPanel,GameFeed,ItemsPanel,MainDisplay,MetricsPanel,NpcsPanel,OptionsPanel,PartyPanel,PlayersPanel,StatsPanel,SystemStream,TargetPanel,TimersPanel})});e.TOPICS=$,e.bootstrapNexus=bootstrapNexus,e.bootstrapPlayground=bootstrapPlayground,e.composePublicApi=composePublicApi,e.createMockAdapter=createMockAdapter,e.createNexGui=createNexGui,e.createNexusAdapter=createNexusAdapter,e.defaultTokens=Bt,e.playground=tc,e.updateNxs=updateNxs}(globalThis.nexGui=globalThis.nexGui||{},React,ReactDOM,ReactDOM);
152
+ `:null,useUtilityClasses$6=e=>{const{classes:t,variant:g,color:n}=e;return composeClasses({root:["root",`color${Qn(n)}`,g],dashed:["dashed"],bar1:["bar","bar1"],bar2:["bar","bar2","buffer"===g&&`color${Qn(n)}`]},getLinearProgressUtilityClass,t)},getColorShade=(e,t)=>e.vars?e.vars.palette.LinearProgress[`${t}Bg`]:"light"===e.palette.mode?e.lighten(e.palette[t].main,.62):e.darken(e.palette[t].main,.5),La=On("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,t[`color${Qn(g.color)}`],t[g.variant]]}})(Vn(({theme:e})=>({position:"relative",overflow:"hidden",display:"block",height:4,zIndex:0,"@media print":{colorAdjust:"exact"},variants:[...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{backgroundColor:getColorShade(e,t)}})),{props:({ownerState:e})=>"inherit"===e.color&&"buffer"!==e.variant,style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}]}))),Ba=On("span",{name:"MuiLinearProgress",slot:"Dashed"})(Vn(({theme:e})=>({position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>{const g=getColorShade(e,t);return{props:{color:t},style:{backgroundImage:`radial-gradient(${g} 0%, ${g} 16%, transparent 42%)`}}})]})),Ga||{animation:`${za} 3s infinite linear`}),Fa=On("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:(e,t)=>[t.bar,t.bar1]})(Vn(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{backgroundColor:(e.vars||e).palette[t].main}})),{props:{variant:"determinate"},style:{transition:`transform .${Pa}s linear`}},{props:{variant:"buffer"},style:{zIndex:1,transition:`transform .${Pa}s linear`}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:Da||{animation:`${Na} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`}}]}))),Wa=On("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:(e,t)=>[t.bar,t.bar2]})(Vn(({theme:e})=>({width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{"--LinearProgressBar2-barColor":(e.vars||e).palette[t].main}})),{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"!==e.color,style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:({ownerState:e})=>"buffer"!==e.variant&&"inherit"===e.color,style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:.3}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t,variant:"buffer"},style:{backgroundColor:getColorShade(e,t),transition:`transform .${Pa}s linear`}})),{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:{width:"auto"}},{props:({ownerState:e})=>"indeterminate"===e.variant||"query"===e.variant,style:ja||{animation:`${Oa} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite`}}]}))),Va=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiLinearProgress"}),{className:n,color:C="primary",max:o,min:I,value:a,valueBuffer:i,variant:s="indeterminate",...l}=g,c={...g,color:C,variant:s},u=I??0,d=o??100,p=useUtilityClasses$6(c),m=useRtl(),h={},y={bar1:{},bar2:{}};if(("determinate"===s||"buffer"===s)&&void 0!==a){const e=d-u;let t=(a-u)/e*100-100;m&&(t=-t),y.bar1.transform=e>0?`translateX(${t}%)`:"translateX(-100%)",h["aria-valuenow"]=a,h["aria-valuemin"]=u,h["aria-valuemax"]=d}if("buffer"===s&&void 0!==i){const e=d-u;let t=(i-u)/e*100-100;m&&(t=-t),y.bar2.transform=e>0?`translateX(${t}%)`:"translateX(-100%)"}return(0,gr.jsxs)(La,{className:clsx(p.root,n),ownerState:c,role:"progressbar",...h,ref:t,...l,children:["buffer"===s?(0,gr.jsx)(Ba,{className:p.dashed,ownerState:c}):null,(0,gr.jsx)(Fa,{className:p.bar1,ownerState:c,style:y.bar1}),"determinate"===s?null:(0,gr.jsx)(Wa,{className:p.bar2,ownerState:c,style:y.bar2})]})});function getTabUtilityClass(e){return generateUtilityClass("MuiTab",e)}var Ua=generateUtilityClasses("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","icon"]),useUtilityClasses$5=e=>{const{classes:t,textColor:g,fullWidth:n,wrapped:C,icon:o,label:I,selected:a,disabled:i}=e;return composeClasses({root:["root",o&&I&&"labelIcon",`textColor${Qn(g)}`,n&&"fullWidth",C&&"wrapped",a&&"selected",i&&"disabled"],icon:["icon"]},getTabUtilityClass,t)},Ka=On(OC,{name:"MuiTab",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.label&&g.icon&&t.labelIcon,t[`textColor${Qn(g.textColor)}`],g.fullWidth&&t.fullWidth,g.wrapped&&t.wrapped,{[`& .${Ua.icon}`]:t.icon}]}})(Vn(({theme:e})=>({...e.typography.button,maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center",lineHeight:1.25,variants:[{props:({ownerState:e})=>e.label&&("top"===e.iconPosition||"bottom"===e.iconPosition),style:{flexDirection:"column"}},{props:({ownerState:e})=>e.label&&"top"!==e.iconPosition&&"bottom"!==e.iconPosition,style:{flexDirection:"row"}},{props:({ownerState:e})=>e.icon&&e.label,style:{minHeight:72,paddingTop:9,paddingBottom:9}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"top"===t,style:{[`& > .${Ua.icon}`]:{marginBottom:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"bottom"===t,style:{[`& > .${Ua.icon}`]:{marginTop:6}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"start"===t,style:{[`& > .${Ua.icon}`]:{marginRight:e.spacing(1)}}},{props:({ownerState:e,iconPosition:t})=>e.icon&&e.label&&"end"===t,style:{[`& > .${Ua.icon}`]:{marginLeft:e.spacing(1)}}},{props:{textColor:"inherit"},style:{color:"inherit",opacity:.6,[`&.${Ua.selected}`]:{opacity:1},[`&.${Ua.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity}}},{props:{textColor:"primary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Ua.selected}`]:{color:(e.vars||e).palette.primary.main},[`&.${Ua.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:{textColor:"secondary"},style:{color:(e.vars||e).palette.text.secondary,[`&.${Ua.selected}`]:{color:(e.vars||e).palette.secondary.main},[`&.${Ua.disabled}`]:{color:(e.vars||e).palette.text.disabled}}},{props:({ownerState:e})=>e.fullWidth,style:{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"}},{props:({ownerState:e})=>e.wrapped,style:{fontSize:e.typography.pxToRem(12)}}]}))),Ha=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiTab"}),{className:n,disabled:C=!1,disableFocusRipple:o=!1,fullWidth:I,icon:a,iconPosition:i="top",indicator:s,label:c,onChange:u,onClick:d,onFocus:p,selected:m,selectionFollowsFocus:h,textColor:y="inherit",value:b,wrapped:v=!1,...x}=g,S=useRovingTabIndexContext(),w=useRovingTabIndexItem({id:b,ref:t,disabled:C,selected:m}),E=0===S.getItemMap().size&&m?0:w.tabIndex,R={...g,disabled:C,disableFocusRipple:o,selected:m,icon:!!a,iconPosition:i,label:!!c,fullWidth:I,textColor:y,wrapped:v},M=useUtilityClasses$5(R),T=a&&c&&l.isValidElement(a)?l.cloneElement(a,{className:clsx(M.icon,a.props.className)}):a,handleClick=e=>{!m&&u&&u(e,b),d&&d(e)},handleFocus=e=>{h&&!m&&u&&u(e,b),p&&p(e)};return(0,gr.jsxs)(Ka,{internalNativeButton:!0,focusRipple:!o,className:clsx(M.root,n),ref:w.ref,role:"tab","aria-selected":m,disabled:C,onClick:handleClick,onFocus:handleFocus,tabIndex:E,ownerState:R,...x,children:["top"===i||"start"===i?(0,gr.jsxs)(l.Fragment,{children:[T,c]}):(0,gr.jsxs)(l.Fragment,{children:[c,T]}),s]})});function easeInOutSin(e){return(1+Math.sin(Math.PI*e-Math.PI/2))/2}function animate(e,t,g,n={},C=()=>{}){const{ease:o=easeInOutSin,duration:I=300}=n;let a=null;const i=t[e];let s=!1;const cancel=()=>{s=!0},step=n=>{if(s)return void C(new Error("Animation cancelled"));null===a&&(a=n);const l=Math.min(1,(n-a)/I);t[e]=o(l)*(g-i)+i,l>=1?requestAnimationFrame(()=>{C(null)}):requestAnimationFrame(step)};return i===g?(C(new Error("Element already at target position")),cancel):(requestAnimationFrame(step),cancel)}var Ya={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll",pointerEvents:"none"};function ScrollbarSize(e){const{onChange:t,...g}=e,n=l.useRef(),C=l.useRef(null),setMeasurements=()=>{n.current=C.current.offsetHeight-C.current.clientHeight};return RA(()=>{const e=zA(()=>{const e=n.current;setMeasurements(),e!==n.current&&t(n.current)}),g=kA(C.current);return g.addEventListener("resize",e),()=>{e.clear(),g.removeEventListener("resize",e)}},[t]),l.useEffect(()=>{setMeasurements(),t(n.current)},[t]),(0,gr.jsx)("div",{style:Ya,...g,ref:C})}var Za=createSvgIcon((0,gr.jsx)("path",{d:"M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"}),"KeyboardArrowLeft"),Qa=createSvgIcon((0,gr.jsx)("path",{d:"M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"}),"KeyboardArrowRight");function getTabScrollButtonUtilityClass(e){return generateUtilityClass("MuiTabScrollButton",e)}var Xa=generateUtilityClasses("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),useUtilityClasses$4=e=>{const{classes:t,orientation:g,disabled:n}=e;return composeClasses({root:["root",g,n&&"disabled"]},getTabScrollButtonUtilityClass,t)},_a=On(OC,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,g.orientation&&t[g.orientation]]}})({width:40,flexShrink:0,opacity:.8,[`&.${Xa.disabled}`]:{opacity:0},variants:[{props:{orientation:"vertical"},style:{width:"100%",height:40,"& svg":{transform:"var(--TabScrollButton-svgRotate)"}}}]}),qa=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiTabScrollButton"}),{className:n,slots:C={},slotProps:o={},direction:I,orientation:a,disabled:i,...s}=g,{nativeButton:l,...c}=s,u=useRtl(),d={isRtl:u,...g},p=useUtilityClasses$4(d),m=C.StartScrollButtonIcon??Za,h=C.EndScrollButtonIcon??Qa,y=useSlotProps({elementType:m,externalSlotProps:o.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d}),b=useSlotProps({elementType:h,externalSlotProps:o.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:d});return(0,gr.jsx)(_a,{component:"div",className:clsx(p.root,n),ref:t,role:null,ownerState:d,tabIndex:null,...c,style:{...c.style,..."vertical"===a&&{"--TabScrollButton-svgRotate":`rotate(${u?-90:90}deg)`}},children:"left"===I?(0,gr.jsx)(m,{...y}):(0,gr.jsx)(h,{...b})})});function getTabsUtilityClass(e){return generateUtilityClass("MuiTabs",e)}var Ja=generateUtilityClasses("MuiTabs",["root","vertical","list","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),useUtilityClasses$3=e=>{const{vertical:t,fixed:g,hideScrollbar:n,scrollableX:C,scrollableY:o,centered:I,scrollButtonsHideMobile:a,classes:i}=e;return composeClasses({root:["root",t&&"vertical"],scroller:["scroller",g&&"fixed",n&&"hideScrollbar",C&&"scrollableX",o&&"scrollableY"],list:["list",t&&"vertical",I&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",a&&"scrollButtonsHideMobile"],scrollableX:[C&&"scrollableX"],hideScrollbar:[n&&"hideScrollbar"]},getTabsUtilityClass,i)},$a=On("div",{name:"MuiTabs",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[{[`& .${Ja.scrollButtons}`]:t.scrollButtons},{[`& .${Ja.scrollButtons}`]:g.scrollButtonsHideMobile&&t.scrollButtonsHideMobile},t.root,g.vertical&&t.vertical]}})(Vn(({theme:e})=>({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.scrollButtonsHideMobile,style:{[`& .${Ja.scrollButtons}`]:{[e.breakpoints.down("sm")]:{display:"none"}}}}]}))),ei=On("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.scroller,g.fixed&&t.fixed,g.hideScrollbar&&t.hideScrollbar,g.scrollableX&&t.scrollableX,g.scrollableY&&t.scrollableY]}})({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap",variants:[{props:({ownerState:e})=>e.fixed,style:{overflowX:"hidden",width:"100%"}},{props:({ownerState:e})=>e.hideScrollbar,style:{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}},{props:({ownerState:e})=>e.scrollableX,style:{overflowX:"auto",overflowY:"hidden"}},{props:({ownerState:e})=>e.scrollableY,style:{overflowY:"auto",overflowX:"hidden"}}]}),ti=On("div",{name:"MuiTabs",slot:"List",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.list,g.centered&&t.centered]}})({display:"flex",variants:[{props:({ownerState:e})=>e.vertical,style:{flexDirection:"column"}},{props:({ownerState:e})=>e.centered,style:{justifyContent:"center"}}]}),gi=On("span",{name:"MuiTabs",slot:"Indicator"})(Vn(({theme:e})=>({position:"absolute",height:2,bottom:0,width:"100%",transition:e.transitions.create(),variants:[{props:{indicatorColor:"primary"},style:{backgroundColor:(e.vars||e).palette.primary.main}},{props:{indicatorColor:"secondary"},style:{backgroundColor:(e.vars||e).palette.secondary.main}},{props:({ownerState:e})=>e.vertical,style:{height:"100%",width:2,right:0}}]}))),ri=On(ScrollbarSize)({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),ni={},Ai=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiTabs"}),n=useTheme$1(),C=useRtl(),{"aria-label":o,"aria-labelledby":I,action:a,centered:i=!1,children:s,className:c,component:u="div",allowScrollButtonsMobile:d=!1,indicatorColor:p="primary",onChange:m,orientation:h="horizontal",scrollButtons:y="auto",selectionFollowsFocus:b,slots:v={},slotProps:x={},textColor:S="primary",value:w,variant:E="standard",visibleScrollbar:R=!1,...M}=g,T="scrollable"===E,P="vertical"===h,N=P?"scrollTop":"scrollLeft",D=P?"top":"left",O=P?"bottom":"right",j=P?"clientHeight":"clientWidth",G=P?"height":"width",L={...g,component:u,allowScrollButtonsMobile:d,indicatorColor:p,orientation:h,vertical:P,scrollButtons:y,textColor:S,variant:E,visibleScrollbar:R,fixed:!T,hideScrollbar:T&&!R,scrollableX:T&&!P,scrollableY:T&&P,centered:i&&!T,scrollButtonsHideMobile:!d},B=useUtilityClasses$3(L),F=useSlotProps({elementType:v.startScrollButtonIcon,externalSlotProps:x.startScrollButtonIcon,ownerState:L}),W=useSlotProps({elementType:v.endScrollButtonIcon,externalSlotProps:x.endScrollButtonIcon,ownerState:L}),[V,U]=l.useState(!1),[K,H]=l.useState(ni),[Y,Z]=l.useState(!1),[Q,X]=l.useState(!1),[_,q]=l.useState(!1),J=!1===w?null:w,[$,ee]=l.useState(!1),[te,ge]=l.useState({overflow:"hidden",scrollbarWidth:0}),re=new Map,ne=l.useRef(null),Ae=l.useRef(null),Ce={slots:v,slotProps:x},getTabsMeta=()=>{const e=ne.current;let t,g;if(e){const g=e.getBoundingClientRect();t={clientWidth:e.clientWidth,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop,scrollWidth:e.scrollWidth,top:g.top,bottom:g.bottom,left:g.left,right:g.right}}if(e&&!1!==w){const e=Ae.current.children;if(e.length>0){const t=e[re.get(w)];g=t?t.getBoundingClientRect():null}}return{tabsMeta:t,tabMeta:g}},oe=wA(()=>{const{tabsMeta:e,tabMeta:t}=getTabsMeta();let g,n=0;P?(g="top",t&&e&&(n=t.top-e.top+e.scrollTop)):(g=C?"right":"left",t&&e&&(n=(C?-1:1)*(t[g]-e[g]+e.scrollLeft)));const o={[g]:n,[G]:t?t[G]:0};if("number"!=typeof K[g]||"number"!=typeof K[G])H(o);else{const e=Math.abs(K[g]-o[g]),t=Math.abs(K[G]-o[G]);(e>=1||t>=1)&&H(o)}}),scroll=(e,{animation:t=!0}={})=>{t?animate(N,ne.current,e,{duration:n.transitions.duration.standard}):ne.current[N]=e},moveTabsScroll=e=>{let t=ne.current[N];t+=P?e:e*(C?-1:1),scroll(t)},getScrollSize=()=>{const e=ne.current[j];let t=0;const g=Array.from(Ae.current.children);for(let n=0;n<g.length;n+=1){const C=g[n];if(t+C[j]>e){0===n&&(t=e);break}t+=C[j]}return t},handleStartScrollClick=()=>{moveTabsScroll(-1*getScrollSize())},handleEndScrollClick=()=>{moveTabsScroll(getScrollSize())},[Ie,{onChange:ae,...ie}]=useSlot("scrollbar",{className:clsx(B.scrollableX,B.hideScrollbar),elementType:ri,shouldForwardComponentProp:!0,externalForwardedProps:Ce,ownerState:L}),se=l.useCallback(e=>{ae?.(e),ge({overflow:null,scrollbarWidth:e})},[ae]),[le,ce]=useSlot("scrollButtons",{className:B.scrollButtons,elementType:qa,externalForwardedProps:Ce,ownerState:L,additionalProps:{orientation:h,slots:{StartScrollButtonIcon:v.startScrollButtonIcon,EndScrollButtonIcon:v.endScrollButtonIcon},slotProps:{startScrollButtonIcon:F,endScrollButtonIcon:W}}}),getConditionalElements=()=>{const e={};e.scrollbarSizeListener=T?(0,gr.jsx)(Ie,{...ie,onChange:se}):null;const t=T&&("auto"===y&&(Y||Q)||!0===y);return e.scrollButtonStart=t?(0,gr.jsx)(le,{direction:C?"right":"left",onClick:handleStartScrollClick,disabled:!Y,...ce}):null,e.scrollButtonEnd=t?(0,gr.jsx)(le,{direction:C?"left":"right",onClick:handleEndScrollClick,disabled:!Q,...ce}):null,e},ue=wA(e=>{const{tabsMeta:t,tabMeta:g}=getTabsMeta();g&&t&&(g[D]<t[D]?scroll(t[N]+(g[D]-t[D]),{animation:e}):g[O]>t[O]&&scroll(t[N]+(g[O]-t[O]),{animation:e}))}),de=wA(()=>{T&&!1!==y&&q(!_)});l.useEffect(()=>{const e=zA(()=>{ne.current&&oe()});let t;const handleMutation=g=>{g.forEach(e=>{e.removedNodes.forEach(e=>{t?.unobserve(e)}),e.addedNodes.forEach(e=>{t?.observe(e)})}),e(),de()},g=kA(ne.current);let n;return g.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(t=new ResizeObserver(e),Array.from(Ae.current.children).forEach(e=>{t.observe(e)})),"undefined"!=typeof MutationObserver&&(n=new MutationObserver(handleMutation),n.observe(Ae.current,{childList:!0})),()=>{e.clear(),g.removeEventListener("resize",e),n?.disconnect(),t?.disconnect()}},[oe,de]),l.useEffect(()=>{const e=Array.from(Ae.current.children),t=e.length;if("undefined"!=typeof IntersectionObserver&&t>0&&T&&!1!==y){const g=e[0],n=e[t-1],C={root:ne.current,threshold:.99},o=new IntersectionObserver(e=>{Z(!e[0].isIntersecting)},C);o.observe(g);const I=new IntersectionObserver(e=>{X(!e[0].isIntersecting)},C);return I.observe(n),()=>{o.disconnect(),I.disconnect()}}},[T,y,_,s?.length]),l.useEffect(()=>{U(!0)},[]),l.useEffect(()=>{oe()}),l.useEffect(()=>{ue(ni!==K)},[ue,K]),l.useImperativeHandle(a,()=>({updateIndicator:oe,updateScrollButtons:de}),[oe,de]);const[pe,me]=useSlot("indicator",{className:B.indicator,elementType:gi,externalForwardedProps:Ce,ownerState:L,additionalProps:{style:K}}),fe=(0,gr.jsx)(pe,{...me}),he=useRovingTabIndexRoot({activeItemId:$?void 0:J,orientation:h,isRtl:C}),ye=he.getContainerProps(),be=l.Children.toArray(s).filter(l.isValidElement).map((e,t)=>{const g=void 0===e.props.value?t:e.props.value;return re.set(g,t),{child:e,index:t,childValue:g}}).map(({child:e,childValue:t})=>{const g=t===w;return l.cloneElement(e,{fullWidth:"fullWidth"===E,indicator:g&&!V&&fe,selected:g,selectionFollowsFocus:b,onChange:m,textColor:S,value:t})}),ve=getConditionalElements(),[xe,Se]=useSlot("root",{ref:t,className:clsx(B.root,c),elementType:$a,externalForwardedProps:{...Ce,...M,component:u},ownerState:L}),[we,Ee]=useSlot("scroller",{ref:ne,className:B.scroller,elementType:ei,externalForwardedProps:Ce,ownerState:L,additionalProps:{style:{overflow:te.overflow,[P?"margin"+(C?"Left":"Right"):"marginBottom"]:R?void 0:-te.scrollbarWidth}}}),Re=EA(ye.ref,Ae),handleKeyDown=e=>{const t=Ae.current;"tab"===xA(vA(t))?.getAttribute("role")&&ye.onKeyDown(e)},[ke,Me]=useSlot("list",{ref:Re,className:B.list,elementType:ti,externalForwardedProps:Ce,ownerState:L,getSlotProps:e=>({...e,onBlur:t=>{bA(t.currentTarget,t.relatedTarget)||ee(!1),e.onBlur?.(t)},onKeyDown:t=>{handleKeyDown(t),e.onKeyDown?.(t)},onFocus:t=>{ee(!0),ye.onFocus(t),e.onFocus?.(t)}})});return(0,gr.jsxs)(xe,{...Se,children:[ve.scrollButtonStart,ve.scrollbarSizeListener,(0,gr.jsxs)(we,{...Ee,children:[(0,gr.jsx)(ke,{"aria-label":o,"aria-labelledby":I,"aria-orientation":"vertical"===h?"vertical":null,role:"tablist",...Me,children:(0,gr.jsx)(fA.Provider,{value:he,children:be})}),V&&fe]}),ve.scrollButtonEnd]})}),selectPlayStatsSlice=e=>({instance:e.instance,session:e.session,month:e.month,updateInstance:e.updateInstance,updateSession:e.updateSession,updateMonth:e.updateMonth,resetInstance:e.resetInstance}),usePlayStats=()=>{const{stores:e}=useNexGui();return e.playStats(useShallow(selectPlayStatsSlice))},Ci="metrics",oi=Object.freeze(["instance","session","month"]),Ii=Object.freeze({instance:"Instance",session:"Session",month:"Month"}),ai=1e3,ii=35e4,si=45e4,getFlipTransform$7=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},formatNumber$1=e=>e.toLocaleString("en-US"),formatPercent=e=>`${e.toFixed(2)}%`,formatElapsed=(e,t=Date.now())=>{const g=Math.max(0,t-e),n=Math.floor(g/1e3),C=Math.floor(n/3600),o=Math.floor(n%3600/60);return[C>0?`${C}h`:null,C>0||o>0?`${o}m`:null,n%60+"s"].filter(Boolean).join(" ")},formatPerHour=(e,t,g=Date.now())=>{const n=Math.max(0,g-t)/36e5,C=parseInt(e/n,10);return C>0?formatNumber$1(C):"0"},resolveActiveTabId$2=e=>"string"==typeof e&&oi.includes(e)?e:"number"==typeof e?oi[e]??"month":"month",li={kills:Yn.default.number.isRequired,goldGained:Yn.default.number.isRequired,xpPercent:Yn.default.number.isRequired,xpValue:Yn.default.number.isRequired,deaths:Yn.default.number.isRequired,startedAt:Yn.default.number.isRequired},ci=Yn.default.shape(li),ui=Yn.default.shape({...li,goldCap:Yn.default.number.isRequired,year:Yn.default.number,month:Yn.default.number}),StatTable=({rows:e})=>React.createElement(Wn,{component:"table",sx:{borderCollapse:"collapse","& td":{pb:.5,pr:2,verticalAlign:"top"},"& td:last-of-type":{fontVariantNumeric:"tabular-nums"}}},React.createElement("tbody",null,e.map((e,t)=>React.createElement("tr",{key:`${e.label}-${t}`},React.createElement("td",null,e.label),React.createElement("td",null,e.value)))));StatTable.displayName="MetricsPanelStatTable",StatTable.propTypes={rows:Yn.default.arrayOf(Yn.default.shape({label:Yn.default.string.isRequired,value:Yn.default.node.isRequired})).isRequired};var LinearProgressWithLabel=({label:e,value:t})=>React.createElement(Wn,{sx:{mt:2}},React.createElement(Wn,{sx:{fontSize:"9px",mb:.25}},e),React.createElement(Wn,{sx:{alignItems:"center",display:"flex"}},React.createElement(Wn,{sx:{mr:1,width:"100%"}},React.createElement(Va,{"aria-label":e,sx:{borderRadius:5,height:5},value:t,variant:"determinate"})),React.createElement(Wn,{sx:{minWidth:35}},React.createElement(qn,{color:"text.secondary",variant:"body2"},`${t}%`))));LinearProgressWithLabel.displayName="MetricsPanelLinearProgressWithLabel",LinearProgressWithLabel.propTypes={label:Yn.default.string.isRequired,value:Yn.default.number.isRequired};var MonthGoldCap=({goldCap:e})=>React.createElement(Wn,{sx:{mt:1}},React.createElement(LinearProgressWithLabel,{label:"Soft Gold Cap",value:e<=ii?parseInt(e/ii*100,10):100}),React.createElement(LinearProgressWithLabel,{label:"Hard Gold Cap",value:e<=si?parseInt(e/si*100,10):100}));MonthGoldCap.displayName="MetricsPanelMonthGoldCap",MonthGoldCap.propTypes={goldCap:Yn.default.number.isRequired};var ScopeContent=({now:e,onReset:t,scope:g,scopeKey:n})=>{const C=(0,l.useMemo)(()=>{const t=[{label:"Total Kills:",value:formatNumber$1(g.kills)},{label:"Total Gold:",value:formatNumber$1(g.goldGained)},{label:"Total XP:",value:formatPercent(g.xpPercent)},{label:"Total XP:",value:formatNumber$1(g.xpValue)},{label:"Total Deaths:",value:formatNumber$1(g.deaths)}];return"month"!==n?[...t,{label:"Time:",value:formatElapsed(g.startedAt,e)},{label:"XP/Hr:",value:formatPerHour(g.xpValue,g.startedAt,e)},{label:"Gold/Hr:",value:formatPerHour(g.goldGained,g.startedAt,e)}]:[...t,{label:"Gold Cap:",value:formatNumber$1(g.goldCap)}]},[e,g,n]);return React.createElement(Wn,null,React.createElement(StatTable,{rows:C}),"instance"===n?React.createElement(uo,{onClick:t,sx:{mt:1},variant:"outlined"},"Reset"):null,"month"===n?React.createElement(MonthGoldCap,{goldCap:g.goldCap}):null)};ScopeContent.displayName="MetricsPanelScopeContent",ScopeContent.propTypes={now:Yn.default.number.isRequired,onReset:Yn.default.func.isRequired,scope:Yn.default.oneOfType([ci,ui]).isRequired,scopeKey:Yn.default.oneOf(["instance","session","month"]).isRequired};var MetricsPanelInner=()=>{const e=useTheme$1(),{activeTab:t,setActiveTab:g}=useUi(),{instance:n,session:C,month:o,resetInstance:I}=usePlayStats(),[a]=(0,l.useState)(()=>Math.floor(4*Math.random())),[i,s]=(0,l.useState)(()=>Date.now()),c=e?.nexGui?.backgroundImage??"",u=e?.nexGui?.backgroundOpacity??.5,d=e?.nexGui?.backgroundFilter??"none",p=resolveActiveTabId$2(t[Ci]),m={instance:n,session:C,month:o};(0,l.useEffect)(()=>{if("month"===p)return void s(Date.now());s(Date.now());const e=window.setInterval(()=>{s(Date.now())},ai);return()=>{window.clearInterval(e)}},[p]);const handleTabChange=(e,t)=>{const n=oi.indexOf(t);n>=0&&g(Ci,n)};return React.createElement(Wn,{className:"metrics-panel",sx:{color:"text.primary",height:"100%",overflow:"hidden",position:"relative",width:"100%"}},c?React.createElement(Wn,{"aria-hidden":"true",className:"metrics-panel__background",sx:{backgroundImage:`url(${c})`,backgroundPosition:"center",backgroundSize:"cover",filter:d,inset:0,opacity:u,position:"absolute",transform:getFlipTransform$7(a),zIndex:0}}):null,React.createElement(Wn,{className:"metrics-panel__content",sx:{display:"flex",flexDirection:"column",fontFamily:e.typography.fontFamily,fontSize:e.nexusFontSize??e.typography.fontSize,height:"100%",position:"relative",width:"100%",zIndex:1}},React.createElement(Wn,{sx:{borderBottom:1,borderColor:"divider"}},React.createElement(Ai,{"aria-label":"stats tabs",onChange:handleTabChange,value:p},oi.map(e=>React.createElement(Ha,{key:e,label:Ii[e],value:e})))),React.createElement(Wn,{sx:{flex:1,overflowY:"auto",p:2}},React.createElement(qn,{component:"div",sx:{color:"text.primary",fontFamily:"inherit",fontSize:"inherit",position:"relative"}},React.createElement(ScopeContent,{now:i,onReset:I,scope:m[p],scopeKey:p})))))};MetricsPanelInner.displayName="MetricsPanelInner";var MetricsPanel=()=>React.createElement(Jn,{panelName:"Metrics"},React.createElement(MetricsPanelInner,null));MetricsPanel.displayName="MetricsPanel";var di={id:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired,name:Yn.default.string.isRequired},pi=Yn.default.shape(di),RoomNpcRowComponent=({indent:e=0,interactive:t=!1,isTarget:g=!1,npc:n,onContextMenu:C,onSelect:o})=>{const I=e>0?e:0,a=e>0?e:2;return React.createElement(Wn,{className:["room-npc-row",t?"room-npc-row--interactive":"",g?"room-npc-row--target":""].filter(Boolean).join(" "),onClick:t?()=>o?.(n):void 0,onContextMenu:t?e=>{C?.(e,n)}:void 0,sx:{cursor:t?"pointer":"inherit",display:"table-row",outline:g?"1px solid red":""}},React.createElement(Wn,{component:"div",sx:{color:"cyan",display:"table-cell",padding:`0px 5px 0px ${a}px`,whiteSpace:"nowrap"}},React.createElement(qn,{component:"span",sx:{color:"inherit",fontVariantNumeric:"tabular-nums"},variant:"body2"},n.id)),React.createElement(Wn,{component:"div",sx:{display:"table-cell",padding:`0px 5px 0px ${I}px`,width:"100%"}},React.createElement(qn,{component:"span",sx:{color:"text.primary"},variant:"body2"},n.name)))};RoomNpcRowComponent.displayName="RoomNpcRow",RoomNpcRowComponent.propTypes={npc:pi.isRequired,indent:Yn.default.number,interactive:Yn.default.bool,isTarget:Yn.default.bool,onContextMenu:Yn.default.func,onSelect:Yn.default.func};var mi=(0,l.memo)(RoomNpcRowComponent);mi.displayName="RoomNpcRow",mi.propTypes=RoomNpcRowComponent.propTypes;var selectCharacterSlice=e=>({name:e.name,class:e.class,level:e.level,target:e.target,targetDetails:e.targetDetails,gender:e.gender,balance:e.balance,equilibrium:e.equilibrium,currentAffs:e.currentAffs,limbs:e.limbs,updateCharacter:e.updateCharacter,setClass:e.setClass,setTarget:e.setTarget}),useCharacter=()=>{const{stores:e}=useNexGui();return e.character(useShallow(selectCharacterSlice))},fi=[/a dervish/,/a sharp-toothed gremlin/,/a chaos orb/,/a bloodleech/,/a minion of chaos/,/a worm/,/a green slime/,/a soulmaster/,/a humbug/,/a chimera/,/a bubonis/,/a chaos storm/,/a chaos hound/,/a withered crone/,/a pathfinder/,/a doppleganger/,/an ethereal firelord/,/a simpering sycophant/,/a water weird/,/an eldritch abomination/,/Khaseem/],hi=[/a shipmate/,/a spectral shipmate/],yi=[/a swarthy swashbuckler/],bi=new Set(["guard","person-military-pointing"]),vi=new Set(["face-angry-horns","fiend","monster"]),xi=new Set(["humanoid","person"]),getFlipTransform$6=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},partition=(e,t)=>e.reduce((e,g,n,C)=>(t(g,n,C)?e[0].push(g):e[1].push(g),e),[[],[]]),toNpcEntry=e=>e&&"object"==typeof e&&"string"==typeof e.name?{...e,id:e.id??e.name}:"string"==typeof e?{attrib:"m",id:e,name:e}:null,matchesPatternList=(e,t)=>"string"==typeof e&&t.some(t=>t.test(e)),isVisibleNpc=e=>"m"===e?.attrib||"mx"===e?.attrib,isGuardNpc=e=>bi.has(e?.icon??"")&&"mx"===e?.attrib,isEntityNpc=e=>vi.has(e?.icon??"")&&matchesPatternList(e?.name,fi),isShipmateNpc=e=>matchesPatternList(e?.name,hi),isSwashbucklerNpc=e=>xi.has(e?.icon??"")&&matchesPatternList(e?.name,yi),NpcGroupHeader=({count:e,expanded:t,onToggle:g,title:n})=>e<1?null:React.createElement(Wn,{className:"npcs-panel__group-header",onClick:g,sx:{cursor:"pointer",display:"table-row"}},React.createElement(Wn,{component:"div",sx:{color:"cyan",display:"table-cell",fontFamily:"monospace",padding:"0px 5px 0px 0px",pl:"1rem",whiteSpace:"nowrap"}},React.createElement(qn,{component:"span",sx:{color:"inherit",fontFamily:"inherit"},variant:"body2"},t?"-":"+ ")),React.createElement(Wn,{component:"div",sx:{display:"table-cell"}},React.createElement(qn,{component:"span",sx:{color:"text.primary"},variant:"body2"},"(",e,") ",n)));NpcGroupHeader.displayName="NpcGroupHeader",NpcGroupHeader.propTypes={count:Yn.default.number.isRequired,expanded:Yn.default.bool.isRequired,onToggle:Yn.default.func.isRequired,title:Yn.default.string.isRequired};var NpcsPanelInner=()=>{const e=useTheme$1(),{adapter:t}=useNexGui(),{npcs:g}=useRoom(),{target:n,targetDetails:C}=useCharacter(),[o]=(0,l.useState)(()=>Math.floor(4*Math.random())),[I,a]=(0,l.useState)(!1),[i,s]=(0,l.useState)(!1),[c,u]=(0,l.useState)(!1),[d,p]=(0,l.useState)(!1),m=e?.nexGui?.backgroundImage??"",h=e?.nexGui?.backgroundOpacity??.5,y=e?.nexGui?.backgroundFilter??"none",b=null!=C?.id?String(C.id):null,v=(0,l.useMemo)(()=>(g??[]).map(e=>toNpcEntry(e)).filter(Boolean),[g]),x=(0,l.useMemo)(()=>{let e=[],t=[],g=[],n=[],C=v;return[e,C]=partition(C,isGuardNpc),[t,C]=partition(C,isEntityNpc),[g,C]=partition(C,isShipmateNpc),[n,C]=partition(C,isSwashbucklerNpc),{guards:e,entities:t,shipmates:g,swashbucklers:n,npcs:C.filter(isVisibleNpc)}},[v]),handleNpcSelect=e=>{null!=e?.id&&t.send(`settarget ${e.id}`)},handleNpcContextMenu=e=>{e.preventDefault(),t.notice?.("RIGHT CLICK RIGHT CLICK RIGHT CLICK")};return React.createElement(Wn,{className:"npcs-panel",sx:{height:"100%",overflow:"hidden",position:"relative",width:"100%"}},m?React.createElement(Wn,{"aria-hidden":"true",className:"npcs-panel__background",sx:{backgroundImage:`url(${m})`,backgroundPosition:"center",backgroundSize:"cover",filter:y,inset:0,opacity:h,position:"absolute",transform:getFlipTransform$6(o),zIndex:0}}):null,React.createElement(Wn,{className:"npcs-panel__content",sx:{background:`linear-gradient(180deg, ${alpha("#050505",.18)} 0%, ${alpha("#050505",.36)} 100%)`,color:"text.primary",height:"100%",overflow:"auto",position:"relative",width:"100%",zIndex:1}},React.createElement(Wn,{className:"npcs-panel__rows",sx:{cursor:"pointer",display:"table",fontSize:e.typography.fontSize,m:"10px",maxWidth:"100%",p:"1px",position:"relative",textAlign:"left"}},React.createElement(NpcGroupHeader,{count:x.guards.length,expanded:i,onToggle:()=>s(e=>!e),title:"City Guards"}),i?x.guards.map(e=>React.createElement(mi,{key:`guard-${e.id}`,indent:12,npc:e})):null,React.createElement(NpcGroupHeader,{count:x.entities.length,expanded:I,onToggle:()=>a(e=>!e),title:"Entities"}),I?x.entities.map(e=>React.createElement(mi,{key:`entity-${e.id}`,indent:12,npc:e})):null,React.createElement(NpcGroupHeader,{count:x.shipmates.length,expanded:c,onToggle:()=>u(e=>!e),title:"Shipmates"}),c?x.shipmates.map(e=>React.createElement(mi,{key:`shipmate-${e.id}`,indent:12,npc:e})):null,React.createElement(NpcGroupHeader,{count:x.swashbucklers.length,expanded:d,onToggle:()=>p(e=>!e),title:"Swashbucklers"}),d?x.swashbucklers.map(e=>React.createElement(mi,{key:`swashbuckler-${e.id}`,indent:12,npc:e})):null,x.npcs.map(e=>React.createElement(mi,{key:`npc-${e.id}`,interactive:!0,isTarget:b?String(e.id)===b:e.name===n,npc:e,onContextMenu:handleNpcContextMenu,onSelect:handleNpcSelect})))))};NpcsPanelInner.displayName="NpcsPanelInner";var NpcsPanel=()=>React.createElement(Jn,{panelName:"NPCs"},React.createElement(NpcsPanelInner,null));NpcsPanel.displayName="NpcsPanel";var Si=Object.freeze([]),wi=Yn.default.shape({content:Yn.default.node,id:Yn.default.string.isRequired,label:Yn.default.node.isRequired}),resolveActiveTabId$1=(e,t)=>e.some(e=>e.id===t)?t:e[0]?.id??!1,getFlipTransform$5=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},TabContainerComponent=({tabs:e=Si,activeTab:t=null,backgroundImage:g="",backgroundOpacity:n=.5,backgroundFilter:C="none",onTabChange:o})=>{const[I]=(0,l.useState)(()=>Math.floor(4*Math.random())),a=resolveActiveTabId$1(e,t),i=e.find(e=>e.id===a)??null;return 0===e.length?null:React.createElement(Wn,{className:"nexgui4-tab-container",sx:{display:"flex",flex:1,flexDirection:"column",height:"100%",minHeight:0,minWidth:0,overflow:"hidden",position:"relative",width:"100%"}},g?React.createElement(Wn,{"aria-hidden":"true",className:"nexgui4-tab-container__background",sx:{backgroundImage:`url(${g})`,backgroundPosition:"center",backgroundSize:"cover",filter:C,inset:0,opacity:n,position:"absolute",transform:getFlipTransform$5(I),zIndex:0}}):null,React.createElement(Wn,{className:"nexgui4-tab-container__surface",sx:{display:"flex",flex:1,flexDirection:"column",minHeight:0,minWidth:0,position:"relative",zIndex:1}},React.createElement(Ai,{allowScrollButtonsMobile:!0,"aria-label":"Panel tabs",className:"nexgui4-tab-container__tabs",onChange:(e,t)=>o(t),scrollButtons:"auto",sx:{borderBottom:1,borderColor:"divider",minHeight:40,"& .MuiTab-root":{minHeight:40,textTransform:"none"}},value:a,variant:"scrollable"},e.map(e=>React.createElement(Ha,{"aria-controls":`nexgui4-tab-panel-${e.id}`,id:`nexgui4-tab-${e.id}`,key:e.id,label:e.label,value:e.id}))),React.createElement(Wn,{"aria-labelledby":i?`nexgui4-tab-${i.id}`:void 0,className:"nexgui4-tab-container__tabpanel",id:i?`nexgui4-tab-panel-${i.id}`:void 0,role:"tabpanel",sx:{display:"flex",flex:1,minHeight:0,minWidth:0,overflow:"auto",p:2,position:"relative",zIndex:1}},i?.content??null)))};TabContainerComponent.displayName="TabContainer",TabContainerComponent.propTypes={activeTab:Yn.default.oneOfType([Yn.default.string,Yn.default.oneOf([null])]),backgroundFilter:Yn.default.string,backgroundImage:Yn.default.string,backgroundOpacity:Yn.default.number,onTabChange:Yn.default.func.isRequired,tabs:Yn.default.arrayOf(wi)};var Ei=(0,l.memo)(TabContainerComponent);Ei.displayName="TabContainer",Ei.propTypes=TabContainerComponent.propTypes;var Ri="bottom",ki="right",Mi="left",Ti="auto",Pi=["top",Ri,ki,Mi],Ni="start",Di="clippingParents",Oi="viewport",ji="popper",zi="reference",Gi=Pi.reduce(function(e,t){return e.concat([t+"-"+Ni,t+"-end"])},[]),Li=[].concat(Pi,[Ti]).reduce(function(e,t){return e.concat([t,t+"-"+Ni,t+"-end"])},[]),Bi=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function getNodeName(e){return e?(e.nodeName||"").toLowerCase():null}function getWindow(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function isElement(e){return e instanceof getWindow(e).Element||e instanceof Element}function isHTMLElement$1(e){return e instanceof getWindow(e).HTMLElement||e instanceof HTMLElement}function isShadowRoot(e){return"undefined"!=typeof ShadowRoot&&(e instanceof getWindow(e).ShadowRoot||e instanceof ShadowRoot)}function applyStyles(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var g=t.styles[e]||{},n=t.attributes[e]||{},C=t.elements[e];isHTMLElement$1(C)&&getNodeName(C)&&(Object.assign(C.style,g),Object.keys(n).forEach(function(e){var t=n[e];!1===t?C.removeAttribute(e):C.setAttribute(e,!0===t?"":t)}))})}function effect$2(e){var t=e.state,g={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,g.popper),t.styles=g,t.elements.arrow&&Object.assign(t.elements.arrow.style,g.arrow),function(){Object.keys(t.elements).forEach(function(e){var n=t.elements[e],C=t.attributes[e]||{},o=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:g[e]).reduce(function(e,t){return e[t]="",e},{});isHTMLElement$1(n)&&getNodeName(n)&&(Object.assign(n.style,o),Object.keys(C).forEach(function(e){n.removeAttribute(e)}))})}}var Fi={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(e){return e.split("-")[0]}var Wi=Math.max,Vi=Math.min,Ui=Math.round;function getUAString(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(e,t,g){void 0===t&&(t=!1),void 0===g&&(g=!1);var n=e.getBoundingClientRect(),C=1,o=1;t&&isHTMLElement$1(e)&&(C=e.offsetWidth>0&&Ui(n.width)/e.offsetWidth||1,o=e.offsetHeight>0&&Ui(n.height)/e.offsetHeight||1);var I=(isElement(e)?getWindow(e):window).visualViewport,a=!isLayoutViewport()&&g,i=(n.left+(a&&I?I.offsetLeft:0))/C,s=(n.top+(a&&I?I.offsetTop:0))/o,l=n.width/C,c=n.height/o;return{width:l,height:c,top:s,right:i+l,bottom:s+c,left:i,x:i,y:s}}function getLayoutRect(e){var t=getBoundingClientRect(e),g=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-g)<=1&&(g=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:g,height:n}}function contains(e,t){var g=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(g&&isShadowRoot(g)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function getComputedStyle(e){return getWindow(e).getComputedStyle(e)}function isTableElement(e){return["table","td","th"].indexOf(getNodeName(e))>=0}function getDocumentElement(e){return((isElement(e)?e.ownerDocument:e.document)||window.document).documentElement}function getParentNode(e){return"html"===getNodeName(e)?e:e.assignedSlot||e.parentNode||(isShadowRoot(e)?e.host:null)||getDocumentElement(e)}function getTrueOffsetParent(e){return isHTMLElement$1(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function getContainingBlock(e){var t=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement$1(e)&&"fixed"===getComputedStyle(e).position)return null;var g=getParentNode(e);for(isShadowRoot(g)&&(g=g.host);isHTMLElement$1(g)&&["html","body"].indexOf(getNodeName(g))<0;){var n=getComputedStyle(g);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return g;g=g.parentNode}return null}function getOffsetParent(e){for(var t=getWindow(e),g=getTrueOffsetParent(e);g&&isTableElement(g)&&"static"===getComputedStyle(g).position;)g=getTrueOffsetParent(g);return g&&("html"===getNodeName(g)||"body"===getNodeName(g)&&"static"===getComputedStyle(g).position)?t:g||getContainingBlock(e)||t}function getMainAxisFromPlacement(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function within(e,t,g){return Wi(e,Vi(t,g))}function withinMaxClamp(e,t,g){var n=within(e,t,g);return n>g?g:n}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(e){return Object.assign({},getFreshSideObject(),e)}function expandToHashMap(e,t){return t.reduce(function(t,g){return t[g]=e,t},{})}var toPaddingObject=function(e,t){return mergePaddingObject("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:expandToHashMap(e,Pi))};function arrow(e){var t,g=e.state,n=e.name,C=e.options,o=g.elements.arrow,I=g.modifiersData.popperOffsets,a=getBasePlacement(g.placement),i=getMainAxisFromPlacement(a),s=["left","right"].indexOf(a)>=0?"height":"width";if(o&&I){var l=toPaddingObject(C.padding,g),c=getLayoutRect(o),u="y"===i?"top":Mi,d="y"===i?Ri:ki,p=g.rects.reference[s]+g.rects.reference[i]-I[i]-g.rects.popper[s],m=I[i]-g.rects.reference[i],h=getOffsetParent(o),y=h?"y"===i?h.clientHeight||0:h.clientWidth||0:0,b=p/2-m/2,v=l[u],x=y-c[s]-l[d],S=y/2-c[s]/2+b,w=within(v,S,x),E=i;g.modifiersData[n]=((t={})[E]=w,t.centerOffset=w-S,t)}}function effect$1(e){var t=e.state,g=e.options.element,n=void 0===g?"[data-popper-arrow]":g;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&contains(t.elements.popper,n)&&(t.elements.arrow=n)}function getVariation(e){return e.split("-")[1]}var Ki={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(e,t){var g=e.x,n=e.y,C=t.devicePixelRatio||1;return{x:Ui(g*C)/C||0,y:Ui(n*C)/C||0}}function mapToStyles(e){var t,g=e.popper,n=e.popperRect,C=e.placement,o=e.variation,I=e.offsets,a=e.position,i=e.gpuAcceleration,s=e.adaptive,l=e.roundOffsets,c=e.isFixed,u=I.x,d=void 0===u?0:u,p=I.y,m=void 0===p?0:p,h="function"==typeof l?l({x:d,y:m}):{x:d,y:m};d=h.x,m=h.y;var y=I.hasOwnProperty("x"),b=I.hasOwnProperty("y"),v=Mi,x="top",S=window;if(s){var w=getOffsetParent(g),E="clientHeight",R="clientWidth";w===getWindow(g)&&"static"!==getComputedStyle(w=getDocumentElement(g)).position&&"absolute"===a&&(E="scrollHeight",R="scrollWidth"),("top"===C||("left"===C||"right"===C)&&"end"===o)&&(x=Ri,m-=(c&&w===S&&S.visualViewport?S.visualViewport.height:w[E])-n.height,m*=i?1:-1),"left"!==C&&("top"!==C&&"bottom"!==C||"end"!==o)||(v=ki,d-=(c&&w===S&&S.visualViewport?S.visualViewport.width:w[R])-n.width,d*=i?1:-1)}var M,T=Object.assign({position:a},s&&Ki),P=!0===l?roundOffsetsByDPR({x:d,y:m},getWindow(g)):{x:d,y:m};return d=P.x,m=P.y,i?Object.assign({},T,((M={})[x]=b?"0":"",M[v]=y?"0":"",M.transform=(S.devicePixelRatio||1)<=1?"translate("+d+"px, "+m+"px)":"translate3d("+d+"px, "+m+"px, 0)",M)):Object.assign({},T,((t={})[x]=b?m+"px":"",t[v]=y?d+"px":"",t.transform="",t))}function computeStyles(e){var t=e.state,g=e.options,n=g.gpuAcceleration,C=void 0===n||n,o=g.adaptive,I=void 0===o||o,a=g.roundOffsets,i=void 0===a||a,s={placement:getBasePlacement(t.placement),variation:getVariation(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:C,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mapToStyles(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:I,roundOffsets:i})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mapToStyles(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:i})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var Hi={passive:!0};function effect(e){var t=e.state,g=e.instance,n=e.options,C=n.scroll,o=void 0===C||C,I=n.resize,a=void 0===I||I,i=getWindow(t.elements.popper),s=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&s.forEach(function(e){e.addEventListener("scroll",g.update,Hi)}),a&&i.addEventListener("resize",g.update,Hi),function(){o&&s.forEach(function(e){e.removeEventListener("scroll",g.update,Hi)}),a&&i.removeEventListener("resize",g.update,Hi)}}var Yi={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,function(e){return Yi[e]})}var Zi={start:"end",end:"start"};function getOppositeVariationPlacement(e){return e.replace(/start|end/g,function(e){return Zi[e]})}function getWindowScroll(e){var t=getWindow(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getWindowScroll(e).scrollLeft}function getViewportRect(e,t){var g=getWindow(e),n=getDocumentElement(e),C=g.visualViewport,o=n.clientWidth,I=n.clientHeight,a=0,i=0;if(C){o=C.width,I=C.height;var s=isLayoutViewport();(s||!s&&"fixed"===t)&&(a=C.offsetLeft,i=C.offsetTop)}return{width:o,height:I,x:a+getWindowScrollBarX(e),y:i}}function getDocumentRect(e){var t,g=getDocumentElement(e),n=getWindowScroll(e),C=null==(t=e.ownerDocument)?void 0:t.body,o=Wi(g.scrollWidth,g.clientWidth,C?C.scrollWidth:0,C?C.clientWidth:0),I=Wi(g.scrollHeight,g.clientHeight,C?C.scrollHeight:0,C?C.clientHeight:0),a=-n.scrollLeft+getWindowScrollBarX(e),i=-n.scrollTop;return"rtl"===getComputedStyle(C||g).direction&&(a+=Wi(g.clientWidth,C?C.clientWidth:0)-o),{width:o,height:I,x:a,y:i}}function isScrollParent(e){var t=getComputedStyle(e),g=t.overflow,n=t.overflowX,C=t.overflowY;return/auto|scroll|overlay|hidden/.test(g+C+n)}function getScrollParent(e){return["html","body","#document"].indexOf(getNodeName(e))>=0?e.ownerDocument.body:isHTMLElement$1(e)&&isScrollParent(e)?e:getScrollParent(getParentNode(e))}function listScrollParents(e,t){var g;void 0===t&&(t=[]);var n=getScrollParent(e),C=n===(null==(g=e.ownerDocument)?void 0:g.body),o=getWindow(n),I=C?[o].concat(o.visualViewport||[],isScrollParent(n)?n:[]):n,a=t.concat(I);return C?a:a.concat(listScrollParents(getParentNode(I)))}function rectToClientRect(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function getInnerBoundingClientRect(e,t){var g=getBoundingClientRect(e,!1,"fixed"===t);return g.top=g.top+e.clientTop,g.left=g.left+e.clientLeft,g.bottom=g.top+e.clientHeight,g.right=g.left+e.clientWidth,g.width=e.clientWidth,g.height=e.clientHeight,g.x=g.left,g.y=g.top,g}function getClientRectFromMixedType(e,t,g){return"viewport"===t?rectToClientRect(getViewportRect(e,g)):isElement(t)?getInnerBoundingClientRect(t,g):rectToClientRect(getDocumentRect(getDocumentElement(e)))}function getClippingParents(e){var t=listScrollParents(getParentNode(e)),g=["absolute","fixed"].indexOf(getComputedStyle(e).position)>=0&&isHTMLElement$1(e)?getOffsetParent(e):e;return isElement(g)?t.filter(function(e){return isElement(e)&&contains(e,g)&&"body"!==getNodeName(e)}):[]}function getClippingRect(e,t,g,n){var C="clippingParents"===t?getClippingParents(e):[].concat(t),o=[].concat(C,[g]),I=o[0],a=o.reduce(function(t,g){var C=getClientRectFromMixedType(e,g,n);return t.top=Wi(C.top,t.top),t.right=Vi(C.right,t.right),t.bottom=Vi(C.bottom,t.bottom),t.left=Wi(C.left,t.left),t},getClientRectFromMixedType(e,I,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function computeOffsets(e){var t,g=e.reference,n=e.element,C=e.placement,o=C?getBasePlacement(C):null,I=C?getVariation(C):null,a=g.x+g.width/2-n.width/2,i=g.y+g.height/2-n.height/2;switch(o){case"top":t={x:a,y:g.y-n.height};break;case Ri:t={x:a,y:g.y+g.height};break;case ki:t={x:g.x+g.width,y:i};break;case Mi:t={x:g.x-n.width,y:i};break;default:t={x:g.x,y:g.y}}var s=o?getMainAxisFromPlacement(o):null;if(null!=s){var l="y"===s?"height":"width";switch(I){case Ni:t[s]=t[s]-(g[l]/2-n[l]/2);break;case"end":t[s]=t[s]+(g[l]/2-n[l]/2)}}return t}function detectOverflow(e,t){void 0===t&&(t={});var g=t,n=g.placement,C=void 0===n?e.placement:n,o=g.strategy,I=void 0===o?e.strategy:o,a=g.boundary,i=void 0===a?Di:a,s=g.rootBoundary,l=void 0===s?Oi:s,c=g.elementContext,u=void 0===c?ji:c,d=g.altBoundary,p=void 0!==d&&d,m=g.padding,h=void 0===m?0:m,y=mergePaddingObject("number"!=typeof h?h:expandToHashMap(h,Pi)),b="popper"===u?zi:ji,v=e.rects.popper,x=e.elements[p?b:u],S=getClippingRect(isElement(x)?x:x.contextElement||getDocumentElement(e.elements.popper),i,l,I),w=getBoundingClientRect(e.elements.reference),E=computeOffsets({reference:w,element:v,strategy:"absolute",placement:C}),R=rectToClientRect(Object.assign({},v,E)),M="popper"===u?R:w,T={top:S.top-M.top+y.top,bottom:M.bottom-S.bottom+y.bottom,left:S.left-M.left+y.left,right:M.right-S.right+y.right},P=e.modifiersData.offset;if("popper"===u&&P){var N=P[C];Object.keys(T).forEach(function(e){var t=["right","bottom"].indexOf(e)>=0?1:-1,g=["top","bottom"].indexOf(e)>=0?"y":"x";T[e]+=N[g]*t})}return T}function computeAutoPlacement(e,t){void 0===t&&(t={});var g=t,n=g.placement,C=g.boundary,o=g.rootBoundary,I=g.padding,a=g.flipVariations,i=g.allowedAutoPlacements,s=void 0===i?Li:i,l=getVariation(n),c=l?a?Gi:Gi.filter(function(e){return getVariation(e)===l}):Pi,u=c.filter(function(e){return s.indexOf(e)>=0});0===u.length&&(u=c);var d=u.reduce(function(t,g){return t[g]=detectOverflow(e,{placement:g,boundary:C,rootBoundary:o,padding:I})[getBasePlacement(g)],t},{});return Object.keys(d).sort(function(e,t){return d[e]-d[t]})}function getExpandedFallbackPlacements(e){if("auto"===getBasePlacement(e))return[];var t=getOppositePlacement(e);return[getOppositeVariationPlacement(e),t,getOppositeVariationPlacement(t)]}function flip(e){var t=e.state,g=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var C=g.mainAxis,o=void 0===C||C,I=g.altAxis,a=void 0===I||I,i=g.fallbackPlacements,s=g.padding,l=g.boundary,c=g.rootBoundary,u=g.altBoundary,d=g.flipVariations,p=void 0===d||d,m=g.allowedAutoPlacements,h=t.options.placement,y=getBasePlacement(h)===h,b=i||(y||!p?[getOppositePlacement(h)]:getExpandedFallbackPlacements(h)),v=[h].concat(b).reduce(function(e,g){return e.concat("auto"===getBasePlacement(g)?computeAutoPlacement(t,{placement:g,boundary:l,rootBoundary:c,padding:s,flipVariations:p,allowedAutoPlacements:m}):g)},[]),x=t.rects.reference,S=t.rects.popper,w=new Map,E=!0,R=v[0],M=0;M<v.length;M++){var T=v[M],P=getBasePlacement(T),N=getVariation(T)===Ni,D=["top",Ri].indexOf(P)>=0,O=D?"width":"height",j=detectOverflow(t,{placement:T,boundary:l,rootBoundary:c,altBoundary:u,padding:s}),G=D?N?ki:Mi:N?Ri:"top";x[O]>S[O]&&(G=getOppositePlacement(G));var L=getOppositePlacement(G),B=[];if(o&&B.push(j[P]<=0),a&&B.push(j[G]<=0,j[L]<=0),B.every(function(e){return e})){R=T,E=!1;break}w.set(T,B)}if(E)for(var _loop=function(e){var t=v.find(function(t){var g=w.get(t);if(g)return g.slice(0,e).every(function(e){return e})});if(t)return R=t,"break"},F=p?3:1;F>0&&"break"!==_loop(F);F--);t.placement!==R&&(t.modifiersData[n]._skip=!0,t.placement=R,t.reset=!0)}}function getSideOffsets(e,t,g){return void 0===g&&(g={x:0,y:0}),{top:e.top-t.height-g.y,right:e.right-t.width+g.x,bottom:e.bottom-t.height+g.y,left:e.left-t.width-g.x}}function isAnySideFullyClipped(e){return["top",ki,Ri,Mi].some(function(t){return e[t]>=0})}function hide(e){var t=e.state,g=e.name,n=t.rects.reference,C=t.rects.popper,o=t.modifiersData.preventOverflow,I=detectOverflow(t,{elementContext:"reference"}),a=detectOverflow(t,{altBoundary:!0}),i=getSideOffsets(I,n),s=getSideOffsets(a,C,o),l=isAnySideFullyClipped(i),c=isAnySideFullyClipped(s);t.modifiersData[g]={referenceClippingOffsets:i,popperEscapeOffsets:s,isReferenceHidden:l,hasPopperEscaped:c},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":c})}function distanceAndSkiddingToXY(e,t,g){var n=getBasePlacement(e),C=["left","top"].indexOf(n)>=0?-1:1,o="function"==typeof g?g(Object.assign({},t,{placement:e})):g,I=o[0],a=o[1];return I=I||0,a=(a||0)*C,["left","right"].indexOf(n)>=0?{x:a,y:I}:{x:I,y:a}}function offset(e){var t=e.state,g=e.options,n=e.name,C=g.offset,o=void 0===C?[0,0]:C,I=Li.reduce(function(e,g){return e[g]=distanceAndSkiddingToXY(g,t.rects,o),e},{}),a=I[t.placement],i=a.x,s=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=s),t.modifiersData[n]=I}function popperOffsets(e){var t=e.state,g=e.name;t.modifiersData[g]=computeOffsets({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}function getAltAxis(e){return"x"===e?"y":"x"}function preventOverflow(e){var t=e.state,g=e.options,n=e.name,C=g.mainAxis,o=void 0===C||C,I=g.altAxis,a=void 0!==I&&I,i=g.boundary,s=g.rootBoundary,l=g.altBoundary,c=g.padding,u=g.tether,d=void 0===u||u,p=g.tetherOffset,m=void 0===p?0:p,h=detectOverflow(t,{boundary:i,rootBoundary:s,padding:c,altBoundary:l}),y=getBasePlacement(t.placement),b=getVariation(t.placement),v=!b,x=getMainAxisFromPlacement(y),S=getAltAxis(x),w=t.modifiersData.popperOffsets,E=t.rects.reference,R=t.rects.popper,M="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,T="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),P=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,N={x:0,y:0};if(w){if(o){var D,O="y"===x?"top":Mi,j="y"===x?Ri:ki,G="y"===x?"height":"width",L=w[x],B=L+h[O],F=L-h[j],W=d?-R[G]/2:0,V="start"===b?E[G]:R[G],U="start"===b?-R[G]:-E[G],K=t.elements.arrow,H=d&&K?getLayoutRect(K):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:getFreshSideObject(),Z=Y[O],Q=Y[j],X=within(0,E[G],H[G]),_=v?E[G]/2-W-X-Z-T.mainAxis:V-X-Z-T.mainAxis,q=v?-E[G]/2+W+X+Q+T.mainAxis:U+X+Q+T.mainAxis,J=t.elements.arrow&&getOffsetParent(t.elements.arrow),$=J?"y"===x?J.clientTop||0:J.clientLeft||0:0,ee=null!=(D=null==P?void 0:P[x])?D:0,te=L+q-ee,ge=within(d?Vi(B,L+_-ee-$):B,L,d?Wi(F,te):F);w[x]=ge,N[x]=ge-L}if(a){var re,ne="x"===x?"top":Mi,Ae="x"===x?Ri:ki,Ce=w[S],oe="y"===S?"height":"width",Ie=Ce+h[ne],ae=Ce-h[Ae],ie=-1!==["top",Mi].indexOf(y),se=null!=(re=null==P?void 0:P[S])?re:0,le=ie?Ie:Ce-E[oe]-R[oe]-se+T.altAxis,ce=ie?Ce+E[oe]+R[oe]-se-T.altAxis:ae,ue=d&&ie?withinMaxClamp(le,Ce,ce):within(d?le:Ie,Ce,d?ce:ae);w[S]=ue,N[S]=ue-Ce}t.modifiersData[n]=N}}function getHTMLElementScroll(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function getNodeScroll(e){return e!==getWindow(e)&&isHTMLElement$1(e)?getHTMLElementScroll(e):getWindowScroll(e)}function isElementScaled(e){var t=e.getBoundingClientRect(),g=Ui(t.width)/e.offsetWidth||1,n=Ui(t.height)/e.offsetHeight||1;return 1!==g||1!==n}function getCompositeRect(e,t,g){void 0===g&&(g=!1);var n=isHTMLElement$1(t),C=isHTMLElement$1(t)&&isElementScaled(t),o=getDocumentElement(t),I=getBoundingClientRect(e,C,g),a={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(n||!n&&!g)&&(("body"!==getNodeName(t)||isScrollParent(o))&&(a=getNodeScroll(t)),isHTMLElement$1(t)?((i=getBoundingClientRect(t,!0)).x+=t.clientLeft,i.y+=t.clientTop):o&&(i.x=getWindowScrollBarX(o))),{x:I.left+a.scrollLeft-i.x,y:I.top+a.scrollTop-i.y,width:I.width,height:I.height}}function order(e){var t=new Map,g=new Set,n=[];function sort(e){g.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!g.has(e)){var n=t.get(e);n&&sort(n)}}),n.push(e)}return e.forEach(function(e){t.set(e.name,e)}),e.forEach(function(e){g.has(e.name)||sort(e)}),n}function orderModifiers(e){var t=order(e);return Bi.reduce(function(e,g){return e.concat(t.filter(function(e){return e.phase===g}))},[])}function debounce(e){var t;return function(){return t||(t=new Promise(function(g){Promise.resolve().then(function(){t=void 0,g(e())})})),t}}function mergeByName(e){var t=e.reduce(function(e,t){var g=e[t.name];return e[t.name]=g?Object.assign({},g,t,{options:Object.assign({},g.options,t.options),data:Object.assign({},g.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var Qi={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var e=arguments.length,t=new Array(e),g=0;g<e;g++)t[g]=arguments[g];return!t.some(function(e){return!(e&&"function"==typeof e.getBoundingClientRect)})}function popperGenerator(e){void 0===e&&(e={});var t=e,g=t.defaultModifiers,n=void 0===g?[]:g,C=t.defaultOptions,o=void 0===C?Qi:C;return function(e,t,g){void 0===g&&(g=o);var C={placement:"bottom",orderedModifiers:[],options:Object.assign({},Qi,o),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},I=[],a=!1,i={state:C,setOptions:function(g){var I="function"==typeof g?g(C.options):g;cleanupModifierEffects(),C.options=Object.assign({},o,C.options,I),C.scrollParents={reference:isElement(e)?listScrollParents(e):e.contextElement?listScrollParents(e.contextElement):[],popper:listScrollParents(t)};var a=orderModifiers(mergeByName([].concat(n,C.options.modifiers)));return C.orderedModifiers=a.filter(function(e){return e.enabled}),runModifierEffects(),i.update()},forceUpdate:function(){if(!a){var e=C.elements,t=e.reference,g=e.popper;if(areValidElements(t,g)){C.rects={reference:getCompositeRect(t,getOffsetParent(g),"fixed"===C.options.strategy),popper:getLayoutRect(g)},C.reset=!1,C.placement=C.options.placement,C.orderedModifiers.forEach(function(e){return C.modifiersData[e.name]=Object.assign({},e.data)});for(var n=0;n<C.orderedModifiers.length;n++)if(!0!==C.reset){var o=C.orderedModifiers[n],I=o.fn,s=o.options,l=void 0===s?{}:s,c=o.name;"function"==typeof I&&(C=I({state:C,options:l,name:c,instance:i})||C)}else C.reset=!1,n=-1}}},update:debounce(function(){return new Promise(function(e){i.forceUpdate(),e(C)})}),destroy:function(){cleanupModifierEffects(),a=!0}};if(!areValidElements(e,t))return i;function runModifierEffects(){C.orderedModifiers.forEach(function(e){var t=e.name,g=e.options,n=void 0===g?{}:g,o=e.effect;if("function"==typeof o){var a=o({state:C,name:t,instance:i,options:n});I.push(a||function(){})}})}function cleanupModifierEffects(){I.forEach(function(e){return e()}),I=[]}return i.setOptions(g).then(function(e){!a&&g.onFirstUpdate&&g.onFirstUpdate(e)}),i}}var Xi=popperGenerator({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect,data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}},Fi,{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset},{name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide}]});function getPopperUtilityClass(e){return generateUtilityClass("MuiPopper",e)}function flipPlacement(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function resolveAnchorEl(e){return"function"==typeof e?e():e}function isHTMLElement(e){return void 0!==e.nodeType}generateUtilityClasses("MuiPopper",["root"]);var useUtilityClasses$2=e=>{const{classes:t}=e;return composeClasses({root:["root"]},getPopperUtilityClass,t)},_i={},qi=l.forwardRef(function(e,t){const{anchorEl:g,children:n,direction:C,disablePortal:o,modifiers:I,open:a,placement:i,popperOptions:s,popperRef:c,slotProps:u={},slots:d={},TransitionProps:p,ownerState:m,...h}=e,y=l.useRef(null),b=useForkRef(y,t),v=l.useRef(null),x=useForkRef(v,c),S=l.useRef(x);Qr(()=>{S.current=x},[x]),l.useImperativeHandle(c,()=>v.current,[]);const w=flipPlacement(i,C),[E,R]=l.useState(w),[M,T]=l.useState(resolveAnchorEl(g));l.useEffect(()=>{v.current&&v.current.forceUpdate()}),l.useEffect(()=>{g&&T(resolveAnchorEl(g))},[g]),Qr(()=>{if(!M||!a)return;const handlePopperUpdate=e=>{R(e.placement)};let e=[{name:"preventOverflow",options:{altBoundary:o}},{name:"flip",options:{altBoundary:o}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:e})=>{handlePopperUpdate(e)}}];null!=I&&(e=e.concat(I)),s&&null!=s.modifiers&&(e=e.concat(s.modifiers));const t=Xi(M,y.current,{placement:w,...s,modifiers:e});S.current(t);const g=y.current;return()=>{if(g){const{style:e}=g,n=e.position,C=e.top,o=e.left,I=e.transform;t.destroy(),e.position=n,e.top=C,e.left=o,e.transform=I}else t.destroy();S.current(null)}},[M,o,I,a,s,w]);const P={placement:E};null!==p&&(P.TransitionProps=p);const N=useUtilityClasses$2(e),D=d.root??"div";return(0,gr.jsx)(D,{...useSlotProps({elementType:D,externalSlotProps:u.root,externalForwardedProps:h,additionalProps:{role:"tooltip",ref:b},ownerState:e,className:N.root}),children:"function"==typeof n?n(P):n})}),Ji=l.forwardRef(function(e,t){const{anchorEl:g,children:n,container:C,direction:o="ltr",disablePortal:I=!1,keepMounted:a=!1,modifiers:i,open:s,placement:c="bottom",popperOptions:u=_i,popperRef:d,style:p,transition:m=!1,slotProps:h={},slots:y={},...b}=e,[v,x]=l.useState(!0),handleEnter=()=>{x(!1)},handleExited=()=>{x(!0)};if(!a&&!s&&(!m||v))return null;let S;if(C)S=C;else if(g){const e=resolveAnchorEl(g);S=e&&isHTMLElement(e)?ownerDocument(e).body:ownerDocument(null).body}const w=s||!a||m&&!v?void 0:"none",E=m?{in:s,onEnter:handleEnter,onExited:handleExited}:void 0;return(0,gr.jsx)(rC,{disablePortal:I,container:S,children:(0,gr.jsx)(qi,{anchorEl:g,direction:o,disablePortal:I,modifiers:i,ref:t,open:m?!v:s,placement:c,popperOptions:u,popperRef:d,slotProps:h,slots:y,...b,style:{position:"fixed",top:0,left:0,display:w,...p},TransitionProps:E,children:n})})}),$i=On(Ji,{name:"MuiPopper",slot:"Root"})({}),es=l.forwardRef(function(e,t){const g=useRtl(),{anchorEl:n,component:C,container:o,disablePortal:I,keepMounted:a,modifiers:i,open:s,placement:l,popperOptions:c,popperRef:u,transition:d,slots:p,slotProps:m,...h}=useDefaultProps({props:e,name:"MuiPopper"}),y={anchorEl:n,container:o,disablePortal:I,keepMounted:a,modifiers:i,open:s,placement:l,popperOptions:c,popperRef:u,transition:d,...h};return(0,gr.jsx)($i,{as:C,direction:g?"rtl":"ltr",slots:p,slotProps:m,...y,ref:t})});function getTooltipUtilityClass(e){return generateUtilityClass("MuiTooltip",e)}var ts=generateUtilityClasses("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function round(e){return Math.round(1e5*e)/1e5}var useUtilityClasses$1=e=>{const{classes:t,disableInteractive:g,arrow:n,touch:C,placement:o}=e;return composeClasses({popper:["popper",!g&&"popperInteractive",n&&"popperArrow"],tooltip:["tooltip",n&&"tooltipArrow",C&&"touch",`tooltipPlacement${Qn(o.split("-")[0])}`],arrow:["arrow"]},getTooltipUtilityClass,t)},gs=On(es,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.popper,!g.disableInteractive&&t.popperInteractive,g.arrow&&t.popperArrow,!g.open&&t.popperClose]}})(Vn(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:e,open:t})=>t&&!e.disableInteractive,style:{pointerEvents:"auto"}},{props:({ownerState:e})=>e.arrow,style:{[`&[data-popper-placement*="bottom"] .${ts.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${ts.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${ts.arrow}`]:{height:"1em",width:"0.71em",insetInlineStart:0,marginInlineStart:"-0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${ts.arrow}`]:{height:"1em",width:"0.71em",insetInlineEnd:0,marginInlineEnd:"-0.71em","&::before":{transformOrigin:"0 0"}}}}]}))),rs=On("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.tooltip,g.touch&&t.touch,g.arrow&&t.tooltipArrow,t[`tooltipPlacement${Qn(g.placement.split("-")[0])}`]]}})(Vn(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${ts.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center",marginInlineEnd:"14px"},[`.${ts.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center",marginInlineStart:"14px"},[`.${ts.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${ts.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:e})=>e.arrow,style:{position:"relative",marginBlock:0}},{props:({ownerState:e})=>e.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${round(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:e})=>e.touch,style:{[`.${ts.popper}[data-popper-placement*="left"] &`]:{marginInlineEnd:"24px"},[`.${ts.popper}[data-popper-placement*="right"] &`]:{marginInlineStart:"24px"},[`.${ts.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"},[`.${ts.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),ns=On("span",{name:"MuiTooltip",slot:"Arrow"})(Vn(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}))),As=!1,Cs=new BA,os={x:0,y:0};function composeEventHandler(e,t){return(g,...n)=>{t&&t(g,...n),e(g,...n)}}var Is=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiTooltip"}),{arrow:n=!1,children:C,classes:o,describeChild:I=!1,disableFocusListener:a=!1,disableHoverListener:i=!1,disableInteractive:s=!1,disableTouchListener:c=!1,enterDelay:u=100,enterNextDelay:d=0,enterTouchDelay:p=700,followCursor:m=!1,id:h,leaveDelay:y=0,leaveTouchDelay:b=1500,onClose:v,onOpen:x,open:S,placement:w="bottom",slotProps:E={},slots:R={},title:M,...T}=g,P=l.isValidElement(C)?C:(0,gr.jsx)("span",{children:C}),N=useTheme$1(),[D,O]=l.useState(),[j,G]=l.useState(null),L=l.useRef(!1),B=s||m,F=useTimeout(),W=useTimeout(),V=useTimeout(),U=useTimeout(),[K,H]=QC({controlled:S,default:!1,name:"Tooltip",state:"open"});let Y=K;const Z=jC(h),Q=l.useRef(),X=wA(()=>{void 0!==Q.current&&(document.body.style.WebkitUserSelect=Q.current,Q.current=void 0),U.clear()});l.useEffect(()=>X,[X]);const handleOpen=e=>{Cs.clear(),As=!0,H(!0),x&&!Y&&x(e)},_=wA(e=>{Cs.start(800+y,()=>{As=!1}),H(!1),v&&Y&&v(e),F.start(N.transitions.duration.shortest,()=>{L.current=!1})}),handleMouseOver=e=>{L.current&&"touchstart"!==e.type||(D&&D.removeAttribute("title"),W.clear(),V.clear(),u||As&&d?W.start(As?d:u,()=>{handleOpen(e)}):handleOpen(e))},handleMouseLeave=e=>{W.clear(),V.start(y,()=>{_(e)})},[,q]=l.useState(!1),handleBlur=e=>{const t=e?.target??D;if(!t||t.disabled||!isFocusVisible(t)){q(!1);const g=e??new Event("blur");!e&&t&&(Object.defineProperty(g,"target",{value:t}),Object.defineProperty(g,"currentTarget",{value:t})),handleMouseLeave(g)}},handleFocus=e=>{if(D||O(e.currentTarget),isFocusVisible(e.target)){const handleNativeBlur=e=>{e.target.disabled&&handleBlur(e),e.target.removeEventListener("blur",handleNativeBlur)};e.target.addEventListener("blur",handleNativeBlur),q(!0),handleMouseOver(e)}},detectTouchStart=e=>{L.current=!0;const t=P.props;t.onTouchStart&&t.onTouchStart(e)},handleTouchStart=e=>{detectTouchStart(e),V.clear(),F.clear(),X(),Q.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",U.start(p,()=>{document.body.style.WebkitUserSelect=Q.current,handleMouseOver(e)})},handleTouchEnd=e=>{P.props.onTouchEnd&&P.props.onTouchEnd(e),X(),V.start(b,()=>{_(e)})};l.useEffect(()=>{if(Y)return document.addEventListener("keydown",handleKeyDown),()=>{document.removeEventListener("keydown",handleKeyDown)};function handleKeyDown(e){"Escape"===e.key&&_(e)}},[_,Y]);const J=EA(getReactElementRef(P),O,t);M||0===M||(Y=!1);const $=l.useRef(),handleMouseMove=e=>{const t=P.props;t.onMouseMove&&t.onMouseMove(e),os={x:e.clientX,y:e.clientY},$.current&&$.current.update()},ee={},te="string"==typeof M;I?(ee.title=Y||!te||i?null:M,ee["aria-describedby"]=Y?Z:null):(ee["aria-label"]=te?M:null,ee["aria-labelledby"]=Y&&!te?Z:null);const ge={...ee,...T,...P.props,className:clsx(T.className,P.props.className),onTouchStart:detectTouchStart,ref:J,...m?{onMouseMove:handleMouseMove}:{}},re={};c||(ge.onTouchStart=handleTouchStart,ge.onTouchEnd=handleTouchEnd),i||(ge.onMouseOver=composeEventHandler(handleMouseOver,ge.onMouseOver),ge.onMouseLeave=composeEventHandler(handleMouseLeave,ge.onMouseLeave),B||(re.onMouseOver=handleMouseOver,re.onMouseLeave=handleMouseLeave)),a||(ge.onFocus=composeEventHandler(handleFocus,ge.onFocus),ge.onBlur=composeEventHandler(handleBlur,ge.onBlur),B||(re.onFocus=handleFocus,re.onBlur=handleBlur));const ne={...g,arrow:n,disableInteractive:B,placement:w,touch:L.current},Ae="function"==typeof E.popper?E.popper(ne):E.popper,Ce=l.useMemo(()=>{let e=[{name:"arrow",enabled:Boolean(j),options:{element:j,padding:4}}];return Ae?.popperOptions?.modifiers&&(e=e.concat(Ae.popperOptions.modifiers)),{...Ae?.popperOptions,modifiers:e}},[j,Ae?.popperOptions]),oe=useUtilityClasses$1(ne),Ie={slots:R,slotProps:{arrow:E.arrow,popper:Ae,tooltip:E.tooltip,transition:E.transition}},[ae,ie]=useSlot("popper",{elementType:gs,externalForwardedProps:Ie,ownerState:ne,className:oe.popper}),[se,le]=useSlot("transition",{elementType:$A,externalForwardedProps:Ie,ownerState:ne}),[ce,ue]=useSlot("tooltip",{elementType:rs,className:oe.tooltip,externalForwardedProps:Ie,ownerState:ne}),[de,pe]=useSlot("arrow",{elementType:ns,className:oe.arrow,externalForwardedProps:Ie,ownerState:ne,ref:G});return(0,gr.jsxs)(l.Fragment,{children:[l.cloneElement(P,ge),(0,gr.jsx)(ae,{as:es,placement:w,anchorEl:m?{getBoundingClientRect:()=>({top:os.y,left:os.x,right:os.x,bottom:os.y,width:0,height:0})}:D,popperRef:$,open:!!D&&Y,id:Z,transition:!0,...re,...ie,popperOptions:Ce,children:({TransitionProps:e})=>(0,gr.jsx)(se,{timeout:N.transitions.duration.shorter,...e,...le,children:(0,gr.jsxs)(ce,{...ue,children:[M,n?(0,gr.jsx)(de,{...pe}):null]})})})]})}),as="title",is="popover",ss={cursor:"help",display:"inline-flex",maxWidth:"100%"},renderLabel=(e,t,g)=>{const n=React.createElement(qn,{component:"span",variant:"body2"},e);return t?g===as?React.createElement(Wn,{component:"span",sx:ss,title:t},n):React.createElement(Is,{describeChild:!0,placement:"top-start",title:t},React.createElement(Wn,{component:"span",sx:ss},n)):n},ConfigToggleComponent=({label:e,value:t,onChange:g,tooltip:n="",tooltipMode:C=is})=>React.createElement(Do,{control:React.createElement(Vo,{checked:t,onChange:()=>g(!t)}),label:renderLabel(e,n,C),sx:{alignItems:"center",gap:1,justifyContent:"space-between",m:0,width:"100%","& .MuiFormControlLabel-label":{flex:1}}});ConfigToggleComponent.displayName="ConfigToggle",ConfigToggleComponent.propTypes={label:Yn.default.string.isRequired,onChange:Yn.default.func.isRequired,tooltip:Yn.default.string,tooltipMode:Yn.default.oneOf([is,as]),value:Yn.default.bool.isRequired};var ls=(0,l.memo)(ConfigToggleComponent);ls.displayName="ConfigToggle",ls.propTypes=ConfigToggleComponent.propTypes;var NOOP=()=>{},resolveCommand=e=>"function"==typeof e?e:NOOP,createNativeDisplayCommands=e=>Object.freeze({mount:resolveCommand(e?.mountNativeDisplay),unmount:resolveCommand(e?.unmountNativeDisplay)}),useNativeDisplayCommands=()=>{const{platformTabs:e}=useNexGui();return(0,l.useMemo)(()=>createNativeDisplayCommands(e),[e])},cs="sfx/arcade sound",us="nexGui4.netflixMode",ds="nexGui4.netflixMode",ps="https://images.ctfassets.net/y2ske730sjqp/821Wg4N9hJD8vs5FBcCGg/9eaf66123397cc61be14e40174123c40/Vector__3_.svg?w=460",ms="netflixModeEmoteColor",fs="netflixModeScenarios",hs="#afffff",ys=/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/,resolveNetflixEmoteColor=e=>"string"==typeof e&&ys.test(e.trim())?e.trim():hs,resolveNetflixScenarioEnabled=(e,t)=>{const g=e?.[t];return"boolean"!=typeof g||g},renderNetflixNoticeHtml=e=>`<span style="height:15px;overflow:hidden"><img src="${ps}" style="height:16px"/> Mode ${e}.</span>`,resolveSelfName=e=>{const t=e?.getState?.()?.name;if(isNonEmptyString(t))return t.trim().toLowerCase();const g=globalThis.GMCP?.Char?.Status?.name;return isNonEmptyString(g)?g.trim().toLowerCase():null},bs=Object.freeze([{id:"nameMentioned",label:"Name Mentioned",predicate:(e,{selfName:t})=>!(!t||"string"!=typeof e?.text)&&e.text.toLowerCase().includes(t)},{id:"saysChannel",label:"Says",predicate:e=>"says"===e?.channel},{id:"tellsChannel",label:"Tells",predicate:e=>"tells"===e?.channel}]),vs=Object.freeze([{id:"emote",label:"Emote",regex:/^/,resolveFg:({emoteColor:e})=>e}]),xs=Object.freeze([{id:"affGot",label:"Aff Got",eventName:"nexsys4.aff.got"},{id:"defLost",label:"Def Lost",eventName:"nexsys4.def.lost"},{id:"damage",label:"Damage",eventName:"nexsys4.system.health.changed"},{id:"roomChanged",label:"Room Changed",eventName:"nexsys4.system.room.changed"}]),Ss=Object.freeze([...bs.map(({id:e,label:t})=>({id:e,label:t,source:"commChannel"})),...xs.map(({id:e,label:t})=>({id:e,label:t,source:"event"})),...vs.map(({id:e,label:t})=>({id:e,label:t,source:"trigger"}))]),playNetflixSound=()=>{nexusclient.ui?.()?.sounds?.()?.play_sound?.(cs)},evaluateCommChannelPayload=(e,t,g)=>{for(const n of bs)if(resolveNetflixScenarioEnabled(g,n.id)&&n.predicate(e??{},t))return!0;return!1},attachCommChannelListener=(e,t)=>{const handler=g=>{const n=resolveSelfName(e),C=t();evaluateCommChannelPayload(g,{selfName:n},C)&&playNetflixSound()};return eventStream.registerEvent("Comm.Channel.Text",handler,{id:us}),()=>{eventStream.removeListener("Comm.Channel.Text",us)}},attachTriggerScenarios=(e,t)=>{for(const g of vs){if(!resolveNetflixScenarioEnabled(t,g.id))continue;const n=g.resolveFg?.({emoteColor:e})??g.fg;nexAction.triggers.add({id:`${ds}.${g.id}`,regex:g.regex,tags:[ds],fg:n,action:playNetflixSound})}return()=>{nexAction.triggers.remove([ds])}},areTriggerScenarioOverridesEqual=(e,t)=>{for(const g of vs)if(resolveNetflixScenarioEnabled(e,g.id)!==resolveNetflixScenarioEnabled(t,g.id))return!1;return!0},attachEventScenarios=e=>{const t=[];for(const g of xs){const n=`${us}.eventScenario.${g.id}`,handler=t=>{resolveNetflixScenarioEnabled(e(),g.id)&&(g.predicate&&!g.predicate(t)||playNetflixSound())};eventStream.registerEvent(g.eventName,handler,{id:n}),t.push(()=>eventStream.removeListener(g.eventName,n))}return()=>{for(const e of t)e()}},readEmoteColorFromUiState=e=>resolveNetflixEmoteColor(e?.settings?.[ms]),readScenarioOverridesFromUiState=e=>e?.settings?.netflixModeScenarios??null,createNetflixModeController=({adapter:e,uiStore:t,characterStore:g})=>{if(!t||"function"!=typeof t.getState||"function"!=typeof t.subscribe)return()=>{};let n=null,C=null,o=null,I=!1,a=null,i=null;const getScenarioOverrides=()=>readScenarioOverridesFromUiState(t.getState()),enable=(t,s)=>{I||(n=attachCommChannelListener(g,getScenarioOverrides),C=attachTriggerScenarios(t,s),o=attachEventScenarios(getScenarioOverrides),a=t,i=s,I=!0,e?.notice?.(renderNetflixNoticeHtml("Enabled"),{html:!0}))},disable=()=>{I&&(n?.(),C?.(),o?.(),n=null,C=null,o=null,a=null,i=null,I=!1,e?.notice?.(renderNetflixNoticeHtml("Disabled"),{html:!0}))},reattachTriggers=(e,t)=>{C?.(),C=attachTriggerScenarios(e,t),a=e,i=t},sync=e=>{const t=readEmoteColorFromUiState(e),g=readScenarioOverridesFromUiState(e);if(e?.netflixMode){if(!I)return void enable(t,g);const e=t!==a,n=!areTriggerScenarioOverridesEqual(g,i);(e||n)&&reattachTriggers(t,g)}else disable()};sync(t.getState());const s=t.subscribe((e,t)=>{const g=Boolean(e?.netflixMode),n=Boolean(t?.netflixMode),C=readEmoteColorFromUiState(e),o=readEmoteColorFromUiState(t),I=readScenarioOverridesFromUiState(e),a=readScenarioOverridesFromUiState(t);g===n&&C===o&&I===a||sync(e)});return()=>{s(),I&&(n?.(),C?.(),o?.(),n=null,C=null,o=null,a=null,i=null,I=!1)}},useNetflixModeSettings=()=>{const{stores:e}=useNexGui(),t=e.ui(e=>e.netflixMode),g=e.ui(e=>e.setNetflixMode),n=e.ui(e=>e.settings?.[ms]),C=e.ui(e=>e.settings?.[fs]),o=e.ui(e=>e.setSetting),I=(0,l.useCallback)(e=>{o(ms,resolveNetflixEmoteColor(e))},[o]),a=(0,l.useCallback)((t,g)=>{o(fs,{...e.ui.getState().settings?.netflixModeScenarios??{},[t]:Boolean(g)})},[o,e]),i=(0,l.useMemo)(()=>Ss.map(({id:e,label:t})=>({id:e,label:t,enabled:resolveNetflixScenarioEnabled(C,e),setEnabled:t=>a(e,t)})),[C,a]);return{enabled:Boolean(t),setEnabled:g,emoteColor:resolveNetflixEmoteColor(n),defaultEmoteColor:hs,setEmoteColor:I,logoUrl:ps,scenarios:i}},usePersistence=()=>{const{persistenceStore:e}=useNexGui();return e},ws=[{key:"loginTracker",label:"Login Tracker",tooltip:"Show formatted login/logout notices by diffing the who list against Achaea's public character roster. Uses ally/enemy and target name formatting, and excludes your own character."},{key:"logoutDownload",label:"Auto-Download Log on Logout",tooltip:"Automatically download the scrollback buffer as an HTML log when you disconnect."},{key:"virtualizedLogs",label:"Virtualized HTML Logs",tooltip:"Download logs as an interactive virtualized HTML viewer for long sessions."}],NetflixModeSection=()=>{const{enabled:e,setEnabled:t,emoteColor:g,setEmoteColor:n,logoUrl:C,scenarios:o}=useNetflixModeSettings();return React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:1}},React.createElement(qn,{gutterBottom:!0,sx:{alignItems:"center",display:"flex",gap:.75},variant:"subtitle2"},React.createElement(Wn,{alt:"Netflix",component:"img",src:C,sx:{display:"block",height:14,width:"auto"}}),"Mode"),React.createElement(ls,{label:"Enabled",onChange:t,tooltip:"Play an attention chime on enabled catches below. Resets to off each session.",tooltipMode:"title",value:e}),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:.25,pl:1}},React.createElement(qn,{color:"text.secondary",sx:{mb:.25},variant:"caption"},"Catches"),o.map(e=>React.createElement(ls,{key:e.id,label:e.label,onChange:e.setEnabled,tooltipMode:"title",value:e.enabled}))),React.createElement(Wn,{sx:{alignItems:"center",display:"flex",gap:1.5},title:"Color used by the emote attention trigger. Set this to your configured emote line color so the trigger matches emotes in your room."},React.createElement(qn,{sx:{minWidth:96},variant:"body2"},"Emote Color"),React.createElement(Wn,{component:"input","aria-label":"Netflix Mode emote color",onChange:e=>n(e.target.value),sx:{background:"transparent",border:"1px solid rgba(255,255,255,0.2)",borderRadius:1,cursor:"pointer",height:28,padding:0,width:40},type:"color",value:g}),React.createElement(qn,{sx:{fontFamily:"monospace"},variant:"caption"},g)))};NetflixModeSection.displayName="NetflixModeSection";var OptionsAdvancedInner=()=>{const e=usePersistence(),t=useNativeDisplayCommands(),[g,n]=(0,l.useState)(()=>e.get("ui")??{}),[C,o]=(0,l.useState)(!1),handleToggle=(t,C)=>{const o={...g,[t]:C};e.set("ui",o),n(o)},handleNativeDisplay=e=>{handleToggle("nativeDisplay",e),e?t.mount():t.unmount()};return React.createElement(Wn,{className:"options-advanced",sx:{display:"flex",flexDirection:"column",gap:1.5,p:1.5}},React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Advanced Options"),React.createElement(BC,{sx:{mb:1}}),React.createElement(Wn,{sx:{columnGap:3,display:"grid",gridTemplateColumns:{xs:"minmax(0, 1fr)",md:"repeat(2, minmax(0, 1fr))"},rowGap:1.5}},React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:.5,minWidth:0}},ws.map(({key:e,label:t,tooltip:n})=>React.createElement(ls,{key:e,label:t,onChange:t=>handleToggle(e,t),tooltip:n,tooltipMode:"title",value:Boolean(g[e])})),React.createElement(BC,{sx:{my:1}}),React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Experimental"),React.createElement(ls,{label:"Native Display Override",onChange:handleNativeDisplay,tooltip:"Mount the nexGui display in the Nexus output area instead of a panel tab. Applies immediately; the tab panel is hidden on the next reload.",tooltipMode:"title",value:Boolean(g.nativeDisplay)}),React.createElement(BC,{sx:{my:1}}),React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Debug"),React.createElement(ls,{label:"Event Bus Debug Mode",onChange:o,tooltip:"Log all internal events to the browser console. Session-only.",tooltipMode:"title",value:C})),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:.5,minWidth:0}},React.createElement(NetflixModeSection,null))))};OptionsAdvancedInner.displayName="OptionsAdvancedInner";var OptionsAdvanced=()=>React.createElement(Jn,{panelName:"Options Advanced"},React.createElement(OptionsAdvancedInner,null));OptionsAdvanced.displayName="OptionsAdvanced";var Es={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};function areArraysEqual(e,t,g=(e,t)=>e===t){return e.length===t.length&&e.every((e,n)=>g(e,t[n]))}var Rs=2,ks=[],Ms={};function getNewValue(e,t,g,n,C){return 1===g?Math.min(e+t,C):Math.max(e-t,n)}function asc(e,t){return e-t}function findClosest(e,t,g=-1){const{index:n}=e.reduce((e,g,n)=>{const C=Math.abs(t-g);return null==e||C<=e.distance?{distance:C,index:n}:e},null)??Ms;return null==n?n:g>=0&&e[g]===e[n]?g:n}function trackFinger(e,t){if(null!=t.current&&e.changedTouches){const g=e;for(let e=0;e<g.changedTouches.length;e+=1){const n=g.changedTouches[e];if(n.identifier===t.current)return{x:n.clientX,y:n.clientY}}return!1}return{x:e.clientX,y:e.clientY}}function valueToPercent(e,t,g){return 100*(e-t)/(g-t)}function percentToValue(e,t,g){return(g-t)*e+t}function getDecimalPrecision(e){if(Math.abs(e)<1){const t=e.toExponential().split("e-"),g=t[0].split(".")[1];return(g?g.length:0)+parseInt(t[1],10)}const t=e.toString().split(".")[1];return t?t.length:0}function roundValueToStep(e,t,g){const n=Math.round((e-g)/t)*t+g;return Number(n.toFixed(getDecimalPrecision(t)))}function setValueIndex(e,t,g){const n=e.slice();return n[g]=t,n.sort(asc)}function focusThumb(e,t,g,n){const C=xA(ownerDocument(e.current));if(!bA(e.current,C)||Number(C?.getAttribute("data-index"))!==t){const g=e.current?.querySelector(`[type="range"][data-index="${t}"]`);null!=g&&(null==n?g.focus({preventScroll:!0}):g.focus({preventScroll:!0,focusVisible:n}))}g&&g(t)}function areValuesEqual(e,t){return"number"==typeof e&&"number"==typeof t?e===t:"object"==typeof e&&"object"==typeof t&&areArraysEqual(e,t)}var Ts={horizontal:{offset:e=>({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},Identity$1=e=>e;function useSlider(e){const{"aria-labelledby":t,defaultValue:g,disabled:n=!1,disableSwap:C=!1,isRtl:o=!1,marks:I=!1,max:a=100,min:i=0,name:s,onChange:c,onChangeCommitted:u,orientation:d="horizontal",rootRef:p,scale:m=Identity$1,step:h=1,shiftStep:y=10,tabIndex:b,value:v}=e,x=l.useRef(void 0),S=l.useRef(null),[w,E]=l.useState(-1),[R,M]=l.useState(-1),[T,P]=l.useState(!1),N=l.useRef(0),D=l.useRef(-1),O=l.useRef(!1),j=l.useRef(-1),G=useEventCallback(()=>{null!=S.current&&(cancelAnimationFrame(S.current),S.current=null)}),L=l.useRef(null),[B,F]=useControlled({controlled:v,default:g??i,name:"Slider"}),W=useEventCallback((e,t,g)=>{const n="nativeEvent"in e?e.nativeEvent:e,C=new n.constructor(n.type,n);Object.defineProperty(C,"target",{writable:!0,value:{value:t,name:s}}),L.current=t,c?.(C,t,g)}),V=Array.isArray(B),U=l.useMemo(()=>{if("number"==typeof B)return[clamp$2(B,i,a)];if(null==B)return[i];const e=B.slice().sort(asc);for(let t=0;t<e.length;t+=1){const g=e[t];e[t]=null==g?i:clamp$2(g,i,a)}return e},[B,i,a]),K=l.useMemo(()=>{if(!0===I&&null!=h){const e=new Array(Math.floor((a-i)/h)+1);for(let t=0;t<e.length;t+=1)e[t]={value:i+h*t};return e}return Array.isArray(I)?I:ks},[I,h,i,a]),H=l.useMemo(()=>{const e=new Array(K.length);for(let t=0;t<K.length;t+=1)e[t]=K[t].value;return e},[K]),[Y,Z]=l.useState(-1),Q=l.useRef(null),X=useForkRef(p,Q),createHandleHiddenInputFocus=e=>t=>{const g=Number(t.currentTarget.getAttribute("data-index"));isFocusVisible(t.target)&&Z(g),M(g),e?.onFocus?.(t)},createHandleHiddenInputBlur=e=>t=>{isFocusVisible(t.target)||Z(-1),M(-1),e?.onBlur?.(t)},changeValue=(e,t)=>{const g=Number(e.currentTarget.getAttribute("data-index")),n=U[g],o=H.indexOf(n);let I=t;if(K&&null==h){const e=H[H.length-1];I=I>=e?e:I<=H[0]?H[0]:I<n?H[o-1]:H[o+1]}if(I=clamp$2(I,i,a),V){C&&(I=clamp$2(I,U[g-1]||-1/0,U[g+1]||1/0));const e=I;I=setValueIndex(U,I,g);let t=g;C||(t=I.indexOf(e)),focusThumb(Q,t)}F(I),Z(g),c&&!areValuesEqual(I,B)&&W(e,I,g),u&&u(e,L.current??I)},createHandleHiddenInputKeyDown=e=>t=>{if(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","PageUp","PageDown","Home","End"].includes(t.key)){t.preventDefault();const e=U[Number(t.currentTarget.getAttribute("data-index"))];let g=null;if(null!=h){const n=t.shiftKey?y:h;switch(t.key){case"ArrowUp":g=getNewValue(e,n,1,i,a);break;case"ArrowRight":g=getNewValue(e,n,o?-1:1,i,a);break;case"ArrowDown":g=getNewValue(e,n,-1,i,a);break;case"ArrowLeft":g=getNewValue(e,n,o?1:-1,i,a);break;case"PageUp":g=getNewValue(e,y,1,i,a);break;case"PageDown":g=getNewValue(e,y,-1,i,a);break;case"Home":g=i;break;case"End":g=a}}else if(K){const n=H[H.length-1],C=H.indexOf(e),I=[o?"ArrowLeft":"ArrowRight","ArrowUp","PageUp","End"];[o?"ArrowRight":"ArrowLeft","ArrowDown","PageDown","Home"].includes(t.key)?g=0===C?H[0]:H[C-1]:I.includes(t.key)&&(g=C===H.length-1?n:H[C+1])}null!=g&&changeValue(t,g)}e?.onKeyDown?.(t)};Qr(()=>{const e=xA(ownerDocument(Q.current));n&&bA(Q.current,e)&&null!=e&&"blur"in e&&e.blur()},[n]),n&&-1!==w&&E(-1),n&&-1!==Y&&Z(-1);const createHandleHiddenInputChange=e=>t=>{e.onChange?.(t),changeValue(t,t.currentTarget.valueAsNumber)},_=l.useRef(void 0);let q=d;o&&"horizontal"===d&&(q+="-reverse");const getValueAtFinger=e=>{const{current:t}=Q;if(!t)return null;const{width:g,height:n,bottom:o,left:I}=t.getBoundingClientRect();let s,l;s=q.startsWith("vertical")?(o-e.y)/n:(e.x-I)/g,q.includes("-reverse")&&(s=1-s),l=percentToValue(s,i,a),l=h?roundValueToStep(l,h,i):H[findClosest(H,l)],l=clamp$2(l,i,a);let c=0;if(V){const e=-1!==_.current;c=e?_.current:findClosest(U,l,D.current),C&&(l=clamp$2(l,U[c-1]||-1/0,U[c+1]||1/0));const t=l;l=setValueIndex(U,l,c),C&&e||(c=l.indexOf(t),_.current=c)}return{newValue:l,activeIndex:c}},J=useEventCallback(e=>{if("pointerId"in e&&e.pointerId!==j.current)return;const t=trackFinger(e,x);if(!t)return;if(N.current+=1,"pointermove"===e.type&&0===e.buttons)return void $(e);const g=getValueAtFinger(t);g&&(focusThumb(Q,g.activeIndex,E,!1),D.current=g.activeIndex,F(g.newValue),!T&&N.current>Rs&&P(!0),c&&!areValuesEqual(g.newValue,B)&&W(e,g.newValue,g.activeIndex))}),$=useEventCallback(e=>{if("pointerId"in e&&e.pointerId!==j.current)return;const t=trackFinger(e,x);if(P(!1),!t)return;const g=getValueAtFinger(t);E(-1),"touchend"===e.type&&M(-1),g&&u&&u(e,L.current??g.newValue),"pointerType"in e&&Q.current?.hasPointerCapture(e.pointerId)&&Q.current.releasePointerCapture(e.pointerId),x.current=void 0,j.current=-1,te()}),ee=useEventCallback(e=>{if(n)return;if(O.current){O.current=!1;const t=e.changedTouches[0];return void(null!=t&&(x.current=t.identifier))}const t=e.changedTouches[0];null!=t&&(x.current=t.identifier);const g=trackFinger(e,x);if(!1!==g){_.current=-1;const t=getValueAtFinger(g);t&&(focusThumb(Q,t.activeIndex,E,!1),D.current=t.activeIndex,F(t.newValue),c&&!areValuesEqual(t.newValue,B)&&W(e,t.newValue,t.activeIndex))}N.current=0;const C=ownerDocument(Q.current);C.addEventListener("touchmove",J,{passive:!0}),C.addEventListener("touchend",$,{passive:!0})}),te=l.useCallback(()=>{const e=ownerDocument(Q.current);e.removeEventListener("pointermove",J),e.removeEventListener("pointerup",$),e.removeEventListener("touchmove",J),e.removeEventListener("touchend",$)},[$,J]);l.useEffect(()=>{const e=Q.current;if(e)return e.addEventListener("touchstart",ee,{passive:!0}),()=>{e.removeEventListener("touchstart",ee),G(),te()}},[te,ee,G]),l.useEffect(()=>{n&&(te(),G())},[n,te,G]);const createHandlePointerDown=e=>t=>{if(e.onPointerDown?.(t),"touch"===t.pointerType&&(O.current=!0),n||t.defaultPrevented||0!==t.button)return;const g=trackFinger(t,x);if(!1!==g){_.current=-1;const e=getValueAtFinger(g);if(e){const g=Q.current?.querySelector(`input[type="range"][data-index="${e.activeIndex}"]`),n=ownerDocument(Q.current),C=null!=g&&g===xA(n);E(e.activeIndex),D.current=e.activeIndex,C?t.preventDefault():(G(),S.current=requestAnimationFrame(()=>{S.current=null,focusThumb(Q,e.activeIndex,void 0,!1)})),F(e.newValue),c&&!areValuesEqual(e.newValue,B)&&W(t,e.newValue,e.activeIndex)}}N.current=0,j.current=t.pointerId;const C=ownerDocument(Q.current);try{t.currentTarget.setPointerCapture(t.pointerId)}catch{}C.addEventListener("pointermove",J,{passive:!0}),C.addEventListener("pointerup",$)},ge=valueToPercent(V?U[0]:i,i,a),re=valueToPercent(U[U.length-1],i,a)-ge,createHandleMouseOver=e=>t=>{e.onMouseOver?.(t),M(Number(t.currentTarget.getAttribute("data-index")))},createHandleMouseLeave=e=>t=>{e.onMouseLeave?.(t),M(-1)},getThumbStyle=e=>{let t;return V?w===e?t=2:D.current===e&&(t=1):w===e&&(t=1),{pointerEvents:-1!==w&&w!==e?"none":void 0,zIndex:t}};let ne;return"vertical"===d&&(ne=o?"vertical-rl":"vertical-lr"),{active:w,axis:q,axisProps:Ts,dragging:T,focusedThumbIndex:Y,getHiddenInputProps:(g=Ms)=>{const C=extractEventHandlers(g),I={onChange:createHandleHiddenInputChange(C),onFocus:createHandleHiddenInputFocus(C),onBlur:createHandleHiddenInputBlur(C),onKeyDown:createHandleHiddenInputKeyDown(C)},l={...C,...I};return{tabIndex:b,"aria-labelledby":t,"aria-orientation":d,"aria-valuemax":m(a),"aria-valuemin":m(i),name:s,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":e.step??void 0,disabled:n,...g,...l,style:{...Es,direction:o?"rtl":"ltr",width:"100%",height:"100%",writingMode:ne}}},getRootProps:(e=Ms)=>{const t=extractEventHandlers(e),g={onPointerDown:createHandlePointerDown(t)},n={...t,...g};return{...e,ref:X,...n}},getThumbProps:(e=Ms)=>{const t=extractEventHandlers(e),g={onMouseOver:createHandleMouseOver(t),onMouseLeave:createHandleMouseLeave(t)};return{...e,...t,...g}},marks:K,open:R,range:V,rootRef:X,trackLeap:re,trackOffset:ge,values:U,getThumbStyle}}function getSliderUtilityClass(e){return generateUtilityClass("MuiSlider",e)}var Ps=generateUtilityClasses("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","track","trackInverted","trackFalse","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),useValueLabelClasses=e=>{const{open:t}=e;return{offset:clsx(t&&Ps.valueLabelOpen),circle:Ps.valueLabelCircle,label:Ps.valueLabelLabel}};function SliderValueLabel$1(e){const{children:t,className:g,value:n}=e,C=useValueLabelClasses(e);return t?l.cloneElement(t,{className:t.props.className},(0,gr.jsxs)(l.Fragment,{children:[t.props.children,(0,gr.jsx)("span",{className:clsx(C.offset,g),"aria-hidden":!0,children:(0,gr.jsx)("span",{className:C.circle,children:(0,gr.jsx)("span",{className:C.label,children:n})})})]})):null}function Identity(e){return e}var Ns=On("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:g}=e;return[t.root,t[`color${Qn(g.color)}`],"medium"!==g.size&&t[`size${Qn(g.size)}`],g.marked&&t.marked,"vertical"===g.orientation&&t.vertical,"inverted"===g.track&&t.trackInverted,!1===g.track&&t.trackFalse]}})(Vn(({theme:e})=>({borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${Ps.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${Ps.dragging}`]:{[`& .${Ps.thumb}, & .${Ps.track}`]:{transition:"none"}},variants:[...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}))),Ds=On("span",{name:"MuiSlider",slot:"Rail"})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,"@media (forced-colors: active)":{border:"1px solid transparent",boxSizing:"border-box"},variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),Os=On("span",{name:"MuiSlider",slot:"Track"})(Vn(({theme:e})=>({display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{"@media (forced-colors: none)":{border:"none"}}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t,track:"inverted"},style:{...e.vars?{backgroundColor:e.vars.palette.Slider[`${t}Track`],borderColor:e.vars.palette.Slider[`${t}Track`]}:{backgroundColor:e.lighten(e.palette[t].main,.62),borderColor:e.lighten(e.palette[t].main,.62),...e.applyStyles("dark",{backgroundColor:e.darken(e.palette[t].main,.5)}),...e.applyStyles("dark",{borderColor:e.darken(e.palette[t].main,.5)})}}}))]}))),js=On("span",{name:"MuiSlider",slot:"Thumb"})(Vn(({theme:e})=>({position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"@media (forced-colors: active)":{border:"1px solid ButtonBorder"},"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${Ps.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.entries(e.palette).filter(createSimplePaletteValueFilter()).map(([t])=>({props:{color:t},style:{[`&:hover, &.${Ps.focusVisible}`]:{boxShadow:`0px 0px 0px 8px ${e.alpha((e.vars||e).palette[t].main,.16)}`,"@media (hover: none)":{boxShadow:"none"}},[`&.${Ps.active}`]:{boxShadow:`0px 0px 0px 14px ${e.alpha((e.vars||e).palette[t].main,.16)}`}}}))]}))),zs=On(SliderValueLabel$1,{name:"MuiSlider",slot:"ValueLabel"})(Vn(({theme:e})=>({zIndex:1,whiteSpace:"nowrap",...e.typography.body2,fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${Ps.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${Ps.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]}))),Gs=On("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>slotShouldForwardProp(e)&&"markActive"!==e,overridesResolver:(e,t)=>{const{markActive:g}=e;return[t.mark,g&&t.markActive]}})(Vn(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]}))),Ls=On("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>slotShouldForwardProp(e)&&"markLabelActive"!==e})(Vn(({theme:e})=>({...e.typography.body2,color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]}))),useUtilityClasses=e=>{const{disabled:t,dragging:g,marked:n,orientation:C,track:o,classes:I,color:a,size:i}=e;return composeClasses({root:["root",t&&"disabled",g&&"dragging",n&&"marked","vertical"===C&&"vertical","inverted"===o&&"trackInverted",!1===o&&"trackFalse",a&&`color${Qn(a)}`,i&&`size${Qn(i)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled"],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]},getSliderUtilityClass,I)},Forward=({children:e})=>e,Bs=l.forwardRef(function(e,t){const g=useDefaultProps({props:e,name:"MuiSlider"}),n=useRtl(),{"aria-label":C,"aria-valuetext":o,"aria-labelledby":I,color:a="primary",classes:i,className:s,disableSwap:c=!1,disabled:u=!1,getAriaLabel:d,getAriaValueText:p,marks:m=!1,max:h=100,min:y=0,name:b,onChange:v,onChangeCommitted:x,orientation:S="horizontal",shiftStep:w=10,size:E="medium",step:R=1,scale:M=Identity,slotProps:T={},slots:P={},tabIndex:N,track:D="normal",value:O,valueLabelDisplay:j="off",valueLabelFormat:G=Identity,...L}=g,B={...g,isRtl:n,max:h,min:y,classes:i,disabled:u,disableSwap:c,orientation:S,marks:m,color:a,size:E,step:R,shiftStep:w,scale:M,track:D,valueLabelDisplay:j,valueLabelFormat:G},{axisProps:F,getRootProps:W,getHiddenInputProps:V,getThumbProps:U,open:K,active:H,axis:Y,focusedThumbIndex:Z,range:Q,dragging:X,marks:_,values:q,trackOffset:J,trackLeap:$,getThumbStyle:ee}=useSlider({...B,rootRef:t});B.marked=_.length>0&&_.some(e=>e.label),B.dragging=X,B.focusedThumbIndex=Z;const te=useUtilityClasses(B),ge={slots:P,slotProps:T},[re,ne]=useSlot("root",{elementType:Ns,getSlotProps:W,externalForwardedProps:{...ge,...L},ownerState:B,className:[te.root,s]}),[Ae,Ce]=useSlot("rail",{elementType:Ds,externalForwardedProps:ge,ownerState:B,className:te.rail}),[oe,Ie]=useSlot("track",{elementType:Os,externalForwardedProps:ge,additionalProps:{style:{...F[Y].offset(J),...F[Y].leap($)}},ownerState:B,className:te.track}),[ae,ie]=useSlot("thumb",{elementType:js,getSlotProps:U,externalForwardedProps:ge,ownerState:B,className:te.thumb}),[se,le]=useSlot("valueLabel",{elementType:zs,externalForwardedProps:ge,ownerState:B,className:te.valueLabel}),[ce,ue]=useSlot("mark",{elementType:Gs,externalForwardedProps:ge,ownerState:B,className:te.mark}),[de,pe]=useSlot("markLabel",{elementType:Ls,externalForwardedProps:ge,ownerState:B,className:te.markLabel}),[me,fe]=useSlot("input",{elementType:"input",getSlotProps:V,externalForwardedProps:ge,ownerState:B});return(0,gr.jsxs)(re,{...ne,children:[(0,gr.jsx)(Ae,{...Ce}),(0,gr.jsx)(oe,{...Ie}),_.filter(e=>e.value>=y&&e.value<=h).map((e,t)=>{const g=valueToPercent(e.value,y,h),n=F[Y].offset(g);let C;return C=!1===D?q.includes(e.value):"normal"===D&&(Q?e.value>=q[0]&&e.value<=q[q.length-1]:e.value<=q[0])||"inverted"===D&&(Q?e.value<=q[0]||e.value>=q[q.length-1]:e.value>=q[0]),(0,gr.jsxs)(l.Fragment,{children:[(0,gr.jsx)(ce,{"data-index":t,...ue,...!isHostComponent(ce)&&{markActive:C},style:{...n,...ue.style},className:clsx(ue.className,C&&te.markActive)}),null!=e.label?(0,gr.jsx)(de,{"aria-hidden":!0,"data-index":t,...pe,...!isHostComponent(de)&&{markLabelActive:C},style:{...n,...pe.style},className:clsx(te.markLabel,pe.className,C&&te.markLabelActive),children:e.label}):null]},t)}),q.map((e,t)=>{const g=valueToPercent(e,y,h),n=F[Y].offset(g),a="off"===j?Forward:se;return(0,gr.jsx)(a,{...!isHostComponent(a)&&{valueLabelFormat:G,valueLabelDisplay:j,value:"function"==typeof G?G(M(e),t):G,index:t,open:K===t||H===t||"on"===j,disabled:u},...le,children:(0,gr.jsx)(ae,{"data-index":t,...ie,className:clsx(te.thumb,ie.className,H===t&&te.active,Z===t&&te.focusVisible),style:{...n,...ee(t),...ie.style},children:(0,gr.jsx)(me,{"data-index":t,"aria-label":d?d(t):C,"aria-valuenow":M(e),"aria-labelledby":I,"aria-valuetext":p?p(M(e),t):o,value:q[t],...fe})})},t)})]})}),resolveSliderValue$1=e=>Array.isArray(e)?e[0]??0:e,OptionsDisplayInner=()=>{const{tokens:e,updateTokens:t}=useTheme(),g=usePersistence(),[n,C]=(0,l.useState)(()=>g.get("ui")??{}),o=(0,l.useMemo)(()=>{const t=e.theme.displayFontFamily;return Re.some(({value:e})=>e===t)?Re:[{label:t,value:t},...Re]},[e.theme.displayFontFamily]),handleUiToggle=(e,t)=>{const o={...n,[e]:t};g.set("ui",o),C(o)},handleDisplayFontFamily=e=>{t({theme:{displayFontFamily:e.target.value}})},handleDisplayFontSize=(e,g)=>{t({theme:{displayFontSize:resolveSliderValue$1(g)}})};return React.createElement(Wn,{className:"options-display",sx:{display:"flex",flexDirection:"column",gap:1.5,p:1.5}},React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Main Display / Scrollback Style"),React.createElement(BC,null),React.createElement(vI,{fullWidth:!0,size:"small"},React.createElement(yI,{id:"display-font-family-select-label"},"Font Family"),React.createElement(ZI,{label:"Font Family",labelId:"display-font-family-select-label",onChange:handleDisplayFontFamily,value:e.theme.displayFontFamily},o.map(e=>React.createElement(KC,{key:e.value,value:e.value},e.label)))),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:1}},React.createElement(qn,{variant:"caption",color:"text.secondary"},"Display Font Size: ",e.theme.displayFontSize,"px"),React.createElement(Bs,{"aria-label":"Display font size",max:20,min:8,onChange:handleDisplayFontSize,step:1,value:e.theme.displayFontSize})),React.createElement(BC,{sx:{mt:.5}}),React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Formatting"),React.createElement(ls,{label:"Ally / Enemy Formatting",onChange:e=>handleUiToggle("allyEnemyFormatting",e),tooltip:"Apply ally and enemy markers to recognised player names in panels and game output.",tooltipMode:"title",value:Boolean(n.allyEnemyFormatting)}),React.createElement(ls,{label:"Target Formatting",onChange:e=>handleUiToggle("targetFormatting",e),tooltip:"Highlight your current target in game output.",tooltipMode:"title",value:Boolean(n.targetFormatting)}))};OptionsDisplayInner.displayName="OptionsDisplayInner";var OptionsDisplay=()=>React.createElement(Jn,{panelName:"Options Display"},React.createElement(OptionsDisplayInner,null));OptionsDisplay.displayName="OptionsDisplay";var Fs=Object.freeze([{key:"showCombatStream",label:"Combat Stream",tooltip:"Route combat messages to a separate stream panel."},{key:"showSystemStream",label:"System Stream",tooltip:"Route system messages to a separate stream panel."},{key:"damageNumbers",label:"Damage Numbers",tooltip:"Show damage number overlays on combat output."},{key:"msgReplace",label:"Message Replace",tooltip:"Apply structured replacement rows for skill actions (nexSkillMatch / nexSkillNpcMatch). Inline name highlighting is controlled separately by the Ally/Enemy Formatting toggle."}]),useGameOptionToggles=()=>{const{stores:e}=useNexGui(),t=e.ui(e=>e.settings),g=e.ui(e=>e.setSetting);return(0,l.useMemo)(()=>Fs.map(e=>({key:e.key,label:e.label,tooltip:e.tooltip,value:Boolean(t[e.key]),onChange:t=>g(e.key,t)})),[g,t])},Ws=Object.freeze([{key:"echo_input",label:"Echo Input",tooltip:"Mirror your typed commands into the game output stream.",setValue:(e,t)=>{e.setSetting("echo_input",t)}},{key:"echo_gmcp",label:"Display GMCP",tooltip:"Show inbound GMCP payloads in the output stream.",setValue:(e,t)=>{e.setSetting("echo_gmcp",t)}},{key:"single_prompt",label:"Single Prompt",tooltip:"Collapse the duplicate Nexus prompt line into a single prompt.",setValue:(e,t)=>{e.setSetting("show_prompts",!t)}},{key:"show_timestamps",label:"Display Timestamps",tooltip:"Show Nexus timestamps in the main output stream.",setValue:(e,t)=>{e.setSetting("show_timestamps",t)}},{key:"display_tabstrip",label:"Display Tabstrip",tooltip:"Show the FlexLayout tab strip for docked Nexus tabs.",setValue:(e,t)=>{e.updateLayoutAttributes({tabSetEnableTabStrip:t})}}]),useHostSettingsToggles=()=>{const{eventBus:e,hostSettingsModel:t,hostLayoutModel:g}=useNexGui(),n=useHostBridge(),C=(0,l.useSyncExternalStore)(t.subscribe,t.getSnapshot),o=(0,l.useSyncExternalStore)(g.subscribe,g.getSnapshot),I=(0,l.useCallback)(({key:t,setValue:g},C)=>{g(n,C),e.emit($.HOST_SETTINGS_CHANGED,{key:t,value:C})},[e,n]);return(0,l.useMemo)(()=>Ws.map(e=>({key:e.key,label:e.label,tooltip:e.tooltip,value:"display_tabstrip"===e.key?Boolean(o.display_tabstrip):Boolean(C[e.key]),onChange:t=>I(e,t)})),[C,o,I])},OptionsGameInner=()=>{const e=useHostSettingsToggles(),t=useGameOptionToggles();return React.createElement(Wn,{className:"options-game",sx:{display:"flex",flexDirection:"column",gap:.5,p:1.5}},React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Game Options"),React.createElement(BC,{sx:{mb:1}}),React.createElement(Wn,{sx:{columnGap:3,display:"grid",gridTemplateColumns:{xs:"minmax(0, 1fr)",md:"repeat(2, minmax(0, 1fr))"},rowGap:1.5}},React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:.5,minWidth:0}},React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Nexus Config"),e.map(({key:e,label:t,tooltip:g,value:n,onChange:C})=>React.createElement(ls,{key:e,label:t,onChange:C,tooltip:g,tooltipMode:"title",value:n}))),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:.5,minWidth:0}},React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"nexGui Config"),t.map(({key:e,label:t,tooltip:g,value:n,onChange:C})=>React.createElement(ls,{key:e,label:t,onChange:C,tooltip:g,tooltipMode:"title",value:n})))))};OptionsGameInner.displayName="OptionsGameInner";var OptionsGame=()=>React.createElement(Jn,{panelName:"Options Game"},React.createElement(OptionsGameInner,null));OptionsGame.displayName="OptionsGame";var Vs="__none__",Us="__custom__",resolveSliderValue=e=>Array.isArray(e)?e[0]??0:e,OptionsStyleInner=()=>{const{tokens:e,updateTokens:t}=useTheme(),g=canonicalizeBackgroundImageValue(e.theme.backgroundImage),n=Gt.includes(g)?g:g?Us:Vs,handleFontSize=(e,g)=>{t({theme:{fontSize:resolveSliderValue(g)}})},handleOpacity=(e,g)=>{t({theme:{backgroundOpacity:resolveSliderValue(g)}})},handleHue=(e,g)=>{t({theme:{hue:resolveSliderValue(g)}})},handleCustomBgImage=e=>{t({theme:{backgroundImage:e.target.value}})},handleBackgroundImageSelect=e=>{const{value:g}=e.target;g!==Vs?g!==Us?t({theme:{backgroundImage:g}}):n!==Us&&t({theme:{backgroundImage:""}}):t({theme:{backgroundImage:""}})};return React.createElement(Wn,{className:"options-style",sx:{display:"flex",flexDirection:"column",gap:1.5,p:1.5}},React.createElement(qn,{gutterBottom:!0,variant:"subtitle2"},"Panel Display Style"),React.createElement(BC,null),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:1}},React.createElement(qn,{variant:"caption",color:"text.secondary"},"Panel Font Size: ",e.theme.fontSize,"px"),React.createElement(Bs,{"aria-label":"Panel font size",max:20,min:8,onChange:handleFontSize,step:1,value:e.theme.fontSize})),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:1}},React.createElement(qn,{variant:"caption",color:"text.secondary"},"Background Opacity: ",Math.round(100*e.theme.backgroundOpacity),"%"),React.createElement(Bs,{"aria-label":"Background opacity",max:1,min:0,onChange:handleOpacity,step:.01,value:e.theme.backgroundOpacity})),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:1}},React.createElement(qn,{variant:"caption",color:"text.secondary"},"Hue Shift: ",e.theme.hue,"°"),React.createElement(Bs,{"aria-label":"Hue shift",max:360,min:0,onChange:handleHue,step:1,value:e.theme.hue})),React.createElement(vI,{fullWidth:!0,size:"small"},React.createElement(yI,{id:"background-image-select-label"},"Background Image"),React.createElement(ZI,{label:"Background Image",labelId:"background-image-select-label",onChange:handleBackgroundImageSelect,value:n},React.createElement(KC,{value:Vs},"None"),Gt.map(e=>React.createElement(KC,{key:e,value:e},e)),React.createElement(KC,{value:Us},"Custom URL"))),React.createElement(_I,{InputLabelProps:{shrink:!0},fullWidth:!0,label:"Background Image URL",onChange:handleCustomBgImage,placeholder:"https://...",size:"small",value:e.theme.backgroundImage,variant:"outlined"}))};OptionsStyleInner.displayName="OptionsStyleInner";var OptionsStyle=()=>React.createElement(Jn,{panelName:"Options Panels"},React.createElement(OptionsStyleInner,null));OptionsStyle.displayName="OptionsStyle";var Ks="options",Hs=Object.freeze([{content:React.createElement(OptionsGame,null),id:"game",label:"Game"},{content:React.createElement(OptionsStyle,null),id:"style",label:"Panels"},{content:React.createElement(OptionsDisplay,null),id:"display",label:"Display"},{content:React.createElement(OptionsAdvanced,null),id:"advanced",label:"Advanced"}]),resolveActiveTabId=e=>"string"==typeof e?e:"number"==typeof e?Hs[e]?.id??Hs[0].id:Hs[0].id,OptionsPanelInner=()=>{const e=useTheme(),{activeTab:t,setActiveTab:g}=useUi(),n=e.theme?.nexGui?.backgroundImage??"",C=e.theme?.nexGui?.backgroundOpacity??.5,o=e.theme?.nexGui?.backgroundFilter??"none",handleTabChange=e=>{const t=Hs.findIndex(t=>t.id===e);t>=0&&g(Ks,t)};return React.createElement(Ei,{activeTab:resolveActiveTabId(t[Ks]),backgroundFilter:o,backgroundImage:n,backgroundOpacity:C,onTabChange:handleTabChange,tabs:Hs})};OptionsPanelInner.displayName="OptionsPanelInner";var OptionsPanel=()=>React.createElement(Jn,{panelName:"Options"},React.createElement(OptionsPanelInner,null));OptionsPanel.displayName="OptionsPanel";var PartyMemberRowComponent=({name:e,color:t="text.primary",disabled:g=!1,onClick:n=null})=>{const C="function"==typeof n&&!g;return React.createElement(Wn,{className:"party-member-row",onClick:C?()=>n(e):void 0,role:C?"button":void 0,sx:{alignItems:"center",cursor:C?"pointer":"default",display:"flex",minHeight:24,px:.5},tabIndex:C?0:void 0},React.createElement(qn,{component:"span",sx:{color:t,fontWeight:500,lineHeight:1.35},variant:"body2"},e))};PartyMemberRowComponent.displayName="PartyMemberRow",PartyMemberRowComponent.propTypes={color:Yn.default.string,disabled:Yn.default.bool,name:Yn.default.string.isRequired,onClick:Yn.default.func};var Ys=(0,l.memo)(PartyMemberRowComponent);Ys.displayName="PartyMemberRow",Ys.propTypes=PartyMemberRowComponent.propTypes;var selectPartySlice=e=>({members:e.members,leader:e.leader,selfName:e.selfName,settings:e.settings,updateParty:e.updateParty,addMember:e.addMember,removeMember:e.removeMember,setLeader:e.setLeader,setSelf:e.setSelf,setSetting:e.setSetting}),useParty=()=>{const{stores:e}=useNexGui();return e.party(useShallow(selectPartySlice))},noopSubscribe=()=>()=>{},fallbackFalse=()=>!1,fallbackNull=()=>null,fallbackName=()=>"",fallbackColor=()=>"grey",getModelVersion=e=>"function"==typeof e?.getVersion?e.getVersion():0,createDirectoryBinding=(e,t)=>{const subscribe=g=>{const n=e?.subscribePlayerDirectory?.(g)??noopSubscribe(),C=t?.subscribePlayerRelationships?.(g)??noopSubscribe();return()=>{n?.(),C?.()}},getSnapshot=()=>`${getModelVersion(e)}:${getModelVersion(t)}`;return Object.freeze({getSnapshot,subscribe})},usePlayerDirectory=()=>{const{playerDirectory:e,playerRelationships:t}=useNexGui(),g=(0,l.useMemo)(()=>createDirectoryBinding(e,t),[e,t]),n=(0,l.useSyncExternalStore)(g.subscribe,g.getSnapshot,g.getSnapshot);return(0,l.useMemo)(()=>Object.freeze({version:n,getPlayerColor:e?.getPlayerColor?.bind(e)??fallbackColor,getPlayerProfile:e?.getPlayerProfile?.bind(e)??fallbackNull,isAllyPlayer:t?.isAllyPlayer?.bind(t)??fallbackFalse,isCityEnemyPlayer:t?.isCityEnemyPlayer?.bind(t)??fallbackFalse,isEnemyPlayer:t?.isEnemyPlayer?.bind(t)??fallbackFalse,resolvePlayerNameFromFullname:e?.resolvePlayerNameFromFullname?.bind(e)??fallbackName}),[e,t,n])},usePartyViewModel=()=>{const e=usePlayerDirectory(),{members:t,leader:g,selfName:n,settings:C,setLeader:o,addMember:I,removeMember:a,setSetting:i}=useParty();return(0,l.useMemo)(()=>{e.version;const s=t.map(t=>({color:e.getPlayerColor(t),disabled:t===n,name:t})),l=t.map(t=>({color:e.getPlayerColor(t),name:t})),c=ge.map(({key:e,label:t,tooltip:g})=>({key:e,label:t,tooltip:g,value:Boolean(C?.[e]),onChange:t=>i(e,t)}));return{addMember:I,leader:g&&t.includes(g)?g:"",leaderColor:g?e.getPlayerColor(g):null,leaderOptions:l,memberRows:s,members:t,removeMember:a,selfName:n,setLeader:o,toggles:c}},[I,g,t,e,a,n,o,i,C])},getFlipTransform$4=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},PartyPanelInner=()=>{const e=useTheme$1(),[t]=(0,l.useState)(()=>Math.floor(4*Math.random())),[g,n]=(0,l.useState)(""),{addMember:C,leader:o,leaderColor:I,leaderOptions:a,memberRows:i,members:s,removeMember:c,setLeader:u,toggles:d}=usePartyViewModel(),p=e?.nexGui?.backgroundImage??"",m=e?.nexGui?.backgroundOpacity??.5,h=e?.nexGui?.backgroundFilter??"none",y=(0,l.useCallback)(e=>{"Enter"===e.key&&g.trim()&&(C(g.trim()),n(""))},[C,g]);return React.createElement(Wn,{className:"party-panel",sx:{height:"100%",overflow:"hidden",position:"relative",width:"100%"}},p?React.createElement(Wn,{"aria-hidden":"true",className:"party-panel__background",sx:{backgroundImage:`url(${p})`,backgroundPosition:"center",backgroundSize:"cover",filter:h,inset:0,opacity:m,position:"absolute",transform:getFlipTransform$4(t),zIndex:0}}):null,React.createElement(Wn,{className:"party-panel__content",sx:{background:`linear-gradient(180deg, ${alpha("#050505",.28)} 0%, ${alpha("#050505",.56)} 100%)`,display:"grid",gridTemplateColumns:"1fr 1fr",gap:2,height:"100%",overflowY:"auto",p:1.25,position:"relative",width:"100%",zIndex:1}},React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:.5,minWidth:0}},React.createElement(_I,{label:"Add member",onChange:e=>n(e.target.value),onKeyDown:y,size:"small",sx:{mb:.5,width:"15ch"},value:g}),React.createElement(qn,{component:"span",sx:{color:"text.secondary",fontSize:11,fontWeight:700,letterSpacing:.4,pb:.25,textTransform:"uppercase"}},"Party Members"),s.length>0?i.map(e=>React.createElement(Ys,{color:e.color,disabled:e.disabled,key:e.name,name:e.name,onClick:c})):React.createElement(qn,{color:"text.secondary",variant:"body2"},"No party members")),React.createElement(Wn,{sx:{display:"flex",flexDirection:"column",gap:1}},React.createElement(vI,{fullWidth:!0,size:"small"},React.createElement(yI,{id:"nexgui4-party-leader-label"},"Party Leader"),React.createElement(ZI,{disabled:0===s.length,label:"Party Leader",labelId:"nexgui4-party-leader-label",onChange:e=>u(e.target.value),sx:{color:I??"text.primary",minWidth:"18ch"},value:o},a.map(e=>React.createElement(KC,{key:e.name,sx:{color:e.color},value:e.name},e.name)))),React.createElement(BC,{sx:{my:.5}}),React.createElement(qn,{component:"span",sx:{color:"text.secondary",fontSize:11,fontWeight:700,letterSpacing:.4,textTransform:"uppercase"}},"Party Behaviour"),d.map(({key:e,label:t,tooltip:g,value:n,onChange:C})=>React.createElement(ls,{key:e,label:t,onChange:C,tooltip:g,value:n})))))};PartyPanelInner.displayName="PartyPanelInner";var PartyPanel=()=>React.createElement(Jn,{panelName:"Party"},React.createElement(PartyPanelInner,null));PartyPanel.displayName="PartyPanel";var Zs={color:Yn.default.string.isRequired,isAlly:Yn.default.bool,isEnemy:Yn.default.bool,isTarget:Yn.default.bool,name:Yn.default.string.isRequired},Qs=Yn.default.exact(Zs),RoomPlayerRowComponent=({onHover:e,onLeave:t,onSelect:g,player:n})=>{const C=n.isEnemy?"#ff0000":"#ffffff",o=n.isAlly||n.isEnemy;return React.createElement(Wn,{className:"room-player-row",onClick:()=>g(n.name),onMouseEnter:e,onMouseLeave:t,sx:{alignItems:"center",cursor:"pointer",display:"inline-flex",gap:.125,margin:"2px 4px",minHeight:e=>`${Number(e.typography.fontSize)+8}px`,outline:n.isTarget?"1px solid red":"",px:.25,py:.125,position:"relative",zIndex:1}},o?React.createElement(qn,{component:"span",sx:{color:C,fontWeight:700},variant:"body2"},"("):null,React.createElement(qn,{component:"span",sx:{color:n.color,fontWeight:700},variant:"body2"},n.name),o?React.createElement(qn,{component:"span",sx:{color:C,fontWeight:700},variant:"body2"},")"):null)};RoomPlayerRowComponent.displayName="RoomPlayerRow",RoomPlayerRowComponent.propTypes={onHover:Yn.default.func.isRequired,onLeave:Yn.default.func.isRequired,onSelect:Yn.default.func.isRequired,player:Qs.isRequired};var Xs=(0,l.memo)(RoomPlayerRowComponent);Xs.displayName="RoomPlayerRow",Xs.propTypes=RoomPlayerRowComponent.propTypes;var _s=new Set(["regex","user","time","loaded"]),formatCellValue=e=>Array.isArray(e)?e.join(", "):null!==e&&"object"==typeof e?JSON.stringify(e):String(e),qs=Yn.default.objectOf(Yn.default.oneOfType([Yn.default.string,Yn.default.number,Yn.default.bool,Yn.default.array,Yn.default.object])),PlayerPopoverComponent=({anchorEl:e=null,onClose:t,player:g})=>{const n=(0,l.useMemo)(()=>Object.entries(g??{}).flatMap(([e,t])=>_s.has(e)||null==t?[]:React.createElement("tr",{key:e},React.createElement("td",{style:{color:"cyan",padding:"0 5px 0 2px"}},e),React.createElement("td",{style:{padding:0}},formatCellValue(t)))),[g]);return g?React.createElement(dC,{anchorEl:e,anchorOrigin:{horizontal:"left",vertical:"top"},disableRestoreFocus:!0,onClose:t,open:Boolean(e),sx:{pointerEvents:"none"},slotProps:{paper:{sx:{backgroundColor:"#000000",border:"1px solid #ffffff"}}},transformOrigin:{horizontal:"right",vertical:"bottom"}},React.createElement("table",{style:{background:"black",borderSpacing:"0px",fontSize:"13px",margin:"10px",maxWidth:"100%",padding:"1px",textAlign:"left"}},React.createElement("thead",null,React.createElement("tr",null,React.createElement("th",{style:{width:"auto"}}),React.createElement("th",{style:{width:"auto"}}))),React.createElement("tbody",null,n))):null};PlayerPopoverComponent.displayName="PlayerPopover",PlayerPopoverComponent.propTypes={anchorEl:Yn.default.instanceOf(Element),onClose:Yn.default.func.isRequired,player:qs},PlayerPopoverComponent.defaultProps={player:null};var Js=(0,l.memo)(PlayerPopoverComponent);Js.displayName="PlayerPopover",Js.propTypes=PlayerPopoverComponent.propTypes;var resolvePlayerProfile=(e,t,g)=>mergePlayerPresentationProfile(g.getPlayerProfile(t),buildFallbackPlayerProfile(e,t)),useRoomPlayersViewModel=()=>{const{adapter:e}=useNexGui(),{players:t}=useRoom(),{name:g,target:n}=useCharacter(),{members:C}=useParty(),o=usePlayerDirectory(),I=(0,l.useMemo)(()=>{o.version;const e=new Set((C??[]).filter(e=>"string"==typeof e&&e.length>0&&e!==g)),I=o.getPlayerProfile(g)?.city??"";return[...t??[]].map(t=>{const g=resolveRoomPlayerName(t,o);if(!g)return null;const C=resolvePlayerProfile(t,g,o),a=!0===C?.loaded,i=o.isEnemyPlayer(g),s=o.isAllyPlayer(g)||e.has(g);let l=5;return a&&(l=i?0:s?1:C.city===I?2:"garden"===C.city?3:4),{color:resolvePlayerPresentationColor({name:g,profile:C,playerDirectory:o}),isAlly:s,isEnemy:i,isTarget:g===n,loaded:a,name:g,profile:C,priority:l}}).filter(Boolean).sort((e,t)=>e.priority!==t.priority?e.priority-t.priority:e.name.localeCompare(t.name))},[C,o,t,g,n]),a=(0,l.useCallback)(t=>{e?.send?.(`settarget ${t}`)},[e]);return(0,l.useMemo)(()=>({players:I,selectPlayer:a}),[I,a])},getFlipTransform$3=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},PlayersPanelInner=()=>{const e=useTheme$1(),{players:t,selectPlayer:g}=useRoomPlayersViewModel(),[n]=(0,l.useState)(()=>Math.floor(4*Math.random())),[C,o]=(0,l.useState)(null),[I,a]=(0,l.useState)(""),i=e?.nexGui?.backgroundImage??"",s=e?.nexGui?.backgroundOpacity??.5,c=e?.nexGui?.backgroundFilter??"none",u=I?t.find(e=>e.name===I)?.profile??null:null;(0,l.useEffect)(()=>{C&&(I&&t.some(e=>e.name===I)||(o(null),a("")))},[C,I,t]);const handleClosePopover=()=>{o(null),a("")};return 0===t.length?React.createElement(Wn,{className:"players-panel players-panel--empty",sx:{alignItems:"center",color:"text.secondary",display:"flex",flex:1,justifyContent:"center",p:2}},React.createElement(qn,{variant:"body2"},"No players in room")):React.createElement(Wn,{className:"players-panel",sx:{height:"100%",overflow:"hidden",position:"relative",width:"100%"}},i?React.createElement(Wn,{"aria-hidden":"true",className:"players-panel__background",sx:{backgroundImage:`url(${i})`,backgroundPosition:"center",backgroundSize:"cover",filter:c,inset:0,opacity:s,position:"absolute",transform:getFlipTransform$3(n),zIndex:0}}):null,React.createElement(Wn,{className:"players-panel__content",sx:{alignContent:"flex-start",background:`linear-gradient(180deg, ${alpha("#050505",.28)} 0%, ${alpha("#050505",.56)} 100%)`,color:"text.primary",display:"flex",flexDirection:"row",flexWrap:"wrap",height:"100%",overflowY:"auto",position:"relative",width:"100%",zIndex:1}},t.map((e,t)=>React.createElement(Xs,{key:`${e.name}-${t}`,onHover:t=>{e.loaded?(o(t.currentTarget),a(e.name)):handleClosePopover()},onLeave:handleClosePopover,onSelect:g,player:e}))),React.createElement(Js,{anchorEl:C,onClose:handleClosePopover,player:u?.loaded?u:null}))};PlayersPanelInner.displayName="PlayersPanelInner";var PlayersPanel=()=>React.createElement(Jn,{panelName:"Players"},React.createElement(PlayersPanelInner,null));PlayersPanel.displayName="PlayersPanel";var $s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAADUCAYAAACh36CaAAAACXBIWXMAAA7EAAAOxAGVKw4bAAA4HGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB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3MpPC9zdEV2dDpzb2Z0d2FyZUFnZW50PgogICAgICAgICAgICAgICA8L3JkZjpsaT4KICAgICAgICAgICAgPC9yZGY6U2VxPgogICAgICAgICA8L3htcE1NOkhpc3Rvcnk+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjk2MDAwMC8xMDAwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+OTYwMDAwLzEwMDAwPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjY1NTM1PC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xNDE8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjEyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz6NaNPuAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAVqSURBVHja7Nt/TNRlHMDxz07vjjt+DqVAHJJmYaxWkQj+GP7MCbg0c5WuNdOtVVstbKw/ZLMWTnNaKrOmqBCRLuEYiCHoJbaFyB1igIaIDg7CBGbyQzAiP/3RMK1kXP35fX+3977/fJ9/nr32PHf3fE9UVYi8iUkg0BBoCDQEGgINEWgINAQaAg2BhsjIaO6+QkOCJXpqpDwcGS4h44Ls05+MmvP6K8tWfZi6bvXWtLdemB37xNPhoeOtPlaLjA8OlOAg/3vGg8ZgaEwmk/j52iRyYqjMmv548ttrV+7ZszXVVZS1uf1k3s6rZQe3N+/b/n556purdj86JSLZbB4rFosZNEZfacIeCH5k96aU+q7aYtXOStXOMzrYfFJ7Lx3Xm5eOq3ZUql47rR0/FGlG+ru1gf6+k0BjbDRRR7I//lV/b9AbPx7TVrdDPe58bXU7/sr15737Yqnq7Yuan5neIyKRoDEomnfWrizSW/XaVl2gHpfjXix/y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GltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjEyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz5sInMIAAAAIGNIUk0AAHolAACAgwAA+f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Nw5lW6mqqn3dh4cSiaT1orJpbBajaoegmA1GVHgdkJKSegKR8Z8Cng0inIZQ0NxFukbgN5g0JtNeuv8eTPMwWAIJ+vbBixWk2Iym1B/ugWrH/sRnlj71D9q14/FuP5DaVfS0NBQ9b21j7+Tjg/OuXv5IrQHe5CUJEQGoqieVoZAsAct3cP7X3rppSfnzp17TLt+LCjKFSiKoovH49a6urrZX3zxxcydO3feVVpaGjSZTGmj0Sht3Ljx+9o1+UBROESvKRyiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKByiKBz6X15rejmpXenZAAAAAElFTkSuQmCC",rl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAADUCAYAAACh36CaAAAACXBIWXMAAA7EAAAOxAGVKw4bAAA4HGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4KPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS41LWMwMjEgNzkuMTU0OTExLCAyMDEzLzEwLzI5LTExOjQ3OjE2ICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICA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2MDAwMC8xMDAwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+OTYwMDAwLzEwMDAwPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjY1NTM1PC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xNDE8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjEyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz7RAlCYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAA4VSURBVHja7N1peM133sfxTyyxr6XauEvV6KK01blv2g4duigdraXbRamqKkNraN3VqtYWWjVKpZZBbJkoSU72REQWiUS2k1WQiMi+nGxIIijJZx5Ezi0kabjnyTif33W9H3ia6+V//svv//2DJJS6k/RHUEKjhEYJjRIaJTRKCY0SGiU0SmiU0CglNEpolNAooVFCo5TQKKFRQqOERgmNEhr9EZTQKKFRQqOERgmNUkKjhEYJjRIaJTRKCY0SGiU0SmiU0CglNEpolNAooVFCo4RGKaFRQqOERgmNEhqlhEYJjRIaJTRKaJQSGiU0SmiU0CihUUpolNAooVFCo4RGCY1SQqOERgmNEholNEoJjRIaJTRKaJTQKCU0SmiU0CihUUKjlNAooVFCo4RGCY0SGqWERgmNEholNEpoLO4P0chq2aIFWrSwQof2bdG1S0f47f8J1ZlByDe6IMdogMnoApPRgKIT3ig64T340f59RuMultBYEJoiowsKjQYUJnqOLU897Pj0k384JDRC0yiaXKPBOt9omJtrdE3JjXUjiyI4ecIrBDBAaIQGHTu0RYf2beG9bx1qsoKRZzQsyjG6ZmUbXZltdGWO0ZU8H8Mfl84lgPeFxsLRWFmZ/9kiyHnTJ1czg0/m3IByc9W5x+jnuJ4ANgiNBaOpW70f6DnRafvKU6UnfZkf786G0JSnHObZ8APs1rXzMaGxbDT/NXvq+P158R5kWQzz492ZFe3SIBpTkh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2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz40H0NbAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAmNSURBVHja7N1pdFT1GcfxJ4IEEDyALO5LQDTUY92rtZS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yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjk2MDAwMC8xMDAwMDwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+OTYwMDAwLzEwMDAwPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8ZXhpZjpDb2xvclNwYWNlPjY1NTM1PC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xNDE8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjEyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz5sHDDvAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAA5iSURBVHja7N15VNT1/sfxtyxuuKfmcjNLM9NrWt2k7JjeSq2sW2l60ptWLmkuSWWW/XDJtesuKtclLME1YUDQkU1UUGCYGRaRTUBg2AeQRVDceP3+YFFkWKt7Tnxfn3Oe/3nmeDiP853v5/v9fD4jAISxxsQ/AiMaRjSMaBjRMKJhjGgY0TCiYUTDiIYxomFEw4iGEQ0jGsaIhhENIxpGNIxoGNHwj8CIhhENIxpGNIxoGCMaRjSMaBjRMKJhjGgY0TCiYUTDiIYxomFEw4iGEQ0jGkY0jBENIxpGNIxoGNEwRjSMaBjRMKJhRMMY0TCiYUTDiIYRDWNEw4iGEQ0jGkY0jGgYIxpGNIxoGNEwomGMaBjRMKJhRMOIhjGiYUTDiIYRDSMaxoiGEQ0jGkY0jGgY0TBGNIxoGNEwomFE8z//jzRtdJ4xZfxEGAO7pulUYtC7SKpOJalaF0nVqgTZF2XrygUiImJhbiYtW1qIublZrR9GEMpAM2zRrElXYAzalqZTDSQaomnIWLB3wxIgR4NUnQqpOtXFVJ3L60RDNLUOczOzg8En9+JW8tlKNJVFGrQuryE7UDavmF+BxpxoiEakX9/eocbIk8i9fOphNEjVqQBjkN/mFfNHVP77Nq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ICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4xNDE8L2V4aWY6UGl4ZWxYRGltZW5zaW9uPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjEyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgIC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fuUAxCi+2Yed7LLX3vv5/0nYvfVPDCdgoCZV8rHZONDZ4bb33oahB7ldx6NoSBwl8/6SXHVvB+Y72Mdc1Ew/rG8UNsrWw1NO6o3DQ0QeEvrf1lUs+g75vumAyajAADVVXfwo9e2GrnEAvN9h0MBFAXqf+WpXXyF+b7pgo19ykEQXkyUzzr2dCrZ+4/kz8bpr3lwOgcBy6+U/XQlUzvc+vIHuqb4DrePoQBkd8WzgZmrzjLfN90w+0rZj5ccvSWNK774af9TQZvd3RJoWnm2+fbpiPkoACC5Aq/6q5uvMQ4RRiOc7mtYfh4I+WwzLBg3LaIAgLNs5m0OX9XD5o0tBUFZ7aJvCbKb2SlDR4r5fcrHUUOXE8G2H+SToZOpodsJbxtxltTe5/TX3mceO51Nqyj/X0ybzdf/J1YUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGGRFYZAVhUFWFAZZURhkRWGQFYVBVhQGWVEYZEVhkBWFQVYUBllRGPR/A9LPIYPjR/AAAAAASUVORK5CYII=",sl=Object.freeze([{key:"head",label:"H:"},{key:"torso",label:"T:"},{key:"leftarm",label:"LA:"},{key:"rightarm",label:"RA:"},{key:"leftleg",label:"LL:"},{key:"rightleg",label:"RL:"}]),normalizeValue=e=>{const t=Number(e);return Number.isFinite(t)?`${Math.round(t)}`:"0"},ll=Yn.default.shape({head:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired,torso:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired,leftarm:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired,rightarm:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired,leftleg:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired,rightleg:Yn.default.oneOfType([Yn.default.number,Yn.default.string]).isRequired}),LimbColumnComponent=({values:e})=>React.createElement(Wn,{"aria-hidden":"true",className:"nexus-man__limb-column",sx:{color:"text.primary",display:"flex",flexDirection:"column",fontSize:13,lineHeight:1.5,minWidth:"8ch",width:"8ch"}},sl.map(({key:t,label:g})=>React.createElement(Wn,{className:`nexus-man__limb-row nexus-man__limb-row--${t}`,key:t,sx:{display:"flex",justifyContent:"space-between",width:"8ch"}},React.createElement(qn,{component:"span",sx:{color:"text.primary",fontFamily:"inherit",fontSize:"inherit",width:"3ch"}},g),React.createElement(qn,{component:"span",sx:{color:"text.primary",fontFamily:"inherit",fontSize:"inherit",textAlign:"left",width:"5ch"}},normalizeValue(e[t])))));LimbColumnComponent.displayName="LimbColumn",LimbColumnComponent.propTypes={values:ll.isRequired};var cl=(0,l.memo)(LimbColumnComponent);cl.displayName="LimbColumn",cl.propTypes=LimbColumnComponent.propTypes;var ul=Object.freeze({male:Object.freeze({head:el,torso:il,leftarm:gl,rightarm:Cl,leftleg:nl,rightleg:Il}),female:Object.freeze({head:$s,torso:al,leftarm:tl,rightarm:Al,leftleg:rl,rightleg:ol})}),dl=Object.freeze([{key:"leftleg",label:"left leg"},{key:"rightleg",label:"right leg"},{key:"torso",label:"torso"},{key:"head",label:"head"},{key:"leftarm",label:"left arm"},{key:"rightarm",label:"right arm"}]),pl=Yn.default.shape({percent:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),value:Yn.default.oneOfType([Yn.default.number,Yn.default.string]),damagePercent:Yn.default.oneOfType([Yn.default.number,Yn.default.string])}),normalizeGender=e=>"string"==typeof e&&"female"===e.trim().toLowerCase()?"female":"male",normalizeAfflictions=e=>Array.isArray(e)?e.map(e=>"string"==typeof e?e.trim().toLowerCase():`${e??""}`.trim().toLowerCase()).filter(e=>e.length>0):[],toNumericValue=e=>{const t=Number(e);return Number.isFinite(t)?t:0},getLimbEntry=(e,t)=>{const g=[t];"leftarm"===t?g.push("leftArm"):"rightarm"===t?g.push("rightArm"):"leftleg"===t?g.push("leftLeg"):"rightleg"===t&&g.push("rightLeg");for(const n of g)if(e?.[n])return e[n];return{}},buildLimbValues=e=>({head:toNumericValue(getLimbEntry(e,"head").percent??getLimbEntry(e,"head").value),torso:toNumericValue(getLimbEntry(e,"torso").percent??getLimbEntry(e,"torso").value),leftarm:toNumericValue(getLimbEntry(e,"leftarm").percent??getLimbEntry(e,"leftarm").value),rightarm:toNumericValue(getLimbEntry(e,"rightarm").percent??getLimbEntry(e,"rightarm").value),leftleg:toNumericValue(getLimbEntry(e,"leftleg").percent??getLimbEntry(e,"leftleg").value),rightleg:toNumericValue(getLimbEntry(e,"rightleg").percent??getLimbEntry(e,"rightleg").value)}),getLimbState=(e,t)=>{if("torso"===t){if(e.includes("mildtrauma"))return"mild-trauma";if(e.includes("serioustrauma"))return"serious-trauma"}return e.includes(`broken${t}`)?"broken":e.includes(`damaged${t}`)?"damaged":e.includes(`mangled${t}`)?"mangled":"healthy"},getFilterReference=(e,t)=>"broken"===e?`url(#${t.yellow})`:"damaged"===e||"mild-trauma"===e?`url(#${t.orange})`:"mangled"===e||"serious-trauma"===e?`url(#${t.red})`:"",NexusManComponent=({currentAffs:e=[],gender:t="male",limbs:g={}})=>{const n=(0,l.useId)().replace(/[:]/g,""),C={yellow:`${n}-yellowShift`,orange:`${n}-orangeShift`,red:`${n}-redShift`},o=normalizeGender(t),I=ul[o],a=normalizeAfflictions(e),i=buildLimbValues(g);return React.createElement(Wn,{"aria-label":"NexusMan body status display",className:"nexus-man","data-gender":o,role:"img",sx:{alignItems:"center",display:"flex",flexDirection:"row",gap:1,justifyContent:"center",width:"100%"}},React.createElement("svg",{"aria-hidden":"true",height:"0",width:"0"},React.createElement("defs",null,React.createElement("filter",{id:C.yellow},React.createElement("feColorMatrix",{type:"matrix",values:"1 0 0 0 0\n 0 1 0 0 0\n 0 0 0 0 0\n 0 0 0 1 0"})),React.createElement("filter",{id:C.orange},React.createElement("feColorMatrix",{type:"matrix",values:"1 1 0 0 0\n 0 0.45 0 0 0\n 0 0 0 0 0\n 0 0 0 1 0"})),React.createElement("filter",{id:C.red},React.createElement("feColorMatrix",{type:"matrix",values:"1 0 0 0 0\n 0 0 0 0 0\n 0 0 0 0 0\n 0 0 0 1 0"})))),React.createElement(Wn,{className:"nexus-man__figure",sx:{flex:"1 1 auto",height:"100%",maxWidth:"202px",minHeight:"120px",overflow:"hidden",position:"relative",width:"100%"}},dl.map(({key:e,label:t})=>{const g=getLimbState(a,e),n=getFilterReference(g,C);return React.createElement(Wn,{alt:"","aria-hidden":"true",className:`nexus-man__layer nexus-man__layer--${e}`,component:"img","data-damage-state":g,"data-limb":e,key:e,src:I[e],sx:{filter:n,height:"100%",left:0,objectFit:"contain",position:"absolute",top:0,width:"100%"},title:t})})),React.createElement(cl,{values:i}))};NexusManComponent.displayName="NexusMan",NexusManComponent.propTypes={currentAffs:Yn.default.arrayOf(Yn.default.string),gender:Yn.default.oneOf(["male","female"]),limbs:Yn.default.objectOf(pl)};var ml=(0,l.memo)(NexusManComponent);ml.displayName="NexusMan",ml.propTypes=NexusManComponent.propTypes;var fl=Object.freeze(["hp","mp","ep","wp","nl"]),clamp$1=(e,t,g)=>Math.min(g,Math.max(t,e)),normalizeNumber$2=e=>{const t=Number(e);return Number.isFinite(t)?t:0},formatNumber=e=>normalizeNumber$2(e).toLocaleString(),getBaseColor=(e,t)=>e?.palette?.[t]?.main??e?.nexGui?.tokens?.game?.[t]??Bt.game[t],getPercentage=(e,t)=>{const g=normalizeNumber$2(e),n=normalizeNumber$2(t);return n<=0?0:clamp$1(g/n*100,0,100)},getHpColor=e=>e<=25?"#d9534f":e<=50?"#d9832e":e<=75?"#b7b33d":"#2fa35a",getGaugeColor=(e,t,g)=>"hp"===t?getHpColor(g):getBaseColor(e,t),StatBarComponent=({type:e,current:t,max:g,label:n=e.toUpperCase()})=>{const C=useTheme$1(),o=normalizeNumber$2(t),I=normalizeNumber$2(g),a=getPercentage(o,I),i=getGaugeColor(C,e,a),s=`${Math.round(a)}%`;return React.createElement(Wn,{className:`stat-bar stat-bar--${e}`,sx:{minWidth:0,width:"100%"}},React.createElement(Wn,{"aria-label":n,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":Math.round(a),className:`stat-bar__progress stat-bar__progress--${e}`,role:"progressbar",sx:{backgroundColor:alpha(i,.14),border:`1px solid ${alpha(i,.48)}`,borderRadius:1,minHeight:22,overflow:"hidden",position:"relative",width:"100%"}},React.createElement(Wn,{"aria-hidden":"true",sx:{backgroundColor:i,bottom:0,left:0,opacity:.68,position:"absolute",top:0,transition:"width 180ms ease",width:`${a}%`}}),React.createElement(Wn,{sx:{alignItems:"center",color:"text.primary",display:"flex",gap:1,justifyContent:"space-between",minHeight:22,px:.75,position:"relative",zIndex:1}},React.createElement(qn,{component:"span",sx:{color:"text.primary",fontSize:11,fontWeight:700,letterSpacing:.5,textTransform:"uppercase"}},n),React.createElement(qn,{component:"span",sx:{color:"text.primary",fontSize:11,fontVariantNumeric:"tabular-nums",textShadow:"0 0 3px rgba(0, 0, 0, 0.85)"}},formatNumber(o)," / ",formatNumber(I)," (",s,")"))))};StatBarComponent.displayName="StatBar",StatBarComponent.propTypes={current:Yn.default.number.isRequired,label:Yn.default.string,max:Yn.default.number.isRequired,type:Yn.default.oneOf(fl).isRequired};var hl=(0,l.memo)(StatBarComponent);hl.displayName="StatBar",hl.propTypes=StatBarComponent.propTypes;var selectStatsSlice=e=>({hp:e.hp,mp:e.mp,ep:e.ep,wp:e.wp,nl:e.nl,gold:e.gold,bank:e.bank,xp:e.xp,xpToNext:e.xpToNext,target:e.target,updateStats:e.updateStats}),useStats=()=>{const{stores:e}=useNexGui();return e.stats(useShallow(selectStatsSlice))},yl=Object.freeze([{type:"hp",label:"HP"},{type:"mp",label:"MP"},{type:"ep",label:"EP"},{type:"wp",label:"WP"},{type:"nl",label:"NL"}]),getFlipTransform$2=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},Indicator=({className:e,label:t,ready:g})=>React.createElement(Wn,{className:e,sx:{alignItems:"center",backgroundColor:g?"rgba(18, 42, 26, 0.82)":"rgba(24, 24, 24, 0.82)",border:"1px solid",borderColor:g?"rgba(102, 221, 144, 0.7)":"rgba(192, 176, 144, 0.22)",borderRadius:999,color:g?"#66dd90":"text.disabled",display:"inline-flex",gap:.5,px:1,py:.25}},React.createElement(Wn,{"aria-hidden":"true",sx:{backgroundColor:g?"#66dd90":"rgba(192, 176, 144, 0.35)",borderRadius:"50%",boxShadow:g?"0 0 8px rgba(102, 221, 144, 0.5)":"none",flexShrink:0,height:6,width:6}}),React.createElement(qn,{component:"span",sx:{color:"inherit",fontSize:11,fontWeight:700,letterSpacing:.5,textTransform:"uppercase"}},t)),StatsPanelInner=()=>{const e=useTheme$1(),[t]=(0,l.useState)(()=>Math.floor(4*Math.random())),{hp:g,mp:n,ep:C,wp:o,nl:I}=useStats(),{balance:a,currentAffs:i,equilibrium:s,gender:c,limbs:u}=useCharacter(),d=e?.nexGui?.backgroundImage??"",p=e?.nexGui?.backgroundOpacity??.5,m=e?.nexGui?.backgroundFilter??"none";return React.createElement(Wn,{className:"stats-panel",sx:{height:"100%",overflow:"hidden",position:"relative",width:"100%"}},d?React.createElement(Wn,{"aria-hidden":"true",className:"stats-panel__background",sx:{backgroundImage:`url(${d})`,backgroundPosition:"center",backgroundSize:"cover",filter:m,inset:0,opacity:p,position:"absolute",transform:getFlipTransform$2(t),zIndex:0}}):null,React.createElement(Wn,{className:"stats-panel__content",sx:{background:`linear-gradient(180deg, ${alpha("#050505",.3)} 0%, ${alpha("#050505",.55)} 100%)`,display:"flex",flexDirection:"column",gap:1,height:"100%",p:1,position:"relative",width:"100%",zIndex:1}},React.createElement(Wn,{className:"stats-panel__body",sx:{alignItems:"center",display:"flex",justifyContent:"center",minHeight:120}},React.createElement(ml,{currentAffs:i,gender:c??"male",limbs:u})),React.createElement(Wn,{className:"stats-panel__indicators",sx:{display:"flex",gap:1,justifyContent:"center"}},React.createElement(Indicator,{className:"stats-panel__balance stats-panel__balance--"+(a?"ready":"waiting"),label:"Balance",ready:a}),React.createElement(Indicator,{className:"stats-panel__equilibrium stats-panel__equilibrium--"+(s?"ready":"waiting"),label:"Equilibrium",ready:s})),React.createElement(Wn,{className:"stats-panel__bars",sx:{display:"flex",flex:"1 1 auto",flexDirection:"column",gap:.75,justifyContent:"flex-end"}},yl.map(({type:e,label:t})=>{const a={hp:g,mp:n,ep:C,wp:o,nl:I}[e]??{current:0,max:0};return React.createElement(hl,{current:a.current??0,key:e,label:t,max:a.max??0,type:e})}))))};Indicator.displayName="StatsPanelIndicator",Indicator.propTypes={className:Yn.default.string.isRequired,label:Yn.default.string.isRequired,ready:Yn.default.bool.isRequired},StatsPanelInner.displayName="StatsPanelInner";var StatsPanel=()=>React.createElement(Jn,{panelName:"Stats"},React.createElement(StatsPanelInner,null));StatsPanel.displayName="StatsPanel";var SystemStreamInner=()=>{const{adapter:e,stores:t}=useNexGui(),{items:g,version:n}=useTranscript(t.systemStream),C=(0,l.useCallback)(t=>e.send(t),[e]);return React.createElement(pA,{itemKeyVersion:n,items:g,onSendCommand:C})};SystemStreamInner.displayName="SystemStreamInner";var SystemStream=()=>React.createElement(Jn,{panelName:"System Stream"},React.createElement(SystemStreamInner,null));SystemStream.displayName="SystemStream";var getFlipTransform$1=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},TargetPanelInner=()=>{const e=useTheme$1(),[t]=(0,l.useState)(()=>Math.floor(4*Math.random())),g=e?.nexGui?.backgroundImage??"",n=e?.nexGui?.backgroundOpacity??.5,C=e?.nexGui?.backgroundFilter??"none";return React.createElement(Wn,{className:"target-panel",sx:{height:"100%",overflow:"hidden",position:"relative",width:"100%"}},g?React.createElement(Wn,{"aria-hidden":"true",className:"target-panel__background",sx:{backgroundImage:`url(${g})`,backgroundPosition:"center",backgroundSize:"cover",filter:C,inset:0,opacity:n,position:"absolute",transform:getFlipTransform$1(t),zIndex:0}}):null,React.createElement(Wn,{className:"target-panel__content",sx:{background:`linear-gradient(180deg, ${alpha("#050505",.18)} 0%, ${alpha("#050505",.36)} 100%)`,display:"flex",flexDirection:"column",height:"100%",minHeight:0,position:"relative",width:"100%",zIndex:1}},React.createElement(Wn,{className:"target-panel__body",sx:{alignItems:"center",display:"flex",flex:1,justifyContent:"center",minHeight:0,p:1}},React.createElement(ml,{currentAffs:[],gender:"male",limbs:{}}))))};TargetPanelInner.displayName="TargetPanelInner";var TargetPanel=()=>React.createElement(Jn,{panelName:"Target"},React.createElement(TargetPanelInner,null));TargetPanel.displayName="TargetPanel";var clamp=(e,t,g)=>Math.min(g,Math.max(t,e)),normalizeNumber$1=e=>{const t=Number(e);return Number.isFinite(t)?t:0},normalizeDirection=(e,t)=>"countup"===e||!1===t?"countup":"countdown",getElapsedMs=(e,t)=>Math.max(0,normalizeNumber$1(t)-normalizeNumber$1(e)),getElapsedPercentage=(e,t)=>{const g=Math.max(0,Math.abs(normalizeNumber$1(t)));return g<=0?100:clamp(e/g*100,0,100)},formatTimerValue=e=>{const t=Math.max(0,normalizeNumber$1(e))/1e3;return t<10?`${t.toFixed(1)}s`:t<=60?`${t.toFixed(0)}s`:`${Math.floor(t/60)}m ${(t%60).toFixed(0)}s`},hslToHex=(e,t=100,g=50)=>{const n=g/100,k=t=>(t+e/30)%12,C=t/100*Math.min(n,1-n),f=e=>n-C*Math.max(-1,Math.min(k(e)-3,Math.min(9-k(e),1)));return"#"+[f(0),f(8),f(4)].map(e=>Math.round(255*e).toString(16).padStart(2,"0")).join("")},getGradientColor=e=>hslToHex(1.2*clamp(normalizeNumber$1(e),0,100),100,e<75?50:Math.abs(e-100)/2+25),getProgressValue=(e,t,g)=>{const n=getElapsedPercentage(e,t);return"countup"===g?n:clamp(100-n,0,100)},TimerBarComponent=({id:e,label:t,durationMs:g,startedAt:n,elapsedMs:C=0,now:o,tickIntervalMs:I,running:a=!0,direction:i="countdown",countDown:s})=>{const l=useTheme$1(),c=Math.max(0,Math.abs(normalizeNumber$1(g))),u=normalizeDirection(i,s),d=clamp(!1!==a&&null!=n?getElapsedMs(n,o):normalizeNumber$1(C),0,c),p=getProgressValue(d,c,u),m=formatTimerValue(c-d),h=t?.trim()||e,y=getGradientColor(p),b=Math.max(22,normalizeNumber$1(l?.typography?.fontSize)+10),v=`${h} (${m})`,x=Math.max(0,normalizeNumber$1(I)),S=0===p||100===p?"none":`transform ${x}ms linear, background-color ${x}ms linear`;return React.createElement(Wn,{className:`timer-bar timer-bar--${u}`,"data-timer-id":e,sx:{border:"1.5px solid #aaa",borderRadius:"6px",fontSize:l.typography.fontSize,margin:"3px 0",overflow:"hidden",position:"relative",width:"100%"}},React.createElement(Va,{"aria-label":h,"aria-valuetext":v,className:`timer-bar__progress timer-bar__progress--${u}`,sx:{backgroundColor:"transparent",height:b,"& .MuiLinearProgress-bar":{backgroundColor:y,borderRadius:"4px",transition:S}},value:p,variant:"determinate"}),React.createElement(Wn,{sx:{alignItems:"center",color:"#FFF5D6",display:"flex",inset:0,px:1.25,pointerEvents:"none",position:"absolute"}},React.createElement(qn,{component:"span",sx:{color:"inherit",fontSize:"inherit",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",textShadow:"-1px -1px 1px #000, 1px -1px 1px #000, -1px 1px 1px #000, 1px 1px 1px #000",whiteSpace:"nowrap"},variant:"body2"},v)))};TimerBarComponent.displayName="TimerBar",TimerBarComponent.propTypes={countDown:Yn.default.bool,direction:Yn.default.oneOf(["countup","countdown"]),durationMs:Yn.default.number.isRequired,elapsedMs:Yn.default.number,id:Yn.default.string.isRequired,label:Yn.default.string.isRequired,now:Yn.default.number.isRequired,running:Yn.default.bool,startedAt:Yn.default.number,tickIntervalMs:Yn.default.number.isRequired};var bl=(0,l.memo)(TimerBarComponent);bl.displayName="TimerBar",bl.propTypes=TimerBarComponent.propTypes;var vl=[],normalizeNumber=e=>{const t=Number(e);return Number.isFinite(t)?t:0},isRunningTimer=e=>!1!==e?.running&&null!=e?.startedAt,getRemainingMs=(e,t)=>{const g=Math.max(0,Math.abs(normalizeNumber(e.durationMs))),n=Math.max(0,normalizeNumber(t)-normalizeNumber(e.startedAt));return Math.max(0,g-n)},getClockState=(e,t)=>{let g=1/0,n=!1;for(const C of e??[])isRunningTimer(C)&&(n=!0,g=Math.min(g,getRemainingMs(C,t)));return{isTicking:n,tickIntervalMs:n&&g<1e4?100:500}},useTimerClock=(e=vl)=>{const[t,g]=(0,l.useState)(()=>Date.now()),{isTicking:n,tickIntervalMs:C}=(0,l.useMemo)(()=>getClockState(e,t),[t,e]);return(0,l.useEffect)(()=>{if(!n)return;const tick=()=>g(Date.now());tick();const e=setInterval(tick,C);return()=>clearInterval(e)},[n,C]),(0,l.useMemo)(()=>({now:t,tickIntervalMs:C,isTicking:n}),[n,t,C])},selectTimerView=({id:e,durationMs:t,startedAt:g,label:n,direction:C,position:o,stayVisible:I,enabled:a,running:i,elapsedMs:s,remainingMs:l})=>({id:e,durationMs:t,startedAt:g,label:n,direction:C,position:o,stayVisible:I,enabled:a,running:i,elapsedMs:s,remainingMs:l}),selectTimersSlice=e=>({timerEntries:e.timers,addTimer:e.addTimer,removeTimer:e.removeTimer,clearAll:e.clearAll}),useTimers=()=>{const{stores:e}=useNexGui(),{timerEntries:t,addTimer:g,removeTimer:n,clearAll:C}=e.timers(useShallow(selectTimersSlice)),o=(0,l.useMemo)(()=>t.map(selectTimerView),[t]);return(0,l.useMemo)(()=>({timers:o,addTimer:g,removeTimer:n,clearAll:C}),[g,C,n,o])},getFlipTransform=e=>{switch(e){case 1:return"scaleX(-1) scaleY(-1)";case 2:return"scaleY(-1)";case 3:return"scaleX(-1)";default:return"none"}},normalizePosition=e=>"bottom"===e?"bottom":"top",partitionTimers=e=>e.reduce((e,t)=>(e[normalizePosition(t.position)].push(t),e),{top:[],bottom:[]}),TimersPanelInner=()=>{const e=useTheme$1(),{timers:t}=useTimers(),[g]=(0,l.useState)(()=>Math.floor(4*Math.random())),n=e?.nexGui?.backgroundImage??"",C=e?.nexGui?.backgroundOpacity??.5,o=e?.nexGui?.backgroundFilter??"none",{now:I,tickIntervalMs:a}=useTimerClock(t),{top:i,bottom:s}=(0,l.useMemo)(()=>partitionTimers(t),[t]);return React.createElement(Wn,{className:"timers-panel",sx:{color:"text.primary",fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize,height:"100%",overflow:"hidden",position:"relative",width:"100%"}},n?React.createElement(Wn,{"aria-hidden":"true",className:"timers-panel__background",sx:{backgroundImage:`url(${n})`,backgroundPosition:"center",backgroundSize:"cover",filter:o,inset:0,opacity:C,position:"absolute",transform:getFlipTransform(g),zIndex:0}}):null,React.createElement(Wn,{className:"timers-panel__content","data-testid":"timers-panel",sx:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between",overflowY:"auto",p:1,position:"relative",width:"100%",zIndex:1}},React.createElement(Wn,{className:"timers-panel__stack timers-panel__stack--top","data-testid":"timers-panel-top",sx:{display:"flex",flexDirection:"column"}},i.map(e=>React.createElement(bl,{key:e.id,countDown:e.countDown,direction:e.direction,durationMs:e.durationMs,elapsedMs:e.elapsedMs,id:e.id,label:e.label,now:I,running:e.running,startedAt:e.startedAt,tickIntervalMs:a}))),React.createElement(Wn,{className:"timers-panel__stack timers-panel__stack--bottom","data-testid":"timers-panel-bottom",sx:{display:"flex",flexDirection:"column"}},s.map(e=>React.createElement(bl,{key:e.id,countDown:e.countDown,direction:e.direction,durationMs:e.durationMs,elapsedMs:e.elapsedMs,id:e.id,label:e.label,now:I,running:e.running,startedAt:e.startedAt,tickIntervalMs:a})))))};TimersPanelInner.displayName="TimersPanelInner";var TimersPanel=()=>React.createElement(Jn,{panelName:"Timers"},React.createElement(TimersPanelInner,null));TimersPanel.displayName="TimersPanel";var xl=Object.freeze(["nexTimers","nexParty","nexPlayers","nexNpcs","nexItems","nexStats","nexSystem","nexCombat","nexDefences","nexFeed","nexTarget","nexOptions","nexMetrics"]),getTabComponents=()=>({nexTimers:TimersPanel,nexParty:PartyPanel,nexPlayers:PlayersPanel,nexNpcs:NpcsPanel,nexItems:ItemsPanel,nexStats:StatsPanel,nexSystem:SystemStream,nexCombat:CombatStream,nexDefences:DefencesPanel,nexFeed:GameFeed,nexTarget:TargetPanel,nexOptions:OptionsPanel,nexMetrics:MetricsPanel}),getLayout$1=()=>nexusclient.ui().layout(),getStoredLayout=e=>nexusclient._ui?._layout??e,createTabNode=e=>({type:"tab",id:e,name:e,component:e,icon:"feather-pointed",helpText:e}),resolveContextValue=e=>{const t=e??globalThis.nexGui?.__contextValue;if(!t)throw new Error("[nexGui4] initializeTabs requires a NexGuiContext value from the active runtime.");return t},selectThemeTokens=e=>e.tokens,NexusTabRoot=({Component:e,contextValue:t})=>{const g=t.stores.theme(selectThemeTokens),n=l.useMemo(()=>createMuiTheme(g),[g]);return l.createElement(_t.Provider,{value:t},l.createElement(StyledEngineProvider,{injectFirst:!0},l.createElement(ThemeProvider,{theme:n},l.createElement(Wn,{className:"nexgui4-panel-root",sx:{display:"flex",flex:1,height:"100%",minHeight:0,minWidth:0,width:"100%"}},l.createElement(e)))))},registerTabFactory=(e,t,g,n)=>{e.nexoverrides[t]=e=>l.createElement(NexusTabRoot,{Component:g,contextValue:n})},generateTabs=({skipIds:e=[]}={})=>{const t=getLayout$1().flexModel,g=t.getNodeById("map");if(!g)return console.warn("[nexGui4] generateTabs(): map node not found in layout model."),[...xl];const n=g.getParent?.()?.getId?.()||"root";return xl.forEach(g=>{e.includes(g)||t.getNodeById(g)||t.doAction({type:"FlexLayout_AddNode",data:{json:createTabNode(g),toNode:n,location:"center"}})}),[...xl]},mountNativeDisplay=({contextValue:e}={})=>{const t=resolveContextValue(e),g=getLayout$1();void 0===g.nexoverrides&&(g.nexoverrides={}),g.nexoverrides.output_main=e=>l.createElement(NexusTabRoot,{Component:MainDisplay,contextValue:t});try{nexusclient.buffer().limit=100}catch{}},unmountNativeDisplay=()=>{const e=getLayout$1();delete e?.nexoverrides?.output_main;try{nexusclient.buffer().limit=0}catch{}},initializeTabs=({contextValue:e}={})=>{const t=resolveContextValue(e),g=getLayout$1(),n=getStoredLayout(g),C=g.flexModel;return void 0===g.get_tab_object_original&&(g.get_tab_object_original=g.get_tab_object),void 0===n.get_tab_object_original&&(n.get_tab_object_original=g.get_tab_object_original),void 0===g.nexoverrides&&(g.nexoverrides={}),Object.entries(getTabComponents()).forEach(([e,n])=>{registerTabFactory(g,e,n,t)}),g.get_tab_object=function(e,t){return this.nexoverrides[e]?this.nexoverrides[e](t):nexusclient._ui._layout.get_tab_object_original(e,t)},C.doAction({data:{tabNode:"map"},type:"FlexLayout_SelectTab"}),g.nexoverrides},Sl="nexGuiLayout",getLayout=()=>nexusclient.ui().layout(),setModelPreservingGlobal=({layout:e,borders:t})=>{const g=getLayout(),n=g.flexModel.toJson();g.set_model({global:n.global,borders:t,layout:e})},applyLayoutPreset=e=>{const t=getLayoutPreset(e);return!!t&&(setModelPreservingGlobal(t),!0)},saveCurrentLayout=()=>{const e=getLayout().model();return nexusclient.variables().vars[Sl]={layout:JSON.stringify(e.layout),borders:JSON.stringify(e.borders)},!0},readSavedLayout=()=>{const e=nexusclient.variables?.()?.vars?.[Sl];if(!e?.layout||!e?.borders)return null;try{return{layout:JSON.parse(e.layout),borders:JSON.parse(e.borders)}}catch{return null}},hasSavedLayout=()=>null!==readSavedLayout(),restoreSavedLayout=()=>{const e=readSavedLayout();return!!e&&(setModelPreservingGlobal(e),!0)},getRawText=e=>e?"function"==typeof e.parsed_line?.text?e.parsed_line.text():"string"==typeof e.line?e.line:"":"",getFormattedHtml=e=>e?"function"==typeof e.parsed_line?.formatted?e.parsed_line.formatted():getRawText(e):"",patchFormatted=(e,t)=>{e?.parsed_line&&"object"==typeof e.parsed_line&&(e.parsed_line.formatted=()=>t)},createIconRenderer=()=>{const e=createMessageReplacementContext();return t=>buildIconHtml(t.id,t.colors,t.size,e.icons.dualTone)},lineContains=(e,t)=>!!getRawText(e).includes(t)||!("string"!=typeof e?.line||!e.line.includes(t)),findBlockIndex=(e,t)=>e.findIndex(e=>lineContains(e,t)),applyRoomReplacements=e=>{if(!Array.isArray(e)||0===e.length)return;const t=findBlockIndex(e,"<RName");if(t<0)return;const g=e[t],n=e[t+1];if(!n)return;const C=getFormattedHtml(n),o=replaceRoomText(C,{iconRenderer:createIconRenderer()});if(o!==C&&patchFormatted(n,o),(getRawText(g)||getFormattedHtml(g)).includes("Flying above"))return;const I=globalThis.nexMap;if(!I?.status?.loaded)return;const a=findBlockIndex(e,"<RExits");if(a<0)return;const i=globalThis.GMCP?.Room?.Info?.num;if(!i)return;const s="function"==typeof I.warpTarget?I.warpTarget(i):null;if(!s)return;const l=createWormholeExitDescriptor({warp:s,currentArea:I.status?.currentArea});if(!l)return;const c=e[a];let u=getFormattedHtml(c);u=u.replace(" and",""),u=u.replace(".",renderWormholeExitHtml(l)),patchFormatted(c,u)},registerEvents=e=>{const t=[];return((e,g,n={})=>{const C=`nexGui4-${e.replace(/\W+/g,"-")}`;eventStream.registerEvent(e,g,{...n,id:C,tags:["nexGui4"]}),t.push({eventName:e,id:C})})("Room.Info",e=>{nexAction.triggers.enable("nexGui4.roomReplacements")}),()=>{t.forEach(({eventName:e,id:t})=>{eventStream.removeListener?.(e,t)})}},safeCall$2=(e,t,...g)=>"function"==typeof e?e.call(t,...g):void 0,getHostLineText=e=>e&&"object"==typeof e?e.parsed_line?safeCall$2(e.parsed_line.text,e.parsed_line)??"":"string"==typeof e.line?e.line:e.html_line&&"string"==typeof e.html_text?stripHtml(e.html_text):"":"",isLikelyPartyName=e=>/^[A-Za-z][A-Za-z'-]*$/.test(e),normalizePartyMembersLine=e=>e.replace(/\.$/,"").split(", ").map(e=>e.trim()).filter(Boolean),extractRealmPartyMembers=(e,t)=>e.map(e=>t?.resolvePlayerNameFromFullname?.(e)).filter(isLikelyPartyName),resolvePlayerRelationships=e=>e?.playerRelationships??getDefaultPlayerRelationshipsModel(),registerTriggers=e=>{const t=resolvePlayerRelationships(e);return nexAction.triggers.add({id:"nexGui4.party.chatGag",regex:/^\(Party\): \w+ says, ".+"$/,tags:["nexGui4"],action:()=>{(e?.stores?.party?.getState?.()??null)?.settings?.gagChat&&(nexusclient.current_line.gag=!0)}}),nexAction.triggers.add({id:"nexGui4.party.memberJoined",regex:/^\(Party\): (\w+) has joined your party\.$/,tags:["nexGui4"],action:t=>{(e?.stores?.party?.getState?.()??null)?.addMember?.(t[1])}}),nexAction.triggers.add({id:"nexGui4.party.memberLeft",regex:/^\(Party\): (\w+) has left your party\.$/,tags:["nexGui4"],action:t=>{(e?.stores?.party?.getState?.()??null)?.removeMember?.(t[1])}}),nexAction.triggers.add({id:"nexGui4.party.listHeader",regex:"Your party has the following members:",tags:["nexGui4"],action:()=>{const t=e?.stores?.party?.getState?.()??null,g=nexusclient.current_block??[],n=g.indexOf(nexusclient.current_line);if(n<0)return;const C=g[n+2],o=getHostLineText(C);t?.updateParty?.(normalizePartyMembersLine(o))}}),nexAction.triggers.add({id:"nexGui4.party.realmsHeader",regex:"The following members of your party are in the realms:",tags:["nexGui4"],action:()=>{const t=e?.stores?.party?.getState?.()??null,g=nexusclient.current_block??[],n=g.indexOf(nexusclient.current_line);if(n<0)return;const C=g.slice(n+1).map(getHostLineText);t?.updateParty?.(extractRealmPartyMembers(C,e?.playerDirectory))}}),nexAction.triggers.add({id:"nexGui4.party.noParty",regex:"You are not the member of any party",tags:["nexGui4"],action:()=>{(e?.stores?.party?.getState?.()??null)?.updateParty?.([])}}),nexAction.triggers.add({id:"nexGui4.party.leftParty",regex:"You have left your party",tags:["nexGui4"],action:()=>{(e?.stores?.party?.getState?.()??null)?.updateParty?.([])}}),nexAction.triggers.add({id:"nexGui4.party.joinedParty",regex:/^You have joined \w+'s party\.$/,tags:["nexGui4"],action:()=>{e?.adapter?.send?.("party members")}}),nexAction.triggers.add({id:"nexGui4.rel.cityEnemiesHeader",regex:/^Enemies of .+ of \w+:$/,tags:["nexGui4"],action:()=>{const e=nexusclient.current_block??[],g=e.indexOf(nexusclient.current_line);if(g<0)return;const n=e[g+1],C=getHostLineText(n).replaceAll(" ","").split(",").map(e=>e.trim()).filter(isLikelyPartyName);t.replaceCityEnemyPlayers(C)}}),nexAction.triggers.add({id:"nexGui4.rel.enemiesHeader",regex:"You have the following enemies:",tags:["nexGui4"],action:()=>{const e=nexusclient.current_block??[],g=e.indexOf(nexusclient.current_line);if(g<0)return;const n=e.slice(g).map(getHostLineText),C=[];for(let t=1;t<n.length-1;t+=1){const e=n[t];e&&!e.includes(" ")&&C.push(e)}t.replaceEnemyPlayers(C.filter(isLikelyPartyName))}}),nexAction.triggers.add({id:"nexGui4.rel.noEnemies",regex:"You have no enemies.",tags:["nexGui4"],action:()=>{t.replaceEnemyPlayers([])}}),nexAction.triggers.add({id:"nexGui4.rel.noEnemiesForgive",regex:"In a moment of forgiveness, you declare that you have no enemies.",tags:["nexGui4"],action:()=>{t.replaceEnemyPlayers([])}}),nexAction.triggers.add({id:"nexGui4.rel.enemyRemoved",regex:/^You declare that (\w+) will no longer be one of your enemies\.$/,tags:["nexGui4"],action:e=>{t.forgetEnemyPlayer(e[1])}}),nexAction.triggers.add({id:"nexGui4.rel.enemyAdded",regex:/^(\w+) is now one of your enemies\.$/,tags:["nexGui4"],action:e=>{t.rememberEnemyPlayer(e[1])}}),nexAction.triggers.add({id:"nexGui4.rel.alliesHeader",regex:"You have the following allies:",tags:["nexGui4"],action:()=>{const e=nexusclient.current_block??[],g=e.indexOf(nexusclient.current_line);if(g<0)return;const n=e.slice(g).map(getHostLineText),C=[];for(let t=1;t<n.length-1;t+=1){const e=n[t];if(!e)continue;if(e.includes("You have"))break;let g;g=e.includes("lust")?e.split(" ")[7]?.trim():e.split(" ")[0]?.trim(),isLikelyPartyName(g)&&C.push(g)}t.replaceAllyPlayers(C)}}),nexAction.triggers.add({id:"nexGui4.rel.allyRemoved",regex:/^You declare that (\w+) will no longer be one of your allies\.$/,tags:["nexGui4"],action:e=>{t.forgetAllyPlayer(e[1])}}),nexAction.triggers.add({id:"nexGui4.rel.allyAdded",regex:/^(\w+) is now one of your allies\.$/,tags:["nexGui4"],action:e=>{t.rememberAllyPlayer(e[1])}}),nexAction.triggers.add({id:"nexGui4.roomReplacements",regex:/^/,tags:["nexGui4"],action:()=>{applyRoomReplacements(nexusclient.current_block??[]),nexAction.triggers.disable("nexGui4.roomReplacements")},enabled:!1}),()=>{nexAction.triggers.remove(["nexGui4"])}},wl="scrollback",El="__nexGuiInlineHighlightingContext",Rl="__nexGuiInitialHostBufferSynced",kl=null,Ml=null,getRuntime=()=>globalThis.nexGui??null,getContextValue=e=>e??getRuntime()?.__contextValue??null,getUiStoreState=e=>e?.stores?.ui?.getState?.()??null,getStreamModel=e=>e?.streamModel??e?.stores?.stream??null,getScrollbackSession=e=>e?.scrollbackSession??null,getUiSettings=e=>e?.persistenceStore?.getAll?.()?.ui??{},formatTimestamp=(e=!1,t=Date.now())=>{const g=new Date(t),n=String(g.getHours()).padStart(2,"0"),C=String(g.getMinutes()).padStart(2,"0"),o=String(g.getSeconds()).padStart(2,"0");return e?`${n}:${C}:${o}.${String(g.getMilliseconds()).padStart(3,"0")}`:`${n}:${C}:${o}`},safeCall$1=(e,t,...g)=>"function"==typeof e?e.call(t,...g):void 0,readRuntimeInlineHighlightingContext=e=>e?.[El]??e?.__contextValue??null,writeRuntimeInlineHighlightingContext=(e,t)=>{if(!e||"object"!=typeof e)return;const g=readRuntimeInlineHighlightingContext(e);Object.is(g,t)||(g&&g!==t&&clearRelationshipNameFormatterCache(g),Object.prototype.hasOwnProperty.call(e,El)?e[El]=t:Object.defineProperty(e,El,{value:t,writable:!0,enumerable:!1,configurable:!0}))},ensureRuntimeColors=e=>{const t=getRuntime();if(!t)return{inLineHighlighting:t=>applyContextInlineNameHighlighting(t,{contextValue:e})};if(writeRuntimeInlineHighlightingContext(t,e),t.colors&&"function"==typeof t.colors.inLineHighlighting)return t.colors;const g=Object.freeze({inLineHighlighting:e=>applyContextInlineNameHighlighting(e,{contextValue:readRuntimeInlineHighlightingContext(t)})});return Object.defineProperty(t,"colors",{value:g,enumerable:!1,configurable:!0}),g},toArray=e=>Array.isArray(e)?e:[],createExtraBreakLine=()=>({html:"<span> </span>",timestamp:Date.now(),isPrompt:!1,isMonospace:!1,shouldLog:!1,buffer:"main"}),getCurrentPromptHtml=e=>{const t=getStreamModel(e)?.getSnapshot?.()?.promptLine;return"string"==typeof t?.html?t.html:null},convertHostLine=(e,t="main",g=null)=>{if(!e||"object"!=typeof e)return null;if(e.html_line&&"string"==typeof e.html_text&&e.html_text.length>0)return e.gag?null:{html:e.html_text,timestamp:e.timestamp_ms,isPrompt:!1,isMonospace:!1,shouldLog:Boolean(e.log),buffer:t};if(!e.parsed_line)return null;const n=safeCall$1(e.parsed_line.text,e.parsed_line)??"";return!n.length||e.gag?null:(g?.inLineHighlighting(e.parsed_line),{html:safeCall$1(e.parsed_line.formatted,e.parsed_line)??n,timestamp:e.timestamp_ms,isPrompt:Boolean(e.is_prompt),isMonospace:Boolean(e.monospace),shouldLog:Boolean(e.log),buffer:t})},convertHostLines=(e,t,g=null,n=null)=>{const C=toArray(e);if(0===C.length)return[];const o=C.map(e=>convertHostLine(e,"main",g)).filter(Boolean);if(0===o.length)return[];if(!o.some(e=>!e.isPrompt)){const e=o[o.length-1];return e&&e.html!==n?o:[]}return t?[createExtraBreakLine(),...o]:o},appendConvertedLines=(e,t)=>{Array.isArray(t)&&0!==t.length&&getStreamModel(e)?.addLines?.(t)},hasInitialHostBufferSync=e=>Boolean(e?.[Rl]),markInitialHostBufferSynced=e=>{e&&"object"==typeof e&&(Object.prototype.hasOwnProperty.call(e,Rl)?e[Rl]=!0:Object.defineProperty(e,Rl,{value:!0,writable:!0,enumerable:!1,configurable:!0}))},syncInitialHostBuffer=(e,t,g=null)=>{if(hasInitialHostBufferSync(e))return;markInitialHostBufferSynced(e);const n=toArray(t?.lines);0!==n.length&&appendConvertedLines(e,convertHostLines(n,Boolean(nexusclient.settings?.().extra_break),g,getCurrentPromptHtml(e)))},getNextStreamSessionId=e=>{const t=getStreamModel(e),g=t?.getStats?.(),n=Number(g?.nextId??g?.sessionTotalLines);if(Number.isFinite(n))return Math.max(0,Math.floor(n));const C=(t?.getSnapshot?.()?.buffer??[]).at(-1)?.id;return Number.isFinite(C)?Math.max(0,Math.floor(C+1)):0},downloadScrollbackSessionSlice=async(e,t)=>{if("undefined"==typeof document||"undefined"==typeof Blob||"undefined"==typeof URL||"function"!=typeof URL.createObjectURL)return;const g=getScrollbackSession(e);if(!g?.readRange)return;const n=getUiSettings(e),C=Boolean(n.virtualizedLogs);let o=[];try{o=await g.readRange(Math.max(0,Math.floor(Number(t)||0)),Number.MAX_SAFE_INTEGER)}catch(I){return void console.error("[nexGui4] Failed reading scrollback log export",I)}0!==o.length&&downloadBuffer(o,C)},undoFooterLayout=()=>{if("undefined"==typeof document)return;const e=document.getElementById("status_vars");e&&["status-target","status-bank","status-gold","status-level","status-ping"].forEach(t=>{const g=document.getElementById(t);g&&e.prepend(g)})},isScrollbackRendererEnabled=()=>!1!==globalThis.nexusclient?.variables?.()?.vars?.nexGuiSettings?.options?.nexGuiRenderer,isScrollbackOpen=e=>getUiStoreState(e)?.modalOpen===wl,openScrollback=e=>getUiStoreState(e)?.openModal?.(wl),closeScrollback=e=>getUiStoreState(e)?.closeModal?.(),saveOriginalMethod=(e,t,g,{nullish:n=!1}={})=>{const C=`${g}_original`,o=Object.prototype.hasOwnProperty.call(t,C);return n?t[C]??=t[g]:void 0===t[C]&&(t[C]=t[g]),e.push(()=>{void 0!==t[C]&&(t[g]=t[C]),o||delete t[C]}),t[C]},removePatches=()=>{kl?.(),kl=null,Ml=null},applyPatches=({contextValue:e}={})=>{const t=Ml;if(removePatches(),"undefined"==typeof nexusclient)throw new Error("[nexGui4] applyPatches requires the live nexusclient host.");const g=getContextValue(e);if(!g)throw new Error("[nexGui4] applyPatches requires a live NexGui context value.");t&&t!==g&&clearRelationshipNameFormatterCache(t),Ml=g;const n=ensureRuntimeColors(g),C=[],o={logStartSessionId:null},I=nexusclient.ui().layout(),a=nexusclient._ui?._layout??I,i=nexusclient.datahandler(),s=nexusclient.platform(),l=nexusclient.serverapi(),c=nexusclient.log(),u=nexusclient.buffer();syncInitialHostBuffer(g,u,n);const d=Object.prototype.hasOwnProperty.call(i,"handle_GMCP_original"),p=Object.prototype.hasOwnProperty.call(I,"get_tab_object_original"),m=Object.prototype.hasOwnProperty.call(a,"get_tab_object_original"),h=Object.prototype.hasOwnProperty.call(I,"nexoverrides"),y=new Map(xl.filter(e=>Object.prototype.hasOwnProperty.call(I.nexoverrides??{},e)).map(e=>[e,I.nexoverrides[e]]));initializeTabs({contextValue:g}),C.push(()=>{const e=getRuntime();e&&"object"==typeof e&&delete e[El],void 0!==I.get_tab_object_original&&(I.get_tab_object=I.get_tab_object_original),xl.forEach(e=>{I.nexoverrides&&(y.has(e)?I.nexoverrides[e]=y.get(e):delete I.nexoverrides[e])}),!h&&I.nexoverrides&&0===Object.keys(I.nexoverrides).length&&delete I.nexoverrides,p||delete I.get_tab_object_original,m||delete a.get_tab_object_original});const b=saveOriginalMethod(C,nexusclient,"process_lines");nexusclient.process_lines=function(e){const t=safeCall$1(b,this,e);return this.gagged||appendConvertedLines(g,convertHostLines(e,Boolean(nexusclient.settings?.().extra_break),n,getCurrentPromptHtml(g))),t};const v=saveOriginalMethod(C,nexusclient,"_add_line");nexusclient._add_line=function(e,t){const n=!this.current_block,C=safeCall$1(v,this,e,t);if(!n)return C;appendConvertedLines(g,[convertHostLine(e,t??"main")].filter(Boolean))},"undefined"==typeof nexSys&&(saveOriginalMethod(C,u,"add_block"),u.add_block=function(e){let t=0,g=0;for(let C=0;C<e.length;++C){const n=e[C];n.log&&g++,n.gag||!n.parsed_line&&!n.html_line||(!n.is_prompt||t?(!n.parsed_line||safeCall$1(n.parsed_line.text,n.parsed_line)||0!==t&&C!==e.length-1)&&(safeCall$1(this._fill_tab_completion,this,n),t++,this.lineid++,n.id=this.lineid,this.lines.push(n),this.unread=!0):n.gag=!0)}const n=safeCall$1(this.prune_lines,this);(t||g||n)&&safeCall$1(this.on_lines_changed,this)});const x=saveOriginalMethod(C,c,"enable");c.enable=function(){const e=safeCall$1(x,this),t=getNextStreamSessionId(g);return o.logStartSessionId=Math.max(0,t-100),e};const S=saveOriginalMethod(C,c,"disable");c.disable=function(){const e=safeCall$1(S,this),t=getUiSettings(g);if(null!=o.logStartSessionId||t.logoutDownload){const e=o.logStartSessionId??0;o.logStartSessionId=null,downloadScrollbackSessionSlice(g,e)}return e};const w=saveOriginalMethod(C,l,"on_disconnect");l.on_disconnect=function(){this.__anonymous=!1,this.__game=null,this.__name=null,undoFooterLayout();const e=getUiSettings(g);if(null!=o.logStartSessionId||e.logoutDownload){const e=o.logStartSessionId??0;o.logStartSessionId=null,downloadScrollbackSessionSlice(g,e)}return safeCall$1(w,this)},saveOriginalMethod(C,s,"on_key_down",{nullish:!0}),s.on_key_down=function(e,t,n,C){return n&&C&&76===e||33===e&&isScrollbackRendererEnabled()&&!isScrollbackOpen(g)?(openScrollback(g),!0):(27===e&&closeScrollback(g),safeCall$1(this.on_key_down_original,this,e,t,n,C))},void 0===i.handle_GMCP_original&&(i.handle_GMCP_original=i.handle_GMCP),C.push(()=>{void 0!==i.handle_GMCP_original&&(i.handle_GMCP=i.handle_GMCP_original,d||delete i.handle_GMCP_original)}),i.handle_GMCP=function(e,t){if("Comm.Channel.Text"===e){const e="string"==typeof t?(()=>{try{return JSON.parse(t)}catch{return null}})():t;if("says"===e?.channel&&"string"==typeof e.talker&&e.talker.indexOf(" ")>-1&&-1===e.talker.indexOf("Discord"))return;if(e?.talker===globalThis.GMCP?.Char?.Status?.name&&"string"==typeof e.text&&e.text.includes("Duanathar."))return}return safeCall$1(this.handle_GMCP_original,this,e,t)};const E=saveOriginalMethod(C,I,"write_channel");I.write_channel=function(e,t){if(!t||"function"!=typeof this.channel_id_from_cmd||"function"!=typeof this.channel_record)return safeCall$1(E,this,e,t);ensureRuntimeColors(g).inLineHighlighting(t);const n=Date.now(),C=[{parsed_line:t,timestamp_ms:formatTimestamp(!0,n),timestamp:formatTimestamp(!1,n)}],o=this.channel_id_from_cmd(e),I=this.channel_record(o);if(I)try{I.buffer.add_block(C)}catch{}try{this._nexus.comm_buffer().add_block(C)}catch{}};const R=registerTriggers(g),M=registerEvents(g);return C.push(R),C.push(M),kl=()=>{for(;C.length>0;)C.pop()?.();Ml=null,kl=null},removePatches},installGlobalNexGui=e=>(globalThis.nexGui?.destroy?.(),globalThis.nexGui=e,e),Tl="nexgui4-styles",Pl=new Map,getStyleElement=()=>{if("undefined"==typeof document||"function"!=typeof document.getElementById||!document.head)return null;const e=document.getElementById(Tl);if(e)return e;const t=document.createElement("style");return t.id=Tl,document.head.appendChild(t),t},registerNexguiStyles=(e,t)=>{if(!e||"string"!=typeof t)return;const g=getStyleElement();g&&(Pl.set(e,t.trim()),g.textContent=Array.from(Pl.values()).filter(Boolean).join("\n\n"))},Nl="replacement-base",Dl=Bt.replacement,toDamageSlug=e=>e.toLowerCase().replace(/\s+/g,"-"),buildCatalogRules=()=>[".ng-skill-default { color: orange; }",Object.entries(Ze).map(([e,t])=>`.ng-skill-${e} { color: ${t}; }`).join("\n"),".ng-action-default { color: grey; }",Object.entries(Qe).map(([e,t])=>`.ng-action-${e} { color: ${t.fg}; }`).join("\n"),".ng-dmg-unknown { color: grey; }",Object.entries(He).map(([e,t])=>`.ng-dmg-${toDamageSlug(e)} { color: ${t}; }`).join("\n"),".ng-muted { color: grey; }",".ng-npc-bracket { color: red; font-weight: bold; }",".ng-crit-separator { color: white; }",".ng-dmg-bracket { color: #808080; }",".ng-hp-loss { color: tomato; }",".ng-info-text { color: cadetblue; font-style: italic; }"].filter(Boolean).join("\n"),Ol=`\n/* nexGui4 replacement visual primitives — injected by replacementStyles.js */\n.ng-brkt { font-weight: bold; }\n.ng-brkt-ally { color: ${Dl.bracketAllyColor}; }\n.ng-brkt-enemy { color: ${Dl.bracketEnemyColor}; }\n.ng-italic { font-style: italic; }\n.ng-target-format {\n box-decoration-break: clone;\n -webkit-box-decoration-break: clone;\n box-shadow: inset 0 0 0 1px ${Dl.targetBorderColor};\n padding: 0 2px;\n position: relative;\n z-index: 1;\n}\n.ng-icon-fill-1 { fill: var(--ng-fill-1); }\n.ng-icon-fill-2 { fill: var(--ng-fill-2); }\n\n/* Legacy message replacement row classes retained for compatibility. */\n.ng-seg { display: table-cell; color: #aaa; }\n.ng-msgline { display: inline-table; width: calc(100% - 15ch); }\n.ng-w-0 { width: 0; }\n.ng-w-5 { width: 5%; }\n.ng-w-30 { width: 30%; }\n.ng-w-35 { width: 35%; }\n\n/* Flex layout for structured skill replacement rows */\n.nexgui4-replacement-row {\n display: inline-flex;\n width: calc(100% - 15ch); /* account for timestamp */\n min-width: 0;\n overflow: hidden;\n vertical-align: top;\n}\n.nexgui4-replacement-row__buffer {\n flex: 0 0 5%;\n}\n.nexgui4-replacement-row__actor {\n flex: 0 0 30%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.nexgui4-replacement-row__action {\n flex: 0 0 35%;\n}\n.nexgui4-replacement-row__target {\n flex: 1;\n min-width: 0;\n}\n\n${buildCatalogRules()}\n`.trim(),injectReplacementBaseStyles=()=>{registerNexguiStyles(Nl,Ol)},jl="transcript-viewport",zl="\n/* nexGui4 transcript viewport primitives. */\n.nexgui4-transcript-scroll-viewport {\n flex: 1;\n min-height: 0;\n overflow-anchor: none;\n overflow-y: auto;\n position: relative;\n margin: 5px;\n}\n\n.nexgui4-transcript-scroll-viewport--display {\n -ms-overflow-style: none;\n scrollbar-width: none;\n}\n\n.nexgui4-transcript-scroll-viewport--display::-webkit-scrollbar {\n display: none;\n}\n\n.nexgui4-transcript-spacer {\n width: 100%;\n}\n\n.nexgui4-transcript-spacer--display {\n box-sizing: border-box;\n}\n\n.nexgui4-transcript-spacer--panel {\n position: relative;\n}\n\n.nexgui4-transcript-row {\n width: 100%;\n}\n\n.nexgui4-transcript-row--panel {\n left: 0;\n position: absolute;\n top: 0;\n}\n\n.nexgui4-virtual-scroll-line {\n align-items: baseline;\n contain: layout style paint;\n display: flex;\n font-family: inherit;\n min-width: 0;\n}\n\n.nexgui4-virtual-scroll-line.nexguilog {\n display: flex !important;\n}\n\n.nexgui4-main-display-timestamp.timestamp,\n.nexgui4-scrollback-timestamp.timestamp,\n.nexgui4-structured-stream-panel__timestamp.timestamp {\n display: inline !important;\n}\n\n.nexgui4-virtual-scroll-line__payload {\n flex: 1;\n min-width: 0;\n overflow-wrap: anywhere;\n white-space: pre-wrap;\n}\n\n.nexgui4-prompt-line {\n position: static;\n width: 100%;\n}\n".trim(),injectTranscriptStyles=()=>{registerNexguiStyles(jl,zl)},Gl={"shield-halved":[512,512,["shield-alt"],"f3ed",["M256 0c.2 0 .5 0 .7 0c4.6 0 9.2 1 13.4 2.9L458.4 82.8c22 9.3 38.4 31 38.3 57.2c-.5 99.2-41.3 280.7-213.6 363.2c-8.3 4-17.4 6-26.4 6V0H256z","M256.7 0c-.2 0-.5 0-.7 0c-4.6 0-9.2 1-13.4 2.9L54.3 82.8c-22 9.3-38.4 31-38.3 57.2c.5 99.2 41.3 280.7 213.6 363.2c8.3 4 17.4 6 26.4 6V0h.7z"]],"shield-cross":[512,512,[9960],"f712",["M224 10.8L54.3 82.8c-22 9.3-38.4 31-38.3 57.2c0 6.4 .2 13 .6 20H192c17.7 0 32-14.3 32-32V10.8zM24.7 224C43.7 319.9 97.4 437.2 224 500.4V256c0-17.7-14.3-32-32-32H24.7zM288 500.4C414.6 437.2 468.3 319.9 487.3 224H320c-17.7 0-32 14.3-32 32V500.4zM495.4 160c.4-7 .6-13.7 .6-20c.1-26.2-16.3-47.9-38.3-57.2L288 10.8V128c0 17.7 14.3 32 32 32H495.4z","M288 10.8L269.4 2.9C265.2 1 260.7 0 256 0s-9.2 1-13.4 2.9L224 10.8V128c0 17.7-14.3 32-32 32H16.6c1.1 19.4 3.6 41.1 8.1 64H192c17.7 0 32 14.3 32 32V500.4c1.9 .9 3.7 1.8 5.6 2.7c16.7 8 36.1 8 52.8 0c1.9-.9 3.8-1.8 5.6-2.7V256c0-17.7 14.3-32 32-32H487.3c4.5-22.9 7.1-44.6 8.1-64H320c-17.7 0-32-14.3-32-32V10.8z"]],tree:[448,512,[127794],"f1bb",["M210.6 5.9L62 169.4c-3.9 4.2-6 9.8-6 15.5C56 197.7 66.3 208 79.1 208H104L30.6 281.4c-4.2 4.2-6.6 10-6.6 16C24 309.9 34.1 320 46.6 320H80L5.4 409.5C1.9 413.7 0 419 0 424.5c0 13 10.5 23.5 23.5 23.5H192V224c0-17.7 14.3-32 32-32s32 14.3 32 32V448H424.5c13 0 23.5-10.5 23.5-23.5c0-5.5-1.9-10.8-5.4-15L368 320h33.4c12.5 0 22.6-10.1 22.6-22.6c0-6-2.4-11.8-6.6-16L344 208h24.9c12.7 0 23.1-10.3 23.1-23.1c0-5.7-2.1-11.3-6-15.5L237.4 5.9C234 2.1 229.1 0 224 0s-10 2.1-13.4 5.9z","M224 192c17.7 0 32 14.3 32 32V480c0 17.7-14.3 32-32 32s-32-14.3-32-32V224c0-17.7 14.3-32 32-32z"]],droplet:[384,512,[128167,"tint"],"f043",["M192 512C86 512 0 426 0 320C0 228.8 130.2 57.7 166.6 11.7C172.6 4.2 181.5 0 191.1 0h1.8c9.6 0 18.5 4.2 24.5 11.7C253.8 57.7 384 228.8 384 320c0 106-86 192-192 192zM96 336c0-8.8-7.2-16-16-16s-16 7.2-16 16c0 61.9 50.1 112 112 112c8.8 0 16-7.2 16-16s-7.2-16-16-16c-44.2 0-80-35.8-80-80z","M80 320c8.8 0 16 7.2 16 16c0 44.2 35.8 80 80 80c8.8 0 16 7.2 16 16s-7.2 16-16 16c-61.9 0-112-50.1-112-112c0-8.8 7.2-16 16-16z"]],tombstone:[448,512,[],"f720",["M224 0C118 0 32 86 32 192V448H416V192C416 86 330 0 224 0zm24 152v40h48c13.3 0 24 10.7 24 24s-10.7 24-24 24H248V360c0 13.3-10.7 24-24 24s-24-10.7-24-24V240H152c-13.3 0-24-10.7-24-24s10.7-24 24-24h48V152c0-13.3 10.7-24 24-24s24 10.7 24 24z","M248 152c0-13.3-10.7-24-24-24s-24 10.7-24 24v40H152c-13.3 0-24 10.7-24 24s10.7 24 24 24h48V360c0 13.3 10.7 24 24 24s24-10.7 24-24V240h48c13.3 0 24-10.7 24-24s-10.7-24-24-24H248V152zM32 448c-17.7 0-32 14.3-32 32s14.3 32 32 32H416c17.7 0 32-14.3 32-32s-14.3-32-32-32H32z"]],feather:[512,512,[129718],"f52d",["M97.9 448h84c49.7 0 97.9-14.4 139-41c11.1-7.2 5.5-23-7.8-23c-5.1 0-9.2-4.1-9.2-9.2c0-4.1 2.7-7.6 6.5-8.8l81-24.3c2.5-.8 4.8-2.1 6.7-4l22.4-22.4c10.1-10.1 2.9-27.3-11.3-27.3l-32.2 0c-5.1 0-9.2-4.1-9.2-9.2c0-4.1 2.7-7.6 6.5-8.8l112-33.6c4-1.2 7.4-3.9 9.3-7.7C506.4 207.6 512 184.1 512 160c0-41-16.3-80.3-45.3-109.3l-5.5-5.5C432.3 16.3 393 0 352 0s-80.3 16.3-109.3 45.3L139 149C91 197 64 262.1 64 330v84L311 167c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L97.9 448z","M24 512c-6.2 0-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9L311 167c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L41 505c-4.7 4.7-10.8 7-17 7z"]],"fish-fins":[576,512,[],"e4f2",["M182 150.4C221.3 120.9 273.7 96 336 96s114.7 24.9 154 54.4c39.2 29.4 67.2 64.7 81.6 89.5c5.8 9.9 5.8 22.2 0 32.1c-14.4 24.8-42.5 60.1-81.6 89.5C450.7 391.1 398.3 416 336 416s-114.7-24.9-154-54.4c-15.3-11.5-29-23.9-40.7-36.3L48.1 379.6c-12.5 7.3-28.4 5.3-38.7-4.9S-3 348.7 4.2 336.1L50 256 4.2 175.9c-7.2-12.6-5-28.4 5.3-38.6s26.1-12.2 38.7-4.9l93.1 54.3c11.8-12.3 25.4-24.8 40.7-36.3zM448 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z","M238.9 36.9C227.7 44 222 57.3 224.6 70.3l9.7 48.6C264.1 105.1 298.2 96 336 96c5.7 0 11.3 .2 16.8 .6L275.2 38.4c-10.6-8-25-8.5-36.3-1.5zm-4.6 356.2l-9.7 48.6c-2.6 13 3.1 26.3 14.3 33.3s25.6 6.5 36.3-1.5l77.6-58.2c-5.5 .4-11.1 .6-16.8 .6c-37.8 0-71.9-9.1-101.7-22.9z"]]},Ll="host-surface",Bl="character_module_class",Fl="100%",Wl="15%",Vl="\nhtml { -webkit-font-smoothing: subpixel-antialiased; }\n.flexlayout__splitter { background-color: grey; }\n.flexlayout__tab { background-color: #000 !important; }\n.output { padding: 5px; }\n.nexguilog { display: none; }\n\n.ng-timestamp { margin-right: 1ch; }\n\n.ng-virtual-list {\n background: black;\n width: 100%;\n overflow-y: auto;\n contain: strict;\n padding-bottom: 0;\n}\n\n.ng-virtual-list--border { border-bottom: 1px solid #ccc; }\n\n.ng-virtual-anchor {\n overflow-anchor: none;\n width: 100%;\n color: white;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n\n.ng-ListItem { contain: layout inline-size; }\n\n.nexgui4-tab-container {\n isolation: isolate;\n overflow: hidden;\n position: relative;\n}\n\n.nexgui4-tab-container__background {\n inset: 0;\n pointer-events: none;\n position: absolute;\n z-index: 0;\n}\n\n.nexgui4-tab-container__surface,\n.nexgui4-tab-container__tabs,\n.nexgui4-tab-container__tabpanel {\n position: relative;\n z-index: 1;\n}\n".trim(),injectHostStyles=()=>{registerNexguiStyles(Ll,Vl)},setClassBalanceIconReadyState=e=>{if("undefined"==typeof document)return;const t=document.getElementById(Bl);t&&(t.style.opacity=!0===e?Fl:!1===e?Wl:"")},bindClassBalanceIcon=({characterStore:e}={})=>{if(!e||"function"!=typeof e.getState||"function"!=typeof e.subscribe)return()=>{};const sync=(t=e.getState())=>{setClassBalanceIconReadyState(t?.classBalanceReady??null)};return sync(),e.subscribe(e=>{sync(e)})},injectFontAwesomeIcons=()=>{"undefined"!=typeof window&&window.___FONT_AWESOME___?.styles?.fad&&Object.assign(window.___FONT_AWESOME___.styles.fad,Gl)},Ul=300,Kl=null,forceFooterHostElementsVisible=e=>{e?.setHostSetting?.("show_gauges",!0),e?.setHostSetting?.("show_balances",!0)},applyFooterLayout=()=>{if("undefined"==typeof document)return;const e=document.getElementsByClassName("bottom_view")[0];e&&(e.style.padding="0px",e.children[2]&&(e.children[2].style.margin="0px"));const t=document.getElementById("status_vars");if(t){for(let g=0;g<t.children.length;g++)Object.assign(t.children[g].style,{fontSize:"14.4px",marginTop:"auto",marginBottom:"auto",verticalAlign:"middle"});Object.assign(t.style,{justifyContent:"flex-start",alignItems:"center",marginTop:0,marginBottom:0});const e=document.getElementById("component_balances");e&&(t.prepend(e),e.style.minWidth="50px",e.style.marginTop="5px",e.style.gap="2px")}const g=document.getElementById("extra_icons");g&&(Object.assign(g.style,{display:"flex",justifyContent:"end",gap:"10px"}),["status-bank","status-gold","status-level","status-ping"].forEach(e=>{const t=document.getElementById(e);t&&g.prepend(t)}));const n=document.getElementById("status-ping");n&&(n.style.minWidth="57px");const C=document.getElementById("left_icons");if(C){Object.assign(C.style,{minWidth:"300px",maxWidth:"500px"}),C.children[0]&&(C.children[0].style.visibility="hidden",C.children[0].style.width="0px");const e=document.getElementById("status-target");e&&(C.prepend(e),e.style.fontSize="12px",e.style.fontWeight="bold")}const o=document.getElementById("footer");if(o&&g){const e=document.getElementById("gauges");if(e){o.insertBefore(e,g),Object.assign(e.style,{display:"flex",transform:"scaleY(0.85)",minWidth:0,flexGrow:100,alignItems:"center"});for(const t of e.children)t.children[1]&&(t.children[1].style.fontSize="12px"),t.style.flexGrow=1}}document.getElementById(Bl)?.remove();const I=document.createElement("div");I.id=Bl,I.className="balance class-balance",I.style.flexGrow="1",I.innerHTML=`<svg aria-hidden="true" focusable="false" data-prefix="fad" data-icon="hourglass" class="svg-inline--fa fa-star fa-w-18" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512" color="#33FFD4" style="font-size: 20px;"><g class="fa-group"><path class="fa-secondary" fill="currentColor" d="${window.___FONT_AWESOME___?.styles?.fa?.hourglass?.[4]??""}"></path><path class="fa-primary" fill="currentColor" d=""></path></g></svg>`,document.getElementById("component_balances")?.appendChild(I),document.getElementById("balance_balance")?.setAttribute("style","flex-grow: 1"),document.getElementById("balance_equilibrium")?.setAttribute("style","flex-grow: 1")},configureFlexLayout=()=>{if("undefined"==typeof nexusclient)return;const e=nexusclient.ui().layout(),t=e.model()?.global??{},g="boolean"!=typeof t.tabSetEnableTabStrip||t.tabSetEnableTabStrip;e.flexModel.doAction({type:"FlexLayout_UpdateModelAttributes",data:{json:{splitterSize:2,tabSetEnableTabStrip:g,tabEnableClose:!1,tabSetEnableMaximize:!1,borderEnableAutoHide:!0,borderEnableDrop:!0}}}),["right","left","top","bottom"].forEach(t=>{e.model().borders.find(e=>e.location===t)||e.model().borders.push({type:"border",location:t,children:[]})});const borderLeaveEvent=()=>{Kl&&(document.getElementsByClassName("MuiPopover-root MuiMenu-root MuiModal-root").length||e.flexModel.doAction({type:"FlexLayout_SelectTab",data:{tabNode:Kl}}))},n=document.getElementsByClassName("flexlayout__tab_border_right");for(let o=0;o<n.length;o++)n[o].addEventListener("mouseleave",borderLeaveEvent);const borderMouseOverEvent=t=>{const g=t.target.title;g&&(e.flexModel.getNodeById(g)?.isVisible()||(Kl=g,e.flexModel.doAction({type:"FlexLayout_SelectTab",data:{tabNode:Kl}})))},C=document.getElementsByClassName("flexlayout__border_button_right");for(let o=0;o<C.length;o++){const t=C[o];t.addEventListener("mouseenter",borderMouseOverEvent);const g=e.model().borders[0]?.children.find(e=>e.id===t.title);g&&g.borderWidth<Ul&&(g.borderWidth=Ul)}},Hl="nexGui4",Yl="https://unpkg.com/nexgui4/dist/nexGui4.nxs",Zl="khaseem",Ql=1e4,Xl=[{key:"classCustomizations",names:["nexGui.classCustomizations","classCustomizations"]},{key:"userSettings",names:["nexGui.userSettings","userSettings"]}],_l=new Set(Xl.flatMap(({names:e})=>e.map(e=>e.toLowerCase()))),toLowerName=e=>String(e??"").trim().toLowerCase(),clonePackageItem=e=>{if(!e||"object"!=typeof e)return null;if("function"==typeof structuredClone)try{return structuredClone(e)}catch{}try{return JSON.parse(JSON.stringify(e))}catch{return e}},safeCall=e=>{try{return e()}catch{return null}},getReflexes=e=>safeCall(()=>e?.reflexes?.())??null,getPackageRegistry=e=>{const t=safeCall(()=>e?.packages?.());if("function"==typeof t?.get)return t;const g=safeCall(()=>getReflexes(e)?.packages?.());return"function"==typeof g?.get?g:null},getNexGuiPackage=(e,t=Hl)=>safeCall(()=>getPackageRegistry(e)?.get(t))??null,findPackageItemByNames=(e,t)=>{if(!Array.isArray(e))return null;const g=new Set(t.map(toLowerName));return e.find(e=>g.has(toLowerName(e?.name)))??null},captureCustomizationGroups=e=>Xl.map(({key:t,names:g})=>{const n=findPackageItemByNames(e?.items,g);return n?{key:t,names:g,data:clonePackageItem(n)}:null}).filter(Boolean),applyCustomizationGroup=(e,t,g)=>{const n=findPackageItemByNames(e?.items,t.names);return!(!n||!t.data||("function"==typeof n.apply?(n.apply(t.data,g),0):"object"!=typeof n||"object"!=typeof t.data||(Object.assign(n,clonePackageItem(t.data)),0)))},enableRuntimePackageGroups=e=>{Array.isArray(e?.items)&&e.items.filter(e=>"group"===e?.type&&!_l.has(toLowerName(e.name))).forEach(e=>{e.enabled=!0})},reportUpdateError=({adapter:e,consoleObj:t,message:g,nexusClient:n})=>{t.error(g),"function"!=typeof e?.notice?"function"!=typeof n?.display?n?.display_notice?.(g,"red"):n.display(g):e.notice(g,"red")},createAbortSignal=({AbortControllerCtor:e,setTimeoutFn:t,timeoutMs:g})=>{if(!e||g<=0)return{signal:void 0,timeout:null};const n=new e,C=t(()=>n.abort(),g);return{signal:n.signal,timeout:C}},updateNxs=async({adapter:e=null,clearTimeoutFn:t=clearTimeout,consoleObj:g=console,fetchFn:n=globalThis.fetch,nexusClient:C=globalThis.nexusclient,packageName:o=Hl,setTimeoutFn:I=setTimeout,skipCharacterName:a=Zl,timeoutMs:i=Ql,url:s=Yl}={})=>{if(toLowerName(C?.charname)===toLowerName(a))return null;const l=getPackageRegistry(C);if(!l)return null;let c=null;try{if("function"!=typeof n)throw new Error("fetch is not available.");const e=l.get(o);if(!e||"function"!=typeof e.apply)throw new Error(`${o} package is not installed in Nexus.`);const t=captureCustomizationGroups(e),{signal:g,timeout:a}=createAbortSignal({AbortControllerCtor:globalThis.AbortController,setTimeoutFn:I,timeoutMs:i});c=a;const u=await n(s,{cache:"no-store",...g?{signal:g}:{}});if(!u?.ok)throw new Error(`${o} update failed: ${u?.status??"unknown"} ${u?.statusText??""}`.trim());const d=await u.json(),p=getReflexes(C),m=getNexGuiPackage(C,o);m.apply(d,p);const h=getNexGuiPackage(C,o)??m;return t.forEach(e=>{applyCustomizationGroup(h,e,p)}),enableRuntimePackageGroups(h),d}catch(u){return reportUpdateError({adapter:e,consoleObj:g,message:"AbortError"===u?.name?`${o} update timed out. Check your connection.`:`${o} update error: ${u?.message??String(u)}`,nexusClient:C}),null}finally{null!==c&&t(c)}},ql="https://api.achaea.com/gamefeed.json",Jl=5e3,normalizeFetchedEntries=e=>Array.isArray(e)?e.filter(Boolean):[],parseTimestamp=e=>{if("string"!=typeof e||0===e.trim().length)return;const t=e.trim(),g=t.match(/^(\d{4})-(\d{2})-(\d{2})[ T](\d{2}):(\d{2}):(\d{2})$/);if(g){const[,e,t,n,C,o,I]=g;return Date.UTC(Number(e),Number(t)-1,Number(n),Number(C),Number(o),Number(I),0)}const n=t.includes("T")?t:t.replace(" ","T"),C=/(?:Z|[+-]\d{2}:?\d{2})$/i.test(n),o=Date.parse(C?n:`${n}Z`);return Number.isFinite(o)?o:void 0},toStoreEntry=e=>({content:e.description??e.caption??null,id:e.id??void 0,timestamp:parseTimestamp(e.date)}),mapEntries=e=>e.map(e=>toStoreEntry(e)),applySnapshot=(e,t)=>{const g=e?.getState?.();if(!g)return;const n=mapEntries(t);if("function"!=typeof g.replaceEntries){g.clear();for(const e of n)g.addEntry(e)}else g.replaceEntries(n)},appendEntries=(e,t)=>{const g=e?.getState?.();if(!g)return;const n=mapEntries(t);if("function"!=typeof g.addEntries)for(const C of n)g.addEntry(C);else g.addEntries(n)},createGameFeedPoller=({feedStore:e,fetchFn:t=null,setIntervalFn:g=null,clearIntervalFn:n=null,intervalMs:C=Jl,url:o=ql})=>{let I=null,a=null,i=!1,s=null;const syncFromRemote=async()=>{if("function"!=typeof t)return[];try{const g=await t(o,{cache:"no-store"});if(!g?.ok)return[];const n=normalizeFetchedEntries(await g.json());if(!i||0===n.length)return n;const C=n.at(-1)?.id??null;if(null==C)return applySnapshot(e,n),n;if(null==s)return applySnapshot(e,n),s=C,n;if(C===s)return[];const I=n.findIndex(e=>e?.id===s);return I<0?applySnapshot(e,n):appendEntries(e,n.slice(I+1)),s=C,n}catch{return[]}},pollOnce=()=>a||(a=syncFromRemote().finally(()=>{a=null}),a);return{start:()=>{i||(i=!0,pollOnce(),"function"==typeof g&&(I=g(()=>{pollOnce()},C)))},stop:()=>{i=!1,null!==I&&"function"==typeof n&&(n(I),I=null)},pollOnce}},$l="https://2a9fwzdazf.execute-api.us-east-2.amazonaws.com/nexGui/cdb",ec="zr1te94RPZ4yaMJCc6j134eAxDsCpkmm48py1GaD",resolveRemoteService=({remoteService:e,remotePlayerService:t,fetchFn:g}={})=>{if(e)return e;const n=t??{apiUrl:$l,apiKey:ec};return createLambdaRemotePlayerService({...n,fetchFn:n.fetchFn??g})},bootstrapNexus=(e={})=>{const{adapter:t,autoStart:g,startupPhaseHandlers:n,remoteService:C,remotePlayerService:o,feedPollingEnabled:I=!0,runtimePorts:a,...i}=e,s=a??createBrowserRuntimePorts(),l=createNexusAdapter(),c=resolveRemoteService({remoteService:C,remotePlayerService:o,fetchFn:s.fetch});let u,d=!1,p=!1,m=!1,h=!1,y=!1,b=!1,v=!1,x=!1,S=null,removeLivePatches=()=>{},removeClassBalanceBinding=()=>{},removeNetflixModeController=()=>{},removeNativeDisplayCommands=()=>{},removeLayoutCommands=()=>{};const ensureFeedPoller=()=>I?(S??=createGameFeedPoller({feedStore:u.stores.feed,fetchFn:s.fetch,setIntervalFn:s.setInterval,clearIntervalFn:s.clearInterval}),S):null;return u=createNexGui({adapter:l,autoStart:!1,remoteService:c,startupPhaseHandlers:{[lt.BOOTING]:async()=>{const e=updateNxs({adapter:l,fetchFn:s.fetch,setTimeoutFn:s.setTimeout,clearTimeoutFn:s.clearTimeout});injectHostStyles(),injectTranscriptStyles(),injectReplacementBaseStyles(),injectFontAwesomeIcons();const t=u.__contextValue,g=t?.persistenceStore?.get("ui")?.nativeDisplay??!1;if(d||(generateTabs(),d=!0),p||(forceFooterHostElementsVisible(l),configureFlexLayout(),applyFooterLayout(),p=!0),h||(removeClassBalanceBinding=bindClassBalanceIcon({characterStore:u.stores.character}),h=!0),y||(removeNetflixModeController=createNetflixModeController({adapter:l,uiStore:u.stores.ui,characterStore:u.stores.character}),y=!0),m||(removeLivePatches=applyPatches({contextValue:t}),m=!0,g&&t.platformTabs.mountNativeDisplay()),!v){const e=l.destroy.bind(l);l.destroy=()=>{S?.stop(),removeNativeDisplayCommands(),removeLayoutCommands(),removeClassBalanceBinding(),h=!1,removeNetflixModeController(),y=!1,m&&(removeLivePatches(),m=!1),e()},v=!0}x||(l.send("stat"),l.send("pwho"),l.send("enemies"),l.send("allies"),l.send("city enemies"),l.send("date"),l.send("ql"),x=!0),t.playerDirectoryLifecycle.warmDirectoryFromCache(),b||(t.playerDirectoryLifecycle.subscribePersistence(),b=!0),t.playerDirectoryLifecycle.refreshDirectoryFromRemote(c),ensureFeedPoller()?.start(),await e}},runtimePorts:s,...i}),removeNativeDisplayCommands=u.__contextValue.platformTabs.configureNativeDisplayCommands({mountNativeDisplay:()=>mountNativeDisplay({contextValue:u.__contextValue}),unmountNativeDisplay:()=>{unmountNativeDisplay()}}),removeLayoutCommands=u.__contextValue.platformTabs.configureLayoutCommands({applyLayoutPreset,saveLayout:saveCurrentLayout,restoreLayout:restoreSavedLayout,hasSavedLayout}),installGlobalNexGui(u),u.__start().catch(()=>{}).then(()=>{emitStartupReadySignal(l),runNexGuiClassReflexForCurrentHostClass()}),u},createMockAdapter=({playerRelationships:e}={})=>{const t=[],g=new Map,n=new Map,C={echo_input:!1,echo_gmcp:!1,show_prompts:!0,show_timestamps:!1},o={tabSetEnableTabStrip:!1};let I=0,a=0;const getListenerBucket=e=>(n.has(e)||n.set(e,new Map),n.get(e)),resolveListenerId=(e,t={})=>t.id??"listener-"+ ++a,removeListener=(e,t)=>{const g=n.get(e);if(!g)return!1;if("string"==typeof t)return g.delete(t);for(const[n,C]of g.entries())if(C.handler===t)return g.delete(n),!0;return!1},i=assertAdapterContract({send:g=>{e?.trackRelationshipCommand?.(g),t.push(g)},sendGmcp:(e,g)=>t.push({gmcp:e,data:g}),getVariable:e=>g.get(e),setVariable:(e,t)=>g.set(e,t),getTarget:()=>g.get("_target")??null,setTarget:e=>g.set("_target",e),notice:()=>{},getHostSettings:()=>C,setHostSetting:(e,t)=>{C[e]=t},getHostLayoutSnapshot:()=>o,updateHostLayoutAttributes:e=>{Object.assign(o,e)},focusInput:()=>{},getConfiguredDefences:()=>[],getActiveDefences:()=>[],gagCurrentBlock:()=>{I+=1},on:(e,t,g)=>{const n=resolveListenerId(t,g);return getListenerBucket(e).set(n,{handler:t,once:Boolean(g?.once)}),()=>removeListener(e,n)},off:(e,t)=>removeListener(e,t),destroy:()=>{n.clear()}});return i._test={getSentCommands:()=>[...t],clearCommands:()=>{t.length=0},getGaggedBlockCount:()=>I,triggerEvent:(e,t)=>{const g=n.get(e);if(g)for(const[n,C]of[...g.entries()])C.handler(t),C.once&&g.delete(n)},setVariable:(e,t)=>g.set(e,t)},i},bootstrapPlayground=(e={})=>{const{feedPollingEnabled:t=!0,startupPhaseHandlers:g={},runtimePorts:n,...C}=e,o=n??createBrowserRuntimePorts(),I=createMockAdapter();let a,i=null;const ensureFeedPoller=()=>t?(i??=createGameFeedPoller({feedStore:a.stores.feed,fetchFn:o.fetch,setIntervalFn:o.setInterval,clearIntervalFn:o.clearInterval}),i):null;a=createNexGui({adapter:I,runtimePorts:o,startupPhaseHandlers:{...g,[lt.BOOTING]:async e=>{await(g[lt.BOOTING]?.(e)),injectTranscriptStyles(),ensureFeedPoller()?.start()}},...C});const s=a.destroy.bind(a);return a.destroy=()=>{i?.stop(),s()},a},tc=Object.freeze({NexGuiContext:_t,applyInlineNameHighlighting,createMuiTheme,createReplacementDescriptor,generateReplacementHtml,injectReplacementBaseStyles,isRoomNpcItem,nexGuiIcons:Gl,panels:Object.freeze({CombatStream,DefencesPanel,GameFeed,ItemsPanel,MainDisplay,MetricsPanel,NpcsPanel,OptionsPanel,PartyPanel,PlayersPanel,StatsPanel,SystemStream,TargetPanel,TimersPanel})});e.TOPICS=$,e.bootstrapNexus=bootstrapNexus,e.bootstrapPlayground=bootstrapPlayground,e.composePublicApi=composePublicApi,e.createMockAdapter=createMockAdapter,e.createNexGui=createNexGui,e.createNexusAdapter=createNexusAdapter,e.defaultTokens=Bt,e.playground=tc,e.updateNxs=updateNxs}(globalThis.nexGui=globalThis.nexGui||{},React,ReactDOM,ReactDOM);